From cb091fe36afd4464dc87691088de68f2c2d1b4de Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 28 Aug 2026 21:25:26 -0400 Subject: [PATCH 1/4] perf(web): reduce streaming overhead --- .changeset/smoother-long-conversations.md | 5 + .../dist-web/.web-bundle-manifest.json | 2 +- ...-DhHNvLD-.js => CodeBlockNode-D4cpL5UZ.js} | 4 +- ...AzSMMN.js => DesignSystemView-DhJc-Ocy.js} | 2 +- ...ooltip-BDX9T6Zw.js => Tooltip-aicK0c3c.js} | 2 +- ...R-.js => abnfDiagram-VCTEODGH-DEfrkFuI.js} | 2 +- .../{arc-Bm7BOhts.js => arc-B8osaoVd.js} | 2 +- ... architectureDiagram-5GKGNRK7-BvF0UgoH.js} | 2 +- ...d.js => blockDiagram-NRAW4CY4-BNGA-QWb.js} | 2 +- ...aMKc.js => c4Diagram-UCG6FXSJ-BZuC3xtH.js} | 2 +- .../dist-web/assets/channel-CeJKBXng.js | 1 - .../dist-web/assets/channel-DZ2XEbLN.js | 1 + ...DDI19Bs6.js => chunk-2Q5K7J3B-CPFb-YMA.js} | 2 +- ...wCYaCTKB.js => chunk-5VM5RSS4-BX7DTcSO.js} | 2 +- ...A5JDBOgE.js => chunk-F27PBJKO-CGsciVEq.js} | 2 +- ...x-A8PhoW.js => chunk-G27WJ6UU-CIn6rVI9.js} | 2 +- ...BVyXOrT5.js => chunk-JWPE2WC7-D9ICAwD_.js} | 2 +- ...DoVNud6N.js => chunk-LCL6LL3I-Bvdjn-Qn.js} | 2 +- ...CyRmuplC.js => chunk-POPQ4Y6H-BpzExJjb.js} | 2 +- ...C35ZI9k-.js => chunk-SVP7TREG-D3M7Gbkt.js} | 2 +- ...GqpBYspR.js => chunk-XXDRQBXY-DaNzL58C.js} | 2 +- .../assets/classDiagram-DTDB5LWJ-C3txtkaA.js | 1 - .../assets/classDiagram-DTDB5LWJ-D8QxhnwF.js | 1 + .../classDiagram-v2-JRS7N3AN-C3txtkaA.js | 1 - .../classDiagram-v2-JRS7N3AN-D8QxhnwF.js | 1 + ...X.js => cose-bilkent-JH36ORCC-Du_KHUbL.js} | 2 +- ...ssMode-BrgZPA71.js => cssMode-BYOYZWAb.js} | 2 +- ...oOlDkN.js => cynefin-OW5HDTMX-BlED4Rd3.js} | 2 +- ...js => cynefinDiagram-5FMLGOSQ-BfZ2WMeD.js} | 2 +- ...DkuX21S_.js => dagre-3AP2YEHR-DNRBAAmc.js} | 2 +- ...kTP5l5.js => diagram-S7CK7UJ4-95PLVM0c.js} | 2 +- ...xzrkIm.js => diagram-UQ7AKVKN-DqI3S6m6.js} | 2 +- ...02PJbw.js => diagram-VSXAHHWV-Cps0EaEU.js} | 2 +- ...eqeF5i.js => diagram-VX7I27RA-TJJN2czJ.js} | 2 +- ...-mpA_H.js => diagram-Z3DM3KII-DnTJZ40O.js} | 2 +- ...U0.js => ebnfDiagram-PWID7BFC-CG3VCHMu.js} | 2 +- ...in-BVyazG_A.js => editor.main-yCrGDkyO.js} | 6 +- ...npe0.js => erDiagram-SSCWMZ5O-DzkblHwz.js} | 2 +- ...X0.js => flowDiagram-A5DVABFB-D6_Z_lfU.js} | 2 +- ...r2-D03L5Rmf.js => freemarker2-CG8OSn8H.js} | 2 +- ...I.js => ganttDiagram-EL5Y4UJY-DcpRnqwp.js} | 2 +- ...s => gitGraphDiagram-WWUBYQGX-t2_RmnTi.js} | 2 +- ...ars-DTB7OcjB.js => handlebars-vt5-G9kY.js} | 2 +- .../{html-Bx3Ftaqh.js => html-BwCzbm6J.js} | 2 +- ...lMode-Cyt5VoSI.js => htmlMode-BtW7hgTd.js} | 2 +- .../{index-COH6wcWn.js => index-0QXixtol.js} | 2 +- .../{index-uLe_baIw.js => index-BM4AkXWz.js} | 4 +- .../{index-vF2s5p7P.js => index-BZ9wqq8Z.js} | 554 ++++++++---------- .../{index-CfszvQ96.js => index-C_5a8vkb.js} | 2 +- ...{index-DmWWUMKQ.css => index-CgbqiNuj.css} | 2 +- ...ndex10-CG-shKcB.js => index10-DRKt26_3.js} | 2 +- ...ndex11-H71ylPuM.js => index11-BtnGHbJw.js} | 2 +- ...{index5-ClJqsKuw.js => index5-DRYrcfDq.js} | 2 +- ...{index6-8mtDOSly.js => index6-rJ6wldFa.js} | 2 +- ...{index7-DpSd4JVP.js => index7-BEZwnfMu.js} | 2 +- ...{index8-CdLvqqXT.js => index8-Cir0nNuz.js} | 2 +- ...r8.js => infoDiagram-RXCK75RN-Cn4b9A5u.js} | 2 +- ...s => ishikawaDiagram-5VMMS53U-CZhPeyom.js} | 2 +- ...ipt-CcXtvgWG.js => javascript-C1Bl1QAn.js} | 2 +- ...js => journeyDiagram-EYS64GPL-Bznj053h.js} | 2 +- ...nMode-BhgzQeiy.js => jsonMode-B4lkE7Oy.js} | 2 +- ...=> kanban-definition-3QL26DDD-gEE7iVwG.js} | 2 +- ...{layout-BKltItOX.js => layout-CRsCkvth.js} | 2 +- ...{linear-DehXFnHz.js => linear-Be-oTS5b.js} | 2 +- ...{liquid-D7rm-Mjg.js => liquid-OhilcA0U.js} | 2 +- ...5XZ.js => lspLanguageFeatures-Dzr62Jjp.js} | 2 +- .../{mdx-CvYmjfax.js => mdx-BNW26XnD.js} | 2 +- ...e-BgUXBQ9g.js => mermaid.core-BusHtpbx.js} | 10 +- ...> mindmap-definition-FBJOCRG2-OFTg7WuH.js} | 2 +- ...mBk.js => pegDiagram-XKGWAZYB-COpW3oto.js} | 2 +- ...wph.js => pieDiagram-E7YTZNPT-CSu4VKw9.js} | 2 +- ...{python-D5-SFkaZ.js => python-BeBGma8p.js} | 2 +- ...s => quadrantDiagram-AXDQQJYC-DwlY00_z.js} | 2 +- ...s => railroadDiagram-O6MQD6OU-E1VZdf0g.js} | 2 +- .../{razor-C8sRtc2W.js => razor-L05JTUrE.js} | 2 +- ...> requirementDiagram-EFPCY7ZU-CGyZBZTB.js} | 2 +- ....js => sankeyDiagram-P5KCCOFB-Djxn8nYX.js} | 2 +- ...s => sequenceDiagram-WJ2MYXX4-DTAyNeme.js} | 2 +- ...Yq.js => sizeCapture-X5ZJPWSS-CSVjY38-.js} | 2 +- ...1.js => stateDiagram-HBIQ2CUA-C3_d9P6D.js} | 2 +- .../stateDiagram-v2-4QOOHH4V-BoO7sp2R.js | 1 + .../stateDiagram-v2-4QOOHH4V-D31cKkvj.js | 1 - ...BVgg.js => swimlanes-XN3QIQJK-D3OEEV8W.js} | 2 +- .../swimlanesDiagram-VK2B7HYN-DsX8zbP8.js | 8 + .../swimlanesDiagram-VK2B7HYN-DwZGbRdg.js | 8 - ... timeline-definition-24CTP7MA-S237vnu4.js} | 2 +- ...{tsMode-COGDJ9qu.js => tsMode-BZYSYhKr.js} | 2 +- ...ipt-0SwtrmOf.js => typescript-DeFWR0Bj.js} | 2 +- ...Go.js => vennDiagram-4TSXK5OY-BElDUyH9.js} | 2 +- ...js => vue.runtime.esm-bundler-B0BJU7Oe.js} | 2 +- ...js => wardleyDiagram-VM6X3IG4-C5SVPYNO.js} | 2 +- .../{xml-Co1-HPio.js => xml-BDPhTprf.js} | 2 +- ...js => xychartDiagram-S5SC5T6Z-Dqif0X1Z.js} | 2 +- .../{yaml-BNFZzxOc.js => yaml-B6mJwErH.js} | 2 +- apps/pythinker-code/dist-web/index.html | 4 +- apps/pythinker-web/src/api/daemon/client.ts | 14 +- .../src/api/daemon/eventReducer.ts | 108 ++-- apps/pythinker-web/src/api/daemon/http.ts | 38 +- apps/pythinker-web/src/api/types.ts | 12 +- .../src/components/chat/ChatPane.vue | 32 +- .../src/composables/client/useTaskPoller.ts | 436 +++++++------- .../src/composables/messagesToTurns.ts | 127 +++- .../src/composables/usePageTitle.ts | 30 +- .../src/composables/usePythinkerWebClient.ts | 131 ++++- .../src/icons/pythinker/folder-open.svg | 33 +- .../src/icons/pythinker/search.svg | 57 +- .../src/icons/pythinker/setting.svg | 22 +- apps/pythinker-web/src/lib/icons.test.ts | 16 +- apps/pythinker-web/src/lib/icons.ts | 9 +- apps/pythinker-web/test/event-reducer.test.ts | 34 +- .../test/http-cancellation.test.ts | 40 ++ apps/pythinker-web/test/task-poller.test.ts | 143 ++++- .../test/thinking-indicator.test.ts | 5 +- apps/pythinker-web/test/turn-logic.test.ts | 83 ++- .../agent-gateway/src/protocol/rest-task.ts | 10 +- packages/agent-gateway/src/routes/tasks.ts | 57 +- packages/agent-gateway/test/tasks.test.ts | 78 +++ 117 files changed, 1398 insertions(+), 884 deletions(-) create mode 100644 .changeset/smoother-long-conversations.md rename apps/pythinker-code/dist-web/assets/{CodeBlockNode-DhHNvLD-.js => CodeBlockNode-D4cpL5UZ.js} (99%) rename apps/pythinker-code/dist-web/assets/{DesignSystemView-CpAzSMMN.js => DesignSystemView-DhJc-Ocy.js} (99%) rename apps/pythinker-code/dist-web/assets/{Tooltip-BDX9T6Zw.js => Tooltip-aicK0c3c.js} (98%) rename apps/pythinker-code/dist-web/assets/{abnfDiagram-VCTEODGH-pTXCrzR-.js => abnfDiagram-VCTEODGH-DEfrkFuI.js} (86%) rename apps/pythinker-code/dist-web/assets/{arc-Bm7BOhts.js => arc-B8osaoVd.js} (98%) rename apps/pythinker-code/dist-web/assets/{architectureDiagram-5GKGNRK7-D6LvpbBE.js => architectureDiagram-5GKGNRK7-BvF0UgoH.js} (99%) rename apps/pythinker-code/dist-web/assets/{blockDiagram-NRAW4CY4-DIC9lfxd.js => blockDiagram-NRAW4CY4-BNGA-QWb.js} (99%) rename apps/pythinker-code/dist-web/assets/{c4Diagram-UCG6FXSJ-B9GHaMKc.js => c4Diagram-UCG6FXSJ-BZuC3xtH.js} (99%) delete mode 100644 apps/pythinker-code/dist-web/assets/channel-CeJKBXng.js create mode 100644 apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js rename apps/pythinker-code/dist-web/assets/{chunk-2Q5K7J3B-DDI19Bs6.js => chunk-2Q5K7J3B-CPFb-YMA.js} (67%) rename apps/pythinker-code/dist-web/assets/{chunk-5VM5RSS4-wCYaCTKB.js => chunk-5VM5RSS4-BX7DTcSO.js} (83%) rename apps/pythinker-code/dist-web/assets/{chunk-F27PBJKO-A5JDBOgE.js => chunk-F27PBJKO-CGsciVEq.js} (96%) rename apps/pythinker-code/dist-web/assets/{chunk-G27WJ6UU-x-A8PhoW.js => chunk-G27WJ6UU-CIn6rVI9.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-JWPE2WC7-BVyXOrT5.js => chunk-JWPE2WC7-D9ICAwD_.js} (71%) rename apps/pythinker-code/dist-web/assets/{chunk-LCL6LL3I-DoVNud6N.js => chunk-LCL6LL3I-Bvdjn-Qn.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-POPQ4Y6H-CyRmuplC.js => chunk-POPQ4Y6H-BpzExJjb.js} (87%) rename apps/pythinker-code/dist-web/assets/{chunk-SVP7TREG-C35ZI9k-.js => chunk-SVP7TREG-D3M7Gbkt.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-XXDRQBXY-GqpBYspR.js => chunk-XXDRQBXY-DaNzL58C.js} (72%) delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C3txtkaA.js create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C3txtkaA.js create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js rename apps/pythinker-code/dist-web/assets/{cose-bilkent-JH36ORCC-D7cfmkHX.js => cose-bilkent-JH36ORCC-Du_KHUbL.js} (99%) rename apps/pythinker-code/dist-web/assets/{cssMode-BrgZPA71.js => cssMode-BYOYZWAb.js} (93%) rename apps/pythinker-code/dist-web/assets/{cynefin-OW5HDTMX-DnoOlDkN.js => cynefin-OW5HDTMX-BlED4Rd3.js} (99%) rename apps/pythinker-code/dist-web/assets/{cynefinDiagram-5FMLGOSQ-DF9zxtn7.js => cynefinDiagram-5FMLGOSQ-BfZ2WMeD.js} (98%) rename apps/pythinker-code/dist-web/assets/{dagre-3AP2YEHR-DkuX21S_.js => dagre-3AP2YEHR-DNRBAAmc.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-S7CK7UJ4-BCkTP5l5.js => diagram-S7CK7UJ4-95PLVM0c.js} (96%) rename apps/pythinker-code/dist-web/assets/{diagram-UQ7AKVKN-DsxzrkIm.js => diagram-UQ7AKVKN-DqI3S6m6.js} (95%) rename apps/pythinker-code/dist-web/assets/{diagram-VSXAHHWV-DS02PJbw.js => diagram-VSXAHHWV-Cps0EaEU.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-VX7I27RA-DpeqeF5i.js => diagram-VX7I27RA-TJJN2czJ.js} (97%) rename apps/pythinker-code/dist-web/assets/{diagram-Z3DM3KII-BX-mpA_H.js => diagram-Z3DM3KII-DnTJZ40O.js} (95%) rename apps/pythinker-code/dist-web/assets/{ebnfDiagram-PWID7BFC-Az6pcQU0.js => ebnfDiagram-PWID7BFC-CG3VCHMu.js} (87%) rename apps/pythinker-code/dist-web/assets/{editor.main-BVyazG_A.js => editor.main-yCrGDkyO.js} (99%) rename apps/pythinker-code/dist-web/assets/{erDiagram-SSCWMZ5O-Bukenpe0.js => erDiagram-SSCWMZ5O-DzkblHwz.js} (99%) rename apps/pythinker-code/dist-web/assets/{flowDiagram-A5DVABFB-DWLybnX0.js => flowDiagram-A5DVABFB-D6_Z_lfU.js} (99%) rename apps/pythinker-code/dist-web/assets/{freemarker2-D03L5Rmf.js => freemarker2-CG8OSn8H.js} (99%) rename apps/pythinker-code/dist-web/assets/{ganttDiagram-EL5Y4UJY-C2aeZeAI.js => ganttDiagram-EL5Y4UJY-DcpRnqwp.js} (99%) rename apps/pythinker-code/dist-web/assets/{gitGraphDiagram-WWUBYQGX-JhPLgbup.js => gitGraphDiagram-WWUBYQGX-t2_RmnTi.js} (99%) rename apps/pythinker-code/dist-web/assets/{handlebars-DTB7OcjB.js => handlebars-vt5-G9kY.js} (97%) rename apps/pythinker-code/dist-web/assets/{html-Bx3Ftaqh.js => html-BwCzbm6J.js} (97%) rename apps/pythinker-code/dist-web/assets/{htmlMode-Cyt5VoSI.js => htmlMode-BtW7hgTd.js} (94%) rename apps/pythinker-code/dist-web/assets/{index-COH6wcWn.js => index-0QXixtol.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-uLe_baIw.js => index-BM4AkXWz.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-vF2s5p7P.js => index-BZ9wqq8Z.js} (57%) rename apps/pythinker-code/dist-web/assets/{index-CfszvQ96.js => index-C_5a8vkb.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-DmWWUMKQ.css => index-CgbqiNuj.css} (98%) rename apps/pythinker-code/dist-web/assets/{index10-CG-shKcB.js => index10-DRKt26_3.js} (99%) rename apps/pythinker-code/dist-web/assets/{index11-H71ylPuM.js => index11-BtnGHbJw.js} (99%) rename apps/pythinker-code/dist-web/assets/{index5-ClJqsKuw.js => index5-DRYrcfDq.js} (95%) rename apps/pythinker-code/dist-web/assets/{index6-8mtDOSly.js => index6-rJ6wldFa.js} (98%) rename apps/pythinker-code/dist-web/assets/{index7-DpSd4JVP.js => index7-BEZwnfMu.js} (98%) rename apps/pythinker-code/dist-web/assets/{index8-CdLvqqXT.js => index8-Cir0nNuz.js} (99%) rename apps/pythinker-code/dist-web/assets/{infoDiagram-RXCK75RN-DdCBBDr8.js => infoDiagram-RXCK75RN-Cn4b9A5u.js} (68%) rename apps/pythinker-code/dist-web/assets/{ishikawaDiagram-5VMMS53U-C9GF3Hkk.js => ishikawaDiagram-5VMMS53U-CZhPeyom.js} (99%) rename apps/pythinker-code/dist-web/assets/{javascript-CcXtvgWG.js => javascript-C1Bl1QAn.js} (85%) rename apps/pythinker-code/dist-web/assets/{journeyDiagram-EYS64GPL-DmhIyY3b.js => journeyDiagram-EYS64GPL-Bznj053h.js} (98%) rename apps/pythinker-code/dist-web/assets/{jsonMode-BhgzQeiy.js => jsonMode-B4lkE7Oy.js} (98%) rename apps/pythinker-code/dist-web/assets/{kanban-definition-3QL26DDD-DXzagyyt.js => kanban-definition-3QL26DDD-gEE7iVwG.js} (99%) rename apps/pythinker-code/dist-web/assets/{layout-BKltItOX.js => layout-CRsCkvth.js} (99%) rename apps/pythinker-code/dist-web/assets/{linear-DehXFnHz.js => linear-Be-oTS5b.js} (98%) rename apps/pythinker-code/dist-web/assets/{liquid-D7rm-Mjg.js => liquid-OhilcA0U.js} (96%) rename apps/pythinker-code/dist-web/assets/{lspLanguageFeatures-jno-S5XZ.js => lspLanguageFeatures-Dzr62Jjp.js} (99%) rename apps/pythinker-code/dist-web/assets/{mdx-CvYmjfax.js => mdx-BNW26XnD.js} (97%) rename apps/pythinker-code/dist-web/assets/{mermaid.core-BgUXBQ9g.js => mermaid.core-BusHtpbx.js} (99%) rename apps/pythinker-code/dist-web/assets/{mindmap-definition-FBJOCRG2-D8dmS5cm.js => mindmap-definition-FBJOCRG2-OFTg7WuH.js} (98%) rename apps/pythinker-code/dist-web/assets/{pegDiagram-XKGWAZYB-wf7jamBk.js => pegDiagram-XKGWAZYB-COpW3oto.js} (87%) rename apps/pythinker-code/dist-web/assets/{pieDiagram-E7YTZNPT-CJ0uXwph.js => pieDiagram-E7YTZNPT-CSu4VKw9.js} (94%) rename apps/pythinker-code/dist-web/assets/{python-D5-SFkaZ.js => python-BeBGma8p.js} (96%) rename apps/pythinker-code/dist-web/assets/{quadrantDiagram-AXDQQJYC-DbtbJAe8.js => quadrantDiagram-AXDQQJYC-DwlY00_z.js} (99%) rename apps/pythinker-code/dist-web/assets/{railroadDiagram-O6MQD6OU-DtMi5zNi.js => railroadDiagram-O6MQD6OU-E1VZdf0g.js} (84%) rename apps/pythinker-code/dist-web/assets/{razor-C8sRtc2W.js => razor-L05JTUrE.js} (98%) rename apps/pythinker-code/dist-web/assets/{requirementDiagram-EFPCY7ZU-CmPbgctE.js => requirementDiagram-EFPCY7ZU-CGyZBZTB.js} (99%) rename apps/pythinker-code/dist-web/assets/{sankeyDiagram-P5KCCOFB-X9Hobb6t.js => sankeyDiagram-P5KCCOFB-Djxn8nYX.js} (99%) rename apps/pythinker-code/dist-web/assets/{sequenceDiagram-WJ2MYXX4-CBJOzdkc.js => sequenceDiagram-WJ2MYXX4-DTAyNeme.js} (99%) rename apps/pythinker-code/dist-web/assets/{sizeCapture-X5ZJPWSS-DFU8VSYq.js => sizeCapture-X5ZJPWSS-CSVjY38-.js} (86%) rename apps/pythinker-code/dist-web/assets/{stateDiagram-HBIQ2CUA-CAMMINP1.js => stateDiagram-HBIQ2CUA-C3_d9P6D.js} (96%) create mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js delete mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-D31cKkvj.js rename apps/pythinker-code/dist-web/assets/{swimlanes-XN3QIQJK-BzHQBVgg.js => swimlanes-XN3QIQJK-D3OEEV8W.js} (99%) create mode 100644 apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js delete mode 100644 apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DwZGbRdg.js rename apps/pythinker-code/dist-web/assets/{timeline-definition-24CTP7MA-CAzR7eP2.js => timeline-definition-24CTP7MA-S237vnu4.js} (99%) rename apps/pythinker-code/dist-web/assets/{tsMode-COGDJ9qu.js => tsMode-BZYSYhKr.js} (99%) rename apps/pythinker-code/dist-web/assets/{typescript-0SwtrmOf.js => typescript-DeFWR0Bj.js} (97%) rename apps/pythinker-code/dist-web/assets/{vennDiagram-4TSXK5OY-N3z1lGGo.js => vennDiagram-4TSXK5OY-BElDUyH9.js} (99%) rename apps/pythinker-code/dist-web/assets/{vue.runtime.esm-bundler-CudDDIjA.js => vue.runtime.esm-bundler-B0BJU7Oe.js} (98%) rename apps/pythinker-code/dist-web/assets/{wardleyDiagram-VM6X3IG4-D4zA5eJ2.js => wardleyDiagram-VM6X3IG4-C5SVPYNO.js} (99%) rename apps/pythinker-code/dist-web/assets/{xml-Co1-HPio.js => xml-BDPhTprf.js} (93%) rename apps/pythinker-code/dist-web/assets/{xychartDiagram-S5SC5T6Z-Do2Nsb25.js => xychartDiagram-S5SC5T6Z-Dqif0X1Z.js} (99%) rename apps/pythinker-code/dist-web/assets/{yaml-BNFZzxOc.js => yaml-B6mJwErH.js} (96%) create mode 100644 apps/pythinker-web/test/http-cancellation.test.ts diff --git a/.changeset/smoother-long-conversations.md b/.changeset/smoother-long-conversations.md new file mode 100644 index 000000000..c19e95d4c --- /dev/null +++ b/.changeset/smoother-long-conversations.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Reduce interface slowdowns during long conversations with many background tasks. diff --git a/apps/pythinker-code/dist-web/.web-bundle-manifest.json b/apps/pythinker-code/dist-web/.web-bundle-manifest.json index d2a566fe4..9f0b048c9 100644 --- a/apps/pythinker-code/dist-web/.web-bundle-manifest.json +++ b/apps/pythinker-code/dist-web/.web-bundle-manifest.json @@ -1,4 +1,4 @@ { - "sourceHash": "0cff6a0f19b48a2c0372aee63de7a176f5d499a92f2e6d297c5e456376f63283", + "sourceHash": "7e59e303ddd02bd7221b2aa34dba5cde5bee20d5ce98977ee534a636c1b82b73", "sourceFileCount": 411 } diff --git a/apps/pythinker-code/dist-web/assets/CodeBlockNode-DhHNvLD-.js b/apps/pythinker-code/dist-web/assets/CodeBlockNode-D4cpL5UZ.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/CodeBlockNode-DhHNvLD-.js rename to apps/pythinker-code/dist-web/assets/CodeBlockNode-D4cpL5UZ.js index e17e201d3..5f72bc37b 100644 --- a/apps/pythinker-code/dist-web/assets/CodeBlockNode-DhHNvLD-.js +++ b/apps/pythinker-code/dist-web/assets/CodeBlockNode-D4cpL5UZ.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-uLe_baIw.js","assets/index-vF2s5p7P.js","assets/index-DmWWUMKQ.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-vF2s5p7P.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-uLe_baIw.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BM4AkXWz.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-BZ9wqq8Z.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-BM4AkXWz.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-CpAzSMMN.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-DhJc-Ocy.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/DesignSystemView-CpAzSMMN.js rename to apps/pythinker-code/dist-web/assets/DesignSystemView-DhJc-Ocy.js index 994e20e8c..3e29948d8 100644 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-CpAzSMMN.js +++ b/apps/pythinker-code/dist-web/assets/DesignSystemView-DhJc-Ocy.js @@ -1,4 +1,4 @@ -import{M as x,aD as k,aI as C,aL as d,u as s,v as t,G as e,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as S,cz as b,cA as B}from"./index-vF2s5p7P.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},da={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},sa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ea={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},ca={class:"stage p col",style:{"align-items":"center",background:"#fff"}},va={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(wa,{emit:w}){const y=w;function p(){y("close")}let v=null;function h(c){c.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const c=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;c.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;v=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>v.observe(i)),c.length&&c[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),v&&(v.disconnect(),v=null)}),(c,a)=>(d(),s("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=e('',1)),t("main",A,[t("div",M,[a[44]||(a[44]=e('
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),t("section",H,[a[7]||(a[7]=e(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
+import{M as x,aD as k,aI as C,aL as d,u as s,v as t,G as e,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as S,cz as b,cA as B}from"./index-BZ9wqq8Z.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},da={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},sa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ea={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},ca={class:"stage p col",style:{"align-items":"center",background:"#fff"}},va={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(wa,{emit:w}){const y=w;function p(){y("close")}let v=null;function h(c){c.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const c=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;c.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;v=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>v.observe(i)),c.length&&c[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),v&&(v.disconnect(),v=null)}),(c,a)=>(d(),s("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=e('',1)),t("main",A,[t("div",M,[a[44]||(a[44]=e('
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),t("section",H,[a[7]||(a[7]=e(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
       "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
       -apple-system, BlinkMacSystemFont, "Segoe UI",
       Roboto, Ubuntu, sans-serif,
diff --git a/apps/pythinker-code/dist-web/assets/Tooltip-BDX9T6Zw.js b/apps/pythinker-code/dist-web/assets/Tooltip-aicK0c3c.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/Tooltip-BDX9T6Zw.js
rename to apps/pythinker-code/dist-web/assets/Tooltip-aicK0c3c.js
index 97b1c5f15..5f4851cb5 100644
--- a/apps/pythinker-code/dist-web/assets/Tooltip-BDX9T6Zw.js
+++ b/apps/pythinker-code/dist-web/assets/Tooltip-aicK0c3c.js
@@ -1 +1 @@
-import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-vF2s5p7P.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
+import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-BZ9wqq8Z.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
diff --git a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-pTXCrzR-.js b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DEfrkFuI.js
similarity index 86%
rename from apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-pTXCrzR-.js
rename to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DEfrkFuI.js
index 52ecfc3ff..934245c92 100644
--- a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-pTXCrzR-.js
+++ b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DEfrkFuI.js
@@ -1 +1 @@
-import{g as p,r as u,d as a}from"./chunk-SVP7TREG-C35ZI9k-.js";import{p as f}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{_ as n,l as o}from"./mermaid.core-BgUXBQ9g.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
+import{g as p,r as u,d as a}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p as f}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as n,l as o}from"./mermaid.core-BusHtpbx.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/arc-Bm7BOhts.js b/apps/pythinker-code/dist-web/assets/arc-B8osaoVd.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/arc-Bm7BOhts.js
rename to apps/pythinker-code/dist-web/assets/arc-B8osaoVd.js
index fc408f10d..3434adc9a 100644
--- a/apps/pythinker-code/dist-web/assets/arc-Bm7BOhts.js
+++ b/apps/pythinker-code/dist-web/assets/arc-B8osaoVd.js
@@ -1 +1 @@
-import{H as ln,I as un,J as y,K as tn,L as Q,M as I,N as _,O as an,P as rn,Q as j,R as o,S as K,T as sn,V as on,W as fn}from"./mermaid.core-BgUXBQ9g.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,L,u){var D=q-l,i=O-h,n=L-v,d=u-R,a=d*D-n*i;if(!(a*ar*r+N*N&&(H=w,J=p),{cx:H,cy:J,x01:-n,y01:-d,x11:H*(v/T-1),y11:J*(v/T-1)}}function hn(){var l=cn,h=yn,q=K(0),O=null,v=gn,R=dn,L=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,M=an(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(M>tn-y)u.moveTo(s*Q(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*Q(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=M,E=M,H=L.apply(this,arguments)/2,J=H>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(an(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(J>y){var N=sn(J/a*I(H)),z=sn(J/s*I(H));(P-=N*2)>y?(N*=t?1:-1,A+=N,T-=N):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var V=s*Q(m),W=s*I(m),B=a*Q(T),C=a*I(T);if(w>y){var F=s*Q(g),G=s*I(g),X=a*Q(A),Y=a*I(A),S;if(My?x>y?(e=U(X,Y,V,W,s,x,t),r=U(F,G,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=U(B,C,F,G,a,-p,t),r=U(V,W,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+N*N&&(H=w,J=p),{cx:H,cy:J,x01:-n,y01:-d,x11:H*(v/T-1),y11:J*(v/T-1)}}function hn(){var l=cn,h=yn,q=K(0),O=null,v=gn,R=dn,L=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,M=an(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(M>tn-y)u.moveTo(s*Q(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*Q(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=M,E=M,H=L.apply(this,arguments)/2,J=H>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(an(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(J>y){var N=sn(J/a*I(H)),z=sn(J/s*I(H));(P-=N*2)>y?(N*=t?1:-1,A+=N,T-=N):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var V=s*Q(m),W=s*I(m),B=a*Q(T),C=a*I(T);if(w>y){var F=s*Q(g),G=s*I(g),X=a*Q(A),Y=a*I(A),S;if(My?x>y?(e=U(X,Y,V,W,s,x,t),r=U(F,G,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=U(B,C,F,G,a,-p,t),r=U(V,W,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=r}),(function(M,P,N){var v=N(0);function h(){}for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,P,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,L=0;L-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(G,1);var R=g.source.owner.getEdges().indexOf(g);if(R==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(R,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,L=this.getNodes(),R=L.length,C=0;CT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,R,C,G,V,Y=this.nodes,$=Y.length,A=0;A<$;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),R=_.getRight(),C=_.getTop(),G=_.getBottom(),l>L&&(l=L),TC&&(g=C),dL&&(l=L),TC&&(g=C),d=this.nodes.length){var $=0;T.forEach(function(A){A.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},M.exports=s}),(function(M,P,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,u){if(f==null&&r==null&&u==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{u=f,r=i,f=e;var t=r.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,u);if(f.isInterGraph=!0,f.source=r,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof v){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,u=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*i[0],s=i[1]/u;i[0]t)return i[0]=f,i[1]=o,i[2]=u,i[3]=Y,!1;if(ru)return i[0]=s,i[1]=r,i[2]=G,i[3]=t,!1;if(fu?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>u?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-m===y?u>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=G,i[3]=C,E=!0):m===y&&(u>f?(i[2]=R,i[3]=C,E=!0):(i[2]=$,i[3]=Y,E=!0)),n&&E)return!1;if(f>u?r>t?(I=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=g,W=r+d*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-d*y,i[0]=S,i[1]=W;break}if(!E)switch(D){case 1:Q=C,x=u+-_/y,i[2]=x,i[3]=Q;break;case 2:x=$,Q=t+A*y,i[2]=x,i[3]=Q;break;case 3:Q=Y,x=u+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-A*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,u=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,L=void 0,R=void 0,C=void 0,G=void 0,V=void 0,Y=void 0,$=void 0;return L=s-u,C=r-t,V=t*u-r*s,R=T-c,G=o-l,Y=l*c-o*T,$=L*G-R*C,$===0?null:(g=(C*Y-G*V)/$,d=(R*V-L*Y)/$,new v(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,P,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,P,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,P,N){var v=(function(){function r(u,t){for(var s=0;s"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,P,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(C[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var V=G.getEdges(),g=0;g-1&&C.splice(_,1)}d=new Set,R=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(Y,1);var $=R.getNeighborsList();$.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},M.exports=s}),(function(M,P,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,P,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,P,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var R=0;Rr}}]),i})();M.exports=e}),(function(M,P,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var wt=function zt(bt){if(bt.length==0)return 0;for(var $t=[],St=0;St0;)wt.push(0);return wt})(this.n),i=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.m),f=!0,r=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,wt){return Tt&&wt})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Ct*e[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,P,N){var v=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var P={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var u in f)r[u]=f[u];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),u=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,R=i(551).Layout,C=i(551).Integer,G=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,$=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var D=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new $,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var S;for(S=0;Sm&&(m=Math.floor(D.y)),I=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var D=0;D1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),B--,X--}E!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%B){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},A.maxDiagonalInTree=function(n){for(var E=C.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[S]=[]),E[S]=E[S].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;By?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,D=m.labelMarginLeft,S=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,D,S)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),D;return IS&&(S=B.getWidth())});var W=I/y,x=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return D.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,Q=0,z=0;z0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var D=n.rowWidth[I];if(D+n.horizontalPadding+E<=n.width)return!0;var S=0;n.rowHeight[I]0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+S)/(D+E+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,S=0;SD&&(D=m[S].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(I0)for(var rt=D;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,k=0;k{var f=i(551).FDLayoutNode,r=i(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?L[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,zt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw zt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(b,U){m[U]=[b.position.x,b.position.y],y[U]=[d[g.get(b.nodeId)],L[g.get(b.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),Mt=void 0;dt.size>0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).x,U[et].forEach(function(pt){m[b]=[Mt,L[g.get(pt)]],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},K=0;K0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).y,q[et].forEach(function(pt){m[b]=[d[g.get(pt)],Mt],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:d[g.get(b.nodeId)],y:L[g.get(b.nodeId)]},K=b.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(b,U){d[U]+=mt.x}),L.forEach(function(b,U){L[U]+=mt.y}),l.fixedNodeConstraint.forEach(function(b){d[g.get(b.nodeId)]=b.position.x,L[g.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Ot=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=$(Z).x,Z.forEach(function(at){S.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=L[g.get(K.values().next().value)]:q=$(Z).y,Z.forEach(function(at){S.has(at)||(L[g.get(at)]=q)})},Ft=0;Ft{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(45);return h})()})})(he)),he.exports}var yr=se.exports,Oe;function mr(){return Oe||(Oe=1,(function(w,F){(function(P,N){w.exports=N(pr())})(yr,function(M){return(()=>{var P={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(R){T=!0,g=R}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var D=0;D1){L=g[0],R=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,R=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=C.next()).done);d=!0){var V=G.value,Y=f(V,2),$=Y[0],A=Y[1],_=o.cy.getElementById($);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){L=!0,R=x}finally{try{!d&&C.return&&C.return()}finally{if(L)throw R}}var I=t.x-(l+c)/2,D=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+D})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=B)});var S=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,R=void 0,C=void 0,G=void 0,V=t.descendants().not(":parent"),Y=V.length,$=0;$L&&(l=L),TC&&(g=C),d{var f=i(548),r=i(140).CoSELayout,u=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var R=d.cy,C=d.eles,G=C.nodes(),V=C.edges(),Y=void 0,$=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,$=L.xCoords,A=L.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(R,C),m=function W(x,Q,z,X){for(var rt=Q.length,B=0;B0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,B=0;B0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new r,S=D.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(G),D,d),y(D,S,V),I(D,d),D.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(L,R){for(var C=0;C0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(A=t.connectComponents(G,C.eles,I),A.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&A.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var D=G.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var B=X.length-1;B>=0;B--)A.splice(X[B],1),Y.splice(X[B],1),_.splice(X[B],1)}}A.forEach(function(vt,it){C.eles=vt,$.push(l(C,Y[it])),t.relocateComponent(_[it],$[it],C)})}else A.forEach(function(vt,it){t.relocateComponent(_[it],Y[it],C)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(C.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(C.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else $[it][Dt.id()]&&Et.nodes.push({x:$[it][Dt.id()].getLeft(),y:$[it][Dt.id()].getTop(),width:$[it][Dt.id()].getWidth(),height:$[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else $[it][mt.id()]&&$[it][Ot.id()]&&Et.edges.push({startX:$[it][mt.id()].getCenterX(),startY:$[it][mt.id()].getCenterY(),endX:$[it][Ot.id()].getCenterX(),endY:$[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys($[vt]).forEach(function(it){var ut=$[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=C.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?($.push(l(C,Y[0])),t.relocateComponent(_[0],$[0],C)):t.relocateComponent(_[0],Y[0],C)}var J=function(it,ut){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return $.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),C.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(G,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(R,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,u=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,L=new Map,R=new Map,C=[],G=[],V=[],Y=[],$=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,D=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=C[nt],lt=0;ltdt&&(dt=$[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?C[U].push(R.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=R.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(b){it=!0,ut=b}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){S=E{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(579);return h})()})})(se)),se.exports}var Er=mr();const Tr=qe(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(w=>`${w},${w/2} 0,${w} 0,0`,"L"),R:ct(w=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:ct(w=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:ct(w=>`${w/2},0 ${w},${w} 0,${w}`,"B")},oe={L:ct((w,F)=>w-F+2,"L"),R:ct((w,F)=>w-2,"R"),T:ct((w,F)=>w-F+2,"T"),B:ct((w,F)=>w-2,"B")},Nr=ct(function(w){return Wt(w)?w==="L"?"R":"L":w==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(w){const F=w;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Wt=ct(function(w){const F=w;return F==="L"||F==="R"},"isArchitectureDirectionX"),qt=ct(function(w){const F=w;return F==="T"||F==="B"},"isArchitectureDirectionY"),Te=ct(function(w,F){const M=Wt(w)&&qt(F),P=qt(w)&&Wt(F);return M||P},"isArchitectureDirectionXY"),Lr=ct(function(w){const F=w[0],M=w[1],P=Wt(F)&&qt(M),N=qt(F)&&Wt(M);return P||N},"isArchitecturePairXY"),wr=ct(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(w,F){const M=`${w}${F}`;return wr(M)?M:void 0},"getArchitectureDirectionPair"),Cr=ct(function([w,F],M){const P=M[0],N=M[1];return Wt(P)?qt(N)?[w+(P==="L"?-1:1),F+(N==="T"?1:-1)]:[w+(P==="L"?-1:1),F]:Wt(N)?[w+(N==="L"?1:-1),F+(P==="T"?1:-1)]:[w,F+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=ct(function(w){return w==="LT"||w==="TL"?[1,1]:w==="BL"||w==="LB"?[1,-1]:w==="BR"||w==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=ct(function(w,F){return Te(w,F)?"bend":Wt(w)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=ct(function(w){return w.type==="service"},"isArchitectureService"),Or=ct(function(w){return w.type==="junction"},"isArchitectureJunction"),be=ct((w,F)=>{const[M,P]=[w,F].sort();return`${JSON.stringify(M)}-${JSON.stringify(P)}`},"architectureGroupAlignmentKey"),Ge=ct(w=>w.data(),"edgeData"),ie=ct(w=>w.data(),"nodeData"),xr=or.architecture,Pe=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ir()}addService({id:w,icon:F,in:M,title:P,iconText:N}){if(this.registeredIds.has(w))throw new Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(M)==="node")throw new Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:F,iconText:N,title:P,edges:[],in:M})}getServices(){return[...this.nodes.values()].filter(Dr)}addJunction({id:w,in:F}){if(this.registeredIds.has(w))throw new Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(F!==void 0){if(w===F)throw new Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(F))throw new Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(F)==="node")throw new Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:F})}getJunctions(){return[...this.nodes.values()].filter(Or)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:F,in:M,title:P}){if(this.registeredIds.has(w))throw new Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(M)==="node")throw new Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:F,title:P,in:M})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:F,lhsDir:M,rhsDir:P,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(P))throw new Error(`Invalid direction given for right hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(P)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw new Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(F)&&!this.groups.has(F))throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes.get(w).in,f=this.nodes.get(F).in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:w,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:F,rhsDir:P,rhsInto:v,rhsGroup:a,title:e};this.edges.push(r);const u=this.nodes.get(w),t=this.nodes.get(F);u&&t&&(u.edges.push(this.edges[this.edges.length-1]),t.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw new Error(`An align directive requires at least two members; got ${w.members.length}`);const F=new Set;w.members.forEach(M=>{if(this.registeredIds.get(M)!=="node")throw new Error(`align ${w.direction} references [${M}], which is not a service or junction`);if(F.has(M))throw new Error(`align ${w.direction} lists [${M}] more than once`);F.add(M)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const w=new Map,F=new Map;for(const[h,a]of this.nodes.entries()){const e=new Map;for(const i of a.edges){const f=this.getNode(i.lhsId)?.in,r=this.getNode(i.rhsId)?.in;if(f&&r&&f!==r){const u=Ar(i.lhsDir,i.rhsDir);u!=="bend"&&w.set(be(f,r),u)}if(i.lhsId===h){const u=pe(i.lhsDir,i.rhsDir);u&&e.set(u,i.rhsId)}else{const u=pe(i.rhsDir,i.lhsDir);u&&e.set(u,i.lhsId)}}F.set(h,e)}const M=new Set,P=new Set(F.keys()),N=ct(h=>{const a=new Map([[h,[0,0]]]),e=[h];for(;e.length>0;){const i=e.shift();if(i){M.add(i),P.delete(i);const f=F.get(i);if(!f)throw new Error(`BFS error: adjacency list for id ${i} not found. Please report this as a bug.`);const r=a.get(i);if(!r)throw new Error(`BFS error: position for id ${i} not found in spatial map. Please report this as a bug.`);const[u,t]=r;f.forEach((s,o)=>{M.has(s)||(a.set(s,Cr([u,t],o)),e.push(s))})}}return a},"BFS"),v=[];for(;P.size>0;){const h=P.values().next().value;v.push(N(h))}this.dataStructures={adjList:F,spatialMaps:v,groupAlignments:w}}return this.dataStructures}setElementForId(w,F){this.elements.set(w,F)}getElementById(w){return this.elements.get(w)}getConfig(){return ar({...xr,...nr().architecture})}getConfigField(w){return this.getConfig()[w]}},Ir=ct((w,F)=>{Ze(w,F),w.groups.map(M=>F.addGroup(M)),w.services.map(M=>F.addService({...M,type:"service"})),w.junctions.map(M=>F.addJunction({...M,type:"junction"})),w.edges.map(M=>F.addEdge(M)),w.alignments?.map(M=>F.addLayoutHint({direction:M.direction,members:[...M.members]}))},"populateDb"),Ue={parser:{yy:void 0},parse:ct(async w=>{const F=await gr("architecture",w);Se.debug(F);const M=Ue.parser?.yy;if(!(M instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ir(F,M)},"parse")},Rr=ct(w=>`
+import{p as Ze}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{b4 as qe,_ as ct,G as Qe,ae as Je,l as Se,b as Ke,a as je,p as _e,q as tr,g as er,s as rr,r as ir,D as ar,A as nr,E as or,c as me,b5 as Ee,aj as ve,i as sr,j as hr,t as lr,ak as fr,b6 as cr}from"./mermaid.core-BusHtpbx.js";import{p as gr}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import{c as Fe}from"./cytoscape.esm-CNiYdHpY.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var se={exports:{}},he={exports:{}},le={exports:{}},ur=le.exports,Ae;function dr(){return Ae||(Ae=1,(function(w,F){(function(P,N){w.exports=N()})(ur,function(){return(function(M){var P={};function N(v){if(P[v])return P[v].exports;var h=P[v]={i:v,l:!1,exports:{}};return M[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=M,N.c=P,N.i=function(v){return v},N.d=function(v,h,a){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(M,P,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,M.exports=v}),(function(M,P,N){var v=N(2),h=N(8),a=N(9);function e(f,r,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(v.prototype);for(var i in v)e[i]=v[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var u=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(u.getOwner()==r)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},M.exports=e}),(function(M,P,N){function v(h){this.vGraphObject=h}M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(13),e=N(0),i=N(16),f=N(5);function r(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(v.prototype);for(var u in v)r[u]=v[u];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=r}),(function(M,P,N){var v=N(0);function h(){}for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,P,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,L=0;L-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(G,1);var R=g.source.owner.getEdges().indexOf(g);if(R==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(R,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,L=this.getNodes(),R=L.length,C=0;CT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,R,C,G,V,Y=this.nodes,$=Y.length,A=0;A<$;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),R=_.getRight(),C=_.getTop(),G=_.getBottom(),l>L&&(l=L),TC&&(g=C),dL&&(l=L),TC&&(g=C),d=this.nodes.length){var $=0;T.forEach(function(A){A.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},M.exports=s}),(function(M,P,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,u){if(f==null&&r==null&&u==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{u=f,r=i,f=e;var t=r.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,u);if(f.isInterGraph=!0,f.source=r,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof v){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,u=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*i[0],s=i[1]/u;i[0]t)return i[0]=f,i[1]=o,i[2]=u,i[3]=Y,!1;if(ru)return i[0]=s,i[1]=r,i[2]=G,i[3]=t,!1;if(fu?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>u?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-m===y?u>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=G,i[3]=C,E=!0):m===y&&(u>f?(i[2]=R,i[3]=C,E=!0):(i[2]=$,i[3]=Y,E=!0)),n&&E)return!1;if(f>u?r>t?(I=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=g,W=r+d*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-d*y,i[0]=S,i[1]=W;break}if(!E)switch(D){case 1:Q=C,x=u+-_/y,i[2]=x,i[3]=Q;break;case 2:x=$,Q=t+A*y,i[2]=x,i[3]=Q;break;case 3:Q=Y,x=u+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-A*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,u=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,L=void 0,R=void 0,C=void 0,G=void 0,V=void 0,Y=void 0,$=void 0;return L=s-u,C=r-t,V=t*u-r*s,R=T-c,G=o-l,Y=l*c-o*T,$=L*G-R*C,$===0?null:(g=(C*Y-G*V)/$,d=(R*V-L*Y)/$,new v(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,P,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,P,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,P,N){var v=(function(){function r(u,t){for(var s=0;s"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,P,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(C[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var V=G.getEdges(),g=0;g-1&&C.splice(_,1)}d=new Set,R=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(Y,1);var $=R.getNeighborsList();$.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},M.exports=s}),(function(M,P,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,P,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,P,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var R=0;Rr}}]),i})();M.exports=e}),(function(M,P,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var wt=function zt(bt){if(bt.length==0)return 0;for(var $t=[],St=0;St0;)wt.push(0);return wt})(this.n),i=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.m),f=!0,r=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,wt){return Tt&&wt})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Ct*e[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,P,N){var v=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var P={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var u in f)r[u]=f[u];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),u=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,R=i(551).Layout,C=i(551).Integer,G=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,$=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var D=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new $,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var S;for(S=0;Sm&&(m=Math.floor(D.y)),I=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var D=0;D1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),B--,X--}E!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%B){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},A.maxDiagonalInTree=function(n){for(var E=C.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[S]=[]),E[S]=E[S].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;By?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,D=m.labelMarginLeft,S=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,D,S)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),D;return IS&&(S=B.getWidth())});var W=I/y,x=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return D.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,Q=0,z=0;z0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var D=n.rowWidth[I];if(D+n.horizontalPadding+E<=n.width)return!0;var S=0;n.rowHeight[I]0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+S)/(D+E+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,S=0;SD&&(D=m[S].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(I0)for(var rt=D;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,k=0;k{var f=i(551).FDLayoutNode,r=i(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?L[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,zt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw zt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(b,U){m[U]=[b.position.x,b.position.y],y[U]=[d[g.get(b.nodeId)],L[g.get(b.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),Mt=void 0;dt.size>0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).x,U[et].forEach(function(pt){m[b]=[Mt,L[g.get(pt)]],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},K=0;K0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).y,q[et].forEach(function(pt){m[b]=[d[g.get(pt)],Mt],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:d[g.get(b.nodeId)],y:L[g.get(b.nodeId)]},K=b.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(b,U){d[U]+=mt.x}),L.forEach(function(b,U){L[U]+=mt.y}),l.fixedNodeConstraint.forEach(function(b){d[g.get(b.nodeId)]=b.position.x,L[g.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Ot=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=$(Z).x,Z.forEach(function(at){S.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=L[g.get(K.values().next().value)]:q=$(Z).y,Z.forEach(function(at){S.has(at)||(L[g.get(at)]=q)})},Ft=0;Ft{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(45);return h})()})})(he)),he.exports}var yr=se.exports,Oe;function mr(){return Oe||(Oe=1,(function(w,F){(function(P,N){w.exports=N(pr())})(yr,function(M){return(()=>{var P={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(R){T=!0,g=R}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var D=0;D1){L=g[0],R=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,R=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=C.next()).done);d=!0){var V=G.value,Y=f(V,2),$=Y[0],A=Y[1],_=o.cy.getElementById($);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){L=!0,R=x}finally{try{!d&&C.return&&C.return()}finally{if(L)throw R}}var I=t.x-(l+c)/2,D=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+D})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=B)});var S=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,R=void 0,C=void 0,G=void 0,V=t.descendants().not(":parent"),Y=V.length,$=0;$L&&(l=L),TC&&(g=C),d{var f=i(548),r=i(140).CoSELayout,u=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var R=d.cy,C=d.eles,G=C.nodes(),V=C.edges(),Y=void 0,$=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,$=L.xCoords,A=L.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(R,C),m=function W(x,Q,z,X){for(var rt=Q.length,B=0;B0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,B=0;B0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new r,S=D.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(G),D,d),y(D,S,V),I(D,d),D.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(L,R){for(var C=0;C0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(A=t.connectComponents(G,C.eles,I),A.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&A.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var D=G.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var B=X.length-1;B>=0;B--)A.splice(X[B],1),Y.splice(X[B],1),_.splice(X[B],1)}}A.forEach(function(vt,it){C.eles=vt,$.push(l(C,Y[it])),t.relocateComponent(_[it],$[it],C)})}else A.forEach(function(vt,it){t.relocateComponent(_[it],Y[it],C)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(C.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(C.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else $[it][Dt.id()]&&Et.nodes.push({x:$[it][Dt.id()].getLeft(),y:$[it][Dt.id()].getTop(),width:$[it][Dt.id()].getWidth(),height:$[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else $[it][mt.id()]&&$[it][Ot.id()]&&Et.edges.push({startX:$[it][mt.id()].getCenterX(),startY:$[it][mt.id()].getCenterY(),endX:$[it][Ot.id()].getCenterX(),endY:$[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys($[vt]).forEach(function(it){var ut=$[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=C.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?($.push(l(C,Y[0])),t.relocateComponent(_[0],$[0],C)):t.relocateComponent(_[0],Y[0],C)}var J=function(it,ut){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return $.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),C.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(G,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(R,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,u=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,L=new Map,R=new Map,C=[],G=[],V=[],Y=[],$=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,D=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=C[nt],lt=0;ltdt&&(dt=$[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?C[U].push(R.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=R.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(b){it=!0,ut=b}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){S=E{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(579);return h})()})})(se)),se.exports}var Er=mr();const Tr=qe(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(w=>`${w},${w/2} 0,${w} 0,0`,"L"),R:ct(w=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:ct(w=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:ct(w=>`${w/2},0 ${w},${w} 0,${w}`,"B")},oe={L:ct((w,F)=>w-F+2,"L"),R:ct((w,F)=>w-2,"R"),T:ct((w,F)=>w-F+2,"T"),B:ct((w,F)=>w-2,"B")},Nr=ct(function(w){return Wt(w)?w==="L"?"R":"L":w==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(w){const F=w;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Wt=ct(function(w){const F=w;return F==="L"||F==="R"},"isArchitectureDirectionX"),qt=ct(function(w){const F=w;return F==="T"||F==="B"},"isArchitectureDirectionY"),Te=ct(function(w,F){const M=Wt(w)&&qt(F),P=qt(w)&&Wt(F);return M||P},"isArchitectureDirectionXY"),Lr=ct(function(w){const F=w[0],M=w[1],P=Wt(F)&&qt(M),N=qt(F)&&Wt(M);return P||N},"isArchitecturePairXY"),wr=ct(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(w,F){const M=`${w}${F}`;return wr(M)?M:void 0},"getArchitectureDirectionPair"),Cr=ct(function([w,F],M){const P=M[0],N=M[1];return Wt(P)?qt(N)?[w+(P==="L"?-1:1),F+(N==="T"?1:-1)]:[w+(P==="L"?-1:1),F]:Wt(N)?[w+(N==="L"?1:-1),F+(P==="T"?1:-1)]:[w,F+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=ct(function(w){return w==="LT"||w==="TL"?[1,1]:w==="BL"||w==="LB"?[1,-1]:w==="BR"||w==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=ct(function(w,F){return Te(w,F)?"bend":Wt(w)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=ct(function(w){return w.type==="service"},"isArchitectureService"),Or=ct(function(w){return w.type==="junction"},"isArchitectureJunction"),be=ct((w,F)=>{const[M,P]=[w,F].sort();return`${JSON.stringify(M)}-${JSON.stringify(P)}`},"architectureGroupAlignmentKey"),Ge=ct(w=>w.data(),"edgeData"),ie=ct(w=>w.data(),"nodeData"),xr=or.architecture,Pe=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ir()}addService({id:w,icon:F,in:M,title:P,iconText:N}){if(this.registeredIds.has(w))throw new Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(M)==="node")throw new Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:F,iconText:N,title:P,edges:[],in:M})}getServices(){return[...this.nodes.values()].filter(Dr)}addJunction({id:w,in:F}){if(this.registeredIds.has(w))throw new Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(F!==void 0){if(w===F)throw new Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(F))throw new Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(F)==="node")throw new Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:F})}getJunctions(){return[...this.nodes.values()].filter(Or)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:F,in:M,title:P}){if(this.registeredIds.has(w))throw new Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(M)==="node")throw new Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:F,title:P,in:M})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:F,lhsDir:M,rhsDir:P,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(P))throw new Error(`Invalid direction given for right hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(P)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw new Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(F)&&!this.groups.has(F))throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes.get(w).in,f=this.nodes.get(F).in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:w,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:F,rhsDir:P,rhsInto:v,rhsGroup:a,title:e};this.edges.push(r);const u=this.nodes.get(w),t=this.nodes.get(F);u&&t&&(u.edges.push(this.edges[this.edges.length-1]),t.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw new Error(`An align directive requires at least two members; got ${w.members.length}`);const F=new Set;w.members.forEach(M=>{if(this.registeredIds.get(M)!=="node")throw new Error(`align ${w.direction} references [${M}], which is not a service or junction`);if(F.has(M))throw new Error(`align ${w.direction} lists [${M}] more than once`);F.add(M)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const w=new Map,F=new Map;for(const[h,a]of this.nodes.entries()){const e=new Map;for(const i of a.edges){const f=this.getNode(i.lhsId)?.in,r=this.getNode(i.rhsId)?.in;if(f&&r&&f!==r){const u=Ar(i.lhsDir,i.rhsDir);u!=="bend"&&w.set(be(f,r),u)}if(i.lhsId===h){const u=pe(i.lhsDir,i.rhsDir);u&&e.set(u,i.rhsId)}else{const u=pe(i.rhsDir,i.lhsDir);u&&e.set(u,i.lhsId)}}F.set(h,e)}const M=new Set,P=new Set(F.keys()),N=ct(h=>{const a=new Map([[h,[0,0]]]),e=[h];for(;e.length>0;){const i=e.shift();if(i){M.add(i),P.delete(i);const f=F.get(i);if(!f)throw new Error(`BFS error: adjacency list for id ${i} not found. Please report this as a bug.`);const r=a.get(i);if(!r)throw new Error(`BFS error: position for id ${i} not found in spatial map. Please report this as a bug.`);const[u,t]=r;f.forEach((s,o)=>{M.has(s)||(a.set(s,Cr([u,t],o)),e.push(s))})}}return a},"BFS"),v=[];for(;P.size>0;){const h=P.values().next().value;v.push(N(h))}this.dataStructures={adjList:F,spatialMaps:v,groupAlignments:w}}return this.dataStructures}setElementForId(w,F){this.elements.set(w,F)}getElementById(w){return this.elements.get(w)}getConfig(){return ar({...xr,...nr().architecture})}getConfigField(w){return this.getConfig()[w]}},Ir=ct((w,F)=>{Ze(w,F),w.groups.map(M=>F.addGroup(M)),w.services.map(M=>F.addService({...M,type:"service"})),w.junctions.map(M=>F.addJunction({...M,type:"junction"})),w.edges.map(M=>F.addEdge(M)),w.alignments?.map(M=>F.addLayoutHint({direction:M.direction,members:[...M.members]}))},"populateDb"),Ue={parser:{yy:void 0},parse:ct(async w=>{const F=await gr("architecture",w);Se.debug(F);const M=Ue.parser?.yy;if(!(M instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ir(F,M)},"parse")},Rr=ct(w=>`
   .edge {
     stroke-width: ${w.archEdgeWidth};
     stroke: ${w.archEdgeColor};
diff --git a/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-DIC9lfxd.js b/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-BNGA-QWb.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-DIC9lfxd.js
rename to apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-BNGA-QWb.js
index 56d294348..34ce69ae8 100644
--- a/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-DIC9lfxd.js
+++ b/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-BNGA-QWb.js
@@ -1,4 +1,4 @@
-import{g as Pe}from"./chunk-5VM5RSS4-wCYaCTKB.js";import{aC as Fe,aD as xe,aE as Me,aF as Ke,aG as Ye,aH as We,aI as Ve,aJ as Ue,aK as He,aL as Xe,aM as je,aN as Ge,aO as qe,aP as Je,aQ as Ze,aR as Qe,aS as $e,aT as et,aU as tt,aV as st,aW as rt,aX as it,aY as at,aZ as nt,a_ as ot,_ as u,A as Y,j as X,a$ as ct,d as lt,l as y,r as ut,u as gt,c as Le,a7 as ht,ay as dt,ax as pt,az as ft,k as bt,b0 as St,ah as me,ai as xt}from"./mermaid.core-BgUXBQ9g.js";import{c as Lt}from"./channel-CeJKBXng.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";function mt(e){return Array.isArray(e)}function yt(e){if(Fe(e))return e;const a=xe(e);if(!wt(e))return{};if(mt(e)){const r=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(r.index=e.index,r.input=e.input),r}if(Me(e)){const r=e,l=r.constructor;return new l(r.buffer,r.byteOffset,r.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const r=e,l=r.buffer,d=r.byteOffset,s=r.byteLength,h=new ArrayBuffer(s),x=new Uint8Array(l,d,s);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const r=e.constructor,l=new r(e.valueOf());return a==="[object String]"?_t(l,e):se(l,e),l}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const r=e,l=new RegExp(r.source,r.flags);return l.lastIndex=r.lastIndex,l}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const r=e,l=new Map;return r.forEach((d,s)=>{l.set(s,d)}),l}if(a==="[object Set]"){const r=e,l=new Set;return r.forEach(d=>{l.add(d)}),l}if(a==="[object Arguments]"){const r=e,l={};return se(l,r),l.length=r.length,l[Symbol.iterator]=r[Symbol.iterator],l}const o={};return kt(o,e),se(o,e),Et(o,e),o}function wt(e){switch(xe(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case je:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Et(e,a){const o=Object.getOwnPropertySymbols(a);for(let r=0;r=o)&&(e[r]=a[r])}function kt(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,g,i,c){for(i=i||{},c=v.length;c--;i[v[c]]=g);return i},"o"),a=[1,15],o=[1,7],r=[1,13],l=[1,14],d=[1,19],s=[1,16],h=[1,17],x=[1,18],m=[8,30],S=[8,10,21,28,29,30,31,39,43,46],f=[1,23],L=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],_={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(g,i,c,p,E,t,M){var n=t.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",t[n-1]),p.setHierarchy(t[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",t[n]),typeof t[n].length=="number"?this.$=t[n]:this.$=[t[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",t[n-1]),this.$=[t[n-1]].concat(t[n]);break;case 14:p.getLogger().debug("Rule: link: ",t[n],g),this.$={edgeTypeStr:t[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",t[n-3],t[n-1],t[n]),this.$={edgeTypeStr:t[n],label:t[n-1]};break;case 18:const P=parseInt(t[n]),W=p.generateId();this.$={id:W,type:"space",label:"",width:P,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",t[n-2],t[n-1],t[n]," typestr: ",t[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(t[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(t[n-1].edgeTypeStr),Z=p.edgeStrToThickness(t[n-1].edgeTypeStr),D=p.edgeStrToPattern(t[n-1].edgeTypeStr);this.$=[{id:t[n-2].id,label:t[n-2].label,type:t[n-2].type,directions:t[n-2].directions},{id:t[n-2].id+"-"+t[n].id,start:t[n-2].id,end:t[n].id,label:t[n-1].label,type:"edge",thickness:Z,pattern:D,directions:t[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[n-1],t[n]),this.$={id:t[n-1].id,label:t[n-1].label,type:p.typeStr2Type(t[n-1].typeStr),directions:t[n-1].directions,widthInColumns:parseInt(t[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",t[n]),this.$={id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",t[n]),this.$={type:"column-setting",columns:t[n]==="auto"?-1:parseInt(t[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",t[n-2],t[n-1]),p.generateId(),this.$={...t[n-2],type:"composite",children:t[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",t[n-2],t[n-1],t[n]);const A=p.generateId();this.$={id:A,type:"composite",label:"",children:t[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",t[n]),this.$={id:t[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[n-1],t[n]),this.$={id:t[n-1],label:t[n].label,typeStr:t[n].typeStr,directions:t[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",t[n]),this.$=[t[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",t[n-1],t[n]),this.$=[t[n-1]].concat(t[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",t[n-2],t[n-1],t[n]),this.$={typeStr:t[n-2]+t[n],label:t[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[n-3],t[n-2]," #3:",t[n-1],t[n]),this.$={typeStr:t[n-3]+t[n],label:t[n-2],directions:t[n-1]};break;case 35:case 36:this.$={type:"classDef",id:t[n-1].trim(),css:t[n].trim()};break;case 37:this.$={type:"applyClass",id:t[n-1].trim(),styleClass:t[n].trim()};break;case 38:this.$={type:"applyStyles",id:t[n-1].trim(),stylesStr:t[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{8:[1,20]},e(m,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:r,29:l,31:d,39:s,43:h,46:x}),e(S,[2,16],{14:22,15:f,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(w,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:d},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(m,[2,13]),{26:35,31:d},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:L,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(S,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(g,i){if(i.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=i,c}},"parseError"),parse:u(function(g){var i=this,c=[0],p=[],E=[null],t=[],M=this.table,n="",P=0,W=0,J=2,V=1,Z=t.slice.call(arguments,1),D=Object.create(this.lexer),A={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(A.yy[Q]=this.yy[Q]);D.setInput(g,A.yy),A.yy.lexer=D,A.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;t.push($);var Be=D.options&&D.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(I){c.length=c.length-2*I,E.length=E.length-I,t.length=t.length-I}u(Re,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,F={},U,B,pe,H;;){if(R=c[c.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=M[R]&&M[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";H=[];for(U in M[R])this.terminals_[U]&&U>J&&H.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(P+1)+`:
+import{g as Pe}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{aC as Fe,aD as xe,aE as Me,aF as Ke,aG as Ye,aH as We,aI as Ve,aJ as Ue,aK as He,aL as Xe,aM as je,aN as Ge,aO as qe,aP as Je,aQ as Ze,aR as Qe,aS as $e,aT as et,aU as tt,aV as st,aW as rt,aX as it,aY as at,aZ as nt,a_ as ot,_ as u,A as Y,j as X,a$ as ct,d as lt,l as y,r as ut,u as gt,c as Le,a7 as ht,ay as dt,ax as pt,az as ft,k as bt,b0 as St,ah as me,ai as xt}from"./mermaid.core-BusHtpbx.js";import{c as Lt}from"./channel-DZ2XEbLN.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";function mt(e){return Array.isArray(e)}function yt(e){if(Fe(e))return e;const a=xe(e);if(!wt(e))return{};if(mt(e)){const r=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(r.index=e.index,r.input=e.input),r}if(Me(e)){const r=e,l=r.constructor;return new l(r.buffer,r.byteOffset,r.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const r=e,l=r.buffer,d=r.byteOffset,s=r.byteLength,h=new ArrayBuffer(s),x=new Uint8Array(l,d,s);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const r=e.constructor,l=new r(e.valueOf());return a==="[object String]"?_t(l,e):se(l,e),l}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const r=e,l=new RegExp(r.source,r.flags);return l.lastIndex=r.lastIndex,l}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const r=e,l=new Map;return r.forEach((d,s)=>{l.set(s,d)}),l}if(a==="[object Set]"){const r=e,l=new Set;return r.forEach(d=>{l.add(d)}),l}if(a==="[object Arguments]"){const r=e,l={};return se(l,r),l.length=r.length,l[Symbol.iterator]=r[Symbol.iterator],l}const o={};return kt(o,e),se(o,e),Et(o,e),o}function wt(e){switch(xe(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case je:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Et(e,a){const o=Object.getOwnPropertySymbols(a);for(let r=0;r=o)&&(e[r]=a[r])}function kt(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,g,i,c){for(i=i||{},c=v.length;c--;i[v[c]]=g);return i},"o"),a=[1,15],o=[1,7],r=[1,13],l=[1,14],d=[1,19],s=[1,16],h=[1,17],x=[1,18],m=[8,30],S=[8,10,21,28,29,30,31,39,43,46],f=[1,23],L=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],_={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(g,i,c,p,E,t,M){var n=t.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",t[n-1]),p.setHierarchy(t[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",t[n]),typeof t[n].length=="number"?this.$=t[n]:this.$=[t[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",t[n-1]),this.$=[t[n-1]].concat(t[n]);break;case 14:p.getLogger().debug("Rule: link: ",t[n],g),this.$={edgeTypeStr:t[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",t[n-3],t[n-1],t[n]),this.$={edgeTypeStr:t[n],label:t[n-1]};break;case 18:const P=parseInt(t[n]),W=p.generateId();this.$={id:W,type:"space",label:"",width:P,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",t[n-2],t[n-1],t[n]," typestr: ",t[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(t[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(t[n-1].edgeTypeStr),Z=p.edgeStrToThickness(t[n-1].edgeTypeStr),D=p.edgeStrToPattern(t[n-1].edgeTypeStr);this.$=[{id:t[n-2].id,label:t[n-2].label,type:t[n-2].type,directions:t[n-2].directions},{id:t[n-2].id+"-"+t[n].id,start:t[n-2].id,end:t[n].id,label:t[n-1].label,type:"edge",thickness:Z,pattern:D,directions:t[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[n-1],t[n]),this.$={id:t[n-1].id,label:t[n-1].label,type:p.typeStr2Type(t[n-1].typeStr),directions:t[n-1].directions,widthInColumns:parseInt(t[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",t[n]),this.$={id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",t[n]),this.$={type:"column-setting",columns:t[n]==="auto"?-1:parseInt(t[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",t[n-2],t[n-1]),p.generateId(),this.$={...t[n-2],type:"composite",children:t[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",t[n-2],t[n-1],t[n]);const A=p.generateId();this.$={id:A,type:"composite",label:"",children:t[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",t[n]),this.$={id:t[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[n-1],t[n]),this.$={id:t[n-1],label:t[n].label,typeStr:t[n].typeStr,directions:t[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",t[n]),this.$=[t[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",t[n-1],t[n]),this.$=[t[n-1]].concat(t[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",t[n-2],t[n-1],t[n]),this.$={typeStr:t[n-2]+t[n],label:t[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[n-3],t[n-2]," #3:",t[n-1],t[n]),this.$={typeStr:t[n-3]+t[n],label:t[n-2],directions:t[n-1]};break;case 35:case 36:this.$={type:"classDef",id:t[n-1].trim(),css:t[n].trim()};break;case 37:this.$={type:"applyClass",id:t[n-1].trim(),styleClass:t[n].trim()};break;case 38:this.$={type:"applyStyles",id:t[n-1].trim(),stylesStr:t[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{8:[1,20]},e(m,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:r,29:l,31:d,39:s,43:h,46:x}),e(S,[2,16],{14:22,15:f,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(w,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:d},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(m,[2,13]),{26:35,31:d},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:L,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(S,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(g,i){if(i.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=i,c}},"parseError"),parse:u(function(g){var i=this,c=[0],p=[],E=[null],t=[],M=this.table,n="",P=0,W=0,J=2,V=1,Z=t.slice.call(arguments,1),D=Object.create(this.lexer),A={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(A.yy[Q]=this.yy[Q]);D.setInput(g,A.yy),A.yy.lexer=D,A.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;t.push($);var Be=D.options&&D.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(I){c.length=c.length-2*I,E.length=E.length-I,t.length=t.length-I}u(Re,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,F={},U,B,pe,H;;){if(R=c[c.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=M[R]&&M[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";H=[];for(U in M[R])this.terminals_[U]&&U>J&&H.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(P+1)+`:
 `+D.showPosition()+`
 Expecting `+H.join(", ")+", got '"+(this.terminals_[N]||N)+"'":te="Parse error on line "+(P+1)+": Unexpected "+(N==V?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(te,{text:D.match,token:this.terminals_[N]||N,line:D.yylineno,loc:$,expected:H})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+N);switch(C[0]){case 1:c.push(N),E.push(D.yytext),t.push(D.yylloc),c.push(C[1]),N=null,W=D.yyleng,n=D.yytext,P=D.yylineno,$=D.yylloc;break;case 2:if(B=this.productions_[C[1]][1],F.$=E[E.length-B],F._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},Be&&(F._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),ee=this.performAction.apply(F,[n,W,P,A.yy,C[1],E,t].concat(Z)),typeof ee<"u")return ee;B&&(c=c.slice(0,-1*B*2),E=E.slice(0,-1*B),t=t.slice(0,-1*B)),c.push(this.productions_[C[1]][0]),E.push(F.$),t.push(F._$),pe=M[c[c.length-2]][c[c.length-1]],c.push(pe);break;case 3:return!0}}return!0},"parse")},T=(function(){var v={EOF:1,parseError:u(function(i,c){if(this.yy.parser)this.yy.parser.parseError(i,c);else throw new Error(i)},"parseError"),setInput:u(function(g,i){return this.yy=i||this.yy||{},this._input=g,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:u(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var i=g.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:u(function(g){var i=g.length,c=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var p=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),c.length-1&&(this.yylineno-=c.length-1);var E=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:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(g){this.unput(this.match.slice(g))},"less"),pastInput:u(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var g=this.pastInput(),i=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-B9GHaMKc.js b/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-B9GHaMKc.js
rename to apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js
index 173eebe24..85010360d 100644
--- a/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-B9GHaMKc.js
+++ b/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js
@@ -1,4 +1,4 @@
-import{d as Ne}from"./chunk-F27PBJKO-A5JDBOgE.js";import{s as Ae,g as Le,a as Ie,b as Me,_ as d,c as Ct,l as ce,d as Be,e as Ve,f as Ot,h as Ye,i as ye,j as Kt,w as Fe,k as Jt,m as ue}from"./mermaid.core-BgUXBQ9g.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var Yt=(function(){var t=d(function(yt,m,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=m);return x},"o"),e=[1,24],r=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],kt=[14,42],jt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],k=[1,83],T=[1,84],C=[1,85],R=[12,14,42],re=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,wt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(kt,[2,14]),t(jt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Rt,[2,19]),t(Rt,[2,20]),{25:[1,78]},{27:[1,79]},t(Rt,[2,23]),{35:80,75:81,76:S,77:k,79:T,80:C},{35:86,75:81,76:S,77:k,79:T,80:C},{35:87,75:81,76:S,77:k,79:T,80:C},{35:88,75:81,76:S,77:k,79:T,80:C},{35:89,75:81,76:S,77:k,79:T,80:C},{35:90,75:81,76:S,77:k,79:T,80:C},{35:91,75:81,76:S,77:k,79:T,80:C},{35:92,75:81,76:S,77:k,79:T,80:C},{35:93,75:81,76:S,77:k,79:T,80:C},{35:94,75:81,76:S,77:k,79:T,80:C},{35:95,75:81,76:S,77:k,79:T,80:C},{35:96,75:81,76:S,77:k,79:T,80:C},{35:97,75:81,76:S,77:k,79:T,80:C},{35:98,75:81,76:S,77:k,79:T,80:C},{35:99,75:81,76:S,77:k,79:T,80:C},{35:100,75:81,76:S,77:k,79:T,80:C},{35:101,75:81,76:S,77:k,79:T,80:C},{35:102,75:81,76:S,77:k,79:T,80:C},{35:103,75:81,76:S,77:k,79:T,80:C},{35:104,75:81,76:S,77:k,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:k,79:T,80:C},{35:106,75:81,76:S,77:k,79:T,80:C},{35:107,75:81,76:S,77:k,79:T,80:C},{35:108,75:81,76:S,77:k,79:T,80:C},{35:109,75:81,76:S,77:k,79:T,80:C},{35:110,75:81,76:S,77:k,79:T,80:C},{35:111,75:81,76:S,77:k,79:T,80:C},{35:112,75:81,76:S,77:k,79:T,80:C},{35:113,75:81,76:S,77:k,79:T,80:C},{35:114,75:81,76:S,77:k,79:T,80:C},{35:115,75:81,76:S,77:k,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:k,79:T,80:C},{35:120,75:81,76:S,77:k,79:T,80:C},{35:121,75:81,76:S,77:k,79:T,80:C},{35:122,75:81,76:S,77:k,79:T,80:C},{35:123,75:81,76:S,77:k,79:T,80:C},{35:124,75:81,76:S,77:k,79:T,80:C},{35:125,75:81,76:S,77:k,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(jt,[2,17],{21:22,19:130,22:e,23:r,24:a,26:u,28:i}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:a,26:u,28:i,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Rt,[2,21]),t(Rt,[2,22]),t(R,[2,39]),t(re,[2,71],{75:81,35:132,76:S,77:k,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(jt,[2,18]),t(kt,[2,38]),t(re,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(zt,[2,25]),t(zt,[2,26],{12:[1,138]}),t(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],wt=this.table,p="",xt=0,ae=0,we=2,ie=1,Oe=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(vt.yy[Xt]=this.yy[Xt]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var qt=A.yylloc;o.push(qt);var Pe=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(De,"popStack");function oe(){var B;return B=_.pop()||A.lex()||ie,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(oe,"lex");for(var M,Et,V,Ht,Tt={},Mt,j,le,Bt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=oe()),V=wt[Et]&&wt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Qt="";Bt=[];for(Mt in wt[Et])this.terminals_[Mt]&&Mt>we&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Qt="Parse error on line "+(xt+1)+`:
+import{d as Ne}from"./chunk-F27PBJKO-CGsciVEq.js";import{s as Ae,g as Le,a as Ie,b as Me,_ as d,c as Ct,l as ce,d as Be,e as Ve,f as Ot,h as Ye,i as ye,j as Kt,w as Fe,k as Jt,m as ue}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Yt=(function(){var t=d(function(yt,m,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=m);return x},"o"),e=[1,24],r=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],kt=[14,42],jt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],k=[1,83],T=[1,84],C=[1,85],R=[12,14,42],re=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,wt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(kt,[2,14]),t(jt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Rt,[2,19]),t(Rt,[2,20]),{25:[1,78]},{27:[1,79]},t(Rt,[2,23]),{35:80,75:81,76:S,77:k,79:T,80:C},{35:86,75:81,76:S,77:k,79:T,80:C},{35:87,75:81,76:S,77:k,79:T,80:C},{35:88,75:81,76:S,77:k,79:T,80:C},{35:89,75:81,76:S,77:k,79:T,80:C},{35:90,75:81,76:S,77:k,79:T,80:C},{35:91,75:81,76:S,77:k,79:T,80:C},{35:92,75:81,76:S,77:k,79:T,80:C},{35:93,75:81,76:S,77:k,79:T,80:C},{35:94,75:81,76:S,77:k,79:T,80:C},{35:95,75:81,76:S,77:k,79:T,80:C},{35:96,75:81,76:S,77:k,79:T,80:C},{35:97,75:81,76:S,77:k,79:T,80:C},{35:98,75:81,76:S,77:k,79:T,80:C},{35:99,75:81,76:S,77:k,79:T,80:C},{35:100,75:81,76:S,77:k,79:T,80:C},{35:101,75:81,76:S,77:k,79:T,80:C},{35:102,75:81,76:S,77:k,79:T,80:C},{35:103,75:81,76:S,77:k,79:T,80:C},{35:104,75:81,76:S,77:k,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:k,79:T,80:C},{35:106,75:81,76:S,77:k,79:T,80:C},{35:107,75:81,76:S,77:k,79:T,80:C},{35:108,75:81,76:S,77:k,79:T,80:C},{35:109,75:81,76:S,77:k,79:T,80:C},{35:110,75:81,76:S,77:k,79:T,80:C},{35:111,75:81,76:S,77:k,79:T,80:C},{35:112,75:81,76:S,77:k,79:T,80:C},{35:113,75:81,76:S,77:k,79:T,80:C},{35:114,75:81,76:S,77:k,79:T,80:C},{35:115,75:81,76:S,77:k,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:k,79:T,80:C},{35:120,75:81,76:S,77:k,79:T,80:C},{35:121,75:81,76:S,77:k,79:T,80:C},{35:122,75:81,76:S,77:k,79:T,80:C},{35:123,75:81,76:S,77:k,79:T,80:C},{35:124,75:81,76:S,77:k,79:T,80:C},{35:125,75:81,76:S,77:k,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(jt,[2,17],{21:22,19:130,22:e,23:r,24:a,26:u,28:i}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:a,26:u,28:i,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Rt,[2,21]),t(Rt,[2,22]),t(R,[2,39]),t(re,[2,71],{75:81,35:132,76:S,77:k,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(jt,[2,18]),t(kt,[2,38]),t(re,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(zt,[2,25]),t(zt,[2,26],{12:[1,138]}),t(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],wt=this.table,p="",xt=0,ae=0,we=2,ie=1,Oe=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(vt.yy[Xt]=this.yy[Xt]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var qt=A.yylloc;o.push(qt);var Pe=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(De,"popStack");function oe(){var B;return B=_.pop()||A.lex()||ie,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(oe,"lex");for(var M,Et,V,Ht,Tt={},Mt,j,le,Bt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=oe()),V=wt[Et]&&wt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Qt="";Bt=[];for(Mt in wt[Et])this.terminals_[Mt]&&Mt>we&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Qt="Parse error on line "+(xt+1)+`:
 `+A.showPosition()+`
 Expecting `+Bt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Qt="Parse error on line "+(xt+1)+": Unexpected "+(M==ie?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Qt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:qt,expected:Bt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Et+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,ae=A.yyleng,p=A.yytext,xt=A.yylineno,qt=A.yylloc;break;case 2:if(j=this.productions_[V[1]][1],Tt.$=D[D.length-j],Tt._$={first_line:o[o.length-(j||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(j||1)].first_column,last_column:o[o.length-1].last_column},Pe&&(Tt._$.range=[o[o.length-(j||1)].range[0],o[o.length-1].range[1]]),Ht=this.performAction.apply(Tt,[p,ae,xt,vt.yy,V[1],D,o].concat(Oe)),typeof Ht<"u")return Ht;j&&(E=E.slice(0,-1*j*2),D=D.slice(0,-1*j),o=o.slice(0,-1*j)),E.push(this.productions_[V[1]][0]),D.push(Tt.$),o.push(Tt._$),le=wt[E[E.length-2]][E[E.length-1]],E.push(le);break;case 3:return!0}}return!0},"parse")},Re=(function(){var yt={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(m,x){return this.yy=x||this.yy||{},this._input=m,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:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var x=m.length,E=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=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),E.length-1&&(this.yylineno-=E.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:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/channel-CeJKBXng.js b/apps/pythinker-code/dist-web/assets/channel-CeJKBXng.js
deleted file mode 100644
index 39caec524..000000000
--- a/apps/pythinker-code/dist-web/assets/channel-CeJKBXng.js
+++ /dev/null
@@ -1 +0,0 @@
-import{U as a,C as n}from"./mermaid.core-BgUXBQ9g.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
diff --git a/apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js b/apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js
new file mode 100644
index 000000000..0dd861988
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js
@@ -0,0 +1 @@
+import{U as a,C as n}from"./mermaid.core-BusHtpbx.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-DDI19Bs6.js b/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-CPFb-YMA.js
similarity index 67%
rename from apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-DDI19Bs6.js
rename to apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-CPFb-YMA.js
index 732ae5a70..535b24d4d 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-DDI19Bs6.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-CPFb-YMA.js
@@ -1 +1 @@
-import{_ as i}from"./mermaid.core-BgUXBQ9g.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
+import{_ as i}from"./mermaid.core-BusHtpbx.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-wCYaCTKB.js b/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-BX7DTcSO.js
similarity index 83%
rename from apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-wCYaCTKB.js
rename to apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-BX7DTcSO.js
index 645c7e1dd..b4a4251ce 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-wCYaCTKB.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-BX7DTcSO.js
@@ -1,4 +1,4 @@
-import{_ as e}from"./mermaid.core-BgUXBQ9g.js";var l=e(()=>`
+import{_ as e}from"./mermaid.core-BusHtpbx.js";var l=e(()=>`
   /* Font Awesome icon styling - consolidated */
   .label-icon {
     display: inline-block;
diff --git a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-A5JDBOgE.js b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-CGsciVEq.js
similarity index 96%
rename from apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-A5JDBOgE.js
rename to apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-CGsciVEq.js
index 981d57ee0..6ad492677 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-A5JDBOgE.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-CGsciVEq.js
@@ -1 +1 @@
-import{_ as i,j as l,n as d,o}from"./mermaid.core-BgUXBQ9g.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,h as b,g as c,x as d,m as e,w as f,f as g,y as h};
+import{_ as i,j as l,n as d,o}from"./mermaid.core-BusHtpbx.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,h as b,g as c,x as d,m as e,w as f,f as g,y as h};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-x-A8PhoW.js b/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CIn6rVI9.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-x-A8PhoW.js
rename to apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CIn6rVI9.js
index 05efd7de4..4be647c24 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-x-A8PhoW.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CIn6rVI9.js
@@ -1,4 +1,4 @@
-import{g as te}from"./chunk-XXDRQBXY-GqpBYspR.js";import{s as ee}from"./chunk-POPQ4Y6H-CyRmuplC.js";import{_ as f,l as _,c as $,y as se,z as ie,a as re,b as ae,g as ne,s as oe,p as le,q as ce,aa as he,k as j,r as ue,j as bt}from"./mermaid.core-BgUXBQ9g.js";import{f as de}from"./chunk-F27PBJKO-A5JDBOgE.js";import{p as fe}from"./purify.es-5AjVNlXF.js";var vt=(function(){var t=f(function(V,a,u,r){for(u=u||{},r=V.length;r--;u[V[r]]=a);return u},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],x=[1,20],k=[1,21],d=[1,22],L=[1,23],R=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],I=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,u,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:N,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:N,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,u){if(u.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=u,r}},"parseError"),parse:f(function(a){var u=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(w){r.length=r.length-2*w,E.length=E.length-w,i.length=i.length-w}f(Zt,"popStack");function Lt(){var w;return w=g.pop()||b.lex()||Q,typeof w!="number"&&(w instanceof Array&&(g=w,w=g.pop()),w=u.symbols_[w]||w),w}f(Lt,"lex");for(var A,W,O,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?O=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),O=B[W]&&B[W][A]),typeof O>"u"||!O.length||!O[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`:
+import{g as te}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as ee}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as f,l as _,c as $,y as se,z as ie,a as re,b as ae,g as ne,s as oe,p as le,q as ce,aa as he,k as j,r as ue,j as bt}from"./mermaid.core-BusHtpbx.js";import{f as de}from"./chunk-F27PBJKO-CGsciVEq.js";import{p as fe}from"./purify.es-5AjVNlXF.js";var vt=(function(){var t=f(function(V,a,u,r){for(u=u||{},r=V.length;r--;u[V[r]]=a);return u},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],x=[1,20],k=[1,21],d=[1,22],L=[1,23],R=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],I=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,u,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:N,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:N,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,u){if(u.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=u,r}},"parseError"),parse:f(function(a){var u=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(w){r.length=r.length-2*w,E.length=E.length-w,i.length=i.length-w}f(Zt,"popStack");function Lt(){var w;return w=g.pop()||b.lex()||Q,typeof w!="number"&&(w instanceof Array&&(g=w,w=g.pop()),w=u.symbols_[w]||w),w}f(Lt,"lex");for(var A,W,O,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?O=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),O=B[W]&&B[W][A]),typeof O>"u"||!O.length||!O[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`:
 `+b.showPosition()+`
 Expecting `+dt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(Y+1)+": Unexpected "+(A==Q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:Et,expected:dt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(O[0]){case 1:r.push(A),E.push(b.yytext),i.push(b.yylloc),r.push(O[1]),A=null,K=b.yyleng,l=b.yytext,Y=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[O[1]][1],X.$=E[E.length-G],X._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},Qt&&(X._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(X,[l,K,Y,U.yy,O[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[O[1]][0]),E.push(X.$),i.push(X._$),It=B[r[r.length-2]][r[r.length-1]],r.push(It);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(u,r){if(this.yy.parser)this.yy.parser.parseError(u,r);else throw new Error(u)},"parseError"),setInput:f(function(a,u){return this.yy=u||this.yy||{},this._input=a,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:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var u=a.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var u=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var g=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),r.length-1&&(this.yylineno-=r.length-1);var E=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:r?(r.length===g.length?this.yylloc.first_column:0)+g[g.length-r.length].length-r[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),u=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-BVyXOrT5.js b/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-D9ICAwD_.js
similarity index 71%
rename from apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-BVyXOrT5.js
rename to apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-D9ICAwD_.js
index b78e69308..156bac4e9 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-BVyXOrT5.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-D9ICAwD_.js
@@ -1 +1 @@
-import{_ as i}from"./mermaid.core-BgUXBQ9g.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
+import{_ as i}from"./mermaid.core-BusHtpbx.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-DoVNud6N.js b/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-Bvdjn-Qn.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-DoVNud6N.js
rename to apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-Bvdjn-Qn.js
index 5d740ca2c..260e0bb3c 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-DoVNud6N.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-Bvdjn-Qn.js
@@ -1,4 +1,4 @@
-import{g as tt}from"./chunk-5VM5RSS4-wCYaCTKB.js";import{g as st}from"./chunk-XXDRQBXY-GqpBYspR.js";import{s as it}from"./chunk-POPQ4Y6H-CyRmuplC.js";import{_ as f,l as Ie,c as F,x as at,y as nt,z as Oe,j as de,b as rt,a as ut,s as lt,g as ct,p as ot,q as ht,k as I,r as dt,t as pt,i as At,a6 as G}from"./mermaid.core-BgUXBQ9g.js";import{f as ft}from"./chunk-F27PBJKO-A5JDBOgE.js";import{p as gt}from"./purify.es-5AjVNlXF.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
+import{g as tt}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{g as st}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as it}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as f,l as Ie,c as F,x as at,y as nt,z as Oe,j as de,b as rt,a as ut,s as lt,g as ct,p as ot,q as ht,k as I,r as dt,t as pt,i as At,a6 as G}from"./mermaid.core-BusHtpbx.js";import{f as ft}from"./chunk-F27PBJKO-CGsciVEq.js";import{p as gt}from"./purify.es-5AjVNlXF.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
 `+D.showPosition()+`
 Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,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:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var l=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),p.length-1&&(this.yylineno-=p.length-1);var C=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:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-CyRmuplC.js b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BpzExJjb.js
similarity index 87%
rename from apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-CyRmuplC.js
rename to apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BpzExJjb.js
index 7e98e20f8..ae8fee14f 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-CyRmuplC.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BpzExJjb.js
@@ -1 +1 @@
-import{_ as a,d as w,l as x}from"./mermaid.core-BgUXBQ9g.js";var B=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=d(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),d=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{B as s};
+import{_ as a,d as w,l as x}from"./mermaid.core-BusHtpbx.js";var B=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=d(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),d=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{B as s};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-C35ZI9k-.js b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D3M7Gbkt.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-C35ZI9k-.js
rename to apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D3M7Gbkt.js
index 3d0de2ba3..da54fa640 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-C35ZI9k-.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D3M7Gbkt.js
@@ -1,4 +1,4 @@
-import{_ as p,l as w,G as L,A as E,r as X,X as I,d as G,i as H,c as q}from"./mermaid.core-BgUXBQ9g.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,q()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),X(),w.debug("[Railroad] Database cleared")},"clear"),_=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),W=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,`
+import{_ as p,l as w,G as L,A as E,r as X,X as I,d as G,i as H,c as q}from"./mermaid.core-BusHtpbx.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,q()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),X(),w.debug("[Railroad] Database cleared")},"clear"),_=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),W=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,`
 `),w.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ee=p(()=>N,"getAccDescription"),te=_,re=W,ie={clear:U,setTitle:_,getTitle:W,addRule:j,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},g={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),B=p(e=>e?Object.keys(e).every(i=>i==="railroad"||oe.has(i)):!1,"isRailroadStyleOptions"),le=p(e=>e?"railroad"in e&&e.railroad?e.railroad:B(e)?e:{}:{},"extractRailroadOverrides"),se=p(e=>{if(!e||B(e))return{};const{railroad:i,svgId:a,theme:r,look:t,...n}=e;return n},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ne.test(a)?a:i},"sanitizeColorValue"),Y=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ae.test(a)?a:i},"sanitizeFontFamilyValue"),S=p((e,i)=>{const a=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(a)&&a>=0?a:i},"sanitizeNumberValue"),de=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ce=p(e=>{const i=Y(e.fontFamily,g.fontFamily),a=de(e.fontSize)??g.fontSize;return{...g,fontFamily:i,fontSize:a,terminalFill:m(e.secondBkg??e.secondaryColor,g.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,g.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,g.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,g.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,g.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,g.nonTerminalTextColor),lineColor:m(e.lineColor,g.lineColor),markerFill:m(e.lineColor,g.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,g.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,g.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,g.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,g.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,g.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,g.ruleNameColor)}},"buildThemeDefaults"),M=p(e=>{const i=E(),a={...I(),...i.themeVariables??{},...se(e)},r=ce(a),t={...i.railroad??{},...le(e)};return{compactMode:t.compactMode??r.compactMode,padding:S(t.padding,r.padding),verticalSeparation:S(t.verticalSeparation,r.verticalSeparation),horizontalSeparation:S(t.horizontalSeparation,r.horizontalSeparation),arcRadius:S(t.arcRadius,r.arcRadius),fontSize:S(t.fontSize,r.fontSize),fontFamily:Y(t.fontFamily,r.fontFamily),terminalFill:m(t.terminalFill,r.terminalFill),terminalStroke:m(t.terminalStroke,r.terminalStroke),terminalTextColor:m(t.terminalTextColor,r.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:m(t.lineColor,r.lineColor),strokeWidth:S(t.strokeWidth,r.strokeWidth),markerFill:m(t.markerFill,r.markerFill),commentFill:m(t.commentFill,r.commentFill),commentStroke:m(t.commentStroke,r.commentStroke),commentTextColor:m(t.commentTextColor,r.commentTextColor),specialFill:m(t.specialFill,r.specialFill),specialStroke:m(t.specialStroke,r.specialStroke),ruleNameColor:m(t.ruleNameColor,r.ruleNameColor),showMarkers:t.showMarkers??r.showMarkers,markerRadius:S(t.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),ue=p(e=>{const{fontFamily:i,fontSize:a,terminalFill:r,terminalStroke:t,terminalTextColor:n,nonTerminalFill:h,nonTerminalStroke:s,nonTerminalTextColor:o,lineColor:u,strokeWidth:c,markerFill:d,commentFill:x,commentStroke:l,commentTextColor:f,specialFill:y,specialStroke:v,ruleNameColor:C}=M(e);return`
   .railroad-diagram {
     font-family: ${i};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-GqpBYspR.js b/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-DaNzL58C.js
similarity index 72%
rename from apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-GqpBYspR.js
rename to apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-DaNzL58C.js
index 7f831329d..dd311c2a4 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-GqpBYspR.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-DaNzL58C.js
@@ -1 +1 @@
-import{_ as a,j as o}from"./mermaid.core-BgUXBQ9g.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
+import{_ as a,j as o}from"./mermaid.core-BusHtpbx.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C3txtkaA.js b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C3txtkaA.js
deleted file mode 100644
index 67a6dec8a..000000000
--- a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C3txtkaA.js
+++ /dev/null
@@ -1 +0,0 @@
-import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-DoVNud6N.js";import{_ as i}from"./mermaid.core-BgUXBQ9g.js";import"./chunk-5VM5RSS4-wCYaCTKB.js";import"./chunk-XXDRQBXY-GqpBYspR.js";import"./chunk-POPQ4Y6H-CyRmuplC.js";import"./chunk-F27PBJKO-A5JDBOgE.js";import"./purify.es-5AjVNlXF.js";import"./index-vF2s5p7P.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js
new file mode 100644
index 000000000..fc8faceda
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js
@@ -0,0 +1 @@
+import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-Bvdjn-Qn.js";import{_ as i}from"./mermaid.core-BusHtpbx.js";import"./chunk-5VM5RSS4-BX7DTcSO.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C3txtkaA.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C3txtkaA.js
deleted file mode 100644
index 67a6dec8a..000000000
--- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C3txtkaA.js
+++ /dev/null
@@ -1 +0,0 @@
-import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-DoVNud6N.js";import{_ as i}from"./mermaid.core-BgUXBQ9g.js";import"./chunk-5VM5RSS4-wCYaCTKB.js";import"./chunk-XXDRQBXY-GqpBYspR.js";import"./chunk-POPQ4Y6H-CyRmuplC.js";import"./chunk-F27PBJKO-A5JDBOgE.js";import"./purify.es-5AjVNlXF.js";import"./index-vF2s5p7P.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js
new file mode 100644
index 000000000..fc8faceda
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js
@@ -0,0 +1 @@
+import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-Bvdjn-Qn.js";import{_ as i}from"./mermaid.core-BusHtpbx.js";import"./chunk-5VM5RSS4-BX7DTcSO.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-D7cfmkHX.js b/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-Du_KHUbL.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-D7cfmkHX.js
rename to apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-Du_KHUbL.js
index 1bbc7bda5..6eb0a4bfe 100644
--- a/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-D7cfmkHX.js
+++ b/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-Du_KHUbL.js
@@ -1 +1 @@
-import{b4 as lt,_ as V,l as $,j as gt}from"./mermaid.core-BgUXBQ9g.js";import{c as tt}from"./cytoscape.esm-CNiYdHpY.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,q;function ft(){return q||(q=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
+import{b4 as lt,_ as V,l as $,j as gt}from"./mermaid.core-BusHtpbx.js";import{c as tt}from"./cytoscape.esm-CNiYdHpY.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,q;function ft(){return q||(q=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
diff --git a/apps/pythinker-code/dist-web/assets/cssMode-BrgZPA71.js b/apps/pythinker-code/dist-web/assets/cssMode-BYOYZWAb.js
similarity index 93%
rename from apps/pythinker-code/dist-web/assets/cssMode-BrgZPA71.js
rename to apps/pythinker-code/dist-web/assets/cssMode-BYOYZWAb.js
index ec338371d..11b4698c5 100644
--- a/apps/pythinker-code/dist-web/assets/cssMode-BrgZPA71.js
+++ b/apps/pythinker-code/dist-web/assets/cssMode-BYOYZWAb.js
@@ -1 +1 @@
-import{c as h,l as s}from"./editor.main-BVyazG_A.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-jno-S5XZ.js";import{h as y,i as U,j as T,t as x,k as j}from"./lspLanguageFeatures-jno-S5XZ.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const A=120*1e3;class C{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>A&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-uch7pA5g.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new C(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,C as WorkerManager,U as fromPosition,T as fromRange,L as setupMode,x as toRange,j as toTextEdit};
+import{c as h,l as s}from"./editor.main-yCrGDkyO.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-Dzr62Jjp.js";import{h as y,i as U,j as T,t as x,k as j}from"./lspLanguageFeatures-Dzr62Jjp.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const A=120*1e3;class C{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>A&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-uch7pA5g.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new C(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,C as WorkerManager,U as fromPosition,T as fromRange,L as setupMode,x as toRange,j as toTextEdit};
diff --git a/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-DnoOlDkN.js b/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BlED4Rd3.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-DnoOlDkN.js
rename to apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BlED4Rd3.js
index fb0a71590..87e14bb0c 100644
--- a/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-DnoOlDkN.js
+++ b/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BlED4Rd3.js
@@ -1,4 +1,4 @@
-import{bR as et}from"./index-vF2s5p7P.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[`
+import{bR as et}from"./index-BZ9wqq8Z.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[`
 `,`\r
 `,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;for(;f({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
+import{p as xt}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{s as gt,g as $t,q as bt,p as wt,a as Ct,b as vt,_ as s,l as Y,G as Dt,d as kt,r as At,D as U,A as Q,E as Tt,X as ot}from"./mermaid.core-BusHtpbx.js";import{p as Bt}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
 	.cynefinDomain {
 		stroke: none;
 	}
diff --git a/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DkuX21S_.js b/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DNRBAAmc.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DkuX21S_.js
rename to apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DNRBAAmc.js
index ad3d864bd..cf870605e 100644
--- a/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DkuX21S_.js
+++ b/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DNRBAAmc.js
@@ -1,4 +1,4 @@
-import{_ as m,an as x,c as k,a7 as O,l as p,ao as A,ap as Y,aq as b,ar as _,as as z,at as H,au as D,av as J,aw as T,ax as X,ai as R,ag as F,ay as q,az as W}from"./mermaid.core-BgUXBQ9g.js";import{l as j}from"./layout-BKltItOX.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var C=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),U=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],u=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&u.add(i),o!==d&&u.add(o)}),u.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,u=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=C(Math.max(d,t.width*.35),36,l),i=C(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+u;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-u;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const u=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:u,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:u,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(u=>{const c=t.edge(u);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:u.v,end:u.w})}else a.push({edge:c,start:u.v,end:u.w})}),d.forEach(u=>{if(u.length!==3){u.forEach(h=>a.push(h));return}u.sort((h,E)=>h.edge.selfLoop.order-E.edge.selfLoop.order);const[c,l,s]=u,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){u.forEach(h=>a.push(h));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,u,i.start,f),w=V(o,L,e,n.width??0),y=Z(o,w,L,e,n),g={...l.edge,...i,id:i.id,points:w,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const u=e.graph().rankdir;p.trace("Dir in recursive render - dir:",u);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=_(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=U(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const h=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
+import{_ as m,an as x,c as k,a7 as O,l as p,ao as A,ap as Y,aq as b,ar as _,as as z,at as H,au as D,av as J,aw as T,ax as X,ai as R,ag as F,ay as q,az as W}from"./mermaid.core-BusHtpbx.js";import{l as j}from"./layout-CRsCkvth.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var C=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),U=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],u=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&u.add(i),o!==d&&u.add(o)}),u.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,u=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=C(Math.max(d,t.width*.35),36,l),i=C(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+u;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-u;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const u=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:u,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:u,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(u=>{const c=t.edge(u);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:u.v,end:u.w})}else a.push({edge:c,start:u.v,end:u.w})}),d.forEach(u=>{if(u.length!==3){u.forEach(h=>a.push(h));return}u.sort((h,E)=>h.edge.selfLoop.order-E.edge.selfLoop.order);const[c,l,s]=u,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){u.forEach(h=>a.push(h));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,u,i.start,f),w=V(o,L,e,n.width??0),y=Z(o,w,L,e,n),g={...l.edge,...i,id:i.id,points:w,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const u=e.graph().rankdir;p.trace("Dir in recursive render - dir:",u);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=_(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=U(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const h=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
  Node.id = `,y,`
  data=`,h.height,`
 Parent cluster`,a.height),e.setNode(a.id,h),e.parent(y)||(p.trace("Setting parent",y,a.id),e.setParent(y,a.id,h))}if(p.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),g?.clusterNode){p.info("Cluster identified XBX",y,g.width,e.node(y));const{ranksep:h,nodesep:E}=e.graph();g.graph.setGraph({...g.graph.graph(),ranksep:h+25,nodesep:E});const S=await oe({element:i,graph:g.graph,diagramType:r,id:d,parentCluster:e.node(y),siteConfig:f}),N=S.elem;z(g,N),g.diff=S.diff||0,p.info("New compound node after recursive render XAX",y,"width",g.width,"height",g.height),H(N,g)}else e.children(y).length>0?(p.trace("Cluster - the non recursive path XBX",y,g.id,g,g.width,"Graph:",e),p.trace(D(g.id,e)),b.set(g.id,{id:D(g.id,e),node:g})):(p.trace("Node - the non recursive path XAX",y,i,e.node(y),u),await J(i,e.node(y),{config:f,dir:u}))})),await m(async()=>{const y=e.edges().map(async function(g){const h=e.edge(g.v,g.w,g.name);if(p.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),p.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),p.info("Fix",b,"ids:",g.v,g.w,"Translating: ",b.get(g.v),b.get(g.w)),n&&h.selfLoop){if(h.selfLoop.order!==1)return;const E={...h.originalEdge,...h,id:h.selfLoop.id,startLabelLeft:h.originalEdge?.startLabelLeft??h.startLabelLeft,startLabelRight:h.originalEdge?.startLabelRight??h.startLabelRight,endLabelLeft:h.originalEdge?.endLabelLeft??h.endLabelLeft,endLabelRight:h.originalEdge?.endLabelRight??h.endLabelRight};await X(s,E),h.width=E.width,h.height=E.height,h.labelStyle=E.labelStyle;return}await X(s,h)});await Promise.all(y)},"processEdges")();const{subGraphTitleTotalMargin:w}=T(f);return{elem:o,graph:e,groups:{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o},diagramType:r,id:d,mergeSelfLoops:n,subGraphTitleTotalMargin:w}},"measureDagreGraph"),M=m(t=>{p.info("############################################# XXX"),p.info("###                Layout                 ### XXX"),p.info("############################################# XXX"),j(t)},"runDagreGraphLayout"),$=m((t,e,r)=>{const d=t.node(e);if(!d)return;const a={...d};return d?.clusterNode?a.y=(d.y??0)+r:t.children(e).length>0?a.height=(d.height??0)+r:a.y=(d.y??0)+r/2,a},"normalizeDagreNode"),v=m((t,e)=>{K.forEach(r=>{e[r]!==void 0&&(t[r]=e[r])})},"applyDagreNodeLayout"),ee=m((t,e,r,d)=>({...t,start:t.start??e,end:t.end??r,points:(t.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+d:a.y}))}),"normalizeDagreEdge"),te=m((t,e)=>{const{graph:r,mergeSelfLoops:d,subGraphTitleTotalMargin:a=0}=e,f=new Map(t.nodes.map(c=>[c.id,c]));x(r).forEach(c=>{const l=$(r,c,a);if(!l)return;v(r.node(c),l);const s=f.get(c);s&&v(s,l)});const u=a/2;return t.edges=B(r,u,{mergeSelfLoops:d}).map(({edge:c,start:l,end:s})=>ee(c,l,s,u)),t},"applyDagreLayoutResult"),re=m(async({elem:t,graph:e,groups:{clusters:r,edgePaths:d},diagramType:a,id:f,mergeSelfLoops:u,subGraphTitleTotalMargin:c})=>{let l=0;await Promise.all(x(e).map(async function(o){const n=e.node(o);if(p.info("Position XBX => "+o+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=c,p.info("A tainted cluster node XBX1",o,n.id,n.width,n.height,n.x,n.y,e.parent(o)),b.get(n.id).node=n,R(n);else if(e.children(o).length>0){p.info("A pure cluster node XBX1",o,n.id,n.x,n.y,n.width,n.height,e.parent(o)),n.height+=c,e.node(n.parentId);const L=n?.padding/2||0,w=n?.labelBBox?.height||0,y=w-L||0;p.debug("OffsetY",y,"labelHeight",w,"halfPadding",L),await F(r,n),b.get(n.id).node=n}else{const L=e.node(n.parentId);n.y+=c/2,p.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",L,L?.offsetY,n),R(n)}}));const s=c/2;return B(e,s,{mergeSelfLoops:u}).forEach(function({edge:o,start:n,end:L}){p.info("Edge "+n+" -> "+L+": "+JSON.stringify(o),o),o.points.forEach(h=>h.y+=s);const w=e.node(n),y=e.node(L),g=q(d,o,b,a,w,y,f);W(o,g)}),e.nodes().forEach(function(o){const n=e.node(o);p.info(o,n.type,n.diff),n.isGroup&&(l=n.diff)}),p.warn("Returning from recursive render XAX",t,l),{elem:t,diff:l}},"paintDagreLayoutCore"),oe=m(async t=>{const e=await I(t);return M(e.graph),await re(e)},"renderDagreSubgraph"),G=m(t=>{const e=new O({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(r=>{e.setNode(r.id,{...r}),r.parentId&&e.setParent(r.id,r.parentId)}),p.debug("Edges:",t.edges),t.edges.forEach(r=>{if(r.start===r.end){const d=r.start,a=d+"---"+d+"---1",f=d+"---"+d+"---2",u=e.node(d);e.setNode(a,{domId:a,id:a,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(a,u.parentId),e.setNode(f,{domId:f,id:f,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,u.parentId);const c=structuredClone(r),l=structuredClone(r),s=structuredClone(r),i=structuredClone(r);l.originalEdge=c,l.selfLoop={id:c.id,order:0},s.originalEdge=c,s.selfLoop={id:c.id,order:1},i.originalEdge=c,i.selfLoop={id:c.id,order:2},l.label="",l.arrowTypeEnd="none",l.endLabelLeft="",l.endLabelRight="",l.startLabelLeft="",l.id=d+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=d+"-cyclic-special-mid",i.label="",i.startLabelRight="",i.startLabelLeft="",i.arrowTypeStart="none",u.isGroup&&(l.fromCluster=d,i.toCluster=d),i.id=d+"-cyclic-special-2",i.arrowTypeStart="none",e.setEdge(d,a,l,d+"-cyclic-special-0"),e.setEdge(a,f,s,d+"-cyclic-special-1"),e.setEdge(f,d,i,d+"-cyclic-special-2")}else e.setEdge(r.start,r.end,{...r},r.id)}),A(e),{graph:e}},"prepareLayoutForDagre"),ae=m(async(t,{element:e,preparedLayout:r})=>{const d=r??G(t),a=k(),f=await I({element:e,graph:d.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:a});return d.measuredLayout=f,f},"measureDagreLayout"),ne=m((t,e)=>{const r=e.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return M(r.graph),te(t,r),r},"runDagreLayoutCore"),se=m((t,{measure:e})=>x(e.graph).map(r=>e.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ie=m((t,e,{measure:r})=>t?r.graph.node(t):void 0,"getDagreEdgeNode"),fe=Y({prepareLayout:G,measureLayout:ae,runLayoutCore:ne,paintOptions:{clusterDb:b,getNodes:se,getEdgeNode:ie,skipNode:m((t,{measure:e})=>!e.graph.hasNode(t.id),"skipNode"),isCluster:m((t,{measure:e})=>e.graph.hasNode(t.id)&&(e.graph.children(t.id)??[]).length>0,"isCluster")}});export{te as applyDagreLayoutResult,B as getEdgesToRender,ae as measureDagreLayout,G as prepareLayoutForDagre,fe as render,ne as runDagreLayoutCore};
diff --git a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-BCkTP5l5.js b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-95PLVM0c.js
similarity index 96%
rename from apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-BCkTP5l5.js
rename to apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-95PLVM0c.js
index 929fbc944..865805901 100644
--- a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-BCkTP5l5.js
+++ b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-95PLVM0c.js
@@ -1,4 +1,4 @@
-import{I as X}from"./chunk-2Q5K7J3B-DDI19Bs6.js";import{p as z}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as N,l as A,G as Z,d as j,A as E,r as U,i as J,aj as K,E as Q,ak as ee}from"./mermaid.core-BgUXBQ9g.js";import{p as te}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var D=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,k=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/,re="    ";function _(n){return n.some(t=>D.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=L.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
+import{I as X}from"./chunk-2Q5K7J3B-CPFb-YMA.js";import{p as z}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as N,l as A,G as Z,d as j,A as E,r as U,i as J,aj as K,E as Q,ak as ee}from"./mermaid.core-BusHtpbx.js";import{p as te}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var D=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,k=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/,re="    ";function _(n){return n.some(t=>D.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=L.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
 `),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),U()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>N(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:q,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:O},I=de,he=g(n=>{z(n,I);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function C(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(C,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await K(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),$=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;$(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;$(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
 `+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=Z(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),j(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ie={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ce=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=N(Ie,n);return`
diff --git a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DsxzrkIm.js b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DqI3S6m6.js
similarity index 95%
rename from apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DsxzrkIm.js
rename to apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DqI3S6m6.js
index bd4972bd0..c588b6165 100644
--- a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DsxzrkIm.js
+++ b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DqI3S6m6.js
@@ -1,4 +1,4 @@
-import{p as I}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{s as _,g as E,q as D,p as F,a as G,b as P,_ as c,G as z,r as B,D as w,A as C,E as W,l as b,X as V,d as H}from"./mermaid.core-BgUXBQ9g.js";import{p as X}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:x},m=structuredClone(A),j=W.radar,U=c(()=>w({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;rw({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;rge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let l;K(i)?(g.debug("source frame",i.sourceFrames),l=n.frames.filter(d=>i.sourceFrames.some(c=>c.$refText===d.name)),l.forEach(d=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:d})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,l)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as re}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{q as oe,p as se,s as le,g as de,a as ce,b as me,_ as o,l as g,c as D,j as ue,B as xe,r as fe,D as ge,A as M,E as he,i as y,w as P,al as pe}from"./mermaid.core-BusHtpbx.js";import{p as be,i as ve}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let l;K(i)?(g.debug("source frame",i.sourceFrames),l=n.frames.filter(d=>i.sourceFrames.some(c=>c.$refText===d.name)),l.forEach(d=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:d})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,l)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," "),r+="
")}const m=r!==void 0;m&&(c+=`

${r}`);const x={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,l=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,d={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,l,r),m=c+d.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+d.width,a.maxHeight=Math.max(a.maxHeight,d.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:d,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[T]:V,[S]:J},Be={[$]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:de,setAccDescription:le,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=D(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,l=a.targetBox.swimlane.y+n.swimlanePadding,d=ne(r,l),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${d} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),d?(x=r,u=l+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=l);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),l=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",d=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",l).attr("stroke",d),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var De=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:l}=D(),d=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(d,m.maxR,c,r)),m.boxes.forEach(te(d,c)),m.relations.forEach(ie(d,c,x,r)),d.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,d,l?.padding??30,l?.useMaxWidth)},"draw"),Te={draw:De},$e=o(e=>"","getStyles"),Ne=$e,Ue={parser:Ee,db:F,renderer:Te,styles:Ne};export{Ue as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DpeqeF5i.js b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-TJJN2czJ.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DpeqeF5i.js rename to apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-TJJN2czJ.js index 2ce61a89b..54ed61d48 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DpeqeF5i.js +++ b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-TJJN2czJ.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{_ as w,X as ge,A as te,D as Q,G as ye,d as Se,l as ee,bd as B,j as Y,b as ve,a as xe,p as be,q as we,g as Ce,s as Te,E as Le,be as $e,r as Ae}from"./mermaid.core-BgUXBQ9g.js";import{s as Fe}from"./chunk-POPQ4Y6H-CyRmuplC.js";import{p as Ne}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function Ee(e){for(var a=this,n=Re(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Re(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function We(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ge(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function qe(){return ae(this).eachBefore(Ye)}function Xe(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ye(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:Ee,ancestors:We,descendants:He,leaves:Ie,links:Oe,copy:qe,[Symbol.iterator]:Ge};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*R,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,E=10,q=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*E:960,x=o.nodeHeight?o.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),R=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?q+E:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?E:0).paddingRight(t=>t.children&&t.children.length>0?E:0).paddingBottom(t=>t.children&&t.children.length>0?E:0).round(!0)(R),he=ne.descendants().filter(t=>t.children&&t.children.length>0),W=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),W.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,j=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);j.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` +import{p as me}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as w,X as ge,A as te,D as Q,G as ye,d as Se,l as ee,bd as B,j as Y,b as ve,a as xe,p as be,q as we,g as Ce,s as Te,E as Le,be as $e,r as Ae}from"./mermaid.core-BusHtpbx.js";import{s as Fe}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{p as Ne}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function Ee(e){for(var a=this,n=Re(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Re(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function We(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ge(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function qe(){return ae(this).eachBefore(Ye)}function Xe(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ye(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:Ee,ancestors:We,descendants:He,leaves:Ie,links:Oe,copy:qe,[Symbol.iterator]:Ge};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*R,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,E=10,q=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*E:960,x=o.nodeHeight?o.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),R=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?q+E:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?E:0).paddingRight(t=>t.children&&t.children.length>0?E:0).paddingBottom(t=>t.children&&t.children.length>0?E:0).round(!0)(R),he=ne.descendants().filter(t=>t.children&&t.children.length>0),W=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),W.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,j=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);j.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BX-mpA_H.js b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DnTJZ40O.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BX-mpA_H.js rename to apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DnTJZ40O.js index f3de83a93..0795f33c4 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BX-mpA_H.js +++ b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DnTJZ40O.js @@ -1,4 +1,4 @@ -import{p as $}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{_ as b,D as u,G as B,d as C,l as m,b as S,a as D,p as T,q as E,g as P,s as z,A,E as F,r as W}from"./mermaid.core-BgUXBQ9g.js";import{p as _}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=P,this.setAccDescription=z}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{$(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},G=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())I(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:G},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` +import{p as $}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as b,D as u,G as B,d as C,l as m,b as S,a as D,p as T,q as E,g as P,s as z,A,E as F,r as W}from"./mermaid.core-BusHtpbx.js";import{p as _}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=P,this.setAccDescription=z}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{$(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},G=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())I(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:G},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-Az6pcQU0.js b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js similarity index 87% rename from apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-Az6pcQU0.js rename to apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js index c32c1414e..48e7258e1 100644 --- a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-Az6pcQU0.js +++ b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js @@ -1 +1 @@ -import{g as l,r as m,d as n}from"./chunk-SVP7TREG-C35ZI9k-.js";import{p}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{_ as t,l as o}from"./mermaid.core-BgUXBQ9g.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; +import{g as l,r as m,d as n}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as t,l as o}from"./mermaid.core-BusHtpbx.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/editor.main-BVyazG_A.js b/apps/pythinker-code/dist-web/assets/editor.main-yCrGDkyO.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/editor.main-BVyazG_A.js rename to apps/pythinker-code/dist-web/assets/editor.main-yCrGDkyO.js index 6b16f2f0e..d51c1e950 100644 --- a/apps/pythinker-code/dist-web/assets/editor.main-BVyazG_A.js +++ b/apps/pythinker-code/dist-web/assets/editor.main-yCrGDkyO.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-BrgZPA71.js","assets/lspLanguageFeatures-jno-S5XZ.js","assets/index-vF2s5p7P.js","assets/index-DmWWUMKQ.css","assets/purify.es-5AjVNlXF.js","assets/htmlMode-Cyt5VoSI.js","assets/jsonMode-BhgzQeiy.js","assets/tsMode-COGDJ9qu.js","assets/freemarker2-D03L5Rmf.js","assets/handlebars-DTB7OcjB.js","assets/html-Bx3Ftaqh.js","assets/javascript-CcXtvgWG.js","assets/typescript-0SwtrmOf.js","assets/liquid-D7rm-Mjg.js","assets/mdx-CvYmjfax.js","assets/python-D5-SFkaZ.js","assets/razor-C8sRtc2W.js","assets/xml-Co1-HPio.js","assets/yaml-BNFZzxOc.js"])))=>i.map(i=>d[i]); -import{bR as we}from"./index-vF2s5p7P.js";import{p as Gf}from"./purify.es-5AjVNlXF.js";function pV(){return globalThis._VSCODE_NLS_MESSAGES}function AA(){return globalThis._VSCODE_NLS_LANGUAGE}const TX=AA()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function g0(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),TX&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return g0(typeof o=="number"?mV(o,e):e,t)}function mV(o,e){const t=pV()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function H(o,e,...t){let i;typeof o=="number"?i=mV(o,e):i=e;const n=g0(i,t);return{value:n,original:e===i?n:g0(e,t)}}function RX(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const wt=window;class OA{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new OA}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function _V(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function PE(o){return OA.INSTANCE.getZoomFactor(o)}const Xm=navigator.userAgent,Ks=Xm.indexOf("Firefox")>=0,rL=Xm.indexOf("AppleWebKit")>=0,sw=Xm.indexOf("Chrome")>=0,vg=!sw&&Xm.indexOf("Safari")>=0,bV=!sw&&!vg&&rL;Xm.indexOf("Electron/")>=0;const L3=Xm.indexOf("Android")>=0;let _D=!1;if(typeof wt.matchMedia=="function"){const o=wt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=wt.matchMedia("(display-mode: fullscreen)");_D=o.matches,_V(wt,o,({matches:t})=>{_D&&e.matches||(_D=t)})}function FA(){return globalThis.MonacoEnvironment}class MX{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?dm.isErrorNoTelemetry(e)?new dm(e.message+` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-BYOYZWAb.js","assets/lspLanguageFeatures-Dzr62Jjp.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css","assets/purify.es-5AjVNlXF.js","assets/htmlMode-BtW7hgTd.js","assets/jsonMode-B4lkE7Oy.js","assets/tsMode-BZYSYhKr.js","assets/freemarker2-CG8OSn8H.js","assets/handlebars-vt5-G9kY.js","assets/html-BwCzbm6J.js","assets/javascript-C1Bl1QAn.js","assets/typescript-DeFWR0Bj.js","assets/liquid-OhilcA0U.js","assets/mdx-BNW26XnD.js","assets/python-BeBGma8p.js","assets/razor-L05JTUrE.js","assets/xml-BDPhTprf.js","assets/yaml-B6mJwErH.js"])))=>i.map(i=>d[i]); +import{bR as we}from"./index-BZ9wqq8Z.js";import{p as Gf}from"./purify.es-5AjVNlXF.js";function pV(){return globalThis._VSCODE_NLS_MESSAGES}function AA(){return globalThis._VSCODE_NLS_LANGUAGE}const TX=AA()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function g0(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),TX&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return g0(typeof o=="number"?mV(o,e):e,t)}function mV(o,e){const t=pV()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function H(o,e,...t){let i;typeof o=="number"?i=mV(o,e):i=e;const n=g0(i,t);return{value:n,original:e===i?n:g0(e,t)}}function RX(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const wt=window;class OA{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new OA}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function _V(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function PE(o){return OA.INSTANCE.getZoomFactor(o)}const Xm=navigator.userAgent,Ks=Xm.indexOf("Firefox")>=0,rL=Xm.indexOf("AppleWebKit")>=0,sw=Xm.indexOf("Chrome")>=0,vg=!sw&&Xm.indexOf("Safari")>=0,bV=!sw&&!vg&&rL;Xm.indexOf("Electron/")>=0;const L3=Xm.indexOf("Android")>=0;let _D=!1;if(typeof wt.matchMedia=="function"){const o=wt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=wt.matchMedia("(display-mode: fullscreen)");_D=o.matches,_V(wt,o,({matches:t})=>{_D&&e.matches||(_D=t)})}function FA(){return globalThis.MonacoEnvironment}class MX{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?dm.isErrorNoTelemetry(e)?new dm(e.message+` `+e.stack):new Error(e.message+` @@ -900,7 +900,7 @@ ${e.toString()}`}}class Xx{constructor(e=new f_,t=!1,i,n=dMe){this._services=e,t `:`\r `}};mA=ql([Ti(0,Pe)],mA);class SMe{publicLog2(){}}class eL{static{this.SCHEME="inmemory"}constructor(){const e=_e.from({scheme:eL.SCHEME,authority:"model",path:"/"});this.workspace={id:Sq,folders:[new F_e({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===eL.SCHEME?this.workspace.folders[0]:null}}function tL(o,e,t){if(!e||!(o instanceof Jx))return;const i=[];Object.keys(e).forEach(n=>{tbe(n)&&i.push([`editor.${n}`,e[n]]),t&&ibe(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let _A=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:aF.convert(e),n=new Map;for(const a of i){if(!(a instanceof fh))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=n.get(l);c||(c=[],n.set(l,c)),c.push(gi.replaceMove(L.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),r+=1,s+=l.length;return{ariaSummary:Lg(k2.bulkEditServiceSummary,s,r),isApplied:s>0}}};_A=ql([Ti(0,ei)],_A);class yMe{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Lr(e)}}let bA=class extends BTe{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};bA=ql([Ti(0,Ul),Ti(1,et)],bA);class xMe{constructor(){this._neverEmitter=new P,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class LMe extends $x{constructor(){super()}}class kMe extends pMe{constructor(){super(new Yee)}}let CA=class extends UP{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};CA=ql([Ti(0,ts),Ti(1,bi),Ti(2,ud),Ti(3,st),Ti(4,Er),Ti(5,Ie)],CA);const DMe={esmModuleLocation:void 0,label:"editorWorkerService"};let vA=class extends TP{constructor(e,t,i,n,s){super(DMe,e,t,i,n,s)}};vA=ql([Ti(0,ei),Ti(1,Xk),Ti(2,Mt),Ti(3,ti),Ti(4,he)],vA);class IMe{async playSignal(e,t){}}$e(Mt,kMe,0);$e(Pe,Jx,0);$e(Xk,pA,0);$e(SZ,mA,0);$e(sd,eL,0);$e(Zg,yMe,0);$e(ts,SMe,0);$e(Xw,vMe,0);$e(bF,CMe,0);$e(bi,Qx,0);$e($l,Fu,0);$e(_i,LMe,0);$e(er,NNe,0);$e(ei,ZP,0);$e(MO,GP,0);$e(Ie,uA,0);$e(ej,bMe,0);$e(id,p3,0);$e(ps,vme,0);$e(eo,vA,0);$e(Ow,_A,0);$e(PZ,xMe,0);$e(fs,gA,0);$e(kn,cA,0);$e(Mr,Iwe,0);$e(Pt,fA,0);$e(st,Ym,0);$e(Jn,lA,0);$e(ud,bA,0);$e(gd,KP,0);$e(Co,hA,0);$e(Jo,CA,0);$e(Er,AT,0);$e(dd,IMe,0);$e(S4,mMe,0);$e(Iz,ete,0);$e(g5,$0e,0);var Ne;(function(o){const e=new f_;for(const[l,c]of _7())e.set(l,c);const t=new Xx(e,!0);e.set(fe,t);function i(l){n||r({});const c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof hl?t.invokeFunction(d=>d.get(l)):c}o.get=i;let n=!1;const s=new P;function r(l){if(n)return t;n=!0;for(const[d,h]of _7())e.get(d)||e.set(d,h);for(const d in l)if(l.hasOwnProperty(d)){const h=We(d);e.get(h)instanceof hl&&e.set(h,l[d])}const c=Fbe();for(const d of c)try{t.createInstance(d)}catch(h){Ee(h)}return s.fire(),t}o.initialize=r;function a(l){if(n)return l();const c=new z,d=c.add(s.event(()=>{d.dispose(),c.add(l())}));return c}o.withServices=a})(Ne||(Ne={}));var EMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},j6=function(o,e){return function(t,i){e(t,i,o)}},d0;let wA=class{static{d0=this}static{this._ttpTokenizer=Vl("tokenizeToString",{createHTML(e){return e}})}constructor(e,t){this._configurationService=e,this._languageService=t}async renderCodeBlock(e,t,i){const n=Ha(i.context)?i.context:void 0;let s;e?s=this._languageService.getLanguageIdByLanguageName(e):n&&(s=n.getModel()?.getLanguageId()),s||(s=qo);const r=await nue(this._languageService,t,s),a=d0._ttpTokenizer?d0._ttpTokenizer.createHTML(r)??r:r,l=document.createElement("span");l.innerHTML=a;const c=l.querySelector(".monaco-tokenized-source");return mi(c)?(gn(c,this.getFontInfo(n)),l):document.createElement("span")}getFontInfo(e){return e?e.getOption(59):Mne({fontFamily:this._configurationService.getValue("editor").fontFamily},1)}};wA=d0=EMe([j6(0,Pe),j6(1,_i)],wA);var m3=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},It=function(o,e){return function(t,i){e(t,i,o)}};let NMe=0,q6=!1;function TMe(o){if(!o){if(q6)return;q6=!0}pee(o||wt.document.body)}let iL=class extends Pg{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f){const p={...t};p.ariaLabel=p.ariaLabel||x2.editorViewAccessibleLabel,super(e,p,{},i,n,s,r,c,d,h,u,g),l instanceof Ym?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,TMe(p.ariaContainerElement),Uue((_,b)=>i.createInstance(Tm,_,{instantHover:b},{})),Rfe(a),f.setDefaultCodeBlockRenderer(i.createInstance(wA))}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++NMe,s=q.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),A.None;const t=e.id,i=e.label,n=q.and(q.equals("editorId",this.getId()),q.deserialize(e.precondition)),s=e.keybindings,r=q.and(n,q.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(g,...f)=>Promise.resolve(e.run(this,...f)),d=new z,h=this.getId()+":"+t;if(d.add(Ye.registerCommand(h,c)),a){const g={command:{id:h,title:i},when:n,group:a,order:l};d.add(un.appendMenuItem(M.EditorContext,g))}if(Array.isArray(s))for(const g of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,g,c,r));const u=new x$(h,i,i,void 0,n,(...g)=>Promise.resolve(e.run(this,...g)),this._contextKeyService);return this._actions.set(t,u),d.add(ue(()=>{this._actions.delete(t)})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof Wx)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};iL=m3([It(2,fe),It(3,et),It(4,Pt),It(5,Ie),It(6,Ms),It(7,st),It(8,ci),It(9,bi),It(10,kn),It(11,ti),It(12,he),It(13,aa)],iL);let SA=class extends iL{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f,p,_,b){const C={...t};tL(h,C,!1);const w=c.registerEditorContainer(e);typeof C.theme=="string"&&c.setTheme(C.theme),typeof C.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!C.autoDetectHighContrast);const v=C.model;delete C.model,super(e,C,i,n,s,r,a,l,c,d,u,p,_,b),this._configurationService=h,this._standaloneThemeService=c,this._register(w);let S;if(typeof v>"u"){const x=f.getLanguageIdByMimeType(C.language)||C.language||qo;S=DY(g,f,C.value||"",x,void 0),this._ownsModel=!0}else S=v,this._ownsModel=!1;if(this._attachModel(S),S){const x={oldModelUrl:null,newModelUrl:S.uri};this._onDidChangeModel.fire(x)}}dispose(){super.dispose()}updateOptions(e){tL(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};SA=m3([It(2,fe),It(3,et),It(4,Pt),It(5,Ie),It(6,Ms),It(7,st),It(8,er),It(9,bi),It(10,Pe),It(11,kn),It(12,ei),It(13,_i),It(14,ti),It(15,he),It(16,aa)],SA);let yA=class extends Pl{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g={...t};tL(l,g,!0);const f=r.registerEditorContainer(e);typeof g.theme=="string"&&r.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!g.autoDetectHighContrast),super(e,g,{},n,i,s,u,d),this._configurationService=l,this._standaloneThemeService=r,this._register(f)}dispose(){super.dispose()}updateOptions(e){tL(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(iL,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};yA=m3([It(2,fe),It(3,Ie),It(4,et),It(5,er),It(6,bi),It(7,Pe),It(8,Jo),It(9,id),It(10,Co),It(11,dd)],yA);function DY(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` `);let r=t;return s!==-1&&(r=t.substring(0,s)),K6(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return K6(o,t,e.createById(i),n)}function K6(o,e,t,i){return o.createModel(e,t,i)}E("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},m(142,"The background color of the diff editor's header"));E("multiDiffEditor.background",ki,m(143,"The background color of the multi file diff editor"));E("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},m(144,"The border color of the multi file diff editor"));var RMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},G6=function(o,e){return function(t,i){e(t,i,o)}};class MMe{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let xA=class extends A{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=De(this,void 0),this._collapsed=$(this,l=>this._viewModel.read(l)?.collapsed.read(l)),this._editorContentHeight=De(this,500),this.contentHeight=$(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=De(this,0),this._modifiedWidth=De(this,0),this._originalContentWidth=De(this,0),this._originalWidth=De(this,0),this.maxScroll=$(this,l=>{const c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),d=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>d?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:d,width:this._originalWidth.read(l)}}),this._elements=Qe("div.multiDiffEntry",[Qe("div.header@header",[Qe("div.header-content",[Qe("div.collapse-button@collapseButton"),Qe("div.file-path",[Qe("div.title.modified.show-file-icons@primaryPath",[]),Qe("div.status.deleted@status",["R"]),Qe("div.title.original.show-file-icons@secondaryPath",[])]),Qe("div.actions@actions")])]),Qe("div.editorParent",[Qe("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(Pl,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode,fixedOverflowWidgets:!0},{})),this.isModifedFocused=Jt(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Jt(this.editor.getOriginalEditor()).isFocused,this.isFocused=$(this,l=>this.isModifedFocused.read(l)||this.isOriginalFocused.read(l)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new z),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const r=new Wy(this._elements.collapseButton,{});this._register(xe(l=>{r.element.className="",r.icon=this._collapsed.read(l)?G.chevronRight:G.chevronDown})),this._register(r.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register(xe(l=>{this._elements.editor.style.display=this._collapsed.read(l)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(l=>{const c=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(c,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(l=>{const c=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(c,void 0)})),this._register(this.editor.onDidContentSizeChange(l=>{tb(c=>{this._editorContentHeight.set(l.contentHeight,c),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),c),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),c)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(l=>{if(this._isSettingScrollTop||!l.scrollTopChanged||!this._data)return;const c=l.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(c)})),this._register(xe(l=>{const c=this._viewModel.read(l)?.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));const a=this._register(this._instantiationService.createChild(new f_([Ie,this._contextKeyService])));this._register(a.createInstance(pv,this._elements.actions,M.MultiDiffEditorFileToolbar,{actionRunner:this._register(new lq(()=>this._viewModel.get()?.modifiedUri??this._viewModel.get()?.originalUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>l.startsWith("navigation")},actionViewItemProvider:(l,c)=>oF(a,l,c)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function t(n){return{...n,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){tb(n=>{this._viewModel.set(void 0,n),this.editor.setDiffModel(null,n),this._dataStore.clear()});return}const i=e.viewModel.documentDiffItem;if(tb(n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let s=!1,r=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",s=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",r=!0),this._elements.status.classList.toggle("renamed",s),this._elements.status.classList.toggle("deleted",r),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,this._resourceLabel2?.setUri(s?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))}),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{this.editor.updateOptions(t(i.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,n=>{n||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(const[n,s]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(n,s)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=e.length-this._headerHeight,r=Math.max(0,Math.min(n.start-e.start,s));this._elements.header.style.transform=`translateY(${r}px)`,tb(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",r>0||i>0),this._elements.header.classList.toggle("collapsed",r===s)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};xA=RMe([G6(3,fe),G6(4,Ie)],xA);class PMe{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(this._unused.size===0)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find(n=>this._itemData.get(n).getId()===e.getId())??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var AMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z6=function(o,e){return function(t,i){e(t,i,o)}};let LA=class extends A{constructor(e,t,i,n,s,r){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=r,this._scrollableElements=Qe("div.scrollContent",[Qe("div@content",{style:{overflow:"hidden"}}),Qe("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new u_({forceIntegerValues:!1,scheduleAtNextAnimationFrame:c=>Zs(pe(this._element),c),smoothScrollDuration:100})),this._scrollableElement=this._register(new KL(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Qe("div.monaco-component.multiDiffEditor",{},[Qe("div",{},[this._scrollableElement.getDomNode()]),Qe("div.placeholder@placeholder",{},[Qe("div")])]),this._sizeObserver=this._register(new zj(this._element,void 0)),this._objectPool=this._register(new PMe(c=>{const d=this._instantiationService.createInstance(xA,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return d.setData(c),d})),this.scrollTop=dt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=dt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=$(this,c=>{const d=this._viewModel.read(c);if(!d)return{items:[],getItem:f=>{throw new Ce}};const h=d.items.read(c),u=new Map;return{items:h.map(f=>{const p=c.store.add(new FMe(f,this._objectPool,this.scrollLeft,b=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+b})})),_=this._lastDocStates?.[p.getKey()];return _&&Et(b=>{p.setViewState(_,b)}),u.set(f,p),p}),getItem:f=>u.get(f)}}),this._viewItems=this._viewItemsInfo.map(this,c=>c.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(c,d)=>c.reduce((h,u)=>h+u.contentHeight.read(d)+this._spaceBetweenPx,0)),this.activeControl=$(this,c=>{const d=this._viewModel.read(c)?.activeDiffItem.read(c);return d?this._viewItemsInfo.read(c).getItem(d).template.read(c)?.editor:void 0}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new f_([Ie,this._contextKeyService]))),this._contextKeyService.createKey(N.inMultiDiffEditor.key,!0),this._lastDocStates={},this._register(Xn((c,d)=>{const h=this._viewModel.read(c);if(h&&h.contextKeys)for(const[u,g]of Object.entries(h.contextKeys)){const f=this._contextKeyService.createKey(u,void 0);f.set(g),d.add(ue(()=>f.reset()))}}));const a=this._parentContextKeyService.createKey(N.multiDiffEditorAllCollapsed.key,!1);this._register(xe(c=>{const d=this._viewModel.read(c);if(d){const h=d.items.read(c).every(u=>u.collapsed.read(c));a.set(h)}})),this._register(xe(c=>{const d=this._dimension.read(c);this._sizeObserver.observe(d)}));const l=$(c=>{if(this._viewItems.read(c).length>0)return;const h=this._viewModel.read(c);return!h||h.isLoading.read(c)?m(145,"Loading..."):m(146,"No Changed Files")});this._register(xe(c=>{const d=l.read(c);this._elements.placeholder.innerText=d??"",this._elements.placeholder.classList.toggle("visible",!!d)})),this._scrollableElements.content.style.position="relative",this._register(xe(c=>{const d=this._sizeObserver.height.read(c);this._scrollableElements.root.style.height=`${d}px`;const h=this._totalHeight.read(c);this._scrollableElements.content.style.height=`${h}px`;const u=this._sizeObserver.width.read(c);let g=u;const f=this._viewItems.read(c),p=JO(f,Bn(_=>_.maxScroll.read(c).maxScroll,uo));if(p){const _=p.maxScroll.read(c);g=u+_.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:d,scrollHeight:h,scrollWidth:g})})),e.replaceChildren(this._elements.root),this._register(ue(()=>{e.replaceChildren()})),this._register(xe(c=>{const d=this._viewModel.read(c);if(d&&!d.isLoading.read(c)){if(d.items.read(c).length===0||d.activeDiffItem.read(c))return;this.goToNextChange()}})),this._register(this._register(xe(c=>{tb(d=>{this.render(c)})})))}reveal(e,t){const i=this._viewItems.get(),n=i.findIndex(c=>c.viewModel.originalUri?.toString()===e.original?.toString()&&c.viewModel.modifiedUri?.toString()===e.modified?.toString());if(n===-1)throw new Ce("Resource not found in diff editor");const s=i[n];this._viewModel.get().activeDiffItem.setCache(s.viewModel,void 0);let r=0;for(let c=0;cl.viewModel===i):-1;if(n===-1){this._goToFile(0,"first");return}const s=t[n];s.viewModel.collapsed.get()&&s.viewModel.collapsed.set(!1,void 0);const r=s.template.get()?.editor;if(r?.getDiffComputationResult()?.changes2?.length){const l=r.getModifiedEditor().getPosition()?.lineNumber||1,c=r.getDiffComputationResult().changes2;if(e==="next"?c.some(h=>h.modified.startLineNumber>l):c.some(h=>h.modified.endLineNumberExclusive<=l)){r.goToDiff(e);return}}const a=(n+(e==="next"?1:-1)+t.length)%t.length;this._goToFile(a,e==="next"?"first":"last")}_goToFile(e,t){const i=this._viewItems.get()[e];i.viewModel.collapsed.get()&&i.viewModel.collapsed.set(!1,void 0),this.reveal({original:i.viewModel.originalUri,modified:i.viewModel.modifiedUri});const n=i.template.get()?.editor;if(n?.getDiffComputationResult()?.changes2?.length)if(t==="first")n.revealFirstDiff();else{const s=n.getDiffComputationResult().changes2.at(-1),r=n.getModifiedEditor();r.setPosition({lineNumber:s.modified.startLineNumber,column:1}),r.revealLineInCenter(s.modified.startLineNumber)}n?.focus()}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const r=this._sizeObserver.height.read(e),a=ge.ofStartAndLength(t,r),l=this._sizeObserver.width.read(e);for(const c of this._viewItems.read(e)){const d=c.contentHeight.read(e),h=Math.min(d,r),u=ge.ofStartAndLength(n,h),g=ge.ofStartAndLength(s,d);if(g.isBefore(a))i-=d-h,c.hide();else if(g.isAfter(a))c.hide();else{const f=Math.max(0,Math.min(a.start-g.start,d-h));i-=f;const p=ge.ofStartAndLength(t+i,r);c.render(u,f,l,p)}n+=h+this._spaceBetweenPx,s+=d+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};LA=AMe([Z6(4,Ie),Z6(5,fe)],LA);function OMe(o,e){const t=o.getModel(),i=o.createDecorationsCollection([{range:e,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===t&&i.clear()},350)}class FMe extends A{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register(gO(this,void 0)),this.contentHeight=$(this,s=>this._templateRef.read(s)?.object.contentHeight?.read(s)??this.viewModel.lastTemplateData.read(s).contentHeight),this.maxScroll=$(this,s=>this._templateRef.read(s)?.object.maxScroll.read(s)??{maxScroll:0,scrollWidth:0}),this.template=$(this,s=>this._templateRef.read(s)?.object),this._isHidden=De(this,!1),this._isFocused=$(this,s=>this.template.read(s)?.isFocused.read(s)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(xe(s=>{const r=this._scrollLeft.read(s);this._templateRef.read(s)?.object.setScrollLeft(r)})),this._register(xe(s=>{const r=this._templateRef.read(s);!r||!this._isHidden.read(s)||r.object.isFocused.read(s)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(ae.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const s=this._templateRef.get();s&&n&&s.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&Et(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();if(!s){s=this._objectPool.getUnusedObj(new MMe(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(s,void 0);const r=this.viewModel.lastTemplateData.get().selections;r&&s.object.editor.setSelections(r)}s.object.render(e,i,t,n)}}var WMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},BMe=function(o,e){return function(t,i){e(t,i,o)}};let kA=class extends A{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=De(this,void 0),this._viewModel=De(this,void 0),this._widgetImpl=$(this,n=>n.store.add(this._instantiationService.createInstance(ac(LA),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))),this._register(fm(this._widgetImpl))}};kA=WMe([BMe(2,fe)],kA);function HMe(o,e,t){return Ne.initialize(t||{}).createInstance(SA,o,e)}function VMe(o){return Ne.get(et).onCodeEditorAdd(t=>{o(t)})}function zMe(o){return Ne.get(et).onDiffEditorAdd(t=>{o(t)})}function UMe(){return Ne.get(et).listCodeEditors()}function $Me(){return Ne.get(et).listDiffEditors()}function jMe(o,e,t){return Ne.initialize(t||{}).createInstance(yA,o,e)}function qMe(o,e){const t=Ne.initialize(e||{});return new kA(o,{},t)}function KMe(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Ye.registerCommand(o.id,o.run)}function GMe(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=q.deserialize(o.precondition),t=(n,...s)=>Ki.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new z;if(i.add(Ye.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(un.appendMenuItem(M.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=Ne.get(st);if(!(n instanceof Ym))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=q.and(e,q.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function ZMe(o){return IY([o])}function IY(o){const e=Ne.get(st);return e instanceof Ym?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:q.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),A.None)}function YMe(o,e,t){const i=Ne.get(_i),n=i.getLanguageIdByMimeType(e)||e;return DY(Ne.get(ei),i,o,n,t)}function XMe(o,e){const t=Ne.get(_i),i=t.getLanguageIdByMimeType(e)||e||qo;o.setLanguage(t.createById(i))}function QMe(o,e,t){o&&Ne.get($l).changeOne(e,o.uri,t)}function JMe(o){Ne.get($l).changeAll(o,[])}function e2e(o){return Ne.get($l).read(o)}function t2e(o){return Ne.get($l).onMarkerChanged(o)}function i2e(o){return Ne.get(ei).getModel(o)}function n2e(){return Ne.get(ei).getModels()}function s2e(o){return Ne.get(ei).onModelAdded(o)}function o2e(o){return Ne.get(ei).onModelRemoved(o)}function r2e(o){return Ne.get(ei).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function a2e(o){return uTe(Ne.get(ei),o)}function l2e(o,e){const t=Ne.get(_i),i=Ne.get(er);return a3.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function c2e(o,e,t){const i=Ne.get(_i);return Ne.get(er).registerEditorContainer(wt.document.body),a3.colorize(i,o,e,t)}function d2e(o,e,t=4){return Ne.get(er).registerEditorContainer(wt.document.body),a3.colorizeModelLine(o,e,t)}function h2e(o){const e=ui.get(o);return e||{getInitialState:()=>Im,tokenize:(t,i,n)=>w4(o,n)}}function u2e(o,e){ui.getOrCreate(e);const t=h2e(e),i=bo(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r{if(!i)return null;const s=t.options?.selection;let r;return s&&typeof s.endLineNumber=="number"&&typeof s.endColumn=="number"?r=s:s&&(r={lineNumber:s.startLineNumber,column:s.startColumn}),await o.openCodeEditor(i,t.resource,r)?i:null})}function C2e(){return{create:HMe,getEditors:UMe,getDiffEditors:$Me,onDidCreateEditor:VMe,onDidCreateDiffEditor:zMe,createDiffEditor:jMe,addCommand:KMe,addEditorAction:GMe,addKeybindingRule:ZMe,addKeybindingRules:IY,createModel:YMe,setModelLanguage:XMe,setModelMarkers:QMe,getModelMarkers:e2e,removeAllMarkers:JMe,onDidChangeMarkers:t2e,getModels:n2e,getModel:i2e,onDidCreateModel:s2e,onWillDisposeModel:o2e,onDidChangeModelLanguage:r2e,createWebWorker:a2e,colorizeElement:l2e,colorize:c2e,colorizeModelLine:d2e,tokenize:u2e,defineTheme:g2e,setTheme:f2e,remeasureFonts:p2e,registerCommand:m2e,registerLinkOpener:_2e,registerEditorOpener:b2e,AccessibilitySupport:O2,ContentWidgetPositionPreference:z2,CursorChangeReason:U2,DefaultEndOfLine:$2,EditorAutoIndentStrategy:q2,EditorOption:K2,EndOfLinePreference:G2,EndOfLineSequence:Z2,MinimapPosition:aP,MinimapSectionHeaderStyle:lP,MouseTargetType:cP,OverlayWidgetPositionPreference:uP,OverviewRulerLane:gP,GlyphMarginLane:Y2,RenderLineNumbersType:mP,RenderMinimap:_P,ScrollbarVisibility:CP,ScrollType:bP,TextEditorCursorBlinkingStyle:kP,TextEditorCursorStyle:DP,TrackedRangeStickiness:IP,WrappingIndent:EP,InjectedTextCursorStops:J2,PositionAffinity:pP,ShowLightbulbIconMode:wP,TextDirection:LP,ConfigurationChangedEvent:oU,BareFontInfo:Ig,FontInfo:U0,TextModelResolvedOptions:PS,FindMatch:MC,ApplyUpdateResult:Db,EditorZoom:hr,createMultiFileDiffEditor:qMe,EditorType:xw,EditorOptions:rs}}function v2e(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function vS(o,e){return typeof o=="boolean"?o:e}function Y6(o,e){return typeof o=="string"?o:e}function w2e(o){const e={};for(const t of o)e[t]=!0;return e}function X6(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=w2e(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function DA(o,e,t){e=e.replace(/@@/g,"");let i=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,a){n=!0;let l="";if(typeof o[a]=="string")l=o[a];else if(o[a]&&o[a]instanceof RegExp)l=o[a].source;else throw o[a]===void 0?zt(o,"language definition does not contain attribute '"+a+"', used at: "+e):zt(o,"attribute reference '"+a+"' must be a string, used at: "+e);return Au(l)?"":"(?:"+l+")"}),i++;while(n&&i<5);e=e.replace(/\x01/g,"@");const s=(o.ignoreCase?"i":"")+(o.unicode?"u":"");if(t&&e.match(/\$[sS](\d\d?)/g)){let a=null,l=null;return c=>(l&&a===c||(a=c,l=new RegExp(_Te(o,e,c),s)),l)}return new RegExp(e,s)}function S2e(o,e,t,i){if(i<0)return o;if(i=100){i=i-100;const n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw zt(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw zt(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!bTe(o,Vd(o,n,"",[],""))))throw zt(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=DA(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=IA(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function EY(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={languageId:o,includeLF:vS(e.includeLF,!1),noThrow:!1,maxStack:100,start:typeof e.start=="string"?e.start:null,ignoreCase:vS(e.ignoreCase,!1),unicode:vS(e.unicode,!1),tokenPostfix:Y6(e.tokenPostfix,"."+o),defaultToken:Y6(e.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const c of l){let d=c.include;if(d){if(typeof d!="string")throw zt(t,"an 'include' attribute must be a string at: "+r);if(d[0]==="@"&&(d=d.substr(1)),!e.tokenizer[d])throw zt(t,"include target '"+d+"' is not defined at: "+r);n(r+"."+d,a,e.tokenizer[d])}else{const h=new x2e(r);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(h.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")h.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const u=c[1];u.next=c[2],h.setAction(i,u)}else throw zt(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else h.setAction(i,c[1]);else{if(!c.regex)throw zt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);c.name&&typeof c.name=="string"&&(h.name=c.name),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=vS(c.matchOnlyAtLineStart,!1)),h.setRegex(i,c.regex),h.setAction(i,c.action)}a.push(h)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw zt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw zt(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw zt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:jc(t,a.open),close:jc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function L2e(o){mm.registerLanguage(o)}function k2e(){let o=[];return o=o.concat(mm.getLanguages()),o}function D2e(o){return Ne.get(_i).languageIdCodec.encodeLanguageId(o)}function I2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function E2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function N2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ne.get(ti).register(o,e,100)}class T2e{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return iw.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new JL(n.tokens,n.endState)}}class iw{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:g{const i=await Promise.resolve(e.create());return i?R2e(i)?TY(o,i):new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe)):null});return ui.registerFactory(o,t)}function A2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return NY(e)?_3(o,{create:()=>e}):ui.register(o,TY(o,e))}function O2e(o,e){const t=i=>new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe));return NY(e)?_3(o,{create:()=>e}):ui.register(o,t(e))}function F2e(o,e){return Ne.get(he).referenceProvider.register(o,e)}function W2e(o,e){return Ne.get(he).renameProvider.register(o,e)}function B2e(o,e){return Ne.get(he).newSymbolNamesProvider.register(o,e)}function H2e(o,e){return Ne.get(he).signatureHelpProvider.register(o,e)}function V2e(o,e){return Ne.get(he).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new L(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function z2e(o,e){return Ne.get(he).documentSymbolProvider.register(o,e)}function U2e(o,e){return Ne.get(he).documentHighlightProvider.register(o,e)}function $2e(o,e){return Ne.get(he).linkedEditingRangeProvider.register(o,e)}function j2e(o,e){return Ne.get(he).definitionProvider.register(o,e)}function q2e(o,e){return Ne.get(he).implementationProvider.register(o,e)}function K2e(o,e){return Ne.get(he).typeDefinitionProvider.register(o,e)}function G2e(o,e){return Ne.get(he).codeLensProvider.register(o,e)}function Z2e(o,e,t){return Ne.get(he).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const c=Ne.get($l).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function Y2e(o,e){return Ne.get(he).documentFormattingEditProvider.register(o,e)}function X2e(o,e){return Ne.get(he).documentRangeFormattingEditProvider.register(o,e)}function Q2e(o,e){return Ne.get(he).onTypeFormattingEditProvider.register(o,e)}function J2e(o,e){return Ne.get(he).linkProvider.register(o,e)}function ePe(o,e){return Ne.get(he).completionProvider.register(o,e)}function tPe(o,e){return Ne.get(he).colorProvider.register(o,e)}function iPe(o,e){return Ne.get(he).foldingRangeProvider.register(o,e)}function nPe(o,e){return Ne.get(he).declarationProvider.register(o,e)}function sPe(o,e){return Ne.get(he).selectionRangeProvider.register(o,e)}function oPe(o,e){return Ne.get(he).documentSemanticTokensProvider.register(o,e)}function rPe(o,e){return Ne.get(he).documentRangeSemanticTokensProvider.register(o,e)}function aPe(o,e){return Ne.get(he).inlineCompletionsProvider.register(o,e)}function lPe(o,e){return Ne.get(he).inlayHintsProvider.register(o,e)}function cPe(){return{register:L2e,getLanguages:k2e,onLanguage:I2e,onLanguageEncountered:E2e,getEncodedLanguageId:D2e,setLanguageConfiguration:N2e,setColorMap:P2e,registerTokensProviderFactory:_3,setTokensProvider:A2e,setMonarchTokensProvider:O2e,registerReferenceProvider:F2e,registerRenameProvider:W2e,registerNewSymbolNameProvider:B2e,registerCompletionItemProvider:ePe,registerSignatureHelpProvider:H2e,registerHoverProvider:V2e,registerDocumentSymbolProvider:z2e,registerDocumentHighlightProvider:U2e,registerLinkedEditingRangeProvider:$2e,registerDefinitionProvider:j2e,registerImplementationProvider:q2e,registerTypeDefinitionProvider:K2e,registerCodeLensProvider:G2e,registerCodeActionProvider:Z2e,registerDocumentFormattingEditProvider:Y2e,registerDocumentRangeFormattingEditProvider:X2e,registerOnTypeFormattingEditProvider:Q2e,registerLinkProvider:J2e,registerColorProvider:tPe,registerFoldingRangeProvider:iPe,registerDeclarationProvider:nPe,registerSelectionRangeProvider:sPe,registerDocumentSemanticTokensProvider:oPe,registerDocumentRangeSemanticTokensProvider:rPe,registerInlineCompletionsProvider:aPe,registerInlayHintsProvider:lPe,DocumentHighlightKind:j2,CompletionItemKind:B2,CompletionItemTag:H2,CompletionItemInsertTextRule:W2,SymbolKind:yP,SymbolTag:xP,IndentAction:Q2,CompletionTriggerKind:V2,SignatureHelpTriggerKind:SP,InlayHintKind:eP,InlineCompletionTriggerKind:nP,CodeActionTriggerType:F2,NewSymbolNameTag:dP,NewSymbolNameTriggerKind:hP,PartialAcceptTriggerKind:fP,HoverVerbosityAction:X2,InlineCompletionEndOfLifeReasonKind:tP,InlineCompletionHintStyle:iP,FoldingRangeKind:df,SelectedSuggestionInfo:c$,EditDeltaInfo:ov}}rs.wrappingIndent.defaultValue=0;rs.glyphMargin.defaultValue=!1;rs.autoIndent.defaultValue=3;rs.overviewRulerLanes.defaultValue=2;Vm.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const As=sY();As.editor=C2e();As.languages=cPe();const RY=As.CancellationTokenSource,Ph=As.Emitter,MY=As.KeyCode,PY=As.KeyMod,_d=As.Position,x_=As.Range,AY=As.Selection,OY=As.SelectionDirection,Zr=As.MarkerSeverity,nL=As.MarkerTag,hD=As.Uri,FY=As.Token,Dl=As.editor,de=As.languages,dPe=FA(),rm=globalThis;(dPe?.globalAPI||typeof rm.define=="function"&&rm.define.amd)&&(rm.monaco=As);typeof rm.require<"u"&&typeof rm.require.config=="function"&&rm.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const hPe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:RY,Emitter:Ph,KeyCode:MY,KeyMod:PY,MarkerSeverity:Zr,MarkerTag:nL,Position:_d,Range:x_,Selection:AY,SelectionDirection:OY,Token:FY,Uri:hD,editor:Dl,languages:de},Symbol.toStringTag,{value:"Module"}));let b3=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const C3={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},v3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},WY=new b3("css",C3,v3),BY=new b3("scss",C3,v3),HY=new b3("less",C3,v3);function w3(){return we(()=>import("./cssMode-BrgZPA71.js"),__vite__mapDeps([0,1,2,3,4]))}de.onLanguage("less",()=>{w3().then(o=>o.setupMode(HY))});de.onLanguage("scss",()=>{w3().then(o=>o.setupMode(BY))});de.onLanguage("css",()=>{w3().then(o=>o.setupMode(WY))});const VY=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:WY,lessDefaults:HY,scssDefaults:BY},Symbol.toStringTag,{value:"Module"}));let uPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const gPe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},uD={format:gPe,suggest:{},data:{useDefaultDataProvider:!0}};function gD(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===bC,documentFormattingEdits:o===bC,documentRangeFormattingEdits:o===bC}}const bC="html",Q6="handlebars",J6="razor",zY=fD(bC,uD,gD(bC)),fPe=zY.defaults,UY=fD(Q6,uD,gD(Q6)),pPe=UY.defaults,$Y=fD(J6,uD,gD(J6)),mPe=$Y.defaults;function _Pe(){return we(()=>import("./htmlMode-Cyt5VoSI.js"),__vite__mapDeps([5,1,2,3,4]))}function fD(o,e=uD,t=gD(o)){const i=new uPe(o,e,t);let n;const s=de.onLanguage(o,async()=>{n=(await _Pe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const jY=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:pPe,handlebarLanguageService:UY,htmlDefaults:fPe,htmlLanguageService:zY,razorDefaults:mPe,razorLanguageService:$Y,registerHTMLLanguageService:fD},Symbol.toStringTag,{value:"Module"}));let bPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const CPe={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},vPe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},qY=new bPe("json",CPe,vPe),wPe=()=>KY().then(o=>o.getWorker());function KY(){return we(()=>import("./jsonMode-BhgzQeiy.js"),__vite__mapDeps([6,1,2,3,4]))}de.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});de.onLanguage("json",()=>{KY().then(o=>o.setupMode(qY))});const GY=Object.freeze(Object.defineProperty({__proto__:null,getWorker:wPe,jsonDefaults:qY},Symbol.toStringTag,{value:"Module"})),SPe="5.9.3";var ZY=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(ZY||{}),YY=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(YY||{}),XY=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(XY||{}),QY=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(QY||{}),JY=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JY||{});class eX{constructor(e,t,i,n,s){this._onDidChange=new Ph,this._onDidExtraLibsChange=new Ph,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const yPe=SPe,tX={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},iX=new eX({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),nX=new eX({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),xPe=()=>pD().then(o=>o.getTypeScriptWorker()),LPe=()=>pD().then(o=>o.getJavaScriptWorker());function pD(){return we(()=>import("./tsMode-COGDJ9qu.js"),__vite__mapDeps([7,2,3,4]))}de.onLanguage("typescript",()=>pD().then(o=>o.setupTypeScript(iX)));de.onLanguage("javascript",()=>pD().then(o=>o.setupJavaScript(nX)));const sX=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:YY,ModuleKind:ZY,ModuleResolutionKind:JY,NewLineKind:XY,ScriptTarget:QY,getJavaScriptWorker:LPe,getTypeScriptWorker:xPe,javascriptDefaults:nX,typescriptDefaults:iX,typescriptVersion:yPe},Symbol.toStringTag,{value:"Module"})),oX={},NE={};class S3{static getOrCreate(e){return NE[e]||(NE[e]=new S3(e)),NE[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,oX[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function ye(o){const e=o.id;oX[e]=o,de.register(o);const t=S3.getOrCreate(e);de.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),de.onLanguageEncountered(e,async()=>{const i=await t.load();de.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>we(()=>import("./abap-DLDM7-KI.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>we(()=>import("./apex-DNDY2TF8.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>we(()=>import("./azcli-Y6nb8tq_.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>we(()=>import("./bat-BwHxbl9M.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>we(()=>import("./bicep-CFznDFnq.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>we(()=>import("./cameligo-Bf6VGUru.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>we(()=>import("./clojure-Dnu-v4kV.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>we(()=>import("./coffee-Bd8akH9Z.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>we(()=>import("./csharp-Co3qMtFm.js"),[])});ye({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>we(()=>import("./csp-D-4FJmMZ.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>we(()=>import("./css-DdJfP1eB.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>we(()=>import("./cypher-cTPe9QuQ.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>we(()=>import("./dart-BOtBlQCF.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>we(()=>import("./dockerfile-BG73LgW2.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>we(()=>import("./ecl-BEgZUVRK.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>we(()=>import("./elixir-BkW5O-1t.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>we(()=>import("./flow9-BeJ5waoc.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>we(()=>import("./fsharp-PahG7c26.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>we(()=>import("./freemarker2-D03L5Rmf.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>we(()=>import("./freemarker2-D03L5Rmf.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>we(()=>import("./freemarker2-D03L5Rmf.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>we(()=>import("./freemarker2-D03L5Rmf.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>we(()=>import("./freemarker2-D03L5Rmf.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>we(()=>import("./freemarker2-D03L5Rmf.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>we(()=>import("./freemarker2-D03L5Rmf.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>we(()=>import("./go-acbASCJo.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>we(()=>import("./graphql-BxJiqAUM.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>we(()=>import("./handlebars-DTB7OcjB.js"),__vite__mapDeps([9,2,3,4]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>we(()=>import("./hcl-DtV1sZF8.js"),[])});ye({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>we(()=>import("./html-Bx3Ftaqh.js"),__vite__mapDeps([10,2,3,4]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>we(()=>import("./ini-Kd9XrMLS.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>we(()=>import("./java-CXBNlu9o.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>we(()=>import("./javascript-CcXtvgWG.js"),__vite__mapDeps([11,12,2,3,4]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>we(()=>import("./julia-cl7-CwDS.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>we(()=>import("./kotlin-s7OhZKlX.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>we(()=>import("./less-9HpZscsL.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>we(()=>import("./lexon-OrD6JF1K.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>we(()=>import("./lua-Cyyb5UIc.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>we(()=>import("./liquid-D7rm-Mjg.js"),__vite__mapDeps([13,2,3,4]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>we(()=>import("./m3-B8OfTtLu.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>we(()=>import("./markdown-BFxVWTOG.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>we(()=>import("./mdx-CvYmjfax.js"),__vite__mapDeps([14,2,3,4]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>we(()=>import("./mips-CiqrrVzr.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>we(()=>import("./msdax-DmeGPVcC.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>we(()=>import("./mysql-C_tMU-Nz.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>we(()=>import("./objective-c-BDtDVThU.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>we(()=>import("./pascal-vHIfCaH5.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>we(()=>import("./pascaligo-DtZ0uQbO.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>we(()=>import("./perl-Ub6l9XKa.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>we(()=>import("./pgsql-BlNEE0v7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>we(()=>import("./php-BBUBE1dy.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>we(()=>import("./pla-DSh2-awV.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>we(()=>import("./postiats-CocnycG-.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>we(()=>import("./powerquery-tScXyioY.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>we(()=>import("./powershell-COWaemsV.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>we(()=>import("./protobuf-Brw8urJB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>we(()=>import("./pug-8SOpv6rk.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>we(()=>import("./python-D5-SFkaZ.js"),__vite__mapDeps([15,2,3,4]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>we(()=>import("./qsharp-Bw9ernYp.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>we(()=>import("./r-j7ic8hl3.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>we(()=>import("./razor-C8sRtc2W.js"),__vite__mapDeps([16,2,3,4]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>we(()=>import("./redis-Bu5POkcn.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>we(()=>import("./redshift-Bs9aos_-.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>we(()=>import("./restructuredtext-CqXO7rUv.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>we(()=>import("./ruby-zBfavPgS.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>we(()=>import("./rust-BzKRNQWT.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>we(()=>import("./sb-BBc9UKZt.js"),[])});ye({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>we(()=>import("./scala-D9hQfWCl.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>we(()=>import("./scheme-BPhDTwHR.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>we(()=>import("./scss-CBJaRo0y.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>we(()=>import("./shell-DiJ1NA_G.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>we(()=>import("./solidity-Db0IVjzk.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>we(()=>import("./sophia-CnS9iZB_.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>we(()=>import("./sparql-CJmd_6j2.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>we(()=>import("./sql-ClhHkBeG.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>we(()=>import("./st-CHwy0fLd.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>we(()=>import("./swift-Bqt4WxQ4.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>we(()=>import("./tcl-Dm6ycUr_.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>we(()=>import("./twig-Csy3S7wG.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>we(()=>import("./typescript-0SwtrmOf.js"),__vite__mapDeps([12,2,3,4]))});ye({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>we(()=>import("./typespec-Btyra-wh.js"),[])});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>we(()=>import("./vb-Db0cS2oM.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>we(()=>import("./wgsl-DumH7NcR.js"),[])});ye({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\we(()=>import("./xml-Co1-HPio.js"),__vite__mapDeps([17,2,3,4]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>we(()=>import("./yaml-BNFZzxOc.js"),__vite__mapDeps([18,2,3,4]))});var kPe=Object.defineProperty,DPe=(o,e,t)=>e in o?kPe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ve=(o,e,t)=>DPe(o,typeof e!="symbol"?e+"":e,t),wS,eV,SS,TE,yS;function IPe(o){return o.method!==void 0}var tV;(function(o){function e(t){return t}o.create=e})(tV||(tV={}));var Kr;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(Kr||(Kr={}));var y3=class{constructor(){ve(this,"listeners",new Set),ve(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},EPe=class{constructor(o){ve(this,"_value"),ve(this,"eventEmitter"),this._value=o,this.eventEmitter=new y3}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function NPe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function RE(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var TPe=class{constructor(){ve(this,"_state","none"),ve(this,"promise"),ve(this,"resolve",()=>{}),ve(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},rX=(wS=class{constructor(){ve(this,"_unprocessedMessages",[]),ve(this,"_messageListener"),ve(this,"id",wS.id++),ve(this,"_state",new EPe({state:"open"})),ve(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new RPe(this,o??new MPe)}},ve(wS,"id",0),wS),RPe=class{constructor(o,e){ve(this,"baseStream"),ve(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},MPe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},PPe=class aX{constructor(e){ve(this,"connect"),this.connect=e}mapContext(e){return new aX(t=>this.connect(t?APe(t,e):void 0))}};function APe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var OPe=class lX{constructor(e,t,i){ve(this,"_stream"),ve(this,"_listener"),ve(this,"_logger"),ve(this,"_unprocessedResponses",new Map),ve(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{IPe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new PPe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new lX(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:Kr.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Kr.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},am;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(am||(am={}));const cX=Symbol("OptionalMethodNotFound");var dX=class{contextualize(o){return new FPe(this,o)}},FPe=class extends dX{constructor(o,e){super(),ve(this,"underylingTypedChannel"),ve(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},EA=class hX extends dX{constructor(e,t={}){super(),ve(this,"channelCtor"),ve(this,"_requestSender"),ve(this,"_handler",new Map),ve(this,"_unknownNotificationHandler",new Set),ve(this,"_timeout"),ve(this,"sendExceptionDetails",!1),ve(this,"_logger"),ve(this,"listeningDeferred",new TPe),ve(this,"onListening",this.listeningDeferred.promise),ve(this,"_requestDidErrorEventEmitter",new y3),ve(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=NPe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new hX(OPe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Kr.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Kr.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:Kr.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Kr.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nV?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Kr.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return RE(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return RE(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return RE(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);iV(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===Kr.methodNotFound)return cX;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nV(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:jc(t,a.open),close:jc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function L2e(o){mm.registerLanguage(o)}function k2e(){let o=[];return o=o.concat(mm.getLanguages()),o}function D2e(o){return Ne.get(_i).languageIdCodec.encodeLanguageId(o)}function I2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function E2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function N2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ne.get(ti).register(o,e,100)}class T2e{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return iw.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new JL(n.tokens,n.endState)}}class iw{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:g{const i=await Promise.resolve(e.create());return i?R2e(i)?TY(o,i):new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe)):null});return ui.registerFactory(o,t)}function A2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return NY(e)?_3(o,{create:()=>e}):ui.register(o,TY(o,e))}function O2e(o,e){const t=i=>new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe));return NY(e)?_3(o,{create:()=>e}):ui.register(o,t(e))}function F2e(o,e){return Ne.get(he).referenceProvider.register(o,e)}function W2e(o,e){return Ne.get(he).renameProvider.register(o,e)}function B2e(o,e){return Ne.get(he).newSymbolNamesProvider.register(o,e)}function H2e(o,e){return Ne.get(he).signatureHelpProvider.register(o,e)}function V2e(o,e){return Ne.get(he).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new L(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function z2e(o,e){return Ne.get(he).documentSymbolProvider.register(o,e)}function U2e(o,e){return Ne.get(he).documentHighlightProvider.register(o,e)}function $2e(o,e){return Ne.get(he).linkedEditingRangeProvider.register(o,e)}function j2e(o,e){return Ne.get(he).definitionProvider.register(o,e)}function q2e(o,e){return Ne.get(he).implementationProvider.register(o,e)}function K2e(o,e){return Ne.get(he).typeDefinitionProvider.register(o,e)}function G2e(o,e){return Ne.get(he).codeLensProvider.register(o,e)}function Z2e(o,e,t){return Ne.get(he).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const c=Ne.get($l).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function Y2e(o,e){return Ne.get(he).documentFormattingEditProvider.register(o,e)}function X2e(o,e){return Ne.get(he).documentRangeFormattingEditProvider.register(o,e)}function Q2e(o,e){return Ne.get(he).onTypeFormattingEditProvider.register(o,e)}function J2e(o,e){return Ne.get(he).linkProvider.register(o,e)}function ePe(o,e){return Ne.get(he).completionProvider.register(o,e)}function tPe(o,e){return Ne.get(he).colorProvider.register(o,e)}function iPe(o,e){return Ne.get(he).foldingRangeProvider.register(o,e)}function nPe(o,e){return Ne.get(he).declarationProvider.register(o,e)}function sPe(o,e){return Ne.get(he).selectionRangeProvider.register(o,e)}function oPe(o,e){return Ne.get(he).documentSemanticTokensProvider.register(o,e)}function rPe(o,e){return Ne.get(he).documentRangeSemanticTokensProvider.register(o,e)}function aPe(o,e){return Ne.get(he).inlineCompletionsProvider.register(o,e)}function lPe(o,e){return Ne.get(he).inlayHintsProvider.register(o,e)}function cPe(){return{register:L2e,getLanguages:k2e,onLanguage:I2e,onLanguageEncountered:E2e,getEncodedLanguageId:D2e,setLanguageConfiguration:N2e,setColorMap:P2e,registerTokensProviderFactory:_3,setTokensProvider:A2e,setMonarchTokensProvider:O2e,registerReferenceProvider:F2e,registerRenameProvider:W2e,registerNewSymbolNameProvider:B2e,registerCompletionItemProvider:ePe,registerSignatureHelpProvider:H2e,registerHoverProvider:V2e,registerDocumentSymbolProvider:z2e,registerDocumentHighlightProvider:U2e,registerLinkedEditingRangeProvider:$2e,registerDefinitionProvider:j2e,registerImplementationProvider:q2e,registerTypeDefinitionProvider:K2e,registerCodeLensProvider:G2e,registerCodeActionProvider:Z2e,registerDocumentFormattingEditProvider:Y2e,registerDocumentRangeFormattingEditProvider:X2e,registerOnTypeFormattingEditProvider:Q2e,registerLinkProvider:J2e,registerColorProvider:tPe,registerFoldingRangeProvider:iPe,registerDeclarationProvider:nPe,registerSelectionRangeProvider:sPe,registerDocumentSemanticTokensProvider:oPe,registerDocumentRangeSemanticTokensProvider:rPe,registerInlineCompletionsProvider:aPe,registerInlayHintsProvider:lPe,DocumentHighlightKind:j2,CompletionItemKind:B2,CompletionItemTag:H2,CompletionItemInsertTextRule:W2,SymbolKind:yP,SymbolTag:xP,IndentAction:Q2,CompletionTriggerKind:V2,SignatureHelpTriggerKind:SP,InlayHintKind:eP,InlineCompletionTriggerKind:nP,CodeActionTriggerType:F2,NewSymbolNameTag:dP,NewSymbolNameTriggerKind:hP,PartialAcceptTriggerKind:fP,HoverVerbosityAction:X2,InlineCompletionEndOfLifeReasonKind:tP,InlineCompletionHintStyle:iP,FoldingRangeKind:df,SelectedSuggestionInfo:c$,EditDeltaInfo:ov}}rs.wrappingIndent.defaultValue=0;rs.glyphMargin.defaultValue=!1;rs.autoIndent.defaultValue=3;rs.overviewRulerLanes.defaultValue=2;Vm.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const As=sY();As.editor=C2e();As.languages=cPe();const RY=As.CancellationTokenSource,Ph=As.Emitter,MY=As.KeyCode,PY=As.KeyMod,_d=As.Position,x_=As.Range,AY=As.Selection,OY=As.SelectionDirection,Zr=As.MarkerSeverity,nL=As.MarkerTag,hD=As.Uri,FY=As.Token,Dl=As.editor,de=As.languages,dPe=FA(),rm=globalThis;(dPe?.globalAPI||typeof rm.define=="function"&&rm.define.amd)&&(rm.monaco=As);typeof rm.require<"u"&&typeof rm.require.config=="function"&&rm.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const hPe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:RY,Emitter:Ph,KeyCode:MY,KeyMod:PY,MarkerSeverity:Zr,MarkerTag:nL,Position:_d,Range:x_,Selection:AY,SelectionDirection:OY,Token:FY,Uri:hD,editor:Dl,languages:de},Symbol.toStringTag,{value:"Module"}));let b3=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const C3={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},v3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},WY=new b3("css",C3,v3),BY=new b3("scss",C3,v3),HY=new b3("less",C3,v3);function w3(){return we(()=>import("./cssMode-BYOYZWAb.js"),__vite__mapDeps([0,1,2,3,4]))}de.onLanguage("less",()=>{w3().then(o=>o.setupMode(HY))});de.onLanguage("scss",()=>{w3().then(o=>o.setupMode(BY))});de.onLanguage("css",()=>{w3().then(o=>o.setupMode(WY))});const VY=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:WY,lessDefaults:HY,scssDefaults:BY},Symbol.toStringTag,{value:"Module"}));let uPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const gPe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},uD={format:gPe,suggest:{},data:{useDefaultDataProvider:!0}};function gD(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===bC,documentFormattingEdits:o===bC,documentRangeFormattingEdits:o===bC}}const bC="html",Q6="handlebars",J6="razor",zY=fD(bC,uD,gD(bC)),fPe=zY.defaults,UY=fD(Q6,uD,gD(Q6)),pPe=UY.defaults,$Y=fD(J6,uD,gD(J6)),mPe=$Y.defaults;function _Pe(){return we(()=>import("./htmlMode-BtW7hgTd.js"),__vite__mapDeps([5,1,2,3,4]))}function fD(o,e=uD,t=gD(o)){const i=new uPe(o,e,t);let n;const s=de.onLanguage(o,async()=>{n=(await _Pe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const jY=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:pPe,handlebarLanguageService:UY,htmlDefaults:fPe,htmlLanguageService:zY,razorDefaults:mPe,razorLanguageService:$Y,registerHTMLLanguageService:fD},Symbol.toStringTag,{value:"Module"}));let bPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const CPe={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},vPe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},qY=new bPe("json",CPe,vPe),wPe=()=>KY().then(o=>o.getWorker());function KY(){return we(()=>import("./jsonMode-B4lkE7Oy.js"),__vite__mapDeps([6,1,2,3,4]))}de.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});de.onLanguage("json",()=>{KY().then(o=>o.setupMode(qY))});const GY=Object.freeze(Object.defineProperty({__proto__:null,getWorker:wPe,jsonDefaults:qY},Symbol.toStringTag,{value:"Module"})),SPe="5.9.3";var ZY=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(ZY||{}),YY=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(YY||{}),XY=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(XY||{}),QY=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(QY||{}),JY=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JY||{});class eX{constructor(e,t,i,n,s){this._onDidChange=new Ph,this._onDidExtraLibsChange=new Ph,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const yPe=SPe,tX={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},iX=new eX({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),nX=new eX({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),xPe=()=>pD().then(o=>o.getTypeScriptWorker()),LPe=()=>pD().then(o=>o.getJavaScriptWorker());function pD(){return we(()=>import("./tsMode-BZYSYhKr.js"),__vite__mapDeps([7,2,3,4]))}de.onLanguage("typescript",()=>pD().then(o=>o.setupTypeScript(iX)));de.onLanguage("javascript",()=>pD().then(o=>o.setupJavaScript(nX)));const sX=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:YY,ModuleKind:ZY,ModuleResolutionKind:JY,NewLineKind:XY,ScriptTarget:QY,getJavaScriptWorker:LPe,getTypeScriptWorker:xPe,javascriptDefaults:nX,typescriptDefaults:iX,typescriptVersion:yPe},Symbol.toStringTag,{value:"Module"})),oX={},NE={};class S3{static getOrCreate(e){return NE[e]||(NE[e]=new S3(e)),NE[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,oX[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function ye(o){const e=o.id;oX[e]=o,de.register(o);const t=S3.getOrCreate(e);de.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),de.onLanguageEncountered(e,async()=>{const i=await t.load();de.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>we(()=>import("./abap-DLDM7-KI.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>we(()=>import("./apex-DNDY2TF8.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>we(()=>import("./azcli-Y6nb8tq_.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>we(()=>import("./bat-BwHxbl9M.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>we(()=>import("./bicep-CFznDFnq.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>we(()=>import("./cameligo-Bf6VGUru.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>we(()=>import("./clojure-Dnu-v4kV.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>we(()=>import("./coffee-Bd8akH9Z.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>we(()=>import("./csharp-Co3qMtFm.js"),[])});ye({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>we(()=>import("./csp-D-4FJmMZ.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>we(()=>import("./css-DdJfP1eB.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>we(()=>import("./cypher-cTPe9QuQ.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>we(()=>import("./dart-BOtBlQCF.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>we(()=>import("./dockerfile-BG73LgW2.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>we(()=>import("./ecl-BEgZUVRK.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>we(()=>import("./elixir-BkW5O-1t.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>we(()=>import("./flow9-BeJ5waoc.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>we(()=>import("./fsharp-PahG7c26.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>we(()=>import("./go-acbASCJo.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>we(()=>import("./graphql-BxJiqAUM.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>we(()=>import("./handlebars-vt5-G9kY.js"),__vite__mapDeps([9,2,3,4]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>we(()=>import("./hcl-DtV1sZF8.js"),[])});ye({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>we(()=>import("./html-BwCzbm6J.js"),__vite__mapDeps([10,2,3,4]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>we(()=>import("./ini-Kd9XrMLS.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>we(()=>import("./java-CXBNlu9o.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>we(()=>import("./javascript-C1Bl1QAn.js"),__vite__mapDeps([11,12,2,3,4]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>we(()=>import("./julia-cl7-CwDS.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>we(()=>import("./kotlin-s7OhZKlX.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>we(()=>import("./less-9HpZscsL.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>we(()=>import("./lexon-OrD6JF1K.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>we(()=>import("./lua-Cyyb5UIc.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>we(()=>import("./liquid-OhilcA0U.js"),__vite__mapDeps([13,2,3,4]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>we(()=>import("./m3-B8OfTtLu.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>we(()=>import("./markdown-BFxVWTOG.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>we(()=>import("./mdx-BNW26XnD.js"),__vite__mapDeps([14,2,3,4]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>we(()=>import("./mips-CiqrrVzr.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>we(()=>import("./msdax-DmeGPVcC.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>we(()=>import("./mysql-C_tMU-Nz.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>we(()=>import("./objective-c-BDtDVThU.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>we(()=>import("./pascal-vHIfCaH5.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>we(()=>import("./pascaligo-DtZ0uQbO.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>we(()=>import("./perl-Ub6l9XKa.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>we(()=>import("./pgsql-BlNEE0v7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>we(()=>import("./php-BBUBE1dy.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>we(()=>import("./pla-DSh2-awV.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>we(()=>import("./postiats-CocnycG-.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>we(()=>import("./powerquery-tScXyioY.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>we(()=>import("./powershell-COWaemsV.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>we(()=>import("./protobuf-Brw8urJB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>we(()=>import("./pug-8SOpv6rk.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>we(()=>import("./python-BeBGma8p.js"),__vite__mapDeps([15,2,3,4]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>we(()=>import("./qsharp-Bw9ernYp.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>we(()=>import("./r-j7ic8hl3.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>we(()=>import("./razor-L05JTUrE.js"),__vite__mapDeps([16,2,3,4]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>we(()=>import("./redis-Bu5POkcn.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>we(()=>import("./redshift-Bs9aos_-.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>we(()=>import("./restructuredtext-CqXO7rUv.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>we(()=>import("./ruby-zBfavPgS.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>we(()=>import("./rust-BzKRNQWT.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>we(()=>import("./sb-BBc9UKZt.js"),[])});ye({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>we(()=>import("./scala-D9hQfWCl.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>we(()=>import("./scheme-BPhDTwHR.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>we(()=>import("./scss-CBJaRo0y.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>we(()=>import("./shell-DiJ1NA_G.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>we(()=>import("./solidity-Db0IVjzk.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>we(()=>import("./sophia-CnS9iZB_.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>we(()=>import("./sparql-CJmd_6j2.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>we(()=>import("./sql-ClhHkBeG.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>we(()=>import("./st-CHwy0fLd.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>we(()=>import("./swift-Bqt4WxQ4.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>we(()=>import("./tcl-Dm6ycUr_.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>we(()=>import("./twig-Csy3S7wG.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>we(()=>import("./typescript-DeFWR0Bj.js"),__vite__mapDeps([12,2,3,4]))});ye({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>we(()=>import("./typespec-Btyra-wh.js"),[])});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>we(()=>import("./vb-Db0cS2oM.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>we(()=>import("./wgsl-DumH7NcR.js"),[])});ye({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\we(()=>import("./xml-BDPhTprf.js"),__vite__mapDeps([17,2,3,4]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>we(()=>import("./yaml-B6mJwErH.js"),__vite__mapDeps([18,2,3,4]))});var kPe=Object.defineProperty,DPe=(o,e,t)=>e in o?kPe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ve=(o,e,t)=>DPe(o,typeof e!="symbol"?e+"":e,t),wS,eV,SS,TE,yS;function IPe(o){return o.method!==void 0}var tV;(function(o){function e(t){return t}o.create=e})(tV||(tV={}));var Kr;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(Kr||(Kr={}));var y3=class{constructor(){ve(this,"listeners",new Set),ve(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},EPe=class{constructor(o){ve(this,"_value"),ve(this,"eventEmitter"),this._value=o,this.eventEmitter=new y3}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function NPe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function RE(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var TPe=class{constructor(){ve(this,"_state","none"),ve(this,"promise"),ve(this,"resolve",()=>{}),ve(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},rX=(wS=class{constructor(){ve(this,"_unprocessedMessages",[]),ve(this,"_messageListener"),ve(this,"id",wS.id++),ve(this,"_state",new EPe({state:"open"})),ve(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new RPe(this,o??new MPe)}},ve(wS,"id",0),wS),RPe=class{constructor(o,e){ve(this,"baseStream"),ve(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},MPe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},PPe=class aX{constructor(e){ve(this,"connect"),this.connect=e}mapContext(e){return new aX(t=>this.connect(t?APe(t,e):void 0))}};function APe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var OPe=class lX{constructor(e,t,i){ve(this,"_stream"),ve(this,"_listener"),ve(this,"_logger"),ve(this,"_unprocessedResponses",new Map),ve(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{IPe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new PPe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new lX(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:Kr.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Kr.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},am;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(am||(am={}));const cX=Symbol("OptionalMethodNotFound");var dX=class{contextualize(o){return new FPe(this,o)}},FPe=class extends dX{constructor(o,e){super(),ve(this,"underylingTypedChannel"),ve(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},EA=class hX extends dX{constructor(e,t={}){super(),ve(this,"channelCtor"),ve(this,"_requestSender"),ve(this,"_handler",new Map),ve(this,"_unknownNotificationHandler",new Set),ve(this,"_timeout"),ve(this,"sendExceptionDetails",!1),ve(this,"_logger"),ve(this,"listeningDeferred",new TPe),ve(this,"onListening",this.listeningDeferred.promise),ve(this,"_requestDidErrorEventEmitter",new y3),ve(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=NPe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new hX(OPe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Kr.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Kr.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:Kr.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Kr.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nV?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Kr.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return RE(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return RE(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return RE(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);iV(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===Kr.methodNotFound)return cX;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nV(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+` ${JSON.stringify(s,null,2)}`);return r.value}}async notify(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error;const n=e.paramsSerializer.serializeToJson(t);iV(n),this._requestSender.sendNotification({method:e.method,params:n},i)}};function iV(o){if(o!==null&&Array.isArray(o)&&typeof o!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var nV=class uX extends Error{constructor(e,t,i=Kr.genericApplicationError){super(e),ve(this,"data"),ve(this,"code"),this.data=t,this.code=i,Object.setPrototypeOf(this,uX.prototype)}},WPe=class NA{constructor(e,t,i,n,s=!1){ve(this,"method"),ve(this,"paramsSerializer"),ve(this,"resultSerializer"),ve(this,"errorSerializer"),ve(this,"isOptional"),ve(this,"kind","request"),this.method=e,this.paramsSerializer=t,this.resultSerializer=i,this.errorSerializer=n,this.isOptional=s}withMethod(e){return new NA(e,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new NA(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},BPe=class gX{constructor(e,t){ve(this,"method"),ve(this,"paramsSerializer"),ve(this,"kind","notification"),this.method=e,this.paramsSerializer=t}withMethod(e){return new gX(e,this.paramsSerializer)}};function Oe(o){return new WPe((o||{}).method,am.sAny(),am.sAny(),am.sAny())}function yi(o){return new BPe((o||{}).method,am.sAny())}const HPe=Symbol();var sV=(eV=HPe,SS=class{constructor(o){ve(this,"error"),ve(this,eV),this.error=o}},ve(SS,"factory",o=>new SS(o)),SS);function VPe(o){const e=oV(o.server),t=oV(o.client);return new zPe(o.tags||[],e,t)}function oV(o){const e={};for(const[t,i]of Object.entries(o)){const n=i.method?i.method:t;e[t]=i.withMethod(n)}return e}var zPe=class fX{constructor(e=[],t,i){ve(this,"tags"),ve(this,"server"),ve(this,"client"),this.tags=e,this.server=t,this.client=i}_onlyDesignTime(){return new Error("This property is not meant to be accessed at runtime")}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,i,n){const s=this.buildCounterpart(e,i),r=this.registerHandlers(e,t,n,s);return{counterpart:s,dispose:()=>r.dispose()}}buildCounterpart(e,t){const i={};for(const[n,s]of Object.entries(t)){let r;s.kind==="request"?s.isOptional?r=async(a,l)=>{a===void 0&&(a={});try{return await e.request(s,a,l)}catch(c){if(c&&c.code===Kr.methodNotFound)return cX;throw c}}:r=(a,l)=>(a===void 0&&(a={}),e.request(s,a,l)):r=(a,l)=>(a===void 0&&(a={}),e.notify(s,a,l)),i[n]=r}return i}registerHandlers(e,t,i,n){const s=[];for(const[r,a]of Object.entries(t))if(a.kind==="request"){let l=i[r];if(!l)continue;const c=this.createRequestHandler(n,l);s.push(e.registerRequestHandler(a,c))}else{const l=i[r];l&&s.push(e.registerNotificationHandler(a,(c,d)=>{l(c,{context:d,counterpart:n})}))}return{dispose:()=>s.forEach(r=>r.dispose())}}createRequestHandler(e,t){return async(i,n,s)=>{const r=await t(i,{context:s,counterpart:e,newErr:sV.factory,requestId:n});return r instanceof sV?r.error:{ok:r}}}static getServerFromStream(e,t,i,n){const s=EA.fromTransport(t,i),{server:r}=e.getServer(s,n);return s.startListen(),{channel:s,server:r}}static registerServerToStream(e,t,i,n){const s=EA.fromTransport(t,i),{client:r}=e.registerServer(s,n);return s.startListen(),{channel:s,client:r}}getServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.client,this.server,t);return{server:i,dispose:n}}registerServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.server,this.client,t);return{client:i,dispose:n}}withContext(){return new fX(this.tags,this.server,this.client)}};let lm=(function(o){return o.Comment="comment",o.Imports="imports",o.Region="region",o})({}),Pi=(function(o){return o[o.File=1]="File",o[o.Module=2]="Module",o[o.Namespace=3]="Namespace",o[o.Package=4]="Package",o[o.Class=5]="Class",o[o.Method=6]="Method",o[o.Property=7]="Property",o[o.Field=8]="Field",o[o.Constructor=9]="Constructor",o[o.Enum=10]="Enum",o[o.Interface=11]="Interface",o[o.Function=12]="Function",o[o.Variable=13]="Variable",o[o.Constant=14]="Constant",o[o.String=15]="String",o[o.Number=16]="Number",o[o.Boolean=17]="Boolean",o[o.Array=18]="Array",o[o.Object=19]="Object",o[o.Key=20]="Key",o[o.Null=21]="Null",o[o.EnumMember=22]="EnumMember",o[o.Struct=23]="Struct",o[o.Event=24]="Event",o[o.Operator=25]="Operator",o[o.TypeParameter=26]="TypeParameter",o})({}),pX=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),rV=(function(o){return o[o.Type=1]="Type",o[o.Parameter=2]="Parameter",o})({}),UPe=(function(o){return o[o.None=0]="None",o[o.Full=1]="Full",o[o.Incremental=2]="Incremental",o})({}),Bi=(function(o){return o[o.Text=1]="Text",o[o.Method=2]="Method",o[o.Function=3]="Function",o[o.Constructor=4]="Constructor",o[o.Field=5]="Field",o[o.Variable=6]="Variable",o[o.Class=7]="Class",o[o.Interface=8]="Interface",o[o.Module=9]="Module",o[o.Property=10]="Property",o[o.Unit=11]="Unit",o[o.Value=12]="Value",o[o.Enum=13]="Enum",o[o.Keyword=14]="Keyword",o[o.Snippet=15]="Snippet",o[o.Color=16]="Color",o[o.File=17]="File",o[o.Reference=18]="Reference",o[o.Folder=19]="Folder",o[o.EnumMember=20]="EnumMember",o[o.Constant=21]="Constant",o[o.Struct=22]="Struct",o[o.Event=23]="Event",o[o.Operator=24]="Operator",o[o.TypeParameter=25]="TypeParameter",o})({}),$Pe=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),jPe=(function(o){return o[o.PlainText=1]="PlainText",o[o.Snippet=2]="Snippet",o})({}),ME=(function(o){return o[o.Text=1]="Text",o[o.Read=2]="Read",o[o.Write=3]="Write",o})({}),sc=(function(o){return o.Empty="",o.QuickFix="quickfix",o.Refactor="refactor",o.RefactorExtract="refactor.extract",o.RefactorInline="refactor.inline",o.RefactorRewrite="refactor.rewrite",o.Source="source",o.SourceOrganizeImports="source.organizeImports",o.SourceFixAll="source.fixAll",o})({}),sL=(function(o){return o.PlainText="plaintext",o.Markdown="markdown",o})({}),Pc=(function(o){return o[o.Error=1]="Error",o[o.Warning=2]="Warning",o[o.Information=3]="Information",o[o.Hint=4]="Hint",o})({}),aV=(function(o){return o[o.Unnecessary=1]="Unnecessary",o[o.Deprecated=2]="Deprecated",o})({}),h0=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",o})({}),u0=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange",o})({}),TA=(function(o){return o[o.Invoked=1]="Invoked",o[o.Automatic=2]="Automatic",o})({}),qPe=(function(o){return o.Relative="relative",o})({});var rt=class{constructor(o){this.method=o}};const qe={textDocumentImplementation:new rt("textDocument/implementation"),textDocumentTypeDefinition:new rt("textDocument/typeDefinition"),textDocumentDocumentColor:new rt("textDocument/documentColor"),textDocumentColorPresentation:new rt("textDocument/colorPresentation"),textDocumentFoldingRange:new rt("textDocument/foldingRange"),textDocumentDeclaration:new rt("textDocument/declaration"),textDocumentSelectionRange:new rt("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new rt("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new rt("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new rt("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new rt("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new rt("workspace/willCreateFiles"),workspaceWillRenameFiles:new rt("workspace/willRenameFiles"),workspaceWillDeleteFiles:new rt("workspace/willDeleteFiles"),textDocumentMoniker:new rt("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new rt("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new rt("textDocument/inlineValue"),textDocumentInlayHint:new rt("textDocument/inlayHint"),textDocumentDiagnostic:new rt("textDocument/diagnostic"),textDocumentInlineCompletion:new rt("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new rt("textDocument/willSaveWaitUntil"),textDocumentCompletion:new rt("textDocument/completion"),textDocumentHover:new rt("textDocument/hover"),textDocumentSignatureHelp:new rt("textDocument/signatureHelp"),textDocumentDefinition:new rt("textDocument/definition"),textDocumentReferences:new rt("textDocument/references"),textDocumentDocumentHighlight:new rt("textDocument/documentHighlight"),textDocumentDocumentSymbol:new rt("textDocument/documentSymbol"),textDocumentCodeAction:new rt("textDocument/codeAction"),workspaceSymbol:new rt("workspace/symbol"),textDocumentCodeLens:new rt("textDocument/codeLens"),textDocumentDocumentLink:new rt("textDocument/documentLink"),textDocumentFormatting:new rt("textDocument/formatting"),textDocumentRangeFormatting:new rt("textDocument/rangeFormatting"),textDocumentRangesFormatting:new rt("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new rt("textDocument/onTypeFormatting"),textDocumentRename:new rt("textDocument/rename"),workspaceExecuteCommand:new rt("workspace/executeCommand"),workspaceDidCreateFiles:new rt("workspace/didCreateFiles"),workspaceDidRenameFiles:new rt("workspace/didRenameFiles"),workspaceDidDeleteFiles:new rt("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new rt("workspace/didChangeConfiguration"),textDocumentDidOpen:new rt("textDocument/didOpen"),textDocumentDidChange:new rt("textDocument/didChange"),textDocumentDidClose:new rt("textDocument/didClose"),textDocumentDidSave:new rt("textDocument/didSave"),textDocumentWillSave:new rt("textDocument/willSave"),workspaceDidChangeWatchedFiles:new rt("workspace/didChangeWatchedFiles")},nw=VPe({server:{textDocumentImplementation:Oe({method:"textDocument/implementation"}),textDocumentTypeDefinition:Oe({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:Oe({method:"textDocument/documentColor"}),textDocumentColorPresentation:Oe({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:Oe({method:"textDocument/foldingRange"}),textDocumentDeclaration:Oe({method:"textDocument/declaration"}),textDocumentSelectionRange:Oe({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:Oe({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:Oe({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:Oe({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:Oe({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:Oe({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:Oe({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:Oe({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:Oe({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:Oe({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:Oe({method:"workspace/willDeleteFiles"}),textDocumentMoniker:Oe({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:Oe({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:Oe({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:Oe({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:Oe({method:"textDocument/inlineValue"}),textDocumentInlayHint:Oe({method:"textDocument/inlayHint"}),inlayHintResolve:Oe({method:"inlayHint/resolve"}),textDocumentDiagnostic:Oe({method:"textDocument/diagnostic"}),workspaceDiagnostic:Oe({method:"workspace/diagnostic"}),textDocumentInlineCompletion:Oe({method:"textDocument/inlineCompletion"}),initialize:Oe({method:"initialize"}),shutdown:Oe({method:"shutdown"}),textDocumentWillSaveWaitUntil:Oe({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:Oe({method:"textDocument/completion"}),completionItemResolve:Oe({method:"completionItem/resolve"}),textDocumentHover:Oe({method:"textDocument/hover"}),textDocumentSignatureHelp:Oe({method:"textDocument/signatureHelp"}),textDocumentDefinition:Oe({method:"textDocument/definition"}),textDocumentReferences:Oe({method:"textDocument/references"}),textDocumentDocumentHighlight:Oe({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:Oe({method:"textDocument/documentSymbol"}),textDocumentCodeAction:Oe({method:"textDocument/codeAction"}),codeActionResolve:Oe({method:"codeAction/resolve"}),workspaceSymbol:Oe({method:"workspace/symbol"}),workspaceSymbolResolve:Oe({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:Oe({method:"textDocument/codeLens"}),codeLensResolve:Oe({method:"codeLens/resolve"}),textDocumentDocumentLink:Oe({method:"textDocument/documentLink"}),documentLinkResolve:Oe({method:"documentLink/resolve"}),textDocumentFormatting:Oe({method:"textDocument/formatting"}),textDocumentRangeFormatting:Oe({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:Oe({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:Oe({method:"textDocument/onTypeFormatting"}),textDocumentRename:Oe({method:"textDocument/rename"}),textDocumentPrepareRename:Oe({method:"textDocument/prepareRename"}),workspaceExecuteCommand:Oe({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:yi({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:yi({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:yi({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:yi({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:yi({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:yi({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:yi({method:"notebookDocument/didChange"}),notebookDocumentDidSave:yi({method:"notebookDocument/didSave"}),notebookDocumentDidClose:yi({method:"notebookDocument/didClose"}),initialized:yi({method:"initialized"}),exit:yi({method:"exit"}),workspaceDidChangeConfiguration:yi({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:yi({method:"textDocument/didOpen"}),textDocumentDidChange:yi({method:"textDocument/didChange"}),textDocumentDidClose:yi({method:"textDocument/didClose"}),textDocumentDidSave:yi({method:"textDocument/didSave"}),textDocumentWillSave:yi({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:yi({method:"workspace/didChangeWatchedFiles"}),setTrace:yi({method:"$/setTrace"}),cancelRequest:yi({method:"$/cancelRequest"}),progress:yi({method:"$/progress"})},client:{workspaceWorkspaceFolders:Oe({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:Oe({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:Oe({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:Oe({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:Oe({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:Oe({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:Oe({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:Oe({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:Oe({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:Oe({method:"client/registerCapability"}).optional(),clientUnregisterCapability:Oe({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:Oe({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:Oe({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:Oe({method:"workspace/applyEdit"}).optional(),windowShowMessage:yi({method:"window/showMessage"}),windowLogMessage:yi({method:"window/logMessage"}),telemetryEvent:yi({method:"telemetry/event"}),textDocumentPublishDiagnostics:yi({method:"textDocument/publishDiagnostics"}),logTrace:yi({method:"$/logTrace"}),cancelRequest:yi({method:"$/cancelRequest"}),progress:yi({method:"$/progress"})}});function Cg(o,e){if(o.textModel!==e)throw new Error(`Expected text model to be ${e}, but got ${o.textModel}`);return o}var Wi=(TE=class{constructor(){ve(this,"_store",new x3)}dispose(){this._store.dispose()}_register(o){if(o===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(o)}},ve(TE,"None",Object.freeze({dispose(){}})),TE),x3=(yS=class{constructor(){ve(this,"_toDispose",new Set),ve(this,"_isDisposed",!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const o of this._toDispose)o.dispose()}finally{this._toDispose.clear()}}add(o){if(!o)return o;if(o===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?yS.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(o),o}},ve(yS,"DISABLE_DISPOSED_WARNING",!1),yS);const mX=new Map([[sc.Empty,""],[sc.QuickFix,"quickfix"],[sc.Refactor,"refactor"],[sc.RefactorExtract,"refactor.extract"],[sc.RefactorInline,"refactor.inline"],[sc.RefactorRewrite,"refactor.rewrite"],[sc.Source,"source"],[sc.SourceOrganizeImports,"source.organizeImports"],[sc.SourceFixAll,"source.fixAll"]]);function KPe(o){if(o)return mX.get(o)??o}const GPe=new Map([[de.CodeActionTriggerType.Invoke,TA.Invoked],[de.CodeActionTriggerType.Auto,TA.Automatic]]);function ZPe(o){return GPe.get(o)??TA.Invoked}const _X=new Map([[Bi.Text,de.CompletionItemKind.Text],[Bi.Method,de.CompletionItemKind.Method],[Bi.Function,de.CompletionItemKind.Function],[Bi.Constructor,de.CompletionItemKind.Constructor],[Bi.Field,de.CompletionItemKind.Field],[Bi.Variable,de.CompletionItemKind.Variable],[Bi.Class,de.CompletionItemKind.Class],[Bi.Interface,de.CompletionItemKind.Interface],[Bi.Module,de.CompletionItemKind.Module],[Bi.Property,de.CompletionItemKind.Property],[Bi.Unit,de.CompletionItemKind.Unit],[Bi.Value,de.CompletionItemKind.Value],[Bi.Enum,de.CompletionItemKind.Enum],[Bi.Keyword,de.CompletionItemKind.Keyword],[Bi.Snippet,de.CompletionItemKind.Snippet],[Bi.Color,de.CompletionItemKind.Color],[Bi.File,de.CompletionItemKind.File],[Bi.Reference,de.CompletionItemKind.Reference],[Bi.Folder,de.CompletionItemKind.Folder],[Bi.EnumMember,de.CompletionItemKind.EnumMember],[Bi.Constant,de.CompletionItemKind.Constant],[Bi.Struct,de.CompletionItemKind.Struct],[Bi.Event,de.CompletionItemKind.Event],[Bi.Operator,de.CompletionItemKind.Operator],[Bi.TypeParameter,de.CompletionItemKind.TypeParameter]]);function YPe(o){return o?_X.get(o)??de.CompletionItemKind.Text:de.CompletionItemKind.Text}const bX=new Map([[$Pe.Deprecated,de.CompletionItemTag.Deprecated]]);function XPe(o){return bX.get(o)}const QPe=new Map([[de.CompletionTriggerKind.Invoke,h0.Invoked],[de.CompletionTriggerKind.TriggerCharacter,h0.TriggerCharacter],[de.CompletionTriggerKind.TriggerForIncompleteCompletions,h0.TriggerForIncompleteCompletions]]);function JPe(o){return QPe.get(o)??h0.Invoked}const eAe=new Map([[jPe.Snippet,de.CompletionItemInsertTextRule.InsertAsSnippet]]);function tAe(o){if(o)return eAe.get(o)}const CX=new Map([[Pi.File,de.SymbolKind.File],[Pi.Module,de.SymbolKind.Module],[Pi.Namespace,de.SymbolKind.Namespace],[Pi.Package,de.SymbolKind.Package],[Pi.Class,de.SymbolKind.Class],[Pi.Method,de.SymbolKind.Method],[Pi.Property,de.SymbolKind.Property],[Pi.Field,de.SymbolKind.Field],[Pi.Constructor,de.SymbolKind.Constructor],[Pi.Enum,de.SymbolKind.Enum],[Pi.Interface,de.SymbolKind.Interface],[Pi.Function,de.SymbolKind.Function],[Pi.Variable,de.SymbolKind.Variable],[Pi.Constant,de.SymbolKind.Constant],[Pi.String,de.SymbolKind.String],[Pi.Number,de.SymbolKind.Number],[Pi.Boolean,de.SymbolKind.Boolean],[Pi.Array,de.SymbolKind.Array],[Pi.Object,de.SymbolKind.Object],[Pi.Key,de.SymbolKind.Key],[Pi.Null,de.SymbolKind.Null],[Pi.EnumMember,de.SymbolKind.EnumMember],[Pi.Struct,de.SymbolKind.Struct],[Pi.Event,de.SymbolKind.Event],[Pi.Operator,de.SymbolKind.Operator],[Pi.TypeParameter,de.SymbolKind.TypeParameter]]);function vX(o){return CX.get(o)??de.SymbolKind.File}const iAe=new Map([[pX.Deprecated,de.SymbolTag.Deprecated]]);function wX(o){return iAe.get(o)}const nAe=new Map([[ME.Text,de.DocumentHighlightKind.Text],[ME.Read,de.DocumentHighlightKind.Read],[ME.Write,de.DocumentHighlightKind.Write]]);function sAe(o){return o?nAe.get(o)??de.DocumentHighlightKind.Text:de.DocumentHighlightKind.Text}const oAe=new Map([[lm.Comment,de.FoldingRangeKind.Comment],[lm.Imports,de.FoldingRangeKind.Imports],[lm.Region,de.FoldingRangeKind.Region]]);function rAe(o){if(o)return oAe.get(o)}const aAe=new Map([[Zr.Error,Pc.Error],[Zr.Warning,Pc.Warning],[Zr.Info,Pc.Information],[Zr.Hint,Pc.Hint]]);function lAe(o){return aAe.get(o)??Pc.Error}const cAe=new Map([[Pc.Error,Zr.Error],[Pc.Warning,Zr.Warning],[Pc.Information,Zr.Info],[Pc.Hint,Zr.Hint]]);function dAe(o){return o?cAe.get(o)??Zr.Error:Zr.Error}const SX=new Map([[aV.Unnecessary,nL.Unnecessary],[aV.Deprecated,nL.Deprecated]]);function hAe(o){return SX.get(o)}const uAe=new Map([[de.SignatureHelpTriggerKind.Invoke,u0.Invoked],[de.SignatureHelpTriggerKind.TriggerCharacter,u0.TriggerCharacter],[de.SignatureHelpTriggerKind.ContentChange,u0.ContentChange]]);function gAe(o){return uAe.get(o)??u0.Invoked}function cm(o){if(o)return{id:o.command,title:o.title,arguments:o.arguments}}const fAe=new Map([[rV.Type,de.InlayHintKind.Type],[rV.Parameter,de.InlayHintKind.Parameter]]);function pAe(o){return o?fAe.get(o)??de.InlayHintKind.Type:de.InlayHintKind.Type}function Ah(o,e){if("targetUri"in o){const t=e.bridge.translateBackRange({uri:o.targetUri},o.targetRange);return{uri:t.textModel.uri,range:t.range,originSelectionRange:o.originSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.originSelectionRange).range:void 0,targetSelectionRange:o.targetSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.targetSelectionRange).range:void 0}}else{const t=e.bridge.translateBackRange({uri:o.uri},o.range);return{uri:t.textModel.uri,range:t.range}}}function In(o){return!o||o.length===0?{language:"*"}:o.map(e=>"notebook"in e?typeof e.notebook=="string"?{notebookType:e.notebook,language:e.language}:{notebookType:e.notebook.notebookType,language:e.language,pattern:e.notebook.pattern,scheme:e.notebook.scheme}:{language:e.language,pattern:e.pattern,scheme:e.scheme})}function mAe(o,e){if(!e)return!0;const t=o.getLanguageId();if(o.uri.toString(!0),!e||e.length===0)return!0;for(const i of e)if(!(i.language&&i.language!=="*"&&i.language!==t))return!0;return!1}function RA(o){const e={severity:dAe(o.severity),startLineNumber:o.range.start.line+1,startColumn:o.range.start.character+1,endLineNumber:o.range.end.line+1,endColumn:o.range.end.character+1,message:o.message,source:o.source,code:typeof o.code=="string"?o.code:o.code?.toString()};return o.tags&&(e.tags=o.tags.map(t=>hAe(t)).filter(t=>t!==void 0)),o.relatedInformation&&(e.relatedInformation=o.relatedInformation.map(t=>({resource:hD.parse(t.location.uri),startLineNumber:t.location.range.start.line+1,startColumn:t.location.range.start.character+1,endLineNumber:t.location.range.end.line+1,endColumn:t.location.range.end.character+1,message:t.message}))),e}var _Ae=class extends Wi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(_X.keys())},completionItem:{tagSupport:{valueSet:Array.from(bX.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(qe.textDocumentCompletion,!0,e=>de.registerCompletionItemProvider(In(e.documentSelector),new bAe(this._connection,e))))}},bAe=class{constructor(o,e){ve(this,"resolveCompletionItem"),this._client=o,this._capabilities=e,e.resolveProvider&&(this.resolveCompletionItem=async(t,i)=>(yX(t,await this._client.server.completionItemResolve(t._lspItem),this._client.bridge,t._translated,t._model),t))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(o,e,t,i){const n=this._client.bridge.translate(o,e),s=await this._client.server.textDocumentCompletion({textDocument:n.textDocument,position:n.position,context:t.triggerCharacter?{triggerKind:JPe(t.triggerKind),triggerCharacter:t.triggerCharacter}:void 0});return s?{suggestions:(Array.isArray(s)?s:s.items).map(r=>({...CAe(r,this._client.bridge,n,o,e),_lspItem:r,_translated:n,_model:o}))}:{suggestions:[]}}};function CAe(o,e,t,i,n){let s=o.insertText||o.label,r;o.textEdit&&("range"in o.textEdit?(s=o.textEdit.newText,r=Cg(e.translateBackRange(t.textDocument,o.textEdit.range),i).range):(s=o.textEdit.newText,r={insert:Cg(e.translateBackRange(t.textDocument,o.textEdit.insert),i).range,replace:Cg(e.translateBackRange(t.textDocument,o.textEdit.replace),i).range})),r||(r=x_.fromPositions(n,n));const a={label:o.label,kind:YPe(o.kind),insertText:s,sortText:o.sortText,filterText:o.filterText,preselect:o.preselect,commitCharacters:o.commitCharacters,range:r};return yX(a,o,e,t,i),a}function yX(o,e,t,i,n){e.detail!==void 0&&(o.detail=e.detail),e.documentation!==void 0&&(o.documentation=vAe(e.documentation)),e.insertTextFormat!==void 0&&(o.insertTextRules=tAe(e.insertTextFormat)),e.tags&&e.tags.length>0&&(o.tags=e.tags.map(XPe).filter(s=>s!==void 0)),e.additionalTextEdits&&e.additionalTextEdits.length>0&&(o.additionalTextEdits=e.additionalTextEdits.map(s=>({range:Cg(t.translateBackRange(i.textDocument,s.range),n).range,text:s.newText}))),e.command&&(o.command=cm(e.command))}function vAe(o){if(o)return typeof o=="string"?o:{value:o.value,isTrusted:!0}}var wAe=class extends Wi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[sL.Markdown,sL.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(qe.textDocumentHover,!0,e=>de.registerHoverProvider(In(e.documentSelector),new SAe(this._connection,e))))}},SAe=class{constructor(o,e){this._client=o,this._capabilities=e}async provideHover(o,e,t){const i=this._client.bridge.translate(o,e),n=await this._client.server.textDocumentHover({textDocument:i.textDocument,position:i.position});return!n||!n.contents?null:{contents:yAe(n.contents),range:n.range?this._client.bridge.translateBackRange(i.textDocument,n.range).range:void 0}}};function yAe(o){return Array.isArray(o)?o.map(e=>lV(e)):[lV(o)]}function lV(o){return typeof o=="string"?{value:o,isTrusted:!0}:"kind"in o?{value:o.value,isTrusted:!0}:{value:`\`\`\`${o.language} ${o.value} diff --git a/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-Bukenpe0.js b/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DzkblHwz.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-Bukenpe0.js rename to apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DzkblHwz.js index 40580eb77..429ef5216 100644 --- a/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-Bukenpe0.js +++ b/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DzkblHwz.js @@ -1,4 +1,4 @@ -import{g as zt}from"./chunk-XXDRQBXY-GqpBYspR.js";import{s as Ut}from"./chunk-POPQ4Y6H-CyRmuplC.js";import{_ as p,b as Kt,a as Zt,s as jt,g as qt,p as Wt,q as Ht,c as $,l as M,k as Qt,r as Xt,t as Jt,u as $t,v as te,x as ee,y as se,j as ie,z as re}from"./mermaid.core-BgUXBQ9g.js";import{c as ne}from"./channel-CeJKBXng.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var Tt=(function(){var e=p(function(V,n,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=n);return o},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],u=[2,2],r=[1,7],c=[1,9],b=[1,10],k=[1,11],f=[1,12],S=[1,30],d=[1,23],g=[1,24],x=[1,25],B=[1,26],Y=[1,27],m=[1,19],A=[1,28],U=[1,29],N=[1,20],I=[1,18],R=[1,21],v=[1,22],Ot=[2,6],l=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],K=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],D=[1,46],L=[1,47],Z=[1,57],j=[43,51,53,54,55,74,75],q=[1,70],W=[1,68],w=[1,65],H=[1,69],Q=[1,71],tt=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],et=[1,78],st=[1,77],it=[1,76],xt=[69,70,71,72,73],Nt=[1,91],Ct=[6,9,45,50],P=[6,9,12,44,45,50,51,52],rt=[1,101],nt=[1,100],at=[1,99],X=[18,61],At=[1,110],It=[1,109],Rt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(n,o,h,i,y,t,J){var s=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:this.$=t[s-1].concat(t[s]);break;case 4:this.$=t[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[s-4]),i.addEntity(t[s-2]),i.addRelationship(t[s-4],t[s],t[s-2],t[s-3]),this.$=[t[s-4],t[s-2]];break;case 8:i.addEntity(t[s-8]),i.addEntity(t[s-4]),i.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),i.setClass([t[s-8]],t[s-6]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-8],t[s-4]];break;case 9:i.addEntity(t[s-6]),i.addEntity(t[s-2]),i.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),i.setClass([t[s-6]],t[s-4]),this.$=[t[s-6],t[s-2]];break;case 10:i.addEntity(t[s-6]),i.addEntity(t[s-4]),i.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-6],t[s-4]];break;case 11:i.addEntity(t[s-3]),i.addAttributes(t[s-3],t[s-1]),this.$=[t[s-3]];break;case 12:i.addEntity(t[s-5]),i.addAttributes(t[s-5],t[s-1]),i.setClass([t[s-5]],t[s-3]),this.$=[t[s-5]];break;case 13:i.addEntity(t[s-2]),this.$=[t[s-2]];break;case 14:i.addEntity(t[s-4]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-4]];break;case 15:i.addEntity(t[s]),this.$=[t[s]];break;case 16:i.addEntity(t[s-2]),i.setClass([t[s-2]],t[s]),this.$=[t[s-2]];break;case 17:i.addEntity(t[s-6],t[s-4]),i.addAttributes(t[s-6],t[s-1]),this.$=[t[s-6]];break;case 18:i.addEntity(t[s-8],t[s-6]),i.addAttributes(t[s-8],t[s-1]),i.setClass([t[s-8]],t[s-3]),this.$=[t[s-8]];break;case 19:i.addEntity(t[s-5],t[s-3]),this.$=[t[s-5]];break;case 20:i.addEntity(t[s-7],t[s-5]),i.setClass([t[s-7]],t[s-2]),this.$=[t[s-7]];break;case 21:i.addEntity(t[s-3],t[s-1]);break;case 22:i.addEntity(t[s-5],t[s-3]),i.setClass([t[s-5]],t[s]);break;case 23:case 24:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[s]:(i.setDirection(t[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[s-2].id},t[s-1],{text:t[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-1],text:t[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-4],text:t[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[s];break;case 35:this.$=t[s-1]+" "+t[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[s-3],i.addClass(t[s-2],t[s-1]);break;case 41:case 42:case 63:case 72:this.$=[t[s]];break;case 43:case 44:this.$=t[s-2].concat([t[s]]);break;case 45:this.$=t[s-2],i.setClass(t[s-1],t[s]);break;case 46:this.$=t[s-3],i.addCssStyles(t[s-2],t[s-1]);break;case 47:this.$=[t[s]];break;case 48:t[s-2].push(t[s]),this.$=t[s-2];break;case 50:this.$=t[s-1]+t[s];break;case 58:case 84:case 85:this.$=t[s].replace(/"/g,"");break;case 64:t[s].push(t[s-1]),this.$=t[s];break;case 65:this.$={type:t[s-1],name:t[s]};break;case 66:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 67:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 68:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 69:case 71:case 74:this.$=t[s];break;case 70:this.$=t[s-1]+t[s];break;case 73:t[s-2].push(t[s]),this.$=t[s-2];break;case 75:this.$=t[s].replace(/"/g,"");break;case 76:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,u,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},e(a,Ot,{1:[2,1]}),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e(l,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(l,[2,26]),e(l,[2,27]),e(l,[2,28]),e(l,[2,29]),e(l,[2,30]),e(l,u,{5:44}),e(K,[2,58]),e(K,[2,59]),e(K,[2,60]),e(K,[2,61]),e(K,[2,62]),e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),e(l,[2,39]),{15:45,43:D,44:L},{15:48,43:D,44:L},{15:49,43:D,44:L},{10:50,43:m,51:N,53:I,54:R,55:v},{10:51,43:m,51:N,53:I,54:R,55:v},{15:52,43:D,44:L},{17:53,18:[1,54],56:55,57:56,61:Z},{10:58,43:m,51:N,53:I,54:R,55:v},{68:59,74:[1,60],75:[1,61]},e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},{12:q,42:64,44:W,45:w,48:66,49:67,51:H,52:Q},e(tt,[2,41]),e(tt,[2,42]),{15:72,43:D,44:L,45:w},{12:q,42:73,44:W,45:w,48:66,49:67,51:H,52:Q},{6:et,9:st,19:[1,75],35:74,50:it},{12:[1,79],14:[1,80]},e(l,[2,16],{67:35,11:81,16:[1,82],45:w,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},e(l,[2,13]),{17:84,18:[2,63],56:55,57:56,61:Z},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},e(xt,[2,82]),e(xt,[2,83]),e(l,[2,31]),e(l,Ot),{6:et,9:st,35:90,45:Nt,50:it},{43:[1,92],44:[1,93]},e(Ct,[2,47],{49:94,12:q,44:W,51:H,52:Q}),e(P,[2,49]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(l,[2,45],{45:w}),{6:et,9:st,35:95,45:Nt,50:it},e(l,[2,32]),{10:97,36:96,43:m,51:N,53:I,54:R,55:v},e(l,[2,51]),e(l,[2,52]),e(l,[2,53]),{13:98,43:rt,53:nt,76:at},{15:102,43:D,44:L},{10:103,43:m,51:N,53:I,54:R,55:v},{17:104,18:[1,105],56:55,57:56,61:Z},e(l,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:At,66:It}),e([18,61,65,66],[2,71]),{61:[2,70]},e(l,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(l,[2,40]),{12:q,44:W,48:113,49:67,51:H,52:Q},e(tt,[2,43]),e(tt,[2,44]),e(P,[2,50]),e(l,[2,46]),{10:115,20:[1,114],43:m,51:N,53:I,54:R,55:v},e(Rt,[2,34]),e(l,[2,7]),e(l,[2,84]),e(l,[2,85]),e(l,[2,86]),{12:[1,116],45:w},{12:[1,118],14:[1,117]},{18:[1,119]},e(l,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:It}),e(X,[2,67]),e(yt,[2,72]),e(X,[2,75]),e(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:Z},{15:124,43:D,44:L},e(Ct,[2,48],{49:94,12:q,44:W,51:H,52:Q}),{6:et,9:st,35:125,50:it},e(Rt,[2,35]),{13:126,43:rt,53:nt,76:at},{15:127,43:D,44:L},{13:128,43:rt,53:nt,76:at},e(l,[2,12]),e(X,[2,68]),{63:129,65:At},{18:[1,130]},e(l,[2,19]),e(l,[2,22],{16:[1,131],45:w}),e(l,[2,33]),e(l,[2,10]),{12:[1,132],45:w},e(l,[2,9]),e(yt,[2,73]),e(l,[2,17]),{17:133,18:[1,134],56:55,57:56,61:Z},{13:135,43:rt,53:nt,76:at},{18:[1,136]},e(l,[2,20]),e(l,[2,8]),e(l,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(n,o){if(o.recoverable)this.trace(n);else{var h=new Error(n);throw h.hash=o,h}},"parseError"),parse:p(function(n){var o=this,h=[0],i=[],y=[null],t=[],J=this.table,s="",ct=0,vt=0,Gt=2,Dt=1,Ft=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(G.yy[kt]=this.yy[kt]);_.setInput(n,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var mt=_.yylloc;t.push(mt);var Yt=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(T){h.length=h.length-2*T,y.length=y.length-T,t.length=t.length-T}p(Pt,"popStack");function Lt(){var T;return T=i.pop()||_.lex()||Dt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}p(Lt,"lex");for(var E,F,O,Et,z={},lt,C,wt,ht;;){if(F=h[h.length-1],this.defaultActions[F]?O=this.defaultActions[F]:((E===null||typeof E>"u")&&(E=Lt()),O=J[F]&&J[F][E]),typeof O>"u"||!O.length||!O[0]){var St="";ht=[];for(lt in J[F])this.terminals_[lt]&<>Gt&&ht.push("'"+this.terminals_[lt]+"'");_.showPosition?St="Parse error on line "+(ct+1)+`: +import{g as zt}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as Ut}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as p,b as Kt,a as Zt,s as jt,g as qt,p as Wt,q as Ht,c as $,l as M,k as Qt,r as Xt,t as Jt,u as $t,v as te,x as ee,y as se,j as ie,z as re}from"./mermaid.core-BusHtpbx.js";import{c as ne}from"./channel-DZ2XEbLN.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Tt=(function(){var e=p(function(V,n,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=n);return o},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],u=[2,2],r=[1,7],c=[1,9],b=[1,10],k=[1,11],f=[1,12],S=[1,30],d=[1,23],g=[1,24],x=[1,25],B=[1,26],Y=[1,27],m=[1,19],A=[1,28],U=[1,29],N=[1,20],I=[1,18],R=[1,21],v=[1,22],Ot=[2,6],l=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],K=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],D=[1,46],L=[1,47],Z=[1,57],j=[43,51,53,54,55,74,75],q=[1,70],W=[1,68],w=[1,65],H=[1,69],Q=[1,71],tt=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],et=[1,78],st=[1,77],it=[1,76],xt=[69,70,71,72,73],Nt=[1,91],Ct=[6,9,45,50],P=[6,9,12,44,45,50,51,52],rt=[1,101],nt=[1,100],at=[1,99],X=[18,61],At=[1,110],It=[1,109],Rt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(n,o,h,i,y,t,J){var s=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:this.$=t[s-1].concat(t[s]);break;case 4:this.$=t[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[s-4]),i.addEntity(t[s-2]),i.addRelationship(t[s-4],t[s],t[s-2],t[s-3]),this.$=[t[s-4],t[s-2]];break;case 8:i.addEntity(t[s-8]),i.addEntity(t[s-4]),i.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),i.setClass([t[s-8]],t[s-6]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-8],t[s-4]];break;case 9:i.addEntity(t[s-6]),i.addEntity(t[s-2]),i.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),i.setClass([t[s-6]],t[s-4]),this.$=[t[s-6],t[s-2]];break;case 10:i.addEntity(t[s-6]),i.addEntity(t[s-4]),i.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-6],t[s-4]];break;case 11:i.addEntity(t[s-3]),i.addAttributes(t[s-3],t[s-1]),this.$=[t[s-3]];break;case 12:i.addEntity(t[s-5]),i.addAttributes(t[s-5],t[s-1]),i.setClass([t[s-5]],t[s-3]),this.$=[t[s-5]];break;case 13:i.addEntity(t[s-2]),this.$=[t[s-2]];break;case 14:i.addEntity(t[s-4]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-4]];break;case 15:i.addEntity(t[s]),this.$=[t[s]];break;case 16:i.addEntity(t[s-2]),i.setClass([t[s-2]],t[s]),this.$=[t[s-2]];break;case 17:i.addEntity(t[s-6],t[s-4]),i.addAttributes(t[s-6],t[s-1]),this.$=[t[s-6]];break;case 18:i.addEntity(t[s-8],t[s-6]),i.addAttributes(t[s-8],t[s-1]),i.setClass([t[s-8]],t[s-3]),this.$=[t[s-8]];break;case 19:i.addEntity(t[s-5],t[s-3]),this.$=[t[s-5]];break;case 20:i.addEntity(t[s-7],t[s-5]),i.setClass([t[s-7]],t[s-2]),this.$=[t[s-7]];break;case 21:i.addEntity(t[s-3],t[s-1]);break;case 22:i.addEntity(t[s-5],t[s-3]),i.setClass([t[s-5]],t[s]);break;case 23:case 24:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[s]:(i.setDirection(t[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[s-2].id},t[s-1],{text:t[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-1],text:t[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-4],text:t[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[s];break;case 35:this.$=t[s-1]+" "+t[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[s-3],i.addClass(t[s-2],t[s-1]);break;case 41:case 42:case 63:case 72:this.$=[t[s]];break;case 43:case 44:this.$=t[s-2].concat([t[s]]);break;case 45:this.$=t[s-2],i.setClass(t[s-1],t[s]);break;case 46:this.$=t[s-3],i.addCssStyles(t[s-2],t[s-1]);break;case 47:this.$=[t[s]];break;case 48:t[s-2].push(t[s]),this.$=t[s-2];break;case 50:this.$=t[s-1]+t[s];break;case 58:case 84:case 85:this.$=t[s].replace(/"/g,"");break;case 64:t[s].push(t[s-1]),this.$=t[s];break;case 65:this.$={type:t[s-1],name:t[s]};break;case 66:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 67:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 68:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 69:case 71:case 74:this.$=t[s];break;case 70:this.$=t[s-1]+t[s];break;case 73:t[s-2].push(t[s]),this.$=t[s-2];break;case 75:this.$=t[s].replace(/"/g,"");break;case 76:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,u,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},e(a,Ot,{1:[2,1]}),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e(l,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(l,[2,26]),e(l,[2,27]),e(l,[2,28]),e(l,[2,29]),e(l,[2,30]),e(l,u,{5:44}),e(K,[2,58]),e(K,[2,59]),e(K,[2,60]),e(K,[2,61]),e(K,[2,62]),e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),e(l,[2,39]),{15:45,43:D,44:L},{15:48,43:D,44:L},{15:49,43:D,44:L},{10:50,43:m,51:N,53:I,54:R,55:v},{10:51,43:m,51:N,53:I,54:R,55:v},{15:52,43:D,44:L},{17:53,18:[1,54],56:55,57:56,61:Z},{10:58,43:m,51:N,53:I,54:R,55:v},{68:59,74:[1,60],75:[1,61]},e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},{12:q,42:64,44:W,45:w,48:66,49:67,51:H,52:Q},e(tt,[2,41]),e(tt,[2,42]),{15:72,43:D,44:L,45:w},{12:q,42:73,44:W,45:w,48:66,49:67,51:H,52:Q},{6:et,9:st,19:[1,75],35:74,50:it},{12:[1,79],14:[1,80]},e(l,[2,16],{67:35,11:81,16:[1,82],45:w,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},e(l,[2,13]),{17:84,18:[2,63],56:55,57:56,61:Z},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},e(xt,[2,82]),e(xt,[2,83]),e(l,[2,31]),e(l,Ot),{6:et,9:st,35:90,45:Nt,50:it},{43:[1,92],44:[1,93]},e(Ct,[2,47],{49:94,12:q,44:W,51:H,52:Q}),e(P,[2,49]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(l,[2,45],{45:w}),{6:et,9:st,35:95,45:Nt,50:it},e(l,[2,32]),{10:97,36:96,43:m,51:N,53:I,54:R,55:v},e(l,[2,51]),e(l,[2,52]),e(l,[2,53]),{13:98,43:rt,53:nt,76:at},{15:102,43:D,44:L},{10:103,43:m,51:N,53:I,54:R,55:v},{17:104,18:[1,105],56:55,57:56,61:Z},e(l,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:At,66:It}),e([18,61,65,66],[2,71]),{61:[2,70]},e(l,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(l,[2,40]),{12:q,44:W,48:113,49:67,51:H,52:Q},e(tt,[2,43]),e(tt,[2,44]),e(P,[2,50]),e(l,[2,46]),{10:115,20:[1,114],43:m,51:N,53:I,54:R,55:v},e(Rt,[2,34]),e(l,[2,7]),e(l,[2,84]),e(l,[2,85]),e(l,[2,86]),{12:[1,116],45:w},{12:[1,118],14:[1,117]},{18:[1,119]},e(l,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:It}),e(X,[2,67]),e(yt,[2,72]),e(X,[2,75]),e(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:Z},{15:124,43:D,44:L},e(Ct,[2,48],{49:94,12:q,44:W,51:H,52:Q}),{6:et,9:st,35:125,50:it},e(Rt,[2,35]),{13:126,43:rt,53:nt,76:at},{15:127,43:D,44:L},{13:128,43:rt,53:nt,76:at},e(l,[2,12]),e(X,[2,68]),{63:129,65:At},{18:[1,130]},e(l,[2,19]),e(l,[2,22],{16:[1,131],45:w}),e(l,[2,33]),e(l,[2,10]),{12:[1,132],45:w},e(l,[2,9]),e(yt,[2,73]),e(l,[2,17]),{17:133,18:[1,134],56:55,57:56,61:Z},{13:135,43:rt,53:nt,76:at},{18:[1,136]},e(l,[2,20]),e(l,[2,8]),e(l,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(n,o){if(o.recoverable)this.trace(n);else{var h=new Error(n);throw h.hash=o,h}},"parseError"),parse:p(function(n){var o=this,h=[0],i=[],y=[null],t=[],J=this.table,s="",ct=0,vt=0,Gt=2,Dt=1,Ft=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(G.yy[kt]=this.yy[kt]);_.setInput(n,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var mt=_.yylloc;t.push(mt);var Yt=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(T){h.length=h.length-2*T,y.length=y.length-T,t.length=t.length-T}p(Pt,"popStack");function Lt(){var T;return T=i.pop()||_.lex()||Dt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}p(Lt,"lex");for(var E,F,O,Et,z={},lt,C,wt,ht;;){if(F=h[h.length-1],this.defaultActions[F]?O=this.defaultActions[F]:((E===null||typeof E>"u")&&(E=Lt()),O=J[F]&&J[F][E]),typeof O>"u"||!O.length||!O[0]){var St="";ht=[];for(lt in J[F])this.terminals_[lt]&<>Gt&&ht.push("'"+this.terminals_[lt]+"'");_.showPosition?St="Parse error on line "+(ct+1)+`: `+_.showPosition()+` Expecting `+ht.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(ct+1)+": Unexpected "+(E==Dt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:_.match,token:this.terminals_[E]||E,line:_.yylineno,loc:mt,expected:ht})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+E);switch(O[0]){case 1:h.push(E),y.push(_.yytext),t.push(_.yylloc),h.push(O[1]),E=null,vt=_.yyleng,s=_.yytext,ct=_.yylineno,mt=_.yylloc;break;case 2:if(C=this.productions_[O[1]][1],z.$=y[y.length-C],z._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},Yt&&(z._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(z,[s,vt,ct,G.yy,O[1],y,t].concat(Ft)),typeof Et<"u")return Et;C&&(h=h.slice(0,-1*C*2),y=y.slice(0,-1*C),t=t.slice(0,-1*C)),h.push(this.productions_[O[1]][0]),y.push(z.$),t.push(z._$),wt=J[h[h.length-2]][h[h.length-1]],h.push(wt);break;case 3:return!0}}return!0},"parse")},Bt=(function(){var V={EOF:1,parseError:p(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw new Error(o)},"parseError"),setInput:p(function(n,o){return this.yy=o||this.yy||{},this._input=n,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:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var o=n.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var o=n.length,h=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=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),h.length-1&&(this.yylineno-=h.length-1);var y=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:h?(h.length===i.length?this.yylloc.first_column:0)+i[i.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),o=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-DWLybnX0.js b/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-D6_Z_lfU.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-DWLybnX0.js rename to apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-D6_Z_lfU.js index 414992059..f36395ad4 100644 --- a/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-DWLybnX0.js +++ b/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-D6_Z_lfU.js @@ -1,4 +1,4 @@ -import{g as Ht}from"./chunk-5VM5RSS4-wCYaCTKB.js";import{g as Xt}from"./chunk-XXDRQBXY-GqpBYspR.js";import{s as Qt}from"./chunk-POPQ4Y6H-CyRmuplC.js";import{_ as k,b3 as Zt,Y as Ot,l as J,c as Ae,x as Jt,y as $t,z as it,b as e1,s as t1,p as s1,a as i1,g as r1,q as a1,k as n1,Z as u1,$ as o1,ca as l1,t as tt,j as st,r as c1,b7 as h1,u as d1}from"./mermaid.core-BgUXBQ9g.js";import{f as p1}from"./chunk-F27PBJKO-A5JDBOgE.js";import{p as f1}from"./purify.es-5AjVNlXF.js";import{c as g1}from"./channel-CeJKBXng.js";var b1="flowchart-",A1=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=e1,this.setAccDescription=t1,this.setDiagramTitle=s1,this.getAccTitle=i1,this.getAccDescription=r1,this.getDiagramTitle=a1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{k(this,"FlowDB")}sanitizeText(e){return n1.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,u,f,l={},b){if(!e||e.trim().length===0)return;let h;if(b!==void 0){let o;b.includes(` +import{g as Ht}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{g as Xt}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as Qt}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as k,b3 as Zt,Y as Ot,l as J,c as Ae,x as Jt,y as $t,z as it,b as e1,s as t1,p as s1,a as i1,g as r1,q as a1,k as n1,Z as u1,$ as o1,ca as l1,t as tt,j as st,r as c1,b7 as h1,u as d1}from"./mermaid.core-BusHtpbx.js";import{f as p1}from"./chunk-F27PBJKO-CGsciVEq.js";import{p as f1}from"./purify.es-5AjVNlXF.js";import{c as g1}from"./channel-DZ2XEbLN.js";var b1="flowchart-",A1=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=e1,this.setAccDescription=t1,this.setDiagramTitle=s1,this.getAccTitle=i1,this.getAccDescription=r1,this.getDiagramTitle=a1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{k(this,"FlowDB")}sanitizeText(e){return n1.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,u,f,l={},b){if(!e||e.trim().length===0)return;let h;if(b!==void 0){let o;b.includes(` `)?o=b+` `:o=`{ `+b+` diff --git a/apps/pythinker-code/dist-web/assets/freemarker2-D03L5Rmf.js b/apps/pythinker-code/dist-web/assets/freemarker2-CG8OSn8H.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/freemarker2-D03L5Rmf.js rename to apps/pythinker-code/dist-web/assets/freemarker2-CG8OSn8H.js index 07d6f075b..ef961c604 100644 --- a/apps/pythinker-code/dist-web/assets/freemarker2-D03L5Rmf.js +++ b/apps/pythinker-code/dist-web/assets/freemarker2-CG8OSn8H.js @@ -1,3 +1,3 @@ -import{l as c}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` +import{l as c}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(r,t),i=_(a,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const $={conf:l(r),language:_(r,k)},E={conf:l(a),language:_(a,k)},B={conf:l(r),language:_(r,p)},D={conf:l(a),language:_(a,p)},C={conf:g(),language:A(k)},v={conf:g(),language:A(p)};export{B as TagAngleInterpolationBracket,$ as TagAngleInterpolationDollar,v as TagAutoInterpolationBracket,C as TagAutoInterpolationDollar,D as TagBracketInterpolationBracket,E as TagBracketInterpolationDollar}; diff --git a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-C2aeZeAI.js b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-C2aeZeAI.js rename to apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js index 3d1a09626..b7c40aaa8 100644 --- a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-C2aeZeAI.js +++ b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js @@ -1,4 +1,4 @@ -import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,b4 as oe,g as Nn,s as Pn,q as Vn,p as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bm as it,l as Tt,k as Zn,o as Xn,r as Gn,z as jn}from"./mermaid.core-BgUXBQ9g.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-DehXFnHz.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: +import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,b4 as oe,g as Nn,s as Pn,q as Vn,p as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bm as it,l as Tt,k as Zn,o as Xn,r as Gn,z as jn}from"./mermaid.core-BusHtpbx.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-Be-oTS5b.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,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:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),b.length-1&&(this.yylineno-=b.length-1);var I=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:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-JhPLgbup.js b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-JhPLgbup.js rename to apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js index 20450c842..3c604fe02 100644 --- a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-JhPLgbup.js +++ b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-DDI19Bs6.js";import{p as he}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,A as J,l as w,j as me,c as W,z as pe,B as be,r as we,k as B,D as ke,E as ve,F as Ce}from"./mermaid.core-BgUXBQ9g.js";import{p as Ee}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` +import{I as le}from"./chunk-2Q5K7J3B-CPFb-YMA.js";import{p as he}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,A as J,l as w,j as me,c as W,z as pe,B as be,r as we,k as B,D as ke,E as ve,F as Ce}from"./mermaid.core-BusHtpbx.js";import{p as Ee}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` ${s-i/2-L/2},${x+R} ${s-i/2-L/2},${x-R} ${t.posWithOffset-i/2-L},${x-c-R} diff --git a/apps/pythinker-code/dist-web/assets/handlebars-DTB7OcjB.js b/apps/pythinker-code/dist-web/assets/handlebars-vt5-G9kY.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/handlebars-DTB7OcjB.js rename to apps/pythinker-code/dist-web/assets/handlebars-vt5-G9kY.js index a53887137..fd221a9db 100644 --- a/apps/pythinker-code/dist-web/assets/handlebars-DTB7OcjB.js +++ b/apps/pythinker-code/dist-web/assets/handlebars-vt5-G9kY.js @@ -1 +1 @@ -import{l as e}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language}; +import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language}; diff --git a/apps/pythinker-code/dist-web/assets/html-Bx3Ftaqh.js b/apps/pythinker-code/dist-web/assets/html-BwCzbm6J.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/html-Bx3Ftaqh.js rename to apps/pythinker-code/dist-web/assets/html-BwCzbm6J.js index af2f6a156..fcf5e8b28 100644 --- a/apps/pythinker-code/dist-web/assets/html-Bx3Ftaqh.js +++ b/apps/pythinker-code/dist-web/assets/html-BwCzbm6J.js @@ -1 +1 @@ -import{l as e}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language}; +import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language}; diff --git a/apps/pythinker-code/dist-web/assets/htmlMode-Cyt5VoSI.js b/apps/pythinker-code/dist-web/assets/htmlMode-BtW7hgTd.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/htmlMode-Cyt5VoSI.js rename to apps/pythinker-code/dist-web/assets/htmlMode-BtW7hgTd.js index 160228c52..8b5c6e404 100644 --- a/apps/pythinker-code/dist-web/assets/htmlMode-Cyt5VoSI.js +++ b/apps/pythinker-code/dist-web/assets/htmlMode-BtW7hgTd.js @@ -1 +1 @@ -import{c as D,l as t}from"./editor.main-BVyazG_A.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-jno-S5XZ.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-jno-S5XZ.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-C8KWqYYR.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit}; +import{c as D,l as t}from"./editor.main-yCrGDkyO.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-Dzr62Jjp.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-Dzr62Jjp.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-C8KWqYYR.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit}; diff --git a/apps/pythinker-code/dist-web/assets/index-COH6wcWn.js b/apps/pythinker-code/dist-web/assets/index-0QXixtol.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-COH6wcWn.js rename to apps/pythinker-code/dist-web/assets/index-0QXixtol.js index bfd0dcb3c..b959fd1d0 100644 --- a/apps/pythinker-code/dist-web/assets/index-COH6wcWn.js +++ b/apps/pythinker-code/dist-web/assets/index-0QXixtol.js @@ -1,4 +1,4 @@ -import{t as ee,b as Jn,n as Do,c as Po,a as _o,d as Fo,s as Oo,g as No,e as zo}from"./index-CfszvQ96.js";import{f as Rc}from"./index-CfszvQ96.js";import{bR as w}from"./index-vF2s5p7P.js";const ur="diffs-container",Uo=(()=>{try{return!1}catch{return!1}})(),Vo=/(?=^From [a-f0-9]+ .+$)/m,fr=/(?=^diff --git)/gm,$h=/(?=^---\s+\S)/gm,Wh=/(?=^@@ )/gm,Bo=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,$o=/(?<=\n)/,Wo=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Go=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,jo=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,qo=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gh=/^<{7,}(?:\s.*)?$/,jh=/^\|{7,}(?:\s.*)?$/,qh=/^={7,}$/,Kh=/^>{7,}(?:\s.*)?$/,Hn="header-prefix",Mn="header-filename-suffix",Dn="header-metadata",Pn="header-custom",O={dark:"pierre-dark",light:"pierre-light"},pr="data-theme-css",gr="data-unsafe-css",Ko="data-core-css",Yo="data-diffs-scrollbar-measure",Xo="data-diffs-code-view-header",Qo="data-diffs-code-view-footer",mr="--diffs-scrollbar-gutter-measured",Yh=1,Zo=1e5,_n={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},et={..._n,hunkLineCount:1},Jo={paddingTop:8,paddingBottom:8,gap:8},es={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ts=Object.freeze({fromStart:0,fromEnd:0}),Xe={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},vr={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Oe=new Set;let we=null;function G(e){Oe.add(e),we??=requestAnimationFrame(Cr)}function ze(e){Oe.delete(e)&&Oe.size===0&&we!=null&&(cancelAnimationFrame(we),we=null)}function Xh(){Oe.clear(),we!=null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(we),we=null}function Cr(e){const t=new Set(Oe);Oe.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Oe.size>0?we=requestAnimationFrame(Cr):we=null}function Qe(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Je(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Fn(e,t){const n=e?.theme??O,i=t?.theme??O,r=ei(e),o=ei(t);return Je(n,i)&&Qe(e,t,["theme","parseDiffOptions"])&&Qe(r,o)}function ei(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function _t(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function cn({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const d=Math.max(e-r,0),c=Math.min(e+l,t);return{top:d,bottom:Math.max(c,d)}}let a=e+n/2-s/2,h=a+s;return a<0&&(a=0),h>t&&(h=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(h,t),a))}}function Te(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const ns=new TextEncoder,is=new TextDecoder("utf-8",{ignoreBOM:!0}),rs=/[\uD800-\uDFFF]/,un=1024;let qe=new Uint8Array(un);function Sr(){qe.length!==un&&(qe=new Uint8Array(un))}function B(e){if(e.length===0)return e;if(rs.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;qe.length0&&r.deletions>0||o.type!=="context")continue;const s=r.additions>0,l=s?t.additionLines:t.deletionLines,a=s?r.additionLineIndex:r.deletionLineIndex,h=s?r.additions:r.deletions,d=l[a]??"";if(d.trim()!=="")continue;let c=!0;for(let C=1;Cos)return null;const a=[];for(let g=0;gn;let c=0,u=-1;for(let g=0;g<=l;g++){let C=0;for(let m=0;mu&&(u=C,c=g)}if(c===0)return null;const f=[],p=(g,C,m,v)=>{(g>0||C>0)&&f.push({type:"change",deletions:g,additions:C,deletionLineIndex:m,additionLineIndex:v})};return d?(p(0,c,r,o),p(s,s,r,o+c),p(0,i-s-c,r+s,o+c+s)):(p(c,0,r,o),p(s,s,r+c,o),p(n-s-c,0,r+c+s,o+s)),f}const hs=/\s+/g;function ti(e){return e.replace(hs,"")}function cs(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let r=0;for(;r0&&(f[f.length-1]===` +import{t as ee,b as Jn,n as Do,c as Po,a as _o,d as Fo,s as Oo,g as No,e as zo}from"./index-C_5a8vkb.js";import{f as Rc}from"./index-C_5a8vkb.js";import{bR as w}from"./index-BZ9wqq8Z.js";const ur="diffs-container",Uo=(()=>{try{return!1}catch{return!1}})(),Vo=/(?=^From [a-f0-9]+ .+$)/m,fr=/(?=^diff --git)/gm,$h=/(?=^---\s+\S)/gm,Wh=/(?=^@@ )/gm,Bo=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,$o=/(?<=\n)/,Wo=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Go=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,jo=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,qo=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gh=/^<{7,}(?:\s.*)?$/,jh=/^\|{7,}(?:\s.*)?$/,qh=/^={7,}$/,Kh=/^>{7,}(?:\s.*)?$/,Hn="header-prefix",Mn="header-filename-suffix",Dn="header-metadata",Pn="header-custom",O={dark:"pierre-dark",light:"pierre-light"},pr="data-theme-css",gr="data-unsafe-css",Ko="data-core-css",Yo="data-diffs-scrollbar-measure",Xo="data-diffs-code-view-header",Qo="data-diffs-code-view-footer",mr="--diffs-scrollbar-gutter-measured",Yh=1,Zo=1e5,_n={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},et={..._n,hunkLineCount:1},Jo={paddingTop:8,paddingBottom:8,gap:8},es={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ts=Object.freeze({fromStart:0,fromEnd:0}),Xe={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},vr={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Oe=new Set;let we=null;function G(e){Oe.add(e),we??=requestAnimationFrame(Cr)}function ze(e){Oe.delete(e)&&Oe.size===0&&we!=null&&(cancelAnimationFrame(we),we=null)}function Xh(){Oe.clear(),we!=null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(we),we=null}function Cr(e){const t=new Set(Oe);Oe.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Oe.size>0?we=requestAnimationFrame(Cr):we=null}function Qe(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Je(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Fn(e,t){const n=e?.theme??O,i=t?.theme??O,r=ei(e),o=ei(t);return Je(n,i)&&Qe(e,t,["theme","parseDiffOptions"])&&Qe(r,o)}function ei(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function _t(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function cn({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const d=Math.max(e-r,0),c=Math.min(e+l,t);return{top:d,bottom:Math.max(c,d)}}let a=e+n/2-s/2,h=a+s;return a<0&&(a=0),h>t&&(h=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(h,t),a))}}function Te(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const ns=new TextEncoder,is=new TextDecoder("utf-8",{ignoreBOM:!0}),rs=/[\uD800-\uDFFF]/,un=1024;let qe=new Uint8Array(un);function Sr(){qe.length!==un&&(qe=new Uint8Array(un))}function B(e){if(e.length===0)return e;if(rs.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;qe.length0&&r.deletions>0||o.type!=="context")continue;const s=r.additions>0,l=s?t.additionLines:t.deletionLines,a=s?r.additionLineIndex:r.deletionLineIndex,h=s?r.additions:r.deletions,d=l[a]??"";if(d.trim()!=="")continue;let c=!0;for(let C=1;Cos)return null;const a=[];for(let g=0;gn;let c=0,u=-1;for(let g=0;g<=l;g++){let C=0;for(let m=0;mu&&(u=C,c=g)}if(c===0)return null;const f=[],p=(g,C,m,v)=>{(g>0||C>0)&&f.push({type:"change",deletions:g,additions:C,deletionLineIndex:m,additionLineIndex:v})};return d?(p(0,c,r,o),p(s,s,r,o+c),p(0,i-s-c,r+s,o+c+s)):(p(c,0,r,o),p(s,s,r+c,o),p(n-s-c,0,r+c+s,o+s)),f}const hs=/\s+/g;function ti(e){return e.replace(hs,"")}function cs(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let r=0;for(;r0&&(f[f.length-1]===` `||f[f.length-1]==="\r"||f[f.length-1]===`\r `||f[f.length-1]==="");)f.pop();const{additionStart:y,deletionStart:S}=g;d=h?d:S-1,c=h?c:y-1;const L={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:g.additionCount,additionStart:y,additionLines:C,deletionCount:g.deletionCount,deletionStart:S,deletionLines:m,deletionLineIndex:d,additionLineIndex:c,hunkContent:[],hunkContext:oi(g.hunkContext),hunkSpecs:B(p),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let x=0,E=0;for(let k=1;k=L.additionCount&&E>=L.deletionCount&&!R.startsWith("\\")){if(o&&bs(R)&&!ys(R))throw Error("parsePatchContent: hunk has more lines than expected");break}const F=R[0];if(F!=="+"&&F!=="-"&&F!==" "&&F!=="\\"){if(o)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${F}", full line: "${R}"`),console.error("processFile: invalid rawLine:",R);continue}const T=ks(F);if(T==="addition"){if(o&&x>=L.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const I=Kt(R);(v==null||v.type!=="change")&&(v=Yt("change",d,c),L.hunkContent.push(v)),c++,x++,h&&a.additionLines.push(I),v.additions++,C++,b="addition"}else if(T==="deletion"){if(o&&E>=L.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const I=Kt(R);(v==null||v.type!=="change")&&(v=Yt("change",d,c),L.hunkContent.push(v)),d++,E++,h&&a.deletionLines.push(I),v.deletions++,m++,b="deletion"}else if(T==="context"){if(o&&(E>=L.deletionCount||x>=L.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const I=Kt(R);(v==null||v.type!=="context")&&(v=Yt("context",d,c),L.hunkContent.push(v)),c++,d++,x++,E++,h&&(a.deletionLines.push(I),a.additionLines.push(I)),v.lines++,b="context"}else if(T==="metadata"&&v!=null){if(v.type==="context"?(L.noEOFCRAdditions=!0,L.noEOFCRDeletions=!0):b==="deletion"?L.noEOFCRDeletions=!0:b==="addition"&&(L.noEOFCRAdditions=!0),h&&(b==="addition"||b==="context")){const I=a.additionLines.length-1;I>=0&&(a.additionLines[I]=Te(a.additionLines[I]))}if(h&&(b==="deletion"||b==="context")){const I=a.deletionLines.length-1;I>=0&&(a.deletionLines[I]=Te(a.deletionLines[I]))}}}if(o&&(x!==L.additionCount||E!==L.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");L.additionLines=C,L.deletionLines=m,L.collapsedBefore=Math.max(oe(L.additionStart,L.additionCount)-s,0),a.hunks.push(L),s=W(L.additionStart,L.additionCount);for(const k of L.hunkContent)k.type==="context"?(L.splitLineCount+=k.lines,L.unifiedLineCount+=k.lines):(L.splitLineCount+=Math.max(k.additions,k.deletions),L.unifiedLineCount+=k.deletions+k.additions);L.splitLineStart=a.splitLineCount+L.collapsedBefore,L.unifiedLineStart=a.unifiedLineCount+L.collapsedBefore,a.splitLineCount+=L.collapsedBefore+L.splitLineCount,a.unifiedLineCount+=L.collapsedBefore+L.unifiedLineCount}if(a!=null){if(o&&h&&!n&&a.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(a.hunks.length>0&&!h&&a.additionLines.length>0&&a.deletionLines.length>0){const u=a.hunks[a.hunks.length-1],f=W(u.additionStart,u.additionCount),p=a.additionLines.length,g=Math.max(p-f,0);a.splitLineCount+=g,a.unifiedLineCount+=g}return n||(a.prevName!=null&&a.name!==a.prevName?a.hunks.length>0?a.type="rename-changed":a.type="rename-pure":(i==null||i.contents==="")&&r!=null&&r.contents!==""?a.type="new":i!=null&&i.contents!==""&&(r==null||r.contents==="")&&(a.type="deleted")),a.type!=="rename-pure"&&a.type!=="rename-changed"&&(a.prevName=void 0),as(a),a}}function gs(e,t,n=!1){const i=[],r=ms(e)?e.split(Vo):[e];for(const o of r)try{i.push(us(o,t!=null?`${t}-${i.length}`:void 0,n))}catch(s){if(n)throw s;console.error(s)}return i}function ms(e){return e.startsWith("From ")||e.includes(` From `)}function ni(e){const t=yr(e);for(let n=0;ni.map(i=>d[i]); -import{bR as Q}from"./index-vF2s5p7P.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-COH6wcWn.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-0QXixtol.js","assets/index-C_5a8vkb.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css"])))=>i.map(i=>d[i]); +import{bR as Q}from"./index-BZ9wqq8Z.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-0QXixtol.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` `),n=i.split(` `);let r=0;for(;r` ${a}`),...t.slice(r,t.length-o).map(a=>`- ${a}`),...n.slice(r,n.length-o).map(a=>`+ ${a}`),...t.slice(t.length-o).map(a=>` ${a}`)].join(` `)}function he(e){return new G(e)}function ue(e={}){let i,t,n,r,o,a="text",d="",p="",h,c=0,g="system",S=U(e),T=q(e);const L={disableLineNumbers:e.lineNumbers===!1,overflow:e.wordWrap==="on"?"wrap":"scroll",enableLineSelection:e.enableLineSelection},M=()=>({...L,theme:S,themeType:g});async function H(s,l,u){k();const w=c;if(N(s,e),h=s,a=R(u),_(l))return V(s,l,a);if(e.stream===!1)return O(s,l,a);const f=new K({...M(),...F(e),fileName:`code.${a}`,language:a,maxHeight:e.MAX_HEIGHT,autoScroll:e.autoScrollOnUpdate===!1?"never":"near-bottom",autoScrollThresholdPx:e.autoScrollThresholdPx,workerManager:e.workerManager});if(i=f,f.append(l),await f.mount(s),w!==c||i!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>f.getText(),s,()=>f.getFinalizedSurface(),m=>f.onDidRender(m)),r}async function I(s,l,u,w){k();const f=c;N(s,e),h=s,a=R(w),d=l,p=u;let m,v;if(e.stream===!1){if(m=x({kind:"diff",oldFile:y(l),newFile:y(u),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),...F(e)}}),n=m,await m.mount(s),f!==c||n!==m||h!==s)throw m.dispose(),new Error("Editor creation was cancelled");e.onController?.(m)}else{if(v=new G({...M(),...F(e),fileName:`code.${a}`,language:a,diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),maxHeight:e.MAX_HEIGHT,wrap:e.wordWrap==="on",workerManager:e.workerManager}),t=v,await v.mount(s,l,u),f!==c||t!==v||h!==s)throw v.dispose(),new Error("Editor creation was cancelled");e.onController?.(v)}return o=oe(()=>d,()=>p,s,()=>m??v?.getFinalizedSurface()),o}async function X(s,l=a){const u=R(l);if(_(s)){n?.getInput().kind==="merge-conflict"?(a=u,await n.updateMergeConflict(y(s),e.lineAnnotations)):h&&await V(h,s,u);return}if(e.stream===!1){n?.getInput().kind==="file"?(a=u,await n.updateFile(y(s),e.lineAnnotations)):h&&await O(h,s,u);return}if(!i){h&&await H(h,s,u);return}if(i.getState()==="finalized"){s!==i.getText()&&await i.reset(s);return}if(u!==a){a=u,await i.setLanguage(u),s!==i.getText()&&await i.reset(s);return}const w=i.getText();s.startsWith(w)?i.append(s.slice(w.length)):await i.reset(s)}async function P(s,l,u=a){if(d=s,p=l,a=R(u),t){await t.update(s,l);return}if(!n){h&&await I(h,s,l,u);return}await n.updateDiff(y(s),y(l))}function k(){c++,i?.dispose(),t?.dispose(),t||n?.dispose(),i=void 0,t=void 0,n=void 0,r=void 0,o=void 0,h=void 0}async function O(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"file",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}async function V(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"merge-conflict",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}function _(s){return e.mergeConflict===!1?!1:/^<<<<<<< .+$/m.test(s)&&/^=======$/m.test(s)&&/^>>>>>>> .+$/m.test(s)}async function J(s){if(s){if(typeof s=="string"){const l=e.themes;if(l?.[0]===s){await W(),g="dark",i?.setThemeType("dark"),t?.setThemeType("dark"),n?.setThemeType("dark");return}if(l?.[1]===s){await W(),g="light",i?.setThemeType("light"),t?.setThemeType("light"),n?.setThemeType("light");return}}T=void 0,S=s,await j(s)}}async function W(){const s=q(e);!s||s===T||(T=s,S=U(e),await j(S))}async function j(s){await i?.setTheme(s),await t?.setTheme(s),await n?.setTheme(s)}function y(s){return E(`code.${a||"txt"}`,s,a)}return{runtimeKind:"stream-diffs",createEditor:H,createDiffEditor:I,updateCode:X,appendCode(s){i?.append(s)},async finalizeCode(){if(!i||i.getState()==="finalized")return i?.getFinalizedSurface();const s=F(e);return delete s.lineAnnotations,await i.finalize({view:"file",...s,theme:S,themeType:g,annotations:e.lineAnnotations,workerManager:e.workerManager}),i.getFinalizedSurface()},async finalizeDiff(){return t&&(n=await t.finalize(e.lineAnnotations)),n},updateDiff:P,updateOriginal(s,l=a){return P(s,p,l)},updateModified(s,l=a){return P(d,s,l)},appendOriginal(s,l=a){return P(d+s,p,l)},appendModified(s,l=a){return P(d,p+s,l)},cleanupEditor:k,safeClean:k,setTheme:J,async setLanguage(s){if(a=R(s),await i?.setLanguage(a),await t?.setLanguage(a),n&&!t){const l=n.getInput();l.kind==="file"||l.kind==="merge-conflict"?await n.update({...l,file:{...l.file,lang:a}}):l.kind==="diff"&&"oldFile"in l&&await n.update({...l,oldFile:{...l.oldFile,lang:a},newFile:{...l.newFile,lang:a}})}},getCurrentTheme:()=>S,getEditor:()=>le,getEditorView:()=>r??null,getDiffEditorView:()=>o??null,getDiffModels:()=>({original:D(()=>d),modified:D(()=>n?.getResolvedFile()?.contents??t?.getModified()??p)}),getCode:()=>{const s=n?.getInput();return s?.kind==="diff"||s?.kind==="patch"?{original:d,modified:n?.getResolvedFile()?.contents??p}:s?.kind==="file"||s?.kind==="merge-conflict"?s.file.contents:t?{original:t.getOriginal(),modified:t.getModified()}:i?.getText()??null},refreshDiffPresentation:()=>n?.update(n.getInput()),whenVisualReady:async()=>{const s=h,l=c,u=n??i?.getFinalizedSurface()??t?.getFinalizedSurface();return!u||!await u.whenVisualReady()?!1:ne(s,()=>l===c&&s===h&&u===(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()),()=>se(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()))}}}async function ne(e,i,t){if(!e||typeof window>"u")return!1;let n="",r,o=0;for(let a=0;a<120;a+=1){if(!i())return!1;const d=e.querySelector(".stream-diffs-shell"),p=d?.querySelector("diffs-container")?.shadowRoot?.querySelector("pre"),h=d?.getBoundingClientRect(),c=p?.textContent??"";if(h&&h.width>0&&h.height>0&&p&&t()){const g=`${Math.round(h.width)}:${Math.round(h.height)}:${p.scrollWidth}:${p.scrollHeight}:${c.length}`;if(o=p===r&&g===n?o+1:1,r=p,n=g,o>=2)return!0}else n="",r=void 0,o=0;await ae()}return!1}function se(e){if(!e)return!0;const i=e.getNativeInstance(),t=i?.fileRenderer??i?.hunksRenderer;if(!t)return!0;const n=t.renderCache;if(!n?.result)return!1;if(n.highlighted===!0)return!0;const r=e.getInput();if(R(r.kind==="file"||r.kind==="merge-conflict"?r.file.lang:"oldFile"in r?r.oldFile.lang??r.newFile.lang:e.getDiff()?.lang)==="text")return!0;const o=Number(t.getTokenizeMaxLength?.()??1e5);if(r.kind==="file"||r.kind==="merge-conflict")return re(r.file.contents)>o;const a=e.getDiff();return!!a&&Math.max(a.additionLines.length,a.deletionLines.length)>o}function R(e){return!e||/^(?:text|txt|plain|plaintext)$/i.test(e)?"text":e}function re(e){if(!e)return 0;let i=1;for(let t=0;t{let i=!1;const t=()=>{i||(i=!0,window.clearTimeout(r),window.cancelAnimationFrame(n),e())},n=window.requestAnimationFrame(t),r=window.setTimeout(t,50)})}function U(e){return e.themes?.length&&typeof e.themes[0]=="string"&&typeof e.themes[1]=="string"?{dark:e.themes[0],light:e.themes[1]}:e.theme??void 0}function q(e){if(!(typeof e.themes?.[0]!="string"||typeof e.themes?.[1]!="string"))return`${e.themes[0]} diff --git a/apps/pythinker-code/dist-web/assets/index-vF2s5p7P.js b/apps/pythinker-code/dist-web/assets/index-BZ9wqq8Z.js similarity index 57% rename from apps/pythinker-code/dist-web/assets/index-vF2s5p7P.js rename to apps/pythinker-code/dist-web/assets/index-BZ9wqq8Z.js index d1a402c8d..907f6844e 100644 --- a/apps/pythinker-code/dist-web/assets/index-vF2s5p7P.js +++ b/apps/pythinker-code/dist-web/assets/index-BZ9wqq8Z.js @@ -1,45 +1,45 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-CpAzSMMN.js","assets/DesignSystemView-I872M2Sr.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-BgUXBQ9g.js","assets/purify.es-5AjVNlXF.js","assets/CodeBlockNode-DhHNvLD-.js","assets/safeRaf-DGuzXxDK.js","assets/index5-ClJqsKuw.js","assets/index11-H71ylPuM.js","assets/editor.main-BVyazG_A.js","assets/editor-Ck3IbhyB.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-DhJc-Ocy.js","assets/DesignSystemView-I872M2Sr.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-BusHtpbx.js","assets/purify.es-5AjVNlXF.js","assets/CodeBlockNode-D4cpL5UZ.js","assets/safeRaf-DGuzXxDK.js","assets/index5-DRYrcfDq.js","assets/index11-BtnGHbJw.js","assets/editor.main-yCrGDkyO.js","assets/editor-Ck3IbhyB.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/** * @vue/shared v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function ap(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Yn={},eu=[],Ol=()=>{},CM=()=>!1,df=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cp=e=>e.startsWith("onUpdate:"),xo=Object.assign,ig=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},XB=Object.prototype.hasOwnProperty,fo=(e,t)=>XB.call(e,t),rn=Array.isArray,tu=e=>zu(e)==="[object Map]",Z0=e=>zu(e)==="[object Set]",Qy=e=>zu(e)==="[object Date]",JB=e=>zu(e)==="[object RegExp]",_n=e=>typeof e=="function",To=e=>typeof e=="string",dl=e=>typeof e=="symbol",po=e=>e!==null&&typeof e=="object",lg=e=>(po(e)||_n(e))&&_n(e.then)&&_n(e.catch),MM=Object.prototype.toString,zu=e=>MM.call(e),QB=e=>zu(e).slice(8,-1),up=e=>zu(e)==="[object Object]",dp=e=>To(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,E0=ap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fp=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},eR=/-\w/g,Fs=fp(e=>e.replace(eR,t=>t.slice(1).toUpperCase())),tR=/\B([A-Z])/g,Wi=fp(e=>e.replace(tR,"-$1").toLowerCase()),pp=fp(e=>e.charAt(0).toUpperCase()+e.slice(1)),i4=fp(e=>e?`on${pp(e)}`:""),Qs=(e,t)=>!Object.is(e,t),nu=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},hp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},F4=e=>{const t=To(e)?Number(e):NaN;return isNaN(t)?e:t};let ew;const mp=()=>ew||(ew=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),nR="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",oR=ap(nR);function Gt(e){if(rn(e)){const t={};for(let n=0;n{if(n){const o=n.split(iR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Pe(e){let t="";if(To(e))t=e;else if(rn(e))for(let n=0;nga(n,t))}const EM=e=>!!(e&&e.__v_isRef===!0),E=e=>To(e)?e:e==null?"":rn(e)||po(e)&&(e.toString===MM||!_n(e.toString))?EM(e)?E(e.value):JSON.stringify(e,IM,2):String(e),IM=(e,t)=>EM(t)?IM(e,t.value):tu(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[nh(o,i)+" =>"]=s,n),{})}:Z0(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>nh(n))}:dl(t)?nh(t):po(t)&&!rn(t)&&!up(t)?String(t):t,nh=(e,t="")=>{var n;return dl(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function fR(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** +**/function up(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Yn={},eu=[],Ol=()=>{},TM=()=>!1,ff=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),dp=e=>e.startsWith("onUpdate:"),xo=Object.assign,rg=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sR=Object.prototype.hasOwnProperty,fo=(e,t)=>sR.call(e,t),rn=Array.isArray,tu=e=>Bu(e)==="[object Map]",U0=e=>Bu(e)==="[object Set]",tw=e=>Bu(e)==="[object Date]",iR=e=>Bu(e)==="[object RegExp]",_n=e=>typeof e=="function",To=e=>typeof e=="string",dl=e=>typeof e=="symbol",po=e=>e!==null&&typeof e=="object",ag=e=>(po(e)||_n(e))&&_n(e.then)&&_n(e.catch),EM=Object.prototype.toString,Bu=e=>EM.call(e),lR=e=>Bu(e).slice(8,-1),fp=e=>Bu(e)==="[object Object]",pp=e=>To(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,T0=up(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hp=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},rR=/-\w/g,Fs=hp(e=>e.replace(rR,t=>t.slice(1).toUpperCase())),aR=/\B([A-Z])/g,Wi=hp(e=>e.replace(aR,"-$1").toLowerCase()),mp=hp(e=>e.charAt(0).toUpperCase()+e.slice(1)),l4=hp(e=>e?`on${mp(e)}`:""),Qs=(e,t)=>!Object.is(e,t),nu=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},gp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},j4=e=>{const t=To(e)?Number(e):NaN;return isNaN(t)?e:t};let nw;const vp=()=>nw||(nw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),cR="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",uR=up(cR);function Gt(e){if(rn(e)){const t={};for(let n=0;n{if(n){const o=n.split(fR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Be(e){let t="";if(To(e))t=e;else if(rn(e))for(let n=0;nma(n,t))}const $M=e=>!!(e&&e.__v_isRef===!0),I=e=>To(e)?e:e==null?"":rn(e)||po(e)&&(e.toString===EM||!_n(e.toString))?$M(e)?I(e.value):JSON.stringify(e,NM,2):String(e),NM=(e,t)=>$M(t)?NM(e,t.value):tu(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[sh(o,i)+" =>"]=s,n),{})}:U0(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sh(n))}:dl(t)?sh(t):po(t)&&!rn(t)&&!fp(t)?String(t):t,sh=(e,t="")=>{var n;return dl(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function wR(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** * @vue/reactivity v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Bs;class $M{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Bs&&(Bs.active?(this.parent=Bs,this.index=(Bs.scopes||(Bs.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(Bs===this)Bs=this.prevScope;else{let t=Bs;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(s2){let t=s2;for(s2=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;o2;){let t=o2;for(o2=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function zM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function BM(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),ug(o),hR(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function t8(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(RM(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function RM(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===A2)||(e.globalVersion=A2,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!t8(e))))return;e.flags|=2;const t=e.dep,n=No,o=rr;No=e,rr=!0;try{zM(e);const s=e.fn(e._value);(t.version===0||Qs(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{No=n,rr=o,BM(e),e.flags&=-3}}function ug(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)ug(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function hR(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function FUe(e,t){e.effect instanceof j4&&(e=e.effect.fn);const n=new j4(e);t&&xo(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function jUe(e){e.effect.stop()}let rr=!0;const PM=[];function va(){PM.push(rr),rr=!1}function ya(){const e=PM.pop();rr=e===void 0?!0:e}function tw(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=No;No=void 0;try{t()}finally{No=n}}}let A2=0;class mR{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class vp{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!No||!rr||No===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==No)n=this.activeLink=new mR(No,this),No.deps?(n.prevDep=No.depsTail,No.depsTail.nextDep=n,No.depsTail=n):No.deps=No.depsTail=n,FM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=No.depsTail,n.nextDep=void 0,No.depsTail.nextDep=n,No.depsTail=n,No.deps===n&&(No.deps=o)}return n}trigger(t){this.version++,A2++,this.notify(t)}notify(t){ag();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{cg()}}}function FM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)FM(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const O4=new WeakMap,I0=Symbol(""),n8=Symbol(""),T2=Symbol("");function ui(e,t,n){if(rr&&No){let o=O4.get(e);o||O4.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new vp),s.map=o,s.key=n),s.track()}}function la(e,t,n,o,s,i){const l=O4.get(e);if(!l){A2++;return}const r=a=>{a&&a.trigger()};if(ag(),t==="clear")l.forEach(r);else{const a=rn(e),c=a&&dp(n);if(a&&n==="length"){const u=Number(o);l.forEach((d,f)=>{(f==="length"||f===T2||!dl(f)&&f>=u)&&r(d)})}else switch((n!==void 0||l.has(void 0))&&r(l.get(n)),c&&r(l.get(T2)),t){case"add":a?c&&r(l.get("length")):(r(l.get(I0)),tu(e)&&r(l.get(n8)));break;case"delete":a||(r(l.get(I0)),tu(e)&&r(l.get(n8)));break;case"set":tu(e)&&r(l.get(I0));break}}cg()}function gR(e,t){const n=O4.get(e);return n&&n.get(t)}function kc(e){const t=so(e);return t===e?t:(ui(t,"iterate",T2),il(e)?t:t.map(cr))}function yp(e){return ui(e=so(e),"iterate",T2),e}function Mr(e,t){return wa(e)?wu(r1(e)?cr(t):t):cr(t)}const vR={__proto__:null,[Symbol.iterator](){return sh(this,Symbol.iterator,e=>Mr(this,e))},concat(...e){return kc(this).concat(...e.map(t=>rn(t)?kc(t):t))},entries(){return sh(this,"entries",e=>(e[1]=Mr(this,e[1]),e))},every(e,t){return Zr(this,"every",e,t,void 0,arguments)},filter(e,t){return Zr(this,"filter",e,t,n=>n.map(o=>Mr(this,o)),arguments)},find(e,t){return Zr(this,"find",e,t,n=>Mr(this,n),arguments)},findIndex(e,t){return Zr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Zr(this,"findLast",e,t,n=>Mr(this,n),arguments)},findLastIndex(e,t){return Zr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Zr(this,"forEach",e,t,void 0,arguments)},includes(...e){return ih(this,"includes",e)},indexOf(...e){return ih(this,"indexOf",e)},join(e){return kc(this).join(e)},lastIndexOf(...e){return ih(this,"lastIndexOf",e)},map(e,t){return Zr(this,"map",e,t,void 0,arguments)},pop(){return vd(this,"pop")},push(...e){return vd(this,"push",e)},reduce(e,...t){return nw(this,"reduce",e,t)},reduceRight(e,...t){return nw(this,"reduceRight",e,t)},shift(){return vd(this,"shift")},some(e,t){return Zr(this,"some",e,t,void 0,arguments)},splice(...e){return vd(this,"splice",e)},toReversed(){return kc(this).toReversed()},toSorted(e){return kc(this).toSorted(e)},toSpliced(...e){return kc(this).toSpliced(...e)},unshift(...e){return vd(this,"unshift",e)},values(){return sh(this,"values",e=>Mr(this,e))}};function sh(e,t,n){const o=yp(e),s=o[t]();return o!==e&&!il(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const yR=Array.prototype;function Zr(e,t,n,o,s,i){const l=yp(e),r=l!==e&&!il(e),a=l[t];if(a!==yR[t]){const d=a.apply(e,i);return r?cr(d):d}let c=n;l!==e&&(r?c=function(d,f){return n.call(this,Mr(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=a.call(l,c,o);return r&&s?s(u):u}function nw(e,t,n,o){const s=yp(e),i=s!==e&&!il(e);let l=n,r=!1;s!==e&&(i?(r=o.length===0,l=function(c,u,d){return r&&(r=!1,c=Mr(e,c)),n.call(this,c,Mr(e,u),d,e)}):n.length>3&&(l=function(c,u,d){return n.call(this,c,u,d,e)}));const a=s[t](l,...o);return r?Mr(e,a):a}function ih(e,t,n){const o=so(e);ui(o,"iterate",T2);const s=o[t](...n);return(s===-1||s===!1)&&bp(n[0])?(n[0]=so(n[0]),o[t](...n)):s}function vd(e,t,n=[]){va(),ag();const o=so(e)[t].apply(e,n);return cg(),ya(),o}const wR=ap("__proto__,__v_isRef,__isVue"),jM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(dl));function kR(e){dl(e)||(e=String(e));const t=so(this);return ui(t,"has",e),t.hasOwnProperty(e)}class OM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?UM:qM:i?WM:VM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const l=rn(t);if(!s){let a;if(l&&(a=vR[n]))return a;if(n==="hasOwnProperty")return kR}const r=Reflect.get(t,n,ps(t)?t:o);if((dl(n)?jM.has(n):wR(n))||(s||ui(t,"get",n),i))return r;if(ps(r)){const a=l&&dp(n)?r:r.value;return s&&po(a)?zl(a):a}return po(r)?s?zl(r):ds(r):r}}class HM extends OM{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const l=rn(t)&&dp(n);if(!this._isShallow){const c=wa(i);if(!il(o)&&!wa(o)&&(i=so(i),o=so(o)),!l&&ps(i)&&!ps(o))return c||(i.value=o),!0}const r=l?Number(n)e,t3=e=>Reflect.getPrototypeOf(e);function CR(e,t,n){return function(...o){const s=this.__v_raw,i=so(s),l=tu(i),r=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,c=s[e](...o),u=n?o8:t?wu:cr;return!t&&ui(i,"iterate",a?n8:I0),xo(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:r?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function n3(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function MR(e,t){const n={get(s){const i=this.__v_raw,l=so(i),r=so(s);e||(Qs(s,r)&&ui(l,"get",s),ui(l,"get",r));const{has:a}=t3(l),c=t?o8:e?wu:cr;if(a.call(l,s))return c(i.get(s));if(a.call(l,r))return c(i.get(r));i!==l&&i.get(s)},get size(){const s=this.__v_raw;return!e&&ui(so(s),"iterate",I0),s.size},has(s){const i=this.__v_raw,l=so(i),r=so(s);return e||(Qs(s,r)&&ui(l,"has",s),ui(l,"has",r)),s===r?i.has(s):i.has(s)||i.has(r)},forEach(s,i){const l=this,r=l.__v_raw,a=so(r),c=t?o8:e?wu:cr;return!e&&ui(a,"iterate",I0),r.forEach((u,d)=>s.call(i,c(u),c(d),l))}};return xo(n,e?{add:n3("add"),set:n3("set"),delete:n3("delete"),clear:n3("clear")}:{add(s){const i=so(this),l=t3(i),r=so(s),a=!t&&!il(s)&&!wa(s)?r:s;return l.has.call(i,a)||Qs(s,a)&&l.has.call(i,s)||Qs(r,a)&&l.has.call(i,r)||(i.add(a),la(i,"add",a,a)),this},set(s,i){!t&&!il(i)&&!wa(i)&&(i=so(i));const l=so(this),{has:r,get:a}=t3(l);let c=r.call(l,s);c||(s=so(s),c=r.call(l,s));const u=a.call(l,s);return l.set(s,i),c?Qs(i,u)&&la(l,"set",s,i):la(l,"add",s,i),this},delete(s){const i=so(this),{has:l,get:r}=t3(i);let a=l.call(i,s);a||(s=so(s),a=l.call(i,s)),r&&r.call(i,s);const c=i.delete(s);return a&&la(i,"delete",s,void 0),c},clear(){const s=so(this),i=s.size!==0,l=s.clear();return i&&la(s,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=CR(s,e,t)}),n}function wp(e,t){const n=MR(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(fo(n,s)&&s in o?n:o,s,i)}const AR={get:wp(!1,!1)},TR={get:wp(!1,!0)},ER={get:wp(!0,!1)},IR={get:wp(!0,!0)},VM=new WeakMap,WM=new WeakMap,qM=new WeakMap,UM=new WeakMap;function $R(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return wa(e)?e:kp(e,!1,bR,AR,VM)}function LR(e){return kp(e,!1,xR,TR,WM)}function zl(e){return kp(e,!0,_R,ER,qM)}function OUe(e){return kp(e,!0,SR,IR,UM)}function kp(e,t,n,o,s){if(!po(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const l=$R(QB(e));if(l===0)return e;const r=new Proxy(e,l===2?o:n);return s.set(e,r),r}function r1(e){return wa(e)?r1(e.__v_raw):!!(e&&e.__v_isReactive)}function wa(e){return!!(e&&e.__v_isReadonly)}function il(e){return!!(e&&e.__v_isShallow)}function bp(e){return e?!!e.__v_raw:!1}function so(e){const t=e&&e.__v_raw;return t?so(t):e}function $t(e){return!fo(e,"__v_skip")&&Object.isExtensible(e)&&AM(e,"__v_skip",!0),e}const cr=e=>po(e)?ds(e):e,wu=e=>po(e)?zl(e):e;function ps(e){return e?e.__v_isRef===!0:!1}function V(e){return ZM(e,!1)}function Uo(e){return ZM(e,!0)}function ZM(e,t){return ps(e)?e:new NR(e,t)}class NR{constructor(t,n){this.dep=new vp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:so(t),this._value=n?t:cr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||il(t)||wa(t);t=o?t:so(t),Qs(t,n)&&(this._rawValue=t,this._value=o?t:cr(t),this.dep.trigger())}}function zR(e){e.dep&&e.dep.trigger()}function v(e){return ps(e)?e.value:e}function s8(e){return _n(e)?e():v(e)}const BR={get:(e,t,n)=>t==="__v_raw"?e:v(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return ps(s)&&!ps(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function KM(e){return r1(e)?e:new Proxy(e,BR)}class RR{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new vp,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function PR(e){return new RR(e)}function HUe(e){const t=rn(e)?new Array(e.length):{};for(const n in e)t[n]=GM(e,n);return t}class FR{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=dl(n)?n:String(n),this._raw=so(t);let s=!0,i=t;if(!rn(t)||dl(this._key)||!dp(this._key))do s=!bp(i)||il(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=v(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ps(this._raw[this._key])){const n=this._object[this._key];if(ps(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return gR(this._raw,this._key)}}class jR{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function DUe(e,t,n){return ps(e)?e:_n(e)?new jR(e):po(e)&&arguments.length>1?GM(e,t,n):V(e)}function GM(e,t,n){return new FR(e,t,n)}class OR{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new vp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=A2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&No!==this)return NM(this,!0),!0}get value(){const t=this.dep.track();return RM(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function HR(e,t,n=!1){let o,s;return _n(e)?o=e:(o=e.get,s=e.set),new OR(o,s,n)}const VUe={GET:"get",HAS:"has",ITERATE:"iterate"},WUe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},o3={},H4=new WeakMap;let Ga;function qUe(){return Ga}function DR(e,t=!1,n=Ga){if(n){let o=H4.get(n);o||H4.set(n,o=[]),o.push(e)}}function VR(e,t,n=Yn){const{immediate:o,deep:s,once:i,scheduler:l,augmentJob:r,call:a}=n,c=_=>s?_:il(_)||s===!1||s===0?ra(_,1):ra(_);let u,d,f,p,h=!1,m=!1;if(ps(e)?(d=()=>e.value,h=il(e)):r1(e)?(d=()=>c(e),h=!0):rn(e)?(m=!0,h=e.some(_=>r1(_)||il(_)),d=()=>e.map(_=>{if(ps(_))return _.value;if(r1(_))return c(_);if(_n(_))return a?a(_,2):_()})):_n(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){va();try{f()}finally{ya()}}const _=Ga;Ga=u;try{return a?a(e,3,[p]):e(p)}finally{Ga=_}}:d=Ol,t&&s){const _=d,M=s===!0?1/0:s;d=()=>ra(_(),M)}const k=rg(),x=()=>{u.stop(),k&&k.active&&ig(k.effects,u)};if(i&&t){const _=t;t=(...M)=>{_(...M),x()}}let y=m?new Array(e.length).fill(o3):o3;const w=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const M=u.run();if(s||h||(m?M.some((P,B)=>Qs(P,y[B])):Qs(M,y))){f&&f();const P=Ga;Ga=u;try{const B=[M,y===o3?void 0:m&&y[0]===o3?[]:y,p];y=M,a?a(t,3,B):t(...B)}finally{Ga=P}}}else u.run()};return r&&r(w),u=new j4(d),u.scheduler=l?()=>l(w,!1):w,p=_=>DR(_,!1,u),f=u.onStop=()=>{const _=H4.get(u);if(_){if(a)a(_,4);else for(const M of _)M();H4.delete(u)}},t?o?w(!0):y=u.run():l?l(w.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function ra(e,t=1/0,n){if(t<=0||!po(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ps(e))ra(e.value,t,n);else if(rn(e))for(let o=0;o{ra(o,t,n)});else if(up(e)){for(const o in e)ra(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&ra(e[o],t,n)}return e}/** +**/let Bs;class zM{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Bs&&(Bs.active?(this.parent=Bs,this.index=(Bs.scopes||(Bs.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(Bs===this)Bs=this.prevScope;else{let t=Bs;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(s2){let t=s2;for(s2=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;o2;){let t=o2;for(o2=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function PM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function FM(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),fg(o),bR(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function o8(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(jM(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function jM(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===A2)||(e.globalVersion=A2,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!o8(e))))return;e.flags|=2;const t=e.dep,n=No,o=rr;No=e,rr=!0;try{PM(e);const s=e.fn(e._value);(t.version===0||Qs(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{No=n,rr=o,FM(e),e.flags&=-3}}function fg(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)fg(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function bR(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function vZe(e,t){e.effect instanceof O4&&(e=e.effect.fn);const n=new O4(e);t&&xo(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function yZe(e){e.effect.stop()}let rr=!0;const OM=[];function ga(){OM.push(rr),rr=!1}function va(){const e=OM.pop();rr=e===void 0?!0:e}function ow(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=No;No=void 0;try{t()}finally{No=n}}}let A2=0;class _R{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class wp{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!No||!rr||No===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==No)n=this.activeLink=new _R(No,this),No.deps?(n.prevDep=No.depsTail,No.depsTail.nextDep=n,No.depsTail=n):No.deps=No.depsTail=n,HM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=No.depsTail,n.nextDep=void 0,No.depsTail.nextDep=n,No.depsTail=n,No.deps===n&&(No.deps=o)}return n}trigger(t){this.version++,A2++,this.notify(t)}notify(t){ug();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{dg()}}}function HM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)HM(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const H4=new WeakMap,E0=Symbol(""),s8=Symbol(""),T2=Symbol("");function ui(e,t,n){if(rr&&No){let o=H4.get(e);o||H4.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new wp),s.map=o,s.key=n),s.track()}}function la(e,t,n,o,s,i){const l=H4.get(e);if(!l){A2++;return}const r=a=>{a&&a.trigger()};if(ug(),t==="clear")l.forEach(r);else{const a=rn(e),c=a&&pp(n);if(a&&n==="length"){const u=Number(o);l.forEach((d,f)=>{(f==="length"||f===T2||!dl(f)&&f>=u)&&r(d)})}else switch((n!==void 0||l.has(void 0))&&r(l.get(n)),c&&r(l.get(T2)),t){case"add":a?c&&r(l.get("length")):(r(l.get(E0)),tu(e)&&r(l.get(s8)));break;case"delete":a||(r(l.get(E0)),tu(e)&&r(l.get(s8)));break;case"set":tu(e)&&r(l.get(E0));break}}dg()}function xR(e,t){const n=H4.get(e);return n&&n.get(t)}function wc(e){const t=so(e);return t===e?t:(ui(t,"iterate",T2),il(e)?t:t.map(cr))}function kp(e){return ui(e=so(e),"iterate",T2),e}function Ar(e,t){return ya(e)?ku(l1(e)?cr(t):t):cr(t)}const SR={__proto__:null,[Symbol.iterator](){return lh(this,Symbol.iterator,e=>Ar(this,e))},concat(...e){return wc(this).concat(...e.map(t=>rn(t)?wc(t):t))},entries(){return lh(this,"entries",e=>(e[1]=Ar(this,e[1]),e))},every(e,t){return Kr(this,"every",e,t,void 0,arguments)},filter(e,t){return Kr(this,"filter",e,t,n=>n.map(o=>Ar(this,o)),arguments)},find(e,t){return Kr(this,"find",e,t,n=>Ar(this,n),arguments)},findIndex(e,t){return Kr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Kr(this,"findLast",e,t,n=>Ar(this,n),arguments)},findLastIndex(e,t){return Kr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Kr(this,"forEach",e,t,void 0,arguments)},includes(...e){return rh(this,"includes",e)},indexOf(...e){return rh(this,"indexOf",e)},join(e){return wc(this).join(e)},lastIndexOf(...e){return rh(this,"lastIndexOf",e)},map(e,t){return Kr(this,"map",e,t,void 0,arguments)},pop(){return vd(this,"pop")},push(...e){return vd(this,"push",e)},reduce(e,...t){return sw(this,"reduce",e,t)},reduceRight(e,...t){return sw(this,"reduceRight",e,t)},shift(){return vd(this,"shift")},some(e,t){return Kr(this,"some",e,t,void 0,arguments)},splice(...e){return vd(this,"splice",e)},toReversed(){return wc(this).toReversed()},toSorted(e){return wc(this).toSorted(e)},toSpliced(...e){return wc(this).toSpliced(...e)},unshift(...e){return vd(this,"unshift",e)},values(){return lh(this,"values",e=>Ar(this,e))}};function lh(e,t,n){const o=kp(e),s=o[t]();return o!==e&&!il(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const CR=Array.prototype;function Kr(e,t,n,o,s,i){const l=kp(e),r=l!==e&&!il(e),a=l[t];if(a!==CR[t]){const d=a.apply(e,i);return r?cr(d):d}let c=n;l!==e&&(r?c=function(d,f){return n.call(this,Ar(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=a.call(l,c,o);return r&&s?s(u):u}function sw(e,t,n,o){const s=kp(e),i=s!==e&&!il(e);let l=n,r=!1;s!==e&&(i?(r=o.length===0,l=function(c,u,d){return r&&(r=!1,c=Ar(e,c)),n.call(this,c,Ar(e,u),d,e)}):n.length>3&&(l=function(c,u,d){return n.call(this,c,u,d,e)}));const a=s[t](l,...o);return r?Ar(e,a):a}function rh(e,t,n){const o=so(e);ui(o,"iterate",T2);const s=o[t](...n);return(s===-1||s===!1)&&xp(n[0])?(n[0]=so(n[0]),o[t](...n)):s}function vd(e,t,n=[]){ga(),ug();const o=so(e)[t].apply(e,n);return dg(),va(),o}const MR=up("__proto__,__v_isRef,__isVue"),DM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(dl));function AR(e){dl(e)||(e=String(e));const t=so(this);return ui(t,"has",e),t.hasOwnProperty(e)}class VM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?GM:KM:i?ZM:UM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const l=rn(t);if(!s){let a;if(l&&(a=SR[n]))return a;if(n==="hasOwnProperty")return AR}const r=Reflect.get(t,n,ps(t)?t:o);if((dl(n)?DM.has(n):MR(n))||(s||ui(t,"get",n),i))return r;if(ps(r)){const a=l&&pp(n)?r:r.value;return s&&po(a)?zl(a):a}return po(r)?s?zl(r):ds(r):r}}class WM extends VM{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const l=rn(t)&&pp(n);if(!this._isShallow){const c=ya(i);if(!il(o)&&!ya(o)&&(i=so(i),o=so(o)),!l&&ps(i)&&!ps(o))return c||(i.value=o),!0}const r=l?Number(n)e,o3=e=>Reflect.getPrototypeOf(e);function $R(e,t,n){return function(...o){const s=this.__v_raw,i=so(s),l=tu(i),r=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,c=s[e](...o),u=n?i8:t?ku:cr;return!t&&ui(i,"iterate",a?s8:E0),xo(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:r?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function s3(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function NR(e,t){const n={get(s){const i=this.__v_raw,l=so(i),r=so(s);e||(Qs(s,r)&&ui(l,"get",s),ui(l,"get",r));const{has:a}=o3(l),c=t?i8:e?ku:cr;if(a.call(l,s))return c(i.get(s));if(a.call(l,r))return c(i.get(r));i!==l&&i.get(s)},get size(){const s=this.__v_raw;return!e&&ui(so(s),"iterate",E0),s.size},has(s){const i=this.__v_raw,l=so(i),r=so(s);return e||(Qs(s,r)&&ui(l,"has",s),ui(l,"has",r)),s===r?i.has(s):i.has(s)||i.has(r)},forEach(s,i){const l=this,r=l.__v_raw,a=so(r),c=t?i8:e?ku:cr;return!e&&ui(a,"iterate",E0),r.forEach((u,d)=>s.call(i,c(u),c(d),l))}};return xo(n,e?{add:s3("add"),set:s3("set"),delete:s3("delete"),clear:s3("clear")}:{add(s){const i=so(this),l=o3(i),r=so(s),a=!t&&!il(s)&&!ya(s)?r:s;return l.has.call(i,a)||Qs(s,a)&&l.has.call(i,s)||Qs(r,a)&&l.has.call(i,r)||(i.add(a),la(i,"add",a,a)),this},set(s,i){!t&&!il(i)&&!ya(i)&&(i=so(i));const l=so(this),{has:r,get:a}=o3(l);let c=r.call(l,s);c||(s=so(s),c=r.call(l,s));const u=a.call(l,s);return l.set(s,i),c?Qs(i,u)&&la(l,"set",s,i):la(l,"add",s,i),this},delete(s){const i=so(this),{has:l,get:r}=o3(i);let a=l.call(i,s);a||(s=so(s),a=l.call(i,s)),r&&r.call(i,s);const c=i.delete(s);return a&&la(i,"delete",s,void 0),c},clear(){const s=so(this),i=s.size!==0,l=s.clear();return i&&la(s,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=$R(s,e,t)}),n}function bp(e,t){const n=NR(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(fo(n,s)&&s in o?n:o,s,i)}const zR={get:bp(!1,!1)},BR={get:bp(!1,!0)},RR={get:bp(!0,!1)},PR={get:bp(!0,!0)},UM=new WeakMap,ZM=new WeakMap,KM=new WeakMap,GM=new WeakMap;function FR(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return ya(e)?e:_p(e,!1,TR,zR,UM)}function jR(e){return _p(e,!1,IR,BR,ZM)}function zl(e){return _p(e,!0,ER,RR,KM)}function wZe(e){return _p(e,!0,LR,PR,GM)}function _p(e,t,n,o,s){if(!po(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const l=FR(lR(e));if(l===0)return e;const r=new Proxy(e,l===2?o:n);return s.set(e,r),r}function l1(e){return ya(e)?l1(e.__v_raw):!!(e&&e.__v_isReactive)}function ya(e){return!!(e&&e.__v_isReadonly)}function il(e){return!!(e&&e.__v_isShallow)}function xp(e){return e?!!e.__v_raw:!1}function so(e){const t=e&&e.__v_raw;return t?so(t):e}function It(e){return!fo(e,"__v_skip")&&Object.isExtensible(e)&&IM(e,"__v_skip",!0),e}const cr=e=>po(e)?ds(e):e,ku=e=>po(e)?zl(e):e;function ps(e){return e?e.__v_isRef===!0:!1}function V(e){return YM(e,!1)}function Uo(e){return YM(e,!0)}function YM(e,t){return ps(e)?e:new OR(e,t)}class OR{constructor(t,n){this.dep=new wp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:so(t),this._value=n?t:cr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||il(t)||ya(t);t=o?t:so(t),Qs(t,n)&&(this._rawValue=t,this._value=o?t:cr(t),this.dep.trigger())}}function HR(e){e.dep&&e.dep.trigger()}function v(e){return ps(e)?e.value:e}function l8(e){return _n(e)?e():v(e)}const DR={get:(e,t,n)=>t==="__v_raw"?e:v(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return ps(s)&&!ps(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function XM(e){return l1(e)?e:new Proxy(e,DR)}class VR{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new wp,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function WR(e){return new VR(e)}function kZe(e){const t=rn(e)?new Array(e.length):{};for(const n in e)t[n]=JM(e,n);return t}class qR{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=dl(n)?n:String(n),this._raw=so(t);let s=!0,i=t;if(!rn(t)||dl(this._key)||!pp(this._key))do s=!xp(i)||il(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=v(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ps(this._raw[this._key])){const n=this._object[this._key];if(ps(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return xR(this._raw,this._key)}}class UR{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function bZe(e,t,n){return ps(e)?e:_n(e)?new UR(e):po(e)&&arguments.length>1?JM(e,t,n):V(e)}function JM(e,t,n){return new qR(e,t,n)}class ZR{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new wp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=A2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&No!==this)return RM(this,!0),!0}get value(){const t=this.dep.track();return jM(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function KR(e,t,n=!1){let o,s;return _n(e)?o=e:(o=e.get,s=e.set),new ZR(o,s,n)}const _Ze={GET:"get",HAS:"has",ITERATE:"iterate"},xZe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},i3={},D4=new WeakMap;let Ka;function SZe(){return Ka}function GR(e,t=!1,n=Ka){if(n){let o=D4.get(n);o||D4.set(n,o=[]),o.push(e)}}function YR(e,t,n=Yn){const{immediate:o,deep:s,once:i,scheduler:l,augmentJob:r,call:a}=n,c=_=>s?_:il(_)||s===!1||s===0?ra(_,1):ra(_);let u,d,f,p,h=!1,m=!1;if(ps(e)?(d=()=>e.value,h=il(e)):l1(e)?(d=()=>c(e),h=!0):rn(e)?(m=!0,h=e.some(_=>l1(_)||il(_)),d=()=>e.map(_=>{if(ps(_))return _.value;if(l1(_))return c(_);if(_n(_))return a?a(_,2):_()})):_n(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){ga();try{f()}finally{va()}}const _=Ka;Ka=u;try{return a?a(e,3,[p]):e(p)}finally{Ka=_}}:d=Ol,t&&s){const _=d,A=s===!0?1/0:s;d=()=>ra(_(),A)}const k=cg(),x=()=>{u.stop(),k&&k.active&&rg(k.effects,u)};if(i&&t){const _=t;t=(...A)=>{_(...A),x()}}let y=m?new Array(e.length).fill(i3):i3;const w=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const A=u.run();if(s||h||(m?A.some((P,z)=>Qs(P,y[z])):Qs(A,y))){f&&f();const P=Ka;Ka=u;try{const z=[A,y===i3?void 0:m&&y[0]===i3?[]:y,p];y=A,a?a(t,3,z):t(...z)}finally{Ka=P}}}else u.run()};return r&&r(w),u=new O4(d),u.scheduler=l?()=>l(w,!1):w,p=_=>GR(_,!1,u),f=u.onStop=()=>{const _=D4.get(u);if(_){if(a)a(_,4);else for(const A of _)A();D4.delete(u)}},t?o?w(!0):y=u.run():l?l(w.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function ra(e,t=1/0,n){if(t<=0||!po(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ps(e))ra(e.value,t,n);else if(rn(e))for(let o=0;o{ra(o,t,n)});else if(fp(e)){for(const o in e)ra(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&ra(e[o],t,n)}return e}/** * @vue/runtime-core v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const YM=[];function WR(e){YM.push(e)}function qR(){YM.pop()}function UUe(e,t){}const ZUe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},UR={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ff(e,t,n,o){try{return o?e(...o):e()}catch(s){Ru(s,t,n)}}function Dl(e,t,n,o){if(_n(e)){const s=ff(e,t,n,o);return s&&lg(s)&&s.catch(i=>{Ru(i,t,n)}),s}if(rn(e)){const s=[];for(let i=0;i>>1,s=Ci[o],i=E2(s);i=E2(n)?Ci.push(e):Ci.splice(KR(t),0,e),e.flags|=1,JM()}}function JM(){D4||(D4=XM.then(QM))}function V4(e){rn(e)?ou.push(...e):Ya&&e.id===-1?Ya.splice(Bc+1,0,e):e.flags&1||(ou.push(e),e.flags|=1),JM()}function ow(e,t,n=xr+1){for(;nE2(n)-E2(o));if(ou.length=0,Ya){Ya.push(...t);return}for(Ya=t,Bc=0;Bce.id==null?e.flags&2?-1:1/0:e.id;function QM(e){try{for(xr=0;xrRc.emit(s,...i)),s3=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{eA(i,t)}),setTimeout(()=>{Rc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,s3=[])},3e3)):s3=[]}let ti=null,_p=null;function I2(e){const t=ti;return ti=e,_p=e&&e.type.__scopeId||null,t}function KUe(e){_p=e}function GUe(){_p=null}const YUe=e=>ae;function ae(e,t=ti,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&G4(-1);const i=I2(t);let l;try{l=e(...s)}finally{I2(i),o._d&&G4(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function Jn(e,t){if(ti===null)return e;const n=gf(ti),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&_n(t)?t.call(o&&o.proxy):t}}function XUe(){return!!(Ts()||$0)}const GR=Symbol.for("v-scx"),YR=()=>fn(GR);function tA(e,t){return pf(e,null,t)}function JUe(e,t){return pf(e,null,{flush:"post"})}function XR(e,t){return pf(e,null,{flush:"sync"})}function Ze(e,t,n){return pf(e,t,n)}function pf(e,t,n=Yn){const{immediate:o,deep:s,flush:i,once:l}=n,r=xo({},n),a=t&&o||!t&&i!=="post";let c;if(F0){if(i==="sync"){const p=YR();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Ol,p.resume=Ol,p.pause=Ol,p}}const u=ei;r.call=(p,h,m)=>Dl(p,u,h,m);let d=!1;i==="post"?r.scheduler=p=>{ks(p,u&&u.suspense)}:i!=="sync"&&(d=!0,r.scheduler=(p,h)=>{h?p():dg(p)}),r.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=VR(e,t,r);return F0&&(c?c.push(f):a&&f()),f}function JR(e,t,n){const o=this.proxy,s=To(e)?e.includes(".")?nA(o,e):()=>o[e]:e.bind(o,o);let i;_n(t)?i=t:(i=t.handler,n=t);const l=Pu(this),r=pf(s,i.bind(o),n);return l(),r}function nA(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,m0=e=>e&&(e.disabled||e.disabled===""),QR=e=>e&&(e.defer||e.defer===""),sw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,iw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,i8=(e,t)=>{const n=e&&e.to;return To(n)?t?t(n):null:n},eP={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,l,r,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:x}}=c,y=m0(t.props);let{dynamicChildren:w}=t;const _=(B,$,T)=>{B.shapeFlag&16&&u(B.children,$,T,s,i,l,r,a)},M=(B=t)=>{const $=m0(B.props),T=B.target=i8(B.props,h),I=l8(T,B,m,p);T&&(l!=="svg"&&sw(T)?l="svg":l!=="mathml"&&iw(T)&&(l="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(T),$||(_(B,T,I),Od(B,!1)))},P=B=>{const $=()=>{if(qa.get(B)===$){if(qa.delete(B),m0(B.props)){const T=x(B.el)||n;_(B,T,B.anchor),Od(B,!0)}M(B)}};qa.set(B,$),ks($,i)};if(e==null){const B=t.el=m(""),$=t.anchor=m("");if(p(B,n,o),p($,n,o),QR(t.props)||i&&i.pendingBranch){P(t);return}y&&(_(t,n,$),Od(t,!0)),M()}else{t.el=e.el;const B=t.anchor=e.anchor,$=qa.get(e);if($){$.flags|=8,qa.delete(e),P(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,I=t.targetAnchor=e.targetAnchor,N=m0(e.props),C=N?n:T,O=N?B:I;if(l==="svg"||sw(T)?l="svg":(l==="mathml"||iw(T))&&(l="mathml"),w?(f(e.dynamicChildren,w,C,s,i,l,r),_g(e,t,!0)):a||d(e,t,C,O,s,i,l,r,!1),y)N?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):i3(t,n,B,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const H=t.target=i8(t.props,h);H&&i3(t,H,null,c,0)}else N&&i3(t,T,I,c,1);Od(t,y)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:l,children:r,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=i||!m0(f),h=qa.get(e);if(h&&(h.flags|=8,qa.delete(e)),d&&(s(c),s(u)),i&&s(a),!h&&l&16)for(let m=0;m{e.isMounted=!0}),vo(()=>{e.isUnmounting=!0}),e}const Ml=[Function,Array],lA={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ml,onEnter:Ml,onAfterEnter:Ml,onEnterCancelled:Ml,onBeforeLeave:Ml,onLeave:Ml,onAfterLeave:Ml,onLeaveCancelled:Ml,onBeforeAppear:Ml,onAppear:Ml,onAfterAppear:Ml,onAppearCancelled:Ml},rA=e=>{const t=e.subTree;return t.component?rA(t.component):t},nP={name:"BaseTransition",props:lA,setup(e,{slots:t}){const n=Ts(),o=iA();return()=>{const s=t.default&&fg(t.default(),!0),i=s&&s.length?aA(s):n.subTree?Y():void 0;if(!i)return;const l=so(e),{mode:r}=l;if(o.isLeaving)return lh(i);const a=lw(i);if(!a)return lh(i);let c=$2(a,l,o,n,d=>c=d);a.type!==xs&&g1(a,c);let u=n.subTree&&lw(n.subTree);if(u&&u.type!==xs&&!sr(u,a)&&rA(n).type!==xs){let d=$2(u,l,o,n);if(g1(u,d),r==="out-in"&&a.type!==xs)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},lh(i);r==="in-out"&&a.type!==xs?d.delayLeave=(f,p,h)=>{const m=cA(o,u);m[String(u.key)]=u,f[Nl]=()=>{p(),f[Nl]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function aA(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==xs){t=n;break}}return t}const oP=nP;function cA(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function $2(e,t,n,o,s){const{appear:i,mode:l,persisted:r=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:x,onAfterAppear:y,onAppearCancelled:w}=t,_=String(e.key),M=cA(n,e),P=(T,I)=>{T&&Dl(T,o,9,I)},B=(T,I)=>{const N=I[1];P(T,I),rn(T)?T.every(C=>C.length<=1)&&N():T.length<=1&&N()},$={mode:l,persisted:r,beforeEnter(T){let I=a;if(!n.isMounted)if(i)I=k||a;else return;T[Nl]&&T[Nl](!0);const N=M[_];N&&sr(e,N)&&N.el[Nl]&&N.el[Nl](),P(I,[T])},enter(T){if(M[_]===e)return;let I=c,N=u,C=d;if(!n.isMounted)if(i)I=x||c,N=y||u,C=w||d;else return;let O=!1;T[yd]=D=>{O||(O=!0,D?P(C,[T]):P(N,[T]),$.delayedLeave&&$.delayedLeave(),T[yd]=void 0)};const H=T[yd].bind(null,!1);I?B(I,[T,H]):H()},leave(T,I){const N=String(e.key);if(T[yd]&&T[yd](!0),n.isUnmounting)return I();P(f,[T]);let C=!1;T[Nl]=H=>{C||(C=!0,I(),H?P(m,[T]):P(h,[T]),T[Nl]=void 0,M[N]===e&&delete M[N])};const O=T[Nl].bind(null,!1);M[N]=e,p?B(p,[T,O]):O()},clone(T){const I=$2(T,t,n,o,s);return s&&s(I),I}};return $}function lh(e){if(hf(e))return e=ka(e),e.children=null,e}function lw(e){if(!hf(e))return sA(e.type)&&e.children?aA(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_n(n.default))return n.default()}}function g1(e,t){e.shapeFlag&6&&e.component?(e.transition=t,g1(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function fg(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function rw(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const q4=new WeakMap;function su(e,t,n,o,s=!1){if(rn(e)){e.forEach((m,k)=>su(m,t&&(rn(t)?t[k]:t),n,o,s));return}if(ma(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&su(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?gf(o.component):o.el,l=s?null:i,{i:r,r:a}=e,c=t&&t.r,u=r.refs===Yn?r.refs={}:r.refs,d=r.setupState,f=so(d),p=d===Yn?CM:m=>rw(u,m)?!1:fo(f,m),h=(m,k)=>!(k&&rw(u,k));if(c!=null&&c!==a){if(aw(t),To(c))u[c]=null,p(c)&&(d[c]=null);else if(ps(c)){const m=t;h(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(_n(a))ff(a,r,12,[l,u]);else{const m=To(a),k=ps(a);if(m||k){const x=()=>{if(e.f){const y=m?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(s)rn(y)&&ig(y,i);else if(rn(y))y.includes(i)||y.push(i);else if(m)u[a]=[i],p(a)&&(d[a]=u[a]);else{const w=[i];h(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else m?(u[a]=l,p(a)&&(d[a]=l)):k&&(h(a,e.k)&&(a.value=l),e.k&&(u[e.k]=l))};if(l){const y=()=>{x(),q4.delete(e)};y.id=-1,q4.set(e,y),ks(y,n)}else aw(e),x()}}}function aw(e){const t=q4.get(e);t&&(t.flags|=8,q4.delete(e))}let cw=!1;const bc=()=>{cw||(console.error("Hydration completed but contains mismatches."),cw=!0)},sP=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",iP=e=>e.namespaceURI.includes("MathML"),l3=e=>{if(e.nodeType===1){if(sP(e))return"svg";if(iP(e))return"mathml"}},Wc=e=>e.nodeType===8;function lP(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:l,remove:r,insert:a,createComment:c}}=e,u=(w,_)=>{if(!_.hasChildNodes()){n(null,w,_),W4(),_._vnode=w;return}d(_.firstChild,w,null,null,null),W4(),_._vnode=w},d=(w,_,M,P,B,$=!1)=>{$=$||!!_.dynamicChildren;const T=Wc(w)&&w.data==="[",I=()=>m(w,_,M,P,B,T),{type:N,ref:C,shapeFlag:O,patchFlag:H}=_;let D=w.nodeType;_.el=w,H===-2&&($=!1,_.dynamicChildren=null);let A=null;switch(N){case a1:D!==3?_.children===""?(a(_.el=s(""),l(w),w),A=w):A=I():(w.data!==_.children&&(bc(),w.data=_.children),A=i(w));break;case xs:y(w)?(A=i(w),x(_.el=w.content.firstChild,w,M)):D!==8||T?A=I():A=i(w);break;case lu:if(T&&(w=i(w),D=w.nodeType),D===1||D===3){A=w;const R=!_.children.length;for(let j=0;j<_.staticCount;j++)R&&(_.children+=A.nodeType===1?A.outerHTML:A.data),j===_.staticCount-1&&(_.anchor=A),A=i(A);return T?i(A):A}else I();break;case Ce:T?A=h(w,_,M,P,B,$):A=I();break;default:if(O&1)(D!==1||_.type.toLowerCase()!==w.tagName.toLowerCase())&&!y(w)?A=I():A=f(w,_,M,P,B,$);else if(O&6){_.slotScopeIds=B;const R=l(w);if(T?A=k(w):Wc(w)&&w.data==="teleport start"?A=k(w,w.data,"teleport end"):A=i(w),t(_,R,null,M,P,l3(R),$),ma(_)&&!_.type.__asyncResolved){let j;T?(j=W(Ce),j.anchor=A?A.previousSibling:R.lastChild):j=w.nodeType===3?Oe(""):W("div"),j.el=w,_.component.subTree=j}}else O&64?D!==8?A=I():A=_.type.hydrate(w,_,M,P,B,$,e,p):O&128&&(A=_.type.hydrate(w,_,M,P,l3(l(w)),B,$,e,d))}return C!=null&&su(C,null,P,_),A},f=(w,_,M,P,B,$)=>{$=$||!!_.dynamicChildren;const{type:T,props:I,patchFlag:N,shapeFlag:C,dirs:O,transition:H}=_,D=T==="input"||T==="option";if(D||N!==-1){O&&Sr(_,null,M,"created");let A=!1;if(y(w)){A=EA(null,H)&&M&&M.vnode.props&&M.vnode.props.appear;const j=w.content.firstChild;if(A){const q=j.getAttribute("class");q&&(j.$cls=q),H.beforeEnter(j)}x(j,w,M),_.el=w=j}if(C&16&&!(I&&(I.innerHTML||I.textContent))){let j=p(w.firstChild,_,w,M,P,B,$);for(j&&!r3(w,1)&&bc();j;){const q=j;j=j.nextSibling,r(q)}}else if(C&8){let j=_.children;j[0]===` -`&&(w.tagName==="PRE"||w.tagName==="TEXTAREA")&&(j=j.slice(1));const{textContent:q}=w;q!==j&&q!==j.replace(/\r\n|\r/g,` -`)&&(r3(w,0)||bc(),w.textContent=_.children)}if(I){if(D||!$||N&48){const j=w.tagName.includes("-");for(const q in I)(D&&(q.endsWith("value")||q==="indeterminate")||df(q)&&!E0(q)||q[0]==="."||j&&!E0(q))&&o(w,q,null,I[q],void 0,M)}else if(I.onClick)o(w,"onClick",null,I.onClick,void 0,M);else if(N&4&&r1(I.style))for(const j in I.style)I.style[j]}let R;(R=I&&I.onVnodeBeforeMount)&&ji(R,M,_),O&&Sr(_,null,M,"beforeMount"),((R=I&&I.onVnodeMounted)||O||A)&&NA(()=>{R&&ji(R,M,_),A&&H.enter(w),O&&Sr(_,null,M,"mounted")},P)}return w.nextSibling},p=(w,_,M,P,B,$,T)=>{T=T||!!_.dynamicChildren;const I=_.children,N=I.length;let C=!1;for(let O=0;O{const{slotScopeIds:T}=_;T&&(B=B?B.concat(T):T);const I=l(w),N=p(i(w),_,I,M,P,B,$);return N&&Wc(N)&&N.data==="]"?i(_.anchor=N):(bc(),a(_.anchor=c("]"),I,N),N)},m=(w,_,M,P,B,$)=>{if(r3(w.parentElement,1)||bc(),_.el=null,$){const N=k(w);for(;;){const C=i(w);if(C&&C!==N)r(C);else break}}const T=i(w),I=l(w);return r(w),n(null,_,I,T,M,P,l3(I),B),M&&(M.vnode.el=_.el,Cp(M,_.el)),T},k=(w,_="[",M="]")=>{let P=0;for(;w;)if(w=i(w),w&&Wc(w)&&(w.data===_&&P++,w.data===M)){if(P===0)return i(w);P--}return w},x=(w,_,M)=>{const P=_.parentNode;P&&P.replaceChild(w,_);let B=M;for(;B;)B.vnode.el===_&&(B.vnode.el=B.subTree.el=w),B=B.parent},y=w=>w.nodeType===1&&w.tagName==="TEMPLATE";return[u,d]}const uw="data-allow-mismatch",rP={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function r3(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(uw);)e=e.parentElement;const n=e&&e.getAttribute(uw);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(rP[t])}}const aP=mp().requestIdleCallback||(e=>setTimeout(e,1)),cP=mp().cancelIdleCallback||(e=>clearTimeout(e)),eZe=(e=1e4)=>t=>{const n=aP(t,{timeout:e});return()=>cP(n)};function uP(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:l}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(uP(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},nZe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},oZe=(e=[])=>(t,n)=>{To(e)&&(e=[e]);let o=!1;const s=l=>{o||(o=!0,i(),t(),l.target.dispatchEvent(new l.constructor(l.type,l)))},i=()=>{n(l=>{for(const r of e)l.removeEventListener(r,s)})};return n(l=>{for(const r of e)l.addEventListener(r,s,{once:!0})}),i};function dP(e,t){if(Wc(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(Wc(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const ma=e=>!!e.type.__asyncLoader;function Rl(e){_n(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:l,suspensible:r=!0,onError:a}=e;let c=null,u,d=0;const f=()=>(d++,c=null,p()),p=()=>{let h;return c||(h=c=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((k,x)=>{a(m,()=>k(f()),()=>x(m),d+1)});throw m}).then(m=>h!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return Je({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,k){let x=!1;(m.bu||(m.bu=[])).push(()=>x=!0);const y=()=>{x||k()},w=i?()=>{const _=i(y,M=>dP(h,M));_&&(m.bum||(m.bum=[])).push(_)}:y;u?w():p().then(()=>!m.isUnmounted&&w())},get __asyncResolved(){return u},setup(){const h=ei;if(pg(h),u)return()=>a3(u,h);const m=w=>{c=null,Ru(w,h,13,!o)};if(r&&h.suspense||F0)return p().then(w=>()=>a3(w,h)).catch(w=>(m(w),()=>o?W(o,{error:w}):null));const k=V(!1),x=V(),y=V(!!s);return s&&setTimeout(()=>{y.value=!1},s),l!=null&&setTimeout(()=>{if(!k.value&&!x.value){const w=new Error(`Async component timed out after ${l}ms.`);m(w),x.value=w}},l),p().then(()=>{k.value=!0,h.parent&&hf(h.parent.vnode)&&h.parent.update()}).catch(w=>{m(w),x.value=w}),()=>{if(k.value&&u)return a3(u,h);if(x.value&&o)return W(o,{error:x.value});if(n&&!y.value)return a3(n,h)}}})}function a3(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,l=W(e,o,s);return l.ref=n,l.ce=i,delete t.vnode.ce,l}const hf=e=>e.type.__isKeepAlive,fP={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ts(),o=n.ctx;if(!o.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const s=new Map,i=new Set;let l=null;const r=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(y,w,_,M,P)=>{const B=y.component;c(y,w,_,0,r),a(B.vnode,y,w,_,B,r,M,y.slotScopeIds,P),ks(()=>{B.isDeactivated=!1,B.a&&nu(B.a);const $=y.props&&y.props.onVnodeMounted;$&&ji($,B.parent,y)},r)},o.deactivate=y=>{const w=y.component;Z4(w.m),Z4(w.a),c(y,f,null,1,r),ks(()=>{w.da&&nu(w.da);const _=y.props&&y.props.onVnodeUnmounted;_&&ji(_,w.parent,y),w.isDeactivated=!0},r)};function p(y){rh(y),u(y,n,r,!0)}function h(y){s.forEach((w,_)=>{const M=m8(ma(w)?w.type.__asyncResolved||{}:w.type);M&&!y(M)&&m(_)})}function m(y){const w=s.get(y);w&&(!l||!sr(w,l))?p(w):l&&rh(l),s.delete(y),i.delete(y)}Ze(()=>[e.include,e.exclude],([y,w])=>{y&&h(_=>Hd(y,_)),w&&h(_=>!Hd(w,_))},{flush:"post",deep:!0});let k=null;const x=()=>{k!=null&&(K4(n.subTree.type)?ks(()=>{s.set(k,c3(n.subTree))},n.subTree.suspense):s.set(k,c3(n.subTree)))};return In(x),hg(x),vo(()=>{s.forEach(y=>{const{subTree:w,suspense:_}=n,M=c3(w);if(y.type===M.type&&y.key===M.key){rh(M);const P=M.component.da;P&&ks(P,_);return}p(y)})}),()=>{if(k=null,!t.default)return l=null;const y=t.default(),w=y[0];if(y.length>1)return l=null,y;if(!v1(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return l=null,w;let _=c3(w);if(_.type===xs)return l=null,_;const M=_.type,P=m8(ma(_)?_.type.__asyncResolved||{}:M),{include:B,exclude:$,max:T}=e;if(B&&(!P||!Hd(B,P))||$&&P&&Hd($,P))return _.shapeFlag&=-257,l=_,w;const I=_.key==null?M:_.key,N=s.get(I);return _.el&&(_=ka(_),w.shapeFlag&128&&(w.ssContent=_)),k=I,N?(_.el=N.el,_.component=N.component,_.transition&&g1(_,_.transition),_.shapeFlag|=512,i.delete(I),i.add(I)):(i.add(I),T&&i.size>parseInt(T,10)&&m(i.values().next().value)),_.shapeFlag|=256,l=_,K4(w.type)?w:_}}},sZe=fP;function Hd(e,t){return rn(e)?e.some(n=>Hd(n,t)):To(e)?e.split(",").includes(t):JB(e)?(e.lastIndex=0,e.test(t)):!1}function pP(e,t){uA(e,"a",t)}function hP(e,t){uA(e,"da",t)}function uA(e,t,n=ei){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(xp(t,o,n),n){let s=n.parent;for(;s&&s.parent;)hf(s.parent.vnode)&&mP(o,t,n,s),s=s.parent}}function mP(e,t,n,o){const s=xp(t,e,o,!0);En(()=>{ig(o[t],s)},n)}function rh(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function c3(e){return e.shapeFlag&128?e.ssContent:e}function xp(e,t,n=ei,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{va();const r=Pu(n),a=Dl(t,n,e,l);return r(),ya(),a});return o?s.unshift(i):s.push(i),i}}const Aa=e=>(t,n=ei)=>{(!F0||e==="sp")&&xp(e,(...o)=>t(...o),n)},gP=Aa("bm"),In=Aa("m"),dA=Aa("bu"),hg=Aa("u"),vo=Aa("bum"),En=Aa("um"),vP=Aa("sp"),yP=Aa("rtg"),wP=Aa("rtc");function fA(e,t=ei){xp("ec",e,t)}const mg="components",kP="directives";function gg(e,t){return vg(mg,e,!0,t)||e}const pA=Symbol.for("v-ndc");function cs(e){return To(e)?vg(mg,e,!1)||e:e||pA}function iZe(e){return vg(kP,e)}function vg(e,t,n=!0,o=!1){const s=ti||ei;if(s){const i=s.type;if(e===mg){const r=m8(i,!1);if(r&&(r===t||r===Fs(t)||r===pp(Fs(t))))return i}const l=dw(s[e]||i[e],t)||dw(s.appContext[e],t);return!l&&o?i:l}}function dw(e,t){return e&&(e[t]||e[Fs(t)]||e[pp(Fs(t))])}function at(e,t,n,o){let s;const i=n&&n[o],l=rn(e);if(l||To(e)){const r=l&&r1(e);let a=!1,c=!1;r&&(a=!il(e),c=wa(e),e=yp(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(r,a,void 0,i&&i[a]));else{const r=Object.keys(e);s=new Array(r.length);for(let a=0,c=r.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function jn(e,t,n={},o,s){if(ti.ce||ti.parent&&ma(ti.parent)&&ti.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),ue(Ce,null,[W("slot",n,o&&o())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const l=i&&yg(i(n)),r=n.key||l&&l.key,a=ue(Ce,{key:(r&&!dl(r)?r:`_${t}`)+(!l&&o?"_fb":"")},l||(o?o():[]),l&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function yg(e){return e.some(t=>v1(t)?!(t.type===xs||t.type===Ce&&!yg(t.children)):!0)?e:null}function lZe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:i4(o)]=e[o];return n}const r8=e=>e?jA(e)?gf(e):r8(e.parent):null,i2=xo(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>r8(e.parent),$root:e=>r8(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wg(e),$forceUpdate:e=>e.f||(e.f=()=>{dg(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>JR.bind(e)}),ah=(e,t)=>e!==Yn&&!e.__isScriptSetup&&fo(e,t),a8={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:l,type:r,appContext:a}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(ah(o,t))return l[t]=1,o[t];if(s!==Yn&&fo(s,t))return l[t]=2,s[t];if(fo(i,t))return l[t]=3,i[t];if(n!==Yn&&fo(n,t))return l[t]=4,n[t];c8&&(l[t]=0)}}const c=i2[t];let u,d;if(c)return t==="$attrs"&&ui(e.attrs,"get",""),c(e);if((u=r.__cssModules)&&(u=u[t]))return u;if(n!==Yn&&fo(n,t))return l[t]=4,n[t];if(d=a.config.globalProperties,fo(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return ah(s,t)?(s[t]=n,!0):o!==Yn&&fo(o,t)?(o[t]=n,!0):fo(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:l}},r){let a;return!!(n[r]||e!==Yn&&r[0]!=="$"&&fo(e,r)||ah(t,r)||fo(i,r)||fo(o,r)||fo(i2,r)||fo(s.config.globalProperties,r)||(a=l.__cssModules)&&a[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fo(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},bP=xo({},a8,{get(e,t){if(t!==Symbol.unscopables)return a8.get(e,t,e)},has(e,t){return t[0]!=="_"&&!oR(t)}});function rZe(){return null}function aZe(){return null}function cZe(e){}function uZe(e){}function dZe(){return null}function fZe(){}function pZe(e,t){return null}function hZe(){return hA().slots}function mf(){return hA().attrs}function hA(e){const t=Ts();return t.setupContext||(t.setupContext=DA(t))}function N2(e){return rn(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function mZe(e,t){const n=N2(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?rn(s)||_n(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function gZe(e,t){return!e||!t?e||t:rn(e)&&rn(t)?e.concat(t):xo({},N2(e),N2(t))}function vZe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function yZe(e){const t=Ts(),n=F0;let o=e();B2(),n&&ru(!1);const s=()=>{Pu(t),n&&ru(!0)},i=()=>{Ts()!==t&&t.scope.off(),B2(),n&&ru(!1)};return lg(o)&&(o=o.catch(l=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),l})),[o,()=>{s(),Promise.resolve().then(i)}]}let c8=!0;function _P(e){const t=wg(e),n=e.proxy,o=e.ctx;c8=!1,t.beforeCreate&&fw(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:r,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:k,beforeDestroy:x,beforeUnmount:y,destroyed:w,unmounted:_,render:M,renderTracked:P,renderTriggered:B,errorCaptured:$,serverPrefetch:T,expose:I,inheritAttrs:N,components:C,directives:O,filters:H}=t;if(c&&xP(c,o,null),l)for(const R in l){const j=l[R];_n(j)&&(o[R]=j.bind(n))}if(s){const R=s.call(n,n);po(R)&&(e.data=ds(R))}if(c8=!0,i)for(const R in i){const j=i[R],q=_n(j)?j.bind(n,n):_n(j.get)?j.get.bind(n,n):Ol,K=!_n(j)&&_n(j.set)?j.set.bind(n):Ol,U=z({get:q,set:K});Object.defineProperty(o,R,{enumerable:!0,configurable:!0,get:()=>U.value,set:te=>U.value=te})}if(r)for(const R in r)mA(r[R],o,n,R);if(a){const R=_n(a)?a.call(n):a;Reflect.ownKeys(R).forEach(j=>{qn(j,R[j])})}u&&fw(u,e,"c");function A(R,j){rn(j)?j.forEach(q=>R(q.bind(n))):j&&R(j.bind(n))}if(A(gP,d),A(In,f),A(dA,p),A(hg,h),A(pP,m),A(hP,k),A(fA,$),A(wP,P),A(yP,B),A(vo,y),A(En,_),A(vP,T),rn(I))if(I.length){const R=e.exposed||(e.exposed={});I.forEach(j=>{Object.defineProperty(R,j,{get:()=>n[j],set:q=>n[j]=q,enumerable:!0})})}else e.exposed||(e.exposed={});M&&e.render===Ol&&(e.render=M),N!=null&&(e.inheritAttrs=N),C&&(e.components=C),O&&(e.directives=O),T&&pg(e)}function xP(e,t,n=Ol){rn(e)&&(e=u8(e));for(const o in e){const s=e[o];let i;po(s)?"default"in s?i=fn(s.from||o,s.default,!0):i=fn(s.from||o):i=fn(s),ps(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function fw(e,t,n){Dl(rn(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function mA(e,t,n,o){let s=o.includes(".")?nA(n,o):()=>n[o];if(To(e)){const i=t[e];_n(i)&&Ze(s,i)}else if(_n(e))Ze(s,e.bind(n));else if(po(e))if(rn(e))e.forEach(i=>mA(i,t,n,o));else{const i=_n(e.handler)?e.handler.bind(n):t[e.handler];_n(i)&&Ze(s,i,e)}}function wg(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let a;return r?a=r:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(c=>U4(a,c,l,!0)),U4(a,t,l)),po(t)&&i.set(t,a),a}function U4(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&U4(e,i,n,!0),s&&s.forEach(l=>U4(e,l,n,!0));for(const l in t)if(!(o&&l==="expose")){const r=SP[l]||n&&n[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const SP={data:pw,props:hw,emits:hw,methods:Dd,computed:Dd,beforeCreate:ki,created:ki,beforeMount:ki,mounted:ki,beforeUpdate:ki,updated:ki,beforeDestroy:ki,beforeUnmount:ki,destroyed:ki,unmounted:ki,activated:ki,deactivated:ki,errorCaptured:ki,serverPrefetch:ki,components:Dd,directives:Dd,watch:MP,provide:pw,inject:CP};function pw(e,t){return t?e?function(){return xo(_n(e)?e.call(this,this):e,_n(t)?t.call(this,this):t)}:t:e}function CP(e,t){return Dd(u8(e),u8(t))}function u8(e){if(rn(e)){const t={};for(let n=0;n{let u,d=Yn,f;return XR(()=>{const p=e[s];Qs(u,p)&&(u=p,c())}),{get(){return a(),n.get?n.get(u):u},set(p){const h=n.set?n.set(p):p;if(!Qs(h,u)&&!(d!==Yn&&Qs(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${i}`in m)||(u=p,c()),o.emit(`update:${t}`,h),Qs(p,h)&&Qs(p,d)&&!Qs(h,f)&&c(),d=p,f=h}}});return r[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?l||Yn:r,done:!1}:{done:!0}}}},r}const vA=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fs(t)}Modifiers`]||e[`${Wi(t)}Modifiers`];function EP(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Yn;let s=n;const i=t.startsWith("update:"),l=i&&vA(o,t.slice(7));l&&(l.trim&&(s=n.map(u=>To(u)?u.trim():u)),l.number&&(s=n.map(hp)));let r,a=o[r=i4(t)]||o[r=i4(Fs(t))];!a&&i&&(a=o[r=i4(Wi(t))]),a&&Dl(a,e,6,s);const c=o[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Dl(c,e,6,s)}}const IP=new WeakMap;function yA(e,t,n=!1){const o=n?IP:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let l={},r=!1;if(!_n(e)){const a=c=>{const u=yA(c,t,!0);u&&(r=!0,xo(l,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!r?(po(e)&&o.set(e,null),null):(rn(i)?i.forEach(a=>l[a]=null):xo(l,i),po(e)&&o.set(e,l),l)}function Sp(e,t){return!e||!df(t)?!1:(t=t.slice(2).replace(/Once$/,""),fo(e,t[0].toLowerCase()+t.slice(1))||fo(e,Wi(t))||fo(e,t))}function r4(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:l,attrs:r,emit:a,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,k=I2(e);let x,y;try{if(n.shapeFlag&4){const _=s||o,M=_;x=Vi(c.call(M,_,u,d,p,f,h)),y=r}else{const _=t;x=Vi(_.length>1?_(d,{attrs:r,slots:l,emit:a}):_(d,null)),y=t.props?r:LP(r)}}catch(_){l2.length=0,Ru(_,e,1),x=W(xs)}let w=x;if(y&&m!==!1){const _=Object.keys(y),{shapeFlag:M}=w;_.length&&M&7&&(i&&_.some(cp)&&(y=NP(y,i)),w=ka(w,y,!1,!0))}return n.dirs&&(w=ka(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&g1(w,n.transition),x=w,I2(k),x}function $P(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||df(n))&&((t||(t={}))[n]=e[n]);return t},NP=(e,t)=>{const n={};for(const o in e)(!cp(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function zP(e,t,n){const{props:o,children:s,component:i}=e,{props:l,children:r,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?mw(o,l,c):!!l;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(kA),_A=e=>Object.getPrototypeOf(e)===kA;function BP(e,t,n,o=!1){const s={},i=bA();e.propsDefaults=Object.create(null),xA(e,t,s,i);for(const l in e.propsOptions[0])l in s||(s[l]=void 0);n?e.props=o?s:LR(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function RP(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:l}}=e,r=so(s),[a]=e.propsOptions;let c=!1;if((o||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=SA(d,t,!0);xo(l,f),p&&r.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return po(e)&&o.set(e,eu),eu;if(rn(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",bg=e=>rn(e)?e.map(Vi):[Vi(e)],FP=(e,t,n)=>{if(t._n)return t;const o=ae((...s)=>bg(t(...s)),n);return o._c=!1,o},CA=(e,t,n)=>{const o=e._ctx;for(const s in e){if(kg(s))continue;const i=e[s];if(_n(i))t[s]=FP(s,i,o);else if(i!=null){const l=bg(i);t[s]=()=>l}}},MA=(e,t)=>{const n=bg(t);e.slots.default=()=>n},AA=(e,t,n)=>{for(const o in t)(n||!kg(o))&&(e[o]=t[o])},jP=(e,t,n)=>{const o=e.slots=bA();if(e.vnode.shapeFlag&32){const s=t._;s?(AA(o,t,n),n&&AM(o,"_",s,!0)):CA(t,o)}else t&&MA(e,t)},OP=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,l=Yn;if(o.shapeFlag&32){const r=t._;r?n&&r===1?i=!1:AA(s,t,n):(i=!t.$stable,CA(t,s)),l=t}else t&&(MA(e,t),l={default:1});if(i)for(const r in s)!kg(r)&&l[r]==null&&delete s[r]},ks=NA;function HP(e){return TA(e)}function DP(e){return TA(e,lP)}function TA(e,t){const n=mp();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:l,createText:r,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Ol,insertStaticContent:h}=e,m=(F,Z,fe,ve=null,ge=null,oe=null,de=void 0,ke=null,Se=!!Z.dynamicChildren)=>{if(F===Z)return;F&&!sr(F,Z)&&(ve=he(F),te(F,ge,oe,!0),F=null),Z.patchFlag===-2&&(Se=!1,Z.dynamicChildren=null);const{type:me,ref:Ae,shapeFlag:le}=Z;switch(me){case a1:k(F,Z,fe,ve);break;case xs:x(F,Z,fe,ve);break;case lu:F==null&&y(Z,fe,ve,de);break;case Ce:C(F,Z,fe,ve,ge,oe,de,ke,Se);break;default:le&1?M(F,Z,fe,ve,ge,oe,de,ke,Se):le&6?O(F,Z,fe,ve,ge,oe,de,ke,Se):(le&64||le&128)&&me.process(F,Z,fe,ve,ge,oe,de,ke,Se,st)}Ae!=null&&ge?su(Ae,F&&F.ref,oe,Z||F,!Z):Ae==null&&F&&F.ref!=null&&su(F.ref,null,oe,F,!0)},k=(F,Z,fe,ve)=>{if(F==null)o(Z.el=r(Z.children),fe,ve);else{const ge=Z.el=F.el;Z.children!==F.children&&c(ge,Z.children)}},x=(F,Z,fe,ve)=>{F==null?o(Z.el=a(Z.children||""),fe,ve):Z.el=F.el},y=(F,Z,fe,ve)=>{[F.el,F.anchor]=h(F.children,Z,fe,ve,F.el,F.anchor)},w=({el:F,anchor:Z},fe,ve)=>{let ge;for(;F&&F!==Z;)ge=f(F),o(F,fe,ve),F=ge;o(Z,fe,ve)},_=({el:F,anchor:Z})=>{let fe;for(;F&&F!==Z;)fe=f(F),s(F),F=fe;s(Z)},M=(F,Z,fe,ve,ge,oe,de,ke,Se)=>{if(Z.type==="svg"?de="svg":Z.type==="math"&&(de="mathml"),F==null)P(Z,fe,ve,ge,oe,de,ke,Se);else{const me=F.el&&F.el._isVueCE?F.el:null;try{me&&me._beginPatch(),T(F,Z,ge,oe,de,ke,Se)}finally{me&&me._endPatch()}}},P=(F,Z,fe,ve,ge,oe,de,ke)=>{let Se,me;const{props:Ae,shapeFlag:le,transition:be,dirs:_e}=F;if(Se=F.el=l(F.type,oe,Ae&&Ae.is,Ae),le&8?u(Se,F.children):le&16&&$(F.children,Se,null,ve,ge,ch(F,oe),de,ke),_e&&Sr(F,null,ve,"created"),B(Se,F,F.scopeId,de,ve),Ae){for(const Qe in Ae)Qe!=="value"&&!E0(Qe)&&i(Se,Qe,null,Ae[Qe],oe,ve);"value"in Ae&&i(Se,"value",null,Ae.value,oe),(me=Ae.onVnodeBeforeMount)&&ji(me,ve,F)}_e&&Sr(F,null,ve,"beforeMount");const Ke=EA(ge,be);Ke&&be.beforeEnter(Se),o(Se,Z,fe),((me=Ae&&Ae.onVnodeMounted)||Ke||_e)&&ks(()=>{try{me&&ji(me,ve,F),Ke&&be.enter(Se),_e&&Sr(F,null,ve,"mounted")}finally{}},ge)},B=(F,Z,fe,ve,ge)=>{if(fe&&p(F,fe),ve)for(let oe=0;oe{for(let me=Se;me{const ke=Z.el=F.el;let{patchFlag:Se,dynamicChildren:me,dirs:Ae}=Z;Se|=F.patchFlag&16;const le=F.props||Yn,be=Z.props||Yn;let _e;if(fe&&e0(fe,!1),(_e=be.onVnodeBeforeUpdate)&&ji(_e,fe,Z,F),Ae&&Sr(Z,F,fe,"beforeUpdate"),fe&&e0(fe,!0),(le.innerHTML&&be.innerHTML==null||le.textContent&&be.textContent==null)&&u(ke,""),me?I(F.dynamicChildren,me,ke,fe,ve,ch(Z,ge),oe):de||j(F,Z,ke,null,fe,ve,ch(Z,ge),oe,!1),Se>0){if(Se&16)N(ke,le,be,fe,ge);else if(Se&2&&le.class!==be.class&&i(ke,"class",null,be.class,ge),Se&4&&i(ke,"style",le.style,be.style,ge),Se&8){const Ke=Z.dynamicProps;for(let Qe=0;Qe{_e&&ji(_e,fe,Z,F),Ae&&Sr(Z,F,fe,"updated")},ve)},I=(F,Z,fe,ve,ge,oe,de)=>{for(let ke=0;ke{if(Z!==fe){if(Z!==Yn)for(const oe in Z)!E0(oe)&&!(oe in fe)&&i(F,oe,Z[oe],null,ge,ve);for(const oe in fe){if(E0(oe))continue;const de=fe[oe],ke=Z[oe];de!==ke&&oe!=="value"&&i(F,oe,ke,de,ge,ve)}"value"in fe&&i(F,"value",Z.value,fe.value,ge)}},C=(F,Z,fe,ve,ge,oe,de,ke,Se)=>{const me=Z.el=F?F.el:r(""),Ae=Z.anchor=F?F.anchor:r("");let{patchFlag:le,dynamicChildren:be,slotScopeIds:_e}=Z;_e&&(ke=ke?ke.concat(_e):_e),F==null?(o(me,fe,ve),o(Ae,fe,ve),$(Z.children||[],fe,Ae,ge,oe,de,ke,Se)):le>0&&le&64&&be&&F.dynamicChildren&&F.dynamicChildren.length===be.length?(I(F.dynamicChildren,be,fe,ge,oe,de,ke),(Z.key!=null||ge&&Z===ge.subTree)&&_g(F,Z,!0)):j(F,Z,fe,Ae,ge,oe,de,ke,Se)},O=(F,Z,fe,ve,ge,oe,de,ke,Se)=>{Z.slotScopeIds=ke,F==null?Z.shapeFlag&512?ge.ctx.activate(Z,fe,ve,de,Se):H(Z,fe,ve,ge,oe,de,Se):D(F,Z,Se)},H=(F,Z,fe,ve,ge,oe,de)=>{const ke=F.component=FA(F,ve,ge);if(hf(F)&&(ke.ctx.renderer=st),OA(ke,!1,de),ke.asyncDep){if(ge&&ge.registerDep(ke,A,de),!F.el){const Se=ke.subTree=W(xs);x(null,Se,Z,fe),F.placeholder=Se.el}}else A(ke,F,Z,fe,ge,oe,de)},D=(F,Z,fe)=>{const ve=Z.component=F.component;if(zP(F,Z,fe))if(ve.asyncDep&&!ve.asyncResolved){R(ve,Z,fe);return}else ve.next=Z,ve.update();else Z.el=F.el,ve.vnode=Z},A=(F,Z,fe,ve,ge,oe,de)=>{const ke=()=>{if(F.isMounted){let{next:le,bu:be,u:_e,parent:Ke,vnode:Qe}=F;{const Jt=IA(F);if(Jt){le&&(le.el=Qe.el,R(F,le,de)),Jt.asyncDep.then(()=>{ks(()=>{F.isUnmounted||me()},ge)});return}}let mt=le,Tt;e0(F,!1),le?(le.el=Qe.el,R(F,le,de)):le=Qe,be&&nu(be),(Tt=le.props&&le.props.onVnodeBeforeUpdate)&&ji(Tt,Ke,le,Qe),e0(F,!0);const qt=r4(F),nn=F.subTree;F.subTree=qt,m(nn,qt,d(nn.el),he(nn),F,ge,oe),le.el=qt.el,mt===null&&Cp(F,qt.el),_e&&ks(_e,ge),(Tt=le.props&&le.props.onVnodeUpdated)&&ks(()=>ji(Tt,Ke,le,Qe),ge)}else{let le;const{el:be,props:_e}=Z,{bm:Ke,m:Qe,parent:mt,root:Tt,type:qt}=F,nn=ma(Z);if(e0(F,!1),Ke&&nu(Ke),!nn&&(le=_e&&_e.onVnodeBeforeMount)&&ji(le,mt,Z),e0(F,!0),be&&se){const Jt=()=>{F.subTree=r4(F),se(be,F.subTree,F,ge,null)};nn&&qt.__asyncHydrate?qt.__asyncHydrate(be,F,Jt):Jt()}else{Tt.ce&&Tt.ce._hasShadowRoot()&&Tt.ce._injectChildStyle(qt,F.parent?F.parent.type:void 0);const Jt=F.subTree=r4(F);m(null,Jt,fe,ve,F,ge,oe),Z.el=Jt.el}if(Qe&&ks(Qe,ge),!nn&&(le=_e&&_e.onVnodeMounted)){const Jt=Z;ks(()=>ji(le,mt,Jt),ge)}(Z.shapeFlag&256||mt&&ma(mt.vnode)&&mt.vnode.shapeFlag&256)&&F.a&&ks(F.a,ge),F.isMounted=!0,Z=fe=ve=null}};F.scope.on();const Se=F.effect=new j4(ke);F.scope.off();const me=F.update=Se.run.bind(Se),Ae=F.job=Se.runIfDirty.bind(Se);Ae.i=F,Ae.id=F.uid,Se.scheduler=()=>dg(Ae),e0(F,!0),me()},R=(F,Z,fe)=>{Z.component=F;const ve=F.vnode.props;F.vnode=Z,F.next=null,RP(F,Z.props,ve,fe),OP(F,Z.children,fe),va(),ow(F),ya()},j=(F,Z,fe,ve,ge,oe,de,ke,Se=!1)=>{const me=F&&F.children,Ae=F?F.shapeFlag:0,le=Z.children,{patchFlag:be,shapeFlag:_e}=Z;if(be>0){if(be&128){K(me,le,fe,ve,ge,oe,de,ke,Se);return}else if(be&256){q(me,le,fe,ve,ge,oe,de,ke,Se);return}}_e&8?(Ae&16&&Q(me,ge,oe),le!==me&&u(fe,le)):Ae&16?_e&16?K(me,le,fe,ve,ge,oe,de,ke,Se):Q(me,ge,oe,!0):(Ae&8&&u(fe,""),_e&16&&$(le,fe,ve,ge,oe,de,ke,Se))},q=(F,Z,fe,ve,ge,oe,de,ke,Se)=>{F=F||eu,Z=Z||eu;const me=F.length,Ae=Z.length,le=Math.min(me,Ae);let be;for(be=0;beAe?Q(F,ge,oe,!0,!1,le):$(Z,fe,ve,ge,oe,de,ke,Se,le)},K=(F,Z,fe,ve,ge,oe,de,ke,Se)=>{let me=0;const Ae=Z.length;let le=F.length-1,be=Ae-1;for(;me<=le&&me<=be;){const _e=F[me],Ke=Z[me]=Se?sa(Z[me]):Vi(Z[me]);if(sr(_e,Ke))m(_e,Ke,fe,null,ge,oe,de,ke,Se);else break;me++}for(;me<=le&&me<=be;){const _e=F[le],Ke=Z[be]=Se?sa(Z[be]):Vi(Z[be]);if(sr(_e,Ke))m(_e,Ke,fe,null,ge,oe,de,ke,Se);else break;le--,be--}if(me>le){if(me<=be){const _e=be+1,Ke=_ebe)for(;me<=le;)te(F[me],ge,oe,!0),me++;else{const _e=me,Ke=me,Qe=new Map;for(me=Ke;me<=be;me++){const xn=Z[me]=Se?sa(Z[me]):Vi(Z[me]);xn.key!=null&&Qe.set(xn.key,me)}let mt,Tt=0;const qt=be-Ke+1;let nn=!1,Jt=0;const kn=new Array(qt);for(me=0;me=qt){te(xn,ge,oe,!0);continue}let Ln;if(xn.key!=null)Ln=Qe.get(xn.key);else for(mt=Ke;mt<=be;mt++)if(kn[mt-Ke]===0&&sr(xn,Z[mt])){Ln=mt;break}Ln===void 0?te(xn,ge,oe,!0):(kn[Ln-Ke]=me+1,Ln>=Jt?Jt=Ln:nn=!0,m(xn,Z[Ln],fe,null,ge,oe,de,ke,Se),Tt++)}const Dn=nn?VP(kn):eu;for(mt=Dn.length-1,me=qt-1;me>=0;me--){const xn=Ke+me,Ln=Z[xn],Hn=Z[xn+1],bn=xn+1{const{el:oe,type:de,transition:ke,children:Se,shapeFlag:me}=F;if(me&6){U(F.component.subTree,Z,fe,ve);return}if(me&128){F.suspense.move(Z,fe,ve);return}if(me&64){de.move(F,Z,fe,st);return}if(de===Ce){o(oe,Z,fe);for(let le=0;leke.enter(oe),ge));else{const{leave:le,delayLeave:be,afterLeave:_e}=ke,Ke=()=>{F.ctx.isUnmounted?s(oe):o(oe,Z,fe)},Qe=()=>{const mt=oe._isLeaving||!!oe[Nl];oe._isLeaving&&oe[Nl](!0),ke.persisted&&!mt?Ke():le(oe,()=>{Ke(),_e&&_e()})};be?be(oe,Ke,Qe):Qe()}else o(oe,Z,fe)},te=(F,Z,fe,ve=!1,ge=!1)=>{const{type:oe,props:de,ref:ke,children:Se,dynamicChildren:me,shapeFlag:Ae,patchFlag:le,dirs:be,cacheIndex:_e,memo:Ke}=F;if(le===-2&&(ge=!1),ke!=null&&(va(),su(ke,null,fe,F,!0),ya()),_e!=null&&(Z.renderCache[_e]=void 0),Ae&256){Z.ctx.deactivate(F);return}const Qe=Ae&1&&be,mt=!ma(F);let Tt;if(mt&&(Tt=de&&de.onVnodeBeforeUnmount)&&ji(Tt,Z,F),Ae&6)ie(F.component,fe,ve);else{if(Ae&128){F.suspense.unmount(fe,ve);return}Qe&&Sr(F,null,Z,"beforeUnmount"),Ae&64?F.type.remove(F,Z,fe,st,ve):me&&!me.hasOnce&&(oe!==Ce||le>0&&le&64)?Q(me,Z,fe,!1,!0):(oe===Ce&&le&384||!ge&&Ae&16)&&Q(Se,Z,fe),ve&&J(F)}const qt=Ke!=null&&_e==null;(mt&&(Tt=de&&de.onVnodeUnmounted)||Qe||qt)&&ks(()=>{Tt&&ji(Tt,Z,F),Qe&&Sr(F,null,Z,"unmounted"),qt&&(F.el=null)},fe)},J=F=>{const{type:Z,el:fe,anchor:ve,transition:ge}=F;if(Z===Ce){ee(fe,ve);return}if(Z===lu){_(F);return}const oe=()=>{s(fe),ge&&!ge.persisted&&ge.afterLeave&&ge.afterLeave()};if(F.shapeFlag&1&&ge&&!ge.persisted){const{leave:de,delayLeave:ke}=ge,Se=()=>de(fe,oe);ke?ke(F.el,oe,Se):Se()}else oe()},ee=(F,Z)=>{let fe;for(;F!==Z;)fe=f(F),s(F),F=fe;s(Z)},ie=(F,Z,fe)=>{const{bum:ve,scope:ge,job:oe,subTree:de,um:ke,m:Se,a:me}=F;Z4(Se),Z4(me),ve&&nu(ve),ge.stop(),oe&&(oe.flags|=8,te(de,F,Z,fe)),ke&&ks(ke,Z),ks(()=>{F.isUnmounted=!0},Z)},Q=(F,Z,fe,ve=!1,ge=!1,oe=0)=>{for(let de=oe;de{if(F.shapeFlag&6)return he(F.component.subTree);if(F.shapeFlag&128)return F.suspense.next();const Z=f(F.anchor||F.el),fe=Z&&Z[oA];return fe?f(fe):Z};let xe=!1;const Ye=(F,Z,fe)=>{let ve;F==null?Z._vnode&&(te(Z._vnode,null,null,!0),ve=Z._vnode.component):m(Z._vnode||null,F,Z,null,null,null,fe),Z._vnode=F,xe||(xe=!0,ow(ve),W4(),xe=!1)},st={p:m,um:te,m:U,r:J,mt:H,mc:$,pc:j,pbc:I,n:he,o:e};let X,se;return t&&([X,se]=t(st)),{render:Ye,hydrate:X,createApp:TP(Ye,X)}}function ch({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function e0({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function EA(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _g(e,t,n=!1){const o=e.children,s=t.children;if(rn(o)&&rn(s))for(let i=0;i>1,e[n[r]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function IA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:IA(t)}function Z4(e){if(e)for(let t=0;te.__isSuspense;let f8=0;const WP={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,l,r,a,c){if(e==null)qP(t,n,o,s,i,l,r,a,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}UP(e,t,n,o,s,l,r,a,c)}},hydrate:ZP,normalize:KP},kZe=WP;function z2(e,t){const n=e.props&&e.props[t];_n(n)&&n()}function qP(e,t,n,o,s,i,l,r,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=LA(e,s,o,t,d,n,i,l,r,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,i,l),f.deps>0?(z2(e,"onPending"),z2(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,i,l),iu(f,e.ssFallback)):f.resolve(!1,!0)}function UP(e,t,n,o,s,i,l,r,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:k,isHydrating:x}=d;if(m)d.pendingBranch=f,sr(m,f)?(a(m,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():k&&(x||(a(h,p,n,o,s,null,i,l,r),iu(d,p)))):(d.pendingId=f8++,x?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),k?(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,i,l,r),iu(d,p))):h&&sr(h,f)?(a(h,f,n,o,s,d,i,l,r),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0&&d.resolve()));else if(h&&sr(h,f))a(h,f,n,o,s,d,i,l,r),iu(d,f);else if(z2(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=f8++,a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0)d.resolve();else{const{timeout:y,pendingId:w}=d;y>0?setTimeout(()=>{d.pendingId===w&&d.fallback(p)},y):y===0&&d.fallback(p)}}function LA(e,t,n,o,s,i,l,r,a,c,u=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:k}}=c;let x;const y=GP(e);y&&t&&t.pendingBranch&&(x=t.pendingId,t.deps++);const w=e.props?F4(e.props.timeout):void 0,_=i,M={vnode:e,parent:t,parentComponent:n,namespace:l,container:o,hiddenContainer:s,deps:0,pendingId:f8++,timeout:typeof w=="number"?w:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(P=!1,B=!1){const{vnode:$,activeBranch:T,pendingBranch:I,pendingId:N,effects:C,parentComponent:O,container:H,isInFallback:D}=M;let A=!1;if(M.isHydrating)M.isHydrating=!1;else if(!P){A=T&&I.transition&&I.transition.mode==="out-in";let q=!1;A&&(T.transition.afterLeave=()=>{N===M.pendingId&&(f(I,H,i===_&&!q?h(T):i,0),V4(C),D&&$.ssFallback&&($.ssFallback.el=null))}),T&&!M.isFallbackMountPending&&(m(T.el)===H&&(i=h(T),q=!0),p(T,O,M,!0),!A&&D&&$.ssFallback&&ks(()=>$.ssFallback.el=null,M)),A||f(I,H,i,0)}M.isFallbackMountPending=!1,iu(M,I),M.pendingBranch=null,M.isInFallback=!1;let R=M.parent,j=!1;for(;R;){if(R.pendingBranch){R.effects.push(...C),j=!0;break}R=R.parent}!j&&!A&&V4(C),M.effects=[],y&&t&&t.pendingBranch&&x===t.pendingId&&(t.deps--,t.deps===0&&!B&&t.resolve()),z2($,"onResolve")},fallback(P){if(!M.pendingBranch)return;const{vnode:B,activeBranch:$,parentComponent:T,container:I,namespace:N}=M;z2(B,"onFallback");const C=h($),O=()=>{M.isFallbackMountPending=!1,M.isInFallback&&(d(null,P,I,C,T,null,N,r,a),iu(M,P))},H=P.transition&&P.transition.mode==="out-in";H&&(M.isFallbackMountPending=!0,$.transition.afterLeave=O),M.isInFallback=!0,p($,T,null,!0),H||O()},move(P,B,$){M.activeBranch&&f(M.activeBranch,P,B,$),M.container=P},next(){return M.activeBranch&&h(M.activeBranch)},registerDep(P,B,$){const T=!!M.pendingBranch;T&&M.deps++;const I=P.vnode.el;P.asyncDep.catch(N=>{Ru(N,P,0)}).then(N=>{if(P.isUnmounted||M.isUnmounted||M.pendingId!==P.suspenseId)return;B2(),P.asyncResolved=!0;const{vnode:C}=P;p8(P,N,!1),I&&(C.el=I);const O=!I&&P.subTree.el;B(P,C,m(I||P.subTree.el),I?null:h(P.subTree),M,l,$),O&&(C.placeholder=null,k(O)),Cp(P,C.el),T&&--M.deps===0&&M.resolve()})},unmount(P,B){M.isUnmounted=!0,M.activeBranch&&p(M.activeBranch,n,P,B),M.pendingBranch&&p(M.pendingBranch,n,P,B)}};return M}function ZP(e,t,n,o,s,i,l,r,a){const c=t.suspense=LA(t,o,n,e.parentNode,document.createElement("div"),null,s,i,l,r,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,i,l);return c.deps===0&&c.resolve(!1,!0),u}function KP(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=vw(o?n.default:n),e.ssFallback=o?vw(n.fallback):W(xs)}function vw(e){let t;if(_n(e)){const n=P0&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=fi,zA())}return rn(e)&&(e=$P(e)),e=Vi(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function NA(e,t){t&&t.pendingBranch?rn(e)?t.effects.push(...e):t.effects.push(e):V4(e)}function iu(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,Cp(o,s))}function GP(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ce=Symbol.for("v-fgt"),a1=Symbol.for("v-txt"),xs=Symbol.for("v-cmt"),lu=Symbol.for("v-stc"),l2=[];let fi=null;function g(e=!1){l2.push(fi=e?null:[])}function zA(){l2.pop(),fi=l2[l2.length-1]||null}let P0=1;function G4(e,t=!1){P0+=e,e<0&&fi&&t&&(fi.hasOnce=!0)}function BA(e){return e.dynamicChildren=P0>0?fi||eu:null,zA(),P0>0&&fi&&fi.push(e),e}function S(e,t,n,o,s,i){return BA(b(e,t,n,o,s,i,!0))}function ue(e,t,n,o,s){return BA(W(e,t,n,o,s,!0))}function v1(e){return e?e.__v_isVNode===!0:!1}function sr(e,t){return e.type===t.type&&e.key===t.key}function bZe(e){}const RA=({key:e})=>e??null,a4=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?To(e)||ps(e)||_n(e)?{i:ti,r:e,k:t,f:!!n}:e:null);function b(e,t=null,n=null,o=0,s=null,i=e===Ce?0:1,l=!1,r=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&RA(t),ref:t&&a4(t),scopeId:_p,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ti};return r?(xg(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=To(n)?8:16),P0>0&&!l&&fi&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&fi.push(a),a}const W=YP;function YP(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===pA)&&(e=xs),v1(e)){const r=ka(e,t,!0);return n&&xg(r,n),P0>0&&!i&&fi&&(r.shapeFlag&6?fi[fi.indexOf(e)]=r:fi.push(r)),r.patchFlag=-2,r}if(tF(e)&&(e=e.__vccOpts),t){t=PA(t);let{class:r,style:a}=t;r&&!To(r)&&(t.class=Pe(r)),po(a)&&(bp(a)&&!rn(a)&&(a=xo({},a)),t.style=Gt(a))}const l=To(e)?1:K4(e)?128:sA(e)?64:po(e)?4:_n(e)?2:0;return b(e,t,n,o,s,l,i,!0)}function PA(e){return e?bp(e)||_A(e)?xo({},e):e:null}function ka(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:l,children:r,transition:a}=e,c=t?io(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&RA(c),ref:t&&t.ref?n&&i?rn(i)?i.concat(a4(t)):[i,a4(t)]:a4(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ka(e.ssContent),ssFallback:e.ssFallback&&ka(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&g1(u,a.clone(u)),u}function Oe(e=" ",t=0){return W(a1,null,e,t)}function r2(e,t){const n=W(lu,null,e);return n.staticCount=t,n}function Y(e="",t=!1){return t?(g(),ue(xs,null,e)):W(xs,null,e)}function Vi(e){return e==null||typeof e=="boolean"?W(xs):rn(e)?W(Ce,null,e.slice()):v1(e)?sa(e):W(a1,null,String(e))}function sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ka(e)}function xg(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(rn(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),xg(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!_A(t)?t._ctx=ti:s===3&&ti&&(ti.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _n(t)?(t={default:t,_ctx:ti},n=32):(t=String(t),o&64?(n=16,t=[Oe(t)]):n=8);e.children=t,e.shapeFlag|=n}function io(...e){const t={};for(let n=0;nei||ti;let Y4,ru;{const e=mp(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(l=>l(i)):s[0](i)}};Y4=t("__VUE_INSTANCE_SETTERS__",n=>ei=n),ru=t("__VUE_SSR_SETTERS__",n=>F0=n)}const Pu=e=>{const t=ei;return Y4(e),e.scope.on(),()=>{e.scope.off(),Y4(t)}},B2=()=>{ei&&ei.scope.off(),Y4(null)};function jA(e){return e.vnode.shapeFlag&4}let F0=!1;function OA(e,t=!1,n=!1){t&&ru(t);const{props:o,children:s}=e.vnode,i=jA(e);BP(e,o,i,t),jP(e,s,n||t);const l=i?QP(e,t):void 0;return t&&ru(!1),l}function QP(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,a8);const{setup:o}=n;if(o){va();const s=e.setupContext=o.length>1?DA(e):null,i=Pu(e),l=ff(o,e,0,[e.props,s]),r=lg(l);if(ya(),i(),(r||e.sp)&&!ma(e)&&pg(e),r){if(l.then(B2,B2),t)return l.then(a=>{p8(e,a,t)}).catch(a=>{Ru(a,e,0)});e.asyncDep=l}else p8(e,l,t)}else HA(e,t)}function p8(e,t,n){_n(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:po(t)&&(e.setupState=KM(t)),HA(e,n)}let X4,h8;function _Ze(e){X4=e,h8=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,bP))}}const xZe=()=>!X4;function HA(e,t,n){const o=e.type;if(!e.render){if(!t&&X4&&!o.render){const s=o.template||wg(e).template;if(s){const{isCustomElement:i,compilerOptions:l}=e.appContext.config,{delimiters:r,compilerOptions:a}=o,c=xo(xo({isCustomElement:i,delimiters:r},l),a);o.render=X4(s,c)}}e.render=o.render||Ol,h8&&h8(e)}{const s=Pu(e);va();try{_P(e)}finally{ya(),s()}}}const eF={get(e,t){return ui(e,"get",""),e[t]}};function DA(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,eF),slots:e.slots,emit:e.emit,expose:t}}function gf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(KM($t(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in i2)return i2[n](e)},has(t,n){return n in t||n in i2}})):e.proxy}function m8(e,t=!0){return _n(e)?e.displayName||e.name:e.name||t&&e.__name}function tF(e){return _n(e)&&"__vccOpts"in e}const z=(e,t)=>HR(e,t,F0);function vn(e,t,n){try{G4(-1);const o=arguments.length;return o===2?po(t)&&!rn(t)?v1(t)?W(e,null,[t]):W(e,t):W(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&v1(n)&&(n=[n]),W(e,t,n))}finally{G4(1)}}function SZe(){}function CZe(e,t,n,o){const s=n[o];if(s&&nF(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function nF(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&fi&&fi.push(e),!0}const oF="3.5.35",MZe=Ol,AZe=UR,TZe=Rc,EZe=eA,sF={createComponentInstance:FA,setupComponent:OA,renderComponentRoot:r4,setCurrentRenderingInstance:I2,isVNode:v1,normalizeVNode:Vi,getComponentPublicInstance:gf,ensureValidVNode:yg,pushWarningContext:WR,popWarningContext:qR},IZe=sF,$Ze=null,LZe=null,NZe=null;/** +**/const QM=[];function XR(e){QM.push(e)}function JR(){QM.pop()}function CZe(e,t){}const MZe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},QR={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function hf(e,t,n,o){try{return o?e(...o):e()}catch(s){Ru(s,t,n)}}function Dl(e,t,n,o){if(_n(e)){const s=hf(e,t,n,o);return s&&ag(s)&&s.catch(i=>{Ru(i,t,n)}),s}if(rn(e)){const s=[];for(let i=0;i>>1,s=Ci[o],i=E2(s);i=E2(n)?Ci.push(e):Ci.splice(tP(t),0,e),e.flags|=1,tA()}}function tA(){V4||(V4=eA.then(nA))}function W4(e){rn(e)?ou.push(...e):Ga&&e.id===-1?Ga.splice(Bc+1,0,e):e.flags&1||(ou.push(e),e.flags|=1),tA()}function iw(e,t,n=Sr+1){for(;nE2(n)-E2(o));if(ou.length=0,Ga){Ga.push(...t);return}for(Ga=t,Bc=0;Bce.id==null?e.flags&2?-1:1/0:e.id;function nA(e){try{for(Sr=0;SrRc.emit(s,...i)),l3=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{oA(i,t)}),setTimeout(()=>{Rc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,l3=[])},3e3)):l3=[]}let ti=null,Sp=null;function I2(e){const t=ti;return ti=e,Sp=e&&e.type.__scopeId||null,t}function AZe(e){Sp=e}function TZe(){Sp=null}const EZe=e=>ae;function ae(e,t=ti,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&Y4(-1);const i=I2(t);let l;try{l=e(...s)}finally{I2(i),o._d&&Y4(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function Jn(e,t){if(ti===null)return e;const n=yf(ti),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&_n(t)?t.call(o&&o.proxy):t}}function IZe(){return!!(Ts()||I0)}const nP=Symbol.for("v-scx"),oP=()=>fn(nP);function sA(e,t){return mf(e,null,t)}function LZe(e,t){return mf(e,null,{flush:"post"})}function sP(e,t){return mf(e,null,{flush:"sync"})}function Ke(e,t,n){return mf(e,t,n)}function mf(e,t,n=Yn){const{immediate:o,deep:s,flush:i,once:l}=n,r=xo({},n),a=t&&o||!t&&i!=="post";let c;if(P0){if(i==="sync"){const p=oP();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Ol,p.resume=Ol,p.pause=Ol,p}}const u=ei;r.call=(p,h,m)=>Dl(p,u,h,m);let d=!1;i==="post"?r.scheduler=p=>{ks(p,u&&u.suspense)}:i!=="sync"&&(d=!0,r.scheduler=(p,h)=>{h?p():pg(p)}),r.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=YR(e,t,r);return P0&&(c?c.push(f):a&&f()),f}function iP(e,t,n){const o=this.proxy,s=To(e)?e.includes(".")?iA(o,e):()=>o[e]:e.bind(o,o);let i;_n(t)?i=t:(i=t.handler,n=t);const l=Pu(this),r=mf(s,i.bind(o),n);return l(),r}function iA(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,h0=e=>e&&(e.disabled||e.disabled===""),lP=e=>e&&(e.defer||e.defer===""),lw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,rw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,r8=(e,t)=>{const n=e&&e.to;return To(n)?t?t(n):null:n},rP={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,l,r,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:x}}=c,y=h0(t.props);let{dynamicChildren:w}=t;const _=(z,L,E)=>{z.shapeFlag&16&&u(z.children,L,E,s,i,l,r,a)},A=(z=t)=>{const L=h0(z.props),E=z.target=r8(z.props,h),T=a8(E,z,m,p);E&&(l!=="svg"&&lw(E)?l="svg":l!=="mathml"&&rw(E)&&(l="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(E),L||(_(z,E,T),Od(z,!1)))},P=z=>{const L=()=>{if(Wa.get(z)===L){if(Wa.delete(z),h0(z.props)){const E=x(z.el)||n;_(z,E,z.anchor),Od(z,!0)}A(z)}};Wa.set(z,L),ks(L,i)};if(e==null){const z=t.el=m(""),L=t.anchor=m("");if(p(z,n,o),p(L,n,o),lP(t.props)||i&&i.pendingBranch){P(t);return}y&&(_(t,n,L),Od(t,!0)),A()}else{t.el=e.el;const z=t.anchor=e.anchor,L=Wa.get(e);if(L){L.flags|=8,Wa.delete(e),P(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,T=t.targetAnchor=e.targetAnchor,$=h0(e.props),C=$?n:E,j=$?z:T;if(l==="svg"||lw(E)?l="svg":(l==="mathml"||rw(E))&&(l="mathml"),w?(f(e.dynamicChildren,w,C,s,i,l,r),Sg(e,t,!0)):a||d(e,t,C,j,s,i,l,r,!1),y)$?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):r3(t,n,z,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const H=t.target=r8(t.props,h);H&&r3(t,H,null,c,0)}else $&&r3(t,E,T,c,1);Od(t,y)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:l,children:r,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=i||!h0(f),h=Wa.get(e);if(h&&(h.flags|=8,Wa.delete(e)),d&&(s(c),s(u)),i&&s(a),!h&&l&16)for(let m=0;m{e.isMounted=!0}),vo(()=>{e.isUnmounting=!0}),e}const Ml=[Function,Array],cA={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ml,onEnter:Ml,onAfterEnter:Ml,onEnterCancelled:Ml,onBeforeLeave:Ml,onLeave:Ml,onAfterLeave:Ml,onLeaveCancelled:Ml,onBeforeAppear:Ml,onAppear:Ml,onAfterAppear:Ml,onAppearCancelled:Ml},uA=e=>{const t=e.subTree;return t.component?uA(t.component):t},cP={name:"BaseTransition",props:cA,setup(e,{slots:t}){const n=Ts(),o=aA();return()=>{const s=t.default&&hg(t.default(),!0),i=s&&s.length?dA(s):n.subTree?Y():void 0;if(!i)return;const l=so(e),{mode:r}=l;if(o.isLeaving)return ah(i);const a=aw(i);if(!a)return ah(i);let c=L2(a,l,o,n,d=>c=d);a.type!==xs&&m1(a,c);let u=n.subTree&&aw(n.subTree);if(u&&u.type!==xs&&!sr(u,a)&&uA(n).type!==xs){let d=L2(u,l,o,n);if(m1(u,d),r==="out-in"&&a.type!==xs)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},ah(i);r==="in-out"&&a.type!==xs?d.delayLeave=(f,p,h)=>{const m=fA(o,u);m[String(u.key)]=u,f[Nl]=()=>{p(),f[Nl]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function dA(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==xs){t=n;break}}return t}const uP=cP;function fA(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function L2(e,t,n,o,s){const{appear:i,mode:l,persisted:r=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:x,onAfterAppear:y,onAppearCancelled:w}=t,_=String(e.key),A=fA(n,e),P=(E,T)=>{E&&Dl(E,o,9,T)},z=(E,T)=>{const $=T[1];P(E,T),rn(E)?E.every(C=>C.length<=1)&&$():E.length<=1&&$()},L={mode:l,persisted:r,beforeEnter(E){let T=a;if(!n.isMounted)if(i)T=k||a;else return;E[Nl]&&E[Nl](!0);const $=A[_];$&&sr(e,$)&&$.el[Nl]&&$.el[Nl](),P(T,[E])},enter(E){if(A[_]===e)return;let T=c,$=u,C=d;if(!n.isMounted)if(i)T=x||c,$=y||u,C=w||d;else return;let j=!1;E[yd]=D=>{j||(j=!0,D?P(C,[E]):P($,[E]),L.delayedLeave&&L.delayedLeave(),E[yd]=void 0)};const H=E[yd].bind(null,!1);T?z(T,[E,H]):H()},leave(E,T){const $=String(e.key);if(E[yd]&&E[yd](!0),n.isUnmounting)return T();P(f,[E]);let C=!1;E[Nl]=H=>{C||(C=!0,T(),H?P(m,[E]):P(h,[E]),E[Nl]=void 0,A[$]===e&&delete A[$])};const j=E[Nl].bind(null,!1);A[$]=e,p?z(p,[E,j]):j()},clone(E){const T=L2(E,t,n,o,s);return s&&s(T),T}};return L}function ah(e){if(gf(e))return e=wa(e),e.children=null,e}function aw(e){if(!gf(e))return rA(e.type)&&e.children?dA(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_n(n.default))return n.default()}}function m1(e,t){e.shapeFlag&6&&e.component?(e.transition=t,m1(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hg(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function cw(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const U4=new WeakMap;function su(e,t,n,o,s=!1){if(rn(e)){e.forEach((m,k)=>su(m,t&&(rn(t)?t[k]:t),n,o,s));return}if(ha(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&su(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?yf(o.component):o.el,l=s?null:i,{i:r,r:a}=e,c=t&&t.r,u=r.refs===Yn?r.refs={}:r.refs,d=r.setupState,f=so(d),p=d===Yn?TM:m=>cw(u,m)?!1:fo(f,m),h=(m,k)=>!(k&&cw(u,k));if(c!=null&&c!==a){if(uw(t),To(c))u[c]=null,p(c)&&(d[c]=null);else if(ps(c)){const m=t;h(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(_n(a))hf(a,r,12,[l,u]);else{const m=To(a),k=ps(a);if(m||k){const x=()=>{if(e.f){const y=m?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(s)rn(y)&&rg(y,i);else if(rn(y))y.includes(i)||y.push(i);else if(m)u[a]=[i],p(a)&&(d[a]=u[a]);else{const w=[i];h(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else m?(u[a]=l,p(a)&&(d[a]=l)):k&&(h(a,e.k)&&(a.value=l),e.k&&(u[e.k]=l))};if(l){const y=()=>{x(),U4.delete(e)};y.id=-1,U4.set(e,y),ks(y,n)}else uw(e),x()}}}function uw(e){const t=U4.get(e);t&&(t.flags|=8,U4.delete(e))}let dw=!1;const kc=()=>{dw||(console.error("Hydration completed but contains mismatches."),dw=!0)},dP=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",fP=e=>e.namespaceURI.includes("MathML"),a3=e=>{if(e.nodeType===1){if(dP(e))return"svg";if(fP(e))return"mathml"}},Wc=e=>e.nodeType===8;function pP(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:l,remove:r,insert:a,createComment:c}}=e,u=(w,_)=>{if(!_.hasChildNodes()){n(null,w,_),q4(),_._vnode=w;return}d(_.firstChild,w,null,null,null),q4(),_._vnode=w},d=(w,_,A,P,z,L=!1)=>{L=L||!!_.dynamicChildren;const E=Wc(w)&&w.data==="[",T=()=>m(w,_,A,P,z,E),{type:$,ref:C,shapeFlag:j,patchFlag:H}=_;let D=w.nodeType;_.el=w,H===-2&&(L=!1,_.dynamicChildren=null);let M=null;switch($){case r1:D!==3?_.children===""?(a(_.el=s(""),l(w),w),M=w):M=T():(w.data!==_.children&&(kc(),w.data=_.children),M=i(w));break;case xs:y(w)?(M=i(w),x(_.el=w.content.firstChild,w,A)):D!==8||E?M=T():M=i(w);break;case lu:if(E&&(w=i(w),D=w.nodeType),D===1||D===3){M=w;const R=!_.children.length;for(let O=0;O<_.staticCount;O++)R&&(_.children+=M.nodeType===1?M.outerHTML:M.data),O===_.staticCount-1&&(_.anchor=M),M=i(M);return E?i(M):M}else T();break;case Ce:E?M=h(w,_,A,P,z,L):M=T();break;default:if(j&1)(D!==1||_.type.toLowerCase()!==w.tagName.toLowerCase())&&!y(w)?M=T():M=f(w,_,A,P,z,L);else if(j&6){_.slotScopeIds=z;const R=l(w);if(E?M=k(w):Wc(w)&&w.data==="teleport start"?M=k(w,w.data,"teleport end"):M=i(w),t(_,R,null,A,P,a3(R),L),ha(_)&&!_.type.__asyncResolved){let O;E?(O=W(Ce),O.anchor=M?M.previousSibling:R.lastChild):O=w.nodeType===3?He(""):W("div"),O.el=w,_.component.subTree=O}}else j&64?D!==8?M=T():M=_.type.hydrate(w,_,A,P,z,L,e,p):j&128&&(M=_.type.hydrate(w,_,A,P,a3(l(w)),z,L,e,d))}return C!=null&&su(C,null,P,_),M},f=(w,_,A,P,z,L)=>{L=L||!!_.dynamicChildren;const{type:E,props:T,patchFlag:$,shapeFlag:C,dirs:j,transition:H}=_,D=E==="input"||E==="option";if(D||$!==-1){j&&Cr(_,null,A,"created");let M=!1;if(y(w)){M=$A(null,H)&&A&&A.vnode.props&&A.vnode.props.appear;const O=w.content.firstChild;if(M){const U=O.getAttribute("class");U&&(O.$cls=U),H.beforeEnter(O)}x(O,w,A),_.el=w=O}if(C&16&&!(T&&(T.innerHTML||T.textContent))){let O=p(w.firstChild,_,w,A,P,z,L);for(O&&!c3(w,1)&&kc();O;){const U=O;O=O.nextSibling,r(U)}}else if(C&8){let O=_.children;O[0]===` +`&&(w.tagName==="PRE"||w.tagName==="TEXTAREA")&&(O=O.slice(1));const{textContent:U}=w;U!==O&&U!==O.replace(/\r\n|\r/g,` +`)&&(c3(w,0)||kc(),w.textContent=_.children)}if(T){if(D||!L||$&48){const O=w.tagName.includes("-");for(const U in T)(D&&(U.endsWith("value")||U==="indeterminate")||ff(U)&&!T0(U)||U[0]==="."||O&&!T0(U))&&o(w,U,null,T[U],void 0,A)}else if(T.onClick)o(w,"onClick",null,T.onClick,void 0,A);else if($&4&&l1(T.style))for(const O in T.style)T.style[O]}let R;(R=T&&T.onVnodeBeforeMount)&&ji(R,A,_),j&&Cr(_,null,A,"beforeMount"),((R=T&&T.onVnodeMounted)||j||M)&&RA(()=>{R&&ji(R,A,_),M&&H.enter(w),j&&Cr(_,null,A,"mounted")},P)}return w.nextSibling},p=(w,_,A,P,z,L,E)=>{E=E||!!_.dynamicChildren;const T=_.children,$=T.length;let C=!1;for(let j=0;j<$;j++){const H=E?T[j]:T[j]=Vi(T[j]),D=H.type===r1;w?(D&&!E&&j+1<$&&Vi(T[j+1]).type===r1&&(a(s(w.data.slice(H.children.length)),A,i(w)),w.data=H.children),w=d(w,H,P,z,L,E)):D&&!H.children?a(H.el=s(""),A):(C||(C=!0,c3(A,1)||kc()),n(null,H,A,null,P,z,a3(A),L))}return w},h=(w,_,A,P,z,L)=>{const{slotScopeIds:E}=_;E&&(z=z?z.concat(E):E);const T=l(w),$=p(i(w),_,T,A,P,z,L);return $&&Wc($)&&$.data==="]"?i(_.anchor=$):(kc(),a(_.anchor=c("]"),T,$),$)},m=(w,_,A,P,z,L)=>{if(c3(w.parentElement,1)||kc(),_.el=null,L){const $=k(w);for(;;){const C=i(w);if(C&&C!==$)r(C);else break}}const E=i(w),T=l(w);return r(w),n(null,_,T,E,A,P,a3(T),z),A&&(A.vnode.el=_.el,Ap(A,_.el)),E},k=(w,_="[",A="]")=>{let P=0;for(;w;)if(w=i(w),w&&Wc(w)&&(w.data===_&&P++,w.data===A)){if(P===0)return i(w);P--}return w},x=(w,_,A)=>{const P=_.parentNode;P&&P.replaceChild(w,_);let z=A;for(;z;)z.vnode.el===_&&(z.vnode.el=z.subTree.el=w),z=z.parent},y=w=>w.nodeType===1&&w.tagName==="TEMPLATE";return[u,d]}const fw="data-allow-mismatch",hP={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function c3(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(fw);)e=e.parentElement;const n=e&&e.getAttribute(fw);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(hP[t])}}const mP=vp().requestIdleCallback||(e=>setTimeout(e,1)),gP=vp().cancelIdleCallback||(e=>clearTimeout(e)),NZe=(e=1e4)=>t=>{const n=mP(t,{timeout:e});return()=>gP(n)};function vP(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:l}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(vP(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},BZe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},RZe=(e=[])=>(t,n)=>{To(e)&&(e=[e]);let o=!1;const s=l=>{o||(o=!0,i(),t(),l.target.dispatchEvent(new l.constructor(l.type,l)))},i=()=>{n(l=>{for(const r of e)l.removeEventListener(r,s)})};return n(l=>{for(const r of e)l.addEventListener(r,s,{once:!0})}),i};function yP(e,t){if(Wc(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(Wc(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const ha=e=>!!e.type.__asyncLoader;function Rl(e){_n(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:l,suspensible:r=!0,onError:a}=e;let c=null,u,d=0;const f=()=>(d++,c=null,p()),p=()=>{let h;return c||(h=c=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((k,x)=>{a(m,()=>k(f()),()=>x(m),d+1)});throw m}).then(m=>h!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return Je({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,k){let x=!1;(m.bu||(m.bu=[])).push(()=>x=!0);const y=()=>{x||k()},w=i?()=>{const _=i(y,A=>yP(h,A));_&&(m.bum||(m.bum=[])).push(_)}:y;u?w():p().then(()=>!m.isUnmounted&&w())},get __asyncResolved(){return u},setup(){const h=ei;if(mg(h),u)return()=>u3(u,h);const m=w=>{c=null,Ru(w,h,13,!o)};if(r&&h.suspense||P0)return p().then(w=>()=>u3(w,h)).catch(w=>(m(w),()=>o?W(o,{error:w}):null));const k=V(!1),x=V(),y=V(!!s);return s&&setTimeout(()=>{y.value=!1},s),l!=null&&setTimeout(()=>{if(!k.value&&!x.value){const w=new Error(`Async component timed out after ${l}ms.`);m(w),x.value=w}},l),p().then(()=>{k.value=!0,h.parent&&gf(h.parent.vnode)&&h.parent.update()}).catch(w=>{m(w),x.value=w}),()=>{if(k.value&&u)return u3(u,h);if(x.value&&o)return W(o,{error:x.value});if(n&&!y.value)return u3(n,h)}}})}function u3(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,l=W(e,o,s);return l.ref=n,l.ce=i,delete t.vnode.ce,l}const gf=e=>e.type.__isKeepAlive,wP={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ts(),o=n.ctx;if(!o.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const s=new Map,i=new Set;let l=null;const r=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(y,w,_,A,P)=>{const z=y.component;c(y,w,_,0,r),a(z.vnode,y,w,_,z,r,A,y.slotScopeIds,P),ks(()=>{z.isDeactivated=!1,z.a&&nu(z.a);const L=y.props&&y.props.onVnodeMounted;L&&ji(L,z.parent,y)},r)},o.deactivate=y=>{const w=y.component;K4(w.m),K4(w.a),c(y,f,null,1,r),ks(()=>{w.da&&nu(w.da);const _=y.props&&y.props.onVnodeUnmounted;_&&ji(_,w.parent,y),w.isDeactivated=!0},r)};function p(y){ch(y),u(y,n,r,!0)}function h(y){s.forEach((w,_)=>{const A=v8(ha(w)?w.type.__asyncResolved||{}:w.type);A&&!y(A)&&m(_)})}function m(y){const w=s.get(y);w&&(!l||!sr(w,l))?p(w):l&&ch(l),s.delete(y),i.delete(y)}Ke(()=>[e.include,e.exclude],([y,w])=>{y&&h(_=>Hd(y,_)),w&&h(_=>!Hd(w,_))},{flush:"post",deep:!0});let k=null;const x=()=>{k!=null&&(G4(n.subTree.type)?ks(()=>{s.set(k,d3(n.subTree))},n.subTree.suspense):s.set(k,d3(n.subTree)))};return In(x),gg(x),vo(()=>{s.forEach(y=>{const{subTree:w,suspense:_}=n,A=d3(w);if(y.type===A.type&&y.key===A.key){ch(A);const P=A.component.da;P&&ks(P,_);return}p(y)})}),()=>{if(k=null,!t.default)return l=null;const y=t.default(),w=y[0];if(y.length>1)return l=null,y;if(!g1(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return l=null,w;let _=d3(w);if(_.type===xs)return l=null,_;const A=_.type,P=v8(ha(_)?_.type.__asyncResolved||{}:A),{include:z,exclude:L,max:E}=e;if(z&&(!P||!Hd(z,P))||L&&P&&Hd(L,P))return _.shapeFlag&=-257,l=_,w;const T=_.key==null?A:_.key,$=s.get(T);return _.el&&(_=wa(_),w.shapeFlag&128&&(w.ssContent=_)),k=T,$?(_.el=$.el,_.component=$.component,_.transition&&m1(_,_.transition),_.shapeFlag|=512,i.delete(T),i.add(T)):(i.add(T),E&&i.size>parseInt(E,10)&&m(i.values().next().value)),_.shapeFlag|=256,l=_,G4(w.type)?w:_}}},PZe=wP;function Hd(e,t){return rn(e)?e.some(n=>Hd(n,t)):To(e)?e.split(",").includes(t):iR(e)?(e.lastIndex=0,e.test(t)):!1}function kP(e,t){pA(e,"a",t)}function bP(e,t){pA(e,"da",t)}function pA(e,t,n=ei){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Cp(t,o,n),n){let s=n.parent;for(;s&&s.parent;)gf(s.parent.vnode)&&_P(o,t,n,s),s=s.parent}}function _P(e,t,n,o){const s=Cp(t,e,o,!0);En(()=>{rg(o[t],s)},n)}function ch(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function d3(e){return e.shapeFlag&128?e.ssContent:e}function Cp(e,t,n=ei,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{ga();const r=Pu(n),a=Dl(t,n,e,l);return r(),va(),a});return o?s.unshift(i):s.push(i),i}}const Ma=e=>(t,n=ei)=>{(!P0||e==="sp")&&Cp(e,(...o)=>t(...o),n)},xP=Ma("bm"),In=Ma("m"),hA=Ma("bu"),gg=Ma("u"),vo=Ma("bum"),En=Ma("um"),SP=Ma("sp"),CP=Ma("rtg"),MP=Ma("rtc");function mA(e,t=ei){Cp("ec",e,t)}const vg="components",AP="directives";function yg(e,t){return wg(vg,e,!0,t)||e}const gA=Symbol.for("v-ndc");function cs(e){return To(e)?wg(vg,e,!1)||e:e||gA}function FZe(e){return wg(AP,e)}function wg(e,t,n=!0,o=!1){const s=ti||ei;if(s){const i=s.type;if(e===vg){const r=v8(i,!1);if(r&&(r===t||r===Fs(t)||r===mp(Fs(t))))return i}const l=pw(s[e]||i[e],t)||pw(s.appContext[e],t);return!l&&o?i:l}}function pw(e,t){return e&&(e[t]||e[Fs(t)]||e[mp(Fs(t))])}function rt(e,t,n,o){let s;const i=n&&n[o],l=rn(e);if(l||To(e)){const r=l&&l1(e);let a=!1,c=!1;r&&(a=!il(e),c=ya(e),e=kp(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(r,a,void 0,i&&i[a]));else{const r=Object.keys(e);s=new Array(r.length);for(let a=0,c=r.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function jn(e,t,n={},o,s){if(ti.ce||ti.parent&&ha(ti.parent)&&ti.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),ue(Ce,null,[W("slot",n,o&&o())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const l=i&&kg(i(n)),r=n.key||l&&l.key,a=ue(Ce,{key:(r&&!dl(r)?r:`_${t}`)+(!l&&o?"_fb":"")},l||(o?o():[]),l&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function kg(e){return e.some(t=>g1(t)?!(t.type===xs||t.type===Ce&&!kg(t.children)):!0)?e:null}function jZe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:l4(o)]=e[o];return n}const c8=e=>e?DA(e)?yf(e):c8(e.parent):null,i2=xo(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>c8(e.parent),$root:e=>c8(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>bg(e),$forceUpdate:e=>e.f||(e.f=()=>{pg(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>iP.bind(e)}),uh=(e,t)=>e!==Yn&&!e.__isScriptSetup&&fo(e,t),u8={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:l,type:r,appContext:a}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(uh(o,t))return l[t]=1,o[t];if(s!==Yn&&fo(s,t))return l[t]=2,s[t];if(fo(i,t))return l[t]=3,i[t];if(n!==Yn&&fo(n,t))return l[t]=4,n[t];d8&&(l[t]=0)}}const c=i2[t];let u,d;if(c)return t==="$attrs"&&ui(e.attrs,"get",""),c(e);if((u=r.__cssModules)&&(u=u[t]))return u;if(n!==Yn&&fo(n,t))return l[t]=4,n[t];if(d=a.config.globalProperties,fo(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return uh(s,t)?(s[t]=n,!0):o!==Yn&&fo(o,t)?(o[t]=n,!0):fo(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:l}},r){let a;return!!(n[r]||e!==Yn&&r[0]!=="$"&&fo(e,r)||uh(t,r)||fo(i,r)||fo(o,r)||fo(i2,r)||fo(s.config.globalProperties,r)||(a=l.__cssModules)&&a[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fo(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},TP=xo({},u8,{get(e,t){if(t!==Symbol.unscopables)return u8.get(e,t,e)},has(e,t){return t[0]!=="_"&&!uR(t)}});function OZe(){return null}function HZe(){return null}function DZe(e){}function VZe(e){}function WZe(){return null}function qZe(){}function UZe(e,t){return null}function ZZe(){return vA().slots}function vf(){return vA().attrs}function vA(e){const t=Ts();return t.setupContext||(t.setupContext=qA(t))}function N2(e){return rn(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function KZe(e,t){const n=N2(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?rn(s)||_n(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function GZe(e,t){return!e||!t?e||t:rn(e)&&rn(t)?e.concat(t):xo({},N2(e),N2(t))}function YZe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function XZe(e){const t=Ts(),n=P0;let o=e();B2(),n&&ru(!1);const s=()=>{Pu(t),n&&ru(!0)},i=()=>{Ts()!==t&&t.scope.off(),B2(),n&&ru(!1)};return ag(o)&&(o=o.catch(l=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),l})),[o,()=>{s(),Promise.resolve().then(i)}]}let d8=!0;function EP(e){const t=bg(e),n=e.proxy,o=e.ctx;d8=!1,t.beforeCreate&&hw(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:r,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:k,beforeDestroy:x,beforeUnmount:y,destroyed:w,unmounted:_,render:A,renderTracked:P,renderTriggered:z,errorCaptured:L,serverPrefetch:E,expose:T,inheritAttrs:$,components:C,directives:j,filters:H}=t;if(c&&IP(c,o,null),l)for(const R in l){const O=l[R];_n(O)&&(o[R]=O.bind(n))}if(s){const R=s.call(n,n);po(R)&&(e.data=ds(R))}if(d8=!0,i)for(const R in i){const O=i[R],U=_n(O)?O.bind(n,n):_n(O.get)?O.get.bind(n,n):Ol,Z=!_n(O)&&_n(O.set)?O.set.bind(n):Ol,q=B({get:U,set:Z});Object.defineProperty(o,R,{enumerable:!0,configurable:!0,get:()=>q.value,set:te=>q.value=te})}if(r)for(const R in r)yA(r[R],o,n,R);if(a){const R=_n(a)?a.call(n):a;Reflect.ownKeys(R).forEach(O=>{qn(O,R[O])})}u&&hw(u,e,"c");function M(R,O){rn(O)?O.forEach(U=>R(U.bind(n))):O&&R(O.bind(n))}if(M(xP,d),M(In,f),M(hA,p),M(gg,h),M(kP,m),M(bP,k),M(mA,L),M(MP,P),M(CP,z),M(vo,y),M(En,_),M(SP,E),rn(T))if(T.length){const R=e.exposed||(e.exposed={});T.forEach(O=>{Object.defineProperty(R,O,{get:()=>n[O],set:U=>n[O]=U,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===Ol&&(e.render=A),$!=null&&(e.inheritAttrs=$),C&&(e.components=C),j&&(e.directives=j),E&&mg(e)}function IP(e,t,n=Ol){rn(e)&&(e=f8(e));for(const o in e){const s=e[o];let i;po(s)?"default"in s?i=fn(s.from||o,s.default,!0):i=fn(s.from||o):i=fn(s),ps(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function hw(e,t,n){Dl(rn(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function yA(e,t,n,o){let s=o.includes(".")?iA(n,o):()=>n[o];if(To(e)){const i=t[e];_n(i)&&Ke(s,i)}else if(_n(e))Ke(s,e.bind(n));else if(po(e))if(rn(e))e.forEach(i=>yA(i,t,n,o));else{const i=_n(e.handler)?e.handler.bind(n):t[e.handler];_n(i)&&Ke(s,i,e)}}function bg(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let a;return r?a=r:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(c=>Z4(a,c,l,!0)),Z4(a,t,l)),po(t)&&i.set(t,a),a}function Z4(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&Z4(e,i,n,!0),s&&s.forEach(l=>Z4(e,l,n,!0));for(const l in t)if(!(o&&l==="expose")){const r=LP[l]||n&&n[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const LP={data:mw,props:gw,emits:gw,methods:Dd,computed:Dd,beforeCreate:ki,created:ki,beforeMount:ki,mounted:ki,beforeUpdate:ki,updated:ki,beforeDestroy:ki,beforeUnmount:ki,destroyed:ki,unmounted:ki,activated:ki,deactivated:ki,errorCaptured:ki,serverPrefetch:ki,components:Dd,directives:Dd,watch:NP,provide:mw,inject:$P};function mw(e,t){return t?e?function(){return xo(_n(e)?e.call(this,this):e,_n(t)?t.call(this,this):t)}:t:e}function $P(e,t){return Dd(f8(e),f8(t))}function f8(e){if(rn(e)){const t={};for(let n=0;n{let u,d=Yn,f;return sP(()=>{const p=e[s];Qs(u,p)&&(u=p,c())}),{get(){return a(),n.get?n.get(u):u},set(p){const h=n.set?n.set(p):p;if(!Qs(h,u)&&!(d!==Yn&&Qs(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${i}`in m)||(u=p,c()),o.emit(`update:${t}`,h),Qs(p,h)&&Qs(p,d)&&!Qs(h,f)&&c(),d=p,f=h}}});return r[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?l||Yn:r,done:!1}:{done:!0}}}},r}const kA=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fs(t)}Modifiers`]||e[`${Wi(t)}Modifiers`];function RP(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Yn;let s=n;const i=t.startsWith("update:"),l=i&&kA(o,t.slice(7));l&&(l.trim&&(s=n.map(u=>To(u)?u.trim():u)),l.number&&(s=n.map(gp)));let r,a=o[r=l4(t)]||o[r=l4(Fs(t))];!a&&i&&(a=o[r=l4(Wi(t))]),a&&Dl(a,e,6,s);const c=o[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Dl(c,e,6,s)}}const PP=new WeakMap;function bA(e,t,n=!1){const o=n?PP:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let l={},r=!1;if(!_n(e)){const a=c=>{const u=bA(c,t,!0);u&&(r=!0,xo(l,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!r?(po(e)&&o.set(e,null),null):(rn(i)?i.forEach(a=>l[a]=null):xo(l,i),po(e)&&o.set(e,l),l)}function Mp(e,t){return!e||!ff(t)?!1:(t=t.slice(2).replace(/Once$/,""),fo(e,t[0].toLowerCase()+t.slice(1))||fo(e,Wi(t))||fo(e,t))}function a4(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:l,attrs:r,emit:a,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,k=I2(e);let x,y;try{if(n.shapeFlag&4){const _=s||o,A=_;x=Vi(c.call(A,_,u,d,p,f,h)),y=r}else{const _=t;x=Vi(_.length>1?_(d,{attrs:r,slots:l,emit:a}):_(d,null)),y=t.props?r:jP(r)}}catch(_){l2.length=0,Ru(_,e,1),x=W(xs)}let w=x;if(y&&m!==!1){const _=Object.keys(y),{shapeFlag:A}=w;_.length&&A&7&&(i&&_.some(dp)&&(y=OP(y,i)),w=wa(w,y,!1,!0))}return n.dirs&&(w=wa(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&m1(w,n.transition),x=w,I2(k),x}function FP(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||ff(n))&&((t||(t={}))[n]=e[n]);return t},OP=(e,t)=>{const n={};for(const o in e)(!dp(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function HP(e,t,n){const{props:o,children:s,component:i}=e,{props:l,children:r,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?vw(o,l,c):!!l;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(xA),CA=e=>Object.getPrototypeOf(e)===xA;function DP(e,t,n,o=!1){const s={},i=SA();e.propsDefaults=Object.create(null),MA(e,t,s,i);for(const l in e.propsOptions[0])l in s||(s[l]=void 0);n?e.props=o?s:jR(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function VP(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:l}}=e,r=so(s),[a]=e.propsOptions;let c=!1;if((o||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=AA(d,t,!0);xo(l,f),p&&r.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return po(e)&&o.set(e,eu),eu;if(rn(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",xg=e=>rn(e)?e.map(Vi):[Vi(e)],qP=(e,t,n)=>{if(t._n)return t;const o=ae((...s)=>xg(t(...s)),n);return o._c=!1,o},TA=(e,t,n)=>{const o=e._ctx;for(const s in e){if(_g(s))continue;const i=e[s];if(_n(i))t[s]=qP(s,i,o);else if(i!=null){const l=xg(i);t[s]=()=>l}}},EA=(e,t)=>{const n=xg(t);e.slots.default=()=>n},IA=(e,t,n)=>{for(const o in t)(n||!_g(o))&&(e[o]=t[o])},UP=(e,t,n)=>{const o=e.slots=SA();if(e.vnode.shapeFlag&32){const s=t._;s?(IA(o,t,n),n&&IM(o,"_",s,!0)):TA(t,o)}else t&&EA(e,t)},ZP=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,l=Yn;if(o.shapeFlag&32){const r=t._;r?n&&r===1?i=!1:IA(s,t,n):(i=!t.$stable,TA(t,s)),l=t}else t&&(EA(e,t),l={default:1});if(i)for(const r in s)!_g(r)&&l[r]==null&&delete s[r]},ks=RA;function KP(e){return LA(e)}function GP(e){return LA(e,pP)}function LA(e,t){const n=vp();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:l,createText:r,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Ol,insertStaticContent:h}=e,m=(F,K,he,ye=null,ve=null,ie=null,de=void 0,be=null,Se=!!K.dynamicChildren)=>{if(F===K)return;F&&!sr(F,K)&&(ye=me(F),te(F,ve,ie,!0),F=null),K.patchFlag===-2&&(Se=!1,K.dynamicChildren=null);const{type:je,ref:et,shapeFlag:le}=K;switch(je){case r1:k(F,K,he,ye);break;case xs:x(F,K,he,ye);break;case lu:F==null&&y(K,he,ye,de);break;case Ce:C(F,K,he,ye,ve,ie,de,be,Se);break;default:le&1?A(F,K,he,ye,ve,ie,de,be,Se):le&6?j(F,K,he,ye,ve,ie,de,be,Se):(le&64||le&128)&&je.process(F,K,he,ye,ve,ie,de,be,Se,at)}et!=null&&ve?su(et,F&&F.ref,ie,K||F,!K):et==null&&F&&F.ref!=null&&su(F.ref,null,ie,F,!0)},k=(F,K,he,ye)=>{if(F==null)o(K.el=r(K.children),he,ye);else{const ve=K.el=F.el;K.children!==F.children&&c(ve,K.children)}},x=(F,K,he,ye)=>{F==null?o(K.el=a(K.children||""),he,ye):K.el=F.el},y=(F,K,he,ye)=>{[F.el,F.anchor]=h(F.children,K,he,ye,F.el,F.anchor)},w=({el:F,anchor:K},he,ye)=>{let ve;for(;F&&F!==K;)ve=f(F),o(F,he,ye),F=ve;o(K,he,ye)},_=({el:F,anchor:K})=>{let he;for(;F&&F!==K;)he=f(F),s(F),F=he;s(K)},A=(F,K,he,ye,ve,ie,de,be,Se)=>{if(K.type==="svg"?de="svg":K.type==="math"&&(de="mathml"),F==null)P(K,he,ye,ve,ie,de,be,Se);else{const je=F.el&&F.el._isVueCE?F.el:null;try{je&&je._beginPatch(),E(F,K,ve,ie,de,be,Se)}finally{je&&je._endPatch()}}},P=(F,K,he,ye,ve,ie,de,be)=>{let Se,je;const{props:et,shapeFlag:le,transition:fe,dirs:ge}=F;if(Se=F.el=l(F.type,ie,et&&et.is,et),le&8?u(Se,F.children):le&16&&L(F.children,Se,null,ye,ve,dh(F,ie),de,be),ge&&Cr(F,null,ye,"created"),z(Se,F,F.scopeId,de,ye),et){for(const Fe in et)Fe!=="value"&&!T0(Fe)&&i(Se,Fe,null,et[Fe],ie,ye);"value"in et&&i(Se,"value",null,et.value,ie),(je=et.onVnodeBeforeMount)&&ji(je,ye,F)}ge&&Cr(F,null,ye,"beforeMount");const Oe=$A(ve,fe);Oe&&fe.beforeEnter(Se),o(Se,K,he),((je=et&&et.onVnodeMounted)||Oe||ge)&&ks(()=>{try{je&&ji(je,ye,F),Oe&&fe.enter(Se),ge&&Cr(F,null,ye,"mounted")}finally{}},ve)},z=(F,K,he,ye,ve)=>{if(he&&p(F,he),ye)for(let ie=0;ie{for(let je=Se;je{const be=K.el=F.el;let{patchFlag:Se,dynamicChildren:je,dirs:et}=K;Se|=F.patchFlag&16;const le=F.props||Yn,fe=K.props||Yn;let ge;if(he&&Q1(he,!1),(ge=fe.onVnodeBeforeUpdate)&&ji(ge,he,K,F),et&&Cr(K,F,he,"beforeUpdate"),he&&Q1(he,!0),(le.innerHTML&&fe.innerHTML==null||le.textContent&&fe.textContent==null)&&u(be,""),je?T(F.dynamicChildren,je,be,he,ye,dh(K,ve),ie):de||O(F,K,be,null,he,ye,dh(K,ve),ie,!1),Se>0){if(Se&16)$(be,le,fe,he,ve);else if(Se&2&&le.class!==fe.class&&i(be,"class",null,fe.class,ve),Se&4&&i(be,"style",le.style,fe.style,ve),Se&8){const Oe=K.dynamicProps;for(let Fe=0;Fe{ge&&ji(ge,he,K,F),et&&Cr(K,F,he,"updated")},ye)},T=(F,K,he,ye,ve,ie,de)=>{for(let be=0;be{if(K!==he){if(K!==Yn)for(const ie in K)!T0(ie)&&!(ie in he)&&i(F,ie,K[ie],null,ve,ye);for(const ie in he){if(T0(ie))continue;const de=he[ie],be=K[ie];de!==be&&ie!=="value"&&i(F,ie,be,de,ve,ye)}"value"in he&&i(F,"value",K.value,he.value,ve)}},C=(F,K,he,ye,ve,ie,de,be,Se)=>{const je=K.el=F?F.el:r(""),et=K.anchor=F?F.anchor:r("");let{patchFlag:le,dynamicChildren:fe,slotScopeIds:ge}=K;ge&&(be=be?be.concat(ge):ge),F==null?(o(je,he,ye),o(et,he,ye),L(K.children||[],he,et,ve,ie,de,be,Se)):le>0&&le&64&&fe&&F.dynamicChildren&&F.dynamicChildren.length===fe.length?(T(F.dynamicChildren,fe,he,ve,ie,de,be),(K.key!=null||ve&&K===ve.subTree)&&Sg(F,K,!0)):O(F,K,he,et,ve,ie,de,be,Se)},j=(F,K,he,ye,ve,ie,de,be,Se)=>{K.slotScopeIds=be,F==null?K.shapeFlag&512?ve.ctx.activate(K,he,ye,de,Se):H(K,he,ye,ve,ie,de,Se):D(F,K,Se)},H=(F,K,he,ye,ve,ie,de)=>{const be=F.component=HA(F,ye,ve);if(gf(F)&&(be.ctx.renderer=at),VA(be,!1,de),be.asyncDep){if(ve&&ve.registerDep(be,M,de),!F.el){const Se=be.subTree=W(xs);x(null,Se,K,he),F.placeholder=Se.el}}else M(be,F,K,he,ve,ie,de)},D=(F,K,he)=>{const ye=K.component=F.component;if(HP(F,K,he))if(ye.asyncDep&&!ye.asyncResolved){R(ye,K,he);return}else ye.next=K,ye.update();else K.el=F.el,ye.vnode=K},M=(F,K,he,ye,ve,ie,de)=>{const be=()=>{if(F.isMounted){let{next:le,bu:fe,u:ge,parent:Oe,vnode:Fe}=F;{const Jt=NA(F);if(Jt){le&&(le.el=Fe.el,R(F,le,de)),Jt.asyncDep.then(()=>{ks(()=>{F.isUnmounted||je()},ve)});return}}let pt=le,kt;Q1(F,!1),le?(le.el=Fe.el,R(F,le,de)):le=Fe,fe&&nu(fe),(kt=le.props&&le.props.onVnodeBeforeUpdate)&&ji(kt,Oe,le,Fe),Q1(F,!0);const qt=a4(F),nn=F.subTree;F.subTree=qt,m(nn,qt,d(nn.el),me(nn),F,ve,ie),le.el=qt.el,pt===null&&Ap(F,qt.el),ge&&ks(ge,ve),(kt=le.props&&le.props.onVnodeUpdated)&&ks(()=>ji(kt,Oe,le,Fe),ve)}else{let le;const{el:fe,props:ge}=K,{bm:Oe,m:Fe,parent:pt,root:kt,type:qt}=F,nn=ha(K);if(Q1(F,!1),Oe&&nu(Oe),!nn&&(le=ge&&ge.onVnodeBeforeMount)&&ji(le,pt,K),Q1(F,!0),fe&&oe){const Jt=()=>{F.subTree=a4(F),oe(fe,F.subTree,F,ve,null)};nn&&qt.__asyncHydrate?qt.__asyncHydrate(fe,F,Jt):Jt()}else{kt.ce&&kt.ce._hasShadowRoot()&&kt.ce._injectChildStyle(qt,F.parent?F.parent.type:void 0);const Jt=F.subTree=a4(F);m(null,Jt,he,ye,F,ve,ie),K.el=Jt.el}if(Fe&&ks(Fe,ve),!nn&&(le=ge&&ge.onVnodeMounted)){const Jt=K;ks(()=>ji(le,pt,Jt),ve)}(K.shapeFlag&256||pt&&ha(pt.vnode)&&pt.vnode.shapeFlag&256)&&F.a&&ks(F.a,ve),F.isMounted=!0,K=he=ye=null}};F.scope.on();const Se=F.effect=new O4(be);F.scope.off();const je=F.update=Se.run.bind(Se),et=F.job=Se.runIfDirty.bind(Se);et.i=F,et.id=F.uid,Se.scheduler=()=>pg(et),Q1(F,!0),je()},R=(F,K,he)=>{K.component=F;const ye=F.vnode.props;F.vnode=K,F.next=null,VP(F,K.props,ye,he),ZP(F,K.children,he),ga(),iw(F),va()},O=(F,K,he,ye,ve,ie,de,be,Se=!1)=>{const je=F&&F.children,et=F?F.shapeFlag:0,le=K.children,{patchFlag:fe,shapeFlag:ge}=K;if(fe>0){if(fe&128){Z(je,le,he,ye,ve,ie,de,be,Se);return}else if(fe&256){U(je,le,he,ye,ve,ie,de,be,Se);return}}ge&8?(et&16&&Q(je,ve,ie),le!==je&&u(he,le)):et&16?ge&16?Z(je,le,he,ye,ve,ie,de,be,Se):Q(je,ve,ie,!0):(et&8&&u(he,""),ge&16&&L(le,he,ye,ve,ie,de,be,Se))},U=(F,K,he,ye,ve,ie,de,be,Se)=>{F=F||eu,K=K||eu;const je=F.length,et=K.length,le=Math.min(je,et);let fe;for(fe=0;feet?Q(F,ve,ie,!0,!1,le):L(K,he,ye,ve,ie,de,be,Se,le)},Z=(F,K,he,ye,ve,ie,de,be,Se)=>{let je=0;const et=K.length;let le=F.length-1,fe=et-1;for(;je<=le&&je<=fe;){const ge=F[je],Oe=K[je]=Se?sa(K[je]):Vi(K[je]);if(sr(ge,Oe))m(ge,Oe,he,null,ve,ie,de,be,Se);else break;je++}for(;je<=le&&je<=fe;){const ge=F[le],Oe=K[fe]=Se?sa(K[fe]):Vi(K[fe]);if(sr(ge,Oe))m(ge,Oe,he,null,ve,ie,de,be,Se);else break;le--,fe--}if(je>le){if(je<=fe){const ge=fe+1,Oe=gefe)for(;je<=le;)te(F[je],ve,ie,!0),je++;else{const ge=je,Oe=je,Fe=new Map;for(je=Oe;je<=fe;je++){const xn=K[je]=Se?sa(K[je]):Vi(K[je]);xn.key!=null&&Fe.set(xn.key,je)}let pt,kt=0;const qt=fe-Oe+1;let nn=!1,Jt=0;const kn=new Array(qt);for(je=0;je=qt){te(xn,ve,ie,!0);continue}let $n;if(xn.key!=null)$n=Fe.get(xn.key);else for(pt=Oe;pt<=fe;pt++)if(kn[pt-Oe]===0&&sr(xn,K[pt])){$n=pt;break}$n===void 0?te(xn,ve,ie,!0):(kn[$n-Oe]=je+1,$n>=Jt?Jt=$n:nn=!0,m(xn,K[$n],he,null,ve,ie,de,be,Se),kt++)}const Dn=nn?YP(kn):eu;for(pt=Dn.length-1,je=qt-1;je>=0;je--){const xn=Oe+je,$n=K[xn],Hn=K[xn+1],bn=xn+1{const{el:ie,type:de,transition:be,children:Se,shapeFlag:je}=F;if(je&6){q(F.component.subTree,K,he,ye);return}if(je&128){F.suspense.move(K,he,ye);return}if(je&64){de.move(F,K,he,at);return}if(de===Ce){o(ie,K,he);for(let le=0;lebe.enter(ie),ve));else{const{leave:le,delayLeave:fe,afterLeave:ge}=be,Oe=()=>{F.ctx.isUnmounted?s(ie):o(ie,K,he)},Fe=()=>{const pt=ie._isLeaving||!!ie[Nl];ie._isLeaving&&ie[Nl](!0),be.persisted&&!pt?Oe():le(ie,()=>{Oe(),ge&&ge()})};fe?fe(ie,Oe,Fe):Fe()}else o(ie,K,he)},te=(F,K,he,ye=!1,ve=!1)=>{const{type:ie,props:de,ref:be,children:Se,dynamicChildren:je,shapeFlag:et,patchFlag:le,dirs:fe,cacheIndex:ge,memo:Oe}=F;if(le===-2&&(ve=!1),be!=null&&(ga(),su(be,null,he,F,!0),va()),ge!=null&&(K.renderCache[ge]=void 0),et&256){K.ctx.deactivate(F);return}const Fe=et&1&&fe,pt=!ha(F);let kt;if(pt&&(kt=de&&de.onVnodeBeforeUnmount)&&ji(kt,K,F),et&6)se(F.component,he,ye);else{if(et&128){F.suspense.unmount(he,ye);return}Fe&&Cr(F,null,K,"beforeUnmount"),et&64?F.type.remove(F,K,he,at,ye):je&&!je.hasOnce&&(ie!==Ce||le>0&&le&64)?Q(je,K,he,!1,!0):(ie===Ce&&le&384||!ve&&et&16)&&Q(Se,K,he),ye&&ee(F)}const qt=Oe!=null&&ge==null;(pt&&(kt=de&&de.onVnodeUnmounted)||Fe||qt)&&ks(()=>{kt&&ji(kt,K,F),Fe&&Cr(F,null,K,"unmounted"),qt&&(F.el=null)},he)},ee=F=>{const{type:K,el:he,anchor:ye,transition:ve}=F;if(K===Ce){J(he,ye);return}if(K===lu){_(F);return}const ie=()=>{s(he),ve&&!ve.persisted&&ve.afterLeave&&ve.afterLeave()};if(F.shapeFlag&1&&ve&&!ve.persisted){const{leave:de,delayLeave:be}=ve,Se=()=>de(he,ie);be?be(F.el,ie,Se):Se()}else ie()},J=(F,K)=>{let he;for(;F!==K;)he=f(F),s(F),F=he;s(K)},se=(F,K,he)=>{const{bum:ye,scope:ve,job:ie,subTree:de,um:be,m:Se,a:je}=F;K4(Se),K4(je),ye&&nu(ye),ve.stop(),ie&&(ie.flags|=8,te(de,F,K,he)),be&&ks(be,K),ks(()=>{F.isUnmounted=!0},K)},Q=(F,K,he,ye=!1,ve=!1,ie=0)=>{for(let de=ie;de{if(F.shapeFlag&6)return me(F.component.subTree);if(F.shapeFlag&128)return F.suspense.next();const K=f(F.anchor||F.el),he=K&&K[lA];return he?f(he):K};let xe=!1;const Ye=(F,K,he)=>{let ye;F==null?K._vnode&&(te(K._vnode,null,null,!0),ye=K._vnode.component):m(K._vnode||null,F,K,null,null,null,he),K._vnode=F,xe||(xe=!0,iw(ye),q4(),xe=!1)},at={p:m,um:te,m:q,r:ee,mt:H,mc:L,pc:O,pbc:T,n:me,o:e};let X,oe;return t&&([X,oe]=t(at)),{render:Ye,hydrate:X,createApp:BP(Ye,X)}}function dh({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Q1({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function $A(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Sg(e,t,n=!1){const o=e.children,s=t.children;if(rn(o)&&rn(s))for(let i=0;i>1,e[n[r]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function NA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:NA(t)}function K4(e){if(e)for(let t=0;te.__isSuspense;let h8=0;const XP={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,l,r,a,c){if(e==null)JP(t,n,o,s,i,l,r,a,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}QP(e,t,n,o,s,l,r,a,c)}},hydrate:eF,normalize:tF},QZe=XP;function z2(e,t){const n=e.props&&e.props[t];_n(n)&&n()}function JP(e,t,n,o,s,i,l,r,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=BA(e,s,o,t,d,n,i,l,r,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,i,l),f.deps>0?(z2(e,"onPending"),z2(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,i,l),iu(f,e.ssFallback)):f.resolve(!1,!0)}function QP(e,t,n,o,s,i,l,r,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:k,isHydrating:x}=d;if(m)d.pendingBranch=f,sr(m,f)?(a(m,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():k&&(x||(a(h,p,n,o,s,null,i,l,r),iu(d,p)))):(d.pendingId=h8++,x?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),k?(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,i,l,r),iu(d,p))):h&&sr(h,f)?(a(h,f,n,o,s,d,i,l,r),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0&&d.resolve()));else if(h&&sr(h,f))a(h,f,n,o,s,d,i,l,r),iu(d,f);else if(z2(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=h8++,a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0)d.resolve();else{const{timeout:y,pendingId:w}=d;y>0?setTimeout(()=>{d.pendingId===w&&d.fallback(p)},y):y===0&&d.fallback(p)}}function BA(e,t,n,o,s,i,l,r,a,c,u=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:k}}=c;let x;const y=nF(e);y&&t&&t.pendingBranch&&(x=t.pendingId,t.deps++);const w=e.props?j4(e.props.timeout):void 0,_=i,A={vnode:e,parent:t,parentComponent:n,namespace:l,container:o,hiddenContainer:s,deps:0,pendingId:h8++,timeout:typeof w=="number"?w:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(P=!1,z=!1){const{vnode:L,activeBranch:E,pendingBranch:T,pendingId:$,effects:C,parentComponent:j,container:H,isInFallback:D}=A;let M=!1;if(A.isHydrating)A.isHydrating=!1;else if(!P){M=E&&T.transition&&T.transition.mode==="out-in";let U=!1;M&&(E.transition.afterLeave=()=>{$===A.pendingId&&(f(T,H,i===_&&!U?h(E):i,0),W4(C),D&&L.ssFallback&&(L.ssFallback.el=null))}),E&&!A.isFallbackMountPending&&(m(E.el)===H&&(i=h(E),U=!0),p(E,j,A,!0),!M&&D&&L.ssFallback&&ks(()=>L.ssFallback.el=null,A)),M||f(T,H,i,0)}A.isFallbackMountPending=!1,iu(A,T),A.pendingBranch=null,A.isInFallback=!1;let R=A.parent,O=!1;for(;R;){if(R.pendingBranch){R.effects.push(...C),O=!0;break}R=R.parent}!O&&!M&&W4(C),A.effects=[],y&&t&&t.pendingBranch&&x===t.pendingId&&(t.deps--,t.deps===0&&!z&&t.resolve()),z2(L,"onResolve")},fallback(P){if(!A.pendingBranch)return;const{vnode:z,activeBranch:L,parentComponent:E,container:T,namespace:$}=A;z2(z,"onFallback");const C=h(L),j=()=>{A.isFallbackMountPending=!1,A.isInFallback&&(d(null,P,T,C,E,null,$,r,a),iu(A,P))},H=P.transition&&P.transition.mode==="out-in";H&&(A.isFallbackMountPending=!0,L.transition.afterLeave=j),A.isInFallback=!0,p(L,E,null,!0),H||j()},move(P,z,L){A.activeBranch&&f(A.activeBranch,P,z,L),A.container=P},next(){return A.activeBranch&&h(A.activeBranch)},registerDep(P,z,L){const E=!!A.pendingBranch;E&&A.deps++;const T=P.vnode.el;P.asyncDep.catch($=>{Ru($,P,0)}).then($=>{if(P.isUnmounted||A.isUnmounted||A.pendingId!==P.suspenseId)return;B2(),P.asyncResolved=!0;const{vnode:C}=P;m8(P,$,!1),T&&(C.el=T);const j=!T&&P.subTree.el;z(P,C,m(T||P.subTree.el),T?null:h(P.subTree),A,l,L),j&&(C.placeholder=null,k(j)),Ap(P,C.el),E&&--A.deps===0&&A.resolve()})},unmount(P,z){A.isUnmounted=!0,A.activeBranch&&p(A.activeBranch,n,P,z),A.pendingBranch&&p(A.pendingBranch,n,P,z)}};return A}function eF(e,t,n,o,s,i,l,r,a){const c=t.suspense=BA(t,o,n,e.parentNode,document.createElement("div"),null,s,i,l,r,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,i,l);return c.deps===0&&c.resolve(!1,!0),u}function tF(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=ww(o?n.default:n),e.ssFallback=o?ww(n.fallback):W(xs)}function ww(e){let t;if(_n(e)){const n=R0&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=fi,PA())}return rn(e)&&(e=FP(e)),e=Vi(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function RA(e,t){t&&t.pendingBranch?rn(e)?t.effects.push(...e):t.effects.push(e):W4(e)}function iu(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,Ap(o,s))}function nF(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ce=Symbol.for("v-fgt"),r1=Symbol.for("v-txt"),xs=Symbol.for("v-cmt"),lu=Symbol.for("v-stc"),l2=[];let fi=null;function g(e=!1){l2.push(fi=e?null:[])}function PA(){l2.pop(),fi=l2[l2.length-1]||null}let R0=1;function Y4(e,t=!1){R0+=e,e<0&&fi&&t&&(fi.hasOnce=!0)}function FA(e){return e.dynamicChildren=R0>0?fi||eu:null,PA(),R0>0&&fi&&fi.push(e),e}function S(e,t,n,o,s,i){return FA(b(e,t,n,o,s,i,!0))}function ue(e,t,n,o,s){return FA(W(e,t,n,o,s,!0))}function g1(e){return e?e.__v_isVNode===!0:!1}function sr(e,t){return e.type===t.type&&e.key===t.key}function eKe(e){}const jA=({key:e})=>e??null,c4=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?To(e)||ps(e)||_n(e)?{i:ti,r:e,k:t,f:!!n}:e:null);function b(e,t=null,n=null,o=0,s=null,i=e===Ce?0:1,l=!1,r=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&jA(t),ref:t&&c4(t),scopeId:Sp,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ti};return r?(Cg(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=To(n)?8:16),R0>0&&!l&&fi&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&fi.push(a),a}const W=oF;function oF(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===gA)&&(e=xs),g1(e)){const r=wa(e,t,!0);return n&&Cg(r,n),R0>0&&!i&&fi&&(r.shapeFlag&6?fi[fi.indexOf(e)]=r:fi.push(r)),r.patchFlag=-2,r}if(aF(e)&&(e=e.__vccOpts),t){t=OA(t);let{class:r,style:a}=t;r&&!To(r)&&(t.class=Be(r)),po(a)&&(xp(a)&&!rn(a)&&(a=xo({},a)),t.style=Gt(a))}const l=To(e)?1:G4(e)?128:rA(e)?64:po(e)?4:_n(e)?2:0;return b(e,t,n,o,s,l,i,!0)}function OA(e){return e?xp(e)||CA(e)?xo({},e):e:null}function wa(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:l,children:r,transition:a}=e,c=t?io(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&jA(c),ref:t&&t.ref?n&&i?rn(i)?i.concat(c4(t)):[i,c4(t)]:c4(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&wa(e.ssContent),ssFallback:e.ssFallback&&wa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&m1(u,a.clone(u)),u}function He(e=" ",t=0){return W(r1,null,e,t)}function L0(e,t){const n=W(lu,null,e);return n.staticCount=t,n}function Y(e="",t=!1){return t?(g(),ue(xs,null,e)):W(xs,null,e)}function Vi(e){return e==null||typeof e=="boolean"?W(xs):rn(e)?W(Ce,null,e.slice()):g1(e)?sa(e):W(r1,null,String(e))}function sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:wa(e)}function Cg(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(rn(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),Cg(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!CA(t)?t._ctx=ti:s===3&&ti&&(ti.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _n(t)?(t={default:t,_ctx:ti},n=32):(t=String(t),o&64?(n=16,t=[He(t)]):n=8);e.children=t,e.shapeFlag|=n}function io(...e){const t={};for(let n=0;nei||ti;let X4,ru;{const e=vp(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(l=>l(i)):s[0](i)}};X4=t("__VUE_INSTANCE_SETTERS__",n=>ei=n),ru=t("__VUE_SSR_SETTERS__",n=>P0=n)}const Pu=e=>{const t=ei;return X4(e),e.scope.on(),()=>{e.scope.off(),X4(t)}},B2=()=>{ei&&ei.scope.off(),X4(null)};function DA(e){return e.vnode.shapeFlag&4}let P0=!1;function VA(e,t=!1,n=!1){t&&ru(t);const{props:o,children:s}=e.vnode,i=DA(e);DP(e,o,i,t),UP(e,s,n||t);const l=i?lF(e,t):void 0;return t&&ru(!1),l}function lF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,u8);const{setup:o}=n;if(o){ga();const s=e.setupContext=o.length>1?qA(e):null,i=Pu(e),l=hf(o,e,0,[e.props,s]),r=ag(l);if(va(),i(),(r||e.sp)&&!ha(e)&&mg(e),r){if(l.then(B2,B2),t)return l.then(a=>{m8(e,a,t)}).catch(a=>{Ru(a,e,0)});e.asyncDep=l}else m8(e,l,t)}else WA(e,t)}function m8(e,t,n){_n(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:po(t)&&(e.setupState=XM(t)),WA(e,n)}let J4,g8;function tKe(e){J4=e,g8=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,TP))}}const nKe=()=>!J4;function WA(e,t,n){const o=e.type;if(!e.render){if(!t&&J4&&!o.render){const s=o.template||bg(e).template;if(s){const{isCustomElement:i,compilerOptions:l}=e.appContext.config,{delimiters:r,compilerOptions:a}=o,c=xo(xo({isCustomElement:i,delimiters:r},l),a);o.render=J4(s,c)}}e.render=o.render||Ol,g8&&g8(e)}{const s=Pu(e);ga();try{EP(e)}finally{va(),s()}}}const rF={get(e,t){return ui(e,"get",""),e[t]}};function qA(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,rF),slots:e.slots,emit:e.emit,expose:t}}function yf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(XM(It(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in i2)return i2[n](e)},has(t,n){return n in t||n in i2}})):e.proxy}function v8(e,t=!0){return _n(e)?e.displayName||e.name:e.name||t&&e.__name}function aF(e){return _n(e)&&"__vccOpts"in e}const B=(e,t)=>KR(e,t,P0);function vn(e,t,n){try{Y4(-1);const o=arguments.length;return o===2?po(t)&&!rn(t)?g1(t)?W(e,null,[t]):W(e,t):W(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&g1(n)&&(n=[n]),W(e,t,n))}finally{Y4(1)}}function oKe(){}function sKe(e,t,n,o){const s=n[o];if(s&&cF(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function cF(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&fi&&fi.push(e),!0}const uF="3.5.35",iKe=Ol,lKe=QR,rKe=Rc,aKe=oA,dF={createComponentInstance:HA,setupComponent:VA,renderComponentRoot:a4,setCurrentRenderingInstance:I2,isVNode:g1,normalizeVNode:Vi,getComponentPublicInstance:yf,ensureValidVNode:kg,pushWarningContext:XR,popWarningContext:JR},cKe=dF,uKe=null,dKe=null,fKe=null;/** * @vue/runtime-dom v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let g8;const yw=typeof window<"u"&&window.trustedTypes;if(yw)try{g8=yw.createPolicy("vue",{createHTML:e=>e})}catch{}const VA=g8?e=>g8.createHTML(e):e=>e,iF="http://www.w3.org/2000/svg",lF="http://www.w3.org/1998/Math/MathML",Qr=typeof document<"u"?document:null,ww=Qr&&Qr.createElement("template"),rF={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?Qr.createElementNS(iF,e):t==="mathml"?Qr.createElementNS(lF,e):n?Qr.createElement(e,{is:n}):Qr.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>Qr.createTextNode(e),createComment:e=>Qr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const l=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{ww.innerHTML=VA(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const r=ww.content;if(o==="svg"||o==="mathml"){const a=r.firstChild;for(;a.firstChild;)r.appendChild(a.firstChild);r.removeChild(a)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ra="transition",wd="animation",ku=Symbol("_vtc"),WA={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qA=xo({},lA,WA),aF=e=>(e.displayName="Transition",e.props=qA,e),qi=aF((e,{slots:t})=>vn(oP,UA(e),t)),t0=(e,t=[])=>{rn(e)?e.forEach(n=>n(...t)):e&&e(...t)},kw=e=>e?rn(e)?e.some(t=>t.length>1):e.length>1:!1;function UA(e){const t={};for(const C in e)C in WA||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:c=l,appearToClass:u=r,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=cF(s),m=h&&h[0],k=h&&h[1],{onBeforeEnter:x,onEnter:y,onEnterCancelled:w,onLeave:_,onLeaveCancelled:M,onBeforeAppear:P=x,onAppear:B=y,onAppearCancelled:$=w}=t,T=(C,O,H,D)=>{C._enterCancelled=D,Ua(C,O?u:r),Ua(C,O?c:l),H&&H()},I=(C,O)=>{C._isLeaving=!1,Ua(C,d),Ua(C,p),Ua(C,f),O&&O()},N=C=>(O,H)=>{const D=C?B:y,A=()=>T(O,C,H);t0(D,[O,A]),bw(()=>{Ua(O,C?a:i),_r(O,C?u:r),kw(D)||_w(O,o,m,A)})};return xo(t,{onBeforeEnter(C){t0(x,[C]),_r(C,i),_r(C,l)},onBeforeAppear(C){t0(P,[C]),_r(C,a),_r(C,c)},onEnter:N(!1),onAppear:N(!0),onLeave(C,O){C._isLeaving=!0;const H=()=>I(C,O);_r(C,d),C._enterCancelled?(_r(C,f),v8(C)):(v8(C),_r(C,f)),bw(()=>{C._isLeaving&&(Ua(C,d),_r(C,p),kw(_)||_w(C,o,k,H))}),t0(_,[C,H])},onEnterCancelled(C){T(C,!1,void 0,!0),t0(w,[C])},onAppearCancelled(C){T(C,!0,void 0,!0),t0($,[C])},onLeaveCancelled(C){I(C),t0(M,[C])}})}function cF(e){if(e==null)return null;if(po(e))return[uh(e.enter),uh(e.leave)];{const t=uh(e);return[t,t]}}function uh(e){return F4(e)}function _r(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ku]||(e[ku]=new Set)).add(t)}function Ua(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[ku];n&&(n.delete(t),n.size||(e[ku]=void 0))}function bw(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uF=0;function _w(e,t,n,o){const s=e._endId=++uF,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:l,timeout:r,propCount:a}=ZA(e,t);if(!l)return o();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[h]||"").split(", "),s=o(`${Ra}Delay`),i=o(`${Ra}Duration`),l=xw(s,i),r=o(`${wd}Delay`),a=o(`${wd}Duration`),c=xw(r,a);let u=null,d=0,f=0;t===Ra?l>0&&(u=Ra,d=l,f=i.length):t===wd?c>0&&(u=wd,d=c,f=a.length):(d=Math.max(l,c),u=d>0?l>c?Ra:wd:null,f=u?u===Ra?i.length:a.length:0);const p=u===Ra&&/\b(?:transform|all)(?:,|$)/.test(o(`${Ra}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function xw(e,t){for(;e.lengthSw(n)+Sw(e[o])))}function Sw(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function v8(e){return(e?e.ownerDocument:document).body.offsetHeight}function dF(e,t,n){const o=e[ku];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const J4=Symbol("_vod"),KA=Symbol("_vsh"),_i={name:"show",beforeMount(e,{value:t},{transition:n}){e[J4]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):kd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),kd(e,!0),o.enter(e)):o.leave(e,()=>{kd(e,!1)}):kd(e,t))},beforeUnmount(e,{value:t}){kd(e,t)}};function kd(e,t){e.style.display=t?e[J4]:"none",e[KA]=!t}function fF(){_i.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const GA=Symbol("");function zZe(e){const t=Ts();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Q4(i,s))},o=()=>{const s=e(t.proxy);t.ce?Q4(t.ce,s):y8(t.subTree,s),n(s)};dA(()=>{V4(o)}),In(()=>{Ze(o,Ol,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),En(()=>s.disconnect())})}function y8(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{y8(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Q4(e.el,t);else if(e.type===Ce)e.children.forEach(n=>y8(n,t));else if(e.type===lu){let{el:n,anchor:o}=e;for(;n&&(Q4(n,t),n!==o);)n=n.nextSibling}}function Q4(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=fR(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[GA]=o}}const pF=/(?:^|;)\s*display\s*:/;function hF(e,t,n){const o=e.style,s=To(n);let i=!1;if(n&&!s){if(t)if(To(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();n[r]==null&&Vd(o,r,"")}else for(const l in t)n[l]==null&&Vd(o,l,"");for(const l in n){l==="display"&&(i=!0);const r=n[l];r!=null?gF(e,l,!To(t)&&t?t[l]:void 0,r)||Vd(o,l,r):Vd(o,l,"")}}else if(s){if(t!==n){const l=o[GA];l&&(n+=";"+l),o.cssText=n,i=pF.test(n)}}else t&&e.removeAttribute("style");J4 in e&&(e[J4]=i?o.display:"",e[KA]&&(o.display="none"))}const Cw=/\s*!important$/;function Vd(e,t,n){if(rn(n))n.forEach(o=>Vd(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=mF(e,t);Cw.test(n)?e.setProperty(Wi(o),n.replace(Cw,""),"important"):e[o]=n}}const Mw=["Webkit","Moz","ms"],dh={};function mF(e,t){const n=dh[t];if(n)return n;let o=Fs(t);if(o!=="filter"&&o in e)return dh[t]=o;o=pp(o);for(let s=0;sfh||(kF.then(()=>fh=0),fh=Date.now());function _F(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(rn(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const l=s.slice(),r=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xF=(e,t,n,o,s,i)=>{const l=s==="svg";t==="class"?dF(e,o,l):t==="style"?hF(e,n,o):df(t)?cp(t)||yF(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):SF(e,t,o,l))?(Ew(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tw(e,t,o,l,i,t!=="value")):e._isVueCE&&(CF(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!To(o)))?Ew(e,Fs(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Tw(e,t,o,l))};function SF(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Lw(t)&&_n(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Lw(t)&&To(n)?!1:t in e}function CF(e,t){const n=e._def.props;if(!n)return!1;const o=Fs(t);return Array.isArray(n)?n.some(s=>Fs(s)===o):Object.keys(n).some(s=>Fs(s)===o)}const Nw={};function MF(e,t,n){let o=Je(e,t);up(o)&&(o=xo({},o,t));class s extends Sg{constructor(l){super(o,l,n)}}return s.def=o,s}const BZe=((e,t)=>MF(e,t,VF)),AF=typeof HTMLElement<"u"?HTMLElement:class{};class Sg extends AF{constructor(t,n={},o=n5){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==n5?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(xo({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Sg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,yt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:l}=o;let r;if(i&&!rn(i))for(const a in i){const c=i[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=F4(this._props[a])),(r||(r=Object.create(null)))[Fs(a)]=!0)}this._numberProps=r,this._resolveProps(o),this.shadowRoot&&this._applyStyles(l),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)fo(this,o)||Object.defineProperty(this,o,{get:()=>v(n[o])})}_resolveProps(t){const{props:n}=t,o=rn(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(Fs))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):Nw;const s=Fs(t);n&&this._numberProps&&this._numberProps[s]&&(o=F4(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===Nw?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(Wi(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Wi(t),n+""):n||this.removeAttribute(Wi(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),DF(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=W(this._def,xo(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,l)=>{this.dispatchEvent(new CustomEvent(i,up(l[0])?xo({detail:l},l[0]):{detail:l}))};o.emit=(i,...l)=>{s(i,l),Wi(i)!==i&&s(Wi(i),l)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,i=this.shadowRoot,l=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let r=null;for(let a=t.length-1;a>=0;a--){const c=document.createElement("style");s&&c.setAttribute("nonce",s),c.textContent=t[a],i.insertBefore(c,r||l),r=c,a===0&&(o||this._styleAnchors.set(this._def,c),n&&this._styleAnchors.set(n,c))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),IF=EF({name:"TransitionGroup",props:xo({},qA,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ts(),o=iA();let s,i;return hg(()=>{if(!s.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!BF(s[0].el,n.vnode.el,l)){s=[];return}s.forEach(LF),s.forEach(NF);const r=s.filter(zF);v8(n.vnode.el),r.forEach(a=>{const c=a.el,u=c.style;_r(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[e5]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[e5]=null,Ua(c,l))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const l=so(e),r=UA(l);let a=l.tag||Ce;if(s=[],i)for(let c=0;c{r.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(r=>r&&o.classList.add(r)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:l}=ZA(o);return i.removeChild(o),l}const y1=e=>{const t=e.props["onUpdate:modelValue"]||!1;return rn(t)?n=>nu(t,n):t};function RF(e){e.target.composing=!0}function Bw(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Hl=Symbol("_assign");function Rw(e,t,n){return t&&(e=e.trim()),n&&(e=hp(e)),e}const js={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[Hl]=y1(s);const i=o||s.props&&s.props.type==="number";aa(e,t?"change":"input",l=>{l.target.composing||e[Hl](Rw(e.value,n,i))}),(n||i)&&aa(e,"change",()=>{e.value=Rw(e.value,n,i)}),t||(aa(e,"compositionstart",RF),aa(e,"compositionend",Bw),aa(e,"change",Bw))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},l){if(e[Hl]=y1(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?hp(e.value):e.value,a=t??"";if(r===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},t5={deep:!0,created(e,t,n){e[Hl]=y1(n),aa(e,"change",()=>{const o=e._modelValue,s=bu(e),i=e.checked,l=e[Hl];if(rn(o)){const r=gp(o,s),a=r!==-1;if(i&&!a)l(o.concat(s));else if(!i&&a){const c=[...o];c.splice(r,1),l(c)}}else if(Z0(o)){const r=new Set(o);i?r.add(s):r.delete(s),l(r)}else l(eT(e,i))})},mounted:Pw,beforeUpdate(e,t,n){e[Hl]=y1(n),Pw(e,t,n)}};function Pw(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(rn(t))s=gp(t,o.props.value)>-1;else if(Z0(t))s=t.has(o.props.value);else{if(t===n)return;s=ga(t,eT(e,!0))}e.checked!==s&&(e.checked=s)}const QA={created(e,{value:t},n){e.checked=ga(t,n.props.value),e[Hl]=y1(n),aa(e,"change",()=>{e[Hl](bu(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Hl]=y1(o),t!==n&&(e.checked=ga(t,o.props.value))}},w8={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=Z0(t);aa(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?hp(bu(l)):bu(l));e[Hl](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,yt(()=>{e._assigning=!1})}),e[Hl]=y1(o)},mounted(e,{value:t}){Fw(e,t)},beforeUpdate(e,t,n){e[Hl]=y1(n)},updated(e,{value:t}){e._assigning||Fw(e,t)}};function Fw(e,t){const n=e.multiple,o=rn(t);if(!(n&&!o&&!Z0(t))){for(let s=0,i=e.options.length;sString(c)===String(r)):l.selected=gp(t,r)>-1}else l.selected=t.has(r);else if(ga(bu(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function bu(e){return"_value"in e?e._value:e.value}function eT(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const PF={created(e,t,n){u3(e,t,n,null,"created")},mounted(e,t,n){u3(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){u3(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){u3(e,t,n,o,"updated")}};function tT(e,t){switch(e){case"SELECT":return w8;case"TEXTAREA":return js;default:switch(t){case"checkbox":return t5;case"radio":return QA;default:return js}}}function u3(e,t,n,o,s){const l=tT(e.tagName,n.props&&n.props.type)[s];l&&l(e,t,n,o)}function FF(){js.getSSRProps=({value:e})=>({value:e}),QA.getSSRProps=({value:e},t)=>{if(t.props&&ga(t.props.value,e))return{checked:!0}},t5.getSSRProps=({value:e},t)=>{if(rn(e)){if(t.props&&gp(e,t.props.value)>-1)return{checked:!0}}else if(Z0(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},PF.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=tT(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const jF=["ctrl","shift","alt","meta"],OF={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>jF.some(n=>e[`${n}Key`]&&!t.includes(n))},_t=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=Wi(s.key);if(t.some(l=>l===i||HF[l]===i))return e(s)}))},nT=xo({patchProp:xF},rF);let a2,jw=!1;function oT(){return a2||(a2=HP(nT))}function sT(){return a2=jw?a2:DP(nT),jw=!0,a2}const DF=((...e)=>{oT().render(...e)}),FZe=((...e)=>{sT().hydrate(...e)}),n5=((...e)=>{const t=oT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=lT(o);if(!s)return;const i=t._component;!_n(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const l=n(s,!1,iT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),l},t}),VF=((...e)=>{const t=sT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=lT(o);if(s)return n(s,!0,iT(s))},t});function iT(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lT(e){return To(e)?document.querySelector(e):e}let Ow=!1;const jZe=()=>{Ow||(Ow=!0,FF(),fF())};/*! +**/let y8;const kw=typeof window<"u"&&window.trustedTypes;if(kw)try{y8=kw.createPolicy("vue",{createHTML:e=>e})}catch{}const UA=y8?e=>y8.createHTML(e):e=>e,fF="http://www.w3.org/2000/svg",pF="http://www.w3.org/1998/Math/MathML",Qr=typeof document<"u"?document:null,bw=Qr&&Qr.createElement("template"),hF={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?Qr.createElementNS(fF,e):t==="mathml"?Qr.createElementNS(pF,e):n?Qr.createElement(e,{is:n}):Qr.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>Qr.createTextNode(e),createComment:e=>Qr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const l=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{bw.innerHTML=UA(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const r=bw.content;if(o==="svg"||o==="mathml"){const a=r.firstChild;for(;a.firstChild;)r.appendChild(a.firstChild);r.removeChild(a)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ba="transition",wd="animation",bu=Symbol("_vtc"),ZA={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},KA=xo({},cA,ZA),mF=e=>(e.displayName="Transition",e.props=KA,e),qi=mF((e,{slots:t})=>vn(uP,GA(e),t)),e0=(e,t=[])=>{rn(e)?e.forEach(n=>n(...t)):e&&e(...t)},_w=e=>e?rn(e)?e.some(t=>t.length>1):e.length>1:!1;function GA(e){const t={};for(const C in e)C in ZA||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:c=l,appearToClass:u=r,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=gF(s),m=h&&h[0],k=h&&h[1],{onBeforeEnter:x,onEnter:y,onEnterCancelled:w,onLeave:_,onLeaveCancelled:A,onBeforeAppear:P=x,onAppear:z=y,onAppearCancelled:L=w}=t,E=(C,j,H,D)=>{C._enterCancelled=D,qa(C,j?u:r),qa(C,j?c:l),H&&H()},T=(C,j)=>{C._isLeaving=!1,qa(C,d),qa(C,p),qa(C,f),j&&j()},$=C=>(j,H)=>{const D=C?z:y,M=()=>E(j,C,H);e0(D,[j,M]),xw(()=>{qa(j,C?a:i),_r(j,C?u:r),_w(D)||Sw(j,o,m,M)})};return xo(t,{onBeforeEnter(C){e0(x,[C]),_r(C,i),_r(C,l)},onBeforeAppear(C){e0(P,[C]),_r(C,a),_r(C,c)},onEnter:$(!1),onAppear:$(!0),onLeave(C,j){C._isLeaving=!0;const H=()=>T(C,j);_r(C,d),C._enterCancelled?(_r(C,f),w8(C)):(w8(C),_r(C,f)),xw(()=>{C._isLeaving&&(qa(C,d),_r(C,p),_w(_)||Sw(C,o,k,H))}),e0(_,[C,H])},onEnterCancelled(C){E(C,!1,void 0,!0),e0(w,[C])},onAppearCancelled(C){E(C,!0,void 0,!0),e0(L,[C])},onLeaveCancelled(C){T(C),e0(A,[C])}})}function gF(e){if(e==null)return null;if(po(e))return[fh(e.enter),fh(e.leave)];{const t=fh(e);return[t,t]}}function fh(e){return j4(e)}function _r(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[bu]||(e[bu]=new Set)).add(t)}function qa(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[bu];n&&(n.delete(t),n.size||(e[bu]=void 0))}function xw(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vF=0;function Sw(e,t,n,o){const s=e._endId=++vF,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:l,timeout:r,propCount:a}=YA(e,t);if(!l)return o();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[h]||"").split(", "),s=o(`${Ba}Delay`),i=o(`${Ba}Duration`),l=Cw(s,i),r=o(`${wd}Delay`),a=o(`${wd}Duration`),c=Cw(r,a);let u=null,d=0,f=0;t===Ba?l>0&&(u=Ba,d=l,f=i.length):t===wd?c>0&&(u=wd,d=c,f=a.length):(d=Math.max(l,c),u=d>0?l>c?Ba:wd:null,f=u?u===Ba?i.length:a.length:0);const p=u===Ba&&/\b(?:transform|all)(?:,|$)/.test(o(`${Ba}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Cw(e,t){for(;e.lengthMw(n)+Mw(e[o])))}function Mw(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function w8(e){return(e?e.ownerDocument:document).body.offsetHeight}function yF(e,t,n){const o=e[bu];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Q4=Symbol("_vod"),XA=Symbol("_vsh"),_i={name:"show",beforeMount(e,{value:t},{transition:n}){e[Q4]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):kd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),kd(e,!0),o.enter(e)):o.leave(e,()=>{kd(e,!1)}):kd(e,t))},beforeUnmount(e,{value:t}){kd(e,t)}};function kd(e,t){e.style.display=t?e[Q4]:"none",e[XA]=!t}function wF(){_i.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const JA=Symbol("");function pKe(e){const t=Ts();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>e5(i,s))},o=()=>{const s=e(t.proxy);t.ce?e5(t.ce,s):k8(t.subTree,s),n(s)};hA(()=>{W4(o)}),In(()=>{Ke(o,Ol,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),En(()=>s.disconnect())})}function k8(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{k8(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)e5(e.el,t);else if(e.type===Ce)e.children.forEach(n=>k8(n,t));else if(e.type===lu){let{el:n,anchor:o}=e;for(;n&&(e5(n,t),n!==o);)n=n.nextSibling}}function e5(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=wR(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[JA]=o}}const kF=/(?:^|;)\s*display\s*:/;function bF(e,t,n){const o=e.style,s=To(n);let i=!1;if(n&&!s){if(t)if(To(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();n[r]==null&&Vd(o,r,"")}else for(const l in t)n[l]==null&&Vd(o,l,"");for(const l in n){l==="display"&&(i=!0);const r=n[l];r!=null?xF(e,l,!To(t)&&t?t[l]:void 0,r)||Vd(o,l,r):Vd(o,l,"")}}else if(s){if(t!==n){const l=o[JA];l&&(n+=";"+l),o.cssText=n,i=kF.test(n)}}else t&&e.removeAttribute("style");Q4 in e&&(e[Q4]=i?o.display:"",e[XA]&&(o.display="none"))}const Aw=/\s*!important$/;function Vd(e,t,n){if(rn(n))n.forEach(o=>Vd(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=_F(e,t);Aw.test(n)?e.setProperty(Wi(o),n.replace(Aw,""),"important"):e[o]=n}}const Tw=["Webkit","Moz","ms"],ph={};function _F(e,t){const n=ph[t];if(n)return n;let o=Fs(t);if(o!=="filter"&&o in e)return ph[t]=o;o=mp(o);for(let s=0;shh||(AF.then(()=>hh=0),hh=Date.now());function EF(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(rn(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const l=s.slice(),r=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,IF=(e,t,n,o,s,i)=>{const l=s==="svg";t==="class"?yF(e,o,l):t==="style"?bF(e,n,o):ff(t)?dp(t)||CF(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):LF(e,t,o,l))?(Lw(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Iw(e,t,o,l,i,t!=="value")):e._isVueCE&&($F(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!To(o)))?Lw(e,Fs(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Iw(e,t,o,l))};function LF(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&zw(t)&&_n(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return zw(t)&&To(n)?!1:t in e}function $F(e,t){const n=e._def.props;if(!n)return!1;const o=Fs(t);return Array.isArray(n)?n.some(s=>Fs(s)===o):Object.keys(n).some(s=>Fs(s)===o)}const Bw={};function NF(e,t,n){let o=Je(e,t);fp(o)&&(o=xo({},o,t));class s extends Mg{constructor(l){super(o,l,n)}}return s.def=o,s}const hKe=((e,t)=>NF(e,t,YF)),zF=typeof HTMLElement<"u"?HTMLElement:class{};class Mg extends zF{constructor(t,n={},o=o5){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==o5?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(xo({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Mg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,yt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:l}=o;let r;if(i&&!rn(i))for(const a in i){const c=i[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=j4(this._props[a])),(r||(r=Object.create(null)))[Fs(a)]=!0)}this._numberProps=r,this._resolveProps(o),this.shadowRoot&&this._applyStyles(l),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)fo(this,o)||Object.defineProperty(this,o,{get:()=>v(n[o])})}_resolveProps(t){const{props:n}=t,o=rn(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(Fs))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):Bw;const s=Fs(t);n&&this._numberProps&&this._numberProps[s]&&(o=j4(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===Bw?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(Wi(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Wi(t),n+""):n||this.removeAttribute(Wi(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),GF(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=W(this._def,xo(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,l)=>{this.dispatchEvent(new CustomEvent(i,fp(l[0])?xo({detail:l},l[0]):{detail:l}))};o.emit=(i,...l)=>{s(i,l),Wi(i)!==i&&s(Wi(i),l)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,i=this.shadowRoot,l=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let r=null;for(let a=t.length-1;a>=0;a--){const c=document.createElement("style");s&&c.setAttribute("nonce",s),c.textContent=t[a],i.insertBefore(c,r||l),r=c,a===0&&(o||this._styleAnchors.set(this._def,c),n&&this._styleAnchors.set(n,c))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),PF=RF({name:"TransitionGroup",props:xo({},KA,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ts(),o=aA();let s,i;return gg(()=>{if(!s.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!DF(s[0].el,n.vnode.el,l)){s=[];return}s.forEach(jF),s.forEach(OF);const r=s.filter(HF);w8(n.vnode.el),r.forEach(a=>{const c=a.el,u=c.style;_r(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[t5]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[t5]=null,qa(c,l))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const l=so(e),r=GA(l);let a=l.tag||Ce;if(s=[],i)for(let c=0;c{r.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(r=>r&&o.classList.add(r)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:l}=YA(o);return i.removeChild(o),l}const v1=e=>{const t=e.props["onUpdate:modelValue"]||!1;return rn(t)?n=>nu(t,n):t};function VF(e){e.target.composing=!0}function Pw(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Hl=Symbol("_assign");function Fw(e,t,n){return t&&(e=e.trim()),n&&(e=gp(e)),e}const js={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[Hl]=v1(s);const i=o||s.props&&s.props.type==="number";aa(e,t?"change":"input",l=>{l.target.composing||e[Hl](Fw(e.value,n,i))}),(n||i)&&aa(e,"change",()=>{e.value=Fw(e.value,n,i)}),t||(aa(e,"compositionstart",VF),aa(e,"compositionend",Pw),aa(e,"change",Pw))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},l){if(e[Hl]=v1(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?gp(e.value):e.value,a=t??"";if(r===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},n5={deep:!0,created(e,t,n){e[Hl]=v1(n),aa(e,"change",()=>{const o=e._modelValue,s=_u(e),i=e.checked,l=e[Hl];if(rn(o)){const r=yp(o,s),a=r!==-1;if(i&&!a)l(o.concat(s));else if(!i&&a){const c=[...o];c.splice(r,1),l(c)}}else if(U0(o)){const r=new Set(o);i?r.add(s):r.delete(s),l(r)}else l(oT(e,i))})},mounted:jw,beforeUpdate(e,t,n){e[Hl]=v1(n),jw(e,t,n)}};function jw(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(rn(t))s=yp(t,o.props.value)>-1;else if(U0(t))s=t.has(o.props.value);else{if(t===n)return;s=ma(t,oT(e,!0))}e.checked!==s&&(e.checked=s)}const nT={created(e,{value:t},n){e.checked=ma(t,n.props.value),e[Hl]=v1(n),aa(e,"change",()=>{e[Hl](_u(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Hl]=v1(o),t!==n&&(e.checked=ma(t,o.props.value))}},b8={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=U0(t);aa(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?gp(_u(l)):_u(l));e[Hl](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,yt(()=>{e._assigning=!1})}),e[Hl]=v1(o)},mounted(e,{value:t}){Ow(e,t)},beforeUpdate(e,t,n){e[Hl]=v1(n)},updated(e,{value:t}){e._assigning||Ow(e,t)}};function Ow(e,t){const n=e.multiple,o=rn(t);if(!(n&&!o&&!U0(t))){for(let s=0,i=e.options.length;sString(c)===String(r)):l.selected=yp(t,r)>-1}else l.selected=t.has(r);else if(ma(_u(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function _u(e){return"_value"in e?e._value:e.value}function oT(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const WF={created(e,t,n){f3(e,t,n,null,"created")},mounted(e,t,n){f3(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){f3(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){f3(e,t,n,o,"updated")}};function sT(e,t){switch(e){case"SELECT":return b8;case"TEXTAREA":return js;default:switch(t){case"checkbox":return n5;case"radio":return nT;default:return js}}}function f3(e,t,n,o,s){const l=sT(e.tagName,n.props&&n.props.type)[s];l&&l(e,t,n,o)}function qF(){js.getSSRProps=({value:e})=>({value:e}),nT.getSSRProps=({value:e},t)=>{if(t.props&&ma(t.props.value,e))return{checked:!0}},n5.getSSRProps=({value:e},t)=>{if(rn(e)){if(t.props&&yp(e,t.props.value)>-1)return{checked:!0}}else if(U0(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},WF.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=sT(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const UF=["ctrl","shift","alt","meta"],ZF={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>UF.some(n=>e[`${n}Key`]&&!t.includes(n))},xt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=Wi(s.key);if(t.some(l=>l===i||KF[l]===i))return e(s)}))},iT=xo({patchProp:IF},hF);let r2,Hw=!1;function lT(){return r2||(r2=KP(iT))}function rT(){return r2=Hw?r2:GP(iT),Hw=!0,r2}const GF=((...e)=>{lT().render(...e)}),vKe=((...e)=>{rT().hydrate(...e)}),o5=((...e)=>{const t=lT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=cT(o);if(!s)return;const i=t._component;!_n(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const l=n(s,!1,aT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),l},t}),YF=((...e)=>{const t=rT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=cT(o);if(s)return n(s,!0,aT(s))},t});function aT(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function cT(e){return To(e)?document.querySelector(e):e}let Dw=!1;const yKe=()=>{Dw||(Dw=!0,qF(),wF())};/*! * shared v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */const o5=typeof window<"u",M1=(e,t=!1)=>t?Symbol.for(e):Symbol(e),WF=(e,t,n)=>qF({l:e,k:t,s:n}),qF=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ss=e=>typeof e=="number"&&isFinite(e),rT=e=>Mg(e)==="[object Date]",_u=e=>Mg(e)==="[object RegExp]",Cg=e=>bo(e)&&Object.keys(e).length===0,Ms=Object.assign,UF=Object.create,Ao=(e=null)=>UF(e);let Hw;const _0=()=>Hw||(Hw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ao()),ZF=Object.prototype.hasOwnProperty;function Pl(e,t){return ZF.call(e,t)}const os=Array.isArray,jo=e=>typeof e=="function",Xt=e=>typeof e=="string",ao=e=>typeof e=="boolean",co=e=>e!==null&&typeof e=="object",KF=e=>co(e)&&jo(e.then)&&jo(e.catch),aT=Object.prototype.toString,Mg=e=>aT.call(e),bo=e=>Mg(e)==="[object Object]",GF=e=>e==null?"":os(e)||bo(e)&&e.toString===aT?JSON.stringify(e,null,2):String(e);function Ag(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}function YF(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function Dw(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function XF(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const JF=/^javascript:/i,QF=/^(?:href|src|action|formaction)$/i,ej=/&#(?:x([0-9a-f]+)|(\d+));?/gi,tj=/&(?:Tab|NewLine);/g,nj=/:?/gi,oj=/[\u0000-\u0020\u007f-\u009f]/g,sj=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,ij=/(^|[\s"'<>/])on(\w+\s*=)/gi,lj=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function rj(e,t,n){const o=t||n;if(!o)return e;const s=Number.parseInt(o,t?16:10);return s<=127?String.fromCharCode(s):e}function Tg(e){const t=e.replace(ej,rj).replace(tj,"").replace(nj,":").replace(oj,"");return JF.test(t)}function aj(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const i=s.index,l=t.lastIndex-1;let r=l+1,a=1,c=null;for(;r`${n}="${Vw(n,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,o)=>`${n}='${Vw(n,o)}'`),sj.test(e)&&(e=e.replace(ij,"$1on$2")),e=e.replace(lj,(t,n,o,s)=>Tg(s)?`${n}${o}about:blank`:t),e}const d3=e=>!co(e)||os(e);function c4(e,t){if(d3(e)||d3(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(co(o[i])&&!co(s[i])&&(s[i]=Array.isArray(o[i])?[]:Ao()),d3(s[i])||d3(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! + */const s5=typeof window<"u",C1=(e,t=!1)=>t?Symbol.for(e):Symbol(e),XF=(e,t,n)=>JF({l:e,k:t,s:n}),JF=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ss=e=>typeof e=="number"&&isFinite(e),uT=e=>Tg(e)==="[object Date]",xu=e=>Tg(e)==="[object RegExp]",Ag=e=>bo(e)&&Object.keys(e).length===0,Ms=Object.assign,QF=Object.create,Ao=(e=null)=>QF(e);let Vw;const b0=()=>Vw||(Vw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ao()),ej=Object.prototype.hasOwnProperty;function Pl(e,t){return ej.call(e,t)}const os=Array.isArray,jo=e=>typeof e=="function",Xt=e=>typeof e=="string",ao=e=>typeof e=="boolean",co=e=>e!==null&&typeof e=="object",tj=e=>co(e)&&jo(e.then)&&jo(e.catch),dT=Object.prototype.toString,Tg=e=>dT.call(e),bo=e=>Tg(e)==="[object Object]",nj=e=>e==null?"":os(e)||bo(e)&&e.toString===dT?JSON.stringify(e,null,2):String(e);function Eg(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}function oj(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function Ww(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function sj(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const ij=/^javascript:/i,lj=/^(?:href|src|action|formaction)$/i,rj=/&#(?:x([0-9a-f]+)|(\d+));?/gi,aj=/&(?:Tab|NewLine);/g,cj=/:?/gi,uj=/[\u0000-\u0020\u007f-\u009f]/g,dj=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,fj=/(^|[\s"'<>/])on(\w+\s*=)/gi,pj=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function hj(e,t,n){const o=t||n;if(!o)return e;const s=Number.parseInt(o,t?16:10);return s<=127?String.fromCharCode(s):e}function Ig(e){const t=e.replace(rj,hj).replace(aj,"").replace(cj,":").replace(uj,"");return ij.test(t)}function mj(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const i=s.index,l=t.lastIndex-1;let r=l+1,a=1,c=null;for(;r`${n}="${qw(n,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,o)=>`${n}='${qw(n,o)}'`),dj.test(e)&&(e=e.replace(fj,"$1on$2")),e=e.replace(pj,(t,n,o,s)=>Ig(s)?`${n}${o}about:blank`:t),e}const p3=e=>!co(e)||os(e);function u4(e,t){if(p3(e)||p3(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(co(o[i])&&!co(s[i])&&(s[i]=Array.isArray(o[i])?[]:Ao()),p3(s[i])||p3(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! * message-compiler v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */function uj(e,t,n){return{line:e,column:t,offset:n}}function k8(e,t,n){return{start:e,end:t}}const mo={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},dj=17;function Mp(e,t,n={}){const{domain:o,messages:s,args:i}=n,l=e,r=new SyntaxError(String(l));return r.code=e,t&&(r.location=t),r.domain=o,r}function fj(e){throw e}const vr=" ",pj="\r",ai=` -`,hj="\u2028",mj="\u2029";function gj(e){const t=e;let n=0,o=1,s=1,i=0;const l=B=>t[B]===pj&&t[B+1]===ai,r=B=>t[B]===ai,a=B=>t[B]===mj,c=B=>t[B]===hj,u=B=>l(B)||r(B)||a(B)||c(B),d=()=>n,f=()=>o,p=()=>s,h=()=>i,m=B=>l(B)||a(B)||c(B)?ai:t[B],k=()=>m(n),x=()=>m(n+i);function y(){return i=0,u(n)&&(o++,s=0),l(n)&&n++,n++,s++,t[n]}function w(){return l(n+i)&&i++,i++,t[n+i]}function _(){n=0,o=1,s=1,i=0}function M(B=0){i=B}function P(){const B=n+i;for(;B!==n;)y();i=0}return{index:d,line:f,column:p,peekOffset:h,charAt:m,currentChar:k,currentPeek:x,next:y,peek:w,reset:_,resetPeek:M,skipToPeek:P}}const Kr=void 0,vj=".",Ww="'",yj="tokenizer";function wj(e,t={}){const n=t.location!==!1,o=gj(e),s=()=>o.index(),i=()=>uj(o.line(),o.column(),o.index()),l=i(),r=s(),a={currentType:13,offset:r,startLoc:l,endLoc:l,lastType:13,lastOffset:r,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},c=()=>a,{onError:u}=t;function d(oe,de,ke,...Se){const me=c();if(de.column+=ke,de.offset+=ke,u){const Ae=n?k8(me.startLoc,de):null,le=Mp(oe,Ae,{domain:yj,args:Se});u(le)}}function f(oe,de,ke){oe.endLoc=i(),oe.currentType=de;const Se={type:de};return n&&(Se.loc=k8(oe.startLoc,oe.endLoc)),ke!=null&&(Se.value=ke),Se}const p=oe=>f(oe,13);function h(oe,de){return oe.currentChar()===de?(oe.next(),de):(d(mo.EXPECTED_TOKEN,i(),0,de),"")}function m(oe){let de="";for(;oe.currentPeek()===vr||oe.currentPeek()===ai;)de+=oe.currentPeek(),oe.peek();return de}function k(oe){const de=m(oe);return oe.skipToPeek(),de}function x(oe){if(oe===Kr)return!1;const de=oe.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de===95}function y(oe){if(oe===Kr)return!1;const de=oe.charCodeAt(0);return de>=48&&de<=57}function w(oe,de){const{currentType:ke}=de;if(ke!==2)return!1;m(oe);const Se=x(oe.currentPeek());return oe.resetPeek(),Se}function _(oe,de){const{currentType:ke}=de;if(ke!==2)return!1;m(oe);const Se=oe.currentPeek()==="-"?oe.peek():oe.currentPeek(),me=y(Se);return oe.resetPeek(),me}function M(oe,de){const{currentType:ke}=de;if(ke!==2)return!1;m(oe);const Se=oe.currentPeek()===Ww;return oe.resetPeek(),Se}function P(oe,de){const{currentType:ke}=de;if(ke!==7)return!1;m(oe);const Se=oe.currentPeek()===".";return oe.resetPeek(),Se}function B(oe,de){const{currentType:ke}=de;if(ke!==8)return!1;m(oe);const Se=x(oe.currentPeek());return oe.resetPeek(),Se}function $(oe,de){const{currentType:ke}=de;if(!(ke===7||ke===11))return!1;m(oe);const Se=oe.currentPeek()===":";return oe.resetPeek(),Se}function T(oe,de){const{currentType:ke}=de;if(ke!==9)return!1;const Se=()=>{const Ae=oe.currentPeek();return Ae==="{"?x(oe.peek()):Ae==="@"||Ae==="|"||Ae===":"||Ae==="."||Ae===vr||!Ae?!1:Ae===ai?(oe.peek(),Se()):N(oe,!1)},me=Se();return oe.resetPeek(),me}function I(oe){m(oe);const de=oe.currentPeek()==="|";return oe.resetPeek(),de}function N(oe,de=!0){const ke=(me=!1,Ae="")=>{const le=oe.currentPeek();return le==="{"||le==="@"||!le?me:le==="|"?!(Ae===vr||Ae===ai):le===vr?(oe.peek(),ke(!0,vr)):le===ai?(oe.peek(),ke(!0,ai)):!0},Se=ke();return de&&oe.resetPeek(),Se}function C(oe,de){const ke=oe.currentChar();return ke===Kr?Kr:de(ke)?(oe.next(),ke):null}function O(oe){const de=oe.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36}function H(oe){return C(oe,O)}function D(oe){const de=oe.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36||de===45}function A(oe){return C(oe,D)}function R(oe){const de=oe.charCodeAt(0);return de>=48&&de<=57}function j(oe){return C(oe,R)}function q(oe){const de=oe.charCodeAt(0);return de>=48&&de<=57||de>=65&&de<=70||de>=97&&de<=102}function K(oe){return C(oe,q)}function U(oe){let de="",ke="";for(;de=j(oe);)ke+=de;return ke}function te(oe){let de="";for(;;){const ke=oe.currentChar();if(ke==="\\"){const Se=oe.peek();Se==="{"||Se==="}"||Se==="@"||Se==="|"||Se==="\\"?(de+=ke+Se,oe.next(),oe.next()):(oe.resetPeek(),de+=ke,oe.next())}else{if(ke==="{"||ke==="}"||ke==="@"||ke==="|"||!ke)break;if(ke===vr||ke===ai)if(N(oe))de+=ke,oe.next();else{if(I(oe))break;de+=ke,oe.next()}else de+=ke,oe.next()}}return de}function J(oe){k(oe);let de="",ke="";for(;de=A(oe);)ke+=de;const Se=oe.currentChar();if(Se&&Se!=="}"&&Se!==Kr&&Se!==vr&&Se!==ai&&Se!==" "){const me=st(oe);return d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ke+me),ke+me}return oe.currentChar()===Kr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),ke}function ee(oe){k(oe);let de="";return oe.currentChar()==="-"?(oe.next(),de+=`-${U(oe)}`):de+=U(oe),oe.currentChar()===Kr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de}function ie(oe){return oe!==Ww&&oe!==ai}function Q(oe){k(oe),h(oe,"'");let de="",ke="";for(;de=C(oe,ie);)de==="\\"?ke+=he(oe):ke+=de;const Se=oe.currentChar();return Se===ai||Se===Kr?(d(mo.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),Se===ai&&(oe.next(),h(oe,"'")),ke):(h(oe,"'"),ke)}function he(oe){const de=oe.currentChar();switch(de){case"\\":case"'":return oe.next(),`\\${de}`;case"u":return xe(oe,de,4);case"U":return xe(oe,de,6);default:return d(mo.UNKNOWN_ESCAPE_SEQUENCE,i(),0,de),""}}function xe(oe,de,ke){h(oe,de);let Se="";for(let me=0;me{const Se=oe.currentChar();return Se==="{"||Se==="@"||Se==="|"||Se==="("||Se===")"||!Se||Se===vr?ke:(ke+=Se,oe.next(),de(ke))};return de("")}function F(oe){k(oe);const de=h(oe,"|");return k(oe),de}function Z(oe,de){let ke=null;switch(oe.currentChar()){case"{":return de.braceNest>=1&&d(mo.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),oe.next(),ke=f(de,2,"{"),k(oe),de.braceNest++,ke;case"}":return de.braceNest>0&&de.currentType===2&&d(mo.EMPTY_PLACEHOLDER,i(),0),oe.next(),ke=f(de,3,"}"),de.braceNest--,de.braceNest>0&&k(oe),de.inLinked&&de.braceNest===0&&(de.inLinked=!1),ke;case"@":return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),ke=fe(oe,de)||p(de),de.braceNest=0,ke;default:{let me=!0,Ae=!0,le=!0;if(I(oe))return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),ke=f(de,1,F(oe)),de.braceNest=0,de.inLinked=!1,ke;if(de.braceNest>0&&(de.currentType===4||de.currentType===5||de.currentType===6))return d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de.braceNest=0,ve(oe,de);if(me=w(oe,de))return ke=f(de,4,J(oe)),k(oe),ke;if(Ae=_(oe,de))return ke=f(de,5,ee(oe)),k(oe),ke;if(le=M(oe,de))return ke=f(de,6,Q(oe)),k(oe),ke;if(!me&&!Ae&&!le)return ke=f(de,12,st(oe)),d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ke.value),k(oe),ke;break}}return ke}function fe(oe,de){const{currentType:ke}=de;let Se=null;const me=oe.currentChar();switch((ke===7||ke===8||ke===11||ke===9)&&(me===ai||me===vr)&&d(mo.INVALID_LINKED_FORMAT,i(),0),me){case"@":return oe.next(),Se=f(de,7,"@"),de.inLinked=!0,Se;case".":return k(oe),oe.next(),f(de,8,".");case":":return k(oe),oe.next(),f(de,9,":");default:return I(oe)?(Se=f(de,1,F(oe)),de.braceNest=0,de.inLinked=!1,Se):P(oe,de)||$(oe,de)?(k(oe),fe(oe,de)):B(oe,de)?(k(oe),f(de,11,X(oe))):T(oe,de)?(k(oe),me==="{"?Z(oe,de)||Se:f(de,10,se(oe))):(ke===7&&d(mo.INVALID_LINKED_FORMAT,i(),0),de.braceNest=0,de.inLinked=!1,ve(oe,de))}}function ve(oe,de){let ke={type:13};if(de.braceNest>0)return Z(oe,de)||p(de);if(de.inLinked)return fe(oe,de)||p(de);switch(oe.currentChar()){case"{":return Z(oe,de)||p(de);case"}":return d(mo.UNBALANCED_CLOSING_BRACE,i(),0),oe.next(),f(de,3,"}");case"@":return fe(oe,de)||p(de);default:{if(I(oe))return ke=f(de,1,F(oe)),de.braceNest=0,de.inLinked=!1,ke;if(N(oe))return f(de,0,te(oe));break}}return ke}function ge(){const{currentType:oe,offset:de,startLoc:ke,endLoc:Se}=a;return a.lastType=oe,a.lastOffset=de,a.lastStartLoc=ke,a.lastEndLoc=Se,a.offset=s(),a.startLoc=i(),o.currentChar()===Kr?f(a,13):ve(o,a)}return{nextToken:ge,currentOffset:s,currentPosition:i,context:c}}const kj="parser",bj=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,_j=/\\([\\@{}|])/g;function xj(e,t){return t}function Sj(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function Cj(e={}){const t=e.location!==!1,{onError:n}=e;function o(x,y,w,_,...M){const P=x.currentPosition();if(P.offset+=_,P.column+=_,n){const B=t?k8(w,P):null,$=Mp(y,B,{domain:kj,args:M});n($)}}function s(x,y,w){const _={type:x};return t&&(_.start=y,_.end=y,_.loc={start:w,end:w}),_}function i(x,y,w,_){t&&(x.end=y,x.loc&&(x.loc.end=w))}function l(x,y){const w=x.context(),_=s(3,w.offset,w.startLoc);return _.value=y.replace(_j,xj),i(_,x.currentOffset(),x.currentPosition()),_}function r(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:M}=w,P=s(5,_,M);return P.index=parseInt(y,10),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function a(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:M}=w,P=s(4,_,M);return P.key=y,x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function c(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:M}=w,P=s(9,_,M);return P.value=y.replace(bj,Sj),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function u(x){const y=x.nextToken(),w=x.context(),{lastOffset:_,lastStartLoc:M}=w,P=s(8,_,M);return y.type!==11?(o(x,mo.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),P.value="",i(P,_,M),{nextConsumeToken:y,node:P}):(y.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(y)),P.value=y.value||"",i(P,x.currentOffset(),x.currentPosition()),{node:P})}function d(x,y){const w=x.context(),_=s(7,w.offset,w.startLoc);return _.value=y,i(_,x.currentOffset(),x.currentPosition()),_}function f(x){const y=x.context(),w=s(6,y.offset,y.startLoc);let _=x.nextToken();if(_.type===8){const M=u(x);w.modifier=M.node,_=M.nextConsumeToken||x.nextToken()}switch(_.type!==9&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),_=x.nextToken(),_.type===2&&(_=x.nextToken()),_.type){case 10:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=d(x,_.value||"");break;case 4:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=a(x,_.value||"");break;case 5:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=r(x,_.value||"");break;case 6:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=c(x,_.value||"");break;default:{o(x,mo.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const M=x.context(),P=s(7,M.offset,M.startLoc);return P.value="",i(P,M.offset,M.startLoc),w.key=P,i(w,M.offset,M.startLoc),{nextConsumeToken:_,node:w}}}return i(w,x.currentOffset(),x.currentPosition()),{node:w}}function p(x){const y=x.context(),w=y.currentType===1?x.currentOffset():y.offset,_=y.currentType===1?y.endLoc:y.startLoc,M=s(2,w,_);M.items=[];let P=null;do{const T=P||x.nextToken();switch(P=null,T.type){case 0:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),M.items.push(l(x,T.value||""));break;case 5:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),M.items.push(r(x,T.value||""));break;case 4:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),M.items.push(a(x,T.value||""));break;case 6:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),M.items.push(c(x,T.value||""));break;case 7:{const I=f(x);M.items.push(I.node),P=I.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const B=y.currentType===1?y.lastOffset:x.currentOffset(),$=y.currentType===1?y.lastEndLoc:x.currentPosition();return i(M,B,$),M}function h(x,y,w,_){const M=x.context();let P=_.items.length===0;const B=s(1,y,w);B.cases=[],B.cases.push(_);do{const $=p(x);P||(P=$.items.length===0),B.cases.push($)}while(M.currentType!==13);return P&&o(x,mo.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),i(B,x.currentOffset(),x.currentPosition()),B}function m(x){const y=x.context(),{offset:w,startLoc:_}=y,M=p(x);return y.currentType===13?M:h(x,w,_,M)}function k(x){const y=wj(x,Ms({},e)),w=y.context(),_=s(0,w.offset,w.startLoc);return t&&_.loc&&(_.loc.source=x),_.body=m(y),e.onCacheKey&&(_.cacheKey=e.onCacheKey(x)),w.currentType!==13&&o(y,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,x[w.offset]||""),i(_,y.currentOffset(),y.currentPosition()),_}return{parse:k}}function yr(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Mj(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function qw(e,t){for(let n=0;nUw(n)),e}function Uw(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nl;function a(m,k){l.code+=m}function c(m,k=!0){const x=k?o:"";a(s?x+" ".repeat(m):x)}function u(m=!0){const k=++l.indentLevel;m&&c(k)}function d(m=!0){const k=--l.indentLevel;m&&c(k)}function f(){c(l.indentLevel)}return{context:r,push:a,indent:u,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>l.needIndent}}function Ij(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),xu(e,t.key),t.modifier?(e.push(", "),xu(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function $j(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let i=0;i{const n=Xt(t.mode)?t.mode:"normal",o=Xt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` -`,i=t.needIndent?t.needIndent:n!=="arrow",l=e.helpers||[],r=Ej(e,{filename:o,breakLineCode:s,needIndent:i});r.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),r.indent(i),l.length>0&&(r.push(`const { ${Ag(l.map(u=>`${u}: _${u}`),", ")} } = ctx`),r.newline()),r.push("return "),xu(r,e),r.deindent(i),r.push("}"),delete e.helpers;const{code:a,map:c}=r.context();return{ast:e,code:a,map:c?c.toJSON():void 0}};function Bj(e,t={}){const n=Ms({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,r=Cj(n).parse(e);return o?(i&&Tj(r),s&&Pc(r),{ast:r,code:""}):(Aj(r,n),zj(r,n))}/*! + */function vj(e,t,n){return{line:e,column:t,offset:n}}function _8(e,t,n){return{start:e,end:t}}const mo={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},yj=17;function Tp(e,t,n={}){const{domain:o,messages:s,args:i}=n,l=e,r=new SyntaxError(String(l));return r.code=e,t&&(r.location=t),r.domain=o,r}function wj(e){throw e}const vr=" ",kj="\r",ai=` +`,bj="\u2028",_j="\u2029";function xj(e){const t=e;let n=0,o=1,s=1,i=0;const l=z=>t[z]===kj&&t[z+1]===ai,r=z=>t[z]===ai,a=z=>t[z]===_j,c=z=>t[z]===bj,u=z=>l(z)||r(z)||a(z)||c(z),d=()=>n,f=()=>o,p=()=>s,h=()=>i,m=z=>l(z)||a(z)||c(z)?ai:t[z],k=()=>m(n),x=()=>m(n+i);function y(){return i=0,u(n)&&(o++,s=0),l(n)&&n++,n++,s++,t[n]}function w(){return l(n+i)&&i++,i++,t[n+i]}function _(){n=0,o=1,s=1,i=0}function A(z=0){i=z}function P(){const z=n+i;for(;z!==n;)y();i=0}return{index:d,line:f,column:p,peekOffset:h,charAt:m,currentChar:k,currentPeek:x,next:y,peek:w,reset:_,resetPeek:A,skipToPeek:P}}const Gr=void 0,Sj=".",Uw="'",Cj="tokenizer";function Mj(e,t={}){const n=t.location!==!1,o=xj(e),s=()=>o.index(),i=()=>vj(o.line(),o.column(),o.index()),l=i(),r=s(),a={currentType:13,offset:r,startLoc:l,endLoc:l,lastType:13,lastOffset:r,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},c=()=>a,{onError:u}=t;function d(ie,de,be,...Se){const je=c();if(de.column+=be,de.offset+=be,u){const et=n?_8(je.startLoc,de):null,le=Tp(ie,et,{domain:Cj,args:Se});u(le)}}function f(ie,de,be){ie.endLoc=i(),ie.currentType=de;const Se={type:de};return n&&(Se.loc=_8(ie.startLoc,ie.endLoc)),be!=null&&(Se.value=be),Se}const p=ie=>f(ie,13);function h(ie,de){return ie.currentChar()===de?(ie.next(),de):(d(mo.EXPECTED_TOKEN,i(),0,de),"")}function m(ie){let de="";for(;ie.currentPeek()===vr||ie.currentPeek()===ai;)de+=ie.currentPeek(),ie.peek();return de}function k(ie){const de=m(ie);return ie.skipToPeek(),de}function x(ie){if(ie===Gr)return!1;const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de===95}function y(ie){if(ie===Gr)return!1;const de=ie.charCodeAt(0);return de>=48&&de<=57}function w(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=x(ie.currentPeek());return ie.resetPeek(),Se}function _(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=ie.currentPeek()==="-"?ie.peek():ie.currentPeek(),je=y(Se);return ie.resetPeek(),je}function A(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=ie.currentPeek()===Uw;return ie.resetPeek(),Se}function P(ie,de){const{currentType:be}=de;if(be!==7)return!1;m(ie);const Se=ie.currentPeek()===".";return ie.resetPeek(),Se}function z(ie,de){const{currentType:be}=de;if(be!==8)return!1;m(ie);const Se=x(ie.currentPeek());return ie.resetPeek(),Se}function L(ie,de){const{currentType:be}=de;if(!(be===7||be===11))return!1;m(ie);const Se=ie.currentPeek()===":";return ie.resetPeek(),Se}function E(ie,de){const{currentType:be}=de;if(be!==9)return!1;const Se=()=>{const et=ie.currentPeek();return et==="{"?x(ie.peek()):et==="@"||et==="|"||et===":"||et==="."||et===vr||!et?!1:et===ai?(ie.peek(),Se()):$(ie,!1)},je=Se();return ie.resetPeek(),je}function T(ie){m(ie);const de=ie.currentPeek()==="|";return ie.resetPeek(),de}function $(ie,de=!0){const be=(je=!1,et="")=>{const le=ie.currentPeek();return le==="{"||le==="@"||!le?je:le==="|"?!(et===vr||et===ai):le===vr?(ie.peek(),be(!0,vr)):le===ai?(ie.peek(),be(!0,ai)):!0},Se=be();return de&&ie.resetPeek(),Se}function C(ie,de){const be=ie.currentChar();return be===Gr?Gr:de(be)?(ie.next(),be):null}function j(ie){const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36}function H(ie){return C(ie,j)}function D(ie){const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36||de===45}function M(ie){return C(ie,D)}function R(ie){const de=ie.charCodeAt(0);return de>=48&&de<=57}function O(ie){return C(ie,R)}function U(ie){const de=ie.charCodeAt(0);return de>=48&&de<=57||de>=65&&de<=70||de>=97&&de<=102}function Z(ie){return C(ie,U)}function q(ie){let de="",be="";for(;de=O(ie);)be+=de;return be}function te(ie){let de="";for(;;){const be=ie.currentChar();if(be==="\\"){const Se=ie.peek();Se==="{"||Se==="}"||Se==="@"||Se==="|"||Se==="\\"?(de+=be+Se,ie.next(),ie.next()):(ie.resetPeek(),de+=be,ie.next())}else{if(be==="{"||be==="}"||be==="@"||be==="|"||!be)break;if(be===vr||be===ai)if($(ie))de+=be,ie.next();else{if(T(ie))break;de+=be,ie.next()}else de+=be,ie.next()}}return de}function ee(ie){k(ie);let de="",be="";for(;de=M(ie);)be+=de;const Se=ie.currentChar();if(Se&&Se!=="}"&&Se!==Gr&&Se!==vr&&Se!==ai&&Se!==" "){const je=at(ie);return d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be+je),be+je}return ie.currentChar()===Gr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be}function J(ie){k(ie);let de="";return ie.currentChar()==="-"?(ie.next(),de+=`-${q(ie)}`):de+=q(ie),ie.currentChar()===Gr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de}function se(ie){return ie!==Uw&&ie!==ai}function Q(ie){k(ie),h(ie,"'");let de="",be="";for(;de=C(ie,se);)de==="\\"?be+=me(ie):be+=de;const Se=ie.currentChar();return Se===ai||Se===Gr?(d(mo.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),Se===ai&&(ie.next(),h(ie,"'")),be):(h(ie,"'"),be)}function me(ie){const de=ie.currentChar();switch(de){case"\\":case"'":return ie.next(),`\\${de}`;case"u":return xe(ie,de,4);case"U":return xe(ie,de,6);default:return d(mo.UNKNOWN_ESCAPE_SEQUENCE,i(),0,de),""}}function xe(ie,de,be){h(ie,de);let Se="";for(let je=0;je{const Se=ie.currentChar();return Se==="{"||Se==="@"||Se==="|"||Se==="("||Se===")"||!Se||Se===vr?be:(be+=Se,ie.next(),de(be))};return de("")}function F(ie){k(ie);const de=h(ie,"|");return k(ie),de}function K(ie,de){let be=null;switch(ie.currentChar()){case"{":return de.braceNest>=1&&d(mo.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),ie.next(),be=f(de,2,"{"),k(ie),de.braceNest++,be;case"}":return de.braceNest>0&&de.currentType===2&&d(mo.EMPTY_PLACEHOLDER,i(),0),ie.next(),be=f(de,3,"}"),de.braceNest--,de.braceNest>0&&k(ie),de.inLinked&&de.braceNest===0&&(de.inLinked=!1),be;case"@":return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be=he(ie,de)||p(de),de.braceNest=0,be;default:{let je=!0,et=!0,le=!0;if(T(ie))return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be=f(de,1,F(ie)),de.braceNest=0,de.inLinked=!1,be;if(de.braceNest>0&&(de.currentType===4||de.currentType===5||de.currentType===6))return d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de.braceNest=0,ye(ie,de);if(je=w(ie,de))return be=f(de,4,ee(ie)),k(ie),be;if(et=_(ie,de))return be=f(de,5,J(ie)),k(ie),be;if(le=A(ie,de))return be=f(de,6,Q(ie)),k(ie),be;if(!je&&!et&&!le)return be=f(de,12,at(ie)),d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be.value),k(ie),be;break}}return be}function he(ie,de){const{currentType:be}=de;let Se=null;const je=ie.currentChar();switch((be===7||be===8||be===11||be===9)&&(je===ai||je===vr)&&d(mo.INVALID_LINKED_FORMAT,i(),0),je){case"@":return ie.next(),Se=f(de,7,"@"),de.inLinked=!0,Se;case".":return k(ie),ie.next(),f(de,8,".");case":":return k(ie),ie.next(),f(de,9,":");default:return T(ie)?(Se=f(de,1,F(ie)),de.braceNest=0,de.inLinked=!1,Se):P(ie,de)||L(ie,de)?(k(ie),he(ie,de)):z(ie,de)?(k(ie),f(de,11,X(ie))):E(ie,de)?(k(ie),je==="{"?K(ie,de)||Se:f(de,10,oe(ie))):(be===7&&d(mo.INVALID_LINKED_FORMAT,i(),0),de.braceNest=0,de.inLinked=!1,ye(ie,de))}}function ye(ie,de){let be={type:13};if(de.braceNest>0)return K(ie,de)||p(de);if(de.inLinked)return he(ie,de)||p(de);switch(ie.currentChar()){case"{":return K(ie,de)||p(de);case"}":return d(mo.UNBALANCED_CLOSING_BRACE,i(),0),ie.next(),f(de,3,"}");case"@":return he(ie,de)||p(de);default:{if(T(ie))return be=f(de,1,F(ie)),de.braceNest=0,de.inLinked=!1,be;if($(ie))return f(de,0,te(ie));break}}return be}function ve(){const{currentType:ie,offset:de,startLoc:be,endLoc:Se}=a;return a.lastType=ie,a.lastOffset=de,a.lastStartLoc=be,a.lastEndLoc=Se,a.offset=s(),a.startLoc=i(),o.currentChar()===Gr?f(a,13):ye(o,a)}return{nextToken:ve,currentOffset:s,currentPosition:i,context:c}}const Aj="parser",Tj=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Ej=/\\([\\@{}|])/g;function Ij(e,t){return t}function Lj(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function $j(e={}){const t=e.location!==!1,{onError:n}=e;function o(x,y,w,_,...A){const P=x.currentPosition();if(P.offset+=_,P.column+=_,n){const z=t?_8(w,P):null,L=Tp(y,z,{domain:Aj,args:A});n(L)}}function s(x,y,w){const _={type:x};return t&&(_.start=y,_.end=y,_.loc={start:w,end:w}),_}function i(x,y,w,_){t&&(x.end=y,x.loc&&(x.loc.end=w))}function l(x,y){const w=x.context(),_=s(3,w.offset,w.startLoc);return _.value=y.replace(Ej,Ij),i(_,x.currentOffset(),x.currentPosition()),_}function r(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(5,_,A);return P.index=parseInt(y,10),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function a(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(4,_,A);return P.key=y,x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function c(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(9,_,A);return P.value=y.replace(Tj,Lj),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function u(x){const y=x.nextToken(),w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(8,_,A);return y.type!==11?(o(x,mo.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),P.value="",i(P,_,A),{nextConsumeToken:y,node:P}):(y.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(y)),P.value=y.value||"",i(P,x.currentOffset(),x.currentPosition()),{node:P})}function d(x,y){const w=x.context(),_=s(7,w.offset,w.startLoc);return _.value=y,i(_,x.currentOffset(),x.currentPosition()),_}function f(x){const y=x.context(),w=s(6,y.offset,y.startLoc);let _=x.nextToken();if(_.type===8){const A=u(x);w.modifier=A.node,_=A.nextConsumeToken||x.nextToken()}switch(_.type!==9&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),_=x.nextToken(),_.type===2&&(_=x.nextToken()),_.type){case 10:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=d(x,_.value||"");break;case 4:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=a(x,_.value||"");break;case 5:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=r(x,_.value||"");break;case 6:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=c(x,_.value||"");break;default:{o(x,mo.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const A=x.context(),P=s(7,A.offset,A.startLoc);return P.value="",i(P,A.offset,A.startLoc),w.key=P,i(w,A.offset,A.startLoc),{nextConsumeToken:_,node:w}}}return i(w,x.currentOffset(),x.currentPosition()),{node:w}}function p(x){const y=x.context(),w=y.currentType===1?x.currentOffset():y.offset,_=y.currentType===1?y.endLoc:y.startLoc,A=s(2,w,_);A.items=[];let P=null;do{const E=P||x.nextToken();switch(P=null,E.type){case 0:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(l(x,E.value||""));break;case 5:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(r(x,E.value||""));break;case 4:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(a(x,E.value||""));break;case 6:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(c(x,E.value||""));break;case 7:{const T=f(x);A.items.push(T.node),P=T.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const z=y.currentType===1?y.lastOffset:x.currentOffset(),L=y.currentType===1?y.lastEndLoc:x.currentPosition();return i(A,z,L),A}function h(x,y,w,_){const A=x.context();let P=_.items.length===0;const z=s(1,y,w);z.cases=[],z.cases.push(_);do{const L=p(x);P||(P=L.items.length===0),z.cases.push(L)}while(A.currentType!==13);return P&&o(x,mo.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),i(z,x.currentOffset(),x.currentPosition()),z}function m(x){const y=x.context(),{offset:w,startLoc:_}=y,A=p(x);return y.currentType===13?A:h(x,w,_,A)}function k(x){const y=Mj(x,Ms({},e)),w=y.context(),_=s(0,w.offset,w.startLoc);return t&&_.loc&&(_.loc.source=x),_.body=m(y),e.onCacheKey&&(_.cacheKey=e.onCacheKey(x)),w.currentType!==13&&o(y,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,x[w.offset]||""),i(_,y.currentOffset(),y.currentPosition()),_}return{parse:k}}function yr(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Nj(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function Zw(e,t){for(let n=0;nKw(n)),e}function Kw(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nl;function a(m,k){l.code+=m}function c(m,k=!0){const x=k?o:"";a(s?x+" ".repeat(m):x)}function u(m=!0){const k=++l.indentLevel;m&&c(k)}function d(m=!0){const k=--l.indentLevel;m&&c(k)}function f(){c(l.indentLevel)}return{context:r,push:a,indent:u,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>l.needIndent}}function Pj(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Su(e,t.key),t.modifier?(e.push(", "),Su(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Fj(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let i=0;i{const n=Xt(t.mode)?t.mode:"normal",o=Xt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` +`,i=t.needIndent?t.needIndent:n!=="arrow",l=e.helpers||[],r=Rj(e,{filename:o,breakLineCode:s,needIndent:i});r.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),r.indent(i),l.length>0&&(r.push(`const { ${Eg(l.map(u=>`${u}: _${u}`),", ")} } = ctx`),r.newline()),r.push("return "),Su(r,e),r.deindent(i),r.push("}"),delete e.helpers;const{code:a,map:c}=r.context();return{ast:e,code:a,map:c?c.toJSON():void 0}};function Dj(e,t={}){const n=Ms({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,r=$j(n).parse(e);return o?(i&&Bj(r),s&&Pc(r),{ast:r,code:""}):(zj(r,n),Hj(r,n))}/*! * core-base v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */function Rj(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(_0().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(_0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Lr(e){return co(e)&&Ig(e)===0&&(Pl(e,"b")||Pl(e,"body"))}const cT=["b","body"];function Pj(e){return A1(e,cT)}const uT=["c","cases"];function Fj(e){return A1(e,uT,[])}const dT=["s","static"];function jj(e){return A1(e,dT)}const fT=["i","items"];function Oj(e){return A1(e,fT,[])}const pT=["t","type"];function Ig(e){return A1(e,pT)}const hT=["v","value"];function f3(e,t){const n=A1(e,hT);if(n!=null)return n;throw R2(t)}const mT=["m","modifier"];function Hj(e){return A1(e,mT)}const gT=["k","key"];function Dj(e){const t=A1(e,gT);if(t)return t;throw R2(6)}function A1(e,t,n){for(let o=0;oVj(n,e)}function Vj(e,t){const n=Pj(t);if(n==null)throw R2(0);if(Ig(n)===1){const i=Fj(n);return e.plural(i.reduce((l,r)=>[...l,Zw(e,r)],[]))}else return Zw(e,n)}function Zw(e,t){const n=jj(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=Oj(t).reduce((s,i)=>[...s,b8(e,i)],[]);return e.normalize(o)}}function b8(e,t){const n=Ig(t);switch(n){case 3:return f3(t,n);case 9:return f3(t,n);case 4:{const o=t;if(Pl(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Pl(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw R2(n)}case 5:{const o=t;if(Pl(o,"i")&&Ss(o.i))return e.interpolate(e.list(o.i));if(Pl(o,"index")&&Ss(o.index))return e.interpolate(e.list(o.index));throw R2(n)}case 6:{const o=t,s=Hj(o),i=Dj(o);return e.linked(b8(e,i),s?b8(e,s):void 0,e.type)}case 7:return f3(t,n);case 8:return f3(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Wj=e=>e;let p3=Ao();function qj(e,t={}){let n=!1;const o=t.onError||fj;return t.onError=s=>{n=!0,o(s)},{...Bj(e,t),detectError:n}}function Uj(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Xt(e)){ao(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||Wj)(e),s=p3[o];if(s)return s;const{ast:i,detectError:l}=qj(e,{...t,location:!1,jit:!0}),r=ph(i);return l?r:p3[o]=r}else{const n=e.cacheKey;if(n){const o=p3[n];return o||(p3[n]=ph(e))}else return ph(e)}}let P2=null;function Zj(e){P2=e}function Kj(e,t,n){P2&&P2.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const Gj=Yj("function:translate");function Yj(e){return t=>P2&&P2.emit(e,t)}const fa={INVALID_ARGUMENT:dj,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Xj=24;function pa(e){return Mp(e,null,void 0)}function $g(e,t){return t.locale!=null?Kw(t.locale):Kw(e.locale)}let hh;function Kw(e){if(Xt(e))return e;if(jo(e)){if(e.resolvedOnce&&hh!=null)return hh;if(e.constructor.name==="Function"){const t=e();if(KF(t))throw pa(fa.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return hh=t}else throw pa(fa.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw pa(fa.NOT_SUPPORT_LOCALE_TYPE)}function Jj(e,t,n){return[...new Set([n,...os(t)?t:co(t)?Object.keys(t):Xt(t)?[t]:[n]])]}function _8(e,t,n){const o=Xt(n)?n:F2,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let l=[n];for(;os(l);)l=Gw(i,l,t);const r=os(t)||!bo(t)?t:t.default?t.default:null;l=Xt(r)?[r]:r,os(l)&&Gw(i,l,!1),s.__localeChainCache.set(o,i)}return i}function Gw(e,t,n){let o=!0;for(let s=0;s{l===void 0?l=r:l+=r},f[1]=()=>{l!==void 0&&(t.push(l),l=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,l===void 0||(l=iO(l),l===!1))return!1;f[1]()}};function p(){const h=e[n+1];if(o===5&&h==="'"||o===6&&h==='"')return n++,r="\\"+h,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(a=sO(i),d=T1[o],c=d[a]||d.l||8,c===8||(o=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(r=i,u()===!1))))return;if(o===7)return t}}const Yw=new Map;function rO(e,t){return co(e)?e[t]:null}function aO(e,t){if(!co(e))return null;let n=Yw.get(t);if(n||(n=lO(t),n&&Yw.set(t,n)),!n)return null;const o=n.length;let s=e,i=0;for(;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function uO(){return{upper:(e,t)=>t==="text"&&Xt(e)?e.toUpperCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Xt(e)?e.toLowerCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Xt(e)?Xw(e):t==="vnode"&&co(e)&&"__v_isVNode"in e?Xw(e.children):e}}let yT;function dO(e){yT=e}let wT;function fO(e){wT=e}let kT;function pO(e){kT=e}let bT=null;const hO=e=>{bT=e},mO=()=>bT;let _T=null;const Jw=e=>{_T=e},gO=()=>_T;let Qw=0;function vO(e={}){const t=jo(e.onWarn)?e.onWarn:YF,n=Xt(e.version)?e.version:cO,o=Xt(e.locale)||jo(e.locale)?e.locale:F2,s=jo(o)?F2:o,i=os(e.fallbackLocale)||bo(e.fallbackLocale)||Xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,l=bo(e.messages)?e.messages:mh(s),r=bo(e.datetimeFormats)?e.datetimeFormats:mh(s),a=bo(e.numberFormats)?e.numberFormats:mh(s),c=Ms(Ao(),e.modifiers,uO()),u=e.pluralRules||Ao(),d=jo(e.missing)?e.missing:null,f=ao(e.missingWarn)||_u(e.missingWarn)?e.missingWarn:!0,p=ao(e.fallbackWarn)||_u(e.fallbackWarn)?e.fallbackWarn:!0,h=!!e.fallbackFormat,m=!!e.unresolving,k=jo(e.postTranslation)?e.postTranslation:null,x=bo(e.processor)?e.processor:null,y=ao(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,_=jo(e.messageCompiler)?e.messageCompiler:yT,M=jo(e.messageResolver)?e.messageResolver:wT||rO,P=jo(e.localeFallbacker)?e.localeFallbacker:kT||Jj,B=co(e.fallbackContext)?e.fallbackContext:void 0,$=e,T=co($.__datetimeFormatters)?$.__datetimeFormatters:new Map,I=co($.__numberFormatters)?$.__numberFormatters:new Map,N=co($.__meta)?$.__meta:{};Qw++;const C={version:n,cid:Qw,locale:o,fallbackLocale:i,messages:l,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:m,postTranslation:k,processor:x,warnHtmlMessage:y,escapeParameter:w,messageCompiler:_,messageResolver:M,localeFallbacker:P,fallbackContext:B,onWarn:t,__meta:N};return C.datetimeFormats=r,C.numberFormats=a,C.__datetimeFormatters=T,C.__numberFormatters=I,__INTLIFY_PROD_DEVTOOLS__&&Kj(C,n,N),C}const mh=e=>({[e]:Ao()});function xT(e,t,n,o,s){const{missing:i,onWarn:l}=e;if(i!==null){const r=i(e,n,t,s);return Xt(r)?r:t}else return t}function bd(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function yO(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function wO(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{o.includes(a)?r[a]=s[a]:t[a]=s[a]}),Xt(i)?t.locale=i:bo(i)&&(r=i),bo(l)&&(r=l),r}function ek(e,...t){const{datetimeFormats:n,unresolving:o,onWarn:s}=e,{__datetimeFormatters:i}=e;if(!Xt(t[0])&&!rT(t[0])&&!Ss(t[0]))return s5;const[l,r,a,c]=x8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=$g(e,a);if(!Xt(l)||l===""){const y=new Intl.DateTimeFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=ST(e,l,p,n,u,d,"datetime format");if(!Xt(h))return o?Ap:l;const m=n[h][l],k=CT(h,l,c);let x=i.get(k);return x||(x=new Intl.DateTimeFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const TT=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function x8(...e){const[t]=e,n=Ao(),o=Ao();let s;if(Xt(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw pa(fa.INVALID_ISO_DATE_ARGUMENT);const r=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();s=new Date(r);try{s.toISOString()}catch{throw pa(fa.INVALID_ISO_DATE_ARGUMENT)}}else if(rT(t)){if(isNaN(t.getTime()))throw pa(fa.INVALID_DATE_ARGUMENT);s=t}else if(Ss(t))s=t;else throw pa(fa.INVALID_ARGUMENT);const i=AT(e,n,o,TT);return[n.key||"",s,n,i]}function tk(e,t,n){MT(e.__datetimeFormatters,t,n)}function nk(e,...t){const{numberFormats:n,unresolving:o,onWarn:s}=e,{__numberFormatters:i}=e;if(!Ss(t[0]))return s5;const[l,r,a,c]=S8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=$g(e,a);if(!Xt(l)||l===""){const y=new Intl.NumberFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=ST(e,l,p,n,u,d,"number format");if(!Xt(h))return o?Ap:l;const m=n[h][l],k=CT(h,l,c);let x=i.get(k);return x||(x=new Intl.NumberFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const ET=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function S8(...e){const[t]=e,n=Ao(),o=Ao();if(!Ss(t))throw pa(fa.INVALID_ARGUMENT);const s=t,i=AT(e,n,o,ET);return[n.key||"",s,n,i]}function ok(e,t,n){MT(e.__numberFormatters,t,n)}const kO=e=>e,bO=e=>"",_O="text",xO=e=>e.length===0?"":Ag(e),SO=GF;function gh(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function CO(e){const t=Ss(e.pluralIndex)?e.pluralIndex:-1;return Ss(e.named?.count)?e.named.count:Ss(e.named?.n)?e.named.n:t}function MO(e={}){const t=e.locale,n=CO(e),o=Xt(t)&&jo(e.pluralRules?.[t])?e.pluralRules[t]:gh,s=o===gh?void 0:gh,i=x=>x[o(n,x.length,s)],l=e.list||[],r=x=>l[x],a=e.named||Ao();Ss(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const c=x=>a[x];function u(x,y){const w=jo(e.messages)?e.messages(x,!!y):co(e.messages)?e.messages[x]:!1;return w||(e.parent?e.parent.message(x):bO)}const d=x=>e.modifiers?e.modifiers[x]:kO,f=jo(e.processor?.normalize)?e.processor.normalize:xO,p=jo(e.processor?.interpolate)?e.processor.interpolate:SO,h=Xt(e.processor?.type)?e.processor.type:_O,k={list:r,named:c,plural:i,linked:(x,...y)=>{const[w,_]=y;let M="text",P="";y.length===1?co(w)?(P=w.modifier||P,M=w.type||M):Xt(w)&&(P=w||P):y.length===2&&(Xt(w)&&(P=w||P),Xt(_)&&(M=_||M));const B=u(x,!0)(k),$=B===""||B===void 0?x:B,T=M==="vnode"&&os($)&&P?$[0]:$;return P?d(P)(T,M):T},message:u,type:h,interpolate:p,normalize:f,values:Ms(Ao(),l,a)};return k}const sk=()=>"",Bl=e=>jo(e);function ik(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:l,messages:r}=e,[a,c]=C8(...t),u=ao(c.missingWarn)?c.missingWarn:e.missingWarn,d=ao(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=ao(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,h=Xt(c.default)||ao(c.default)?ao(c.default)?i?a:()=>a:c.default:n?i?a:()=>a:null,m=n||h!=null&&(Xt(h)||jo(h)),k=$g(e,c);f&&AO(c);let[x,y,w]=p?[a,k,r[k]||Ao()]:IT(e,a,k,l,d,u),_=x,M=a;if(!p&&!(Xt(_)||Lr(_)||Bl(_))&&m&&(_=h,M=_),!p&&(!(Xt(_)||Lr(_)||Bl(_))||!Xt(y)))return s?Ap:a;let P=!1;const B=()=>{P=!0},$=Bl(_)?_:$T(e,a,y,_,M,B);if(P)return _;const T=IO(e,y,w,c),I=MO(T),N=TO(e,$,I);let C=o?o(N,a):N;if(f&&Xt(C)&&(C=cj(C)),__INTLIFY_PROD_DEVTOOLS__){const O={timestamp:Date.now(),key:Xt(a)?a:Bl(_)?_.key:"",locale:y||(Bl(_)?_.locale:""),format:Xt(_)?_:Bl(_)?_.source:"",message:C};O.meta=Ms({},e.__meta,mO()||{}),Gj(O)}return C}function AO(e){os(e.list)?e.list=e.list.map(t=>Xt(t)?Dw(t):t):co(e.named)&&Object.keys(e.named).forEach(t=>{Xt(e.named[t])&&(e.named[t]=Dw(e.named[t]))})}function IT(e,t,n,o,s,i){const{messages:l,onWarn:r,messageResolver:a,localeFallbacker:c}=e,u=c(e,o,n);let d=Ao(),f,p=null;const h="translate";for(let m=0;mo);return c.locale=n,c.key=t,c}const a=l(o,EO(e,n,s,o,r,i));return a.locale=n,a.key=t,a.source=o,a}function TO(e,t,n){return t(n)}function C8(...e){const[t,n,o]=e,s=Ao();if(!Xt(t)&&!Ss(t)&&!Bl(t)&&!Lr(t))throw pa(fa.INVALID_ARGUMENT);const i=Ss(t)?String(t):(Bl(t),t);return Ss(n)?s.plural=n:Xt(n)?s.default=n:bo(n)&&!Cg(n)?s.named=n:os(n)&&(s.list=n),Ss(o)?s.plural=o:Xt(o)?s.default=o:bo(o)&&Ms(s,o),[i,s]}function EO(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:l=>{throw i&&i(l),l},onCacheKey:l=>WF(t,n,l)}}function IO(e,t,n,o){const{modifiers:s,pluralRules:i,messageResolver:l,fallbackLocale:r,fallbackWarn:a,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:s,pluralRules:i,messages:(p,h)=>{let m=l(n,p);if(m==null&&(u||h)){const[k,,x]=IT(u||e,p,t,r,a,c);m=k??l(x,p)}if(Xt(m)||Lr(m)){let k=!1;const y=$T(e,p,t,m,p,()=>{k=!0});return k?sk:y}else return Bl(m)?m:sk}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),Ss(o.plural)&&(f.pluralIndex=o.plural),f}Rj();/*! + */function Vj(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(b0().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(b0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Nr(e){return co(e)&&$g(e)===0&&(Pl(e,"b")||Pl(e,"body"))}const fT=["b","body"];function Wj(e){return M1(e,fT)}const pT=["c","cases"];function qj(e){return M1(e,pT,[])}const hT=["s","static"];function Uj(e){return M1(e,hT)}const mT=["i","items"];function Zj(e){return M1(e,mT,[])}const gT=["t","type"];function $g(e){return M1(e,gT)}const vT=["v","value"];function h3(e,t){const n=M1(e,vT);if(n!=null)return n;throw R2(t)}const yT=["m","modifier"];function Kj(e){return M1(e,yT)}const wT=["k","key"];function Gj(e){const t=M1(e,wT);if(t)return t;throw R2(6)}function M1(e,t,n){for(let o=0;oYj(n,e)}function Yj(e,t){const n=Wj(t);if(n==null)throw R2(0);if($g(n)===1){const i=qj(n);return e.plural(i.reduce((l,r)=>[...l,Gw(e,r)],[]))}else return Gw(e,n)}function Gw(e,t){const n=Uj(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=Zj(t).reduce((s,i)=>[...s,x8(e,i)],[]);return e.normalize(o)}}function x8(e,t){const n=$g(t);switch(n){case 3:return h3(t,n);case 9:return h3(t,n);case 4:{const o=t;if(Pl(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Pl(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw R2(n)}case 5:{const o=t;if(Pl(o,"i")&&Ss(o.i))return e.interpolate(e.list(o.i));if(Pl(o,"index")&&Ss(o.index))return e.interpolate(e.list(o.index));throw R2(n)}case 6:{const o=t,s=Kj(o),i=Gj(o);return e.linked(x8(e,i),s?x8(e,s):void 0,e.type)}case 7:return h3(t,n);case 8:return h3(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Xj=e=>e;let m3=Ao();function Jj(e,t={}){let n=!1;const o=t.onError||wj;return t.onError=s=>{n=!0,o(s)},{...Dj(e,t),detectError:n}}function Qj(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Xt(e)){ao(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||Xj)(e),s=m3[o];if(s)return s;const{ast:i,detectError:l}=Jj(e,{...t,location:!1,jit:!0}),r=mh(i);return l?r:m3[o]=r}else{const n=e.cacheKey;if(n){const o=m3[n];return o||(m3[n]=mh(e))}else return mh(e)}}let P2=null;function eO(e){P2=e}function tO(e,t,n){P2&&P2.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const nO=oO("function:translate");function oO(e){return t=>P2&&P2.emit(e,t)}const da={INVALID_ARGUMENT:yj,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},sO=24;function fa(e){return Tp(e,null,void 0)}function Ng(e,t){return t.locale!=null?Yw(t.locale):Yw(e.locale)}let gh;function Yw(e){if(Xt(e))return e;if(jo(e)){if(e.resolvedOnce&&gh!=null)return gh;if(e.constructor.name==="Function"){const t=e();if(tj(t))throw fa(da.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return gh=t}else throw fa(da.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw fa(da.NOT_SUPPORT_LOCALE_TYPE)}function iO(e,t,n){return[...new Set([n,...os(t)?t:co(t)?Object.keys(t):Xt(t)?[t]:[n]])]}function S8(e,t,n){const o=Xt(n)?n:F2,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let l=[n];for(;os(l);)l=Xw(i,l,t);const r=os(t)||!bo(t)?t:t.default?t.default:null;l=Xt(r)?[r]:r,os(l)&&Xw(i,l,!1),s.__localeChainCache.set(o,i)}return i}function Xw(e,t,n){let o=!0;for(let s=0;s{l===void 0?l=r:l+=r},f[1]=()=>{l!==void 0&&(t.push(l),l=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,l===void 0||(l=fO(l),l===!1))return!1;f[1]()}};function p(){const h=e[n+1];if(o===5&&h==="'"||o===6&&h==='"')return n++,r="\\"+h,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(a=dO(i),d=A1[o],c=d[a]||d.l||8,c===8||(o=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(r=i,u()===!1))))return;if(o===7)return t}}const Jw=new Map;function hO(e,t){return co(e)?e[t]:null}function mO(e,t){if(!co(e))return null;let n=Jw.get(t);if(n||(n=pO(t),n&&Jw.set(t,n)),!n)return null;const o=n.length;let s=e,i=0;for(;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function vO(){return{upper:(e,t)=>t==="text"&&Xt(e)?e.toUpperCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Xt(e)?e.toLowerCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Xt(e)?Qw(e):t==="vnode"&&co(e)&&"__v_isVNode"in e?Qw(e.children):e}}let bT;function yO(e){bT=e}let _T;function wO(e){_T=e}let xT;function kO(e){xT=e}let ST=null;const bO=e=>{ST=e},_O=()=>ST;let CT=null;const ek=e=>{CT=e},xO=()=>CT;let tk=0;function SO(e={}){const t=jo(e.onWarn)?e.onWarn:oj,n=Xt(e.version)?e.version:gO,o=Xt(e.locale)||jo(e.locale)?e.locale:F2,s=jo(o)?F2:o,i=os(e.fallbackLocale)||bo(e.fallbackLocale)||Xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,l=bo(e.messages)?e.messages:vh(s),r=bo(e.datetimeFormats)?e.datetimeFormats:vh(s),a=bo(e.numberFormats)?e.numberFormats:vh(s),c=Ms(Ao(),e.modifiers,vO()),u=e.pluralRules||Ao(),d=jo(e.missing)?e.missing:null,f=ao(e.missingWarn)||xu(e.missingWarn)?e.missingWarn:!0,p=ao(e.fallbackWarn)||xu(e.fallbackWarn)?e.fallbackWarn:!0,h=!!e.fallbackFormat,m=!!e.unresolving,k=jo(e.postTranslation)?e.postTranslation:null,x=bo(e.processor)?e.processor:null,y=ao(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,_=jo(e.messageCompiler)?e.messageCompiler:bT,A=jo(e.messageResolver)?e.messageResolver:_T||hO,P=jo(e.localeFallbacker)?e.localeFallbacker:xT||iO,z=co(e.fallbackContext)?e.fallbackContext:void 0,L=e,E=co(L.__datetimeFormatters)?L.__datetimeFormatters:new Map,T=co(L.__numberFormatters)?L.__numberFormatters:new Map,$=co(L.__meta)?L.__meta:{};tk++;const C={version:n,cid:tk,locale:o,fallbackLocale:i,messages:l,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:m,postTranslation:k,processor:x,warnHtmlMessage:y,escapeParameter:w,messageCompiler:_,messageResolver:A,localeFallbacker:P,fallbackContext:z,onWarn:t,__meta:$};return C.datetimeFormats=r,C.numberFormats=a,C.__datetimeFormatters=E,C.__numberFormatters=T,__INTLIFY_PROD_DEVTOOLS__&&tO(C,n,$),C}const vh=e=>({[e]:Ao()});function MT(e,t,n,o,s){const{missing:i,onWarn:l}=e;if(i!==null){const r=i(e,n,t,s);return Xt(r)?r:t}else return t}function bd(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function CO(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function MO(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{o.includes(a)?r[a]=s[a]:t[a]=s[a]}),Xt(i)?t.locale=i:bo(i)&&(r=i),bo(l)&&(r=l),r}function nk(e,...t){const{datetimeFormats:n,unresolving:o,onWarn:s}=e,{__datetimeFormatters:i}=e;if(!Xt(t[0])&&!uT(t[0])&&!Ss(t[0]))return i5;const[l,r,a,c]=C8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=Ng(e,a);if(!Xt(l)||l===""){const y=new Intl.DateTimeFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=AT(e,l,p,n,u,d,"datetime format");if(!Xt(h))return o?Ep:l;const m=n[h][l],k=TT(h,l,c);let x=i.get(k);return x||(x=new Intl.DateTimeFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const LT=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function C8(...e){const[t]=e,n=Ao(),o=Ao();let s;if(Xt(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw fa(da.INVALID_ISO_DATE_ARGUMENT);const r=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();s=new Date(r);try{s.toISOString()}catch{throw fa(da.INVALID_ISO_DATE_ARGUMENT)}}else if(uT(t)){if(isNaN(t.getTime()))throw fa(da.INVALID_DATE_ARGUMENT);s=t}else if(Ss(t))s=t;else throw fa(da.INVALID_ARGUMENT);const i=IT(e,n,o,LT);return[n.key||"",s,n,i]}function ok(e,t,n){ET(e.__datetimeFormatters,t,n)}function sk(e,...t){const{numberFormats:n,unresolving:o,onWarn:s}=e,{__numberFormatters:i}=e;if(!Ss(t[0]))return i5;const[l,r,a,c]=M8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=Ng(e,a);if(!Xt(l)||l===""){const y=new Intl.NumberFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=AT(e,l,p,n,u,d,"number format");if(!Xt(h))return o?Ep:l;const m=n[h][l],k=TT(h,l,c);let x=i.get(k);return x||(x=new Intl.NumberFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const $T=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function M8(...e){const[t]=e,n=Ao(),o=Ao();if(!Ss(t))throw fa(da.INVALID_ARGUMENT);const s=t,i=IT(e,n,o,$T);return[n.key||"",s,n,i]}function ik(e,t,n){ET(e.__numberFormatters,t,n)}const AO=e=>e,TO=e=>"",EO="text",IO=e=>e.length===0?"":Eg(e),LO=nj;function yh(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function $O(e){const t=Ss(e.pluralIndex)?e.pluralIndex:-1;return Ss(e.named?.count)?e.named.count:Ss(e.named?.n)?e.named.n:t}function NO(e={}){const t=e.locale,n=$O(e),o=Xt(t)&&jo(e.pluralRules?.[t])?e.pluralRules[t]:yh,s=o===yh?void 0:yh,i=x=>x[o(n,x.length,s)],l=e.list||[],r=x=>l[x],a=e.named||Ao();Ss(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const c=x=>a[x];function u(x,y){const w=jo(e.messages)?e.messages(x,!!y):co(e.messages)?e.messages[x]:!1;return w||(e.parent?e.parent.message(x):TO)}const d=x=>e.modifiers?e.modifiers[x]:AO,f=jo(e.processor?.normalize)?e.processor.normalize:IO,p=jo(e.processor?.interpolate)?e.processor.interpolate:LO,h=Xt(e.processor?.type)?e.processor.type:EO,k={list:r,named:c,plural:i,linked:(x,...y)=>{const[w,_]=y;let A="text",P="";y.length===1?co(w)?(P=w.modifier||P,A=w.type||A):Xt(w)&&(P=w||P):y.length===2&&(Xt(w)&&(P=w||P),Xt(_)&&(A=_||A));const z=u(x,!0)(k),L=z===""||z===void 0?x:z,E=A==="vnode"&&os(L)&&P?L[0]:L;return P?d(P)(E,A):E},message:u,type:h,interpolate:p,normalize:f,values:Ms(Ao(),l,a)};return k}const lk=()=>"",Bl=e=>jo(e);function rk(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:l,messages:r}=e,[a,c]=A8(...t),u=ao(c.missingWarn)?c.missingWarn:e.missingWarn,d=ao(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=ao(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,h=Xt(c.default)||ao(c.default)?ao(c.default)?i?a:()=>a:c.default:n?i?a:()=>a:null,m=n||h!=null&&(Xt(h)||jo(h)),k=Ng(e,c);f&&zO(c);let[x,y,w]=p?[a,k,r[k]||Ao()]:NT(e,a,k,l,d,u),_=x,A=a;if(!p&&!(Xt(_)||Nr(_)||Bl(_))&&m&&(_=h,A=_),!p&&(!(Xt(_)||Nr(_)||Bl(_))||!Xt(y)))return s?Ep:a;let P=!1;const z=()=>{P=!0},L=Bl(_)?_:zT(e,a,y,_,A,z);if(P)return _;const E=PO(e,y,w,c),T=NO(E),$=BO(e,L,T);let C=o?o($,a):$;if(f&&Xt(C)&&(C=gj(C)),__INTLIFY_PROD_DEVTOOLS__){const j={timestamp:Date.now(),key:Xt(a)?a:Bl(_)?_.key:"",locale:y||(Bl(_)?_.locale:""),format:Xt(_)?_:Bl(_)?_.source:"",message:C};j.meta=Ms({},e.__meta,_O()||{}),nO(j)}return C}function zO(e){os(e.list)?e.list=e.list.map(t=>Xt(t)?Ww(t):t):co(e.named)&&Object.keys(e.named).forEach(t=>{Xt(e.named[t])&&(e.named[t]=Ww(e.named[t]))})}function NT(e,t,n,o,s,i){const{messages:l,onWarn:r,messageResolver:a,localeFallbacker:c}=e,u=c(e,o,n);let d=Ao(),f,p=null;const h="translate";for(let m=0;mo);return c.locale=n,c.key=t,c}const a=l(o,RO(e,n,s,o,r,i));return a.locale=n,a.key=t,a.source=o,a}function BO(e,t,n){return t(n)}function A8(...e){const[t,n,o]=e,s=Ao();if(!Xt(t)&&!Ss(t)&&!Bl(t)&&!Nr(t))throw fa(da.INVALID_ARGUMENT);const i=Ss(t)?String(t):(Bl(t),t);return Ss(n)?s.plural=n:Xt(n)?s.default=n:bo(n)&&!Ag(n)?s.named=n:os(n)&&(s.list=n),Ss(o)?s.plural=o:Xt(o)?s.default=o:bo(o)&&Ms(s,o),[i,s]}function RO(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:l=>{throw i&&i(l),l},onCacheKey:l=>XF(t,n,l)}}function PO(e,t,n,o){const{modifiers:s,pluralRules:i,messageResolver:l,fallbackLocale:r,fallbackWarn:a,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:s,pluralRules:i,messages:(p,h)=>{let m=l(n,p);if(m==null&&(u||h)){const[k,,x]=NT(u||e,p,t,r,a,c);m=k??l(x,p)}if(Xt(m)||Nr(m)){let k=!1;const y=zT(e,p,t,m,p,()=>{k=!0});return k?lk:y}else return Bl(m)?m:lk}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),Ss(o.plural)&&(f.pluralIndex=o.plural),f}Vj();/*! * vue-i18n v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */const $O="11.4.8";function LO(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(_0().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(_0().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(_0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(_0().__INTLIFY_PROD_DEVTOOLS__=!1)}const Ai={UNEXPECTED_RETURN_TYPE:Xj,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Ui(e,...t){return Mp(e,null,void 0)}const M8=M1("__translateVNode"),A8=M1("__datetimeParts"),T8=M1("__numberParts"),LT=M1("__setPluralRules"),NT=M1("__injectWithOption"),qc=M1("__dispose");function j2(e){if(!co(e)||Lr(e))return e;for(const t in e)if(Pl(e,t))if(!t.includes("."))co(e[t])&&j2(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,i=!1;for(let l=0;l{if("locale"in r&&"resource"in r){const{locale:a,resource:c}=r;a?(l[a]=l[a]||Ao(),c4(c,l[a])):c4(c,l)}else Xt(r)&&c4(JSON.parse(r),l)}),s==null&&i)for(const r in l)Pl(l,r)&&j2(l[r]);return l}function zT(e){return e.type}function BT(e,t,n){let o=co(t.messages)?t.messages:Ao();"__i18nGlobal"in n&&(o=Lg(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(co(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(l=>{e.mergeDateTimeFormat(l,t.datetimeFormats[l])})}if(co(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(l=>{e.mergeNumberFormat(l,t.numberFormats[l])})}}}function lk(e){return W(a1,null,e,0)}function O2(){return Ts()}const rk="__INTLIFY_META__",ak=()=>[],NO=()=>!1;let ck=0;function uk(e){return((t,n,o,s)=>e(n,o,O2()||void 0,s))}const zO=()=>{const e=O2();let t=null;return e&&(t=zT(e)[rk])?{[rk]:t}:null};function i5(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,i=o5?V:Uo;let l=ao(e.inheritLocale)?e.inheritLocale:!0;const r=i(t&&l?t.locale.value:Xt(e.locale)?e.locale:F2),a=i(t&&l?t.fallbackLocale.value:Xt(e.fallbackLocale)||os(e.fallbackLocale)||bo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r.value),c=i(Lg(r.value,e)),u=i(bo(e.datetimeFormats)?e.datetimeFormats:{[r.value]:{}}),d=i(bo(e.numberFormats)?e.numberFormats:{[r.value]:{}});let f=t?t.missingWarn:ao(e.missingWarn)||_u(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:ao(e.fallbackWarn)||_u(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:ao(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,k=jo(e.missing)?e.missing:null,x=jo(e.missing)?uk(e.missing):null,y=jo(e.postTranslation)?e.postTranslation:null,w=t?t.warnHtmlMessage:ao(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const M=t?t.modifiers:bo(e.modifiers)?e.modifiers:{};let P=e.pluralRules||t&&t.pluralRules,B;B=(()=>{o&&Jw(null);const le={version:$O,locale:r.value,fallbackLocale:a.value,messages:c.value,modifiers:M,pluralRules:P,missing:x===null?void 0:x,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:w,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};le.datetimeFormats=u.value,le.numberFormats=d.value,le.__datetimeFormatters=bo(B)?B.__datetimeFormatters:void 0,le.__numberFormatters=bo(B)?B.__numberFormatters:void 0;const be=vO(le);return o&&Jw(be),be})(),bd(B,r.value,a.value);function T(){return[r.value,a.value,c.value,u.value,d.value]}const I=z({get:()=>r.value,set:le=>{B.locale=le,r.value=le}}),N=z({get:()=>a.value,set:le=>{B.fallbackLocale=le,a.value=le,bd(B,r.value,le)}}),C=z(()=>c.value),O=z(()=>u.value),H=z(()=>d.value);function D(){return jo(y)?y:null}function A(le){y=le,B.postTranslation=le}function R(){return k}function j(le){le!==null&&(x=uk(le)),k=le,B.missing=x}const q=(le,be,_e,Ke,Qe,mt)=>{T();let Tt;try{__INTLIFY_PROD_DEVTOOLS__,o||(B.fallbackContext=t?gO():void 0),Tt=le(B)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(B.fallbackContext=void 0)}if(_e!=="translate exists"&&Ss(Tt)&&Tt===Ap||_e==="translate exists"&&!Tt){const[qt,nn]=be();return t&&h?Ke(t):Qe(qt)}else{if(mt(Tt))return Tt;throw Ui(Ai.UNEXPECTED_RETURN_TYPE)}};function K(...le){return q(be=>Reflect.apply(ik,null,[be,...le]),()=>C8(...le),"translate",be=>Reflect.apply(be.t,be,[...le]),be=>be,be=>Xt(be))}function U(...le){const[be,_e,Ke]=le;if(Ke&&!co(Ke))throw Ui(Ai.INVALID_ARGUMENT);return K(be,_e,Ms({resolvedMessage:!0},Ke||{}))}function te(...le){return q(be=>Reflect.apply(ek,null,[be,...le]),()=>x8(...le),"datetime format",be=>Reflect.apply(be.d,be,[...le]),()=>s5,be=>Xt(be)||os(be))}function J(...le){return q(be=>Reflect.apply(nk,null,[be,...le]),()=>S8(...le),"number format",be=>Reflect.apply(be.n,be,[...le]),()=>s5,be=>Xt(be)||os(be))}function ee(le){return le.map(be=>Xt(be)||Ss(be)||ao(be)?lk(String(be)):be)}const Q={normalize:ee,interpolate:le=>le,type:"vnode"};function he(...le){return q(be=>{let _e;const Ke=be;try{Ke.processor=Q,_e=Reflect.apply(ik,null,[Ke,...le])}finally{Ke.processor=null}return _e},()=>C8(...le),"translate",be=>be[M8](...le),be=>[lk(be)],be=>os(be))}function xe(...le){return q(be=>Reflect.apply(nk,null,[be,...le]),()=>S8(...le),"number format",be=>be[T8](...le),ak,be=>Xt(be)||os(be))}function Ye(...le){return q(be=>Reflect.apply(ek,null,[be,...le]),()=>x8(...le),"datetime format",be=>be[A8](...le),ak,be=>Xt(be)||os(be))}function st(le){P=le,B.pluralRules=P}function X(le,be){return q(()=>{if(!le)return!1;const _e=Xt(be)?be:r.value,Ke=Xt(be)?[_e]:_8(B,a.value,_e);for(let Qe=0;Qe[le],"translate exists",_e=>Reflect.apply(_e.te,_e,[le,be]),NO,_e=>ao(_e))}function se(le){let be=null;const _e=_8(B,a.value,r.value);for(let Ke=0;Ke<_e.length;Ke++){const Qe=c.value[_e[Ke]]||{},mt=B.messageResolver(Qe,le);if(mt!=null){be=mt;break}}return be}function F(le){const be=se(le);return be??(t?t.tm(le)||{}:{})}function Z(le){return c.value[le]||{}}function fe(le,be){if(s){const _e={[le]:be};for(const Ke in _e)Pl(_e,Ke)&&j2(_e[Ke]);be=_e[le]}c.value[le]=be,B.messages=c.value}function ve(le,be){c.value[le]=c.value[le]||{};const _e={[le]:be};if(s)for(const Ke in _e)Pl(_e,Ke)&&j2(_e[Ke]);be=_e[le],c4(be,c.value[le]),B.messages=c.value}function ge(le){return u.value[le]||{}}function oe(le,be){u.value[le]=be,B.datetimeFormats=u.value,tk(B,le,be)}function de(le,be){u.value[le]=Ms(u.value[le]||{},be),B.datetimeFormats=u.value,tk(B,le,be)}function ke(le){return d.value[le]||{}}function Se(le,be){d.value[le]=be,B.numberFormats=d.value,ok(B,le,be)}function me(le,be){d.value[le]=Ms(d.value[le]||{},be),B.numberFormats=d.value,ok(B,le,be)}ck++,t&&o5&&(Ze(t.locale,le=>{l&&(r.value=le,B.locale=le,bd(B,r.value,a.value))}),Ze(t.fallbackLocale,le=>{l&&(a.value=le,B.fallbackLocale=le,bd(B,r.value,a.value))}));const Ae={id:ck,locale:I,fallbackLocale:N,get inheritLocale(){return l},set inheritLocale(le){l=le,le&&t&&(r.value=t.locale.value,a.value=t.fallbackLocale.value,bd(B,r.value,a.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:C,get modifiers(){return M},get pluralRules(){return P||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(le){f=le,B.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(le){p=le,B.fallbackWarn=p},get fallbackRoot(){return h},set fallbackRoot(le){h=le},get fallbackFormat(){return m},set fallbackFormat(le){m=le,B.fallbackFormat=m},get warnHtmlMessage(){return w},set warnHtmlMessage(le){w=le,B.warnHtmlMessage=le},get escapeParameter(){return _},set escapeParameter(le){_=le,B.escapeParameter=le},t:K,getLocaleMessage:Z,setLocaleMessage:fe,mergeLocaleMessage:ve,getPostTranslationHandler:D,setPostTranslationHandler:A,getMissingHandler:R,setMissingHandler:j,[LT]:st};return Ae.datetimeFormats=O,Ae.numberFormats=H,Ae.rt=U,Ae.te=X,Ae.tm=F,Ae.d=te,Ae.n=J,Ae.getDateTimeFormat=ge,Ae.setDateTimeFormat=oe,Ae.mergeDateTimeFormat=de,Ae.getNumberFormat=ke,Ae.setNumberFormat=Se,Ae.mergeNumberFormat=me,Ae[NT]=n,Ae[M8]=he,Ae[A8]=Ye,Ae[T8]=xe,Ae}function BO(e){const t=Xt(e.locale)?e.locale:F2,n=Xt(e.fallbackLocale)||os(e.fallbackLocale)||bo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=jo(e.missing)?e.missing:void 0,s=ao(e.silentTranslationWarn)||_u(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=ao(e.silentFallbackWarn)||_u(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,l=ao(e.fallbackRoot)?e.fallbackRoot:!0,r=!!e.formatFallbackMessages,a=bo(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=jo(e.postTranslation)?e.postTranslation:void 0,d=Xt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=ao(e.sync)?e.sync:!0;let h=e.messages;if(bo(e.sharedMessages)){const M=e.sharedMessages;h=Object.keys(M).reduce((B,$)=>{const T=B[$]||(B[$]={});return Ms(T,M[$]),B},h||{})}const{__i18n:m,__root:k,__injectWithOption:x}=e,y=e.datetimeFormats,w=e.numberFormats,_=e.flatJson;return{locale:t,fallbackLocale:n,messages:h,flatJson:_,datetimeFormats:y,numberFormats:w,missing:o,missingWarn:s,fallbackWarn:i,fallbackRoot:l,fallbackFormat:r,modifiers:a,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:k,__injectWithOption:x}}function E8(e={}){const t=i5(BO(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return ao(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=ao(s)?!s:s},get silentFallbackWarn(){return ao(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=ao(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,i){return t.te(s,i)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,i){t.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){t.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,i){t.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){t.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,i){t.setNumberFormat(s,i)},mergeNumberFormat(s,i){t.mergeNumberFormat(s,i)}};return o.__extender=n,o}function RO(e,t,n){return{beforeCreate(){const o=O2();if(!o)throw Ui(Ai.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const i=s.i18n;if(s.__i18n&&(i.__i18n=s.__i18n),i.__root=t,this===this.$root)this.$i18n=dk(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=E8(i);const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=dk(e,s);else{this.$i18n=E8({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&BT(t,s,s),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,l)=>this.$i18n.te(i,l),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=O2();if(!o)throw Ui(Ai.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function dk(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[LT](t.pluralizationRules||e.pluralizationRules);const n=Lg(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const Ng={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function PO({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Ce?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},Ao())}function RT(){return Ce}const FO=Je({name:"i18n-t",props:Ms({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ss(e)||!isNaN(e)}},Ng),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||Lt({useScope:e.scope,__useComponent:!0});return()=>{const i=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),c=Ao();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=Xt(e.plural)?+e.plural:e.plural);const u=PO(t,a);return s[M8](e.keypath,u,c)},l=Ms(Ao(),o),r=Xt(e.tag)||co(e.tag)?e.tag:RT();return co(r)?vn(r,l,{default:i}):vn(r,l,i())}}}),fk=FO;function jO(e){return os(e)&&!Xt(e[0])}function PT(e,t,n,o){const{slots:s,attrs:i}=t;return()=>{const l=()=>{const c={part:!0};let u=Ao();e.locale&&(c.locale=e.locale),Xt(e.format)?c.key=e.format:co(e.format)&&(Xt(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((p,h)=>n.includes(h)?Ms(Ao(),p,{[h]:e.format[h]}):p,Ao()));const d=o(e.value,c,u);let f=[c.key];return os(d)?f=d.map((p,h)=>{const m=s[p.type],k=m?m({[p.type]:p.value,index:h,parts:d}):[p.value];return jO(k)&&(k[0].key=`${p.type}-${h}`),k}):Xt(d)&&(f=[d]),f},r=Ms(Ao(),i),a=Xt(e.tag)||co(e.tag)?e.tag:RT();return co(a)?vn(a,r,{default:l}):vn(a,r,l())}}const OO=Je({name:"i18n-n",props:Ms({value:{type:Number,required:!0},format:{type:[String,Object]}},Ng),setup(e,t){const n=e.i18n||Lt({useScope:e.scope,__useComponent:!0});return PT(e,t,ET,(...o)=>n[T8](...o))}}),pk=OO;function HO(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function DO(e){const t=l=>{const{instance:r,value:a}=l;if(!r||!r.$)throw Ui(Ai.UNEXPECTED_ERROR);const c=HO(e,r.$),u=hk(a);return[Reflect.apply(c.t,c,[...mk(u)]),c]};return{created:(l,r)=>{const[a,c]=t(r);o5&&(l.__i18nWatcher=Ze(c.locale,()=>{r.instance&&r.instance.$forceUpdate()})),l.__composer=c,l.textContent=a},unmounted:l=>{o5&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:r})=>{if(l.__composer){const a=l.__composer,c=hk(r);l.textContent=Reflect.apply(a.t,a,[...mk(c)])}},getSSRProps:l=>{const[r]=t(l);return{textContent:r}}}}function hk(e){if(Xt(e))return{path:e};if(bo(e)){if(!("path"in e))throw Ui(Ai.REQUIRED_VALUE,"path");return e}else throw Ui(Ai.INVALID_VALUE)}function mk(e){const{path:t,locale:n,args:o,choice:s,plural:i}=e,l={},r=o||{};return Xt(n)&&(l.locale=n),Ss(s)&&(l.plural=s),Ss(i)&&(l.plural=i),[t,r,l]}function VO(e,t,...n){const o=bo(n[0])?n[0]:{};(ao(o.globalInstall)?o.globalInstall:!0)&&([fk.name,"I18nT"].forEach(i=>e.component(i,fk)),[pk.name,"I18nN"].forEach(i=>e.component(i,pk)),[yk.name,"I18nD"].forEach(i=>e.component(i,yk))),e.directive("t",DO(t))}const WO=M1("global-vue-i18n");function qO(e={}){const t=__VUE_I18N_LEGACY_API__&&ao(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=ao(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,i]=UO(e,t),l=M1("");function r(d){return o.get(d)||null}function a(d,f){o.set(d,f)}function c(d){o.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=l,d.provide(d.__VUE_I18N_SYMBOL__,u),bo(f[0])){const m=f[0];u.__composerExtend=m.__composerExtend,u.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=QO(d,u.global)),__VUE_I18N_FULL_INSTALL__&&VO(d,u,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(RO(i,i.__composer,u));const h=d.unmount;d.unmount=()=>{p&&p(),u.dispose(),h()}},get global(){return i},dispose(){s.stop()},__instances:o,__getInstance:r,__setInstance:a,__deleteInstance:c};return u}function Lt(e={}){const t=O2();if(t==null)throw Ui(Ai.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Ui(Ai.NOT_INSTALLED);const n=ZO(t),o=GO(n),s=zT(t),i=KO(e,s);if(i==="global")return BT(o,e,s),o;if(i==="parent"){let a=gk(n,t,e.__useComponent);return a==null&&(a=o),a}if(i==="isolated"){if(n.mode!=="composition")throw Ui(Ai.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,c=Ms({},e),u=gk(n,t);c.__root=u||o;const d=i5(c);return a.__composerExtend&&(d[qc]=a.__composerExtend(d)),rg()&&Bu(()=>{const p=d[qc];p&&(p(),delete d[qc])}),d}const l=n;let r=l.__getInstance(t);if(r==null){const a=Ms({},e);"__i18n"in s&&(a.__i18n=s.__i18n),o&&(a.__root=o),r=i5(a),l.__composerExtend&&(r[qc]=l.__composerExtend(r)),XO(l,t,r),l.__setInstance(t,r)}return r}function UO(e,t){const n=pR(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>E8(e)):n.run(()=>i5(e));if(o==null)throw Ui(Ai.UNEXPECTED_ERROR);return[n,o]}function ZO(e){const t=fn(e.isCE?WO:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Ui(e.isCE?Ai.NOT_INSTALLED_WITH_PROVIDE:Ai.UNEXPECTED_ERROR);return t}function KO(e,t){return Cg(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function GO(e){return e.mode==="composition"?e.global:e.global.__composer}function gk(e,t,n=!1){let o=null;const s=t.root;let i=YO(t,n);for(;i!=null;){const l=e;if(e.mode==="composition")o=l.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const r=l.__getInstance(i);r!=null&&(o=r.__composer,n&&o&&!o[NT]&&(o=null))}if(o!=null||s===i)break;i=i.parent}return o}function YO(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function XO(e,t,n){In(()=>{},t),En(()=>{const o=n;e.__deleteInstance(t);const s=o[qc];s&&(s(),delete o[qc])},t)}const JO=["locale","fallbackLocale","availableLocales"],vk=["t","rt","d","n","tm","te"];function QO(e,t){const n=Object.create(null);return JO.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i)throw Ui(Ai.UNEXPECTED_ERROR);const l=ps(i.value)?{get(){return i.value.value},set(r){i.value.value=r}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,s,l)}),e.config.globalProperties.$i18n=n,vk.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i||!i.value)throw Ui(Ai.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,i)}),()=>{delete e.config.globalProperties.$i18n,vk.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const eH=Je({name:"i18n-d",props:Ms({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ng),setup(e,t){const n=e.i18n||Lt({useScope:e.scope,__useComponent:!0});return PT(e,t,TT,(...o)=>n[A8](...o))}}),yk=eH;LO();dO(Uj);fO(aO);pO(_8);if(__INTLIFY_PROD_DEVTOOLS__){const e=_0();e.__INTLIFY__=!0,Zj(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const tH="modulepreload",nH=function(e){return"/"+e},wk={},Cs=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),a=r?.nonce||r?.getAttribute("nonce");s=l(n.map(c=>{if(c=nH(c),c in wk)return;wk[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":tH,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(l){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=l,window.dispatchEvent(r),!r.defaultPrevented)throw l}return s.then(l=>{for(const r of l||[])r.status==="rejected"&&i(r.reason);return t().catch(i)})},oH="/brand/pythinker_banner_dark.svg";async function fs(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return iH(e)}function sH(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||fs(e)}function iH(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const dn={permission:"pythinker-web.permission",activeWorkspace:"pythinker-active-workspace",planMode:"pythinker-web.plan-mode",planArmed:"pythinker-web.plan-armed",dynamicWorkflowMode:"pythinker-web.dynamic-workflow-mode",goalMode:"pythinker-web.goal-mode",uiFontSize:"pythinker-web.ui-font-size",starredModels:"pythinker-web.starred-models",unread:"pythinker-web.unread",onboarded:"pythinker-web.onboarded",accent:"pythinker-web.accent",colorScheme:"pythinker-web.color-scheme",hiddenWorkspaces:"pythinker-web.hidden-workspaces",collapsedWorkspaces:"pythinker-web.collapsed-workspaces",workspaceOrder:"pythinker-web.workspace-order",workspaceNameOverrides:"pythinker-web.workspace-name-overrides",workspaceSort:"pythinker-web.workspace-sort",pinnedSessions:"pythinker-web.pinned-sessions",pinnedCollapsed:"pythinker-web.pinned-collapsed",recentEmojis:"pythinker-web.recent-emojis",conversationToc:"pythinker-web.beta-toc",turnFolding:"pythinker-web.turn-folding",activityRunFolding:"pythinker-web.activity-run-folding",notifyOnComplete:"pythinker-web.notify-on-complete",notifyOnQuestion:"pythinker-web.notify-on-question",notifyOnApproval:"pythinker-web.notify-on-approval",soundOnComplete:"pythinker-web.sound-on-complete",inputHistory:"pythinker-web.input-history",clientId:"pythinker-web.client-id",debug:"pythinker-web.debug",openInLastTarget:"pythinker-web.open-in.last-target",sidebarCollapsed:"pythinker-web.sidebar-collapsed",sidebarPinnedHeight:"pythinker-web.sidebar-pinned-height",sidebarWidth:"pythinker-web.sidebar-width",codeFont:"pythinker-web.code-font",contentAlign:"pythinker-web.content-align",theme:"pythinker-web.theme",thinking:"pythinker-web.thinking"};function kk(e){return`pythinker-web.draft.${e&&e.length>0?e:"__new__"}`}function ls(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Es(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function w1(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Fu(e){const t=ls(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function E1(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function zg(){const e=ls(dn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[o,s]of Object.entries(t))s===!0&&(n[o]=!0);return n}catch{return{}}}function Bg(e){const n={...zg()};for(const[o,s]of Object.entries(e))s?n[o]=!0:delete n[o];Es(dn.unread,JSON.stringify(n))}function lH(){const e=Fu(dn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function vh(e){E1(dn.collapsedWorkspaces,Array.from(e))}function rH(){const e=Fu(dn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function FT(e){E1(dn.workspaceOrder,Array.from(e))}function h3(){const e=Fu(dn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,o]of Object.entries(e))typeof o=="string"&&(t[n]=o);return t}function bk(e){E1(dn.workspaceNameOverrides,e)}function aH(){return ls(dn.workspaceSort)}function jT(e){Es(dn.workspaceSort,e)}function cH(e,t){if(e.length===0)return null;const n=new Set(e),o=t.filter(i=>n.has(i)),s=e.filter(i=>!t.includes(i));return s.length===0&&o.length===t.length?null:[...s,...o]}function uH(e,t){const n=new Map(t.map((o,s)=>[o,s]));return e.toSorted((o,s)=>(n.get(o.id)??-1)-(n.get(s.id)??-1))}function dH(e,t,n,o="before"){const s=e.indexOf(t),i=e.indexOf(n);if(s===-1||i===-1||s===i)return e;const l=[...e];l.splice(s,1);const r=s(t.get(o.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}const pH={"&":"&","<":"<",">":">",'"':""","'":"'"};function _k(e){return e.replace(/[&<>"']/g,t=>pH[t]??t)}function hH(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mH(e,t,n=40){const o=e.replace(/\s+/g," ").trim();if(o.length===0)return"";const s=t.trim();if(s.length===0)return xk(o,n*2);const i=o.toLowerCase().indexOf(s.toLowerCase());if(i<0)return xk(o,n*2);const l=Math.max(0,i-n),r=Math.min(o.length,i+s.length+n),a=l>0,c=r`${i}`)}const g0=V(0),gH=["type","disabled","aria-label"],vH=Je({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},type:{default:"button"}},setup(e,{expose:t}){const n=V();return t({el:n}),(o,s)=>(g(),S("button",{ref_key:"el",ref:n,class:Pe(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[jn(o.$slots,"default",{},void 0,!0)],10,gH))}}),vt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Dt=vt(vH,[["__scopeId","data-v-4b23513f"]]),m3=V(!1);let Sk=!1;function yh(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function Tp(){return!Sk&&typeof window<"u"&&typeof document<"u"&&(Sk=!0,m3.value=yh(),new MutationObserver(()=>{m3.value=yh()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia?.("(prefers-color-scheme: dark)")?.addEventListener("change",()=>{m3.value=yh()})),m3}const OT="file",yH="folder",g3={"._sc_":"godot-assets",".adonisrc.json":"adonis",".aiexclude":"gemini-ai",".angular-cli.json":"angular",".appveyor.yml":"appveyor",".astylerc":"astyle",".autorc":"auto",".babel-plugin-macrosrc":"babel",".babel-plugin-macrosrc.cjs":"babel",".babel-plugin-macrosrc.cts":"babel",".babel-plugin-macrosrc.js":"babel",".babel-plugin-macrosrc.json":"babel",".babel-plugin-macrosrc.json5":"babel",".babel-plugin-macrosrc.jsonc":"babel",".babel-plugin-macrosrc.mjs":"babel",".babel-plugin-macrosrc.mts":"babel",".babel-plugin-macrosrc.toml":"babel",".babel-plugin-macrosrc.ts":"babel",".babel-plugin-macrosrc.yaml":"babel",".babel-plugin-macrosrc.yml":"babel",".babelrc":"babel",".babelrc.cjs":"babel",".babelrc.cts":"babel",".babelrc.js":"babel",".babelrc.json":"babel",".babelrc.json5":"babel",".babelrc.jsonc":"babel",".babelrc.mjs":"babel",".babelrc.mts":"babel",".babelrc.toml":"babel",".babelrc.ts":"babel",".babelrc.yaml":"babel",".babelrc.yml":"babel",".bazelignore":"bazel",".bazelrc":"bazel",".bazelversion":"bazel",".biome.json":"biome",".biome.jsonc":"biome",".bithoundrc":"bithound",".blitz.config.compiled.js":"blitz",".bowerrc":"bower",".browserslistrc":"browserlist",".buckconfig":"buck",".buildignore":"settings",".bun-version":"bun",".cfignore":"cloudfoundry",".clang-format":"settings",".clang-format-ignore":"settings",".clang-tidy":"settings",".clangd":"clangd",".clinerules":"cline",".codeclimate.yml":"code-climate",".codecov.yaml":"codecov",".codecov.yml":"codecov",".coderabbit.yaml":"coderabbit-ai",".coderabbit.yml":"coderabbit-ai",".commitlint.yaml":"commitlint",".commitlint.yml":"commitlint",".commitlintrc":"commitlint",".commitlintrc.cjs":"commitlint",".commitlintrc.cts":"commitlint",".commitlintrc.js":"commitlint",".commitlintrc.json":"commitlint",".commitlintrc.json5":"commitlint",".commitlintrc.jsonc":"commitlint",".commitlintrc.mjs":"commitlint",".commitlintrc.mts":"commitlint",".commitlintrc.toml":"commitlint",".commitlintrc.ts":"commitlint",".commitlintrc.yaml":"commitlint",".commitlintrc.yml":"commitlint",".conf":"settings",".config/babel-plugin-macrosrc":"babel",".config/babel-plugin-macrosrc.cjs":"babel",".config/babel-plugin-macrosrc.cts":"babel",".config/babel-plugin-macrosrc.js":"babel",".config/babel-plugin-macrosrc.json":"babel",".config/babel-plugin-macrosrc.json5":"babel",".config/babel-plugin-macrosrc.jsonc":"babel",".config/babel-plugin-macrosrc.mjs":"babel",".config/babel-plugin-macrosrc.mts":"babel",".config/babel-plugin-macrosrc.toml":"babel",".config/babel-plugin-macrosrc.ts":"babel",".config/babel-plugin-macrosrc.yaml":"babel",".config/babel-plugin-macrosrc.yml":"babel",".config/babelrc":"babel",".config/babelrc.cjs":"babel",".config/babelrc.cts":"babel",".config/babelrc.js":"babel",".config/babelrc.json":"babel",".config/babelrc.json5":"babel",".config/babelrc.jsonc":"babel",".config/babelrc.mjs":"babel",".config/babelrc.mts":"babel",".config/babelrc.toml":"babel",".config/babelrc.ts":"babel",".config/babelrc.yaml":"babel",".config/babelrc.yml":"babel",".config/commitlintrc":"commitlint",".config/commitlintrc.cjs":"commitlint",".config/commitlintrc.cts":"commitlint",".config/commitlintrc.js":"commitlint",".config/commitlintrc.json":"commitlint",".config/commitlintrc.json5":"commitlint",".config/commitlintrc.jsonc":"commitlint",".config/commitlintrc.mjs":"commitlint",".config/commitlintrc.mts":"commitlint",".config/commitlintrc.toml":"commitlint",".config/commitlintrc.ts":"commitlint",".config/commitlintrc.yaml":"commitlint",".config/commitlintrc.yml":"commitlint",".config/cracorc":"craco",".config/cracorc.cjs":"craco",".config/cracorc.cts":"craco",".config/cracorc.js":"craco",".config/cracorc.json":"craco",".config/cracorc.json5":"craco",".config/cracorc.jsonc":"craco",".config/cracorc.mjs":"craco",".config/cracorc.mts":"craco",".config/cracorc.toml":"craco",".config/cracorc.ts":"craco",".config/cracorc.yaml":"craco",".config/cracorc.yml":"craco",".config/eslintrc":"eslint",".config/eslintrc.cjs":"eslint",".config/eslintrc.cts":"eslint",".config/eslintrc.js":"eslint",".config/eslintrc.json":"eslint",".config/eslintrc.json5":"eslint",".config/eslintrc.jsonc":"eslint",".config/eslintrc.mjs":"eslint",".config/eslintrc.mts":"eslint",".config/eslintrc.toml":"eslint",".config/eslintrc.ts":"eslint",".config/eslintrc.yaml":"eslint",".config/eslintrc.yml":"eslint",".config/graphqlrc":"graphql",".config/graphqlrc.cjs":"graphql",".config/graphqlrc.cts":"graphql",".config/graphqlrc.js":"graphql",".config/graphqlrc.json":"graphql",".config/graphqlrc.json5":"graphql",".config/graphqlrc.jsonc":"graphql",".config/graphqlrc.mjs":"graphql",".config/graphqlrc.mts":"graphql",".config/graphqlrc.toml":"graphql",".config/graphqlrc.ts":"graphql",".config/graphqlrc.yaml":"graphql",".config/graphqlrc.yml":"graphql",".config/huskyrc":"husky",".config/huskyrc.cjs":"husky",".config/huskyrc.cts":"husky",".config/huskyrc.js":"husky",".config/huskyrc.json":"husky",".config/huskyrc.json5":"husky",".config/huskyrc.jsonc":"husky",".config/huskyrc.mjs":"husky",".config/huskyrc.mts":"husky",".config/huskyrc.toml":"husky",".config/huskyrc.ts":"husky",".config/huskyrc.yaml":"husky",".config/huskyrc.yml":"husky",".config/postcssrc":"postcss",".config/postcssrc.cjs":"postcss",".config/postcssrc.cts":"postcss",".config/postcssrc.js":"postcss",".config/postcssrc.json":"postcss",".config/postcssrc.json5":"postcss",".config/postcssrc.jsonc":"postcss",".config/postcssrc.mjs":"postcss",".config/postcssrc.mts":"postcss",".config/postcssrc.toml":"postcss",".config/postcssrc.ts":"postcss",".config/postcssrc.yaml":"postcss",".config/postcssrc.yml":"postcss",".config/posthtmlrc":"posthtml",".config/posthtmlrc.cjs":"posthtml",".config/posthtmlrc.cts":"posthtml",".config/posthtmlrc.js":"posthtml",".config/posthtmlrc.json":"posthtml",".config/posthtmlrc.json5":"posthtml",".config/posthtmlrc.jsonc":"posthtml",".config/posthtmlrc.mjs":"posthtml",".config/posthtmlrc.mts":"posthtml",".config/posthtmlrc.toml":"posthtml",".config/posthtmlrc.ts":"posthtml",".config/posthtmlrc.yaml":"posthtml",".config/posthtmlrc.yml":"posthtml",".config/prettierrc":"prettier",".config/prettierrc.cjs":"prettier",".config/prettierrc.cts":"prettier",".config/prettierrc.js":"prettier",".config/prettierrc.json":"prettier",".config/prettierrc.json5":"prettier",".config/prettierrc.jsonc":"prettier",".config/prettierrc.mjs":"prettier",".config/prettierrc.mts":"prettier",".config/prettierrc.toml":"prettier",".config/prettierrc.ts":"prettier",".config/prettierrc.yaml":"prettier",".config/prettierrc.yml":"prettier",".config/puppeteerrc":"puppeteer",".config/puppeteerrc.cjs":"puppeteer",".config/puppeteerrc.cts":"puppeteer",".config/puppeteerrc.js":"puppeteer",".config/puppeteerrc.json":"puppeteer",".config/puppeteerrc.json5":"puppeteer",".config/puppeteerrc.jsonc":"puppeteer",".config/puppeteerrc.mjs":"puppeteer",".config/puppeteerrc.mts":"puppeteer",".config/puppeteerrc.toml":"puppeteer",".config/puppeteerrc.ts":"puppeteer",".config/puppeteerrc.yaml":"puppeteer",".config/puppeteerrc.yml":"puppeteer",".config/releaserc":"semantic-release",".config/releaserc.cjs":"semantic-release",".config/releaserc.cts":"semantic-release",".config/releaserc.js":"semantic-release",".config/releaserc.json":"semantic-release",".config/releaserc.json5":"semantic-release",".config/releaserc.jsonc":"semantic-release",".config/releaserc.mjs":"semantic-release",".config/releaserc.mts":"semantic-release",".config/releaserc.toml":"semantic-release",".config/releaserc.ts":"semantic-release",".config/releaserc.yaml":"semantic-release",".config/releaserc.yml":"semantic-release",".config/stylelintrc":"stylelint",".config/stylelintrc.cjs":"stylelint",".config/stylelintrc.cts":"stylelint",".config/stylelintrc.js":"stylelint",".config/stylelintrc.json":"stylelint",".config/stylelintrc.json5":"stylelint",".config/stylelintrc.jsonc":"stylelint",".config/stylelintrc.mjs":"stylelint",".config/stylelintrc.mts":"stylelint",".config/stylelintrc.toml":"stylelint",".config/stylelintrc.ts":"stylelint",".config/stylelintrc.yaml":"stylelint",".config/stylelintrc.yml":"stylelint",".config/svgrrc":"svgr",".config/svgrrc.cjs":"svgr",".config/svgrrc.cts":"svgr",".config/svgrrc.js":"svgr",".config/svgrrc.json":"svgr",".config/svgrrc.json5":"svgr",".config/svgrrc.jsonc":"svgr",".config/svgrrc.mjs":"svgr",".config/svgrrc.mts":"svgr",".config/svgrrc.toml":"svgr",".config/svgrrc.ts":"svgr",".config/svgrrc.yaml":"svgr",".config/svgrrc.yml":"svgr",".config/syncpackrc":"syncpack",".config/syncpackrc.cjs":"syncpack",".config/syncpackrc.cts":"syncpack",".config/syncpackrc.js":"syncpack",".config/syncpackrc.json":"syncpack",".config/syncpackrc.json5":"syncpack",".config/syncpackrc.jsonc":"syncpack",".config/syncpackrc.mjs":"syncpack",".config/syncpackrc.mts":"syncpack",".config/syncpackrc.toml":"syncpack",".config/syncpackrc.ts":"syncpack",".config/syncpackrc.yaml":"syncpack",".config/syncpackrc.yml":"syncpack",".copilotignore":"copilot",".coverage":"python-misc",".coveragerc":"python-misc",".cracorc":"craco",".cracorc.cjs":"craco",".cracorc.cts":"craco",".cracorc.js":"craco",".cracorc.json":"craco",".cracorc.json5":"craco",".cracorc.jsonc":"craco",".cracorc.mjs":"craco",".cracorc.mts":"craco",".cracorc.toml":"craco",".cracorc.ts":"craco",".cracorc.yaml":"craco",".cracorc.yml":"craco",".cursor":"cursor",".cursor.json":"cursor",".cursorignore":"cursor",".cursorindexingignore":"cursor",".cursorrc":"cursor",".cursorrules":"cursor",".cz.json":"commitizen",".cz.toml":"commitizen",".cz.yaml":"commitizen",".cz.yml":"commitizen",".czrc":"commitizen",".deepsource.toml":"deepsource",".dev.vars":"tune",".drone.yml":"drone",".easignore":"expo",".ecrc":"editorconfig",".editorconfig":"editorconfig",".editorconfig-checker.json":"editorconfig",".ember-cli":"ember",".ember-cli.js":"ember",".env.alpha":"tune",".env.defaults":"tune",".env.dev":"tune",".env.dev.local":"tune",".env.development":"tune",".env.development.local":"tune",".env.dist":"tune",".env.e2e":"tune",".env.example":"tune",".env.local":"tune",".env.preview":"tune",".env.prod":"tune",".env.prod.example":"tune",".env.prod.local":"tune",".env.production":"tune",".env.production.example":"tune",".env.production.local":"tune",".env.qa":"tune",".env.qa.local":"tune",".env.sample":"tune",".env.schema":"tune",".env.sentry-build-plugin":"sentry",".env.stage":"tune",".env.staging":"tune",".env.staging.local":"tune",".env.stg":"tune",".env.stg.local":"tune",".env.template":"tune",".env.test":"tune",".env.test.local":"tune",".env.testing":"tune",".env.uat":"tune",".envrc":"console",".esformatter":"json",".eslintcache":"eslint",".eslintignore":"eslint",".eslintrc":"eslint",".eslintrc-jsdoc.js":"eslint",".eslintrc-md.js":"eslint",".eslintrc.base.json":"eslint",".eslintrc.cjs":"eslint",".eslintrc.cts":"eslint",".eslintrc.js":"eslint",".eslintrc.json":"eslint",".eslintrc.json5":"eslint",".eslintrc.jsonc":"eslint",".eslintrc.mjs":"eslint",".eslintrc.mts":"eslint",".eslintrc.toml":"eslint",".eslintrc.ts":"eslint",".eslintrc.yaml":"eslint",".eslintrc.yml":"eslint",".esmrc":"nodejs",".firebaserc":"firebase",".flowconfig":"flow",".gardenignore":"garden",".gcloudignore":"gcp",".gdignore":"godot-assets",".git":"git",".git-blame-ignore":"git",".git-blame-ignore-revs":"git",".git-for-windows-updater":"git",".gitattributes":"git",".gitattributes-global":"git",".gitattributes_global":"git",".gitconfig":"git",".github/funding.yml":"github-sponsors",".github/labeler.yaml":"label",".github/labeler.yml":"label",".gitignore":"git",".gitignore-global":"git",".gitignore_global":"git",".gitinclude":"git",".gitkeep":"git",".gitmessage":"git",".gitmodules":"git",".gitpod.yml":"gitpod",".gitpreserve":"git",".graphqlconfig":"graphql",".graphqlrc":"graphql",".graphqlrc.cjs":"graphql",".graphqlrc.cts":"graphql",".graphqlrc.js":"graphql",".graphqlrc.json":"graphql",".graphqlrc.json5":"graphql",".graphqlrc.jsonc":"graphql",".graphqlrc.mjs":"graphql",".graphqlrc.mts":"graphql",".graphqlrc.toml":"graphql",".graphqlrc.ts":"graphql",".graphqlrc.yaml":"graphql",".graphqlrc.yml":"graphql",".hadolint.yaml":"hadolint",".hadolint.yml":"hadolint",".happo.cjs":"happo",".happo.js":"happo",".happo.mjs":"happo",".helmignore":"helm",".hg":"mercurial",".hgflow":"mercurial",".hgignore":"mercurial",".hgrc":"mercurial",".hgtags":"mercurial",".hhconfig":"hack",".hintrc":"webhint",".histoire.cjs":"histoire",".histoire.cts":"histoire",".histoire.js":"histoire",".histoire.mjs":"histoire",".histoire.mts":"histoire",".histoire.ts":"histoire",".htaccess":"xml",".htpasswd":"key",".hushlogin":"console",".huskyrc":"husky",".huskyrc.cjs":"husky",".huskyrc.cts":"husky",".huskyrc.js":"husky",".huskyrc.json":"husky",".huskyrc.json5":"husky",".huskyrc.jsonc":"husky",".huskyrc.mjs":"husky",".huskyrc.mts":"husky",".huskyrc.toml":"husky",".huskyrc.ts":"husky",".huskyrc.yaml":"husky",".huskyrc.yml":"husky",".io-config.json":"ionic",".istanbul.yml":"istanbul",".jestrc":"jest",".jestrc.js":"jest",".jestrc.json":"jest",".jsbeautifyrc":"json",".jscsrc":"json",".jshintignore":"settings",".jshintrc":"json",".justfile":"just",".k8s.yaml":"kubernetes",".k8s.yml":"kubernetes",".keep":"git",".kl":"kl",".knip.json":"knip",".knip.jsonc":"knip",".latexmkrc":"latexmk",".lefthook-local.json":"lefthook",".lefthook-local.toml":"lefthook",".lefthook-local.yaml":"lefthook",".lefthook-local.yml":"lefthook",".lefthook.json":"lefthook",".lefthook.toml":"lefthook",".lefthook.yaml":"lefthook",".lefthook.yml":"lefthook",".lefthookrc":"lefthook",".liaraignore":"liara",".lighthouserc.cjs":"lighthouse",".lighthouserc.js":"lighthouse",".lighthouserc.json":"lighthouse",".lighthouserc.yaml":"lighthouse",".lighthouserc.yml":"lighthouse",".lintstagedrc":"lintstaged",".lintstagedrc.cjs":"lintstaged",".lintstagedrc.js":"lintstaged",".lintstagedrc.json":"lintstaged",".lintstagedrc.mjs":"lintstaged",".lintstagedrc.yaml":"lintstaged",".lintstagedrc.yml":"lintstaged",".luacheckrc":"lua",".luaurc":"luau",".mailmap":"email",".markdownlint-cli2.cjs":"markdownlint",".markdownlint-cli2.jsonc":"markdownlint",".markdownlint-cli2.mjs":"markdownlint",".markdownlint-cli2.yaml":"markdownlint",".markdownlint.json":"markdownlint",".markdownlint.jsonc":"markdownlint",".markdownlint.yaml":"markdownlint",".markdownlint.yml":"markdownlint",".markdownlintignore":"markdownlint",".mcattributes":"minecraft",".mcdefinitions":"minecraft",".mcignore":"minecraft",".mincloudrc":"ifanr-cloud",".mjmlconfig":"mjml",".mocharc.cjs":"mocha",".mocharc.js":"mocha",".mocharc.json":"mocha",".mocharc.jsonc":"mocha",".mocharc.yaml":"mocha",".mocharc.yml":"mocha",".modernizrrc":"modernizr",".modernizrrc.js":"modernizr",".modernizrrc.json":"modernizr",".mrconfig":"settings",".nano-staged.cjs":"nano-staged",".nano-staged.js":"nano-staged",".nano-staged.json":"nano-staged",".nano-staged.mjs":"nano-staged",".nanostagedrc":"nano-staged",".nest-cli.json":"nest",".nestconfig.json":"nest",".node-version":"nodejs",".nowignore":"vercel",".npmignore":"npm",".npmrc":"npm",".nuspec":"nuget",".nuxtignore":"nuxt",".nuxtrc":"nuxt",".nvmrc":"nodejs",".nxignore":"nx",".nycrc":"istanbul",".nycrc.json":"istanbul",".nycrc.yaml":"istanbul",".nycrc.yml":"istanbul",".oxfmtrc.json":"oxc",".oxfmtrc.jsonc":"oxc",".oxlintrc.json":"oxc",".oxlintrc.jsonc":"oxc",".packshiprc":"packship",".packshiprc.js":"packship",".packshiprc.json":"packship",".packshiprc.ts":"packship",".parcelrc":"parcel",".pdm-python":"pdm",".percy.yml":"percy",".php-cs-fixer.dist.php":"php-cs-fixer",".php-cs-fixer.php":"php-cs-fixer",".php_cs":"php-cs-fixer",".php_cs.dist":"php-cs-fixer",".php_cs.dist.php":"php-cs-fixer",".php_cs.php":"php-cs-fixer",".phpunit-watcher.yml":"phpunit",".phpunit.result.cache":"phpunit",".pnpmfile.cjs":"pnpm",".postcssrc":"postcss",".postcssrc.cjs":"postcss",".postcssrc.cts":"postcss",".postcssrc.js":"postcss",".postcssrc.json":"postcss",".postcssrc.json5":"postcss",".postcssrc.jsonc":"postcss",".postcssrc.mjs":"postcss",".postcssrc.mts":"postcss",".postcssrc.toml":"postcss",".postcssrc.ts":"postcss",".postcssrc.yaml":"postcss",".postcssrc.yml":"postcss",".posthtmlrc":"posthtml",".posthtmlrc.cjs":"posthtml",".posthtmlrc.cts":"posthtml",".posthtmlrc.js":"posthtml",".posthtmlrc.json":"posthtml",".posthtmlrc.json5":"posthtml",".posthtmlrc.jsonc":"posthtml",".posthtmlrc.mjs":"posthtml",".posthtmlrc.mts":"posthtml",".posthtmlrc.toml":"posthtml",".posthtmlrc.ts":"posthtml",".posthtmlrc.yaml":"posthtml",".posthtmlrc.yml":"posthtml",".pre-commit-config.yaml":"pre-commit",".pre-commit-hooks.yaml":"pre-commit",".prettierignore":"prettier",".prettierrc":"prettier",".prettierrc.cjs":"prettier",".prettierrc.cts":"prettier",".prettierrc.js":"prettier",".prettierrc.json":"prettier",".prettierrc.json5":"prettier",".prettierrc.jsonc":"prettier",".prettierrc.mjs":"prettier",".prettierrc.mts":"prettier",".prettierrc.toml":"prettier",".prettierrc.ts":"prettier",".prettierrc.yaml":"prettier",".prettierrc.yml":"prettier",".pubignore":"dart",".pug-lintrc":"pug",".pug-lintrc.js":"pug",".pug-lintrc.json":"pug",".puppeteerrc":"puppeteer",".puppeteerrc.cjs":"puppeteer",".puppeteerrc.cts":"puppeteer",".puppeteerrc.js":"puppeteer",".puppeteerrc.json":"puppeteer",".puppeteerrc.json5":"puppeteer",".puppeteerrc.jsonc":"puppeteer",".puppeteerrc.mjs":"puppeteer",".puppeteerrc.mts":"puppeteer",".puppeteerrc.toml":"puppeteer",".puppeteerrc.ts":"puppeteer",".puppeteerrc.yaml":"puppeteer",".puppeteerrc.yml":"puppeteer",".pylintrc":"python-misc",".python-version":"python-misc",".qa-mincloudrc":"ifanr-cloud",".release-it.cjs":"rocket",".release-it.js":"rocket",".release-it.json":"rocket",".release-it.toml":"rocket",".release-it.ts":"rocket",".release-it.yaml":"rocket",".release-it.yml":"rocket",".release-plz.toml":"rocket",".releaserc":"semantic-release",".releaserc.cjs":"semantic-release",".releaserc.cts":"semantic-release",".releaserc.js":"semantic-release",".releaserc.json":"semantic-release",".releaserc.json5":"semantic-release",".releaserc.jsonc":"semantic-release",".releaserc.mjs":"semantic-release",".releaserc.mts":"semantic-release",".releaserc.toml":"semantic-release",".releaserc.ts":"semantic-release",".releaserc.yaml":"semantic-release",".releaserc.yml":"semantic-release",".remarkignore":"remark",".remarkrc":"remark",".remarkrc.cjs":"remark",".remarkrc.js":"remark",".remarkrc.json":"remark",".remarkrc.mjs":"remark",".remarkrc.yaml":"remark",".remarkrc.yml":"remark",".renovaterc":"renovate",".renovaterc.json":"renovate",".replit":"replit",".rhistory":"r",".rspec":"rspec",".rubocop-todo.yml":"rubocop",".rubocop.yml":"rubocop",".rubocop_todo.yml":"rubocop",".ruby-version":"ruby",".ruff.toml":"ruff",".scrapy":"python-misc",".secrets":"key",".semgrepignore":"semgrep",".sentryclirc":"sentry",".sequelizerc":"sequelize",".shellcheckrc":"shellcheck",".slugignore":"slug",".snyk":"snyk",".sonarcloud.properties":"sonarcloud",".stackblitzrc":"stackblitz",".steadybit.yaml":"steadybit",".steadybit.yml":"steadybit",".stryker.conf.cjs":"stryker",".stryker.conf.js":"stryker",".stryker.conf.json":"stryker",".stryker.conf.mjs":"stryker",".stryker.config.cjs":"stryker",".stryker.config.js":"stryker",".stryker.config.json":"stryker",".stryker.config.mjs":"stryker",".stylelintcache":"stylelint",".stylelintignore":"stylelint",".stylelintrc":"stylelint",".stylelintrc.cjs":"stylelint",".stylelintrc.cts":"stylelint",".stylelintrc.js":"stylelint",".stylelintrc.json":"stylelint",".stylelintrc.json5":"stylelint",".stylelintrc.jsonc":"stylelint",".stylelintrc.mjs":"stylelint",".stylelintrc.mts":"stylelint",".stylelintrc.toml":"stylelint",".stylelintrc.ts":"stylelint",".stylelintrc.yaml":"stylelint",".stylelintrc.yml":"stylelint",".svgrrc":"svgr",".svgrrc.cjs":"svgr",".svgrrc.cts":"svgr",".svgrrc.js":"svgr",".svgrrc.json":"svgr",".svgrrc.json5":"svgr",".svgrrc.jsonc":"svgr",".svgrrc.mjs":"svgr",".svgrrc.mts":"svgr",".svgrrc.toml":"svgr",".svgrrc.ts":"svgr",".svgrrc.yaml":"svgr",".svgrrc.yml":"svgr",".swift-format":"swift",".swift-version":"swift",".swiftformat":"swift",".syncpackrc":"syncpack",".syncpackrc.cjs":"syncpack",".syncpackrc.cts":"syncpack",".syncpackrc.js":"syncpack",".syncpackrc.json":"syncpack",".syncpackrc.json5":"syncpack",".syncpackrc.jsonc":"syncpack",".syncpackrc.mjs":"syncpack",".syncpackrc.mts":"syncpack",".syncpackrc.toml":"syncpack",".syncpackrc.ts":"syncpack",".syncpackrc.yaml":"syncpack",".syncpackrc.yml":"syncpack",".taskrc.yaml":"taskfile",".taskrc.yml":"taskfile",".taurignore":"tauri",".tazerc":"taze",".tazerc.json":"taze",".textlintignore":"textlint",".textlintrc":"textlint",".textlintrc.cjs":"textlint",".textlintrc.js":"textlint",".textlintrc.json":"textlint",".textlintrc.yaml":"textlint",".textlintrc.yml":"textlint",".tobimake":"tobimake",".travis.yml":"travis",".umirc.cjs":"umi",".umirc.cts":"umi",".umirc.js":"umi",".umirc.mjs":"umi",".umirc.mts":"umi",".umirc.ts":"umi",".uv.toml":"uv",".vars":"tune",".vercelignore":"vercel",".vfl":"vfl",".vsconfig":"visualstudio",".vuerc":"vue-config",".wakatime-project":"wakatime",".watchmanconfig":"watchman",".whitesource":"json",".yardopts":"settings",".yarn-integrity":"yarn",".yarnclean":"yarn",".yarnrc":"yarn",".yarnrc.yaml":"yarn",".yarnrc.yml":"yarn",_sc_:"godot-assets",ace:"adonis","amplify.yml":"amplify","androidmanifest.xml":"android","angular-cli.json":"angular","angular.json":"angular",apkbuild:"console","apollo.config.js":"apollo",appfile:"fastlane",appraisals:"ruby","appveyor.yml":"appveyor","appwrite.js":"appwrite","appwrite.json":"appwrite","appwrite.ts":"appwrite",architecture:"architecture","architecture.md":"architecture","architecture.rst":"architecture","architecture.txt":"architecture",artisan:"laravel","astro.config.cjs":"astro-config","astro.config.cts":"astro-config","astro.config.js":"astro-config","astro.config.mjs":"astro-config","astro.config.mts":"astro-config","astro.config.ts":"astro-config","aurelia.json":"aurelia",authors:"authors","authors.md":"authors","authors.rst":"authors","authors.txt":"authors","auto-config.js":"auto","auto-config.json":"auto","auto-config.ts":"auto","auto-config.yaml":"auto","auto-config.yml":"auto","auto.config.js":"auto","auto.config.ts":"auto","azure-pipelines-main.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines.yml":"azure-pipelines","babel-plugin-macros.config.cjs":"babel","babel-plugin-macros.config.cts":"babel","babel-plugin-macros.config.js":"babel","babel-plugin-macros.config.json":"babel","babel-plugin-macros.config.json5":"babel","babel-plugin-macros.config.jsonc":"babel","babel-plugin-macros.config.mjs":"babel","babel-plugin-macros.config.mts":"babel","babel-plugin-macros.config.toml":"babel","babel-plugin-macros.config.ts":"babel","babel-plugin-macros.config.yaml":"babel","babel-plugin-macros.config.yml":"babel","babel-transform.js":"babel","babel.config.cjs":"babel","babel.config.cts":"babel","babel.config.js":"babel","babel.config.json":"babel","babel.config.json5":"babel","babel.config.jsonc":"babel","babel.config.mjs":"babel","babel.config.mts":"babel","babel.config.toml":"babel","babel.config.ts":"babel","babel.config.yaml":"babel","babel.config.yml":"babel",bashrc_apple_terminal:"console",berksfile:"ruby","berksfile.lock":"ruby","biome.json":"biome","biome.jsonc":"biome","bitbucket-pipelines.yaml":"bitbucket","bitbucket-pipelines.yml":"bitbucket","blitz.config.js":"blitz","blitz.config.ts":"blitz","bower.json":"bower",brewfile:"ruby",browserslist:"browserlist","buildkite.yaml":"buildkite","buildkite.yml":"buildkite","bun.lock":"bun","bun.lockb":"bun","bunfig.toml":"bun","cabal.project":"cabal","cabal.project.freeze":"cabal","cabal.project.local":"cabal",caddyfile:"caddy","capacitor.config.json":"capacitor","capacitor.config.ts":"capacitor",capfile:"ruby","cdp.pid":"json","celerybeat-schedule":"python-misc","celerybeat.pid":"python-misc",changelog:"changelog","changelog.md":"changelog","changelog.rst":"changelog","changelog.txt":"changelog",changes:"changelog","changes.md":"changelog","changes.rst":"changelog","changes.txt":"changelog",cheffile:"ruby","chromatic.config.json":"chromatic","circle.yml":"circleci","citation.cff":"citation","claude.local.md":"claude","claude.md":"claude","cmakecache.txt":"cmake","cmakelists.txt":"cmake","cmakepresets.json":"cmake",cname:"http",code_of_conduct:"conduct","code_of_conduct.md":"conduct","code_of_conduct.txt":"conduct","codecov.yaml":"codecov","codecov.yml":"codecov",codeowners:"codeowners","commit-msg":"console",commit_editmsg:"git","commitlint.config.cjs":"commitlint","commitlint.config.cts":"commitlint","commitlint.config.js":"commitlint","commitlint.config.json":"commitlint","commitlint.config.json5":"commitlint","commitlint.config.jsonc":"commitlint","commitlint.config.mjs":"commitlint","commitlint.config.mts":"commitlint","commitlint.config.toml":"commitlint","commitlint.config.ts":"commitlint","commitlint.config.yaml":"commitlint","commitlint.config.yml":"commitlint","compile_flags.txt":"settings","compose.alpha.yaml":"docker","compose.alpha.yml":"docker","compose.beta.yaml":"docker","compose.beta.yml":"docker","compose.ci.yaml":"docker","compose.ci.yml":"docker","compose.dev.yaml":"docker","compose.dev.yml":"docker","compose.development.yaml":"docker","compose.development.yml":"docker","compose.local.yaml":"docker","compose.local.yml":"docker","compose.override.yaml":"docker","compose.override.yml":"docker","compose.prod.yaml":"docker","compose.prod.yml":"docker","compose.production.yaml":"docker","compose.production.yml":"docker","compose.stage.yaml":"docker","compose.stage.yml":"docker","compose.staging.yaml":"docker","compose.staging.yml":"docker","compose.test.yaml":"docker","compose.test.yml":"docker","compose.testing.yaml":"docker","compose.testing.yml":"docker","compose.web.yaml":"docker","compose.web.yml":"docker","compose.worker.yaml":"docker","compose.worker.yml":"docker","compose.yaml":"docker","compose.yml":"docker","composer.lock":"json","concourse.yml":"concourse",containerfile:"docker","containerfile.alpha":"docker","containerfile.beta":"docker","containerfile.ci":"docker","containerfile.dev":"docker","containerfile.development":"docker","containerfile.local":"docker","containerfile.prod":"docker","containerfile.production":"docker","containerfile.stage":"docker","containerfile.staging":"docker","containerfile.test":"docker","containerfile.testing":"docker","containerfile.web":"docker","containerfile.worker":"docker","contentlayer.config.cjs":"contentlayer","contentlayer.config.cts":"contentlayer","contentlayer.config.js":"contentlayer","contentlayer.config.mjs":"contentlayer","contentlayer.config.mts":"contentlayer","contentlayer.config.ts":"contentlayer",contributing:"contributing","contributing.md":"contributing","contributing.rst":"contributing","contributing.txt":"contributing",contributors:"authors","contributors.md":"authors","contributors.rst":"authors","contributors.txt":"authors","copilot-instructions.md":"copilot",copying:"license","copying.md":"license","copying.rst":"license","copying.txt":"license",copyright:"license","copyright.md":"license","copyright.rst":"license","copyright.txt":"license","craco.config.cjs":"craco","craco.config.cts":"craco","craco.config.js":"craco","craco.config.json":"craco","craco.config.json5":"craco","craco.config.jsonc":"craco","craco.config.mjs":"craco","craco.config.mts":"craco","craco.config.toml":"craco","craco.config.ts":"craco","craco.config.yaml":"craco","craco.config.yml":"craco",credits:"credits","credits.md":"credits","credits.rst":"credits","credits.txt":"credits","cypress.config.cjs":"cypress","cypress.config.cts":"cypress","cypress.config.js":"cypress","cypress.config.mjs":"cypress","cypress.config.mts":"cypress","cypress.config.ts":"cypress","cypress.env.json":"cypress","cypress.json":"cypress","cz.json":"commitizen","cz.toml":"commitizen","cz.yaml":"commitizen","cz.yml":"commitizen",dangerfile:"ruby",deliverfile:"ruby","deno.json":"deno","deno.jsonc":"deno","deno.lock":"deno","dependabot.yaml":"dependabot","dependabot.yml":"dependabot","docker-compose.alpha.yaml":"docker","docker-compose.alpha.yml":"docker","docker-compose.beta.yaml":"docker","docker-compose.beta.yml":"docker","docker-compose.ci.yaml":"docker","docker-compose.ci.yml":"docker","docker-compose.dev.yaml":"docker","docker-compose.dev.yml":"docker","docker-compose.development.yaml":"docker","docker-compose.development.yml":"docker","docker-compose.local.yaml":"docker","docker-compose.local.yml":"docker","docker-compose.override.yaml":"docker","docker-compose.override.yml":"docker","docker-compose.prod.yaml":"docker","docker-compose.prod.yml":"docker","docker-compose.production.yaml":"docker","docker-compose.production.yml":"docker","docker-compose.stage.yaml":"docker","docker-compose.stage.yml":"docker","docker-compose.staging.yaml":"docker","docker-compose.staging.yml":"docker","docker-compose.test.yaml":"docker","docker-compose.test.yml":"docker","docker-compose.testing.yaml":"docker","docker-compose.testing.yml":"docker","docker-compose.web.yaml":"docker","docker-compose.web.yml":"docker","docker-compose.worker.yaml":"docker","docker-compose.worker.yml":"docker","docker-compose.yaml":"docker","docker-compose.yml":"docker",dockerfile:"docker","dockerfile.alpha":"docker","dockerfile.beta":"docker","dockerfile.ci":"docker","dockerfile.dev":"docker","dockerfile.development":"docker","dockerfile.local":"docker","dockerfile.prod":"docker","dockerfile.production":"docker","dockerfile.stage":"docker","dockerfile.staging":"docker","dockerfile.test":"docker","dockerfile.testing":"docker","dockerfile.web":"docker","dockerfile.windows":"docker","dockerfile.worker":"docker","drizzle.config.dev.js":"drizzle","drizzle.config.dev.json":"drizzle","drizzle.config.dev.ts":"drizzle","drizzle.config.js":"drizzle","drizzle.config.json":"drizzle","drizzle.config.prod.js":"drizzle","drizzle.config.prod.json":"drizzle","drizzle.config.prod.ts":"drizzle","drizzle.config.ts":"drizzle","duc.fbs":"duc",dune:"dune","dune-project":"dune","dune-workspace":"dune","dune-workspace.dev":"dune","eas.json":"expo","ecosystem.config.cjs":"pm2-ecosystem","ecosystem.config.cts":"pm2-ecosystem","ecosystem.config.js":"pm2-ecosystem","ecosystem.config.mjs":"pm2-ecosystem","ecosystem.config.mts":"pm2-ecosystem","ecosystem.config.ts":"pm2-ecosystem","ember-cli-builds.js":"ember","esbuild.cjs":"esbuild","esbuild.config.cjs":"esbuild","esbuild.config.cts":"esbuild","esbuild.config.js":"esbuild","esbuild.config.mjs":"esbuild","esbuild.config.mts":"esbuild","esbuild.config.ts":"esbuild","esbuild.cts":"esbuild","esbuild.dev.cjs":"esbuild","esbuild.dev.cts":"esbuild","esbuild.dev.js":"esbuild","esbuild.dev.mjs":"esbuild","esbuild.dev.mts":"esbuild","esbuild.dev.ts":"esbuild","esbuild.js":"esbuild","esbuild.mjs":"esbuild","esbuild.mts":"esbuild","esbuild.prod.cjs":"esbuild","esbuild.prod.cts":"esbuild","esbuild.prod.js":"esbuild","esbuild.prod.mjs":"esbuild","esbuild.prod.mts":"esbuild","esbuild.prod.ts":"esbuild","esbuild.stage.cjs":"esbuild","esbuild.stage.cts":"esbuild","esbuild.stage.js":"esbuild","esbuild.stage.mjs":"esbuild","esbuild.stage.mts":"esbuild","esbuild.stage.ts":"esbuild","esbuild.test.cjs":"esbuild","esbuild.test.cts":"esbuild","esbuild.test.js":"esbuild","esbuild.test.mjs":"esbuild","esbuild.test.mts":"esbuild","esbuild.test.ts":"esbuild","esbuild.ts":"esbuild","eslint-options.js":"eslint","eslint.config.cjs":"eslint","eslint.config.cts":"eslint","eslint.config.js":"eslint","eslint.config.json":"eslint","eslint.config.json5":"eslint","eslint.config.jsonc":"eslint","eslint.config.mjs":"eslint","eslint.config.mts":"eslint","eslint.config.toml":"eslint","eslint.config.ts":"eslint","eslint.config.yaml":"eslint","eslint.config.yml":"eslint",excalidraw:"excalidraw","excalidraw.json":"excalidraw","excalidraw.png":"excalidraw","excalidraw.svg":"excalidraw","fabric.mod.json":"minecraft-fabric",fastfile:"fastlane","favicon.ico":"favicon","firebase.config.js":"firebase","firebase.json":"firebase","firestore.indexes.json":"firebase","firestore.rules":"firebase","fuse.js":"fusebox","garden.yaml":"garden","garden.yml":"garden","gatsby-browser.js":"gatsby","gatsby-browser.tsx":"gatsby","gatsby-config.js":"gatsby","gatsby-config.mjs":"gatsby","gatsby-config.ts":"gatsby","gatsby-node.js":"gatsby","gatsby-node.mjs":"gatsby","gatsby-node.ts":"gatsby","gatsby-ssr.js":"gatsby","gatsby-ssr.tsx":"gatsby",gemfile:"gemfile","gemini.md":"gemini-ai","git-history":"git","git-rebase-todo":"git","gleam.toml":"gleam",gnumakefile:"makefile","go.mod":"go-mod","go.sum":"go-mod","go.work":"go-mod","go.work.sum":"go-mod","google-services.json":"google","googleservice-info.plist":"google","gradle-wrapper.properties":"gradle","gradle.properties":"gradle",gradlew:"gradle","gradlew.bat":"gradle","graphql.config.cjs":"graphql","graphql.config.cts":"graphql","graphql.config.js":"graphql","graphql.config.json":"graphql","graphql.config.json5":"graphql","graphql.config.jsonc":"graphql","graphql.config.mjs":"graphql","graphql.config.mts":"graphql","graphql.config.toml":"graphql","graphql.config.ts":"graphql","graphql.config.yaml":"graphql","graphql.config.yml":"graphql","gridsome.config.js":"gridsome","gridsome.server.js":"gridsome","gruntfile.babel.coffee":"grunt","gruntfile.babel.js":"grunt","gruntfile.babel.ts":"grunt","gruntfile.cjs":"grunt","gruntfile.coffee":"grunt","gruntfile.cts":"grunt","gruntfile.js":"grunt","gruntfile.ts":"grunt",guardfile:"ruby","gulpfile.babel.js":"gulp","gulpfile.cjs":"gulp","gulpfile.cts":"gulp","gulpfile.js":"gulp","gulpfile.mjs":"gulp","gulpfile.mts":"gulp","gulpfile.ts":"gulp",gymfile:"ruby","hadolint.yaml":"hadolint","hadolint.yml":"hadolint","hardhat.config.js":"hardhat","hardhat.config.ts":"hardhat","harmonix.config.js":"harmonix","harmonix.config.ts":"harmonix",hgrc:"mercurial","histoire.config.cjs":"histoire","histoire.config.cts":"histoire","histoire.config.js":"histoire","histoire.config.mjs":"histoire","histoire.config.mts":"histoire","histoire.config.ts":"histoire",hobofile:"ruby","horusec-config.json":"horusec",hosts:"hosts","husky.config.cjs":"husky","husky.config.cts":"husky","husky.config.js":"husky","husky.config.json":"husky","husky.config.json5":"husky","husky.config.jsonc":"husky","husky.config.mjs":"husky","husky.config.mts":"husky","husky.config.toml":"husky","husky.config.ts":"husky","husky.config.yaml":"husky","husky.config.yml":"husky",install:"installation",installation:"installation","ionic.config.json":"ionic",jakefile:"javascript",jenkinsfile:"jenkins","jest-e2e.config.cjs":"jest","jest-e2e.config.cts":"jest","jest-e2e.config.js":"jest","jest-e2e.config.json":"jest","jest-e2e.config.mjs":"jest","jest-e2e.config.mts":"jest","jest-e2e.config.ts":"jest","jest-e2e.json":"jest","jest-github-actions-reporter.js":"jest","jest-preset.cjs":"jest","jest-preset.js":"jest","jest-preset.json":"jest","jest-preset.mjs":"jest","jest-unit.config.js":"jest","jest.config.cjs":"jest","jest.config.cts":"jest","jest.config.js":"jest","jest.config.json":"jest","jest.config.mjs":"jest","jest.config.mts":"jest","jest.config.ts":"jest","jest.e2e.config.cjs":"jest","jest.e2e.config.cts":"jest","jest.e2e.config.js":"jest","jest.e2e.config.json":"jest","jest.e2e.config.mjs":"jest","jest.e2e.config.mts":"jest","jest.e2e.config.ts":"jest","jest.e2e.json":"jest","jest.json":"jest","jest.preset.cjs":"jest","jest.preset.js":"jest","jest.preset.json":"jest","jest.preset.mjs":"jest","jest.setup.js":"jest","jest.setup.ts":"jest","jest.teardown.js":"jest","jsconfig.json":"jsconfig","jsr.json":"jsr","jsr.jsonc":"jsr",justfile:"just","jvm.config":"maven","k8s.yaml":"kubernetes","k8s.yml":"kubernetes","karma-main.js":"karma","karma-main.ts":"karma","karma.conf.coffee":"karma","karma.conf.js":"karma","karma.conf.ts":"karma","karma.config.js":"karma","karma.config.ts":"karma",kbuild:"makefile","kcl.mod":"kcl","kcl.yaml":"kcl","kcl.yml":"kcl","keystatic.config.js":"keystatic","keystatic.config.jsx":"keystatic","keystatic.config.ts":"keystatic","keystatic.config.tsx":"keystatic","knip.config.js":"knip","knip.config.ts":"knip","knip.js":"knip","knip.json":"knip","knip.jsonc":"knip","knip.ts":"knip","kubernetes.yaml":"kubernetes","kubernetes.yml":"kubernetes",latexmkrc:"latexmk","lefthook-local.json":"lefthook","lefthook-local.toml":"lefthook","lefthook-local.yaml":"lefthook","lefthook-local.yml":"lefthook","lefthook.json":"lefthook","lefthook.toml":"lefthook","lefthook.yaml":"lefthook","lefthook.yml":"lefthook",lefthookrc:"lefthook","lerna.json":"lerna","liara.json":"liara",licence:"license","licence-agpl":"license","licence-apache":"license","licence-bsd":"license","licence-gpl":"license","licence-lgpl":"license","licence-mit":"license","licence.md":"license","licence.rst":"license","licence.txt":"license",license:"license","license-agpl":"license","license-apache":"license","license-bsd":"license","license-gpl":"license","license-lgpl":"license","license-mit":"license","license.md":"license","license.rst":"license","license.txt":"license","lighthouserc.cjs":"lighthouse","lighthouserc.js":"lighthouse","lighthouserc.json":"lighthouse","lighthouserc.yaml":"lighthouse","lighthouserc.yml":"lighthouse","lint-staged.config.cjs":"lintstaged","lint-staged.config.js":"lintstaged","lint-staged.config.mjs":"lintstaged","lynx.config.cjs":"lynx","lynx.config.cts":"lynx","lynx.config.js":"lynx","lynx.config.mjs":"lynx","lynx.config.mts":"lynx","lynx.config.ts":"lynx",makefile:"makefile","manifest.in":"python-misc","manifest.mf":"settings","markdoc.config.cjs":"markdoc-config","markdoc.config.cts":"markdoc-config","markdoc.config.js":"markdoc-config","markdoc.config.mjs":"markdoc-config","markdoc.config.mts":"markdoc-config","markdoc.config.ts":"markdoc-config",matchfile:"ruby","maven.config":"maven","mercurial.ini":"mercurial",merge_msg:"git","meson.build":"meson","meson.options":"meson","meson_options.txt":"meson","metro.config.cjs":"metro","metro.config.cts":"metro","metro.config.js":"metro","metro.config.json":"metro","metro.config.mjs":"metro","metro.config.mts":"metro","metro.config.ts":"metro","milestones.md":"roadmap","milestones.txt":"roadmap","mocha.opts":"mocha","moon.yml":"moon","nano-staged.cjs":"nano-staged","nano-staged.js":"nano-staged","nano-staged.json":"nano-staged","nano-staged.mjs":"nano-staged","nest-cli.json":"nest","nestconfig.json":"nest","netlify.json":"netlify","netlify.toml":"netlify","netlify.yaml":"netlify","netlify.yml":"netlify","next.config.js":"next","next.config.mjs":"next","next.config.mts":"next","next.config.ts":"next","ng-package.json":"angular","nginx.conf":"nginx","nodemon-debug.json":"nodemon","nodemon.json":"nodemon","now.json":"vercel","nuget.config":"nuget","nuget.exe":"nuget","nuxt.config.js":"nuxt","nuxt.config.ts":"nuxt","nx.json":"nx","nyc.config.cjs":"istanbul","nyc.config.js":"istanbul","openapi.json":"openapi","openapi.yaml":"openapi","openapi.yml":"openapi","opencode.json":"opencode","opencode.jsonc":"opencode",owners:"codeowners","oxfmt.config.ts":"oxc","oxlint.config.ts":"oxc","package-lock.json":"nodejs","package.json":"nodejs","packship.config.js":"packship","packship.config.json":"packship","packship.config.mjs":"packship","packship.config.mts":"packship","packship.config.ts":"packship","panda.config.cjs":"panda","panda.config.cts":"panda","panda.config.js":"panda","panda.config.mjs":"panda","panda.config.mts":"panda","panda.config.ts":"panda","payload.config.js":"payload","payload.config.mjs":"payload","payload.config.mts":"payload","payload.config.ts":"payload","pdm.lock":"pdm","pdm.toml":"pdm","phpstan.dist.neon":"phpstan","phpstan.neon":"phpstan","phpstan.neon.dist":"phpstan","phpunit-watcher.yml":"phpunit","phpunit-watcher.yml.dist":"phpunit","phpunit.xml":"phpunit","phpunit.xml.dist":"phpunit",pipfile:"python-misc",pkgbuild:"console",pklproject:"pkl","pklproject.deps.json":"pkl","plastic.branchexplorer":"plastic","plastic.selector":"plastic","plastic.wktree":"plastic","plastic.workspace":"plastic","plastic.workspaces":"plastic","playwright-ct.config.cjs":"playwright","playwright-ct.config.cts":"playwright","playwright-ct.config.js":"playwright","playwright-ct.config.mjs":"playwright","playwright-ct.config.mts":"playwright","playwright-ct.config.ts":"playwright","playwright.config.base.cjs":"playwright","playwright.config.base.cts":"playwright","playwright.config.base.js":"playwright","playwright.config.base.mjs":"playwright","playwright.config.base.mts":"playwright","playwright.config.base.ts":"playwright","playwright.config.cjs":"playwright","playwright.config.cts":"playwright","playwright.config.js":"playwright","playwright.config.mjs":"playwright","playwright.config.mts":"playwright","playwright.config.ts":"playwright","plopfile.cjs":"plop","plopfile.js":"plop","plopfile.mjs":"plop","plopfile.ts":"plop","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm",podfile:"ruby","poetry.lock":"poetry","pom.xml":"maven","post-merge":"console","postcss.config.cjs":"postcss","postcss.config.cts":"postcss","postcss.config.js":"postcss","postcss.config.json":"postcss","postcss.config.json5":"postcss","postcss.config.jsonc":"postcss","postcss.config.mjs":"postcss","postcss.config.mts":"postcss","postcss.config.toml":"postcss","postcss.config.ts":"postcss","postcss.config.yaml":"postcss","postcss.config.yml":"postcss","posthtml.config.cjs":"posthtml","posthtml.config.cts":"posthtml","posthtml.config.js":"posthtml","posthtml.config.json":"posthtml","posthtml.config.json5":"posthtml","posthtml.config.jsonc":"posthtml","posthtml.config.mjs":"posthtml","posthtml.config.mts":"posthtml","posthtml.config.toml":"posthtml","posthtml.config.ts":"posthtml","posthtml.config.yaml":"posthtml","posthtml.config.yml":"posthtml","pre-commit":"console","pre-push":"console","prettier.config.cjs":"prettier","prettier.config.cts":"prettier","prettier.config.js":"prettier","prettier.config.json":"prettier","prettier.config.json5":"prettier","prettier.config.jsonc":"prettier","prettier.config.mjs":"prettier","prettier.config.mts":"prettier","prettier.config.toml":"prettier","prettier.config.ts":"prettier","prettier.config.yaml":"prettier","prettier.config.yml":"prettier","prisma.config.ts":"prisma","prisma.yml":"prisma",procfile:"heroku","procfile.windows":"heroku","project.garden.yaml":"garden","project.garden.yml":"garden","project.graphcool":"graphcool","protractor.conf.coffee":"protractor","protractor.conf.js":"protractor","protractor.conf.ts":"protractor","protractor.config.js":"protractor","protractor.config.ts":"protractor","puppeteer.config.cjs":"puppeteer","puppeteer.config.cts":"puppeteer","puppeteer.config.js":"puppeteer","puppeteer.config.json":"puppeteer","puppeteer.config.json5":"puppeteer","puppeteer.config.jsonc":"puppeteer","puppeteer.config.mjs":"puppeteer","puppeteer.config.mts":"puppeteer","puppeteer.config.toml":"puppeteer","puppeteer.config.ts":"puppeteer","puppeteer.config.yaml":"puppeteer","puppeteer.config.yml":"puppeteer",puppetfile:"ruby","py.typed":"python-misc",pylintrc:"python-misc","pyproject.toml":"python-misc","quasar.conf.js":"quasar","quasar.conf.ts":"quasar","quasar.config.cjs":"quasar","quasar.config.js":"quasar","quasar.config.ts":"quasar",rakefile:"ruby",rantfile:"ruby",readme:"readme","readme.md":"readme","readme.rst":"readme","readme.txt":"readme","release-plz.toml":"rocket","release.config.cjs":"semantic-release","release.config.cts":"semantic-release","release.config.js":"semantic-release","release.config.json":"semantic-release","release.config.json5":"semantic-release","release.config.jsonc":"semantic-release","release.config.mjs":"semantic-release","release.config.mts":"semantic-release","release.config.toml":"semantic-release","release.config.ts":"semantic-release","release.config.yaml":"semantic-release","release.config.yml":"semantic-release","release.toml":"rocket","remix.config.js":"remix","remix.config.ts":"remix","renovate-config.json":"renovate","renovate.json":"renovate","renovate.json5":"renovate","requirements.txt":"python-misc","roadmap.md":"roadmap","roadmap.txt":"roadmap","robots.txt":"robots","rolldown.config.cjs":"rolldown","rolldown.config.cts":"rolldown","rolldown.config.js":"rolldown","rolldown.config.mjs":"rolldown","rolldown.config.mts":"rolldown","rolldown.config.ts":"rolldown","rollup-config.js":"rollup","rollup-config.mjs":"rollup","rollup-config.ts":"rollup","rollup.config.base.js":"rollup","rollup.config.base.mjs":"rollup","rollup.config.base.ts":"rollup","rollup.config.common.js":"rollup","rollup.config.common.mjs":"rollup","rollup.config.common.ts":"rollup","rollup.config.dev.js":"rollup","rollup.config.dev.mjs":"rollup","rollup.config.dev.ts":"rollup","rollup.config.js":"rollup","rollup.config.mjs":"rollup","rollup.config.prod.js":"rollup","rollup.config.prod.mjs":"rollup","rollup.config.prod.ts":"rollup","rollup.config.prod.vendor.js":"rollup","rollup.config.prod.vendor.mjs":"rollup","rollup.config.prod.vendor.ts":"rollup","rollup.config.ts":"rollup","rome.json":"rome","route.js":"routing","route.jsx":"routing","route.ts":"routing","route.tsx":"routing","router.js":"routing","router.jsx":"routing","router.ts":"routing","router.tsx":"routing","routes.js":"routing","routes.jsx":"routing","routes.ts":"routing","routes.tsx":"routing","rsbuild.config.cjs":"rstack","rsbuild.config.cts":"rstack","rsbuild.config.js":"rstack","rsbuild.config.mjs":"rstack","rsbuild.config.mts":"rstack","rsbuild.config.ts":"rstack","rslib.config.cjs":"rstack","rslib.config.cts":"rstack","rslib.config.js":"rstack","rslib.config.mjs":"rstack","rslib.config.mts":"rstack","rslib.config.ts":"rstack","rslint.config.cjs":"rstack","rslint.config.cts":"rstack","rslint.config.js":"rstack","rslint.config.mjs":"rstack","rslint.config.mts":"rstack","rslint.config.ts":"rstack","rslint.json":"rstack","rslint.jsonc":"rstack","rspack.config.cjs":"rstack","rspack.config.cts":"rstack","rspack.config.js":"rstack","rspack.config.mjs":"rstack","rspack.config.mts":"rstack","rspack.config.ts":"rstack","rspress.config.cjs":"rstack","rspress.config.cts":"rstack","rspress.config.js":"rstack","rspress.config.mjs":"rstack","rspress.config.mts":"rstack","rspress.config.ts":"rstack","rstest.config.cjs":"rstack","rstest.config.cts":"rstack","rstest.config.js":"rstack","rstest.config.mjs":"rstack","rstest.config.mts":"rstack","rstest.config.ts":"rstack","ruff.toml":"ruff",scanfile:"ruby",sconscript:"scons",sconstruct:"scons","screwdriver.yaml":"screwdriver","screwdriver.yml":"screwdriver",scsub:"scons",security:"lock","security.md":"lock","security.txt":"lock","semgrep.yml":"semgrep","sentry.client.config.cjs":"sentry","sentry.client.config.cts":"sentry","sentry.client.config.js":"sentry","sentry.client.config.mjs":"sentry","sentry.client.config.mts":"sentry","sentry.client.config.ts":"sentry","sentry.edge.config.cjs":"sentry","sentry.edge.config.cts":"sentry","sentry.edge.config.js":"sentry","sentry.edge.config.mjs":"sentry","sentry.edge.config.mts":"sentry","sentry.edge.config.ts":"sentry","sentry.server.config.cjs":"sentry","sentry.server.config.cts":"sentry","sentry.server.config.js":"sentry","sentry.server.config.mjs":"sentry","sentry.server.config.mts":"sentry","sentry.server.config.ts":"sentry","serverless.js":"serverless","serverless.json":"serverless","serverless.ts":"serverless","serverless.yaml":"serverless","serverless.yml":"serverless",sha256sums:"key",shellcheckrc:"shellcheck","skill.md":"skill",snakefile:"snakemake","snapcraft.yaml":"snapcraft","snapcraft.yml":"snapcraft",snapfile:"ruby","snowpack.config.cjs":"snowpack","snowpack.config.cts":"snowpack","snowpack.config.js":"snowpack","snowpack.config.json":"snowpack","snowpack.config.mjs":"snowpack","snowpack.config.mts":"snowpack","snowpack.config.ts":"snowpack","snowpack.deps.json":"snowpack","sonar-project.properties":"sonarcloud","sonarcloud.yaml":"sonarcloud","sonarqube.analysis.xml":"sonarcloud","src/bashly.yaml":"bashly","src/bashly.yml":"bashly","steadybit.yaml":"steadybit","steadybit.yml":"steadybit","stencil.config.js":"stencil","stencil.config.ts":"stencil","stitches.config.js":"stitches","stitches.config.ts":"stitches","stryker.conf.cjs":"stryker","stryker.conf.js":"stryker","stryker.conf.json":"stryker","stryker.conf.mjs":"stryker","stryker.config.cjs":"stryker","stryker.config.js":"stryker","stryker.config.json":"stryker","stryker.config.mjs":"stryker","stylelint.config.cjs":"stylelint","stylelint.config.cts":"stylelint","stylelint.config.js":"stylelint","stylelint.config.json":"stylelint","stylelint.config.json5":"stylelint","stylelint.config.jsonc":"stylelint","stylelint.config.mjs":"stylelint","stylelint.config.mts":"stylelint","stylelint.config.toml":"stylelint","stylelint.config.ts":"stylelint","stylelint.config.yaml":"stylelint","stylelint.config.yml":"stylelint","supabase.js":"supabase","supabase.py":"supabase","supabase.ts":"supabase","svelte.config.cjs":"svelte","svelte.config.cts":"svelte","svelte.config.js":"svelte","svelte.config.mjs":"svelte","svelte.config.mts":"svelte","svelte.config.ts":"svelte","svgo.config.cjs":"svgo","svgo.config.js":"svgo","svgo.config.mjs":"svgo","svgr.config.cjs":"svgr","svgr.config.cts":"svgr","svgr.config.js":"svgr","svgr.config.json":"svgr","svgr.config.json5":"svgr","svgr.config.jsonc":"svgr","svgr.config.mjs":"svgr","svgr.config.mts":"svgr","svgr.config.toml":"svgr","svgr.config.ts":"svgr","svgr.config.yaml":"svgr","svgr.config.yml":"svgr","swagger.json":"swagger","swagger.yaml":"swagger","swagger.yml":"swagger","syncpack.config.cjs":"syncpack","syncpack.config.cts":"syncpack","syncpack.config.js":"syncpack","syncpack.config.json":"syncpack","syncpack.config.json5":"syncpack","syncpack.config.jsonc":"syncpack","syncpack.config.mjs":"syncpack","syncpack.config.mts":"syncpack","syncpack.config.toml":"syncpack","syncpack.config.ts":"syncpack","syncpack.config.yaml":"syncpack","syncpack.config.yml":"syncpack",tags:"label","tailwind.config.cjs":"tailwindcss","tailwind.config.cts":"tailwindcss","tailwind.config.js":"tailwindcss","tailwind.config.mjs":"tailwindcss","tailwind.config.mts":"tailwindcss","tailwind.config.ts":"tailwindcss","tailwind.js":"tailwindcss","tailwind.ts":"tailwindcss","taskfile.dist.yaml":"taskfile","taskfile.dist.yml":"taskfile","taskfile.yaml":"taskfile","taskfile.yml":"taskfile","tauri.conf.json":"tauri","tauri.config.json":"tauri","tauri.linux.conf.json":"tauri","tauri.macos.conf.json":"tauri","tauri.windows.conf.json":"tauri","taze.config.cjs":"taze","taze.config.cts":"taze","taze.config.js":"taze","taze.config.mjs":"taze","taze.config.mts":"taze","taze.config.ts":"taze",thorfile:"ruby",tiltfile:"tilt","timeline.md":"roadmap","timeline.txt":"roadmap","todo.md":"todo","todos.md":"todo","trigger.config.cjs":"trigger","trigger.config.cts":"trigger","trigger.config.js":"trigger","trigger.config.mjs":"trigger","trigger.config.mts":"trigger","trigger.config.ts":"trigger","tsconfig.app.json":"tsconfig","tsconfig.base.json":"tsconfig","tsconfig.build.json":"tsconfig","tsconfig.cjs.json":"tsconfig","tsconfig.client.json":"tsconfig","tsconfig.config.json":"tsconfig","tsconfig.declaration.json":"tsconfig","tsconfig.doc.json":"tsconfig","tsconfig.e2e.json":"tsconfig","tsconfig.editor.json":"tsconfig","tsconfig.eslint.json":"tsconfig","tsconfig.esm.json":"tsconfig","tsconfig.json":"tsconfig","tsconfig.lib.json":"tsconfig","tsconfig.lib.prod.json":"tsconfig","tsconfig.main.json":"tsconfig","tsconfig.mjs.json":"tsconfig","tsconfig.node.json":"tsconfig","tsconfig.paths.json":"tsconfig","tsconfig.renderer.json":"tsconfig","tsconfig.server.json":"tsconfig","tsconfig.spec.json":"tsconfig","tsconfig.test.json":"tsconfig","tsconfig.vitest.json":"tsconfig","tsconfig.web.json":"tsconfig","tsconfig.webworker.json":"tsconfig","tsconfig.worker.json":"tsconfig","tsdoc.json":"tsdoc","tsdown.config":"tsdown","tsdown.config.cjs":"tsdown","tsdown.config.cts":"tsdown","tsdown.config.js":"tsdown","tsdown.config.json":"tsdown","tsdown.config.mjs":"tsdown","tsdown.config.mts":"tsdown","tsdown.config.ts":"tsdown","turbo.json":"turborepo","turbo.jsonc":"turborepo","typedoc.js":"typedoc","typedoc.json":"typedoc","typst.toml":"typst",unlicense:"unlicense","unlicense.txt":"unlicense","uno.config.js":"unocss","uno.config.mjs":"unocss","uno.config.mts":"unocss","uno.config.ts":"unocss","unocss.config.js":"unocss","unocss.config.mjs":"unocss","unocss.config.mts":"unocss","unocss.config.ts":"unocss","uv.lock":"uv","uv.toml":"uv","v.mod":"vlang",vagrantfile:"vagrant","velite.config.cjs":"velite","velite.config.cts":"velite","velite.config.js":"velite","velite.config.mjs":"velite","velite.config.mts":"velite","velite.config.ts":"velite","vercel.json":"vercel","vercel.ts":"vercel","verdaccio.yml":"verdaccio","vetur.config.js":"vue-config","vetur.config.ts":"vue-config","vite.config.cjs":"vite","vite.config.cts":"vite","vite.config.js":"vite","vite.config.mjs":"vite","vite.config.mts":"vite","vite.config.ts":"vite","vitest.config.cjs":"vitest","vitest.config.cts":"vitest","vitest.config.js":"vitest","vitest.config.mjs":"vitest","vitest.config.mts":"vitest","vitest.config.ts":"vitest","vitest.e2e.config.cjs":"vitest","vitest.e2e.config.cts":"vitest","vitest.e2e.config.js":"vitest","vitest.e2e.config.mjs":"vitest","vitest.e2e.config.mts":"vitest","vitest.e2e.config.ts":"vitest","vitest.unit.config.cjs":"vitest","vitest.unit.config.cts":"vitest","vitest.unit.config.js":"vitest","vitest.unit.config.mjs":"vitest","vitest.unit.config.mts":"vitest","vitest.unit.config.ts":"vitest","vitest.workspace.cjs":"vitest","vitest.workspace.cts":"vitest","vitest.workspace.js":"vitest","vitest.workspace.mjs":"vitest","vitest.workspace.mts":"vitest","vitest.workspace.ts":"vitest","volar.config.js":"vue-config","vpkg.json":"vlang","vue.config.cjs":"vue-config","vue.config.js":"vue-config","vue.config.mjs":"vue-config","vue.config.ts":"vue-config","wallaby.conf.js":"wallaby","wallaby.js":"wallaby","wally.toml":"wally","warp.md":"warp","webpack.base.cjs":"webpack","webpack.base.cts":"webpack","webpack.base.js":"webpack","webpack.base.mjs":"webpack","webpack.base.mts":"webpack","webpack.base.ts":"webpack","webpack.cjs":"webpack","webpack.client.cjs":"webpack","webpack.client.cts":"webpack","webpack.client.js":"webpack","webpack.client.mjs":"webpack","webpack.client.mts":"webpack","webpack.client.ts":"webpack","webpack.common.cjs":"webpack","webpack.common.cts":"webpack","webpack.common.js":"webpack","webpack.common.mjs":"webpack","webpack.common.mts":"webpack","webpack.common.ts":"webpack","webpack.config.babel.cjs":"webpack","webpack.config.babel.cts":"webpack","webpack.config.babel.js":"webpack","webpack.config.babel.mjs":"webpack","webpack.config.babel.mts":"webpack","webpack.config.babel.ts":"webpack","webpack.config.base.babel.cjs":"webpack","webpack.config.base.babel.cts":"webpack","webpack.config.base.babel.js":"webpack","webpack.config.base.babel.mjs":"webpack","webpack.config.base.babel.mts":"webpack","webpack.config.base.babel.ts":"webpack","webpack.config.base.cjs":"webpack","webpack.config.base.cts":"webpack","webpack.config.base.js":"webpack","webpack.config.base.mjs":"webpack","webpack.config.base.mts":"webpack","webpack.config.base.ts":"webpack","webpack.config.cjs":"webpack","webpack.config.client.cjs":"webpack","webpack.config.client.cts":"webpack","webpack.config.client.js":"webpack","webpack.config.client.mjs":"webpack","webpack.config.client.mts":"webpack","webpack.config.client.ts":"webpack","webpack.config.coffee":"webpack","webpack.config.common.babel.cjs":"webpack","webpack.config.common.babel.cts":"webpack","webpack.config.common.babel.js":"webpack","webpack.config.common.babel.mjs":"webpack","webpack.config.common.babel.mts":"webpack","webpack.config.common.babel.ts":"webpack","webpack.config.common.cjs":"webpack","webpack.config.common.cts":"webpack","webpack.config.common.js":"webpack","webpack.config.common.mjs":"webpack","webpack.config.common.mts":"webpack","webpack.config.common.ts":"webpack","webpack.config.cts":"webpack","webpack.config.dev.babel.cjs":"webpack","webpack.config.dev.babel.cts":"webpack","webpack.config.dev.babel.js":"webpack","webpack.config.dev.babel.mjs":"webpack","webpack.config.dev.babel.mts":"webpack","webpack.config.dev.babel.ts":"webpack","webpack.config.dev.cjs":"webpack","webpack.config.dev.cts":"webpack","webpack.config.dev.js":"webpack","webpack.config.dev.mjs":"webpack","webpack.config.dev.mts":"webpack","webpack.config.dev.ts":"webpack","webpack.config.js":"webpack","webpack.config.main.cjs":"webpack","webpack.config.main.cts":"webpack","webpack.config.main.js":"webpack","webpack.config.main.mjs":"webpack","webpack.config.main.mts":"webpack","webpack.config.main.ts":"webpack","webpack.config.mjs":"webpack","webpack.config.mts":"webpack","webpack.config.prod.babel.cjs":"webpack","webpack.config.prod.babel.cts":"webpack","webpack.config.prod.babel.js":"webpack","webpack.config.prod.babel.mjs":"webpack","webpack.config.prod.babel.mts":"webpack","webpack.config.prod.babel.ts":"webpack","webpack.config.prod.cjs":"webpack","webpack.config.prod.cts":"webpack","webpack.config.prod.js":"webpack","webpack.config.prod.mjs":"webpack","webpack.config.prod.mts":"webpack","webpack.config.prod.ts":"webpack","webpack.config.production.babel.cjs":"webpack","webpack.config.production.babel.cts":"webpack","webpack.config.production.babel.js":"webpack","webpack.config.production.babel.mjs":"webpack","webpack.config.production.babel.mts":"webpack","webpack.config.production.babel.ts":"webpack","webpack.config.production.cjs":"webpack","webpack.config.production.cts":"webpack","webpack.config.production.js":"webpack","webpack.config.production.mjs":"webpack","webpack.config.production.mts":"webpack","webpack.config.production.ts":"webpack","webpack.config.renderer.cjs":"webpack","webpack.config.renderer.cts":"webpack","webpack.config.renderer.js":"webpack","webpack.config.renderer.mjs":"webpack","webpack.config.renderer.mts":"webpack","webpack.config.renderer.ts":"webpack","webpack.config.server.cjs":"webpack","webpack.config.server.cts":"webpack","webpack.config.server.js":"webpack","webpack.config.server.mjs":"webpack","webpack.config.server.mts":"webpack","webpack.config.server.ts":"webpack","webpack.config.staging.babel.cjs":"webpack","webpack.config.staging.babel.cts":"webpack","webpack.config.staging.babel.js":"webpack","webpack.config.staging.babel.mjs":"webpack","webpack.config.staging.babel.mts":"webpack","webpack.config.staging.babel.ts":"webpack","webpack.config.staging.cjs":"webpack","webpack.config.staging.cts":"webpack","webpack.config.staging.js":"webpack","webpack.config.staging.mjs":"webpack","webpack.config.staging.mts":"webpack","webpack.config.staging.ts":"webpack","webpack.config.test.cjs":"webpack","webpack.config.test.cts":"webpack","webpack.config.test.js":"webpack","webpack.config.test.mjs":"webpack","webpack.config.test.mts":"webpack","webpack.config.test.ts":"webpack","webpack.config.ts":"webpack","webpack.config.vendor.cjs":"webpack","webpack.config.vendor.cts":"webpack","webpack.config.vendor.js":"webpack","webpack.config.vendor.mjs":"webpack","webpack.config.vendor.mts":"webpack","webpack.config.vendor.production.cjs":"webpack","webpack.config.vendor.production.cts":"webpack","webpack.config.vendor.production.js":"webpack","webpack.config.vendor.production.mjs":"webpack","webpack.config.vendor.production.mts":"webpack","webpack.config.vendor.production.ts":"webpack","webpack.config.vendor.ts":"webpack","webpack.cts":"webpack","webpack.dev.cjs":"webpack","webpack.dev.cts":"webpack","webpack.dev.js":"webpack","webpack.dev.mjs":"webpack","webpack.dev.mts":"webpack","webpack.dev.ts":"webpack","webpack.development.cjs":"webpack","webpack.development.cts":"webpack","webpack.development.js":"webpack","webpack.development.mjs":"webpack","webpack.development.mts":"webpack","webpack.development.ts":"webpack","webpack.dist.cjs":"webpack","webpack.dist.cts":"webpack","webpack.dist.js":"webpack","webpack.dist.mjs":"webpack","webpack.dist.mts":"webpack","webpack.dist.ts":"webpack","webpack.js":"webpack","webpack.mix.cjs":"webpack","webpack.mix.cts":"webpack","webpack.mix.js":"webpack","webpack.mix.mjs":"webpack","webpack.mix.mts":"webpack","webpack.mix.ts":"webpack","webpack.mjs":"webpack","webpack.mts":"webpack","webpack.prod.cjs":"webpack","webpack.prod.config.cjs":"webpack","webpack.prod.config.cts":"webpack","webpack.prod.config.js":"webpack","webpack.prod.config.mjs":"webpack","webpack.prod.config.mts":"webpack","webpack.prod.config.ts":"webpack","webpack.prod.cts":"webpack","webpack.prod.js":"webpack","webpack.prod.mjs":"webpack","webpack.prod.mts":"webpack","webpack.prod.ts":"webpack","webpack.production.cjs":"webpack","webpack.production.cts":"webpack","webpack.production.js":"webpack","webpack.production.mjs":"webpack","webpack.production.mts":"webpack","webpack.production.ts":"webpack","webpack.server.cjs":"webpack","webpack.server.cts":"webpack","webpack.server.js":"webpack","webpack.server.mjs":"webpack","webpack.server.mts":"webpack","webpack.server.ts":"webpack","webpack.test.cjs":"webpack","webpack.test.cts":"webpack","webpack.test.js":"webpack","webpack.test.mjs":"webpack","webpack.test.mts":"webpack","webpack.test.ts":"webpack","webpack.ts":"webpack","webpackfile.cjs":"webpack","webpackfile.cts":"webpack","webpackfile.js":"webpack","webpackfile.mjs":"webpack","webpackfile.mts":"webpack","webpackfile.ts":"webpack","werf-giterminism.yaml":"werf","werf-giterminism.yml":"werf","werf-includes.lock":"werf","werf-includes.yaml":"werf","werf-includes.yml":"werf","werf.yaml":"werf","werf.yml":"werf","windi.config.cjs":"windicss","windi.config.cts":"windicss","windi.config.js":"windicss","windi.config.json":"windicss","windi.config.ts":"windicss","wrangler.json":"wrangler","wrangler.jsonc":"wrangler","wrangler.toml":"wrangler","wxt.config.cjs":"wxt","wxt.config.cts":"wxt","wxt.config.js":"wxt","wxt.config.mjs":"wxt","wxt.config.mts":"wxt","wxt.config.ts":"wxt","xamlstyler.json":"xaml",xmake:"xmake","xmake.lua":"xmake","yarn-error.log":"yarn","yarn.lock":"yarn","zeabur.json":"zeabur","zeabur.json5":"zeabur","zeabur.jsonc":"zeabur","zeabur.toml":"zeabur","zeabur.yaml":"zeabur","zeabur.yml":"zeabur",zlogin:"console",zlogout:"console",zprofile:"console",zshenv:"console",zshrc:"console",zshrc_apple_terminal:"console"},Ck={60:"slint",".ncurc.js":"dependencies-update",".ncurc.json":"dependencies-update",".ncurc.yml":"dependencies-update",".wakatime-project":"wakatime","001":"zip","123dx":"3d","3dm":"3d","3ds":"3d","3fr":"image","3mf":"3d","4th":"forth","7z":"zip","8svx":"audio",a:"lib",a51:"assembly",aa:"audio",aac:"audio",aax:"audio",abap:"abap",abc:"abc",ac:"3d",ac3:"audio",accdb:"database",accde:"database",acds:"abap",act:"palette",ad:"asciidoc",ada:"ada",adb:"ada",adoc:"asciidoc",adp:"database",ads:"ada",aea:"assembly",afphoto:"image",agc:"assembly",ags:"assembly",ahk:"autohotkey",ai:"adobe-illustrator",aif:"audio",aiff:"audio",ait:"adobe-illustrator",alac:"audio",ali:"ada",alloy:"grafana-alloy",ami:"image",amr:"audio",amx:"pawn",ape:"audio",apfs:"zip",apib:"apiblueprint",apiblueprint:"apiblueprint",apk:"android",applescript:"applescript",apx:"image",argus:"assembly",ari:"image",arj:"zip",arw:"image",as:"actionscript",asc:"key",asciidoc:"asciidoc",ascx:"xml",asddls:"abap",ase:"image",aseprite:"image",asm:"assembly",asp:"html",aspx:"html",ass:"subtitles",ast:"sas",astore:"sas",astro:"astro",atom:"xml",au3:"autoit",aux:"tex",avi:"video",avif:"image",awk:"console",axaml:"xml",axml:"xml",azcli:"azure","azure-pipelines-main.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines.yml":"azure-pipelines",b:"brainfuck",bak:"database",bal:"ballerina",balx:"ballerina",bas:"visualstudio",bash:"console",bash_aliases:"console",bash_login:"console",bash_logout:"console",bash_profile:"console",bashrc:"console",bat:"console",bay:"image",bazel:"bazel",bbl:"bibliography",bbx:"bbx",bcf:"bibliography",bdb:"database",bean:"beancount",beancount:"beancount","bench.cjs":"bench-js","bench.cts":"bench-ts","bench.js":"bench-js","bench.jsx":"bench-jsx","bench.mjs":"bench-js","bench.mts":"bench-ts","bench.ts":"bench-ts","bench.tsx":"bench-jsx",bf:"brainfuck",bib:"bibliography",bicep:"bicep",bin:"hex",binsource:"assembly","blade.php":"laravel",blend:"blender",blend1:"blender",blend2:"blender",blg:"bibliography",blink:"blink",bmap:"font",bmp:"image",bpg:"image",bpmn:"xml",br:"zip",braw:"image",brk:"image",brotli:"zip",brs:"visualstudio",bru:"bruno",bst:"bibtex-style",bubble:"dinophp",bz2:"zip",bzip2:"zip",bzl:"bazel",c:"c","c++":"cpp","c++m":"cpp",c3:"c3",cab:"zip",cabal:"cabal",caf:"audio",cairo:"cairo",cake:"cake",cap:"image",capnp:"capnp",catpart:"3d",catproduct:"3d",cbl:"cobol",cbx:"cbx",cc:"cpp",ccm:"cpp",cda:"audio",cdc:"cadence",cdr:"audio",cds:"cds",cer:"certificate",cert:"certificate",cfc:"coldfusion",cff:"yaml",cfg:"settings",cfm:"coldfusion",cfml:"coldfusion",cginc:"shader",cjs:"javascript","cjs.map":"javascript-map",cl:"lisp",class:"javaclass",clip:"image",clj:"clojure",cljc:"clojure",cljs:"clojure",cljx:"clojure",clo:"tex",clojure:"clojure",cls:"tex",cm:"sml",cmake:"cmake",cmd:"console",cmj:"bucklescript",cmx:"ocaml",cnf:"settings",coafile:"coala",coarc:"coala",cob:"cobol",coco:"coconut","code-profile":"vscode","code-search":"search","code-snippets":"vscode","code-workplace":"vscode","code-workspace":"vscode",coffee:"coffee",command:"command",comp:"shader","comp.glsl":"shader","comp.hlsl":"shader","compose.yaml":"docker","compose.yml":"docker",compute:"shader","compute.glsl":"shader","compute.hlsl":"shader",computeshader:"shader",conf:"settings",config:"settings",containerfile:"docker",containerignore:"docker","controller.js":"controller","controller.ts":"controller",copilotmd:"markdown",cp:"cpp",cpio:"zip",cpn:"coloredpetrinets",cpp:"cpp",cppm:"cpp",cpt:"image",cpy:"python",cr:"crystal",cr2:"image",cr3:"image",crt:"certificate",crw:"image",crx:"chrome",cs:"csharp",csh:"console",csharp:"csharp",cshrc:"console",cshtml:"razor",csl:"xml",cson:"coffee",csproj:"visualstudio","csproj.user":"xml",css:"css","css.cjs":"vanilla-extract","css.js":"vanilla-extract","css.jsx":"vanilla-extract","css.map":"css-map","css.mjs":"vanilla-extract","css.ts":"vanilla-extract","css.tsx":"vanilla-extract",csv:"table",csx:"csharp",ctp:"php",cts:"typescript",ctx:"context",cu:"cuda",cue:"cue",cuh:"cuda",cur:"image",cxx:"cpp",cxxm:"cpp","cy.js":"test-js","cy.jsx":"test-jsx","cy.ts":"test-ts","cy.tsx":"test-jsx",d:"d","d.cts":"typescript-def","d.ets":"typescript-def","d.mts":"typescript-def","d.ts":"typescript-def",dae:"3d",dart:"dart",dat:"hex",data:"image",db:"database",db3:"database",dbf:"database",dblite:"database",dblite3:"database",dcr:"image",dcs:"image",dds:"image",deb:"zip",debugsymbols:"database",def:"dotjs",dex:"android",dfxp:"subtitles",dhall:"dhall",dhallb:"dhall",diff:"diff",dio:"drawio",directory:"settings",dita:"xml",ditamap:"xml",djt:"django",dlc:"settings",dll:"dll",dmg:"disc",dmn:"xml",dng:"image",do:"tcl",doc:"word","docker-compose.yaml":"docker","docker-compose.yml":"docker",dockerfile:"docker",dockerignore:"docker",docx:"word",dot:"dotjs",drawio:"drawio",drf:"image","drone.yml":"drone",dsc:"denizenscript",dsql:"database",dss:"audio",dtd:"xml",dtml:"xml",duc:"duc",dwg:"3d",dxf:"3d","e2e-spec.cjs":"test-js","e2e-spec.cts":"test-ts","e2e-spec.js":"test-js","e2e-spec.mjs":"test-js","e2e-spec.mts":"test-ts","e2e-spec.ts":"test-ts",ebuild:"console",ec3:"audio",eclass:"console",ecr:"crystal",edb:"email",edge:"edge",edn:"clojure",eex:"elixir",efs:"audio",egg:"python-misc",eip:"image",ejs:"ejs",elm:"elm",eml:"email",emlx:"email",enc:"audio",ent:"xml",env:"tune",eot:"font",eps:"image",epub:"epub",erb:"ruby",erf:"image",erl:"erlang",es6:"javascript",esd:"zip",esx:"javascript",ex:"elixir",excalidraw:"excalidraw","excalidraw.json":"excalidraw","excalidraw.png":"excalidraw","excalidraw.svg":"excalidraw",exe:"exe",exp:"console",exr:"image",exrc:"vim",exs:"elixir",eyaml:"yaml",eyml:"yaml",f:"fortran",f03:"fortran",f08:"fortran",f3d:"3d",f77:"fortran",f90:"fortran",f95:"fortran",far:"zip",fast:"lisp",fat:"zip",fbx:"3d",fdb:"database",feather:"database",feature:"cucumber",features:"cucumber",fen:"chess",fff:"image",fhtml:"velocity",fig:"figma",fish:"console",flac:"audio",flp:"audio",flv:"video",fnt:"font",font:"font",fonts:"font",fpx:"image",frag:"shader","frag.glsl":"shader","fragment.glsl":"shader",fragmentshader:"shader","freezed.dart":"dart_generated",frm:"database",frt:"forth",fs:"fsharp","fs.glsl":"shader",fsi:"fsharp",fsproj:"fsharp",fsscript:"fsharp",fsx:"fsharp",fth:"forth",ftl:"freemarker",fun:"sml",fx:"shader",fxh:"shader",fxml:"xml",fxp:"foxpro","g.dart":"dart_generated",g4:"antlr","garden.yaml":"garden","garden.yml":"garden",gbr:"image",gd:"godot",gdb:"database",gdextension:"godot-assets",gdnlib:"godot-assets",gdns:"godot-assets",gdshader:"godot-assets",gdshaderinc:"godot-assets",gemini:"gemini",gemspec:"ruby",geojson:"json",geom:"shader","geom.glsl":"shader","geom.hlsl":"shader","geometry.glsl":"shader","geometry.hlsl":"shader",geometryshader:"shader",gif:"image",gifv:"video","gitlab-ci.yml":"gitlab",glb:"3d",gleam:"gleam",glsl:"shader",gltf:"3d",gmi:"gemini",gml:"gamemaker",gnu:"gnuplot",go:"go",godot:"godot-assets",gp:"audio",gpg:"key",gpl:"palette",gpr:"image",gql:"graphql",gr:"grain",gradle:"gradle",graphcool:"graphcool",graphql:"graphql",grm:"sml",groovy:"groovy",gs:"apps-script","gs.glsl":"shader",gsm:"audio",gvimrc:"vim",gvy:"groovy",gyp:"python",gypi:"python",gz:"zip",gzip:"zip",h:"h","h++":"hpp","h.in":"cpp",haml:"haml",handlebars:"handlebars",har:"json",hbs:"handlebars",hcl:"hcl",hdd:"disc",heex:"elixir",heic:"image",heif:"image",hex:"hex",hfs:"zip",hh:"hpp",hip:"hip",hjs:"handlebars",hjson:"hjson",hlsl:"shader",hlsli:"shader","horusec-config.json":"horusec",hp:"hpp",hpp:"hpp","hpp.in":"cpp",hs:"haskell",htm:"html",html:"html","html.bubble":"dinophp",html_vm:"html",http:"http",huff:"huff",hurl:"hurl",hx:"haxe",hxx:"hpp",i:"c",iam:"3d",ibc:"idris",ibd:"database",iced:"coffee",icns:"image",ico:"image",ics:"email",idr:"idris",ige:"3d",iges:"3d",igs:"3d",ii:"cpp",iiq:"image",ilk:"dll",imba:"imba",img:"image",iml:"xml",inc:"assembly",ini:"settings","inky.php":"laravel",inl:"hpp",ino:"arduino",ins:"doctex-installer",ipa:"applescript",ipp:"cpp",ipt:"3d",ipy:"python",ipynb:"jupyter",isml:"xml",iso:"disc",it:"audio",iuml:"uml",ixx:"cpp",j2:"jinja",jade:"pug",jar:"jar",jav:"java",java:"java",jb2:"image",jbig2:"image",jenkins:"jenkins",jenkinsfile:"jenkins",jfif:"image",jinja:"jinja","jinja-html":"jinja",jinja2:"jinja",jl:"julia",jmx:"xml",jng:"image",jpeg:"image",jpg:"image",jrxml:"xml",js:"javascript","js.map":"javascript-map","js.snap":"test-js","jsconfig.json":"jsconfig",jshtm:"html",json:"json",json5:"json",jsonc:"json",jsonl:"json",jsonld:"json",jsp:"java",jst:"dotjs",jsx:"react","jsx.snap":"test-jsx",jt:"3d",jxl:"image",jxr:"image",k:"kcl",k25:"image",kdbx:"database",kdc:"image",key:"key",kl:"kl",kql:"kusto",kra:"image",ksh:"console",kt:"kotlin",kts:"kotlin",ktx:"image",ktx2:"image",kv:"kivy",lang:"i18n",latex:"tex",launch:"xml",lbx:"lbx",ldf:"database",lean:"lean",leex:"elixir",less:"less",lex:"sml",lha:"zip",lhs:"haskell",lib:"lib",liquid:"liquid",lisp:"lisp",litcoffee:"markdown",liz:"zip",lock:"lock",log:"log",lol:"lolcode",lottie:"lottie",lrc:"lyric",ls:"livescript",lsp:"lisp",ltx:"tex",lua:"lua",luau:"luau",lucee:"coldfusion",ly:"lilypond",lz:"zip",lz4:"zip",lz5:"zip",lzh:"zip",lzma:"zip",lzma2:"zip",m:"objective-c",m2:"macaulay2",m2v:"video",m3u:"audio",m3u8:"audio",m4a:"audio",m4b:"audio",m4p:"audio",m4r:"audio",m4v:"video",mak:"settings",manifest:"xml",markdn:"markdown",markdoc:"markdoc","markdoc.md":"markdoc",markdown:"markdown",marko:"markojs",mbox:"email",mca:"minecraft",mcaddon:"minecraft",mcfunction:"minecraft",mcgame:"minecraft",mclevel:"minecraft",mcmeta:"minecraft",mcpack:"minecraft",mcproject:"minecraft",mcr:"minecraft",mcstructure:"minecraft",mctemplate:"minecraft",mcworld:"minecraft",md:"markdown",mdb:"database",mdc:"image",mde:"database",mdf:"database",mdoc:"markdoc",mdown:"markdown",mdp:"image",mdtext:"markdown",mdtxt:"markdown",mdwn:"markdown",mdx:"mdx",mef:"image",menu:"xml",merlin:"merlin",mermaid:"mermaid",mesh:"3d",mi:"c",mid:"audio",mii:"cpp",mine:"minecraft",mint:"mint",mitigus:"assembly",mjml:"mjml",mjs:"javascript","mjs.map":"javascript-map",mk:"makefile",mka:"audio",mkd:"markdown",mkdn:"markdown",mkv:"video",ml:"ocaml",mlb:"sml",mli:"ocaml",mlton:"sml",mm:"objective-cpp",mmd:"mermaid",mmf:"audio",mo:"i18n",mod:"audio","module.js":"angular","module.ts":"angular",mojo:"mojo",moon:"moonscript",mos:"image",mov:"video",mp2:"video",mp3:"audio",mp4:"video",mpc:"audio",mpe:"video",mpeg:"video",mpg:"video",mpv:"video",mqo:"3d",mrf:"font",mrpack:"mrpack",mrw:"image",ms:"assembly",mscz:"audio",msg:"email",msi:"exe",mtm:"audio",mts:"typescript",mui:"audio",mus:"minecraft",mustache:"handlebars",musx:"audio",mxl:"audio",mxml:"mxml",myd:"database",myi:"database",nasm:"assembly",nb:"mathematica",ndf:"database",ndjson:"json","ndst.json":"ndst","ndst.yaml":"ndst","ndst.yml":"ndst",nef:"image",nf:"groovy","ng-template":"angular",nginx:"nginx",nginxconf:"nginx",nginxconfig:"nginx",nim:"nim",nimble:"nim",nix:"nix",njk:"nunjucks",npmrc:"settings",nrw:"image",nsa:"audio",ntf:"font",ntfs:"zip",nu:"console",nunjucks:"nunjucks",nupkg:"nuget",nuspec:"nuget",o:"3d",obj:"3d",obm:"image",odb:"database",odin:"odin",odp:"powerpoint",ods:"table",odt:"word",odttf:"font",oft:"email",ogg:"video",ogv:"video",olm:"email",onnx:"onnx",opam:"opam","openapi.json":"openapi","openapi.yaml":"openapi","openapi.yml":"openapi",opml:"xml",option:"settings",opus:"audio",ora:"image",orc:"database",orf:"image",ost:"email",otf:"font",otne:"otne",owl:"xml",p:"prolog",p7s:"email",pac:"javascript",pal:"palette",parquet:"database",pas:"pascal",passwd:"key",patch:"git",pbm:"image",pcss:"postcss",pdb:"database",pde:"processing",pdf:"pdf","pdm.lock":"pdm","pdm.toml":"pdm",pdn:"image",pef:"image",pem:"key",pgf:"image",pgm:"image",pgn:"chess",pgsql:"database",php:"php","php.bubble":"dinophp",php4:"php",php5:"php",phtml:"php",pic:"image",pine:"pinejs",pipeline:"pipeline","pixel.hlsl":"shader",pkb:"database",pkf:"audio",pkl:"pkl",pks:"database",pl:"prolog",plantuml:"uml",plist:"xml",plpgsql:"database",ply:"3d",pm:"perl",pmd:"3d",pmx:"3d",png:"image",pnm:"image",pnml:"coloredpetrinets",po:"i18n",pod:"perl",podspec:"ruby",postgres:"database",pot:"i18n",potm:"powerpoint",potx:"powerpoint",pp:"puppet",ppa:"powerpoint",ppam:"powerpoint",ppm:"image",pps:"powerpoint",ppsm:"powerpoint",ppsx:"powerpoint",ppt:"powerpoint",pptm:"powerpoint",pptx:"powerpoint",prefs:"settings",prg:"foxpro",prisma:"prisma",pro:"prolog",profile:"console",proj:"xml",project:"xml","prompt.md":"prompt","prompts.md":"prompt",prop:"settings",properties:"settings",props:"settings",proto:"proto",prt:"3d",prw:"advpl",prx:"advpl",ps1:"powershell",ps1xml:"powershell",psb:"adobe-photoshop",psc1:"powershell",psd:"adobe-photoshop",psd1:"powershell",psdt:"adobe-photoshop",psgi:"perl",psh:"shader",psm1:"powershell",psql:"database",psrc:"powershell",pssc:"powershell",pst:"email",psv:"table",pt:"pytorch",pth:"pytorch",ptx:"image",pu:"uml",pub:"key",publishsettings:"xml",pubxml:"xml","pubxml.user":"xml",pug:"pug",puml:"uml",pure:"purescript",purs:"purescript",pwf:"pytorch",pwn:"pawn","px.hlsl":"shader",pxn:"image",py:"python",pyc:"python-misc",pyi:"python",pyt:"python",pyw:"python",qcow:"disc",qcow2:"disc",qcp:"audio",qed:"disc",qmd:"quarto",qs:"qsharp",qt:"video","quokka.js":"quokka","quokka.jsx":"quokka","quokka.ts":"quokka","quokka.tsx":"quokka",r:"r",r3d:"image",ra:"audio",raf:"image",rahit:"shader","rahit.glsl":"shader",rake:"ruby",raku:"perl",raml:"raml",rar:"zip",raw:"image",razor:"razor",rb:"ruby",rbi:"ruby",rbs:"ruby",rbx:"ruby",rbxl:"roblox",rbxlx:"roblox",rbxm:"roblox","rbxmk.lua":"rbxmk","rbxmk.luau":"rbxmk",rbxmx:"roblox",rc:"rc",rcall:"shader","rcall.glsl":"shader",rchit:"shader","rchit.glsl":"shader",rdf:"xml",re:"reason",reb:"image",red:"red",reg:"regedit",rego:"opa",rei:"reason",rej:"diff",repo:"settings",res:"rescript",resi:"rescript-interface",rest:"http",restql:"restql",resx:"xml",rf64:"audio",rgen:"shader","rgen.glsl":"shader",rhistory:"r",rhtml:"html",rint:"shader","rint.glsl":"shader",riot:"riot",rip:"audio",rjs:"ruby",rkt:"racket",rm:"video",rmd:"r",rmiss:"shader","rmiss.glsl":"shader",rmvb:"video",rng:"xml",robot:"robot",ron:"rust",ronn:"markdown","route.js":"routing","route.jsx":"routing","route.ts":"routing","route.tsx":"routing","routes.js":"routing","routes.jsx":"routing","routes.ts":"routing","routes.tsx":"routing","routing.js":"routing","routing.jsx":"routing","routing.ts":"routing","routing.tsx":"routing",rpm:"zip",rpmsg:"email",rprofile:"r",rpy:"python",rql:"restql",rs:"rust",rss:"xml",rst:"markdown",rt:"r",rtf:"word",ru:"ruby",ruleset:"visualstudio",rw2:"image",rwl:"image",rwz:"image",s:"assembly",sab:"3d",sai:"image",san:"san",sas:"sas",sas7bdat:"sas",sashdat:"sas",sass:"sass",sast:"sas",sat:"3d",sbt:"sbt",sbv:"subtitles",sc:"scala",scala:"scala","schema.json":"json_schema",scm:"scheme",scss:"sass",sdf:"database",sdt:"audio",secret:"key",sesx:"audio",settings:"settings",sf2:"audio",sh:"console",sha256:"key",sha256sum:"key",sha256sums:"key",shader:"shader",shasum:"key",shproj:"xml",shtml:"html",sig:"sml","sigstore.json":"verified",sketch:"sketch","skill.md":"skill","skills.md":"skill",skp:"3d",slang:"shader",sldasm:"3d",slddrw:"3d",sldprt:"3d",slim:"slim",slint:"slint",sln:"visualstudio","sln.dotsettings":"settings","sln.dotsettings.user":"settings",slnf:"visualstudio",slnx:"visualstudio",sls:"salt",slx:"simulink",smali:"android",smb:"3d",smk:"snakemake",sml:"sml",smt:"3d",snakemake:"snakemake",so:"dll",sol:"solidity","spec-d.ts":"test-ts","spec-d.tsx":"test-jsx","spec.cjs":"test-js","spec.cts":"test-ts","spec.js":"test-js","spec.jsx":"test-jsx","spec.mjs":"test-js","spec.mts":"test-ts","spec.ts":"test-ts","spec.tsx":"test-jsx",spv:"shader",spwn:"spwn",sql:"database",sqlite:"database",sqlite3:"database",squashfs:"zip",sr2:"image",srf:"image",srt:"subtitles",srw:"image",ss:"scheme",ssa:"subtitles",sss:"postcss","st.css":"stylable",stan:"stan",stap:"audio",ste:"3d","steadybit.yaml":"steadybit","steadybit.yml":"steadybit",step:"3d",stl:"3d","stories.js":"storybook","stories.jsx":"storybook","stories.mdx":"storybook","stories.svelte":"storybook","stories.ts":"storybook","stories.tsx":"storybook","stories.vue":"storybook","story.js":"storybook","story.jsx":"storybook","story.mdx":"storybook","story.ts":"storybook","story.tsx":"storybook",storyboard:"xml",stp:"3d",styl:"stylus",sub:"subtitles","sublime-project":"sublime","sublime-workspace":"sublime",sui:"font",suit:"font",suo:"visualstudio",sv:"verilog",svelte:"svelte",svg:"svg",svh:"verilog",svx:"mdsvex",sw:"sway","swagger.json":"swagger","swagger.yaml":"swagger","swagger.yml":"swagger",swc:"adobe-swc",swcrc:"swc",swf:"flash",swift:"swift",swiftdeps:"swift",swiftdoc:"swift",swiftmodule:"swift",swiftsourceinfo:"swift",swm:"zip",sy:"siyuan",synctex:"tex","synctex.gz":"tex",t:"perl",tag:"riot",tar:"zip",targets:"xml","taskfile.yaml":"taskfile","taskfile.yml":"taskfile",tauri:"tauri",taz:"zip",tbz:"zip",tbz2:"zip",tcc:"hpp",tcl:"tcl",tcsh:"console",tcshrc:"console",templ:"templ",template:"template",terraformignore:"terraform",tesc:"shader","tesc.glsl":"shader",tese:"shader","tese.glsl":"shader","tess.hlsl":"shader","tessellation.hlsl":"shader","test-d.ts":"test-ts","test-d.tsx":"test-jsx","test.cjs":"test-js","test.cts":"test-ts","test.js":"test-js","test.jsx":"test-jsx","test.mjs":"test-js","test.mts":"test-ts","test.ts":"test-ts","test.tsx":"test-jsx",tex:"tex",tf:"terraform","tf.json":"terraform",tfbackend:"terraform",tfstate:"terraform",tfvars:"terraform",tg:"audio",tga:"image",tgz:"zip",tif:"image",tiff:"image",tikz:"tex",tl:"teal",tld:"xml",tldr:"tldraw",tlz:"zip",tmlanguage:"xml",tmx:"xml",tnef:"email",tobi:"tobi",toc:"toc",todo:"todo",tofu:"opentofu",toml:"toml","tool-versions":"settings",toon:"toon",tpl:"smarty",tpp:"cpp",tpz:"zip",tree:"tree",tres:"godot-assets",ts:"typescript","ts.glsl":"shader","ts.map":"json","ts.snap":"test-ts",tsbuildinfo:"json",tscn:"godot-assets","tsconfig.json":"tsconfig",tsv:"table",tsx:"react_ts","tsx.snap":"test-jsx",ttc:"font",ttf:"font",ttml:"subtitles",tw:"twine",twee:"twine",twig:"twig",txt:"document",txx:"cpp",txz:"zip",typ:"typst",tz:"zip",tzst:"zip",tzstd:"zip",ua:"uiua",unity:"unity",unitypackage:"unity",url:"url",usd:"3d",usdz:"3d",use:"sml",v:"vlang",vac:"3d",vagrantfile:"vagrant",vala:"vala",vb:"visualstudio",vba:"visualstudio",vbhtml:"razor",vbox:"virtual","vbox-prev":"virtual",vbproj:"xml","vbproj.user":"xml",vbs:"visualstudio",vcl:"varnish",vcxitems:"visualstudio","vcxitems.filters":"visualstudio",vcxproj:"visualstudio","vcxproj.filters":"visualstudio",vdi:"virtual",vdp:"3d",ved:"vedic",veda:"vedic",vedic:"vedic",verse:"verse",vert:"shader","vert.glsl":"shader","vertex.glsl":"shader",vertexshader:"shader",vfl:"vfl",vhd:"verilog",vhdl:"verilog",vhdx:"verilog",vim:"vim",viminfo:"vim",vimrc:"vim",vm:"velocity",vmdk:"disc",vob:"video",voc:"audio",volt:"html",vox:"3d",vqf:"audio","vs.glsl":"shader",vscodeignore:"vscode",vsh:"shader",vsix:"vscode",vsixmanifest:"vscode",vtl:"velocity",vtt:"subtitles",vue:"vue",wasm:"webassembly",wat:"webassembly",wav:"audio",weba:"audio",webm:"video",webmanifest:"json",webp:"image",wfp:"audio",wgsl:"shader",whl:"python-misc",wim:"zip",windi:"windicss",winget:"yaml",wire:"3d",wixproj:"visualstudio",wl:"wolframlanguage",wls:"wolframlanguage",wma:"audio",wmv:"video",woff:"font",woff2:"font",workbook:"markdown",wpl:"audio",wproj:"audio",wpy:"wepy",wrap:"meson",wrl:"3d",wsd:"uml",wsdl:"xml",wv:"audio",wxi:"xml",wxl:"xml",wxs:"xml",x3f:"image",x_b:"3d",x_t:"3d",xaml:"xaml",xar:"zip",xbl:"xml",xcf:"image",xcplayground:"swift",xht:"html",xhtml:"html",xib:"xml",xlf:"i18n",xliff:"xml",xls:"table",xlsm:"table",xlsx:"table",xml:"xml","xml.dist":"xml","xml.dist.sample":"xml",xmp:"xml",xoml:"xml",xpdl:"xml",xprofile:"console",xquery:"xml",xsd:"xml",xsession:"console",xsessionrc:"console",xsh:"console",xsl:"xml",xslt:"xml",xul:"xml",xz:"zip",yaml:"yaml","yaml-tmlanguage":"yaml","yaml-tmpreferences":"yaml","yaml-tmtheme":"yaml","yaml.dist":"yaml",yang:"yang",yash_profile:"console",yashrc:"console",yml:"yaml","yml.dist":"yaml",yuv:"video",yy:"gamemaker",yyp:"gamemaker",yyz:"gamemaker",z:"zip",zeabur:"zeabur",zig:"zig",zip:"zip",zlogin:"console",zlogout:"console",zon:"zig",zprofile:"console",zsh:"console","zsh-theme":"console",zshenv:"console",zshrc:"console",zst:"zip",zstd:"zip",ц:"tsil","🔥":"mojo"},v3={"-@types":"folder-typescript","-addin":"folder-plugin","-addins":"folder-plugin","-addon":"folder-plugin","-addons":"folder-plugin","-admin":"folder-admin","-admins":"folder-admin","-agent":"folder-robot","-agents":"folder-robot","-android":"folder-android","-angular":"folder-angular","-anim":"folder-animation","-animated":"folder-animation","-animation":"folder-animation","-animations":"folder-animation","-anims":"folder-animation","-ansible":"folder-ansible","-api":"folder-api","-apis":"folder-api","-apollo":"folder-apollo","-apollo-cache":"folder-apollo","-apollo-client":"folder-apollo","-apollo-config":"folder-apollo","-app":"folder-app","-apple":"folder-macos","-application":"folder-app","-applications":"folder-app","-apps":"folder-app","-appwrite":"folder-appwrite","-arc":"folder-archive","-archival":"folder-archive","-archive":"folder-archive","-archives":"folder-archive","-arcs":"folder-archive","-article":"folder-docs","-articles":"folder-docs","-asm":"folder-assembly","-assembly":"folder-assembly","-asset":"folder-resource","-assets":"folder-resource","-astro":"folder-astro","-atom":"folder-atom","-atoms":"folder-atom","-attachment":"folder-attachment","-attachments":"folder-attachment","-aud":"folder-audio","-audio":"folder-audio","-audios":"folder-audio","-auds":"folder-audio","-aurelia_project":"folder-aurelia","-auth":"folder-secure","-authentication":"folder-secure","-auto":"folder-generator","-aws":"folder-aws","-azure":"folder-aws","-azure-pipelines":"folder-azure-pipelines","-azure-pipelines-ci":"folder-azure-pipelines","-back-up":"folder-backup","-back-ups":"folder-backup","-backend":"folder-server","-backends":"folder-server","-backup":"folder-backup","-backups":"folder-backup","-bak":"folder-backup","-baks":"folder-backup","-base":"folder-base","-bases":"folder-base","-batch":"folder-batch","-batches":"folder-batch","-batchs":"folder-batch","-bench":"folder-benchmark","-benches":"folder-benchmark","-benchmark":"folder-benchmark","-benchmarks":"folder-benchmark","-bibliographies":"folder-bibliography","-bibliography":"folder-bibliography","-bicep":"folder-bicep","-bin":"folder-dist","-bkp":"folder-backup","-bkps":"folder-backup","-blender":"folder-blender","-blender-assets":"folder-blender","-blender-files":"folder-blender","-blender-models":"folder-blender","-blender-project":"folder-blender","-bloc":"folder-bloc","-blocs":"folder-bloc","-blog":"folder-docs","-book":"folder-bibliography","-books":"folder-bibliography","-bot":"folder-robot","-bots":"folder-robot","-bower_components":"folder-bower","-browser":"folder-public","-browsers":"folder-public","-build":"folder-dist","-buildkite":"folder-buildkite","-builds":"folder-dist","-built":"folder-dist","-bull":"folder-queue","-cache":"folder-temp","-cached":"folder-temp","-calc":"folder-functions","-calcs":"folder-functions","-calculation":"folder-functions","-calculations":"folder-functions","-cargo":"folder-rust","-cart":"folder-cart","-centos":"folder-linux","-cert":"folder-secure","-certificate":"folder-secure","-certificates":"folder-secure","-certs":"folder-secure","-cfg":"folder-config","-cfgs":"folder-config","-cfn-gen":"folder-generator","-changes":"folder-delta","-changeset":"folder-changesets","-changesets":"folder-changesets","-chat":"folder-messages","-chats":"folder-messages","-ci":"folder-ci","-cipher":"folder-secure","-circleci":"folder-circleci","-cjs":"folder-javascript","-class":"folder-class","-classes":"folder-class","-claude":"folder-claude","-cli":"folder-command","-client":"folder-client","-clients":"folder-client","-cline_docs":"folder-cline","-clis":"folder-command","-cloud-firestore":"folder-firestore","-cloud-functions":"folder-cloud-functions","-cloudflare":"folder-cloudflare","-cloudfunctions":"folder-cloud-functions","-cluster":"folder-cluster","-clusters":"folder-cluster","-cmd":"folder-command","-cobol":"folder-cobol","-code":"folder-src","-color":"folder-theme","-colors":"folder-theme","-colour":"folder-theme","-colours":"folder-theme","-command":"folder-command","-commandline":"folder-command","-commands":"folder-command","-common":"folder-shared","-compiled":"folder-dist","-components":"folder-components","-composable":"folder-functions","-composables":"folder-functions","-concept":"folder-mock","-concepts":"folder-mock","-conf":"folder-config","-config":"folder-config","-configs":"folder-config","-configuration":"folder-config","-configurations":"folder-config","-confs":"folder-config","-connection":"folder-connection","-connections":"folder-connection","-console":"folder-console","-const":"folder-constant","-constant":"folder-constant","-constants":"folder-constant","-consts":"folder-constant","-container":"folder-container","-containers":"folder-container","-content":"folder-content","-contents":"folder-content","-context":"folder-context","-contexts":"folder-context","-contract":"folder-contract","-contract-test":"folder-contract","-contract-testing":"folder-contract","-contract-tests":"folder-contract","-contracts":"folder-contract","-controller":"folder-controller","-controllers":"folder-controller","-controls":"folder-controller","-conversation":"folder-messages","-conversations":"folder-messages","-core":"folder-core","-coverage":"folder-coverage","-crash":"folder-error","-crashes":"folder-error","-crates":"folder-lib","-css":"folder-css","-cts":"folder-typescript","-cubit":"folder-bloc","-cubits":"folder-bloc","-cue":"folder-cue","-cues":"folder-cue","-cursor":"folder-cursor","-custom":"folder-custom","-customs":"folder-custom","-cypher":"folder-secure","-cypress":"folder-cypress","-dal":"folder-dal","-dart":"folder-dart","-dart_tool":"folder-dart","-dart_tools":"folder-dart","-data":"folder-database","-data-access":"folder-dal","-data-access-layer":"folder-dal","-database":"folder-database","-databases":"folder-database","-db":"folder-database","-deb":"folder-linux","-debian":"folder-linux","-debug":"folder-debug","-debugger":"folder-debug","-debugging":"folder-debug","-decorator":"folder-decorators","-decorators":"folder-decorators","-deepin":"folder-linux","-delta":"folder-delta","-deltas":"folder-delta","-demo":"folder-examples","-demos":"folder-examples","-dependencies":"folder-packages","-design":"folder-theme","-designs":"folder-theme","-desktop":"folder-desktop","-devcontainer":"folder-container","-devpackages":"folder-packages","-devtools":"folder-tools","-dialog":"folder-messages","-dialogs":"folder-messages","-diary":"folder-docs","-directive":"folder-directive","-directives":"folder-directive","-display":"folder-desktop","-dist":"folder-dist","-distribution":"folder-dist","-doc":"folder-docs","-docker":"folder-docker","-dockerfiles":"folder-docker","-dockerhub":"folder-docker","-docs":"folder-docs","-document":"folder-docs","-documentation":"folder-docs","-documents":"folder-docs","-download":"folder-download","-downloader":"folder-download","-downloaders":"folder-download","-downloads":"folder-download","-draft":"folder-mock","-drafts":"folder-mock","-drizzle":"folder-drizzle","-ds_store":"folder-macos","-dump":"folder-dump","-dumps":"folder-dump","-e2e":"folder-coverage","-easing":"folder-animation","-easings":"folder-animation","-element":"folder-element","-elements":"folder-element","-email":"folder-mail","-emails":"folder-mail","-enum":"folder-enum","-enums":"folder-enum","-env":"folder-environment","-environment":"folder-environment","-environments":"folder-environment","-envs":"folder-environment","-err":"folder-error","-error":"folder-error","-errors":"folder-error","-errs":"folder-error","-eslint":"folder-eslint","-eslint-config":"folder-eslint","-eslint-configs":"folder-eslint","-eslint-plugin":"folder-eslint","-eslint-plugins":"folder-eslint","-etc":"folder-other","-event":"folder-event","-events":"folder-event","-example":"folder-examples","-examples":"folder-examples","-expo":"folder-expo","-expo-shared":"folder-expo","-export":"folder-export","-exported":"folder-export","-exports":"folder-export","-extension":"folder-plugin","-extensions":"folder-plugin","-external":"folder-lib","-externals":"folder-lib","-extra":"folder-other","-extras":"folder-other","-fastlane":"folder-fastlane","-favicon":"folder-favicon","-favicons":"folder-favicon","-feat":"folder-features","-feats":"folder-features","-feature":"folder-features","-features":"folder-features","-fig":"folder-images","-figs":"folder-images","-figure":"folder-images","-figures":"folder-images","-filter":"folder-filter","-filters":"folder-filter","-firebase":"folder-firebase","-firebase-cloud-functions":"folder-cloud-functions","-firebase-cloudfunctions":"folder-cloud-functions","-firebase-firestore":"folder-firestore","-firestore":"folder-firestore","-fixture":"folder-mock","-fixtures":"folder-mock","-flow-typed":"folder-flow","-flutter":"folder-flutter","-font":"folder-font","-fonts":"folder-font","-forgejo":"folder-forgejo","-form":"folder-form","-forms":"folder-form","-forum":"folder-messages","-fragments":"folder-components","-frontend":"folder-client","-frontends":"folder-client","-func":"folder-functions","-funcs":"folder-functions","-function":"folder-functions","-functions":"folder-functions","-game":"folder-console","-gamemaker":"folder-gamemaker","-gamemaker2":"folder-gamemaker","-games":"folder-console","-gcp":"folder-aws","-gemini":"folder-gemini-ai","-gemini-ai":"folder-gemini-ai","-geminiai":"folder-gemini-ai","-gen":"folder-generator","-generated":"folder-generator","-generator":"folder-generator","-generators":"folder-generator","-gens":"folder-generator","-git":"folder-git","-gitea":"folder-gitea","-githooks":"folder-git","-github":"folder-github","-github/issue_template":"folder-template","-github/pull_request_template":"folder-template","-github/workflows":"folder-gh-workflows","-gitlab":"folder-gitlab","-global":"folder-global","-glsl":"folder-shader","-go":"folder-go","-godot":"folder-godot","-godot-cpp":"folder-godot","-golang":"folder-go","-gql":"folder-graphql","-gradle":"folder-gradle","-graphql":"folder-graphql","-guard":"folder-guard","-guards":"folder-guard","-gui":"folder-ui","-gulp":"folder-gulp","-gulp-tasks":"folder-gulp","-gulpfile.babel.js":"folder-gulp","-gulpfile.js":"folder-gulp","-gulpfile.mjs":"folder-gulp","-gulpfile.ts":"folder-gulp","-gulpfiles":"folder-gulp","-handler":"folder-controller","-handlers":"folder-controller","-helm":"folder-helm","-helmchart":"folder-helm","-helmcharts":"folder-helm","-helper":"folder-helper","-helpers":"folder-helper","-hg":"folder-mercurial","-hgext":"folder-mercurial","-hghooks":"folder-mercurial","-histories":"folder-backup","-history":"folder-backup","-hlsl":"folder-shader","-home":"folder-home","-hook":"folder-hook","-hooks":"folder-hook","-html":"folder-views","-husky":"folder-husky","-i18n":"folder-i18n","-ico":"folder-images","-icon":"folder-images","-icons":"folder-images","-icos":"folder-images","-idea":"folder-intellij","-image":"folder-images","-images":"folder-images","-img":"folder-images","-imgs":"folder-images","-import":"folder-import","-imported":"folder-import","-imports":"folder-import","-in":"folder-input","-inc":"folder-include","-inc64":"folder-include","-include":"folder-include","-includes":"folder-include","-infra":"folder-server","-infrastructure":"folder-server","-input":"folder-input","-inputs":"folder-input","-integration":"folder-connection","-integration-test":"folder-coverage","-integration-tests":"folder-coverage","-integrations":"folder-connection","-interceptor":"folder-interceptor","-interceptors":"folder-interceptor","-interface":"folder-interface","-interfaces":"folder-interface","-internationalization":"folder-i18n","-inventories":"folder-server","-inventory":"folder-server","-io":"folder-input","-ios":"folder-ios","-ipad":"folder-macos","-iphone":"folder-macos","-ipod":"folder-macos","-ipynb":"folder-jupyter","-it":"folder-coverage","-j2":"folder-jinja","-java":"folder-java","-javascript":"folder-javascript","-javascripts":"folder-javascript","-jinja":"folder-jinja","-jinja2":"folder-jinja","-job":"folder-job","-jobs":"folder-job","-js":"folder-javascript","-json":"folder-json","-jsonc":"folder-json","-jsonl":"folder-json","-jsons":"folder-json","-jupyter":"folder-jupyter","-jwt":"folder-keys","-k8s":"folder-kubernetes","-key":"folder-keys","-keys":"folder-keys","-kit":"folder-tools","-kits":"folder-tools","-knowledge":"folder-docs","-kotlin":"folder-kotlin","-kql":"folder-kusto","-kubernetes":"folder-kubernetes","-kusto":"folder-kusto","-l10n":"folder-i18n","-lambda":"folder-functions","-lambdas":"folder-functions","-landing":"folder-home","-lang":"folder-i18n","-langs":"folder-i18n","-language":"folder-i18n","-languages":"folder-i18n","-layout":"folder-layout","-layouts":"folder-layout","-lefthook":"folder-lefthook","-lefthook-local":"folder-lefthook","-less":"folder-less","-lib":"folder-lib","-lib64":"folder-lib","-libraries":"folder-lib","-library":"folder-lib","-libs":"folder-lib","-license":"folder-license","-licenses":"folder-license","-link":"folder-link","-links":"folder-link","-linux":"folder-linux","-linuxbsd":"folder-linux","-liquibase":"folder-liquibase","-locale":"folder-i18n","-locales":"folder-i18n","-localization":"folder-i18n","-log":"folder-log","-logging":"folder-log","-logic":"folder-functions","-logs":"folder-log","-lottie":"folder-lottie","-lottiefiles":"folder-lottie","-lotties":"folder-lottie","-lua":"folder-lua","-luau":"folder-luau","-mac":"folder-macos","-macbook":"folder-macos","-macbook-air":"folder-macos","-macos":"folder-macos","-macosx":"folder-macos","-mail":"folder-mail","-mailers":"folder-mail","-mails":"folder-mail","-main":"folder-home","-manager":"folder-admin","-managers":"folder-admin","-mapping":"folder-mappings","-mappings":"folder-mappings","-markdown":"folder-markdown","-math":"folder-functions","-maths":"folder-functions","-md":"folder-markdown","-measure":"folder-benchmark","-measurement":"folder-benchmark","-measures":"folder-benchmark","-media":"folder-video","-messages":"folder-messages","-messaging":"folder-messages","-meta":"folder-meta","-meta-inf":"folder-config","-metadata":"folder-meta","-metro":"folder-metro","-middleware":"folder-middleware","-middlewares":"folder-middleware","-migration":"folder-migrations","-migrations":"folder-migrations","-mint":"folder-linux","-misc":"folder-other","-miscellaneous":"folder-other","-mjml":"folder-mjml","-mjs":"folder-javascript","-mobile":"folder-mobile","-mobiles":"folder-mobile","-mock":"folder-mock","-mocks":"folder-mock","-mod":"folder-plugin","-modding":"folder-plugin","-model":"folder-class","-models":"folder-class","-moderator":"folder-admin","-moderators":"folder-admin","-mods":"folder-plugin","-module":"folder-plugin","-modules":"folder-plugin","-mojo":"folder-mojo","-molecule":"folder-molecule","-molecules":"folder-molecule","-moon":"folder-moon","-motion":"folder-animation","-motions":"folder-animation","-movie":"folder-video","-movies":"folder-video","-mq":"folder-queue","-mts":"folder-typescript","-music":"folder-audio","-navigation":"folder-routes","-navigations":"folder-routes","-netlify":"folder-netlify","-news":"folder-docs","-next":"folder-next","-nginx":"folder-nginx","-node":"folder-node","-node_modules":"folder-node","-nodejs":"folder-node","-note":"folder-docs","-notebook":"folder-jupyter","-notebooks":"folder-jupyter","-notes":"folder-docs","-now":"folder-vercel","-nuxt":"folder-nuxt","-nyc-output":"folder-coverage","-nyc_output":"folder-coverage","-obsidian":"folder-obsidian","-opencode":"folder-opencode","-option":"folder-config","-options":"folder-config","-organism":"folder-organism","-organisms":"folder-organism","-osx":"folder-macos","-other":"folder-other","-others":"folder-other","-out":"folder-dist","-output":"folder-dist","-outputs":"folder-dist","-package":"folder-packages","-packages":"folder-packages","-pact":"folder-contract","-pacts":"folder-contract","-page":"folder-views","-pages":"folder-views","-palette":"folder-theme","-palettes":"folder-theme","-partial":"folder-include","-partials":"folder-include","-patches":"folder-git","-pdf":"folder-pdf","-pdfs":"folder-pdf","-pdm-build":"folder-pdm","-pdm-plugins":"folder-pdm","-perf":"folder-benchmark","-performance":"folder-benchmark","-phone":"folder-mobile","-phones":"folder-mobile","-photo":"folder-images","-photograph":"folder-images","-photographs":"folder-images","-photos":"folder-images","-php":"folder-php","-phpmailer":"folder-phpmailer","-pic":"folder-images","-pics":"folder-images","-picture":"folder-images","-pictures":"folder-images","-pipe":"folder-pipe","-pipeline":"folder-pipe","-pipelines":"folder-pipe","-pipes":"folder-pipe","-pkg":"folder-packages","-pkgs":"folder-packages","-plastic":"folder-plastic","-playground":"folder-sandbox","-playgrounds":"folder-sandbox","-playlist":"folder-audio","-playlists":"folder-audio","-plugin":"folder-plugin","-plugins":"folder-plugin","-policies":"folder-policy","-policy":"folder-policy","-popos":"folder-linux","-portability":"folder-mobile","-portable":"folder-mobile","-post":"folder-docs","-postman":"folder-postman","-posts":"folder-docs","-powershell":"folder-powershell","-pref":"folder-config","-preference":"folder-config","-preferences":"folder-config","-prefs":"folder-config","-presentation":"folder-ui","-preview":"folder-review","-previews":"folder-review","-prisma":"folder-prisma","-prisma/schema":"folder-prisma","-private":"folder-private","-profiling":"folder-benchmark","-proj":"folder-project","-project":"folder-project","-projects":"folder-project","-projs":"folder-project","-prompt":"folder-prompts","-prompts":"folder-prompts","-properties":"folder-config","-props":"folder-config","-proto":"folder-proto","-protobuf":"folder-proto","-protobufs":"folder-proto","-protos":"folder-proto","-provider":"folder-controller","-providers":"folder-controller","-proxy":"folder-public","-ps":"folder-powershell","-ps1":"folder-powershell","-ps4":"folder-console","-ps5":"folder-console","-public":"folder-public","-public_html":"folder-views","-pwa":"folder-client","-pycache":"folder-python","-pytest_cache":"folder-python","-python":"folder-python","-pytorch":"folder-pytorch","-quasar":"folder-quasar","-queue":"folder-queue","-queues":"folder-queue","-r":"folder-r","-recordings":"folder-audio","-release":"folder-dist","-remote":"folder-connection","-remotes":"folder-connection","-repo":"folder-repository","-report":"folder-resource","-reports":"folder-resource","-repos":"folder-repository","-repositories":"folder-repository","-repository":"folder-repository","-res":"folder-resource","-resolver":"folder-resolver","-resolvers":"folder-resolver","-resource":"folder-resource","-resources":"folder-resource","-restapi":"folder-api","-review":"folder-review","-reviewed":"folder-review","-reviews":"folder-review","-revisal":"folder-review","-revisals":"folder-review","-robot":"folder-robot","-robots":"folder-robot","-router":"folder-routes","-routers":"folder-routes","-routes":"folder-routes","-routing":"folder-routes","-rule":"folder-rules","-rules":"folder-rules","-rust":"folder-rust","-salt":"folder-salt","-saltstack":"folder-salt","-sample":"folder-examples","-sample-data":"folder-examples","-samples":"folder-examples","-sandbox":"folder-sandbox","-sandboxes":"folder-sandbox","-sass":"folder-sass","-scala":"folder-scala","-schema":"folder-class","-schemas":"folder-class","-sconf_temp":"folder-scons","-scons":"folder-scons","-scons_cache":"folder-scons","-screen":"folder-views","-screengrab":"folder-images","-screengrabs":"folder-images","-screens":"folder-views","-screenshot":"folder-images","-screenshots":"folder-images","-script":"folder-scripts","-scripting":"folder-scripts","-scripts":"folder-scripts","-scss":"folder-sass","-secret":"folder-keys","-secrets":"folder-keys","-secure":"folder-secure","-security":"folder-secure","-seed":"folder-seeders","-seeders":"folder-seeders","-seeding":"folder-seeders","-seeds":"folder-seeders","-server":"folder-server","-serverless":"folder-serverless","-serverpackages":"folder-packages","-servers":"folder-server","-service":"folder-controller","-services":"folder-controller","-setting":"folder-config","-settings":"folder-config","-shader":"folder-shader","-shaders":"folder-shader","-shared":"folder-shared","-shop":"folder-cart","-shopping":"folder-cart","-shopping-cart":"folder-cart","-sim":"folder-simulations","-sims":"folder-simulations","-simulation":"folder-simulations","-simulations":"folder-simulations","-site":"folder-public","-sketch":"folder-mock","-sketches":"folder-mock","-skill":"folder-skills","-skills":"folder-skills","-smtp":"folder-mail","-snap":"folder-snapcraft","-snapcraft":"folder-snapcraft","-snapshots":"folder-test","-snippet":"folder-snippet","-snippets":"folder-snippet","-song":"folder-audio","-songs":"folder-audio","-sound":"folder-audio","-sounds":"folder-audio","-source":"folder-src","-sources":"folder-src","-spa":"folder-client","-spec":"folder-test","-specs":"folder-test","-spellcheck":"folder-syntax","-spellcheckers":"folder-syntax","-sql":"folder-database","-src":"folder-src","-src-tauri":"folder-src-tauri","-srcs":"folder-src","-ssl":"folder-secure","-stack":"folder-stack","-stacks":"folder-stack","-start":"folder-home","-static":"folder-resource","-stencil":"folder-stencil","-store":"folder-store","-stores":"folder-store","-stories":"folder-storybook","-storybook":"folder-storybook","-style":"folder-css","-styles":"folder-css","-stylesheet":"folder-css","-stylesheets":"folder-css","-stylus":"folder-stylus","-sublime":"folder-sublime","-submodules":"folder-git","-supabase":"folder-supabase","-svelte":"folder-svelte","-svelte-kit":"folder-svelte","-svg":"folder-svg","-svgs":"folder-svg","-switch":"folder-console","-syntax":"folder-syntax","-syntaxes":"folder-syntax","-table-of-contents":"folder-toc","-target":"folder-target","-taskfile":"folder-taskfile","-taskfiles":"folder-taskfile","-tasks":"folder-tasks","-television":"folder-television","-temp":"folder-temp","-template":"folder-template","-templates":"folder-template","-terraform":"folder-terraform","-test":"folder-test","-testfiles":"folder-test","-testing":"folder-test","-tests":"folder-test","-texture":"folder-images","-textures":"folder-images","-theme":"folder-theme","-themes":"folder-theme","-third-party":"folder-lib","-thirdparty":"folder-lib","-tickets":"folder-tasks","-tls":"folder-secure","-tmp":"folder-temp","-toc":"folder-toc","-token":"folder-keys","-tokens":"folder-keys","-toolbox":"folder-tools","-toolboxes":"folder-tools","-tooling":"folder-tools","-toolkit":"folder-tools","-toolkits":"folder-tools","-tools":"folder-tools","-torch":"folder-pytorch","-transition":"folder-animation","-transitions":"folder-animation","-translate":"folder-i18n","-translation":"folder-i18n","-translations":"folder-i18n","-trash":"folder-trash","-trigger":"folder-trigger","-triggers":"folder-trigger","-ts":"folder-typescript","-turbo":"folder-turborepo","-tv":"folder-television","-tx":"folder-i18n","-typeface":"folder-font","-typefaces":"folder-font","-types":"folder-typescript","-typescript":"folder-typescript","-typings":"folder-typescript","-ubuntu":"folder-linux","-ui":"folder-ui","-unity":"folder-unity","-unix":"folder-linux","-update":"folder-update","-updates":"folder-update","-upgrade":"folder-update","-upgrades":"folder-update","-upload":"folder-upload","-uploads":"folder-upload","-util":"folder-utils","-utilities":"folder-utils","-utility":"folder-utils","-utils":"folder-utils","-ux":"folder-ui","-validation":"folder-rules","-validations":"folder-rules","-validator":"folder-rules","-validators":"folder-rules","-vector":"folder-svg","-vectors":"folder-svg","-vendor":"folder-lib","-vendors":"folder-lib","-venv":"folder-environment","-vercel":"folder-vercel","-verdaccio":"folder-verdaccio","-vid":"folder-video","-video":"folder-video","-videos":"folder-video","-vids":"folder-video","-view":"folder-views","-views":"folder-views","-vm":"folder-vm","-vms":"folder-vm","-voice":"folder-audio","-voices":"folder-audio","-vscode":"folder-vscode","-vscode-test":"folder-vscode","-vue":"folder-vue","-vuepress":"folder-vuepress","-wakatime":"folder-wakatime","-web":"folder-public","-webpack":"folder-webpack","-website":"folder-public","-websites":"folder-public","-widget":"folder-components","-widgets":"folder-components","-wiki":"folder-docs","-win":"folder-windows","-win10":"folder-windows","-win11":"folder-windows","-win32":"folder-windows","-windows":"folder-windows","-windows10":"folder-windows","-windows11":"folder-windows","-windowsnt":"folder-windows","-windowsxp":"folder-windows","-winnt":"folder-windows","-winxp":"folder-windows","-wordpress-org":"folder-wordpress","-wp-content":"folder-wordpress","-wsl":"folder-linux","-www":"folder-public","-wwwroot":"folder-public","-xbox":"folder-console","-xtask":"folder-scripts","-yarn":"folder-yarn","-zeabur":"folder-zeabur","-zed":"folder-zed",".@types":"folder-typescript",".addin":"folder-plugin",".addins":"folder-plugin",".addon":"folder-plugin",".addons":"folder-plugin",".admin":"folder-admin",".admins":"folder-admin",".agent":"folder-robot",".agents":"folder-robot",".android":"folder-android",".angular":"folder-angular",".anim":"folder-animation",".animated":"folder-animation",".animation":"folder-animation",".animations":"folder-animation",".anims":"folder-animation",".ansible":"folder-ansible",".api":"folder-api",".apis":"folder-api",".apollo":"folder-apollo",".apollo-cache":"folder-apollo",".apollo-client":"folder-apollo",".apollo-config":"folder-apollo",".app":"folder-app",".apple":"folder-macos",".application":"folder-app",".applications":"folder-app",".apps":"folder-app",".appwrite":"folder-appwrite",".arc":"folder-archive",".archival":"folder-archive",".archive":"folder-archive",".archives":"folder-archive",".arcs":"folder-archive",".article":"folder-docs",".articles":"folder-docs",".asm":"folder-assembly",".assembly":"folder-assembly",".asset":"folder-resource",".assets":"folder-resource",".astro":"folder-astro",".atom":"folder-atom",".atoms":"folder-atom",".attachment":"folder-attachment",".attachments":"folder-attachment",".aud":"folder-audio",".audio":"folder-audio",".audios":"folder-audio",".auds":"folder-audio",".aurelia_project":"folder-aurelia",".auth":"folder-secure",".authentication":"folder-secure",".auto":"folder-generator",".aws":"folder-aws",".azure":"folder-aws",".azure-pipelines":"folder-azure-pipelines",".azure-pipelines-ci":"folder-azure-pipelines",".back-up":"folder-backup",".back-ups":"folder-backup",".backend":"folder-server",".backends":"folder-server",".backup":"folder-backup",".backups":"folder-backup",".bak":"folder-backup",".baks":"folder-backup",".base":"folder-base",".bases":"folder-base",".batch":"folder-batch",".batches":"folder-batch",".batchs":"folder-batch",".bench":"folder-benchmark",".benches":"folder-benchmark",".benchmark":"folder-benchmark",".benchmarks":"folder-benchmark",".bibliographies":"folder-bibliography",".bibliography":"folder-bibliography",".bicep":"folder-bicep",".bin":"folder-dist",".bkp":"folder-backup",".bkps":"folder-backup",".blender":"folder-blender",".blender-assets":"folder-blender",".blender-files":"folder-blender",".blender-models":"folder-blender",".blender-project":"folder-blender",".bloc":"folder-bloc",".blocs":"folder-bloc",".blog":"folder-docs",".book":"folder-bibliography",".books":"folder-bibliography",".bot":"folder-robot",".bots":"folder-robot",".bower_components":"folder-bower",".browser":"folder-public",".browsers":"folder-public",".build":"folder-dist",".buildkite":"folder-buildkite",".builds":"folder-dist",".built":"folder-dist",".bull":"folder-queue",".cache":"folder-temp",".cached":"folder-temp",".calc":"folder-functions",".calcs":"folder-functions",".calculation":"folder-functions",".calculations":"folder-functions",".cargo":"folder-rust",".cart":"folder-cart",".centos":"folder-linux",".cert":"folder-secure",".certificate":"folder-secure",".certificates":"folder-secure",".certs":"folder-secure",".cfg":"folder-config",".cfgs":"folder-config",".cfn-gen":"folder-generator",".changes":"folder-delta",".changeset":"folder-changesets",".changesets":"folder-changesets",".chat":"folder-messages",".chats":"folder-messages",".ci":"folder-ci",".cipher":"folder-secure",".circleci":"folder-circleci",".cjs":"folder-javascript",".class":"folder-class",".classes":"folder-class",".claude":"folder-claude",".cli":"folder-command",".client":"folder-client",".clients":"folder-client",".cline_docs":"folder-cline",".clis":"folder-command",".cloud-firestore":"folder-firestore",".cloud-functions":"folder-cloud-functions",".cloudflare":"folder-cloudflare",".cloudfunctions":"folder-cloud-functions",".cluster":"folder-cluster",".clusters":"folder-cluster",".cmd":"folder-command",".cobol":"folder-cobol",".code":"folder-src",".color":"folder-theme",".colors":"folder-theme",".colour":"folder-theme",".colours":"folder-theme",".command":"folder-command",".commandline":"folder-command",".commands":"folder-command",".common":"folder-shared",".compiled":"folder-dist",".components":"folder-components",".composable":"folder-functions",".composables":"folder-functions",".concept":"folder-mock",".concepts":"folder-mock",".conf":"folder-config",".config":"folder-config",".configs":"folder-config",".configuration":"folder-config",".configurations":"folder-config",".confs":"folder-config",".connection":"folder-connection",".connections":"folder-connection",".console":"folder-console",".const":"folder-constant",".constant":"folder-constant",".constants":"folder-constant",".consts":"folder-constant",".container":"folder-container",".containers":"folder-container",".content":"folder-content",".contents":"folder-content",".context":"folder-context",".contexts":"folder-context",".contract":"folder-contract",".contract-test":"folder-contract",".contract-testing":"folder-contract",".contract-tests":"folder-contract",".contracts":"folder-contract",".controller":"folder-controller",".controllers":"folder-controller",".controls":"folder-controller",".conversation":"folder-messages",".conversations":"folder-messages",".core":"folder-core",".coverage":"folder-coverage",".crash":"folder-error",".crashes":"folder-error",".crates":"folder-lib",".css":"folder-css",".cts":"folder-typescript",".cubit":"folder-bloc",".cubits":"folder-bloc",".cue":"folder-cue",".cues":"folder-cue",".cursor":"folder-cursor",".custom":"folder-custom",".customs":"folder-custom",".cypher":"folder-secure",".cypress":"folder-cypress",".dal":"folder-dal",".dart":"folder-dart",".dart_tool":"folder-dart",".dart_tools":"folder-dart",".data":"folder-database",".data-access":"folder-dal",".data-access-layer":"folder-dal",".database":"folder-database",".databases":"folder-database",".db":"folder-database",".deb":"folder-linux",".debian":"folder-linux",".debug":"folder-debug",".debugger":"folder-debug",".debugging":"folder-debug",".decorator":"folder-decorators",".decorators":"folder-decorators",".deepin":"folder-linux",".delta":"folder-delta",".deltas":"folder-delta",".demo":"folder-examples",".demos":"folder-examples",".dependencies":"folder-packages",".design":"folder-theme",".designs":"folder-theme",".desktop":"folder-desktop",".devcontainer":"folder-container",".devpackages":"folder-packages",".devtools":"folder-tools",".dialog":"folder-messages",".dialogs":"folder-messages",".diary":"folder-docs",".directive":"folder-directive",".directives":"folder-directive",".display":"folder-desktop",".dist":"folder-dist",".distribution":"folder-dist",".doc":"folder-docs",".docker":"folder-docker",".dockerfiles":"folder-docker",".dockerhub":"folder-docker",".docs":"folder-docs",".document":"folder-docs",".documentation":"folder-docs",".documents":"folder-docs",".download":"folder-download",".downloader":"folder-download",".downloaders":"folder-download",".downloads":"folder-download",".draft":"folder-mock",".drafts":"folder-mock",".drizzle":"folder-drizzle",".ds_store":"folder-macos",".dump":"folder-dump",".dumps":"folder-dump",".e2e":"folder-coverage",".easing":"folder-animation",".easings":"folder-animation",".element":"folder-element",".elements":"folder-element",".email":"folder-mail",".emails":"folder-mail",".enum":"folder-enum",".enums":"folder-enum",".env":"folder-environment",".environment":"folder-environment",".environments":"folder-environment",".envs":"folder-environment",".err":"folder-error",".error":"folder-error",".errors":"folder-error",".errs":"folder-error",".eslint":"folder-eslint",".eslint-config":"folder-eslint",".eslint-configs":"folder-eslint",".eslint-plugin":"folder-eslint",".eslint-plugins":"folder-eslint",".etc":"folder-other",".event":"folder-event",".events":"folder-event",".example":"folder-examples",".examples":"folder-examples",".expo":"folder-expo",".expo-shared":"folder-expo",".export":"folder-export",".exported":"folder-export",".exports":"folder-export",".extension":"folder-plugin",".extensions":"folder-plugin",".external":"folder-lib",".externals":"folder-lib",".extra":"folder-other",".extras":"folder-other",".fastlane":"folder-fastlane",".favicon":"folder-favicon",".favicons":"folder-favicon",".feat":"folder-features",".feats":"folder-features",".feature":"folder-features",".features":"folder-features",".fig":"folder-images",".figs":"folder-images",".figure":"folder-images",".figures":"folder-images",".filter":"folder-filter",".filters":"folder-filter",".firebase":"folder-firebase",".firebase-cloud-functions":"folder-cloud-functions",".firebase-cloudfunctions":"folder-cloud-functions",".firebase-firestore":"folder-firestore",".firestore":"folder-firestore",".fixture":"folder-mock",".fixtures":"folder-mock",".flow-typed":"folder-flow",".flutter":"folder-flutter",".font":"folder-font",".fonts":"folder-font",".forgejo":"folder-forgejo",".form":"folder-form",".forms":"folder-form",".forum":"folder-messages",".fragments":"folder-components",".frontend":"folder-client",".frontends":"folder-client",".func":"folder-functions",".funcs":"folder-functions",".function":"folder-functions",".functions":"folder-functions",".game":"folder-console",".gamemaker":"folder-gamemaker",".gamemaker2":"folder-gamemaker",".games":"folder-console",".gcp":"folder-aws",".gemini":"folder-gemini-ai",".gemini-ai":"folder-gemini-ai",".geminiai":"folder-gemini-ai",".gen":"folder-generator",".generated":"folder-generator",".generator":"folder-generator",".generators":"folder-generator",".gens":"folder-generator",".git":"folder-git",".gitea":"folder-gitea",".githooks":"folder-git",".github":"folder-github",".github/issue_template":"folder-template",".github/pull_request_template":"folder-template",".github/workflows":"folder-gh-workflows",".gitlab":"folder-gitlab",".global":"folder-global",".glsl":"folder-shader",".go":"folder-go",".godot":"folder-godot",".godot-cpp":"folder-godot",".golang":"folder-go",".gql":"folder-graphql",".gradle":"folder-gradle",".graphql":"folder-graphql",".guard":"folder-guard",".guards":"folder-guard",".gui":"folder-ui",".gulp":"folder-gulp",".gulp-tasks":"folder-gulp",".gulpfile.babel.js":"folder-gulp",".gulpfile.js":"folder-gulp",".gulpfile.mjs":"folder-gulp",".gulpfile.ts":"folder-gulp",".gulpfiles":"folder-gulp",".handler":"folder-controller",".handlers":"folder-controller",".helm":"folder-helm",".helmchart":"folder-helm",".helmcharts":"folder-helm",".helper":"folder-helper",".helpers":"folder-helper",".hg":"folder-mercurial",".hgext":"folder-mercurial",".hghooks":"folder-mercurial",".histories":"folder-backup",".history":"folder-backup",".hlsl":"folder-shader",".home":"folder-home",".hook":"folder-hook",".hooks":"folder-hook",".html":"folder-views",".husky":"folder-husky",".i18n":"folder-i18n",".ico":"folder-images",".icon":"folder-images",".icons":"folder-images",".icos":"folder-images",".idea":"folder-intellij",".image":"folder-images",".images":"folder-images",".img":"folder-images",".imgs":"folder-images",".import":"folder-import",".imported":"folder-import",".imports":"folder-import",".in":"folder-input",".inc":"folder-include",".inc64":"folder-include",".include":"folder-include",".includes":"folder-include",".infra":"folder-server",".infrastructure":"folder-server",".input":"folder-input",".inputs":"folder-input",".integration":"folder-connection",".integration-test":"folder-coverage",".integration-tests":"folder-coverage",".integrations":"folder-connection",".interceptor":"folder-interceptor",".interceptors":"folder-interceptor",".interface":"folder-interface",".interfaces":"folder-interface",".internationalization":"folder-i18n",".inventories":"folder-server",".inventory":"folder-server",".io":"folder-input",".ios":"folder-ios",".ipad":"folder-macos",".iphone":"folder-macos",".ipod":"folder-macos",".ipynb":"folder-jupyter",".it":"folder-coverage",".j2":"folder-jinja",".java":"folder-java",".javascript":"folder-javascript",".javascripts":"folder-javascript",".jinja":"folder-jinja",".jinja2":"folder-jinja",".job":"folder-job",".jobs":"folder-job",".js":"folder-javascript",".json":"folder-json",".jsonc":"folder-json",".jsonl":"folder-json",".jsons":"folder-json",".jupyter":"folder-jupyter",".jwt":"folder-keys",".k8s":"folder-kubernetes",".key":"folder-keys",".keys":"folder-keys",".kit":"folder-tools",".kits":"folder-tools",".knowledge":"folder-docs",".kotlin":"folder-kotlin",".kql":"folder-kusto",".kubernetes":"folder-kubernetes",".kusto":"folder-kusto",".l10n":"folder-i18n",".lambda":"folder-functions",".lambdas":"folder-functions",".landing":"folder-home",".lang":"folder-i18n",".langs":"folder-i18n",".language":"folder-i18n",".languages":"folder-i18n",".layout":"folder-layout",".layouts":"folder-layout",".lefthook":"folder-lefthook",".lefthook-local":"folder-lefthook",".less":"folder-less",".lib":"folder-lib",".lib64":"folder-lib",".libraries":"folder-lib",".library":"folder-lib",".libs":"folder-lib",".license":"folder-license",".licenses":"folder-license",".link":"folder-link",".links":"folder-link",".linux":"folder-linux",".linuxbsd":"folder-linux",".liquibase":"folder-liquibase",".locale":"folder-i18n",".locales":"folder-i18n",".localization":"folder-i18n",".log":"folder-log",".logging":"folder-log",".logic":"folder-functions",".logs":"folder-log",".lottie":"folder-lottie",".lottiefiles":"folder-lottie",".lotties":"folder-lottie",".lua":"folder-lua",".luau":"folder-luau",".mac":"folder-macos",".macbook":"folder-macos",".macbook-air":"folder-macos",".macos":"folder-macos",".macosx":"folder-macos",".mail":"folder-mail",".mailers":"folder-mail",".mails":"folder-mail",".main":"folder-home",".manager":"folder-admin",".managers":"folder-admin",".mapping":"folder-mappings",".mappings":"folder-mappings",".markdown":"folder-markdown",".math":"folder-functions",".maths":"folder-functions",".md":"folder-markdown",".measure":"folder-benchmark",".measurement":"folder-benchmark",".measures":"folder-benchmark",".media":"folder-video",".messages":"folder-messages",".messaging":"folder-messages",".meta":"folder-meta",".meta-inf":"folder-config",".metadata":"folder-meta",".metro":"folder-metro",".middleware":"folder-middleware",".middlewares":"folder-middleware",".migration":"folder-migrations",".migrations":"folder-migrations",".mint":"folder-linux",".misc":"folder-other",".miscellaneous":"folder-other",".mjml":"folder-mjml",".mjs":"folder-javascript",".mobile":"folder-mobile",".mobiles":"folder-mobile",".mock":"folder-mock",".mocks":"folder-mock",".mod":"folder-plugin",".modding":"folder-plugin",".model":"folder-class",".models":"folder-class",".moderator":"folder-admin",".moderators":"folder-admin",".mods":"folder-plugin",".module":"folder-plugin",".modules":"folder-plugin",".mojo":"folder-mojo",".molecule":"folder-molecule",".molecules":"folder-molecule",".moon":"folder-moon",".motion":"folder-animation",".motions":"folder-animation",".movie":"folder-video",".movies":"folder-video",".mq":"folder-queue",".mts":"folder-typescript",".music":"folder-audio",".navigation":"folder-routes",".navigations":"folder-routes",".netlify":"folder-netlify",".news":"folder-docs",".next":"folder-next",".nginx":"folder-nginx",".node":"folder-node",".node_modules":"folder-node",".nodejs":"folder-node",".note":"folder-docs",".notebook":"folder-jupyter",".notebooks":"folder-jupyter",".notes":"folder-docs",".now":"folder-vercel",".nuxt":"folder-nuxt",".nyc-output":"folder-coverage",".nyc_output":"folder-coverage",".obsidian":"folder-obsidian",".opencode":"folder-opencode",".option":"folder-config",".options":"folder-config",".organism":"folder-organism",".organisms":"folder-organism",".osx":"folder-macos",".other":"folder-other",".others":"folder-other",".out":"folder-dist",".output":"folder-dist",".outputs":"folder-dist",".package":"folder-packages",".packages":"folder-packages",".pact":"folder-contract",".pacts":"folder-contract",".page":"folder-views",".pages":"folder-views",".palette":"folder-theme",".palettes":"folder-theme",".partial":"folder-include",".partials":"folder-include",".patches":"folder-git",".pdf":"folder-pdf",".pdfs":"folder-pdf",".pdm-build":"folder-pdm",".pdm-plugins":"folder-pdm",".perf":"folder-benchmark",".performance":"folder-benchmark",".phone":"folder-mobile",".phones":"folder-mobile",".photo":"folder-images",".photograph":"folder-images",".photographs":"folder-images",".photos":"folder-images",".php":"folder-php",".phpmailer":"folder-phpmailer",".pic":"folder-images",".pics":"folder-images",".picture":"folder-images",".pictures":"folder-images",".pipe":"folder-pipe",".pipeline":"folder-pipe",".pipelines":"folder-pipe",".pipes":"folder-pipe",".pkg":"folder-packages",".pkgs":"folder-packages",".plastic":"folder-plastic",".playground":"folder-sandbox",".playgrounds":"folder-sandbox",".playlist":"folder-audio",".playlists":"folder-audio",".plugin":"folder-plugin",".plugins":"folder-plugin",".policies":"folder-policy",".policy":"folder-policy",".popos":"folder-linux",".portability":"folder-mobile",".portable":"folder-mobile",".post":"folder-docs",".postman":"folder-postman",".posts":"folder-docs",".powershell":"folder-powershell",".pref":"folder-config",".preference":"folder-config",".preferences":"folder-config",".prefs":"folder-config",".presentation":"folder-ui",".preview":"folder-review",".previews":"folder-review",".prisma":"folder-prisma",".prisma/schema":"folder-prisma",".private":"folder-private",".profiling":"folder-benchmark",".proj":"folder-project",".project":"folder-project",".projects":"folder-project",".projs":"folder-project",".prompt":"folder-prompts",".prompts":"folder-prompts",".properties":"folder-config",".props":"folder-config",".proto":"folder-proto",".protobuf":"folder-proto",".protobufs":"folder-proto",".protos":"folder-proto",".provider":"folder-controller",".providers":"folder-controller",".proxy":"folder-public",".ps":"folder-powershell",".ps1":"folder-powershell",".ps4":"folder-console",".ps5":"folder-console",".public":"folder-public",".public_html":"folder-views",".pwa":"folder-client",".pycache":"folder-python",".pytest_cache":"folder-python",".python":"folder-python",".pytorch":"folder-pytorch",".quasar":"folder-quasar",".queue":"folder-queue",".queues":"folder-queue",".r":"folder-r",".recordings":"folder-audio",".release":"folder-dist",".remote":"folder-connection",".remotes":"folder-connection",".repo":"folder-repository",".report":"folder-resource",".reports":"folder-resource",".repos":"folder-repository",".repositories":"folder-repository",".repository":"folder-repository",".res":"folder-resource",".resolver":"folder-resolver",".resolvers":"folder-resolver",".resource":"folder-resource",".resources":"folder-resource",".restapi":"folder-api",".review":"folder-review",".reviewed":"folder-review",".reviews":"folder-review",".revisal":"folder-review",".revisals":"folder-review",".robot":"folder-robot",".robots":"folder-robot",".router":"folder-routes",".routers":"folder-routes",".routes":"folder-routes",".routing":"folder-routes",".rule":"folder-rules",".rules":"folder-rules",".rust":"folder-rust",".salt":"folder-salt",".saltstack":"folder-salt",".sample":"folder-examples",".sample-data":"folder-examples",".samples":"folder-examples",".sandbox":"folder-sandbox",".sandboxes":"folder-sandbox",".sass":"folder-sass",".scala":"folder-scala",".schema":"folder-class",".schemas":"folder-class",".sconf_temp":"folder-scons",".scons":"folder-scons",".scons_cache":"folder-scons",".screen":"folder-views",".screengrab":"folder-images",".screengrabs":"folder-images",".screens":"folder-views",".screenshot":"folder-images",".screenshots":"folder-images",".script":"folder-scripts",".scripting":"folder-scripts",".scripts":"folder-scripts",".scss":"folder-sass",".secret":"folder-keys",".secrets":"folder-keys",".secure":"folder-secure",".security":"folder-secure",".seed":"folder-seeders",".seeders":"folder-seeders",".seeding":"folder-seeders",".seeds":"folder-seeders",".server":"folder-server",".serverless":"folder-serverless",".serverpackages":"folder-packages",".servers":"folder-server",".service":"folder-controller",".services":"folder-controller",".setting":"folder-config",".settings":"folder-config",".shader":"folder-shader",".shaders":"folder-shader",".shared":"folder-shared",".shop":"folder-cart",".shopping":"folder-cart",".shopping-cart":"folder-cart",".sim":"folder-simulations",".sims":"folder-simulations",".simulation":"folder-simulations",".simulations":"folder-simulations",".site":"folder-public",".sketch":"folder-mock",".sketches":"folder-mock",".skill":"folder-skills",".skills":"folder-skills",".smtp":"folder-mail",".snap":"folder-snapcraft",".snapcraft":"folder-snapcraft",".snapshots":"folder-test",".snippet":"folder-snippet",".snippets":"folder-snippet",".song":"folder-audio",".songs":"folder-audio",".sound":"folder-audio",".sounds":"folder-audio",".source":"folder-src",".sources":"folder-src",".spa":"folder-client",".spec":"folder-test",".specs":"folder-test",".spellcheck":"folder-syntax",".spellcheckers":"folder-syntax",".sql":"folder-database",".src":"folder-src",".src-tauri":"folder-src-tauri",".srcs":"folder-src",".ssl":"folder-secure",".stack":"folder-stack",".stacks":"folder-stack",".start":"folder-home",".static":"folder-resource",".stencil":"folder-stencil",".store":"folder-store",".stores":"folder-store",".stories":"folder-storybook",".storybook":"folder-storybook",".style":"folder-css",".styles":"folder-css",".stylesheet":"folder-css",".stylesheets":"folder-css",".stylus":"folder-stylus",".sublime":"folder-sublime",".submodules":"folder-git",".supabase":"folder-supabase",".svelte":"folder-svelte",".svelte-kit":"folder-svelte",".svg":"folder-svg",".svgs":"folder-svg",".switch":"folder-console",".syntax":"folder-syntax",".syntaxes":"folder-syntax",".table-of-contents":"folder-toc",".target":"folder-target",".taskfile":"folder-taskfile",".taskfiles":"folder-taskfile",".tasks":"folder-tasks",".television":"folder-television",".temp":"folder-temp",".template":"folder-template",".templates":"folder-template",".terraform":"folder-terraform",".test":"folder-test",".testfiles":"folder-test",".testing":"folder-test",".tests":"folder-test",".texture":"folder-images",".textures":"folder-images",".theme":"folder-theme",".themes":"folder-theme",".third-party":"folder-lib",".thirdparty":"folder-lib",".tickets":"folder-tasks",".tls":"folder-secure",".tmp":"folder-temp",".toc":"folder-toc",".token":"folder-keys",".tokens":"folder-keys",".toolbox":"folder-tools",".toolboxes":"folder-tools",".tooling":"folder-tools",".toolkit":"folder-tools",".toolkits":"folder-tools",".tools":"folder-tools",".torch":"folder-pytorch",".transition":"folder-animation",".transitions":"folder-animation",".translate":"folder-i18n",".translation":"folder-i18n",".translations":"folder-i18n",".trash":"folder-trash",".trigger":"folder-trigger",".triggers":"folder-trigger",".ts":"folder-typescript",".turbo":"folder-turborepo",".tv":"folder-television",".tx":"folder-i18n",".typeface":"folder-font",".typefaces":"folder-font",".types":"folder-typescript",".typescript":"folder-typescript",".typings":"folder-typescript",".ubuntu":"folder-linux",".ui":"folder-ui",".unity":"folder-unity",".unix":"folder-linux",".update":"folder-update",".updates":"folder-update",".upgrade":"folder-update",".upgrades":"folder-update",".upload":"folder-upload",".uploads":"folder-upload",".util":"folder-utils",".utilities":"folder-utils",".utility":"folder-utils",".utils":"folder-utils",".ux":"folder-ui",".validation":"folder-rules",".validations":"folder-rules",".validator":"folder-rules",".validators":"folder-rules",".vector":"folder-svg",".vectors":"folder-svg",".vendor":"folder-lib",".vendors":"folder-lib",".venv":"folder-environment",".vercel":"folder-vercel",".verdaccio":"folder-verdaccio",".vid":"folder-video",".video":"folder-video",".videos":"folder-video",".vids":"folder-video",".view":"folder-views",".views":"folder-views",".vm":"folder-vm",".vms":"folder-vm",".voice":"folder-audio",".voices":"folder-audio",".vscode":"folder-vscode",".vscode-test":"folder-vscode",".vue":"folder-vue",".vuepress":"folder-vuepress",".wakatime":"folder-wakatime",".web":"folder-public",".webpack":"folder-webpack",".website":"folder-public",".websites":"folder-public",".widget":"folder-components",".widgets":"folder-components",".wiki":"folder-docs",".win":"folder-windows",".win10":"folder-windows",".win11":"folder-windows",".win32":"folder-windows",".windows":"folder-windows",".windows10":"folder-windows",".windows11":"folder-windows",".windowsnt":"folder-windows",".windowsxp":"folder-windows",".winnt":"folder-windows",".winxp":"folder-windows",".wordpress-org":"folder-wordpress",".wp-content":"folder-wordpress",".wsl":"folder-linux",".www":"folder-public",".wwwroot":"folder-public",".xbox":"folder-console",".xtask":"folder-scripts",".yarn":"folder-yarn",".zeabur":"folder-zeabur",".zed":"folder-zed","@types":"folder-typescript","_@types":"folder-typescript","__@types__":"folder-typescript",__addin__:"folder-plugin",__addins__:"folder-plugin",__addon__:"folder-plugin",__addons__:"folder-plugin",__admin__:"folder-admin",__admins__:"folder-admin",__agent__:"folder-robot",__agents__:"folder-robot",__android__:"folder-android",__angular__:"folder-angular",__anim__:"folder-animation",__animated__:"folder-animation",__animation__:"folder-animation",__animations__:"folder-animation",__anims__:"folder-animation",__ansible__:"folder-ansible",__api__:"folder-api",__apis__:"folder-api","__apollo-cache__":"folder-apollo","__apollo-client__":"folder-apollo","__apollo-config__":"folder-apollo",__apollo__:"folder-apollo",__app__:"folder-app",__apple__:"folder-macos",__application__:"folder-app",__applications__:"folder-app",__apps__:"folder-app",__appwrite__:"folder-appwrite",__arc__:"folder-archive",__archival__:"folder-archive",__archive__:"folder-archive",__archives__:"folder-archive",__arcs__:"folder-archive",__article__:"folder-docs",__articles__:"folder-docs",__asm__:"folder-assembly",__assembly__:"folder-assembly",__asset__:"folder-resource",__assets__:"folder-resource",__astro__:"folder-astro",__atom__:"folder-atom",__atoms__:"folder-atom",__attachment__:"folder-attachment",__attachments__:"folder-attachment",__aud__:"folder-audio",__audio__:"folder-audio",__audios__:"folder-audio",__auds__:"folder-audio",__aurelia_project__:"folder-aurelia",__auth__:"folder-secure",__authentication__:"folder-secure",__auto__:"folder-generator",__aws__:"folder-aws","__azure-pipelines-ci__":"folder-azure-pipelines","__azure-pipelines__":"folder-azure-pipelines",__azure__:"folder-aws","__back-up__":"folder-backup","__back-ups__":"folder-backup",__backend__:"folder-server",__backends__:"folder-server",__backup__:"folder-backup",__backups__:"folder-backup",__bak__:"folder-backup",__baks__:"folder-backup",__base__:"folder-base",__bases__:"folder-base",__batch__:"folder-batch",__batches__:"folder-batch",__batchs__:"folder-batch",__bench__:"folder-benchmark",__benches__:"folder-benchmark",__benchmark__:"folder-benchmark",__benchmarks__:"folder-benchmark",__bibliographies__:"folder-bibliography",__bibliography__:"folder-bibliography",__bicep__:"folder-bicep",__bin__:"folder-dist",__bkp__:"folder-backup",__bkps__:"folder-backup","__blender-assets__":"folder-blender","__blender-files__":"folder-blender","__blender-models__":"folder-blender","__blender-project__":"folder-blender",__blender__:"folder-blender",__bloc__:"folder-bloc",__blocs__:"folder-bloc",__blog__:"folder-docs",__book__:"folder-bibliography",__books__:"folder-bibliography",__bot__:"folder-robot",__bots__:"folder-robot",__bower_components__:"folder-bower",__browser__:"folder-public",__browsers__:"folder-public",__build__:"folder-dist",__buildkite__:"folder-buildkite",__builds__:"folder-dist",__built__:"folder-dist",__bull__:"folder-queue",__cache__:"folder-temp",__cached__:"folder-temp",__calc__:"folder-functions",__calcs__:"folder-functions",__calculation__:"folder-functions",__calculations__:"folder-functions",__cargo__:"folder-rust",__cart__:"folder-cart",__centos__:"folder-linux",__cert__:"folder-secure",__certificate__:"folder-secure",__certificates__:"folder-secure",__certs__:"folder-secure",__cfg__:"folder-config",__cfgs__:"folder-config","__cfn-gen__":"folder-generator",__changes__:"folder-delta",__changeset__:"folder-changesets",__changesets__:"folder-changesets",__chat__:"folder-messages",__chats__:"folder-messages",__ci__:"folder-ci",__cipher__:"folder-secure",__circleci__:"folder-circleci",__cjs__:"folder-javascript",__class__:"folder-class",__classes__:"folder-class",__claude__:"folder-claude",__cli__:"folder-command",__client__:"folder-client",__clients__:"folder-client",__cline_docs__:"folder-cline",__clis__:"folder-command","__cloud-firestore__":"folder-firestore","__cloud-functions__":"folder-cloud-functions",__cloudflare__:"folder-cloudflare",__cloudfunctions__:"folder-cloud-functions",__cluster__:"folder-cluster",__clusters__:"folder-cluster",__cmd__:"folder-command",__cobol__:"folder-cobol",__code__:"folder-src",__color__:"folder-theme",__colors__:"folder-theme",__colour__:"folder-theme",__colours__:"folder-theme",__command__:"folder-command",__commandline__:"folder-command",__commands__:"folder-command",__common__:"folder-shared",__compiled__:"folder-dist",__components__:"folder-components",__composable__:"folder-functions",__composables__:"folder-functions",__concept__:"folder-mock",__concepts__:"folder-mock",__conf__:"folder-config",__config__:"folder-config",__configs__:"folder-config",__configuration__:"folder-config",__configurations__:"folder-config",__confs__:"folder-config",__connection__:"folder-connection",__connections__:"folder-connection",__console__:"folder-console",__const__:"folder-constant",__constant__:"folder-constant",__constants__:"folder-constant",__consts__:"folder-constant",__container__:"folder-container",__containers__:"folder-container",__content__:"folder-content",__contents__:"folder-content",__context__:"folder-context",__contexts__:"folder-context","__contract-test__":"folder-contract","__contract-testing__":"folder-contract","__contract-tests__":"folder-contract",__contract__:"folder-contract",__contracts__:"folder-contract",__controller__:"folder-controller",__controllers__:"folder-controller",__controls__:"folder-controller",__conversation__:"folder-messages",__conversations__:"folder-messages",__core__:"folder-core",__coverage__:"folder-coverage",__crash__:"folder-error",__crashes__:"folder-error",__crates__:"folder-lib",__css__:"folder-css",__cts__:"folder-typescript",__cubit__:"folder-bloc",__cubits__:"folder-bloc",__cue__:"folder-cue",__cues__:"folder-cue",__cursor__:"folder-cursor",__custom__:"folder-custom",__customs__:"folder-custom",__cypher__:"folder-secure",__cypress__:"folder-cypress",__dal__:"folder-dal",__dart__:"folder-dart",__dart_tool__:"folder-dart",__dart_tools__:"folder-dart","__data-access-layer__":"folder-dal","__data-access__":"folder-dal",__data__:"folder-database",__database__:"folder-database",__databases__:"folder-database",__db__:"folder-database",__deb__:"folder-linux",__debian__:"folder-linux",__debug__:"folder-debug",__debugger__:"folder-debug",__debugging__:"folder-debug",__decorator__:"folder-decorators",__decorators__:"folder-decorators",__deepin__:"folder-linux",__delta__:"folder-delta",__deltas__:"folder-delta",__demo__:"folder-examples",__demos__:"folder-examples",__dependencies__:"folder-packages",__design__:"folder-theme",__designs__:"folder-theme",__desktop__:"folder-desktop",__devcontainer__:"folder-container",__devpackages__:"folder-packages",__devtools__:"folder-tools",__dialog__:"folder-messages",__dialogs__:"folder-messages",__diary__:"folder-docs",__directive__:"folder-directive",__directives__:"folder-directive",__display__:"folder-desktop",__dist__:"folder-dist",__distribution__:"folder-dist",__doc__:"folder-docs",__docker__:"folder-docker",__dockerfiles__:"folder-docker",__dockerhub__:"folder-docker",__docs__:"folder-docs",__document__:"folder-docs",__documentation__:"folder-docs",__documents__:"folder-docs",__download__:"folder-download",__downloader__:"folder-download",__downloaders__:"folder-download",__downloads__:"folder-download",__draft__:"folder-mock",__drafts__:"folder-mock",__drizzle__:"folder-drizzle",__ds_store__:"folder-macos",__dump__:"folder-dump",__dumps__:"folder-dump",__e2e__:"folder-coverage",__easing__:"folder-animation",__easings__:"folder-animation",__element__:"folder-element",__elements__:"folder-element",__email__:"folder-mail",__emails__:"folder-mail",__enum__:"folder-enum",__enums__:"folder-enum",__env__:"folder-environment",__environment__:"folder-environment",__environments__:"folder-environment",__envs__:"folder-environment",__err__:"folder-error",__error__:"folder-error",__errors__:"folder-error",__errs__:"folder-error","__eslint-config__":"folder-eslint","__eslint-configs__":"folder-eslint","__eslint-plugin__":"folder-eslint","__eslint-plugins__":"folder-eslint",__eslint__:"folder-eslint",__etc__:"folder-other",__event__:"folder-event",__events__:"folder-event",__example__:"folder-examples",__examples__:"folder-examples","__expo-shared__":"folder-expo",__expo__:"folder-expo",__export__:"folder-export",__exported__:"folder-export",__exports__:"folder-export",__extension__:"folder-plugin",__extensions__:"folder-plugin",__external__:"folder-lib",__externals__:"folder-lib",__extra__:"folder-other",__extras__:"folder-other",__fastlane__:"folder-fastlane",__favicon__:"folder-favicon",__favicons__:"folder-favicon",__feat__:"folder-features",__feats__:"folder-features",__feature__:"folder-features",__features__:"folder-features",__fig__:"folder-images",__figs__:"folder-images",__figure__:"folder-images",__figures__:"folder-images",__filter__:"folder-filter",__filters__:"folder-filter","__firebase-cloud-functions__":"folder-cloud-functions","__firebase-cloudfunctions__":"folder-cloud-functions","__firebase-firestore__":"folder-firestore",__firebase__:"folder-firebase",__firestore__:"folder-firestore",__fixture__:"folder-mock",__fixtures__:"folder-mock","__flow-typed__":"folder-flow",__flutter__:"folder-flutter",__font__:"folder-font",__fonts__:"folder-font",__forgejo__:"folder-forgejo",__form__:"folder-form",__forms__:"folder-form",__forum__:"folder-messages",__fragments__:"folder-components",__frontend__:"folder-client",__frontends__:"folder-client",__func__:"folder-functions",__funcs__:"folder-functions",__function__:"folder-functions",__functions__:"folder-functions",__game__:"folder-console",__gamemaker2__:"folder-gamemaker",__gamemaker__:"folder-gamemaker",__games__:"folder-console",__gcp__:"folder-aws","__gemini-ai__":"folder-gemini-ai",__gemini__:"folder-gemini-ai",__geminiai__:"folder-gemini-ai",__gen__:"folder-generator",__generated__:"folder-generator",__generator__:"folder-generator",__generators__:"folder-generator",__gens__:"folder-generator",__git__:"folder-git",__gitea__:"folder-gitea",__githooks__:"folder-git","__github/issue_template__":"folder-template","__github/pull_request_template__":"folder-template","__github/workflows__":"folder-gh-workflows",__github__:"folder-github",__gitlab__:"folder-gitlab",__global__:"folder-global",__glsl__:"folder-shader",__go__:"folder-go","__godot-cpp__":"folder-godot",__godot__:"folder-godot",__golang__:"folder-go",__gql__:"folder-graphql",__gradle__:"folder-gradle",__graphql__:"folder-graphql",__guard__:"folder-guard",__guards__:"folder-guard",__gui__:"folder-ui","__gulp-tasks__":"folder-gulp",__gulp__:"folder-gulp","__gulpfile.babel.js__":"folder-gulp","__gulpfile.js__":"folder-gulp","__gulpfile.mjs__":"folder-gulp","__gulpfile.ts__":"folder-gulp",__gulpfiles__:"folder-gulp",__handler__:"folder-controller",__handlers__:"folder-controller",__helm__:"folder-helm",__helmchart__:"folder-helm",__helmcharts__:"folder-helm",__helper__:"folder-helper",__helpers__:"folder-helper",__hg__:"folder-mercurial",__hgext__:"folder-mercurial",__hghooks__:"folder-mercurial",__histories__:"folder-backup",__history__:"folder-backup",__hlsl__:"folder-shader",__home__:"folder-home",__hook__:"folder-hook",__hooks__:"folder-hook",__html__:"folder-views",__husky__:"folder-husky",__i18n__:"folder-i18n",__ico__:"folder-images",__icon__:"folder-images",__icons__:"folder-images",__icos__:"folder-images",__idea__:"folder-intellij",__image__:"folder-images",__images__:"folder-images",__img__:"folder-images",__imgs__:"folder-images",__import__:"folder-import",__imported__:"folder-import",__imports__:"folder-import",__in__:"folder-input",__inc64__:"folder-include",__inc__:"folder-include",__include__:"folder-include",__includes__:"folder-include",__infra__:"folder-server",__infrastructure__:"folder-server",__input__:"folder-input",__inputs__:"folder-input","__integration-test__":"folder-coverage","__integration-tests__":"folder-coverage",__integration__:"folder-connection",__integrations__:"folder-connection",__interceptor__:"folder-interceptor",__interceptors__:"folder-interceptor",__interface__:"folder-interface",__interfaces__:"folder-interface",__internationalization__:"folder-i18n",__inventories__:"folder-server",__inventory__:"folder-server",__io__:"folder-input",__ios__:"folder-ios",__ipad__:"folder-macos",__iphone__:"folder-macos",__ipod__:"folder-macos",__ipynb__:"folder-jupyter",__it__:"folder-coverage",__j2__:"folder-jinja",__java__:"folder-java",__javascript__:"folder-javascript",__javascripts__:"folder-javascript",__jinja2__:"folder-jinja",__jinja__:"folder-jinja",__job__:"folder-job",__jobs__:"folder-job",__js__:"folder-javascript",__json__:"folder-json",__jsonc__:"folder-json",__jsonl__:"folder-json",__jsons__:"folder-json",__jupyter__:"folder-jupyter",__jwt__:"folder-keys",__k8s__:"folder-kubernetes",__key__:"folder-keys",__keys__:"folder-keys",__kit__:"folder-tools",__kits__:"folder-tools",__knowledge__:"folder-docs",__kotlin__:"folder-kotlin",__kql__:"folder-kusto",__kubernetes__:"folder-kubernetes",__kusto__:"folder-kusto",__l10n__:"folder-i18n",__lambda__:"folder-functions",__lambdas__:"folder-functions",__landing__:"folder-home",__lang__:"folder-i18n",__langs__:"folder-i18n",__language__:"folder-i18n",__languages__:"folder-i18n",__layout__:"folder-layout",__layouts__:"folder-layout","__lefthook-local__":"folder-lefthook",__lefthook__:"folder-lefthook",__less__:"folder-less",__lib64__:"folder-lib",__lib__:"folder-lib",__libraries__:"folder-lib",__library__:"folder-lib",__libs__:"folder-lib",__license__:"folder-license",__licenses__:"folder-license",__link__:"folder-link",__links__:"folder-link",__linux__:"folder-linux",__linuxbsd__:"folder-linux",__liquibase__:"folder-liquibase",__locale__:"folder-i18n",__locales__:"folder-i18n",__localization__:"folder-i18n",__log__:"folder-log",__logging__:"folder-log",__logic__:"folder-functions",__logs__:"folder-log",__lottie__:"folder-lottie",__lottiefiles__:"folder-lottie",__lotties__:"folder-lottie",__lua__:"folder-lua",__luau__:"folder-luau",__mac__:"folder-macos","__macbook-air__":"folder-macos",__macbook__:"folder-macos",__macos__:"folder-macos",__macosx__:"folder-macos",__mail__:"folder-mail",__mailers__:"folder-mail",__mails__:"folder-mail",__main__:"folder-home",__manager__:"folder-admin",__managers__:"folder-admin",__mapping__:"folder-mappings",__mappings__:"folder-mappings",__markdown__:"folder-markdown",__math__:"folder-functions",__maths__:"folder-functions",__md__:"folder-markdown",__measure__:"folder-benchmark",__measurement__:"folder-benchmark",__measures__:"folder-benchmark",__media__:"folder-video",__messages__:"folder-messages",__messaging__:"folder-messages","__meta-inf__":"folder-config",__meta__:"folder-meta",__metadata__:"folder-meta",__metro__:"folder-metro",__middleware__:"folder-middleware",__middlewares__:"folder-middleware",__migration__:"folder-migrations",__migrations__:"folder-migrations",__mint__:"folder-linux",__misc__:"folder-other",__miscellaneous__:"folder-other",__mjml__:"folder-mjml",__mjs__:"folder-javascript",__mobile__:"folder-mobile",__mobiles__:"folder-mobile",__mock__:"folder-mock",__mocks__:"folder-mock",__mod__:"folder-plugin",__modding__:"folder-plugin",__model__:"folder-class",__models__:"folder-class",__moderator__:"folder-admin",__moderators__:"folder-admin",__mods__:"folder-plugin",__module__:"folder-plugin",__modules__:"folder-plugin",__mojo__:"folder-mojo",__molecule__:"folder-molecule",__molecules__:"folder-molecule",__moon__:"folder-moon",__motion__:"folder-animation",__motions__:"folder-animation",__movie__:"folder-video",__movies__:"folder-video",__mq__:"folder-queue",__mts__:"folder-typescript",__music__:"folder-audio",__navigation__:"folder-routes",__navigations__:"folder-routes",__netlify__:"folder-netlify",__news__:"folder-docs",__next__:"folder-next",__nginx__:"folder-nginx",__node__:"folder-node",__node_modules__:"folder-node",__nodejs__:"folder-node",__note__:"folder-docs",__notebook__:"folder-jupyter",__notebooks__:"folder-jupyter",__notes__:"folder-docs",__now__:"folder-vercel",__nuxt__:"folder-nuxt","__nyc-output__":"folder-coverage",__nyc_output__:"folder-coverage",__obsidian__:"folder-obsidian",__opencode__:"folder-opencode",__option__:"folder-config",__options__:"folder-config",__organism__:"folder-organism",__organisms__:"folder-organism",__osx__:"folder-macos",__other__:"folder-other",__others__:"folder-other",__out__:"folder-dist",__output__:"folder-dist",__outputs__:"folder-dist",__package__:"folder-packages",__packages__:"folder-packages",__pact__:"folder-contract",__pacts__:"folder-contract",__page__:"folder-views",__pages__:"folder-views",__palette__:"folder-theme",__palettes__:"folder-theme",__partial__:"folder-include",__partials__:"folder-include",__patches__:"folder-git",__pdf__:"folder-pdf",__pdfs__:"folder-pdf","__pdm-build__":"folder-pdm","__pdm-plugins__":"folder-pdm",__perf__:"folder-benchmark",__performance__:"folder-benchmark",__phone__:"folder-mobile",__phones__:"folder-mobile",__photo__:"folder-images",__photograph__:"folder-images",__photographs__:"folder-images",__photos__:"folder-images",__php__:"folder-php",__phpmailer__:"folder-phpmailer",__pic__:"folder-images",__pics__:"folder-images",__picture__:"folder-images",__pictures__:"folder-images",__pipe__:"folder-pipe",__pipeline__:"folder-pipe",__pipelines__:"folder-pipe",__pipes__:"folder-pipe",__pkg__:"folder-packages",__pkgs__:"folder-packages",__plastic__:"folder-plastic",__playground__:"folder-sandbox",__playgrounds__:"folder-sandbox",__playlist__:"folder-audio",__playlists__:"folder-audio",__plugin__:"folder-plugin",__plugins__:"folder-plugin",__policies__:"folder-policy",__policy__:"folder-policy",__popos__:"folder-linux",__portability__:"folder-mobile",__portable__:"folder-mobile",__post__:"folder-docs",__postman__:"folder-postman",__posts__:"folder-docs",__powershell__:"folder-powershell",__pref__:"folder-config",__preference__:"folder-config",__preferences__:"folder-config",__prefs__:"folder-config",__presentation__:"folder-ui",__preview__:"folder-review",__previews__:"folder-review","__prisma/schema__":"folder-prisma",__prisma__:"folder-prisma",__private__:"folder-private",__profiling__:"folder-benchmark",__proj__:"folder-project",__project__:"folder-project",__projects__:"folder-project",__projs__:"folder-project",__prompt__:"folder-prompts",__prompts__:"folder-prompts",__properties__:"folder-config",__props__:"folder-config",__protobuf__:"folder-proto",__protobufs__:"folder-proto",__protos__:"folder-proto",__provider__:"folder-controller",__providers__:"folder-controller",__proxy__:"folder-public",__ps1__:"folder-powershell",__ps4__:"folder-console",__ps5__:"folder-console",__ps__:"folder-powershell",__public__:"folder-public",__public_html__:"folder-views",__pwa__:"folder-client",__pycache__:"folder-python",__pytest_cache__:"folder-python",__python__:"folder-python",__pytorch__:"folder-pytorch",__quasar__:"folder-quasar",__queue__:"folder-queue",__queues__:"folder-queue",__r__:"folder-r",__recordings__:"folder-audio",__release__:"folder-dist",__remote__:"folder-connection",__remotes__:"folder-connection",__repo__:"folder-repository",__report__:"folder-resource",__reports__:"folder-resource",__repos__:"folder-repository",__repositories__:"folder-repository",__repository__:"folder-repository",__res__:"folder-resource",__resolver__:"folder-resolver",__resolvers__:"folder-resolver",__resource__:"folder-resource",__resources__:"folder-resource",__restapi__:"folder-api",__review__:"folder-review",__reviewed__:"folder-review",__reviews__:"folder-review",__revisal__:"folder-review",__revisals__:"folder-review",__robot__:"folder-robot",__robots__:"folder-robot",__router__:"folder-routes",__routers__:"folder-routes",__routes__:"folder-routes",__routing__:"folder-routes",__rule__:"folder-rules",__rules__:"folder-rules",__rust__:"folder-rust",__salt__:"folder-salt",__saltstack__:"folder-salt","__sample-data__":"folder-examples",__sample__:"folder-examples",__samples__:"folder-examples",__sandbox__:"folder-sandbox",__sandboxes__:"folder-sandbox",__sass__:"folder-sass",__scala__:"folder-scala",__schema__:"folder-class",__schemas__:"folder-class",__sconf_temp__:"folder-scons",__scons__:"folder-scons",__scons_cache__:"folder-scons",__screen__:"folder-views",__screengrab__:"folder-images",__screengrabs__:"folder-images",__screens__:"folder-views",__screenshot__:"folder-images",__screenshots__:"folder-images",__script__:"folder-scripts",__scripting__:"folder-scripts",__scripts__:"folder-scripts",__scss__:"folder-sass",__secret__:"folder-keys",__secrets__:"folder-keys",__secure__:"folder-secure",__security__:"folder-secure",__seed__:"folder-seeders",__seeders__:"folder-seeders",__seeding__:"folder-seeders",__seeds__:"folder-seeders",__server__:"folder-server",__serverless__:"folder-serverless",__serverpackages__:"folder-packages",__servers__:"folder-server",__service__:"folder-controller",__services__:"folder-controller",__setting__:"folder-config",__settings__:"folder-config",__shader__:"folder-shader",__shaders__:"folder-shader",__shared__:"folder-shared",__shop__:"folder-cart","__shopping-cart__":"folder-cart",__shopping__:"folder-cart",__sim__:"folder-simulations",__sims__:"folder-simulations",__simulation__:"folder-simulations",__simulations__:"folder-simulations",__site__:"folder-public",__sketch__:"folder-mock",__sketches__:"folder-mock",__skill__:"folder-skills",__skills__:"folder-skills",__smtp__:"folder-mail",__snap__:"folder-snapcraft",__snapcraft__:"folder-snapcraft",__snapshots__:"folder-test",__snippet__:"folder-snippet",__snippets__:"folder-snippet",__song__:"folder-audio",__songs__:"folder-audio",__sound__:"folder-audio",__sounds__:"folder-audio",__source__:"folder-src",__sources__:"folder-src",__spa__:"folder-client",__spec__:"folder-test",__specs__:"folder-test",__spellcheck__:"folder-syntax",__spellcheckers__:"folder-syntax",__sql__:"folder-database","__src-tauri__":"folder-src-tauri",__src__:"folder-src",__srcs__:"folder-src",__ssl__:"folder-secure",__stack__:"folder-stack",__stacks__:"folder-stack",__start__:"folder-home",__static__:"folder-resource",__stencil__:"folder-stencil",__store__:"folder-store",__stores__:"folder-store",__stories__:"folder-storybook",__storybook__:"folder-storybook",__style__:"folder-css",__styles__:"folder-css",__stylesheet__:"folder-css",__stylesheets__:"folder-css",__stylus__:"folder-stylus",__sublime__:"folder-sublime",__submodules__:"folder-git",__supabase__:"folder-supabase","__svelte-kit__":"folder-svelte",__svelte__:"folder-svelte",__svg__:"folder-svg",__svgs__:"folder-svg",__switch__:"folder-console",__syntax__:"folder-syntax",__syntaxes__:"folder-syntax","__table-of-contents__":"folder-toc",__target__:"folder-target",__taskfile__:"folder-taskfile",__taskfiles__:"folder-taskfile",__tasks__:"folder-tasks",__television__:"folder-television",__temp__:"folder-temp",__template__:"folder-template",__templates__:"folder-template",__terraform__:"folder-terraform",__test__:"folder-test",__testfiles__:"folder-test",__testing__:"folder-test",__tests__:"folder-test",__texture__:"folder-images",__textures__:"folder-images",__theme__:"folder-theme",__themes__:"folder-theme","__third-party__":"folder-lib",__thirdparty__:"folder-lib",__tickets__:"folder-tasks",__tls__:"folder-secure",__tmp__:"folder-temp",__toc__:"folder-toc",__token__:"folder-keys",__tokens__:"folder-keys",__toolbox__:"folder-tools",__toolboxes__:"folder-tools",__tooling__:"folder-tools",__toolkit__:"folder-tools",__toolkits__:"folder-tools",__tools__:"folder-tools",__torch__:"folder-pytorch",__transition__:"folder-animation",__transitions__:"folder-animation",__translate__:"folder-i18n",__translation__:"folder-i18n",__translations__:"folder-i18n",__trash__:"folder-trash",__trigger__:"folder-trigger",__triggers__:"folder-trigger",__ts__:"folder-typescript",__turbo__:"folder-turborepo",__tv__:"folder-television",__tx__:"folder-i18n",__typeface__:"folder-font",__typefaces__:"folder-font",__types__:"folder-typescript",__typescript__:"folder-typescript",__typings__:"folder-typescript",__ubuntu__:"folder-linux",__ui__:"folder-ui",__unity__:"folder-unity",__unix__:"folder-linux",__update__:"folder-update",__updates__:"folder-update",__upgrade__:"folder-update",__upgrades__:"folder-update",__upload__:"folder-upload",__uploads__:"folder-upload",__util__:"folder-utils",__utilities__:"folder-utils",__utility__:"folder-utils",__utils__:"folder-utils",__ux__:"folder-ui",__validation__:"folder-rules",__validations__:"folder-rules",__validator__:"folder-rules",__validators__:"folder-rules",__vector__:"folder-svg",__vectors__:"folder-svg",__vendor__:"folder-lib",__vendors__:"folder-lib",__venv__:"folder-environment",__vercel__:"folder-vercel",__verdaccio__:"folder-verdaccio",__vid__:"folder-video",__video__:"folder-video",__videos__:"folder-video",__vids__:"folder-video",__view__:"folder-views",__views__:"folder-views",__vm__:"folder-vm",__vms__:"folder-vm",__voice__:"folder-audio",__voices__:"folder-audio","__vscode-test__":"folder-vscode",__vscode__:"folder-vscode",__vue__:"folder-vue",__vuepress__:"folder-vuepress",__wakatime__:"folder-wakatime",__web__:"folder-public",__webpack__:"folder-webpack",__website__:"folder-public",__websites__:"folder-public",__widget__:"folder-components",__widgets__:"folder-components",__wiki__:"folder-docs",__win10__:"folder-windows",__win11__:"folder-windows",__win32__:"folder-windows",__win__:"folder-windows",__windows10__:"folder-windows",__windows11__:"folder-windows",__windows__:"folder-windows",__windowsnt__:"folder-windows",__windowsxp__:"folder-windows",__winnt__:"folder-windows",__winxp__:"folder-windows","__wordpress-org__":"folder-wordpress","__wp-content__":"folder-wordpress",__wsl__:"folder-linux",__www__:"folder-public",__wwwroot__:"folder-public",__xbox__:"folder-console",__xtask__:"folder-scripts",__yarn__:"folder-yarn",__zeabur__:"folder-zeabur",__zed__:"folder-zed",_addin:"folder-plugin",_addins:"folder-plugin",_addon:"folder-plugin",_addons:"folder-plugin",_admin:"folder-admin",_admins:"folder-admin",_agent:"folder-robot",_agents:"folder-robot",_android:"folder-android",_angular:"folder-angular",_anim:"folder-animation",_animated:"folder-animation",_animation:"folder-animation",_animations:"folder-animation",_anims:"folder-animation",_ansible:"folder-ansible",_api:"folder-api",_apis:"folder-api",_apollo:"folder-apollo","_apollo-cache":"folder-apollo","_apollo-client":"folder-apollo","_apollo-config":"folder-apollo",_app:"folder-app",_apple:"folder-macos",_application:"folder-app",_applications:"folder-app",_apps:"folder-app",_appwrite:"folder-appwrite",_arc:"folder-archive",_archival:"folder-archive",_archive:"folder-archive",_archives:"folder-archive",_arcs:"folder-archive",_article:"folder-docs",_articles:"folder-docs",_asm:"folder-assembly",_assembly:"folder-assembly",_asset:"folder-resource",_assets:"folder-resource",_astro:"folder-astro",_atom:"folder-atom",_atoms:"folder-atom",_attachment:"folder-attachment",_attachments:"folder-attachment",_aud:"folder-audio",_audio:"folder-audio",_audios:"folder-audio",_auds:"folder-audio",_aurelia_project:"folder-aurelia",_auth:"folder-secure",_authentication:"folder-secure",_auto:"folder-generator",_aws:"folder-aws",_azure:"folder-aws","_azure-pipelines":"folder-azure-pipelines","_azure-pipelines-ci":"folder-azure-pipelines","_back-up":"folder-backup","_back-ups":"folder-backup",_backend:"folder-server",_backends:"folder-server",_backup:"folder-backup",_backups:"folder-backup",_bak:"folder-backup",_baks:"folder-backup",_base:"folder-base",_bases:"folder-base",_batch:"folder-batch",_batches:"folder-batch",_batchs:"folder-batch",_bench:"folder-benchmark",_benches:"folder-benchmark",_benchmark:"folder-benchmark",_benchmarks:"folder-benchmark",_bibliographies:"folder-bibliography",_bibliography:"folder-bibliography",_bicep:"folder-bicep",_bin:"folder-dist",_bkp:"folder-backup",_bkps:"folder-backup",_blender:"folder-blender","_blender-assets":"folder-blender","_blender-files":"folder-blender","_blender-models":"folder-blender","_blender-project":"folder-blender",_bloc:"folder-bloc",_blocs:"folder-bloc",_blog:"folder-docs",_book:"folder-bibliography",_books:"folder-bibliography",_bot:"folder-robot",_bots:"folder-robot",_bower_components:"folder-bower",_browser:"folder-public",_browsers:"folder-public",_build:"folder-dist",_buildkite:"folder-buildkite",_builds:"folder-dist",_built:"folder-dist",_bull:"folder-queue",_cache:"folder-temp",_cached:"folder-temp",_calc:"folder-functions",_calcs:"folder-functions",_calculation:"folder-functions",_calculations:"folder-functions",_cargo:"folder-rust",_cart:"folder-cart",_centos:"folder-linux",_cert:"folder-secure",_certificate:"folder-secure",_certificates:"folder-secure",_certs:"folder-secure",_cfg:"folder-config",_cfgs:"folder-config","_cfn-gen":"folder-generator",_changes:"folder-delta",_changeset:"folder-changesets",_changesets:"folder-changesets",_chat:"folder-messages",_chats:"folder-messages",_ci:"folder-ci",_cipher:"folder-secure",_circleci:"folder-circleci",_cjs:"folder-javascript",_class:"folder-class",_classes:"folder-class",_claude:"folder-claude",_cli:"folder-command",_client:"folder-client",_clients:"folder-client",_cline_docs:"folder-cline",_clis:"folder-command","_cloud-firestore":"folder-firestore","_cloud-functions":"folder-cloud-functions",_cloudflare:"folder-cloudflare",_cloudfunctions:"folder-cloud-functions",_cluster:"folder-cluster",_clusters:"folder-cluster",_cmd:"folder-command",_cobol:"folder-cobol",_code:"folder-src",_color:"folder-theme",_colors:"folder-theme",_colour:"folder-theme",_colours:"folder-theme",_command:"folder-command",_commandline:"folder-command",_commands:"folder-command",_common:"folder-shared",_compiled:"folder-dist",_components:"folder-components",_composable:"folder-functions",_composables:"folder-functions",_concept:"folder-mock",_concepts:"folder-mock",_conf:"folder-config",_config:"folder-config",_configs:"folder-config",_configuration:"folder-config",_configurations:"folder-config",_confs:"folder-config",_connection:"folder-connection",_connections:"folder-connection",_console:"folder-console",_const:"folder-constant",_constant:"folder-constant",_constants:"folder-constant",_consts:"folder-constant",_container:"folder-container",_containers:"folder-container",_content:"folder-content",_contents:"folder-content",_context:"folder-context",_contexts:"folder-context",_contract:"folder-contract","_contract-test":"folder-contract","_contract-testing":"folder-contract","_contract-tests":"folder-contract",_contracts:"folder-contract",_controller:"folder-controller",_controllers:"folder-controller",_controls:"folder-controller",_conversation:"folder-messages",_conversations:"folder-messages",_core:"folder-core",_coverage:"folder-coverage",_crash:"folder-error",_crashes:"folder-error",_crates:"folder-lib",_css:"folder-css",_cts:"folder-typescript",_cubit:"folder-bloc",_cubits:"folder-bloc",_cue:"folder-cue",_cues:"folder-cue",_cursor:"folder-cursor",_custom:"folder-custom",_customs:"folder-custom",_cypher:"folder-secure",_cypress:"folder-cypress",_dal:"folder-dal",_dart:"folder-dart",_dart_tool:"folder-dart",_dart_tools:"folder-dart",_data:"folder-database","_data-access":"folder-dal","_data-access-layer":"folder-dal",_database:"folder-database",_databases:"folder-database",_db:"folder-database",_deb:"folder-linux",_debian:"folder-linux",_debug:"folder-debug",_debugger:"folder-debug",_debugging:"folder-debug",_decorator:"folder-decorators",_decorators:"folder-decorators",_deepin:"folder-linux",_delta:"folder-delta",_deltas:"folder-delta",_demo:"folder-examples",_demos:"folder-examples",_dependencies:"folder-packages",_design:"folder-theme",_designs:"folder-theme",_desktop:"folder-desktop",_devcontainer:"folder-container",_devpackages:"folder-packages",_devtools:"folder-tools",_dialog:"folder-messages",_dialogs:"folder-messages",_diary:"folder-docs",_directive:"folder-directive",_directives:"folder-directive",_display:"folder-desktop",_dist:"folder-dist",_distribution:"folder-dist",_doc:"folder-docs",_docker:"folder-docker",_dockerfiles:"folder-docker",_dockerhub:"folder-docker",_docs:"folder-docs",_document:"folder-docs",_documentation:"folder-docs",_documents:"folder-docs",_download:"folder-download",_downloader:"folder-download",_downloaders:"folder-download",_downloads:"folder-download",_draft:"folder-mock",_drafts:"folder-mock",_drizzle:"folder-drizzle",_ds_store:"folder-macos",_dump:"folder-dump",_dumps:"folder-dump",_e2e:"folder-coverage",_easing:"folder-animation",_easings:"folder-animation",_element:"folder-element",_elements:"folder-element",_email:"folder-mail",_emails:"folder-mail",_enum:"folder-enum",_enums:"folder-enum",_env:"folder-environment",_environment:"folder-environment",_environments:"folder-environment",_envs:"folder-environment",_err:"folder-error",_error:"folder-error",_errors:"folder-error",_errs:"folder-error",_eslint:"folder-eslint","_eslint-config":"folder-eslint","_eslint-configs":"folder-eslint","_eslint-plugin":"folder-eslint","_eslint-plugins":"folder-eslint",_etc:"folder-other",_event:"folder-event",_events:"folder-event",_example:"folder-examples",_examples:"folder-examples",_expo:"folder-expo","_expo-shared":"folder-expo",_export:"folder-export",_exported:"folder-export",_exports:"folder-export",_extension:"folder-plugin",_extensions:"folder-plugin",_external:"folder-lib",_externals:"folder-lib",_extra:"folder-other",_extras:"folder-other",_fastlane:"folder-fastlane",_favicon:"folder-favicon",_favicons:"folder-favicon",_feat:"folder-features",_feats:"folder-features",_feature:"folder-features",_features:"folder-features",_fig:"folder-images",_figs:"folder-images",_figure:"folder-images",_figures:"folder-images",_filter:"folder-filter",_filters:"folder-filter",_firebase:"folder-firebase","_firebase-cloud-functions":"folder-cloud-functions","_firebase-cloudfunctions":"folder-cloud-functions","_firebase-firestore":"folder-firestore",_firestore:"folder-firestore",_fixture:"folder-mock",_fixtures:"folder-mock","_flow-typed":"folder-flow",_flutter:"folder-flutter",_font:"folder-font",_fonts:"folder-font",_forgejo:"folder-forgejo",_form:"folder-form",_forms:"folder-form",_forum:"folder-messages",_fragments:"folder-components",_frontend:"folder-client",_frontends:"folder-client",_func:"folder-functions",_funcs:"folder-functions",_function:"folder-functions",_functions:"folder-functions",_game:"folder-console",_gamemaker:"folder-gamemaker",_gamemaker2:"folder-gamemaker",_games:"folder-console",_gcp:"folder-aws",_gemini:"folder-gemini-ai","_gemini-ai":"folder-gemini-ai",_geminiai:"folder-gemini-ai",_gen:"folder-generator",_generated:"folder-generator",_generator:"folder-generator",_generators:"folder-generator",_gens:"folder-generator",_git:"folder-git",_gitea:"folder-gitea",_githooks:"folder-git",_github:"folder-github","_github/issue_template":"folder-template","_github/pull_request_template":"folder-template","_github/workflows":"folder-gh-workflows",_gitlab:"folder-gitlab",_global:"folder-global",_glsl:"folder-shader",_go:"folder-go",_godot:"folder-godot","_godot-cpp":"folder-godot",_golang:"folder-go",_gql:"folder-graphql",_gradle:"folder-gradle",_graphql:"folder-graphql",_guard:"folder-guard",_guards:"folder-guard",_gui:"folder-ui",_gulp:"folder-gulp","_gulp-tasks":"folder-gulp","_gulpfile.babel.js":"folder-gulp","_gulpfile.js":"folder-gulp","_gulpfile.mjs":"folder-gulp","_gulpfile.ts":"folder-gulp",_gulpfiles:"folder-gulp",_handler:"folder-controller",_handlers:"folder-controller",_helm:"folder-helm",_helmchart:"folder-helm",_helmcharts:"folder-helm",_helper:"folder-helper",_helpers:"folder-helper",_hg:"folder-mercurial",_hgext:"folder-mercurial",_hghooks:"folder-mercurial",_histories:"folder-backup",_history:"folder-backup",_hlsl:"folder-shader",_home:"folder-home",_hook:"folder-hook",_hooks:"folder-hook",_html:"folder-views",_husky:"folder-husky",_i18n:"folder-i18n",_ico:"folder-images",_icon:"folder-images",_icons:"folder-images",_icos:"folder-images",_idea:"folder-intellij",_image:"folder-images",_images:"folder-images",_img:"folder-images",_imgs:"folder-images",_import:"folder-import",_imported:"folder-import",_imports:"folder-import",_in:"folder-input",_inc:"folder-include",_inc64:"folder-include",_include:"folder-include",_includes:"folder-include",_infra:"folder-server",_infrastructure:"folder-server",_input:"folder-input",_inputs:"folder-input",_integration:"folder-connection","_integration-test":"folder-coverage","_integration-tests":"folder-coverage",_integrations:"folder-connection",_interceptor:"folder-interceptor",_interceptors:"folder-interceptor",_interface:"folder-interface",_interfaces:"folder-interface",_internationalization:"folder-i18n",_inventories:"folder-server",_inventory:"folder-server",_io:"folder-input",_ios:"folder-ios",_ipad:"folder-macos",_iphone:"folder-macos",_ipod:"folder-macos",_ipynb:"folder-jupyter",_it:"folder-coverage",_j2:"folder-jinja",_java:"folder-java",_javascript:"folder-javascript",_javascripts:"folder-javascript",_jinja:"folder-jinja",_jinja2:"folder-jinja",_job:"folder-job",_jobs:"folder-job",_js:"folder-javascript",_json:"folder-json",_jsonc:"folder-json",_jsonl:"folder-json",_jsons:"folder-json",_jupyter:"folder-jupyter",_jwt:"folder-keys",_k8s:"folder-kubernetes",_key:"folder-keys",_keys:"folder-keys",_kit:"folder-tools",_kits:"folder-tools",_knowledge:"folder-docs",_kotlin:"folder-kotlin",_kql:"folder-kusto",_kubernetes:"folder-kubernetes",_kusto:"folder-kusto",_l10n:"folder-i18n",_lambda:"folder-functions",_lambdas:"folder-functions",_landing:"folder-home",_lang:"folder-i18n",_langs:"folder-i18n",_language:"folder-i18n",_languages:"folder-i18n",_layout:"folder-layout",_layouts:"folder-layout",_lefthook:"folder-lefthook","_lefthook-local":"folder-lefthook",_less:"folder-less",_lib:"folder-lib",_lib64:"folder-lib",_libraries:"folder-lib",_library:"folder-lib",_libs:"folder-lib",_license:"folder-license",_licenses:"folder-license",_link:"folder-link",_links:"folder-link",_linux:"folder-linux",_linuxbsd:"folder-linux",_liquibase:"folder-liquibase",_locale:"folder-i18n",_locales:"folder-i18n",_localization:"folder-i18n",_log:"folder-log",_logging:"folder-log",_logic:"folder-functions",_logs:"folder-log",_lottie:"folder-lottie",_lottiefiles:"folder-lottie",_lotties:"folder-lottie",_lua:"folder-lua",_luau:"folder-luau",_mac:"folder-macos",_macbook:"folder-macos","_macbook-air":"folder-macos",_macos:"folder-macos",_macosx:"folder-macos",_mail:"folder-mail",_mailers:"folder-mail",_mails:"folder-mail",_main:"folder-home",_manager:"folder-admin",_managers:"folder-admin",_mapping:"folder-mappings",_mappings:"folder-mappings",_markdown:"folder-markdown",_math:"folder-functions",_maths:"folder-functions",_md:"folder-markdown",_measure:"folder-benchmark",_measurement:"folder-benchmark",_measures:"folder-benchmark",_media:"folder-video",_messages:"folder-messages",_messaging:"folder-messages",_meta:"folder-meta","_meta-inf":"folder-config",_metadata:"folder-meta",_metro:"folder-metro",_middleware:"folder-middleware",_middlewares:"folder-middleware",_migration:"folder-migrations",_migrations:"folder-migrations",_mint:"folder-linux",_misc:"folder-other",_miscellaneous:"folder-other",_mjml:"folder-mjml",_mjs:"folder-javascript",_mobile:"folder-mobile",_mobiles:"folder-mobile",_mock:"folder-mock",_mocks:"folder-mock",_mod:"folder-plugin",_modding:"folder-plugin",_model:"folder-class",_models:"folder-class",_moderator:"folder-admin",_moderators:"folder-admin",_mods:"folder-plugin",_module:"folder-plugin",_modules:"folder-plugin",_mojo:"folder-mojo",_molecule:"folder-molecule",_molecules:"folder-molecule",_moon:"folder-moon",_motion:"folder-animation",_motions:"folder-animation",_movie:"folder-video",_movies:"folder-video",_mq:"folder-queue",_mts:"folder-typescript",_music:"folder-audio",_navigation:"folder-routes",_navigations:"folder-routes",_netlify:"folder-netlify",_news:"folder-docs",_next:"folder-next",_nginx:"folder-nginx",_node:"folder-node",_node_modules:"folder-node",_nodejs:"folder-node",_note:"folder-docs",_notebook:"folder-jupyter",_notebooks:"folder-jupyter",_notes:"folder-docs",_now:"folder-vercel",_nuxt:"folder-nuxt","_nyc-output":"folder-coverage",_nyc_output:"folder-coverage",_obsidian:"folder-obsidian",_opencode:"folder-opencode",_option:"folder-config",_options:"folder-config",_organism:"folder-organism",_organisms:"folder-organism",_osx:"folder-macos",_other:"folder-other",_others:"folder-other",_out:"folder-dist",_output:"folder-dist",_outputs:"folder-dist",_package:"folder-packages",_packages:"folder-packages",_pact:"folder-contract",_pacts:"folder-contract",_page:"folder-views",_pages:"folder-views",_palette:"folder-theme",_palettes:"folder-theme",_partial:"folder-include",_partials:"folder-include",_patches:"folder-git",_pdf:"folder-pdf",_pdfs:"folder-pdf","_pdm-build":"folder-pdm","_pdm-plugins":"folder-pdm",_perf:"folder-benchmark",_performance:"folder-benchmark",_phone:"folder-mobile",_phones:"folder-mobile",_photo:"folder-images",_photograph:"folder-images",_photographs:"folder-images",_photos:"folder-images",_php:"folder-php",_phpmailer:"folder-phpmailer",_pic:"folder-images",_pics:"folder-images",_picture:"folder-images",_pictures:"folder-images",_pipe:"folder-pipe",_pipeline:"folder-pipe",_pipelines:"folder-pipe",_pipes:"folder-pipe",_pkg:"folder-packages",_pkgs:"folder-packages",_plastic:"folder-plastic",_playground:"folder-sandbox",_playgrounds:"folder-sandbox",_playlist:"folder-audio",_playlists:"folder-audio",_plugin:"folder-plugin",_plugins:"folder-plugin",_policies:"folder-policy",_policy:"folder-policy",_popos:"folder-linux",_portability:"folder-mobile",_portable:"folder-mobile",_post:"folder-docs",_postman:"folder-postman",_posts:"folder-docs",_powershell:"folder-powershell",_pref:"folder-config",_preference:"folder-config",_preferences:"folder-config",_prefs:"folder-config",_presentation:"folder-ui",_preview:"folder-review",_previews:"folder-review",_prisma:"folder-prisma","_prisma/schema":"folder-prisma",_private:"folder-private",_profiling:"folder-benchmark",_proj:"folder-project",_project:"folder-project",_projects:"folder-project",_projs:"folder-project",_prompt:"folder-prompts",_prompts:"folder-prompts",_properties:"folder-config",_props:"folder-config",_proto:"folder-proto",_protobuf:"folder-proto",_protobufs:"folder-proto",_protos:"folder-proto",_provider:"folder-controller",_providers:"folder-controller",_proxy:"folder-public",_ps:"folder-powershell",_ps1:"folder-powershell",_ps4:"folder-console",_ps5:"folder-console",_public:"folder-public",_public_html:"folder-views",_pwa:"folder-client",_pycache:"folder-python",_pytest_cache:"folder-python",_python:"folder-python",_pytorch:"folder-pytorch",_quasar:"folder-quasar",_queue:"folder-queue",_queues:"folder-queue",_r:"folder-r",_recordings:"folder-audio",_release:"folder-dist",_remote:"folder-connection",_remotes:"folder-connection",_repo:"folder-repository",_report:"folder-resource",_reports:"folder-resource",_repos:"folder-repository",_repositories:"folder-repository",_repository:"folder-repository",_res:"folder-resource",_resolver:"folder-resolver",_resolvers:"folder-resolver",_resource:"folder-resource",_resources:"folder-resource",_restapi:"folder-api",_review:"folder-review",_reviewed:"folder-review",_reviews:"folder-review",_revisal:"folder-review",_revisals:"folder-review",_robot:"folder-robot",_robots:"folder-robot",_router:"folder-routes",_routers:"folder-routes",_routes:"folder-routes",_routing:"folder-routes",_rule:"folder-rules",_rules:"folder-rules",_rust:"folder-rust",_salt:"folder-salt",_saltstack:"folder-salt",_sample:"folder-examples","_sample-data":"folder-examples",_samples:"folder-examples",_sandbox:"folder-sandbox",_sandboxes:"folder-sandbox",_sass:"folder-sass",_scala:"folder-scala",_schema:"folder-class",_schemas:"folder-class",_sconf_temp:"folder-scons",_scons:"folder-scons",_scons_cache:"folder-scons",_screen:"folder-views",_screengrab:"folder-images",_screengrabs:"folder-images",_screens:"folder-views",_screenshot:"folder-images",_screenshots:"folder-images",_script:"folder-scripts",_scripting:"folder-scripts",_scripts:"folder-scripts",_scss:"folder-sass",_secret:"folder-keys",_secrets:"folder-keys",_secure:"folder-secure",_security:"folder-secure",_seed:"folder-seeders",_seeders:"folder-seeders",_seeding:"folder-seeders",_seeds:"folder-seeders",_server:"folder-server",_serverless:"folder-serverless",_serverpackages:"folder-packages",_servers:"folder-server",_service:"folder-controller",_services:"folder-controller",_setting:"folder-config",_settings:"folder-config",_shader:"folder-shader",_shaders:"folder-shader",_shared:"folder-shared",_shop:"folder-cart",_shopping:"folder-cart","_shopping-cart":"folder-cart",_sim:"folder-simulations",_sims:"folder-simulations",_simulation:"folder-simulations",_simulations:"folder-simulations",_site:"folder-public",_sketch:"folder-mock",_sketches:"folder-mock",_skill:"folder-skills",_skills:"folder-skills",_smtp:"folder-mail",_snap:"folder-snapcraft",_snapcraft:"folder-snapcraft",_snapshots:"folder-test",_snippet:"folder-snippet",_snippets:"folder-snippet",_song:"folder-audio",_songs:"folder-audio",_sound:"folder-audio",_sounds:"folder-audio",_source:"folder-src",_sources:"folder-src",_spa:"folder-client",_spec:"folder-test",_specs:"folder-test",_spellcheck:"folder-syntax",_spellcheckers:"folder-syntax",_sql:"folder-database",_src:"folder-src","_src-tauri":"folder-src-tauri",_srcs:"folder-src",_ssl:"folder-secure",_stack:"folder-stack",_stacks:"folder-stack",_start:"folder-home",_static:"folder-resource",_stencil:"folder-stencil",_store:"folder-store",_stores:"folder-store",_stories:"folder-storybook",_storybook:"folder-storybook",_style:"folder-css",_styles:"folder-css",_stylesheet:"folder-css",_stylesheets:"folder-css",_stylus:"folder-stylus",_sublime:"folder-sublime",_submodules:"folder-git",_supabase:"folder-supabase",_svelte:"folder-svelte","_svelte-kit":"folder-svelte",_svg:"folder-svg",_svgs:"folder-svg",_switch:"folder-console",_syntax:"folder-syntax",_syntaxes:"folder-syntax","_table-of-contents":"folder-toc",_target:"folder-target",_taskfile:"folder-taskfile",_taskfiles:"folder-taskfile",_tasks:"folder-tasks",_television:"folder-television",_temp:"folder-temp",_template:"folder-template",_templates:"folder-template",_terraform:"folder-terraform",_test:"folder-test",_testfiles:"folder-test",_testing:"folder-test",_tests:"folder-test",_texture:"folder-images",_textures:"folder-images",_theme:"folder-theme",_themes:"folder-theme","_third-party":"folder-lib",_thirdparty:"folder-lib",_tickets:"folder-tasks",_tls:"folder-secure",_tmp:"folder-temp",_toc:"folder-toc",_token:"folder-keys",_tokens:"folder-keys",_toolbox:"folder-tools",_toolboxes:"folder-tools",_tooling:"folder-tools",_toolkit:"folder-tools",_toolkits:"folder-tools",_tools:"folder-tools",_torch:"folder-pytorch",_transition:"folder-animation",_transitions:"folder-animation",_translate:"folder-i18n",_translation:"folder-i18n",_translations:"folder-i18n",_trash:"folder-trash",_trigger:"folder-trigger",_triggers:"folder-trigger",_ts:"folder-typescript",_turbo:"folder-turborepo",_tv:"folder-television",_tx:"folder-i18n",_typeface:"folder-font",_typefaces:"folder-font",_types:"folder-typescript",_typescript:"folder-typescript",_typings:"folder-typescript",_ubuntu:"folder-linux",_ui:"folder-ui",_unity:"folder-unity",_unix:"folder-linux",_update:"folder-update",_updates:"folder-update",_upgrade:"folder-update",_upgrades:"folder-update",_upload:"folder-upload",_uploads:"folder-upload",_util:"folder-utils",_utilities:"folder-utils",_utility:"folder-utils",_utils:"folder-utils",_ux:"folder-ui",_validation:"folder-rules",_validations:"folder-rules",_validator:"folder-rules",_validators:"folder-rules",_vector:"folder-svg",_vectors:"folder-svg",_vendor:"folder-lib",_vendors:"folder-lib",_venv:"folder-environment",_vercel:"folder-vercel",_verdaccio:"folder-verdaccio",_vid:"folder-video",_video:"folder-video",_videos:"folder-video",_vids:"folder-video",_view:"folder-views",_views:"folder-views",_vm:"folder-vm",_vms:"folder-vm",_voice:"folder-audio",_voices:"folder-audio",_vscode:"folder-vscode","_vscode-test":"folder-vscode",_vue:"folder-vue",_vuepress:"folder-vuepress",_wakatime:"folder-wakatime",_web:"folder-public",_webpack:"folder-webpack",_website:"folder-public",_websites:"folder-public",_widget:"folder-components",_widgets:"folder-components",_wiki:"folder-docs",_win:"folder-windows",_win10:"folder-windows",_win11:"folder-windows",_win32:"folder-windows",_windows:"folder-windows",_windows10:"folder-windows",_windows11:"folder-windows",_windowsnt:"folder-windows",_windowsxp:"folder-windows",_winnt:"folder-windows",_winxp:"folder-windows","_wordpress-org":"folder-wordpress","_wp-content":"folder-wordpress",_wsl:"folder-linux",_www:"folder-public",_wwwroot:"folder-public",_xbox:"folder-console",_xtask:"folder-scripts",_yarn:"folder-yarn",_zeabur:"folder-zeabur",_zed:"folder-zed",addin:"folder-plugin",addins:"folder-plugin",addon:"folder-plugin",addons:"folder-plugin",admin:"folder-admin",admins:"folder-admin",agent:"folder-robot",agents:"folder-robot",android:"folder-android",angular:"folder-angular",anim:"folder-animation",animated:"folder-animation",animation:"folder-animation",animations:"folder-animation",anims:"folder-animation",ansible:"folder-ansible",api:"folder-api",apis:"folder-api",apollo:"folder-apollo","apollo-cache":"folder-apollo","apollo-client":"folder-apollo","apollo-config":"folder-apollo",app:"folder-app",apple:"folder-macos",application:"folder-app",applications:"folder-app",apps:"folder-app",appwrite:"folder-appwrite",arc:"folder-archive",archival:"folder-archive",archive:"folder-archive",archives:"folder-archive",arcs:"folder-archive",article:"folder-docs",articles:"folder-docs",asm:"folder-assembly",assembly:"folder-assembly",asset:"folder-resource",assets:"folder-resource",astro:"folder-astro",atom:"folder-atom",atoms:"folder-atom",attachment:"folder-attachment",attachments:"folder-attachment",aud:"folder-audio",audio:"folder-audio",audios:"folder-audio",auds:"folder-audio",aurelia_project:"folder-aurelia",auth:"folder-secure",authentication:"folder-secure",auto:"folder-generator",aws:"folder-aws",azure:"folder-aws","azure-pipelines":"folder-azure-pipelines","azure-pipelines-ci":"folder-azure-pipelines","back-up":"folder-backup","back-ups":"folder-backup",backend:"folder-server",backends:"folder-server",backup:"folder-backup",backups:"folder-backup",bak:"folder-backup",baks:"folder-backup",base:"folder-base",bases:"folder-base",batch:"folder-batch",batches:"folder-batch",batchs:"folder-batch",bench:"folder-benchmark",benches:"folder-benchmark",benchmark:"folder-benchmark",benchmarks:"folder-benchmark",bibliographies:"folder-bibliography",bibliography:"folder-bibliography",bicep:"folder-bicep",bin:"folder-dist",bkp:"folder-backup",bkps:"folder-backup",blender:"folder-blender","blender-assets":"folder-blender","blender-files":"folder-blender","blender-models":"folder-blender","blender-project":"folder-blender",bloc:"folder-bloc",blocs:"folder-bloc",blog:"folder-docs",book:"folder-bibliography",books:"folder-bibliography",bot:"folder-robot",bots:"folder-robot",bower_components:"folder-bower",browser:"folder-public",browsers:"folder-public",build:"folder-dist",buildkite:"folder-buildkite",builds:"folder-dist",built:"folder-dist",bull:"folder-queue",cache:"folder-temp",cached:"folder-temp",calc:"folder-functions",calcs:"folder-functions",calculation:"folder-functions",calculations:"folder-functions",cargo:"folder-rust",cart:"folder-cart",centos:"folder-linux",cert:"folder-secure",certificate:"folder-secure",certificates:"folder-secure",certs:"folder-secure",cfg:"folder-config",cfgs:"folder-config","cfn-gen":"folder-generator",changes:"folder-delta",changeset:"folder-changesets",changesets:"folder-changesets",chat:"folder-messages",chats:"folder-messages",ci:"folder-ci",cipher:"folder-secure",circleci:"folder-circleci",cjs:"folder-javascript",class:"folder-class",classes:"folder-class",claude:"folder-claude",cli:"folder-command",client:"folder-client",clients:"folder-client",cline_docs:"folder-cline",clis:"folder-command","cloud-firestore":"folder-firestore","cloud-functions":"folder-cloud-functions",cloudflare:"folder-cloudflare",cloudfunctions:"folder-cloud-functions",cluster:"folder-cluster",clusters:"folder-cluster",cmd:"folder-command",cobol:"folder-cobol",code:"folder-src",color:"folder-theme",colors:"folder-theme",colour:"folder-theme",colours:"folder-theme",command:"folder-command",commandline:"folder-command",commands:"folder-command",common:"folder-shared",compiled:"folder-dist",components:"folder-components",composable:"folder-functions",composables:"folder-functions",concept:"folder-mock",concepts:"folder-mock",conf:"folder-config",config:"folder-config",configs:"folder-config",configuration:"folder-config",configurations:"folder-config",confs:"folder-config",connection:"folder-connection",connections:"folder-connection",console:"folder-console",const:"folder-constant",constant:"folder-constant",constants:"folder-constant",consts:"folder-constant",container:"folder-container",containers:"folder-container",content:"folder-content",contents:"folder-content",context:"folder-context",contexts:"folder-context",contract:"folder-contract","contract-test":"folder-contract","contract-testing":"folder-contract","contract-tests":"folder-contract",contracts:"folder-contract",controller:"folder-controller",controllers:"folder-controller",controls:"folder-controller",conversation:"folder-messages",conversations:"folder-messages",core:"folder-core",coverage:"folder-coverage",crash:"folder-error",crashes:"folder-error",crates:"folder-lib",css:"folder-css",cts:"folder-typescript",cubit:"folder-bloc",cubits:"folder-bloc",cue:"folder-cue",cues:"folder-cue",cursor:"folder-cursor",custom:"folder-custom",customs:"folder-custom",cypher:"folder-secure",cypress:"folder-cypress",dal:"folder-dal",dart:"folder-dart",dart_tool:"folder-dart",dart_tools:"folder-dart",data:"folder-database","data-access":"folder-dal","data-access-layer":"folder-dal",database:"folder-database",databases:"folder-database",db:"folder-database",deb:"folder-linux",debian:"folder-linux",debug:"folder-debug",debugger:"folder-debug",debugging:"folder-debug",decorator:"folder-decorators",decorators:"folder-decorators",deepin:"folder-linux",delta:"folder-delta",deltas:"folder-delta",demo:"folder-examples",demos:"folder-examples",dependencies:"folder-packages",design:"folder-theme",designs:"folder-theme",desktop:"folder-desktop",devcontainer:"folder-container",devpackages:"folder-packages",devtools:"folder-tools",dialog:"folder-messages",dialogs:"folder-messages",diary:"folder-docs",directive:"folder-directive",directives:"folder-directive",display:"folder-desktop",dist:"folder-dist",distribution:"folder-dist",doc:"folder-docs",docker:"folder-docker",dockerfiles:"folder-docker",dockerhub:"folder-docker",docs:"folder-docs",document:"folder-docs",documentation:"folder-docs",documents:"folder-docs",download:"folder-download",downloader:"folder-download",downloaders:"folder-download",downloads:"folder-download",draft:"folder-mock",drafts:"folder-mock",drizzle:"folder-drizzle",ds_store:"folder-macos",dump:"folder-dump",dumps:"folder-dump",e2e:"folder-coverage",easing:"folder-animation",easings:"folder-animation",element:"folder-element",elements:"folder-element",email:"folder-mail",emails:"folder-mail",enum:"folder-enum",enums:"folder-enum",env:"folder-environment",environment:"folder-environment",environments:"folder-environment",envs:"folder-environment",err:"folder-error",error:"folder-error",errors:"folder-error",errs:"folder-error",eslint:"folder-eslint","eslint-config":"folder-eslint","eslint-configs":"folder-eslint","eslint-plugin":"folder-eslint","eslint-plugins":"folder-eslint",etc:"folder-other",event:"folder-event",events:"folder-event",example:"folder-examples",examples:"folder-examples",expo:"folder-expo","expo-shared":"folder-expo",export:"folder-export",exported:"folder-export",exports:"folder-export",extension:"folder-plugin",extensions:"folder-plugin",external:"folder-lib",externals:"folder-lib",extra:"folder-other",extras:"folder-other",fastlane:"folder-fastlane",favicon:"folder-favicon",favicons:"folder-favicon",feat:"folder-features",feats:"folder-features",feature:"folder-features",features:"folder-features",fig:"folder-images",figs:"folder-images",figure:"folder-images",figures:"folder-images",filter:"folder-filter",filters:"folder-filter",firebase:"folder-firebase","firebase-cloud-functions":"folder-cloud-functions","firebase-cloudfunctions":"folder-cloud-functions","firebase-firestore":"folder-firestore",firestore:"folder-firestore",fixture:"folder-mock",fixtures:"folder-mock","flow-typed":"folder-flow",flutter:"folder-flutter",font:"folder-font",fonts:"folder-font",forgejo:"folder-forgejo",form:"folder-form",forms:"folder-form",forum:"folder-messages",fragments:"folder-components",frontend:"folder-client",frontends:"folder-client",func:"folder-functions",funcs:"folder-functions",function:"folder-functions",functions:"folder-functions",game:"folder-console",gamemaker:"folder-gamemaker",gamemaker2:"folder-gamemaker",games:"folder-console",gcp:"folder-aws",gemini:"folder-gemini-ai","gemini-ai":"folder-gemini-ai",geminiai:"folder-gemini-ai",gen:"folder-generator",generated:"folder-generator",generator:"folder-generator",generators:"folder-generator",gens:"folder-generator",git:"folder-git",gitea:"folder-gitea",githooks:"folder-git",github:"folder-github","github/issue_template":"folder-template","github/pull_request_template":"folder-template","github/workflows":"folder-gh-workflows",gitlab:"folder-gitlab",global:"folder-global",glsl:"folder-shader",go:"folder-go",godot:"folder-godot","godot-cpp":"folder-godot",golang:"folder-go",gql:"folder-graphql",gradle:"folder-gradle",graphql:"folder-graphql",guard:"folder-guard",guards:"folder-guard",gui:"folder-ui",gulp:"folder-gulp","gulp-tasks":"folder-gulp","gulpfile.babel.js":"folder-gulp","gulpfile.js":"folder-gulp","gulpfile.mjs":"folder-gulp","gulpfile.ts":"folder-gulp",gulpfiles:"folder-gulp",handler:"folder-controller",handlers:"folder-controller",helm:"folder-helm",helmchart:"folder-helm",helmcharts:"folder-helm",helper:"folder-helper",helpers:"folder-helper",hg:"folder-mercurial",hgext:"folder-mercurial",hghooks:"folder-mercurial",histories:"folder-backup",history:"folder-backup",hlsl:"folder-shader",home:"folder-home",hook:"folder-hook",hooks:"folder-hook",html:"folder-views",husky:"folder-husky",i18n:"folder-i18n",ico:"folder-images",icon:"folder-images",icons:"folder-images",icos:"folder-images",idea:"folder-intellij",image:"folder-images",images:"folder-images",img:"folder-images",imgs:"folder-images",import:"folder-import",imported:"folder-import",imports:"folder-import",in:"folder-input",inc:"folder-include",inc64:"folder-include",include:"folder-include",includes:"folder-include",infra:"folder-server",infrastructure:"folder-server",input:"folder-input",inputs:"folder-input",integration:"folder-connection","integration-test":"folder-coverage","integration-tests":"folder-coverage",integrations:"folder-connection",interceptor:"folder-interceptor",interceptors:"folder-interceptor",interface:"folder-interface",interfaces:"folder-interface",internationalization:"folder-i18n",inventories:"folder-server",inventory:"folder-server",io:"folder-input",ios:"folder-ios",ipad:"folder-macos",iphone:"folder-macos",ipod:"folder-macos",ipynb:"folder-jupyter",it:"folder-coverage",j2:"folder-jinja",java:"folder-java",javascript:"folder-javascript",javascripts:"folder-javascript",jinja:"folder-jinja",jinja2:"folder-jinja",job:"folder-job",jobs:"folder-job",js:"folder-javascript",json:"folder-json",jsonc:"folder-json",jsonl:"folder-json",jsons:"folder-json",jupyter:"folder-jupyter",jwt:"folder-keys",k8s:"folder-kubernetes",key:"folder-keys",keys:"folder-keys",kit:"folder-tools",kits:"folder-tools",knowledge:"folder-docs",kotlin:"folder-kotlin",kql:"folder-kusto",kubernetes:"folder-kubernetes",kusto:"folder-kusto",l10n:"folder-i18n",lambda:"folder-functions",lambdas:"folder-functions",landing:"folder-home",lang:"folder-i18n",langs:"folder-i18n",language:"folder-i18n",languages:"folder-i18n",layout:"folder-layout",layouts:"folder-layout",lefthook:"folder-lefthook","lefthook-local":"folder-lefthook",less:"folder-less",lib:"folder-lib",lib64:"folder-lib",libraries:"folder-lib",library:"folder-lib",libs:"folder-lib",license:"folder-license",licenses:"folder-license",link:"folder-link",links:"folder-link",linux:"folder-linux",linuxbsd:"folder-linux",liquibase:"folder-liquibase",locale:"folder-i18n",locales:"folder-i18n",localization:"folder-i18n",log:"folder-log",logging:"folder-log",logic:"folder-functions",logs:"folder-log",lottie:"folder-lottie",lottiefiles:"folder-lottie",lotties:"folder-lottie",lua:"folder-lua",luau:"folder-luau",mac:"folder-macos",macbook:"folder-macos","macbook-air":"folder-macos",macos:"folder-macos",macosx:"folder-macos",mail:"folder-mail",mailers:"folder-mail",mails:"folder-mail",main:"folder-home",manager:"folder-admin",managers:"folder-admin",mapping:"folder-mappings",mappings:"folder-mappings",markdown:"folder-markdown",math:"folder-functions",maths:"folder-functions",md:"folder-markdown",measure:"folder-benchmark",measurement:"folder-benchmark",measures:"folder-benchmark",media:"folder-video",messages:"folder-messages",messaging:"folder-messages",meta:"folder-meta","meta-inf":"folder-config",metadata:"folder-meta",metro:"folder-metro",middleware:"folder-middleware",middlewares:"folder-middleware",migration:"folder-migrations",migrations:"folder-migrations",mint:"folder-linux",misc:"folder-other",miscellaneous:"folder-other",mjml:"folder-mjml",mjs:"folder-javascript",mobile:"folder-mobile",mobiles:"folder-mobile",mock:"folder-mock",mocks:"folder-mock",mod:"folder-plugin",modding:"folder-plugin",model:"folder-class",models:"folder-class",moderator:"folder-admin",moderators:"folder-admin",mods:"folder-plugin",module:"folder-plugin",modules:"folder-plugin",mojo:"folder-mojo",molecule:"folder-molecule",molecules:"folder-molecule",moon:"folder-moon",motion:"folder-animation",motions:"folder-animation",movie:"folder-video",movies:"folder-video",mq:"folder-queue",mts:"folder-typescript",music:"folder-audio",navigation:"folder-routes",navigations:"folder-routes",netlify:"folder-netlify",news:"folder-docs",next:"folder-next",nginx:"folder-nginx",node:"folder-node",node_modules:"folder-node",nodejs:"folder-node",note:"folder-docs",notebook:"folder-jupyter",notebooks:"folder-jupyter",notes:"folder-docs",now:"folder-vercel",nuxt:"folder-nuxt","nyc-output":"folder-coverage",nyc_output:"folder-coverage",obsidian:"folder-obsidian",opencode:"folder-opencode",option:"folder-config",options:"folder-config",organism:"folder-organism",organisms:"folder-organism",osx:"folder-macos",other:"folder-other",others:"folder-other",out:"folder-dist",output:"folder-dist",outputs:"folder-dist",package:"folder-packages",packages:"folder-packages",pact:"folder-contract",pacts:"folder-contract",page:"folder-views",pages:"folder-views",palette:"folder-theme",palettes:"folder-theme",partial:"folder-include",partials:"folder-include",patches:"folder-git",pdf:"folder-pdf",pdfs:"folder-pdf","pdm-build":"folder-pdm","pdm-plugins":"folder-pdm",perf:"folder-benchmark",performance:"folder-benchmark",phone:"folder-mobile",phones:"folder-mobile",photo:"folder-images",photograph:"folder-images",photographs:"folder-images",photos:"folder-images",php:"folder-php",phpmailer:"folder-phpmailer",pic:"folder-images",pics:"folder-images",picture:"folder-images",pictures:"folder-images",pipe:"folder-pipe",pipeline:"folder-pipe",pipelines:"folder-pipe",pipes:"folder-pipe",pkg:"folder-packages",pkgs:"folder-packages",plastic:"folder-plastic",playground:"folder-sandbox",playgrounds:"folder-sandbox",playlist:"folder-audio",playlists:"folder-audio",plugin:"folder-plugin",plugins:"folder-plugin",policies:"folder-policy",policy:"folder-policy",popos:"folder-linux",portability:"folder-mobile",portable:"folder-mobile",post:"folder-docs",postman:"folder-postman",posts:"folder-docs",powershell:"folder-powershell",pref:"folder-config",preference:"folder-config",preferences:"folder-config",prefs:"folder-config",presentation:"folder-ui",preview:"folder-review",previews:"folder-review",prisma:"folder-prisma","prisma/schema":"folder-prisma",private:"folder-private",profiling:"folder-benchmark",proj:"folder-project",project:"folder-project",projects:"folder-project",projs:"folder-project",prompt:"folder-prompts",prompts:"folder-prompts",properties:"folder-config",props:"folder-config",proto:"folder-proto",protobuf:"folder-proto",protobufs:"folder-proto",protos:"folder-proto",provider:"folder-controller",providers:"folder-controller",proxy:"folder-public",ps:"folder-powershell",ps1:"folder-powershell",ps4:"folder-console",ps5:"folder-console",public:"folder-public",public_html:"folder-views",pwa:"folder-client",pycache:"folder-python",pytest_cache:"folder-python",python:"folder-python",pytorch:"folder-pytorch",quasar:"folder-quasar",queue:"folder-queue",queues:"folder-queue",r:"folder-r",recordings:"folder-audio",release:"folder-dist",remote:"folder-connection",remotes:"folder-connection",repo:"folder-repository",report:"folder-resource",reports:"folder-resource",repos:"folder-repository",repositories:"folder-repository",repository:"folder-repository",res:"folder-resource",resolver:"folder-resolver",resolvers:"folder-resolver",resource:"folder-resource",resources:"folder-resource",restapi:"folder-api",review:"folder-review",reviewed:"folder-review",reviews:"folder-review",revisal:"folder-review",revisals:"folder-review",robot:"folder-robot",robots:"folder-robot",router:"folder-routes",routers:"folder-routes",routes:"folder-routes",routing:"folder-routes",rule:"folder-rules",rules:"folder-rules",rust:"folder-rust",salt:"folder-salt",saltstack:"folder-salt",sample:"folder-examples","sample-data":"folder-examples",samples:"folder-examples",sandbox:"folder-sandbox",sandboxes:"folder-sandbox",sass:"folder-sass",scala:"folder-scala",schema:"folder-class",schemas:"folder-class",sconf_temp:"folder-scons",scons:"folder-scons",scons_cache:"folder-scons",screen:"folder-views",screengrab:"folder-images",screengrabs:"folder-images",screens:"folder-views",screenshot:"folder-images",screenshots:"folder-images",script:"folder-scripts",scripting:"folder-scripts",scripts:"folder-scripts",scss:"folder-sass",secret:"folder-keys",secrets:"folder-keys",secure:"folder-secure",security:"folder-secure",seed:"folder-seeders",seeders:"folder-seeders",seeding:"folder-seeders",seeds:"folder-seeders",server:"folder-server",serverless:"folder-serverless",serverpackages:"folder-packages",servers:"folder-server",service:"folder-controller",services:"folder-controller",setting:"folder-config",settings:"folder-config",shader:"folder-shader",shaders:"folder-shader",shared:"folder-shared",shop:"folder-cart",shopping:"folder-cart","shopping-cart":"folder-cart",sim:"folder-simulations",sims:"folder-simulations",simulation:"folder-simulations",simulations:"folder-simulations",site:"folder-public",sketch:"folder-mock",sketches:"folder-mock",skill:"folder-skills",skills:"folder-skills",smtp:"folder-mail",snap:"folder-snapcraft",snapcraft:"folder-snapcraft",snapshots:"folder-test",snippet:"folder-snippet",snippets:"folder-snippet",song:"folder-audio",songs:"folder-audio",sound:"folder-audio",sounds:"folder-audio",source:"folder-src",sources:"folder-src",spa:"folder-client",spec:"folder-test",specs:"folder-test",spellcheck:"folder-syntax",spellcheckers:"folder-syntax",sql:"folder-database",src:"folder-src","src-tauri":"folder-src-tauri",srcs:"folder-src",ssl:"folder-secure",stack:"folder-stack",stacks:"folder-stack",start:"folder-home",static:"folder-resource",stencil:"folder-stencil",store:"folder-store",stores:"folder-store",stories:"folder-storybook",storybook:"folder-storybook",style:"folder-css",styles:"folder-css",stylesheet:"folder-css",stylesheets:"folder-css",stylus:"folder-stylus",sublime:"folder-sublime",submodules:"folder-git",supabase:"folder-supabase",svelte:"folder-svelte","svelte-kit":"folder-svelte",svg:"folder-svg",svgs:"folder-svg",switch:"folder-console",syntax:"folder-syntax",syntaxes:"folder-syntax","table-of-contents":"folder-toc",target:"folder-target",taskfile:"folder-taskfile",taskfiles:"folder-taskfile",tasks:"folder-tasks",television:"folder-television",temp:"folder-temp",template:"folder-template",templates:"folder-template",terraform:"folder-terraform",test:"folder-test",testfiles:"folder-test",testing:"folder-test",tests:"folder-test",texture:"folder-images",textures:"folder-images",theme:"folder-theme",themes:"folder-theme","third-party":"folder-lib",thirdparty:"folder-lib",tickets:"folder-tasks",tls:"folder-secure",tmp:"folder-temp",toc:"folder-toc",token:"folder-keys",tokens:"folder-keys",toolbox:"folder-tools",toolboxes:"folder-tools",tooling:"folder-tools",toolkit:"folder-tools",toolkits:"folder-tools",tools:"folder-tools",torch:"folder-pytorch",transition:"folder-animation",transitions:"folder-animation",translate:"folder-i18n",translation:"folder-i18n",translations:"folder-i18n",trash:"folder-trash",trigger:"folder-trigger",triggers:"folder-trigger",ts:"folder-typescript",turbo:"folder-turborepo",tv:"folder-television",tx:"folder-i18n",typeface:"folder-font",typefaces:"folder-font",types:"folder-typescript",typescript:"folder-typescript",typings:"folder-typescript",ubuntu:"folder-linux",ui:"folder-ui",unity:"folder-unity",unix:"folder-linux",update:"folder-update",updates:"folder-update",upgrade:"folder-update",upgrades:"folder-update",upload:"folder-upload",uploads:"folder-upload",util:"folder-utils",utilities:"folder-utils",utility:"folder-utils",utils:"folder-utils",ux:"folder-ui",validation:"folder-rules",validations:"folder-rules",validator:"folder-rules",validators:"folder-rules",vector:"folder-svg",vectors:"folder-svg",vendor:"folder-lib",vendors:"folder-lib",venv:"folder-environment",vercel:"folder-vercel",verdaccio:"folder-verdaccio",vid:"folder-video",video:"folder-video",videos:"folder-video",vids:"folder-video",view:"folder-views",views:"folder-views",vm:"folder-vm",vms:"folder-vm",voice:"folder-audio",voices:"folder-audio",vscode:"folder-vscode","vscode-test":"folder-vscode",vue:"folder-vue",vuepress:"folder-vuepress",wakatime:"folder-wakatime",web:"folder-public",webpack:"folder-webpack",website:"folder-public",websites:"folder-public",widget:"folder-components",widgets:"folder-components",wiki:"folder-docs",win:"folder-windows",win10:"folder-windows",win11:"folder-windows",win32:"folder-windows",windows:"folder-windows",windows10:"folder-windows",windows11:"folder-windows",windowsnt:"folder-windows",windowsxp:"folder-windows",winnt:"folder-windows",winxp:"folder-windows","wordpress-org":"folder-wordpress","wp-content":"folder-wordpress",wsl:"folder-linux",www:"folder-public",wwwroot:"folder-public",xbox:"folder-console",xtask:"folder-scripts",yarn:"folder-yarn",zeabur:"folder-zeabur",zed:"folder-zed"},Mk={".autorc":"auto_light",".browserslistrc":"browserlist_light",".bun-version":"bun_light",".codeclimate.yml":"code-climate_light",".config/releaserc":"semantic-release_light",".config/releaserc.cjs":"semantic-release_light",".config/releaserc.cts":"semantic-release_light",".config/releaserc.js":"semantic-release_light",".config/releaserc.json":"semantic-release_light",".config/releaserc.json5":"semantic-release_light",".config/releaserc.jsonc":"semantic-release_light",".config/releaserc.mjs":"semantic-release_light",".config/releaserc.mts":"semantic-release_light",".config/releaserc.toml":"semantic-release_light",".config/releaserc.ts":"semantic-release_light",".config/releaserc.yaml":"semantic-release_light",".config/releaserc.yml":"semantic-release_light",".config/stylelintrc":"stylelint_light",".config/stylelintrc.cjs":"stylelint_light",".config/stylelintrc.cts":"stylelint_light",".config/stylelintrc.js":"stylelint_light",".config/stylelintrc.json":"stylelint_light",".config/stylelintrc.json5":"stylelint_light",".config/stylelintrc.jsonc":"stylelint_light",".config/stylelintrc.mjs":"stylelint_light",".config/stylelintrc.mts":"stylelint_light",".config/stylelintrc.toml":"stylelint_light",".config/stylelintrc.ts":"stylelint_light",".config/stylelintrc.yaml":"stylelint_light",".config/stylelintrc.yml":"stylelint_light",".copilotignore":"copilot_light",".cursor":"cursor_light",".cursor.json":"cursor_light",".cursorignore":"cursor_light",".cursorindexingignore":"cursor_light",".cursorrc":"cursor_light",".cursorrules":"cursor_light",".drone.yml":"drone_light",".easignore":"expo_light",".nano-staged.cjs":"nano-staged_light",".nano-staged.js":"nano-staged_light",".nano-staged.json":"nano-staged_light",".nano-staged.mjs":"nano-staged_light",".nanostagedrc":"nano-staged_light",".nowignore":"vercel_light",".pnpmfile.cjs":"pnpm_light",".releaserc":"semantic-release_light",".releaserc.cjs":"semantic-release_light",".releaserc.cts":"semantic-release_light",".releaserc.js":"semantic-release_light",".releaserc.json":"semantic-release_light",".releaserc.json5":"semantic-release_light",".releaserc.jsonc":"semantic-release_light",".releaserc.mjs":"semantic-release_light",".releaserc.mts":"semantic-release_light",".releaserc.toml":"semantic-release_light",".releaserc.ts":"semantic-release_light",".releaserc.yaml":"semantic-release_light",".releaserc.yml":"semantic-release_light",".rubocop-todo.yml":"rubocop_light",".rubocop.yml":"rubocop_light",".rubocop_todo.yml":"rubocop_light",".shellcheckrc":"shellcheck_light",".stylelintcache":"stylelint_light",".stylelintignore":"stylelint_light",".stylelintrc":"stylelint_light",".stylelintrc.cjs":"stylelint_light",".stylelintrc.cts":"stylelint_light",".stylelintrc.js":"stylelint_light",".stylelintrc.json":"stylelint_light",".stylelintrc.json5":"stylelint_light",".stylelintrc.jsonc":"stylelint_light",".stylelintrc.mjs":"stylelint_light",".stylelintrc.mts":"stylelint_light",".stylelintrc.toml":"stylelint_light",".stylelintrc.ts":"stylelint_light",".stylelintrc.yaml":"stylelint_light",".stylelintrc.yml":"stylelint_light",".vercelignore":"vercel_light",".wakatime-project":"wakatime_light","auto-config.js":"auto_light","auto-config.json":"auto_light","auto-config.ts":"auto_light","auto-config.yaml":"auto_light","auto-config.yml":"auto_light","auto.config.js":"auto_light","auto.config.ts":"auto_light",browserslist:"browserlist_light","bun.lock":"bun_light","bun.lockb":"bun_light","bunfig.toml":"bun_light","circle.yml":"circleci_light","copilot-instructions.md":"copilot_light","deno.json":"deno_light","deno.jsonc":"deno_light","deno.lock":"deno_light","eas.json":"expo_light",hosts:"hosts_light","jsr.json":"jsr_light","jsr.jsonc":"jsr_light","nano-staged.cjs":"nano-staged_light","nano-staged.js":"nano-staged_light","nano-staged.json":"nano-staged_light","nano-staged.mjs":"nano-staged_light","netlify.json":"netlify_light","netlify.toml":"netlify_light","netlify.yaml":"netlify_light","netlify.yml":"netlify_light","next.config.js":"next_light","next.config.mjs":"next_light","next.config.mts":"next_light","next.config.ts":"next_light","now.json":"vercel_light","openapi.json":"openapi_light","openapi.yaml":"openapi_light","openapi.yml":"openapi_light","opencode.json":"opencode_light","opencode.jsonc":"opencode_light","payload.config.js":"payload_light","payload.config.mjs":"payload_light","payload.config.mts":"payload_light","payload.config.ts":"payload_light","pnpm-lock.yaml":"pnpm_light","pnpm-workspace.yaml":"pnpm_light","release.config.cjs":"semantic-release_light","release.config.cts":"semantic-release_light","release.config.js":"semantic-release_light","release.config.json":"semantic-release_light","release.config.json5":"semantic-release_light","release.config.jsonc":"semantic-release_light","release.config.mjs":"semantic-release_light","release.config.mts":"semantic-release_light","release.config.toml":"semantic-release_light","release.config.ts":"semantic-release_light","release.config.yaml":"semantic-release_light","release.config.yml":"semantic-release_light","remix.config.js":"remix_light","remix.config.ts":"remix_light",sconscript:"scons_light",sconstruct:"scons_light",scsub:"scons_light",shellcheckrc:"shellcheck_light","snowpack.config.cjs":"snowpack_light","snowpack.config.cts":"snowpack_light","snowpack.config.js":"snowpack_light","snowpack.config.json":"snowpack_light","snowpack.config.mjs":"snowpack_light","snowpack.config.mts":"snowpack_light","snowpack.config.ts":"snowpack_light","snowpack.deps.json":"snowpack_light","stitches.config.js":"stitches_light","stitches.config.ts":"stitches_light","stylelint.config.cjs":"stylelint_light","stylelint.config.cts":"stylelint_light","stylelint.config.js":"stylelint_light","stylelint.config.json":"stylelint_light","stylelint.config.json5":"stylelint_light","stylelint.config.jsonc":"stylelint_light","stylelint.config.mjs":"stylelint_light","stylelint.config.mts":"stylelint_light","stylelint.config.toml":"stylelint_light","stylelint.config.ts":"stylelint_light","stylelint.config.yaml":"stylelint_light","stylelint.config.yml":"stylelint_light","turbo.json":"turborepo_light","turbo.jsonc":"turborepo_light","vercel.json":"vercel_light","vercel.ts":"vercel_light","warp.md":"warp_light","zeabur.json":"zeabur_light","zeabur.json5":"zeabur_light","zeabur.jsonc":"zeabur_light","zeabur.toml":"zeabur_light","zeabur.yaml":"zeabur_light","zeabur.yml":"zeabur_light"},wH={".wakatime-project":"wakatime_light",ai:"adobe-illustrator_light",ait:"adobe-illustrator_light",blink:"blink_light",cr:"crystal_light","drone.yml":"drone_light",ecr:"crystal_light",fen:"chess_light",hcl:"hcl_light",huff:"huff_light",iuml:"uml_light",j2:"jinja_light",jinja:"jinja_light","jinja-html":"jinja_light",jinja2:"jinja_light","openapi.json":"openapi_light","openapi.yaml":"openapi_light","openapi.yml":"openapi_light",pgn:"chess_light",plantuml:"uml_light",psb:"adobe-photoshop_light",psd:"adobe-photoshop_light",psdt:"adobe-photoshop_light",pu:"uml_light",puml:"uml_light",tldr:"tldraw_light",tofu:"opentofu_light",toml:"toml_light",verse:"verse_light",wsd:"uml_light",zeabur:"zeabur_light"},Ak={"-cursor":"folder-cursor_light","-idea":"folder-intellij_light","-j2":"folder-jinja_light","-jinja":"folder-jinja_light","-jinja2":"folder-jinja_light",".cursor":"folder-cursor_light",".idea":"folder-intellij_light",".j2":"folder-jinja_light",".jinja":"folder-jinja_light",".jinja2":"folder-jinja_light",__cursor__:"folder-cursor_light",__idea__:"folder-intellij_light",__j2__:"folder-jinja_light",__jinja2__:"folder-jinja_light",__jinja__:"folder-jinja_light",_cursor:"folder-cursor_light",_idea:"folder-intellij_light",_j2:"folder-jinja_light",_jinja:"folder-jinja_light",_jinja2:"folder-jinja_light",cursor:"folder-cursor_light",idea:"folder-intellij_light",j2:"folder-jinja_light",jinja:"folder-jinja_light",jinja2:"folder-jinja_light"},Tk={pug:'',just:'',json:'',playwright:'',xml:'',javascript:'',rocket:'',routing:'',settings:'',typedoc:'',"markdoc-config":'',"astro-config":'',visualstudio:'',"go-mod":'',"python-misc":'',ruff:'',uv:'',scons:'',console:'',excalidraw:'',gradle:'',license:'',unlicense:'',key:'',keystatic:'',ruby:'',gemfile:'',rubocop:'',rspec:'',swift:'',docker:'',latexmk:'',email:'',graphql:'',xaml:'',happo:'',chromatic:'',git:'',lua:'',r:'',dart:'',cmake:'',semgrep:'',"vue-config":'',nuxt:'',harmonix:'',lock:'',angular:'',mjml:'',vercel:'',liara:'',verdaccio:'',payload:'',next:'',remark:'',remix:'',laravel:'',vfl:'',kl:'',postcss:'',posthtml:'',todo:'',cabal:'',http:'',graphcool:'',webpack:'',rstack:'',lynx:'',ionic:'',gulp:'',nodejs:'',npm:'',yarn:'',android:'',tune:'',turborepo:'',babel:'',blitz:'',contributing:'',readme:'',changelog:'',architecture:'',credits:'',authors:'',flow:'',favicon:'',karma:'',bithound:'',svgo:'',appveyor:'',travis:'',codecov:'',sonarcloud:'',protractor:'',fusebox:'',heroku:'',editorconfig:'',bower:'',eslint:'',conduct:'',watchman:'',aurelia:'',auto:'',mocha:'',jenkins:'',firebase:'',rollup:'',hack:'',hardhat:'',stylelint:'',"code-climate":'',prettier:'',renovate:'',apollo:'',nodemon:'',webhint:'',browserlist:'',snyk:'',drone:'',opencode:'',sequelize:'',gatsby:'',wakatime:'',circleci:'',cloudfoundry:'',grunt:'',jest:'',fastlane:'',helm:'',wallaby:'',stencil:'',makefile:'',"semantic-release":'',bitbucket:'',bazel:'',"godot-assets":'',"azure-pipelines":'',vagrant:'',prisma:'',istanbul:'',tailwindcss:'',buildkite:'',netlify:'',svelte:'',nest:'',moon:'',percy:'',gitpod:'',stackblitz:'',codeowners:'',gcp:'',amplify:'',husky:'',tilt:'',capacitor:'',adonis:'',meson:'',commitizen:'',commitlint:'',buck:'',nx:'',dune:'',roadmap:'',nuget:'',stryker:'',modernizr:'',slug:'',stitches:'',nginx:'',minecraft:'',replit:'',duc:'',snowpack:'',quasar:'',dependabot:'',vite:'',vitest:'',velite:'',rolldown:'',lerna:'',windicss:'',textlint:'',vlang:'',sentry:'',contentlayer:'',phpunit:'',"php-cs-fixer":'',robots:'',tsconfig:'',tauri:'',jsconfig:'',maven:'',serverless:'',supabase:'',ember:'',horusec:'',poetry:'',pdm:'',parcel:'',astyle:'',lighthouse:'',svgr:'',rome:'',cypress:'',plop:'',tobimake:'',gleam:'',pnpm:'',gridsome:'',steadybit:'',caddy:'',openapi:'',swagger:'',bun:'',"nano-staged":'',knip:'',taskfile:'',craco:'',mercurial:'',deno:'',plastic:'',typst:'',unocss:'',"ifanr-cloud":'',concourse:'',syncpack:'',werf:'',luau:'',wally:'',panda:'',biome:'',esbuild:'',drizzle:'',puppeteer:'',garden:'',pkl:'',kubernetes:'',phpstan:'',screwdriver:'',snapcraft:'',kcl:'',clangd:'',markdownlint:'',trigger:'',deepsource:'',jsr:'',"coderabbit-ai":'',"gemini-ai":'',taze:'',wxt:'',lefthook:'',label:'',zeabur:'',copilot:'',"pre-commit":'',lintstaged:'',histoire:'',installation:'',"github-sponsors":'',"minecraft-fabric":'',umi:'',"pm2-ecosystem":'',hosts:'',citation:'',xmake:'',wrangler:'',cline:'',packship:'',snakemake:'',hadolint:'',tsdoc:'',oxc:'',claude:'',cursor:'',metro:'',bashly:'',google:'',shellcheck:'',warp:'',skill:'',tsdown:'',appwrite:'',expo:'',slint:'',html:'',markdown:'',blink:'',css:'',sass:'',less:'',json_schema:'',hjson:'',jinja:'',proto:'',prompt:'',sublime:'',simulink:'',quarto:'',twine:'',yaml:'',toml:'',toon:'',image:'',palette:'',react:'',react_ts:'',typescript:'',"typescript-def":'',markdoc:'',markojs:'',astro:'',pdf:'',table:'',vscode:'',varnish:'',database:'',kusto:'',csharp:'',qsharp:'',zip:'',vala:'',zig:'',exe:'',hex:'',java:'',jar:'',javaclass:'',c3:'',c:'',h:'',hip:'',cpp:'',hpp:'',"objective-c":'',"objective-cpp":'',rc:'',go:'',python:'',url:'',powershell:'',word:'',certificate:'',font:'',lib:'',bibliography:'',"bibtex-style":'',dll:'',fsharp:'',arduino:'',tex:'',context:'',"doctex-installer":'',bbx:'',cbx:'',lbx:'',powerpoint:'',video:'',virtual:'',vedic:'',audio:'',coffee:'',document:'',lyric:'',rust:'',raml:'',haskell:'',kotlin:'',otne:'',diff:'',clojure:'',groovy:'',dart_generated:'',actionscript:'',mxml:'',autohotkey:'',flash:'',"adobe-swc":'',swc:'',assembly:'',vue:'',ocaml:'',odin:'',onnx:'',"javascript-map":'',"css-map":'',handlebars:'',perl:'',haxe:'',"test-ts":'',"test-jsx":'',"test-js":'',puppet:'',elixir:'',livescript:'',erlang:'',twig:'',julia:'',elm:'',purescript:'',smarty:'',stylus:'',reason:'',bucklescript:'',merlin:'',verilog:'',mathematica:'',wolframlanguage:'',nunjucks:'',robot:'',solidity:'',autoit:'',haml:'',yang:'',terraform:'',opentofu:'',applescript:'',cake:'',cucumber:'',nim:'',apiblueprint:'',riot:'',coldfusion:'',nix:'',slim:'',restql:'',kivy:'',sbt:'',gitlab:'',figma:'',huff:'',crystal:'',cuda:'',log:'',dotjs:'',ejs:'',processing:'',storybook:'',wepy:'',hcl:'',san:'',quokka:'',django:'',red:'',foxpro:'',i18n:'',webassembly:'',jupyter:'',d:'',mdx:'',mdsvex:'',ballerina:'',racket:'',mint:'',velocity:'',godot:'',azure:'',razor:'',abc:'',asciidoc:'',edge:'',scheme:'',lisp:'',"3d":'',svg:'',"adobe-illustrator":'',"adobe-photoshop":'',vim:'',moonscript:'',advpl:'',disc:'',fortran:'',tcl:'',liquid:'',prolog:'',coconut:'',sketch:'',pawn:'',forth:'',uml:'',dhall:'',sml:'',opam:'',imba:'',drawio:'',pascal:'',unity:'',sas:'',command:'',denizenscript:'',search:'',rescript:'',"rescript-interface":'',brainfuck:'',bicep:'',cobol:'',grain:'',lolcode:'',idris:'',pipeline:'',opa:'',scala:'',lilypond:'',chess:'',gemini:'',php:'',ada:'',coala:'',dinophp:'',teal:'',template:'',shader:'',siyuan:'',ndst:'',tobi:'',capnp:'',tree:'',cadence:'',antlr:'',stylable:'',pinejs:'',gamemaker:'',tldraw:'',mermaid:'',mojo:'',roblox:'',rbxmk:'',spwn:'',templ:'',chrome:'',stan:'',abap:'',lottie:'',"apps-script":'',verified:'',bruno:'',cairo:'',"grafana-alloy":'',freemarker:'',tsil:'',hurl:'',cds:'',verse:'',sway:'',"bench-ts":'',"bench-jsx":'',"bench-js":'',controller:'',"dependencies-update":'',subtitles:'',beancount:'',epub:'',regedit:'',gnuplot:'',coloredpetrinets:'',pytorch:'',blender:'',"vanilla-extract":'',toc:'',cue:'',lean:'',salt:'',macaulay2:'',uiua:'',mrpack:'',"folder-rust":'',"folder-robot":'',"folder-src":'',"folder-dist":'',"folder-css":'',"folder-sass":'',"folder-television":'',"folder-desktop":'',"folder-console":'',"folder-images":'',"folder-scripts":'',"folder-node":'',"folder-javascript":'',"folder-json":'',"folder-font":'',"folder-bower":'',"folder-test":'',"folder-directive":'',"folder-jinja":'',"folder-markdown":'',"folder-pdm":'',"folder-php":'',"folder-phpmailer":'',"folder-sublime":'',"folder-docs":'',"folder-gh-workflows":'',"folder-git":'',"folder-github":'',"folder-gitea":'',"folder-gitlab":'',"folder-forgejo":'',"folder-vscode":'',"folder-views":'',"folder-vue":'',"folder-vuepress":'',"folder-expo":'',"folder-config":'',"folder-i18n":'',"folder-components":'',"folder-verdaccio":'',"folder-aurelia":'',"folder-resource":'',"folder-lib":'',"folder-theme":'',"folder-webpack":'',"folder-global":'',"folder-public":'',"folder-include":'',"folder-docker":'',"folder-nginx":'',"folder-astro":'',"folder-database":'',"folder-migrations":'',"folder-log":'',"folder-target":'',"folder-temp":'',"folder-aws":'',"folder-audio":'',"folder-video":'',"folder-kubernetes":'',"folder-import":'',"folder-export":'',"folder-wakatime":'',"folder-circleci":'',"folder-wordpress":'',"folder-gradle":'',"folder-coverage":'',"folder-class":'',"folder-other":'',"folder-lua":'',"folder-turborepo":'',"folder-typescript":'',"folder-graphql":'',"folder-routes":'',"folder-ci":'',"folder-eslint":'',"folder-benchmark":'',"folder-messages":'',"folder-less":'',"folder-gulp":'',"folder-python":'',"folder-r":'',"folder-sandbox":'',"folder-scons":'',"folder-mojo":'',"folder-moon":'',"folder-debug":'',"folder-fastlane":'',"folder-plugin":'',"folder-middleware":'',"folder-controller":'',"folder-ansible":'',"folder-server":'',"folder-client":'',"folder-tasks":'',"folder-android":'',"folder-ios":'',"folder-ui":'',"folder-upload":'',"folder-download":'',"folder-tools":'',"folder-helper":'',"folder-serverless":'',"folder-api":'',"folder-app":'',"folder-apollo":'',"folder-archive":'',"folder-backup":'',"folder-batch":'',"folder-buildkite":'',"folder-cluster":'',"folder-command":'',"folder-constant":'',"folder-container":'',"folder-content":'',"folder-context":'',"folder-core":'',"folder-delta":'',"folder-dump":'',"folder-examples":'',"folder-environment":'',"folder-functions":'',"folder-generator":'',"folder-hook":'',"folder-trigger":'',"folder-job":'',"folder-keys":'',"folder-layout":'',"folder-mail":'',"folder-mappings":'',"folder-meta":'',"folder-changesets":'',"folder-packages":'',"folder-shared":'',"folder-shader":'',"folder-stack":'',"folder-template":'',"folder-utils":'',"folder-supabase":'',"folder-private":'',"folder-linux":'',"folder-windows":'',"folder-macos":'',"folder-error":'',"folder-event":'',"folder-secure":'',"folder-custom":'',"folder-mock":'',"folder-syntax":'',"folder-vm":'',"folder-stylus":'',"folder-flow":'',"folder-rules":'',"folder-review":'',"folder-animation":'',"folder-guard":'',"folder-prisma":'',"folder-pipe":'',"folder-interceptor":'',"folder-svg":'',"folder-nuxt":'',"folder-terraform":'',"folder-mobile":'',"folder-stencil":'',"folder-firebase":'',"folder-firestore":'',"folder-cloud-functions":'',"folder-svelte":'',"folder-update":'',"folder-intellij":'',"folder-azure-pipelines":'',"folder-mjml":'',"folder-admin":'',"folder-jupyter":'',"folder-scala":'',"folder-connection":'',"folder-quasar":'',"folder-next":'',"folder-dal":'',"folder-cobol":'',"folder-yarn":'',"folder-husky":'',"folder-storybook":'',"folder-base":'',"folder-cart":'',"folder-home":'',"folder-project":'',"folder-prompts":'',"folder-interface":'',"folder-netlify":'',"folder-enum":'',"folder-contract":'',"folder-helm":'',"folder-queue":'',"folder-vercel":'',"folder-cypress":'',"folder-decorators":'',"folder-java":'',"folder-resolver":'',"folder-angular":'',"folder-unity":'',"folder-pdf":'',"folder-proto":'',"folder-plastic":'',"folder-gamemaker":'',"folder-mercurial":'',"folder-godot":'',"folder-lottie":'',"folder-taskfile":'',"folder-drizzle":'',"folder-cloudflare":'',"folder-seeders":'',"folder-store":'',"folder-bicep":'',"folder-snapcraft":'',"folder-flutter":'',"folder-snippet":'',"folder-element":'',"folder-src-tauri":'',"folder-favicon":'',"folder-features":'',"folder-lefthook":'',"folder-bloc":'',"folder-powershell":'',"folder-repository":'',"folder-luau":'',"folder-obsidian":'',"folder-trash":'',"folder-cline":'',"folder-liquibase":'',"folder-dart":'',"folder-zeabur":'',"folder-kusto":'',"folder-policy":'',"folder-attachment":'',"folder-bibliography":'',"folder-link":'',"folder-pytorch":'',"folder-blender":'',"folder-atom":'',"folder-molecule":'',"folder-organism":'',"folder-claude":'',"folder-cursor":'',"folder-gemini-ai":'',"folder-opencode":'',"folder-input":'',"folder-salt":'',"folder-simulations":'',"folder-metro":'',"folder-filter":'',"folder-toc":'',"folder-cue":'',"folder-license":'',"folder-form":'',"folder-postman":'',"folder-skills":'',"folder-zed":'',"folder-appwrite":'',"folder-assembly":'',"folder-go":'',"folder-kotlin":'',file:'',folder:'',scons_light:'',rubocop_light:'',vercel_light:'',payload_light:'',next_light:'',remix_light:'',turborepo_light:'',auto_light:'',stylelint_light:'',"code-climate_light":'',browserlist_light:'',drone_light:'',opencode_light:'',wakatime_light:'',circleci_light:'',"semantic-release_light":'',netlify_light:'',stitches_light:'',snowpack_light:'',pnpm_light:'',openapi_light:'',bun_light:'',"nano-staged_light":'',deno_light:'',jsr_light:'',zeabur_light:'',copilot_light:'',hosts_light:'',cursor_light:'',shellcheck_light:'',warp_light:'',expo_light:'',blink_light:'',jinja_light:'',toml_light:'',opentofu_light:'',huff_light:'',crystal_light:'',hcl_light:'',"adobe-illustrator_light":'',"adobe-photoshop_light":'',uml_light:'',chess_light:'',tldraw_light:'',verse_light:'',"folder-jinja_light":'',"folder-intellij_light":'',"folder-cursor_light":''};function Su(e,t){return Object.hasOwn(e,t)}function H2(e,t,n,o){const s=e[n];return!o||!Su(t,n)?s:t[n]}function kH(){return typeof window<"u"&&typeof window.matchMedia!="function"?!1:!Tp().value}function bH(e,t){const n=e.toLowerCase();if(Su(g3,e))return H2(g3,Mk,e,t);if(Su(g3,n))return H2(g3,Mk,n,t)}function _H(e,t){const o=e.toLowerCase().split(".");for(let s=1;sn.length>0).at(-1)??e}function SH(e){return e.replaceAll(/\s(?:width|height)="[^"]*"/g,"").replace(/^
-`;const i=e.attrIndex("class"),l=e.attrs?e.attrs.slice():[],r=`${s.langPrefix??"language-"}${o}`;return i<0?l.push(["class",r]):(l[i]=l[i].slice(),l[i][1]+=` ${r}`),`
${t}
-`}return`
${t}
-`}function K2(e){return!e.attrs||e.attrs.length===0?`${ko(e.content)}`:`${ko(e.content)}`}function U8(e){const t=ko(e.content);return e.attrs?`${t}
+`;const i=e.attrIndex("class"),l=e.attrs?e.attrs.slice():[],r=`${s.langPrefix??"language-"}${o}`;return i<0?l.push(["class",r]):(l[i]=l[i].slice(),l[i][1]+=` ${r}`),`
${t}
+`}return`
${t}
+`}function K2(e){return!e.attrs||e.attrs.length===0?`${ko(e.content)}`:`${ko(e.content)}`}function K8(e){const t=ko(e.content);return e.attrs?`${t} `:`
${t}
-`}function vre(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

`;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function Db(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function yre(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function Vb(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function w5(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const wre={langPrefix:"language-",xhtmlOut:!1,breaks:!1},A3=Object.prototype.hasOwnProperty,oo={code_inline(e,t){return K2(e[t])},code_block(e,t){return U8(e[t])},fence(e,t,n,o,s){const i=e[t],l=i.info?uI(i.info).trim():"",{langName:r,langAttrs:a}=wI(l),c=n.highlight,u=ko(i.content);if(!c)return f2(i,u,l,r,n);const d=c(i.content,r,a);return Bp(d)?d.then(f=>f2(i,f||u,l,r,n)):f2(i,d||u,l,r,n)},image(e,t,n,o,s){const i=e[t],l=s.renderInlineAsText(i.children||[],n,o),r=i.attrIndex("alt");return r>=0&&i.attrs?i.attrs[r][1]=l:i.attrs?i.attrs.push(["alt",l]):i.attrs=[["alt",l]],w5(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
+`}function Pre(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

`;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function Wb(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function Fre(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function qb(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function k5(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const jre={langPrefix:"language-",xhtmlOut:!1,breaks:!1},E3=Object.prototype.hasOwnProperty,oo={code_inline(e,t){return K2(e[t])},code_block(e,t){return K8(e[t])},fence(e,t,n,o,s){const i=e[t],l=i.info?pI(i.info).trim():"",{langName:r,langAttrs:a}=_I(l),c=n.highlight,u=ko(i.content);if(!c)return d2(i,u,l,r,n);const d=c(i.content,r,a);return Pp(d)?d.then(f=>d2(i,f||u,l,r,n)):d2(i,d||u,l,r,n)},image(e,t,n,o,s){const i=e[t],l=s.renderInlineAsText(i.children||[],n,o),r=i.attrIndex("alt");return r>=0&&i.attrs?i.attrs[r][1]=l:i.attrs?i.attrs.push(["alt",l]):i.attrs=[["alt",l]],k5(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
`:`
`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`},text(e,t){return ko(e[t].content)},text_special(e,t){return ko(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function Wb(e,t,n){const o=e.info?uI(e.info).trim():"",{langName:s,langAttrs:i}=wI(o),l=t.highlight,r=ko(e.content);if(!l)return f2(e,r,o,s,t);const a=l(e.content,s,i);if(Bp(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return f2(e,a||r,o,s,t)}function zh(e,t,n,o){switch(e.type){case"text":return t.text===oo.text?e.content.length===0?"":ko(e.content):null;case"text_special":return t.text_special===oo.text_special?e.content.length===0?"":ko(e.content):null;case"softbreak":return t.softbreak===oo.softbreak?o:null;case"hardbreak":return t.hardbreak===oo.hardbreak?n:null;case"html_inline":return t.html_inline===oo.html_inline?e.content:null;case"code_inline":return t.code_inline===oo.code_inline?K2(e):null;default:return null}}function kre(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===oo.text)return i.content.length===0?"":ko(i.content);break;case"text_special":if(s.text_special===oo.text_special)return i.content.length===0?"":ko(i.content);break;case"softbreak":if(s.softbreak===oo.softbreak)return t.breaks?t.xhtmlOut?`
+`},text(e,t){return ko(e[t].content)},text_special(e,t){return ko(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function Ub(e,t,n){const o=e.info?pI(e.info).trim():"",{langName:s,langAttrs:i}=_I(o),l=t.highlight,r=ko(e.content);if(!l)return d2(e,r,o,s,t);const a=l(e.content,s,i);if(Pp(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return d2(e,a||r,o,s,t)}function Rh(e,t,n,o){switch(e.type){case"text":return t.text===oo.text?e.content.length===0?"":ko(e.content):null;case"text_special":return t.text_special===oo.text_special?e.content.length===0?"":ko(e.content):null;case"softbreak":return t.softbreak===oo.softbreak?o:null;case"hardbreak":return t.hardbreak===oo.hardbreak?n:null;case"html_inline":return t.html_inline===oo.html_inline?e.content:null;case"code_inline":return t.code_inline===oo.code_inline?K2(e):null;default:return null}}function Ore(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===oo.text)return i.content.length===0?"":ko(i.content);break;case"text_special":if(s.text_special===oo.text_special)return i.content.length===0?"":ko(i.content);break;case"softbreak":if(s.softbreak===oo.softbreak)return t.breaks?t.xhtmlOut?`
`:`
`:` `;break;case"hardbreak":if(s.hardbreak===oo.hardbreak)return t.xhtmlOut?`
`:`
-`;break;case"html_inline":if(s.html_inline===oo.html_inline)return i.content;break;case"code_inline":if(s.code_inline===oo.code_inline)return K2(i);break}const l=s[i.type];if(!l)return w5(i,t.xhtmlOut===!0);const r=l(e,0,t,n,o);return typeof r=="string"?r:h4(r,i.type)}var bre=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...oo}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,l=o.xhtmlOut===!0;let r,a,c,u,d,f,p="",h="",m=!1,k="";for(let x=0;x0&&e[x-1].hidden?` -`:"";if(w==="list_item_open"&&(!y.attrs||y.attrs.length===0)&&x+3${this.renderInlineTokens($.children||[],o,s)}`,x+=3;continue}}if(x+2 -`,x+=2;continue}}}if(w==="inline"){const B=y.children||[];if(B.length===1){m||(r=i.text,a=i.text_special,c=i.softbreak,u=i.hardbreak,d=i.html_inline,f=i.code_inline,p=o.xhtmlOut?`
+`;break;case"html_inline":if(s.html_inline===oo.html_inline)return i.content;break;case"code_inline":if(s.code_inline===oo.code_inline)return K2(i);break}const l=s[i.type];if(!l)return k5(i,t.xhtmlOut===!0);const r=l(e,0,t,n,o);return typeof r=="string"?r:m4(r,i.type)}var Hre=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...oo}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,l=o.xhtmlOut===!0;let r,a,c,u,d,f,p="",h="",m=!1,k="";for(let x=0;x0&&e[x-1].hidden?` +`:"";if(w==="list_item_open"&&(!y.attrs||y.attrs.length===0)&&x+3${this.renderInlineTokens(L.children||[],o,s)}`,x+=3;continue}}if(x+2 +`,x+=2;continue}}}if(w==="inline"){const z=y.children||[];if(z.length===1){m||(r=i.text,a=i.text_special,c=i.softbreak,u=i.hardbreak,d=i.html_inline,f=i.code_inline,p=o.xhtmlOut?`
`:`
`,h=o.breaks?p:` -`,m=!0);const $=B[0];switch($.type){case"text":if(r===oo.text){k+=ko($.content);continue}break;case"text_special":if(a===oo.text_special){k+=ko($.content);continue}break;case"softbreak":if(c===oo.softbreak){k+=h;continue}break;case"hardbreak":if(u===oo.hardbreak){k+=p;continue}break;case"html_inline":if(d===oo.html_inline){k+=$.content;continue}break;case"code_inline":if(f===oo.code_inline){k+=K2($);continue}break}}k+=this.renderInlineTokens(B,o,s);continue}const M=i[w];if(!M){const B=y.attrs;if(!y.hidden){if(!B||B.length===0)switch(w){case"hr":k+=l?`


+`,m=!0);const L=z[0];switch(L.type){case"text":if(r===oo.text){k+=ko(L.content);continue}break;case"text_special":if(a===oo.text_special){k+=ko(L.content);continue}break;case"softbreak":if(c===oo.softbreak){k+=h;continue}break;case"hardbreak":if(u===oo.hardbreak){k+=p;continue}break;case"html_inline":if(d===oo.html_inline){k+=L.content;continue}break;case"code_inline":if(f===oo.code_inline){k+=K2(L);continue}break}}k+=this.renderInlineTokens(z,o,s);continue}const A=i[w];if(!A){const z=y.attrs;if(!y.hidden){if(!z||z.length===0)switch(w){case"hr":k+=l?`
`:`
`;continue;case"heading_open":k+=`<${y.tag}>`;continue;case"heading_close":k+=` `;continue;case"paragraph_open":k+=`${_}

`;continue;case"paragraph_close":k+=`

-`;continue;case"list_item_open":{const $=e[x+1];k+=_+($&&($.type==="inline"||$.hidden||$.nesting===-1&&$.tag==="li")?"
  • ":`
  • +`;continue;case"list_item_open":{const L=e[x+1];k+=_+(L&&(L.type==="inline"||L.hidden||L.nesting===-1&&L.tag==="li")?"
  • ":`
  • `);continue}case"list_item_close":k+=`
  • `;continue;case"bullet_list_open":k+=`${_}
      `;continue;case"bullet_list_close":k+=`
    @@ -704,121 +618,121 @@ ${l} `;continue;case"tr_close":k+=` `;continue;case"td_open":k+=`${_}`;continue;case"td_close":k+=` `;continue;case"th_open":k+=`${_}`;continue;case"th_close":k+=` -`;continue}else if(B.length===1){const $=B[0];if(w==="ordered_list_open"&&$[0]==="start"){k+=`${_}
      -`;continue}if(w==="td_open"&&$[0]==="style"){k+=`${_}`;continue}if(w==="th_open"&&$[0]==="style"){k+=`${_}`;continue}}}k+=this.renderToken(e,x,o);continue}if(w==="code_block"&&M===oo.code_block){k+=U8(y);continue}if(w==="fence"&&M===oo.fence){k+=Wb(y,o);continue}if(w==="html_block"&&M===oo.html_block){k+=y.content;continue}const P=M(e,x,o,s,this);typeof P=="string"?k+=P:k+=h4(P,y.type)}return k}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let l="";for(let r=0;r0&&e[t-1].hidden?` +`;continue}else if(z.length===1){const L=z[0];if(w==="ordered_list_open"&&L[0]==="start"){k+=`${_}
        +`;continue}if(w==="td_open"&&L[0]==="style"){k+=`${_}`;continue}if(w==="th_open"&&L[0]==="style"){k+=`${_}`;continue}}}k+=this.renderToken(e,x,o);continue}if(w==="code_block"&&A===oo.code_block){k+=K8(y);continue}if(w==="fence"&&A===oo.fence){k+=Ub(y,o);continue}if(w==="html_block"&&A===oo.html_block){k+=y.content;continue}const P=A(e,x,o,s,this);typeof P=="string"?k+=P:k+=m4(P,y.type)}return k}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let l="";for(let r=0;r0&&e[t-1].hidden?` `:"",u=a?`> -`:">";if(!r||r.length===0)return i===0?n.xhtmlOut?`${c}<${l} /${u}`:`${c}<${l}${u}`:i===-1?`${c}(n||(n={...t}),n);if(A3.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),A3.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(A3.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(A3.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...wre,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===oo.code_block)return U8(t);if(i==="html_block"&&s.html_block===oo.html_block)return t.content;const l=this.mergeOptions(n),r=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],l,r);const a=s[i];if(!a)return t.block?this.renderToken(e,0,l):w5(t,l.xhtmlOut===!0);if(i==="fence"&&a===oo.fence)return Wb(t,l);const c=a(e,0,l,r,this);return typeof c=="string"?c:h4(c,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return kre(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
        +`:">";if(!r||r.length===0)return i===0?n.xhtmlOut?`${c}<${l} /${u}`:`${c}<${l}${u}`:i===-1?`${c}(n||(n={...t}),n);if(E3.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),E3.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(E3.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(E3.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...jre,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===oo.code_block)return K8(t);if(i==="html_block"&&s.html_block===oo.html_block)return t.content;const l=this.mergeOptions(n),r=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],l,r);const a=s[i];if(!a)return t.block?this.renderToken(e,0,l):k5(t,l.xhtmlOut===!0);if(i==="fence"&&a===oo.fence)return Ub(t,l);const c=a(e,0,l,r,this);return typeof c=="string"?c:m4(c,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Ore(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
        `:`
        `,l=t.breaks?i:` -`,r=o.text,a=o.text_special,c=o.softbreak,u=o.hardbreak,d=o.html_inline,f=o.code_inline,p=o.link_open,h=o.link_close,m=o.em_open,k=o.em_close,x=o.strong_open,y=o.strong_close;let w="";for(let _=0;_`;if(c===oo.softbreak&&_+3`,_+=1;continue}if(M.type==="em_open"&&!m&&!k&&_+2${T}`,_+=2;continue}}}if(M.type==="strong_open"&&!x&&!y&&_+2${T}`,_+=2;continue}}}switch(M.type){case"text":if(r===oo.text){const $=M.content.length===0?"":ko(M.content);if(d===oo.html_inline&&_+1=4)return!0;continue}if(r===9){if(l+=4-l%4,i++,l>=4)return!0;continue}break}if(i0&&c<=6){if(a=3)return!0;break}default:if(r>=48&&r<=57){let a=i+1;for(;a57)break;a++}if(a=xe,!X&&Ye!==void 0&&(st=ns(e),X=st>=Ye)),X){const F=this.parseFullDocument(e,O,n,st,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(O,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ea(O)?.unbounded}),F.tokens}else if(j){const F=(ke,Se,me)=>keme?me:ke;st===void 0&&(st=ns(e));const Z=ie&&!ee?Ob(e.length,st,n.options):null,fe=Z?.maxChunkChars??(q?F(Math.ceil(e.length/K),8e3,64e3):U??1e4),ve=Z?.maxChunkLines??(q?F(Math.ceil(st/K),150,700):te??200),ge=Z?.maxChunks??(q?F(Math.ceil(e.length/64e3),K,32):J),oe=e.length>0&&e.charCodeAt(e.length-1)===10,de=R&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Z?.strategy!=="plain";if((A||de)&&(e.length>=fe*2||st>=ve*2)&&oe){const ke=y5(n,e,O,{maxChunkChars:fe,maxChunkLines:ve,fenceAware:Z?.fenceAware??Q,maxChunks:ge});return this.cache={src:e,tokens:ke,env:O,lineCount:st,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,st),this.recordChunkedParseResult(O,A?"explicit-initial-large-doc":"default-initial-large-doc"),ke}}const se=this.parseFullDocument(e,O,n,st);return st=se.lineCount,this.cache={src:e,tokens:se.tokens,env:O,lineCount:st,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,st),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(O,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ea(O)?.unbounded}),se.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",bs(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let l=s.globalStateReason;l===void 0&&(l=Oi(s.src),s.globalStateReason=l);const r=l?null:i!==null?this.detectGlobalStateForAppend(s,i):Oi(e),a=l||r;if(a){const O=o??s.env;xa(O);const H=Oi(e),D=this.parseFullDocument(e,O,n),A=D.tokens,R=D.lineCount;return this.cache={src:e,tokens:A,env:O,lineCount:R,lastSegment:void 0,globalStateReason:H},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(O,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ea(O)?.unbounded}),A}const c=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?H=8:u.length>1e3?H=6:u.length>200&&(H=4),H=Math.min(H,O);let D=null;const A=n.options?.streamContextParseStrategy??"chars",R=n.options?.streamContextParseMinChars??200,j=n.options?.streamContextParseMinLines??2;let q;const K=()=>(q===void 0&&(q=ns(u)),q),U=this.canDirectlyParseAppend(s),te=U&&this.shouldUseUnboundedAppend(e,s,u);let J=!1;if(!U)switch(A){case"lines":J=K()>=j;break;case"constructs":if(u.length>=R){J=!0;break}if(Sre(u)){J=!0;break}J=K()>=j;break;case"chars":default:J=u.length>=R}if(H>0&&J){const Q=this.getTailLines(s.src,H)+u;try{const he=this.core.parse(Q,s.env,n).tokens,xe=he.findIndex(Ye=>Ye.map&&typeof Ye.map[1]=="number"&&Ye.map[1]>H);if(xe!==-1){const Ye=he.slice(xe),st=O-H;st!==0&&this.shiftTokenLines(Ye,st),D={tokens:Ye}}}catch{D=null}}else D=null;if(!D){const Q=O;if(te)D={tokens:u2(n,u,s.env,{mode:"stream"})},Q>0&&this.shiftTokenLines(D.tokens,Q);else{const he=this.core.parse(u,s.env,n);Q>0&&this.shiftTokenLines(he.tokens,Q),D=he}}let ee=0;if(s.tokens.length>0&&D.tokens.length>0){const Q=s.tokens[s.tokens.length-1],he=D.tokens[0];try{Q.type==="inline"&&he.type==="inline"&&(he.children&&he.children.length>0&&(Q.children||(Q.children=[]),this.appendTokens(Q.children,he.children)),Q.content=(Q.content||"")+(he.content||""),ee=1)}catch{ee=0}}const ie=s.tokens.length;if(D.tokens.length>ee){const Q=s.tokens,he=D.tokens,xe=Math.min(Q.length,he.length-ee);let Ye=0;for(let st=xe;st>0;st--){let X=!0;for(let se=0;se0&&(ee+=Ye),he.length>ee&&this.appendTokens(s.tokens,he,ee)}if(s.src=e,s.globalStateReason=null,s.lineCount=O+(q??K()),s.tokens.length>ie){const Q=this.getLastSegment(s.tokens,e,ie,s.tokens.length,e.length-u.length,O);Q?s.lastSegment=Q:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,te&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",bs(s.env,{area:"stream",path:te?"stream-unbounded-append":"stream-append",reason:te?"large-delta":"safe-append",unbounded:te}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",bs(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,h=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,k=!p&&!u&&h,x=m||k,y=n.options?.streamChunkAdaptive!==!1,w=n.options?.streamChunkTargetChunks??8,_=n.options?.streamChunkSizeChars,M=n.options?.streamChunkSizeLines,P=n.options?.streamChunkMaxChunks,B=!!n.__explicitStreamChunkConfig,$=n.options?.autoTuneChunks!==!1,T=n.options?.streamChunkFenceAware??!0;let I=u&&s.lineCount!==void 0?s.lineCount+ns(u):void 0;if(x){I===void 0&&(I=ns(e));const O=(K,U,te)=>Kte?te:K,H=$&&!B?Ob(e.length,I,n.options):null,D=H?.maxChunkChars??(y?O(Math.ceil(e.length/w),8e3,64e3):_??1e4),A=H?.maxChunkLines??(y?O(Math.ceil(I/w),150,700):M??200),R=H?.maxChunks??(y?O(Math.ceil(e.length/64e3),w,32):P),j=e.length>0&&e.charCodeAt(e.length-1)===10,q=k&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&H?.strategy!=="plain";if((m||q)&&(e.length>=D*2||I>=A*2)&&j){const K=y5(n,e,d,{maxChunkChars:D,maxChunkLines:A,fenceAware:H?.fenceAware??T,maxChunks:R});return this.cache={src:e,tokens:K,env:d,lineCount:I,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,I),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),K}}const N=this.parseFullDocument(e,d,n,I),C=N.tokens;return I=N.lineCount,this.cache={src:e,tokens:C,env:d,lineCount:I,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,I),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ea(d)?.unbounded}),C}recordChunkedParseResult(e,t){const n=ea(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",bs(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!ea(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",bs(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=Oi(e);vf(t)&&xa(t);const l=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?gI(n,e.length,o):"no";if(l==="yes"){const a=u2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?ns(e):0)}}let r=o;if(l==="need-lines"&&(r=ns(e),mI(n,e.length,r))){const a=u2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:r}}return r===void 0&&(r=s?ns(e):0),{tokens:au(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:r}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:ns(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` +`,r=o.text,a=o.text_special,c=o.softbreak,u=o.hardbreak,d=o.html_inline,f=o.code_inline,p=o.link_open,h=o.link_close,m=o.em_open,k=o.em_close,x=o.strong_open,y=o.strong_close;let w="";for(let _=0;_`;if(c===oo.softbreak&&_+3`,_+=1;continue}if(A.type==="em_open"&&!m&&!k&&_+2${E}`,_+=2;continue}}}if(A.type==="strong_open"&&!x&&!y&&_+2${E}`,_+=2;continue}}}switch(A.type){case"text":if(r===oo.text){const L=A.content.length===0?"":ko(A.content);if(d===oo.html_inline&&_+1=4)return!0;continue}if(r===9){if(l+=4-l%4,i++,l>=4)return!0;continue}break}if(i0&&c<=6){if(a=3)return!0;break}default:if(r>=48&&r<=57){let a=i+1;for(;a57)break;a++}if(a=xe,!X&&Ye!==void 0&&(at=ns(e),X=at>=Ye)),X){const F=this.parseFullDocument(e,j,n,at,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(j,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ea(j)?.unbounded}),F.tokens}else if(O){const F=(be,Se,je)=>beje?je:be;at===void 0&&(at=ns(e));const K=se&&!J?Db(e.length,at,n.options):null,he=K?.maxChunkChars??(U?F(Math.ceil(e.length/Z),8e3,64e3):q??1e4),ye=K?.maxChunkLines??(U?F(Math.ceil(at/Z),150,700):te??200),ve=K?.maxChunks??(U?F(Math.ceil(e.length/64e3),Z,32):ee),ie=e.length>0&&e.charCodeAt(e.length-1)===10,de=R&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&K?.strategy!=="plain";if((M||de)&&(e.length>=he*2||at>=ye*2)&&ie){const be=w5(n,e,j,{maxChunkChars:he,maxChunkLines:ye,fenceAware:K?.fenceAware??Q,maxChunks:ve});return this.cache={src:e,tokens:be,env:j,lineCount:at,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,at),this.recordChunkedParseResult(j,M?"explicit-initial-large-doc":"default-initial-large-doc"),be}}const oe=this.parseFullDocument(e,j,n,at);return at=oe.lineCount,this.cache={src:e,tokens:oe.tokens,env:j,lineCount:at,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,at),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(j,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ea(j)?.unbounded}),oe.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",bs(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let l=s.globalStateReason;l===void 0&&(l=Oi(s.src),s.globalStateReason=l);const r=l?null:i!==null?this.detectGlobalStateForAppend(s,i):Oi(e),a=l||r;if(a){const j=o??s.env;_a(j);const H=Oi(e),D=this.parseFullDocument(e,j,n),M=D.tokens,R=D.lineCount;return this.cache={src:e,tokens:M,env:j,lineCount:R,lastSegment:void 0,globalStateReason:H},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(j,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ea(j)?.unbounded}),M}const c=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?H=8:u.length>1e3?H=6:u.length>200&&(H=4),H=Math.min(H,j);let D=null;const M=n.options?.streamContextParseStrategy??"chars",R=n.options?.streamContextParseMinChars??200,O=n.options?.streamContextParseMinLines??2;let U;const Z=()=>(U===void 0&&(U=ns(u)),U),q=this.canDirectlyParseAppend(s),te=q&&this.shouldUseUnboundedAppend(e,s,u);let ee=!1;if(!q)switch(M){case"lines":ee=Z()>=O;break;case"constructs":if(u.length>=R){ee=!0;break}if(Wre(u)){ee=!0;break}ee=Z()>=O;break;case"chars":default:ee=u.length>=R}if(H>0&&ee){const Q=this.getTailLines(s.src,H)+u;try{const me=this.core.parse(Q,s.env,n).tokens,xe=me.findIndex(Ye=>Ye.map&&typeof Ye.map[1]=="number"&&Ye.map[1]>H);if(xe!==-1){const Ye=me.slice(xe),at=j-H;at!==0&&this.shiftTokenLines(Ye,at),D={tokens:Ye}}}catch{D=null}}else D=null;if(!D){const Q=j;if(te)D={tokens:c2(n,u,s.env,{mode:"stream"})},Q>0&&this.shiftTokenLines(D.tokens,Q);else{const me=this.core.parse(u,s.env,n);Q>0&&this.shiftTokenLines(me.tokens,Q),D=me}}let J=0;if(s.tokens.length>0&&D.tokens.length>0){const Q=s.tokens[s.tokens.length-1],me=D.tokens[0];try{Q.type==="inline"&&me.type==="inline"&&(me.children&&me.children.length>0&&(Q.children||(Q.children=[]),this.appendTokens(Q.children,me.children)),Q.content=(Q.content||"")+(me.content||""),J=1)}catch{J=0}}const se=s.tokens.length;if(D.tokens.length>J){const Q=s.tokens,me=D.tokens,xe=Math.min(Q.length,me.length-J);let Ye=0;for(let at=xe;at>0;at--){let X=!0;for(let oe=0;oe0&&(J+=Ye),me.length>J&&this.appendTokens(s.tokens,me,J)}if(s.src=e,s.globalStateReason=null,s.lineCount=j+(U??Z()),s.tokens.length>se){const Q=this.getLastSegment(s.tokens,e,se,s.tokens.length,e.length-u.length,j);Q?s.lastSegment=Q:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,te&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",bs(s.env,{area:"stream",path:te?"stream-unbounded-append":"stream-append",reason:te?"large-delta":"safe-append",unbounded:te}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",bs(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,h=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,k=!p&&!u&&h,x=m||k,y=n.options?.streamChunkAdaptive!==!1,w=n.options?.streamChunkTargetChunks??8,_=n.options?.streamChunkSizeChars,A=n.options?.streamChunkSizeLines,P=n.options?.streamChunkMaxChunks,z=!!n.__explicitStreamChunkConfig,L=n.options?.autoTuneChunks!==!1,E=n.options?.streamChunkFenceAware??!0;let T=u&&s.lineCount!==void 0?s.lineCount+ns(u):void 0;if(x){T===void 0&&(T=ns(e));const j=(Z,q,te)=>Zte?te:Z,H=L&&!z?Db(e.length,T,n.options):null,D=H?.maxChunkChars??(y?j(Math.ceil(e.length/w),8e3,64e3):_??1e4),M=H?.maxChunkLines??(y?j(Math.ceil(T/w),150,700):A??200),R=H?.maxChunks??(y?j(Math.ceil(e.length/64e3),w,32):P),O=e.length>0&&e.charCodeAt(e.length-1)===10,U=k&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&H?.strategy!=="plain";if((m||U)&&(e.length>=D*2||T>=M*2)&&O){const Z=w5(n,e,d,{maxChunkChars:D,maxChunkLines:M,fenceAware:H?.fenceAware??E,maxChunks:R});return this.cache={src:e,tokens:Z,env:d,lineCount:T,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,T),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),Z}}const $=this.parseFullDocument(e,d,n,T),C=$.tokens;return T=$.lineCount,this.cache={src:e,tokens:C,env:d,lineCount:T,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,T),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ea(d)?.unbounded}),C}recordChunkedParseResult(e,t){const n=ea(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",bs(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!ea(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",bs(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=Oi(e);wf(t)&&_a(t);const l=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?wI(n,e.length,o):"no";if(l==="yes"){const a=c2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?ns(e):0)}}let r=o;if(l==="need-lines"&&(r=ns(e),yI(n,e.length,r))){const a=c2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:r}}return r===void 0&&(r=s?ns(e):0),{tokens:au(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:r}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:ns(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` `))return null;const o=n??t.slice(e.length);if(!o)return null;const s=o.length;if(o.charCodeAt(s-1)!==10)return null;let i=0,l=-1;for(let a=0;a=2));a++);if(i<2)return null;const r=(l===-1?o:o.slice(0,l)).trim();if(r.length===0)return null;if(/^[-=]+$/.test(r)){const a=e.slice(0,-1),c=a.lastIndexOf(` `);if(a.slice(c+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(o)?null:o}tryTailSegmentReparse(e,t,n,o){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const i=t.src.slice(0,s.srcOffset);if(!e.startsWith(i))return null;const l=t.src.slice(s.srcOffset),r=e.slice(s.srcOffset);if(r===l)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const c=this.tryContainerTailAppendMerge(e,t,n,o,s,a);if(c)return c}if(this.mayContainReferenceDefinition(l)||this.mayContainReferenceDefinition(r))return null;try{const c=this.core.parse(r,n,o),u=this.getLastSegment(c.tokens,r);return s.lineStart>0&&this.shiftTokenLines(c.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,c.tokens),t.lineCount=s.lineStart+ns(r),u?t.lastSegment={tokenStart:s.tokenStart+u.tokenStart,tokenEnd:s.tokenStart+u.tokenEnd,lineStart:s.lineStart+u.lineStart,lineEnd:s.lineStart+u.lineEnd,srcOffset:s.srcOffset+u.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let o=e.length-1;o>=0;o--)if(e.charCodeAt(o)===10&&(n--,n===0))return e.slice(o+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,o=e.slice(n),s=o.length;let i=null,l=0;for(;l<=s;){let r=o.indexOf(` -`,l);r===-1&&(r=s);let a=l;for(;a=3&&(i?i.marker===c&&d>=i.length&&(i=null):i={marker:c,length:d})}}if(r===s)break;l=r+1}return i!==null}peek(){return this.cache?.tokens??xre}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sBh?n.slice(n.length-Bh):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let l=Number.POSITIVE_INFINITY,r=-1,a=0;for(let c=o-1;c>=n;c--){const u=e[c];if(u.map&&(u.map[0]r&&(r=u.map[1])),u.nesting<0){a+=-u.nesting;continue}if(u.nesting>0){if(a-=u.nesting,u.level===0&&a<=0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(u.level===0&&a===0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` +`,l);r===-1&&(r=s);let a=l;for(;a=3&&(i?i.marker===c&&d>=i.length&&(i=null):i={marker:c,length:d})}}if(r===s)break;l=r+1}return i!==null}peek(){return this.cache?.tokens??Vre}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sPh?n.slice(n.length-Ph):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let l=Number.POSITIVE_INFINITY,r=-1,a=0;for(let c=o-1;c>=n;c--){const u=e[c];if(u.map&&(u.map[0]r&&(r=u.map[1])),u.nesting<0){a+=-u.nesting;continue}if(u.nesting>0){if(a-=u.nesting,u.level===0&&a<=0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(u.level===0&&a===0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` `,i+1),i===-1)return e.length;s--}return i+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let o=n,s=t-1;for(;o>0;){if(s=e.indexOf(` `,s+1),s===-1)return e.length;o--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,o,s,i){if(!i||this.mayContainReferenceDefinition(i))return null;const l=t.tokens[s.tokenStart];switch(l?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,o,s,i,l);case"table_open":return this.tryTableTailAppendMerge(e,t,n,o,s,i,l);default:return null}}tryListTailAppendMerge(e,t,n,o,s,i,l){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const r=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(r0&&this.shiftTokenLines(d,f);const p=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,l.level),h=this.getListParagraphMode(u,0,u.length,0);(p==="loose"||h==="loose"||this.endsWithBlankLine(t.src)||(u[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,l.level,!1),this.setListParagraphVisibility(d,0,d.length,l.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const m=f+ns(i);t.lineCount=m;const k=this.getDocLineCount(e,m);return l.map&&(l.map[1]=k),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:k,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,o,s,i,l){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(i))return null;const r=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(r=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(h.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(h,m);const k=p.tbodyCloseIndex>=0?p.tbodyCloseIndex:p.tableCloseIndex,x=t.lineCount??ns(t.src);t.tokens.splice(k,0,...h),t.src=e,t.env=n,t.globalStateReason=null;const y=x+ns(i);t.lineCount=y;const w=this.getDocLineCount(e,y);if(l.map&&(l.map[1]=w),p.tbodyOpenIndex>=0){const _=t.tokens[p.tbodyOpenIndex];_?.map&&(_.map[1]=w)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:w,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` `);if(t<0)return null;const n=e.indexOf(` -`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let r=n-1;r>t;r--){const a=e[r];if(a.type==="table_close"&&a.level===o){s=r;break}}if(s<0)return null;let i=-1,l=-1;for(let r=t+1;r=0){for(let r=s-1;r>i;r--){const a=e[r];if(a.type==="tbody_close"&&a.level===o+1){l=r;break}}if(l<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:l}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let l=0;for(let r=0;r0&&r0||a.nesting<0)&&(l+=a.nesting)}return l===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const l=o+2;for(let r=t;r=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=ns(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let l=i.children.length-1;l>=0;l--)n.push(i.children[l])}}}}};const Ub={default:mre,zero:gre,commonmark:hre};function Tre(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Ere(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function Zb(e){return e.experimental?{...e,...e.experimental}:e}function Ll(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function Kb(e,t,n){for(let o=0;o=4?n.quotes=[$[0],$[1],$[2],$[3]]:n.quotes=["“","”","‘","’"]}let l=Kb(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),r=Kb(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=Gb(i?.options,s,"fullChunkedFallback"),c=Gb(i?.options,s,"streamChunkedFallback"),u=!1,d=null,f=null;const p=new wle;let h=null;const m=()=>(h||(h=new _re(n)),h);let k=null;const x=()=>(k||(k=new Are(p)),k);let y=null;const w=()=>(y||(y=new ME),y),_=$=>!u&&!!d&&!Ere($,d),M=($,T)=>o==="default"&&!u&&h===null&&f!==null&&$.parse===f&&_($)&&!$.stream.enabled&&T<($.options.autoUnboundedThresholdChars??4e6)&&$.options.html===!1&&$.options.xhtmlOut===!1&&$.options.breaks===!1&&$.options.langPrefix==="language-"&&$.options.linkify===!1&&$.options.typographer===!1&&$.options.highlight===null,P=($,T)=>o==="default"&&!u&&_($)&&!$.stream.enabled&&!$.options.fullChunkedFallback&&T<($.options.autoUnboundedThresholdChars??4e6)&&$.options.html===!1&&$.options.linkify===!1&&$.options.typographer===!1,B={core:p,block:p.block,inline:p.inline,get linkify(){const $=w();return Object.defineProperty(this,"linkify",{value:$,writable:!0,configurable:!0}),$},get renderer(){const $=m();return Object.defineProperty(this,"renderer",{value:$,writable:!0,configurable:!0}),$},options:n,__explicitFullChunkConfig:l,__explicitStreamChunkConfig:r,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:c,__canUseImplicitLargeInputStrategy(){return _(this)},set($){const T=Zb($);return this.options={...this.options,...T},(Ll($,"fullChunkSizeChars")||Ll($,"fullChunkSizeLines")||Ll($,"fullChunkMaxChunks"))&&(l=!0,this.__explicitFullChunkConfig=!0),(Ll($,"streamChunkSizeChars")||Ll($,"streamChunkSizeLines")||Ll($,"streamChunkMaxChunks"))&&(r=!0,this.__explicitStreamChunkConfig=!0),Ll($,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),Ll($,"streamChunkedFallback")&&(c=!0,this.__explicitStreamChunkFallbackSetting=!0),h&&h.set(T),typeof T.stream=="boolean"&&(this.stream.enabled=T.stream,k&&(k.reset(),k.resetStats())),this},configure($){const T=typeof $=="string"?Ub[$]:$;if(!T)throw new Error("Wrong `markdown-it` preset, can't be empty");if(T.options&&this.set(T.options),T.components){const I=T.components;I.core?.rules&&this.core.ruler.enableOnly(I.core.rules),I.block?.rules&&this.block.ruler.enableOnly(I.block.rules),I.inline?.rules&&this.inline.ruler.enableOnly(I.inline.rules),I.inline2?.rules&&this.inline.ruler2.enableOnly(I.inline2.rules)}return this},enable($,T){const I=Array.isArray($)?$:[$],N=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const O of N){if(!O)continue;const H=O.enable(I,!0);for(let D=0;D!C.has(H));if(O.length)throw new Error(`Rules manager: invalid rule name ${O.join(", ")}`)}return this},disable($,T){const I=Array.isArray($)?$:[$],N=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const O of N){if(!O)continue;const H=O.disable(I,!0);for(let D=0;D!C.has(H));if(O.length)throw new Error(`Rules manager: invalid rule name ${O.join(", ")}`)}return this},use($,...T){const I=typeof $=="function"?$:$&&typeof $.default=="function"?$.default:void 0;if(!I)throw new TypeError("MarkdownIt.use: plugin must be a function");const N=[this,...T],C=$;return u=!0,I.apply(C,N),this},render($,T){let I;if(M(this,$.length)){T!==void 0&&(xi(T),I=Sh("render"));const O=I?xc():0,H=I?Pb($,I):Rb($);if(I&&(I.attemptMs=xc()-O,H===null&&(I.fallbackReason="unsupported-stock-subset"),Sd(T,I)),H!==null)return T!==void 0&&bs(T,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const N=T??{},C=this.parse($,N);return I&&Sd(N,I),m().render(C,this.options,N)},async renderAsync($,T){let I;if(M(this,$.length)){T!==void 0&&(xi(T),I=Sh("render"));const O=I?xc():0,H=I?Pb($,I):Rb($);if(I&&(I.attemptMs=xc()-O,H===null&&(I.fallbackReason="unsupported-stock-subset"),Sd(T,I)),H!==null)return T!==void 0&&bs(T,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const N=T??{},C=this.parse($,N);return I&&Sd(N,I),m().renderAsync(C,this.options,N)},renderIterable($,T={}){const I=this.parseIterable($,T);return m().render(I,this.options,T)},async renderAsyncIterable($,T={}){const I=await this.parseAsyncIterable($,T);return m().renderAsync(I,this.options,T)},renderInline($,T={}){const I=this.parseInline($,T);return m().render(I,this.options,T)},validateLink:nI,normalizeLink:oI,normalizeLinkText:sI,utils:Goe,helpers:{...Pse},parse($,T){if(typeof $!="string")throw new TypeError("Input data should be a String");if(T!==void 0&&xi(T),P(this,$.length)){const O=T===void 0?void 0:Sh("parse"),H=O?xc():0,D=$le($,O);if(O&&(O.attemptMs=xc()-H,D===null&&(O.fallbackReason="unsupported-stock-subset"),Sd(T,O)),D!==null)return T!==void 0&&bs(T,{area:"parse",path:"stock-fast",reason:"stock-subset"}),D}const I=T??{};let N;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&_(this)){const O=gI(this,$.length);if(O==="yes"){const H=u2(this,$,I);return bs(T,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),H}O==="need-lines"&&(N=ns($))}if(!this.stream.enabled){const O=$.length,H=this.options.autoTuneChunks!==!1,D=l,A=!a&&_(this),R=!!this.options.fullChunkedFallback,j=A&&O>=2e5;let q;(R||j||N!==void 0)&&(q=N??ns($));const K=(R||j)&&H&&!D?pre(O,q,this.options):null;if(R||j){const U=q??0;if(R?O>=(this.options.fullChunkThresholdChars??2e4)||U>=(this.options.fullChunkThresholdLines??400):j){if(K&&K.strategy!=="plain"){const te=y5(this,$,I,{maxChunkChars:K.maxChunkChars,maxChunkLines:K.maxChunkLines,fenceAware:K.fenceAware,maxChunks:K.maxChunks});return T&&Yb(T,R?"explicit-full-chunk":"default-large-string"),te}if(R){const te=(X,se,F)=>XF?F:X,J=this.options.fullChunkAdaptive!==!1,ee=this.options.fullChunkTargetChunks??8,ie=te(Math.ceil(O/ee),8e3,64e3),Q=te(Math.ceil(U/ee),150,700),he=J?ie:this.options.fullChunkSizeChars??1e4,xe=J?Q:this.options.fullChunkSizeLines??200,Ye=J?te(Math.ceil(O/64e3),ee,32):this.options.fullChunkMaxChunks,st=y5(this,$,I,{maxChunkChars:he,maxChunkLines:xe,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:Ye});return T&&Yb(T,"explicit-full-chunk"),st}}}if(N!==void 0&&_(this)&&mI(this,O,q??N)){const U=u2(this,$,I);return bs(T,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),U}}const C=Oi($);return bs(T,{area:"parse",path:"plain",reason:"default-plain"}),au(I,C,()=>p.parse($,I,this).tokens)},parseIterable($,T={}){return xi(T),cre(this,$,T)},parseAsyncIterable($,T={}){return xi(T),ure(this,$,T)},parseIterableToSink($,T,I={}){return xi(I),dre(this,$,T,I)},parseAsyncIterableToSink($,T,I={}){return xi(I),fre(this,$,T,I)},parseInline($,T={}){if(typeof $!="string")throw new TypeError("Input data should be a String");xi(T),vf(T)&&xa(T);const I=p.createState($,T,this);return I.inlineMode=!0,p.process(I),I.tokens}};if(B.stream={enabled:!!n.stream,parse($,T){return B.stream.enabled?x().parse($,T,B):B.parse($,T??{})},reset(){x().reset()},peek(){return k?k.peek():[]},stats(){return k?k.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){k&&k.resetStats()}},i?.components){const $=i.components;$.core?.rules&&B.core.ruler.enableOnly($.core.rules),$.block?.rules&&B.block.ruler.enableOnly($.block.rules),$.inline?.rules&&B.inline.ruler.enableOnly($.inline.rules),$.inline2?.rules&&B.inline.ruler2.enableOnly($.inline2.rules)}return d=Tre(B),f=B.parse,B}var $re=Ire;const bI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Lre=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],_I=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],Nre=["svg","g","path"],zre=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],Bre=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],Rre=["action","data","href","src","srcset","poster","xlink:href","formaction"],Pre=["script"],Fre=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],b1=new Set(bI),xI=new Set(_I),G2=new Set([...bI,...Lre,..._I,...Nre]),SI=new Set([...G2,...zre]),jre=new Set(Bre),Ore=new Set(Rre),kf=new Set(Pre),CI=new Set(Fre);function MI(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const Hre={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function AI(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const l=Number.parseInt(i,n?10:16);try{return Number.isFinite(l)?String.fromCodePoint(l):""}catch{return""}}return Hre[String(s??"").toLowerCase()]??t})}const T3=new Set(["http","https","mailto","tel"]),Dre=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),n0=new Set(["http","https"]);function TI(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const Vre=/^https?:\/\//i;function Wre(e){if(!Vre.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function qre(e,t,n){if(!p2(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function p2(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Ure(e,t){return t==="href"||t==="xlink:href"?p2(e,t)?T3:n0:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?n0:(p2(e,t),T3)}function L0(e,t={}){if(Wre(e))return!1;const n=MI(AI(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const l=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!l:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=TI(n);return i?i==="file"?!qre(n,o,s):p2(o,s)?Dre.has(i):!Ure(o,s).has(i):!1}function Zre(e){const t=AI(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=TI(MI(t).toLowerCase());return n==="http"||n==="https"}function Kre(e,t={}){const n=String(e??"").trim();return n?L0(n,t)?"":n:""}function Xb(e){return Kre(e,{tagName:"img",attrName:"src"})}function Gre(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,p,h,m,k){return f[p].nesting===1&&f[p].attrJoin("class",t),k.renderToken(f,p,h,m,k)}n=n||{};const i=3,l=n.marker||":",r=l.charCodeAt(0),a=l.length,c=n.validate||o,u=n.render||s;function d(f,p,h,m){let k,x=!1,y=f.bMarks[p]+f.tShift[p],w=f.eMarks[p];if(r!==f.src.charCodeAt(y))return!1;for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);const _=Math.floor((k-y)/a);if(_=h||(y=f.bMarks[B]+f.tShift[B],w=f.eMarks[B],y=4)){for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);if(!(Math.floor((k-y)/a)<_)&&(k-=(k-y)%a,k=f.skipSpaces(k),!(k=2){const l=Number(i[0]),r=Number(i[1]);Number.isFinite(l)&&Number.isFinite(r)&&(s.map=[l+t,Math.min(r+t,n)])}Array.isArray(s.children)&&EI(s.children,t,n)}}function Xre(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(Gre,t,{render(n,o){return n[o].nesting===1?`
        `:`
        -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,l=i.bMarks[n]+i.tShift[n],r=i.eMarks[n],a=i.src.slice(l,r),c=a.match(/^:::\s*([^\s{]+)/);if(!c)return!1;const u=c[1];if(!u.trim())return!1;const d=a.slice(c[0].length).trim();let f,p;const h=d.indexOf("{"),m=h>=0?d.slice(h).trimStart():void 0;if(h===-1)f=d||void 0;else{if(f=d.slice(0,h).trim()||void 0,m?.startsWith("{")){let P=0,B=-1;for(let $=0;$0&&(p=m.slice(0,B))}p||(f=d||void 0)}if(s)return!0;const k=!!i.env.__markstreamFinal;let x=n+1,y=!1;for(;x<=o;){const P=i.bMarks[x]+i.tShift[x],B=i.eMarks[x];if(i.src.slice(P,B).trim()===":::"){y=!0;break}x++}y||(x=o);const w=i.push("vmr_container_open","div",1);if(w.attrSet("class",`vmr-container vmr-container-${u}`),w.map=[n,y?x:o],w.meta={...w.meta??{},unclosed:!y&&!k},f&&w.attrSet("data-args",f),p)try{const P=JSON.parse(p);for(const[B,$]of Object.entries(P)){const T=$!=null&&typeof $=="object";w.attrSet(`data-${B}`,T?JSON.stringify($):String($))}}catch{const P=Yre(p);if(P)for(const[B,$]of Object.entries(P)){const T=$!=null&&typeof $=="object";w.attrSet(`data-${B}`,T?JSON.stringify($):String($))}else w.attrSet("data-attrs",p)}const _=[];for(let P=n+1;PP.trim().length>0)){let P=_.join(` +`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let r=n-1;r>t;r--){const a=e[r];if(a.type==="table_close"&&a.level===o){s=r;break}}if(s<0)return null;let i=-1,l=-1;for(let r=t+1;r=0){for(let r=s-1;r>i;r--){const a=e[r];if(a.type==="tbody_close"&&a.level===o+1){l=r;break}}if(l<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:l}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let l=0;for(let r=0;r0&&r0||a.nesting<0)&&(l+=a.nesting)}return l===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const l=o+2;for(let r=t;r=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=ns(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let l=i.children.length-1;l>=0;l--)n.push(i.children[l])}}}}};const Kb={default:Bre,zero:Rre,commonmark:zre};function Kre(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Gre(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function Gb(e){return e.experimental?{...e,...e.experimental}:e}function $l(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function Yb(e,t,n){for(let o=0;o=4?n.quotes=[L[0],L[1],L[2],L[3]]:n.quotes=["“","”","‘","’"]}let l=Yb(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),r=Yb(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=Xb(i?.options,s,"fullChunkedFallback"),c=Xb(i?.options,s,"streamChunkedFallback"),u=!1,d=null,f=null;const p=new jle;let h=null;const m=()=>(h||(h=new Dre(n)),h);let k=null;const x=()=>(k||(k=new Zre(p)),k);let y=null;const w=()=>(y||(y=new EE),y),_=L=>!u&&!!d&&!Gre(L,d),A=(L,E)=>o==="default"&&!u&&h===null&&f!==null&&L.parse===f&&_(L)&&!L.stream.enabled&&E<(L.options.autoUnboundedThresholdChars??4e6)&&L.options.html===!1&&L.options.xhtmlOut===!1&&L.options.breaks===!1&&L.options.langPrefix==="language-"&&L.options.linkify===!1&&L.options.typographer===!1&&L.options.highlight===null,P=(L,E)=>o==="default"&&!u&&_(L)&&!L.stream.enabled&&!L.options.fullChunkedFallback&&E<(L.options.autoUnboundedThresholdChars??4e6)&&L.options.html===!1&&L.options.linkify===!1&&L.options.typographer===!1,z={core:p,block:p.block,inline:p.inline,get linkify(){const L=w();return Object.defineProperty(this,"linkify",{value:L,writable:!0,configurable:!0}),L},get renderer(){const L=m();return Object.defineProperty(this,"renderer",{value:L,writable:!0,configurable:!0}),L},options:n,__explicitFullChunkConfig:l,__explicitStreamChunkConfig:r,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:c,__canUseImplicitLargeInputStrategy(){return _(this)},set(L){const E=Gb(L);return this.options={...this.options,...E},($l(L,"fullChunkSizeChars")||$l(L,"fullChunkSizeLines")||$l(L,"fullChunkMaxChunks"))&&(l=!0,this.__explicitFullChunkConfig=!0),($l(L,"streamChunkSizeChars")||$l(L,"streamChunkSizeLines")||$l(L,"streamChunkMaxChunks"))&&(r=!0,this.__explicitStreamChunkConfig=!0),$l(L,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),$l(L,"streamChunkedFallback")&&(c=!0,this.__explicitStreamChunkFallbackSetting=!0),h&&h.set(E),typeof E.stream=="boolean"&&(this.stream.enabled=E.stream,k&&(k.reset(),k.resetStats())),this},configure(L){const E=typeof L=="string"?Kb[L]:L;if(!E)throw new Error("Wrong `markdown-it` preset, can't be empty");if(E.options&&this.set(E.options),E.components){const T=E.components;T.core?.rules&&this.core.ruler.enableOnly(T.core.rules),T.block?.rules&&this.block.ruler.enableOnly(T.block.rules),T.inline?.rules&&this.inline.ruler.enableOnly(T.inline.rules),T.inline2?.rules&&this.inline.ruler2.enableOnly(T.inline2.rules)}return this},enable(L,E){const T=Array.isArray(L)?L:[L],$=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const j of $){if(!j)continue;const H=j.enable(T,!0);for(let D=0;D!C.has(H));if(j.length)throw new Error(`Rules manager: invalid rule name ${j.join(", ")}`)}return this},disable(L,E){const T=Array.isArray(L)?L:[L],$=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const j of $){if(!j)continue;const H=j.disable(T,!0);for(let D=0;D!C.has(H));if(j.length)throw new Error(`Rules manager: invalid rule name ${j.join(", ")}`)}return this},use(L,...E){const T=typeof L=="function"?L:L&&typeof L.default=="function"?L.default:void 0;if(!T)throw new TypeError("MarkdownIt.use: plugin must be a function");const $=[this,...E],C=L;return u=!0,T.apply(C,$),this},render(L,E){let T;if(A(this,L.length)){E!==void 0&&(xi(E),T=Mh("render"));const j=T?xc():0,H=T?jb(L,T):Fb(L);if(T&&(T.attemptMs=xc()-j,H===null&&(T.fallbackReason="unsupported-stock-subset"),Sd(E,T)),H!==null)return E!==void 0&&bs(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const $=E??{},C=this.parse(L,$);return T&&Sd($,T),m().render(C,this.options,$)},async renderAsync(L,E){let T;if(A(this,L.length)){E!==void 0&&(xi(E),T=Mh("render"));const j=T?xc():0,H=T?jb(L,T):Fb(L);if(T&&(T.attemptMs=xc()-j,H===null&&(T.fallbackReason="unsupported-stock-subset"),Sd(E,T)),H!==null)return E!==void 0&&bs(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const $=E??{},C=this.parse(L,$);return T&&Sd($,T),m().renderAsync(C,this.options,$)},renderIterable(L,E={}){const T=this.parseIterable(L,E);return m().render(T,this.options,E)},async renderAsyncIterable(L,E={}){const T=await this.parseAsyncIterable(L,E);return m().renderAsync(T,this.options,E)},renderInline(L,E={}){const T=this.parseInline(L,E);return m().render(T,this.options,E)},validateLink:iI,normalizeLink:lI,normalizeLinkText:rI,utils:mse,helpers:{...oie},parse(L,E){if(typeof L!="string")throw new TypeError("Input data should be a String");if(E!==void 0&&xi(E),P(this,L.length)){const j=E===void 0?void 0:Mh("parse"),H=j?xc():0,D=Xle(L,j);if(j&&(j.attemptMs=xc()-H,D===null&&(j.fallbackReason="unsupported-stock-subset"),Sd(E,j)),D!==null)return E!==void 0&&bs(E,{area:"parse",path:"stock-fast",reason:"stock-subset"}),D}const T=E??{};let $;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&_(this)){const j=wI(this,L.length);if(j==="yes"){const H=c2(this,L,T);return bs(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),H}j==="need-lines"&&($=ns(L))}if(!this.stream.enabled){const j=L.length,H=this.options.autoTuneChunks!==!1,D=l,M=!a&&_(this),R=!!this.options.fullChunkedFallback,O=M&&j>=2e5;let U;(R||O||$!==void 0)&&(U=$??ns(L));const Z=(R||O)&&H&&!D?Nre(j,U,this.options):null;if(R||O){const q=U??0;if(R?j>=(this.options.fullChunkThresholdChars??2e4)||q>=(this.options.fullChunkThresholdLines??400):O){if(Z&&Z.strategy!=="plain"){const te=w5(this,L,T,{maxChunkChars:Z.maxChunkChars,maxChunkLines:Z.maxChunkLines,fenceAware:Z.fenceAware,maxChunks:Z.maxChunks});return E&&Jb(E,R?"explicit-full-chunk":"default-large-string"),te}if(R){const te=(X,oe,F)=>XF?F:X,ee=this.options.fullChunkAdaptive!==!1,J=this.options.fullChunkTargetChunks??8,se=te(Math.ceil(j/J),8e3,64e3),Q=te(Math.ceil(q/J),150,700),me=ee?se:this.options.fullChunkSizeChars??1e4,xe=ee?Q:this.options.fullChunkSizeLines??200,Ye=ee?te(Math.ceil(j/64e3),J,32):this.options.fullChunkMaxChunks,at=w5(this,L,T,{maxChunkChars:me,maxChunkLines:xe,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:Ye});return E&&Jb(E,"explicit-full-chunk"),at}}}if($!==void 0&&_(this)&&yI(this,j,U??$)){const q=c2(this,L,T);return bs(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),q}}const C=Oi(L);return bs(E,{area:"parse",path:"plain",reason:"default-plain"}),au(T,C,()=>p.parse(L,T,this).tokens)},parseIterable(L,E={}){return xi(E),Ere(this,L,E)},parseAsyncIterable(L,E={}){return xi(E),Ire(this,L,E)},parseIterableToSink(L,E,T={}){return xi(T),Lre(this,L,E,T)},parseAsyncIterableToSink(L,E,T={}){return xi(T),$re(this,L,E,T)},parseInline(L,E={}){if(typeof L!="string")throw new TypeError("Input data should be a String");xi(E),wf(E)&&_a(E);const T=p.createState(L,E,this);return T.inlineMode=!0,p.process(T),T.tokens}};if(z.stream={enabled:!!n.stream,parse(L,E){return z.stream.enabled?x().parse(L,E,z):z.parse(L,E??{})},reset(){x().reset()},peek(){return k?k.peek():[]},stats(){return k?k.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){k&&k.resetStats()}},i?.components){const L=i.components;L.core?.rules&&z.core.ruler.enableOnly(L.core.rules),L.block?.rules&&z.block.ruler.enableOnly(L.block.rules),L.inline?.rules&&z.inline.ruler.enableOnly(L.inline.rules),L.inline2?.rules&&z.inline.ruler2.enableOnly(L.inline2.rules)}return d=Kre(z),f=z.parse,z}var Xre=Yre;const SI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Jre=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],CI=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],Qre=["svg","g","path"],eae=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],tae=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],nae=["action","data","href","src","srcset","poster","xlink:href","formaction"],oae=["script"],sae=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],k1=new Set(SI),MI=new Set(CI),G2=new Set([...SI,...Jre,...CI,...Qre]),AI=new Set([...G2,...eae]),iae=new Set(tae),lae=new Set(nae),_f=new Set(oae),TI=new Set(sae);function EI(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const rae={amp:"&",bsol:"\\",colon:":",newline:` +`,sol:"/",tab:" "};function II(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const l=Number.parseInt(i,n?10:16);try{return Number.isFinite(l)?String.fromCodePoint(l):""}catch{return""}}return rae[String(s??"").toLowerCase()]??t})}const I3=new Set(["http","https","mailto","tel"]),aae=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),t0=new Set(["http","https"]);function LI(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const cae=/^https?:\/\//i;function uae(e){if(!cae.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function dae(e,t,n){if(!f2(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function f2(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function fae(e,t){return t==="href"||t==="xlink:href"?f2(e,t)?I3:t0:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?t0:(f2(e,t),I3)}function $0(e,t={}){if(uae(e))return!1;const n=EI(II(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const l=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!l:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=LI(n);return i?i==="file"?!dae(n,o,s):f2(o,s)?aae.has(i):!fae(o,s).has(i):!1}function pae(e){const t=II(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=LI(EI(t).toLowerCase());return n==="http"||n==="https"}function hae(e,t={}){const n=String(e??"").trim();return n?$0(n,t)?"":n:""}function Qb(e){return hae(e,{tagName:"img",attrName:"src"})}function mae(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,p,h,m,k){return f[p].nesting===1&&f[p].attrJoin("class",t),k.renderToken(f,p,h,m,k)}n=n||{};const i=3,l=n.marker||":",r=l.charCodeAt(0),a=l.length,c=n.validate||o,u=n.render||s;function d(f,p,h,m){let k,x=!1,y=f.bMarks[p]+f.tShift[p],w=f.eMarks[p];if(r!==f.src.charCodeAt(y))return!1;for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);const _=Math.floor((k-y)/a);if(_=h||(y=f.bMarks[z]+f.tShift[z],w=f.eMarks[z],y=4)){for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);if(!(Math.floor((k-y)/a)<_)&&(k-=(k-y)%a,k=f.skipSpaces(k),!(k=2){const l=Number(i[0]),r=Number(i[1]);Number.isFinite(l)&&Number.isFinite(r)&&(s.map=[l+t,Math.min(r+t,n)])}Array.isArray(s.children)&&$I(s.children,t,n)}}function vae(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(mae,t,{render(n,o){return n[o].nesting===1?`
        `:`
        +`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,l=i.bMarks[n]+i.tShift[n],r=i.eMarks[n],a=i.src.slice(l,r),c=a.match(/^:::\s*([^\s{]+)/);if(!c)return!1;const u=c[1];if(!u.trim())return!1;const d=a.slice(c[0].length).trim();let f,p;const h=d.indexOf("{"),m=h>=0?d.slice(h).trimStart():void 0;if(h===-1)f=d||void 0;else{if(f=d.slice(0,h).trim()||void 0,m?.startsWith("{")){let P=0,z=-1;for(let L=0;L0&&(p=m.slice(0,z))}p||(f=d||void 0)}if(s)return!0;const k=!!i.env.__markstreamFinal;let x=n+1,y=!1;for(;x<=o;){const P=i.bMarks[x]+i.tShift[x],z=i.eMarks[x];if(i.src.slice(P,z).trim()===":::"){y=!0;break}x++}y||(x=o);const w=i.push("vmr_container_open","div",1);if(w.attrSet("class",`vmr-container vmr-container-${u}`),w.map=[n,y?x:o],w.meta={...w.meta??{},unclosed:!y&&!k},f&&w.attrSet("data-args",f),p)try{const P=JSON.parse(p);for(const[z,L]of Object.entries(P)){const E=L!=null&&typeof L=="object";w.attrSet(`data-${z}`,E?JSON.stringify(L):String(L))}}catch{const P=gae(p);if(P)for(const[z,L]of Object.entries(P)){const E=L!=null&&typeof L=="object";w.attrSet(`data-${z}`,E?JSON.stringify(L):String(L))}else w.attrSet("data-attrs",p)}const _=[];for(let P=n+1;PP.trim().length>0)){let P=_.join(` `);P.endsWith(` `)||(P+=` `),P.endsWith(` `)||(P+=` -`);const B=i.tokens[i.tokens.length-1];B&&(B.raw=P);const $=[];i.md.block.parse(P,i.md,i.env,$),EI($,n+1,n+1+_.length),i.tokens.push(...$)}const M=i.push("vmr_container_close","div",-1);return y||(M.hidden=!0,M.map=[o,o]),i.line=y?x+1:x,!0},{alt:["paragraph","reference","blockquote","list"]})}function ur(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ss(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function Rp(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const Jre=/^[a-z][a-z0-9_-]*$/;function Jb(e){return Jre.test(String(e??"").trim().toLowerCase())}function Vl(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return Jb(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":Jb(s)?s:""}function G0(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=Vl(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function Qre(...e){const t=new Set,n=[];for(const o of e)for(const s of G0(o))t.has(s)||(t.add(s),n.push(s));return n}function eae(e){const t=G0(e);return{key:t.join(","),tags:t}}function II(e){return Vl(e)}function tae(e,t){const n=String(e??""),o=Vl(t);if(!o)return!1;const s=ur(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function $I(e,t){const n=Vl(t);return!!n&&!G2.has(n)&&!tae(e,n)}function nae(e,t){const n=String(e??""),o=Vl(t);if(!o)return n;const s=ur(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),l=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(l,"")}const LI=b1,oae=G2,NI=new Set(xI);NI.delete("details");const sae=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,iae=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,Z8=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,lae=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function k5(e){return(e.match(Z8)?.[1]??"").toLowerCase()}function lv(e){return/^\s*<\s*\//.test(e)}function rv(e,t){return LI.has(t)||/\/\s*>\s*$/.test(e)}function rae(e,t){let n=0;for(let o=0;o0&&n--;continue}rv(s,i)||n++}}return n}function Qb(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const l=i[0]??"",r=!!i[1],a=!r&&/\/\s*>$/.test(l);if(r){if(s===0)return{start:i.index,end:i.index+l.length};s--;continue}a||s++}return null}function cae(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",l=!!s[1],r=!l&&/\/\s*>$/.test(i);if(l){o>0&&o--;continue}r||o++}return o}function b5(e){const t=e;return String(t.raw??t.content??t.markup??"")}function uae(e){const t=e;return t.meta||(t.meta={}),t.meta}function Rh(e,t,n){const o=uae(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function dae(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${ur(p)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=p=>p?n.some(h=>h.test(p)):!1,l=p=>{if(!(!p||!o.length))for(const h of o)h.raw+=p,h.inner+=p},r=()=>{!o.length||!s||(l(` -`),s=!1)},a=p=>{l(p)},c=p=>{for(let m=0;m{const h=o[o.length-1]?.tag;if(!h)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${ur(h)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!u(p),f=(p,h,m)=>{const k=m??(p.type==="html_inline"?k5(h):"");if(!(k&&t.has(k))){l(h);return}const x=lv(h),y=!x&&rv(h,k);if(x){if(!o.length||o[o.length-1].tag!==k){l(h);return}c(h);return}if(l(h),y){Rh(p,h,"");return}o.push({tag:k,token:p,raw:h,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const h=String(p.content??"");if(d(h)?s=!1:r(),!o.length&&!i(h)){s=!1;continue}let m=0,k=!0;for(const x of p.children){const y=b5(x),w=x.type==="html_inline"?k5(y):"",_=w&&t.has(w);let M=y;if(k&&h&&y&&(o.length||_)){const P=h.indexOf(y,m);if(P!==-1)a(h.slice(m,P)),M=h.slice(P,P+y.length),m=P+y.length;else{if(o.length&&!_)continue;k=!1}}f(x,M,w)}k&&h&&m0;continue}if(o.length&&typeof p.content=="string"){const h=b5(p),m=p.type==="html_block"?u(h):null;if(m){c(`${s?` -`:""}${m}`),s=o.length>0;continue}if(!p.content)continue;r(),l(p.content),s=!0}}for(const p of o)Rh(p.token,p.raw,p.inner)}function fae(e){return/^\s*<\s*[!?]/.test(e)}function pae(e){const t=new Set(oae);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function e_(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function hae(e,t){let n=null;for(const i of e.matchAll(sae)){const l=i.index??-1;if(l<0)continue;const r=(i[1]??"").toLowerCase();e_(r,t)&&ss(e.slice(l))===-1&&(!n||l")&&(!n||i")&&(!n||i{const p=f,h=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const w of m){const _=Vl(String(w??""));_&&h.add(_)}const k=pae(Array.from(h)),x=new Set(vae);for(const w of h)x.add(w);return{autoCloseInlineTagSet:x,commonHtmlTags:k,customTagSet:h,shouldMergeHtmlBlockTag:w=>h.has(w)||!k.has(w)||NI.has(w)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},i=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},l=f=>f.replace(/^(?:\r?\n)+/,""),r=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),c=(f,p)=>{const h=l(f);if(!/\S/.test(h))return[];if(r(h))return[{type:"code_block",content:a(h),raw:h}];const m=h.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const k={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},k,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[k]},u=(f,p,h)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":h,d=(f,p)=>{const h=l(p);return!/\S/.test(h)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${h}`,f.children.push({type:"text",content:h,raw:h}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const p=f.tokens??[],{commonHtmlTags:h,customTagSet:m}=o(f);for(const k of p){const x=k;if(x.type!=="inline"||!Array.isArray(x.children))continue;const y=String(x.content??""),w=x.children.length?x.children:y.includes("<")?[{type:"text",content:y,raw:y}]:null;if(w)try{const _=gae(w,h);if(x.children=_.children,_.pendingBuffer){const M=y.lastIndexOf(_.pendingBuffer);if(M!==-1){const P=y.slice(0,M);x.content=P,typeof x.raw=="string"&&(x.raw=P)}}}catch(_){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",_)}}dae(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:h,customTagSet:m,shouldMergeHtmlBlockTag:k}=o(f),x=[];for(let y=0;y0){const[M,P]=x[x.length-1];if(y!==P){if(w.type==="paragraph_open"||w.type==="paragraph_close"){p.splice(y,1),y--;continue}const B=String(w.content??w.raw??"");if(B){const $=p[P],T=`${String($.content||"")} -${B}`,I=ss(T),N=I===-1?null:Qb(T,M,I+1);if(N){const C=T.slice(0,N.end),O=T.slice(N.end);$.content=C,$.loading=!1,p.splice(y,1),x.pop();const H=d($,O)?[]:c(O,u(p,y,"paragraph"));H.length&&p.splice(y,0,...H),y--;continue}$.content=T,$.loading!==!1&&($.loading=!0)}p.splice(y,1),y--;continue}}const _=s(w);if(_){if(fae(_))continue;const M=(_.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),P=/^\s*<\s*\//.test(_);if(!M||!k(M))continue;if(i(w,_),!P)M&&!new RegExp(`^\\s*<\\s*${M}\\b[^>]*\\/\\s*>`,"i").test(_)&&cae(_,M)>0&&x.push([M,y]);else if(x.length>0&&M&&x[x.length-1][0]===M){const[,B]=x[x.length-1],$=p[B];$.content=`${String($.content||"")} -${_}`,$.loading=!1,x.pop(),p.splice(y,1),y--}continue}else if(x.length>0){if(w.type==="paragraph_open"||w.type==="paragraph_close"){p.splice(y,1),y--;continue}const M=w.content||"",P=new RegExp(`<\\s*\\/\\s*${x[x.length-1][0]}\\s*>`,"i").test(M);if(M){const[,B]=x[x.length-1],$=p[B];$.content=`${$.content||""} -${M}`,$.loading!==!1&&($.loading=!P)}P&&x.pop(),p.splice(y,1),y--}else continue}if(m.size>0){const y=new Map,w=new Map,_=B=>{let $=y.get(B);return $||($=new RegExp(`<\\s*${B}\\b`,"i"),y.set(B,$)),$},M=B=>{let $=w.get(B);return $||($=new RegExp(`<\\s*\\/\\s*${B}\\s*>`,"i"),w.set(B,$)),$},P=[];for(let B=0;B0){const N=P[P.length-1],C=p[N.index],O=$.type==="html_block"?M(N.tag).exec(T):null;if(O){const A=O.index+O[0].length,R=T.slice(0,A),j=T.slice(A);C.content=`${String(C.content??"")} -${R}`,Array.isArray(C.children)&&C.children.push({type:"html_inline",content:``,raw:``}),P.pop();const q=d(C,j)?[]:c(j,u(p,B,"paragraph"));q.length?p.splice(B,1,...q):(p.splice(B,1),B--);continue}if($.type!=="inline")continue;const H=Array.isArray($.children)?$.children:[],D=rae(H,N.tag);if(D!==-1){const A=H.slice(0,D+1),R=H.slice(D+1),j=A.map(q=>String(q?.content??q?.raw??"")).join("");if(C.content=`${String(C.content??"")} -${j}`,Array.isArray(C.children)&&C.children.push(...A),R.length){const q=R.map(K=>String(K.content??K.raw??"")).join("");if(q.trim()){const K=q.replace(/^\s+/,"");if(d(C,q))p.splice(B,1),B--;else if(K.startsWith("<"))p.splice(B,1,{type:"html_block",content:K});else{const U=c(q,u(p,B,"paragraph"));p.splice(B,1,...U)}}else p.splice(B,1),B--}else p.splice(B,1),B--;P.pop();continue}C.content=`${String(C.content??"")} -${T}`,Array.isArray(C.children)&&C.children.push(...H),p.splice(B,1),B--;continue}if($.type!=="inline")continue;const I=Array.isArray($.children)?$.children:[];for(const N of m)if((I.length?aae(I,N):_(N).test(T)&&!M(N).test(T)?1:0)>0){P.push({tag:N,index:B});break}}}{let y=0;for(let w=0;w0?y--:(p.splice(w,1),w--))}}for(let y=0;y/]+)/)?.[1]??"").toLowerCase();if($.startsWith("!")||$.startsWith("?")){w.loading=!1;continue}if(m.has($)){const D=String(w.content??""),A=ss(D),R=A===-1?null:Qb(D,$,A+1);w.loading=R?!1:w.loading!==void 0?w.loading:!0;const j=R?.start??-1,q=R?R.end-R.start:0;if(j!==-1){const K=D.slice(0,j+q);let U="";A!==-1&&A]+)))?/g;let I;for(;(I=T.exec(w.content||""))!==null;)I[1],I[2]||I[3]||I[4];const N=String(w.content??""),C=new RegExp(`<\\/\\s*${$}\\s*>`,"i").exec(N),O=C?C.index:-1,H=C?C[0].length:0;if(O!==-1){const D=N.slice(0,O+H),A=(N.slice(O+H)||"").replace(/^\s+/,"");w.children=[{type:"html_block",content:D,tag:$,loading:!1}],w.content=D,w.raw=D,A&&p.splice(y+1,0,A.startsWith("<")?{type:"html_block",content:A}:{type:"text",content:A,raw:A})}else w.children=[{type:"html_block",content:w.content,tag:$,loading:!0}];continue}if(!w||w.type!=="inline")continue;if(w.children.length===2&&w.children[0].type==="html_inline"){const $=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),T=w.children[1],I=String(T?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(T?.type==="html_inline"&&I===$)continue;h.has($)?(w.children[0].loading=!0,w.children[0].tag=$,w.children.push({type:"html_inline",tag:$,loading:!0,content:``})):w.children=[{type:"html_block",loading:!0,tag:$,content:String(w.children[0]?.content??"")+String(w.children[1]?.content??"")}];continue}else if(w.children.length===3&&w.children[0].type==="html_inline"&&w.children[2].type==="html_inline"){const $=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(h.has($))continue;w.children=[{type:"html_block",loading:!1,tag:$,content:w.children.map(T=>T.content).join("")}];continue}if(!w.content?.startsWith("<")||w.children?.length!==1)continue;const _=String(w.content),M=w,P=M.children[0];if(P?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(_)&&(M.children.length=0);continue}const B=String(P.content??_).match(lae)?.[1]?.toLowerCase()??"";if(B){if(/\/\s*>\s*$/.test(_)||LI.has(B)){M.children=[{type:"html_inline",content:_}];continue}M.children.length=0}}})}function wae(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function kae(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(r.length===1&&!wae(r[0]??"")){const a=r[0]??"",c=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:c},{type:"inline",tag:"",nesting:0,level:c,content:a,children:[{type:"text",content:a,level:c+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:c}),s+=2}}})}const zI=/\.([a-z0-9]{1,15})$/i,bae=/[_()[\]{}<>]/u,_ae=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,xae=/[?#@]/u,Sae=/[\\/]/u,Cae=/^[\p{L}\p{N}./\\-]+$/u,Mae=/^[A-Za-z0-9-]{1,63}$/u,Aae=/^xn--[a-z0-9-]{2,59}$/i,Tae=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Eae=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,Iae=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,$ae=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,Lae=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,Nae=2e3,zae=512,Bae={},Rae=new Set(["ai","md","py","rs","sh","zip"]),BI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),Pae=new Set([...BI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),Fae=new Set(["com","dev","io","page","site"]),jae=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),Oae=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),S0=new Map;function t_(e,t){if(!e||e.length>zae)return t;for(S0.set(e,t);S0.size>Nae;){const n=S0.keys().next().value;if(!n)break;S0.delete(n)}return t}function Y2(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function Ph(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Y2(n)?n:void 0}function n_(e,t){if(!Y2(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function o_(e){const t=bf(e);return Y2(t)?t:void 0}function Hae(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function s_(e,t){if(!Y2(t))return;const n=String(e??"").trim().split(/\s+/u).map(Hae).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>_5(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>_5(s,{marketTicker:!0}))&&(o.marketTicker=!0),Y2(o)?o:void 0}function I1(e,t=!1){let n;return{options(o){return t||o==null?n_(e,n):n_(e,Ph(o_(o),s_(o,n)))},remember(o){const s=o_(o);n=t?Ph(n,s):Ph(s,s_(o,n))},reset(){n=void 0}}}function i_(e){return Mae.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function Dae(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return i_(n)||Aae.test(n)?t.every(i_):!1}function RI(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function Vae(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function Wae(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function PI(e,t,n){const o=Vae(t);return RI(e)&&Wae(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function qae(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function bf(e){const t=String(e??""),n=S0.get(t);return n?(S0.delete(t),S0.set(t,n),n):qae(t)?t_(t,{explicitFilename:Iae.test(t),filename:$ae.test(t),marketTicker:Lae.test(t)}):t_(t,Bae)}function Uae(e){return Dae(e.split(/[\\/]/)[0]??"")}function Zae(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function Kae(e){if(bae.test(e)||!Cae.test(e))return!0;if(Sae.test(e))return!Uae(e);const t=e.replace(zI,"");return RI(t)?!0:t.split(".").filter(Boolean).some(Zae)}function Gae(e,t,n){if(!(n?Pae:BI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Eae:Tae).test(o)}function _5(e,t={}){if(!e||_ae.test(e)||xae.test(e))return!1;const n=e.match(zI);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return Gae(e,o,t.marketTicker===!0)?!0:Oae.has(o)?!Rae.has(o)||t.filename?!0:Kae(e):!!(t.explicitFilename&&Fae.has(o)||t.filename&&jae.has(o))}const l_=["!"];function Fi(e){return{type:"text",content:e,raw:e}}function o0(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function s0(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function Oa(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function Yae(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(Fi(t))}}function r_(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function Jae(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function a_(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;ol.type==="code_inline"),o=new Map;let s=0;for(let l=0;l0&&c?c_(c):-1;if(u!==-1&&c)for(const d of c.slice(u))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(l=a);continue}if(!(r.type!=="text"||typeof r.content!="string"))for(const a of r.content)a==="("?s++:a===")"&&s>0&&s--}const i=bf(t);for(let l=0;l<=e.length-1;l++){l<0&&(l=0);const r=e[l];if(!r)break;if(r.type==="link_open"&&(r.markup==="linkify"||r.markup==="autolink")){let a=-1;for(let c=l+1;c0){const h=c_(c);h!==-1&&(d===-1||h=m.content.length){p-=m.content.length;continue}if(p<0)break;const k=m.content[p],x=m.content.slice(0,p);let y=m.content.slice(p);for(let M=h+1;M0&&(e.splice(h+1,w),a=h+1);let _=u;if(k==="!"&&f!==-1)_=u.slice(0,f);else if(y){const M=encodeURI(y);if(M&&u.endsWith(M))_=u.slice(0,u.length-M.length);else{const P=k?encodeURI(k):"",B=P?u.indexOf(P):-1;B!==-1&&(_=u.slice(0,B))}}_!==u&&Jae(r,_),y&&e.splice(a+1,0,Fi(y));break}}}if(!n){if(r?.type==="em_open"&&e[l-1]?.type==="text"&&e[l-1].content?.endsWith("*")){const a=e[l-1].content?.replace(/(\*+)$/,"")||"";e[l-1].content=a,r.type="strong_open",r.tag="strong",r.markup="**";for(let c=l+1;cd[0]==="href")?.[1]||"";if(e[l+3]?.type==="text"){const d=(e[l+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(u+=e[l+3]?.content?.slice(0,d)||"",e[l+3].content=""),a.push(Oa(c,u,f));const p=e[l+3].content?.replace(/^\)\**/,"");p&&a.push(Fi(p)),e.splice(l-4,8,...a)}else a.push({type:"link",loading:!0,href:u,title:"",text:c,children:[{type:"text",content:u,raw:u}],raw:`[${c}](${u})`}),e.splice(l-4,7,...a);continue}else if(e[l-1].content==="]("&&e[l-3]?.type==="text"&&e[l-3].content?.endsWith(")"))if(e[l-2]?.type==="strong_open"){const[a,c]=e[l-3].content?.split("[**")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else if(e[l-2]?.type==="em_open"){const[a,c]=e[l-3].content?.split("[*")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else{const[a,c]=e[l-3].content?.split("[")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}}if(r.type==="link_close"&&r.nesting===-1&&e[l-2]?.type==="link_open"&&e[l+1]?.type==="text"&&e[l-1]?.type==="text"){const a=e[l-1].content||"",c=e[l-2].attrs||[],u=c.find(x=>x[0]==="href")?.[1]||"",d=c.find(x=>x[0]==="title")?.[1]||"";let f=3,p=2;const h=(e[l-3]?.content||"").match(/^(\*+)$/),m=[];if(h){p+=1;const x=h[1].length;o0(m,x)}if(r.markup!=="linkify"&&e[l+1].type==="text"&&e[l+1]?.content?.startsWith("](")){f+=1;for(let x=l+1;xk[0]==="href")?.[1];e[l+5]?.type==="text"&&e[l+5].content==="."?(f=(m||f)+e[l+5].content,e[l+5].content=""):f=m||f,p+=3}let h=!0;if(r.nesting===-1&&(d=d.replace(/\*+$/,"")),e[l+2]?.type==="text"){const m=(e[l+2]?.content??"").indexOf(")");h=m===-1,m===-1&&(f+=e[l+2]?.content?.slice(0,m)||"",e[l+2].content="")}a.push(Oa(d,f,h)),s0(a,2),e.splice(l-2,p,...a)}if(r.type==="text"&&/\*+\[[^\]]*$/.test(r.content||"")&&e[l+1]?.type==="strong_open"&&e[l+2]?.type==="text"&&e[l+2].content==="]("&&e[l+3]?.type==="link_open"&&e[l+5]?.type==="link_close"&&e[l+6]?.type==="text"&&e[l+6].content===")"&&e[l+7]?.type==="strong_close"){const a=(r.content||"").match(/^(\*+)\[(.*)$/);if(a){const c=(a[2]||"")+a[1];let u=e[l+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!u&&e[l+4]?.type==="text"&&(u=e[l+4].content||"");const d=[];o0(d,2),d.push(Oa(c,u,!1)),s0(d,2),e.splice(l,9,...d),l-=d.length-1;continue}}}}if(n)return e;for(let l=0;l{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k{const n=t;try{const o=p1e(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function u_(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function d_(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function f_(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function FI(e,t){if(!e.startsWith("|")||e.includes(` -`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function Fh(e){return FI(e)!==null}function jI(e){return/^:?-+:?$/.test(e.trim())}function a1e(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(jI)}function c1e(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function u1e(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(jI)&&c1e(n)}function d1e(e){return e==="|"||e==="|:"}function f1e(e){const t=FI(e);return t!==null&&t.every(n=>!n.includes(":"))}function p1e(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const l=String(i.content??""),r=l.split(` +`);const z=i.tokens[i.tokens.length-1];z&&(z.raw=P);const L=[];i.md.block.parse(P,i.md,i.env,L),$I(L,n+1,n+1+_.length),i.tokens.push(...L)}const A=i.push("vmr_container_close","div",-1);return y||(A.hidden=!0,A.map=[o,o]),i.line=y?x+1:x,!0},{alt:["paragraph","reference","blockquote","list"]})}function ur(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ss(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function Fp(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const yae=/^[a-z][a-z0-9_-]*$/;function e_(e){return yae.test(String(e??"").trim().toLowerCase())}function Vl(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return e_(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":e_(s)?s:""}function K0(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=Vl(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function wae(...e){const t=new Set,n=[];for(const o of e)for(const s of K0(o))t.has(s)||(t.add(s),n.push(s));return n}function kae(e){const t=K0(e);return{key:t.join(","),tags:t}}function NI(e){return Vl(e)}function bae(e,t){const n=String(e??""),o=Vl(t);if(!o)return!1;const s=ur(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function zI(e,t){const n=Vl(t);return!!n&&!G2.has(n)&&!bae(e,n)}function _ae(e,t){const n=String(e??""),o=Vl(t);if(!o)return n;const s=ur(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),l=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(l,"")}const BI=k1,xae=G2,RI=new Set(MI);RI.delete("details");const Sae=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Cae=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,G8=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Mae=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function b5(e){return(e.match(G8)?.[1]??"").toLowerCase()}function av(e){return/^\s*<\s*\//.test(e)}function cv(e,t){return BI.has(t)||/\/\s*>\s*$/.test(e)}function Aae(e,t){let n=0;for(let o=0;o0&&n--;continue}cv(s,i)||n++}}return n}function t_(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const l=i[0]??"",r=!!i[1],a=!r&&/\/\s*>$/.test(l);if(r){if(s===0)return{start:i.index,end:i.index+l.length};s--;continue}a||s++}return null}function Eae(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",l=!!s[1],r=!l&&/\/\s*>$/.test(i);if(l){o>0&&o--;continue}r||o++}return o}function _5(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Iae(e){const t=e;return t.meta||(t.meta={}),t.meta}function Fh(e,t,n){const o=Iae(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function Lae(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${ur(p)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=p=>p?n.some(h=>h.test(p)):!1,l=p=>{if(!(!p||!o.length))for(const h of o)h.raw+=p,h.inner+=p},r=()=>{!o.length||!s||(l(` +`),s=!1)},a=p=>{l(p)},c=p=>{for(let m=0;m{const h=o[o.length-1]?.tag;if(!h)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${ur(h)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!u(p),f=(p,h,m)=>{const k=m??(p.type==="html_inline"?b5(h):"");if(!(k&&t.has(k))){l(h);return}const x=av(h),y=!x&&cv(h,k);if(x){if(!o.length||o[o.length-1].tag!==k){l(h);return}c(h);return}if(l(h),y){Fh(p,h,"");return}o.push({tag:k,token:p,raw:h,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const h=String(p.content??"");if(d(h)?s=!1:r(),!o.length&&!i(h)){s=!1;continue}let m=0,k=!0;for(const x of p.children){const y=_5(x),w=x.type==="html_inline"?b5(y):"",_=w&&t.has(w);let A=y;if(k&&h&&y&&(o.length||_)){const P=h.indexOf(y,m);if(P!==-1)a(h.slice(m,P)),A=h.slice(P,P+y.length),m=P+y.length;else{if(o.length&&!_)continue;k=!1}}f(x,A,w)}k&&h&&m0;continue}if(o.length&&typeof p.content=="string"){const h=_5(p),m=p.type==="html_block"?u(h):null;if(m){c(`${s?` +`:""}${m}`),s=o.length>0;continue}if(!p.content)continue;r(),l(p.content),s=!0}}for(const p of o)Fh(p.token,p.raw,p.inner)}function $ae(e){return/^\s*<\s*[!?]/.test(e)}function Nae(e){const t=new Set(xae);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function n_(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function zae(e,t){let n=null;for(const i of e.matchAll(Sae)){const l=i.index??-1;if(l<0)continue;const r=(i[1]??"").toLowerCase();n_(r,t)&&ss(e.slice(l))===-1&&(!n||l")&&(!n||i")&&(!n||i{const p=f,h=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const w of m){const _=Vl(String(w??""));_&&h.add(_)}const k=Nae(Array.from(h)),x=new Set(Pae);for(const w of h)x.add(w);return{autoCloseInlineTagSet:x,commonHtmlTags:k,customTagSet:h,shouldMergeHtmlBlockTag:w=>h.has(w)||!k.has(w)||RI.has(w)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},i=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},l=f=>f.replace(/^(?:\r?\n)+/,""),r=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),c=(f,p)=>{const h=l(f);if(!/\S/.test(h))return[];if(r(h))return[{type:"code_block",content:a(h),raw:h}];const m=h.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const k={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},k,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[k]},u=(f,p,h)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":h,d=(f,p)=>{const h=l(p);return!/\S/.test(h)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${h}`,f.children.push({type:"text",content:h,raw:h}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const p=f.tokens??[],{commonHtmlTags:h,customTagSet:m}=o(f);for(const k of p){const x=k;if(x.type!=="inline"||!Array.isArray(x.children))continue;const y=String(x.content??""),w=x.children.length?x.children:y.includes("<")?[{type:"text",content:y,raw:y}]:null;if(w)try{const _=Rae(w,h);if(x.children=_.children,_.pendingBuffer){const A=y.lastIndexOf(_.pendingBuffer);if(A!==-1){const P=y.slice(0,A);x.content=P,typeof x.raw=="string"&&(x.raw=P)}}}catch(_){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",_)}}Lae(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:h,customTagSet:m,shouldMergeHtmlBlockTag:k}=o(f),x=[];for(let y=0;y0){const[A,P]=x[x.length-1];if(y!==P){if(w.type==="paragraph_open"||w.type==="paragraph_close"){p.splice(y,1),y--;continue}const z=String(w.content??w.raw??"");if(z){const L=p[P],E=`${String(L.content||"")} +${z}`,T=ss(E),$=T===-1?null:t_(E,A,T+1);if($){const C=E.slice(0,$.end),j=E.slice($.end);L.content=C,L.loading=!1,p.splice(y,1),x.pop();const H=d(L,j)?[]:c(j,u(p,y,"paragraph"));H.length&&p.splice(y,0,...H),y--;continue}L.content=E,L.loading!==!1&&(L.loading=!0)}p.splice(y,1),y--;continue}}const _=s(w);if(_){if($ae(_))continue;const A=(_.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),P=/^\s*<\s*\//.test(_);if(!A||!k(A))continue;if(i(w,_),!P)A&&!new RegExp(`^\\s*<\\s*${A}\\b[^>]*\\/\\s*>`,"i").test(_)&&Eae(_,A)>0&&x.push([A,y]);else if(x.length>0&&A&&x[x.length-1][0]===A){const[,z]=x[x.length-1],L=p[z];L.content=`${String(L.content||"")} +${_}`,L.loading=!1,x.pop(),p.splice(y,1),y--}continue}else if(x.length>0){if(w.type==="paragraph_open"||w.type==="paragraph_close"){p.splice(y,1),y--;continue}const A=w.content||"",P=new RegExp(`<\\s*\\/\\s*${x[x.length-1][0]}\\s*>`,"i").test(A);if(A){const[,z]=x[x.length-1],L=p[z];L.content=`${L.content||""} +${A}`,L.loading!==!1&&(L.loading=!P)}P&&x.pop(),p.splice(y,1),y--}else continue}if(m.size>0){const y=new Map,w=new Map,_=z=>{let L=y.get(z);return L||(L=new RegExp(`<\\s*${z}\\b`,"i"),y.set(z,L)),L},A=z=>{let L=w.get(z);return L||(L=new RegExp(`<\\s*\\/\\s*${z}\\s*>`,"i"),w.set(z,L)),L},P=[];for(let z=0;z0){const $=P[P.length-1],C=p[$.index],j=L.type==="html_block"?A($.tag).exec(E):null;if(j){const M=j.index+j[0].length,R=E.slice(0,M),O=E.slice(M);C.content=`${String(C.content??"")} +${R}`,Array.isArray(C.children)&&C.children.push({type:"html_inline",content:``,raw:``}),P.pop();const U=d(C,O)?[]:c(O,u(p,z,"paragraph"));U.length?p.splice(z,1,...U):(p.splice(z,1),z--);continue}if(L.type!=="inline")continue;const H=Array.isArray(L.children)?L.children:[],D=Aae(H,$.tag);if(D!==-1){const M=H.slice(0,D+1),R=H.slice(D+1),O=M.map(U=>String(U?.content??U?.raw??"")).join("");if(C.content=`${String(C.content??"")} +${O}`,Array.isArray(C.children)&&C.children.push(...M),R.length){const U=R.map(Z=>String(Z.content??Z.raw??"")).join("");if(U.trim()){const Z=U.replace(/^\s+/,"");if(d(C,U))p.splice(z,1),z--;else if(Z.startsWith("<"))p.splice(z,1,{type:"html_block",content:Z});else{const q=c(U,u(p,z,"paragraph"));p.splice(z,1,...q)}}else p.splice(z,1),z--}else p.splice(z,1),z--;P.pop();continue}C.content=`${String(C.content??"")} +${E}`,Array.isArray(C.children)&&C.children.push(...H),p.splice(z,1),z--;continue}if(L.type!=="inline")continue;const T=Array.isArray(L.children)?L.children:[];for(const $ of m)if((T.length?Tae(T,$):_($).test(E)&&!A($).test(E)?1:0)>0){P.push({tag:$,index:z});break}}}{let y=0;for(let w=0;w0?y--:(p.splice(w,1),w--))}}for(let y=0;y/]+)/)?.[1]??"").toLowerCase();if(L.startsWith("!")||L.startsWith("?")){w.loading=!1;continue}if(m.has(L)){const D=String(w.content??""),M=ss(D),R=M===-1?null:t_(D,L,M+1);w.loading=R?!1:w.loading!==void 0?w.loading:!0;const O=R?.start??-1,U=R?R.end-R.start:0;if(O!==-1){const Z=D.slice(0,O+U);let q="";M!==-1&&M]+)))?/g;let T;for(;(T=E.exec(w.content||""))!==null;)T[1],T[2]||T[3]||T[4];const $=String(w.content??""),C=new RegExp(`<\\/\\s*${L}\\s*>`,"i").exec($),j=C?C.index:-1,H=C?C[0].length:0;if(j!==-1){const D=$.slice(0,j+H),M=($.slice(j+H)||"").replace(/^\s+/,"");w.children=[{type:"html_block",content:D,tag:L,loading:!1}],w.content=D,w.raw=D,M&&p.splice(y+1,0,M.startsWith("<")?{type:"html_block",content:M}:{type:"text",content:M,raw:M})}else w.children=[{type:"html_block",content:w.content,tag:L,loading:!0}];continue}if(!w||w.type!=="inline")continue;if(w.children.length===2&&w.children[0].type==="html_inline"){const L=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),E=w.children[1],T=String(E?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(E?.type==="html_inline"&&T===L)continue;h.has(L)?(w.children[0].loading=!0,w.children[0].tag=L,w.children.push({type:"html_inline",tag:L,loading:!0,content:``})):w.children=[{type:"html_block",loading:!0,tag:L,content:String(w.children[0]?.content??"")+String(w.children[1]?.content??"")}];continue}else if(w.children.length===3&&w.children[0].type==="html_inline"&&w.children[2].type==="html_inline"){const L=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(h.has(L))continue;w.children=[{type:"html_block",loading:!1,tag:L,content:w.children.map(E=>E.content).join("")}];continue}if(!w.content?.startsWith("<")||w.children?.length!==1)continue;const _=String(w.content),A=w,P=A.children[0];if(P?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(_)&&(A.children.length=0);continue}const z=String(P.content??_).match(Mae)?.[1]?.toLowerCase()??"";if(z){if(/\/\s*>\s*$/.test(_)||BI.has(z)){A.children=[{type:"html_inline",content:_}];continue}A.children.length=0}}})}function jae(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function Oae(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(r.length===1&&!jae(r[0]??"")){const a=r[0]??"",c=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:c},{type:"inline",tag:"",nesting:0,level:c,content:a,children:[{type:"text",content:a,level:c+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:c}),s+=2}}})}const PI=/\.([a-z0-9]{1,15})$/i,Hae=/[_()[\]{}<>]/u,Dae=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Vae=/[?#@]/u,Wae=/[\\/]/u,qae=/^[\p{L}\p{N}./\\-]+$/u,Uae=/^[A-Za-z0-9-]{1,63}$/u,Zae=/^xn--[a-z0-9-]{2,59}$/i,Kae=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Gae=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,Yae=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,Xae=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,Jae=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,Qae=2e3,e1e=512,t1e={},n1e=new Set(["ai","md","py","rs","sh","zip"]),FI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),o1e=new Set([...FI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),s1e=new Set(["com","dev","io","page","site"]),i1e=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),l1e=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),x0=new Map;function o_(e,t){if(!e||e.length>e1e)return t;for(x0.set(e,t);x0.size>Qae;){const n=x0.keys().next().value;if(!n)break;x0.delete(n)}return t}function Y2(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function jh(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Y2(n)?n:void 0}function s_(e,t){if(!Y2(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function i_(e){const t=xf(e);return Y2(t)?t:void 0}function r1e(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function l_(e,t){if(!Y2(t))return;const n=String(e??"").trim().split(/\s+/u).map(r1e).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>x5(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>x5(s,{marketTicker:!0}))&&(o.marketTicker=!0),Y2(o)?o:void 0}function E1(e,t=!1){let n;return{options(o){return t||o==null?s_(e,n):s_(e,jh(i_(o),l_(o,n)))},remember(o){const s=i_(o);n=t?jh(n,s):jh(s,l_(o,n))},reset(){n=void 0}}}function r_(e){return Uae.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function a1e(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return r_(n)||Zae.test(n)?t.every(r_):!1}function jI(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function c1e(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function u1e(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function OI(e,t,n){const o=c1e(t);return jI(e)&&u1e(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function d1e(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function xf(e){const t=String(e??""),n=x0.get(t);return n?(x0.delete(t),x0.set(t,n),n):d1e(t)?o_(t,{explicitFilename:Yae.test(t),filename:Xae.test(t),marketTicker:Jae.test(t)}):o_(t,t1e)}function f1e(e){return a1e(e.split(/[\\/]/)[0]??"")}function p1e(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function h1e(e){if(Hae.test(e)||!qae.test(e))return!0;if(Wae.test(e))return!f1e(e);const t=e.replace(PI,"");return jI(t)?!0:t.split(".").filter(Boolean).some(p1e)}function m1e(e,t,n){if(!(n?o1e:FI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Gae:Kae).test(o)}function x5(e,t={}){if(!e||Dae.test(e)||Vae.test(e))return!1;const n=e.match(PI);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return m1e(e,o,t.marketTicker===!0)?!0:l1e.has(o)?!n1e.has(o)||t.filename?!0:h1e(e):!!(t.explicitFilename&&s1e.has(o)||t.filename&&i1e.has(o))}const a_=["!"];function Fi(e){return{type:"text",content:e,raw:e}}function n0(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function o0(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function ja(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function g1e(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(Fi(t))}}function c_(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function y1e(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function u_(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;ol.type==="code_inline"),o=new Map;let s=0;for(let l=0;l0&&c?d_(c):-1;if(u!==-1&&c)for(const d of c.slice(u))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(l=a);continue}if(!(r.type!=="text"||typeof r.content!="string"))for(const a of r.content)a==="("?s++:a===")"&&s>0&&s--}const i=xf(t);for(let l=0;l<=e.length-1;l++){l<0&&(l=0);const r=e[l];if(!r)break;if(r.type==="link_open"&&(r.markup==="linkify"||r.markup==="autolink")){let a=-1;for(let c=l+1;c0){const h=d_(c);h!==-1&&(d===-1||h=m.content.length){p-=m.content.length;continue}if(p<0)break;const k=m.content[p],x=m.content.slice(0,p);let y=m.content.slice(p);for(let A=h+1;A0&&(e.splice(h+1,w),a=h+1);let _=u;if(k==="!"&&f!==-1)_=u.slice(0,f);else if(y){const A=encodeURI(y);if(A&&u.endsWith(A))_=u.slice(0,u.length-A.length);else{const P=k?encodeURI(k):"",z=P?u.indexOf(P):-1;z!==-1&&(_=u.slice(0,z))}}_!==u&&y1e(r,_),y&&e.splice(a+1,0,Fi(y));break}}}if(!n){if(r?.type==="em_open"&&e[l-1]?.type==="text"&&e[l-1].content?.endsWith("*")){const a=e[l-1].content?.replace(/(\*+)$/,"")||"";e[l-1].content=a,r.type="strong_open",r.tag="strong",r.markup="**";for(let c=l+1;cd[0]==="href")?.[1]||"";if(e[l+3]?.type==="text"){const d=(e[l+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(u+=e[l+3]?.content?.slice(0,d)||"",e[l+3].content=""),a.push(ja(c,u,f));const p=e[l+3].content?.replace(/^\)\**/,"");p&&a.push(Fi(p)),e.splice(l-4,8,...a)}else a.push({type:"link",loading:!0,href:u,title:"",text:c,children:[{type:"text",content:u,raw:u}],raw:`[${c}](${u})`}),e.splice(l-4,7,...a);continue}else if(e[l-1].content==="]("&&e[l-3]?.type==="text"&&e[l-3].content?.endsWith(")"))if(e[l-2]?.type==="strong_open"){const[a,c]=e[l-3].content?.split("[**")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else if(e[l-2]?.type==="em_open"){const[a,c]=e[l-3].content?.split("[*")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else{const[a,c]=e[l-3].content?.split("[")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}}if(r.type==="link_close"&&r.nesting===-1&&e[l-2]?.type==="link_open"&&e[l+1]?.type==="text"&&e[l-1]?.type==="text"){const a=e[l-1].content||"",c=e[l-2].attrs||[],u=c.find(x=>x[0]==="href")?.[1]||"",d=c.find(x=>x[0]==="title")?.[1]||"";let f=3,p=2;const h=(e[l-3]?.content||"").match(/^(\*+)$/),m=[];if(h){p+=1;const x=h[1].length;n0(m,x)}if(r.markup!=="linkify"&&e[l+1].type==="text"&&e[l+1]?.content?.startsWith("](")){f+=1;for(let x=l+1;xk[0]==="href")?.[1];e[l+5]?.type==="text"&&e[l+5].content==="."?(f=(m||f)+e[l+5].content,e[l+5].content=""):f=m||f,p+=3}let h=!0;if(r.nesting===-1&&(d=d.replace(/\*+$/,"")),e[l+2]?.type==="text"){const m=(e[l+2]?.content??"").indexOf(")");h=m===-1,m===-1&&(f+=e[l+2]?.content?.slice(0,m)||"",e[l+2].content="")}a.push(ja(d,f,h)),o0(a,2),e.splice(l-2,p,...a)}if(r.type==="text"&&/\*+\[[^\]]*$/.test(r.content||"")&&e[l+1]?.type==="strong_open"&&e[l+2]?.type==="text"&&e[l+2].content==="]("&&e[l+3]?.type==="link_open"&&e[l+5]?.type==="link_close"&&e[l+6]?.type==="text"&&e[l+6].content===")"&&e[l+7]?.type==="strong_close"){const a=(r.content||"").match(/^(\*+)\[(.*)$/);if(a){const c=(a[2]||"")+a[1];let u=e[l+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!u&&e[l+4]?.type==="text"&&(u=e[l+4].content||"");const d=[];n0(d,2),d.push(ja(c,u,!1)),o0(d,2),e.splice(l,9,...d),l-=d.length-1;continue}}}}if(n)return e;for(let l=0;l{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k{const n=t;try{const o=N1e(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function f_(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function p_(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function h_(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function HI(e,t){if(!e.startsWith("|")||e.includes(` +`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function Oh(e){return HI(e)!==null}function DI(e){return/^:?-+:?$/.test(e.trim())}function T1e(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(DI)}function E1e(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function I1e(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(DI)&&E1e(n)}function L1e(e){return e==="|"||e==="|:"}function $1e(e){const t=HI(e);return t!==null&&t.every(n=>!n.includes(":"))}function N1e(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const l=String(i.content??""),r=l.split(` `)[0]??"",[a="",c="",...u]=l.split(` `),d=!t&&!l.includes(` -`)&&/\r?\n$/.test(n)&&Fh(l);if(!t&&(l.includes(` -`)&&u.length===0&&Fh(a)&&u1e(c)||d)){const f=r.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>f_(h)),p=[...u_(),...f,...d_()];o.splice(s-1,3,...p)}else if(l.includes(` -`)&&u.length===0&&Fh(a)&&a1e(c)){const f=r.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>f_(h)),p=[...u_(),...f,...d_()];o.splice(s-1,3,...p)}else l.includes(` -`)&&u.length===0&&f1e(a)&&d1e(c)&&(i.content=l.slice(0,-2),i.children.splice(2,1))}return o}function h1e(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let c=t;for(;c=0&&e[u]==="\\";)d++,u--;if(d%2===0)return c}c++}return-1}const i=n[n.length-1],l=o;let r=0,a=t;for(;a=0&&e[u]==="\\";)d++,u--;if(d%2===0){if(r===0)return a;r--,a+=l.length;continue}}const c=e[a];if(c==="\\"){a+=2;continue}c===i?r++:c===l[l.length-1]&&r>0&&r--,a++}return-1}var m1e=h1e;const g1e=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],x5=g1e.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),v1e=/\\[a-z]+/i,OI="(?:\\\\|\\u0008)",y1e=new RegExp(String.raw`${OI}(?:${x5})\s*\{[^}]+\}`,"i"),w1e=new RegExp(String.raw`(?:${OI})?(?:${x5})\s*\{`,"i"),k1e=/\\(?:text|frac|left|right|times)/,b1e=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,_1e=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,x1e=/[A-Z]+\s*\([^)]+\)/i,S1e=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,C1e=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,M1e=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,A1e={"\b":"\\b","\v":"\\v","\f":"\\f"};function T1e(e){let t="";for(const n of e)t+=A1e[n]??n;return t}function e1(e){if(!e)return!1;const t=T1e(e),n=t.trim();if(M1e.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=v1e.test(t),s=y1e.test(t),i=w1e.test(t),l=k1e.test(t),r=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=b1e.test(t)&&!_1e.test(t),c=x1e.test(t),u=S1e.test(n),d=C1e.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||l||r||a||c||u||d||f||p}const HI="__markstreamMathPluginApplied",K8=80,DI=2e4,p_=DI+4096;function av(e){return!!e[HI]}function E1e(e){e[HI]=!0}const VI=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],I1e=["cdot","mathbf{","partial","mu_{"],WI=VI.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),qI="[ \r\b\f\v]",$1e=new RegExp(`([^\\\\])(${I1e.map(e=>e).join("|")})+`,"g"),L1e=/span\{([^}]+)\}/,N1e=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,z1e=/(^|[^\\])\\\r?\n/g,B1e=/(^|[^\\])\\$/g,R1e=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,P1e=new RegExp(`(${qI})|(${WI})\\b`,"g"),h_=new Map,m_=new Map;function F1e(e){if(!e)return P1e;const t=[...e];t.sort((l,r)=>r.length-l.length);const n=t.join(""),o=h_.get(n);if(o)return o;const s=`(?:${t.map(l=>l.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${qI})|(${s})\\b`,"g");return h_.set(n,i),i}function j1e(e,t){const n=e?[]:[...t??[]];e||n.sort((r,a)=>a.length-r.length);const o=e?"__default__":n.join(""),s=m_.get(o);if(s)return s;const i=e?[x5,WI].filter(Boolean).join("|"):[n.map(r=>r.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),x5].filter(Boolean).join("|"),l=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return m_.set(o,l),l}const g_={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function v_(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function O1e(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&R1e.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function y_(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function Ha(e,t){const n=t?.commands??VI,o=t?.escapeExclamation??!0,s=t?.commands==null,i=F1e(s?void 0:n);let l=e.replace(i,(c,u,d,f,p)=>{if(u!==void 0&&g_[u]!==void 0)return`\\${g_[u]}`;if(d&&n.includes(d)){const h=p&&typeof f=="number"?p[f-1]:void 0;return h==="\\"||h&&/\w/.test(h)?c:`\\${d}`}return c});o&&(l=O1e(l));let r=l;const a=j1e(s,s?void 0:n);return r=r.replace(a,(c,u,d)=>`${u}\\${d}{`),r=r.replace(L1e,"span\\{$1\\}").replace(N1e,"\\operatorname{span}\\{$1\\}"),r=r.replace(z1e,`$1\\\\ -`),r=r.replace(B1e,"$1\\\\"),r=r.replace($1e,"$1\\$2"),r}function w_(e){const t=e.trim();return!(!e1(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function UI(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[r]==="\\"&&r+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function G8(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=r)break;const c=S5(s,a);if(c){l=Math.max(a+Math.max(1,t.length),c[1]);continue}_f(e,a)||i++,l=a+Math.max(1,t.length)}return i}function cv(e,t,n){const o=J2(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!J2(o.slice(0,s)).trim()||_f(o,s))return-1;const i=UI(o);if(S5(i,s))return-1;const l=k_(o,t,0,s,i);if(t==="$$"){if(l%2===1)return-1}else if(l>k_(o,n,0,s,i))return-1;return s}function X2(e){return e===" "||e===" "}function J2(e){let t=e.length;for(;t>0&&X2(e[t-1]);)t--;return e.slice(0,t)}function b_(e){let t=0;for(let n=0;n=48&&t<=57}function D1e(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function V1e(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function W1e(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(V1e)}function q1e(e){let t=0;if(!__(e[t]))return!1;for(;__(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:X2(e[t+1])}function ZI(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&X2(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&X2(t[1])||q1e(t)||D1e(t)||W1e(t))}function x_(e,t){return e?t?`${e} -${t}`:e:t}function Y8(e){const t=String(e??"").trim();return t?e1(t):!1}function S_(e){let t=0;for(let n=0;nK8){p=!0;break}const m=s[h],k=jc(m,u);if(k!==-1){const x=x_(f,m.slice(0,k));if(!Y8(x)){p=!0;break}const y=m.slice(k+u.length),w=y.trim()?`suffix:${S_(y)}`:"nosuffix";return["closed",c,o+r,d,o+h,k,S_(x),w].join(":")}if(ZI(m)){p=!0;break}if(f=x_(f,m),f.length>DI){p=!0;break}}if(!p&&Y8(f))return["pending",c,o+r,d].join(":")}}return null}function Oh(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function Z1e(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function Hh(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function K1e(e,t){E1e(e);const n=(l,r,a)=>{const c=String(r??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!c)return;const u=l.push("paragraph_open","p",1);u.map=[a,a+1];const d=l.push("inline","",0);d.content=c,d.map=[a,a+1],d.children=[],l.push("paragraph_close","p",-1)},o=(l,r)=>{const a=l,c=!!t?.strictDelimiters,u=!a?.env?.__markstreamFinal,d=(y,w)=>{let _=w;for(;_h.trim()).flatMap(h=>h_(h)),p=[...f_(),...f,...p_()];o.splice(s-1,3,...p)}else if(l.includes(` +`)&&u.length===0&&Oh(a)&&T1e(c)){const f=r.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>h_(h)),p=[...f_(),...f,...p_()];o.splice(s-1,3,...p)}else l.includes(` +`)&&u.length===0&&$1e(a)&&L1e(c)&&(i.content=l.slice(0,-2),i.children.splice(2,1))}return o}function z1e(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let c=t;for(;c=0&&e[u]==="\\";)d++,u--;if(d%2===0)return c}c++}return-1}const i=n[n.length-1],l=o;let r=0,a=t;for(;a=0&&e[u]==="\\";)d++,u--;if(d%2===0){if(r===0)return a;r--,a+=l.length;continue}}const c=e[a];if(c==="\\"){a+=2;continue}c===i?r++:c===l[l.length-1]&&r>0&&r--,a++}return-1}var B1e=z1e;const R1e=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],S5=R1e.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),P1e=/\\[a-z]+/i,VI="(?:\\\\|\\u0008)",F1e=new RegExp(String.raw`${VI}(?:${S5})\s*\{[^}]+\}`,"i"),j1e=new RegExp(String.raw`(?:${VI})?(?:${S5})\s*\{`,"i"),O1e=/\\(?:text|frac|left|right|times)/,H1e=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,D1e=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,V1e=/[A-Z]+\s*\([^)]+\)/i,W1e=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,q1e=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,U1e=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,Z1e={"\b":"\\b","\v":"\\v","\f":"\\f"};function K1e(e){let t="";for(const n of e)t+=Z1e[n]??n;return t}function Qa(e){if(!e)return!1;const t=K1e(e),n=t.trim();if(U1e.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=P1e.test(t),s=F1e.test(t),i=j1e.test(t),l=O1e.test(t),r=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=H1e.test(t)&&!D1e.test(t),c=V1e.test(t),u=W1e.test(n),d=q1e.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||l||r||a||c||u||d||f||p}const WI="__markstreamMathPluginApplied",Y8=80,qI=2e4,m_=qI+4096;function uv(e){return!!e[WI]}function G1e(e){e[WI]=!0}const UI=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],Y1e=["cdot","mathbf{","partial","mu_{"],ZI=UI.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),KI="[ \r\b\f\v]",X1e=new RegExp(`([^\\\\])(${Y1e.map(e=>e).join("|")})+`,"g"),J1e=/span\{([^}]+)\}/,Q1e=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,e0e=/(^|[^\\])\\\r?\n/g,t0e=/(^|[^\\])\\$/g,n0e=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,o0e=new RegExp(`(${KI})|(${ZI})\\b`,"g"),g_=new Map,v_=new Map;function s0e(e){if(!e)return o0e;const t=[...e];t.sort((l,r)=>r.length-l.length);const n=t.join(""),o=g_.get(n);if(o)return o;const s=`(?:${t.map(l=>l.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${KI})|(${s})\\b`,"g");return g_.set(n,i),i}function i0e(e,t){const n=e?[]:[...t??[]];e||n.sort((r,a)=>a.length-r.length);const o=e?"__default__":n.join(""),s=v_.get(o);if(s)return s;const i=e?[S5,ZI].filter(Boolean).join("|"):[n.map(r=>r.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),S5].filter(Boolean).join("|"),l=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return v_.set(o,l),l}const y_={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function w_(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function l0e(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&n0e.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function k_(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function Oa(e,t){const n=t?.commands??UI,o=t?.escapeExclamation??!0,s=t?.commands==null,i=s0e(s?void 0:n);let l=e.replace(i,(c,u,d,f,p)=>{if(u!==void 0&&y_[u]!==void 0)return`\\${y_[u]}`;if(d&&n.includes(d)){const h=p&&typeof f=="number"?p[f-1]:void 0;return h==="\\"||h&&/\w/.test(h)?c:`\\${d}`}return c});o&&(l=l0e(l));let r=l;const a=i0e(s,s?void 0:n);return r=r.replace(a,(c,u,d)=>`${u}\\${d}{`),r=r.replace(J1e,"span\\{$1\\}").replace(Q1e,"\\operatorname{span}\\{$1\\}"),r=r.replace(e0e,`$1\\\\ +`),r=r.replace(t0e,"$1\\\\"),r=r.replace(X1e,"$1\\$2"),r}function b_(e){const t=e.trim();return!(!Qa(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function GI(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[r]==="\\"&&r+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function X8(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=r)break;const c=C5(s,a);if(c){l=Math.max(a+Math.max(1,t.length),c[1]);continue}Sf(e,a)||i++,l=a+Math.max(1,t.length)}return i}function dv(e,t,n){const o=J2(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!J2(o.slice(0,s)).trim()||Sf(o,s))return-1;const i=GI(o);if(C5(i,s))return-1;const l=__(o,t,0,s,i);if(t==="$$"){if(l%2===1)return-1}else if(l>__(o,n,0,s,i))return-1;return s}function X2(e){return e===" "||e===" "}function J2(e){let t=e.length;for(;t>0&&X2(e[t-1]);)t--;return e.slice(0,t)}function x_(e){let t=0;for(let n=0;n=48&&t<=57}function a0e(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function c0e(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function u0e(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(c0e)}function d0e(e){let t=0;if(!S_(e[t]))return!1;for(;S_(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:X2(e[t+1])}function YI(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&X2(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&X2(t[1])||d0e(t)||a0e(t)||u0e(t))}function C_(e,t){return e?t?`${e} +${t}`:e:t}function J8(e){const t=String(e??"").trim();return t?Qa(t):!1}function M_(e){let t=0;for(let n=0;nY8){p=!0;break}const m=s[h],k=jc(m,u);if(k!==-1){const x=C_(f,m.slice(0,k));if(!J8(x)){p=!0;break}const y=m.slice(k+u.length),w=y.trim()?`suffix:${M_(y)}`:"nosuffix";return["closed",c,o+r,d,o+h,k,M_(x),w].join(":")}if(YI(m)){p=!0;break}if(f=C_(f,m),f.length>qI){p=!0;break}}if(!p&&J8(f))return["pending",c,o+r,d].join(":")}}return null}function Dh(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function p0e(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function Vh(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function h0e(e,t){G1e(e);const n=(l,r,a)=>{const c=String(r??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!c)return;const u=l.push("paragraph_open","p",1);u.map=[a,a+1];const d=l.push("inline","",0);d.content=c,d.map=[a,a+1],d.children=[],l.push("paragraph_close","p",-1)},o=(l,r)=>{const a=l,c=!!t?.strictDelimiters,u=!a?.env?.__markstreamFinal,d=(y,w)=>{let _=w;for(;_=3&&(!_||/\s/.test(_))){const M=a.push("text","",0);return M.content=a.src.slice(a.pos,y),a.pos=y,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),h=Math.max(0,a.pos-p.length);let m=h,k=h;const x=h;for(const[y,w]of f){const _=a.src,M=UI(_),P=H1e(_,u);let B=!1;y==="$$"&&m!==x&&(m=x);let $=-1,T=-1,I=0;const N=C=>{if((C==="undefined"||C==null)&&(C=""),C==="\\"){a.pos=a.pos+C.length,m=a.pos;return}if(C==="\\)"||C==="\\("){const D=a.push("text_special","",0);D.content=C==="\\)"?")":"(",D.markup=C,a.pos=a.pos+C.length,m=a.pos;return}if(!C)return;if(y==="$$"&&C.includes("$")){let D=0;for(;D0&&C[A-1]==="$"||A+10){const R=C.slice(0,O),j=a.push("text","",0);j.content=R,a.pos=a.pos+R.length,m=a.pos}const D=C.slice(O).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(D){const[,R,j]=D,q=j.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),K=q?q[1]:j,U=q&&q[2]?q[2]:null,te=a.push("image","img",0);te.attrs=[["src",K],["alt",R]],U&&te.attrs.push(["title",U]),te.content=R,te.children=[{type:"text",content:R,tag:""}],a.pos=a.pos+D[0].length,m=a.pos;const J=C.slice(O+D[0].length);J&&N(J);return}const A=a.push("text","",0);A.content=C,a.pos=a.pos+C.length,m=a.pos;return}const H=a.push("text","",0);H.content=C,a.pos=a.pos+C.length,m=a.pos};for(;!(m>=_.length);){const C=_.indexOf(y,m);if(C===-1)break;if(_f(_,C)){m=C+Math.max(1,y.length);continue}const O=S5(M,C);if(O){m=O[1];continue}const H=S5(P,C);if(H){m=H[1];continue}if(C===$&&m===T){if(I++,I>2){m=C+Math.max(1,y.length);continue}}else I=0,$=C,T=m;if(y==="("&&C>0){let J=C-1;for(;J>=0&&_[J]===" ";)J--;if(J>=0&&_[J]==="]"){m=C+y.length;continue}}if(y==="$"&&C>0&&_[C-1]==="$"){m=C+1;continue}if(y==="$"&&C<_.length-1&&_[C+1]==="$"){m=C+2;continue}const D=y==="$"?jh(_,C+y.length):m1e(_,C+y.length,y,w);if(D===-1){const J=_.slice(C+y.length);if(J.includes(y)){m=_.indexOf(y,C+y.length);continue}if(D===-1){const ee=y==="$"&&Z1e(J);if(u&&!c&&!ee&&e1(J)&&!J.includes("`")){if(m=C+y.length,B=!0,!r){a.pending="";const ie=k?_.slice(k,m):_.slice(0,m),Q=v_(ie)%2===1;if(k)N(_.slice(k,m));else{let he=_.slice(0,m);he.endsWith(y)&&(he=he.slice(0,he.length-y.length)),N(he)}if(Q){const he=y_(ie)?.marker??"**",xe=a.push("strong_open","",0);xe.markup=he;const Ye=a.push("math_inline","math",0);Ye.content=Ha(J,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${J}${w}`,Ye.loading=!0,xe.content=J,a.push("strong_close","",0)}else{const he=a.push("math_inline","math",0);he.content=Ha(J,t),he.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",he.raw=`${y}${J}${w}`,he.loading=!0}a.pos=_.length}m=_.length,k=m}break}}const A=_.slice(C+y.length,D),R=A.includes("`"),j=!A||!A.trim(),q=y==="$",K=_[D+w.length],U=q&&Oh(A,K),te=q&&Hh(A);if(c?R||j||U||te:R||j||U||te||!q&&!e1(A)){m=D+w.length;const J=_.slice(a.pos,m);a.pending||(N(J),k=m);continue}if(B=!0,!r){const J=_.slice(a.pos-(a.pending??"").length,C);let ee=_.slice(0,m)?_.slice(k,C):J;const ie=v_(ee)%2===1;C!==a.pos&&ie&&(ee=a.pending+_.slice(a.pos,C));const Q=ie?y_(ee):null,he=Q?.marker??"**";if(a.pending!==ee)if(a.pending="",ie)if(Q){const xe=ee.slice(Q.index+he.length);N(ee.slice(0,Q.index));const Ye=a.push("strong_open","",0);Ye.markup=he;const st=a.push("text","",0);st.content=xe,a.push("strong_close","",0)}else N(ee);else N(ee);if(ie){const xe=a.push("strong_open","",0);xe.markup=he;const Ye=a.push("math_inline","math",0);Ye.content=Ha(A,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${A}${w}`,Ye.loading=!1;const st=_.slice(D+w.length).startsWith(he);return st&&a.push("strong_close","",0),a.pos=d(_,D+w.length),m=a.pos,k=m,st||a.push("strong_close","",0),!0}else{const xe=a.push("math_inline","math",0);xe.content=Ha(A,t),xe.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",xe.raw=`${y}${A}${w}`,xe.loading=!1}}return m=d(_,D+w.length),k=m,a.pos=m,!0}if(B){if(r)a.pos=m;else{if(y==="$$"&&m<_.length&&_.slice(m).includes("$")){let C=m;for(;!(C>=_.length);){const O=G8(_,C);if(O===-1)break;if(O+1<_.length&&_[O+1]==="$"){C=O+2;continue}if(O>0&&_[O-1]==="$"){C=O+1;continue}const H=jh(_,O+1);if(H===-1)break;const D=_.slice(O+1,H),A=D.includes("`"),R=!D||!D.trim(),j=_[H+1],q=Oh(D,j),K=Hh(D);if(!A&&!R&&!q&&!K){const U=_.slice(m,O);U&&N(U);const te=a.push("math_inline","math",0);te.content=Ha(D,t),te.markup="$",te.raw=`$${D}$`,te.loading=!1,m=H+1,C=H+1}else N("$"),C=O+1}C<_.length&&N(_.slice(C))}else m<_.length&&N(_.slice(m));a.pos=_.length}return!0}}return!1},s=(l,r,a,c)=>{const u=l,d=!u?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],h=u.bMarks[r]+u.tShift[r];let m=u.src.slice(h,u.eMarks[r]).trim(),k=!1,x="",y="",w=!1,_="",M=!1;for(const[U,te]of p)if(m.startsWith(U))if(U.includes("[")){const J=U==="\\["?m.slice(U.length):"";if(U==="\\["&&jc(J,te)===-1&&!/^\s*!\[/.test(J)&&!J.includes("`")&&e1(J)){k=!0,x=U,y=te;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(r+1=0?"\\]":y,I=$>=0?$:jc(m,y,B);if(!w&&I>x.length){const U=m.slice(P+x.length,I),te=u.push("math_block","math",0);te.content=Ha(U),te.markup=x==="$$"?"$$":x==="["?"[]":"\\[\\]",te.map=[r,r+1],te.raw=`${x}${U}${T}`,te.block=!0,te.loading=!1,u.line=r+1;const J=m.slice(I+T.length);return J.trim()&&n(u,J,r),!0}let N=r,C="",O=!1,H="",D=r;const A=w?m:m===x?"":m.slice(x.length),R=!f&&x==="\\["?"]":"",j=jc(A,y);if(j!==-1){const U=j;C=A.slice(0,U),H=A.slice(U+y.length),D=w?r+1:r,O=!0,N=D}else for(A&&!w&&(C=A),N=r+1;N=3&&(!_||/\s/.test(_))){const A=a.push("text","",0);return A.content=a.src.slice(a.pos,y),a.pos=y,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),h=Math.max(0,a.pos-p.length);let m=h,k=h;const x=h;for(const[y,w]of f){const _=a.src,A=GI(_),P=r0e(_,u);let z=!1;y==="$$"&&m!==x&&(m=x);let L=-1,E=-1,T=0;const $=C=>{if((C==="undefined"||C==null)&&(C=""),C==="\\"){a.pos=a.pos+C.length,m=a.pos;return}if(C==="\\)"||C==="\\("){const D=a.push("text_special","",0);D.content=C==="\\)"?")":"(",D.markup=C,a.pos=a.pos+C.length,m=a.pos;return}if(!C)return;if(y==="$$"&&C.includes("$")){let D=0;for(;D0&&C[M-1]==="$"||M+10){const R=C.slice(0,j),O=a.push("text","",0);O.content=R,a.pos=a.pos+R.length,m=a.pos}const D=C.slice(j).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(D){const[,R,O]=D,U=O.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),Z=U?U[1]:O,q=U&&U[2]?U[2]:null,te=a.push("image","img",0);te.attrs=[["src",Z],["alt",R]],q&&te.attrs.push(["title",q]),te.content=R,te.children=[{type:"text",content:R,tag:""}],a.pos=a.pos+D[0].length,m=a.pos;const ee=C.slice(j+D[0].length);ee&&$(ee);return}const M=a.push("text","",0);M.content=C,a.pos=a.pos+C.length,m=a.pos;return}const H=a.push("text","",0);H.content=C,a.pos=a.pos+C.length,m=a.pos};for(;!(m>=_.length);){const C=_.indexOf(y,m);if(C===-1)break;if(Sf(_,C)){m=C+Math.max(1,y.length);continue}const j=C5(A,C);if(j){m=j[1];continue}const H=C5(P,C);if(H){m=H[1];continue}if(C===L&&m===E){if(T++,T>2){m=C+Math.max(1,y.length);continue}}else T=0,L=C,E=m;if(y==="("&&C>0){let ee=C-1;for(;ee>=0&&_[ee]===" ";)ee--;if(ee>=0&&_[ee]==="]"){m=C+y.length;continue}}if(y==="$"&&C>0&&_[C-1]==="$"){m=C+1;continue}if(y==="$"&&C<_.length-1&&_[C+1]==="$"){m=C+2;continue}const D=y==="$"?Hh(_,C+y.length):B1e(_,C+y.length,y,w);if(D===-1){const ee=_.slice(C+y.length);if(ee.includes(y)){m=_.indexOf(y,C+y.length);continue}if(D===-1){const J=y==="$"&&p0e(ee);if(u&&!c&&!J&&Qa(ee)&&!ee.includes("`")){if(m=C+y.length,z=!0,!r){a.pending="";const se=k?_.slice(k,m):_.slice(0,m),Q=w_(se)%2===1;if(k)$(_.slice(k,m));else{let me=_.slice(0,m);me.endsWith(y)&&(me=me.slice(0,me.length-y.length)),$(me)}if(Q){const me=k_(se)?.marker??"**",xe=a.push("strong_open","",0);xe.markup=me;const Ye=a.push("math_inline","math",0);Ye.content=Oa(ee,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${ee}${w}`,Ye.loading=!0,xe.content=ee,a.push("strong_close","",0)}else{const me=a.push("math_inline","math",0);me.content=Oa(ee,t),me.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",me.raw=`${y}${ee}${w}`,me.loading=!0}a.pos=_.length}m=_.length,k=m}break}}const M=_.slice(C+y.length,D),R=M.includes("`"),O=!M||!M.trim(),U=y==="$",Z=_[D+w.length],q=U&&Dh(M,Z),te=U&&Vh(M);if(c?R||O||q||te:R||O||q||te||!U&&!Qa(M)){m=D+w.length;const ee=_.slice(a.pos,m);a.pending||($(ee),k=m);continue}if(z=!0,!r){const ee=_.slice(a.pos-(a.pending??"").length,C);let J=_.slice(0,m)?_.slice(k,C):ee;const se=w_(J)%2===1;C!==a.pos&&se&&(J=a.pending+_.slice(a.pos,C));const Q=se?k_(J):null,me=Q?.marker??"**";if(a.pending!==J)if(a.pending="",se)if(Q){const xe=J.slice(Q.index+me.length);$(J.slice(0,Q.index));const Ye=a.push("strong_open","",0);Ye.markup=me;const at=a.push("text","",0);at.content=xe,a.push("strong_close","",0)}else $(J);else $(J);if(se){const xe=a.push("strong_open","",0);xe.markup=me;const Ye=a.push("math_inline","math",0);Ye.content=Oa(M,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${M}${w}`,Ye.loading=!1;const at=_.slice(D+w.length).startsWith(me);return at&&a.push("strong_close","",0),a.pos=d(_,D+w.length),m=a.pos,k=m,at||a.push("strong_close","",0),!0}else{const xe=a.push("math_inline","math",0);xe.content=Oa(M,t),xe.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",xe.raw=`${y}${M}${w}`,xe.loading=!1}}return m=d(_,D+w.length),k=m,a.pos=m,!0}if(z){if(r)a.pos=m;else{if(y==="$$"&&m<_.length&&_.slice(m).includes("$")){let C=m;for(;!(C>=_.length);){const j=X8(_,C);if(j===-1)break;if(j+1<_.length&&_[j+1]==="$"){C=j+2;continue}if(j>0&&_[j-1]==="$"){C=j+1;continue}const H=Hh(_,j+1);if(H===-1)break;const D=_.slice(j+1,H),M=D.includes("`"),R=!D||!D.trim(),O=_[H+1],U=Dh(D,O),Z=Vh(D);if(!M&&!R&&!U&&!Z){const q=_.slice(m,j);q&&$(q);const te=a.push("math_inline","math",0);te.content=Oa(D,t),te.markup="$",te.raw=`$${D}$`,te.loading=!1,m=H+1,C=H+1}else $("$"),C=j+1}C<_.length&&$(_.slice(C))}else m<_.length&&$(_.slice(m));a.pos=_.length}return!0}}return!1},s=(l,r,a,c)=>{const u=l,d=!u?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],h=u.bMarks[r]+u.tShift[r];let m=u.src.slice(h,u.eMarks[r]).trim(),k=!1,x="",y="",w=!1,_="",A=!1;for(const[q,te]of p)if(m.startsWith(q))if(q.includes("[")){const ee=q==="\\["?m.slice(q.length):"";if(q==="\\["&&jc(ee,te)===-1&&!/^\s*!\[/.test(ee)&&!ee.includes("`")&&Qa(ee)){k=!0,x=q,y=te;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(r+1=0?"\\]":y,T=L>=0?L:jc(m,y,z);if(!w&&T>x.length){const q=m.slice(P+x.length,T),te=u.push("math_block","math",0);te.content=Oa(q),te.markup=x==="$$"?"$$":x==="["?"[]":"\\[\\]",te.map=[r,r+1],te.raw=`${x}${q}${E}`,te.block=!0,te.loading=!1,u.line=r+1;const ee=m.slice(T+E.length);return ee.trim()&&n(u,ee,r),!0}let $=r,C="",j=!1,H="",D=r;const M=w?m:m===x?"":m.slice(x.length),R=!f&&x==="\\["?"]":"",O=jc(M,y);if(O!==-1){const q=O;C=M.slice(0,q),H=M.slice(q+y.length),D=w?r+1:r,j=!0,$=D}else for(M&&!w&&(C=M),$=r+1;${const u=l,d=u.bMarks[r]+u.tShift[r],f=u.src.slice(d,u.eMarks[r]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(l,r,a,c)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function G1e(e){const t=e.renderer.rules.image||function(n,o,s,i,l){const r=n,a=l;return a.renderToken?a.renderToken(r,o,s):""};e.renderer.rules.image=(n,o,s,i,l)=>{const r=n;return r[o].attrSet?.("loading","lazy"),t(r,o,s,i,l)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
        ${e.utils.escapeHtml(String(s.content??""))}
        `})}const Y1e=/^\s]/i,X1e=/^<\/a\s*>/i;function J1e(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const l=String(i.content??"");Y1e.test(l)&&o>0&&o--,X1e.test(l)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function Q1e(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const l=s.filter(r=>J1e(r,i));if(l.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:l}))})}function e0e(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(r=>r.name==="link")?.fn,s=n?.find(r=>r.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,l=e;l.__markstreamOriginalValidateLink=i,t.at("link",(...r)=>{const a=r[0].md,c=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof c!="function")return o(...r);const u=a.validateLink;a.validateLink=c;try{return o(...r)}finally{a.validateLink=u}}),t.at("image",(...r)=>{const a=r[0].md;if(!a)return s(...r);const c=a.validateLink;a.validateLink=i;try{return s(...r)}finally{a.validateLink=c}})}function t0e(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new $re({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:l=>!L0(l,{tagName:"a",attrName:"href"})}),e0e(i),Q1e(i),(e.enableMath??!0)&&K1e(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&Xre(i),e.enableFixIndentedCodeBlock!==!1&&kae(i),Qae(i),o1e(i),t1e(i),r1e(i),G1e(i),yae(i,{customHtmlTags:e.customHtmlTags}),i}function N0(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>N0(n))),t}function n0e(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function o0e(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function s0e(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function E3(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function M_(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function A_(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function r0e(e,t){const n=[],o=[],s=[],i=[],l=e.split(i0e),r=/\r?\n$/.test(e),a=l.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),c=p=>{const h=p;if(!YI.some(m=>h.startsWith(m)))if(h.startsWith("-")){const m=h.slice(1);s.push(A_(m,a))}else if(h.startsWith("+")){const m=h.slice(1);i.push(A_(m,a))}else{M_(n,o,s,i);const m=a&&h.startsWith(" ")?h.slice(1):h;n.push(m),o.push(m)}},u=r?Math.max(0,l.length-1):l.length;for(let p=0;p0||i.length>0)&&M_(n,o,s,i);const d=n.join(` +`:""}${y}`,Z.map=[r,$+1],Z.block=!0,Z.loading=!j,u.line=$+1,H.trim()&&n(u,H,D),!0},i=(l,r,a,c)=>{const u=l,d=u.bMarks[r]+u.tShift[r],f=u.src.slice(d,u.eMarks[r]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(l,r,a,c)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function m0e(e){const t=e.renderer.rules.image||function(n,o,s,i,l){const r=n,a=l;return a.renderToken?a.renderToken(r,o,s):""};e.renderer.rules.image=(n,o,s,i,l)=>{const r=n;return r[o].attrSet?.("loading","lazy"),t(r,o,s,i,l)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
        ${e.utils.escapeHtml(String(s.content??""))}
        `})}const g0e=/^\s]/i,v0e=/^<\/a\s*>/i;function y0e(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const l=String(i.content??"");g0e.test(l)&&o>0&&o--,v0e.test(l)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function w0e(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const l=s.filter(r=>y0e(r,i));if(l.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:l}))})}function k0e(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(r=>r.name==="link")?.fn,s=n?.find(r=>r.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,l=e;l.__markstreamOriginalValidateLink=i,t.at("link",(...r)=>{const a=r[0].md,c=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof c!="function")return o(...r);const u=a.validateLink;a.validateLink=c;try{return o(...r)}finally{a.validateLink=u}}),t.at("image",(...r)=>{const a=r[0].md;if(!a)return s(...r);const c=a.validateLink;a.validateLink=i;try{return s(...r)}finally{a.validateLink=c}})}function b0e(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new Xre({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:l=>!$0(l,{tagName:"a",attrName:"href"})}),k0e(i),w0e(i),(e.enableMath??!0)&&h0e(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&vae(i),e.enableFixIndentedCodeBlock!==!1&&Oae(i),w1e(i),x1e(i),b1e(i),A1e(i),m0e(i),Fae(i,{customHtmlTags:e.customHtmlTags}),i}function N0(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>N0(n))),t}function _0e(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function x0e(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function S0e(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function L3(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function T_(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function E_(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function A0e(e,t){const n=[],o=[],s=[],i=[],l=e.split(C0e),r=/\r?\n$/.test(e),a=l.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),c=p=>{const h=p;if(!QI.some(m=>h.startsWith(m)))if(h.startsWith("-")){const m=h.slice(1);s.push(E_(m,a))}else if(h.startsWith("+")){const m=h.slice(1);i.push(E_(m,a))}else{T_(n,o,s,i);const m=a&&h.startsWith(" ")?h.slice(1):h;n.push(m),o.push(m)}},u=r?Math.max(0,l.length-1):l.length;for(let p=0;p0||i.length>0)&&T_(n,o,s,i);const d=n.join(` `),f=o.join(` `);return{original:t&&r&&d?`${d} `:d,updated:t&&r&&f?`${f} -`:f}}function uv(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},o=typeof n.closed=="boolean"?n.closed:void 0,s=o===!0||o!==!1&&t,i=String(e.info??""),l=i.startsWith("diff"),r=l?(()=>{const c=i,u=c.indexOf(" ");return u===-1?"":String(c.slice(u+1)??"")})():i;let a=String(e.content??"");if(C_.test(a)&&(a=a.replace(C_,"")),l){const{original:c,updated:u}=r0e(a,s===!0);return{type:"code_block",language:r,code:String(u??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t,originalCode:c,updatedCode:u}}return{type:"code_block",language:r,code:String(a??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t}}function a0e(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function c0e(){return{type:"hardbreak",raw:`\\ -`}}function u0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i\s*$/.test(t)||b1.has(e)}function d0e(e){if(!e||e.length===0)return T_();const t=Vh.get(e);if(t)return t;const n=e.map(Vl).filter(Boolean);if(!n.length){const s=T_();return Vh.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:Op({customHtmlTags:e})};return Vh.set(e,o),o}function e$(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function f0e(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function C5(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function p0e(e,t,n){const o=e.slice();return C5(o,"href")||o.push(["href",t]),n!=null&&!C5(o,"title")&&o.push(["title",n]),o}function X8(e){return e.map(e$).join("")}function m4(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:m4(o.children)});continue}t.push(o)}return t}function h0e(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(M.toLowerCase())||(m+=M),x=!0,k=!0}const y=[],w=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let _;for(;(_=w.exec(r))!==null;){const M=_[1],P=_[2]||_[3]||_[4]||"";y.push([M,P])}if(c?.has(a)){const M=f0e(e);return[{type:a,tag:a,attrs:y,content:M?M.inner:p.innerTokens.length?X8(p.innerTokens):"",children:p.innerTokens.length?o(p.innerTokens,s,i,l):[],raw:M?.raw??m,loading:e.loading||k,autoClosed:x},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:y,content:m,children:h,raw:m,loading:k,autoClosed:x},p.nextIndex]}function t$(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>t$(t)).join(""):String(e.content??"")}function g0e(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>t$(t)).join("")}function E_(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],l=g0e(o??e);let r="";l?r=l:i!=null&&String(i).length>0?r=String(i):o?.content!=null&&String(o.content).length>0?r=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?r=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?r=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(r=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,c=a===null?null:String(a),u=String(e.content??"");return{type:"image",src:s,alt:r,title:c,raw:u,loading:t}}function v0e(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function y0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function k0e(e,t,n){const o=e.slice();return M5(o,"href")||o.push(["href",t]),n!=null&&!M5(o,"title")&&o.push(["title",n]),o}function I3(e,t,n){const o=e[t],s=w0e(o.attrs),i=String(M5(s,"href")??""),l=M5(s,"title"),r=l==null?null:String(l),a=k0e(s,i,r);let c=t+1;const u=[];let d=!0;for(;ck.type==="strong_open")){const k=String(p.content??""),x=String(p.raw??k),y=N0(p);y.content=k.slice(0,-2),y.raw=x.replace(/\*\*$/,""),f=u.slice(),f[f.length-1]=y}const h=Ko(f,void 0,void 0,n),m=h.map(k=>{const x=k;return"content"in k?String(x.content??""):String(x.raw??"")}).join("");return{node:{type:"link",href:i,title:r,text:m,children:h,raw:`[${m}](${i}${r?` "${r}"`:""})`,loading:d,attrs:a},nextIndex:c0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,N0e=/\p{P}/u,z0e=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,B0e=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,R0e=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,P0e=/:\/\//,J8=1,n$=2,F0e=4,j0e=8,o$=16,Ka=32,g4=64,qd=128,s$=256,O0e=512,Ud=1024,H0e=1982;function $3(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function _1(e){return!!e&&$0e.test(e)}function x1(e){return!!e&&(L0e.test(e)||N0e.test(e))}function l$(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&z0e.test(e)}function r$(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&B0e.test(e)}function V0e(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||_1(o)?!1:!(x1(o)&&!l$(o,n)&&n&&!_1(n)&&!x1(n))}function W0e(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||_1(n)?!1:!(x1(n)&&!r$(n,o)&&o&&!_1(o)&&!x1(o))}function q0e(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||_1(o)?!1:!(x1(o)&&!l$(o,n)&&n&&!_1(n)&&!x1(n))}function Z0e(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||_1(n)?!1:!(x1(n)&&!r$(n,o)&&o&&!_1(o)&&!x1(o))}function K0e(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const J0e=/[\p{L}\p{N}]/u,Q0e=/^[\p{L}\p{N}]+$/u;function Q8(e){return e?J0e.test(e):!1}function a$(e){return e?Q0e.test(e):!1}function h2(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function oce(e){return e?R0e.test(e)||P0e.test(e):!1}function sce(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Ko(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=bf(t),l={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(l.filename||l.explicitFilename||l.marketTicker)&&(o={...o,__linkifyDemotionContext:l});const r=o,a=[];let c=null,u=0;const d=o?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function h(){c=null}function m(X,se){const F=e.length===1?t:String(se.content??""),Z=[],fe=ece(X);if(fe!==-1){M(X.slice(0,fe),X.slice(0,fe));const ge=X.slice(fe);return ge&&(N({type:"text",content:ge,raw:ge}),u--),u++,!0}if(A0e.test(X)){const ge=X.indexOf("~~");ge!==-1&&Z.push({type:"strikethrough",index:ge})}if(T0e.test(X)){const ge=X.indexOf("**");ge!==-1&&Z.push({type:"strong",index:ge})}if(/[^*]*\*[^*]+/.test(X)){const ge=F?i$(F,0):X.indexOf("*");if(F&&ge===-1)return!1;ge!==-1&&Z.push({type:"emphasis",index:ge})}Z.sort((ge,oe)=>ge.index!==oe.index?ge.index-oe.index:ge.type===oe.type?0:ge.type==="strong"?-1:oe.type==="strong"?1:0);const ve=Z[0];if(!ve)return!1;if(ve.type==="strikethrough"){const ge=ve.index,oe=ge>-1?X.slice(0,ge):"";if(oe&&M(oe,oe),ge===-1)return u++,!0;const de=X.indexOf("~~",ge+2),ke=de===-1?X.slice(ge+2):X.slice(ge+2,de),Se=de===-1?"":X.slice(de+2),{node:me}=$_([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ke,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return h(),_(me),Se&&(N({type:"text",content:Se,raw:Se}),u--),u++,!0}if(ve.type==="strong"){const ge=ve.index,oe=ge>-1?X.slice(0,ge):"";if(oe&&M(oe,oe),ge===-1)return u++,!0;if(t&&ge===0){let le=!1,be=0;for(;be=2)return M(X,X),u++,!0}}if(t&&(X.match(/\*/g)||[]).length>D0e(t))return M(X.slice(oe.length),X.slice(oe.length)),u++,!0;const de=h2(X,ge);if(de.len>=3){const le=nce(X,ge+de.len);if(le!==-1){const be=X.slice(ge+de.len,le);if(tce(be)){const{node:_e}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:be,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);h(),_(_e);const Ke=X.slice(le+3);return Ke&&(N({type:"text",content:Ke,raw:Ke}),u--),u++,!0}}}if(!U0e(X,ge)){const le=X.slice(ge,ge+de.len);M(le,le);const be=X.slice(ge+de.len);return be&&(N({type:"text",content:be,raw:be}),u--),u++,!0}const ke=K0e(X,ge+2);let Se="",me="";if(ke.index!==-1){Se=X.slice(ge+2,ke.index),me=X.slice(ke.index+2);const le=ke.index,be=h2(X,le);if(de.intraword&&be.intraword&&!a$(Se)||!Se&&de.len>=4&&de.intraword)return M(X.slice(oe.length),X.slice(oe.length)),u++,!0}else{if(d||ke.sawInvalidClose||de.intraword)return M(X.slice(oe.length),X.slice(oe.length)),u++,!0;Se=X.slice(ge+2),me=""}if(!Se&&/^\*+$/.test(me))return M(X,X),u++,!0;const{node:Ae}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:Se,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return h(),_(Ae),me&&(N({type:"text",content:me,raw:me}),u--),u++,!0}if(ve.type==="emphasis"){let ge=ve.index;ge===-1&&(ge=0);const oe=X.slice(0,ge);if(oe&&M(oe,oe),!V0e(X,ge)){M(X[ge],X[ge]);const le=X.slice(ge+1);return le&&(N({type:"text",content:le,raw:le}),u--),u++,!0}const de=h2(X,ge),ke=q0e(F,X,ge+1),Se=ke.index,me=e[u+1];if(o?.final&&me?.type==="em_open"&&Se!==-1&&X.slice(ge+1,Se).trim()!==X.slice(ge+1,Se)||Se===-1&&(ke.sawInvalidClose||o?.final||de.intraword||!Q8(X[ge+1])))return M(X.slice(ge),X.slice(ge)),u++,!0;const{node:Ae}=E3([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Se>-1?X.slice(ge+1,Se):X.slice(ge+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(h(),_(Ae),Se!==-1&&Se{for(let Ae=0;Ae=0&&me[be]==="\\";be--)le++;if(le%2===0)return Ae}return-1})(X);if(Z===-1)return!1;let fe=1;for(let me=Z+1;meve?.type==="math_inline")||!E0e.test(X))return null;const F=se.parseInline(X,{__markstreamFinal:!!o?.final});if(!Array.isArray(F)||F.length===0)return null;const Z=(F.find(ve=>ve?.type==="inline")?.children??[]).filter(ve=>!(ve?.type==="text"&&String(ve.content??"")===""));if(!Z.length||!Z.some(ve=>ve?.type!=="text")||Z.length===1&&Z[0]?.type==="text"&&String(Z[0].content??"")===X)return null;const fe=Ko(Z,X,n,o);return fe.length?fe:null}function y(X){h(),a.push(X)}function w(X){h();const se=N0(X);a.push(se)}function _(X){y(X)}function M(X,se){c?(c.content+=X,c.raw+=se??X):(c={type:"text",content:String(X??""),raw:String(se??X??"")},a.push(c))}function P(X,se){if(!X)return;const F=Ko([{...se,type:"text",content:X,raw:X}],X,n,o);if(F.length===1&&F[0]?.type==="text"){const Z=F[0];M(String(Z.content??""),String(Z.raw??Z.content??""));return}for(const Z of F)_(Z)}function B(X,se){return String(X.markup??"").startsWith(se)}function $(X){if(!c||X.loading!==!0||X.markup!=="\\(\\)")return;const se=e[u-1];!se||se.type!=="text"||!B(se,"\\(")||c.content.endsWith("(")&&(c.content=c.content.slice(0,-1),c.raw.endsWith("(")&&(c.raw=c.raw.slice(0,-1)),!c.content&&a[a.length-1]===c&&(a.pop(),c=null))}function T(X){return X.endsWith("](")?e[u+1]?.type==="link_open"&&e[u+1]?.markup==="linkify"&&e[u+2]?.type==="text"&&e[u+3]?.type==="link_close"&&e[u+4]?.type==="text"&&String(e[u+4]?.content??"").startsWith(")"):!1}function I(X,se,F=$3(X)){let Z=X;const fe=String(se.content??"");return(F&J8)!==0&&Z.endsWith("\\")&&!B(se,"\\\\")&&!fe.endsWith("\\\\")&&(Z=Z.slice(0,-1)),(F&Ud)!==0&&Z.endsWith("(")&&!B(se,"\\(")&&!fe.endsWith("\\(")&&(Z=Z.slice(0,-1)),(F&n$)!==0&&/\*+$/.test(Z)&&!B(se,"\\*")&&!fe.endsWith("\\*")&&(Z=Z.replace(/\*+$/,"")),Z}for(;u{const c=i,u=c.indexOf(" ");return u===-1?"":String(c.slice(u+1)??"")})():i;let a=String(e.content??"");if(A_.test(a)&&(a=a.replace(A_,"")),l){const{original:c,updated:u}=A0e(a,s===!0);return{type:"code_block",language:r,code:String(u??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t,originalCode:c,updatedCode:u}}return{type:"code_block",language:r,code:String(a??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t}}function T0e(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function E0e(){return{type:"hardbreak",raw:`\\ +`}}function I0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i\s*$/.test(t)||k1.has(e)}function L0e(e){if(!e||e.length===0)return I_();const t=qh.get(e);if(t)return t;const n=e.map(Vl).filter(Boolean);if(!n.length){const s=I_();return qh.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:Dp({customHtmlTags:e})};return qh.set(e,o),o}function oL(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function $0e(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function M5(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function N0e(e,t,n){const o=e.slice();return M5(o,"href")||o.push(["href",t]),n!=null&&!M5(o,"title")&&o.push(["title",n]),o}function Q8(e){return e.map(oL).join("")}function g4(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:g4(o.children)});continue}t.push(o)}return t}function z0e(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(A.toLowerCase())||(m+=A),x=!0,k=!0}const y=[],w=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let _;for(;(_=w.exec(r))!==null;){const A=_[1],P=_[2]||_[3]||_[4]||"";y.push([A,P])}if(c?.has(a)){const A=$0e(e);return[{type:a,tag:a,attrs:y,content:A?A.inner:p.innerTokens.length?Q8(p.innerTokens):"",children:p.innerTokens.length?o(p.innerTokens,s,i,l):[],raw:A?.raw??m,loading:e.loading||k,autoClosed:x},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:y,content:m,children:h,raw:m,loading:k,autoClosed:x},p.nextIndex]}function sL(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>sL(t)).join(""):String(e.content??"")}function R0e(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>sL(t)).join("")}function L_(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],l=R0e(o??e);let r="";l?r=l:i!=null&&String(i).length>0?r=String(i):o?.content!=null&&String(o.content).length>0?r=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?r=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?r=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(r=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,c=a===null?null:String(a),u=String(e.content??"");return{type:"image",src:s,alt:r,title:c,raw:u,loading:t}}function P0e(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function F0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function O0e(e,t,n){const o=e.slice();return A5(o,"href")||o.push(["href",t]),n!=null&&!A5(o,"title")&&o.push(["title",n]),o}function $3(e,t,n){const o=e[t],s=j0e(o.attrs),i=String(A5(s,"href")??""),l=A5(s,"title"),r=l==null?null:String(l),a=O0e(s,i,r);let c=t+1;const u=[];let d=!0;for(;ck.type==="strong_open")){const k=String(p.content??""),x=String(p.raw??k),y=N0(p);y.content=k.slice(0,-2),y.raw=x.replace(/\*\*$/,""),f=u.slice(),f[f.length-1]=y}const h=Ko(f,void 0,void 0,n),m=h.map(k=>{const x=k;return"content"in k?String(x.content??""):String(x.raw??"")}).join("");return{node:{type:"link",href:i,title:r,text:m,children:h,raw:`[${m}](${i}${r?` "${r}"`:""})`,loading:d,attrs:a},nextIndex:c0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,Q0e=/\p{P}/u,ece=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,tce=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,nce=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,oce=/:\/\//,e7=1,iL=2,sce=4,ice=8,lL=16,Za=32,v4=64,qd=128,rL=256,lce=512,Ud=1024,rce=1982;function N3(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function b1(e){return!!e&&X0e.test(e)}function _1(e){return!!e&&(J0e.test(e)||Q0e.test(e))}function cL(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&ece.test(e)}function uL(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&tce.test(e)}function cce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||b1(o)?!1:!(_1(o)&&!cL(o,n)&&n&&!b1(n)&&!_1(n))}function uce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||b1(n)?!1:!(_1(n)&&!uL(n,o)&&o&&!b1(o)&&!_1(o))}function dce(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||b1(o)?!1:!(_1(o)&&!cL(o,n)&&n&&!b1(n)&&!_1(n))}function pce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||b1(n)?!1:!(_1(n)&&!uL(n,o)&&o&&!b1(o)&&!_1(o))}function hce(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const yce=/[\p{L}\p{N}]/u,wce=/^[\p{L}\p{N}]+$/u;function t7(e){return e?yce.test(e):!1}function dL(e){return e?wce.test(e):!1}function p2(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function xce(e){return e?nce.test(e)||oce.test(e):!1}function Sce(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Ko(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=xf(t),l={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(l.filename||l.explicitFilename||l.marketTicker)&&(o={...o,__linkifyDemotionContext:l});const r=o,a=[];let c=null,u=0;const d=o?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function h(){c=null}function m(X,oe){const F=e.length===1?t:String(oe.content??""),K=[],he=kce(X);if(he!==-1){A(X.slice(0,he),X.slice(0,he));const ve=X.slice(he);return ve&&($({type:"text",content:ve,raw:ve}),u--),u++,!0}if(Z0e.test(X)){const ve=X.indexOf("~~");ve!==-1&&K.push({type:"strikethrough",index:ve})}if(K0e.test(X)){const ve=X.indexOf("**");ve!==-1&&K.push({type:"strong",index:ve})}if(/[^*]*\*[^*]+/.test(X)){const ve=F?aL(F,0):X.indexOf("*");if(F&&ve===-1)return!1;ve!==-1&&K.push({type:"emphasis",index:ve})}K.sort((ve,ie)=>ve.index!==ie.index?ve.index-ie.index:ve.type===ie.type?0:ve.type==="strong"?-1:ie.type==="strong"?1:0);const ye=K[0];if(!ye)return!1;if(ye.type==="strikethrough"){const ve=ye.index,ie=ve>-1?X.slice(0,ve):"";if(ie&&A(ie,ie),ve===-1)return u++,!0;const de=X.indexOf("~~",ve+2),be=de===-1?X.slice(ve+2):X.slice(ve+2,de),Se=de===-1?"":X.slice(de+2),{node:je}=N_([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:be,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return h(),_(je),Se&&($({type:"text",content:Se,raw:Se}),u--),u++,!0}if(ye.type==="strong"){const ve=ye.index,ie=ve>-1?X.slice(0,ve):"";if(ie&&A(ie,ie),ve===-1)return u++,!0;if(t&&ve===0){let le=!1,fe=0;for(;fe=2)return A(X,X),u++,!0}}if(t&&(X.match(/\*/g)||[]).length>ace(t))return A(X.slice(ie.length),X.slice(ie.length)),u++,!0;const de=p2(X,ve);if(de.len>=3){const le=_ce(X,ve+de.len);if(le!==-1){const fe=X.slice(ve+de.len,le);if(bce(fe)){const{node:ge}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:fe,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);h(),_(ge);const Oe=X.slice(le+3);return Oe&&($({type:"text",content:Oe,raw:Oe}),u--),u++,!0}}}if(!fce(X,ve)){const le=X.slice(ve,ve+de.len);A(le,le);const fe=X.slice(ve+de.len);return fe&&($({type:"text",content:fe,raw:fe}),u--),u++,!0}const be=hce(X,ve+2);let Se="",je="";if(be.index!==-1){Se=X.slice(ve+2,be.index),je=X.slice(be.index+2);const le=be.index,fe=p2(X,le);if(de.intraword&&fe.intraword&&!dL(Se)||!Se&&de.len>=4&&de.intraword)return A(X.slice(ie.length),X.slice(ie.length)),u++,!0}else{if(d||be.sawInvalidClose||de.intraword)return A(X.slice(ie.length),X.slice(ie.length)),u++,!0;Se=X.slice(ve+2),je=""}if(!Se&&/^\*+$/.test(je))return A(X,X),u++,!0;const{node:et}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:Se,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return h(),_(et),je&&($({type:"text",content:je,raw:je}),u--),u++,!0}if(ye.type==="emphasis"){let ve=ye.index;ve===-1&&(ve=0);const ie=X.slice(0,ve);if(ie&&A(ie,ie),!cce(X,ve)){A(X[ve],X[ve]);const le=X.slice(ve+1);return le&&($({type:"text",content:le,raw:le}),u--),u++,!0}const de=p2(X,ve),be=dce(F,X,ve+1),Se=be.index,je=e[u+1];if(o?.final&&je?.type==="em_open"&&Se!==-1&&X.slice(ve+1,Se).trim()!==X.slice(ve+1,Se)||Se===-1&&(be.sawInvalidClose||o?.final||de.intraword||!t7(X[ve+1])))return A(X.slice(ve),X.slice(ve)),u++,!0;const{node:et}=L3([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Se>-1?X.slice(ve+1,Se):X.slice(ve+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(h(),_(et),Se!==-1&&Se{for(let et=0;et=0&&je[fe]==="\\";fe--)le++;if(le%2===0)return et}return-1})(X);if(K===-1)return!1;let he=1;for(let je=K+1;jeye?.type==="math_inline")||!G0e.test(X))return null;const F=oe.parseInline(X,{__markstreamFinal:!!o?.final});if(!Array.isArray(F)||F.length===0)return null;const K=(F.find(ye=>ye?.type==="inline")?.children??[]).filter(ye=>!(ye?.type==="text"&&String(ye.content??"")===""));if(!K.length||!K.some(ye=>ye?.type!=="text")||K.length===1&&K[0]?.type==="text"&&String(K[0].content??"")===X)return null;const he=Ko(K,X,n,o);return he.length?he:null}function y(X){h(),a.push(X)}function w(X){h();const oe=N0(X);a.push(oe)}function _(X){y(X)}function A(X,oe){c?(c.content+=X,c.raw+=oe??X):(c={type:"text",content:String(X??""),raw:String(oe??X??"")},a.push(c))}function P(X,oe){if(!X)return;const F=Ko([{...oe,type:"text",content:X,raw:X}],X,n,o);if(F.length===1&&F[0]?.type==="text"){const K=F[0];A(String(K.content??""),String(K.raw??K.content??""));return}for(const K of F)_(K)}function z(X,oe){return String(X.markup??"").startsWith(oe)}function L(X){if(!c||X.loading!==!0||X.markup!=="\\(\\)")return;const oe=e[u-1];!oe||oe.type!=="text"||!z(oe,"\\(")||c.content.endsWith("(")&&(c.content=c.content.slice(0,-1),c.raw.endsWith("(")&&(c.raw=c.raw.slice(0,-1)),!c.content&&a[a.length-1]===c&&(a.pop(),c=null))}function E(X){return X.endsWith("](")?e[u+1]?.type==="link_open"&&e[u+1]?.markup==="linkify"&&e[u+2]?.type==="text"&&e[u+3]?.type==="link_close"&&e[u+4]?.type==="text"&&String(e[u+4]?.content??"").startsWith(")"):!1}function T(X,oe,F=N3(X)){let K=X;const he=String(oe.content??"");return(F&e7)!==0&&K.endsWith("\\")&&!z(oe,"\\\\")&&!he.endsWith("\\\\")&&(K=K.slice(0,-1)),(F&Ud)!==0&&K.endsWith("(")&&!z(oe,"\\(")&&!he.endsWith("\\(")&&(K=K.slice(0,-1)),(F&iL)!==0&&/\*+$/.test(K)&&!z(oe,"\\*")&&!he.endsWith("\\*")&&(K=K.replace(/\*+$/,"")),K}for(;u=0;le--){const be=a[le];if(be.type!=="text")break;de=le,ke=String(be.content??"")+ke}deoe==="href")?.[1],ge=String(ve??"");if(t&&ge){const oe=t.indexOf("](");if(oe!==-1){const de=t.indexOf(")",oe+2);de===-1?se.loading=!0:se.loading&&t.slice(oe+2,de).includes(ge)&&(se.loading=!1)}}R(se)||y(se)}function D(X){if(X.markup!=="linkify")return!1;const{node:se,nextIndex:F}=I3(e,u,o);return q(se,F)?(u=F,!0):!1}function A(X){h(),_(b0e(X)),u++}function R(X){if(X.type!=="link")return!1;const se=a[a.length-1];if(!se||se.type!=="text")return!1;const F=String(se.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!F)return!1;const Z=X,fe=String(Z.href??""),ve=String(Z.text??""),ge=String(F[2]??""),oe=fe.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!fe||!(ve===fe||ve===oe||oce(ve)))return!1;const de=String(F[1]??"");return de?(se.content=de,se.raw=de):a.pop(),y({...X,text:ge,children:[{type:"text",content:ge,raw:ge}],raw:`[${ge}](${fe}${Z.title?` "${Z.title}"`:""})`}),!0}function j(X){if(X.type!=="link")return!1;const se=X,F=String(se.href??"");return F?q({href:F,title:se.title==null||se.title===""?null:String(se.title),loading:!!se.loading},u+1):!1}function q(X,se){const F=a[a.length-1];if(F?.type!=="image"||F.src||!F.loading||!String(F.raw??"").endsWith("]("))return!1;const Z=e[se],fe=String(Z?.content??"");if(Z?.type!=="text"||!fe.startsWith(")"))return!1;a.pop(),c=null;const ve=String(F.alt??"");y({type:"image",src:X.href,alt:ve,title:X.title,raw:`![${ve}](${X.href}${X.title?` "${X.title}"`:""})`,loading:!!X.loading});const ge=fe.slice(1),oe=N0(Z);return oe.content=ge,oe.raw=ge,p()[se]=oe,!0}function K(X){if(X.type!=="link")return!1;const se=a[a.length-1],F=e[u-1];if(!se||se.type!=="text"||F?.type!=="text")return!1;const Z=String(se.content??""),fe=String(F.content??"");if(!Z.endsWith("!")||!fe.endsWith("!")||B(F,"\\!"))return!1;const ve=Z.slice(0,-1);ve?(se.content=ve,se.raw=ve,c=se):(a.pop(),c=null);const ge=X,oe=String(ge.text??ge.children?.map(Se=>String(Se?.content??Se?.raw??"")).join("")??""),de=String(ge.href??""),ke=ge.title==null||ge.title===""?null:String(ge.title);return y({type:"image",src:de,alt:oe,title:ke,raw:`![${oe}](${de}${ke?` "${ke}"`:""})`,loading:!!ge.loading}),!0}function U(X,se="",F=null){const Z=String(X.alt??X.raw??"");return{type:"link",href:se,title:F,text:Z,children:[X],raw:`[${Z}](${se}${F?` "${F}"`:""})`,loading:!0}}function te(X){const se=X.startsWith("![")?X:`![${X}`,F=se.slice(2),Z=F.indexOf("](");return{type:"image",src:"",alt:Z===-1?F.replace(/\]$/,""):F.slice(0,Z),title:null,raw:se,loading:!0}}function J(X){const se=X.indexOf("[![");if(se===-1||typeof t=="string"&&e.length===1&&X0e(t,se,"["))return!1;const F=X.slice(0,se);return F&&M(F,F),y(U(te(X.slice(se+1)))),u++,!0}function ee(X){if(o?.final)return!1;const se=e[u-1];if(se?.type!=="text"||!String(se.content??"").endsWith("[")||B(se,"\\["))return!1;const F=a[a.length-1];if(F?.type==="text"&&F.content.endsWith("[")){const Z=F.content.slice(0,-1);Z?(F.content=Z,F.raw=Z,c=F):(a.pop(),c=null)}return y(U(E_(X))),u++,!0}function ie(X){if(X.type!=="link")return!1;const se=X,F=String(se.raw??""),Z=String(se.text??"");if(!F.startsWith("[![")&&!Z.startsWith("!["))return!1;const fe=se.title==null||se.title===""?null:String(se.title);return y(U({type:"image",src:String(se.href??""),alt:Z.replace(/^!\[/,"").replace(/\]$/,""),title:fe,raw:F.startsWith("[![")?F.slice(1):F,loading:!0})),!0}function Q(X){if(!X.startsWith("]("))return!1;const se=e[u-2];if(se?.type==="text"&&String(se.content??"").endsWith("[")&&B(se,"\\["))return!1;const F=a[a.length-1];if(F?.type!=="image"&&F?.type!=="link")return!1;const Z=F,fe=F?.type==="link"&&Array.isArray(Z.children)&&Z.children.length===1&&Z.children[0]?.type==="image"?a.pop():null,ve=fe?fe.children[0]:a.pop();if(!ve||ve.type!=="image")return!1;const ge=e[u+1];let oe=String(fe?.href??""),de=fe?.title==null?null:String(fe.title),ke=!0;if(ge?.type==="link_open"){const{node:me,nextIndex:Ae}=I3(e,u+1,o);oe=me.href,de=me.title,ke=!0,u=Ae}else{if(oe=X.slice(2),oe.includes('"')){const me=oe.split('"');oe=String(me[0]??"").trim(),de=me[1]==null?null:String(me[1]).trim()}u++}const Se=U(ve,oe,de);return Se.loading=ke,y(Se),!0}function he(){const X=e[u-3];return e[u-2]?.type==="image"&&e[u-1]?.type==="text"&&String(e[u-1].content??"")==="]("&&X?.type==="text"&&String(X.content??"").endsWith("[")&&B(X,"\\[")}function xe(X,se){const F=X.indexOf("[");if(F===-1)return!1;let Z=X.slice(0,F);const fe=X.indexOf("](",F);if(fe!==-1){const ve=e[u+2];let ge=X.slice(F+1,fe);if(ge.includes("[")){const le=ge.indexOf("[");Z+=X.slice(0,F+le+1);const be=F+le+1;ge=X.slice(be+1,fe)}const oe=e[u+1];if(X.endsWith("](")&&oe?.type==="link_open"&&ve){const le=e[u+4];let be=4,_e=!0;if(le?.type==="text"){const Qe=String(le.content??"");if(Qe.startsWith(")")){_e=!1;const mt=Qe.slice(1);if(mt){const Tt=N0(le);Tt.content=mt,Tt.raw=mt,p()[u+4]=Tt}else be++}else Qe==="."&&be++}P(Z,se);const Ke=String(ve.content??"");return o?.validateLink&&!o.validateLink(Ke)?M(ge,ge):y({type:"link",href:Ke,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:_e}),u+=be,!0}const de=X.indexOf(")",fe),ke=de!==-1?X.slice(fe+2,de):"",Se=de===-1;let me=Z.match(/\*+$/);if(me&&(Z=Z.replace(/\*+$/,"")),P(Z,se),me||(me=ge.match(/^\*+/)),!d&&me){const le=me[0].length;ge=ge.replace(/^\*+/,"").replace(/\*+$/,"");const be=[];if(le===1?be.push({type:"em_open",tag:"em",nesting:1}):le===2?be.push({type:"strong_open",tag:"strong",nesting:1}):le===3&&(be.push({type:"strong_open",tag:"strong",nesting:1}),be.push({type:"em_open",tag:"em",nesting:1})),be.push({type:"link",href:ke,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:Se}),le===1){be.push({type:"em_close",tag:"em",nesting:-1});const{node:_e}=E3(be,0,o);_(_e)}else if(le===2){be.push({type:"strong_close",tag:"strong",nesting:-1});const{node:_e}=Cd(be,0,void 0,o);_(_e)}else if(le===3){be.push({type:"em_close",tag:"em",nesting:-1}),be.push({type:"strong_close",tag:"strong",nesting:-1});const{node:_e}=Cd(be,0,void 0,o);_(_e)}else{const{node:_e}=E3(be,0,o);_(_e)}}else o?.validateLink&&!o.validateLink(ke)?M(ge,ge):y({type:"link",href:ke,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:Se});const Ae=de!==-1?X.slice(de+1):"";return Ae&&(N({type:"text",content:Ae,raw:Ae}),u--),u++,!0}return!1}function Ye(X){const se=X.indexOf("![");if(se===-1)return!1;const F=X.slice(0,se);return F&&!c?c={type:"text",content:F,raw:F}:F&&c&&(c.content+=F),c&&(a.push(c),c=null),y(te(X.slice(se))),u++,!0}function st(X){if(!(X?.startsWith("[")&&n?.type==="list_item_open"))return!1;const se=X.slice(1).match(/[^\s\]]/);if(se===null)return u++,!0;if(se&&/x/i.test(se[0])){const F=se[0]==="x"||se[0]==="X";return y({type:"checkbox_input",checked:F,raw:F?"[x]":"[ ]"}),u++,!0}return!1}return a}function fv(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function L_(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` -`&&l++,{startLine:i,endLine:l}}function Q2(e,t,n,o){const s=ice(e,t,n);return fv(s.startLine,s.endLine,o)}function lce(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:fv(o,s,t)}function lo(e,t,n){if(!n?.includeSourceMap)return e;const o=lce(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function rce(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),l=Number(s[1]),r=Number(n);return!Number.isFinite(i)||!Number.isFinite(l)||!Number.isFinite(r)||(e.sourceMap=fv(i,Math.max(l,r),o)),e}function ace(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),l=i.replace(/[ \t\r\n]+$/g,"");if(l===i)break;if(l){s.content=l;break}o.pop();continue}break}}function cce(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const l=i.replace(/[ \t\r\n\d.)]+$/g,"");l!==i&&(l?s.content=l:o.pop())}break}}function uce(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Ou(e,t,n){const o=e[t],s=[],i=I1(n,!0);let l=t+1;for(;ld.raw).join("")};n?.includeSourceMap&&lo(u,e[l],n),s.push(u),l=c+1}else l+=1;const r={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(c=>c[0]==="start");if(a){const c=Number(a[1]);return Number.isFinite(c)&&c!==0?c:1}}})(),items:s,raw:s.map(a=>a.raw).join(` -`)};return n?.includeSourceMap&&lo(r,o,n),[r,l+1]}function dce(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),l=[],r=I1(o,!0);let a=t+1;for(;a=0;le--){const fe=a[le];if(fe.type!=="text")break;de=le,be=String(fe.content??"")+be}deie==="href")?.[1],ve=String(ye??"");if(t&&ve){const ie=t.indexOf("](");if(ie!==-1){const de=t.indexOf(")",ie+2);de===-1?oe.loading=!0:oe.loading&&t.slice(ie+2,de).includes(ve)&&(oe.loading=!1)}}R(oe)||y(oe)}function D(X){if(X.markup!=="linkify")return!1;const{node:oe,nextIndex:F}=$3(e,u,o);return U(oe,F)?(u=F,!0):!1}function M(X){h(),_(H0e(X)),u++}function R(X){if(X.type!=="link")return!1;const oe=a[a.length-1];if(!oe||oe.type!=="text")return!1;const F=String(oe.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!F)return!1;const K=X,he=String(K.href??""),ye=String(K.text??""),ve=String(F[2]??""),ie=he.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!he||!(ye===he||ye===ie||xce(ye)))return!1;const de=String(F[1]??"");return de?(oe.content=de,oe.raw=de):a.pop(),y({...X,text:ve,children:[{type:"text",content:ve,raw:ve}],raw:`[${ve}](${he}${K.title?` "${K.title}"`:""})`}),!0}function O(X){if(X.type!=="link")return!1;const oe=X,F=String(oe.href??"");return F?U({href:F,title:oe.title==null||oe.title===""?null:String(oe.title),loading:!!oe.loading},u+1):!1}function U(X,oe){const F=a[a.length-1];if(F?.type!=="image"||F.src||!F.loading||!String(F.raw??"").endsWith("]("))return!1;const K=e[oe],he=String(K?.content??"");if(K?.type!=="text"||!he.startsWith(")"))return!1;a.pop(),c=null;const ye=String(F.alt??"");y({type:"image",src:X.href,alt:ye,title:X.title,raw:`![${ye}](${X.href}${X.title?` "${X.title}"`:""})`,loading:!!X.loading});const ve=he.slice(1),ie=N0(K);return ie.content=ve,ie.raw=ve,p()[oe]=ie,!0}function Z(X){if(X.type!=="link")return!1;const oe=a[a.length-1],F=e[u-1];if(!oe||oe.type!=="text"||F?.type!=="text")return!1;const K=String(oe.content??""),he=String(F.content??"");if(!K.endsWith("!")||!he.endsWith("!")||z(F,"\\!"))return!1;const ye=K.slice(0,-1);ye?(oe.content=ye,oe.raw=ye,c=oe):(a.pop(),c=null);const ve=X,ie=String(ve.text??ve.children?.map(Se=>String(Se?.content??Se?.raw??"")).join("")??""),de=String(ve.href??""),be=ve.title==null||ve.title===""?null:String(ve.title);return y({type:"image",src:de,alt:ie,title:be,raw:`![${ie}](${de}${be?` "${be}"`:""})`,loading:!!ve.loading}),!0}function q(X,oe="",F=null){const K=String(X.alt??X.raw??"");return{type:"link",href:oe,title:F,text:K,children:[X],raw:`[${K}](${oe}${F?` "${F}"`:""})`,loading:!0}}function te(X){const oe=X.startsWith("![")?X:`![${X}`,F=oe.slice(2),K=F.indexOf("](");return{type:"image",src:"",alt:K===-1?F.replace(/\]$/,""):F.slice(0,K),title:null,raw:oe,loading:!0}}function ee(X){const oe=X.indexOf("[![");if(oe===-1||typeof t=="string"&&e.length===1&&vce(t,oe,"["))return!1;const F=X.slice(0,oe);return F&&A(F,F),y(q(te(X.slice(oe+1)))),u++,!0}function J(X){if(o?.final)return!1;const oe=e[u-1];if(oe?.type!=="text"||!String(oe.content??"").endsWith("[")||z(oe,"\\["))return!1;const F=a[a.length-1];if(F?.type==="text"&&F.content.endsWith("[")){const K=F.content.slice(0,-1);K?(F.content=K,F.raw=K,c=F):(a.pop(),c=null)}return y(q(L_(X))),u++,!0}function se(X){if(X.type!=="link")return!1;const oe=X,F=String(oe.raw??""),K=String(oe.text??"");if(!F.startsWith("[![")&&!K.startsWith("!["))return!1;const he=oe.title==null||oe.title===""?null:String(oe.title);return y(q({type:"image",src:String(oe.href??""),alt:K.replace(/^!\[/,"").replace(/\]$/,""),title:he,raw:F.startsWith("[![")?F.slice(1):F,loading:!0})),!0}function Q(X){if(!X.startsWith("]("))return!1;const oe=e[u-2];if(oe?.type==="text"&&String(oe.content??"").endsWith("[")&&z(oe,"\\["))return!1;const F=a[a.length-1];if(F?.type!=="image"&&F?.type!=="link")return!1;const K=F,he=F?.type==="link"&&Array.isArray(K.children)&&K.children.length===1&&K.children[0]?.type==="image"?a.pop():null,ye=he?he.children[0]:a.pop();if(!ye||ye.type!=="image")return!1;const ve=e[u+1];let ie=String(he?.href??""),de=he?.title==null?null:String(he.title),be=!0;if(ve?.type==="link_open"){const{node:je,nextIndex:et}=$3(e,u+1,o);ie=je.href,de=je.title,be=!0,u=et}else{if(ie=X.slice(2),ie.includes('"')){const je=ie.split('"');ie=String(je[0]??"").trim(),de=je[1]==null?null:String(je[1]).trim()}u++}const Se=q(ye,ie,de);return Se.loading=be,y(Se),!0}function me(){const X=e[u-3];return e[u-2]?.type==="image"&&e[u-1]?.type==="text"&&String(e[u-1].content??"")==="]("&&X?.type==="text"&&String(X.content??"").endsWith("[")&&z(X,"\\[")}function xe(X,oe){const F=X.indexOf("[");if(F===-1)return!1;let K=X.slice(0,F);const he=X.indexOf("](",F);if(he!==-1){const ye=e[u+2];let ve=X.slice(F+1,he);if(ve.includes("[")){const le=ve.indexOf("[");K+=X.slice(0,F+le+1);const fe=F+le+1;ve=X.slice(fe+1,he)}const ie=e[u+1];if(X.endsWith("](")&&ie?.type==="link_open"&&ye){const le=e[u+4];let fe=4,ge=!0;if(le?.type==="text"){const Fe=String(le.content??"");if(Fe.startsWith(")")){ge=!1;const pt=Fe.slice(1);if(pt){const kt=N0(le);kt.content=pt,kt.raw=pt,p()[u+4]=kt}else fe++}else Fe==="."&&fe++}P(K,oe);const Oe=String(ye.content??"");return o?.validateLink&&!o.validateLink(Oe)?A(ve,ve):y({type:"link",href:Oe,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:ge}),u+=fe,!0}const de=X.indexOf(")",he),be=de!==-1?X.slice(he+2,de):"",Se=de===-1;let je=K.match(/\*+$/);if(je&&(K=K.replace(/\*+$/,"")),P(K,oe),je||(je=ve.match(/^\*+/)),!d&&je){const le=je[0].length;ve=ve.replace(/^\*+/,"").replace(/\*+$/,"");const fe=[];if(le===1?fe.push({type:"em_open",tag:"em",nesting:1}):le===2?fe.push({type:"strong_open",tag:"strong",nesting:1}):le===3&&(fe.push({type:"strong_open",tag:"strong",nesting:1}),fe.push({type:"em_open",tag:"em",nesting:1})),fe.push({type:"link",href:be,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:Se}),le===1){fe.push({type:"em_close",tag:"em",nesting:-1});const{node:ge}=L3(fe,0,o);_(ge)}else if(le===2){fe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ge}=Cd(fe,0,void 0,o);_(ge)}else if(le===3){fe.push({type:"em_close",tag:"em",nesting:-1}),fe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ge}=Cd(fe,0,void 0,o);_(ge)}else{const{node:ge}=L3(fe,0,o);_(ge)}}else o?.validateLink&&!o.validateLink(be)?A(ve,ve):y({type:"link",href:be,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:Se});const et=de!==-1?X.slice(de+1):"";return et&&($({type:"text",content:et,raw:et}),u--),u++,!0}return!1}function Ye(X){const oe=X.indexOf("![");if(oe===-1)return!1;const F=X.slice(0,oe);return F&&!c?c={type:"text",content:F,raw:F}:F&&c&&(c.content+=F),c&&(a.push(c),c=null),y(te(X.slice(oe))),u++,!0}function at(X){if(!(X?.startsWith("[")&&n?.type==="list_item_open"))return!1;const oe=X.slice(1).match(/[^\s\]]/);if(oe===null)return u++,!0;if(oe&&/x/i.test(oe[0])){const F=oe[0]==="x"||oe[0]==="X";return y({type:"checkbox_input",checked:F,raw:F?"[x]":"[ ]"}),u++,!0}return!1}return a}function hv(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function z_(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` +`&&l++,{startLine:i,endLine:l}}function Q2(e,t,n,o){const s=Cce(e,t,n);return hv(s.startLine,s.endLine,o)}function Mce(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:hv(o,s,t)}function lo(e,t,n){if(!n?.includeSourceMap)return e;const o=Mce(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function Ace(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),l=Number(s[1]),r=Number(n);return!Number.isFinite(i)||!Number.isFinite(l)||!Number.isFinite(r)||(e.sourceMap=hv(i,Math.max(l,r),o)),e}function Tce(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),l=i.replace(/[ \t\r\n]+$/g,"");if(l===i)break;if(l){s.content=l;break}o.pop();continue}break}}function Ece(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const l=i.replace(/[ \t\r\n\d.)]+$/g,"");l!==i&&(l?s.content=l:o.pop())}break}}function Ice(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Ou(e,t,n){const o=e[t],s=[],i=E1(n,!0);let l=t+1;for(;ld.raw).join("")};n?.includeSourceMap&&lo(u,e[l],n),s.push(u),l=c+1}else l+=1;const r={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(c=>c[0]==="start");if(a){const c=Number(a[1]);return Number.isFinite(c)&&c!==0?c:1}}})(),items:s,raw:s.map(a=>a.raw).join(` +`)};return n?.includeSourceMap&&lo(r,o,n),[r,l+1]}function Lce(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),l=[],r=E1(o,!0);let a=t+1;for(;ac.raw).join(` `)} -:::`},a+1]}const fce=new Set(["warning","info","note","tip","danger","caution"]);function pce(e){let t=0;for(;t=0;m--){const k=f[m];if(k.type==="text"&&/:+/.test(k.content)){p=m;break}}const h={type:"paragraph",children:Ko((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&lo(h,e[c],n),r.push(h),a.remember(h.raw)}c+=3}else if(e[c].type==="bullet_list_open"||e[c].type==="ordered_list_open"){const[d,f]=Ou(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else if(e[c].type==="blockquote_open"){const[d,f]=Hu(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else{const d=Pp(e,c,a.options());d?(r.push(d[0]),a.remember(d[0].raw),c=d[1]):c++}return[{type:"admonition",kind:s,title:i,children:r,raw:`:::${s} ${i} +:::`},a+1]}const $ce=new Set(["warning","info","note","tip","danger","caution"]);function Nce(e){let t=0;for(;t=0;m--){const k=f[m];if(k.type==="text"&&/:+/.test(k.content)){p=m;break}}const h={type:"paragraph",children:Ko((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&lo(h,e[c],n),r.push(h),a.remember(h.raw)}c+=3}else if(e[c].type==="bullet_list_open"||e[c].type==="ordered_list_open"){const[d,f]=Ou(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else if(e[c].type==="blockquote_open"){const[d,f]=Hu(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else{const d=jp(e,c,a.options());d?(r.push(d[0]),a.remember(d[0].raw),c=d[1]):c++}return[{type:"admonition",kind:s,title:i,children:r,raw:`:::${s} ${i} ${r.map(d=>d.raw).join(` `)} -:::`},c+1]}const mce=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function gce(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=mce.exec(String(o.info??""));return s?dce(e,t,s,n):null}const pv={parseContainer:(e,t,n)=>hce(e,t,n),matchAdmonition:gce};function Hu(e,t,n){const o=[],s=I1(n,!0);let i=t+1;for(;ir.raw).join(` -`)};return n?.includeSourceMap&&lo(l,e[t],n),[l,i+1]}function vce(e){if(e.info?.startsWith("diff"))return uv(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function yce(e,t,n){const o=[];let s=t+1,i=[],l=[];const r=I1(n,!0);for(;sc.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(l=[];a0&&(o.push({type:"definition_item",term:i,definition:l,raw:`${i.map(c=>c.raw).join("")}: ${l.map(c=>c.raw).join(` +:::`},c+1]}const Bce=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Rce(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=Bce.exec(String(o.info??""));return s?Lce(e,t,s,n):null}const mv={parseContainer:(e,t,n)=>zce(e,t,n),matchAdmonition:Rce};function Hu(e,t,n){const o=[],s=E1(n,!0);let i=t+1;for(;ir.raw).join(` +`)};return n?.includeSourceMap&&lo(l,e[t],n),[l,i+1]}function Pce(e){if(e.info?.startsWith("diff"))return fv(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function Fce(e,t,n){const o=[];let s=t+1,i=[],l=[];const r=E1(n,!0);for(;sc.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(l=[];a0&&(o.push({type:"definition_item",term:i,definition:l,raw:`${i.map(c=>c.raw).join("")}: ${l.map(c=>c.raw).join(` `)}`}),i=[]),s=a+1}else s++;return[{type:"definition_list",items:o,raw:o.map(a=>a.raw).join(` -`)},s+1]}function wce(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],l=I1(n,!0);let r=t+1;for(;ra.raw).join(` -`)}`},r+1]}function kce(e,t,n){const o=e[t],s=o.attrs,i=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(u=>Array.isArray(u)&&u.length>=1&&u[0]).map(([u,d])=>[String(u),d==null||d===""?!0:String(d)])):void 0,l=String(o.tag?.substring(1)??"1"),r=Number.parseInt(l,10),a=e[t+1],c=String(a.content??"");return{type:"heading",level:r,text:c,...i?{attrs:i}:{},children:Ko(a.children||[],c,void 0,n),raw:c}}function bce(e,t,n){const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i");let l=0,r=Math.max(0,n);for(;r$/.test(d)||l++,r=a+u+1;continue}r=a+1}return-1}function c$(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!k.includes(">");else if(c)c=!k.includes("?>");else if(k.startsWith("");else if(k.startsWith("");else if(k.startsWith("");else{const x=s(k);if(x)if(x.closing){for(let y=l.length-1;y>=0;y--)if(l[y]===x.tag){l.length=y;break}}else x.selfClosing||i(x.after,x.tag)||l.push(x.tag)}}if(d===-1||d>=t)break;u=d+1}return r||a||c||l.length>0}function sue(e,t,n){if(!n?.length)return!1;const o=new Set(G0(n));if(!o.size)return!1;const s=u=>{const d=u.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||u==="_"||u==="-"||u===":"},i=u=>u===" "||u===" ",l=u=>{if(u[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const k=u.indexOf(">",d);if(k===-1)return null;let x=k-1;for(;x>=0&&i(u[x]);)x--;return{closing:f,tag:h,selfClosing:!f&&u[x]==="/",after:u.slice(k+1)}},r=(u,d)=>{const f=u.toLowerCase();let p=0;for(;p")return!0}}return!1},a=[];let c=0;for(;c=t?t:u,f=e.slice(c,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=Du(p);if(h){const m=l(p.slice(h.index));if(m)if(m.closing){for(let k=a.length-1;k>=0;k--)if(a[k]===m.tag){a.length=k;break}}else m.selfClosing||r(m.after,m.tag)||a.push(m.tag)}if(u===-1||u>=t)break;c=u+1}return a.length>0}function iue(e,t){const n=Pce.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` -`,s),l=e.slice(s,i===-1?e.length:i);return!Du(l.endsWith("\r")?l.slice(0,-1):l)||nue(e,s)||oue(e,s)||sue(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function k$(e,t,n){let o=t;for(;oo&&(l=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!Md(e,r)){o!=null&&s&&n+i+2>o&&(l=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!Md(e,r)){const a=k$(e,i,"`"),c=lue(e,i+a,a);if(c===-1)break;i=c+a;continue}if(e.startsWith("\\[",i)&&!Md(e,r)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!Md(e,r)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return l}function rue(e,t){if(!av(t))return e;const n=t,o=P_.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?b$(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:jp(e).state;P_.set(n,{source:e,state:s});const{context:i}=s,l=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(l==null)return e;const r=e.slice(l+2),a=e.lastIndexOf(` -`,l-1)+1;if(e.slice(a,l).trim()!==""&&!/^\r?\n/.test(r)||/^\s*!\[/.test(r))return e;const c=r.trim(),u=/^(?:[a-z]|pi)$/i.test(c);return e1(r)&&!u?e:e.slice(0,l)}function aue(e,t,n,o,s){const i=gv(e),l=vv(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&yv(e)==null&&Gh(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(r.rest)&&Gh(t):(t.inFence=!0,t.fenceChar=r.markerChar,t.fenceLen=r.markerLen,t.fenceInBlockquote=r.inBlockquote,t.fenceInList=r.inList||t.listContentIndent!=null&&!r.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=r.listIndent||t.listContentIndent||0);else if(!t.inFence)return H_(e,t,n,o,s)}else return H_(e,t,n,o,s);return!1}function jp(e,t=Xce(),n=null,o=!1,s=0){const i=m2(t);let l=m2(t),r="",a=!1,c=0;for(;cc&&e[u-1]==="\r"?u-1:d?u:e.length,p=e.slice(c,f);aue(p,i,s+c,n,o)&&(a=!0),d?(l=m2(i),r=""):r=p,c=d?u+1:e.length}return{closedOpenMath:a,state:{committedContext:l,context:i,lineBuffer:r}}}function b$(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:m2(e.committedContext),context:m2(e.context),lineBuffer:e.lineBuffer+t}}:jp(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function cue(e,t){if(!av(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=Fp.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,l=i&&s?t.slice(s.source.length):"",r=i&&s?b$(s.explicitBracketMath,l,s.source.length-s.explicitBracketMath.lineBuffer.length):jp(t),a=r.state,c=i&&s?r.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!c&&!tue(s.source,l)&&!Qce(t)){s.source=t,s.explicitBracketMath=a;return}const u=U1e(t);(s&&(s&&!i||s.key!==u||c)||!s&&u)&&n.reset(),Jce(e,t,u,a)}function uue(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function due(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function Yh(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&due(e,t)}function D_(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function fue(e){for(let t=0;t+5":""}function W_(e){return{type:"paragraph",children:e,raw:e.map(mue).join("")}}function q_(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function U_(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=Uce(t);if(!s?.size)return null;let i=-1;for(let u=0;up?.type==="hardbreak")){i=u;break}}if(i===-1)return null;const l=o.slice(0,i),r=o[i];if(!r)return null;const a=[];l.length&&a.push(W_(l)),a.push(r);const c=o.slice(i+1);return c.length&&a.push(W_(c)),a}function gue(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function g2(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function vue(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${ur(t)}\s*>\s*$`,"i").test(n)}const Xh=new Set(["iframe","script","style","textarea","title"]);function xf(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}const p=ss(e.slice(f));if(p===-1)return null;const h=f+p+1,m=e.slice(f,h);if(/^<\s*[!?]/.test(m))return{closing:!1,end:h,selfClosing:!1,tag:""};let k=m.slice(1).trimStart();const x=k.startsWith("/");x&&(k=k.slice(1).trimStart());const y=k.match(/^([A-Z][\w:-]*)/i);return y?.[1]?{closing:x,end:h,selfClosing:/\/\s*>$/.test(m),tag:y[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,p)=>{const h=new RegExp(String.raw`<\s*\/\s*${ur(f)}(?=\s|>)`,"gi");h.lastIndex=p;const m=h.exec(e);if(!m||m.index==null)return null;const k=s(m.index);return k?{start:m.index,end:k.end}:null};let l=-1,r=-1,a=Math.max(0,n);for(;a$/.test(c))return{raw:c,start:l,end:r+1,closed:!0};if(Xh.has(o)){const f=i(o,r+1);return f?{raw:e.slice(l,f.end),start:l,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(l),start:l,end:e.length,closed:!1}}let u=1,d=r+1;for(;d]*$/,"")} -`}function Z_(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function kue(e,t,n){return n?e.includes(n,t)?!0:Z_(e.slice(Math.max(0,t))).includes(Z_(n)):!1}function bue(e,t){let n=Math.max(0,t);for(;n0?l:void 0,children:r,raw:f},u?c+1:c]}function Gh(e,t,n,o){if(n?.type.endsWith("_close")){let s=Array.isArray(n.map)?Number(n.map[1]):NaN;return Number.isFinite(s)||(s=Array.isArray(t.map)?Number(t.map[1])+1:NaN),Ace(e,t,s,o)}return lo(e,t,o)}function Gce(e){return e.replace(/^\r?\n/,"").replace(/\r?\n$/,"")}function Yce(e,t){if(!e||!t)return e;const n=new RegExp(String.raw`[\t ]*<\s*\/\s*${t}[^>]*$`,"i");return e.replace(n,"")}function Xce(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${ur(o)}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${ur(o)}(?=\s|>)`,"i");let l=0,r=Math.max(0,n);for(;r$/.test(d)||l++,r=a+u+1;continue}r=a+1}return null}function Jce(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=new RegExp(String.raw`<\s*${o}(?=\s|>|/)`,"gi");s.lastIndex=Math.max(0,n||0);const i=s.exec(e);if(!i||i.index==null)return null;const l=i.index,r=e.slice(l),a=ss(r);if(a===-1)return null;const c=l+a;if(/\/\s*>\s*$/.test(r.slice(0,a+1))){const h=c+1;return{raw:e.slice(l,h),start:l,end:h}}let u=1,d=c+1;const f=h=>{const m=e.slice(h);return new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i").test(m)},p=h=>{const m=e.slice(h);return new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i").test(m)};for(;d",h);if(m===-1)return null;if(u--,u===0){const k=m+1;return{raw:e.slice(l,k),start:l,end:k}}d=m+1;continue}if(f(h)){const m=ss(e.slice(h));if(m===-1)return null;u++,d=h+m+1;continue}d=h+1}return{raw:e.slice(l),start:l,end:e.length}}function n7(e){return Number.isFinite(e)&&e>0?e:0}function Qce(e,t){const n=n7(t);if(!e||n<=0)return 0;let o=0;for(let s=0;s\s*$/.test(h),k=p===-1?null:Xce(f,r,p+1),x=k?.start??-1;let y="";p!==-1&&(x!==-1&&p]+)))?/g;let A;for(;(A=_.exec(h))!==null;){const L=A[1];if(!L||L.toLowerCase()===r)continue;const E=A[2]||A[3]||A[4]||"";w.push([L,E])}const P=!n?.final&&!m&&k==null,z={type:r,tag:r,content:Gce(y),raw:String(d?.raw??i.raw??f),loading:P,attrs:w.length?w:void 0};return s&&(d?z.sourceMap=Q2(a,d.start,d.end,n):lo(z,o,n)),[z,t+1]}return s&&lo(i,o,n),[i,t+1]}case"table_open":{const[i,l]=qce(e,t,n);return s&&lo(i,o,n),[i,l]}case"dl_open":{const[i,l]=Fce(e,t,n);return s&&lo(i,o,n),[i,l]}case"footnote_open":{const[i,l]=jce(e,t,n);return s&&lo(i,o,n),[i,l]}case"hr":{const i=Uce();return s&&lo(i,o,n),[i,t+1]}}return null}function gv(e,t,n,o){const s=jp(e,t,n);if(s)return s;const i=e[t],l=n?.includeSourceMap===!0;switch(i.type){case"container_warning_open":case"container_info_open":case"container_note_open":case"container_tip_open":case"container_danger_open":case"container_caution_open":case"container_error_open":if(o?.parseContainer){const r=o.parseContainer(e,t,n);return l&&Gh(r[0],i,e[r[1]-1],n),r}break;case"container_open":if(o?.matchAdmonition){const r=o.matchAdmonition(e,t,n);if(r)return l&&Gh(r[0],i,e[r[1]-1],n),r}break;case"vmr_container_open":{const r=Kce(e,t,n);return l&&Gh(r[0],i,e[r[1]-1],n),r}}return null}function eue(){return{type:"hardbreak",raw:`\\ +`}}function tue(e,t,n){const o=e[t+1],s=String(o.content??"");return{type:"paragraph",children:Ko(o.children||[],s,void 0,n),raw:s}}const R_=new WeakMap,mL=new WeakMap,P_=new WeakMap,F_=new WeakMap;function wr(e,t,n){const o=t?.map,s=n?.__sourceMarkdown;if(!Array.isArray(o)||o.length<2||typeof s!="string"||!n)return;const i=Number(o[0]),l=Number(o[1]);if(!Number.isFinite(i)||!Number.isFinite(l))return;let r=P_.get(n);if(!r){r=[0];for(let a=0;a{if(!sue.has(t.type))return!1;const n=t.children;return!Array.isArray(n)||wL(n)})}function rue(e){const t=[];let n=!1,o=0;for(;o{const u=l[c+1]??n.length;return{firstToken:n[a],lastToken:n[u-1],tokenCount:u-a}});T5.set(e,{groupBoundaries:r,source:t,nodes:s,stableGroupCount:o.mixed?Math.max(0,l.length-1):aue(t)?l.length:Math.max(0,l.length-1),requireClosingStrong:i.requireClosingStrong})}function uue(e,t,n,o){for(let s=0;s0&&a.requireClosingStrong===o.requireClosingStrong&&t.startsWith(a.source)&&r.length>=u&&(c==="append"||c==="tail")&&uue(a,n,r,u)){const f=r[u]??n.length,p=y4(n.slice(f),o,s),h=r.length-u;if(p.length===h){const m=a.nodes.slice(0,u).concat(p);return ef(s,"processTokensReusedTopLevelNodes",u),H_(e,t,n,l,m,o),m}}const d=y4(n,o,s);return H_(e,t,n,l,d,o),d}function fue(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return null;const n=K0(t);return n.length?new Set(n):null}function pue(e,t){const n=e;let o=R_.get(n);o||(o=new Map,R_.set(n,o));const s=t.__markstreamFinal===!0?"final":"streaming";let i=o.get(s);i||(i={},o.set(s,i));for(const l of Object.keys(i))Object.prototype.hasOwnProperty.call(t,l)||delete i[l];return Object.assign(i,t),i}function hue(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function z3(e,t,n){for(const o of Reflect.ownKeys(e)){const s=Object.getOwnPropertyDescriptor(e,o);if(!s||!("value"in s))continue;const i=Object.getOwnPropertyDescriptor(t,o);i&&(!("value"in i)||i.writable===!1)||(t[o]=g0(s.value,n))}}function g0(e,t=new WeakMap){if(!e||typeof e!="object")return e;const n=e,o=t.get(n);if(o)return o;if(Array.isArray(e)){const l=[];t.set(n,l);for(const r of e)l.push(g0(r,t));return l}if(e instanceof Map){const l=new Map;t.set(n,l);for(const[r,a]of e)l.set(g0(r,t),g0(a,t));return l}if(e instanceof Set){const l=new Set;t.set(n,l);for(const r of e)l.add(g0(r,t));return l}if(e instanceof Date){const l=new Date(e.getTime());return t.set(n,l),l}if(e instanceof RegExp){const l=new RegExp(e.source,e.flags);return l.lastIndex=e.lastIndex,t.set(n,l),l}if(typeof URL<"u"&&e instanceof URL){const l=new URL(e.href);return t.set(n,l),z3(n,l,t),l}if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const l=new URLSearchParams(e.toString());return t.set(n,l),z3(n,l,t),l}if(e instanceof Error){let l;const r=e.constructor;try{l=new r(e.message)}catch{l=new Error(e.message)}return Object.setPrototypeOf(l,Object.getPrototypeOf(e)),t.set(n,l),z3(n,l,t),l}if(typeof Promise<"u"&&e instanceof Promise||typeof Node<"u"&&e instanceof Node)return t.set(n,e),e;if(!hue(e)){const l=Object.create(Object.getPrototypeOf(e));return t.set(n,l),z3(n,l,t),l}const s={};t.set(n,s);const i=e;for(const l of Object.keys(i))s[l]=g0(i[l],t);return s}function kL(e,t=!0){if(!t)return N0(e);const n=Object.create(Object.getPrototypeOf(e)),o=new WeakMap;for(const s of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,s);if(!i)continue;if(!("value"in i)){Object.defineProperty(n,s,i);continue}const l=i.value;let r=l;s==="attrs"&&Array.isArray(l)?r=l.map(a=>[...a]):s==="map"&&Array.isArray(l)?r=[...l]:s==="children"&&Array.isArray(l)?r=l.map(a=>kL(a,t)):t&&l&&typeof l=="object"&&(r=g0(l,o)),Object.defineProperty(n,s,{...i,value:r})}return n}function D_(e,t=!0){return e.map(n=>kL(n,t))}function vv(e,t){const n=t,o=e.stream,s=t.streamParse??"auto";return n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&(s===!0||s==="auto"&&t.final!==!0)&&o?.enabled===!0&&typeof o.parse=="function"}function mue(e,t){const n=t,o=t.streamParse??"auto",s=e.stream;return t.final===!0&&o==="auto"&&n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&s?.enabled===!0&&typeof s.reset=="function"}function gue(e){Op.delete(e)}function vue(){return{fenceChar:"",fenceInBlockquote:!1,fenceInList:!1,fenceLen:0,fenceListIndent:0,inDollarMath:!1,inFence:!1,inMath:!1,listContentIndent:null,dollarMathOpenOffset:null,mathOpenOffset:null}}function h2(e){return{...e}}function yue(e,t,n,o=Hp(t).state){Op.set(e,{explicitBracketMath:o,source:t,key:n,pendingCandidate:n===null&&JI(t)})}function wue(e){return e.endsWith("$")||e.endsWith("\\")}function kue(e){const t=Math.max(e.lastIndexOf(` +`)+1,0),n=e.slice(t).replace(/[\t ]+$/,"");return nue.some(o=>n.endsWith(o))}function bue(e,t){return t?!!(t.includes("$$")||t.includes("\\[")||e.endsWith("$")&&t[0]==="$"||e.endsWith("\\")&&t[0]==="["||kue(e)&&/[\r\n]/.test(t)):!1}function Md(e,t){let n=t-1,o=0;for(;n>=0&&e[n]==="\\";)o++,n--;return o%2===1}function o7(e){return e===" "||e===" "}function bL(e,t){return t===" "?e+1:e+4-e%4}function yv(e){let t=0,n=0;for(;t3?null:t}function Yh(e){const t=Du(e);if(!t)return null;const n=t.index,o=e[n];if(o!=="`"&&o!=="~")return null;let s=n;for(;s")return n?t:null;n=!0,s++,(t[s]===" "||t[s]===" ")&&s++,t=t.slice(s)}}function _L(e){const t=Yh(e);if(t)return{...t,inBlockquote:!1,inList:!1,listIndent:0};const n=kv(e),o=n==null?null:Yh(n);if(o)return{...o,inBlockquote:!0,inList:!1,listIndent:0};const s=wv(e);if(!s)return null;const i=Yh(s.content);return i==null?null:{...i,inBlockquote:!1,inList:!0,listIndent:s.contentIndent}}function _ue(e,t){let n=!1,o="",s=0,i=!1,l=!1,r=0,a=null,c=0;for(;c=t?t:u,f=e.slice(c,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=yv(p),m=wv(p);n&&i&&p.trim()&&kv(p)==null&&(n=!1,o="",s=0,i=!1,l=!1,r=0),n&&l&&p.trim()&&h.column=s&&/^\s*$/.test(k.rest)&&(n=!1,o="",s=0,i=!1,l=!1,r=0):(n=!0,o=k.markerChar,s=k.markerLen,i=k.inBlockquote,l=k.inList||a!=null&&!k.inBlockquote&&h.column>=a,r=k.listIndent||a||0)),u===-1||u>=t)break;c=u+1}return n}function xue(e,t){const n=d=>d===" "||d===" ",o=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"||d===":"},s=d=>{if(d[0]!=="<")return null;let f=1;for(;f"&&k!=="/")return null;const x=ss(d);if(x===-1)return null;let y=x-1;for(;y>=0&&n(d[y]);)y--;return{closing:p,tag:m,selfClosing:!p&&d[y]==="/",after:d.slice(x+1)}},i=(d,f)=>{const p=d.toLowerCase();let h=0;for(;h")return!0}}return!1},l=[];let r=!1,a=!1,c=!1,u=0;for(;u=t?t:d,p=e.slice(u,f),h=p.endsWith("\r")?p.slice(0,-1):p,m=Du(h);if(m){const k=h.slice(m.index);if(r)r=!k.includes("-->");else if(a)a=!k.includes(">");else if(c)c=!k.includes("?>");else if(k.startsWith("");else if(k.startsWith("");else if(k.startsWith("");else{const x=s(k);if(x)if(x.closing){for(let y=l.length-1;y>=0;y--)if(l[y]===x.tag){l.length=y;break}}else x.selfClosing||i(x.after,x.tag)||l.push(x.tag)}}if(d===-1||d>=t)break;u=d+1}return r||a||c||l.length>0}function Sue(e,t,n){if(!n?.length)return!1;const o=new Set(K0(n));if(!o.size)return!1;const s=u=>{const d=u.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||u==="_"||u==="-"||u===":"},i=u=>u===" "||u===" ",l=u=>{if(u[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const k=u.indexOf(">",d);if(k===-1)return null;let x=k-1;for(;x>=0&&i(u[x]);)x--;return{closing:f,tag:h,selfClosing:!f&&u[x]==="/",after:u.slice(k+1)}},r=(u,d)=>{const f=u.toLowerCase();let p=0;for(;p")return!0}}return!1},a=[];let c=0;for(;c=t?t:u,f=e.slice(c,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=Du(p);if(h){const m=l(p.slice(h.index));if(m)if(m.closing){for(let k=a.length-1;k>=0;k--)if(a[k]===m.tag){a.length=k;break}}else m.selfClosing||r(m.after,m.tag)||a.push(m.tag)}if(u===-1||u>=t)break;c=u+1}return a.length>0}function Cue(e,t){const n=oue.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` +`,s),l=e.slice(s,i===-1?e.length:i);return!Du(l.endsWith("\r")?l.slice(0,-1):l)||_ue(e,s)||xue(e,s)||Sue(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function xL(e,t,n){let o=t;for(;oo&&(l=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!Md(e,r)){o!=null&&s&&n+i+2>o&&(l=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!Md(e,r)){const a=xL(e,i,"`"),c=Mue(e,i+a,a);if(c===-1)break;i=c+a;continue}if(e.startsWith("\\[",i)&&!Md(e,r)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!Md(e,r)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return l}function Aue(e,t){if(!uv(t))return e;const n=t,o=j_.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?SL(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:Hp(e).state;j_.set(n,{source:e,state:s});const{context:i}=s,l=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(l==null)return e;const r=e.slice(l+2),a=e.lastIndexOf(` +`,l-1)+1;if(e.slice(a,l).trim()!==""&&!/^\r?\n/.test(r)||/^\s*!\[/.test(r))return e;const c=r.trim(),u=/^(?:[a-z]|pi)$/i.test(c);return Qa(r)&&!u?e:e.slice(0,l)}function Tue(e,t,n,o,s){const i=yv(e),l=wv(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&kv(e)==null&&Xh(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(r.rest)&&Xh(t):(t.inFence=!0,t.fenceChar=r.markerChar,t.fenceLen=r.markerLen,t.fenceInBlockquote=r.inBlockquote,t.fenceInList=r.inList||t.listContentIndent!=null&&!r.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=r.listIndent||t.listContentIndent||0);else if(!t.inFence)return V_(e,t,n,o,s)}else return V_(e,t,n,o,s);return!1}function Hp(e,t=vue(),n=null,o=!1,s=0){const i=h2(t);let l=h2(t),r="",a=!1,c=0;for(;cc&&e[u-1]==="\r"?u-1:d?u:e.length,p=e.slice(c,f);Tue(p,i,s+c,n,o)&&(a=!0),d?(l=h2(i),r=""):r=p,c=d?u+1:e.length}return{closedOpenMath:a,state:{committedContext:l,context:i,lineBuffer:r}}}function SL(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:h2(e.committedContext),context:h2(e.context),lineBuffer:e.lineBuffer+t}}:Hp(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function Eue(e,t){if(!uv(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=Op.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,l=i&&s?t.slice(s.source.length):"",r=i&&s?SL(s.explicitBracketMath,l,s.source.length-s.explicitBracketMath.lineBuffer.length):Hp(t),a=r.state,c=i&&s?r.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!c&&!bue(s.source,l)&&!wue(t)){s.source=t,s.explicitBracketMath=a;return}const u=f0e(t);(s&&(s&&!i||s.key!==u||c)||!s&&u)&&n.reset(),yue(e,t,u,a)}function Iue(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function Lue(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function Jh(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&Lue(e,t)}function W_(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function $ue(e){for(let t=0;t+5":""}function U_(e){return{type:"paragraph",children:e,raw:e.map(Bue).join("")}}function Z_(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function K_(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=fue(t);if(!s?.size)return null;let i=-1;for(let u=0;up?.type==="hardbreak")){i=u;break}}if(i===-1)return null;const l=o.slice(0,i),r=o[i];if(!r)return null;const a=[];l.length&&a.push(U_(l)),a.push(r);const c=o.slice(i+1);return c.length&&a.push(U_(c)),a}function Rue(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function m2(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function Pue(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${ur(t)}\s*>\s*$`,"i").test(n)}const Qh=new Set(["iframe","script","style","textarea","title"]);function Cf(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}const p=ss(e.slice(f));if(p===-1)return null;const h=f+p+1,m=e.slice(f,h);if(/^<\s*[!?]/.test(m))return{closing:!1,end:h,selfClosing:!1,tag:""};let k=m.slice(1).trimStart();const x=k.startsWith("/");x&&(k=k.slice(1).trimStart());const y=k.match(/^([A-Z][\w:-]*)/i);return y?.[1]?{closing:x,end:h,selfClosing:/\/\s*>$/.test(m),tag:y[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,p)=>{const h=new RegExp(String.raw`<\s*\/\s*${ur(f)}(?=\s|>)`,"gi");h.lastIndex=p;const m=h.exec(e);if(!m||m.index==null)return null;const k=s(m.index);return k?{start:m.index,end:k.end}:null};let l=-1,r=-1,a=Math.max(0,n);for(;a$/.test(c))return{raw:c,start:l,end:r+1,closed:!0};if(Qh.has(o)){const f=i(o,r+1);return f?{raw:e.slice(l,f.end),start:l,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(l),start:l,end:e.length,closed:!1}}let u=1,d=r+1;for(;d]*$/,"")} +`}function G_(e){return e.replace(/\r\n/g,` +`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Oue(e,t,n){return n?e.includes(n,t)?!0:G_(e.slice(Math.max(0,t))).includes(G_(n)):!1}function Hue(e,t){let n=Math.max(0,t);for(;n)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function x$(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const xue=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Sue=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function Cue(e){return/\n\s*\n/.test(e)||Sue.test(e)}function Mue(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>xue.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!Cue(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function Aue(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=xf(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function Tue(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,l=R_.get(i),r=l&&l.final===o&&l.customHtmlTags===s&&l.requireClosingStrong===n.requireClosingStrong&&l.validateLink===n.validateLink,a=e.map((c,u)=>r&&l.blocks[u]===c?l.children[u]:du(c,t,n));return R_.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Eue(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,l=String(i.tag??"").toLowerCase();if(!l||l==="details"||CI.has(l)||Array.isArray(i.children))return s;const r=String(s.raw??i.content??"");if(!r)return s;const a=ss(r);if(a===-1)return s;const c=xf(r,l,0),u=c?.closeStart??-1,d=c?.closed===!0&&u>=a+1,f=d?r.slice(a+1,u):r.slice(a+1);if(!f.trim())return s;const p=x$(n,o),h=d?null:Aue(f),m=h?Tue(h,t,p,o):du(f,t,p);return Mue(f,m)?{...s,children:m}:s})}function Iue(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function du(e,t,n){return e.trim()?C$(e,t,{...n,__disableStreamParse:!0}):[]}function $ue(e,t,n){const o=du(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Lue(e,t,n){const o=c$({content:e}),s=ss(e),i=_$(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const l=$ue(e.slice(s+1,i),t,n);l.length>0&&(o.children=l)}return o.raw=e,o}function Nue(e,t,n){const o=ss(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=xf(s,"summary",0);if(!i)return du(s,t,n);const l=s.slice(0,i.start),r=s.slice(i.end);return[...du(l,t,n),Lue(i.raw,t,n),...du(r,t,n)]}function S$(e,t,n,o,s,i=0){const l=[];let r=i;for(let a=0;a{const K=_$(f,"details");return K!==-1?f.slice(0,K):f})():f,[w]=S$(x?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,p+f.length),_=Nue(y,n,x$(o,s)),M=m===-1?"":String(e[m].raw??g2(e[m])??""),P=x||m!==-1&&k?.closed===!0,B=M.replace(/[\t\r\n ]+$/,""),$=P?(()=>{const K=(k?.raw??"").lastIndexOf(B);return K===-1?t.length:p+K})():t.length,T=ss(f),I=x&&T!==-1?p+T+1:p+f.length,N=t.slice(I,$===-1?t.length:$),C=n.parse(N,{__markstreamFinal:s}),O=n.renderer.render(C,n.options,{__markstreamFinal:s}),H=$+B.length,D=P?Math.max($+M.length,bue(t,H)):t.length,A=P?t.slice($,D):M,R=P?t.slice(p,D):t.slice(p),j=x&&T!==-1?f.slice(0,T+1):f,q={...c,tag:"details",attrs:Rp(f.slice(0,T+1)),raw:R,content:`${j}${O}${A}`,children:[..._,...w],loading:!s&&!P};if(o.includeSourceMap&&(q.sourceMap=Q2(t,p,P?D:t.length,o)),l.push(q),r=P?D:t.length,m===-1&&!x)break;m!==-1&&(a=m)}return[l,r]}function zue(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let l=0;l=d.start&&T.end<=d.end){s.splice(P,1);continue}break}M=$+B.length,s.splice(P,1)}}return s}function Bue(e){const t=r=>r===" "||r===" "||r===` -`||r==="\r",n=r=>{if(!r||r[0]!=="<"||r.includes(">"))return!1;let a=1;if(a{const k=m.charCodeAt(0);return k>=65&&k<=90||k>=97&&k<=122},u=m=>{const k=m.charCodeAt(0);return k>=48&&k<=57},d=m=>m==="!"||c(m),f=m=>c(m)||u(m)||m===":"||m==="-",p=m=>c(m)||u(m)||m==="_"||m==="."||m===":"||m==="-",h=p;if(a>=r.length||!d(r[a]))return!1;for(a++;a=r.length)return!0;if(r[a]==="/"){for(a++;a=r.length}if(!p(r[a]))return!1;for(a++;a=r.length)return!0;const m=r[a];if(m==='"'||m==="'"){for(a++;a=r.length)return!0;a++}else{for(;a"||k==='"'||k==="'"||k==="`")break;a++}if(a>=r.length)return!0}}}return!0},o=(r,a)=>{let c=!1,u="",d=0;const f=y=>y===" "||y===" ",p=y=>{let w=0;for(;w{let w=0;for(;w";)for(_=!0,w++;w{const w=p(y);if(w)return w;const _=h(y);return _==null?null:p(_)};let k=0;const x=r.split(/\r?\n/);for(const y of x){const w=k,_=k+y.length;if(a=d&&/^\s*$/.test(M.rest)&&(c=!1,u="",d=0):(c=!0,u=P,d=B)}if(a<=_)break;k=_+1}return c},s=String(e??""),i=s.lastIndexOf("<");if(i===-1||o(s,i))return s;if(i>0){const r=s[i-1],a=r===" "||r===" "||r===` +`?n+1:t}function Y_(e){if(e.type!=="html_block"||String(e.tag??"").toLowerCase()!=="details")return!1;const t=String(e.raw??e.content??"");return/^\s*)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function ML(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Vue=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Wue=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function que(e){return/\n\s*\n/.test(e)||Wue.test(e)}function Uue(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Vue.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!que(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function Zue(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=Cf(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function Kue(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,l=F_.get(i),r=l&&l.final===o&&l.customHtmlTags===s&&l.requireClosingStrong===n.requireClosingStrong&&l.validateLink===n.validateLink,a=e.map((c,u)=>r&&l.blocks[u]===c?l.children[u]:du(c,t,n));return F_.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Gue(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,l=String(i.tag??"").toLowerCase();if(!l||l==="details"||TI.has(l)||Array.isArray(i.children))return s;const r=String(s.raw??i.content??"");if(!r)return s;const a=ss(r);if(a===-1)return s;const c=Cf(r,l,0),u=c?.closeStart??-1,d=c?.closed===!0&&u>=a+1,f=d?r.slice(a+1,u):r.slice(a+1);if(!f.trim())return s;const p=ML(n,o),h=d?null:Zue(f),m=h?Kue(h,t,p,o):du(f,t,p);return Uue(f,m)?{...s,children:m}:s})}function Yue(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function du(e,t,n){return e.trim()?TL(e,t,{...n,__disableStreamParse:!0}):[]}function Xue(e,t,n){const o=du(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Jue(e,t,n){const o=fL({content:e}),s=ss(e),i=CL(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const l=Xue(e.slice(s+1,i),t,n);l.length>0&&(o.children=l)}return o.raw=e,o}function Que(e,t,n){const o=ss(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=Cf(s,"summary",0);if(!i)return du(s,t,n);const l=s.slice(0,i.start),r=s.slice(i.end);return[...du(l,t,n),Jue(i.raw,t,n),...du(r,t,n)]}function AL(e,t,n,o,s,i=0){const l=[];let r=i;for(let a=0;a{const Z=CL(f,"details");return Z!==-1?f.slice(0,Z):f})():f,[w]=AL(x?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,p+f.length),_=Que(y,n,ML(o,s)),A=m===-1?"":String(e[m].raw??m2(e[m])??""),P=x||m!==-1&&k?.closed===!0,z=A.replace(/[\t\r\n ]+$/,""),L=P?(()=>{const Z=(k?.raw??"").lastIndexOf(z);return Z===-1?t.length:p+Z})():t.length,E=ss(f),T=x&&E!==-1?p+E+1:p+f.length,$=t.slice(T,L===-1?t.length:L),C=n.parse($,{__markstreamFinal:s}),j=n.renderer.render(C,n.options,{__markstreamFinal:s}),H=L+z.length,D=P?Math.max(L+A.length,Hue(t,H)):t.length,M=P?t.slice(L,D):A,R=P?t.slice(p,D):t.slice(p),O=x&&E!==-1?f.slice(0,E+1):f,U={...c,tag:"details",attrs:Fp(f.slice(0,E+1)),raw:R,content:`${O}${j}${M}`,children:[..._,...w],loading:!s&&!P};if(o.includeSourceMap&&(U.sourceMap=Q2(t,p,P?D:t.length,o)),l.push(U),r=P?D:t.length,m===-1&&!x)break;m!==-1&&(a=m)}return[l,r]}function ede(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let l=0;l=d.start&&E.end<=d.end){s.splice(P,1);continue}break}A=L+z.length,s.splice(P,1)}}return s}function tde(e){const t=r=>r===" "||r===" "||r===` +`||r==="\r",n=r=>{if(!r||r[0]!=="<"||r.includes(">"))return!1;let a=1;if(a{const k=m.charCodeAt(0);return k>=65&&k<=90||k>=97&&k<=122},u=m=>{const k=m.charCodeAt(0);return k>=48&&k<=57},d=m=>m==="!"||c(m),f=m=>c(m)||u(m)||m===":"||m==="-",p=m=>c(m)||u(m)||m==="_"||m==="."||m===":"||m==="-",h=p;if(a>=r.length||!d(r[a]))return!1;for(a++;a=r.length)return!0;if(r[a]==="/"){for(a++;a=r.length}if(!p(r[a]))return!1;for(a++;a=r.length)return!0;const m=r[a];if(m==='"'||m==="'"){for(a++;a=r.length)return!0;a++}else{for(;a"||k==='"'||k==="'"||k==="`")break;a++}if(a>=r.length)return!0}}}return!0},o=(r,a)=>{let c=!1,u="",d=0;const f=y=>y===" "||y===" ",p=y=>{let w=0;for(;w{let w=0;for(;w";)for(_=!0,w++;w{const w=p(y);if(w)return w;const _=h(y);return _==null?null:p(_)};let k=0;const x=r.split(/\r?\n/);for(const y of x){const w=k,_=k+y.length;if(a=d&&/^\s*$/.test(A.rest)&&(c=!1,u="",d=0):(c=!0,u=P,d=z)}if(a<=_)break;k=_+1}return c},s=String(e??""),i=s.lastIndexOf("<");if(i===-1||o(s,i))return s;if(i>0){const r=s[i-1],a=r===" "||r===" "||r===` `||r==="\r",c=s[i-2];if(!a&&!((r==="n"||r==="r")&&c==="\\"))return s}const l=s.slice(i);return l.includes(">")||l.length>1&&(l[1]===" "||l[1]===" "||l[1]===` -`||l[1]==="\r")||!n(l)?s:s.slice(0,i)}function G_(e,t){if(e===t)return;const n=e.split(/\r?\n/),o=t.split(/\r?\n/),s=[];let i=0;for(let l=0;l{const r=Number.isFinite(l)?Math.max(0,Math.trunc(l)):0;if(rString(h??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=h=>h===" "||h===" ",s=h=>{const m=h.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||h==="_"||h==="-"||h===":"},i=h=>{if(!h)return!1;if(h[0]===" ")return!0;let m=0;for(let k=0;k=4)return!0;continue}if(x===" ")return!0;break}return!1},l=h=>{let m=!1,k=!1;for(let x=0;x")return x}return-1},r=h=>{let m=0;for(;m{if(i(h))return-1;const k=h.replace(/^[ \t]+/,"");if(!k||k.startsWith(">")||k.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(k))return-1;let x=!1,y=0;for(;y=M.length){x=!0,y++;continue}const B=M[P];if(B==="!"||B==="?"){x=!0,y+=_+1;continue}if(B==="/"){x=!0,y+=_+1;continue}const $=P;for(;P"&&I!=="/"){x=!0,y++;continue}const N=new RegExp(String.raw`<\s*\/\s*${T}\s*>`,"i"),C=/\/\s*>$/.test(M),O=N.test(h.slice(y+_+1)),H=N.test(e.slice(m+y+_+1)),D=/[\r\n]/.test(e.slice(m+y+_+1));if(x&&n.has(T)&&!C&&!O&&(H||D))return y;x=!0,y+=_+1}return-1};let c=!1,u="",d=0,f="",p=0;for(;p{const r=Number.isFinite(l)?Math.max(0,Math.trunc(l)):0;if(rString(h??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=h=>h===" "||h===" ",s=h=>{const m=h.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||h==="_"||h==="-"||h===":"},i=h=>{if(!h)return!1;if(h[0]===" ")return!0;let m=0;for(let k=0;k=4)return!0;continue}if(x===" ")return!0;break}return!1},l=h=>{let m=!1,k=!1;for(let x=0;x")return x}return-1},r=h=>{let m=0;for(;m{if(i(h))return-1;const k=h.replace(/^[ \t]+/,"");if(!k||k.startsWith(">")||k.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(k))return-1;let x=!1,y=0;for(;y=A.length){x=!0,y++;continue}const z=A[P];if(z==="!"||z==="?"){x=!0,y+=_+1;continue}if(z==="/"){x=!0,y+=_+1;continue}const L=P;for(;P"&&T!=="/"){x=!0,y++;continue}const $=new RegExp(String.raw`<\s*\/\s*${E}\s*>`,"i"),C=/\/\s*>$/.test(A),j=$.test(h.slice(y+_+1)),H=$.test(e.slice(m+y+_+1)),D=/[\r\n]/.test(e.slice(m+y+_+1));if(x&&n.has(E)&&!C&&!j&&(H||D))return y;x=!0,y+=_+1}return-1};let c=!1,u="",d=0,f="",p=0;for(;pp&&e[h-1]==="\r",x=m?k?h-1:h:e.length,y=e.slice(p,x),w=m?k?`\r `:` -`:"",_=r(y);let M=y;if(!c&&!_){const P=a(y,p);if(P!==-1){const B=w||` -`;M=`${y.slice(0,P).replace(/[ \t]+$/,"")}${B}${B}${y.slice(P).replace(/^[ \t]+/,"")}`}}f+=M,f+=w,_&&(c?_.markerChar===u&&_.markerLen>=d&&/^\s*$/.test(_.rest)&&(c=!1,u="",d=0):(c=!0,u=_.markerChar,d=_.markerLen)),p=m?h+1:e.length}return f}function Pue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,p=!1;for(let h=0;h")return h}return-1},r=(d,f,p)=>{const h=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let k=m+1;for(;k=d.length||d[k]!=="/"){m=d.indexOf("<",m+1);continue}for(k++;kd.length){m=d.indexOf("<",m+1);continue}let x=!0;for(let w=0;w="A"&&_<="Z"?String.fromCharCode(_.charCodeAt(0)+32):_)!==h[w]){x=!1;break}}if(!x){m=d.indexOf("<",m+1);continue}let y=k+h.length;if(y")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const p=f;for(;f=d&&/^\s*$/.test(_.rest)&&(c=!1,u="",d=0):(c=!0,u=_.markerChar,d=_.markerLen)),p=m?h+1:e.length}return f}function ode(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,p=!1;for(let h=0;h")return h}return-1},r=(d,f,p)=>{const h=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let k=m+1;for(;k=d.length||d[k]!=="/"){m=d.indexOf("<",m+1);continue}for(k++;kd.length){m=d.indexOf("<",m+1);continue}let x=!0;for(let w=0;w="A"&&_<="Z"?String.fromCharCode(_.charCodeAt(0)+32):_)!==h[w]){x=!1;break}}if(!x){m=d.indexOf("<",m+1);continue}let y=k+h.length;if(y")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const p=f;for(;fu&&e[d-1]==="\r",p=f?d-1:d,h=e.slice(u,p);c+=a(h),c+=f?`\r `:` -`,u=d+1}return c}function Fue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let p=0,h=!1,m=0;for(;p=f.length||f[p]!==">")break;for(h=!0,p++;p{let p=0;for(;pnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let r=!1,a="",c=0,u="",d=0;for(;dString(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let p=0,h=!1,m=0;for(;p=f.length||f[p]!==">")break;for(h=!0,p++;p{let p=0;for(;pnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let r=!1,a="",c=0,u="",d=0;for(;dd&&e[f-1]==="\r",m=p?h?f-1:f:e.length,k=e.slice(d,m),x=p?h?`\r `:` -`:"",y=s(k),w=y?.prefix??"",_=y?.content??k,M=i(_);M&&(r?M.markerChar===a&&M.markerLen>=c&&/^\s*$/.test(M.rest)&&(r=!1,a="",c=0):(r=!0,a=M.markerChar,c=M.markerLen));let P=_;if(!r&&P.includes("{if(N.replace(/^[\t ]+/,"").startsWith("|"))return $;const C=N.slice(0,I).replace(/^[\t ]+/,"");if(C.length>0){const O=T.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",H=C.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!O||!H||O!==H)return $}return`${T} +`:"",y=s(k),w=y?.prefix??"",_=y?.content??k,A=i(_);A&&(r?A.markerChar===a&&A.markerLen>=c&&/^\s*$/.test(A.rest)&&(r=!1,a="",c=0):(r=!0,a=A.markerChar,c=A.markerLen));let P=_;if(!r&&P.includes("{if($.replace(/^[\t ]+/,"").startsWith("|"))return L;const C=$.slice(0,T).replace(/^[\t ]+/,"");if(C.length>0){const j=E.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",H=C.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!j||!H||j!==H)return L}return`${E} -`});if(w){const B=w+P.split(` +`});if(w){const z=w+P.split(` `).join(` -${w}`);u+=B}else u+=P;u+=x,d=p?f+1:e.length}return u}function jue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(C=>String(C??"").toLowerCase()));if(!n.size)return e;const o=C=>C===" "||C===" ",s=C=>{if(!C)return!1;if(C[0]===" ")return!0;let O=0;for(let H=0;H=4)return!0;continue}if(D===" ")return!0;break}return!1},i=C=>{const O=C.charCodeAt(0);return O>=65&&O<=90||O>=97&&O<=122||O>=48&&O<=57||C==="_"||C==="-"||C===":"},l=C=>{let O=0;for(;O{let O=0,H=!1,D=0;for(;O=C.length||C[O]!==">")break;for(H=!0,O++;Ol(C).startsWith("<"),c=C=>{for(let O=0;O{if(s(C))return"";const O=l(C);if(!O.startsWith("<"))return"";let H=1;for(;H=O.length||O[H]==="/"||O[H]==="!"||O[H]==="?")return"";const D=H;for(;H"&&R!=="/"?"":A},d=C=>{if(s(C))return null;const O=l(C);if(!O.startsWith("<"))return null;let H=1;for(;H=O.length)return null;const D=O[H]==="/";if(D)for(H++;H"&&q!=="/")return null;if(D)return{type:"close",name:j};if(/\/\s*>\s*$/.test(O))return{type:"open",name:j,complete:!0};const K=O.indexOf(">",H);if(K!==-1){const U=O.slice(K+1);if(new RegExp(`<\\s*\\/\\s*${j}\\s*>`,"i").test(U))return{type:"open",name:j,complete:!0}}return{type:"open",name:j,complete:!1}},f=C=>{if(s(C))return null;const O=l(C).replace(/[ \t]+$/,"");if(!O.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(O))return null;const H=O.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(H?.[1])return H[1].toLowerCase();const D=O.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!D?.[1]||!D[2])return null;const A=D[1].toLowerCase();return A===D[2].toLowerCase()?A:null};let p=!1,h="",m=0;const k=C=>{let O=0;for(;Ok(C),y=C=>{const O=l(C);return O?s(C)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(O):!1},w=(C,O,H)=>{let D=C,A=0;for(;DD&&e[R-1]==="\r",K=j?q?R-1:R:e.length,U=e.slice(D,K),te=r(U),J=te?.key??"";if(A>0&&O&&J!==O)break;const ee=te?.content??U,ie=d(ee);if(ie?.name===H){if(ie.type==="open")ie.complete||A++;else if(A>0&&(A--,A===0))return!1}else if(A>0&&(c(ee)||y(ee)))return!0;if(j)D=R+1;else break}return!1};let _="",M=0,P=!0,B=!1,$=!1,T=` -`;const I=[];let N="";for(;MM&&e[C-1]==="\r",D=O?H?C-1:C:e.length,A=e.slice(M,D),R=O?H?`\r +${w}`);u+=z}else u+=P;u+=x,d=p?f+1:e.length}return u}function ide(e,t){if(!e||!t.length)return e;const n=new Set(t.map(C=>String(C??"").toLowerCase()));if(!n.size)return e;const o=C=>C===" "||C===" ",s=C=>{if(!C)return!1;if(C[0]===" ")return!0;let j=0;for(let H=0;H=4)return!0;continue}if(D===" ")return!0;break}return!1},i=C=>{const j=C.charCodeAt(0);return j>=65&&j<=90||j>=97&&j<=122||j>=48&&j<=57||C==="_"||C==="-"||C===":"},l=C=>{let j=0;for(;j{let j=0,H=!1,D=0;for(;j=C.length||C[j]!==">")break;for(H=!0,j++;jl(C).startsWith("<"),c=C=>{for(let j=0;j{if(s(C))return"";const j=l(C);if(!j.startsWith("<"))return"";let H=1;for(;H=j.length||j[H]==="/"||j[H]==="!"||j[H]==="?")return"";const D=H;for(;H"&&R!=="/"?"":M},d=C=>{if(s(C))return null;const j=l(C);if(!j.startsWith("<"))return null;let H=1;for(;H=j.length)return null;const D=j[H]==="/";if(D)for(H++;H"&&U!=="/")return null;if(D)return{type:"close",name:O};if(/\/\s*>\s*$/.test(j))return{type:"open",name:O,complete:!0};const Z=j.indexOf(">",H);if(Z!==-1){const q=j.slice(Z+1);if(new RegExp(`<\\s*\\/\\s*${O}\\s*>`,"i").test(q))return{type:"open",name:O,complete:!0}}return{type:"open",name:O,complete:!1}},f=C=>{if(s(C))return null;const j=l(C).replace(/[ \t]+$/,"");if(!j.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(j))return null;const H=j.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(H?.[1])return H[1].toLowerCase();const D=j.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!D?.[1]||!D[2])return null;const M=D[1].toLowerCase();return M===D[2].toLowerCase()?M:null};let p=!1,h="",m=0;const k=C=>{let j=0;for(;jk(C),y=C=>{const j=l(C);return j?s(C)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(j):!1},w=(C,j,H)=>{let D=C,M=0;for(;DD&&e[R-1]==="\r",Z=O?U?R-1:R:e.length,q=e.slice(D,Z),te=r(q),ee=te?.key??"";if(M>0&&j&&ee!==j)break;const J=te?.content??q,se=d(J);if(se?.name===H){if(se.type==="open")se.complete||M++;else if(M>0&&(M--,M===0))return!1}else if(M>0&&(c(J)||y(J)))return!0;if(O)D=R+1;else break}return!1};let _="",A=0,P=!0,z=!1,L=!1,E=` +`;const T=[];let $="";for(;AA&&e[C-1]==="\r",D=j?H?C-1:C:e.length,M=e.slice(A,D),R=j?H?`\r `:` -`:"",j=r(A),q=j?.key??"",K=j?.content??A,U=x(K);U&&(p?U.markerChar===h&&U.markerLen>=m&&/^\s*$/.test(U.rest)&&(p=!1,h="",m=0):(p=!0,h=U.markerChar,m=U.markerLen));const te=I.length>0;if(!p&&!te){const ee=u(K),ie=!!ee&&!P&&B&&$&&w(M,q,ee);ee&&!P&&(!B||ie)&&(q&&N&&q===N?_+=`${q}${T}`:q||(_+=T))}if(_+=A,_+=R,R&&(T=R),!p){const ee=d(K);if(ee){if(ee.type==="open")ee.complete||I.push(ee.name);else for(let ie=I.length-1;ie>=0;ie--)if(I[ie]===ee.name){I.length=ie;break}}}const J=c(K);P=J,B=!J&&a(K),$=!J&&!!f(K),N=q,M=O?C+1:e.length}return _}function C$(e,t,n={}){const o=p$(n),s=o?Cu():0,i=!!n.final,l=(e??"").toString();let r=l.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(Gce(t,n)&&(t.stream.reset(),Yce(t)),i||(r.endsWith("- *")&&(r=r.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*-\s*$/,y=>y.startsWith(` +`:"",O=r(M),U=O?.key??"",Z=O?.content??M,q=x(Z);q&&(p?q.markerChar===h&&q.markerLen>=m&&/^\s*$/.test(q.rest)&&(p=!1,h="",m=0):(p=!0,h=q.markerChar,m=q.markerLen));const te=T.length>0;if(!p&&!te){const J=u(Z),se=!!J&&!P&&z&&L&&w(A,U,J);J&&!P&&(!z||se)&&(U&&$&&U===$?_+=`${U}${E}`:U||(_+=E))}if(_+=M,_+=R,R&&(E=R),!p){const J=d(Z);if(J){if(J.type==="open")J.complete||T.push(J.name);else for(let se=T.length-1;se>=0;se--)if(T[se]===J.name){T.length=se;break}}}const ee=c(Z);P=ee,z=!ee&&a(Z),L=!ee&&!!f(Z),$=U,A=j?C+1:e.length}return _}function TL(e,t,n={}){const o=gL(n),s=o?Mu():0,i=!!n.final,l=(e??"").toString();let r=l.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(mue(t,n)&&(t.stream.reset(),gue(t)),i||(r.endsWith("- *")&&(r=r.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*-\s*$/,y=>y.startsWith(` `)?` `:""):/(?:^|\n)\s*--\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*--\s*$/,y=>y.startsWith(` `)?` @@ -830,29 +744,29 @@ ${w}`);u+=B}else u+=P;u+=x,d=p?f+1:e.length}return u}function jue(e,t){if(!e||!t `:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(r)?r=r.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(y,w,_)=>`${w}${_.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*\d+[.)]\s*$/,y=>y.startsWith(` `)?` `:""):/\n[[(]\n*$/.test(r)&&(r=r.replace(/(\n\[|\n\()+\n*$/g,` -`)),r=rue(r,t),r=iue(r,n.customHtmlTags)??r),n.customHtmlTags?.length&&r.includes("<")){const y=G0(n.customHtmlTags);if(y.length&&(r=Rue(r,y),r=Pue(r,y),r=jue(r,y),r=Fue(r,y),r.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");r=r.replace(_,"$1$2$2")}}i||(r=Bue(r));const a=gue(r);if(a){if(n.includeSourceMap){const _={...n,__sourceLineMapper:G_(l,r)};a[0].sourceMap=Q2(r,0,r.length,_)}const y=n.preTransformTokens,w=n.postTransformTokens;if(mv(t,n)||typeof y=="function"||typeof w=="function"){const _=V_(t,r,{__markstreamFinal:i},n),M=typeof y=="function"&&y(_)||_;typeof w=="function"&&w(M)}return F_(a,n,o,s)}const c=V_(t,r,{__markstreamFinal:i},n);if(!c||!Array.isArray(c))return F_([],n,o,s);const u=n.preTransformTokens,d=n.postTransformTokens;let f=c;u&&typeof u=="function"&&(f=u(f)||f);const p=t,h=typeof p.validateLink=="function"&&p.__markstreamOriginalValidateLink&&p.validateLink!==p.__markstreamOriginalValidateLink?p.validateLink:void 0,m=n.validateLink??h??p.options?.validateLink??(typeof p.validateLink=="function"?p.validateLink:void 0),k={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?G_(l,r):void 0,__sourceMarkdown:r,__customHtmlBlockCursor:0};let x=qce(t,r,f,k,o);if(d&&typeof d=="function"){const y=d(f);if(Array.isArray(y)){const w=y[0],_=w?.type;w&&typeof _=="string"?x=v4(y,{...k,__customHtmlBlockCursor:0},o):x=y}}if(Iue(x)&&(x=zue(x,i,r,k),x=S$(x,r,t,k,i)[0],x=Eue(x,t,k,i)),i){const y=new WeakSet,w=_=>{if(!_||typeof _!="object"||y.has(_))return;if(y.add(_),Array.isArray(_)){for(const P of _)w(P);return}const M=_;M.type==="html_block"&&M.loading===!0&&(M.loading=!1);for(const P of Object.values(M))w(P)};w(x)}return x=m$(x,n),n.debug&&console.log("Parsed Markdown Tree Structure:",x),h$(x,o,s)}function Y_(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=I1(t),s=t?.includeSourceMap===!0;let i=0;for(;iu.type==="html_block")){if(s)for(const u of c)lo(u,r,t);for(const u of c)wr(u,r,t);n.push(...c)}else{const u={type:"paragraph",raw:a,children:c};s&&lo(u,r,t);const d=U_(u,t);if(d){s&&q_(d,u);for(const f of d)wr(f,r,t);n.push(...d)}else wr(u,r,t),n.push(u)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const Oue=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,Hue=new Set([...kf,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),Due=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function X_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Vue(e){return typeof e=="string"?e:e==null?"":String(e)}function M$(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function t1(e){return Vue(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function A$(e){return t1(e).replace(/`/g,"`")}function Hp(e){return String(e??"").trim().toLowerCase()}function wv(e,t="safe"){const n=Hp(e);return n?t==="escape"?!0:t==="trusted"?kf.has(n):!Due.has(n):!1}function T$(e,t="safe"){const n=Hp(e);return n?t==="escape"?!0:t==="trusted"?kf.has(n):Hue.has(n):!1}function J_(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${A$(o)}"`).join("")}function E$(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(Oue);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function Wue(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||L0(s,{tagName:t,attrName:"srcset"})})}function I$(e,t,n,o){return jre.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?Wue(t,o):!!(Ore.has(e)&&t&&L0(t,{tagName:o,attrName:e}))}function y0(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function $$(e,t,n,o=!1){if(t!=="safe"||Hp(n)!=="a")return e;const s=y0(e,"href");if(o&&(!s||!e[s])){const a=y0(e,"target"),c=y0(e,"rel");return a&&delete e[a],c&&delete e[c],e}const i=y0(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const l=y0(e,"rel"),r=new Set(String(l?e[l]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return r.add("noopener"),r.add("noreferrer"),l&&l!=="rel"&&delete e[l],e.rel=Array.from(r).join(" "),e}function Q_(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!M$(l)||I$(r,i,t,n)||(o[l]=i)}return $$(o,t,n,!!y0(e,"href"))}function L$(e,t){const n=e.toLowerCase();return SI.has(n)?!1:X_(t,n)||X_(t,e)}function kv(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!M$(l)||I$(r,i,t,n)||(o[l]=i)}return $$(o,t,n,!!y0(e,"href"))}function v2(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function y4(e,t="safe",n){const o=kv(v2(e),t,n),s=Object.entries(o).map(([i,l])=>[i,l]);return s.length>0?s:void 0}function que(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function Uue(e){const t={};for(const[n,o]of Object.entries(e))t[n]=que(o,n);return t}function Jh(e){return e.trim().length>0}function N$(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const l=e.slice(n,o);Jh(l)&&t.push({type:"text",content:l})}if(e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=E$(e.slice(o+1,s));if(!i){const l=e.slice(o,s+1);Jh(l)&&t.push({type:"text",content:l}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||b1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l})}n=s+1}return t}function Zue(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=E$(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||b1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l}),n=s+1}return t}function Kue(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${t1(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${t1(o)}`:` ${t1(o)}="${A$(s)}"`).join("");return e.type==="self_closing"?`<${t1(t)}${n} />`:`<${t1(t)}${n}>`}function Gue(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of N$(e))if((n.type==="tag_open"||n.type==="self_closing")&&L$(n.tagName??"",t))return!0;return!1}function fu(e,t="safe"){if(!e)return"";if(t==="escape")return t1(e);const n=Zue(e),o=[],s=[],i=[];for(const l of n){if(l.type==="text"){i.length===0&&s.push(t1(l.content??""));continue}const r=Hp(l.tagName);if(!r)continue;if(T$(r,t)){l.type==="tag_open"?i.push(r):l.type==="tag_close"&&i[i.length-1]===r&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&wv(r,t)){s.push(Kue(l));continue}if(l.type==="self_closing"){s.push(`<${r}${J_(Q_(l.attrs??{},t,r))}>`);continue}if(l.type==="tag_open"){s.push(`<${r}${J_(Q_(l.attrs??{},t,r))}>`),b1.has(r)||o.push(r);continue}const a=o.lastIndexOf(r);if(a===-1)continue;for(;o.length>a+1;){const u=o.pop();u&&s.push(``)}const c=o.pop();c&&s.push(``)}for(;o.length>0;){const l=o.pop();l&&s.push(``)}return s.join("")}const Yue=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],ex="http://www.w3.org/2000/svg",Xue=new Set(["script","style","iframe","object","embed","link","meta"]),Jue=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),Que=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),ede=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),tde=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function nde(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function ode(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function sde(e){const t=e.nodeName.toLowerCase();return t==="use"?nde(e):t==="image"?ode(e):t==="text"||t==="tspan"?!!e.textContent?.trim():tde.has(t)}function ide(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function lde(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?L0(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?L0(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":L0(i,{tagName:o,attrName:s})?"":i:""}function rde(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function B$(e){const t=z$(e),n=t.toLowerCase();let o=0;for(;on.test(t))||B$(t)}function ade(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function N3(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function R$(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!Xue.has(o)){if(o==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))R$(s,t)}}function cde(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];R$(t,n);const o=n.join("").split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=N3(t.getAttribute("width")),i=N3(t.getAttribute("height")),l=N3(t.getAttribute("x")),r=N3(t.getAttribute("y")),a=e.ownerDocument.createElementNS(ex,"text");a.setAttribute("x",String(l+s/2)),a.setAttribute("y",String(r+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const c=t.querySelector(".nodeLabel");if(c?.getAttribute("class")&&a.setAttribute("class",c.getAttribute("class")),o.length===1)a.textContent=o[0];else{const u=-.6*(o.length-1);for(const[d,f]of o.entries()){const p=e.ownerDocument.createElementNS(ex,"tspan");p.setAttribute("x",String(l+s/2)),p.setAttribute("dy",d===0?`${u}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function ude(e){cde(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!Jue.has(o)){n.remove();continue}if(o==="style"&&tx(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const l=i.name.toLowerCase();if(/^on/i.test(l)){n.removeAttribute(i.name);continue}if(l==="style"&&i.value&&tx(i.value)){n.removeAttribute(i.name);continue}if(l==="srcdoc"){n.removeAttribute(i.name);continue}if(Que.has(l)&&i.value){const r=lde(o,l,i.value);if(!r){n.removeAttribute(i.name);continue}r!==i.value&&n.setAttribute(i.name,r);continue}if(ede.has(l)&&i.value&&B$(i.value)){n.removeAttribute(i.name);continue}if(i.value){const r=ide(i.value);r!==i.value&&n.setAttribute(i.name,r)}}ade(n)}}function HZe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return ude(n),dde(n)?null:n}catch{return null}}function dde(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),l=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(l)||i<=0||l<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){sde(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const z3=[];function Qh(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function fde(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function pde(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function nx(e=`editor-${Date.now()}`,t={}){const n=t0e(t),o=n;o.__markstreamRegisteredPluginCount=z3.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||z3.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;i=m=>h[m]??s[m]??m}else i=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const m=h;if(Array.isArray(m)){const[k,...x]=m;typeof k=="function"&&n.use(k,...x)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(z3.length)for(const h of z3)if(Array.isArray(h)){const[m,...k]=h;typeof m=="function"&&n.use(m,...k)}else typeof h=="function"&&n.use(h);n.use(voe),n.use(koe),n.use(hoe);const l=zoe,r=l.default??l;n.use(r),n.use(poe),n.use(foe),n.core.ruler.after("block","mark_fence_closed",h=>{const m=h,k=m.src,x=!!m.env?.__markstreamFinal,y=k.split(/\r?\n/);for(const w of m.tokens){if(w.type!=="fence"||!w.map||!w.markup)continue;const _=w.map[0],M=w.map[1],P=w.markup,B=P[0],$=P.length,T=y[Math.max(0,M-1)]??"";let I=0;for(;I_+1&&N>=$&&C===T.length,H=w;H.meta=H.meta??{},H.meta.unclosed=!O,H.meta.closed=!!O}});const a=(h,m)=>{const k=h,x=k.pos;if(k.src[x]!=="~")return!1;const y=k.src[x-1],w=k.src[x+1];if(/\d/.test(y)&&/\d/.test(w)){if(!m){const _=k.push("text","",0);_.content="~"}return k.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(h,m)=>{const k=h[m],x=String(k.info??"").trim(),y=String(k.content??""),w=btoa(unescape(encodeURIComponent(y))),_=fde(x),M=Qh(_),P=pde(`editor-${e}-${m}-${_}`),B=Qh(i("common.copy"));return`
        +`)),r=Aue(r,t),r=Cue(r,n.customHtmlTags)??r),n.customHtmlTags?.length&&r.includes("<")){const y=K0(n.customHtmlTags);if(y.length&&(r=nde(r,y),r=ode(r,y),r=ide(r,y),r=sde(r,y),r.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");r=r.replace(_,"$1$2$2")}}i||(r=tde(r));const a=Rue(r);if(a){if(n.includeSourceMap){const _={...n,__sourceLineMapper:X_(l,r)};a[0].sourceMap=Q2(r,0,r.length,_)}const y=n.preTransformTokens,w=n.postTransformTokens;if(vv(t,n)||typeof y=="function"||typeof w=="function"){const _=q_(t,r,{__markstreamFinal:i},n),A=typeof y=="function"&&y(_)||_;typeof w=="function"&&w(A)}return O_(a,n,o,s)}const c=q_(t,r,{__markstreamFinal:i},n);if(!c||!Array.isArray(c))return O_([],n,o,s);const u=n.preTransformTokens,d=n.postTransformTokens;let f=c;u&&typeof u=="function"&&(f=u(f)||f);const p=t,h=typeof p.validateLink=="function"&&p.__markstreamOriginalValidateLink&&p.validateLink!==p.__markstreamOriginalValidateLink?p.validateLink:void 0,m=n.validateLink??h??p.options?.validateLink??(typeof p.validateLink=="function"?p.validateLink:void 0),k={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?X_(l,r):void 0,__sourceMarkdown:r,__customHtmlBlockCursor:0};let x=due(t,r,f,k,o);if(d&&typeof d=="function"){const y=d(f);if(Array.isArray(y)){const w=y[0],_=w?.type;w&&typeof _=="string"?x=y4(y,{...k,__customHtmlBlockCursor:0},o):x=y}}if(Yue(x)&&(x=ede(x,i,r,k),x=AL(x,r,t,k,i)[0],x=Gue(x,t,k,i)),i){const y=new WeakSet,w=_=>{if(!_||typeof _!="object"||y.has(_))return;if(y.add(_),Array.isArray(_)){for(const P of _)w(P);return}const A=_;A.type==="html_block"&&A.loading===!0&&(A.loading=!1);for(const P of Object.values(A))w(P)};w(x)}return x=yL(x,n),n.debug&&console.log("Parsed Markdown Tree Structure:",x),vL(x,o,s)}function J_(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=E1(t),s=t?.includeSourceMap===!0;let i=0;for(;iu.type==="html_block")){if(s)for(const u of c)lo(u,r,t);for(const u of c)wr(u,r,t);n.push(...c)}else{const u={type:"paragraph",raw:a,children:c};s&&lo(u,r,t);const d=K_(u,t);if(d){s&&Z_(d,u);for(const f of d)wr(f,r,t);n.push(...d)}else wr(u,r,t),n.push(u)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const lde=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,rde=new Set([..._f,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),ade=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function Q_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cde(e){return typeof e=="string"?e:e==null?"":String(e)}function EL(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function e1(e){return cde(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function IL(e){return e1(e).replace(/`/g,"`")}function Vp(e){return String(e??"").trim().toLowerCase()}function bv(e,t="safe"){const n=Vp(e);return n?t==="escape"?!0:t==="trusted"?_f.has(n):!ade.has(n):!1}function LL(e,t="safe"){const n=Vp(e);return n?t==="escape"?!0:t==="trusted"?_f.has(n):rde.has(n):!1}function ex(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${IL(o)}"`).join("")}function $L(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(lde);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function ude(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||$0(s,{tagName:t,attrName:"srcset"})})}function NL(e,t,n,o){return iae.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?ude(t,o):!!(lae.has(e)&&t&&$0(t,{tagName:o,attrName:e}))}function v0(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function zL(e,t,n,o=!1){if(t!=="safe"||Vp(n)!=="a")return e;const s=v0(e,"href");if(o&&(!s||!e[s])){const a=v0(e,"target"),c=v0(e,"rel");return a&&delete e[a],c&&delete e[c],e}const i=v0(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const l=v0(e,"rel"),r=new Set(String(l?e[l]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return r.add("noopener"),r.add("noreferrer"),l&&l!=="rel"&&delete e[l],e.rel=Array.from(r).join(" "),e}function tx(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!EL(l)||NL(r,i,t,n)||(o[l]=i)}return zL(o,t,n,!!v0(e,"href"))}function BL(e,t){const n=e.toLowerCase();return AI.has(n)?!1:Q_(t,n)||Q_(t,e)}function _v(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!EL(l)||NL(r,i,t,n)||(o[l]=i)}return zL(o,t,n,!!v0(e,"href"))}function g2(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function w4(e,t="safe",n){const o=_v(g2(e),t,n),s=Object.entries(o).map(([i,l])=>[i,l]);return s.length>0?s:void 0}function dde(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function fde(e){const t={};for(const[n,o]of Object.entries(e))t[n]=dde(o,n);return t}function em(e){return e.trim().length>0}function RL(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const l=e.slice(n,o);em(l)&&t.push({type:"text",content:l})}if(e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=$L(e.slice(o+1,s));if(!i){const l=e.slice(o,s+1);em(l)&&t.push({type:"text",content:l}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||k1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l})}n=s+1}return t}function pde(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=$L(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||k1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l}),n=s+1}return t}function hde(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${e1(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${e1(o)}`:` ${e1(o)}="${IL(s)}"`).join("");return e.type==="self_closing"?`<${e1(t)}${n} />`:`<${e1(t)}${n}>`}function mde(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of RL(e))if((n.type==="tag_open"||n.type==="self_closing")&&BL(n.tagName??"",t))return!0;return!1}function fu(e,t="safe"){if(!e)return"";if(t==="escape")return e1(e);const n=pde(e),o=[],s=[],i=[];for(const l of n){if(l.type==="text"){i.length===0&&s.push(e1(l.content??""));continue}const r=Vp(l.tagName);if(!r)continue;if(LL(r,t)){l.type==="tag_open"?i.push(r):l.type==="tag_close"&&i[i.length-1]===r&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&bv(r,t)){s.push(hde(l));continue}if(l.type==="self_closing"){s.push(`<${r}${ex(tx(l.attrs??{},t,r))}>`);continue}if(l.type==="tag_open"){s.push(`<${r}${ex(tx(l.attrs??{},t,r))}>`),k1.has(r)||o.push(r);continue}const a=o.lastIndexOf(r);if(a===-1)continue;for(;o.length>a+1;){const u=o.pop();u&&s.push(``)}const c=o.pop();c&&s.push(``)}for(;o.length>0;){const l=o.pop();l&&s.push(``)}return s.join("")}const gde=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],nx="http://www.w3.org/2000/svg",vde=new Set(["script","style","iframe","object","embed","link","meta"]),yde=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),wde=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),kde=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),bde=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function _de(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function xde(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function Sde(e){const t=e.nodeName.toLowerCase();return t==="use"?_de(e):t==="image"?xde(e):t==="text"||t==="tspan"?!!e.textContent?.trim():bde.has(t)}function Cde(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function Mde(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?$0(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?$0(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":$0(i,{tagName:o,attrName:s})?"":i:""}function Ade(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function FL(e){const t=PL(e),n=t.toLowerCase();let o=0;for(;on.test(t))||FL(t)}function Tde(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function B3(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function jL(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!vde.has(o)){if(o==="br"){t.push(` +`);return}for(const s of Array.from(n.childNodes))jL(s,t)}}function Ede(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];jL(t,n);const o=n.join("").split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=B3(t.getAttribute("width")),i=B3(t.getAttribute("height")),l=B3(t.getAttribute("x")),r=B3(t.getAttribute("y")),a=e.ownerDocument.createElementNS(nx,"text");a.setAttribute("x",String(l+s/2)),a.setAttribute("y",String(r+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const c=t.querySelector(".nodeLabel");if(c?.getAttribute("class")&&a.setAttribute("class",c.getAttribute("class")),o.length===1)a.textContent=o[0];else{const u=-.6*(o.length-1);for(const[d,f]of o.entries()){const p=e.ownerDocument.createElementNS(nx,"tspan");p.setAttribute("x",String(l+s/2)),p.setAttribute("dy",d===0?`${u}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function Ide(e){Ede(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!yde.has(o)){n.remove();continue}if(o==="style"&&ox(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const l=i.name.toLowerCase();if(/^on/i.test(l)){n.removeAttribute(i.name);continue}if(l==="style"&&i.value&&ox(i.value)){n.removeAttribute(i.name);continue}if(l==="srcdoc"){n.removeAttribute(i.name);continue}if(wde.has(l)&&i.value){const r=Mde(o,l,i.value);if(!r){n.removeAttribute(i.name);continue}r!==i.value&&n.setAttribute(i.name,r);continue}if(kde.has(l)&&i.value&&FL(i.value)){n.removeAttribute(i.name);continue}if(i.value){const r=Cde(i.value);r!==i.value&&n.setAttribute(i.name,r)}}Tde(n)}}function kKe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return Ide(n),Lde(n)?null:n}catch{return null}}function Lde(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),l=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(l)||i<=0||l<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){Sde(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const R3=[];function tm(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $de(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function Nde(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function sx(e=`editor-${Date.now()}`,t={}){const n=b0e(t),o=n;o.__markstreamRegisteredPluginCount=R3.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||R3.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;i=m=>h[m]??s[m]??m}else i=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const m=h;if(Array.isArray(m)){const[k,...x]=m;typeof k=="function"&&n.use(k,...x)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(R3.length)for(const h of R3)if(Array.isArray(h)){const[m,...k]=h;typeof m=="function"&&n.use(m,...k)}else typeof h=="function"&&n.use(h);n.use(Poe),n.use(Ooe),n.use(zoe);const l=ese,r=l.default??l;n.use(r),n.use(Noe),n.use($oe),n.core.ruler.after("block","mark_fence_closed",h=>{const m=h,k=m.src,x=!!m.env?.__markstreamFinal,y=k.split(/\r?\n/);for(const w of m.tokens){if(w.type!=="fence"||!w.map||!w.markup)continue;const _=w.map[0],A=w.map[1],P=w.markup,z=P[0],L=P.length,E=y[Math.max(0,A-1)]??"";let T=0;for(;T_+1&&$>=L&&C===E.length,H=w;H.meta=H.meta??{},H.meta.unclosed=!j,H.meta.closed=!!j}});const a=(h,m)=>{const k=h,x=k.pos;if(k.src[x]!=="~")return!1;const y=k.src[x-1],w=k.src[x+1];if(/\d/.test(y)&&/\d/.test(w)){if(!m){const _=k.push("text","",0);_.content="~"}return k.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(h,m)=>{const k=h[m],x=String(k.info??"").trim(),y=String(k.content??""),w=btoa(unescape(encodeURIComponent(y))),_=$de(x),A=tm(_),P=Nde(`editor-${e}-${m}-${_}`),z=tm(i("common.copy"));return`
        - ${Qh(_.toUpperCase())} - + ${tm(_.toUpperCase())} +
        -
        `};const c=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,d=h=>{if(!h.startsWith("["))return!1;const m=u.exec(h);if(!m)return h!=="["&&!/^\[\d+$/.test(h);const k=String(m[1]??"");return h.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(h,m)=>{const k=h;if(k.src[k.pos]!=="[")return!1;const x=c.exec(k.src.slice(k.pos));if(!x)return!1;const y=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(y))return!1;const w=k.src.slice(k.pos+x[0].length);if(w.startsWith("](")||w.startsWith("(")||d(w))return!1;if(!m){const _=x[1],M=k.push("reference","span",0);M.content=_,M.markup=x[0],M.raw=x[0]}return k.pos+=x[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(h,m)=>{const x=String(h[m].content??"");return`${x}`};const p=n.use.bind(n);return n.use=((...h)=>(o.__markstreamHasCustomParserExtensions=!0,p(...h))),n}function hde({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function P$({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:hde({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const mde={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function gde(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function F$(e){const t=gde(e);return mde[t]??t}function vde(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>F$(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function yde(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function wde(e){return yde(e)?.join("\0")??""}function kde(e,t){return`${wde(e)}\0\0${vde(t)?.join("\0")??""}`}function Sc(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function ox(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var bde=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const h=sx();this.startedAt=f&&this.hasStarted?h-this.normalizedStartDelayMs:h,this.lastTick=h,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=sx();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,k=Cde(h/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const x=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),y=Sde(this.source.slice(this.visible.length),x,this.segmenter);y.text&&(this.visible+=y.text,this.charBudget=Math.max(0,this.charBudget-y.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:l=600,maxCommitFps:r=30,startDelayMs:a=80,maxCharsPerCommit:c=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=Sc(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Sc(o,1e3,1)),this.normalizedTargetLatencyMs=Sc(s,900,1),this.normalizedCatchUpLatencyMs=Sc(i,350,1),this.normalizedCatchUpThreshold=ox(l,600),this.normalizedStartDelayMs=ox(a,80),this.maxCommitFps=Math.trunc(Sc(r,30,1)),this.maxCharsPerCommit=Math.trunc(Sc(c,80,1)),this.flushOnFinish=u,this.segmenter=xde(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function _de(e={},t){const n=new bde(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function xde(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function Sde(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function sx(){return typeof performance<"u"?performance.now():Date.now()}function Cde(e,t,n){return Math.min(n,Math.max(t,e))}var Mde=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const n7=Symbol.for("markstream-vue:node-lifecycle");function DZe(){}const bv=new Map;let j$="material";const Zc=new Map,ix=new Map;let o7=null;function Ade(e){bv.set(e.id,e)}function Tde(e){const t=bv.get(j$);if(!t)return;const n=t.core[e];if(n)return n;const o=Zc.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Zc.has(t.id)&&Ide(t)}function Ede(){var e,t;return(t=(e=bv.get(j$))==null?void 0:e.fallback)!=null?t:""}function Ide(e){return Mde(this,null,function*(){var t,n,o;if(Zc.has(e.id))return(t=Zc.get(e.id))!=null?t:null;let s=ix.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Zc.set(e.id,i),o7?.(),i)).catch(()=>(Zc.set(e.id,null),null)),ix.set(e.id,s)),s})}const lx='',rx='',$de={id:"material",core:{"":rx,plain:'',text:rx,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:lx,csharp:lx,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Cs(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Lde=Uo(0);o7=()=>{Lde.value++},Ade($de);const Nde={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function Dp(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[l]=i.split(":");return l.toLowerCase()})(e);return(t=Nde[n])!=null?t:n}function VZe(e){const t=Dp(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function WZe(e){return Tde(Dp(e))||Ede()}const ax={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var Vp=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});let Mi=null,C0=!1,M0=null,Wp=xv;function Sf(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function _v(){try{const e=globalThis;return Sf(e?.katex)}catch{return null}}function xv(){return Vp(null,null,function*(){const e=_v();if(e)return e;const t=yield Cs(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Cs(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return Sf(t)})}function O$(e){const t=Promise.resolve(e).then(n=>{var o;return M0===t&&n?(Mi=(o=Sf(n))!=null?o:n,Mi):null}).catch(()=>null).finally(()=>{M0===t&&(M0=null)});return M0=t,C0=!0,t}function zde(e){Wp=e,Mi=null,C0=!1,M0=null}function Bde(e){zde(xv)}function H$(){return typeof Wp=="function"}function qZe(){var e;const t=Wp;if(!t||t===xv)return null;if(Mi)return Mi;const n=_v();if(n)return Mi=n,Mi;if(C0)return null;try{const o=t();return o?typeof o?.then=="function"?(O$(o),null):(Mi=(e=Sf(o))!=null?e:o,Mi):null}catch{return null}}function D$(){return Vp(this,null,function*(){var e;const t=_v();if(t)return Mi=t,Mi;if(Mi)return Mi;if(M0)return M0;if(C0)return null;const n=Wp;if(!n)return C0=!0,null;try{const o=n();if(typeof o?.then=="function")return O$(o);if(o)return Mi=(e=Sf(o))!=null?e:o,C0=!0,Mi}catch{}return C0=!0,null})}function V$(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let s1=null,Xa=null;const Js=new Map,ha=new Map;let tf=5;const z0=new Set;function y2(){if(Js.size{const{id:n,html:o,error:s}=t.data,i=Js.get(n);if(i)if(Js.delete(n),clearTimeout(i.timeoutId),i.cleanup(),y2(),s)i.aborted||i.reject(new Error(s));else{const{content:l,displayMode:r}=t.data;if(l){const a=`${r?"d":"i"}:${l}`;if(ha.set(a,o),ha.size>200){const c=ha.keys().next().value;ha.delete(c)}}i.aborted||i.resolve(o)}},s1.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Js.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Js.clear(),W$()}}function Pde(){var e;for(const t of Js.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Js.clear(),W$(),s1&&((e=s1.terminate)==null||e.call(s1)),s1=null,Xa=null}function Fde(e,t=!0,n=2e3,o){return Vp(this,null,function*(){performance.now();const s=V$(e);if(!H$()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Xa)return Promise.reject(Xa);const i=`${t?"d":"i"}:${s}`,l=ha.get(i);if(l)return y2(),Promise.resolve(l);const r=s1||(Xa=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Xa.name="WorkerInitError",Xa.code="WORKER_INIT_ERROR",null);if(!r)return Promise.reject(Xa);if(Js.size>=tf){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Js.size,a.max=tf,Promise.reject(a)}return new Promise((a,c)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void c(m)}const u=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Js.get(u);if(!m)return;Js.delete(u),m.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",m.aborted||m.reject(k),y2()},n);d=()=>{const m=Js.get(u);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const k=new Error("Aborted");k.name="AbortError",c(k)},o&&o.addEventListener("abort",d,{once:!0});const p=a,h=c;Js.set(u,{resolve:m=>{p(m)},reject:m=>{h(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{r.postMessage({id:u,content:s,displayMode:t})}catch(m){const k=Js.get(u);Js.delete(u),clearTimeout(f),k?.cleanup(),k?.reject(m),y2()}})})}function UZe(e,t=!0,n){const o=`${t?"d":"i"}:${V$(e)}`;if(ha.set(o,n),ha.size>200){const s=ha.keys().next().value;ha.delete(s)}}const jde="WORKER_BUSY";function Ode(e=2e3,t){return Js.size{let s,i=!1,l=null,r=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),z0.delete(r),t&&l&&t.removeEventListener("abort",l),l=null};r=()=>{i||(i=!0,a(),n())},z0.add(r),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const c=new Error("Wait for worker slot timed out");c.name="WorkerBusyTimeout",c.code="WORKER_BUSY_TIMEOUT",o(c)},e),queueMicrotask(()=>y2()),t&&(l=()=>{if(i)return;i=!0,a();const c=new Error("Aborted");c.name="AbortError",o(c)},t.aborted?l():t.addEventListener("abort",l,{once:!0}))})}const Ad={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function ZZe(e){return Vp(this,arguments,function*(t,n=!0,o={}){var s,i,l,r;if(!H$()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:Ad.timeout,c=(i=o.waitTimeout)!=null?i:Ad.waitTimeout,u=(l=o.backoffMs)!=null?l:Ad.backoffMs,d=(r=o.maxRetries)!=null?r:Ad.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):Ad.maxRetries,p=o.signal;let h=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield Fde(t,n,a,p)}catch(m){if(m?.code!==jde||h>=f)throw m;if(h++,yield Ode(c,p).catch(()=>{}),p?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}u>0&&(yield new Promise(k=>globalThis.setTimeout(k,u*h)))}}})}function Kc(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function Hde(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function T5(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=Hde(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function E5(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function q$(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function I5(e,t=360,n=500){return q$(e,t,n)}function $5(e,t=360,n=500){return q$(e,t,n)}var Dde=Object.defineProperty,Vde=Object.defineProperties,Wde=Object.getOwnPropertyDescriptors,cx=Object.getOwnPropertySymbols,qde=Object.prototype.hasOwnProperty,Ude=Object.prototype.propertyIsEnumerable,ux=(e,t,n)=>t in e?Dde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U$=(e,t)=>{for(var n in t||(t={}))qde.call(t,n)&&ux(e,n,t[n]);if(cx)for(var n of cx(t))Ude.call(t,n)&&ux(e,n,t[n]);return e},dx=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const L5=()=>Cs(()=>import("./mermaid.core-BgUXBQ9g.js").then(e=>e.cb),__vite__mapDeps([4,5]));let Xr=null,Gc=L5,Kd=null,s7=!1,i7=!1,Gd=0;function Zde(e){Gc=e,Gd++,Xr=null,Kd=null,s7=!1,i7=!1}function Kde(e){Zde(L5)}function fx(){return typeof Gc=="function"}function px(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=U$({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},Vde(n,Wde(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function hx(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=U$({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function KZe(){return dx(this,null,function*(){if(Xr)return Xr;const e=(function(){try{const o=globalThis;return px(o?.mermaid)}catch{return null}})();if(e)return Xr=e,hx(Xr),Xr;const t=Gc,n=Gd;return t?t===L5&&s7?null:Kd||(Kd=dx(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===L5)return n===Gd&&t===Gc&&(s7=!0,(function(i){i7||(i7=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Gd&&t===Gc&&(Kd=null)}return n!==Gd||t!==Gc?null:o?(Xr=px(o),hx(Xr),Xr):null}),Kd):null})}let Hi=null,Ja=null;const or=new Map,d0=new Map;function w4(e){for(const t of or.values())t.reject(e);or.clear(),d0.clear()}let mx=5,gx=!1;const Gde="WORKER_BUSY",vx="MERMAID_DISABLED";function Yde(e){if(Hi&&Hi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",w4(n)}Hi=e,Ja=null;const t=e;Hi.onmessage=n=>{if(Hi!==t)return;const{id:o,ok:s,result:i,error:l}=n.data,r=or.get(o);r&&(s===!1||l?r.reject(new Error(l||"Unknown error")):r.resolve(i))},Hi.onerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{gx?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}w4(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Hi.onmessageerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{gx?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}w4(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function Xde(){var e;if(Hi)try{w4(new Error("Worker cleared")),(e=Hi.terminate)==null||e.call(Hi)}catch{}Hi=null,Ja=null}function Z$(e,t,n,o){if(!fx()){const l=new Error("Mermaid rendering disabled");return l.name="MermaidDisabled",l.code=vx,Promise.reject(l)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=d0.get(s);return i||(i=(function(l,r,a=1400){if(!fx()){const u=new Error("Mermaid rendering disabled");return u.name="MermaidDisabled",u.code=vx,Promise.reject(u)}if(Ja)return Promise.reject(Ja);const c=Hi||(Ja=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Ja.name="WorkerInitError",Ja.code="WORKER_INIT_ERROR",null);if(!c)return Promise.reject(Ja);if(or.size>=mx){const u=new Error("Worker busy");return u.name="WorkerBusy",u.code=Gde,u.inFlight=or.size,u.max=mx,Promise.reject(u)}return new Promise((u,d)=>{const f=Math.random().toString(36).slice(2);let p,h=!1;const m=()=>{h||(h=!0,p!=null&&globalThis.clearTimeout(p),or.delete(f))},k={resolve:x=>{m(),u(x)},reject:x=>{m(),d(x)}};or.set(f,k);try{c.postMessage({id:f,action:l,payload:r})}catch(x){return or.delete(f),void d(x)}p=globalThis.setTimeout(()=>{const x=new Error("Worker call timed out");x.name="WorkerTimeout",x.code="WORKER_TIMEOUT";const y=or.get(f);y&&y.reject(x)},a)})})(e,t,n),d0.set(s,i),i.then(()=>{d0.get(s)===i&&d0.delete(s)},()=>{d0.get(s)===i&&d0.delete(s)})),(function(l,r){if(!r)return l;if(r.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,c)=>{let u=()=>{};const d=()=>r.removeEventListener("abort",u);u=()=>{d();const f=new Error("Aborted");f.name="AbortError",c(f)},r.addEventListener("abort",u,{once:!0}),l.then(f=>{d(),a(f)},f=>{d(),c(f)})})})(i,o)}function GZe(e,t,n=1400,o){return Z$("canParse",{code:e,theme:t},n,o)}function YZe(e,t,n=1400,o){return Z$("findPrefix",{code:e,theme:t},n,o)}var Jde=Object.defineProperty,Qde=Object.defineProperties,e2e=Object.getOwnPropertyDescriptors,yx=Object.getOwnPropertySymbols,t2e=Object.prototype.hasOwnProperty,n2e=Object.prototype.propertyIsEnumerable,wx=(e,t,n)=>t in e?Jde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t)=>{for(var n in t||(t={}))t2e.call(t,n)&&wx(e,n,t[n]);if(yx)for(var n of yx(t))n2e.call(t,n)&&wx(e,n,t[n]);return e},wn=(e,t)=>Qde(e,e2e(t)),zo=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const o2e="__global__",em="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",l7=(()=>{const e=globalThis;if(e[em])return e[em];const t={scopedCustomComponents:{},revision:Uo(0)};return e[em]=t,t})(),kx=l7.revision,s2e=Symbol("markstreamCustomComponents"),i2e=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function Cf(e){return i2e.has(String(e).trim().toLowerCase())}function l2e(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function tm(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([Vl(n),Vl(l2e(n))]))!s||Cf(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function Is(e){const t=fn(s2e,null);return z(()=>{var n;return kx.value,(function(o,s={}){return kx.value,xt(xt(xt({},tm(l7.scopedCustomComponents[o2e]||{})),tm(s)),tm((function(i){return i&&l7.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const r2e=["aria-label"],a2e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},c2e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},ho=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},ll=ho(Je({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(g(),S("svg",c2e,[...n[1]||(n[1]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),b("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(g(),S("svg",a2e,[...n[0]||(n[0]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,r2e))}),[["__scopeId","data-v-be21ab83"]]);ll.install=e=>{e.component(ll.__name,ll)};const u2e={class:"emoji-node"},Zi=ho(Je({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",u2e,E(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Zi.install=e=>{e.component(Zi.__name,Zi)};const d2e=["id"],f2e=["title"],rl=ho(Je({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(g(),S("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[b("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+E(e.node.id)+"]",9,f2e)],8,d2e))}}),[["__scopeId","data-v-c1463a29"]]);rl.install=e=>{e.component(rl.__name,rl)};const K$=(()=>{try{return!1}catch{}return!1})();function nm(e){K$&&console.warn(e)}function bx(e,t="safe",n){return kv(e,t,n)}function G$(e){return Uue(e)}function om(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Sv(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=y4((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([l,r])=>[String(l),om(r)]):s.filter(l=>l&&typeof l=="object"&&!Array.isArray(l)&&"name"in l).map(l=>[String(l.name),om(l.value)]):Object.entries(s).map(([l,r])=>[l,om(r)]):null,t,n);var s;if(!o)return;const i=G$(v2(o));return Object.keys(i).length>0?i:void 0}function _x(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,l])=>l===""?` ${i}`:` ${i}="${l}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function Td(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function sm(e,t,n,o,s,i,l=!1){const r=(function(d,f){return L$(d,f)})(e,o);if(kf.has(e.toLowerCase())||!r&&T$(e,i))return null;if(!r&&wv(e,i))return l?[_x(e,t,!0)]:[_x(e,t),...n,``];const a=kv(t,i,e),c=a.key,u=c!=null&&c!==""?c:s;if(r){const d=o[e]||o[e.toLowerCase()],f=G$(a);return vn(d,wn(xt({},f),{key:u}),n.length>0?n:void 0)}return vn(e,wn(xt({},a),{innerHTML:void 0,key:u}),n.length>0?n:void 0)}function Y$(e,t){return Gue(e,t)}function N5(e,t,n="safe"){if(!e)return[];try{return(function(i,l,r="safe"){let a=0;const c=[],u=[];for(const d of i)if(d.type==="text")(c.length>0?c[c.length-1].children:u).push(d.content);else if(d.type==="self_closing"){const f=sm(d.tagName,d.attrs||{},[],l,"ms-html-"+a++,r,!0);Td(c.length>0?c[c.length-1].children:u,f)}else if(d.type==="tag_open")c.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let h=c.length-1;h>=0;h--)if(c[h].tagName.toLowerCase()===f){p=h;break}if(p!==-1)for(;c.length>p;){const h=c.pop(),m=sm(h.tagName,h.attrs||{},h.children,l,h.autoKey,r);c.length>0?Td(c[c.length-1].children,m):Td(u,m),h.tagName.toLowerCase()!==f&&c.length>p&&nm(`Auto-closing unclosed tag: <${h.tagName}>`)}else nm(`Ignoring closing tag with no matching opening tag: `)}for(;c.length>0;){const d=c.pop(),f=sm(d.tagName,d.attrs||{},d.children,l,d.autoKey,r);c.length>0?Td(c[c.length-1].children,f):Td(u,f),nm(`Auto-closing unclosed tag: <${d.tagName}>`)}return u})(N$(e),t,n)}catch(s){return o=s,K$&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const p2e=["innerHTML"],al=ho(Je({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=z(()=>{var r,a;return(a=(r=t.htmlPolicy)!=null?r:n?.value)!=null?a:"safe"}),s=Is(()=>t.customId),i=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),l=z(()=>{const r=t.node.content;if(!r)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:fu(r,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:r};if(t.node.loading&&t.node.autoClosed){const c=N5(r,s.value,o.value);if(c!==null)return{mode:"dynamic",nodes:c}}if(!Y$(r,s.value))return{mode:"html",content:fu(r,o.value)};const a=N5(r,s.value,o.value);return a===null?{mode:"html",content:fu(r,o.value)}:{mode:"dynamic",nodes:a}});return(r,a)=>l.value.mode==="dynamic"?(g(),S("span",{key:0,class:Pe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[W(v(i),{nodes:l.value.nodes},null,8,["nodes"])],2)):l.value.mode==="text"?(g(),S("span",{key:1,class:Pe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},E(l.value.content),3)):(g(),S("span",{key:2,class:Pe(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:l.value.content},null,10,p2e))}}),[["__scopeId","data-v-d17f12b0"]]);al.install=e=>{e.component(al.__name,al)};const h2e={class:"inline-code"},m2e={key:0},hi=ho(Je({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=mf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=z(()=>{const y=n.fade;return y===""||y===!0||y==="true"||y!==!1&&y!=="false"&&void 0}),r=z(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=z(()=>{var y;return String((y=t.node.code)!=null?y:"")}),c=z(()=>!r.value),u=z(()=>{var y;const w=(y=n["index-key"])!=null?y:n.indexKey;return w==null||w===""?"":String(w)}),d=V(t.node.code),f=V(""),p=V(0);let h;function m(){h?.(),h=void 0}function k(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ze([()=>t.node.code,u,r],([y])=>{const w=String(y??""),_=u.value,M=P$({nextContent:w,persistedContent:_?s?.get(_):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:r.value});d.value=M.settledContent,f.value=M.streamedDelta,M.appended?(p.value+=1,(function(){if(!f.value||h||!i)return;const P=i.value;h=Ze(()=>i.value,B=>{B!==P&&k()},{flush:"sync"})})()):f.value||m(),_&&s?.set(_,w)},{immediate:!0}),Bu(m);const x=z(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(y,w)=>(g(),S("code",h2e,[c.value?(g(),S(Ce,{key:0},[Oe(E(a.value),1)],64)):(g(),S(Ce,{key:1},[d.value?(g(),S("span",m2e,E(d.value),1)):Y("",!0),f.value?(g(),S("span",{key:1,class:Pe(["inline-code-stream-delta",[x.value]]),onAnimationend:k},E(f.value),35)):Y("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);hi.install=e=>{e.component(hi.__name,hi)};const r7=V(!1),xx=V(""),Sx=V("top"),w2=V(null),k2=V(null),a7=V(null),c7=V(null),Cx=V(null);let k4=null,b4=null,u7=0;function X$(){k4&&(clearTimeout(k4),k4=null),b4&&(clearTimeout(b4),b4=null)}let B3=!1,R3=null,Mx=!1;function g2e(e,t,n="top",o=!1,s,i){if(!e)return;const l=++u7;X$();const r=()=>zo(null,null,function*(){var a,c;if(yield(function(){return zo(this,null,function*(){if(!B3&&!Mx&&typeof document<"u"){R3!=null||(R3=zo(null,null,function*(){const[{createApp:u,h:d},{default:f}]=yield Promise.all([Cs(()=>import("./vue.runtime.esm-bundler-CudDDIjA.js"),[]),Cs(()=>import("./Tooltip-BDX9T6Zw.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),u({setup:()=>()=>{var h;return d(f,{visible:r7.value,"anchor-el":w2.value,content:xx.value,placement:Sx.value,id:k2.value,originX:a7.value,originY:c7.value,isDark:(h=Cx.value)!=null?h:void 0})}}).mount(p),B3=!0}));try{yield R3}catch(u){B3=!1,R3=null,Mx=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",u)}}})})(),B3&&l===u7){k2.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,w2.value=e,xx.value=t,Sx.value=n,a7.value=(a=s?.x)!=null?a:null,c7.value=(c=s?.y)!=null?c:null,Cx.value=typeof i=="boolean"?i:null,r7.value=!0;try{e.setAttribute("aria-describedby",k2.value)}catch{}}});o?r():k4=setTimeout(r,80)}function v2e(e=!1){u7+=1,X$();const t=()=>{if(w2.value&&k2.value)try{w2.value.removeAttribute("aria-describedby")}catch{}r7.value=!1,w2.value=null,k2.value=null,a7.value=null,c7.value=null};e?t():b4=setTimeout(t,120)}const y2e={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},w2e=Symbol("markstreamI18nFallback");function J$(e,t){var n;return(n=t?.[e])!=null?n:y2e[e]}const d7=(e,t)=>{var n;return(n=J$(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function Ax(e,t){return{t(n){const o=J$(n,t);if(e.te&&o!=null&&!e.te(n))return d7(n,t);const s=e.t(n);return s===n&&o!=null?d7(n,t):s}}}function k2e(){const e=(function(){var n,o,s;try{const i=Ts(),l=w2e,r=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=r?.[l])!=null?o:a?.[l])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=Ts(),i=s?.proxy,l=i?.$t;if(typeof l=="function"){const c=i?.$te;return{t:l.bind(i),te:typeof c=="function"?c.bind(i):void 0}}const r=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=r?.$t;if(typeof a=="function"){const c=r?.$te;return{t:a.bind(r),te:typeof c=="function"?c.bind(r):void 0}}}catch{}return null})();if(t)return Ax(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return Ax({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>d7(n,e)}}const Q$=Symbol("ViewportPriority"),eL=Symbol("ViewportPriorityOptions"),tL=Symbol("OffscreenHeavyNodeDeferral"),b2e=z(()=>!1),j0="400px";function Cv(){return fn(eL,void 0)}function Mv(){return fn(tL,b2e)}function _2e(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?V(t):t,l=s?(n=window.requestIdleCallback)!=null?n:B=>window.setTimeout(()=>B({didTimeout:!0,timeRemaining:()=>0}),16):null,r=s?(o=window.cancelIdleCallback)!=null?o:B=>window.clearTimeout(B):null,a=new WeakMap;let c=1;const u=new Map,d=new Map,f=new Set;let p=null,h=null;function m(B){if(!B)return"viewport";let $=a.get(B);return $||($=c++,a.set(B,$)),String($)}function k(){if(p!=null){try{r?.(p)}catch{}p=null}}function x(B){if(B){const $=u.get(B);if($&&!$.targets.size){try{$.io.disconnect()}catch{}u.delete(B)}}d.size||f.size||k()}function y(B){const $=d.get(B);if(!$)return;const T=u.get($.bucketKey);if(!$.visible.value){$.visible.value=!0;try{$.resolve()}catch{}}try{T?.io.unobserve(B)}catch{}T?.targets.delete(B),d.delete(B),f.delete(B),x($.bucketKey)}function w(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&p==null&&f.size&&(p=l(()=>{p=null;const B=f.values().next().value;B&&(f.delete(B),y(B),f.size&&w())},{timeout:1200}))}function _(B,$){if(!s||typeof IntersectionObserver>"u")return null;const T=(function(D,A){var R,j,q;return{root:(R=e?.(D??null))!=null?R:null,rootMargin:(j=A?.rootMargin)!=null?j:j0,threshold:(q=A?.threshold)!=null?q:0}})(B,$),I=[m((N=T).root),N.rootMargin,N.threshold].join("\0");var N;const C=u.get(I);if(C)return{key:I,bucket:C};let O;try{O=new IntersectionObserver(D=>{for(const A of D)(A.isIntersecting||A.intersectionRatio>0)&&y(A.target)},{root:T.root,rootMargin:T.rootMargin,threshold:T.threshold})}catch{return null}const H={io:O,targets:new Map};return u.set(I,H),{key:I,bucket:H}}function M(){if(s&&i.value)for(const[B,$]of Array.from(d.entries())){const T=_(B,$.opts);if(!T){y(B);continue}if(T.key===$.bucketKey)continue;const I=$.bucketKey,N=u.get(I);try{N?.io.unobserve(B)}catch{}N?.targets.delete(B),$.bucketKey=T.key,T.bucket.targets.set(B,$),T.bucket.io.observe(B),x(I)}}Ze(i,B=>{if(!B){for(const $ of Array.from(d.keys()))y($);k()}},{flush:"sync"});const P=(B,$)=>{const T=V(!1);let I,N=!1;const C=new Promise(A=>{I=()=>{N||(N=!0,A())}}),O=()=>{const A=d.get(B);if(!A)return f.delete(B),void x();const R=u.get(A.bucketKey);try{R?.io.unobserve(B)}catch{}R?.targets.delete(B),d.delete(B),f.delete(B),x(A.bucketKey)};if(!s||!i.value)return T.value=!0,I(),{isVisible:T,whenVisible:C,destroy:O};const H=_(B,$);if(!H)return T.value=!0,I(),{isVisible:T,whenVisible:C,destroy:O};const D={resolve:I,visible:T,bucketKey:H.key,opts:$};return d.set(B,D),H.bucket.targets.set(B,D),H.bucket.io.observe(B),s&&h==null&&(h=window.requestAnimationFrame(()=>{h=null,M()})),$?.allowIdle!==!1&&(f.add(B),w()),{isVisible:T,whenVisible:C,destroy:O}};return P.refresh=M,qn(Q$,P),P}function Av(){var e,t;const n=fn(Q$,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let l=null;const r=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,c=()=>{if(l!=null){try{a?.(l)}catch{}l=null}},u=p=>{if(!p)return;const h=s.get(p);if(h&&!h.targets.size){try{h.io.disconnect()}catch{}s.delete(p)}},d=p=>{const h=o.get(p);if(!h)return;const m=s.get(h.bucketKey);if(!h.visible.value){h.visible.value=!0;try{h.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}o.delete(p),m?.targets.delete(p),i.delete(p),u(h.bucketKey),i.size||c()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&l==null&&i.size&&(l=r(()=>{l=null;const p=i.values().next().value;p&&(i.delete(p),d(p),i.size&&f())},{timeout:1200}))};return(p,h)=>{const m=V(!1);let k,x=!1;const y=new Promise(M=>{k=()=>{x||(x=!0,M())}}),w=()=>{const M=o.get(p);if(!M)return i.delete(p),void(i.size||c());const P=s.get(M.bucketKey);try{P?.io.unobserve(p)}catch{}o.delete(p),P?.targets.delete(p),i.delete(p),u(M.bucketKey),i.size||c()},_=(M=>{var P,B;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const $=(O=>{var H,D;return[(H=O?.rootMargin)!=null?H:j0,(D=O?.threshold)!=null?D:0].join("\0")})(M),T=s.get($);if(T)return{key:$,bucket:T};const I=(P=M?.rootMargin)!=null?P:j0;let N;try{N=new IntersectionObserver(O=>{for(const H of O)(H.isIntersecting||H.intersectionRatio>0)&&d(H.target)},{root:null,rootMargin:I,threshold:(B=M?.threshold)!=null?B:0})}catch{return null}const C={io:N,targets:new Set};return s.set($,C),{key:$,bucket:C}})(h);return _?(o.set(p,{resolve:k,visible:m,bucketKey:_.key}),_.bucket.targets.add(p),_.bucket.io.observe(p),h?.allowIdle!==!1&&(i.add(p),f()),{isVisible:m,whenVisible:y,destroy:w}):(m.value=!0,k(),{isVisible:m,whenVisible:y,destroy:w})}}function x2e(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const S2e=["data-markstream-viewport-pending"],C2e=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],M2e={key:1,class:"image-placeholder"},A2e={key:1,class:"image-node__raw-text"},T2e={key:2,class:"image-shimmer-overlay"},E2e={key:1,class:"image-node__raw-text"},I2e={key:3,class:"image-error"},f1=ho(Je({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,l=t,r=V(!1),a=V(!1),c=V(""),u=V("primary"),d=V(null),f=mf(),p=fn(n7,null),h=Av(),m=Cv(),k=Mv(),x=z(()=>Xb(i.node.src)),y=z(()=>Xb(i.fallbackSrc)),w=(s=(o=(n=Ts())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),_=typeof window<"u"&&w?.getAttribute("src")===(x.value||y.value),M=V(typeof window>"u"||_||!k.value),P=Uo(null);let B="",$=null;const T=z(()=>c.value),I=z(()=>!i.lazy),N=z(()=>typeof window<"u"&&k.value&&!_),C=z(()=>!N.value||M.value),O=z(()=>C.value?T.value:""),H=z(()=>{var xe,Ye;return(Ye=(xe=m?.value.heavyBlockMargin)!=null?xe:m?.value.rootMargin)!=null?Ye:j0}),D=z(()=>!i.node.loading&&u.value!=="failed"&&c.value.length>0),A=z(()=>u.value==="failed"),R=z(()=>(!I.value||N.value&&!M.value)&&!r.value&&!a.value&&u.value!=="failed"&&c.value.length>0),j=z(()=>x2e(i,f));function q(xe=j.value){xe&&d.value&&p?.reportHeight(xe,d.value.offsetHeight)}function K(xe=j.value){xe&&yt(()=>{q(xe)})}function U(){$&&(clearTimeout($),$=null)}function te(){const xe=j.value;xe&&B!==xe&&(B&&p?.markSettled(B),U(),B=xe,p?.markPending(xe),typeof window<"u"&&($=window.setTimeout(()=>{B===xe&&(K(xe),J())},8e3)))}function J(){return zo(this,null,function*(){const xe=B;xe&&(U(),B="",yield yt(),q(xe),p?.markSettled(xe))})}function ee(){if(u.value==="primary"&&y.value&&y.value!==c.value)return u.value="fallback",c.value=y.value,r.value=!1,a.value=!1,void K();u.value="failed",a.value=!0,l("error",c.value),K()}function ie(){r.value=!0,a.value=!1,l("load",T.value),K()}function Q(xe){xe.preventDefault(),r.value&&!a.value&&l("click",[xe,T.value])}const{t:he}=k2e();return Ze([x,y,()=>i.node.loading],()=>(r.value=!1,a.value=!1,i.node.loading||x.value?(c.value=x.value,void(u.value="primary")):y.value?(c.value=y.value,void(u.value="fallback")):(c.value="",u.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ze([d,N],([xe,Ye],st,X)=>{var se;if((se=P.value)==null||se.destroy(),P.value=null,!Ye||M.value)return void(M.value=!0);if(!xe)return void(M.value=!1);let F=!0;const Z=h(xe,{rootMargin:H.value,allowIdle:!1});P.value=Z,M.value=Z.isVisible.value,Z.whenVisible.then(()=>{F&&P.value===Z&&(M.value=!0)}),X(()=>{F=!1,Z.destroy(),P.value===Z&&(P.value=null)})},{immediate:!0}),Ze([D,r,a,T,()=>i.lazy,C],([xe,Ye,st,X,se,F])=>xe&&X&&!st&&F?Ye?(J(),void K()):se?(te(),void K()):void(Ye||st||te()):(J(),void K()),{flush:"post",immediate:!0}),vo(()=>{var xe;(xe=P.value)==null||xe.destroy(),P.value=null,(function(){const Ye=B;Ye&&(U(),B="",p?.markSettled(Ye))})()}),(xe,Ye)=>{var st,X,se,F,Z;return g(),S("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":N.value&&!M.value?"true":void 0},[D.value?(g(),S("img",{key:0,src:O.value||void 0,alt:String((X=(st=i.node.alt)!=null?st:i.node.title)!=null?X:""),title:String((F=(se=i.node.title)!=null?se:i.node.alt)!=null?F:""),class:Pe(["image-node__img",{"is-loading":!I.value&&!r.value,"is-loaded":I.value||r.value,"has-natural-size":r.value,"cursor-pointer":r.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:I.value?"high":void 0,decoding:I.value?"sync":"async",tabindex:r.value?0:-1,"aria-label":(Z=i.node.alt)!=null?Z:v(he)("image.preview"),onError:ee,onLoad:ie,onClick:Q},null,42,C2e)):Y("",!0),e.node.loading&&!a.value?(g(),S("span",M2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:T.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[0]||(Ye[0]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",A2e,E(e.node.raw),1))])):Y("",!0),R.value&&!e.node.loading?(g(),S("span",T2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:T.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[1]||(Ye[1]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",E2e,E(e.node.raw),1))])):Y("",!0),A.value?(g(),S("span",I2e,[jn(xe.$slots,"error",{node:i.node,displaySrc:T.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[2]||(Ye[2]=b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[b("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),b("span",null,E(v(he)("image.loadError")),1)],!0)])):Y("",!0)],8,S2e)}}}),[["__scopeId","data-v-046e82ac"]]);f1.install=e=>{e.component(f1.__name,f1)};const $2e={key:2},Rr=Je({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamNestedRendererProps",void 0),i=z(()=>{var h;return(h=o?.value)!=null?h:"safe"}),l=z(()=>{var h,m;const k=(h=s?.value)!=null?h:{};return wn(xt({},k),{customId:(m=t.customId)!=null?m:k.customId,htmlPolicy:i.value})}),r=Rl({loader:()=>Promise.resolve().then(()=>Fv),suspensible:!1}),a=z(()=>t.components[String(t.node.type)]),c=z(()=>!!(a.value&&n.value[t.node.type]&&!Cf(String(t.node.type)))),u=z(()=>c.value?Sv(t.node,i.value):void 0),d=z(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=z(()=>{var h;return String((h=t.node.content)!=null?h:"")}),p=z(()=>{var h,m;return String((m=(h=t.node.content)!=null?h:t.node.raw)!=null?m:"")});return(h,m)=>a.value&&c.value?(g(),ue(cs(a.value),io({key:0},u.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":l.value.isDark}),{default:ae(()=>[d.value?(g(),ue(v(r),io({key:0},l.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(g(),ue(v(r),io({key:1},l.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(g(),ue(cs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(g(),S("span",$2e,E(p.value),1)):Y("",!0)}}),Tx=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function L2e(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return wn(xt(xt({},Tx),n),{enabled:(t=n.enabled)==null||t})}return xt({},Tx)}function Tv(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function nL(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function Ex(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function N2e(e){var t;return e.diff===!0||Ex(e.language)||Ex(nL(String((t=e.raw)!=null?t:"")))}function z2e(e,t,n){const o=(function(s){const i=nL(s);if(!i)return"";const l=i.split(/\s+/).filter(Boolean);if(!l.length)return"";const r=l[0]==="diff"?l.slice(1):l;for(const a of r){const c=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(c&&/[./\\-]/.test(c))return c}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const B2e=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],R2e={key:0,translate:"no",class:"markstream-pre__diff-code"},P2e={class:"markstream-pre__diff-pane-content"},F2e={class:"markstream-pre__diff-number","aria-hidden":"true"},j2e={class:"markstream-pre__diff-content"},O2e={class:"markstream-pre__diff-content-inner"},H2e={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},D2e=["textContent"],V2e=["textContent"],Di=Je({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(ie,Q){const he=String(ie??"");return Q?he:he.replace(/\r\n$|\n$|\r$/,"")}const o=z(()=>{var ie,Q,he;const xe=String((Q=(ie=t.node)==null?void 0:ie.language)!=null?Q:"");return String((he=String(xe).split(/\s+/g)[0])!=null?he:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=z(()=>`language-${o.value}`),i=z(()=>{var ie;return t.loading===!0||((ie=t.node)==null?void 0:ie.loading)===!0}),l=z(()=>{var ie;return n((ie=t.node)==null?void 0:ie.code,i.value)});let r="",a=1;const c=z(()=>(function(ie){let Q=0,he=1;ie.startsWith(r)&&(Q=r.length,he=a,Q>0&&ie[Q-1]==="\r"&&ie[Q]===` -`&&Q++);for(let xe=Q;xel.value.split(/\r\n|\n|\r/));let d=0,f="";const p=z(()=>{const ie=c.value;ie{var ie;return t.showLineNumbers===!0&&((ie=t.node)==null?void 0:ie.diff)===!0}),m=z(()=>h.value&&t.diffInline===!0),k=z(()=>{const ie=Number(t.reservedHeightPx);if(!Number.isFinite(ie)||ie<=0)return;const Q=`${Math.ceil(ie)}px`;return i.value?{maxHeight:Q,overflow:"auto"}:{height:Q,minHeight:Q,maxHeight:Q,overflow:"auto"}}),x=["diff ","index ","--- ","+++ ","@@ "];function y(ie){return String(ie??"").trim().length===0}function w(ie,Q="context",he={}){const xe=y(ie);return{code:ie,kind:xe&&Q!=="hunk"&&Q!=="spacer"&&!he.preserveBlankKind?"context":Q,empty:xe}}function _(ie){const Q=n(ie,i.value);return Q?Q.split(/\r\n|\n|\r/):[]}function M(ie,Q){return!y(ie[Q])||Qx.some(he=>Q.startsWith(he)))}function T(ie,Q){return Q||!ie.startsWith(" ")||ie.startsWith(" ")?ie:` ${ie}`}function I(ie,Q){const he=ie.length,xe=Q.length,Ye=[];let st=0;for(;st=st&&F>=st&&ie[se]===Q[F];)X.unshift({originalIndex:se,modifiedIndex:F}),se--,F--;const Z=se-st+1,fe=F-st+1;if(Z<=0||fe<=0||i.value||(Z+1)*(fe+1)>15e5)return Ye.concat(X);const ve=fe+1,ge=new Uint32Array((Z+1)*(fe+1));for(let Se=Z-1;Se>=0;Se--)for(let me=fe-1;me>=0;me--){const Ae=Se*ve+me;if(ie[st+Se]===Q[st+me])ge[Ae]=ge[(Se+1)*ve+me+1]+1;else{const le=ge[(Se+1)*ve+me],be=ge[Se*ve+me+1];ge[Ae]=le>=be?le:be}}const oe=[];let de=0,ke=0;for(;de=ge[de*ve+ke+1]?de++:ke++;return Ye.concat(oe,X)}function N(ie){var Q;const he=(function(){var F,Z;const fe=t.diffHideUnchangedRegions;if(fe==null||fe===!1)return null;const ve=fe===!0?{}:fe;return ve.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((F=ve.contextLineCount)!=null?F:2)),minimumLineCount:Math.max(1,Math.floor((Z=ve.minimumLineCount)!=null?Z:4))}})();if(!he||ie.length<1||ie.length>2||ie.length===2&&ie[0].lines.length!==ie[1].lines.length)return ie;const xe=ie[0].lines,Ye=(Q=ie[1])==null?void 0:Q.lines,st=F=>xe[F].kind==="context"&&(Ye===void 0||Ye[F].kind==="context"&&xe[F].code===Ye[F].code),X=[];let se=0;for(;se=he.minimumLineCount){const fe=F+(F===0?0:he.contextLineCount),ve=Z-(Z===xe.length?0:he.contextLineCount);ve-fe>=he.minimumLineCount&&X.push({start:fe,end:ve})}se===F&&se++}return X.length?ie.map((F,Z)=>{const fe=[];let ve=0;for(const ge of X)fe.push(...F.lines.slice(ve,ge.start)),fe.push({code:Z===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${F.key}-collapsed-${ge.start}-${ge.end}`,number:""}),ve=ge.end;return fe.push(...F.lines.slice(ve)),wn(xt({},F),{lines:fe})}):ie}const C=z(()=>{var ie,Q,he,xe;if(!h.value)return[];const Ye=(function(Z){const fe=Z.some(ge=>P(ge)),ve=Z.some(ge=>B(ge));return fe&&ve||(function(){var ge,oe,de,ke;if(o.value==="diff")return!0;const Se=(ke=(de=String((oe=(ge=t.node)==null?void 0:ge.raw)!=null?oe:"").split(/\r?\n/,1)[0])==null?void 0:de.trim())!=null?ke:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Se)})()&&(fe||ve)})(u.value),st=(function(){var Z,fe;return((Z=t.node)==null?void 0:Z.originalCode)!=null||((fe=t.node)==null?void 0:fe.updatedCode)!=null})();if(m.value){const Z=st?(function(fe,ve){const ge=_(fe),oe=_(ve),de=I(ge,oe);if(de.length>0){const be=[];let _e=0,Ke=0;for(const Qe of de){for(;_e=Se&&Ae>=Se&&ge[me]===oe[Ae];)le.unshift(wn(xt({},w(oe[Ae])),{key:`inline-suffix-${Ae}`,number:Ae+1})),me--,Ae--;for(let be=Se;be<=me;be++)ke.push(wn(xt({},w(ge[be],"removed",{preserveBlankKind:M(ge,be)})),{key:`inline-removed-source-${be}`,number:be+1}));for(let be=Se;be<=Ae;be++)ke.push(wn(xt({},w(oe[be],"added",{preserveBlankKind:M(oe,be)})),{key:`inline-added-source-${be}`,number:be+1}));return ke.concat(le)})((ie=t.node)==null?void 0:ie.originalCode,(Q=t.node)==null?void 0:Q.updatedCode):(function(fe){const ve=[];let ge=1,oe=1;const de=$(fe);for(const[ke,Se]of fe.entries())if(Se.startsWith("@@")){const me=Se.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);me&&(ge=Number(me[1]),oe=Number(me[2])),ve.push(wn(xt({},w(Se,"hunk")),{key:`inline-hunk-${ke}`,number:""}))}else if(P(Se))ve.push(wn(xt({},w(T(Se.slice(1),de),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${ke}`,number:ge++}));else if(B(Se))ve.push(wn(xt({},w(T(Se.slice(1),de),"added",{preserveBlankKind:!0})),{key:`inline-added-${ke}`,number:oe++}));else{const me=de&&Se.startsWith(" ")?Se.slice(1):Se;ve.push(wn(xt({},w(me)),{key:`inline-context-${ke}`,number:oe})),ge++,oe++}return ve})(u.value);return N([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Z}])}if(!Ye&&st)return(function(Z,fe){const ve=_(Z),ge=_(fe),oe=I(ve,ge),de=[],ke=[];let Se=0,me=0,Ae=0;const le=(be,_e)=>{const Ke=Math.max(be-Se,_e-me);for(let Qe=0;Qewn(xt({},Z),{key:`original-${fe}`,number:fe+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:se.map((Z,fe)=>wn(xt({},Z),{key:`modified-${fe}`,number:fe+1}))}])}),O=z(()=>C.value.some(ie=>ie.lines.some(Q=>Q.kind==="collapsed"))),H=z(()=>{const ie=o.value;return ie?`Code block: ${ie}`:"Code block"}),D=V(null),A=V([]);let R=null,j=!1,q=null;function K(ie){const Q=Number.parseFloat(String(ie??""));return Number.isFinite(Q)&&Q>0?Q:0}function U(ie,Q){var he;if(!ie)return Q;if(ie.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const xe=ie.querySelector(".markstream-pre__diff-content"),Ye=xe?.getBoundingClientRect(),st=(he=Ye?.height)!=null?he:0;return Math.max(Q,Math.ceil(st))}function te(){j||typeof window>"u"||(R!=null&&window.cancelAnimationFrame(R),R=window.requestAnimationFrame(()=>{R=null,j||(function(){var ie,Q;R=null;const he=D.value;if(!he||!h.value||m.value||!he.classList.contains("is-wrap"))return void(A.value.length&&(A.value=[]));const xe=(function(fe){const ve=window.getComputedStyle(fe),ge=K(ve.getPropertyValue("--markstream-pre-diff-line-height"));if(ge>0)return ge;const oe=K(ve.lineHeight);return oe>0?oe:18})(he),Ye=Array.from(he.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),st=Array.from(he.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),X=Math.max(Ye.length,st.length),se=[];for(let fe=0;fe{const ge=Z[ve];return ge&&Math.abs(fe.rowHeight-ge.rowHeight)<=.5&&Math.abs(fe.originalHeight-ge.originalHeight)<=.5&&Math.abs(fe.modifiedHeight-ge.modifiedHeight)<=.5})||(A.value=se)})()}))}function J(ie){q?.disconnect(),q=null,ie&&h.value&&!m.value&&typeof ResizeObserver<"u"&&(q=new ResizeObserver(()=>{te()}),q.observe(ie))}function ee(ie,Q){const he=A.value[ie];if(!he)return;const xe=Q==="original"?he.originalHeight:he.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(he.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(xe)}px`}}return Ze(D,ie=>{J(ie),yt(()=>te())},{flush:"post"}),Ze([h,m,C],()=>{J(D.value),yt(()=>te())},{flush:"post",immediate:!0}),vo(()=>{j=!0,R!=null&&(window.cancelAnimationFrame(R),R=null),q?.disconnect(),q=null}),(ie,Q)=>(g(),S("pre",{ref_key:"preRef",ref:D,style:Gt(k.value),class:Pe([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":h.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":O.value}]),"aria-busy":i.value,"aria-label":H.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[h.value?(g(),S("code",R2e,[(g(!0),S(Ce,null,at(C.value,he=>(g(),S("span",{key:he.key,class:Pe(["markstream-pre__diff-pane",he.className])},[b("span",P2e,[(g(!0),S(Ce,null,at(he.lines,(xe,Ye)=>(g(),S("span",{key:xe.key,class:Pe(["markstream-pre__diff-line",[`markstream-pre__diff-line--${xe.kind}`,{"markstream-pre__diff-line--empty":xe.empty}]]),style:Gt(ee(Ye,he.key))},[Q[0]||(Q[0]=b("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),b("span",F2e,E(xe.number),1),b("span",j2e,[b("span",O2e,E(xe.code),1)])],6))),128))])],2))),128))])):(g(),S(Ce,{key:1},[t.showLineNumbers?(g(),S("span",H2e,[b("span",{class:"markstream-pre__line-numbers-text",textContent:E(p.value)},null,8,D2e)])):Y("",!0),b("code",{translate:"no",class:"markstream-pre__code",textContent:E(l.value)},null,8,V2e)],64))],14,B2e))}});Di.install=e=>{e.component(Di.__name,Di)};const W2e={key:0},is=ho(Je({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=mf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=z(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),r=z(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=z(()=>{var k;const x=(k=n["index-key"])!=null?k:n.indexKey;return x==null||x===""?"":String(x)}),c=V(t.node.content),u=V(""),d=V(0);let f;function p(){f?.(),f=void 0}function h(){p(),u.value&&(c.value=c.value+u.value,u.value="")}Ze([()=>t.node.content,a,r],([k])=>{const x=String(k??""),y=a.value,w=P$({nextContent:x,persistedContent:y?s?.get(y):void 0,currentState:{settledContent:c.value,streamedDelta:u.value},typewriterEnabled:r.value});c.value=w.settledContent,u.value=w.streamedDelta,w.appended?(d.value+=1,(function(){if(!u.value||f||!i)return;const _=i.value;f=Ze(()=>i.value,M=>{M!==_&&h()},{flush:"sync"})})()):u.value||p(),y&&s?.set(y,x)},{immediate:!0}),Bu(p);const m=z(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,x)=>(g(),S("span",{class:Pe([[e.node.center?"text-node-center":""],"text-node"])},[c.value?(g(),S("span",W2e,E(c.value),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Pe(["text-node-stream-delta",[m.value]]),onAnimationend:h},E(u.value),35)):Y("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Yd(e,t,n){return Je({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var l,r;const a=Av(),c=Cv(),u=Mv(),d=typeof window<"u"&&((r=(l=Ts())==null?void 0:l.vnode.el)==null?void 0:r.nodeType)===1,f=V(typeof window>"u"||d||!u.value),p=Uo(null);let h=null;function m(k){const x=k&&"$el"in k?k.$el:k;p.value=x instanceof HTMLElement?x:null}return typeof window<"u"&&Ze([p,u],([k,x],y,w)=>{if(h?.destroy(),h=null,!x||f.value)return void(f.value=!0);if(!k)return;let _=!0;const M=a(k,{rootMargin:c?.value.heavyBlockMargin,allowIdle:!1});h=M,f.value=M.isVisible.value,M.whenVisible.then(()=>{_&&h===M&&(f.value=!0)}),w(()=>{_=!1,M.destroy(),h===M&&(h=null)})},{immediate:!0}),vo(()=>{h?.destroy(),h=null}),()=>vn(f.value?t:n,wn(xt({},s),{ref:m}),i)}})}is.install=e=>{e.component(is.__name,is)};const z5=Je({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,l,r,a,c;const u=Dp(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=ax[u]||(u?u.charAt(0).toUpperCase()+u.slice(1):ax[""]),f=N2e(n.node),p=z2e(String((l=(i=n.node)==null?void 0:i.raw)!=null?l:""),d,f),h=n.monacoOptions,m=f&&((r=n.estimatedDiffInline)!=null?r:Tv(h??{},typeof window>"u"?0:window.innerWidth)),k=h?.diffAppearance,x=k==="dark"||k!=="light"&&n.isDark===!0,y=typeof h?.fontSize=="number"&&Number.isFinite(h.fontSize)&&h.fontSize>0?h.fontSize:12,w=typeof h?.lineHeight=="number"&&Number.isFinite(h.lineHeight)&&h.lineHeight>0?h.lineHeight:y===12?18:Math.max(12,Math.round(1.5*y)),_=typeof h?.tabSize=="number"&&Number.isFinite(h.tabSize)&&h.tabSize>0?h.tabSize:4,M=f?0:8,P=typeof((a=h?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(h.padding.top)&&h.padding.top>=0?h.padding.top:M,B=typeof((c=h?.padding)==null?void 0:c.bottom)=="number"&&Number.isFinite(h.padding.bottom)&&h.padding.bottom>=0?h.padding.bottom:M,$=typeof h?.fontFamily=="string"?h.fontFamily.trim():"",T=xt(xt({fontSize:`${y}px`,lineHeight:`${w}px`,tabSize:_,paddingTop:`${P}px`,paddingBottom:`${B}px`,"--markstream-pre-line-number-top":`${P}px`},f?{"--markstream-pre-diff-line-height":`${w}px`}:{}),$?{"--markstream-code-font-family":$}:{}),I=()=>vn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[vn("svg",{class:"action-icon"})]),N=n.isShowPreview!==!1&&(u==="html"||u==="svg"),C=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||N&&n.showPreviewButton!==!1,O=D=>{if(D!=null)return typeof D=="number"?`${D}px`:String(D)},H=xt(xt(xt({"--markstream-code-layout-character-width":"1ch"},O(n.minWidth)?{minWidth:O(n.minWidth)}:{}),O(n.maxWidth)?{maxWidth:O(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return vn("div",wn(xt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":x,"is-diff":f,"is-plain-text":u===""||u==="plaintext"||u==="text"},t.class],style:[H,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:vn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[vn("div",{class:"code-header-main"},[vn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),vn("div",{class:"code-header-copy"},[vn("div",{class:"code-header-title"},p.title),p.caption?vn("div",{class:"code-header-caption"},p.caption):null])]),vn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?vn("div",{class:"code-diff-stats","aria-hidden":"true"},[vn("span",{class:"code-diff-stat removed"},"-0"),vn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:I(),n.showCollapseButton===!1?null:I(),C?vn("div",{class:"relative"},[I()]):null])]),vn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[vn(Di,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?L2e(h?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:T,"data-markstream-code-loading":"1"})]),vn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[vn("div",{class:"loading-skeleton"},[vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line short"})])]),vn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),im=Yd("ViewportDeferredCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./CodeBlockNode-DhHNvLD-.js"),__vite__mapDeps([6,7]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),Di}}),loadingComponent:z5,delay:0,suspensible:!1}),z5),fr=Rl(()=>zo(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return vn(is,wn(xt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield D$(),(yield Cs(()=>import("./index7-DpSd4JVP.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return vn(is,wn(xt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),oL=Rl(()=>zo(null,null,function*(){try{return yield D$(),(yield Cs(()=>import("./index6-8mtDOSly.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return vn(is,wn(xt({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),Ti=ho(Je({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(g(),S("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},E(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);Ti.install=e=>{e.component(Ti.__name,Ti)};const q2e={class:"superscript-node"},Ki=ho(Je({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>xt({text:is,inline_code:hi,link:$i,html_inline:al,strong:Ei,emphasis:Li,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sup",q2e,[(g(!0),S(Ce,null,at(e.node.children,(l,r)=>(g(),ue(v(Rr),{key:`${e.indexKey||"superscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Ki.install=e=>{e.component(Ki.__name,Ki)};const U2e={class:"subscript-node"},Gi=ho(Je({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>xt({text:is,inline_code:hi,link:$i,html_inline:al,strong:Ei,emphasis:Li,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,superscript:Ki,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sub",U2e,[(g(!0),S(Ce,null,at(e.node.children,(l,r)=>(g(),ue(v(Rr),{key:`${e.indexKey||"subscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Gi.install=e=>{e.component(Gi.__name,Gi)};const Z2e={class:"strong-node"},Ei=ho(Je({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>xt({text:is,inline_code:hi,link:$i,html_inline:al,emphasis:Li,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("strong",Z2e,[(g(!0),S(Ce,null,at(e.node.children,(l,r)=>(g(),ue(v(Rr),{key:`${e.indexKey||"strong"}-${r}`,components:o.value,node:l,"index-key":`${e.indexKey||"strong"}-${r}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);Ei.install=e=>{e.component(Ei.__name,Ei)};const K2e={class:"strikethrough-node"},Ii=ho(Je({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>xt({text:is,inline_code:hi,link:$i,html_inline:al,strong:Ei,emphasis:Li,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("del",K2e,[(g(!0),S(Ce,null,at(e.node.children,(l,r)=>(g(),ue(v(Rr),{key:`${e.indexKey||"strikethrough"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);Ii.install=e=>{e.component(Ii.__name,Ii)};const G2e=["href","title","aria-label","aria-hidden","target","rel"],Y2e=["aria-hidden"],X2e={class:"link-text-wrapper relative inline-flex"},J2e={class:"leading-[normal] link-text"},$i=ho(Je({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=fn("markstreamShowTooltips",void 0),o=z(()=>{const x=n?.value;return typeof x=="boolean"?x:t.showTooltip}),s=z(()=>{var x,y,w,_,M;const P=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",B=(x=t.animationOpacity)!=null?x:.35,$=Math.max(.12,Math.min(.5*B,B)),T={"--underline-height":`${(y=t.underlineHeight)!=null?y:2}px`,"--underline-bottom":P,"--underline-opacity":String(B),"--underline-rest-opacity":String($),"--underline-duration":`${(w=t.animationDuration)!=null?w:1.6}s`,"--underline-timing":(_=t.animationTiming)!=null?_:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(M=t.animationIteration)!=null?M:"infinite"};return t.color&&(T["--link-color"]=t.color),T}),i=Is(()=>t.customId),l=z(()=>xt({text:is,strong:Ei,strikethrough:Ii,emphasis:Li,image:f1,html_inline:al,inline_code:hi},i.value)),r=mf(),a=z(()=>{var x,y;const w=(x=t.node)==null?void 0:x.attrs;if(!w||typeof w!="object")return{};const _={};if(Array.isArray(w))for(const M of w)Array.isArray(M)&&M[0]&&(_[String(M[0])]=String((y=M[1])!=null?y:""));else for(const[M,P]of Object.entries(w))M&&P!=null&&P!==!1&&(_[M]=P===!0?"":String(P));return bx(_,"safe","a")}),c=z(()=>xt(xt({},r),a.value)),u=z(()=>{var x,y;return bx({href:String((y=(x=t.node)==null?void 0:x.href)!=null?y:"")},"safe","a").href}),d=z(()=>{if(!u.value)return;const x=c.value.target;return(typeof x=="string"?x.trim():String(x??"").trim())||(Zre(u.value)?"_blank":void 0)}),f=z(()=>{var x;return String((x=d.value)!=null?x:"").trim().toLowerCase()==="_blank"}),p=z(()=>{if(!u.value)return;const x=c.value.rel,y=new Set((typeof x=="string"?x:String(x??"")).split(/\s+/).filter(Boolean)),w=new Set(Array.from(y).filter(_=>_.toLowerCase()!=="opener"));return f.value&&(w.add("noopener"),w.add("noreferrer")),w.size>0?Array.from(w).join(" "):void 0}),h=z(()=>{const x=xt({},c.value);return delete x.title,delete x.href,delete x.target,delete x.rel,x});function m(){o.value&&v2e()}const k=z(()=>{var x,y;const w=(x=t.node)==null?void 0:x.title;return typeof w=="string"&&w.trim().length>0?w:String((y=u.value)!=null?y:"")});return(x,y)=>{var w,_;return e.node.loading?(g(),S("span",io({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},v(r),{style:s.value}),[b("span",X2e,[b("span",J2e,[W(v(is),{class:"leading-[normal] link-text",node:{type:"text",content:String((w=e.node.text)!=null?w:""),raw:String((_=e.node.text)!=null?_:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),y[1]||(y[1]=b("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,Y2e)):(g(),S("a",io({key:0,class:"link-node",href:u.value,title:o.value?"":k.value,"aria-label":`Link: ${k.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},h.value,{style:s.value,onMouseenter:y[0]||(y[0]=M=>(function(P){var B,$,T,I;if(!o.value)return;const N=P,C=N?.clientX!=null&&N?.clientY!=null?{x:N.clientX,y:N.clientY}:void 0,O=((B=t.node)==null?void 0:B.title)||(($=u.value)!=null&&$.includes("xn--")&&((I=(T=t.node)==null?void 0:T.text)!=null&&I.includes("://"))?t.node.text:u.value)||"";g2e(P.currentTarget,O,"top",!1,C)})(M)),onMouseleave:m}),[(g(!0),S(Ce,null,at(e.node.children,(M,P)=>(g(),ue(v(Rr),{key:`${e.indexKey||"emphasis"}-${P}`,components:l.value,node:M,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${P}`},null,8,["components","node","custom-id","index-key"]))),128))],16,G2e))}}}),[["__scopeId","data-v-367e6ca4"]]);$i.install=e=>{e.component($i.__name,$i)};const Q2e={class:"insert-node"},Yi=ho(Je({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>xt({text:is,inline_code:hi,link:$i,html_inline:al,strong:Ei,emphasis:Li,strikethrough:Ii,highlight:cl,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("ins",Q2e,[(g(!0),S(Ce,null,at(e.node.children,(l,r)=>(g(),ue(v(Rr),{key:`${e.indexKey||"insert"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Yi.install=e=>{e.component(Yi.__name,Yi)};const efe={class:"highlight-node"},cl=ho(Je({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>xt({text:is,inline_code:hi,link:$i,html_inline:al,strong:Ei,emphasis:Li,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("mark",efe,[(g(!0),S(Ce,null,at(e.node.children,(l,r)=>(g(),ue(v(Rr),{key:`${e.indexKey||"highlight"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);cl.install=e=>{e.component(cl.__name,cl)};const tfe={class:"emphasis-node"},Li=ho(Je({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>xt({text:is,inline_code:hi,link:$i,html_inline:al,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("em",tfe,[(g(!0),S(Ce,null,at(e.node.children,(l,r)=>(g(),ue(v(Rr),{key:`${e.indexKey||"emphasis"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);Li.install=e=>{e.component(Li.__name,Li)};const nfe={class:"hard-break"},p1=ho(Je({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("br",nfe))}),[["__scopeId","data-v-50c58f70"]]);p1.install=e=>{e.component(p1.__name,p1)};const nf=Je({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=$t({checkbox:ll,checkbox_input:ll,emoji:Zi,emphasis:Li,hardbreak:p1,highlight:cl,inline_code:hi,insert:Yi,link:$i,reference:Ti,strikethrough:Ii,strong:Ei,subscript:Gi,superscript:Ki,text:is}),o=Is(()=>t.customId),s=z(()=>{const i=o.value;return Object.keys(i).length>0?xt(xt({},n),i):n});return(i,l)=>(g(!0),S(Ce,null,at(e.nodes,(r,a)=>(g(),ue(v(Rr),{key:a,components:s.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function f7(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(f7)}function B5(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(f7))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(f7)?s:null}function O0(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const ofe=["cite"],sfe={key:0,dir:"auto",class:"paragraph-node"},ife=["custom-id"],_4=ho(Je({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=Is(()=>t.customId),o=z(()=>!!n.value.paragraph),s=z(()=>!!n.value.text),i=z(()=>B5(t.node.children,!o.value)),l=z(()=>t.fade!==!1||s.value?null:O0(i.value));return qn("markstreamShowTooltips",z(()=>t.showTooltips)),qn("markstreamFade",z(()=>t.fade)),(r,a)=>(g(),S("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(g(),S("p",sfe,[l.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(l.value),9,ife)):(g(),ue(v(nf),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(g(),ue(v(Xi),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=c=>r.$emit("copy",c))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,ofe))}}),[["__scopeId","data-v-abfecebc"]]);_4.install=e=>{e.component(_4.__name,_4)};const lfe={class:"definition-list"},rfe={class:"definition-term"},afe={class:"definition-desc"},x4=ho(Je({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("dl",lfe,[(g(!0),S(Ce,null,at(t.node.items,(s,i)=>(g(),S(Ce,{key:i},[b("dt",rfe,[W(v(Xi),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),b("dd",afe,[W(v(Xi),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);x4.install=e=>{e.component(x4.__name,x4)};const cfe=["href","title"],b2=ho(Je({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,l=document.getElementById(i);l&&l.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(g(),S("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,cfe))}}),[["__scopeId","data-v-e1eb37b6"]]);b2.install=e=>{e.component(b2.__name,b2)};const ufe=["id"],dfe={class:"flex-1"},S4=Je({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[b("div",dfe,[W(v(Xi),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,ufe))}});S4.install=e=>{e.component(S4.__name,S4)};const ffe=["custom-id"],p7=ho(Je({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamFade",void 0),s=z(()=>o?.value!==!1||n.value.text?null:O0(t.node.children)),i=z(()=>xt({text:is,inline_code:hi,link:$i,image:f1,strong:Ei,emphasis:Li,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,footnote_reference:rl,hardbreak:p1,math_inline:fr,reference:Ti},n.value));return(l,r)=>(g(),ue(cs(`h${e.node.level}`),io({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ae(()=>[s.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(s.value),9,ffe)):(g(!0),S(Ce,{key:1},at(e.node.children,(a,c)=>(g(),ue(v(Rr),{key:c,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${c}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),qp=p7;qp.install=e=>{e.component(p7.__name,p7)};const pfe={key:0,dir:"auto",class:"paragraph-node"},hfe=["custom-id"],mfe={dir:"auto",class:"paragraph-node"},gfe=["custom-id"],pu=ho(Je({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=z(()=>{var p;return(p=t.node)!=null?p:t.item}),o=Is(()=>t.customId),s=z(()=>!!o.value.paragraph),i=z(()=>!!o.value.text),l=z(()=>{var p;return B5((p=n.value)==null?void 0:p.children,!s.value)}),r=z(()=>{var p;if(s.value)return null;const h=(p=n.value)==null?void 0:p.children;if(!Array.isArray(h)||h.length<2)return null;const m=h[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const k=h.slice(1);if(!k.every(y=>y?.type==="list"))return null;const x=B5([m]);return x?{paragraphChildren:x,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const c=z(()=>a()?O0(l.value):null),u=z(()=>{var p;return a()?O0((p=r.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=z(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return qn("markstreamShowTooltips",z(()=>t.showTooltips)),qn("markstreamFade",z(()=>t.fade)),(p,h)=>{var m,k;return g(),S("li",io({class:"list-item",dir:"auto"},f.value),[l.value?(g(),S("p",pfe,[c.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(c.value),9,hfe)):(g(),ue(v(nf),{key:1,nodes:l.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):r.value?(g(),S(Ce,{key:1},[b("p",mfe,[u.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(u.value),9,gfe)):(g(),ue(v(nf),{key:1,nodes:r.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(g(!0),S(Ce,null,at(r.value.nestedLists,(x,y)=>(g(),ue(v(Xi),{key:y,nodes:[x],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${y}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:h[0]||(h[0]=w=>p.$emit("copy",w))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(g(),ue(v(Xi),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(m=n.value)==null?void 0:m.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:h[1]||(h[1]=x=>p.$emit("copy",x))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);pu.install=e=>{e.component(pu.__name,pu)};const hu=ho(Je({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=Is(()=>e.customId),n=z(()=>t.value.list_item||pu);return(o,s)=>(g(),ue(cs(e.node.ordered?"ol":"ul"),{class:Pe(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ae(()=>[(g(!0),S(Ce,null,at(e.node.items,(i,l)=>{var r;return g(),ue(cs(n.value),io({key:`${e.indexKey||"list"}-${l}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${l}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((r=e.node.start)!=null?r:1)+l:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);hu.install=e=>{e.component(hu.__name,hu)};const vfe={key:2,class:"html-block-node__raw"},yfe=["innerHTML"],wfe={key:1,class:"html-block-node__placeholder"},_2=ho(Je({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=fn("markstreamNestedRendererProps",void 0),s=z(()=>{var C,O;return(O=(C=t.htmlPolicy)!=null?C:n?.value)!=null?O:"safe"}),i=z(()=>{var C,O;const H=(C=o?.value)!=null?C:{};return wn(xt({},H),{customId:(O=t.customId)!=null?O:H.customId,htmlPolicy:s.value})}),l=Rl({loader:()=>Promise.resolve().then(()=>Fv),suspensible:!1}),r=z(()=>{const C=y4(t.node.attrs,s.value);if(!C)return;const O=v2(C);return Object.keys(O).length>0?O:void 0}),a=z(()=>{const C=String(t.node.tag||"").trim(),O=y4(t.node.attrs,s.value,C);if(!O)return;const H=v2(O);return Object.keys(H).length>0?H:void 0}),c=Is(()=>t.customId),u=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>"u"),p=V(t.node.content),h=z(()=>Array.isArray(t.node.children)?t.node.children:[]),m=z(()=>String(t.node.tag||"div")),k=z(()=>{var C;if(m.value.trim().toLowerCase()!=="details"||(C=t.node.attrs)!=null&&C.some(([H])=>String(H).toLowerCase()==="open"))return null;const O=h.value[0];return O?.type==="html_block"&&String(O.tag||"").toLowerCase()==="summary"?O:null}),x=z(()=>{var C;return O0((C=k.value)==null?void 0:C.children)}),y=z(()=>{const C=k.value;if(!C)return;const O=y4(C.attrs,s.value,"summary");if(!O)return;const H=v2(O);return Object.keys(H).length>0?H:void 0}),w=z(()=>x.value==null?h.value:h.value.slice(1)),_=z(()=>{const C=m.value.trim().toLowerCase();return CI.has(C)||wv(C,s.value)}),M=z(()=>h.value.length>0&&!!t.node.tag&&!_.value),P=z(()=>{var C,O,H;if(M.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(C=p.value)!=null?C:""};const D=(O=p.value)!=null?O:t.node.content;if(!D)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:fu(D,s.value)};if(t.node.loading){const R=N5(D,c.value,s.value);return R===null?{mode:"text",content:(H=t.node.raw)!=null?H:D}:{mode:"dynamic",nodes:R}}if(!Y$(D,c.value))return{mode:"html",content:fu(D,s.value)};const A=N5(D,c.value,s.value);return A===null?{mode:"html",content:fu(D,s.value)}:{mode:"dynamic",nodes:A}}),B=Av(),$=Cv(),T=Mv(),I=Uo(null),N=!!t.node.loading;return typeof window<"u"?(Ze([()=>d.value,()=>$?.value.heavyBlockMargin,()=>$?.value.rootMargin],([C],O,H)=>{var D,A,R,j;if((A=(D=I.value)==null?void 0:D.destroy)==null||A.call(D),I.value=null,!N)return f.value=!0,void(p.value=t.node.content);if(!C)return void(f.value=!1);let q=!0;const K=(j=(R=$?.value.heavyBlockMargin)!=null?R:$?.value.rootMargin)!=null?j:j0,U=B(C,{rootMargin:K,allowIdle:!T.value});I.value=U,f.value=f.value||U.isVisible.value,U.whenVisible.then(()=>{q&&I.value===U&&(f.value=!0)}),H(()=>{q=!1,U.destroy(),I.value===U&&(I.value=null)})},{immediate:!0}),Ze(()=>t.node.content,C=>{N&&!f.value||(p.value=C)})):f.value=!0,vo(()=>{var C,O;(O=(C=I.value)==null?void 0:C.destroy)==null||O.call(C),I.value=null}),(C,O)=>(g(),ue(cs(M.value?m.value:"div"),io({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":v(T)&&!f.value?"true":void 0},M.value?a.value:void 0),{default:ae(()=>[f.value?(g(),S(Ce,{key:0},[P.value.mode==="structured"?(g(),S(Ce,{key:0},[x.value!==null?(g(),S(Ce,{key:0},[b("summary",aR(PA(y.value)),E(x.value),17),w.value.length?(g(),ue(v(l),io({key:0},i.value,{nodes:w.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):Y("",!0)],64)):(g(),ue(v(l),io({key:1},i.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):P.value.mode==="dynamic"?(g(),ue(v(u),{key:1,nodes:P.value.nodes},null,8,["nodes"])):P.value.mode==="text"?(g(),S("pre",vfe,E(P.value.content),1)):(g(),S("div",io({key:3},r.value,{innerHTML:P.value.content}),null,16,yfe))],64)):(g(),S("div",wfe,[jn(C.$slots,"placeholder",{node:e.node},()=>[O[0]||(O[0]=b("span",{class:"html-block-node__placeholder-bar"},null,-1)),O[1]||(O[1]=b("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),O[2]||(O[2]=b("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);_2.install=e=>{e.component(_2.__name,_2)};const kfe={dir:"auto",class:"paragraph-node"},bfe=["custom-id"],B0=ho(Je({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamFade",void 0),i=fn("markstreamParseOptions",void 0),l=fn("markstreamCustomMarkdownIt",void 0),r=fn("markstreamNestedRendererProps",void 0),a=z(()=>{var $;return($=o?.value)!=null?$:"safe"}),c=z(()=>{var $;return($=t.parseOptions)!=null?$:i?.value}),u=z(()=>{var $;return($=t.customMarkdownIt)!=null?$:l?.value}),d=z(()=>{var $,T;return(T=t.customHtmlTags)!=null?T:($=r?.value)==null?void 0:$.customHtmlTags}),f=z(()=>{var $,T;const I=($=r?.value)!=null?$:{};return wn(xt({},I),{customId:(T=t.customId)!=null?T:I.customId,customHtmlTags:d.value,parseOptions:c.value,customMarkdownIt:u.value,htmlPolicy:a.value})}),p=Rl({loader:()=>Promise.resolve().then(()=>Fv),suspensible:!1});function h($){var T;return $.type==="text"&&String((T=$.content)!=null?T:"").trim()===""}const m=z(()=>t.node.children.filter($=>!h($))),k=z(()=>m.value.length>0&&m.value.every($=>$.type==="image"||(function(T){var I;const N=(function(C){return C.type==="link"&&Array.isArray(C.children)?C.children.filter(O=>!h(O)):[]})(T);return N.length===1&&((I=N[0])==null?void 0:I.type)==="image"})($))),x=z(()=>new Set(G0(d.value))),y=z(()=>{if(!k.value||m.value.length<=1)return t.node.children;const $=[];for(let T=0;T0,C=t.node.children.slice(T+1).some(O=>!h(O));N&&C&&$.push(wn(xt({},I),{content:" ",raw:" "}))}return $}),w=z(()=>s?.value===!1&&!n.value.text),_=z(()=>w.value?O0(y.value):null);function M($,T){return{node:$,"index-key":`${t.indexKey}-${T}`,"custom-id":t.customId,"custom-html-tags":d.value}}const P=z(()=>xt({inline_code:hi,image:f1,link:$i,hardbreak:p1,emphasis:Li,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,html_inline:al,html_block:_2,emoji:Zi,checkbox:ll,math_inline:fr,checkbox_input:ll,reference:Ti,footnote_anchor:b2,footnote_reference:rl,text:is},n.value)),B=z(()=>y.value.map(($,T)=>{var I;const N=(function(C){var O,H,D,A;if(C.type==="html_block"||C.type==="html_inline"){const R=String((O=C.tag)!=null?O:"").trim().toLowerCase()||II(C.content);if(R&&!x.value.has(R)&&$I((H=C.content)!=null?H:C.raw,R)){const j=String((A=(D=C.content)!=null?D:C.raw)!=null?A:"");return{child:{type:"text",content:j,raw:j},component:is,isCustomComponent:!1}}}return{child:C,component:P.value[C.type],isCustomComponent:!!(n.value[C.type]&&!Cf(String(C.type)))}})($);return wn(xt({},N),{index:T,key:`${t.indexKey||"paragraph"}-${T}`,customAttrs:N.isCustomComponent?Sv(N.child,a.value):void 0,hasSlotChildren:Array.isArray(N.child.children)&&N.child.children.length>0,slotContent:String((I=N.child.content)!=null?I:""),originalChild:$})}));return($,T)=>(g(),S("p",kfe,[_.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(_.value),9,bfe)):(g(!0),S(Ce,{key:1},at(B.value,I=>{return g(),S(Ce,{key:I.key},[k.value&&h(I.originalChild)?(g(),S(Ce,{key:0},[Oe(E((N=I.originalChild,String((C=N.content)!=null?C:""))),1)],64)):I.isCustomComponent?(g(),ue(cs(I.component),io({key:1,ref_for:!0},I.customAttrs,{node:I.child,loading:I.child.loading,"index-key":I.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ae(()=>[I.hasSlotChildren?(g(),ue(v(p),io({key:0,ref_for:!0},f.value,{nodes:I.child.children,"index-key":I.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):I.slotContent?(g(),ue(v(p),io({key:1,ref_for:!0},f.value,{content:I.slotContent,final:!I.child.loading,"index-key":`${I.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(g(),ue(cs(I.component),io({key:2,ref_for:!0},M(I.child,I.index)),null,16))],64);var N,C}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);B0.install=e=>{e.component(B0.__name,B0)};const _fe={class:"table-node-wrapper"},xfe=["aria-busy"],Sfe={key:0},Cfe=["custom-id"],Mfe=["aria-label","onPointerdown"],Afe=["custom-id"],Tfe={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},x2=ho(Je({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=z(()=>{var x;return(x=t.node.loading)!=null&&x}),o=z(()=>{var x;return(x=t.node.rows)!=null?x:[]}),s=V(null),i=V([]);let l=null;const r=z(()=>t.node.header.cells.length),a=z(()=>i.value.some(x=>Number.isFinite(x)&&x>0)),c=z(()=>a.value?i.value.map(x=>x>0?{width:`${x}px`}:void 0):[]);qn("markstreamShowTooltips",z(()=>t.showTooltips)),qn("markstreamFade",z(()=>t.fade));const u=Is(()=>t.customId),d=z(()=>!!u.value.text),f=z(()=>!!u.value.paragraph),p=new WeakMap;function h(x){const y=t.fade===!1&&!d.value,w=!f.value,_=p.get(x);if(_?.children===x.children&&_.textFastPath===y&&_.paragraphFastPath===w)return _.info;const M=B5(x.children,w,!0),P={simpleChildren:M,plainText:M&&y?O0(M):null};return p.set(x,{children:x.children,textFastPath:y,paragraphFastPath:w,info:P}),P}function m(x){if(!l)return;x.preventDefault();const y=l.startWidth+l.nextStartWidth,w=Math.min(48,Math.floor(y/2)),_=Math.max(w,Math.min(y-w,Math.round(l.startWidth+x.clientX-l.startX))),M=[...l.widths];M[l.index]=_,M[l.index+1]=y-_,i.value=M}function k(){l&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),l=null)}return Ze(r,()=>{k(),i.value=[]}),vo(k),(x,y)=>(g(),S("div",_fe,[b("table",{ref_key:"tableRef",ref:s,class:Pe(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(g(),S("colgroup",Sfe,[(g(!0),S(Ce,null,at(e.node.header.cells,(w,_)=>(g(),S("col",{key:_,style:Gt(c.value[_])},null,4))),128))])):Y("",!0),b("thead",null,[b("tr",null,[(g(!0),S(Ce,null,at(e.node.header.cells,(w,_)=>(g(),S("th",{key:_,dir:"auto",class:Pe([w.align==="right"?"text-right":w.align==="center"?"text-center":"text-left"])},[h(w).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(h(w).plainText),9,Cfe)):h(w).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(w).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${_}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:w.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[0]||(y[0]=M=>x.$emit("copy",M))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),_(function(P,B){if(B.button!==0)return;const $=(function(){var N;const C=(N=s.value)==null?void 0:N.querySelectorAll("thead th");return Array.from(C??[],O=>Math.round(O.getBoundingClientRect().width))})(),T=$[P],I=$[P+1];T&&I&&(B.preventDefault(),l={index:P,startX:B.clientX,startWidth:T,nextStartWidth:I,widths:$},i.value=$,window.addEventListener("pointermove",m),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(_,M)},null,40,Mfe)):Y("",!0)],2))),128))])]),b("tbody",null,[(g(!0),S(Ce,null,at(o.value,(w,_)=>(g(),S("tr",{key:_},[(g(!0),S(Ce,null,at(w.cells,(M,P)=>(g(),S("td",{key:P,class:Pe([M.align==="right"?"text-right":M.align==="center"?"text-center":"text-left"]),dir:"auto"},[h(M).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(h(M).plainText),9,Afe)):h(M).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(M).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${_}-${P}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:M.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[1]||(y[1]=B=>x.$emit("copy",B))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,xfe),W(qi,{name:"table-node-fade"},{default:ae(()=>[n.value?(g(),S("div",Tfe,[jn(x.$slots,"loading",{isLoading:n.value},()=>[y[2]||(y[2]=b("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),y[3]||(y[3]=b("span",{class:"sr-only"},"Loading",-1))],!0)])):Y("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);x2.install=e=>{e.component(x2.__name,x2)};const Efe={class:"hr-node"},C4=ho({},[["render",function(e,t){return g(),S("hr",Efe)}],["__scopeId","data-v-39b2349c"]]);C4.install=e=>{e.component(C4.__name,C4)};const Ife={class:"unknown-node"},h7=Je({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(g(),S("div",Ife,E(e.node.raw),1))}),M4=ho(Je({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=z(()=>`vmr-container vmr-container-${t.node.name}`),o=Is(()=>t.customId),s=z(()=>xt({text:is,paragraph:B0,heading:qp,inline_code:hi,link:$i,image:f1,strong:Ei,emphasis:Li,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,checkbox:ll,checkbox_input:ll,hardbreak:p1,math_inline:fr,reference:Ti,list:hu,math_block:oL,table:x2},o.value));return(i,l)=>(g(),S("div",io({class:n.value},e.node.attrs),[(g(!0),S(Ce,null,at(e.node.children,(r,a)=>{return g(),ue(cs((c=r.type,s.value[c]||h7)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:r,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var c}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);M4.install=e=>{e.component(M4.__name,M4)};const $fe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Ix=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Lfe(e){if(e<=255)return $fe[e];let t=0,n=Ix.length-1;for(;t<=n;){const o=t+n>>1,s=Ix[o];if(es[1]))return s[2];t=o+1}}return"L"}const Nfe=/[ \t\n\r\f]+/g,zfe=/[\t\n\r\f]| {2,}|^ | $/;let lm=null;const Bfe=new RegExp("\\p{Script=Arabic}","u"),S1=new RegExp("\\p{M}","u"),Ev=new RegExp("\\p{Nd}","u");function $x(e){return Bfe.test(e)}function Lx(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Ir(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(Lx(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(Lx(n))return!0}}return!1}const Rfe=new Set([" "," ","⁠","\uFEFF"]),Pfe=new Set(["-","‐","–","—"]);function sL(e,t){return!((function(n){const o=S2(n);return o!==null&&Rfe.has(o)})(e)||t&&((function(n){const o=S2(n);return o!==null&&(Iv.has(o)||H0.has(o))})(e)||(function(n){const o=S2(n);return o!==null&&Pfe.has(o)})(e)))}const Iv=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Up=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),$v=new Set(["'","’"]),H0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Ffe=new Set([":",".","،","؛"]),jfe=new Set(["၏"]),Ofe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Hfe(e){if(Lv(e))return!0;let t=!1;for(const n of e)if(H0.has(n)||P5(n))t=!0;else if(!t||!S1.test(n))return!1;return t}function Dfe(e){for(const t of e)if(!Iv.has(t)&&!H0.has(t))return!1;return e.length>0}function Vfe(e){if(Lv(e))return!0;for(const t of e)if(!(Up.has(t)||$v.has(t)||S1.test(t)||P5(t)))return!1;return e.length>0}function Lv(e){let t=!1;for(const n of e)if(n!=="\\"&&!S1.test(n)){if(!(Up.has(n)||H0.has(n)||$v.has(n)))return!1;t=!0}return t}function R5(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function S2(e){if(e.length===0)return null;const t=R5(e,e.length);return e.slice(t)}const Wfe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function P5(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,Wfe)}function qfe(e){const t=(function(n){for(const o of n)if(!S1.test(o))return o;return null})(e);return t!==null&&Ev.test(t)}function Ufe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(S1.test(o))n--;else{if(!Up.has(o)&&!$v.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Zfe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function Nx(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function zx(e,t){return e&&t!==null&&Ffe.has(t)}function Kfe(e){const t=S2(e);return t!==null&&jfe.has(t)}function Gfe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function m7(e){let t=e.length;for(;t>0;){const n=R5(e,t),o=e.slice(n,t);if(Ofe.has(o))return!0;if(!H0.has(o))return!1;t=n}return!1}function Yfe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const Xfe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function nr(e){return e.length===1?e[0]:e.join("")}function Jfe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),nr(n)}function Qfe(e,t,n,o){if(!Xfe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=Yfe(u,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length):(l.push(u),c+=u.length)}return i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),s}function rm(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const e3e=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function t3e(e,t){const n=e.texts[t];return!!n.startsWith("www.")||e3e.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!l3e.has(e)&&!i3e.test(e)&&s3e.test(e)}function Bx(e){let t=!1;for(const n of e)if(!S1.test(n)){if(!iL(n))return!1;t=!0}return t}function r3e(e,t,n,o){const s=!t&&Bx(e),i=!o&&Bx(n),l=(function(a){const c=(function(u){for(let d=u.length;d>0;){const f=R5(u,d),p=u.slice(f,d);if(!S1.test(p))return p;d=f}return null})(a);return c!==null&&P5(c)})(e),r=(t||l)&&(function(a){for(let c=a.length;c>0;){const u=R5(a,c),d=a.slice(u,c);if(!S1.test(d))return iL(d)||P5(d);c=u}return!1})(e);return!!(s||i||r)&&!Ir(e)&&!Ir(n)&&(t||s||l)&&(o||i)}function Rx(e){for(const t of e)if(Ev.test(t))return!0;return!1}function A4(e){if(e.length===0)return!1;for(const t of e)if(!Ev.test(t)&&!o3e.has(t))return!1;return!0}function a3e(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s`};const c=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,d=h=>{if(!h.startsWith("["))return!1;const m=u.exec(h);if(!m)return h!=="["&&!/^\[\d+$/.test(h);const k=String(m[1]??"");return h.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(h,m)=>{const k=h;if(k.src[k.pos]!=="[")return!1;const x=c.exec(k.src.slice(k.pos));if(!x)return!1;const y=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(y))return!1;const w=k.src.slice(k.pos+x[0].length);if(w.startsWith("](")||w.startsWith("(")||d(w))return!1;if(!m){const _=x[1],A=k.push("reference","span",0);A.content=_,A.markup=x[0],A.raw=x[0]}return k.pos+=x[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(h,m)=>{const x=String(h[m].content??"");return`${x}`};const p=n.use.bind(n);return n.use=((...h)=>(o.__markstreamHasCustomParserExtensions=!0,p(...h))),n}function zde({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function OL({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:zde({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Bde={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function Rde(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function HL(e){const t=Rde(e);return Bde[t]??t}function Pde(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>HL(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Fde(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function jde(e){return Fde(e)?.join("\0")??""}function Ode(e,t){return`${jde(e)}\0\0${Pde(t)?.join("\0")??""}`}function Sc(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function ix(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var Hde=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const h=lx();this.startedAt=f&&this.hasStarted?h-this.normalizedStartDelayMs:h,this.lastTick=h,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=lx();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,k=qde(h/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const x=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),y=Wde(this.source.slice(this.visible.length),x,this.segmenter);y.text&&(this.visible+=y.text,this.charBudget=Math.max(0,this.charBudget-y.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:l=600,maxCommitFps:r=30,startDelayMs:a=80,maxCharsPerCommit:c=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=Sc(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Sc(o,1e3,1)),this.normalizedTargetLatencyMs=Sc(s,900,1),this.normalizedCatchUpLatencyMs=Sc(i,350,1),this.normalizedCatchUpThreshold=ix(l,600),this.normalizedStartDelayMs=ix(a,80),this.maxCommitFps=Math.trunc(Sc(r,30,1)),this.maxCharsPerCommit=Math.trunc(Sc(c,80,1)),this.flushOnFinish=u,this.segmenter=Vde(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Dde(e={},t){const n=new Hde(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Vde(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function Wde(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function lx(){return typeof performance<"u"?performance.now():Date.now()}function qde(e,t,n){return Math.min(n,Math.max(t,e))}var Ude=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const s7=Symbol.for("markstream-vue:node-lifecycle");function bKe(){}const xv=new Map;let DL="material";const Zc=new Map,rx=new Map;let i7=null;function Zde(e){xv.set(e.id,e)}function Kde(e){const t=xv.get(DL);if(!t)return;const n=t.core[e];if(n)return n;const o=Zc.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Zc.has(t.id)&&Yde(t)}function Gde(){var e,t;return(t=(e=xv.get(DL))==null?void 0:e.fallback)!=null?t:""}function Yde(e){return Ude(this,null,function*(){var t,n,o;if(Zc.has(e.id))return(t=Zc.get(e.id))!=null?t:null;let s=rx.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Zc.set(e.id,i),i7?.(),i)).catch(()=>(Zc.set(e.id,null),null)),rx.set(e.id,s)),s})}const ax='',cx='',Xde={id:"material",core:{"":cx,plain:'',text:cx,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:ax,csharp:ax,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Cs(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Jde=Uo(0);i7=()=>{Jde.value++},Zde(Xde);const Qde={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function Wp(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[l]=i.split(":");return l.toLowerCase()})(e);return(t=Qde[n])!=null?t:n}function _Ke(e){const t=Wp(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function xKe(e){return Kde(Wp(e))||Gde()}const ux={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var qp=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});let Mi=null,S0=!1,C0=null,Up=Cv;function Mf(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Sv(){try{const e=globalThis;return Mf(e?.katex)}catch{return null}}function Cv(){return qp(null,null,function*(){const e=Sv();if(e)return e;const t=yield Cs(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Cs(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return Mf(t)})}function VL(e){const t=Promise.resolve(e).then(n=>{var o;return C0===t&&n?(Mi=(o=Mf(n))!=null?o:n,Mi):null}).catch(()=>null).finally(()=>{C0===t&&(C0=null)});return C0=t,S0=!0,t}function e2e(e){Up=e,Mi=null,S0=!1,C0=null}function t2e(e){e2e(Cv)}function WL(){return typeof Up=="function"}function SKe(){var e;const t=Up;if(!t||t===Cv)return null;if(Mi)return Mi;const n=Sv();if(n)return Mi=n,Mi;if(S0)return null;try{const o=t();return o?typeof o?.then=="function"?(VL(o),null):(Mi=(e=Mf(o))!=null?e:o,Mi):null}catch{return null}}function qL(){return qp(this,null,function*(){var e;const t=Sv();if(t)return Mi=t,Mi;if(Mi)return Mi;if(C0)return C0;if(S0)return null;const n=Up;if(!n)return S0=!0,null;try{const o=n();if(typeof o?.then=="function")return VL(o);if(o)return Mi=(e=Mf(o))!=null?e:o,S0=!0,Mi}catch{}return S0=!0,null})}function UL(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let o1=null,Ya=null;const Js=new Map,pa=new Map;let tf=5;const z0=new Set;function v2(){if(Js.size{const{id:n,html:o,error:s}=t.data,i=Js.get(n);if(i)if(Js.delete(n),clearTimeout(i.timeoutId),i.cleanup(),v2(),s)i.aborted||i.reject(new Error(s));else{const{content:l,displayMode:r}=t.data;if(l){const a=`${r?"d":"i"}:${l}`;if(pa.set(a,o),pa.size>200){const c=pa.keys().next().value;pa.delete(c)}}i.aborted||i.resolve(o)}},o1.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Js.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Js.clear(),ZL()}}function o2e(){var e;for(const t of Js.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Js.clear(),ZL(),o1&&((e=o1.terminate)==null||e.call(o1)),o1=null,Ya=null}function s2e(e,t=!0,n=2e3,o){return qp(this,null,function*(){performance.now();const s=UL(e);if(!WL()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Ya)return Promise.reject(Ya);const i=`${t?"d":"i"}:${s}`,l=pa.get(i);if(l)return v2(),Promise.resolve(l);const r=o1||(Ya=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Ya.name="WorkerInitError",Ya.code="WORKER_INIT_ERROR",null);if(!r)return Promise.reject(Ya);if(Js.size>=tf){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Js.size,a.max=tf,Promise.reject(a)}return new Promise((a,c)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void c(m)}const u=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Js.get(u);if(!m)return;Js.delete(u),m.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",m.aborted||m.reject(k),v2()},n);d=()=>{const m=Js.get(u);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const k=new Error("Aborted");k.name="AbortError",c(k)},o&&o.addEventListener("abort",d,{once:!0});const p=a,h=c;Js.set(u,{resolve:m=>{p(m)},reject:m=>{h(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{r.postMessage({id:u,content:s,displayMode:t})}catch(m){const k=Js.get(u);Js.delete(u),clearTimeout(f),k?.cleanup(),k?.reject(m),v2()}})})}function CKe(e,t=!0,n){const o=`${t?"d":"i"}:${UL(e)}`;if(pa.set(o,n),pa.size>200){const s=pa.keys().next().value;pa.delete(s)}}const i2e="WORKER_BUSY";function l2e(e=2e3,t){return Js.size{let s,i=!1,l=null,r=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),z0.delete(r),t&&l&&t.removeEventListener("abort",l),l=null};r=()=>{i||(i=!0,a(),n())},z0.add(r),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const c=new Error("Wait for worker slot timed out");c.name="WorkerBusyTimeout",c.code="WORKER_BUSY_TIMEOUT",o(c)},e),queueMicrotask(()=>v2()),t&&(l=()=>{if(i)return;i=!0,a();const c=new Error("Aborted");c.name="AbortError",o(c)},t.aborted?l():t.addEventListener("abort",l,{once:!0}))})}const Ad={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function MKe(e){return qp(this,arguments,function*(t,n=!0,o={}){var s,i,l,r;if(!WL()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:Ad.timeout,c=(i=o.waitTimeout)!=null?i:Ad.waitTimeout,u=(l=o.backoffMs)!=null?l:Ad.backoffMs,d=(r=o.maxRetries)!=null?r:Ad.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):Ad.maxRetries,p=o.signal;let h=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield s2e(t,n,a,p)}catch(m){if(m?.code!==i2e||h>=f)throw m;if(h++,yield l2e(c,p).catch(()=>{}),p?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}u>0&&(yield new Promise(k=>globalThis.setTimeout(k,u*h)))}}})}function Kc(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function r2e(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function E5(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=r2e(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function I5(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function KL(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function L5(e,t=360,n=500){return KL(e,t,n)}function $5(e,t=360,n=500){return KL(e,t,n)}var a2e=Object.defineProperty,c2e=Object.defineProperties,u2e=Object.getOwnPropertyDescriptors,dx=Object.getOwnPropertySymbols,d2e=Object.prototype.hasOwnProperty,f2e=Object.prototype.propertyIsEnumerable,fx=(e,t,n)=>t in e?a2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GL=(e,t)=>{for(var n in t||(t={}))d2e.call(t,n)&&fx(e,n,t[n]);if(dx)for(var n of dx(t))f2e.call(t,n)&&fx(e,n,t[n]);return e},px=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const N5=()=>Cs(()=>import("./mermaid.core-BusHtpbx.js").then(e=>e.cb),__vite__mapDeps([4,5]));let Xr=null,Gc=N5,Kd=null,l7=!1,r7=!1,Gd=0;function p2e(e){Gc=e,Gd++,Xr=null,Kd=null,l7=!1,r7=!1}function h2e(e){p2e(N5)}function hx(){return typeof Gc=="function"}function mx(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=GL({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},c2e(n,u2e(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function gx(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=GL({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function AKe(){return px(this,null,function*(){if(Xr)return Xr;const e=(function(){try{const o=globalThis;return mx(o?.mermaid)}catch{return null}})();if(e)return Xr=e,gx(Xr),Xr;const t=Gc,n=Gd;return t?t===N5&&l7?null:Kd||(Kd=px(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===N5)return n===Gd&&t===Gc&&(l7=!0,(function(i){r7||(r7=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Gd&&t===Gc&&(Kd=null)}return n!==Gd||t!==Gc?null:o?(Xr=mx(o),gx(Xr),Xr):null}),Kd):null})}let Hi=null,Xa=null;const or=new Map,u0=new Map;function k4(e){for(const t of or.values())t.reject(e);or.clear(),u0.clear()}let vx=5,yx=!1;const m2e="WORKER_BUSY",wx="MERMAID_DISABLED";function g2e(e){if(Hi&&Hi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",k4(n)}Hi=e,Xa=null;const t=e;Hi.onmessage=n=>{if(Hi!==t)return;const{id:o,ok:s,result:i,error:l}=n.data,r=or.get(o);r&&(s===!1||l?r.reject(new Error(l||"Unknown error")):r.resolve(i))},Hi.onerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{yx?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}k4(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Hi.onmessageerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{yx?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}k4(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function v2e(){var e;if(Hi)try{k4(new Error("Worker cleared")),(e=Hi.terminate)==null||e.call(Hi)}catch{}Hi=null,Xa=null}function YL(e,t,n,o){if(!hx()){const l=new Error("Mermaid rendering disabled");return l.name="MermaidDisabled",l.code=wx,Promise.reject(l)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=u0.get(s);return i||(i=(function(l,r,a=1400){if(!hx()){const u=new Error("Mermaid rendering disabled");return u.name="MermaidDisabled",u.code=wx,Promise.reject(u)}if(Xa)return Promise.reject(Xa);const c=Hi||(Xa=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Xa.name="WorkerInitError",Xa.code="WORKER_INIT_ERROR",null);if(!c)return Promise.reject(Xa);if(or.size>=vx){const u=new Error("Worker busy");return u.name="WorkerBusy",u.code=m2e,u.inFlight=or.size,u.max=vx,Promise.reject(u)}return new Promise((u,d)=>{const f=Math.random().toString(36).slice(2);let p,h=!1;const m=()=>{h||(h=!0,p!=null&&globalThis.clearTimeout(p),or.delete(f))},k={resolve:x=>{m(),u(x)},reject:x=>{m(),d(x)}};or.set(f,k);try{c.postMessage({id:f,action:l,payload:r})}catch(x){return or.delete(f),void d(x)}p=globalThis.setTimeout(()=>{const x=new Error("Worker call timed out");x.name="WorkerTimeout",x.code="WORKER_TIMEOUT";const y=or.get(f);y&&y.reject(x)},a)})})(e,t,n),u0.set(s,i),i.then(()=>{u0.get(s)===i&&u0.delete(s)},()=>{u0.get(s)===i&&u0.delete(s)})),(function(l,r){if(!r)return l;if(r.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,c)=>{let u=()=>{};const d=()=>r.removeEventListener("abort",u);u=()=>{d();const f=new Error("Aborted");f.name="AbortError",c(f)},r.addEventListener("abort",u,{once:!0}),l.then(f=>{d(),a(f)},f=>{d(),c(f)})})})(i,o)}function TKe(e,t,n=1400,o){return YL("canParse",{code:e,theme:t},n,o)}function EKe(e,t,n=1400,o){return YL("findPrefix",{code:e,theme:t},n,o)}var y2e=Object.defineProperty,w2e=Object.defineProperties,k2e=Object.getOwnPropertyDescriptors,kx=Object.getOwnPropertySymbols,b2e=Object.prototype.hasOwnProperty,_2e=Object.prototype.propertyIsEnumerable,bx=(e,t,n)=>t in e?y2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t)=>{for(var n in t||(t={}))b2e.call(t,n)&&bx(e,n,t[n]);if(kx)for(var n of kx(t))_2e.call(t,n)&&bx(e,n,t[n]);return e},wn=(e,t)=>w2e(e,k2e(t)),zo=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const x2e="__global__",nm="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",a7=(()=>{const e=globalThis;if(e[nm])return e[nm];const t={scopedCustomComponents:{},revision:Uo(0)};return e[nm]=t,t})(),_x=a7.revision,S2e=Symbol("markstreamCustomComponents"),C2e=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function Af(e){return C2e.has(String(e).trim().toLowerCase())}function M2e(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function om(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([Vl(n),Vl(M2e(n))]))!s||Af(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function Is(e){const t=fn(S2e,null);return B(()=>{var n;return _x.value,(function(o,s={}){return _x.value,St(St(St({},om(a7.scopedCustomComponents[x2e]||{})),om(s)),om((function(i){return i&&a7.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const A2e=["aria-label"],T2e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},E2e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},ho=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},ll=ho(Je({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(g(),S("svg",E2e,[...n[1]||(n[1]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),b("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(g(),S("svg",T2e,[...n[0]||(n[0]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,A2e))}),[["__scopeId","data-v-be21ab83"]]);ll.install=e=>{e.component(ll.__name,ll)};const I2e={class:"emoji-node"},Zi=ho(Je({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",I2e,I(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Zi.install=e=>{e.component(Zi.__name,Zi)};const L2e=["id"],$2e=["title"],rl=ho(Je({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(g(),S("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[b("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+I(e.node.id)+"]",9,$2e)],8,L2e))}}),[["__scopeId","data-v-c1463a29"]]);rl.install=e=>{e.component(rl.__name,rl)};const XL=(()=>{try{return!1}catch{}return!1})();function sm(e){XL&&console.warn(e)}function xx(e,t="safe",n){return _v(e,t,n)}function JL(e){return fde(e)}function im(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Mv(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=w4((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([l,r])=>[String(l),im(r)]):s.filter(l=>l&&typeof l=="object"&&!Array.isArray(l)&&"name"in l).map(l=>[String(l.name),im(l.value)]):Object.entries(s).map(([l,r])=>[l,im(r)]):null,t,n);var s;if(!o)return;const i=JL(g2(o));return Object.keys(i).length>0?i:void 0}function Sx(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,l])=>l===""?` ${i}`:` ${i}="${l}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function Td(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function lm(e,t,n,o,s,i,l=!1){const r=(function(d,f){return BL(d,f)})(e,o);if(_f.has(e.toLowerCase())||!r&&LL(e,i))return null;if(!r&&bv(e,i))return l?[Sx(e,t,!0)]:[Sx(e,t),...n,``];const a=_v(t,i,e),c=a.key,u=c!=null&&c!==""?c:s;if(r){const d=o[e]||o[e.toLowerCase()],f=JL(a);return vn(d,wn(St({},f),{key:u}),n.length>0?n:void 0)}return vn(e,wn(St({},a),{innerHTML:void 0,key:u}),n.length>0?n:void 0)}function QL(e,t){return mde(e,t)}function z5(e,t,n="safe"){if(!e)return[];try{return(function(i,l,r="safe"){let a=0;const c=[],u=[];for(const d of i)if(d.type==="text")(c.length>0?c[c.length-1].children:u).push(d.content);else if(d.type==="self_closing"){const f=lm(d.tagName,d.attrs||{},[],l,"ms-html-"+a++,r,!0);Td(c.length>0?c[c.length-1].children:u,f)}else if(d.type==="tag_open")c.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let h=c.length-1;h>=0;h--)if(c[h].tagName.toLowerCase()===f){p=h;break}if(p!==-1)for(;c.length>p;){const h=c.pop(),m=lm(h.tagName,h.attrs||{},h.children,l,h.autoKey,r);c.length>0?Td(c[c.length-1].children,m):Td(u,m),h.tagName.toLowerCase()!==f&&c.length>p&&sm(`Auto-closing unclosed tag: <${h.tagName}>`)}else sm(`Ignoring closing tag with no matching opening tag: `)}for(;c.length>0;){const d=c.pop(),f=lm(d.tagName,d.attrs||{},d.children,l,d.autoKey,r);c.length>0?Td(c[c.length-1].children,f):Td(u,f),sm(`Auto-closing unclosed tag: <${d.tagName}>`)}return u})(RL(e),t,n)}catch(s){return o=s,XL&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const N2e=["innerHTML"],al=ho(Je({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=B(()=>{var r,a;return(a=(r=t.htmlPolicy)!=null?r:n?.value)!=null?a:"safe"}),s=Is(()=>t.customId),i=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),l=B(()=>{const r=t.node.content;if(!r)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:fu(r,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:r};if(t.node.loading&&t.node.autoClosed){const c=z5(r,s.value,o.value);if(c!==null)return{mode:"dynamic",nodes:c}}if(!QL(r,s.value))return{mode:"html",content:fu(r,o.value)};const a=z5(r,s.value,o.value);return a===null?{mode:"html",content:fu(r,o.value)}:{mode:"dynamic",nodes:a}});return(r,a)=>l.value.mode==="dynamic"?(g(),S("span",{key:0,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[W(v(i),{nodes:l.value.nodes},null,8,["nodes"])],2)):l.value.mode==="text"?(g(),S("span",{key:1,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},I(l.value.content),3)):(g(),S("span",{key:2,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:l.value.content},null,10,N2e))}}),[["__scopeId","data-v-d17f12b0"]]);al.install=e=>{e.component(al.__name,al)};const z2e={class:"inline-code"},B2e={key:0},hi=ho(Je({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=vf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=B(()=>{const y=n.fade;return y===""||y===!0||y==="true"||y!==!1&&y!=="false"&&void 0}),r=B(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=B(()=>{var y;return String((y=t.node.code)!=null?y:"")}),c=B(()=>!r.value),u=B(()=>{var y;const w=(y=n["index-key"])!=null?y:n.indexKey;return w==null||w===""?"":String(w)}),d=V(t.node.code),f=V(""),p=V(0);let h;function m(){h?.(),h=void 0}function k(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ke([()=>t.node.code,u,r],([y])=>{const w=String(y??""),_=u.value,A=OL({nextContent:w,persistedContent:_?s?.get(_):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:r.value});d.value=A.settledContent,f.value=A.streamedDelta,A.appended?(p.value+=1,(function(){if(!f.value||h||!i)return;const P=i.value;h=Ke(()=>i.value,z=>{z!==P&&k()},{flush:"sync"})})()):f.value||m(),_&&s?.set(_,w)},{immediate:!0}),pf(m);const x=B(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(y,w)=>(g(),S("code",z2e,[c.value?(g(),S(Ce,{key:0},[He(I(a.value),1)],64)):(g(),S(Ce,{key:1},[d.value?(g(),S("span",B2e,I(d.value),1)):Y("",!0),f.value?(g(),S("span",{key:1,class:Be(["inline-code-stream-delta",[x.value]]),onAnimationend:k},I(f.value),35)):Y("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);hi.install=e=>{e.component(hi.__name,hi)};const c7=V(!1),Cx=V(""),Mx=V("top"),y2=V(null),w2=V(null),u7=V(null),d7=V(null),Ax=V(null);let b4=null,_4=null,f7=0;function e$(){b4&&(clearTimeout(b4),b4=null),_4&&(clearTimeout(_4),_4=null)}let P3=!1,F3=null,Tx=!1;function R2e(e,t,n="top",o=!1,s,i){if(!e)return;const l=++f7;e$();const r=()=>zo(null,null,function*(){var a,c;if(yield(function(){return zo(this,null,function*(){if(!P3&&!Tx&&typeof document<"u"){F3!=null||(F3=zo(null,null,function*(){const[{createApp:u,h:d},{default:f}]=yield Promise.all([Cs(()=>import("./vue.runtime.esm-bundler-B0BJU7Oe.js"),[]),Cs(()=>import("./Tooltip-aicK0c3c.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),u({setup:()=>()=>{var h;return d(f,{visible:c7.value,"anchor-el":y2.value,content:Cx.value,placement:Mx.value,id:w2.value,originX:u7.value,originY:d7.value,isDark:(h=Ax.value)!=null?h:void 0})}}).mount(p),P3=!0}));try{yield F3}catch(u){P3=!1,F3=null,Tx=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",u)}}})})(),P3&&l===f7){w2.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,y2.value=e,Cx.value=t,Mx.value=n,u7.value=(a=s?.x)!=null?a:null,d7.value=(c=s?.y)!=null?c:null,Ax.value=typeof i=="boolean"?i:null,c7.value=!0;try{e.setAttribute("aria-describedby",w2.value)}catch{}}});o?r():b4=setTimeout(r,80)}function P2e(e=!1){f7+=1,e$();const t=()=>{if(y2.value&&w2.value)try{y2.value.removeAttribute("aria-describedby")}catch{}c7.value=!1,y2.value=null,w2.value=null,u7.value=null,d7.value=null};e?t():_4=setTimeout(t,120)}const F2e={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},j2e=Symbol("markstreamI18nFallback");function t$(e,t){var n;return(n=t?.[e])!=null?n:F2e[e]}const p7=(e,t)=>{var n;return(n=t$(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function Ex(e,t){return{t(n){const o=t$(n,t);if(e.te&&o!=null&&!e.te(n))return p7(n,t);const s=e.t(n);return s===n&&o!=null?p7(n,t):s}}}function O2e(){const e=(function(){var n,o,s;try{const i=Ts(),l=j2e,r=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=r?.[l])!=null?o:a?.[l])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=Ts(),i=s?.proxy,l=i?.$t;if(typeof l=="function"){const c=i?.$te;return{t:l.bind(i),te:typeof c=="function"?c.bind(i):void 0}}const r=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=r?.$t;if(typeof a=="function"){const c=r?.$te;return{t:a.bind(r),te:typeof c=="function"?c.bind(r):void 0}}}catch{}return null})();if(t)return Ex(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return Ex({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>p7(n,e)}}const n$=Symbol("ViewportPriority"),o$=Symbol("ViewportPriorityOptions"),s$=Symbol("OffscreenHeavyNodeDeferral"),H2e=B(()=>!1),F0="400px";function Av(){return fn(o$,void 0)}function Tv(){return fn(s$,H2e)}function D2e(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?V(t):t,l=s?(n=window.requestIdleCallback)!=null?n:z=>window.setTimeout(()=>z({didTimeout:!0,timeRemaining:()=>0}),16):null,r=s?(o=window.cancelIdleCallback)!=null?o:z=>window.clearTimeout(z):null,a=new WeakMap;let c=1;const u=new Map,d=new Map,f=new Set;let p=null,h=null;function m(z){if(!z)return"viewport";let L=a.get(z);return L||(L=c++,a.set(z,L)),String(L)}function k(){if(p!=null){try{r?.(p)}catch{}p=null}}function x(z){if(z){const L=u.get(z);if(L&&!L.targets.size){try{L.io.disconnect()}catch{}u.delete(z)}}d.size||f.size||k()}function y(z){const L=d.get(z);if(!L)return;const E=u.get(L.bucketKey);if(!L.visible.value){L.visible.value=!0;try{L.resolve()}catch{}}try{E?.io.unobserve(z)}catch{}E?.targets.delete(z),d.delete(z),f.delete(z),x(L.bucketKey)}function w(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&p==null&&f.size&&(p=l(()=>{p=null;const z=f.values().next().value;z&&(f.delete(z),y(z),f.size&&w())},{timeout:1200}))}function _(z,L){if(!s||typeof IntersectionObserver>"u")return null;const E=(function(D,M){var R,O,U;return{root:(R=e?.(D??null))!=null?R:null,rootMargin:(O=M?.rootMargin)!=null?O:F0,threshold:(U=M?.threshold)!=null?U:0}})(z,L),T=[m(($=E).root),$.rootMargin,$.threshold].join("\0");var $;const C=u.get(T);if(C)return{key:T,bucket:C};let j;try{j=new IntersectionObserver(D=>{for(const M of D)(M.isIntersecting||M.intersectionRatio>0)&&y(M.target)},{root:E.root,rootMargin:E.rootMargin,threshold:E.threshold})}catch{return null}const H={io:j,targets:new Map};return u.set(T,H),{key:T,bucket:H}}function A(){if(s&&i.value)for(const[z,L]of Array.from(d.entries())){const E=_(z,L.opts);if(!E){y(z);continue}if(E.key===L.bucketKey)continue;const T=L.bucketKey,$=u.get(T);try{$?.io.unobserve(z)}catch{}$?.targets.delete(z),L.bucketKey=E.key,E.bucket.targets.set(z,L),E.bucket.io.observe(z),x(T)}}Ke(i,z=>{if(!z){for(const L of Array.from(d.keys()))y(L);k()}},{flush:"sync"});const P=(z,L)=>{const E=V(!1);let T,$=!1;const C=new Promise(M=>{T=()=>{$||($=!0,M())}}),j=()=>{const M=d.get(z);if(!M)return f.delete(z),void x();const R=u.get(M.bucketKey);try{R?.io.unobserve(z)}catch{}R?.targets.delete(z),d.delete(z),f.delete(z),x(M.bucketKey)};if(!s||!i.value)return E.value=!0,T(),{isVisible:E,whenVisible:C,destroy:j};const H=_(z,L);if(!H)return E.value=!0,T(),{isVisible:E,whenVisible:C,destroy:j};const D={resolve:T,visible:E,bucketKey:H.key,opts:L};return d.set(z,D),H.bucket.targets.set(z,D),H.bucket.io.observe(z),s&&h==null&&(h=window.requestAnimationFrame(()=>{h=null,A()})),L?.allowIdle!==!1&&(f.add(z),w()),{isVisible:E,whenVisible:C,destroy:j}};return P.refresh=A,qn(n$,P),P}function Ev(){var e,t;const n=fn(n$,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let l=null;const r=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,c=()=>{if(l!=null){try{a?.(l)}catch{}l=null}},u=p=>{if(!p)return;const h=s.get(p);if(h&&!h.targets.size){try{h.io.disconnect()}catch{}s.delete(p)}},d=p=>{const h=o.get(p);if(!h)return;const m=s.get(h.bucketKey);if(!h.visible.value){h.visible.value=!0;try{h.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}o.delete(p),m?.targets.delete(p),i.delete(p),u(h.bucketKey),i.size||c()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&l==null&&i.size&&(l=r(()=>{l=null;const p=i.values().next().value;p&&(i.delete(p),d(p),i.size&&f())},{timeout:1200}))};return(p,h)=>{const m=V(!1);let k,x=!1;const y=new Promise(A=>{k=()=>{x||(x=!0,A())}}),w=()=>{const A=o.get(p);if(!A)return i.delete(p),void(i.size||c());const P=s.get(A.bucketKey);try{P?.io.unobserve(p)}catch{}o.delete(p),P?.targets.delete(p),i.delete(p),u(A.bucketKey),i.size||c()},_=(A=>{var P,z;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const L=(j=>{var H,D;return[(H=j?.rootMargin)!=null?H:F0,(D=j?.threshold)!=null?D:0].join("\0")})(A),E=s.get(L);if(E)return{key:L,bucket:E};const T=(P=A?.rootMargin)!=null?P:F0;let $;try{$=new IntersectionObserver(j=>{for(const H of j)(H.isIntersecting||H.intersectionRatio>0)&&d(H.target)},{root:null,rootMargin:T,threshold:(z=A?.threshold)!=null?z:0})}catch{return null}const C={io:$,targets:new Set};return s.set(L,C),{key:L,bucket:C}})(h);return _?(o.set(p,{resolve:k,visible:m,bucketKey:_.key}),_.bucket.targets.add(p),_.bucket.io.observe(p),h?.allowIdle!==!1&&(i.add(p),f()),{isVisible:m,whenVisible:y,destroy:w}):(m.value=!0,k(),{isVisible:m,whenVisible:y,destroy:w})}}function V2e(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const W2e=["data-markstream-viewport-pending"],q2e=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],U2e={key:1,class:"image-placeholder"},Z2e={key:1,class:"image-node__raw-text"},K2e={key:2,class:"image-shimmer-overlay"},G2e={key:1,class:"image-node__raw-text"},Y2e={key:3,class:"image-error"},d1=ho(Je({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,l=t,r=V(!1),a=V(!1),c=V(""),u=V("primary"),d=V(null),f=vf(),p=fn(s7,null),h=Ev(),m=Av(),k=Tv(),x=B(()=>Qb(i.node.src)),y=B(()=>Qb(i.fallbackSrc)),w=(s=(o=(n=Ts())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),_=typeof window<"u"&&w?.getAttribute("src")===(x.value||y.value),A=V(typeof window>"u"||_||!k.value),P=Uo(null);let z="",L=null;const E=B(()=>c.value),T=B(()=>!i.lazy),$=B(()=>typeof window<"u"&&k.value&&!_),C=B(()=>!$.value||A.value),j=B(()=>C.value?E.value:""),H=B(()=>{var xe,Ye;return(Ye=(xe=m?.value.heavyBlockMargin)!=null?xe:m?.value.rootMargin)!=null?Ye:F0}),D=B(()=>!i.node.loading&&u.value!=="failed"&&c.value.length>0),M=B(()=>u.value==="failed"),R=B(()=>(!T.value||$.value&&!A.value)&&!r.value&&!a.value&&u.value!=="failed"&&c.value.length>0),O=B(()=>V2e(i,f));function U(xe=O.value){xe&&d.value&&p?.reportHeight(xe,d.value.offsetHeight)}function Z(xe=O.value){xe&&yt(()=>{U(xe)})}function q(){L&&(clearTimeout(L),L=null)}function te(){const xe=O.value;xe&&z!==xe&&(z&&p?.markSettled(z),q(),z=xe,p?.markPending(xe),typeof window<"u"&&(L=window.setTimeout(()=>{z===xe&&(Z(xe),ee())},8e3)))}function ee(){return zo(this,null,function*(){const xe=z;xe&&(q(),z="",yield yt(),U(xe),p?.markSettled(xe))})}function J(){if(u.value==="primary"&&y.value&&y.value!==c.value)return u.value="fallback",c.value=y.value,r.value=!1,a.value=!1,void Z();u.value="failed",a.value=!0,l("error",c.value),Z()}function se(){r.value=!0,a.value=!1,l("load",E.value),Z()}function Q(xe){xe.preventDefault(),r.value&&!a.value&&l("click",[xe,E.value])}const{t:me}=O2e();return Ke([x,y,()=>i.node.loading],()=>(r.value=!1,a.value=!1,i.node.loading||x.value?(c.value=x.value,void(u.value="primary")):y.value?(c.value=y.value,void(u.value="fallback")):(c.value="",u.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ke([d,$],([xe,Ye],at,X)=>{var oe;if((oe=P.value)==null||oe.destroy(),P.value=null,!Ye||A.value)return void(A.value=!0);if(!xe)return void(A.value=!1);let F=!0;const K=h(xe,{rootMargin:H.value,allowIdle:!1});P.value=K,A.value=K.isVisible.value,K.whenVisible.then(()=>{F&&P.value===K&&(A.value=!0)}),X(()=>{F=!1,K.destroy(),P.value===K&&(P.value=null)})},{immediate:!0}),Ke([D,r,a,E,()=>i.lazy,C],([xe,Ye,at,X,oe,F])=>xe&&X&&!at&&F?Ye?(ee(),void Z()):oe?(te(),void Z()):void(Ye||at||te()):(ee(),void Z()),{flush:"post",immediate:!0}),vo(()=>{var xe;(xe=P.value)==null||xe.destroy(),P.value=null,(function(){const Ye=z;Ye&&(q(),z="",p?.markSettled(Ye))})()}),(xe,Ye)=>{var at,X,oe,F,K;return g(),S("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":$.value&&!A.value?"true":void 0},[D.value?(g(),S("img",{key:0,src:j.value||void 0,alt:String((X=(at=i.node.alt)!=null?at:i.node.title)!=null?X:""),title:String((F=(oe=i.node.title)!=null?oe:i.node.alt)!=null?F:""),class:Be(["image-node__img",{"is-loading":!T.value&&!r.value,"is-loaded":T.value||r.value,"has-natural-size":r.value,"cursor-pointer":r.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:T.value?"high":void 0,decoding:T.value?"sync":"async",tabindex:r.value?0:-1,"aria-label":(K=i.node.alt)!=null?K:v(me)("image.preview"),onError:J,onLoad:se,onClick:Q},null,42,q2e)):Y("",!0),e.node.loading&&!a.value?(g(),S("span",U2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:E.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[0]||(Ye[0]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",Z2e,I(e.node.raw),1))])):Y("",!0),R.value&&!e.node.loading?(g(),S("span",K2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:E.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[1]||(Ye[1]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",G2e,I(e.node.raw),1))])):Y("",!0),M.value?(g(),S("span",Y2e,[jn(xe.$slots,"error",{node:i.node,displaySrc:E.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[2]||(Ye[2]=b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[b("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),b("span",null,I(v(me)("image.loadError")),1)],!0)])):Y("",!0)],8,W2e)}}}),[["__scopeId","data-v-046e82ac"]]);d1.install=e=>{e.component(d1.__name,d1)};const X2e={key:2},Pr=Je({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamNestedRendererProps",void 0),i=B(()=>{var h;return(h=o?.value)!=null?h:"safe"}),l=B(()=>{var h,m;const k=(h=s?.value)!=null?h:{};return wn(St({},k),{customId:(m=t.customId)!=null?m:k.customId,htmlPolicy:i.value})}),r=Rl({loader:()=>Promise.resolve().then(()=>Ov),suspensible:!1}),a=B(()=>t.components[String(t.node.type)]),c=B(()=>!!(a.value&&n.value[t.node.type]&&!Af(String(t.node.type)))),u=B(()=>c.value?Mv(t.node,i.value):void 0),d=B(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=B(()=>{var h;return String((h=t.node.content)!=null?h:"")}),p=B(()=>{var h,m;return String((m=(h=t.node.content)!=null?h:t.node.raw)!=null?m:"")});return(h,m)=>a.value&&c.value?(g(),ue(cs(a.value),io({key:0},u.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":l.value.isDark}),{default:ae(()=>[d.value?(g(),ue(v(r),io({key:0},l.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(g(),ue(v(r),io({key:1},l.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(g(),ue(cs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(g(),S("span",X2e,I(p.value),1)):Y("",!0)}}),Ix=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function J2e(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return wn(St(St({},Ix),n),{enabled:(t=n.enabled)==null||t})}return St({},Ix)}function Iv(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function i$(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function Lx(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function Q2e(e){var t;return e.diff===!0||Lx(e.language)||Lx(i$(String((t=e.raw)!=null?t:"")))}function efe(e,t,n){const o=(function(s){const i=i$(s);if(!i)return"";const l=i.split(/\s+/).filter(Boolean);if(!l.length)return"";const r=l[0]==="diff"?l.slice(1):l;for(const a of r){const c=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(c&&/[./\\-]/.test(c))return c}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const tfe=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],nfe={key:0,translate:"no",class:"markstream-pre__diff-code"},ofe={class:"markstream-pre__diff-pane-content"},sfe={class:"markstream-pre__diff-number","aria-hidden":"true"},ife={class:"markstream-pre__diff-content"},lfe={class:"markstream-pre__diff-content-inner"},rfe={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},afe=["textContent"],cfe=["textContent"],Di=Je({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(se,Q){const me=String(se??"");return Q?me:me.replace(/\r\n$|\n$|\r$/,"")}const o=B(()=>{var se,Q,me;const xe=String((Q=(se=t.node)==null?void 0:se.language)!=null?Q:"");return String((me=String(xe).split(/\s+/g)[0])!=null?me:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=B(()=>`language-${o.value}`),i=B(()=>{var se;return t.loading===!0||((se=t.node)==null?void 0:se.loading)===!0}),l=B(()=>{var se;return n((se=t.node)==null?void 0:se.code,i.value)});let r="",a=1;const c=B(()=>(function(se){let Q=0,me=1;se.startsWith(r)&&(Q=r.length,me=a,Q>0&&se[Q-1]==="\r"&&se[Q]===` +`&&Q++);for(let xe=Q;xel.value.split(/\r\n|\n|\r/));let d=0,f="";const p=B(()=>{const se=c.value;se{var se;return t.showLineNumbers===!0&&((se=t.node)==null?void 0:se.diff)===!0}),m=B(()=>h.value&&t.diffInline===!0),k=B(()=>{const se=Number(t.reservedHeightPx);if(!Number.isFinite(se)||se<=0)return;const Q=`${Math.ceil(se)}px`;return i.value?{maxHeight:Q,overflow:"auto"}:{height:Q,minHeight:Q,maxHeight:Q,overflow:"auto"}}),x=["diff ","index ","--- ","+++ ","@@ "];function y(se){return String(se??"").trim().length===0}function w(se,Q="context",me={}){const xe=y(se);return{code:se,kind:xe&&Q!=="hunk"&&Q!=="spacer"&&!me.preserveBlankKind?"context":Q,empty:xe}}function _(se){const Q=n(se,i.value);return Q?Q.split(/\r\n|\n|\r/):[]}function A(se,Q){return!y(se[Q])||Qx.some(me=>Q.startsWith(me)))}function E(se,Q){return Q||!se.startsWith(" ")||se.startsWith(" ")?se:` ${se}`}function T(se,Q){const me=se.length,xe=Q.length,Ye=[];let at=0;for(;at=at&&F>=at&&se[oe]===Q[F];)X.unshift({originalIndex:oe,modifiedIndex:F}),oe--,F--;const K=oe-at+1,he=F-at+1;if(K<=0||he<=0||i.value||(K+1)*(he+1)>15e5)return Ye.concat(X);const ye=he+1,ve=new Uint32Array((K+1)*(he+1));for(let Se=K-1;Se>=0;Se--)for(let je=he-1;je>=0;je--){const et=Se*ye+je;if(se[at+Se]===Q[at+je])ve[et]=ve[(Se+1)*ye+je+1]+1;else{const le=ve[(Se+1)*ye+je],fe=ve[Se*ye+je+1];ve[et]=le>=fe?le:fe}}const ie=[];let de=0,be=0;for(;de=ve[de*ye+be+1]?de++:be++;return Ye.concat(ie,X)}function $(se){var Q;const me=(function(){var F,K;const he=t.diffHideUnchangedRegions;if(he==null||he===!1)return null;const ye=he===!0?{}:he;return ye.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((F=ye.contextLineCount)!=null?F:2)),minimumLineCount:Math.max(1,Math.floor((K=ye.minimumLineCount)!=null?K:4))}})();if(!me||se.length<1||se.length>2||se.length===2&&se[0].lines.length!==se[1].lines.length)return se;const xe=se[0].lines,Ye=(Q=se[1])==null?void 0:Q.lines,at=F=>xe[F].kind==="context"&&(Ye===void 0||Ye[F].kind==="context"&&xe[F].code===Ye[F].code),X=[];let oe=0;for(;oe=me.minimumLineCount){const he=F+(F===0?0:me.contextLineCount),ye=K-(K===xe.length?0:me.contextLineCount);ye-he>=me.minimumLineCount&&X.push({start:he,end:ye})}oe===F&&oe++}return X.length?se.map((F,K)=>{const he=[];let ye=0;for(const ve of X)he.push(...F.lines.slice(ye,ve.start)),he.push({code:K===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${F.key}-collapsed-${ve.start}-${ve.end}`,number:""}),ye=ve.end;return he.push(...F.lines.slice(ye)),wn(St({},F),{lines:he})}):se}const C=B(()=>{var se,Q,me,xe;if(!h.value)return[];const Ye=(function(K){const he=K.some(ve=>P(ve)),ye=K.some(ve=>z(ve));return he&&ye||(function(){var ve,ie,de,be;if(o.value==="diff")return!0;const Se=(be=(de=String((ie=(ve=t.node)==null?void 0:ve.raw)!=null?ie:"").split(/\r?\n/,1)[0])==null?void 0:de.trim())!=null?be:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Se)})()&&(he||ye)})(u.value),at=(function(){var K,he;return((K=t.node)==null?void 0:K.originalCode)!=null||((he=t.node)==null?void 0:he.updatedCode)!=null})();if(m.value){const K=at?(function(he,ye){const ve=_(he),ie=_(ye),de=T(ve,ie);if(de.length>0){const fe=[];let ge=0,Oe=0;for(const Fe of de){for(;ge=Se&&et>=Se&&ve[je]===ie[et];)le.unshift(wn(St({},w(ie[et])),{key:`inline-suffix-${et}`,number:et+1})),je--,et--;for(let fe=Se;fe<=je;fe++)be.push(wn(St({},w(ve[fe],"removed",{preserveBlankKind:A(ve,fe)})),{key:`inline-removed-source-${fe}`,number:fe+1}));for(let fe=Se;fe<=et;fe++)be.push(wn(St({},w(ie[fe],"added",{preserveBlankKind:A(ie,fe)})),{key:`inline-added-source-${fe}`,number:fe+1}));return be.concat(le)})((se=t.node)==null?void 0:se.originalCode,(Q=t.node)==null?void 0:Q.updatedCode):(function(he){const ye=[];let ve=1,ie=1;const de=L(he);for(const[be,Se]of he.entries())if(Se.startsWith("@@")){const je=Se.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);je&&(ve=Number(je[1]),ie=Number(je[2])),ye.push(wn(St({},w(Se,"hunk")),{key:`inline-hunk-${be}`,number:""}))}else if(P(Se))ye.push(wn(St({},w(E(Se.slice(1),de),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${be}`,number:ve++}));else if(z(Se))ye.push(wn(St({},w(E(Se.slice(1),de),"added",{preserveBlankKind:!0})),{key:`inline-added-${be}`,number:ie++}));else{const je=de&&Se.startsWith(" ")?Se.slice(1):Se;ye.push(wn(St({},w(je)),{key:`inline-context-${be}`,number:ie})),ve++,ie++}return ye})(u.value);return $([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:K}])}if(!Ye&&at)return(function(K,he){const ye=_(K),ve=_(he),ie=T(ye,ve),de=[],be=[];let Se=0,je=0,et=0;const le=(fe,ge)=>{const Oe=Math.max(fe-Se,ge-je);for(let Fe=0;Fewn(St({},K),{key:`original-${he}`,number:he+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:oe.map((K,he)=>wn(St({},K),{key:`modified-${he}`,number:he+1}))}])}),j=B(()=>C.value.some(se=>se.lines.some(Q=>Q.kind==="collapsed"))),H=B(()=>{const se=o.value;return se?`Code block: ${se}`:"Code block"}),D=V(null),M=V([]);let R=null,O=!1,U=null;function Z(se){const Q=Number.parseFloat(String(se??""));return Number.isFinite(Q)&&Q>0?Q:0}function q(se,Q){var me;if(!se)return Q;if(se.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const xe=se.querySelector(".markstream-pre__diff-content"),Ye=xe?.getBoundingClientRect(),at=(me=Ye?.height)!=null?me:0;return Math.max(Q,Math.ceil(at))}function te(){O||typeof window>"u"||(R!=null&&window.cancelAnimationFrame(R),R=window.requestAnimationFrame(()=>{R=null,O||(function(){var se,Q;R=null;const me=D.value;if(!me||!h.value||m.value||!me.classList.contains("is-wrap"))return void(M.value.length&&(M.value=[]));const xe=(function(he){const ye=window.getComputedStyle(he),ve=Z(ye.getPropertyValue("--markstream-pre-diff-line-height"));if(ve>0)return ve;const ie=Z(ye.lineHeight);return ie>0?ie:18})(me),Ye=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),at=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),X=Math.max(Ye.length,at.length),oe=[];for(let he=0;he{const ve=K[ye];return ve&&Math.abs(he.rowHeight-ve.rowHeight)<=.5&&Math.abs(he.originalHeight-ve.originalHeight)<=.5&&Math.abs(he.modifiedHeight-ve.modifiedHeight)<=.5})||(M.value=oe)})()}))}function ee(se){U?.disconnect(),U=null,se&&h.value&&!m.value&&typeof ResizeObserver<"u"&&(U=new ResizeObserver(()=>{te()}),U.observe(se))}function J(se,Q){const me=M.value[se];if(!me)return;const xe=Q==="original"?me.originalHeight:me.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(me.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(xe)}px`}}return Ke(D,se=>{ee(se),yt(()=>te())},{flush:"post"}),Ke([h,m,C],()=>{ee(D.value),yt(()=>te())},{flush:"post",immediate:!0}),vo(()=>{O=!0,R!=null&&(window.cancelAnimationFrame(R),R=null),U?.disconnect(),U=null}),(se,Q)=>(g(),S("pre",{ref_key:"preRef",ref:D,style:Gt(k.value),class:Be([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":h.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":j.value}]),"aria-busy":i.value,"aria-label":H.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[h.value?(g(),S("code",nfe,[(g(!0),S(Ce,null,rt(C.value,me=>(g(),S("span",{key:me.key,class:Be(["markstream-pre__diff-pane",me.className])},[b("span",ofe,[(g(!0),S(Ce,null,rt(me.lines,(xe,Ye)=>(g(),S("span",{key:xe.key,class:Be(["markstream-pre__diff-line",[`markstream-pre__diff-line--${xe.kind}`,{"markstream-pre__diff-line--empty":xe.empty}]]),style:Gt(J(Ye,me.key))},[Q[0]||(Q[0]=b("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),b("span",sfe,I(xe.number),1),b("span",ife,[b("span",lfe,I(xe.code),1)])],6))),128))])],2))),128))])):(g(),S(Ce,{key:1},[t.showLineNumbers?(g(),S("span",rfe,[b("span",{class:"markstream-pre__line-numbers-text",textContent:I(p.value)},null,8,afe)])):Y("",!0),b("code",{translate:"no",class:"markstream-pre__code",textContent:I(l.value)},null,8,cfe)],64))],14,tfe))}});Di.install=e=>{e.component(Di.__name,Di)};const ufe={key:0},is=ho(Je({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=vf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=B(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),r=B(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=B(()=>{var k;const x=(k=n["index-key"])!=null?k:n.indexKey;return x==null||x===""?"":String(x)}),c=V(t.node.content),u=V(""),d=V(0);let f;function p(){f?.(),f=void 0}function h(){p(),u.value&&(c.value=c.value+u.value,u.value="")}Ke([()=>t.node.content,a,r],([k])=>{const x=String(k??""),y=a.value,w=OL({nextContent:x,persistedContent:y?s?.get(y):void 0,currentState:{settledContent:c.value,streamedDelta:u.value},typewriterEnabled:r.value});c.value=w.settledContent,u.value=w.streamedDelta,w.appended?(d.value+=1,(function(){if(!u.value||f||!i)return;const _=i.value;f=Ke(()=>i.value,A=>{A!==_&&h()},{flush:"sync"})})()):u.value||p(),y&&s?.set(y,x)},{immediate:!0}),pf(p);const m=B(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,x)=>(g(),S("span",{class:Be([[e.node.center?"text-node-center":""],"text-node"])},[c.value?(g(),S("span",ufe,I(c.value),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Be(["text-node-stream-delta",[m.value]]),onAnimationend:h},I(u.value),35)):Y("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Yd(e,t,n){return Je({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var l,r;const a=Ev(),c=Av(),u=Tv(),d=typeof window<"u"&&((r=(l=Ts())==null?void 0:l.vnode.el)==null?void 0:r.nodeType)===1,f=V(typeof window>"u"||d||!u.value),p=Uo(null);let h=null;function m(k){const x=k&&"$el"in k?k.$el:k;p.value=x instanceof HTMLElement?x:null}return typeof window<"u"&&Ke([p,u],([k,x],y,w)=>{if(h?.destroy(),h=null,!x||f.value)return void(f.value=!0);if(!k)return;let _=!0;const A=a(k,{rootMargin:c?.value.heavyBlockMargin,allowIdle:!1});h=A,f.value=A.isVisible.value,A.whenVisible.then(()=>{_&&h===A&&(f.value=!0)}),w(()=>{_=!1,A.destroy(),h===A&&(h=null)})},{immediate:!0}),vo(()=>{h?.destroy(),h=null}),()=>vn(f.value?t:n,wn(St({},s),{ref:m}),i)}})}is.install=e=>{e.component(is.__name,is)};const B5=Je({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,l,r,a,c;const u=Wp(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=ux[u]||(u?u.charAt(0).toUpperCase()+u.slice(1):ux[""]),f=Q2e(n.node),p=efe(String((l=(i=n.node)==null?void 0:i.raw)!=null?l:""),d,f),h=n.monacoOptions,m=f&&((r=n.estimatedDiffInline)!=null?r:Iv(h??{},typeof window>"u"?0:window.innerWidth)),k=h?.diffAppearance,x=k==="dark"||k!=="light"&&n.isDark===!0,y=typeof h?.fontSize=="number"&&Number.isFinite(h.fontSize)&&h.fontSize>0?h.fontSize:12,w=typeof h?.lineHeight=="number"&&Number.isFinite(h.lineHeight)&&h.lineHeight>0?h.lineHeight:y===12?18:Math.max(12,Math.round(1.5*y)),_=typeof h?.tabSize=="number"&&Number.isFinite(h.tabSize)&&h.tabSize>0?h.tabSize:4,A=f?0:8,P=typeof((a=h?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(h.padding.top)&&h.padding.top>=0?h.padding.top:A,z=typeof((c=h?.padding)==null?void 0:c.bottom)=="number"&&Number.isFinite(h.padding.bottom)&&h.padding.bottom>=0?h.padding.bottom:A,L=typeof h?.fontFamily=="string"?h.fontFamily.trim():"",E=St(St({fontSize:`${y}px`,lineHeight:`${w}px`,tabSize:_,paddingTop:`${P}px`,paddingBottom:`${z}px`,"--markstream-pre-line-number-top":`${P}px`},f?{"--markstream-pre-diff-line-height":`${w}px`}:{}),L?{"--markstream-code-font-family":L}:{}),T=()=>vn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[vn("svg",{class:"action-icon"})]),$=n.isShowPreview!==!1&&(u==="html"||u==="svg"),C=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||$&&n.showPreviewButton!==!1,j=D=>{if(D!=null)return typeof D=="number"?`${D}px`:String(D)},H=St(St(St({"--markstream-code-layout-character-width":"1ch"},j(n.minWidth)?{minWidth:j(n.minWidth)}:{}),j(n.maxWidth)?{maxWidth:j(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return vn("div",wn(St({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":x,"is-diff":f,"is-plain-text":u===""||u==="plaintext"||u==="text"},t.class],style:[H,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:vn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[vn("div",{class:"code-header-main"},[vn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),vn("div",{class:"code-header-copy"},[vn("div",{class:"code-header-title"},p.title),p.caption?vn("div",{class:"code-header-caption"},p.caption):null])]),vn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?vn("div",{class:"code-diff-stats","aria-hidden":"true"},[vn("span",{class:"code-diff-stat removed"},"-0"),vn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:T(),n.showCollapseButton===!1?null:T(),C?vn("div",{class:"relative"},[T()]):null])]),vn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[vn(Di,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?J2e(h?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:E,"data-markstream-code-loading":"1"})]),vn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[vn("div",{class:"loading-skeleton"},[vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line short"})])]),vn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),rm=Yd("ViewportDeferredCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./CodeBlockNode-D4cpL5UZ.js"),__vite__mapDeps([6,7]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),Di}}),loadingComponent:B5,delay:0,suspensible:!1}),B5),fr=Rl(()=>zo(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return vn(is,wn(St({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield qL(),(yield Cs(()=>import("./index7-BEZwnfMu.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return vn(is,wn(St({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),l$=Rl(()=>zo(null,null,function*(){try{return yield qL(),(yield Cs(()=>import("./index6-rJ6wldFa.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return vn(is,wn(St({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),Ti=ho(Je({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(g(),S("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},I(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);Ti.install=e=>{e.component(Ti.__name,Ti)};const dfe={class:"superscript-node"},Ki=ho(Je({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sup",dfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"superscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Ki.install=e=>{e.component(Ki.__name,Ki)};const ffe={class:"subscript-node"},Gi=ho(Je({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,superscript:Ki,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sub",ffe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"subscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Gi.install=e=>{e.component(Gi.__name,Gi)};const pfe={class:"strong-node"},Ei=ho(Je({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("strong",pfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"strong"}-${r}`,components:o.value,node:l,"index-key":`${e.indexKey||"strong"}-${r}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);Ei.install=e=>{e.component(Ei.__name,Ei)};const hfe={class:"strikethrough-node"},Ii=ho(Je({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("del",hfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"strikethrough"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);Ii.install=e=>{e.component(Ii.__name,Ii)};const mfe=["href","title","aria-label","aria-hidden","target","rel"],gfe=["aria-hidden"],vfe={class:"link-text-wrapper relative inline-flex"},yfe={class:"leading-[normal] link-text"},Li=ho(Je({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=fn("markstreamShowTooltips",void 0),o=B(()=>{const x=n?.value;return typeof x=="boolean"?x:t.showTooltip}),s=B(()=>{var x,y,w,_,A;const P=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",z=(x=t.animationOpacity)!=null?x:.35,L=Math.max(.12,Math.min(.5*z,z)),E={"--underline-height":`${(y=t.underlineHeight)!=null?y:2}px`,"--underline-bottom":P,"--underline-opacity":String(z),"--underline-rest-opacity":String(L),"--underline-duration":`${(w=t.animationDuration)!=null?w:1.6}s`,"--underline-timing":(_=t.animationTiming)!=null?_:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(A=t.animationIteration)!=null?A:"infinite"};return t.color&&(E["--link-color"]=t.color),E}),i=Is(()=>t.customId),l=B(()=>St({text:is,strong:Ei,strikethrough:Ii,emphasis:$i,image:d1,html_inline:al,inline_code:hi},i.value)),r=vf(),a=B(()=>{var x,y;const w=(x=t.node)==null?void 0:x.attrs;if(!w||typeof w!="object")return{};const _={};if(Array.isArray(w))for(const A of w)Array.isArray(A)&&A[0]&&(_[String(A[0])]=String((y=A[1])!=null?y:""));else for(const[A,P]of Object.entries(w))A&&P!=null&&P!==!1&&(_[A]=P===!0?"":String(P));return xx(_,"safe","a")}),c=B(()=>St(St({},r),a.value)),u=B(()=>{var x,y;return xx({href:String((y=(x=t.node)==null?void 0:x.href)!=null?y:"")},"safe","a").href}),d=B(()=>{if(!u.value)return;const x=c.value.target;return(typeof x=="string"?x.trim():String(x??"").trim())||(pae(u.value)?"_blank":void 0)}),f=B(()=>{var x;return String((x=d.value)!=null?x:"").trim().toLowerCase()==="_blank"}),p=B(()=>{if(!u.value)return;const x=c.value.rel,y=new Set((typeof x=="string"?x:String(x??"")).split(/\s+/).filter(Boolean)),w=new Set(Array.from(y).filter(_=>_.toLowerCase()!=="opener"));return f.value&&(w.add("noopener"),w.add("noreferrer")),w.size>0?Array.from(w).join(" "):void 0}),h=B(()=>{const x=St({},c.value);return delete x.title,delete x.href,delete x.target,delete x.rel,x});function m(){o.value&&P2e()}const k=B(()=>{var x,y;const w=(x=t.node)==null?void 0:x.title;return typeof w=="string"&&w.trim().length>0?w:String((y=u.value)!=null?y:"")});return(x,y)=>{var w,_;return e.node.loading?(g(),S("span",io({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},v(r),{style:s.value}),[b("span",vfe,[b("span",yfe,[W(v(is),{class:"leading-[normal] link-text",node:{type:"text",content:String((w=e.node.text)!=null?w:""),raw:String((_=e.node.text)!=null?_:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),y[1]||(y[1]=b("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,gfe)):(g(),S("a",io({key:0,class:"link-node",href:u.value,title:o.value?"":k.value,"aria-label":`Link: ${k.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},h.value,{style:s.value,onMouseenter:y[0]||(y[0]=A=>(function(P){var z,L,E,T;if(!o.value)return;const $=P,C=$?.clientX!=null&&$?.clientY!=null?{x:$.clientX,y:$.clientY}:void 0,j=((z=t.node)==null?void 0:z.title)||((L=u.value)!=null&&L.includes("xn--")&&((T=(E=t.node)==null?void 0:E.text)!=null&&T.includes("://"))?t.node.text:u.value)||"";R2e(P.currentTarget,j,"top",!1,C)})(A)),onMouseleave:m}),[(g(!0),S(Ce,null,rt(e.node.children,(A,P)=>(g(),ue(v(Pr),{key:`${e.indexKey||"emphasis"}-${P}`,components:l.value,node:A,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${P}`},null,8,["components","node","custom-id","index-key"]))),128))],16,mfe))}}}),[["__scopeId","data-v-367e6ca4"]]);Li.install=e=>{e.component(Li.__name,Li)};const wfe={class:"insert-node"},Yi=ho(Je({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("ins",wfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"insert"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Yi.install=e=>{e.component(Yi.__name,Yi)};const kfe={class:"highlight-node"},cl=ho(Je({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("mark",kfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"highlight"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);cl.install=e=>{e.component(cl.__name,cl)};const bfe={class:"emphasis-node"},$i=ho(Je({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("em",bfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"emphasis"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);$i.install=e=>{e.component($i.__name,$i)};const _fe={class:"hard-break"},f1=ho(Je({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("br",_fe))}),[["__scopeId","data-v-50c58f70"]]);f1.install=e=>{e.component(f1.__name,f1)};const nf=Je({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=It({checkbox:ll,checkbox_input:ll,emoji:Zi,emphasis:$i,hardbreak:f1,highlight:cl,inline_code:hi,insert:Yi,link:Li,reference:Ti,strikethrough:Ii,strong:Ei,subscript:Gi,superscript:Ki,text:is}),o=Is(()=>t.customId),s=B(()=>{const i=o.value;return Object.keys(i).length>0?St(St({},n),i):n});return(i,l)=>(g(!0),S(Ce,null,rt(e.nodes,(r,a)=>(g(),ue(v(Pr),{key:a,components:s.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function h7(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(h7)}function R5(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(h7))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(h7)?s:null}function j0(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const xfe=["cite"],Sfe={key:0,dir:"auto",class:"paragraph-node"},Cfe=["custom-id"],x4=ho(Je({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>!!n.value.paragraph),s=B(()=>!!n.value.text),i=B(()=>R5(t.node.children,!o.value)),l=B(()=>t.fade!==!1||s.value?null:j0(i.value));return qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade)),(r,a)=>(g(),S("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(g(),S("p",Sfe,[l.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(l.value),9,Cfe)):(g(),ue(v(nf),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(g(),ue(v(Xi),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=c=>r.$emit("copy",c))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,xfe))}}),[["__scopeId","data-v-abfecebc"]]);x4.install=e=>{e.component(x4.__name,x4)};const Mfe={class:"definition-list"},Afe={class:"definition-term"},Tfe={class:"definition-desc"},S4=ho(Je({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("dl",Mfe,[(g(!0),S(Ce,null,rt(t.node.items,(s,i)=>(g(),S(Ce,{key:i},[b("dt",Afe,[W(v(Xi),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),b("dd",Tfe,[W(v(Xi),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);S4.install=e=>{e.component(S4.__name,S4)};const Efe=["href","title"],k2=ho(Je({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,l=document.getElementById(i);l&&l.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(g(),S("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Efe))}}),[["__scopeId","data-v-e1eb37b6"]]);k2.install=e=>{e.component(k2.__name,k2)};const Ife=["id"],Lfe={class:"flex-1"},C4=Je({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[b("div",Lfe,[W(v(Xi),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Ife))}});C4.install=e=>{e.component(C4.__name,C4)};const $fe=["custom-id"],m7=ho(Je({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamFade",void 0),s=B(()=>o?.value!==!1||n.value.text?null:j0(t.node.children)),i=B(()=>St({text:is,inline_code:hi,link:Li,image:d1,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,footnote_reference:rl,hardbreak:f1,math_inline:fr,reference:Ti},n.value));return(l,r)=>(g(),ue(cs(`h${e.node.level}`),io({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ae(()=>[s.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(s.value),9,$fe)):(g(!0),S(Ce,{key:1},rt(e.node.children,(a,c)=>(g(),ue(v(Pr),{key:c,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${c}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),Zp=m7;Zp.install=e=>{e.component(m7.__name,m7)};const Nfe={key:0,dir:"auto",class:"paragraph-node"},zfe=["custom-id"],Bfe={dir:"auto",class:"paragraph-node"},Rfe=["custom-id"],pu=ho(Je({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=B(()=>{var p;return(p=t.node)!=null?p:t.item}),o=Is(()=>t.customId),s=B(()=>!!o.value.paragraph),i=B(()=>!!o.value.text),l=B(()=>{var p;return R5((p=n.value)==null?void 0:p.children,!s.value)}),r=B(()=>{var p;if(s.value)return null;const h=(p=n.value)==null?void 0:p.children;if(!Array.isArray(h)||h.length<2)return null;const m=h[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const k=h.slice(1);if(!k.every(y=>y?.type==="list"))return null;const x=R5([m]);return x?{paragraphChildren:x,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const c=B(()=>a()?j0(l.value):null),u=B(()=>{var p;return a()?j0((p=r.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=B(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade)),(p,h)=>{var m,k;return g(),S("li",io({class:"list-item",dir:"auto"},f.value),[l.value?(g(),S("p",Nfe,[c.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(c.value),9,zfe)):(g(),ue(v(nf),{key:1,nodes:l.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):r.value?(g(),S(Ce,{key:1},[b("p",Bfe,[u.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(u.value),9,Rfe)):(g(),ue(v(nf),{key:1,nodes:r.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(g(!0),S(Ce,null,rt(r.value.nestedLists,(x,y)=>(g(),ue(v(Xi),{key:y,nodes:[x],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${y}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:h[0]||(h[0]=w=>p.$emit("copy",w))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(g(),ue(v(Xi),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(m=n.value)==null?void 0:m.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:h[1]||(h[1]=x=>p.$emit("copy",x))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);pu.install=e=>{e.component(pu.__name,pu)};const hu=ho(Je({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=Is(()=>e.customId),n=B(()=>t.value.list_item||pu);return(o,s)=>(g(),ue(cs(e.node.ordered?"ol":"ul"),{class:Be(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ae(()=>[(g(!0),S(Ce,null,rt(e.node.items,(i,l)=>{var r;return g(),ue(cs(n.value),io({key:`${e.indexKey||"list"}-${l}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${l}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((r=e.node.start)!=null?r:1)+l:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);hu.install=e=>{e.component(hu.__name,hu)};const Pfe={key:2,class:"html-block-node__raw"},Ffe=["innerHTML"],jfe={key:1,class:"html-block-node__placeholder"},b2=ho(Je({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=fn("markstreamNestedRendererProps",void 0),s=B(()=>{var C,j;return(j=(C=t.htmlPolicy)!=null?C:n?.value)!=null?j:"safe"}),i=B(()=>{var C,j;const H=(C=o?.value)!=null?C:{};return wn(St({},H),{customId:(j=t.customId)!=null?j:H.customId,htmlPolicy:s.value})}),l=Rl({loader:()=>Promise.resolve().then(()=>Ov),suspensible:!1}),r=B(()=>{const C=w4(t.node.attrs,s.value);if(!C)return;const j=g2(C);return Object.keys(j).length>0?j:void 0}),a=B(()=>{const C=String(t.node.tag||"").trim(),j=w4(t.node.attrs,s.value,C);if(!j)return;const H=g2(j);return Object.keys(H).length>0?H:void 0}),c=Is(()=>t.customId),u=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>"u"),p=V(t.node.content),h=B(()=>Array.isArray(t.node.children)?t.node.children:[]),m=B(()=>String(t.node.tag||"div")),k=B(()=>{var C;if(m.value.trim().toLowerCase()!=="details"||(C=t.node.attrs)!=null&&C.some(([H])=>String(H).toLowerCase()==="open"))return null;const j=h.value[0];return j?.type==="html_block"&&String(j.tag||"").toLowerCase()==="summary"?j:null}),x=B(()=>{var C;return j0((C=k.value)==null?void 0:C.children)}),y=B(()=>{const C=k.value;if(!C)return;const j=w4(C.attrs,s.value,"summary");if(!j)return;const H=g2(j);return Object.keys(H).length>0?H:void 0}),w=B(()=>x.value==null?h.value:h.value.slice(1)),_=B(()=>{const C=m.value.trim().toLowerCase();return TI.has(C)||bv(C,s.value)}),A=B(()=>h.value.length>0&&!!t.node.tag&&!_.value),P=B(()=>{var C,j,H;if(A.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(C=p.value)!=null?C:""};const D=(j=p.value)!=null?j:t.node.content;if(!D)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:fu(D,s.value)};if(t.node.loading){const R=z5(D,c.value,s.value);return R===null?{mode:"text",content:(H=t.node.raw)!=null?H:D}:{mode:"dynamic",nodes:R}}if(!QL(D,c.value))return{mode:"html",content:fu(D,s.value)};const M=z5(D,c.value,s.value);return M===null?{mode:"html",content:fu(D,s.value)}:{mode:"dynamic",nodes:M}}),z=Ev(),L=Av(),E=Tv(),T=Uo(null),$=!!t.node.loading;return typeof window<"u"?(Ke([()=>d.value,()=>L?.value.heavyBlockMargin,()=>L?.value.rootMargin],([C],j,H)=>{var D,M,R,O;if((M=(D=T.value)==null?void 0:D.destroy)==null||M.call(D),T.value=null,!$)return f.value=!0,void(p.value=t.node.content);if(!C)return void(f.value=!1);let U=!0;const Z=(O=(R=L?.value.heavyBlockMargin)!=null?R:L?.value.rootMargin)!=null?O:F0,q=z(C,{rootMargin:Z,allowIdle:!E.value});T.value=q,f.value=f.value||q.isVisible.value,q.whenVisible.then(()=>{U&&T.value===q&&(f.value=!0)}),H(()=>{U=!1,q.destroy(),T.value===q&&(T.value=null)})},{immediate:!0}),Ke(()=>t.node.content,C=>{$&&!f.value||(p.value=C)})):f.value=!0,vo(()=>{var C,j;(j=(C=T.value)==null?void 0:C.destroy)==null||j.call(C),T.value=null}),(C,j)=>(g(),ue(cs(A.value?m.value:"div"),io({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":v(E)&&!f.value?"true":void 0},A.value?a.value:void 0),{default:ae(()=>[f.value?(g(),S(Ce,{key:0},[P.value.mode==="structured"?(g(),S(Ce,{key:0},[x.value!==null?(g(),S(Ce,{key:0},[b("summary",mR(OA(y.value)),I(x.value),17),w.value.length?(g(),ue(v(l),io({key:0},i.value,{nodes:w.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):Y("",!0)],64)):(g(),ue(v(l),io({key:1},i.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):P.value.mode==="dynamic"?(g(),ue(v(u),{key:1,nodes:P.value.nodes},null,8,["nodes"])):P.value.mode==="text"?(g(),S("pre",Pfe,I(P.value.content),1)):(g(),S("div",io({key:3},r.value,{innerHTML:P.value.content}),null,16,Ffe))],64)):(g(),S("div",jfe,[jn(C.$slots,"placeholder",{node:e.node},()=>[j[0]||(j[0]=b("span",{class:"html-block-node__placeholder-bar"},null,-1)),j[1]||(j[1]=b("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),j[2]||(j[2]=b("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);b2.install=e=>{e.component(b2.__name,b2)};const Ofe={dir:"auto",class:"paragraph-node"},Hfe=["custom-id"],B0=ho(Je({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamFade",void 0),i=fn("markstreamParseOptions",void 0),l=fn("markstreamCustomMarkdownIt",void 0),r=fn("markstreamNestedRendererProps",void 0),a=B(()=>{var L;return(L=o?.value)!=null?L:"safe"}),c=B(()=>{var L;return(L=t.parseOptions)!=null?L:i?.value}),u=B(()=>{var L;return(L=t.customMarkdownIt)!=null?L:l?.value}),d=B(()=>{var L,E;return(E=t.customHtmlTags)!=null?E:(L=r?.value)==null?void 0:L.customHtmlTags}),f=B(()=>{var L,E;const T=(L=r?.value)!=null?L:{};return wn(St({},T),{customId:(E=t.customId)!=null?E:T.customId,customHtmlTags:d.value,parseOptions:c.value,customMarkdownIt:u.value,htmlPolicy:a.value})}),p=Rl({loader:()=>Promise.resolve().then(()=>Ov),suspensible:!1});function h(L){var E;return L.type==="text"&&String((E=L.content)!=null?E:"").trim()===""}const m=B(()=>t.node.children.filter(L=>!h(L))),k=B(()=>m.value.length>0&&m.value.every(L=>L.type==="image"||(function(E){var T;const $=(function(C){return C.type==="link"&&Array.isArray(C.children)?C.children.filter(j=>!h(j)):[]})(E);return $.length===1&&((T=$[0])==null?void 0:T.type)==="image"})(L))),x=B(()=>new Set(K0(d.value))),y=B(()=>{if(!k.value||m.value.length<=1)return t.node.children;const L=[];for(let E=0;E0,C=t.node.children.slice(E+1).some(j=>!h(j));$&&C&&L.push(wn(St({},T),{content:" ",raw:" "}))}return L}),w=B(()=>s?.value===!1&&!n.value.text),_=B(()=>w.value?j0(y.value):null);function A(L,E){return{node:L,"index-key":`${t.indexKey}-${E}`,"custom-id":t.customId,"custom-html-tags":d.value}}const P=B(()=>St({inline_code:hi,image:d1,link:Li,hardbreak:f1,emphasis:$i,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,html_inline:al,html_block:b2,emoji:Zi,checkbox:ll,math_inline:fr,checkbox_input:ll,reference:Ti,footnote_anchor:k2,footnote_reference:rl,text:is},n.value)),z=B(()=>y.value.map((L,E)=>{var T;const $=(function(C){var j,H,D,M;if(C.type==="html_block"||C.type==="html_inline"){const R=String((j=C.tag)!=null?j:"").trim().toLowerCase()||NI(C.content);if(R&&!x.value.has(R)&&zI((H=C.content)!=null?H:C.raw,R)){const O=String((M=(D=C.content)!=null?D:C.raw)!=null?M:"");return{child:{type:"text",content:O,raw:O},component:is,isCustomComponent:!1}}}return{child:C,component:P.value[C.type],isCustomComponent:!!(n.value[C.type]&&!Af(String(C.type)))}})(L);return wn(St({},$),{index:E,key:`${t.indexKey||"paragraph"}-${E}`,customAttrs:$.isCustomComponent?Mv($.child,a.value):void 0,hasSlotChildren:Array.isArray($.child.children)&&$.child.children.length>0,slotContent:String((T=$.child.content)!=null?T:""),originalChild:L})}));return(L,E)=>(g(),S("p",Ofe,[_.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(_.value),9,Hfe)):(g(!0),S(Ce,{key:1},rt(z.value,T=>{return g(),S(Ce,{key:T.key},[k.value&&h(T.originalChild)?(g(),S(Ce,{key:0},[He(I(($=T.originalChild,String((C=$.content)!=null?C:""))),1)],64)):T.isCustomComponent?(g(),ue(cs(T.component),io({key:1,ref_for:!0},T.customAttrs,{node:T.child,loading:T.child.loading,"index-key":T.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ae(()=>[T.hasSlotChildren?(g(),ue(v(p),io({key:0,ref_for:!0},f.value,{nodes:T.child.children,"index-key":T.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):T.slotContent?(g(),ue(v(p),io({key:1,ref_for:!0},f.value,{content:T.slotContent,final:!T.child.loading,"index-key":`${T.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(g(),ue(cs(T.component),io({key:2,ref_for:!0},A(T.child,T.index)),null,16))],64);var $,C}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);B0.install=e=>{e.component(B0.__name,B0)};const Dfe={class:"table-node-wrapper"},Vfe=["aria-busy"],Wfe={key:0},qfe=["custom-id"],Ufe=["aria-label","onPointerdown"],Zfe=["custom-id"],Kfe={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},_2=ho(Je({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=B(()=>{var x;return(x=t.node.loading)!=null&&x}),o=B(()=>{var x;return(x=t.node.rows)!=null?x:[]}),s=V(null),i=V([]);let l=null;const r=B(()=>t.node.header.cells.length),a=B(()=>i.value.some(x=>Number.isFinite(x)&&x>0)),c=B(()=>a.value?i.value.map(x=>x>0?{width:`${x}px`}:void 0):[]);qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade));const u=Is(()=>t.customId),d=B(()=>!!u.value.text),f=B(()=>!!u.value.paragraph),p=new WeakMap;function h(x){const y=t.fade===!1&&!d.value,w=!f.value,_=p.get(x);if(_?.children===x.children&&_.textFastPath===y&&_.paragraphFastPath===w)return _.info;const A=R5(x.children,w,!0),P={simpleChildren:A,plainText:A&&y?j0(A):null};return p.set(x,{children:x.children,textFastPath:y,paragraphFastPath:w,info:P}),P}function m(x){if(!l)return;x.preventDefault();const y=l.startWidth+l.nextStartWidth,w=Math.min(48,Math.floor(y/2)),_=Math.max(w,Math.min(y-w,Math.round(l.startWidth+x.clientX-l.startX))),A=[...l.widths];A[l.index]=_,A[l.index+1]=y-_,i.value=A}function k(){l&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),l=null)}return Ke(r,()=>{k(),i.value=[]}),vo(k),(x,y)=>(g(),S("div",Dfe,[b("table",{ref_key:"tableRef",ref:s,class:Be(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(g(),S("colgroup",Wfe,[(g(!0),S(Ce,null,rt(e.node.header.cells,(w,_)=>(g(),S("col",{key:_,style:Gt(c.value[_])},null,4))),128))])):Y("",!0),b("thead",null,[b("tr",null,[(g(!0),S(Ce,null,rt(e.node.header.cells,(w,_)=>(g(),S("th",{key:_,dir:"auto",class:Be([w.align==="right"?"text-right":w.align==="center"?"text-center":"text-left"])},[h(w).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(h(w).plainText),9,qfe)):h(w).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(w).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${_}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:w.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[0]||(y[0]=A=>x.$emit("copy",A))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),_(function(P,z){if(z.button!==0)return;const L=(function(){var $;const C=($=s.value)==null?void 0:$.querySelectorAll("thead th");return Array.from(C??[],j=>Math.round(j.getBoundingClientRect().width))})(),E=L[P],T=L[P+1];E&&T&&(z.preventDefault(),l={index:P,startX:z.clientX,startWidth:E,nextStartWidth:T,widths:L},i.value=L,window.addEventListener("pointermove",m),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(_,A)},null,40,Ufe)):Y("",!0)],2))),128))])]),b("tbody",null,[(g(!0),S(Ce,null,rt(o.value,(w,_)=>(g(),S("tr",{key:_},[(g(!0),S(Ce,null,rt(w.cells,(A,P)=>(g(),S("td",{key:P,class:Be([A.align==="right"?"text-right":A.align==="center"?"text-center":"text-left"]),dir:"auto"},[h(A).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(h(A).plainText),9,Zfe)):h(A).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(A).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${_}-${P}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:A.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[1]||(y[1]=z=>x.$emit("copy",z))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Vfe),W(qi,{name:"table-node-fade"},{default:ae(()=>[n.value?(g(),S("div",Kfe,[jn(x.$slots,"loading",{isLoading:n.value},()=>[y[2]||(y[2]=b("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),y[3]||(y[3]=b("span",{class:"sr-only"},"Loading",-1))],!0)])):Y("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);_2.install=e=>{e.component(_2.__name,_2)};const Gfe={class:"hr-node"},M4=ho({},[["render",function(e,t){return g(),S("hr",Gfe)}],["__scopeId","data-v-39b2349c"]]);M4.install=e=>{e.component(M4.__name,M4)};const Yfe={class:"unknown-node"},g7=Je({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(g(),S("div",Yfe,I(e.node.raw),1))}),A4=ho(Je({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=B(()=>`vmr-container vmr-container-${t.node.name}`),o=Is(()=>t.customId),s=B(()=>St({text:is,paragraph:B0,heading:Zp,inline_code:hi,link:Li,image:d1,strong:Ei,emphasis:$i,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,checkbox:ll,checkbox_input:ll,hardbreak:f1,math_inline:fr,reference:Ti,list:hu,math_block:l$,table:_2},o.value));return(i,l)=>(g(),S("div",io({class:n.value},e.node.attrs),[(g(!0),S(Ce,null,rt(e.node.children,(r,a)=>{return g(),ue(cs((c=r.type,s.value[c]||g7)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:r,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var c}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);A4.install=e=>{e.component(A4.__name,A4)};const Xfe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],$x=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Jfe(e){if(e<=255)return Xfe[e];let t=0,n=$x.length-1;for(;t<=n;){const o=t+n>>1,s=$x[o];if(es[1]))return s[2];t=o+1}}return"L"}const Qfe=/[ \t\n\r\f]+/g,e3e=/[\t\n\r\f]| {2,}|^ | $/;let am=null;const t3e=new RegExp("\\p{Script=Arabic}","u"),x1=new RegExp("\\p{M}","u"),Lv=new RegExp("\\p{Nd}","u");function Nx(e){return t3e.test(e)}function zx(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Lr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(zx(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(zx(n))return!0}}return!1}const n3e=new Set([" "," ","⁠","\uFEFF"]),o3e=new Set(["-","‐","–","—"]);function r$(e,t){return!((function(n){const o=x2(n);return o!==null&&n3e.has(o)})(e)||t&&((function(n){const o=x2(n);return o!==null&&($v.has(o)||O0.has(o))})(e)||(function(n){const o=x2(n);return o!==null&&o3e.has(o)})(e)))}const $v=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Kp=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Nv=new Set(["'","’"]),O0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),s3e=new Set([":",".","،","؛"]),i3e=new Set(["၏"]),l3e=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function r3e(e){if(zv(e))return!0;let t=!1;for(const n of e)if(O0.has(n)||F5(n))t=!0;else if(!t||!x1.test(n))return!1;return t}function a3e(e){for(const t of e)if(!$v.has(t)&&!O0.has(t))return!1;return e.length>0}function c3e(e){if(zv(e))return!0;for(const t of e)if(!(Kp.has(t)||Nv.has(t)||x1.test(t)||F5(t)))return!1;return e.length>0}function zv(e){let t=!1;for(const n of e)if(n!=="\\"&&!x1.test(n)){if(!(Kp.has(n)||O0.has(n)||Nv.has(n)))return!1;t=!0}return t}function P5(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function x2(e){if(e.length===0)return null;const t=P5(e,e.length);return e.slice(t)}const u3e=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function F5(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,u3e)}function d3e(e){const t=(function(n){for(const o of n)if(!x1.test(o))return o;return null})(e);return t!==null&&Lv.test(t)}function f3e(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(x1.test(o))n--;else{if(!Kp.has(o)&&!Nv.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function p3e(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function Bx(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function Rx(e,t){return e&&t!==null&&s3e.has(t)}function h3e(e){const t=x2(e);return t!==null&&i3e.has(t)}function m3e(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function v7(e){let t=e.length;for(;t>0;){const n=P5(e,t),o=e.slice(n,t);if(l3e.has(o))return!0;if(!O0.has(o))return!1;t=n}return!1}function g3e(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const v3e=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function nr(e){return e.length===1?e[0]:e.join("")}function y3e(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),nr(n)}function w3e(e,t,n,o){if(!v3e.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=g3e(u,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length):(l.push(u),c+=u.length)}return i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),s}function cm(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const k3e=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function b3e(e,t){const n=e.texts[t];return!!n.startsWith("www.")||k3e.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!M3e.has(e)&&!C3e.test(e)&&S3e.test(e)}function Px(e){let t=!1;for(const n of e)if(!x1.test(n)){if(!a$(n))return!1;t=!0}return t}function A3e(e,t,n,o){const s=!t&&Px(e),i=!o&&Px(n),l=(function(a){const c=(function(u){for(let d=u.length;d>0;){const f=P5(u,d),p=u.slice(f,d);if(!x1.test(p))return p;d=f}return null})(a);return c!==null&&F5(c)})(e),r=(t||l)&&(function(a){for(let c=a.length;c>0;){const u=P5(a,c),d=a.slice(u,c);if(!x1.test(d))return a$(d)||F5(d);c=u}return!1})(e);return!!(s||i||r)&&!Lr(e)&&!Lr(n)&&(t||s||l)&&(o||i)}function Fx(e){for(const t of e)if(Lv.test(t))return!0;return!1}function T4(e){if(e.length===0)return!1;for(const t of e)if(!Lv.test(t)&&!x3e.has(t))return!1;return!0}function T3e(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s0&&c.charCodeAt(c.length-1)===32&&(c=c.slice(0,-1)),c})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=(function(a,c,u){var d,f,p;const h=(lm===null&&(lm=new Intl.Segmenter(void 0,{granularity:"word"})),lm);let m=0;const k=[],x=[],y=[],w=[],_=[],M=[],P=[],B=[],$=[],T=[],I=[],N=[];for(const A of h.segment(a))for(const R of Qfe(A.segment,(d=A.isWordLike)!=null&&d,A.index,u)){let j=function(){M[Q]!==null&&(x[Q]=[Nx(k,M,P,Q)],M[Q]=null),x[Q].push(R.text),y[Q]=y[Q]||R.isWordLike,B[Q]=B[Q]||U,$[Q]=$[Q]||te,T[Q]=ee,I[Q]=ie,N[Q]=zx($[Q],J)};const q=R.kind==="text",K=Zfe(R.text,R.isWordLike,R.kind),U=Ir(R.text),te=$x(R.text),J=S2(R.text),ee=m7(R.text),ie=Kfe(R.text),Q=m-1;c.carryCJKAfterClosingQuote&&q&&m>0&&w[Q]==="text"&&U&&B[Q]&&T[Q]||q&&m>0&&w[Q]==="text"&&Dfe(R.text)&&B[Q]||q&&m>0&&w[Q]==="text"&&I[Q]?j():q&&m>0&&w[Q]==="text"&&R.isWordLike&&te&&N[Q]?(j(),y[Q]=!0):K!==null&&m>0&&w[Q]==="text"&&M[Q]===K?P[Q]=((f=P[Q])!=null?f:1)+1:q&&!R.isWordLike&&m>0&&w[Q]==="text"&&!B[Q]&&(Hfe(R.text)||R.text==="-"&&y[Q])?j():(k[m]=R.text,x[m]=[R.text],y[m]=R.isWordLike,w[m]=R.kind,_[m]=R.start,M[m]=K,P[m]=K===null?0:1,B[m]=U,$[m]=te,T[m]=ee,I[m]=ie,N[m]=zx(te,J),m++)}for(let A=0;Anull);let O=-1;for(let A=m-1;A>=0;A--){const R=k[A];if(R.length!==0){if(w[A]==="text"&&!y[A]&&O>=0&&w[O]==="text"&&(Vfe(R)||R==="-"&&qfe(k[O]))){const j=(p=C[O])!=null?p:[];j.push(R),C[O]=j,_[O]=_[A],k[A]="";continue}O=A}}for(let A=0;AU+1){R.push(nr(ie)),j.push(he),q.push("text"),K.push(A.starts[U]),U=Q;continue}}R.push(te),j.push(ee),q.push(J),K.push(A.starts[U]),U++}return{len:R.length,texts:R,isWordLike:j,kinds:q,starts:K}})((function(A){const R=[],j=[],q=[],K=[];for(let U=0;U1;for(let ie=0;ie=A.len||rm(A.kinds[J]))continue;const ee=[],ie=A.starts[J];let Q=J;for(;Q0&&(R.push(nr(ee)),j.push(!0),q.push("text"),K.push(ie),U=Q-1)}return{len:R.length,texts:R,isWordLike:j,kinds:q,starts:K}})((function(A){const R=A.texts.slice(),j=A.isWordLike.slice(),q=A.kinds.slice(),K=A.starts.slice();for(let te=0;te=0&&!sL(c.texts[w-1],u)&&y(w),m<0&&(m=w),k=k||Ir(_))}return y(c.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:h}})(i,l,t.breakKeepAllAfterPunctuation):l;return xt({normalized:i,chunks:a3e(r,s)},r)}let Cc=null;const Px=new Map;let Mc=null;const u3e=new RegExp("\\p{Emoji_Presentation}","u"),d3e=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let am=null;const Fx=new Map;function g7(){if(Cc!==null)return Cc;if(typeof OffscreenCanvas<"u")return Cc=new OffscreenCanvas(1,1).getContext("2d"),Cc;if(typeof document<"u")return Cc=document.createElement("canvas").getContext("2d"),Cc;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Da(e,t){let n=t.get(e);return n===void 0&&(n={width:g7().measureText(e).width,containsCJK:Ir(e)},t.set(e,n)),n}function F5(){if(Mc!==null)return Mc;if(typeof navigator>"u")return Mc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mc;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Mc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mc}function lL(){return am===null&&(am=new Intl.Segmenter(void 0,{granularity:"grapheme"})),am}function f3e(e){return u3e.test(e)||e.includes("️")}function i0(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let l=0;const r=lL();for(const a of r.segment(i))f3e(a.segment)&&l++;return l})(o)),s.emojiCount})(e,t)*n}function p3e(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function jx(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function Ox(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function Nv(e,t){return t===0?0:e+t}function g3e(e,t,n,o,s){return Nv(o,t==="tab"?s+(function(i,l){return i.letterSpacing!==0&&i.spacingGraphemeCounts[l]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function Hx(e,t,n,o){return Nv(o,t==="tab"?0:e.lineEndFitAdvances[n])}function Dx(e,t,n,o,s){return Nv(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function v3e(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function y3e(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function P3(e,t,n){let o=t;for(;oj){if(ve!==null&&oe>F){Q(se,oe,de),ke=oe,ge=P3(ve,ge,ke+1),oe=-1,de=0;continue}Q(),xe(se,ke,Se)}else K+=Se,te=se,J=ke+1;else xe(se,ke,Se);const me=ke+1;ve!==null&&ve[ge]===me&&(oe=me,de=K,ge++),ke++}U&&te===se&&J===fe.length&&(te=se+1,J=0)}let X=0;for(;X=H.length)));){const se=H[X],F=jx(D[X]);if(U)if(K+se>j){if(F){Ye(X,se),Q(X+1,0,K-se),X++;continue}if(ee>=0){if(te>ee||te===ee&&J>0){Q();continue}Q(ee,0,ie);continue}if(se>j&&A[X]!==null){Q(),st(X,0),X++;continue}Q()}else Ye(X,se),F&&(ee=X+1,ie=K-se),X++;else se>j&&A[X]!==null?st(X,0):he(X,se),F&&(ee=X+1,ie=K-se),X++}return U&&Q(),q})(n,o);const{widths:s,kinds:i,breakableFitAdvances:l,breakablePreferredBreaks:r,discretionaryHyphenWidth:a,chunks:c}=n;if(s.length===0||c.length===0)return 0;const u=F5(),d=o+u.lineFitEpsilon;let f=0,p=0,h=!1,m=0,k=0,x=-1,y=0,w=null;function _(){x=-1,y=0,w=null}function M(C=m,O=k,H){f++,p=0,h=!1,_()}function P(C,O){h=!0,m=C+1,k=0,p=O}function B(C,O,H){h=!0,m=C,k=O+1,p=H}function $(C,O){h?(p+=O,m=C+1,k=0):P(C,O)}function T(C,O,H,D,A,R){if(!O)return;const j=Hx(n,C,H,A);Dx(n,C,H,A,D),x=H+1,y=p-R+j,w=C}function I(C,O){var H;const D=l[C],A=(H=r[C])!=null?H:null;let R=A===null?-1:P3(A,0,O+1),j=-1,q=O;for(;qd){if(A!==null&&j>O){M(C,j),q=j,R=P3(A,R,q+1),j=-1;continue}M(),B(C,q,K)}else p=J,m=C,k=q+1}else B(C,q,K);const U=q+1;A!==null&&A[R]===U&&(j=U,R++),q++}h&&m===C&&k===D.length&&(m=C+1,k=0)}function N(C){f++,_()}for(let C=0;C=O.endSegmentIndex)));){const D=i[H],A=jx(D),R=m3e(n,h,H),j=D==="tab"?h3e(p+R,n.tabStopAdvance):s[H],q=R+j,K=g3e(n,D,H,R,j);if(D!=="soft-hyphen")if(h){if(p+K>d){const U=p+Hx(n,D,H,R);if(Dx(n,D,H,R,j),w==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&y<=d){M(x,0);continue}if(A&&U<=d){$(H,q),M(H+1,0),H++;continue}if(x>=0&&y<=d){if(m>x||m===x&&k>0){M();continue}const te=x;M(te,0),H=te;continue}if(K>d&&l[H]!==null){M(),I(H,0),H++;continue}M();continue}$(H,q),T(D,A,H,j,R,q),H++}else K>d&&l[H]!==null?I(H,0):P(H,j),T(D,A,H,j,R,q),H++;else h&&(m=H+1,k=0,x=H+1,y=p+a,w=D),H++}h&&(O.consumedEndSegmentIndex,M(O.consumedEndSegmentIndex,0))}return f})(e,t)}let cm=null;function zv(){return cm===null&&(cm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),cm}function k3e(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=m7(d),r=Up.has(d)}function u(d,f){o.push(d),i=i||f;const p=m7(d);l=d.length===1&&H0.has(d)&&l||p,r=!1}for(const d of zv().segment(e)){const f=d.segment,p=Ir(f);o.length!==0?r||Iv.has(f)||H0.has(f)||t.carryCJKAfterClosingQuote&&p&&l?u(f,p):i||p?(a(),c(f,d.index,p)):u(f,p):c(f,d.index,p)}return a(),n}function b3e(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(r){if(!(s<0)){if(i)s+1===r?o.push(t[s]):(function(a,c){const u=t[a].start,d=c=0&&!sL(t[r-1].text,n)&&l(r),s<0&&(s=r),i=i||Ir(a.text)}return l(t.length),o}function Vx(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=zv();for(const s of o.segment(e))n++;return n}function _3e(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function x3e(e,t,n,o,s){const i=F5(),{cache:l,emojiCorrection:r}=(function(N,C){g7().font=N;const O=(function(A){let R=Px.get(A);return R||(R=new Map,Px.set(A,R)),R})(N),H=(function(A){const R=A.match(/(\d+(?:\.\d+)?)\s*px/);return R?parseFloat(R[1]):16})(N),D=C?(function(A,R){let j=Fx.get(A);if(j!==void 0)return j;const q=g7();q.font=A;const K=q.measureText("😀").width;if(j=0,K>R+.5&&typeof document<"u"&&document.body!==null){const U=document.createElement("span");U.style.font=A,U.style.display="inline-block",U.style.visibility="hidden",U.style.position="absolute",U.textContent="😀",document.body.appendChild(U);const te=U.getBoundingClientRect().width;document.body.removeChild(U),K-te>.5&&(j=K-te)}return Fx.set(A,j),j})(N,H):0;return{cache:O,fontSize:H,emojiCorrection:D}})(t,(a=e.normalized,d3e.test(a)));var a;const c=i0("-",Da("-",l),r)+(s===0?0:2*s),u=8*i0(" ",Da(" ",l),r),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=null,y=[],w=[],_=[],M=null,P=Array.from({length:e.len});function B(N,C,O,H,D,A,R,j,q){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(O),h.push(H),m.push(D),y.push(R),w.push(j),d&&_.push(q)}function $(N,C,O,H,D){const A=Da(N,l),R=d?Vx(N,C):0,j=(function(te,J,ee){return J>1?te+(J-1)*ee:te})(i0(N,A,r),R,s),q=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:j,K=q===0?0:q+(R>0?s:0),U=C==="space"||C==="zero-width-break"?0:j;if(D&&H&&N.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":A4(N)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const J=(function(ie,Q,he,xe,Ye){if(Q.breakableFitAdvances!==void 0&&Q.breakableFitMode===Ye)return Q.breakableFitAdvances;Q.breakableFitMode=Ye;const st=lL(),X=[];for(const fe of st.segment(ie))X.push(fe.segment);if(X.length<=1)return Q.breakableFitAdvances=null,Q.breakableFitAdvances;if(Ye==="sum-graphemes"){const fe=[];for(const ve of X){const ge=Da(ve,he);fe.push(i0(ve,ge,xe))}return Q.breakableFitAdvances=fe,Q.breakableFitAdvances}if(Ye==="pair-context"||X.length>96){const fe=[];let ve=null,ge=0;for(const oe of X){const de=i0(oe,Da(oe,he),xe);if(ve===null)fe.push(de);else{const ke=ve+oe,Se=Da(ke,he);fe.push(i0(ke,Se,xe)-ge)}ve=oe,ge=de}return Q.breakableFitAdvances=fe,Q.breakableFitAdvances}const se=[];let F="",Z=0;for(const fe of X){F+=fe;const ve=i0(F,Da(F,he),xe);se.push(ve-Z),Z=ve}return Q.breakableFitAdvances=se,Q.breakableFitAdvances})(N,A,l,r,te),ee=J===null||o==="keep-all"?null:(function(ie){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(ie))return null;const Q=[];let he=0;for(const xe of zv().segment(ie))he++,_3e(xe.segment)&&Q.push(he);return Q.length===0?null:Q})(N);return void B(N,j,K,U,C,O,J,ee,R)}B(N,j,K,U,C,O,null,null,R)}for(let N=0;N=55296&&ie<=56319&&ee+1=56320&&Ye<=57343&&(Q=Ye-56320+(ie-55296<<10)+65536,he=2)}const xe=Lfe(Q);xe!=="R"&&xe!=="AL"&&xe!=="AN"||(j=!0);for(let Ye=0;Ye=0&&R[ie]==="ET";ie--)R[ie]="EN";for(ie=ee+1;ie0?R[ee-1]:te)!=="L"?"R":"L";if(Q===((ie{const e=globalThis;if(e[um])return e[um];const t={configs:{},controllers:{},revision:Uo(0),preparedCache:new Map,blockEstimateCache:new Map};return e[um]=t,t})();let Ed=null;const dm=zs.revision;function Wx(e){var t;return e&&(t=zs.configs[e])!=null?t:null}function qx(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function C3e(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function fm(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!C3e(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function pm(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Ed!=null)return Ed;if(typeof document>"u")return!1;try{const l=document.createElement("canvas");return Ed=!!((i=l.getContext)!=null&&i.call(l,"2d")),Ed}catch{return Ed=!1,!1}})())return null;try{const i=Math.round(100*t)/100,l=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),r=zs.blockEstimateCache.get(l);if(r)return zs.blockEstimateCache.delete(l),zs.blockEstimateCache.set(l,r),{kind:"simple-text",height:r.height,contentHeight:r.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",c=(function(p,h,m){const k=`${m}\0${h}\0${p}`,x=zs.preparedCache.get(k);if(x)return zs.preparedCache.delete(k),zs.preparedCache.set(k,x),x.prepared;const y=(function(w,_,M){return(function(P,B,$,T){var I,N;const C=(I=T?.wordBreak)!=null?I:"normal",O=(N=T?.letterSpacing)!=null?N:0;return x3e(c3e(P,F5(),T?.whiteSpace,C),B,!1,C,O)})(w,_,0,M)})(p,h,{whiteSpace:m});for(zs.preparedCache.set(k,{prepared:y});zs.preparedCache.size>240;){const w=zs.preparedCache.keys().next().value;if(!w)break;zs.preparedCache.delete(w)}return y})(e,n.font,a),u=(function(p,h,m){const k=w3e(p,h);return{lineCount:k,height:k*m}})(c,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,u.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(zs.blockEstimateCache.set(l,{height:f,contentHeight:Math.round(d)});zs.blockEstimateCache.size>4e3;){const p=zs.blockEstimateCache.keys().next().value;if(!p)break;zs.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function rL(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=fm(e.children);return i&&n.paragraph?pm(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),l=fm(e.children),r=n.headings[i];return l&&r?pm(l,t,r):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const l=fm((s=i[0])==null?void 0:s.children);return l?pm(l,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let l=Math.max(0,n.listWrapperOverhead);for(const r of i){const a=rL(r,t,n);if(!a)return null;l+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(l)),contentHeight:Math.max(1,Math.round(l))}}return null}function Id(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function l0(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function hm(e,t,n=0){return e.diff?Tv(t??{},n)?(function(o){const s=l0(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(l=>!S3e.some(r=>l.startsWith(r))).length):Math.max(1,i.length)}return Id(l0(o.originalCode))+Id(l0(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(Id(l0(s)),Id(l0(i)));const l=l0(o.code).split(/\r?\n/);let r=0,a=0;for(const c of l)c.startsWith("+")&&!c.startsWith("+++")?a++:c.startsWith("-")&&!c.startsWith("---")?r++:(r++,a++);return Math.max(1,r,a)})(e):Id(l0(e.code,e.loading===!0))}function M3e(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function mm(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=qx(o.lineHeight,1.5*qx(o.fontSize,16)),l=e.getBoundingClientRect().width,r=t.getBoundingClientRect().width;return{font:M3e(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,l-r),whiteSpace:n}}const A3e=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function Ux(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[l,r]of Object.entries(i))A3e.has(l)||s.has(l)||r.enumerable&&"value"in r&&(o[l]=r.value);return o}function Zx(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),l=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=l);const r=Math.max(0,i-l),a=[-r,r];let c=a[0],u=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=o.getNormalizedScrollTop(e,t,!1),h=Math.abs(p-l);hd&&(e.scrollTop=c)}function Kx(e,t){let n=0,o=null,s=null;const i=()=>{const l=s;s=null,o=null,l&&(n=Date.now(),e(...l))};return function(...l){const r=Date.now(),a=t-(r-n);s=l,a<=0?(o&&(clearTimeout(o),o=null),n=r,s=null,e(...l)):o||(o=setTimeout(i,a))}}function Gx(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const aL=Symbol("MarkstreamMathBlockMinHeightCache");function XZe(){return fn(aL,null)}const T3e=new Set(["text","inline_code","emoji","footnote_reference"]),E3e=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function $d(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function r0(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),l=s.split(/\r?\n/).length,r=Math.ceil(s.length/i),a=Math.max(1,l,r);return Math.max(n,Math.ceil(a*o+12))}function cL(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(T3e.has(o))return!0;if(!E3e.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(cL)}function v7(e){var t,n,o,s,i,l,r,a;if(!e||typeof e!="object")return"";const c=e,u=String((t=c.type)!=null?t:"");if(u==="text")return String((o=(n=c.content)!=null?n:c.raw)!=null?o:"");if(u==="inline_code")return String((l=(i=(s=c.code)!=null?s:c.content)!=null?i:c.raw)!=null?l:"");if(u==="emoji")return String((a=(r=c.name)!=null?r:c.raw)!=null?a:"");if(typeof c.text=="string")return c.text;const d=[];for(const f of["children","items","cells","rows"]){const p=c[f];if(Array.isArray(p)){const h=p.map(v7).filter(Boolean).join(" ");h&&d.push(h)}}return d.join(" ").replace(/\s+/g," ").trim()}function uL(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(uL)})}function I3e(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function $3e(e,t){var n,o,s,i,l,r,a,c,u,d,f,p,h,m;if(!e||typeof e!="object")return 32;const k=e,x=String((n=k.type)!=null?n:""),y=Number.isFinite(t)&&t>0?t:640;switch(x){case"heading":return(function(w){var _;const M=Number((_=w.level)!=null?_:w.depth);return M>=4?20:M===3?30:M===2?32:44})(k);case"paragraph":return(function(w,_){const M=String(w??"");if(!M)return 28;const P=Math.max(18,Math.floor(Math.max(320,_)/8)),B=M.split(/\r?\n/).length,$=Math.ceil(M.length/P);return Math.max(1,B,$)<=1?28:r0(M,_,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),y);case"list":return(function(w,_){var M;const P=Array.isArray(w.items)?w.items:[];if(!P.length)return 48;const B=Math.max(48,30*P.length+12);let $=12;for(const N of P)$+=I3e(v7(N)||String((M=N.raw)!=null?M:""),_);const T=Math.max(0,$-B);if(P.length>20){const N=Math.round(2.4*P.length);return Math.round(B+Math.max(N,Math.min(T,3*P.length)))}if(T<=0)return B;const I=P.length>8?8*P.length:T;return Math.round(B+Math.min(T,I))})(k,y);case"list_item":return r0(String((l=(i=k.raw)!=null?i:k.content)!=null?l:""),y,34);case"blockquote":return r0(String((a=(r=k.raw)!=null?r:k.content)!=null?a:""),y,56);case"table":return(function(w,_){const M=[...w.header?[w.header]:[],...Array.isArray(w.rows)?w.rows:[]];if(!M.length){const P=Array.isArray(w.children)?w.children.length:3;return Math.max(120,38*P+48)}return Math.max(120,Math.round(4+M.reduce((P,B)=>P+(function($,T){const I=Math.max(1,$.length),N=Math.max(80,(T-32)/I),C=Math.max(10,Math.floor(N/8)),O=Math.max(1,...$.map(H=>{var D;const A=v7(H)||String((D=H?.raw)!=null?D:"");return Math.ceil(A.length/C)||1}));return 54+34*Math.max(0,O-1)+(I<=3&&$.some(uL)?14:0)})((function($){var T;return Array.isArray($?.cells)&&(T=$.cells)!=null?T:[]})(B),_),0)))})(k,y);case"code_block":{const w=String((c=k.language)!=null?c:"").trim().toLowerCase(),_=String((d=(u=k.code)!=null?u:k.raw)!=null?d:"");return w==="mermaid"?I5(T5(_)):w==="infographic"?$5(E5(_)):r0(_,y,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(w,_){var M,P,B;const $=w.match(/^\s*]*)>/i);return $&&!/(?:^|\s)open(?:\s|=|$)/i.test((M=$[1])!=null?M:"")?r0(((B=(P=w.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:P[1])==null?void 0:B.replace(/<[^>]*>/g,"").trim())||"Details",_,28,28):r0(w,_,96)})(String((p=(f=k.raw)!=null?f:k.content)!=null?p:""),y);case"thematic_break":return 24;default:return r0(String((m=(h=k.raw)!=null?h:k.content)!=null?m:""),y,40)}}function Yx(e,t,n){return Math.min(Math.max(e,t),n)}const L3e=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],N3e=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],z3e=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),dL=["raw","content","code","originalCode","updatedCode"],Xx=new WeakMap,Jx=new WeakMap;let B3e=1;function er(){return typeof performance<"u"?performance.now():Date.now()}function Qx(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function nl(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=Xx.get(t);return n||(n=B3e++,Xx.set(t,n)),String(n)}function eS(e,t,n,o={}){var s,i;const l=o.includeFinal!==!1,r={md:nl(t),customMarkdownIt:nl(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:nl(e.validateLink),preTransformTokens:nl(e.preTransformTokens),postTransformTokens:nl(e.postTransformTokens),postTransformNodes:nl(e.postTransformNodes)};return l&&(r.final=e.final===!0),JSON.stringify(r)}function tS(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` -`,t-1)+1;return e.slice(n,t).trim()}function nS(e){const t=fL(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function fL(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function pL(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function Bv(e){const t=String(e??"");return`${t.length}:${pL(t)}`}function y7(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(l){return l.length<=8192?Bv(l):`${l.length}:${pL(l.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${nl(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${nl(o)}`;const i=nl(o);if(t.set(o,i),Array.isArray(e)){const l=e.slice(0,200);return`a:${e.length}:${l.map(r=>y7(r,t,n+1)).join(",")}`}if(typeof e=="object"){const l=e,r=Object.keys(l).sort(),a=r.slice(0,80);return`o:${r.length}:${a.sort().map(c=>`${c}:${y7(l[c],t,n+1)}`).join(";")}`}return typeof e}function j5(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function hL(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>j5(o)?C1(o,t,n+1):hL(o,t,n+1)).join(",")}`:j5(e)?C1(e,t,n):y7(e,t,n)}function R3e(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!dL.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${Bv(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${nl(s)}`:z3e.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${hL(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${nl(s)}`:""}).filter(Boolean).join(";")}function P3e(e){return dL.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${Bv(n)}`:""}).filter(Boolean).join(";")}function C1(e,t=new WeakMap,n=0){const o=Jx.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${nl(s)}`;const l=nl(s);t.set(s,l);const r=(function(a,c,u){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(h=>C1(h,c,u+1)).join("|"):"";return[a.type,P3e(d),R3e(d,c,u),f.length,p].join(":")})(e,t,n);return Jx.set(s,r),r}function mL(e,t){return C1(e)===C1(t)}function Rv(e,t,n){const o=er(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=er()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function oS(e,t,n){return Rv(t,n,()=>C1(e))}function gL(e,t,n){return oS(e,n,"stabilizeSignatureMs")===oS(t,n,"stabilizeSignatureMs")}function F3(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function sS(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function iS(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function F3e(e,t){return e.length===t.length&&e===t}function Pv(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(u=>u!=="type"&&u!=="children").sort(),l=Object.keys(s).filter(u=>u!=="type"&&u!=="children").sort();if(i.length!==l.length)return!1;for(let u=0;u{o=Pv(e,t)}),o??gL(e,t,n)}function H3e(e,t){const n={};for(const o of L3e){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function D3e(e,t){var n;const o=nx(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:z(()=>!1),l=V(t.renderContent.value);let r=[],a="",c="",u="",d=!1;const f=(function(){let H="",D=0,A=!1,R=!1,j=!1,q=!1;function K(){H="",D=0,A=!1,R=!1,j=!1,q=!1}function U(te){let J=!1;for(let ee=0;ee{if(!te||!J.startsWith(te)||J.length<=te.length)return K(),[!0,0];let ee=0;H!==te&&(K(),U(te),ee=te.length);const ie=J.slice(te.length),Q=U(ie);return H=J,[Q,ee+ie.length]}})();let p,h=0,m=0,k=er(),x=-1,y=0;function w(H){x=Number.isInteger(H)?H:0,y+=1}function _(){p&&(clearTimeout(p),p=void 0)}function M(){_();const H=t.renderContent.value;l.value!==H&&(l.value=H),k=er()}Ze([t.renderContent,t.effectiveFinal,i],([H,D,A])=>{l.value!==H&&(!A||D||(function(R,j){if(!R&&j||j.length<=80||j.length\s*|`{3,}|~{3,})/.test(q))||q.endsWith(` -`)&&!(function(K){const U=tS(K);if(nS(U))return!1;const te=fL(U);return te.length>=2&&te.some(J=>J.trim())})(j))})(l.value,H)?M():(function(){if(m+=1,p)return;const R=Math.max(0,(function(j){const q=j.parseCoalesceMs;return typeof q=="number"&&Number.isFinite(q)&&q>=0?q:80})(e)-(er()-k));R<=0?M():p=setTimeout(M,R)})())},{flush:"sync",immediate:!0}),Bu(_);const P=z(()=>{var H,D,A,R;return Qre(e.customHtmlTags,(H=e.parseOptions)==null?void 0:H.customHtmlTags,(R=(A=(D=t.customComponentsMap)==null?void 0:D.value)!=null?A:{},Object.entries(R).map(([j,q])=>{const K=Vl(j);return q==null||!K||Cf(K)||SI.has(K)||kf.has(K)?"":K}).filter(Boolean)))}),B=z(()=>{const{key:H,tags:D}=eae(P.value);if(!H)return o;const A=s.get(H);if(A)return A;const R=nx(t.instanceMsgId,{customHtmlTags:D});return s.set(H,R),R}),$=z(()=>{const H=B.value;if(!e.customMarkdownIt)return H;const D=e.customMarkdownIt(H);return H.__markstreamHasCustomParserExtensions=!0,D.__markstreamHasCustomParserExtensions=!0,D}),T=z(()=>{var H,D;const A=(H=e.parseOptions)!=null?H:{},R=t.effectiveFinal.value,j=P.value,q=R!=null,K=j.length>0;return q||K||A.streamParse==null?xt(xt(wn(xt({},A),{streamParse:(D=A.streamParse)==null||D}),q?{final:R}:{}),K?{customHtmlTags:j}:{}):A}),I=z(()=>{var H;return new Set(((H=T.value.customHtmlTags)!=null?H:[]).map(D=>String(D).trim().toLowerCase()).filter(Boolean))}),N=z(()=>eS(T.value,$.value,e.customMarkdownIt,{includeFinal:!0})),C=z(()=>eS(T.value,$.value,e.customMarkdownIt,{includeFinal:!1}));Ze([N,C],([H,D],[A,R])=>{A&&(H===A&&D===R||(M(),D!==R&&(r=[],u="")))},{flush:"sync"});const O=z(()=>{var H,D,A,R,j,q,K,U,te,J,ee;if((H=e.nodes)!=null&&H.length)return r=[],u="",w(0),$t(e.nodes.slice());const ie=l.value;if(!ie)return r=[],u="",w(-1),[];const Q=t.debugPerformanceEnabled.value,he=Q?er():0,xe=$.value,Ye=N.value,st=C.value;a&&Ye!==a&&(function(Ke){var Qe,mt;(mt=(Qe=Ke.stream)==null?void 0:Qe.reset)==null||mt.call(Qe)})(xe),c&&st!==c&&(r=[],u="");const X=Object.keys((A=(D=t.customComponentsMap)==null?void 0:D.value)!=null?A:{}).length>0||typeof T.value.postTransformNodes=="function";X!==d&&(r=[],u="");const se=!X&&r.length>0&&ie.startsWith(u)&&st===c,F=Q?Qx(xe):null,Z=Q?{}:void 0,fe=iS(xe),ve=!fe&&!X,ge=xt(xt(wn(xt({},T.value),{__reuseStableTopLevelNodes:ve}),fe?{__disableStreamParse:!0}:{}),Z?{__timing:Z}:{}),oe=C$(ie,xe,ge),de=Q?er():0,ke=Q?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let Se,me=Q?F3(oe.length):void 0,Ae=0,le=0,be=0;if(se){const Ke=Q?er():0,[Qe,mt]=(function(qt){var nn,Jt;const[kn,Dn]=qt.scanGlobalReferenceAppend(qt.previousContent,qt.content),xn=qt.parseOptions;return[qt.previousDirtyStartIndex>0&&xn.final!==!0&&!qt.customMarkdownIt&&!iS(qt.md)&&!kn&&typeof xn.preTransformTokens!="function"&&typeof xn.postTransformTokens!="function"&&typeof xn.postTransformNodes!="function"&&((Jt=(nn=xn.customHtmlTags)==null?void 0:nn.length)!=null?Jt:0)===0?qt.previousDirtyStartIndex:0,Dn]})({content:ie,previousContent:u,previousDirtyStartIndex:x,parseOptions:T.value,customMarkdownIt:e.customMarkdownIt,md:xe,scanGlobalReferenceAppend:f});be=mt;const Tt=Qe<=0;if(ke){const qt=(function(nn,Jt,kn,Dn={}){var xn;if(!Jt.length)return{nodes:nn,metrics:F3(nn.length)};const Ln=(xn=Dn.scanStartIndex)!=null?xn:0,Hn=Dn.reuseDirtyTail!==!1,bn=(function(Mn,Nn,An,Qn=0){const Fn=Math.min(Mn.length,Nn.length);for(let Qt=Math.min(Fn,Math.max(0,Qn));QtC1(Ke[Tt]))})(Se,ke,le):(function(Ke,Qe=0){for(let mt=Math.max(0,Qe);mt((j=F?.total)!=null?j:0);t.logPerf(Qe?"parse(stream)":"parse(sync)",xt(xt(xt({rendererId:t.instanceMsgId,ms:Math.round(er()-he),nodes:Se.length,contentLength:ie.length,parseCommitCount:h,parseCoalescedCount:m,nodeReuseMs:_e,referenceDefinitionScanChars:be,signatureMs:(q=ke?.signatureMs)!=null?q:0,stabilizeSignatureMs:(K=ke?.stabilizeSignatureMs)!=null?K:0,primeSignatureMs:(U=ke?.primeSignatureMs)!=null?U:0,signatureCallCount:(te=ke?.signatureCallCount)!=null?te:0,stabilizeSignatureCallCount:(J=ke?.stabilizeSignatureCallCount)!=null?J:0,primeSignatureCallCount:(ee=ke?.primeSignatureCallCount)!=null?ee:0,stabilizeMs:Ae},me??{}),Z?Object.fromEntries(N3e.map(mt=>{var Tt;return[mt,(Tt=Z[mt])!=null?Tt:0]})):{}),Ke?{streamMode:Ke.lastMode,streamDelta:H3e(Ke,F),streamStats:Ke}:{}))}return $t(Se)});return{effectiveCustomHtmlTags:P,effectiveCustomHtmlTagsSet:I,mdBase:B,mdInstance:$,mergedParseOptions:T,getParsedNodesDirtyStartIndex:()=>x,getParsedNodesRevision:()=>y,parsedNodes:O}}function V3e(e){const{isClient:t}=e,n=V(new Set),o=new Map,s=new Map,i=new Map;function l(c){if(!t)return;const u=i.get(c);u!=null&&(window.clearTimeout(u),i.delete(c))}function r(){if(t)for(const c of i.values())window.clearTimeout(c);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:l,clearAllVisibilityFallbacks:r,markNodeVisible:function(c,u=!0){var d;u&&l(c),(function(f,p){if((m=(h=e.shouldTrackVisibleNodeIndices)==null?void 0:h.call(e))!=null&&!m)return;var h,m;const k=n.value,x=k.has(f);if(p){if(x)return;const w=new Set(k);return w.add(f),void(n.value=w)}if(!x)return;const y=new Set(k);y.delete(f),n.value=y})(c,u),u&&((d=e.onNodeMarkedVisible)==null||d.call(e,c))},resetNodeVisibleState:a,cleanupNodeVisibility:function(c){var u;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f{const u=s.getSnapshot();t.value=u.source,n.value=u.visible,o.value=u.done},l=s.subscribe(i);i();const r=z(()=>Math.max(0,t.value.length-n.value.length)),a=z(()=>r.value===0),c=z(()=>o.value&&a.value);return rg()&&Bu(()=>{l(),s.destroy()}),{source:t,visible:n,done:o,final:c,caughtUp:a,pendingChars:r,enqueue:u=>s.enqueue(u),finish:u=>s.finish(u),flush:()=>s.flush(),reset:u=>s.reset(u),pause:()=>s.pause(),resume:()=>s.resume()}}const q3e={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},lS=/auto|scroll|overlay/i;function U3e(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return lS.test(t)||lS.test(n)}function Z3e(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const K3e={class:"m-0 p-0"},G3e=["data-probe"],Y3e=ho(Je(wn(xt({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(g(),S("div",{class:"height-estimation-probes",style:Gt({width:`${e.width}px`}),"aria-hidden":"true"},[b("div",{ref:i=>e.setParagraphWrapper(i),class:Pe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[W(v(B0),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),b("div",{ref:i=>e.setListItemWrapper(i),class:Pe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[b("ul",K3e,[W(v(pu),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),b("div",{ref:i=>e.setListWrapper(i),class:Pe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[W(v(hu),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(g(),S(Ce,null,at(6,i=>b("div",{key:`probe-heading-${i}`,ref_for:!0,ref:l=>e.setHeadingWrapper(i,l),class:Pe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[W(v(qp),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,G3e)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),rS=Je({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=z(()=>{var n,o;return $5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:E5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),vn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),vn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,vn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"absolute inset-0"},[vn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),aS=Je({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=z(()=>{var n,o;return I5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:T5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),vn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[vn("span",{class:"action-icon block"})])))]):null,vn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),X3e={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function Vs(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const J3e=["data-custom-id"],Q3e=["data-node-index","data-node-type"],cS="typewriter-simple-cursor-target",vL=ho(Je(wn(xt({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(L){if(!(typeof Event<"u"&&L instanceof Event))return typeof L=="string"&&s("copy-code",L),void s("copy",L)}const l=Ts(),r=fn("markstreamNestedRendererProps",void 0);function a(L){const G=l?.vnode.props;return!!G&&(Object.prototype.hasOwnProperty.call(G,L)||Object.prototype.hasOwnProperty.call(G,String(L).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function c(L){var G,re;const ce=o[L];return a(L)?ce:(re=(G=r?.value)==null?void 0:G[L])!=null?re:ce}const u=z(()=>{return(L=c("mode"))==="chat"||L==="minimal"||L==="docs"?L:"docs";var L}),d=z(()=>Gx(c("typewriter"))),f=z(()=>d.value!=="off"),p=z(()=>c("domMode")==="minimal"?"minimal":"full"),h=z(()=>{return(L={mode:u.value,codeRenderer:c("codeRenderer"),renderCodeBlocksAsPre:c("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":L.codeRenderer==="pre"||L.codeRenderer==="shiki"||L.codeRenderer==="monaco"?L.codeRenderer:L.renderCodeBlocksAsPre===!1||L.mode==="docs"?"monaco":"pre";var L}),m=z(()=>X3e[u.value]),k=z(()=>{var L;return(L=c("showTooltips"))!=null?L:m.value.showTooltips}),x=z(()=>{var L;return(L=c("fade"))!=null?L:m.value.fade}),y=z(()=>{var L;return(L=c("batchRendering"))!=null?L:m.value.batchRendering}),w=z(()=>{var L;return(L=c("initialRenderBatchSize"))!=null?L:m.value.initialRenderBatchSize}),_=z(()=>{var L;return(L=c("renderBatchSize"))!=null?L:m.value.renderBatchSize}),M=z(()=>{var L;return(L=c("renderBatchDelay"))!=null?L:m.value.renderBatchDelay}),P=z(()=>{var L;return(L=c("renderBatchBudgetMs"))!=null?L:m.value.renderBatchBudgetMs}),B=z(()=>{var L;return(L=c("renderBatchIdleTimeoutMs"))!=null?L:m.value.renderBatchIdleTimeoutMs}),$=z(()=>{var L;return(L=c("deferNodesUntilVisible"))!=null?L:m.value.deferNodesUntilVisible}),T=z(()=>{var L;return(L=c("maxLiveNodes"))!=null?L:m.value.maxLiveNodes}),I=z(()=>{var L;return(L=c("liveNodeBuffer"))!=null?L:m.value.liveNodeBuffer}),N=z(()=>{var L;return(L=c("nodeVirtual"))!=null?L:m.value.nodeVirtual}),C={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return c("parseOptions")},get customMarkdownIt(){return c("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return c("customHtmlTags")},get mode(){return c("mode")},get domMode(){return p.value},get htmlPolicy(){return c("htmlPolicy")},get viewportPriority(){return c("viewportPriority")},get viewportPriorityOptions(){return c("viewportPriorityOptions")},get codeBlockStream(){return c("codeBlockStream")},get codeBlockDarkTheme(){return c("codeBlockDarkTheme")},get codeBlockLightTheme(){return c("codeBlockLightTheme")},get codeBlockMonacoOptions(){return c("codeBlockMonacoOptions")},get codeRenderer(){return c("codeRenderer")},get renderCodeBlocksAsPre(){return c("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return c("codeBlockMinWidth")},get codeBlockMaxWidth(){return c("codeBlockMaxWidth")},get codeBlockProps(){return c("codeBlockProps")},get mermaidProps(){return c("mermaidProps")},get d2Props(){return c("d2Props")},get infographicProps(){return c("infographicProps")},get showTooltips(){return k.value},get themes(){return c("themes")},get langs(){return c("langs")},get isDark(){return c("isDark")},get customId(){return c("customId")},get indexKey(){return o.indexKey},get typewriter(){return c("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return c("smoothStreamingOptions")},get parseCoalesceMs(){return c("parseCoalesceMs")},get fade(){return x.value},get batchRendering(){return y.value},get initialRenderBatchSize(){return w.value},get renderBatchSize(){return _.value},get renderBatchDelay(){return M.value},get renderBatchBudgetMs(){return P.value},get renderBatchIdleTimeoutMs(){return B.value},get deferNodesUntilVisible(){return $.value},get maxLiveNodes(){return T.value},get liveNodeBuffer(){return I.value},get nodeVirtual(){return N.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function O(L){s("height-change",L)}function H(L){s("virtual-state-change",L)}function D(L){s("anchor-change",L)}const A=V(),R=V(null),j=V(null),q=V(null),K=ds({1:null,2:null,3:null,4:null,5:null,6:null}),U=V(!1),te=new Map,J=V(0),ee=V(0),ie=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Q(L,G){return typeof L!="string"?G:L.trim()||G}function he(L){const G=Number(L);return Number.isFinite(G)&&G>0?Math.max(1,Math.trunc(G)):640}const xe=z(()=>{var L;const G=(L=C.viewportPriorityOptions)!=null?L:{},re=Q(G.rootMargin,j0);return{rootMargin:re,heavyBlockMargin:Q(G.heavyBlockMargin,re),maxTargets:he(G.maxTargets)}}),Ye=z(()=>{var L;return(L=xe.value.rootMargin)!=null?L:j0}),st=z(()=>{var L;return(L=xe.value.maxTargets)!=null?L:640});function X(){var L,G;if(((L=o.virtualScroll)==null?void 0:L.enabled)!==!0)return null;const re=(G=o.virtualScroll)==null?void 0:G.scrollRoot;return se(typeof re=="function"?re():re)}function se(L){return L?typeof HTMLElement<"u"&&L instanceof HTMLElement?L:typeof L=="object"&&"value"in L?se(L.value):typeof L=="object"&&"$el"in L?se(L.$el):null:null}qn(eL,xe);const{isClient:F,renderAsFragment:Z,debugPerformanceEnabled:fe,resolvedShowTooltips:ve,resolvedHtmlPolicy:ge,inheritedSmoothStreaming:oe,ownsTypewriterCursor:de}=(function(L){const G=typeof window<"u",re=mf(),ce=fn("markstreamHtmlPolicy",void 0),ye=fn("markstreamTypewriterCursor",void 0),Re=fn("markstreamSmoothStreaming",void 0),He=z(()=>L.renderAsFragment===!0),qe=z(()=>!!(L.debugPerformance&&G&&typeof console<"u")),ut=z(()=>{var ct;if(typeof L.showTooltips=="boolean")return L.showTooltips;const De=(ct=re.showTooltips)!=null?ct:re["show-tooltips"];return De===""||De===!0||De==="true"||De!==!1&&De!=="false"&&void 0}),Ue=z(()=>{var ct,De;return(De=(ct=L.htmlPolicy)!=null?ct:ce?.value)!=null?De:"safe"}),tt=z(()=>ye?.value!==!0);return{isClient:G,renderAsFragment:He,debugPerformanceEnabled:qe,resolvedShowTooltips:ut,resolvedHtmlPolicy:Ue,inheritedSmoothStreaming:Re,inheritedTypewriterCursor:ye,ownsTypewriterCursor:tt}})(C),{resolveViewportRoot:ke,resolveScrollContainer:Se,isReverseFlexScrollRoot:me,getNormalizedScrollTop:Ae,getOffsetTopWithinRoot:le}=(function(L,G){function re(){var qe,ut;return(ut=(qe=G.scrollRoot)==null?void 0:qe.call(G))!=null?ut:null}function ce(qe){if(typeof window>"u")return null;const ut=re();if(ut)return ut;const Ue=qe??L.value;if(!Ue)return null;const tt=Ue.ownerDocument||document,ct=tt.scrollingElement||tt.documentElement;let De=Ue;for(;De&&De!==tt.body&&De!==ct;){if(U3e(window.getComputedStyle(De))&&Z3e(De))return De;De=De.parentElement}return null}function ye(qe){if(!G.isClient)return!1;try{const ut=window.getComputedStyle(qe);return!!(ut.display||"").toLowerCase().includes("flex")&&(ut.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Re(qe,ut,Ue){var tt,ct;if(Ue)return He(ut);const De=qe.scrollTop;if(!ye(qe))return De;const nt=De<0?-De:De;return Math.max(0,((tt=qe.scrollHeight)!=null?tt:0)-((ct=qe.clientHeight)!=null?ct:0))-nt}function He(qe){var ut,Ue,tt,ct,De;const nt=Number((ut=qe.scrollingElement)==null?void 0:ut.scrollTop),gt=Number((tt=(Ue=qe.documentElement)==null?void 0:Ue.scrollTop)!=null?tt:0),ht=Number((De=(ct=qe.body)==null?void 0:ct.scrollTop)!=null?De:0);return Math.max(0,Number.isFinite(nt)?nt:0,Number.isFinite(gt)?gt:0,Number.isFinite(ht)?ht:0)}return{resolveViewportRoot:ce,resolveScrollContainer:function(qe){var ut,Ue,tt,ct;const De=re();if(De)return De;const nt=ce((ut=qe??L.value)!=null?ut:null);if(nt)return nt;const gt=(ct=(tt=qe?.ownerDocument)!=null?tt:(Ue=L.value)==null?void 0:Ue.ownerDocument)!=null?ct:typeof document<"u"?document:null;return gt?.scrollingElement||gt?.documentElement||null},isReverseFlexScrollRoot:ye,getNormalizedScrollTop:Re,getOffsetTopWithinRoot:function(qe,ut){const Ue=ut.ownerDocument||qe.ownerDocument||document;if((function(nt,gt){return nt===gt.documentElement||nt===gt.body||nt===gt.scrollingElement})(ut,Ue))return qe.getBoundingClientRect().top+He(Ue);const tt=ut.getBoundingClientRect(),ct=qe.getBoundingClientRect(),De=Re(ut,Ue,!1);return ct.top-tt.top+De}}})(A,{isClient:F,scrollRoot:X});qn("markstreamShowTooltips",ve),qn("markstreamHtmlPolicy",ge),qn("markstreamTypewriter",f),qn("markstreamFade",z(()=>C.fade!==!1)),qn("markstreamTypewriterCursor",z(()=>!0)),qn("markstreamTextStreamState",te),qn("markstreamStreamVersion",J),qn("markstreamParseOptions",z(()=>C.parseOptions)),qn("markstreamCustomMarkdownIt",z(()=>C.customMarkdownIt));const{smoothStreamingEnabled:be,renderContent:_e,requestedFinal:Ke,effectiveFinal:Qe}=(function(L,G){const re=W3e(xt(xt({},q3e),L.smoothStreamingOptions)),ce=z(()=>{var De,nt,gt;return L.smoothStreaming!==!1&&!((De=L.nodes)!=null&&De.length)&&(L.smoothStreaming===!0||!((nt=G.inheritedSmoothStreaming)!=null&&nt.value))&&(L.smoothStreaming===!0||Gx(L.typewriter)!=="off"||((gt=L.maxLiveNodes)!=null?gt:0)<=0)}),ye=V(!G.isClient||L.smoothStreaming===!0);In(()=>{ye.value=!0});const Re=z(()=>ye.value&&ce.value),He=z(()=>{var De;return Re.value?re.visible.value:(De=L.content)!=null?De:""}),qe=z(()=>{var De,nt;const gt=(De=L.parseOptions)!=null?De:{};return(nt=L.final)!=null?nt:gt.final}),ut=z(()=>{const De=qe.value;return Re.value&&De!=null?!!De&&re.caughtUp.value:De});let Ue=0,tt=!1;function ct(){Ue=0,tt=!1}return Ze([()=>L.content,()=>L.nodes,Re,qe],([De,nt,gt,ht])=>{if(nt?.length)return ct(),void re.reset("");const Et=De??"";if(!gt)return ct(),re.reset(Et),void(ht&&re.finish({flush:!0}));const bt=re.source.value;if(Et){if(Et!==bt)if(Et.startsWith(bt)){const Ot=Et.slice(bt.length),Kt=re.pendingChars.value;Ot.length<=8?(Ue++,tt||Ue>=2&&Kt<=8?(tt=!0,re.reset(Et)):re.enqueue(Ot)):(ct(),re.enqueue(Ot))}else ct(),re.reset(Et)}else ct(),re.reset("");ht&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ce,smoothStreamingEnabled:Re,renderContent:He,requestedFinal:qe,effectiveFinal:ut}})(C,{isClient:F,inheritedSmoothStreaming:oe}),mt=Ke.value===!0;qn("markstreamSmoothStreaming",be);const Tt=V(!1),qt=V(!1),nn=V(!1);let Jt="",kn=!1,Dn=null;function xn(){F&&Dn!=null&&(window.clearTimeout(Dn),Dn=null)}function Ln(){Tt.value=!1,xn()}function Hn(L,G){if(!fe.value)return;const re=(function(){if(!fe.value)return null;const ce=Nn(bn),ye=Nn(Wn),Re=Math.max(Mn,ye);if(ce<=0&&Re<=0)return null;const He={total:ce,maxPerFrame:Re,byLabel:(qe=bn,Object.fromEntries(Array.from(qe.entries()).sort((ut,Ue)=>Ue[1]-ut[1]||ut[0].localeCompare(Ue[0]))))};var qe;return bn.clear(),Wn.clear(),Mn=0,He})();console.info(`[markstream-vue][perf] ${L}`,re?wn(xt({},G),{layoutReads:re}):G)}Ze([()=>C.indexKey,()=>C.customId],()=>{var L,G;Ln(),qt.value=!1,nn.value=!((L=o.nodes)!=null&&L.length)&&Ke.value!==!0&&!!o.content,Jt=(G=_e.value)!=null?G:"",kn=Jt.length>0},{flush:"sync"}),Ze([()=>o.content,()=>o.nodes,Ke],([L,G,re])=>{!G?.length&&re!==!0&&L&&(nn.value=!0)},{flush:"sync",immediate:!0}),Ze([_e,()=>o.nodes,Ke],([L,G,re])=>{const ce=L??"";return G?.length||re===!0?(Ln(),qt.value=!1,Jt=ce,void(kn=!0)):(ce.length>0&&(nn.value=!0),kn?(Jt&&ce.length>Jt.length&&ce.startsWith(Jt)?(Tt.value=!0,qt.value=!0,F&&(xn(),Dn=window.setTimeout(()=>{var ye;Dn=null,Qe.value===!0||(ye=o.nodes)!=null&&ye.length||(hc(),Tt.value=!1,Vr())},1200))):(ce.length"u")return null;const Re=window;if(Re.__markstreamLayoutReadPerformance)return Re.__markstreamLayoutReadPerformance;const He={total:0,maxPerFrame:0,byLabel:{}};return Re.__markstreamLayoutReadPerformance=He,He})();ye&&(ye.total=Number(ye.total||0)+1,ye.byLabel[ce]=Number(ye.byLabel[ce]||0)+1,ye.currentFrameTotal=Number(ye.currentFrameTotal||0)+1,ye.frameScheduled||(ye.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Qn(ye),0):queueMicrotask(()=>Qn(ye)):window.requestAnimationFrame(()=>Qn(ye))))})(L),Pn||(Pn=!0,F&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(An):typeof queueMicrotask!="function"?setTimeout(An,0):queueMicrotask(An)))}function Qt(L,G){return Fn(L),G()}const uo=C.customId?`renderer-${C.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Zn=(function(L){const G=new Map;return{scope:L,cache:G,clear:()=>G.clear()}})(uo),Bo=uo;qn(aL,Zn);const Un=Is(()=>C.customId),{effectiveCustomHtmlTagsSet:hs,mergedParseOptions:Io,parsedNodes:Bt,getParsedNodesDirtyStartIndex:Jo,getParsedNodesRevision:$s}=D3e(C,{instanceMsgId:uo,renderContent:_e,effectiveFinal:Qe,smoothStreamingEnabled:be,debugPerformanceEnabled:fe,customComponentsMap:Un,logPerf:Hn});Ze(Bt,()=>{Tt.value||Zn.clear(),J.value+=1},{immediate:!0});const ze=z(()=>({customId:C.customId,customHtmlTags:Io.value.customHtmlTags,parseOptions:C.parseOptions,customMarkdownIt:C.customMarkdownIt,htmlPolicy:ge.value,viewportPriority:C.viewportPriority,viewportPriorityOptions:xe.value,mode:u.value,domMode:C.domMode,codeRenderer:h.value,codeBlockStream:C.codeBlockStream,codeBlockDarkTheme:C.codeBlockDarkTheme,codeBlockLightTheme:C.codeBlockLightTheme,codeBlockMonacoOptions:C.codeBlockMonacoOptions,renderCodeBlocksAsPre:C.renderCodeBlocksAsPre,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockProps:C.codeBlockProps,mermaidProps:C.mermaidProps,d2Props:C.d2Props,infographicProps:C.infographicProps,showTooltips:ve.value,themes:C.themes,langs:C.langs,isDark:C.isDark,typewriter:f.value,smoothStreamingOptions:C.smoothStreamingOptions,parseCoalesceMs:C.parseCoalesceMs,fade:C.fade}));qn("markstreamNestedRendererProps",ze);const Ge=z(()=>Bt.value),ot=z(()=>Bt.value.length),dt=V(null),Ct=V(null),Ft=V(null),Ut=V(null),en=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),tn=!en&&C.customId?Wx(C.customId):null,eo=z(()=>tn?(dm.value,Wx(C.customId)):null),Ro=z(()=>{var L;return!!(!Z.value&&C.customId&&!en&&((L=eo.value)!=null&&L.enabled))}),Ls=z(()=>!!(F&&Ro.value)),Do=z(()=>{var L;return!!(!Z.value&&((L=o.virtualScroll)!=null&&L.enabled))}),Ve=z(()=>Do.value),it=V(!1);In(()=>{it.value=!0});const Xe=z(()=>!!(F&&Do.value));qn("markstreamHostScrollManaged",Xe);const We=z(()=>!!(it.value&&Xe.value)),je=z(()=>Ls.value||Xe.value),kt=z(()=>Ls.value||We.value),It=z(()=>{var L;return je.value&&((L=eo.value)==null?void 0:L.textEstimation)!==!1});function cn(){const L=ee.value||Qt("getMeasuredContainerWidth.clientWidth",()=>{var G;return((G=A.value)==null?void 0:G.clientWidth)||0});return Number.isFinite(L)&&L>0?L:0}const So=z(()=>{const L=cn();return L>0?Math.max(1,Math.round(L)):640}),Qo=z(()=>{var L,G;return!(Qe.value!==!0||Do.value||u.value!=="chat"&&u.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(L=o.nodes)!=null&&L.length||nn.value||!(((G=C.maxLiveNodes)!=null?G:0)<=0))}),Po=z(()=>{var L;return Qo.value?50:Math.max(1,(L=C.maxLiveNodes)!=null?L:320)}),Xn=z(()=>{var L;return Qo.value?16:Math.max(0,(L=C.liveNodeBuffer)!=null?L:60)}),pn=z(()=>{var L;return!Z.value&&C.nodeVirtual!==!1&&!(((L=C.maxLiveNodes)!=null?L:0)<=0&&!Qo.value)&&(C.nodeVirtual===!0?Bt.value.length>0:Bt.value.length>Po.value)}),Us=z(()=>pn.value||Ls.value||Xe.value),mi=z(()=>C.viewportPriority!==!1),oi=z(()=>!!mi.value&&!U.value);var ql;ql=z(()=>mi.value),qn(tL,ql);const vl=z(()=>{var L;return!(Z.value||C.deferNodesUntilVisible===!1||((L=C.maxLiveNodes)!=null?L:0)<=0||pn.value||Bt.value.length>900||C.viewportPriority===!1)}),Zs=_2e(L=>{var G;return ke((G=L??A.value)!=null?G:null)},mi),{requestFrame:yo,cancelFrame:$o,hasIdleCallback:yl,isTestEnv:ms}=(function(L){const G=L.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,re=L.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ce=L.isClient&&typeof window.requestIdleCallback=="function",ye=(function(){var Re;if(typeof globalThis>"u"||!("process"in globalThis))return;const He=(Re=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Re.value;return He?.env})();return{requestFrame:G,cancelFrame:re,hasIdleCallback:ce,isTestEnv:ye?.NODE_ENV==="test"}})({isClient:F}),wl=z(()=>Qe.value===!0&&!Do.value),{resolvedBatchSize:gi,resolvedInitialBatch:si,batchingEnabled:Ul,incrementalRenderingActive:Ni,renderedCount:Te,previousRenderContext:$e,adaptiveBatchSize:Mt,previousBatchConfig:rt}=(function(L,G){var re;const ce=z(()=>{var ct;const De=Math.trunc((ct=L.renderBatchSize)!=null?ct:80);return Number.isFinite(De)?Math.max(0,De):0}),ye=z(()=>{var ct;const De=Math.trunc((ct=L.initialRenderBatchSize)!=null?ct:ce.value);return Number.isFinite(De)?Math.max(0,De):ce.value}),Re=z(()=>!G.renderAsFragment.value&&L.batchRendering!==!1&&ce.value>0&&G.isClient&&!G.isTestEnv),He=V(0),qe=V({key:L.indexKey,total:0}),ut=V(Math.max(1,ce.value||1)),Ue=z(()=>{var ct,De,nt;return Re.value&&!((ct=G.continuousStreaming)!=null&&ct.value)&&!((De=G.forceFullRenderFinalContent)!=null&&De.value)&&((nt=L.maxLiveNodes)!=null?nt:0)<=0}),tt=V({batchSize:ce.value,initial:ye.value,delay:(re=L.renderBatchDelay)!=null?re:16,enabled:Ue.value});return{resolvedBatchSize:ce,resolvedInitialBatch:ye,batchingEnabled:Re,incrementalRenderingActive:Ue,renderedCount:He,previousRenderContext:qe,adaptiveBatchSize:ut,previousBatchConfig:tt}})(C,{isClient:F,isTestEnv:ms,renderAsFragment:Z,forceFullRenderFinalContent:wl,continuousStreaming:z(()=>qt.value&&Qe.value!==!0)}),mn=z(()=>{var L;return!Z.value&&C.batchRendering!==!1&&gi.value>0&&!ms&&((L=C.maxLiveNodes)!=null?L:0)<=0&&!wl.value}),Kn=z(()=>mn.value),to=z(()=>je.value||Kn.value),Co=z(()=>{var L;return to.value&&((L=eo.value)==null?void 0:L.codeBlockEstimation)!==!1}),no=new Map,Vo=new Map,Qi=new WeakMap;let Os=null;const Ea=new WeakMap,Wo=new Map,zi=[];let gs=[],kl=[],es=-1;const Hs=Uo(zi),vs=new Set,bl=V(0);let Ks=0;const ne=V(0),we=z(()=>(ne.value,Array.from(no.entries()).sort((L,G)=>L[0]-G[0]))),Ee=V(null),Be=V(null);let et,pt=null,jt=0,Zt=null;function Vt(){et.markFallbackHeightPrefixDirty()}function Wt(L){return et.getFallbackNodeHeight(L)}function on(L,G){return et.estimateHeightRange(L,G)}function Vn(L){return et.estimateIndexForOffset(L)}const{activeRestoreAnchor:Ht,getRelativeScrollTopWithinContainer:Tn,setRelativeScrollTopWithinContainer:zn,resolveAnchorOffset:Ns,clearRestoreReconcile:rs,scheduleRestoreReconcile:_l,captureRestoreAnchor:J0,restoreAnchor:Q0,getAnchorDrift:qu}=(function(L){const{isClient:G,containerRef:re,parsedNodeCount:ce,requestFrame:ye,cancelFrame:Re,resolveScrollContainer:He,getNormalizedScrollTop:qe,getOffsetTopWithinRoot:ut,isReverseFlexScrollRoot:Ue,estimateIndexForOffset:tt,estimateHeightRange:ct,getFallbackNodeHeight:De,clamp:nt}=L,gt=V(null);let ht=null,Et=[];function bt(){const un=He(),$n=re.value;if(!un||!$n)return null;const On=un.ownerDocument||$n.ownerDocument||document;if(un===On.documentElement||un===On.body||un===On.scrollingElement){const wo=$n.getBoundingClientRect();return Math.max(0,-wo.top)}return Math.max(0,qe(un,On,!1)-ut($n,un))}function Ot(un){var $n;const On=He(),wo=re.value;if(!On||!wo)return;const Ys=Math.max(0,un),Ds=On.ownerDocument||wo.ownerDocument||document,Xl=Ds.defaultView||(typeof window<"u"?window:null);if(On===Ds.documentElement||On===Ds.body||On===Ds.scrollingElement){const gr=qe(On,Ds,!0)+wo.getBoundingClientRect().top;return void(($n=Xl?.scrollTo)==null||$n.call(Xl,0,Math.max(0,gr+Ys)))}Zx(On,Ds,ut(wo,On)+Ys,{isReverseFlexScrollRoot:gr=>{var md;return(md=Ue?.(gr))!=null&&md},getNormalizedScrollTop:qe})}function Kt(un){const $n=ce.value,On=nt(un.nodeIndex,0,Math.max(0,$n-1));return ct(0,On)+Math.max(0,un.offsetWithinNodePx)}function an(){if(ht!=null&&(Re?.(ht),ht=null),G)for(const un of Et)window.clearTimeout(un);Et=[]}function sn(un){const $n=Kt(un),On=bt();On!=null&&Math.abs(On-$n)<=.5||Ot($n)}return{activeRestoreAnchor:gt,getRelativeScrollTopWithinContainer:bt,setRelativeScrollTopWithinContainer:Ot,resolveAnchorOffset:Kt,clearRestoreReconcile:an,applyRestoreAnchor:sn,scheduleRestoreReconcile:function(){gt.value&&G&&ht==null&&(ht=ye?ye(()=>{ht=null,gt.value&&sn(gt.value)}):null,ht==null&>.value&&sn(gt.value))},captureRestoreAnchor:function(){const un=bt(),$n=ce.value;if(un==null||$n<=0)return null;const On=nt(tt(un+1),0,$n-1),wo=ct(0,On),Ys=De(On);return{nodeIndex:On,offsetWithinNodePx:nt(un-wo,0,Math.max(0,Ys-1))}},restoreAnchor:function(un){const $n=ce.value;if(gt.value={nodeIndex:nt(un.nodeIndex,0,Math.max(0,$n-1)),offsetWithinNodePx:Math.max(0,un.offsetWithinNodePx)},an(),sn(gt.value),G)for(const On of[0,120,280,480])Et.push(window.setTimeout(()=>{gt.value&&sn(gt.value)},On))},getAnchorDrift:function(un){const $n=bt();return $n==null?null:$n-Kt(un)}}})({isClient:F,containerRef:A,parsedNodeCount:ot,requestFrame:yo,cancelFrame:$o,resolveScrollContainer:()=>Ee.value||Se(),getNormalizedScrollTop:Ae,getOffsetTopWithinRoot:le,isReverseFlexScrollRoot:me,estimateIndexForOffset:Vn,estimateHeightRange:on,getFallbackNodeHeight:Wt,clamp:Gs}),{nodeHeights:hr,heightStats:ts,heightTreeSize:Pr,heightSumTree:Uu,heightKnownTree:ec,averageNodeHeight:Fr,resetHeightMeasurements:F1,pruneHeightMeasurements:j1,rebuildHeightTrees:Fe,recordNodeHeight:pe,removeNodeHeights:Ne,exportHeightCache:Sn,importHeightCache:ii,fenwickRangeSum:el}=(function(L={}){const G=ds({}),re=ds({total:0,count:0}),ce=V(0),ye=V([]),Re=V([]);function He(){for(const De of Object.keys(G))delete G[Number(De)];re.total=0,re.count=0,ce.value=0,ye.value=[],Re.value=[]}function qe(De,nt,gt){for(let ht=nt+1;ht0;ht-=ht&-ht)gt+=De[ht];return gt}function Ue(De){ce.value=De;const nt=new Array(De+1).fill(0),gt=new Array(De+1).fill(0);for(const[ht,Et]of Object.entries(G)){const bt=Number(ht),Ot=Number(Et);!Number.isFinite(bt)||bt<0||bt>=De||!Number.isFinite(Ot)||Ot<=0||(qe(nt,bt,Ot),qe(gt,bt,1))}ye.value=nt,Re.value=gt}function tt(De){if(!Number.isInteger(De)||De<0)return!1;const nt=G[De];if(!Number.isFinite(nt)||nt<=0)return!1;if(delete G[De],re.total=Math.max(0,re.total-nt),re.count=Math.max(0,re.count-1),ce.value>De){const gt=ye.value,ht=Re.value;gt.length&&ht.length&&(qe(gt,De,-nt),qe(ht,De,-1))}return!0}const ct=z(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:G,heightStats:re,heightTreeSize:ce,heightSumTree:ye,heightKnownTree:Re,averageNodeHeight:ct,resetHeightMeasurements:He,pruneHeightMeasurements:function(De){if(De<=0)return void He();let nt=0,gt=0;for(const[ht,Et]of Object.entries(G)){const bt=Number(ht),Ot=Number(Et);!Number.isFinite(bt)||bt<0||bt>=De||!Number.isFinite(Ot)||Ot<=0?delete G[bt]:(nt+=Ot,gt++)}re.total=nt,re.count=gt},rebuildHeightTrees:Ue,recordNodeHeight:function(De,nt,gt={}){(function(ht,Et,bt={}){var Ot;if(!Number.isFinite(Et)||Et<=0)return!1;const Kt=G[ht];if(Kt&&(bt.allowShrink===!1&&Etht){const an=ye.value,sn=Re.value;if(an.length&&sn.length)if(Kt){const un=Et-Kt;un!==0&&qe(an,ht,un)}else qe(an,ht,Et),qe(sn,ht,1)}bt.notify!==!1&&((Ot=L.onHeightRecorded)==null||Ot.call(L))})(De,nt,wn(xt({},gt),{notify:!0}))},removeNodeHeight:function(De,nt={}){var gt;const ht=tt(De);return ht&&nt.notify!==!1&&((gt=L.onHeightRecorded)==null||gt.call(L)),ht},removeNodeHeights:function(De,nt={}){var gt;let ht=0;for(const Et of De)tt(Number(Et))&&ht++;return ht>0&&nt.notify!==!1&&((gt=L.onHeightRecorded)==null||gt.call(L)),ht},exportHeightCache:function(){return Object.entries(G).map(([De,nt])=>({index:Number(De),height:Number(nt)})).filter(De=>Number.isFinite(De.index)&&De.index>=0&&Number.isFinite(De.height)&&De.height>0).sort((De,nt)=>De.index-nt.index)},importHeightCache:function(De,nt={}){var gt;if(!Array.isArray(De))return;const ht=ce.value;let Et=!1;if(nt.mode!=="merge"){const bt=Object.keys(G);if(bt.length>0){for(const Ot of bt)delete G[Number(Ot)];Et=!0}}for(const bt of De){const Ot=Number(bt.index),Kt=Number(bt.height);if(!Number.isInteger(Ot)||Ot<0||ht>0&&Ot>=ht||!Number.isFinite(Kt)||Kt<=0)continue;const an=G[Ot];an&&Math.abs(an-Kt)<=1||(G[Ot]=Kt,Et=!0)}Et&&((function(){let bt=0,Ot=0;const Kt=ce.value;for(const[an,sn]of Object.entries(G)){const un=Number(an),$n=Number(sn);!Number.isFinite(un)||un<0||Kt>0&&un>=Kt||!Number.isFinite($n)||$n<=0?delete G[un]:(bt+=$n,Ot++)}re.total=bt,re.count=Ot})(),ht>0&&Ue(ht),(gt=L.onHeightRecorded)==null||gt.call(L))},fenwickRangeSum:function(De,nt,gt){if(gt<=nt)return 0;const ht=ut(De,gt-1);return nt<=0?ht:ht-ut(De,nt-1)}}})({onHeightRecorded:()=>{Vt(),Xe.value&&cd(),Ht.value&&_l(),Be.value&&dc(),Lo("node-resize")}});function Ia(L){Number.isInteger(L)&&L>=0&&vs.add(L)}function jr(L){for(const G of L)Ia(Number(G))}function Or(L){Ks++;let G=!0;try{const re=L();return G=re!==!1,re}finally{Ks--,Ks===0&&G&&bl.value++}}function tc(){gs=[],kl=[],es=-1,vs.clear(),Hs.value=zi}function O1(){tc(),Or(()=>F1()),Wo.clear()}function nc(L){!Number.isInteger(L)||L<0||L>=Bt.value.length||Wo.set(L,Ju(L))}function Zu(L,G,re={}){const ce=hr[L];Ia(L),pe(L,G,re);const ye=hr[L];return Object.is(ce,ye)?(vs.delete(L),!1):(ye&&ye>0?nc(L):ce&&Wo.delete(L),!0)}function H1(L,G){const re=Qt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ce,ye;return(ye=(ce=no.get(L))==null?void 0:ce.offsetHeight)!=null?ye:0});return re>0?re:Qt("getNodeLayoutHeight.content.offsetHeight",()=>G.offsetHeight)}function Ku(L,G={}){G.mode!=="merge"?tc():jr(L.map(re=>re.index)),Or(()=>ii(L,G)),F6()}const xl=z(()=>vl.value&&oi.value),Lf=z(()=>{var L;return!Z.value&&C.batchRendering!==!1&&gi.value>0&&((L=C.maxLiveNodes)!=null?L:0)<=0}),Sl=z(()=>!Z.value&&mt&&Qe.value===!0&&!pn.value&&!Do.value&&!Ro.value&&!xl.value&&!Lf.value),D1=z(()=>!!Zs&&xl.value),oc=z(()=>pn.value||Xe.value),{focusIndex:Zl,liveRange:ys,updateLiveRange:Hr}=(function(L,G){const{parsedNodeCount:re,virtualizationEnabled:ce,maxLiveNodesResolved:ye,liveNodeBufferResolved:Re,clamp:He}=G,qe=Re??z(()=>{var tt;return Math.max(0,(tt=L.liveNodeBuffer)!=null?tt:60)}),ut=V(0),Ue=ds({start:0,end:0});return{liveNodeBufferResolved:qe,focusIndex:ut,liveRange:Ue,updateLiveRange:function(){const tt=re.value;if(!ce.value||tt===0)return Ue.start=0,void(Ue.end=tt);const ct=Math.min(ye.value,tt),De=qe.value,nt=He(ut.value-De,0,Math.max(0,tt-ct));Ue.start=nt,Ue.end=Math.min(tt,nt+ct)}}})(C,{parsedNodeCount:ot,virtualizationEnabled:pn,maxLiveNodesResolved:Po,liveNodeBufferResolved:Xn,clamp:Gs}),Cl=new Map,Bi=new Map,mr=new Map,V1=[],Kl=new Map,Gl=new Set,Me=V(0);let lt=!1;const ft=z(()=>(Me.value,Gl.size)),yn=new Map,Yt=new Map,li=V(0),vi=z(()=>{li.value;let L=0;for(const G of yn.values())L+=Math.max(0,G);return L});let yi=null;const W1=z(()=>{if(!pn.value)return Bt.value.length;const L=Xn.value,G=Math.max(ys.end+L,si.value),re=Math.min(Bt.value.length,G);return Math.max(Te.value,re)});function $a(){lt||(lt=!0,queueMicrotask(()=>{lt=!1,Me.value+=1}))}function Gu(L,G,re="node-resize"){if(!F||typeof window>"u")return null;const ce=window.setTimeout(()=>{Gl.delete(ce)&&$a();try{G()}finally{Lo(re)}},Math.max(0,L));return Gl.add(ce),$a(),ce}function Nf(L){F&&L!=null&&(Gl.delete(L)&&$a(),window.clearTimeout(L))}function G9(){if(F&&typeof window<"u")for(const L of Gl)window.clearTimeout(L);Gl.size&&(Gl.clear(),$a()),V1.length=0,mr.clear()}function aB(L){R.value=L}function cB(L){j.value=L}function uB(L){q.value=L}const{cancelScheduledFocusSync:p6,scheduleFocusSync:Yl}=(function(L){const{isClient:G,containerRef:re,virtualizationEnabled:ce,requestFrame:ye,cancelFrame:Re,syncFocusToScroll:He}=L;let qe=null;function ut(){var tt,ct,De;return(De=(ct=(tt=re.value)==null?void 0:tt.ownerDocument)==null?void 0:ct.defaultView)!=null?De:typeof window<"u"?window:null}function Ue(){if(!qe)return;const tt=ut();qe.viaTimeout?tt?tt.clearTimeout(qe.id):clearTimeout(qe.id):Re?.(qe.id),qe=null}return{cancelScheduledFocusSync:Ue,scheduleFocusSync:function(tt={}){if(!ce.value)return;if(!G)return void He(!0);if(tt.immediate)return Ue(),void He(!0);if(qe)return;const ct=()=>{qe=null,He()};if(ye)return void(qe={id:ye(ct),viaTimeout:!1});const De=ut();qe={id:De?De.setTimeout(ct,16):setTimeout(ct,16),viaTimeout:!0}}}})({isClient:F,containerRef:A,virtualizationEnabled:pn,requestFrame:yo,cancelFrame:$o,syncFocusToScroll:function(L=!1){var G;if(!pn.value)return;const re=Ee.value||Se();if(!re)return;const ce=re.ownerDocument||((G=A.value)==null?void 0:G.ownerDocument)||document,ye=ce?.defaultView||(typeof window<"u"?window:null),Re=re===ce?.documentElement||re===ce?.body,He=Bt.value.length;if(He<=0)return;if(!Re&&He>0&&me(re)){const ht=Qt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),Et=Qt("syncFocusToScroll.scrollTop",()=>re.scrollTop),bt=Et<0?-Et:Et;return void Rf(Gs((qe=Math.max(0,bt)+.5*Math.max(0,ht),et.estimateIndexForOffsetFromEnd(qe)),0,Math.max(0,He-1)),L)}var qe;const ut=(function(ht,Et,bt,Ot){const Kt=A.value;if(!Kt)return null;const an=Ot?0:Qt("syncFocusToScroll.model.root.getBoundingClientRect",()=>ht.getBoundingClientRect().top),sn=Qt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Kt.getBoundingClientRect().top),un=Math.max(0,an-sn),$n=Ot?Qt("syncFocusToScroll.model.viewport.clientHeight",()=>{var On,wo,Ys,Ds;return(Ds=(Ys=(wo=bt?.innerHeight)!=null?wo:(On=Et.documentElement)==null?void 0:On.clientHeight)!=null?Ys:ht.clientHeight)!=null?Ds:0}):Qt("syncFocusToScroll.model.root.clientHeight",()=>ht.clientHeight);return Gs(Vn(un+.5*Math.max(0,$n)),0,Math.max(0,Bt.value.length-1))})(re,ce,ye,Re);if(ut!=null)return void Rf(ut,L);const Ue=Re?null:Qt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),tt=Re?0:Ue.top,ct=Re?Qt("syncFocusToScroll.viewport.clientHeight",()=>{var ht,Et;return(Et=(ht=ye?.innerHeight)!=null?ht:re.clientHeight)!=null?Et:0}):Ue.bottom,De=we.value;let nt=null,gt=null;for(const[ht,Et]of De){if(!Et)continue;const bt=Qt("syncFocusToScroll.slot.getBoundingClientRect",()=>Et.getBoundingClientRect());bt.bottom<=tt||bt.top>=ct||(nt==null&&(nt=ht),gt=ht)}if(nt==null||gt==null){const ht=A.value;if(!ht)return;const Et=Re?{top:0}:Qt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),bt=Qt("syncFocusToScroll.fallback.scrollTop",()=>Ae(re,ce,Re)),Ot=Re?(()=>{const an=Qt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>ht.getBoundingClientRect()),sn=(Re?0:Et.top)-an.top;return Math.max(0,sn)})():(()=>{const an=le(ht,re);return Math.max(0,bt-an)})(),Kt=Re?Qt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var an,sn,un,$n;return($n=(un=(sn=ye?.innerHeight)!=null?sn:(an=ce?.documentElement)==null?void 0:an.clientHeight)!=null?un:re.clientHeight)!=null?$n:0}):Qt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void Rf(Gs(Vn(Ot+.5*Math.max(0,Kt)),0,Math.max(0,Bt.value.length-1)),!0)}Rf(Math.round((nt+gt)/2),L)}}),{visibleNodeIndices:h6,nodeVisibilityHandles:sc,nodeVisibilityWatchStops:zf,nodeVisibilityFallbackTimers:Y9,clearVisibilityFallback:Bf,markNodeVisible:La,cleanupNodeVisibility:dB,destroyNodeVisibilityState:m6}=V3e({isClient:F,shouldTrackVisibleNodeIndices:()=>xl.value,shouldCleanupNodeVisibility:()=>pn.value,onNodeMarkedVisible:L=>{pn.value?Yl():Zl.value=Gs(L,0,Math.max(0,Bt.value.length-1))},onNodeVisibilityCleaned:L=>{no.delete(L)&&Sy()}}),{cleanupScrollListener:X9,setupScrollListener:fB}=(function(L){const{isClient:G,virtualizationEnabled:re,listenerEnabled:ce,scrollRootElement:ye,resolveScrollContainer:Re,scheduleFocusSync:He,onScroll:qe}=L;let ut=null,Ue=null;function tt(){ut&&(ut(),ut=null),Ue=null,ye.value=null}function ct(De){const nt=L.getScrollTop?L.getScrollTop(De):De.scrollTop;return Math.max(0,Number.isFinite(nt)?Math.abs(nt):0)}return{cleanupScrollListener:tt,setupScrollListener:function(){if(!G)return;if(!((De=ce?.value)!=null?De:re.value))return void tt();var De;const nt=Re();if(!nt)return void tt();if(ye.value===nt&&ut)return;tt(),Ue=ct(nt);const gt=()=>{if(qe?.(),re.value){const ht=(function(Et){const bt=ct(Et),Ot=Ue;Ue=bt;const Kt=Math.max(480,.75*(Et.clientHeight||0));return Ot==null?bt>Kt?{immediate:!0}:void 0:Math.abs(bt-Ot)>Kt?{immediate:!0}:void 0})(nt);ht?He(ht):He()}};nt.addEventListener("scroll",gt,{passive:!0}),ye.value=nt,ut=()=>{nt.removeEventListener("scroll",gt)}}}})({isClient:F,virtualizationEnabled:pn,listenerEnabled:oc,scrollRootElement:Ee,resolveScrollContainer:Se,scheduleFocusSync:Yl,onScroll:function(){const L=Be.value;if(!L)return;const G=Xu();if(!G||(function(ce){if(od()>=jt)return Zt=null,!1;const ye=Zt;if(ye==null)return!0;const Re=Math.abs(ce.scrollTop-ye)<=2;return Re||(Zt=null),Re})(G))return;const re=fy(G);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,L.distanceFromBottomPx))>32)&&uc("restore"):uc("restore")},getScrollTop:L=>{var G;const re=L.ownerDocument||((G=A.value)==null?void 0:G.ownerDocument)||document,ce=L===re.documentElement||L===re.body||L===re.scrollingElement;return Qt("scrollListener.getScrollTop",()=>Ae(L,re,ce))}});function Rf(L,G=!1){const re=Gs(L,0,Math.max(0,Bt.value.length-1));!G&&Math.abs(re-Zl.value)<=1||(Zl.value=re,Hr())}function Gs(L,G,re){return Math.min(Math.max(L,G),re)}function g6(L=Bt.value.length){const G=Jo();return!Number.isInteger(G)||G<0?L:Gs(G,0,L)}function v6(L){return L?.firstElementChild}function J9(L,G){var re;return L?(re=L.matches)!=null&&re.call(L,G)?L:L.querySelector(G):null}function pB(L,G){L<1||L>6||(K[L]=G)}function Q9(){if(!je.value)return void(ee.value=0);const L=Qt("updateExperimentContainerWidth.clientWidth",()=>{var G,re;return(re=(G=A.value)==null?void 0:G.clientWidth)!=null?re:0});ee.value=L>0?L:0}let Yu=null;function y6(){Yu?.disconnect(),Yu=null}const ey=Yd("ViewportDeferredMarkdownCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){return(yield Cs(()=>import("./index5-ClJqsKuw.js"),__vite__mapDeps([8,6,7]))).default}),loadingComponent:z5,delay:0,suspensible:!1}),z5);function ty(L){return L===ey}const ny=z(()=>h.value==="pre"?Di:h.value==="shiki"?ey:im);function oy(){var L;return((L=C.codeBlockProps)==null?void 0:L.showHeader)!==!1}function sy(L,G,re){const ce=hr[G],ye=typeof ce=="number"&&ce>0;if(It.value&&!ye&&!(function(Re){return!!Un.value.paragraph&&(Re.type==="paragraph"||Re.type==="list_item"||Re.type==="list")})(L)){const Re=rL(L,re,ie.value);if(Re)return Re}if(Co.value&&L.type==="code_block"){const Re=(function(He){if(He.type!=="code_block")return null;const qe=Ry(He,Uf(He));return ty(qe)?"markdown":qe===Di?"pre":qe===ny.value||qe===im?"monaco":null})(L);if(Re==="monaco"||Re==="markdown"||Re==="pre")return(function(He,qe){var ut,Ue,tt;if(!He||He.type!=="code_block")return null;const ct=qe.rendererKind,De=ct!=="pre"&&qe.showHeader!==!1,nt=!!He.diff;let gt=0,ht=500;if(ct==="monaco"){const bt=(ut=qe.monacoOptions)!=null?ut:{},Ot=hm(He,bt,qe.width),Kt=(function(sn){const un=typeof sn?.fontSize=="number"&&sn.fontSize>0?sn.fontSize:12;return typeof sn?.lineHeight=="number"&&sn.lineHeight>0?sn.lineHeight:Math.round(1.5*un)})(bt),an=(function(sn,un){var $n,On;const wo=typeof(($n=sn?.padding)==null?void 0:$n.top)=="number"?sn.padding.top:un?0:8,Ys=typeof((On=sn?.padding)==null?void 0:On.bottom)=="number"?sn.padding.bottom:un?0:8;return Math.max(0,wo)+Math.max(0,Ys)})(bt,nt);ht=typeof bt.MAX_HEIGHT=="number"&&bt.MAX_HEIGHT>0?bt.MAX_HEIGHT:500,gt=Math.round(Ot*Kt+an)}else if(ct==="markdown"){const bt=hm(He);gt=Math.round(21*bt+32)}else{const bt=hm(He);gt=Math.round(28*bt),ht=Number.POSITIVE_INFINITY}const Et=Math.max(1,Math.min(gt,ht));return xt({kind:"code-block",height:Math.round(Et+(De?40:0)),contentHeight:Et,rendererKind:ct},nt&&ct==="monaco"?{diffInline:Tv((Ue=qe.monacoOptions)!=null?Ue:{},(tt=qe.width)!=null?tt:0)}:{})})(L,{rendererKind:Re,monacoOptions:C.codeBlockMonacoOptions,showHeader:oy(),width:re})}return null}tA(()=>{if(bl.value,Ks>0)return;const L=Bt.value,G=$s();if(!L.length||!to.value)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const re=ee.value||Qt("estimatedNodeHeights.clientWidth",()=>{var Ue;return((Ue=A.value)==null?void 0:Ue.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const ce=(function(Ue){return[Math.round(Ue),It.value,Co.value,ie.value,C.codeBlockMonacoOptions,oy(),h.value,Un.value,dm.value]})(re),ye=gs.length<=L.length&&(He=ce,(Re=kl).length===He.length&&Re.every((Ue,tt)=>Object.is(Ue,He[tt])));var Re,He;const qe=ye&&es===G?L.length:ye?g6(L.length):0,ut=ye?Array.from(vs):[];gs.length=L.length;for(let Ue=qe;Ue=0&&UeHs.value);et=(function(L){let G=!0,re=[0],ce="";function ye(tt){var ct;const De=L.nodeHeights[tt];if(Number.isFinite(De)&&De>0)return De;const nt=L.parsedNodes.value[tt],gt=nt?.type,ht=!!((ct=L.hasCustomParagraphComponent)!=null&&ct.call(L)),Et=L.estimatedNodeHeights.value[tt],bt=Et?.height;if(!(function(Kt,an,sn){return!!(sn&&an?.kind==="simple-text"&&(Kt==="paragraph"||Kt==="list_item"||Kt==="list"))})(gt,Et,ht)&&Number.isFinite(bt)&&bt>0)return bt;const Ot=$3e(nt,L.getContainerWidth()||640);return gt==="heading"||gt==="paragraph"&&Ot<=28&&(function(Kt,an){if(an)return!1;const sn=Kt.children;return!Array.isArray(sn)||!sn.length||sn.every(cL)})(nt,ht)?Ot:Math.max(L.averageNodeHeight.value,Ot)}function Re(){var tt;const ct=L.parsedNodes.value.length,De=L.getPrefixCacheKeyParts().join(":");if(!G&&ce===De)return re;const nt=new Array(ct+1);nt[0]=0;for(let gt=0;gt=((ct=gt[nt])!=null?ct:0))return nt-1;let ht=0,Et=nt-1,bt=nt-1;for(;ht<=Et;){const Ot=ht+Et>>1;((De=gt[Ot+1])!=null?De:0)>=tt?(bt=Ot,Et=Ot-1):ht=Ot+1}return bt}function qe(tt,ct){var De,nt;if(tt>=ct)return 0;if(L.heightEstimationActive.value)return(function(Et,bt){var Ot,Kt;const an=L.parsedNodes.value.length,sn=Yx(Math.trunc(Et),0,an),un=Yx(Math.trunc(bt),sn,an);if(sn>=un)return 0;const $n=Re();return((Ot=$n[un])!=null?Ot:0)-((Kt=$n[sn])!=null?Kt:0)})(tt,ct);if(L.heightTreeSize.value!==L.parsedNodes.value.length){let Et=0;for(let bt=tt;btsn<=0?0:L.fenwickRangeSum(ht,0,sn)+(sn-L.fenwickRangeSum(Et,0,sn))*gt;let Ot=0,Kt=De.length-1,an=De.length-1;for(;Ot<=Kt;){const sn=Ot+Kt>>1;bt(sn+1)>=tt?(an=sn,Kt=sn-1):Ot=sn+1}return an}let nt=tt;for(let gt=0;gt0||tt++}return tt}return{markFallbackHeightPrefixDirty:function(){G=!0},getFallbackNodeHeight:ye,estimateHeightRange:qe,estimateIndexForOffset:ut,estimateIndexForOffsetFromEnd:function(tt){var ct,De;const nt=L.parsedNodes.value;if(!nt.length)return 0;if(tt<=0)return Math.max(0,nt.length-1);if(L.heightEstimationActive.value){const ht=(ct=Re()[nt.length])!=null?ct:0;return He(Math.max(0,ht-tt))}if(L.heightTreeSize.value===nt.length){const ht=qe(0,nt.length);return ut(Math.max(0,ht-tt))}let gt=tt;for(let ht=nt.length-1;ht>=0;ht--){const Et=(De=L.nodeHeights[ht])!=null?De:L.averageNodeHeight.value;if(gt<=Et)return ht;gt-=Et}return 0},getEstimatedNodeHeightCount:Ue,buildVirtualHeightSummary:function(tt){var ct;const De=L.parsedNodes.value.length;return{totalNodes:De,measuredCount:L.heightStats.count,estimatedCount:Ue(),averageNodeHeight:L.averageNodeHeight.value,topSpacerHeight:tt.topSpacerHeight,bottomSpacerHeight:tt.bottomSpacerHeight,estimatedTotalHeight:qe(0,De),width:(ct=tt.width)!=null?ct:L.getContainerWidth()}}}})({parsedNodes:Bt,nodeHeights:hr,heightStats:ts,heightTreeSize:Pr,heightSumTree:Uu,heightKnownTree:ec,averageNodeHeight:Fr,heightEstimationActive:je,estimatedNodeHeights:ic,getContainerWidth:cn,hasCustomParagraphComponent:()=>!!Un.value.paragraph,getPrefixCacheKeyParts:()=>{var L;const G=$d(ee.value||Qt("getFallbackHeightPrefix.clientWidth",()=>{var ce;return((ce=A.value)==null?void 0:ce.clientWidth)||0})),re=((L=o.virtualScroll)==null?void 0:L.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[Bt.value.length,ts.count,Math.round(ts.total),Math.round(100*Fr.value),re,G,je.value?1:0,dm.value,J.value,Un.value.paragraph?1:0]},fenwickRangeSum:el}),Ze(()=>Bt.value.length,L=>{var G;Vt(),L<=0?O1():(Lj1(G))),L!==Pr.value&&Fe(L))},{immediate:!0});const hB=z(()=>{if(!pn.value)return Bt.value.map((ce,ye)=>({node:ce,index:ye}));const L=Bt.value.length,G=Gs(ys.start,0,L),re=Gs(ys.end,G,L);return Bt.value.slice(G,re).map((ce,ye)=>({node:ce,index:G+ye}))}),w6=z(()=>pn.value?on(0,Math.min(ys.start,Bt.value.length)):0),k6=z(()=>{if(!pn.value)return 0;const L=Bt.value.length;return on(Math.min(ys.end,L),L)});function iy(){return et.buildVirtualHeightSummary({topSpacerHeight:w6.value,bottomSpacerHeight:k6.value,width:q1()})}function mB(){const L=Bt.value,G=iy();return wn(xt({},G),{probe:{paragraphReady:!!ie.value.paragraph,listItemReady:!!ie.value.listItem,listWrapperOverhead:ie.value.listWrapperOverhead,headingReadyLevels:Object.entries(ie.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:L.map((re,ce)=>{var ye,Re,He,qe,ut,Ue,tt,ct,De;return{index:ce,type:re.type,estimateKind:(Re=(ye=ic.value[ce])==null?void 0:ye.kind)!=null?Re:null,rendererKind:(qe=(He=ic.value[ce])==null?void 0:He.rendererKind)!=null?qe:null,estimatedHeight:(Ue=(ut=ic.value[ce])==null?void 0:ut.height)!=null?Ue:null,estimatedContentHeight:(ct=(tt=ic.value[ce])==null?void 0:tt.contentHeight)!=null?ct:null,measuredHeight:(De=hr[ce])!=null?De:null}})})}function b6(){return o.indexKey!=null?String(o.indexKey):Do.value?`virtual-${Fo()}`:"markdown-renderer"}function ly(L){const G=String(L),re=`${b6()}-`;if(!G.startsWith(re))return null;const ce=G.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ce)return null;const ye=Number(ce[1]);return!Number.isInteger(ye)||ye<0||ye>=Bt.value.length?null:ye}function Fo(){var L,G,re;const ce=(L=o.virtualScroll)==null?void 0:L.sessionKey;return String(ce!=null&&ce!==""?ce:(re=(G=o.indexKey)!=null?G:C.customId)!=null?re:uo)}function ws(){var L;const G=(L=o.virtualScroll)==null?void 0:L.threadKey;return G==null||G===""?void 0:String(G)}const gB=z(()=>{var L,G,re;return(re=ws())!=null?re:String((G=(L=o.indexKey)!=null?L:C.customId)!=null?G:uo)});function _6(L){var G;return(L??"")===((G=ws())!=null?G:"")}function Dr(){var L,G,re;return G=(L=o.virtualScroll)==null?void 0:L.measurementKey,re=(function(){const ce=h.value;return(function(ye){var Re,He;const qe=ye.renderer,ut=qe==="monaco"?ye.codeBlockMonacoOptions:void 0,Ue=ye.codeBlockProps,tt=qe==="shiki";return[ye.isDark?"dark":"light",qe==="monaco"?"code-rich":qe==="pre"?"code-pre":"code-shiki",ye.codeBlockStream===!1?"code-static":"code-stream",Vs(ye.codeBlockMinWidth),Vs(ye.codeBlockMaxWidth),...tt?[kde((Re=Ue?.themes)!=null?Re:ye.themes,(He=Ue?.langs)!=null?He:ye.langs)]:[],Vs(ut?.fontSize),Vs(ut?.lineHeight),Vs(ut?.fontFamily),Vs(ut?.tabSize),Vs(ut?.MAX_HEIGHT),Vs(ut?.wordWrap),Vs(ut?.wrappingIndent),Vs(ut?.padding),Vs(Ue?.showHeader),Vs(Ue?.showCopyButton),Vs(Ue?.showExpandButton),Vs(Ue?.showPreviewButton),Vs(Ue?.showCollapseButton),Vs(Ue?.showFontSizeButtons)].join("\0")})({renderer:ce,isDark:C.isDark,codeBlockStream:C.codeBlockStream,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockMonacoOptions:ce==="monaco"?C.codeBlockMonacoOptions:void 0,codeBlockProps:C.codeBlockProps,themes:ce==="shiki"?C.themes:void 0,langs:ce==="shiki"?C.langs:void 0})})(),[G==null?"":String(G),re].join("\0")}function q1(){return cn()}const Pf=z(()=>$d(q1())),tl=z(()=>[Dr(),Pf.value].join("\0")),vB=z(()=>{var L;return Do.value?["virtual",(L=ws())!=null?L:"",Fo(),tl.value].join("\0"):o.indexKey});function lc(){li.value+=1}function x6(L){return!(!L||!Number.isInteger(L.index)||L.index<0||L.index>=Bt.value.length||L.sessionKey!==Fo()||L.threadKey!==ws()||L.layoutEpochKey!==tl.value)}function ry(L){const G=String(L),re=Yt.get(G);return re?x6(re)?re.index:null:ly(G)}function ay(L="async-node"){(yn.size||Yt.size)&&(yn.clear(),Yt.clear(),lc(),Lo(L))}const rc=fn(n7,null),S6={reportHeight(L,G){if(!Xe.value)return;const re=ry(L);if(re==null)return;const ce=Cl.get(re);if(!ce)return;const ye=Number(G),Re=H1(re,ce);(function(He,qe,ut={}){Or(()=>Zu(He,qe,ut))})(re,Number.isFinite(ye)&&ye>0?Math.max(ye,Re||0):Re)},markPending(L){if(!Xe.value)return;const G=ly(L);G!=null&&(function(re,ce){var ye;const Re=Yt.get(re);if(Re&&x6(Re))return yn.set(re,Math.max(0,(ye=yn.get(re))!=null?ye:0)+1),lc(),void Lo("async-node");yn.set(re,1),Yt.set(re,(function(He){return{index:He,sessionKey:Fo(),threadKey:ws(),layoutEpochKey:tl.value}})(ce)),lc(),Lo("async-node")})(String(L),G)},markSettled(L){if(!Xe.value)return;const G=String(L),re=ry(L);(re!=null||(function(ce){return yn.has(String(ce))})(G))&&(function(ce){var ye;const Re=(ye=yn.get(ce))!=null?ye:0;return!(Re<=0||(Re<=1?(yn.delete(ce),Yt.delete(ce)):yn.set(ce,Re-1),lc(),Re===1&&Lo("async-node"),0))})(G)&&re!=null&&Vr()}};function yB(){let L=0;for(const G of Cl.values())L+=Qt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=G?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,L))}qn(n7,{reportHeight(L,G){S6.reportHeight(L,G),rc?.reportHeight(L,G)},markPending(L){S6.markPending(L),rc?.markPending(L)},markSettled(L){S6.markSettled(L),rc?.markSettled(L)}});let C6,M6=null,ac=null;function Ff(L){return L!==!1&&L!=null&&L!==""}function cy(){return pn.value?(function(){if(!pn.value)return!0;const L=Bt.value.length,G=Gs(ys.start,0,L),re=Gs(ys.end,G,L);if(G>=re)return!0;for(let ce=G;ce=W1.value}function A6(){return Qe.value===!0&&!Tt.value&&vi.value===0&&Gl.size===0&&Kl.size===0&&yi==null&&cy()}function uy(){var L,G;if(((L=o.virtualScroll)==null?void 0:L.settleMode)!=="manual"||M6===Fo()&&C6===ws())return!0;const re=(G=o.virtualScroll)==null?void 0:G.settledToken;return!!Ff(re)&&ac===ud(re)}function T6(){return A6()&&uy()}function wB(L,G){return G.totalNodes<=0?L==="final"?"final":"estimate":G.measuredCount>=G.totalNodes?L==="final"?"final":"measured":G.measuredCount>0||G.estimatedCount>0?"mixed":"estimate"}function U1(L="manual",G){const re=iy(),ce=(function(ye){return ye||(Qe.value!==!0?Bt.value.length>0?"streaming":"estimating":!cy()||Kl.size>0||yi!=null?"measuring":T6()?"settled":"settling")})(G);return{sessionKey:Fo(),threadKey:ws(),phase:ce,nodeCount:re.totalNodes,liveRange:{start:ys.start,end:ys.end},renderedCount:Te.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:yB(),totalHeight:dy(),width:re.width,final:Qe.value===!0,stable:T6(),confidence:wB(ce,re),reason:L}}function Xu(){const L=Ee.value||Se(),G=A.value;if(!L||!G)return null;const re=L.ownerDocument||G.ownerDocument||document,ce=L===re.documentElement||L===re.body||L===re.scrollingElement,ye=Qt("getScrollBox.scrollTop",()=>Ae(L,re,ce)),Re=Qt("getScrollBox.scrollHeight",()=>{var qe,ut,Ue,tt,ct;return ce?Math.max((ut=(qe=re.documentElement)==null?void 0:qe.scrollHeight)!=null?ut:0,(tt=(Ue=re.body)==null?void 0:Ue.scrollHeight)!=null?tt:0,(ct=L.scrollHeight)!=null?ct:0):L.scrollHeight}),He=Qt("getScrollBox.clientHeight",()=>{var qe;return ce?((qe=re.documentElement)==null?void 0:qe.clientHeight)||L.clientHeight||0:L.clientHeight});return{root:L,doc:re,isViewportRoot:ce,scrollTop:ye,scrollHeight:Re,clientHeight:He}}function dy(){const L=Bt.value.length,G=Math.max(0,on(0,L)),re=Qt("getRendererLogicalHeight.offsetHeight",()=>{var ye,Re;return(Re=(ye=A.value)==null?void 0:ye.offsetHeight)!=null?Re:0}),ce=Math.max(0,re>0?re:Qt("getRendererLogicalHeight.scrollHeight",()=>{var ye,Re;return(Re=(ye=A.value)==null?void 0:ye.scrollHeight)!=null?Re:0}));return L<=0?Math.ceil(re):pn.value?G>0?Math.max(1,Math.ceil(G),(function(){let ye=w6.value+k6.value;for(const Re of no.values())Re&&(ye+=Math.max(0,Qt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Re.offsetHeight||0)));return Math.ceil(Math.max(0,ye))})(),(function(ye,Re){return ye<=0||Re<=0?0:Re<=ye+Math.max(512,.05*ye)?Math.ceil(Re):0})(G,ce)):Math.max(1,Math.ceil(ce)):Xe.value?G>0||ts.count>0||et.getEstimatedNodeHeightCount()>0?(Ni.value&&Te.value,Math.max(1,Math.ceil(ce),Math.ceil(G))):Math.ceil(ce):Math.max(1,Math.ceil(ce),Math.ceil(G))}function fy(L){const G=A.value;if(!G)return null;const re=Qt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>G.getBoundingClientRect());return(function(ye){return ye.isViewportRoot?ye.clientHeight:Qt("getViewportBottomInRoot.getBoundingClientRect",()=>ye.root.getBoundingClientRect().bottom)})(L)-re.bottom}function kB(L={}){const G=L.requireViewport!==!1,re=(function(Re=64){const He=Xu(),qe=A.value;if(!He||!qe)return!1;const ut=(function(tt){if(tt.isViewportRoot)return{top:0,bottom:tt.clientHeight};const ct=Qt("getVirtualViewportRect.getBoundingClientRect",()=>tt.root.getBoundingClientRect());return{top:ct.top,bottom:ct.bottom}})(He),Ue=Qt("isRendererNearVirtualViewport.getBoundingClientRect",()=>qe.getBoundingClientRect());return Ue.bottom>=ut.top-Re&&Ue.top<=ut.bottom+Re})();if(G&&!re)return null;const ce=(function(){const Re=Xu(),He=A.value;if(!Re||!He||Math.max(0,Re.scrollHeight-Re.scrollTop-Re.clientHeight)>64)return null;const qe=fy(Re);return qe==null?null:qe>=-8&&qe<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,qe)}:null})();if(ce)return{anchor:ce,captured:!0};const ye=J0();if(ye)return{anchor:{type:"node",nodeIndex:ye.nodeIndex,offsetWithinNodePx:ye.offsetWithinNodePx},captured:re};if(L.allowFallback===!0){const Re=(function(){const He=Bt.value.length;return He<=0?null:{type:"node",nodeIndex:Gs(Zl.value,0,Math.max(0,He-1)),offsetWithinNodePx:0}})();return Re?{anchor:Re,captured:!1}:null}return null}function E6(L){let G=2166136261;for(let re=0;re>>0).toString(36)}function bB(L,G){let re=L;for(let ce=0;ce8192?`${ce.slice(0,8192)}...${ce.length}`:ce;return`${ce.length}:${E6(ye)}`})(L)}`;if(typeof L=="function")return"fn";if(typeof L!="object")return typeof L;if(G.has(L))return"cycle";if(re>=6)return"max-depth";G.add(L);try{if(Array.isArray(L)){if(L.length<=160){const Ue=[];for(let tt=0;tt=qe&&He.push(tt)}return[`a:${L.length}`,`h=${Re.join(",")}`,`t=${He.join(",")}`,`all=${(ut>>>0).toString(36)}`].join(":")}const ce=L,ye=Object.keys(ce).filter(Re=>{const He=ce[Re];return Re!=="parent"&&Re!=="el"&&Re!=="component"&&(He==null||typeof He=="string"||typeof He=="number"||typeof He=="boolean"||_B.has(Re))}).sort();return`o:${ye.length}:${ye.map(Re=>`${Re}=${jf(ce[Re],G,re+1)}`).join(";")}`}finally{G.delete(L)}}let I6=-1,$6="",Z1=[2166136261];function Ju(L){const G=Bt.value[L];return G?E6(jf(G)):""}function xB(L,G){let re=L;for(let ce=0;ce>>0}function L6(){var L,G;const re=J.value;if(I6===re)return $6;const ce=Bt.value.length;let ye=g6(ce);(I6!==re-1||ye>ce||Z1.length>>0).toString(36),I6=re,$6}function cc(L,G={}){var re;const ce=G.includeHeightCache===!0,ye=(re=G.includeContentHash)!=null?re:ce,Re=ce?(function(qe){const ut=(function(){var ht,Et;const bt=Number((Et=(ht=o.virtualScroll)==null?void 0:ht.heightCacheLimit)!=null?Et:5e3);return!Number.isFinite(bt)||bt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(bt))})();if(!Number.isFinite(ut)||qe.length<=ut)return qe;const Ue=new Map,tt=ht=>{!ht||Ue.size>=ut||Ue.set(ht.index,ht)},ct=Bt.value.length,De=Gs(ys.start-2*Xn.value,0,ct),nt=Gs(ys.end+2*Xn.value,De,ct);for(const ht of qe)ht.index>=De&&ht.index=0&&Ue.sizeht.index-Et.index).slice(0,ut)})(Sn().map(qe=>{var ut;const Ue=Bt.value[qe.index];return Ue?wn(xt({},qe),{nodeType:String((ut=Ue.type)!=null?ut:""),signature:Ju(qe.index)}):null}).filter(qe=>!!qe)):[],He=kB({allowFallback:G.allowAnchorFallback===!0,requireViewport:G.requireViewport});return He||Re.length||G.includeEmptyState===!0?wn(xt({sessionKey:L.sessionKey,threadKey:L.threadKey},He?{anchor:He.anchor,anchorCaptured:He.captured}:{anchorCaptured:!1}),{metrics:L,width:L.width,contentHash:ye?L6():void 0,measurementKey:Dr()||void 0,heightCache:Re.length?Re:void 0}):null}function N6(L){var G,re;const ce=Xu();if(!ce)return;const ye=(function(qe){const ut=A.value;if(!ut)return null;const Ue=le(ut,qe.root),tt=Bt.value.length,ct=Qt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ut.offsetHeight||0),De=Math.max(0,ct>0?ct:tt>0?Qt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ut.scrollHeight||0):0),nt=dy();return Ue+Math.max(De,nt)})(ce);if(ye==null)return;const Re=Math.max(0,L.distanceFromBottomPx),He=Math.max(0,ye-ce.clientHeight-Re);(function(qe){jt=od()+120,Zt=qe})(He),ce.isViewportRoot?(re=(G=ce.doc.defaultView)==null?void 0:G.scrollTo)==null||re.call(G,0,He):Zx(ce.root,ce.doc,He,{isReverseFlexScrollRoot:me,getNormalizedScrollTop:Ae})}const z6=[];function py(){if(F)for(pt!=null&&($o?.(pt),pt=null);z6.length;){const L=z6.pop();L!=null&&window.clearTimeout(L)}}function uc(L){const G=!!Be.value;Be.value=null,jt=0,Zt=null,py(),G&&L&&Lo(L)}function dc(){if(!Be.value||!F||pt!=null)return;const L=()=>{pt=null;const G=Be.value;G&&N6(G)};pt=yo?yo(L):null,pt==null&&L()}function hy(L,G={}){const re=Bt.value.length;return re<=0?[]:L.filter(ce=>!(!Number.isInteger(ce.index)||ce.index<0||ce.index>=re)&&!(!Number.isFinite(ce.height)||ce.height<=0)&&!(G.requireSignature&&!ce.signature)&&!(G.requireCompatibilityMetadata&&!ce.nodeType&&!ce.signature)&&(function(ye){var Re;const He=Bt.value[ye.index];return!(!He||ye.nodeType&&ye.nodeType!==String((Re=He.type)!=null?Re:"")||ye.signature&&ye.signature!==Ju(ye.index))})(ce))}function my(L){const G=$d(q1()),re=$d(L);return G!==-1&&re!==-1&&G===re}function B6(L){var G;const re=Number(L?.width);if(Number.isFinite(re)&&re>0)return re;const ce=Number((G=L?.metrics)==null?void 0:G.width);return Number.isFinite(ce)&&ce>0?ce:null}function gy(L){var G;return L.sessionKey===Fo()&&!!_6(L.threadKey)&&((G=L.measurementKey)!=null?G:"")===Dr()&&!!my(B6(L))&&!!(function(re){const ce=re.heightCache;return!!ce?.length&&(vy(re)?ce.some(ye=>!!(ye.nodeType||ye.signature)):ce.some(ye=>!!ye.signature))})(L)}function vy(L){return!!(L.contentHash&&L.contentHash===L6())}function SB(L){return!vy(L)}let K1=null,G1=null,Of=null,Qu=null,ed=null;function R6(L){var G;const re=L.map(ye=>{var Re,He;return[ye.index,Math.round(10*ye.height),(Re=ye.nodeType)!=null?Re:"",(He=ye.signature)!=null?He:""].join("")}).join(""),ce=$d(q1());return[(G=ws())!=null?G:"",Fo(),Dr(),Bt.value.length,ce,L.length,E6(re)].join(":")}function yy(L=(G=>(G=o.virtualScroll)==null?void 0:G.heightCache)()){if(!Xe.value||!L?.length||Bt.value.length<=0||!my((G=o.virtualScroll)==null?void 0:G.heightCacheWidth))return!1;var G;const re=hy(L,{requireSignature:!0});if(!re.length)return!1;const ce=R6(re);return ce===K1?(G1="standalone",!0):(Ku(re,{mode:"merge"}),Vt(),K1=ce,G1="standalone",id(),Lo("restore"),!0)}function P6(L,G={}){var re,ce,ye;if(!Xe.value||!L||L.sessionKey!==Fo()||!_6(L.threadKey)||Bt.value.length<=0)return!1;const Re=!!((re=L.heightCache)!=null&&re.length)&&!Hf(),He=!L.anchor||L.anchorCaptured===!1&&G.allowUncapturedAnchor!==!0?null:L.anchor,qe=G.restoreAnchor===!0&&!!He&&!Hf()&&Number(B6(L))>0;let ut=!1;if((ce=L.heightCache)!=null&&ce.length&&gy(L)){const tt=hy(L.heightCache,{requireCompatibilityMetadata:!L.contentHash,requireSignature:SB(L)});tt.length&&(Ku(tt,{mode:"merge"}),Vt(),K1=R6(tt),G1="restore",id(),ut=!0)}if(Re||qe)return!1;if(!G.restoreAnchor||!He)return ut&&Lo("restore"),!0;const Ue=(function(tt,ct){var De;const nt=tt.anchor,gt=nt?nt.type==="bottom"?`bottom:${Math.round(nt.distanceFromBottomPx)}`:`node:${nt.nodeIndex}:${Math.round(nt.offsetWithinNodePx)}`:"none";return[(De=ws())!=null?De:"",Fo(),Dr(),Pf.value,ct,gt].join(":")})(L,(ye=G.restoreToken)!=null?ye:"imperative");return Of===Ue?(ut&&Lo("restore"),!0):(Of=Ue,(function(tt){const ct=()=>{if(tt.type==="node")return uc(),void Q0({nodeIndex:tt.nodeIndex,offsetWithinNodePx:tt.offsetWithinNodePx});if(rs(),Ht.value=null,Be.value=tt,py(),N6(tt),F)for(const De of[0,120,280,480])z6.push(window.setTimeout(()=>{const nt=Be.value;nt&&N6(nt)},De))};(function(De){if(!pn.value)return!1;const nt=Bt.value.length;return!(nt<=0||(Zl.value=De.type==="node"?Gs(De.nodeIndex,0,nt-1):nt-1,Hr(),0))})(tt)?yt(ct):ct()})(He),Lo("restore"),!0)}function Hf(){const L=q1();return Number.isFinite(L)&&L>0}function wy(L){var G;return L.sessionKey===Fo()&&!!_6(L.threadKey)&&(Bt.value.length<=0||!(!((G=L.heightCache)!=null&&G.length)||Hf())||!(!(L.anchor&&Number(B6(L))>0)||Hf()))}function F6(){Wo.clear();for(const L of Object.keys(hr)){const G=Number(L);Number.isInteger(G)&&G>=0&&G{let G=!1,re=null;const ce=()=>{G||(G=!0,re!=null&&window.clearTimeout(re),L())};if(yo)return yo(ce),void(re=window.setTimeout(ce,50));re=window.setTimeout(ce,0)})}function j6(L,G=ws(),re=tl.value){return Fo()===L&&ws()===G&&tl.value===re}function O6(){return zo(this,arguments,function*(L={}){var G,re,ce,ye,Re;const He=Fo(),qe=ws(),ut=tl.value,Ue=(G=L.frames)!=null?G:2,tt=(re=L.timeoutMs)!=null?re:120,ct=(ce=L.reason)!=null?ce:"manual",De=L.expectedSettledTokenKey,nt=L.flushPendingTimers===!0,gt=U1(ct),ht=()=>wn(xt({},gt),{phase:gt.final?"settling":gt.phase,stable:!1,confidence:gt.confidence==="final"?"mixed":gt.confidence,reason:ct}),Et=()=>j6(He,qe,ut)&&(De==null||sd()===De);for(let an=0;anwindow.setTimeout(sn,an))})(tt),!Et()||(nt&&G9(),Vr(),td(),!Et()))return ht();const bt=A6();bt&&(M6=He,C6=qe,((ye=o.virtualScroll)==null?void 0:ye.settleMode)==="manual"&&De!=null&&Ff((Re=o.virtualScroll)==null?void 0:Re.settledToken)&&sd()===De&&(ac=ud(o.virtualScroll.settledToken)));const Ot=Et()&&bt&&uy(),Kt=U1(ct,Ot?"final":void 0);return q6(Kt,!0),Kt})}let H6="content",Y1=null,X1=null,D6=0,nd=null,fc=null,V6=null,W6=null;function od(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function by(L){var G,re;const ce=nd;if(!ce)return!0;const ye=(re=(G=o.virtualScroll)==null?void 0:G.heightDiffThresholdPx)!=null?re:1;return Math.abs(L.totalHeight-ce.totalHeight)>ye||L.sessionKey!==ce.sessionKey||L.phase!==ce.phase||L.stable!==ce.stable||L.final!==ce.final||L.threadKey!==ce.threadKey||L.nodeCount!==ce.nodeCount||L.measuredCount!==ce.measuredCount||L.width!==ce.width}function sd(L=(G=>(G=o.virtualScroll)==null?void 0:G.settledToken)()){return Vs(L)}function _y(L,G){var re,ce;return[L,G.sessionKey,(re=G.threadKey)!=null?re:"",Dr(),L6(),Vs((ce=o.virtualScroll)==null?void 0:ce.settledToken),Math.round(G.totalHeight),Math.round(G.width)].join("\0")}function id(){V6=null,W6=null,fc=null}function CB(L){const G=L.heightCache;return G?.length?R6(G):""}function ld(L){var G,re,ce;const ye=L.metrics,Re=L.anchor?(He=L.anchor).type==="bottom"?`bottom:${Math.round(He.distanceFromBottomPx)}`:`node:${He.nodeIndex}:${Math.round(He.offsetWithinNodePx)}`:"none";var He;return[L.sessionKey,(G=L.threadKey)!=null?G:"",(re=L.measurementKey)!=null?re:Dr(),(ce=L.contentHash)!=null?ce:"",CB(L),Re,L.anchorCaptured?1:0,ye.liveRange.start,ye.liveRange.end,ye.renderedCount,ye.nodeCount,Math.round(ye.totalHeight),Math.round(ye.width),ye.phase,ye.stable?1:0].join("\0")}function q6(L,G=!1){if(!Xe.value||(function(He=!1){return!He&&Do.value&&!We.value})(G))return;const re=G||by(L),ce=(function(He,qe=!1){return qe||He.stable||He.phase==="final"?{state:cc(He,{includeHeightCache:!0})}:{state:cc(He)}})(L,G),ye=ce.state,Re=!!(ye&&(re||(function(He,qe=!1){return!!qe||ld(He)!==fc})(ye,G)));if(re&&(O(L),nd=L,D6=od()),ye&&Re&&(H(ye),ye.anchor&&D(ye.anchor),fc=ld(ye)),L.stable){const He=_y("settled",L);if(He!==V6){V6=He;const qe=cc(L,{includeHeightCache:!0});qe&&(H(qe),fc=ld(qe)),(function(ut){s("render-settled",ut)})(L)}}if(L.phase==="final"){const He=_y("final",L);if(He!==W6){W6=He;const qe=cc(L,{includeHeightCache:!0});qe&&(H(qe),fc=ld(qe)),(function(ut){s("render-final",ut)})(L)}}}function U6(){Y1!=null&&($o?.(Y1),Y1=null),X1!=null&&F&&(window.clearTimeout(X1),X1=null)}function xy(){Y1=null,X1=null,(function(L){if(Kl.size>0||yi!=null)return!0;switch(L){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(H6)&&(Vr(),td()),q6(U1(H6))}function Lo(L){var G,re;if(!Xe.value||(H6=L,Y1!=null||X1!=null))return;const ce=Math.max(0,(re=(G=o.virtualScroll)==null?void 0:G.emitIntervalMs)!=null?re:32),ye=Math.max(0,ce-(od()-D6)),Re=()=>{X1=null,Y1=yo?yo(xy):null,Y1==null&&xy()};F&&ye>0?X1=window.setTimeout(Re,ye):Re()}function Sy(){ne.value+=1}function Df(L){if(Ni.value&&L>=Te.value){const G=Bt.value[L],re=Ke.value===!0&&Qe.value!==!0&&L>=Bt.value.length-2,ce=G?.type==="code_block"||G?.type==="image"||G?.type==="mermaid"||G?.type==="infographic";if(!re||ce)return!1}return!xl.value||L=st.value&&(U.value||(U.value=!0,m6()),!D1.value||!Zs))return pc(L),void(G&&La(L,!0));if(L{if(Y9.delete(Re),!xl.value||h6.value.has(Re))return;const ut=no.get(Re);if(!ut)return;const Ue=Se(ut),tt=ut.ownerDocument||document,ct=tt.defaultView||window,De=!Ue||Ue===tt.documentElement||Ue===tt.body,nt=!De&&Ue?Qt("nodeVisibilityFallback.root.getBoundingClientRect",()=>Ue.getBoundingClientRect()):null,gt=De?0:nt.top,ht=De?Qt("nodeVisibilityFallback.clientHeight",()=>{var bt,Ot;return(Ot=(bt=ct.innerHeight)!=null?bt:Ue?.clientHeight)!=null?Ot:0}):nt.bottom,Et=Qt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ut.getBoundingClientRect());Et.bottom>=gt-500&&Et.top<=ht+500&&La(Re,!0)},1800+He);Y9.set(Re,qe)})(L);let ye=null;ye=Ze(()=>ce.isVisible.value,Re=>{if(Re){Bf(L),La(L,!0),ye?.(),zf.delete(L),sc.get(L)===ce&&sc.delete(L);try{ce.destroy()}catch{}}},{immediate:!0}),zf.set(L,ye),pn.value&&Yl()}function Z6(){yi=null,Or(()=>{let L=!1;for(const[G,re]of Kl)Kl.delete(G),Cl.get(G)===re.el&&Bi.get(G)===re.version&&(L=Zu(G,re.height,{allowShrink:re.allowShrink})||L);return L})}function hc(){yi!=null&&($o?.(yi),yi=null),Kl.clear()}function Wf(L,G){(function(re,ce,ye){var Re;if(!Number.isFinite(ye)||ye<=0||Cl.get(re)!==ce)return;const He=Bi.get(re);if(He==null)return;const qe=Bt.value[re],ut=Tt.value&&Qe.value!==!0&&!((Re=o.nodes)!=null&&Re.length)&&re>=Bt.value.length-2,Ue=!(qe?.loading===!0||ut),tt=Kl.get(re),ct=tt?tt.allowShrink&&Ue:Ue,De=tt&&!ct?Math.max(tt.height,ye):ye;Kl.set(re,{height:De,allowShrink:ct,version:He,el:ce}),yi==null&&(yi=yo?yo(Z6):null,yi==null&&Z6())})(L,G,H1(L,G))}function Vr(){for(const[L,G]of Cl)G&&Wf(L,G)}function Cy(){Os?.disconnect(),Os=null,Vo.clear()}function K6(){for(;V1.length;)Nf(V1.pop())}Ze(We,L=>{L&&Lo("content")},{flush:"post"}),t({getVirtualMetrics:U1,captureVirtualState:function(L={}){var G;return cc(U1("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:L.allowFallbackAnchor===!0,requireViewport:L.requireViewport===!0,includeEmptyState:(G=L.includeEmptyState)==null||G})},restoreVirtualState:function(L,G={}){const re=G.restoreAnchor===!0,ce=G.restoreToken==null?"imperative":String(G.restoreToken);Qu=L,ed={restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0},!P6(L,{restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0})&&wy(L)||(Qu=null,ed=null)},forceMeasure:function(L="manual"){return zo(this,null,function*(){yield yt(),yield ky(),Vr(),td(),yield yt();const G=U1(L);return q6(G,!0),G})},settle:O6,scrollToNode:function(L,G="start"){uc(),rs();const re=Bt.value.length;if(re<=0)return;const ce=Gs(L,0,re-1),ye=()=>{var Re;const He=Ns({nodeIndex:ce,offsetWithinNodePx:0}),qe=Wt(ce),ut=Xu(),Ue=(Re=ut?.clientHeight)!=null?Re:0,tt=Tn();let ct=He;if(G==="center")ct=He-Ue/2+qe/2;else if(G==="end")ct=He-Ue+qe;else if(G==="nearest"&&tt!=null){if(He>=tt&&He+qe<=tt+Ue)return;ct=HeUs.value,L=>{if(!L){Cy();for(const G of mr.values())for(const re of G)Nf(re);mr.clear(),Bi.clear(),K6(),hc()}},{immediate:!0}),Ze(Qe,L=>{L&&(function(){if(F&&Qe.value&&Cl.size){K6();for(const G of[80,240,640]){const re=Gu(G,()=>{for(const[ce,ye]of Cl)ye&&Wf(ce,ye)},"final");re!=null&&V1.push(re)}}})(),Lo(L?"final":"content")});const MB=Kx(()=>Lo("content"),16),AB=Kx(()=>Lo("batch"),16);Ze([()=>Bt.value.length,()=>Te.value],()=>{Be.value&&dc(),MB()},{flush:"post",immediate:!0}),Ze([()=>ys.start,()=>ys.end],()=>{AB()},{flush:"post"});const{cleanupBatchScheduler:TB}=(function(L){const{props:G,isClient:re,isTestEnv:ce,parsedNodesIdentity:ye,parsedNodeCount:Re,desiredRenderedCount:He,datasetKey:qe,batchingEnabled:ut,incrementalRenderingActive:Ue,resolvedBatchSize:tt,resolvedInitialBatch:ct,renderedCount:De,adaptiveBatchSize:nt,previousRenderContext:gt,previousBatchConfig:ht,requestFrame:Et,cancelFrame:bt,hasIdleCallback:Ot,cleanupNodeVisibility:Kt,onDatasetKeyChanged:an,onDatasetChanged:sn}=L;let un=null,$n="raf",On=null,wo=0,Ys=!1,Ds=!1;const Xl=new Set,gr=new Set;function md(){if(re){un!=null&&($n==="raf"&&bt?bt(un):$n==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(un):$n==="timeout"&&window.clearTimeout(un),un=null),wo+=1;for(const ri of Xl)bt&&bt(ri);for(const ri of gr)window.clearTimeout(ri);Xl.clear(),gr.clear(),On=null,Ys=!1,Ds=!1}}function Qf(){return typeof performance<"u"?performance.now():Date.now()}function Vy(ri){(function(Wr){var za;if(!Ue.value)return;const qr=Math.max(2,(za=G.renderBatchBudgetMs)!=null?za:6),Ur=Math.max(1,tt.value||1),Jl=Math.max(1,Math.floor(Ur/4));Wr>1.5*qr?nt.value=Math.max(Jl,Math.floor(.8*nt.value)):Wr<.6*qr&&nt.value=qr)return;const Ur=Math.max(1,ri),Jl=()=>{const vc=Qf();un=null;const gd=On??Ur;On=null;const yc=Qf();De.value=Math.min(qr,De.value+gd),Kt(De.value),(function(th,e3){if(!re)return void Vy(e3);Ys=!0;const Zy=++wo;yt().then(()=>{var Ky;if(Zy!==wo)return;const GB=Qf(),YB=Math.max(e3,GB-th),Gy=()=>{Zy===wo&&Vy(YB)};if(Et){let Q1=null,wc=null,Xy=!1;const Jy=()=>{Xy||(Xy=!0,Q1!==null&&(Xl.delete(Q1),Q1=null),wc!==null&&(gr.delete(wc),window.clearTimeout(wc),wc=null),Gy())};return Q1=Et(()=>{Jy()}),Xl.add(Q1),wc=window.setTimeout(()=>{Q1!==null&&bt&&bt(Q1),Jy()},Math.max(32,(Ky=G.renderBatchIdleTimeoutMs)!=null?Ky:120)),void gr.add(wc)}const Yy=window.setTimeout(()=>{gr.delete(Yy),Gy()},0);gr.add(Yy)})})(vc,Qf()-yc)};if(!re||Pi.immediate)return void Jl();const Ba=Math.max(0,(Wr=G.renderBatchDelay)!=null?Wr:16);if(On=On!=null?Math.max(On,Ur):Ur,un==null){if(!ce&&Ot&&window.requestIdleCallback){const vc=Math.max(0,(za=G.renderBatchIdleTimeoutMs)!=null?za:120);return $n="idle",void(un=window.requestIdleCallback(()=>Jl(),{timeout:vc}))}if(Et&&!ce)return $n="raf",void(un=Et(()=>{Ba===0?Jl():($n="timeout",un=window.setTimeout(()=>Jl(),Ba))}));$n="timeout",un=window.setTimeout(()=>Jl(),Ba)}}function qy(ri,Pi={}){Ys?Ds=!0:ri==null?Uy():Wy(ri,Pi)}function Uy(){Ue.value&&Wy(ut.value?Math.max(1,Math.round(nt.value)):Math.max(1,tt.value))}return Ze([ye,Re,qe,Ue,tt,ct,()=>G.renderBatchDelay],()=>{var ri;const Pi=Re.value,Wr=gt.value,za=qe.value,qr=!Object.is(za,Wr.key),Ur=Pi!==Wr.total,Jl=qr||Ur;gt.value={key:za,total:Pi};const Ba=ht.value,vc=(ri=G.renderBatchDelay)!=null?ri:16,gd=Ba.batchSize!==tt.value||Ba.initial!==ct.value||Ba.delay!==vc||Ba.enabled!==Ue.value;ht.value={batchSize:tt.value,initial:ct.value,delay:vc,enabled:Ue.value},qr&&an(Pi),(Jl||gd||!Ue.value)&&md(),(Jl||gd)&&(nt.value=Math.max(1,tt.value||1)),Jl&&sn();const yc=He.value;if(!Pi)return De.value=0,void Kt(0);if(!Ue.value)return De.value=yc,void Kt(De.value);const th=qr||Wr.total===0;De.value=th||gd?Math.min(yc,ct.value):Math.min(De.value,yc);const e3=Math.max(1,ct.value||tt.value||Pi);De.value{Ue.value&&(typeof Pi=="number"&&ri<=Pi||ri>De.value&&qy())}),{cleanupBatchScheduler:md}})({props:C,isClient:F,isTestEnv:ms,parsedNodesIdentity:Ge,parsedNodeCount:ot,desiredRenderedCount:W1,datasetKey:vB,batchingEnabled:Ul,incrementalRenderingActive:Ni,resolvedBatchSize:gi,resolvedInitialBatch:si,renderedCount:Te,adaptiveBatchSize:Mt,previousRenderContext:$e,previousBatchConfig:rt,requestFrame:yo,cancelFrame:$o,hasIdleCallback:yl,cleanupNodeVisibility:dB,onDatasetKeyChanged:L=>{hc(),O1(),Vt(),id(),L>0&&Fe(L)},onDatasetChanged:()=>{pn.value&&Yl({immediate:!0})}});Ze([oc,pn,()=>A.value,()=>X()],([L,G])=>{if(!L)return X9(),void p6();fB(),G?Yl({immediate:!0}):p6()},{flush:"post",immediate:!0}),Ze([()=>Bt.value.length,()=>pn.value],L=>zo(null,[L],function*([G,re]){re&&G&&F&&(yield yt(),Yl({immediate:!0}))}),{flush:"post"}),Ze(je,L=>{L&&(function(){var G;if(dt.value&&Ct.value&&Ft.value&&((G=Ut.value)!=null&&G[1]))return;const re=$t({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ce=$t({type:"list_item",children:[re],raw:"- Probe paragraph text"}),ye=$t({type:"list",ordered:!1,items:[ce],raw:"- Probe paragraph text"});dt.value=re,Ct.value=ce,Ft.value=ye;const Re={1:null,2:null,3:null,4:null,5:null,6:null};for(let He=1;He<=6;He++)Re[He]=$t({type:"heading",level:He,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(He)} Probe heading`});Ut.value=Re})()},{immediate:!0}),Ze([()=>A.value,je],()=>{if(!je.value)return y6(),void(ee.value=0);Q9(),y6(),je.value&&A.value&&typeof ResizeObserver<"u"&&(Yu=new ResizeObserver(()=>{Q9(),Ht.value&&_l(),Be.value&&dc(),Lo("resize")}),Yu.observe(A.value))},{immediate:!0}),Ze([je,So,tl],()=>zo(null,null,function*(){if(!je.value)return ie.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();yield yt(),(function(){if(!je.value||typeof window>"u")return ie.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();const L={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},G=J9(v6(R.value),".paragraph-node");L.paragraph=mm(R.value,G,"pre-wrap");const re=v6(j.value),ce=re?.querySelector(".paragraph-node");L.listItem=mm(j.value,ce,"pre-wrap");const ye=Qt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var He,qe;return(qe=(He=q.value)==null?void 0:He.offsetHeight)!=null?qe:0}),Re=Qt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var He,qe;return(qe=(He=j.value)==null?void 0:He.offsetHeight)!=null?qe:0});L.listWrapperOverhead=Math.max(0,ye-Re);for(let He=1;He<=6;He++){const qe=J9(v6(K[He]),`h${He}`);L.headings[He]=mm(K[He],qe,"pre-wrap")}ie.value=L,Vt()})()}),{flush:"post",immediate:!0}),Ze(()=>Bt.value.length,()=>{pn.value&&Yl({immediate:!0})}),Ze([je,ee],()=>{Vt(),pn.value&&Yl({immediate:!0}),Ht.value&&_l(),Be.value&&dc(),Lo("resize")},{immediate:!1}),Ze(()=>xl.value,L=>{if(L)for(const[G,re]of no)Vf(G,re);else if(m6(),pn.value)Yl({immediate:!0});else for(const[G,re]of no)re&&La(G,!0)},{immediate:!1}),Ze([Ye,st,()=>X()],()=>{var L;(L=Zs.refresh)==null||L.call(Zs);for(const[G,re]of no)Vf(G,re)},{immediate:!1}),Ze([()=>C.viewportPriority,()=>Bt.value.length,st],([L,G,re])=>{if(L!==!1){if(U.value&&(G<=200||G<=re)){U.value=!1;for(const[ce,ye]of no)Vf(ce,ye)}}else U.value=!1}),Ze(()=>Te.value,()=>{pn.value&&Yl({immediate:!0})}),Ze([Zl,Po,Xn,()=>Bt.value.length,pn],()=>{Hr()},{immediate:!0});let rd=null,ad=!1,mc=null;function cd(){rd=null,M6=null,C6=void 0,ac=null,id()}function G6(){hc(),O1(),Vt(),Wo.clear();const L=Bt.value.length;L>0&&Fe(L),F6()}function Y6(){U6(),G9(),nd=null,K1=null,G1=null,Of=null,Qu=null,ed=null,ad=!1,cd(),ay("restore"),rs(),uc()}function ud(L){var G;return[(G=ws())!=null?G:"",Fo(),Dr(),Pf.value,sd(L),Bt.value.length,Math.round(on(0,Bt.value.length)),Math.round(q1()),ts.count,Math.round(ts.total)].join(":")}function My(){return zo(this,null,function*(){var L,G,re,ce;const ye=(L=o.virtualScroll)==null?void 0:L.settledToken,Re=sd(ye),He=Fo(),qe=ws(),ut=tl.value;if(Xe.value&&((G=o.virtualScroll)==null?void 0:G.settleMode)==="manual"&&Ff(ye))if(A6()){if(ud(ye)!==ac&&!ad){ad=!0;try{const Ue=yield O6({reason:"manual",expectedSettledTokenKey:Re}),tt=sd()===Re;j6(He,qe,ut)&&Ue.sessionKey===He&&Ue.threadKey===qe&&tt&&Ue.stable&&Ue.phase==="final"&&(ac=ud((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{ad=!1,yield yt();const Ue=(ce=o.virtualScroll)==null?void 0:ce.settledToken,tt=Ff(Ue)?ud(Ue):"";j6(He,qe,ut)&&tt&&ac!==tt&&My()}}}else Lo("manual")})}Ze(Xe,(L,G)=>{if(L!==G){if(!L)return Y6(),void U6();Y6(),G6(),mc=tl.value,Lo("content")}},{flush:"post"}),Ze([Xe,tl],([L,G])=>{L?mc!=null?mc!==G&&(mc=G,(function(re="resize"){hc(),O1(),Vt(),Wo.clear();const ce=Bt.value.length;ce>0&&Fe(ce),F6(),K1=null,G1=null,Of=null,nd=null,ad=!1,cd(),yy(),yt(()=>{Vr(),Ht.value&&_l(),Be.value&&dc(),Lo(re)})})("resize")):mc=G:mc=null},{flush:"post",immediate:!0}),Ze([Xe,()=>Fo(),()=>ws()],([L])=>{L&&(Y6(),G6(),ay("content"),Lo("content"))}),Ze([Xe,()=>Fo(),()=>ws(),tl,()=>Bt.value.length],([L])=>{L&&(function(G="async-node"){let re=!1;for(const[ce,ye]of Array.from(Yt.entries()))x6(ye)||(Yt.delete(ce),yn.delete(ce),re=!0);re&&(lc(),Lo(G))})("async-node")},{flush:"post"}),Ze([Xe,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.sessionKey},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey},()=>o.indexKey,()=>J.value],([L])=>{L&&(id(),(function(G="content"){if(!Xe.value)return;const re=[],ce=Bt.value.length,ye=g6(ce);for(const Re of Array.from(Wo.keys())){if(Re>=ce){re.push(Re);continue}if(Re=ce&&Wo.delete(Re);re.length&&((function(Re,He={}){const qe=Array.from(Re,Number);jr(qe);let ut=0;if(Or(()=>(ut=Ne(qe,He),ut>0)),ut>0)(function(Ue){for(const tt of Ue)Wo.delete(tt)})(qe);else for(const Ue of qe)vs.delete(Ue)})(re,{notify:!1}),Vt(),cd(),Ht.value&&_l(),Be.value&&dc(),Lo(G))})("content"))},{flush:"post",immediate:!0}),Ze([Xe,()=>Bt.value.length,()=>Fo(),()=>ws()],([L,G,re,ce],[ye,Re,He,qe])=>{L&&ye&&re===He&&ce===qe&&G!==Re&&cd()},{flush:"post"}),Ze([Xe,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.heightCache},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.heightCacheWidth},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey},()=>Bt.value.length,()=>Fo(),ee],()=>{yy()},{flush:"post",immediate:!0}),Ze([Xe,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreAnchor},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey},()=>Bt.value.length,()=>Fo(),ee],L=>zo(null,[L],function*([G,re]){if(!G||!re)return;yield yt();const ce=(function(){var ye;const Re=(ye=o.virtualScroll)==null?void 0:ye.restoreAnchor;return Re==null||Re===!1?null:Re===!0?"true":String(Re)})();P6(re,{restoreAnchor:ce!=null,restoreToken:ce??void 0})}),{flush:"post",immediate:!0}),Ze([Xe,ee,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey}],([L])=>{var G;if(!L)return;const re=(G=o.virtualScroll)==null?void 0:G.restoreState;re&&K1&&G1==="restore"&&(gy(re)||(G6(),K1=null,G1=null,Lo("resize")))},{flush:"post"}),Ze([Xe,()=>Bt.value.length,()=>Fo(),ee],L=>zo(null,[L],function*([G]){var re;const ce=Qu,ye=ed;G&&ce&&(yield yt(),!P6(ce,{restoreAnchor:ye?.restoreAnchor===!0,restoreToken:(re=ye?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:ye?.allowUncapturedAnchor===!0})&&wy(ce)||(Qu=null,ed=null))}),{flush:"post",immediate:!0}),Ze([Xe,Qe,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.settleMode},()=>Fo(),()=>ws(),tl,vi,ft,()=>Te.value,W1,()=>ts.count,()=>ts.total],([L,G,re])=>{if(!L||G!==!0||re==="manual"||!T6())return;const ce=(function(){var ye;const Re=Bt.value.length;return[(ye=ws())!=null?ye:"",Fo(),Dr(),Pf.value,Re,Math.round(on(0,Re)),Math.round(q1()),ts.count,Math.round(ts.total)].join(":")})();rd!==ce&&(rd=ce,O6({reason:"final"}).then(ye=>{ye.stable||rd!==ce||(rd=null)}))},{flush:"post",immediate:!0}),Ze([Xe,Qe,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.settleMode},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.settledToken},()=>Fo(),()=>ws(),tl,vi,ft,()=>Te.value,W1,()=>Bt.value.length,()=>ts.count,()=>ts.total],()=>{My()},{flush:"post",immediate:!0}),Ze([()=>Bt.value.length,pn,Po,Xn,()=>ys.start,()=>ys.end],([L,G,re,ce,ye,Re])=>{fe.value&&Hn("virtualization",{nodes:L,virtualization:G,maxLiveNodes:re,buffer:ce,focusIndex:Zl.value,scroll:G?(()=>{const He=Ee.value||Se();return He?{reverse:me(He),scrollTop:Math.round(He.scrollTop),scrollTopAbs:Math.round(Math.abs(He.scrollTop)),scrollHeight:Math.round(He.scrollHeight),clientHeight:Math.round(He.clientHeight)}:null})():null,liveRange:{start:ye,end:Re},rendered:Te.value})}),Ze([()=>C.customId],([L],G,re)=>{if(!L||en)return;const ce=(function(ye,Re){return ye?(zs.controllers[ye]=Re,()=>{zs.controllers[ye]===Re&&delete zs.controllers[ye]}):()=>{}})(L,{captureRestoreAnchor:J0,restoreAnchor:Q0,getAnchorDrift:qu,getReport:mB});re(()=>{ce()})},{immediate:!0}),vo(()=>{(function(){if(Xe.value)try{Vr(),td();const L=U1("manual");by(L)&&(O(L),nd=L,D6=od());const G=cc(L,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});G&&(H(G),G.anchor&&D(G.anchor),fc=ld(G))}catch{}})(),TB(),m6(),xn(),Cy();for(const L of mr.values())for(const G of L)Nf(G);mr.clear(),Bi.clear(),Wo.clear(),K6(),hc(),y6(),rs(),uc(),U6(),X9(),p6()});const EB=Yd("ViewportDeferredMermaidBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index11-H71ylPuM.js"),__vite__mapDeps([9,7]))).default}catch(L){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',L),Di}}),loadingComponent:aS,delay:0}),aS),IB=Yd("ViewportDeferredInfographicBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index10-CG-shKcB.js"),[])).default}catch(L){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',L),Di}}),loadingComponent:rS,delay:0}),rS),$B=Yd("ViewportDeferredD2BlockNode",Rl(()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index8-CdLvqqXT.js"),[])).default}catch(L){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',L),Di}})),Di),Ay={text:is,paragraph:B0,heading:qp,code_block:im,list:hu,list_item:pu,blockquote:_4,table:x2,definition_list:x4,footnote:S4,footnote_reference:rl,footnote_anchor:b2,admonition:T4,vmr_container:M4,hardbreak:p1,link:$i,image:f1,thematic_break:C4,math_inline:fr,math_block:oL,strong:Ei,emphasis:Li,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,inline_code:hi,html_inline:al,reference:Ti,html_block:_2},LB=z(()=>b6()),Ty=z(()=>Ux(C.codeBlockProps)),NB=z(()=>Ux(C.codeBlockProps,{omit:["langs"]})),Ey=z(()=>xt(xt({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,monacoOptions:C.codeBlockMonacoOptions,themes:C.themes,langs:h.value==="shiki"?C.langs:void 0,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ve.value=="boolean"?{showTooltips:ve.value}:{}),NB.value)),Iy=z(()=>xt(wn(xt({},Ey.value),{langs:C.langs}),Ty.value));function $y(L){return typeof L=="boolean"?L:void 0}const zB=z(()=>{const L=C.codeBlockProps||{},G={},re=$y(L.showLineNumbers);re!==void 0&&(G.showLineNumbers=re);const ce=$y(L.diffInline);ce!==void 0&&(G.diffInline=ce);const ye=(function(Re){const He=Number(Re);return Number.isFinite(He)&&He>0?He:void 0})(L.reservedHeightPx);return ye!==void 0&&(G.reservedHeightPx=ye),G}),BB=z(()=>xt(xt({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,themes:C.themes,langs:C.langs,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ve.value=="boolean"?{showTooltips:ve.value}:{}),Ty.value)),RB=z(()=>xt({},C.mermaidProps||{})),Ly=z(()=>xt({},C.d2Props||{})),PB=z(()=>xt({},C.infographicProps||{})),dd=z(()=>({typewriter:f.value,fade:C.fade,customHtmlTags:Io.value.customHtmlTags})),FB=z(()=>xt(xt({},dd.value),typeof ve.value=="boolean"?{showTooltip:ve.value}:{})),jB=z(()=>xt(xt({},dd.value),typeof ve.value=="boolean"?{showTooltips:ve.value}:{})),OB=z(()=>xt(xt({},dd.value),typeof ve.value=="boolean"?{showTooltips:ve.value}:{})),HB=z(()=>xt(xt({},dd.value),typeof ve.value=="boolean"?{showTooltips:ve.value}:{}));function DB(L){return Array.isArray(L.children)&&L.children.length>0}const qf=z(()=>hB.value.map(L=>{var G,re,ce,ye,Re,He,qe,ut;let Ue=(function(bt){var Ot,Kt,an,sn,un,$n,On;if(bt.type!=="code_block")return bt;const wo=bt,Ys=[String((Ot=wo.language)!=null?Ot:""),String((Kt=wo.loading)!=null?Kt:""),String((an=wo.diff)!=null?an:""),String((sn=wo.code)!=null?sn:""),String((un=wo.originalCode)!=null?un:""),String(($n=wo.updatedCode)!=null?$n:""),String((On=wo.raw)!=null?On:"")].join("\0"),Ds=Ea.get(wo);if(Ds&&Ds.signature===Ys)return Ds.node;const Xl=xt({},wo);return Ea.set(wo,{signature:Ys,node:Xl}),Xl})(L.node);const tt=Uf(Ue);let ct=Ry(Ue,tt);if((Ue.type==="html_block"||Ue.type==="html_inline")&&ct===Ay[Ue.type]){const bt=Ue,Ot=String((G=bt.tag)!=null?G:"").trim().toLowerCase()||II(bt.content);if(Ot){const Kt=Un.value[Ot];if(hs.value.has(Ot)&&Kt)ct=Kt,Ue=wn(xt({},bt),{type:Ot,tag:Ot,content:nae(bt.content,Ot)});else if($I((re=bt.content)!=null?re:bt.raw,Ot)){const an=String((ye=(ce=bt.content)!=null?ce:bt.raw)!=null?ye:"");Ue.type==="html_inline"?(ct=is,Ue={type:"text",content:an,raw:an}):(ct=B0,Ue={type:"paragraph",children:[{type:"text",content:an,raw:an}],raw:an})}}}const De=Ue.type==="code_block"&&h.value==="pre"&&ct===Di&&!X6(Un.value,tt);let nt=xt({},(function(bt,Ot,Kt){const an=Ot??Uf(bt);if(bt.type==="code_block"){const sn=an?X6(Un.value,an):void 0;if(Kt&&h.value==="pre"&&!sn&&Kt===Di)return zB.value;if(Kt&&an&&Kt===sn)return an==="mermaid"?zy(bt):an==="infographic"?By(bt):an==="d2"||an==="d2lang"?Ly.value:Iy.value;if(Kt&&Kt===Un.value.code_block)return Iy.value;if(ty(Kt))return BB.value}return an==="mermaid"?zy(bt):an==="infographic"?By(bt):an==="d2"||an==="d2lang"?Ly.value:bt.type==="link"?FB.value:bt.type==="list"?jB.value:bt.type==="blockquote"?OB.value:bt.type==="table"?HB.value:bt.type==="code_block"?Ey.value:dd.value})(Ue,tt,ct));const gt=je.value?ic.value[L.index]:null;Ue.type==="code_block"&>?.kind==="code-block"&&(nt=wn(xt({},nt),De?{reservedHeightPx:(Re=gt.height)!=null?Re:gt.contentHeight}:{estimatedHeightPx:gt.height,estimatedContentHeightPx:gt.contentHeight,estimatedDiffInline:gt.diffInline})),De||Ue.type!=="code_block"||tt!=="mermaid"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(xt({},nt),{estimatedPreviewHeightPx:I5(T5(String((He=Ue.code)!=null?He:"")))})),De||Ue.type!=="code_block"||tt!=="infographic"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(xt({},nt),{estimatedPreviewHeightPx:$5(E5(String((qe=Ue.code)!=null?qe:"")))})),Ue.type==="math_block"&&(nt=wn(xt({},nt),{cacheScope:Bo}));const ht=(function(bt,Ot){const Kt=String(bt.type);return!Cf(Kt)&&Un.value[Kt]===Ot})(Ue,ct),Et=ht?Sv(Ue,ge.value):void 0;return wn(xt({},L),{node:Ue,component:ct,bindings:nt,customBindings:xt(xt({},Et??{}),nt),rendersCustomNode:ht,hasSlotChildren:DB(Ue),slotContent:String((ut=Ue.content)!=null?ut:""),isCodeBlock:Ue.type==="code_block",indexKey:`${LB.value}-${L.index}`,vnodeKey:`${gB.value}\0${L.index}\0${Ue.type}`})}));function Uf(L){var G;return L?.type==="code_block"?String((G=L.language)!=null?G:"").trim().toLowerCase():""}function X6(L,G){const re=G.trim().toLowerCase();if(re)for(const ce of[re,Dp(re),F$(re)]){const ye=ce&&L[ce];if(ye)return ye}}function Ny(L,G,re,ce){var ye,Re;const He=xt({},L.value);return Kc(He.estimatedPreviewHeightPx)==null&&(He.estimatedPreviewHeightPx=ce(re(String((ye=G?.code)!=null?ye:"")),void 0,He.maxHeight==="none"?null:(Re=Kc(He.maxHeight))!=null?Re:void 0)),He}function zy(L){return Ny(RB,L,T5,I5)}function By(L){return Ny(PB,L,E5,$5)}function Ry(L,G){if(!L)return h7;const re=Un.value,ce=re[String(L.type)];if(L.type==="code_block"){const ye=G??Uf(L),Re=ye?X6(re,ye):void 0;return Re||(h.value==="pre"?re.code_block||Di:ye==="mermaid"?re.mermaid||EB:ye==="infographic"?re.infographic||IB:ye==="d2"||ye==="d2lang"?re.d2||$B:ce||re.code_block||ny.value)}return ce||Ay[String(L.type)]||h7}function J6(L){s("click",L)}function VB(L){var G;(G=L.target)!=null&&G.closest("[data-node-index]")&&s("mouseover",L)}function WB(L){var G;(G=L.target)!=null&&G.closest("[data-node-index]")&&s("mouseout",L)}function Py(L){s("mouseover",L)}function Fy(L){s("mouseout",L)}const J1=V(null),Ri=V(!1),fd=V(null),qB=z(()=>!(C.domMode!=="minimal"||Z.value||C.fade!==!1||f.value||Ri.value||mn.value||pn.value||Ve.value||Ro.value||vl.value||Object.keys(Un.value).length!==0));let pd,gc=null,Q6=0,Zf=0,Kf=0;const jy=["code_block","admonition","table","math_block","html_block","image","thematic_break"],UB=new Set(jy),Oy=[".typewriter-cursor",".height-estimation-probes",...jy.map(L=>`[data-node-type="${L}"]`),"script","style"].join(",");function Hy(L){if(!L||typeof L!="object")return!1;const G=L.type;return typeof G=="string"&&UB.has(G)}function Gf(L){var G,re;if(!L||typeof L!="object")return 0;const ce=L,ye=(re=(G=ce.raw)!=null?G:ce.content)!=null?re:ce.code;if(typeof ye=="string")return ye.length;const Re=ce.children;if(Array.isArray(Re))return Re.reduce((qe,ut)=>qe+Gf(ut),0);const He=ce.items;return Array.isArray(He)?He.reduce((qe,ut)=>qe+Gf(ut),0):0}function Yf(){pd&&(clearTimeout(pd),pd=void 0)}function eh(){Q6+=1,gc!=null&&($o?.(gc),gc=null)}function hd(){eh(),Na(),J1.value&&(J1.value.style.visibility="hidden")}function ZB(L){var G;if(L.nodeType!==Node.TEXT_NODE||!((G=L.textContent)!=null?G:"").trim())return!1;const re=L.parentElement;return!!re&&!re.closest(Oy)}function KB(L){let G=L.lastChild;for(;G;){if(ZB(G))return G;if(G.nodeType===Node.ELEMENT_NODE){const re=G;if(!re.matches(Oy)&&re.lastChild){G=re.lastChild;continue}}for(;G&&G!==L&&!G.previousSibling;)G=G.parentNode;if(!G||G===L)break;G=G.previousSibling}return null}function Dy(){const L=qf.value;for(let G=L.length-1;G>=0;G--){const re=L[G];if(!re||Hy(re.node)||!Df(re.index))continue;const ce=no.get(re.index);if(!ce)continue;const ye=KB(ce);if(ye)return ye}return null}function Na(){fd.value&&(fd.value.classList.remove(cS),fd.value=null)}function Xf(){if(d.value!=="simple"||!F||!Ri.value||!A.value)return void Na();const L=Dy(),G=L?(function(re){var ce;const ye=(ce=re.parentElement)==null?void 0:ce.closest(".text-node");return ye instanceof HTMLElement?ye:re.parentElement})(L):null;G!==fd.value&&(Na(),G&&(G.classList.add(cS),fd.value=G))}function Jf(){if(d.value!=="precise"||!F||!Ri.value||gc!=null)return;const L=Q6,G=()=>{gc=null,L===Q6&&(function(){var re,ce;if(d.value!=="precise"||!(F&&Ri.value&&A.value&&J1.value))return;const ye=A.value,Re=J1.value;Re.style.visibility="hidden";const He=Dy();if(!He)return;let qe=0,ut=0,Ue=20,tt=!1;if(He?.textContent){const ct=He.textContent.length,De=document.createRange();De.setStart(He,Math.max(0,ct-1)),De.setEnd(He,ct);const nt=typeof De.getClientRects=="function"?De.getClientRects():void 0,gt=(ce=nt?.[nt.length-1])!=null?ce:(re=He.parentElement)==null?void 0:re.getBoundingClientRect();if(gt){const ht=Qt("typewriterCursor.root.getBoundingClientRect",()=>ye.getBoundingClientRect());qe=gt.right-ht.left+ye.scrollLeft,ut=gt.top-ht.top+ye.scrollTop,Ue=gt.height||Ue,tt=!0}De.detach()}tt&&(Re.style.transform=`translate(${Math.max(0,qe)}px, ${Math.max(0,ut)}px)`,Re.style.height=`${Ue}px`,Re.style.visibility="visible")})()};yo?gc=yo(G):G()}return Ze([_e,()=>o.content,()=>o.nodes,()=>C.typewriter,Qe],()=>zo(null,null,function*(){var L,G;if(!F||Z.value||!de.value)return;if(Qe.value)return Ri.value=!1,Yf(),void hd();if((L=o.nodes)!=null&&L.length)return Ri.value=!1,Yf(),hd(),Zf=((G=o.content)!=null?G:"").length,void(Kf=_e.value.length);const re=(function(){var qe,ut;return(qe=o.nodes)!=null&&qe.length?o.nodes.reduce((Ue,tt)=>Ue+Gf(tt),0):((ut=o.content)!=null?ut:"").length})(),ce=(function(){var qe;return(qe=o.nodes)!=null&&qe.length?o.nodes.reduce((ut,Ue)=>ut+Gf(Ue),0):_e.value.length})(),ye=!Hy(Bt.value[Bt.value.length-1]),Re=re>Zf,He=ce>Kf;if(!f.value||!ye||!Re&&!He)return f.value&&ye||(Ri.value=!1,hd()),Zf=re,void(Kf=ce);Zf=re,Kf=ce,Ri.value=!0,d.value==="precise"&&J1.value&&(J1.value.style.visibility="hidden"),Yf(),yield yt(),d.value==="simple"?Xf():(Na(),Jf()),pd=setTimeout(()=>{pd=void 0,Ri.value=!1},3e3)}),{flush:"post",immediate:!0}),Ze(Ri,L=>zo(null,null,function*(){L?(yield yt(),d.value!=="simple"?(Na(),d.value==="precise"&&Jf()):Xf()):hd()}),{flush:"post"}),Ze(d,()=>zo(null,null,function*(){if(F&&!Z.value&&de.value&&Ri.value){if(yield yt(),d.value==="simple")return eh(),void Xf();Na(),d.value!=="precise"?hd():Jf()}}),{flush:"post"}),Ze([()=>Te.value,()=>ys.start,()=>ys.end],()=>zo(null,null,function*(){F&&!Z.value&&de.value&&Ri.value&&(yield yt(),d.value!=="simple"?(Na(),d.value==="precise"&&Jf()):Xf())}),{flush:"post"}),vo(()=>{Yf(),eh(),Na(),Zn.clear()}),(L,G)=>{const re=gg("NodeRenderer",!0);return v(Z)?(g(!0),S(Ce,{key:0},at(qf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onClick:J6,onMouseover:Py,onMouseout:Fy,onCopy:G[0]||(G[0]=ye=>i(ye)),onHandleArtifactClick:G[1]||(G[1]=ye=>s("handleArtifactClick",ye))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},ze.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},ze.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onClick:J6,onMouseover:Py,onMouseout:Fy,onCopy:G[2]||(G[2]=ye=>i(ye)),onHandleArtifactClick:G[3]||(G[3]=ye=>s("handleArtifactClick",ye))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(g(),S("div",{key:1,ref_key:"containerRef",ref:A,class:Pe(["markstream-vue markdown-renderer",[{dark:C.isDark},{virtualized:pn.value},{"virtual-scroll-coordinated":We.value},{"stable-layout":Sl.value},{"typewriter-simple-cursor":Ri.value&&d.value==="simple"}]]),"data-custom-id":C.customId,onClick:J6,onMouseover:VB,onMouseout:WB},[kt.value||pn.value?(g(),S(Ce,{key:0},[kt.value?(g(),ue(Y3e,{key:0,width:So.value,"flow-root":pn.value||We.value,"paragraph-node":dt.value,"list-item-node":Ct.value,"list-node":Ft.value,"heading-nodes":Ut.value,"set-paragraph-wrapper":aB,"set-list-item-wrapper":cB,"set-list-wrapper":uB,"set-heading-wrapper":pB},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):Y("",!0),pn.value?(g(),S("div",{key:1,class:"node-spacer",style:Gt({height:`${w6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],64)):Y("",!0),qB.value?(g(!0),S(Ce,{key:1},at(qf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[Df(ce.index)?(g(),ue(cs(ce.component),io({key:0,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onMouseover:G[4]||(G[4]=ye=>s("mouseover",ye)),onMouseout:G[5]||(G[5]=ye=>s("mouseout",ye)),onCopy:G[6]||(G[6]=ye=>i(ye)),onHandleArtifactClick:G[7]||(G[7]=ye=>s("handleArtifactClick",ye))}),null,16,["node","loading","index-key","custom-id","is-dark"])):Y("",!0)],64))),128)):(g(!0),S(Ce,{key:2},at(qf.value,ce=>(g(),S("div",{key:ce.vnodeKey,ref_for:!0,ref:ye=>Vf(ce.index,ye),class:"node-slot","data-node-index":ce.index,"data-node-type":ce.node.type},[Df(ce.index)?(g(),S("div",{key:0,ref_for:!0,ref:ye=>(function(Re,He){var qe;He||(function(ct){const De=`${b6()}-${ct}`;let nt=!1;for(const gt of Array.from(yn.keys())){const ht=Yt.get(gt);(ht?.index===ct||gt===De||gt.startsWith(`${De}-`))&&(yn.delete(gt),Yt.delete(gt),nt=!0)}nt&&(lc(),Lo("async-node"))})(Re),Kl.delete(Re),(function(ct){var De;const nt=((De=Bi.get(ct))!=null?De:0)+1;Bi.set(ct,nt)})(Re);const ut=mr.get(Re);if(ut){for(const ct of ut)Nf(ct);mr.delete(Re)}if((function(ct){const De=Vo.get(ct);De&&(Os?.unobserve(De),Qi.delete(De),Vo.delete(ct))})(Re),!He||!Us.value)return Cl.delete(Re),void Bi.delete(Re);Cl.set(Re,He);const Ue=()=>{Wf(Re,He)};queueMicrotask(Ue);const tt=(Os||typeof ResizeObserver>"u"||(Os=new ResizeObserver(ct=>{if(ct.length)for(const De of ct){const nt=Qi.get(De.target),gt=Vo.get(nt??-1);nt!=null&>&&Wf(nt,gt)}else Vr()})),Os);if(tt&&(Vo.set(Re,He),Qi.set(He,Re),tt.observe(He)),typeof window<"u"){const ct=((qe=Bt.value[Re])==null?void 0:qe.type)==="code_block"?[16,80,240,800]:Qe.value?[80]:[];if(ct.length){const De=ct.map(nt=>Gu(nt,Ue,"node-resize")).filter(nt=>nt!=null);De.length&&mr.set(Re,De)}}})(ce.index,ye),class:"node-content"},[ce.isCodeBlock?ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:1,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[12]||(G[12]=ye=>i(ye)),onHandleArtifactClick:G[13]||(G[13]=ye=>s("handleArtifactClick",ye))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},ze.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},ze.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:2,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[14]||(G[14]=ye=>i(ye)),onHandleArtifactClick:G[15]||(G[15]=ye=>s("handleArtifactClick",ye))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(qi,{key:0,name:"fade",css:C.fade!==!1,appear:C.fade!==!1},{default:ae(()=>[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[8]||(G[8]=ye=>i(ye)),onHandleArtifactClick:G[9]||(G[9]=ye=>s("handleArtifactClick",ye))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},ze.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},ze.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[10]||(G[10]=ye=>i(ye)),onHandleArtifactClick:G[11]||(G[11]=ye=>s("handleArtifactClick",ye))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(g(),S("div",{key:1,class:"node-placeholder",style:Gt({height:`${Wt(ce.index)}px`})},null,4))],8,Q3e))),128)),Ri.value&&d.value==="precise"?(g(),S("span",{key:3,ref_key:"typewriterCursorRef",ref:J1,class:"typewriter-cursor","aria-hidden":"true"},null,512)):Y("",!0),pn.value?(g(),S("div",{key:4,class:"node-spacer",style:Gt({height:`${k6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],42,J3e))}}})),[["__scopeId","data-v-a9489508"]]),Xi=vL;Xi.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Xi.__name,Xi.name].filter(n=>!!n));for(const n of t)e.component(n,vL)};const Fv=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"})),e4e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},t4e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},n4e={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},o4e={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},s4e={class:"admonition-title"},i4e=["aria-expanded","aria-controls"],l4e=["id"],T4=ho(Je({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=z(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const c=o.node.kind||"note";return c.charAt(0).toUpperCase()+c.slice(1)}),l=V(!!o.node.collapsible&&!((n=o.node.open)==null||n));function r(){o.node.collapsible&&(l.value=!l.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(c,u)=>(g(),S("div",{class:Pe(["admonition",[`admonition-${o.node.kind}`]])},[b("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(g(),S("svg",e4e,[...u[1]||(u[1]=[b("circle",{cx:"12",cy:"12",r:"10"},null,-1),b("path",{d:"M12 16v-4"},null,-1),b("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(g(),S("svg",t4e,[...u[2]||(u[2]=[b("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),b("path",{d:"M9 18h6"},null,-1),b("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(g(),S("svg",n4e,[...u[3]||(u[3]=[b("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),b("path",{d:"M12 9v4"},null,-1),b("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(g(),S("svg",o4e,[...u[4]||(u[4]=[b("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),b("path",{d:"M12 8v4"},null,-1),b("path",{d:"M12 16h.01"},null,-1)])])):Y("",!0),b("span",s4e,E(i.value),1),o.node.collapsible?(g(),S("button",{key:4,class:"admonition-toggle","aria-expanded":!l.value,"aria-controls":`${a}-content`,onClick:r},[(g(),S("svg",{style:Gt({rotate:l.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...u[5]||(u[5]=[b("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,i4e)):Y("",!0)]),Jn(b("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[W(v(Xi),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:u[0]||(u[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,l4e),[[_i,!l.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);T4.install=e=>{e.component(T4.__name,T4)};const w7=()=>Cs(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let j3=null,O3=w7,H3=null,uS=!1,dS=!1;function JZe(){return zo(this,null,function*(){if(j3)return j3;const e=O3;return e?e===w7&&uS?null:H3||(H3=zo(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===w7)return e===O3&&(uS=!0,(function(o){dS||(dS=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===O3&&(H3=null)}return e!==O3?null:t?(j3=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),j3):null}),H3):null})}let D3=null,yL=null,V3=null;function QZe(){return typeof yL=="function"}function eKe(){return zo(this,null,function*(){if(D3)return D3;const e=yL;return e?V3||(V3=zo(null,null,function*(){const t=yield e(),n=(function(o){var s,i,l;if(!o)return null;const r=(s=o.default)!=null?s:o,a=typeof r=="function"&&typeof((i=r.prototype)==null?void 0:i.render)=="function"?r:(l=o.Infographic)!=null?l:r?.Infographic;return typeof a=="function"?a:null})(t);return n?(D3=n,D3):null}).finally(()=>{V3=null}),V3):null})}const tKe=Symbol("markstreamLanguageIconResolver"),wL=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],r4e=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),k7=[...wL].toSorted((e,t)=>t.length-e.length).join("|"),gm=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${k7}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${k7})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(""),"gi"),kL=/[),.;!?]+$/;function a4e(e){const t=e.toLowerCase();return wL.some(n=>t.endsWith(`.${n}`))}function c4e(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${k7}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function u4e(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(kL,"");if(!s)return null;const i=s.split("/").pop()??s,l=s.includes("/"),r=r4e.has(i),a=a4e(i);if(l&&!r&&!a)return null;if(!l&&!r){const d=t.aliases?.get(i);if(!d)return null;s=d}const c=o[2]??o[3],u=c?Number(c):void 0;return{path:s,line:u!==void 0&&Number.isFinite(u)&&u>0?u:void 0}}function d4e(e,t={}){const n=[];gm.lastIndex=0;let o;for(;(o=gm.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",l=s.indexOf(i);if(l<0)continue;const r=o[2]??o[3];let a=i+(r?s.slice(l+i.length):"");const c=a.replace(kL,""),u=a.length-c.length;a=c;const d=u4e(a,t);if(!d)continue;const f=o.index+l,p=f+a.length;n.push({...d,start:f,end:p,text:a}),u>0&&(gm.lastIndex-=u)}return n}const f4e=12e4,p4e=6e4,h4e=32,m4e=3e4,fS=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function g4e(e){let t=0,n=0,o=0;fS.lastIndex=0;let s;for(;(s=fS.exec(e))!==null;){const l=s[3]??"";t+=1,n+=l.length,o=Math.max(o,l.length)}return{codeRenderer:e.length>=f4e||n>=p4e||t>=h4e||o>=m4e?"pre":"shiki",codeFenceCount:t,codeChars:n}}function W3(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o--)n++;return n%2===1}const v4e=/\s/,y4e=/\p{Nd}/u;function h1(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function w4e(e,t){if(t<=0)return;const n=e.codePointAt(t-1),o=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function pS(e){return e!==void 0&&v4e.test(e)}function Mu(e){return e!==void 0&&y4e.test(e)}function O5(e){return e!==void 0&&e>="A"&&e<="Z"}const bL=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function k4e(e,t){if(!O5(e[t-1]))return!1;let n=t-1;for(;n>0&&O5(e[n-1]);)n--;return bL.test(e.slice(n,t))||Mu(h1(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(h1(e,t+1)??"")}function b4e(e,t){if(!O5(e[t-1]))return!1;let n=t-1;for(;n>0&&O5(e[n-1]);)n--;return bL.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}function _4e(e,t){const n=e[t+1];return Mu(h1(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−")&&Mu(h1(e,t+2))}const x4e=/^[-–—,;:~([/]$/;function S4e(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Mu(h1(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&x4e.test(o)}const vm=String.raw`[,;:~\-–—/\s()=*×]|and|or`;function C4e(e){let t=e.replace(new RegExp(String.raw`^(?:${vm})+`,"u"),"");for(;;){const o=t.replace(new RegExp(String.raw`^\p{L}+(?:${vm})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(o===t)break;t=o}if(!/\p{Nd}/u.test(t))return!1;const n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${vm})+${n}(?:\p{L}+)?)*$`,"u").test(t)}const hS=1,mS=2,gS=3,kr=-1;function M4e(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(kr),s=new Int32Array(t+1),i=new Int32Array(t+1),l=[],r=[];{const A=[];for(let K=0;K`*—–“”‘’'),c=[];for(const A of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))c.push(A.index);for(const A of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))c.push(A.index);for(const A of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(A.index===0||!/[\w~/.-]/.test(e[A.index-1]??""))&&c.push(A.index);c.sort((A,R)=>A-R);let u=-1;for(const A of c){if(AA+7&&!/[\w/?#@~.+&=%-]/.test(e[R+1]??""))break}}l.push([A,R]),u=R}const d=[];for(let A=0;A]/.test(U))continue;let te=kr,J=kr;for(;j"){J=j;break}if(!q&&ee==="/"&&e[j+1]===">"){J=j+1;break}if(!/\s/.test(ee)){te=j;break}for(;j"){J=j;break}if(q){te=j;break}if(ie==="/"&&e[j+1]===">"){J=j+1;break}const Q=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(j));if(!Q){te=j;break}j+=Q[0].length;let he=j;for(;he`]+/.exec(e.slice(he));if(!Ye){te=he;break}j=he+Ye[0].length}}}if(J!==kr)d.push([A,J+1]),A=J;else if(te!==kr){const ee=e.indexOf("<",A+1);A=(ee!==-1&&ee",A+2);te===-1?f=!1:(d.push([A,te+2]),A=te+1,j=!0)}else if(R==="!"){if(e[A+2]==="-"&&e[A+3]==="-"){if(p){const te=e.indexOf("-->",A+4);te===-1?p=!1:(d.push([A,te+3]),A=te+2,j=!0)}}else if(e.startsWith("[CDATA[",A+2)){if(h){const te=e.indexOf("]]>",A+9);te===-1?h=!1:(d.push([A,te+3]),A=te+2,j=!0)}}else if(m&&/[A-Z]/.test(e[A+2]??"")){const te=e.indexOf(">",A+3);te===-1?m=!1:(d.push([A,te+1]),A=te,j=!0)}}if(j)continue;if(R!==void 0&&/[a-zA-Z]/.test(R)){const te=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(A+1));if(te){let J=A+1+te[0].length;for(;J"&&e[J]!=="<"&&!/\s/.test(e[J]);)J++;if(e[J]===">"){d.push([A,J+1]),A=J;continue}}}if(R===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(R))continue;let q=A+1;for(;q"&&(d.push([A,q+1]),A=q)}}d.sort((A,R)=>A[0]-R[0]);const k=[];for(const A of d){const R=k.at(-1);R&&A[0]<=R[1]?R[1]=Math.max(R[1],A[1]):k.push([A[0],A[1]])}l.push(...k);const x=A=>{let R=0;for(;R=(r[R]?.[1]??0);)R++;const j=r[R];return j!==void 0&&A>=j[0]},y=A=>{let R=0;for(;R=(k[R]?.[1]??0);)R++;const j=k[R];return j!==void 0&&A>=j[0]},w=[];let _=null,M=0,P=!1;for(let A=0;A"&&(P=!1);continue}if(!(x(A)||y(A))){if(_!==null){e[A]===_&&(_=null);continue}if(w.length>0&&(e[A]==='"'||e[A]==="'")&&A>0&&/\s/.test(e[A-1]??""))_=e[A];else if(e[A]==="[")M++;else if(e[A]==="]")M>0&&e[A+1]==="("&&(w.push(A),P=e[A+2]==="<",A++),M=Math.max(0,M-1);else if(e[A]==="("&&w.length>0)w.push(-1);else if(e[A]===")"&&w.length>0){const R=w.pop();if(R!==void 0&&R>=0){const j=e.slice(R+2,A);(/\s/.exec(j)===null||j.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(j)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(j))&&l.push([R,A+1])}}}}l.sort((A,R)=>A[0]-R[0]);const B=[];for(const A of l){const R=B.at(-1);R&&A[0]<=R[1]?R[1]=Math.max(R[1],A[1]):B.push([A[0],A[1]])}const $=A=>{let R=0,j=B.length-1;for(;R<=j;){const q=R+j>>1,K=B[q];if(K===void 0)return!1;if(A=K[1])R=q+1;else return!0}return!1},T=new Uint8Array(t);{let A=-1,R=!1,j=!1,q=0;for(let K=0;K<=t;K++){const U=K0&&(te==="{"?q++:te==="}"&&q--)}}for(let A=0;A=0;A--)n[A]===gS&&(I=A),o[A]=I;const N=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,C=/[^\p{L}\p{Nd}\s]$/u,O=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,D=(A,R)=>{const j=h1(e,A+1);if(j===void 0||!N.test(j))return!1;const q=o[A+1]??kr;if(q!==kr){const K=e.slice(A+1,q);return!(q-(A+1)===((e.codePointAt(A+1)??0)>65535?2:1))&&O.test(K)||/[,;:!?]$/.test(K)||/^[a-z]{2,}$/.test(K)?!1:(s[q]??0)-(s[A+1]??0)===0&&(i[q]??0)-(i[A+1]??0)===0}return C.test(R)||O.test(R)||H.test(R)};return(A,R=-1)=>{if(e[A]!=="$"||n[A]===hS||e[A+1]==="$"||e[A-1]==="$"&&R!==A||k4e(e,A)||A+1>=t||pS(h1(e,A+1)))return null;const j=o[A+1]??kr;if(j===kr||(s[j]??0)-(s[A+1]??0)>0||(i[j]??0)-(i[A+1]??0)>0)return null;const q=e.slice(A+1,j);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(q)||e[j+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(q)||Mu(w4e(e,A))&&C4e(q)||_4e(e,A)&&(D(j,q)||b4e(e,j)||/\s/.test(q)&&/\p{Nd}$/u.test(q)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(q)||!1)||e[j+1]==="$"&&!/\p{L}/u.test(q)&&C.test(q)?null:{content:q,end:j+1}}}const A4e=/^---[ \t]*(?:\r\n|\n)/,T4e=/^---[ \t]*$/;function E4e(e){const t=A4e.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const o=n;for(;n<=e.length;){let s=e.indexOf(` -`,n);s===-1&&(s=e.length);let i=e.slice(n,s);if(i.endsWith("\r")&&(i=i.slice(0,-1)),T4e.test(i)){const l=e.slice(o,n);if(l==="")return{frontmatter:null,body:e};const r=s\n]*>|[^()\s]+)\)/g,I4e=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,$4e=/^[a-zA-Z]:(?:[\\/]|%5c)/i,L4e=/^[A-Za-z0-9._~-]$/,H5="pythinker-code://skill/";let yS;function wS(e){return e.replaceAll("%","%25").replaceAll("&","%26").replaceAll("<","%3C").replaceAll(">","%3E").replaceAll(/[[\]\\]/g,"\\$&").replaceAll(` -`,"%0A").replaceAll("\r","%0D")}function N4e(e){return e.replaceAll(/\\([\\[\]])/g,"$1").replaceAll("%26","&").replaceAll("%3C","<").replaceAll("%3E",">").replaceAll("%0A",` -`).replaceAll("%0D","\r").replaceAll("%25","%")}function _L(e){let t="";for(const n of e){const o=n.codePointAt(0);o>127||L4e.test(n)?t+=n:t+=`%${o.toString(16).toUpperCase().padStart(2,"0")}`}return t}function z4e(e){const t=e.split("/").map(_L).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function xL(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function kS(e){const t=xL(e);try{return decodeURIComponent(t)}catch{return t}}function B4e(e){const t=xL(e);return!t||t.startsWith("#")||t.startsWith("?")||t.startsWith("//")?null:t.startsWith(H5)&&t.length>H5.length?"skill":I4e.test(t)&&!$4e.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?"folder":"file"}function ym(e,t){if(!t)return;const n=e.at(-1);n?.type==="text"?n.value+=t:e.push({type:"text",value:t})}function jv(e){if(e.kind==="skill")return`[${wS(e.name)}](${H5}${_L(e.name)})`;const t=e.kind==="folder"&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${wS(e.name)}](${z4e(t)})`}function SL(e){const t=[];let n=0;vS.lastIndex=0;for(const o of e.matchAll(vS)){const s=o.index;ym(t,e.slice(n,s));const i=o[0],l=o[1],r=o[2],a=e[s-1]==="!"?null:B4e(r);if(a&&l){const c=a==="skill"?kS(r).slice(H5.length):void 0;t.push({type:"mention",attrs:{kind:a,name:c??N4e(l),path:a==="skill"?"":kS(r)}})}else ym(t,i);n=s+i.length}return ym(t,e.slice(n)),t}function CL(e){const t=SL(e.args??"").filter(o=>o.type==="mention"&&o.attrs.kind==="skill"),n=t[0];return t.length===1&&n?.type==="mention"&&n.attrs.name===e.name}function ML(e,t){if(CL(e))return t.revivePill?e.args??"":null;if(e.name.includes(" "))return null;const n=e.args??"";return`/skill:${e.name}${n.length>0?` ${n}`:""}`}function R4e(e,t){return ML(e,t)!==null}function P4e(e){if(CL(e))return e.args??"";const t=jv({kind:"skill",name:e.name,path:""});return e.args?`${t} ${e.args}`:t}function bS(e){return yS??=new Intl.Segmenter("und",{granularity:"grapheme"}),Array.from(yS.segment(e),({segment:t})=>t)}function AL(e){const t=bS(e);if(t.length<=32)return e;const n=e.lastIndexOf("."),s=(n>=0?bS(e.slice(n)).length:0)+4,i=31-s;return i<8?`${t.slice(0,31).join("")}…`:`${t.slice(0,i).join("")}…${t.slice(-s).join("")}`}function F4e(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function j4e(e){return new Worker("/assets/mermaidParser.worker-DimdFOud.js",{type:"module",name:e?.name})}const O4e={key:0,class:"md-frontmatter"},H4e={class:"diff-bar"},D4e=["aria-label","onClick"],V4e={class:"diff-pre"},W4e={key:0,class:"diff-sign"},q4e={class:"diff-text"},U4e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",q3="pythinker-code://skill/",_S="md-table-wide",xS="md-table-toggle",SS="md-table-fade",CS="md-table-toggle--show",Z4e="md-table-at-end",K4e=26,MS="md-code-wrap",wm="md-code-wrap-toggle",km="md-code-nums",AS="md-code-nums-toggle",TS="data-md-code-css",G4e=` +`):a})(e):(function(a){if(!e3e.test(a))return a;let c=a.replace(Qfe," ");return c.charCodeAt(0)===32&&(c=c.slice(1)),c.length>0&&c.charCodeAt(c.length-1)===32&&(c=c.slice(0,-1)),c})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=(function(a,c,u){var d,f,p;const h=(am===null&&(am=new Intl.Segmenter(void 0,{granularity:"word"})),am);let m=0;const k=[],x=[],y=[],w=[],_=[],A=[],P=[],z=[],L=[],E=[],T=[],$=[];for(const M of h.segment(a))for(const R of w3e(M.segment,(d=M.isWordLike)!=null&&d,M.index,u)){let O=function(){A[Q]!==null&&(x[Q]=[Bx(k,A,P,Q)],A[Q]=null),x[Q].push(R.text),y[Q]=y[Q]||R.isWordLike,z[Q]=z[Q]||q,L[Q]=L[Q]||te,E[Q]=J,T[Q]=se,$[Q]=Rx(L[Q],ee)};const U=R.kind==="text",Z=p3e(R.text,R.isWordLike,R.kind),q=Lr(R.text),te=Nx(R.text),ee=x2(R.text),J=v7(R.text),se=h3e(R.text),Q=m-1;c.carryCJKAfterClosingQuote&&U&&m>0&&w[Q]==="text"&&q&&z[Q]&&E[Q]||U&&m>0&&w[Q]==="text"&&a3e(R.text)&&z[Q]||U&&m>0&&w[Q]==="text"&&T[Q]?O():U&&m>0&&w[Q]==="text"&&R.isWordLike&&te&&$[Q]?(O(),y[Q]=!0):Z!==null&&m>0&&w[Q]==="text"&&A[Q]===Z?P[Q]=((f=P[Q])!=null?f:1)+1:U&&!R.isWordLike&&m>0&&w[Q]==="text"&&!z[Q]&&(r3e(R.text)||R.text==="-"&&y[Q])?O():(k[m]=R.text,x[m]=[R.text],y[m]=R.isWordLike,w[m]=R.kind,_[m]=R.start,A[m]=Z,P[m]=Z===null?0:1,z[m]=q,L[m]=te,E[m]=J,T[m]=se,$[m]=Rx(te,ee),m++)}for(let M=0;Mnull);let j=-1;for(let M=m-1;M>=0;M--){const R=k[M];if(R.length!==0){if(w[M]==="text"&&!y[M]&&j>=0&&w[j]==="text"&&(c3e(R)||R==="-"&&d3e(k[j]))){const O=(p=C[j])!=null?p:[];O.push(R),C[j]=O,_[j]=_[M],k[M]="";continue}j=M}}for(let M=0;Mq+1){R.push(nr(se)),O.push(me),U.push("text"),Z.push(M.starts[q]),q=Q;continue}}R.push(te),O.push(J),U.push(ee),Z.push(M.starts[q]),q++}return{len:R.length,texts:R,isWordLike:O,kinds:U,starts:Z}})((function(M){const R=[],O=[],U=[],Z=[];for(let q=0;q1;for(let se=0;se=M.len||cm(M.kinds[ee]))continue;const J=[],se=M.starts[ee];let Q=ee;for(;Q0&&(R.push(nr(J)),O.push(!0),U.push("text"),Z.push(se),q=Q-1)}return{len:R.length,texts:R,isWordLike:O,kinds:U,starts:Z}})((function(M){const R=M.texts.slice(),O=M.isWordLike.slice(),U=M.kinds.slice(),Z=M.starts.slice();for(let te=0;te=0&&!r$(c.texts[w-1],u)&&y(w),m<0&&(m=w),k=k||Lr(_))}return y(c.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:h}})(i,l,t.breakKeepAllAfterPunctuation):l;return St({normalized:i,chunks:T3e(r,s)},r)}let Cc=null;const jx=new Map;let Mc=null;const I3e=new RegExp("\\p{Emoji_Presentation}","u"),L3e=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let um=null;const Ox=new Map;function y7(){if(Cc!==null)return Cc;if(typeof OffscreenCanvas<"u")return Cc=new OffscreenCanvas(1,1).getContext("2d"),Cc;if(typeof document<"u")return Cc=document.createElement("canvas").getContext("2d"),Cc;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Ha(e,t){let n=t.get(e);return n===void 0&&(n={width:y7().measureText(e).width,containsCJK:Lr(e)},t.set(e,n)),n}function j5(){if(Mc!==null)return Mc;if(typeof navigator>"u")return Mc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mc;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Mc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mc}function c$(){return um===null&&(um=new Intl.Segmenter(void 0,{granularity:"grapheme"})),um}function $3e(e){return I3e.test(e)||e.includes("️")}function s0(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let l=0;const r=c$();for(const a of r.segment(i))$3e(a.segment)&&l++;return l})(o)),s.emojiCount})(e,t)*n}function N3e(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function Hx(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function Dx(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function Bv(e,t){return t===0?0:e+t}function R3e(e,t,n,o,s){return Bv(o,t==="tab"?s+(function(i,l){return i.letterSpacing!==0&&i.spacingGraphemeCounts[l]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function Vx(e,t,n,o){return Bv(o,t==="tab"?0:e.lineEndFitAdvances[n])}function Wx(e,t,n,o,s){return Bv(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function P3e(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function F3e(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function j3(e,t,n){let o=t;for(;oO){if(ye!==null&&ie>F){Q(oe,ie,de),be=ie,ve=j3(ye,ve,be+1),ie=-1,de=0;continue}Q(),xe(oe,be,Se)}else Z+=Se,te=oe,ee=be+1;else xe(oe,be,Se);const je=be+1;ye!==null&&ye[ve]===je&&(ie=je,de=Z,ve++),be++}q&&te===oe&&ee===he.length&&(te=oe+1,ee=0)}let X=0;for(;X=H.length)));){const oe=H[X],F=Hx(D[X]);if(q)if(Z+oe>O){if(F){Ye(X,oe),Q(X+1,0,Z-oe),X++;continue}if(J>=0){if(te>J||te===J&&ee>0){Q();continue}Q(J,0,se);continue}if(oe>O&&M[X]!==null){Q(),at(X,0),X++;continue}Q()}else Ye(X,oe),F&&(J=X+1,se=Z-oe),X++;else oe>O&&M[X]!==null?at(X,0):me(X,oe),F&&(J=X+1,se=Z-oe),X++}return q&&Q(),U})(n,o);const{widths:s,kinds:i,breakableFitAdvances:l,breakablePreferredBreaks:r,discretionaryHyphenWidth:a,chunks:c}=n;if(s.length===0||c.length===0)return 0;const u=j5(),d=o+u.lineFitEpsilon;let f=0,p=0,h=!1,m=0,k=0,x=-1,y=0,w=null;function _(){x=-1,y=0,w=null}function A(C=m,j=k,H){f++,p=0,h=!1,_()}function P(C,j){h=!0,m=C+1,k=0,p=j}function z(C,j,H){h=!0,m=C,k=j+1,p=H}function L(C,j){h?(p+=j,m=C+1,k=0):P(C,j)}function E(C,j,H,D,M,R){if(!j)return;const O=Vx(n,C,H,M);Wx(n,C,H,M,D),x=H+1,y=p-R+O,w=C}function T(C,j){var H;const D=l[C],M=(H=r[C])!=null?H:null;let R=M===null?-1:j3(M,0,j+1),O=-1,U=j;for(;Ud){if(M!==null&&O>j){A(C,O),U=O,R=j3(M,R,U+1),O=-1;continue}A(),z(C,U,Z)}else p=ee,m=C,k=U+1}else z(C,U,Z);const q=U+1;M!==null&&M[R]===q&&(O=q,R++),U++}h&&m===C&&k===D.length&&(m=C+1,k=0)}function $(C){f++,_()}for(let C=0;C=j.endSegmentIndex)));){const D=i[H],M=Hx(D),R=B3e(n,h,H),O=D==="tab"?z3e(p+R,n.tabStopAdvance):s[H],U=R+O,Z=R3e(n,D,H,R,O);if(D!=="soft-hyphen")if(h){if(p+Z>d){const q=p+Vx(n,D,H,R);if(Wx(n,D,H,R,O),w==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&y<=d){A(x,0);continue}if(M&&q<=d){L(H,U),A(H+1,0),H++;continue}if(x>=0&&y<=d){if(m>x||m===x&&k>0){A();continue}const te=x;A(te,0),H=te;continue}if(Z>d&&l[H]!==null){A(),T(H,0),H++;continue}A();continue}L(H,U),E(D,M,H,O,R,U),H++}else Z>d&&l[H]!==null?T(H,0):P(H,O),E(D,M,H,O,R,U),H++;else h&&(m=H+1,k=0,x=H+1,y=p+a,w=D),H++}h&&(j.consumedEndSegmentIndex,A(j.consumedEndSegmentIndex,0))}return f})(e,t)}let dm=null;function Rv(){return dm===null&&(dm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),dm}function O3e(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=v7(d),r=Kp.has(d)}function u(d,f){o.push(d),i=i||f;const p=v7(d);l=d.length===1&&O0.has(d)&&l||p,r=!1}for(const d of Rv().segment(e)){const f=d.segment,p=Lr(f);o.length!==0?r||$v.has(f)||O0.has(f)||t.carryCJKAfterClosingQuote&&p&&l?u(f,p):i||p?(a(),c(f,d.index,p)):u(f,p):c(f,d.index,p)}return a(),n}function H3e(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(r){if(!(s<0)){if(i)s+1===r?o.push(t[s]):(function(a,c){const u=t[a].start,d=c=0&&!r$(t[r-1].text,n)&&l(r),s<0&&(s=r),i=i||Lr(a.text)}return l(t.length),o}function qx(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=Rv();for(const s of o.segment(e))n++;return n}function D3e(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function V3e(e,t,n,o,s){const i=j5(),{cache:l,emojiCorrection:r}=(function($,C){y7().font=$;const j=(function(M){let R=jx.get(M);return R||(R=new Map,jx.set(M,R)),R})($),H=(function(M){const R=M.match(/(\d+(?:\.\d+)?)\s*px/);return R?parseFloat(R[1]):16})($),D=C?(function(M,R){let O=Ox.get(M);if(O!==void 0)return O;const U=y7();U.font=M;const Z=U.measureText("😀").width;if(O=0,Z>R+.5&&typeof document<"u"&&document.body!==null){const q=document.createElement("span");q.style.font=M,q.style.display="inline-block",q.style.visibility="hidden",q.style.position="absolute",q.textContent="😀",document.body.appendChild(q);const te=q.getBoundingClientRect().width;document.body.removeChild(q),Z-te>.5&&(O=Z-te)}return Ox.set(M,O),O})($,H):0;return{cache:j,fontSize:H,emojiCorrection:D}})(t,(a=e.normalized,L3e.test(a)));var a;const c=s0("-",Ha("-",l),r)+(s===0?0:2*s),u=8*s0(" ",Ha(" ",l),r),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=null,y=[],w=[],_=[],A=null,P=Array.from({length:e.len});function z($,C,j,H,D,M,R,O,U){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(j),h.push(H),m.push(D),y.push(R),w.push(O),d&&_.push(U)}function L($,C,j,H,D){const M=Ha($,l),R=d?qx($,C):0,O=(function(te,ee,J){return ee>1?te+(ee-1)*J:te})(s0($,M,r),R,s),U=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:O,Z=U===0?0:U+(R>0?s:0),q=C==="space"||C==="zero-width-break"?0:O;if(D&&H&&$.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":T4($)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const ee=(function(se,Q,me,xe,Ye){if(Q.breakableFitAdvances!==void 0&&Q.breakableFitMode===Ye)return Q.breakableFitAdvances;Q.breakableFitMode=Ye;const at=c$(),X=[];for(const he of at.segment(se))X.push(he.segment);if(X.length<=1)return Q.breakableFitAdvances=null,Q.breakableFitAdvances;if(Ye==="sum-graphemes"){const he=[];for(const ye of X){const ve=Ha(ye,me);he.push(s0(ye,ve,xe))}return Q.breakableFitAdvances=he,Q.breakableFitAdvances}if(Ye==="pair-context"||X.length>96){const he=[];let ye=null,ve=0;for(const ie of X){const de=s0(ie,Ha(ie,me),xe);if(ye===null)he.push(de);else{const be=ye+ie,Se=Ha(be,me);he.push(s0(be,Se,xe)-ve)}ye=ie,ve=de}return Q.breakableFitAdvances=he,Q.breakableFitAdvances}const oe=[];let F="",K=0;for(const he of X){F+=he;const ye=s0(F,Ha(F,me),xe);oe.push(ye-K),K=ye}return Q.breakableFitAdvances=oe,Q.breakableFitAdvances})($,M,l,r,te),J=ee===null||o==="keep-all"?null:(function(se){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(se))return null;const Q=[];let me=0;for(const xe of Rv().segment(se))me++,D3e(xe.segment)&&Q.push(me);return Q.length===0?null:Q})($);return void z($,O,Z,q,C,j,ee,J,R)}z($,O,Z,q,C,j,null,null,R)}for(let $=0;$=55296&&se<=56319&&J+1=56320&&Ye<=57343&&(Q=Ye-56320+(se-55296<<10)+65536,me=2)}const xe=Jfe(Q);xe!=="R"&&xe!=="AL"&&xe!=="AN"||(O=!0);for(let Ye=0;Ye=0&&R[se]==="ET";se--)R[se]="EN";for(se=J+1;se0?R[J-1]:te)!=="L"?"R":"L";if(Q===((se{const e=globalThis;if(e[fm])return e[fm];const t={configs:{},controllers:{},revision:Uo(0),preparedCache:new Map,blockEstimateCache:new Map};return e[fm]=t,t})();let Ed=null;const pm=zs.revision;function Ux(e){var t;return e&&(t=zs.configs[e])!=null?t:null}function Zx(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function q3e(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function hm(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!q3e(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` +`)}return s.length>0?s:null}function mm(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Ed!=null)return Ed;if(typeof document>"u")return!1;try{const l=document.createElement("canvas");return Ed=!!((i=l.getContext)!=null&&i.call(l,"2d")),Ed}catch{return Ed=!1,!1}})())return null;try{const i=Math.round(100*t)/100,l=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),r=zs.blockEstimateCache.get(l);if(r)return zs.blockEstimateCache.delete(l),zs.blockEstimateCache.set(l,r),{kind:"simple-text",height:r.height,contentHeight:r.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",c=(function(p,h,m){const k=`${m}\0${h}\0${p}`,x=zs.preparedCache.get(k);if(x)return zs.preparedCache.delete(k),zs.preparedCache.set(k,x),x.prepared;const y=(function(w,_,A){return(function(P,z,L,E){var T,$;const C=(T=E?.wordBreak)!=null?T:"normal",j=($=E?.letterSpacing)!=null?$:0;return V3e(E3e(P,j5(),E?.whiteSpace,C),z,!1,C,j)})(w,_,0,A)})(p,h,{whiteSpace:m});for(zs.preparedCache.set(k,{prepared:y});zs.preparedCache.size>240;){const w=zs.preparedCache.keys().next().value;if(!w)break;zs.preparedCache.delete(w)}return y})(e,n.font,a),u=(function(p,h,m){const k=j3e(p,h);return{lineCount:k,height:k*m}})(c,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,u.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(zs.blockEstimateCache.set(l,{height:f,contentHeight:Math.round(d)});zs.blockEstimateCache.size>4e3;){const p=zs.blockEstimateCache.keys().next().value;if(!p)break;zs.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function u$(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=hm(e.children);return i&&n.paragraph?mm(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),l=hm(e.children),r=n.headings[i];return l&&r?mm(l,t,r):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const l=hm((s=i[0])==null?void 0:s.children);return l?mm(l,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let l=Math.max(0,n.listWrapperOverhead);for(const r of i){const a=u$(r,t,n);if(!a)return null;l+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(l)),contentHeight:Math.max(1,Math.round(l))}}return null}function Id(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function i0(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function gm(e,t,n=0){return e.diff?Iv(t??{},n)?(function(o){const s=i0(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(l=>!W3e.some(r=>l.startsWith(r))).length):Math.max(1,i.length)}return Id(i0(o.originalCode))+Id(i0(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(Id(i0(s)),Id(i0(i)));const l=i0(o.code).split(/\r?\n/);let r=0,a=0;for(const c of l)c.startsWith("+")&&!c.startsWith("+++")?a++:c.startsWith("-")&&!c.startsWith("---")?r++:(r++,a++);return Math.max(1,r,a)})(e):Id(i0(e.code,e.loading===!0))}function U3e(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function vm(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=Zx(o.lineHeight,1.5*Zx(o.fontSize,16)),l=e.getBoundingClientRect().width,r=t.getBoundingClientRect().width;return{font:U3e(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,l-r),whiteSpace:n}}const Z3e=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function Kx(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[l,r]of Object.entries(i))Z3e.has(l)||s.has(l)||r.enumerable&&"value"in r&&(o[l]=r.value);return o}function Gx(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),l=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=l);const r=Math.max(0,i-l),a=[-r,r];let c=a[0],u=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=o.getNormalizedScrollTop(e,t,!1),h=Math.abs(p-l);hd&&(e.scrollTop=c)}function Yx(e,t){let n=0,o=null,s=null;const i=()=>{const l=s;s=null,o=null,l&&(n=Date.now(),e(...l))};return function(...l){const r=Date.now(),a=t-(r-n);s=l,a<=0?(o&&(clearTimeout(o),o=null),n=r,s=null,e(...l)):o||(o=setTimeout(i,a))}}function Xx(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const d$=Symbol("MarkstreamMathBlockMinHeightCache");function IKe(){return fn(d$,null)}const K3e=new Set(["text","inline_code","emoji","footnote_reference"]),G3e=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Ld(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function l0(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),l=s.split(/\r?\n/).length,r=Math.ceil(s.length/i),a=Math.max(1,l,r);return Math.max(n,Math.ceil(a*o+12))}function f$(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(K3e.has(o))return!0;if(!G3e.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(f$)}function w7(e){var t,n,o,s,i,l,r,a;if(!e||typeof e!="object")return"";const c=e,u=String((t=c.type)!=null?t:"");if(u==="text")return String((o=(n=c.content)!=null?n:c.raw)!=null?o:"");if(u==="inline_code")return String((l=(i=(s=c.code)!=null?s:c.content)!=null?i:c.raw)!=null?l:"");if(u==="emoji")return String((a=(r=c.name)!=null?r:c.raw)!=null?a:"");if(typeof c.text=="string")return c.text;const d=[];for(const f of["children","items","cells","rows"]){const p=c[f];if(Array.isArray(p)){const h=p.map(w7).filter(Boolean).join(" ");h&&d.push(h)}}return d.join(" ").replace(/\s+/g," ").trim()}function p$(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(p$)})}function Y3e(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function X3e(e,t){var n,o,s,i,l,r,a,c,u,d,f,p,h,m;if(!e||typeof e!="object")return 32;const k=e,x=String((n=k.type)!=null?n:""),y=Number.isFinite(t)&&t>0?t:640;switch(x){case"heading":return(function(w){var _;const A=Number((_=w.level)!=null?_:w.depth);return A>=4?20:A===3?30:A===2?32:44})(k);case"paragraph":return(function(w,_){const A=String(w??"");if(!A)return 28;const P=Math.max(18,Math.floor(Math.max(320,_)/8)),z=A.split(/\r?\n/).length,L=Math.ceil(A.length/P);return Math.max(1,z,L)<=1?28:l0(A,_,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),y);case"list":return(function(w,_){var A;const P=Array.isArray(w.items)?w.items:[];if(!P.length)return 48;const z=Math.max(48,30*P.length+12);let L=12;for(const $ of P)L+=Y3e(w7($)||String((A=$.raw)!=null?A:""),_);const E=Math.max(0,L-z);if(P.length>20){const $=Math.round(2.4*P.length);return Math.round(z+Math.max($,Math.min(E,3*P.length)))}if(E<=0)return z;const T=P.length>8?8*P.length:E;return Math.round(z+Math.min(E,T))})(k,y);case"list_item":return l0(String((l=(i=k.raw)!=null?i:k.content)!=null?l:""),y,34);case"blockquote":return l0(String((a=(r=k.raw)!=null?r:k.content)!=null?a:""),y,56);case"table":return(function(w,_){const A=[...w.header?[w.header]:[],...Array.isArray(w.rows)?w.rows:[]];if(!A.length){const P=Array.isArray(w.children)?w.children.length:3;return Math.max(120,38*P+48)}return Math.max(120,Math.round(4+A.reduce((P,z)=>P+(function(L,E){const T=Math.max(1,L.length),$=Math.max(80,(E-32)/T),C=Math.max(10,Math.floor($/8)),j=Math.max(1,...L.map(H=>{var D;const M=w7(H)||String((D=H?.raw)!=null?D:"");return Math.ceil(M.length/C)||1}));return 54+34*Math.max(0,j-1)+(T<=3&&L.some(p$)?14:0)})((function(L){var E;return Array.isArray(L?.cells)&&(E=L.cells)!=null?E:[]})(z),_),0)))})(k,y);case"code_block":{const w=String((c=k.language)!=null?c:"").trim().toLowerCase(),_=String((d=(u=k.code)!=null?u:k.raw)!=null?d:"");return w==="mermaid"?L5(E5(_)):w==="infographic"?$5(I5(_)):l0(_,y,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(w,_){var A,P,z;const L=w.match(/^\s*]*)>/i);return L&&!/(?:^|\s)open(?:\s|=|$)/i.test((A=L[1])!=null?A:"")?l0(((z=(P=w.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:P[1])==null?void 0:z.replace(/<[^>]*>/g,"").trim())||"Details",_,28,28):l0(w,_,96)})(String((p=(f=k.raw)!=null?f:k.content)!=null?p:""),y);case"thematic_break":return 24;default:return l0(String((m=(h=k.raw)!=null?h:k.content)!=null?m:""),y,40)}}function Jx(e,t,n){return Math.min(Math.max(e,t),n)}const J3e=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Q3e=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],e4e=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),h$=["raw","content","code","originalCode","updatedCode"],Qx=new WeakMap,eS=new WeakMap;let t4e=1;function er(){return typeof performance<"u"?performance.now():Date.now()}function tS(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function nl(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=Qx.get(t);return n||(n=t4e++,Qx.set(t,n)),String(n)}function nS(e,t,n,o={}){var s,i;const l=o.includeFinal!==!1,r={md:nl(t),customMarkdownIt:nl(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:nl(e.validateLink),preTransformTokens:nl(e.preTransformTokens),postTransformTokens:nl(e.postTransformTokens),postTransformNodes:nl(e.postTransformNodes)};return l&&(r.final=e.final===!0),JSON.stringify(r)}function oS(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` +`,t-1)+1;return e.slice(n,t).trim()}function sS(e){const t=m$(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function m$(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function g$(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function Pv(e){const t=String(e??"");return`${t.length}:${g$(t)}`}function k7(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(l){return l.length<=8192?Pv(l):`${l.length}:${g$(l.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${nl(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${nl(o)}`;const i=nl(o);if(t.set(o,i),Array.isArray(e)){const l=e.slice(0,200);return`a:${e.length}:${l.map(r=>k7(r,t,n+1)).join(",")}`}if(typeof e=="object"){const l=e,r=Object.keys(l).sort(),a=r.slice(0,80);return`o:${r.length}:${a.sort().map(c=>`${c}:${k7(l[c],t,n+1)}`).join(";")}`}return typeof e}function O5(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function v$(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>O5(o)?S1(o,t,n+1):v$(o,t,n+1)).join(",")}`:O5(e)?S1(e,t,n):k7(e,t,n)}function n4e(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!h$.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${Pv(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${nl(s)}`:e4e.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${v$(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${nl(s)}`:""}).filter(Boolean).join(";")}function o4e(e){return h$.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${Pv(n)}`:""}).filter(Boolean).join(";")}function S1(e,t=new WeakMap,n=0){const o=eS.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${nl(s)}`;const l=nl(s);t.set(s,l);const r=(function(a,c,u){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(h=>S1(h,c,u+1)).join("|"):"";return[a.type,o4e(d),n4e(d,c,u),f.length,p].join(":")})(e,t,n);return eS.set(s,r),r}function y$(e,t){return S1(e)===S1(t)}function Fv(e,t,n){const o=er(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=er()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function iS(e,t,n){return Fv(t,n,()=>S1(e))}function w$(e,t,n){return iS(e,n,"stabilizeSignatureMs")===iS(t,n,"stabilizeSignatureMs")}function O3(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function lS(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function rS(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function s4e(e,t){return e.length===t.length&&e===t}function jv(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(u=>u!=="type"&&u!=="children").sort(),l=Object.keys(s).filter(u=>u!=="type"&&u!=="children").sort();if(i.length!==l.length)return!1;for(let u=0;u{o=jv(e,t)}),o??w$(e,t,n)}function r4e(e,t){const n={};for(const o of J3e){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function a4e(e,t){var n;const o=sx(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:B(()=>!1),l=V(t.renderContent.value);let r=[],a="",c="",u="",d=!1;const f=(function(){let H="",D=0,M=!1,R=!1,O=!1,U=!1;function Z(){H="",D=0,M=!1,R=!1,O=!1,U=!1}function q(te){let ee=!1;for(let J=0;J{if(!te||!ee.startsWith(te)||ee.length<=te.length)return Z(),[!0,0];let J=0;H!==te&&(Z(),q(te),J=te.length);const se=ee.slice(te.length),Q=q(se);return H=ee,[Q,J+se.length]}})();let p,h=0,m=0,k=er(),x=-1,y=0;function w(H){x=Number.isInteger(H)?H:0,y+=1}function _(){p&&(clearTimeout(p),p=void 0)}function A(){_();const H=t.renderContent.value;l.value!==H&&(l.value=H),k=er()}Ke([t.renderContent,t.effectiveFinal,i],([H,D,M])=>{l.value!==H&&(!M||D||(function(R,O){if(!R&&O||O.length<=80||O.length\s*|`{3,}|~{3,})/.test(U))||U.endsWith(` +`)&&!(function(Z){const q=oS(Z);if(sS(q))return!1;const te=m$(q);return te.length>=2&&te.some(ee=>ee.trim())})(O))})(l.value,H)?A():(function(){if(m+=1,p)return;const R=Math.max(0,(function(O){const U=O.parseCoalesceMs;return typeof U=="number"&&Number.isFinite(U)&&U>=0?U:80})(e)-(er()-k));R<=0?A():p=setTimeout(A,R)})())},{flush:"sync",immediate:!0}),pf(_);const P=B(()=>{var H,D,M,R;return wae(e.customHtmlTags,(H=e.parseOptions)==null?void 0:H.customHtmlTags,(R=(M=(D=t.customComponentsMap)==null?void 0:D.value)!=null?M:{},Object.entries(R).map(([O,U])=>{const Z=Vl(O);return U==null||!Z||Af(Z)||AI.has(Z)||_f.has(Z)?"":Z}).filter(Boolean)))}),z=B(()=>{const{key:H,tags:D}=kae(P.value);if(!H)return o;const M=s.get(H);if(M)return M;const R=sx(t.instanceMsgId,{customHtmlTags:D});return s.set(H,R),R}),L=B(()=>{const H=z.value;if(!e.customMarkdownIt)return H;const D=e.customMarkdownIt(H);return H.__markstreamHasCustomParserExtensions=!0,D.__markstreamHasCustomParserExtensions=!0,D}),E=B(()=>{var H,D;const M=(H=e.parseOptions)!=null?H:{},R=t.effectiveFinal.value,O=P.value,U=R!=null,Z=O.length>0;return U||Z||M.streamParse==null?St(St(wn(St({},M),{streamParse:(D=M.streamParse)==null||D}),U?{final:R}:{}),Z?{customHtmlTags:O}:{}):M}),T=B(()=>{var H;return new Set(((H=E.value.customHtmlTags)!=null?H:[]).map(D=>String(D).trim().toLowerCase()).filter(Boolean))}),$=B(()=>nS(E.value,L.value,e.customMarkdownIt,{includeFinal:!0})),C=B(()=>nS(E.value,L.value,e.customMarkdownIt,{includeFinal:!1}));Ke([$,C],([H,D],[M,R])=>{M&&(H===M&&D===R||(A(),D!==R&&(r=[],u="")))},{flush:"sync"});const j=B(()=>{var H,D,M,R,O,U,Z,q,te,ee,J;if((H=e.nodes)!=null&&H.length)return r=[],u="",w(0),It(e.nodes.slice());const se=l.value;if(!se)return r=[],u="",w(-1),[];const Q=t.debugPerformanceEnabled.value,me=Q?er():0,xe=L.value,Ye=$.value,at=C.value;a&&Ye!==a&&(function(Oe){var Fe,pt;(pt=(Fe=Oe.stream)==null?void 0:Fe.reset)==null||pt.call(Fe)})(xe),c&&at!==c&&(r=[],u="");const X=Object.keys((M=(D=t.customComponentsMap)==null?void 0:D.value)!=null?M:{}).length>0||typeof E.value.postTransformNodes=="function";X!==d&&(r=[],u="");const oe=!X&&r.length>0&&se.startsWith(u)&&at===c,F=Q?tS(xe):null,K=Q?{}:void 0,he=rS(xe),ye=!he&&!X,ve=St(St(wn(St({},E.value),{__reuseStableTopLevelNodes:ye}),he?{__disableStreamParse:!0}:{}),K?{__timing:K}:{}),ie=TL(se,xe,ve),de=Q?er():0,be=Q?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let Se,je=Q?O3(ie.length):void 0,et=0,le=0,fe=0;if(oe){const Oe=Q?er():0,[Fe,pt]=(function(qt){var nn,Jt;const[kn,Dn]=qt.scanGlobalReferenceAppend(qt.previousContent,qt.content),xn=qt.parseOptions;return[qt.previousDirtyStartIndex>0&&xn.final!==!0&&!qt.customMarkdownIt&&!rS(qt.md)&&!kn&&typeof xn.preTransformTokens!="function"&&typeof xn.postTransformTokens!="function"&&typeof xn.postTransformNodes!="function"&&((Jt=(nn=xn.customHtmlTags)==null?void 0:nn.length)!=null?Jt:0)===0?qt.previousDirtyStartIndex:0,Dn]})({content:se,previousContent:u,previousDirtyStartIndex:x,parseOptions:E.value,customMarkdownIt:e.customMarkdownIt,md:xe,scanGlobalReferenceAppend:f});fe=pt;const kt=Fe<=0;if(be){const qt=(function(nn,Jt,kn,Dn={}){var xn;if(!Jt.length)return{nodes:nn,metrics:O3(nn.length)};const $n=(xn=Dn.scanStartIndex)!=null?xn:0,Hn=Dn.reuseDirtyTail!==!1,bn=(function(Mn,Nn,An,Qn=0){const Fn=Math.min(Mn.length,Nn.length);for(let Qt=Math.min(Fn,Math.max(0,Qn));QtS1(Oe[kt]))})(Se,be,le):(function(Oe,Fe=0){for(let pt=Math.max(0,Fe);pt((O=F?.total)!=null?O:0);t.logPerf(Fe?"parse(stream)":"parse(sync)",St(St(St({rendererId:t.instanceMsgId,ms:Math.round(er()-me),nodes:Se.length,contentLength:se.length,parseCommitCount:h,parseCoalescedCount:m,nodeReuseMs:ge,referenceDefinitionScanChars:fe,signatureMs:(U=be?.signatureMs)!=null?U:0,stabilizeSignatureMs:(Z=be?.stabilizeSignatureMs)!=null?Z:0,primeSignatureMs:(q=be?.primeSignatureMs)!=null?q:0,signatureCallCount:(te=be?.signatureCallCount)!=null?te:0,stabilizeSignatureCallCount:(ee=be?.stabilizeSignatureCallCount)!=null?ee:0,primeSignatureCallCount:(J=be?.primeSignatureCallCount)!=null?J:0,stabilizeMs:et},je??{}),K?Object.fromEntries(Q3e.map(pt=>{var kt;return[pt,(kt=K[pt])!=null?kt:0]})):{}),Oe?{streamMode:Oe.lastMode,streamDelta:r4e(Oe,F),streamStats:Oe}:{}))}return It(Se)});return{effectiveCustomHtmlTags:P,effectiveCustomHtmlTagsSet:T,mdBase:z,mdInstance:L,mergedParseOptions:E,getParsedNodesDirtyStartIndex:()=>x,getParsedNodesRevision:()=>y,parsedNodes:j}}function c4e(e){const{isClient:t}=e,n=V(new Set),o=new Map,s=new Map,i=new Map;function l(c){if(!t)return;const u=i.get(c);u!=null&&(window.clearTimeout(u),i.delete(c))}function r(){if(t)for(const c of i.values())window.clearTimeout(c);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:l,clearAllVisibilityFallbacks:r,markNodeVisible:function(c,u=!0){var d;u&&l(c),(function(f,p){if((m=(h=e.shouldTrackVisibleNodeIndices)==null?void 0:h.call(e))!=null&&!m)return;var h,m;const k=n.value,x=k.has(f);if(p){if(x)return;const w=new Set(k);return w.add(f),void(n.value=w)}if(!x)return;const y=new Set(k);y.delete(f),n.value=y})(c,u),u&&((d=e.onNodeMarkedVisible)==null||d.call(e,c))},resetNodeVisibleState:a,cleanupNodeVisibility:function(c){var u;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f{const u=s.getSnapshot();t.value=u.source,n.value=u.visible,o.value=u.done},l=s.subscribe(i);i();const r=B(()=>Math.max(0,t.value.length-n.value.length)),a=B(()=>r.value===0),c=B(()=>o.value&&a.value);return cg()&&pf(()=>{l(),s.destroy()}),{source:t,visible:n,done:o,final:c,caughtUp:a,pendingChars:r,enqueue:u=>s.enqueue(u),finish:u=>s.finish(u),flush:()=>s.flush(),reset:u=>s.reset(u),pause:()=>s.pause(),resume:()=>s.resume()}}const d4e={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},aS=/auto|scroll|overlay/i;function f4e(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return aS.test(t)||aS.test(n)}function p4e(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const h4e={class:"m-0 p-0"},m4e=["data-probe"],g4e=ho(Je(wn(St({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(g(),S("div",{class:"height-estimation-probes",style:Gt({width:`${e.width}px`}),"aria-hidden":"true"},[b("div",{ref:i=>e.setParagraphWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[W(v(B0),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),b("div",{ref:i=>e.setListItemWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[b("ul",h4e,[W(v(pu),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),b("div",{ref:i=>e.setListWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[W(v(hu),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(g(),S(Ce,null,rt(6,i=>b("div",{key:`probe-heading-${i}`,ref_for:!0,ref:l=>e.setHeadingWrapper(i,l),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[W(v(Zp),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,m4e)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),cS=Je({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=B(()=>{var n,o;return $5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:I5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),vn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),vn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,vn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"absolute inset-0"},[vn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),uS=Je({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=B(()=>{var n,o;return L5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:E5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),vn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[vn("span",{class:"action-icon block"})])))]):null,vn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),v4e={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function Vs(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const y4e=["data-custom-id"],w4e=["data-node-index","data-node-type"],dS="typewriter-simple-cursor-target",k$=ho(Je(wn(St({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(N){if(!(typeof Event<"u"&&N instanceof Event))return typeof N=="string"&&s("copy-code",N),void s("copy",N)}const l=Ts(),r=fn("markstreamNestedRendererProps",void 0);function a(N){const G=l?.vnode.props;return!!G&&(Object.prototype.hasOwnProperty.call(G,N)||Object.prototype.hasOwnProperty.call(G,String(N).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function c(N){var G,re;const ce=o[N];return a(N)?ce:(re=(G=r?.value)==null?void 0:G[N])!=null?re:ce}const u=B(()=>{return(N=c("mode"))==="chat"||N==="minimal"||N==="docs"?N:"docs";var N}),d=B(()=>Xx(c("typewriter"))),f=B(()=>d.value!=="off"),p=B(()=>c("domMode")==="minimal"?"minimal":"full"),h=B(()=>{return(N={mode:u.value,codeRenderer:c("codeRenderer"),renderCodeBlocksAsPre:c("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":N.codeRenderer==="pre"||N.codeRenderer==="shiki"||N.codeRenderer==="monaco"?N.codeRenderer:N.renderCodeBlocksAsPre===!1||N.mode==="docs"?"monaco":"pre";var N}),m=B(()=>v4e[u.value]),k=B(()=>{var N;return(N=c("showTooltips"))!=null?N:m.value.showTooltips}),x=B(()=>{var N;return(N=c("fade"))!=null?N:m.value.fade}),y=B(()=>{var N;return(N=c("batchRendering"))!=null?N:m.value.batchRendering}),w=B(()=>{var N;return(N=c("initialRenderBatchSize"))!=null?N:m.value.initialRenderBatchSize}),_=B(()=>{var N;return(N=c("renderBatchSize"))!=null?N:m.value.renderBatchSize}),A=B(()=>{var N;return(N=c("renderBatchDelay"))!=null?N:m.value.renderBatchDelay}),P=B(()=>{var N;return(N=c("renderBatchBudgetMs"))!=null?N:m.value.renderBatchBudgetMs}),z=B(()=>{var N;return(N=c("renderBatchIdleTimeoutMs"))!=null?N:m.value.renderBatchIdleTimeoutMs}),L=B(()=>{var N;return(N=c("deferNodesUntilVisible"))!=null?N:m.value.deferNodesUntilVisible}),E=B(()=>{var N;return(N=c("maxLiveNodes"))!=null?N:m.value.maxLiveNodes}),T=B(()=>{var N;return(N=c("liveNodeBuffer"))!=null?N:m.value.liveNodeBuffer}),$=B(()=>{var N;return(N=c("nodeVirtual"))!=null?N:m.value.nodeVirtual}),C={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return c("parseOptions")},get customMarkdownIt(){return c("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return c("customHtmlTags")},get mode(){return c("mode")},get domMode(){return p.value},get htmlPolicy(){return c("htmlPolicy")},get viewportPriority(){return c("viewportPriority")},get viewportPriorityOptions(){return c("viewportPriorityOptions")},get codeBlockStream(){return c("codeBlockStream")},get codeBlockDarkTheme(){return c("codeBlockDarkTheme")},get codeBlockLightTheme(){return c("codeBlockLightTheme")},get codeBlockMonacoOptions(){return c("codeBlockMonacoOptions")},get codeRenderer(){return c("codeRenderer")},get renderCodeBlocksAsPre(){return c("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return c("codeBlockMinWidth")},get codeBlockMaxWidth(){return c("codeBlockMaxWidth")},get codeBlockProps(){return c("codeBlockProps")},get mermaidProps(){return c("mermaidProps")},get d2Props(){return c("d2Props")},get infographicProps(){return c("infographicProps")},get showTooltips(){return k.value},get themes(){return c("themes")},get langs(){return c("langs")},get isDark(){return c("isDark")},get customId(){return c("customId")},get indexKey(){return o.indexKey},get typewriter(){return c("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return c("smoothStreamingOptions")},get parseCoalesceMs(){return c("parseCoalesceMs")},get fade(){return x.value},get batchRendering(){return y.value},get initialRenderBatchSize(){return w.value},get renderBatchSize(){return _.value},get renderBatchDelay(){return A.value},get renderBatchBudgetMs(){return P.value},get renderBatchIdleTimeoutMs(){return z.value},get deferNodesUntilVisible(){return L.value},get maxLiveNodes(){return E.value},get liveNodeBuffer(){return T.value},get nodeVirtual(){return $.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function j(N){s("height-change",N)}function H(N){s("virtual-state-change",N)}function D(N){s("anchor-change",N)}const M=V(),R=V(null),O=V(null),U=V(null),Z=ds({1:null,2:null,3:null,4:null,5:null,6:null}),q=V(!1),te=new Map,ee=V(0),J=V(0),se=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Q(N,G){return typeof N!="string"?G:N.trim()||G}function me(N){const G=Number(N);return Number.isFinite(G)&&G>0?Math.max(1,Math.trunc(G)):640}const xe=B(()=>{var N;const G=(N=C.viewportPriorityOptions)!=null?N:{},re=Q(G.rootMargin,F0);return{rootMargin:re,heavyBlockMargin:Q(G.heavyBlockMargin,re),maxTargets:me(G.maxTargets)}}),Ye=B(()=>{var N;return(N=xe.value.rootMargin)!=null?N:F0}),at=B(()=>{var N;return(N=xe.value.maxTargets)!=null?N:640});function X(){var N,G;if(((N=o.virtualScroll)==null?void 0:N.enabled)!==!0)return null;const re=(G=o.virtualScroll)==null?void 0:G.scrollRoot;return oe(typeof re=="function"?re():re)}function oe(N){return N?typeof HTMLElement<"u"&&N instanceof HTMLElement?N:typeof N=="object"&&"value"in N?oe(N.value):typeof N=="object"&&"$el"in N?oe(N.$el):null:null}qn(o$,xe);const{isClient:F,renderAsFragment:K,debugPerformanceEnabled:he,resolvedShowTooltips:ye,resolvedHtmlPolicy:ve,inheritedSmoothStreaming:ie,ownsTypewriterCursor:de}=(function(N){const G=typeof window<"u",re=vf(),ce=fn("markstreamHtmlPolicy",void 0),we=fn("markstreamTypewriterCursor",void 0),ze=fn("markstreamSmoothStreaming",void 0),De=B(()=>N.renderAsFragment===!0),Ue=B(()=>!!(N.debugPerformance&&G&&typeof console<"u")),ut=B(()=>{var ct;if(typeof N.showTooltips=="boolean")return N.showTooltips;const Ve=(ct=re.showTooltips)!=null?ct:re["show-tooltips"];return Ve===""||Ve===!0||Ve==="true"||Ve!==!1&&Ve!=="false"&&void 0}),Ze=B(()=>{var ct,Ve;return(Ve=(ct=N.htmlPolicy)!=null?ct:ce?.value)!=null?Ve:"safe"}),tt=B(()=>we?.value!==!0);return{isClient:G,renderAsFragment:De,debugPerformanceEnabled:Ue,resolvedShowTooltips:ut,resolvedHtmlPolicy:Ze,inheritedSmoothStreaming:ze,inheritedTypewriterCursor:we,ownsTypewriterCursor:tt}})(C),{resolveViewportRoot:be,resolveScrollContainer:Se,isReverseFlexScrollRoot:je,getNormalizedScrollTop:et,getOffsetTopWithinRoot:le}=(function(N,G){function re(){var Ue,ut;return(ut=(Ue=G.scrollRoot)==null?void 0:Ue.call(G))!=null?ut:null}function ce(Ue){if(typeof window>"u")return null;const ut=re();if(ut)return ut;const Ze=Ue??N.value;if(!Ze)return null;const tt=Ze.ownerDocument||document,ct=tt.scrollingElement||tt.documentElement;let Ve=Ze;for(;Ve&&Ve!==tt.body&&Ve!==ct;){if(f4e(window.getComputedStyle(Ve))&&p4e(Ve))return Ve;Ve=Ve.parentElement}return null}function we(Ue){if(!G.isClient)return!1;try{const ut=window.getComputedStyle(Ue);return!!(ut.display||"").toLowerCase().includes("flex")&&(ut.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function ze(Ue,ut,Ze){var tt,ct;if(Ze)return De(ut);const Ve=Ue.scrollTop;if(!we(Ue))return Ve;const nt=Ve<0?-Ve:Ve;return Math.max(0,((tt=Ue.scrollHeight)!=null?tt:0)-((ct=Ue.clientHeight)!=null?ct:0))-nt}function De(Ue){var ut,Ze,tt,ct,Ve;const nt=Number((ut=Ue.scrollingElement)==null?void 0:ut.scrollTop),gt=Number((tt=(Ze=Ue.documentElement)==null?void 0:Ze.scrollTop)!=null?tt:0),mt=Number((Ve=(ct=Ue.body)==null?void 0:ct.scrollTop)!=null?Ve:0);return Math.max(0,Number.isFinite(nt)?nt:0,Number.isFinite(gt)?gt:0,Number.isFinite(mt)?mt:0)}return{resolveViewportRoot:ce,resolveScrollContainer:function(Ue){var ut,Ze,tt,ct;const Ve=re();if(Ve)return Ve;const nt=ce((ut=Ue??N.value)!=null?ut:null);if(nt)return nt;const gt=(ct=(tt=Ue?.ownerDocument)!=null?tt:(Ze=N.value)==null?void 0:Ze.ownerDocument)!=null?ct:typeof document<"u"?document:null;return gt?.scrollingElement||gt?.documentElement||null},isReverseFlexScrollRoot:we,getNormalizedScrollTop:ze,getOffsetTopWithinRoot:function(Ue,ut){const Ze=ut.ownerDocument||Ue.ownerDocument||document;if((function(nt,gt){return nt===gt.documentElement||nt===gt.body||nt===gt.scrollingElement})(ut,Ze))return Ue.getBoundingClientRect().top+De(Ze);const tt=ut.getBoundingClientRect(),ct=Ue.getBoundingClientRect(),Ve=ze(ut,Ze,!1);return ct.top-tt.top+Ve}}})(M,{isClient:F,scrollRoot:X});qn("markstreamShowTooltips",ye),qn("markstreamHtmlPolicy",ve),qn("markstreamTypewriter",f),qn("markstreamFade",B(()=>C.fade!==!1)),qn("markstreamTypewriterCursor",B(()=>!0)),qn("markstreamTextStreamState",te),qn("markstreamStreamVersion",ee),qn("markstreamParseOptions",B(()=>C.parseOptions)),qn("markstreamCustomMarkdownIt",B(()=>C.customMarkdownIt));const{smoothStreamingEnabled:fe,renderContent:ge,requestedFinal:Oe,effectiveFinal:Fe}=(function(N,G){const re=u4e(St(St({},d4e),N.smoothStreamingOptions)),ce=B(()=>{var Ve,nt,gt;return N.smoothStreaming!==!1&&!((Ve=N.nodes)!=null&&Ve.length)&&(N.smoothStreaming===!0||!((nt=G.inheritedSmoothStreaming)!=null&&nt.value))&&(N.smoothStreaming===!0||Xx(N.typewriter)!=="off"||((gt=N.maxLiveNodes)!=null?gt:0)<=0)}),we=V(!G.isClient||N.smoothStreaming===!0);In(()=>{we.value=!0});const ze=B(()=>we.value&&ce.value),De=B(()=>{var Ve;return ze.value?re.visible.value:(Ve=N.content)!=null?Ve:""}),Ue=B(()=>{var Ve,nt;const gt=(Ve=N.parseOptions)!=null?Ve:{};return(nt=N.final)!=null?nt:gt.final}),ut=B(()=>{const Ve=Ue.value;return ze.value&&Ve!=null?!!Ve&&re.caughtUp.value:Ve});let Ze=0,tt=!1;function ct(){Ze=0,tt=!1}return Ke([()=>N.content,()=>N.nodes,ze,Ue],([Ve,nt,gt,mt])=>{if(nt?.length)return ct(),void re.reset("");const Et=Ve??"";if(!gt)return ct(),re.reset(Et),void(mt&&re.finish({flush:!0}));const _t=re.source.value;if(Et){if(Et!==_t)if(Et.startsWith(_t)){const Ot=Et.slice(_t.length),Kt=re.pendingChars.value;Ot.length<=8?(Ze++,tt||Ze>=2&&Kt<=8?(tt=!0,re.reset(Et)):re.enqueue(Ot)):(ct(),re.enqueue(Ot))}else ct(),re.reset(Et)}else ct(),re.reset("");mt&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ce,smoothStreamingEnabled:ze,renderContent:De,requestedFinal:Ue,effectiveFinal:ut}})(C,{isClient:F,inheritedSmoothStreaming:ie}),pt=Oe.value===!0;qn("markstreamSmoothStreaming",fe);const kt=V(!1),qt=V(!1),nn=V(!1);let Jt="",kn=!1,Dn=null;function xn(){F&&Dn!=null&&(window.clearTimeout(Dn),Dn=null)}function $n(){kt.value=!1,xn()}function Hn(N,G){if(!he.value)return;const re=(function(){if(!he.value)return null;const ce=Nn(bn),we=Nn(Wn),ze=Math.max(Mn,we);if(ce<=0&&ze<=0)return null;const De={total:ce,maxPerFrame:ze,byLabel:(Ue=bn,Object.fromEntries(Array.from(Ue.entries()).sort((ut,Ze)=>Ze[1]-ut[1]||ut[0].localeCompare(Ze[0]))))};var Ue;return bn.clear(),Wn.clear(),Mn=0,De})();console.info(`[markstream-vue][perf] ${N}`,re?wn(St({},G),{layoutReads:re}):G)}Ke([()=>C.indexKey,()=>C.customId],()=>{var N,G;$n(),qt.value=!1,nn.value=!((N=o.nodes)!=null&&N.length)&&Oe.value!==!0&&!!o.content,Jt=(G=ge.value)!=null?G:"",kn=Jt.length>0},{flush:"sync"}),Ke([()=>o.content,()=>o.nodes,Oe],([N,G,re])=>{!G?.length&&re!==!0&&N&&(nn.value=!0)},{flush:"sync",immediate:!0}),Ke([ge,()=>o.nodes,Oe],([N,G,re])=>{const ce=N??"";return G?.length||re===!0?($n(),qt.value=!1,Jt=ce,void(kn=!0)):(ce.length>0&&(nn.value=!0),kn?(Jt&&ce.length>Jt.length&&ce.startsWith(Jt)?(kt.value=!0,qt.value=!0,F&&(xn(),Dn=window.setTimeout(()=>{var we;Dn=null,Fe.value===!0||(we=o.nodes)!=null&&we.length||(pc(),kt.value=!1,Wr())},1200))):(ce.length"u")return null;const ze=window;if(ze.__markstreamLayoutReadPerformance)return ze.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return ze.__markstreamLayoutReadPerformance=De,De})();we&&(we.total=Number(we.total||0)+1,we.byLabel[ce]=Number(we.byLabel[ce]||0)+1,we.currentFrameTotal=Number(we.currentFrameTotal||0)+1,we.frameScheduled||(we.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Qn(we),0):queueMicrotask(()=>Qn(we)):window.requestAnimationFrame(()=>Qn(we))))})(N),Pn||(Pn=!0,F&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(An):typeof queueMicrotask!="function"?setTimeout(An,0):queueMicrotask(An)))}function Qt(N,G){return Fn(N),G()}const uo=C.customId?`renderer-${C.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Zn=(function(N){const G=new Map;return{scope:N,cache:G,clear:()=>G.clear()}})(uo),Bo=uo;qn(d$,Zn);const Un=Is(()=>C.customId),{effectiveCustomHtmlTagsSet:hs,mergedParseOptions:Io,parsedNodes:Rt,getParsedNodesDirtyStartIndex:Jo,getParsedNodesRevision:Ls}=a4e(C,{instanceMsgId:uo,renderContent:ge,effectiveFinal:Fe,smoothStreamingEnabled:fe,debugPerformanceEnabled:he,customComponentsMap:Un,logPerf:Hn});Ke(Rt,()=>{kt.value||Zn.clear(),ee.value+=1},{immediate:!0});const $e=B(()=>({customId:C.customId,customHtmlTags:Io.value.customHtmlTags,parseOptions:C.parseOptions,customMarkdownIt:C.customMarkdownIt,htmlPolicy:ve.value,viewportPriority:C.viewportPriority,viewportPriorityOptions:xe.value,mode:u.value,domMode:C.domMode,codeRenderer:h.value,codeBlockStream:C.codeBlockStream,codeBlockDarkTheme:C.codeBlockDarkTheme,codeBlockLightTheme:C.codeBlockLightTheme,codeBlockMonacoOptions:C.codeBlockMonacoOptions,renderCodeBlocksAsPre:C.renderCodeBlocksAsPre,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockProps:C.codeBlockProps,mermaidProps:C.mermaidProps,d2Props:C.d2Props,infographicProps:C.infographicProps,showTooltips:ye.value,themes:C.themes,langs:C.langs,isDark:C.isDark,typewriter:f.value,smoothStreamingOptions:C.smoothStreamingOptions,parseCoalesceMs:C.parseCoalesceMs,fade:C.fade}));qn("markstreamNestedRendererProps",$e);const Ge=B(()=>Rt.value),ot=B(()=>Rt.value.length),dt=V(null),Mt=V(null),Ft=V(null),Ut=V(null),en=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),tn=!en&&C.customId?Ux(C.customId):null,eo=B(()=>tn?(pm.value,Ux(C.customId)):null),Ro=B(()=>{var N;return!!(!K.value&&C.customId&&!en&&((N=eo.value)!=null&&N.enabled))}),$s=B(()=>!!(F&&Ro.value)),Do=B(()=>{var N;return!!(!K.value&&((N=o.virtualScroll)!=null&&N.enabled))}),We=B(()=>Do.value),st=V(!1);In(()=>{st.value=!0});const Xe=B(()=>!!(F&&Do.value));qn("markstreamHostScrollManaged",Xe);const qe=B(()=>!!(st.value&&Xe.value)),Pe=B(()=>$s.value||Xe.value),bt=B(()=>$s.value||qe.value),Lt=B(()=>{var N;return Pe.value&&((N=eo.value)==null?void 0:N.textEstimation)!==!1});function cn(){const N=J.value||Qt("getMeasuredContainerWidth.clientWidth",()=>{var G;return((G=M.value)==null?void 0:G.clientWidth)||0});return Number.isFinite(N)&&N>0?N:0}const So=B(()=>{const N=cn();return N>0?Math.max(1,Math.round(N)):640}),Qo=B(()=>{var N,G;return!(Fe.value!==!0||Do.value||u.value!=="chat"&&u.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(N=o.nodes)!=null&&N.length||nn.value||!(((G=C.maxLiveNodes)!=null?G:0)<=0))}),Po=B(()=>{var N;return Qo.value?50:Math.max(1,(N=C.maxLiveNodes)!=null?N:320)}),Xn=B(()=>{var N;return Qo.value?16:Math.max(0,(N=C.liveNodeBuffer)!=null?N:60)}),pn=B(()=>{var N;return!K.value&&C.nodeVirtual!==!1&&!(((N=C.maxLiveNodes)!=null?N:0)<=0&&!Qo.value)&&(C.nodeVirtual===!0?Rt.value.length>0:Rt.value.length>Po.value)}),Us=B(()=>pn.value||$s.value||Xe.value),mi=B(()=>C.viewportPriority!==!1),oi=B(()=>!!mi.value&&!q.value);var ql;ql=B(()=>mi.value),qn(s$,ql);const vl=B(()=>{var N;return!(K.value||C.deferNodesUntilVisible===!1||((N=C.maxLiveNodes)!=null?N:0)<=0||pn.value||Rt.value.length>900||C.viewportPriority===!1)}),Zs=D2e(N=>{var G;return be((G=N??M.value)!=null?G:null)},mi),{requestFrame:yo,cancelFrame:Lo,hasIdleCallback:yl,isTestEnv:ms}=(function(N){const G=N.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,re=N.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ce=N.isClient&&typeof window.requestIdleCallback=="function",we=(function(){var ze;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=(ze=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:ze.value;return De?.env})();return{requestFrame:G,cancelFrame:re,hasIdleCallback:ce,isTestEnv:we?.NODE_ENV==="test"}})({isClient:F}),wl=B(()=>Fe.value===!0&&!Do.value),{resolvedBatchSize:gi,resolvedInitialBatch:si,batchingEnabled:Ul,incrementalRenderingActive:Ni,renderedCount:Ae,previousRenderContext:Ie,adaptiveBatchSize:At,previousBatchConfig:lt}=(function(N,G){var re;const ce=B(()=>{var ct;const Ve=Math.trunc((ct=N.renderBatchSize)!=null?ct:80);return Number.isFinite(Ve)?Math.max(0,Ve):0}),we=B(()=>{var ct;const Ve=Math.trunc((ct=N.initialRenderBatchSize)!=null?ct:ce.value);return Number.isFinite(Ve)?Math.max(0,Ve):ce.value}),ze=B(()=>!G.renderAsFragment.value&&N.batchRendering!==!1&&ce.value>0&&G.isClient&&!G.isTestEnv),De=V(0),Ue=V({key:N.indexKey,total:0}),ut=V(Math.max(1,ce.value||1)),Ze=B(()=>{var ct,Ve,nt;return ze.value&&!((ct=G.continuousStreaming)!=null&&ct.value)&&!((Ve=G.forceFullRenderFinalContent)!=null&&Ve.value)&&((nt=N.maxLiveNodes)!=null?nt:0)<=0}),tt=V({batchSize:ce.value,initial:we.value,delay:(re=N.renderBatchDelay)!=null?re:16,enabled:Ze.value});return{resolvedBatchSize:ce,resolvedInitialBatch:we,batchingEnabled:ze,incrementalRenderingActive:Ze,renderedCount:De,previousRenderContext:Ue,adaptiveBatchSize:ut,previousBatchConfig:tt}})(C,{isClient:F,isTestEnv:ms,renderAsFragment:K,forceFullRenderFinalContent:wl,continuousStreaming:B(()=>qt.value&&Fe.value!==!0)}),mn=B(()=>{var N;return!K.value&&C.batchRendering!==!1&&gi.value>0&&!ms&&((N=C.maxLiveNodes)!=null?N:0)<=0&&!wl.value}),Kn=B(()=>mn.value),to=B(()=>Pe.value||Kn.value),Co=B(()=>{var N;return to.value&&((N=eo.value)==null?void 0:N.codeBlockEstimation)!==!1}),no=new Map,Vo=new Map,Qi=new WeakMap;let Os=null;const Ta=new WeakMap,Wo=new Map,zi=[];let gs=[],kl=[],es=-1;const Hs=Uo(zi),vs=new Set,bl=V(0);let Ks=0;const ne=V(0),ke=B(()=>(ne.value,Array.from(no.entries()).sort((N,G)=>N[0]-G[0]))),Te=V(null),Ne=V(null);let Qe,ht=null,jt=0,Zt=null;function Vt(){Qe.markFallbackHeightPrefixDirty()}function Wt(N){return Qe.getFallbackNodeHeight(N)}function on(N,G){return Qe.estimateHeightRange(N,G)}function Vn(N){return Qe.estimateIndexForOffset(N)}const{activeRestoreAnchor:Ht,getRelativeScrollTopWithinContainer:Tn,setRelativeScrollTopWithinContainer:zn,resolveAnchorOffset:Ns,clearRestoreReconcile:rs,scheduleRestoreReconcile:_l,captureRestoreAnchor:X0,restoreAnchor:J0,getAnchorDrift:qu}=(function(N){const{isClient:G,containerRef:re,parsedNodeCount:ce,requestFrame:we,cancelFrame:ze,resolveScrollContainer:De,getNormalizedScrollTop:Ue,getOffsetTopWithinRoot:ut,isReverseFlexScrollRoot:Ze,estimateIndexForOffset:tt,estimateHeightRange:ct,getFallbackNodeHeight:Ve,clamp:nt}=N,gt=V(null);let mt=null,Et=[];function _t(){const un=De(),Ln=re.value;if(!un||!Ln)return null;const On=un.ownerDocument||Ln.ownerDocument||document;if(un===On.documentElement||un===On.body||un===On.scrollingElement){const wo=Ln.getBoundingClientRect();return Math.max(0,-wo.top)}return Math.max(0,Ue(un,On,!1)-ut(Ln,un))}function Ot(un){var Ln;const On=De(),wo=re.value;if(!On||!wo)return;const Ys=Math.max(0,un),Ds=On.ownerDocument||wo.ownerDocument||document,Xl=Ds.defaultView||(typeof window<"u"?window:null);if(On===Ds.documentElement||On===Ds.body||On===Ds.scrollingElement){const gr=Ue(On,Ds,!0)+wo.getBoundingClientRect().top;return void((Ln=Xl?.scrollTo)==null||Ln.call(Xl,0,Math.max(0,gr+Ys)))}Gx(On,Ds,ut(wo,On)+Ys,{isReverseFlexScrollRoot:gr=>{var md;return(md=Ze?.(gr))!=null&&md},getNormalizedScrollTop:Ue})}function Kt(un){const Ln=ce.value,On=nt(un.nodeIndex,0,Math.max(0,Ln-1));return ct(0,On)+Math.max(0,un.offsetWithinNodePx)}function an(){if(mt!=null&&(ze?.(mt),mt=null),G)for(const un of Et)window.clearTimeout(un);Et=[]}function sn(un){const Ln=Kt(un),On=_t();On!=null&&Math.abs(On-Ln)<=.5||Ot(Ln)}return{activeRestoreAnchor:gt,getRelativeScrollTopWithinContainer:_t,setRelativeScrollTopWithinContainer:Ot,resolveAnchorOffset:Kt,clearRestoreReconcile:an,applyRestoreAnchor:sn,scheduleRestoreReconcile:function(){gt.value&&G&&mt==null&&(mt=we?we(()=>{mt=null,gt.value&&sn(gt.value)}):null,mt==null&>.value&&sn(gt.value))},captureRestoreAnchor:function(){const un=_t(),Ln=ce.value;if(un==null||Ln<=0)return null;const On=nt(tt(un+1),0,Ln-1),wo=ct(0,On),Ys=Ve(On);return{nodeIndex:On,offsetWithinNodePx:nt(un-wo,0,Math.max(0,Ys-1))}},restoreAnchor:function(un){const Ln=ce.value;if(gt.value={nodeIndex:nt(un.nodeIndex,0,Math.max(0,Ln-1)),offsetWithinNodePx:Math.max(0,un.offsetWithinNodePx)},an(),sn(gt.value),G)for(const On of[0,120,280,480])Et.push(window.setTimeout(()=>{gt.value&&sn(gt.value)},On))},getAnchorDrift:function(un){const Ln=_t();return Ln==null?null:Ln-Kt(un)}}})({isClient:F,containerRef:M,parsedNodeCount:ot,requestFrame:yo,cancelFrame:Lo,resolveScrollContainer:()=>Te.value||Se(),getNormalizedScrollTop:et,getOffsetTopWithinRoot:le,isReverseFlexScrollRoot:je,estimateIndexForOffset:Vn,estimateHeightRange:on,getFallbackNodeHeight:Wt,clamp:Gs}),{nodeHeights:hr,heightStats:ts,heightTreeSize:Fr,heightSumTree:Uu,heightKnownTree:Q0,averageNodeHeight:jr,resetHeightMeasurements:P1,pruneHeightMeasurements:F1,rebuildHeightTrees:Re,recordNodeHeight:pe,removeNodeHeights:Le,exportHeightCache:Sn,importHeightCache:ii,fenwickRangeSum:el}=(function(N={}){const G=ds({}),re=ds({total:0,count:0}),ce=V(0),we=V([]),ze=V([]);function De(){for(const Ve of Object.keys(G))delete G[Number(Ve)];re.total=0,re.count=0,ce.value=0,we.value=[],ze.value=[]}function Ue(Ve,nt,gt){for(let mt=nt+1;mt0;mt-=mt&-mt)gt+=Ve[mt];return gt}function Ze(Ve){ce.value=Ve;const nt=new Array(Ve+1).fill(0),gt=new Array(Ve+1).fill(0);for(const[mt,Et]of Object.entries(G)){const _t=Number(mt),Ot=Number(Et);!Number.isFinite(_t)||_t<0||_t>=Ve||!Number.isFinite(Ot)||Ot<=0||(Ue(nt,_t,Ot),Ue(gt,_t,1))}we.value=nt,ze.value=gt}function tt(Ve){if(!Number.isInteger(Ve)||Ve<0)return!1;const nt=G[Ve];if(!Number.isFinite(nt)||nt<=0)return!1;if(delete G[Ve],re.total=Math.max(0,re.total-nt),re.count=Math.max(0,re.count-1),ce.value>Ve){const gt=we.value,mt=ze.value;gt.length&&mt.length&&(Ue(gt,Ve,-nt),Ue(mt,Ve,-1))}return!0}const ct=B(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:G,heightStats:re,heightTreeSize:ce,heightSumTree:we,heightKnownTree:ze,averageNodeHeight:ct,resetHeightMeasurements:De,pruneHeightMeasurements:function(Ve){if(Ve<=0)return void De();let nt=0,gt=0;for(const[mt,Et]of Object.entries(G)){const _t=Number(mt),Ot=Number(Et);!Number.isFinite(_t)||_t<0||_t>=Ve||!Number.isFinite(Ot)||Ot<=0?delete G[_t]:(nt+=Ot,gt++)}re.total=nt,re.count=gt},rebuildHeightTrees:Ze,recordNodeHeight:function(Ve,nt,gt={}){(function(mt,Et,_t={}){var Ot;if(!Number.isFinite(Et)||Et<=0)return!1;const Kt=G[mt];if(Kt&&(_t.allowShrink===!1&&Etmt){const an=we.value,sn=ze.value;if(an.length&&sn.length)if(Kt){const un=Et-Kt;un!==0&&Ue(an,mt,un)}else Ue(an,mt,Et),Ue(sn,mt,1)}_t.notify!==!1&&((Ot=N.onHeightRecorded)==null||Ot.call(N))})(Ve,nt,wn(St({},gt),{notify:!0}))},removeNodeHeight:function(Ve,nt={}){var gt;const mt=tt(Ve);return mt&&nt.notify!==!1&&((gt=N.onHeightRecorded)==null||gt.call(N)),mt},removeNodeHeights:function(Ve,nt={}){var gt;let mt=0;for(const Et of Ve)tt(Number(Et))&&mt++;return mt>0&&nt.notify!==!1&&((gt=N.onHeightRecorded)==null||gt.call(N)),mt},exportHeightCache:function(){return Object.entries(G).map(([Ve,nt])=>({index:Number(Ve),height:Number(nt)})).filter(Ve=>Number.isFinite(Ve.index)&&Ve.index>=0&&Number.isFinite(Ve.height)&&Ve.height>0).sort((Ve,nt)=>Ve.index-nt.index)},importHeightCache:function(Ve,nt={}){var gt;if(!Array.isArray(Ve))return;const mt=ce.value;let Et=!1;if(nt.mode!=="merge"){const _t=Object.keys(G);if(_t.length>0){for(const Ot of _t)delete G[Number(Ot)];Et=!0}}for(const _t of Ve){const Ot=Number(_t.index),Kt=Number(_t.height);if(!Number.isInteger(Ot)||Ot<0||mt>0&&Ot>=mt||!Number.isFinite(Kt)||Kt<=0)continue;const an=G[Ot];an&&Math.abs(an-Kt)<=1||(G[Ot]=Kt,Et=!0)}Et&&((function(){let _t=0,Ot=0;const Kt=ce.value;for(const[an,sn]of Object.entries(G)){const un=Number(an),Ln=Number(sn);!Number.isFinite(un)||un<0||Kt>0&&un>=Kt||!Number.isFinite(Ln)||Ln<=0?delete G[un]:(_t+=Ln,Ot++)}re.total=_t,re.count=Ot})(),mt>0&&Ze(mt),(gt=N.onHeightRecorded)==null||gt.call(N))},fenwickRangeSum:function(Ve,nt,gt){if(gt<=nt)return 0;const mt=ut(Ve,gt-1);return nt<=0?mt:mt-ut(Ve,nt-1)}}})({onHeightRecorded:()=>{Vt(),Xe.value&&cd(),Ht.value&&_l(),Ne.value&&uc(),$o("node-resize")}});function Ea(N){Number.isInteger(N)&&N>=0&&vs.add(N)}function Or(N){for(const G of N)Ea(Number(G))}function Hr(N){Ks++;let G=!0;try{const re=N();return G=re!==!1,re}finally{Ks--,Ks===0&&G&&bl.value++}}function ec(){gs=[],kl=[],es=-1,vs.clear(),Hs.value=zi}function j1(){ec(),Hr(()=>P1()),Wo.clear()}function tc(N){!Number.isInteger(N)||N<0||N>=Rt.value.length||Wo.set(N,Ju(N))}function Zu(N,G,re={}){const ce=hr[N];Ea(N),pe(N,G,re);const we=hr[N];return Object.is(ce,we)?(vs.delete(N),!1):(we&&we>0?tc(N):ce&&Wo.delete(N),!0)}function O1(N,G){const re=Qt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ce,we;return(we=(ce=no.get(N))==null?void 0:ce.offsetHeight)!=null?we:0});return re>0?re:Qt("getNodeLayoutHeight.content.offsetHeight",()=>G.offsetHeight)}function Ku(N,G={}){G.mode!=="merge"?ec():Or(N.map(re=>re.index)),Hr(()=>ii(N,G)),O6()}const xl=B(()=>vl.value&&oi.value),zf=B(()=>{var N;return!K.value&&C.batchRendering!==!1&&gi.value>0&&((N=C.maxLiveNodes)!=null?N:0)<=0}),Sl=B(()=>!K.value&&pt&&Fe.value===!0&&!pn.value&&!Do.value&&!Ro.value&&!xl.value&&!zf.value),H1=B(()=>!!Zs&&xl.value),nc=B(()=>pn.value||Xe.value),{focusIndex:Zl,liveRange:ys,updateLiveRange:Dr}=(function(N,G){const{parsedNodeCount:re,virtualizationEnabled:ce,maxLiveNodesResolved:we,liveNodeBufferResolved:ze,clamp:De}=G,Ue=ze??B(()=>{var tt;return Math.max(0,(tt=N.liveNodeBuffer)!=null?tt:60)}),ut=V(0),Ze=ds({start:0,end:0});return{liveNodeBufferResolved:Ue,focusIndex:ut,liveRange:Ze,updateLiveRange:function(){const tt=re.value;if(!ce.value||tt===0)return Ze.start=0,void(Ze.end=tt);const ct=Math.min(we.value,tt),Ve=Ue.value,nt=De(ut.value-Ve,0,Math.max(0,tt-ct));Ze.start=nt,Ze.end=Math.min(tt,nt+ct)}}})(C,{parsedNodeCount:ot,virtualizationEnabled:pn,maxLiveNodesResolved:Po,liveNodeBufferResolved:Xn,clamp:Gs}),Cl=new Map,Bi=new Map,mr=new Map,D1=[],Kl=new Map,Gl=new Set,Me=V(0);let it=!1;const ft=B(()=>(Me.value,Gl.size)),yn=new Map,Yt=new Map,li=V(0),vi=B(()=>{li.value;let N=0;for(const G of yn.values())N+=Math.max(0,G);return N});let yi=null;const V1=B(()=>{if(!pn.value)return Rt.value.length;const N=Xn.value,G=Math.max(ys.end+N,si.value),re=Math.min(Rt.value.length,G);return Math.max(Ae.value,re)});function Ia(){it||(it=!0,queueMicrotask(()=>{it=!1,Me.value+=1}))}function Gu(N,G,re="node-resize"){if(!F||typeof window>"u")return null;const ce=window.setTimeout(()=>{Gl.delete(ce)&&Ia();try{G()}finally{$o(re)}},Math.max(0,N));return Gl.add(ce),Ia(),ce}function Bf(N){F&&N!=null&&(Gl.delete(N)&&Ia(),window.clearTimeout(N))}function X9(){if(F&&typeof window<"u")for(const N of Gl)window.clearTimeout(N);Gl.size&&(Gl.clear(),Ia()),D1.length=0,mr.clear()}function mB(N){R.value=N}function gB(N){O.value=N}function vB(N){U.value=N}const{cancelScheduledFocusSync:m6,scheduleFocusSync:Yl}=(function(N){const{isClient:G,containerRef:re,virtualizationEnabled:ce,requestFrame:we,cancelFrame:ze,syncFocusToScroll:De}=N;let Ue=null;function ut(){var tt,ct,Ve;return(Ve=(ct=(tt=re.value)==null?void 0:tt.ownerDocument)==null?void 0:ct.defaultView)!=null?Ve:typeof window<"u"?window:null}function Ze(){if(!Ue)return;const tt=ut();Ue.viaTimeout?tt?tt.clearTimeout(Ue.id):clearTimeout(Ue.id):ze?.(Ue.id),Ue=null}return{cancelScheduledFocusSync:Ze,scheduleFocusSync:function(tt={}){if(!ce.value)return;if(!G)return void De(!0);if(tt.immediate)return Ze(),void De(!0);if(Ue)return;const ct=()=>{Ue=null,De()};if(we)return void(Ue={id:we(ct),viaTimeout:!1});const Ve=ut();Ue={id:Ve?Ve.setTimeout(ct,16):setTimeout(ct,16),viaTimeout:!0}}}})({isClient:F,containerRef:M,virtualizationEnabled:pn,requestFrame:yo,cancelFrame:Lo,syncFocusToScroll:function(N=!1){var G;if(!pn.value)return;const re=Te.value||Se();if(!re)return;const ce=re.ownerDocument||((G=M.value)==null?void 0:G.ownerDocument)||document,we=ce?.defaultView||(typeof window<"u"?window:null),ze=re===ce?.documentElement||re===ce?.body,De=Rt.value.length;if(De<=0)return;if(!ze&&De>0&&je(re)){const mt=Qt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),Et=Qt("syncFocusToScroll.scrollTop",()=>re.scrollTop),_t=Et<0?-Et:Et;return void Ff(Gs((Ue=Math.max(0,_t)+.5*Math.max(0,mt),Qe.estimateIndexForOffsetFromEnd(Ue)),0,Math.max(0,De-1)),N)}var Ue;const ut=(function(mt,Et,_t,Ot){const Kt=M.value;if(!Kt)return null;const an=Ot?0:Qt("syncFocusToScroll.model.root.getBoundingClientRect",()=>mt.getBoundingClientRect().top),sn=Qt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Kt.getBoundingClientRect().top),un=Math.max(0,an-sn),Ln=Ot?Qt("syncFocusToScroll.model.viewport.clientHeight",()=>{var On,wo,Ys,Ds;return(Ds=(Ys=(wo=_t?.innerHeight)!=null?wo:(On=Et.documentElement)==null?void 0:On.clientHeight)!=null?Ys:mt.clientHeight)!=null?Ds:0}):Qt("syncFocusToScroll.model.root.clientHeight",()=>mt.clientHeight);return Gs(Vn(un+.5*Math.max(0,Ln)),0,Math.max(0,Rt.value.length-1))})(re,ce,we,ze);if(ut!=null)return void Ff(ut,N);const Ze=ze?null:Qt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),tt=ze?0:Ze.top,ct=ze?Qt("syncFocusToScroll.viewport.clientHeight",()=>{var mt,Et;return(Et=(mt=we?.innerHeight)!=null?mt:re.clientHeight)!=null?Et:0}):Ze.bottom,Ve=ke.value;let nt=null,gt=null;for(const[mt,Et]of Ve){if(!Et)continue;const _t=Qt("syncFocusToScroll.slot.getBoundingClientRect",()=>Et.getBoundingClientRect());_t.bottom<=tt||_t.top>=ct||(nt==null&&(nt=mt),gt=mt)}if(nt==null||gt==null){const mt=M.value;if(!mt)return;const Et=ze?{top:0}:Qt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),_t=Qt("syncFocusToScroll.fallback.scrollTop",()=>et(re,ce,ze)),Ot=ze?(()=>{const an=Qt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>mt.getBoundingClientRect()),sn=(ze?0:Et.top)-an.top;return Math.max(0,sn)})():(()=>{const an=le(mt,re);return Math.max(0,_t-an)})(),Kt=ze?Qt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var an,sn,un,Ln;return(Ln=(un=(sn=we?.innerHeight)!=null?sn:(an=ce?.documentElement)==null?void 0:an.clientHeight)!=null?un:re.clientHeight)!=null?Ln:0}):Qt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void Ff(Gs(Vn(Ot+.5*Math.max(0,Kt)),0,Math.max(0,Rt.value.length-1)),!0)}Ff(Math.round((nt+gt)/2),N)}}),{visibleNodeIndices:g6,nodeVisibilityHandles:oc,nodeVisibilityWatchStops:Rf,nodeVisibilityFallbackTimers:J9,clearVisibilityFallback:Pf,markNodeVisible:La,cleanupNodeVisibility:yB,destroyNodeVisibilityState:v6}=c4e({isClient:F,shouldTrackVisibleNodeIndices:()=>xl.value,shouldCleanupNodeVisibility:()=>pn.value,onNodeMarkedVisible:N=>{pn.value?Yl():Zl.value=Gs(N,0,Math.max(0,Rt.value.length-1))},onNodeVisibilityCleaned:N=>{no.delete(N)&&My()}}),{cleanupScrollListener:Q9,setupScrollListener:wB}=(function(N){const{isClient:G,virtualizationEnabled:re,listenerEnabled:ce,scrollRootElement:we,resolveScrollContainer:ze,scheduleFocusSync:De,onScroll:Ue}=N;let ut=null,Ze=null;function tt(){ut&&(ut(),ut=null),Ze=null,we.value=null}function ct(Ve){const nt=N.getScrollTop?N.getScrollTop(Ve):Ve.scrollTop;return Math.max(0,Number.isFinite(nt)?Math.abs(nt):0)}return{cleanupScrollListener:tt,setupScrollListener:function(){if(!G)return;if(!((Ve=ce?.value)!=null?Ve:re.value))return void tt();var Ve;const nt=ze();if(!nt)return void tt();if(we.value===nt&&ut)return;tt(),Ze=ct(nt);const gt=()=>{if(Ue?.(),re.value){const mt=(function(Et){const _t=ct(Et),Ot=Ze;Ze=_t;const Kt=Math.max(480,.75*(Et.clientHeight||0));return Ot==null?_t>Kt?{immediate:!0}:void 0:Math.abs(_t-Ot)>Kt?{immediate:!0}:void 0})(nt);mt?De(mt):De()}};nt.addEventListener("scroll",gt,{passive:!0}),we.value=nt,ut=()=>{nt.removeEventListener("scroll",gt)}}}})({isClient:F,virtualizationEnabled:pn,listenerEnabled:nc,scrollRootElement:Te,resolveScrollContainer:Se,scheduleFocusSync:Yl,onScroll:function(){const N=Ne.value;if(!N)return;const G=Xu();if(!G||(function(ce){if(od()>=jt)return Zt=null,!1;const we=Zt;if(we==null)return!0;const ze=Math.abs(ce.scrollTop-we)<=2;return ze||(Zt=null),ze})(G))return;const re=hy(G);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,N.distanceFromBottomPx))>32)&&cc("restore"):cc("restore")},getScrollTop:N=>{var G;const re=N.ownerDocument||((G=M.value)==null?void 0:G.ownerDocument)||document,ce=N===re.documentElement||N===re.body||N===re.scrollingElement;return Qt("scrollListener.getScrollTop",()=>et(N,re,ce))}});function Ff(N,G=!1){const re=Gs(N,0,Math.max(0,Rt.value.length-1));!G&&Math.abs(re-Zl.value)<=1||(Zl.value=re,Dr())}function Gs(N,G,re){return Math.min(Math.max(N,G),re)}function y6(N=Rt.value.length){const G=Jo();return!Number.isInteger(G)||G<0?N:Gs(G,0,N)}function w6(N){return N?.firstElementChild}function ey(N,G){var re;return N?(re=N.matches)!=null&&re.call(N,G)?N:N.querySelector(G):null}function kB(N,G){N<1||N>6||(Z[N]=G)}function ty(){if(!Pe.value)return void(J.value=0);const N=Qt("updateExperimentContainerWidth.clientWidth",()=>{var G,re;return(re=(G=M.value)==null?void 0:G.clientWidth)!=null?re:0});J.value=N>0?N:0}let Yu=null;function k6(){Yu?.disconnect(),Yu=null}const ny=Yd("ViewportDeferredMarkdownCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){return(yield Cs(()=>import("./index5-DRYrcfDq.js"),__vite__mapDeps([8,6,7]))).default}),loadingComponent:B5,delay:0,suspensible:!1}),B5);function oy(N){return N===ny}const sy=B(()=>h.value==="pre"?Di:h.value==="shiki"?ny:rm);function iy(){var N;return((N=C.codeBlockProps)==null?void 0:N.showHeader)!==!1}function ly(N,G,re){const ce=hr[G],we=typeof ce=="number"&&ce>0;if(Lt.value&&!we&&!(function(ze){return!!Un.value.paragraph&&(ze.type==="paragraph"||ze.type==="list_item"||ze.type==="list")})(N)){const ze=u$(N,re,se.value);if(ze)return ze}if(Co.value&&N.type==="code_block"){const ze=(function(De){if(De.type!=="code_block")return null;const Ue=Fy(De,Kf(De));return oy(Ue)?"markdown":Ue===Di?"pre":Ue===sy.value||Ue===rm?"monaco":null})(N);if(ze==="monaco"||ze==="markdown"||ze==="pre")return(function(De,Ue){var ut,Ze,tt;if(!De||De.type!=="code_block")return null;const ct=Ue.rendererKind,Ve=ct!=="pre"&&Ue.showHeader!==!1,nt=!!De.diff;let gt=0,mt=500;if(ct==="monaco"){const _t=(ut=Ue.monacoOptions)!=null?ut:{},Ot=gm(De,_t,Ue.width),Kt=(function(sn){const un=typeof sn?.fontSize=="number"&&sn.fontSize>0?sn.fontSize:12;return typeof sn?.lineHeight=="number"&&sn.lineHeight>0?sn.lineHeight:Math.round(1.5*un)})(_t),an=(function(sn,un){var Ln,On;const wo=typeof((Ln=sn?.padding)==null?void 0:Ln.top)=="number"?sn.padding.top:un?0:8,Ys=typeof((On=sn?.padding)==null?void 0:On.bottom)=="number"?sn.padding.bottom:un?0:8;return Math.max(0,wo)+Math.max(0,Ys)})(_t,nt);mt=typeof _t.MAX_HEIGHT=="number"&&_t.MAX_HEIGHT>0?_t.MAX_HEIGHT:500,gt=Math.round(Ot*Kt+an)}else if(ct==="markdown"){const _t=gm(De);gt=Math.round(21*_t+32)}else{const _t=gm(De);gt=Math.round(28*_t),mt=Number.POSITIVE_INFINITY}const Et=Math.max(1,Math.min(gt,mt));return St({kind:"code-block",height:Math.round(Et+(Ve?40:0)),contentHeight:Et,rendererKind:ct},nt&&ct==="monaco"?{diffInline:Iv((Ze=Ue.monacoOptions)!=null?Ze:{},(tt=Ue.width)!=null?tt:0)}:{})})(N,{rendererKind:ze,monacoOptions:C.codeBlockMonacoOptions,showHeader:iy(),width:re})}return null}sA(()=>{if(bl.value,Ks>0)return;const N=Rt.value,G=Ls();if(!N.length||!to.value)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const re=J.value||Qt("estimatedNodeHeights.clientWidth",()=>{var Ze;return((Ze=M.value)==null?void 0:Ze.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const ce=(function(Ze){return[Math.round(Ze),Lt.value,Co.value,se.value,C.codeBlockMonacoOptions,iy(),h.value,Un.value,pm.value]})(re),we=gs.length<=N.length&&(De=ce,(ze=kl).length===De.length&&ze.every((Ze,tt)=>Object.is(Ze,De[tt])));var ze,De;const Ue=we&&es===G?N.length:we?y6(N.length):0,ut=we?Array.from(vs):[];gs.length=N.length;for(let Ze=Ue;Ze=0&&ZeHs.value);Qe=(function(N){let G=!0,re=[0],ce="";function we(tt){var ct;const Ve=N.nodeHeights[tt];if(Number.isFinite(Ve)&&Ve>0)return Ve;const nt=N.parsedNodes.value[tt],gt=nt?.type,mt=!!((ct=N.hasCustomParagraphComponent)!=null&&ct.call(N)),Et=N.estimatedNodeHeights.value[tt],_t=Et?.height;if(!(function(Kt,an,sn){return!!(sn&&an?.kind==="simple-text"&&(Kt==="paragraph"||Kt==="list_item"||Kt==="list"))})(gt,Et,mt)&&Number.isFinite(_t)&&_t>0)return _t;const Ot=X3e(nt,N.getContainerWidth()||640);return gt==="heading"||gt==="paragraph"&&Ot<=28&&(function(Kt,an){if(an)return!1;const sn=Kt.children;return!Array.isArray(sn)||!sn.length||sn.every(f$)})(nt,mt)?Ot:Math.max(N.averageNodeHeight.value,Ot)}function ze(){var tt;const ct=N.parsedNodes.value.length,Ve=N.getPrefixCacheKeyParts().join(":");if(!G&&ce===Ve)return re;const nt=new Array(ct+1);nt[0]=0;for(let gt=0;gt=((ct=gt[nt])!=null?ct:0))return nt-1;let mt=0,Et=nt-1,_t=nt-1;for(;mt<=Et;){const Ot=mt+Et>>1;((Ve=gt[Ot+1])!=null?Ve:0)>=tt?(_t=Ot,Et=Ot-1):mt=Ot+1}return _t}function Ue(tt,ct){var Ve,nt;if(tt>=ct)return 0;if(N.heightEstimationActive.value)return(function(Et,_t){var Ot,Kt;const an=N.parsedNodes.value.length,sn=Jx(Math.trunc(Et),0,an),un=Jx(Math.trunc(_t),sn,an);if(sn>=un)return 0;const Ln=ze();return((Ot=Ln[un])!=null?Ot:0)-((Kt=Ln[sn])!=null?Kt:0)})(tt,ct);if(N.heightTreeSize.value!==N.parsedNodes.value.length){let Et=0;for(let _t=tt;_tsn<=0?0:N.fenwickRangeSum(mt,0,sn)+(sn-N.fenwickRangeSum(Et,0,sn))*gt;let Ot=0,Kt=Ve.length-1,an=Ve.length-1;for(;Ot<=Kt;){const sn=Ot+Kt>>1;_t(sn+1)>=tt?(an=sn,Kt=sn-1):Ot=sn+1}return an}let nt=tt;for(let gt=0;gt0||tt++}return tt}return{markFallbackHeightPrefixDirty:function(){G=!0},getFallbackNodeHeight:we,estimateHeightRange:Ue,estimateIndexForOffset:ut,estimateIndexForOffsetFromEnd:function(tt){var ct,Ve;const nt=N.parsedNodes.value;if(!nt.length)return 0;if(tt<=0)return Math.max(0,nt.length-1);if(N.heightEstimationActive.value){const mt=(ct=ze()[nt.length])!=null?ct:0;return De(Math.max(0,mt-tt))}if(N.heightTreeSize.value===nt.length){const mt=Ue(0,nt.length);return ut(Math.max(0,mt-tt))}let gt=tt;for(let mt=nt.length-1;mt>=0;mt--){const Et=(Ve=N.nodeHeights[mt])!=null?Ve:N.averageNodeHeight.value;if(gt<=Et)return mt;gt-=Et}return 0},getEstimatedNodeHeightCount:Ze,buildVirtualHeightSummary:function(tt){var ct;const Ve=N.parsedNodes.value.length;return{totalNodes:Ve,measuredCount:N.heightStats.count,estimatedCount:Ze(),averageNodeHeight:N.averageNodeHeight.value,topSpacerHeight:tt.topSpacerHeight,bottomSpacerHeight:tt.bottomSpacerHeight,estimatedTotalHeight:Ue(0,Ve),width:(ct=tt.width)!=null?ct:N.getContainerWidth()}}}})({parsedNodes:Rt,nodeHeights:hr,heightStats:ts,heightTreeSize:Fr,heightSumTree:Uu,heightKnownTree:Q0,averageNodeHeight:jr,heightEstimationActive:Pe,estimatedNodeHeights:sc,getContainerWidth:cn,hasCustomParagraphComponent:()=>!!Un.value.paragraph,getPrefixCacheKeyParts:()=>{var N;const G=Ld(J.value||Qt("getFallbackHeightPrefix.clientWidth",()=>{var ce;return((ce=M.value)==null?void 0:ce.clientWidth)||0})),re=((N=o.virtualScroll)==null?void 0:N.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[Rt.value.length,ts.count,Math.round(ts.total),Math.round(100*jr.value),re,G,Pe.value?1:0,pm.value,ee.value,Un.value.paragraph?1:0]},fenwickRangeSum:el}),Ke(()=>Rt.value.length,N=>{var G;Vt(),N<=0?j1():(NF1(G))),N!==Fr.value&&Re(N))},{immediate:!0});const bB=B(()=>{if(!pn.value)return Rt.value.map((ce,we)=>({node:ce,index:we}));const N=Rt.value.length,G=Gs(ys.start,0,N),re=Gs(ys.end,G,N);return Rt.value.slice(G,re).map((ce,we)=>({node:ce,index:G+we}))}),b6=B(()=>pn.value?on(0,Math.min(ys.start,Rt.value.length)):0),_6=B(()=>{if(!pn.value)return 0;const N=Rt.value.length;return on(Math.min(ys.end,N),N)});function ry(){return Qe.buildVirtualHeightSummary({topSpacerHeight:b6.value,bottomSpacerHeight:_6.value,width:W1()})}function _B(){const N=Rt.value,G=ry();return wn(St({},G),{probe:{paragraphReady:!!se.value.paragraph,listItemReady:!!se.value.listItem,listWrapperOverhead:se.value.listWrapperOverhead,headingReadyLevels:Object.entries(se.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:N.map((re,ce)=>{var we,ze,De,Ue,ut,Ze,tt,ct,Ve;return{index:ce,type:re.type,estimateKind:(ze=(we=sc.value[ce])==null?void 0:we.kind)!=null?ze:null,rendererKind:(Ue=(De=sc.value[ce])==null?void 0:De.rendererKind)!=null?Ue:null,estimatedHeight:(Ze=(ut=sc.value[ce])==null?void 0:ut.height)!=null?Ze:null,estimatedContentHeight:(ct=(tt=sc.value[ce])==null?void 0:tt.contentHeight)!=null?ct:null,measuredHeight:(Ve=hr[ce])!=null?Ve:null}})})}function x6(){return o.indexKey!=null?String(o.indexKey):Do.value?`virtual-${Fo()}`:"markdown-renderer"}function ay(N){const G=String(N),re=`${x6()}-`;if(!G.startsWith(re))return null;const ce=G.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ce)return null;const we=Number(ce[1]);return!Number.isInteger(we)||we<0||we>=Rt.value.length?null:we}function Fo(){var N,G,re;const ce=(N=o.virtualScroll)==null?void 0:N.sessionKey;return String(ce!=null&&ce!==""?ce:(re=(G=o.indexKey)!=null?G:C.customId)!=null?re:uo)}function ws(){var N;const G=(N=o.virtualScroll)==null?void 0:N.threadKey;return G==null||G===""?void 0:String(G)}const xB=B(()=>{var N,G,re;return(re=ws())!=null?re:String((G=(N=o.indexKey)!=null?N:C.customId)!=null?G:uo)});function S6(N){var G;return(N??"")===((G=ws())!=null?G:"")}function Vr(){var N,G,re;return G=(N=o.virtualScroll)==null?void 0:N.measurementKey,re=(function(){const ce=h.value;return(function(we){var ze,De;const Ue=we.renderer,ut=Ue==="monaco"?we.codeBlockMonacoOptions:void 0,Ze=we.codeBlockProps,tt=Ue==="shiki";return[we.isDark?"dark":"light",Ue==="monaco"?"code-rich":Ue==="pre"?"code-pre":"code-shiki",we.codeBlockStream===!1?"code-static":"code-stream",Vs(we.codeBlockMinWidth),Vs(we.codeBlockMaxWidth),...tt?[Ode((ze=Ze?.themes)!=null?ze:we.themes,(De=Ze?.langs)!=null?De:we.langs)]:[],Vs(ut?.fontSize),Vs(ut?.lineHeight),Vs(ut?.fontFamily),Vs(ut?.tabSize),Vs(ut?.MAX_HEIGHT),Vs(ut?.wordWrap),Vs(ut?.wrappingIndent),Vs(ut?.padding),Vs(Ze?.showHeader),Vs(Ze?.showCopyButton),Vs(Ze?.showExpandButton),Vs(Ze?.showPreviewButton),Vs(Ze?.showCollapseButton),Vs(Ze?.showFontSizeButtons)].join("\0")})({renderer:ce,isDark:C.isDark,codeBlockStream:C.codeBlockStream,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockMonacoOptions:ce==="monaco"?C.codeBlockMonacoOptions:void 0,codeBlockProps:C.codeBlockProps,themes:ce==="shiki"?C.themes:void 0,langs:ce==="shiki"?C.langs:void 0})})(),[G==null?"":String(G),re].join("\0")}function W1(){return cn()}const jf=B(()=>Ld(W1())),tl=B(()=>[Vr(),jf.value].join("\0")),SB=B(()=>{var N;return Do.value?["virtual",(N=ws())!=null?N:"",Fo(),tl.value].join("\0"):o.indexKey});function ic(){li.value+=1}function C6(N){return!(!N||!Number.isInteger(N.index)||N.index<0||N.index>=Rt.value.length||N.sessionKey!==Fo()||N.threadKey!==ws()||N.layoutEpochKey!==tl.value)}function cy(N){const G=String(N),re=Yt.get(G);return re?C6(re)?re.index:null:ay(G)}function uy(N="async-node"){(yn.size||Yt.size)&&(yn.clear(),Yt.clear(),ic(),$o(N))}const lc=fn(s7,null),M6={reportHeight(N,G){if(!Xe.value)return;const re=cy(N);if(re==null)return;const ce=Cl.get(re);if(!ce)return;const we=Number(G),ze=O1(re,ce);(function(De,Ue,ut={}){Hr(()=>Zu(De,Ue,ut))})(re,Number.isFinite(we)&&we>0?Math.max(we,ze||0):ze)},markPending(N){if(!Xe.value)return;const G=ay(N);G!=null&&(function(re,ce){var we;const ze=Yt.get(re);if(ze&&C6(ze))return yn.set(re,Math.max(0,(we=yn.get(re))!=null?we:0)+1),ic(),void $o("async-node");yn.set(re,1),Yt.set(re,(function(De){return{index:De,sessionKey:Fo(),threadKey:ws(),layoutEpochKey:tl.value}})(ce)),ic(),$o("async-node")})(String(N),G)},markSettled(N){if(!Xe.value)return;const G=String(N),re=cy(N);(re!=null||(function(ce){return yn.has(String(ce))})(G))&&(function(ce){var we;const ze=(we=yn.get(ce))!=null?we:0;return!(ze<=0||(ze<=1?(yn.delete(ce),Yt.delete(ce)):yn.set(ce,ze-1),ic(),ze===1&&$o("async-node"),0))})(G)&&re!=null&&Wr()}};function CB(){let N=0;for(const G of Cl.values())N+=Qt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=G?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,N))}qn(s7,{reportHeight(N,G){M6.reportHeight(N,G),lc?.reportHeight(N,G)},markPending(N){M6.markPending(N),lc?.markPending(N)},markSettled(N){M6.markSettled(N),lc?.markSettled(N)}});let A6,T6=null,rc=null;function Of(N){return N!==!1&&N!=null&&N!==""}function dy(){return pn.value?(function(){if(!pn.value)return!0;const N=Rt.value.length,G=Gs(ys.start,0,N),re=Gs(ys.end,G,N);if(G>=re)return!0;for(let ce=G;ce=V1.value}function E6(){return Fe.value===!0&&!kt.value&&vi.value===0&&Gl.size===0&&Kl.size===0&&yi==null&&dy()}function fy(){var N,G;if(((N=o.virtualScroll)==null?void 0:N.settleMode)!=="manual"||T6===Fo()&&A6===ws())return!0;const re=(G=o.virtualScroll)==null?void 0:G.settledToken;return!!Of(re)&&rc===ud(re)}function I6(){return E6()&&fy()}function MB(N,G){return G.totalNodes<=0?N==="final"?"final":"estimate":G.measuredCount>=G.totalNodes?N==="final"?"final":"measured":G.measuredCount>0||G.estimatedCount>0?"mixed":"estimate"}function q1(N="manual",G){const re=ry(),ce=(function(we){return we||(Fe.value!==!0?Rt.value.length>0?"streaming":"estimating":!dy()||Kl.size>0||yi!=null?"measuring":I6()?"settled":"settling")})(G);return{sessionKey:Fo(),threadKey:ws(),phase:ce,nodeCount:re.totalNodes,liveRange:{start:ys.start,end:ys.end},renderedCount:Ae.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:CB(),totalHeight:py(),width:re.width,final:Fe.value===!0,stable:I6(),confidence:MB(ce,re),reason:N}}function Xu(){const N=Te.value||Se(),G=M.value;if(!N||!G)return null;const re=N.ownerDocument||G.ownerDocument||document,ce=N===re.documentElement||N===re.body||N===re.scrollingElement,we=Qt("getScrollBox.scrollTop",()=>et(N,re,ce)),ze=Qt("getScrollBox.scrollHeight",()=>{var Ue,ut,Ze,tt,ct;return ce?Math.max((ut=(Ue=re.documentElement)==null?void 0:Ue.scrollHeight)!=null?ut:0,(tt=(Ze=re.body)==null?void 0:Ze.scrollHeight)!=null?tt:0,(ct=N.scrollHeight)!=null?ct:0):N.scrollHeight}),De=Qt("getScrollBox.clientHeight",()=>{var Ue;return ce?((Ue=re.documentElement)==null?void 0:Ue.clientHeight)||N.clientHeight||0:N.clientHeight});return{root:N,doc:re,isViewportRoot:ce,scrollTop:we,scrollHeight:ze,clientHeight:De}}function py(){const N=Rt.value.length,G=Math.max(0,on(0,N)),re=Qt("getRendererLogicalHeight.offsetHeight",()=>{var we,ze;return(ze=(we=M.value)==null?void 0:we.offsetHeight)!=null?ze:0}),ce=Math.max(0,re>0?re:Qt("getRendererLogicalHeight.scrollHeight",()=>{var we,ze;return(ze=(we=M.value)==null?void 0:we.scrollHeight)!=null?ze:0}));return N<=0?Math.ceil(re):pn.value?G>0?Math.max(1,Math.ceil(G),(function(){let we=b6.value+_6.value;for(const ze of no.values())ze&&(we+=Math.max(0,Qt("getVirtualizedDomLogicalHeight.offsetHeight",()=>ze.offsetHeight||0)));return Math.ceil(Math.max(0,we))})(),(function(we,ze){return we<=0||ze<=0?0:ze<=we+Math.max(512,.05*we)?Math.ceil(ze):0})(G,ce)):Math.max(1,Math.ceil(ce)):Xe.value?G>0||ts.count>0||Qe.getEstimatedNodeHeightCount()>0?(Ni.value&&Ae.value,Math.max(1,Math.ceil(ce),Math.ceil(G))):Math.ceil(ce):Math.max(1,Math.ceil(ce),Math.ceil(G))}function hy(N){const G=M.value;if(!G)return null;const re=Qt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>G.getBoundingClientRect());return(function(we){return we.isViewportRoot?we.clientHeight:Qt("getViewportBottomInRoot.getBoundingClientRect",()=>we.root.getBoundingClientRect().bottom)})(N)-re.bottom}function AB(N={}){const G=N.requireViewport!==!1,re=(function(ze=64){const De=Xu(),Ue=M.value;if(!De||!Ue)return!1;const ut=(function(tt){if(tt.isViewportRoot)return{top:0,bottom:tt.clientHeight};const ct=Qt("getVirtualViewportRect.getBoundingClientRect",()=>tt.root.getBoundingClientRect());return{top:ct.top,bottom:ct.bottom}})(De),Ze=Qt("isRendererNearVirtualViewport.getBoundingClientRect",()=>Ue.getBoundingClientRect());return Ze.bottom>=ut.top-ze&&Ze.top<=ut.bottom+ze})();if(G&&!re)return null;const ce=(function(){const ze=Xu(),De=M.value;if(!ze||!De||Math.max(0,ze.scrollHeight-ze.scrollTop-ze.clientHeight)>64)return null;const Ue=hy(ze);return Ue==null?null:Ue>=-8&&Ue<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,Ue)}:null})();if(ce)return{anchor:ce,captured:!0};const we=X0();if(we)return{anchor:{type:"node",nodeIndex:we.nodeIndex,offsetWithinNodePx:we.offsetWithinNodePx},captured:re};if(N.allowFallback===!0){const ze=(function(){const De=Rt.value.length;return De<=0?null:{type:"node",nodeIndex:Gs(Zl.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return ze?{anchor:ze,captured:!1}:null}return null}function L6(N){let G=2166136261;for(let re=0;re>>0).toString(36)}function TB(N,G){let re=N;for(let ce=0;ce8192?`${ce.slice(0,8192)}...${ce.length}`:ce;return`${ce.length}:${L6(we)}`})(N)}`;if(typeof N=="function")return"fn";if(typeof N!="object")return typeof N;if(G.has(N))return"cycle";if(re>=6)return"max-depth";G.add(N);try{if(Array.isArray(N)){if(N.length<=160){const Ze=[];for(let tt=0;tt=Ue&&De.push(tt)}return[`a:${N.length}`,`h=${ze.join(",")}`,`t=${De.join(",")}`,`all=${(ut>>>0).toString(36)}`].join(":")}const ce=N,we=Object.keys(ce).filter(ze=>{const De=ce[ze];return ze!=="parent"&&ze!=="el"&&ze!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||EB.has(ze))}).sort();return`o:${we.length}:${we.map(ze=>`${ze}=${Hf(ce[ze],G,re+1)}`).join(";")}`}finally{G.delete(N)}}let $6=-1,N6="",U1=[2166136261];function Ju(N){const G=Rt.value[N];return G?L6(Hf(G)):""}function IB(N,G){let re=N;for(let ce=0;ce>>0}function z6(){var N,G;const re=ee.value;if($6===re)return N6;const ce=Rt.value.length;let we=y6(ce);($6!==re-1||we>ce||U1.length>>0).toString(36),$6=re,N6}function ac(N,G={}){var re;const ce=G.includeHeightCache===!0,we=(re=G.includeContentHash)!=null?re:ce,ze=ce?(function(Ue){const ut=(function(){var mt,Et;const _t=Number((Et=(mt=o.virtualScroll)==null?void 0:mt.heightCacheLimit)!=null?Et:5e3);return!Number.isFinite(_t)||_t<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(_t))})();if(!Number.isFinite(ut)||Ue.length<=ut)return Ue;const Ze=new Map,tt=mt=>{!mt||Ze.size>=ut||Ze.set(mt.index,mt)},ct=Rt.value.length,Ve=Gs(ys.start-2*Xn.value,0,ct),nt=Gs(ys.end+2*Xn.value,Ve,ct);for(const mt of Ue)mt.index>=Ve&&mt.index=0&&Ze.sizemt.index-Et.index).slice(0,ut)})(Sn().map(Ue=>{var ut;const Ze=Rt.value[Ue.index];return Ze?wn(St({},Ue),{nodeType:String((ut=Ze.type)!=null?ut:""),signature:Ju(Ue.index)}):null}).filter(Ue=>!!Ue)):[],De=AB({allowFallback:G.allowAnchorFallback===!0,requireViewport:G.requireViewport});return De||ze.length||G.includeEmptyState===!0?wn(St({sessionKey:N.sessionKey,threadKey:N.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:N,width:N.width,contentHash:we?z6():void 0,measurementKey:Vr()||void 0,heightCache:ze.length?ze:void 0}):null}function B6(N){var G,re;const ce=Xu();if(!ce)return;const we=(function(Ue){const ut=M.value;if(!ut)return null;const Ze=le(ut,Ue.root),tt=Rt.value.length,ct=Qt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ut.offsetHeight||0),Ve=Math.max(0,ct>0?ct:tt>0?Qt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ut.scrollHeight||0):0),nt=py();return Ze+Math.max(Ve,nt)})(ce);if(we==null)return;const ze=Math.max(0,N.distanceFromBottomPx),De=Math.max(0,we-ce.clientHeight-ze);(function(Ue){jt=od()+120,Zt=Ue})(De),ce.isViewportRoot?(re=(G=ce.doc.defaultView)==null?void 0:G.scrollTo)==null||re.call(G,0,De):Gx(ce.root,ce.doc,De,{isReverseFlexScrollRoot:je,getNormalizedScrollTop:et})}const R6=[];function my(){if(F)for(ht!=null&&(Lo?.(ht),ht=null);R6.length;){const N=R6.pop();N!=null&&window.clearTimeout(N)}}function cc(N){const G=!!Ne.value;Ne.value=null,jt=0,Zt=null,my(),G&&N&&$o(N)}function uc(){if(!Ne.value||!F||ht!=null)return;const N=()=>{ht=null;const G=Ne.value;G&&B6(G)};ht=yo?yo(N):null,ht==null&&N()}function gy(N,G={}){const re=Rt.value.length;return re<=0?[]:N.filter(ce=>!(!Number.isInteger(ce.index)||ce.index<0||ce.index>=re)&&!(!Number.isFinite(ce.height)||ce.height<=0)&&!(G.requireSignature&&!ce.signature)&&!(G.requireCompatibilityMetadata&&!ce.nodeType&&!ce.signature)&&(function(we){var ze;const De=Rt.value[we.index];return!(!De||we.nodeType&&we.nodeType!==String((ze=De.type)!=null?ze:"")||we.signature&&we.signature!==Ju(we.index))})(ce))}function vy(N){const G=Ld(W1()),re=Ld(N);return G!==-1&&re!==-1&&G===re}function P6(N){var G;const re=Number(N?.width);if(Number.isFinite(re)&&re>0)return re;const ce=Number((G=N?.metrics)==null?void 0:G.width);return Number.isFinite(ce)&&ce>0?ce:null}function yy(N){var G;return N.sessionKey===Fo()&&!!S6(N.threadKey)&&((G=N.measurementKey)!=null?G:"")===Vr()&&!!vy(P6(N))&&!!(function(re){const ce=re.heightCache;return!!ce?.length&&(wy(re)?ce.some(we=>!!(we.nodeType||we.signature)):ce.some(we=>!!we.signature))})(N)}function wy(N){return!!(N.contentHash&&N.contentHash===z6())}function LB(N){return!wy(N)}let Z1=null,K1=null,Df=null,Qu=null,ed=null;function F6(N){var G;const re=N.map(we=>{var ze,De;return[we.index,Math.round(10*we.height),(ze=we.nodeType)!=null?ze:"",(De=we.signature)!=null?De:""].join("")}).join(""),ce=Ld(W1());return[(G=ws())!=null?G:"",Fo(),Vr(),Rt.value.length,ce,N.length,L6(re)].join(":")}function ky(N=(G=>(G=o.virtualScroll)==null?void 0:G.heightCache)()){if(!Xe.value||!N?.length||Rt.value.length<=0||!vy((G=o.virtualScroll)==null?void 0:G.heightCacheWidth))return!1;var G;const re=gy(N,{requireSignature:!0});if(!re.length)return!1;const ce=F6(re);return ce===Z1?(K1="standalone",!0):(Ku(re,{mode:"merge"}),Vt(),Z1=ce,K1="standalone",id(),$o("restore"),!0)}function j6(N,G={}){var re,ce,we;if(!Xe.value||!N||N.sessionKey!==Fo()||!S6(N.threadKey)||Rt.value.length<=0)return!1;const ze=!!((re=N.heightCache)!=null&&re.length)&&!Vf(),De=!N.anchor||N.anchorCaptured===!1&&G.allowUncapturedAnchor!==!0?null:N.anchor,Ue=G.restoreAnchor===!0&&!!De&&!Vf()&&Number(P6(N))>0;let ut=!1;if((ce=N.heightCache)!=null&&ce.length&&yy(N)){const tt=gy(N.heightCache,{requireCompatibilityMetadata:!N.contentHash,requireSignature:LB(N)});tt.length&&(Ku(tt,{mode:"merge"}),Vt(),Z1=F6(tt),K1="restore",id(),ut=!0)}if(ze||Ue)return!1;if(!G.restoreAnchor||!De)return ut&&$o("restore"),!0;const Ze=(function(tt,ct){var Ve;const nt=tt.anchor,gt=nt?nt.type==="bottom"?`bottom:${Math.round(nt.distanceFromBottomPx)}`:`node:${nt.nodeIndex}:${Math.round(nt.offsetWithinNodePx)}`:"none";return[(Ve=ws())!=null?Ve:"",Fo(),Vr(),jf.value,ct,gt].join(":")})(N,(we=G.restoreToken)!=null?we:"imperative");return Df===Ze?(ut&&$o("restore"),!0):(Df=Ze,(function(tt){const ct=()=>{if(tt.type==="node")return cc(),void J0({nodeIndex:tt.nodeIndex,offsetWithinNodePx:tt.offsetWithinNodePx});if(rs(),Ht.value=null,Ne.value=tt,my(),B6(tt),F)for(const Ve of[0,120,280,480])R6.push(window.setTimeout(()=>{const nt=Ne.value;nt&&B6(nt)},Ve))};(function(Ve){if(!pn.value)return!1;const nt=Rt.value.length;return!(nt<=0||(Zl.value=Ve.type==="node"?Gs(Ve.nodeIndex,0,nt-1):nt-1,Dr(),0))})(tt)?yt(ct):ct()})(De),$o("restore"),!0)}function Vf(){const N=W1();return Number.isFinite(N)&&N>0}function by(N){var G;return N.sessionKey===Fo()&&!!S6(N.threadKey)&&(Rt.value.length<=0||!(!((G=N.heightCache)!=null&&G.length)||Vf())||!(!(N.anchor&&Number(P6(N))>0)||Vf()))}function O6(){Wo.clear();for(const N of Object.keys(hr)){const G=Number(N);Number.isInteger(G)&&G>=0&&G{let G=!1,re=null;const ce=()=>{G||(G=!0,re!=null&&window.clearTimeout(re),N())};if(yo)return yo(ce),void(re=window.setTimeout(ce,50));re=window.setTimeout(ce,0)})}function H6(N,G=ws(),re=tl.value){return Fo()===N&&ws()===G&&tl.value===re}function D6(){return zo(this,arguments,function*(N={}){var G,re,ce,we,ze;const De=Fo(),Ue=ws(),ut=tl.value,Ze=(G=N.frames)!=null?G:2,tt=(re=N.timeoutMs)!=null?re:120,ct=(ce=N.reason)!=null?ce:"manual",Ve=N.expectedSettledTokenKey,nt=N.flushPendingTimers===!0,gt=q1(ct),mt=()=>wn(St({},gt),{phase:gt.final?"settling":gt.phase,stable:!1,confidence:gt.confidence==="final"?"mixed":gt.confidence,reason:ct}),Et=()=>H6(De,Ue,ut)&&(Ve==null||sd()===Ve);for(let an=0;anwindow.setTimeout(sn,an))})(tt),!Et()||(nt&&X9(),Wr(),td(),!Et()))return mt();const _t=E6();_t&&(T6=De,A6=Ue,((we=o.virtualScroll)==null?void 0:we.settleMode)==="manual"&&Ve!=null&&Of((ze=o.virtualScroll)==null?void 0:ze.settledToken)&&sd()===Ve&&(rc=ud(o.virtualScroll.settledToken)));const Ot=Et()&&_t&&fy(),Kt=q1(ct,Ot?"final":void 0);return Z6(Kt,!0),Kt})}let V6="content",G1=null,Y1=null,W6=0,nd=null,dc=null,q6=null,U6=null;function od(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function xy(N){var G,re;const ce=nd;if(!ce)return!0;const we=(re=(G=o.virtualScroll)==null?void 0:G.heightDiffThresholdPx)!=null?re:1;return Math.abs(N.totalHeight-ce.totalHeight)>we||N.sessionKey!==ce.sessionKey||N.phase!==ce.phase||N.stable!==ce.stable||N.final!==ce.final||N.threadKey!==ce.threadKey||N.nodeCount!==ce.nodeCount||N.measuredCount!==ce.measuredCount||N.width!==ce.width}function sd(N=(G=>(G=o.virtualScroll)==null?void 0:G.settledToken)()){return Vs(N)}function Sy(N,G){var re,ce;return[N,G.sessionKey,(re=G.threadKey)!=null?re:"",Vr(),z6(),Vs((ce=o.virtualScroll)==null?void 0:ce.settledToken),Math.round(G.totalHeight),Math.round(G.width)].join("\0")}function id(){q6=null,U6=null,dc=null}function $B(N){const G=N.heightCache;return G?.length?F6(G):""}function ld(N){var G,re,ce;const we=N.metrics,ze=N.anchor?(De=N.anchor).type==="bottom"?`bottom:${Math.round(De.distanceFromBottomPx)}`:`node:${De.nodeIndex}:${Math.round(De.offsetWithinNodePx)}`:"none";var De;return[N.sessionKey,(G=N.threadKey)!=null?G:"",(re=N.measurementKey)!=null?re:Vr(),(ce=N.contentHash)!=null?ce:"",$B(N),ze,N.anchorCaptured?1:0,we.liveRange.start,we.liveRange.end,we.renderedCount,we.nodeCount,Math.round(we.totalHeight),Math.round(we.width),we.phase,we.stable?1:0].join("\0")}function Z6(N,G=!1){if(!Xe.value||(function(De=!1){return!De&&Do.value&&!qe.value})(G))return;const re=G||xy(N),ce=(function(De,Ue=!1){return Ue||De.stable||De.phase==="final"?{state:ac(De,{includeHeightCache:!0})}:{state:ac(De)}})(N,G),we=ce.state,ze=!!(we&&(re||(function(De,Ue=!1){return!!Ue||ld(De)!==dc})(we,G)));if(re&&(j(N),nd=N,W6=od()),we&&ze&&(H(we),we.anchor&&D(we.anchor),dc=ld(we)),N.stable){const De=Sy("settled",N);if(De!==q6){q6=De;const Ue=ac(N,{includeHeightCache:!0});Ue&&(H(Ue),dc=ld(Ue)),(function(ut){s("render-settled",ut)})(N)}}if(N.phase==="final"){const De=Sy("final",N);if(De!==U6){U6=De;const Ue=ac(N,{includeHeightCache:!0});Ue&&(H(Ue),dc=ld(Ue)),(function(ut){s("render-final",ut)})(N)}}}function K6(){G1!=null&&(Lo?.(G1),G1=null),Y1!=null&&F&&(window.clearTimeout(Y1),Y1=null)}function Cy(){G1=null,Y1=null,(function(N){if(Kl.size>0||yi!=null)return!0;switch(N){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(V6)&&(Wr(),td()),Z6(q1(V6))}function $o(N){var G,re;if(!Xe.value||(V6=N,G1!=null||Y1!=null))return;const ce=Math.max(0,(re=(G=o.virtualScroll)==null?void 0:G.emitIntervalMs)!=null?re:32),we=Math.max(0,ce-(od()-W6)),ze=()=>{Y1=null,G1=yo?yo(Cy):null,G1==null&&Cy()};F&&we>0?Y1=window.setTimeout(ze,we):ze()}function My(){ne.value+=1}function Wf(N){if(Ni.value&&N>=Ae.value){const G=Rt.value[N],re=Oe.value===!0&&Fe.value!==!0&&N>=Rt.value.length-2,ce=G?.type==="code_block"||G?.type==="image"||G?.type==="mermaid"||G?.type==="infographic";if(!re||ce)return!1}return!xl.value||N=at.value&&(q.value||(q.value=!0,v6()),!H1.value||!Zs))return fc(N),void(G&&La(N,!0));if(N{if(J9.delete(ze),!xl.value||g6.value.has(ze))return;const ut=no.get(ze);if(!ut)return;const Ze=Se(ut),tt=ut.ownerDocument||document,ct=tt.defaultView||window,Ve=!Ze||Ze===tt.documentElement||Ze===tt.body,nt=!Ve&&Ze?Qt("nodeVisibilityFallback.root.getBoundingClientRect",()=>Ze.getBoundingClientRect()):null,gt=Ve?0:nt.top,mt=Ve?Qt("nodeVisibilityFallback.clientHeight",()=>{var _t,Ot;return(Ot=(_t=ct.innerHeight)!=null?_t:Ze?.clientHeight)!=null?Ot:0}):nt.bottom,Et=Qt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ut.getBoundingClientRect());Et.bottom>=gt-500&&Et.top<=mt+500&&La(ze,!0)},1800+De);J9.set(ze,Ue)})(N);let we=null;we=Ke(()=>ce.isVisible.value,ze=>{if(ze){Pf(N),La(N,!0),we?.(),Rf.delete(N),oc.get(N)===ce&&oc.delete(N);try{ce.destroy()}catch{}}},{immediate:!0}),Rf.set(N,we),pn.value&&Yl()}function G6(){yi=null,Hr(()=>{let N=!1;for(const[G,re]of Kl)Kl.delete(G),Cl.get(G)===re.el&&Bi.get(G)===re.version&&(N=Zu(G,re.height,{allowShrink:re.allowShrink})||N);return N})}function pc(){yi!=null&&(Lo?.(yi),yi=null),Kl.clear()}function Uf(N,G){(function(re,ce,we){var ze;if(!Number.isFinite(we)||we<=0||Cl.get(re)!==ce)return;const De=Bi.get(re);if(De==null)return;const Ue=Rt.value[re],ut=kt.value&&Fe.value!==!0&&!((ze=o.nodes)!=null&&ze.length)&&re>=Rt.value.length-2,Ze=!(Ue?.loading===!0||ut),tt=Kl.get(re),ct=tt?tt.allowShrink&&Ze:Ze,Ve=tt&&!ct?Math.max(tt.height,we):we;Kl.set(re,{height:Ve,allowShrink:ct,version:De,el:ce}),yi==null&&(yi=yo?yo(G6):null,yi==null&&G6())})(N,G,O1(N,G))}function Wr(){for(const[N,G]of Cl)G&&Uf(N,G)}function Ay(){Os?.disconnect(),Os=null,Vo.clear()}function Y6(){for(;D1.length;)Bf(D1.pop())}Ke(qe,N=>{N&&$o("content")},{flush:"post"}),t({getVirtualMetrics:q1,captureVirtualState:function(N={}){var G;return ac(q1("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:N.allowFallbackAnchor===!0,requireViewport:N.requireViewport===!0,includeEmptyState:(G=N.includeEmptyState)==null||G})},restoreVirtualState:function(N,G={}){const re=G.restoreAnchor===!0,ce=G.restoreToken==null?"imperative":String(G.restoreToken);Qu=N,ed={restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0},!j6(N,{restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0})&&by(N)||(Qu=null,ed=null)},forceMeasure:function(N="manual"){return zo(this,null,function*(){yield yt(),yield _y(),Wr(),td(),yield yt();const G=q1(N);return Z6(G,!0),G})},settle:D6,scrollToNode:function(N,G="start"){cc(),rs();const re=Rt.value.length;if(re<=0)return;const ce=Gs(N,0,re-1),we=()=>{var ze;const De=Ns({nodeIndex:ce,offsetWithinNodePx:0}),Ue=Wt(ce),ut=Xu(),Ze=(ze=ut?.clientHeight)!=null?ze:0,tt=Tn();let ct=De;if(G==="center")ct=De-Ze/2+Ue/2;else if(G==="end")ct=De-Ze+Ue;else if(G==="nearest"&&tt!=null){if(De>=tt&&De+Ue<=tt+Ze)return;ct=DeUs.value,N=>{if(!N){Ay();for(const G of mr.values())for(const re of G)Bf(re);mr.clear(),Bi.clear(),Y6(),pc()}},{immediate:!0}),Ke(Fe,N=>{N&&(function(){if(F&&Fe.value&&Cl.size){Y6();for(const G of[80,240,640]){const re=Gu(G,()=>{for(const[ce,we]of Cl)we&&Uf(ce,we)},"final");re!=null&&D1.push(re)}}})(),$o(N?"final":"content")});const NB=Yx(()=>$o("content"),16),zB=Yx(()=>$o("batch"),16);Ke([()=>Rt.value.length,()=>Ae.value],()=>{Ne.value&&uc(),NB()},{flush:"post",immediate:!0}),Ke([()=>ys.start,()=>ys.end],()=>{zB()},{flush:"post"});const{cleanupBatchScheduler:BB}=(function(N){const{props:G,isClient:re,isTestEnv:ce,parsedNodesIdentity:we,parsedNodeCount:ze,desiredRenderedCount:De,datasetKey:Ue,batchingEnabled:ut,incrementalRenderingActive:Ze,resolvedBatchSize:tt,resolvedInitialBatch:ct,renderedCount:Ve,adaptiveBatchSize:nt,previousRenderContext:gt,previousBatchConfig:mt,requestFrame:Et,cancelFrame:_t,hasIdleCallback:Ot,cleanupNodeVisibility:Kt,onDatasetKeyChanged:an,onDatasetChanged:sn}=N;let un=null,Ln="raf",On=null,wo=0,Ys=!1,Ds=!1;const Xl=new Set,gr=new Set;function md(){if(re){un!=null&&(Ln==="raf"&&_t?_t(un):Ln==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(un):Ln==="timeout"&&window.clearTimeout(un),un=null),wo+=1;for(const ri of Xl)_t&&_t(ri);for(const ri of gr)window.clearTimeout(ri);Xl.clear(),gr.clear(),On=null,Ys=!1,Ds=!1}}function t3(){return typeof performance<"u"?performance.now():Date.now()}function qy(ri){(function(qr){var Na;if(!Ze.value)return;const Ur=Math.max(2,(Na=G.renderBatchBudgetMs)!=null?Na:6),Zr=Math.max(1,tt.value||1),Jl=Math.max(1,Math.floor(Zr/4));qr>1.5*Ur?nt.value=Math.max(Jl,Math.floor(.8*nt.value)):qr<.6*Ur&&nt.value=Ur)return;const Zr=Math.max(1,ri),Jl=()=>{const gc=t3();un=null;const gd=On??Zr;On=null;const vc=t3();Ve.value=Math.min(Ur,Ve.value+gd),Kt(Ve.value),(function(oh,n3){if(!re)return void qy(n3);Ys=!0;const Gy=++wo;yt().then(()=>{var Yy;if(Gy!==wo)return;const nR=t3(),oR=Math.max(n3,nR-oh),Xy=()=>{Gy===wo&&qy(oR)};if(Et){let J1=null,yc=null,Qy=!1;const ew=()=>{Qy||(Qy=!0,J1!==null&&(Xl.delete(J1),J1=null),yc!==null&&(gr.delete(yc),window.clearTimeout(yc),yc=null),Xy())};return J1=Et(()=>{ew()}),Xl.add(J1),yc=window.setTimeout(()=>{J1!==null&&_t&&_t(J1),ew()},Math.max(32,(Yy=G.renderBatchIdleTimeoutMs)!=null?Yy:120)),void gr.add(yc)}const Jy=window.setTimeout(()=>{gr.delete(Jy),Xy()},0);gr.add(Jy)})})(gc,t3()-vc)};if(!re||Pi.immediate)return void Jl();const za=Math.max(0,(qr=G.renderBatchDelay)!=null?qr:16);if(On=On!=null?Math.max(On,Zr):Zr,un==null){if(!ce&&Ot&&window.requestIdleCallback){const gc=Math.max(0,(Na=G.renderBatchIdleTimeoutMs)!=null?Na:120);return Ln="idle",void(un=window.requestIdleCallback(()=>Jl(),{timeout:gc}))}if(Et&&!ce)return Ln="raf",void(un=Et(()=>{za===0?Jl():(Ln="timeout",un=window.setTimeout(()=>Jl(),za))}));Ln="timeout",un=window.setTimeout(()=>Jl(),za)}}function Zy(ri,Pi={}){Ys?Ds=!0:ri==null?Ky():Uy(ri,Pi)}function Ky(){Ze.value&&Uy(ut.value?Math.max(1,Math.round(nt.value)):Math.max(1,tt.value))}return Ke([we,ze,Ue,Ze,tt,ct,()=>G.renderBatchDelay],()=>{var ri;const Pi=ze.value,qr=gt.value,Na=Ue.value,Ur=!Object.is(Na,qr.key),Zr=Pi!==qr.total,Jl=Ur||Zr;gt.value={key:Na,total:Pi};const za=mt.value,gc=(ri=G.renderBatchDelay)!=null?ri:16,gd=za.batchSize!==tt.value||za.initial!==ct.value||za.delay!==gc||za.enabled!==Ze.value;mt.value={batchSize:tt.value,initial:ct.value,delay:gc,enabled:Ze.value},Ur&&an(Pi),(Jl||gd||!Ze.value)&&md(),(Jl||gd)&&(nt.value=Math.max(1,tt.value||1)),Jl&&sn();const vc=De.value;if(!Pi)return Ve.value=0,void Kt(0);if(!Ze.value)return Ve.value=vc,void Kt(Ve.value);const oh=Ur||qr.total===0;Ve.value=oh||gd?Math.min(vc,ct.value):Math.min(Ve.value,vc);const n3=Math.max(1,ct.value||tt.value||Pi);Ve.value{Ze.value&&(typeof Pi=="number"&&ri<=Pi||ri>Ve.value&&Zy())}),{cleanupBatchScheduler:md}})({props:C,isClient:F,isTestEnv:ms,parsedNodesIdentity:Ge,parsedNodeCount:ot,desiredRenderedCount:V1,datasetKey:SB,batchingEnabled:Ul,incrementalRenderingActive:Ni,resolvedBatchSize:gi,resolvedInitialBatch:si,renderedCount:Ae,adaptiveBatchSize:At,previousRenderContext:Ie,previousBatchConfig:lt,requestFrame:yo,cancelFrame:Lo,hasIdleCallback:yl,cleanupNodeVisibility:yB,onDatasetKeyChanged:N=>{pc(),j1(),Vt(),id(),N>0&&Re(N)},onDatasetChanged:()=>{pn.value&&Yl({immediate:!0})}});Ke([nc,pn,()=>M.value,()=>X()],([N,G])=>{if(!N)return Q9(),void m6();wB(),G?Yl({immediate:!0}):m6()},{flush:"post",immediate:!0}),Ke([()=>Rt.value.length,()=>pn.value],N=>zo(null,[N],function*([G,re]){re&&G&&F&&(yield yt(),Yl({immediate:!0}))}),{flush:"post"}),Ke(Pe,N=>{N&&(function(){var G;if(dt.value&&Mt.value&&Ft.value&&((G=Ut.value)!=null&&G[1]))return;const re=It({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ce=It({type:"list_item",children:[re],raw:"- Probe paragraph text"}),we=It({type:"list",ordered:!1,items:[ce],raw:"- Probe paragraph text"});dt.value=re,Mt.value=ce,Ft.value=we;const ze={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)ze[De]=It({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});Ut.value=ze})()},{immediate:!0}),Ke([()=>M.value,Pe],()=>{if(!Pe.value)return k6(),void(J.value=0);ty(),k6(),Pe.value&&M.value&&typeof ResizeObserver<"u"&&(Yu=new ResizeObserver(()=>{ty(),Ht.value&&_l(),Ne.value&&uc(),$o("resize")}),Yu.observe(M.value))},{immediate:!0}),Ke([Pe,So,tl],()=>zo(null,null,function*(){if(!Pe.value)return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();yield yt(),(function(){if(!Pe.value||typeof window>"u")return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();const N={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},G=ey(w6(R.value),".paragraph-node");N.paragraph=vm(R.value,G,"pre-wrap");const re=w6(O.value),ce=re?.querySelector(".paragraph-node");N.listItem=vm(O.value,ce,"pre-wrap");const we=Qt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,Ue;return(Ue=(De=U.value)==null?void 0:De.offsetHeight)!=null?Ue:0}),ze=Qt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,Ue;return(Ue=(De=O.value)==null?void 0:De.offsetHeight)!=null?Ue:0});N.listWrapperOverhead=Math.max(0,we-ze);for(let De=1;De<=6;De++){const Ue=ey(w6(Z[De]),`h${De}`);N.headings[De]=vm(Z[De],Ue,"pre-wrap")}se.value=N,Vt()})()}),{flush:"post",immediate:!0}),Ke(()=>Rt.value.length,()=>{pn.value&&Yl({immediate:!0})}),Ke([Pe,J],()=>{Vt(),pn.value&&Yl({immediate:!0}),Ht.value&&_l(),Ne.value&&uc(),$o("resize")},{immediate:!1}),Ke(()=>xl.value,N=>{if(N)for(const[G,re]of no)qf(G,re);else if(v6(),pn.value)Yl({immediate:!0});else for(const[G,re]of no)re&&La(G,!0)},{immediate:!1}),Ke([Ye,at,()=>X()],()=>{var N;(N=Zs.refresh)==null||N.call(Zs);for(const[G,re]of no)qf(G,re)},{immediate:!1}),Ke([()=>C.viewportPriority,()=>Rt.value.length,at],([N,G,re])=>{if(N!==!1){if(q.value&&(G<=200||G<=re)){q.value=!1;for(const[ce,we]of no)qf(ce,we)}}else q.value=!1}),Ke(()=>Ae.value,()=>{pn.value&&Yl({immediate:!0})}),Ke([Zl,Po,Xn,()=>Rt.value.length,pn],()=>{Dr()},{immediate:!0});let rd=null,ad=!1,hc=null;function cd(){rd=null,T6=null,A6=void 0,rc=null,id()}function X6(){pc(),j1(),Vt(),Wo.clear();const N=Rt.value.length;N>0&&Re(N),O6()}function J6(){K6(),X9(),nd=null,Z1=null,K1=null,Df=null,Qu=null,ed=null,ad=!1,cd(),uy("restore"),rs(),cc()}function ud(N){var G;return[(G=ws())!=null?G:"",Fo(),Vr(),jf.value,sd(N),Rt.value.length,Math.round(on(0,Rt.value.length)),Math.round(W1()),ts.count,Math.round(ts.total)].join(":")}function Ty(){return zo(this,null,function*(){var N,G,re,ce;const we=(N=o.virtualScroll)==null?void 0:N.settledToken,ze=sd(we),De=Fo(),Ue=ws(),ut=tl.value;if(Xe.value&&((G=o.virtualScroll)==null?void 0:G.settleMode)==="manual"&&Of(we))if(E6()){if(ud(we)!==rc&&!ad){ad=!0;try{const Ze=yield D6({reason:"manual",expectedSettledTokenKey:ze}),tt=sd()===ze;H6(De,Ue,ut)&&Ze.sessionKey===De&&Ze.threadKey===Ue&&tt&&Ze.stable&&Ze.phase==="final"&&(rc=ud((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{ad=!1,yield yt();const Ze=(ce=o.virtualScroll)==null?void 0:ce.settledToken,tt=Of(Ze)?ud(Ze):"";H6(De,Ue,ut)&&tt&&rc!==tt&&Ty()}}}else $o("manual")})}Ke(Xe,(N,G)=>{if(N!==G){if(!N)return J6(),void K6();J6(),X6(),hc=tl.value,$o("content")}},{flush:"post"}),Ke([Xe,tl],([N,G])=>{N?hc!=null?hc!==G&&(hc=G,(function(re="resize"){pc(),j1(),Vt(),Wo.clear();const ce=Rt.value.length;ce>0&&Re(ce),O6(),Z1=null,K1=null,Df=null,nd=null,ad=!1,cd(),ky(),yt(()=>{Wr(),Ht.value&&_l(),Ne.value&&uc(),$o(re)})})("resize")):hc=G:hc=null},{flush:"post",immediate:!0}),Ke([Xe,()=>Fo(),()=>ws()],([N])=>{N&&(J6(),X6(),uy("content"),$o("content"))}),Ke([Xe,()=>Fo(),()=>ws(),tl,()=>Rt.value.length],([N])=>{N&&(function(G="async-node"){let re=!1;for(const[ce,we]of Array.from(Yt.entries()))C6(we)||(Yt.delete(ce),yn.delete(ce),re=!0);re&&(ic(),$o(G))})("async-node")},{flush:"post"}),Ke([Xe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.sessionKey},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey},()=>o.indexKey,()=>ee.value],([N])=>{N&&(id(),(function(G="content"){if(!Xe.value)return;const re=[],ce=Rt.value.length,we=y6(ce);for(const ze of Array.from(Wo.keys())){if(ze>=ce){re.push(ze);continue}if(ze=ce&&Wo.delete(ze);re.length&&((function(ze,De={}){const Ue=Array.from(ze,Number);Or(Ue);let ut=0;if(Hr(()=>(ut=Le(Ue,De),ut>0)),ut>0)(function(Ze){for(const tt of Ze)Wo.delete(tt)})(Ue);else for(const Ze of Ue)vs.delete(Ze)})(re,{notify:!1}),Vt(),cd(),Ht.value&&_l(),Ne.value&&uc(),$o(G))})("content"))},{flush:"post",immediate:!0}),Ke([Xe,()=>Rt.value.length,()=>Fo(),()=>ws()],([N,G,re,ce],[we,ze,De,Ue])=>{N&&we&&re===De&&ce===Ue&&G!==ze&&cd()},{flush:"post"}),Ke([Xe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.heightCache},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.heightCacheWidth},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreState},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey},()=>Rt.value.length,()=>Fo(),J],()=>{ky()},{flush:"post",immediate:!0}),Ke([Xe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreState},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreAnchor},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey},()=>Rt.value.length,()=>Fo(),J],N=>zo(null,[N],function*([G,re]){if(!G||!re)return;yield yt();const ce=(function(){var we;const ze=(we=o.virtualScroll)==null?void 0:we.restoreAnchor;return ze==null||ze===!1?null:ze===!0?"true":String(ze)})();j6(re,{restoreAnchor:ce!=null,restoreToken:ce??void 0})}),{flush:"post",immediate:!0}),Ke([Xe,J,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreState},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey}],([N])=>{var G;if(!N)return;const re=(G=o.virtualScroll)==null?void 0:G.restoreState;re&&Z1&&K1==="restore"&&(yy(re)||(X6(),Z1=null,K1=null,$o("resize")))},{flush:"post"}),Ke([Xe,()=>Rt.value.length,()=>Fo(),J],N=>zo(null,[N],function*([G]){var re;const ce=Qu,we=ed;G&&ce&&(yield yt(),!j6(ce,{restoreAnchor:we?.restoreAnchor===!0,restoreToken:(re=we?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:we?.allowUncapturedAnchor===!0})&&by(ce)||(Qu=null,ed=null))}),{flush:"post",immediate:!0}),Ke([Xe,Fe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.settleMode},()=>Fo(),()=>ws(),tl,vi,ft,()=>Ae.value,V1,()=>ts.count,()=>ts.total],([N,G,re])=>{if(!N||G!==!0||re==="manual"||!I6())return;const ce=(function(){var we;const ze=Rt.value.length;return[(we=ws())!=null?we:"",Fo(),Vr(),jf.value,ze,Math.round(on(0,ze)),Math.round(W1()),ts.count,Math.round(ts.total)].join(":")})();rd!==ce&&(rd=ce,D6({reason:"final"}).then(we=>{we.stable||rd!==ce||(rd=null)}))},{flush:"post",immediate:!0}),Ke([Xe,Fe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.settleMode},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.settledToken},()=>Fo(),()=>ws(),tl,vi,ft,()=>Ae.value,V1,()=>Rt.value.length,()=>ts.count,()=>ts.total],()=>{Ty()},{flush:"post",immediate:!0}),Ke([()=>Rt.value.length,pn,Po,Xn,()=>ys.start,()=>ys.end],([N,G,re,ce,we,ze])=>{he.value&&Hn("virtualization",{nodes:N,virtualization:G,maxLiveNodes:re,buffer:ce,focusIndex:Zl.value,scroll:G?(()=>{const De=Te.value||Se();return De?{reverse:je(De),scrollTop:Math.round(De.scrollTop),scrollTopAbs:Math.round(Math.abs(De.scrollTop)),scrollHeight:Math.round(De.scrollHeight),clientHeight:Math.round(De.clientHeight)}:null})():null,liveRange:{start:we,end:ze},rendered:Ae.value})}),Ke([()=>C.customId],([N],G,re)=>{if(!N||en)return;const ce=(function(we,ze){return we?(zs.controllers[we]=ze,()=>{zs.controllers[we]===ze&&delete zs.controllers[we]}):()=>{}})(N,{captureRestoreAnchor:X0,restoreAnchor:J0,getAnchorDrift:qu,getReport:_B});re(()=>{ce()})},{immediate:!0}),vo(()=>{(function(){if(Xe.value)try{Wr(),td();const N=q1("manual");xy(N)&&(j(N),nd=N,W6=od());const G=ac(N,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});G&&(H(G),G.anchor&&D(G.anchor),dc=ld(G))}catch{}})(),BB(),v6(),xn(),Ay();for(const N of mr.values())for(const G of N)Bf(G);mr.clear(),Bi.clear(),Wo.clear(),Y6(),pc(),k6(),rs(),cc(),K6(),Q9(),m6()});const RB=Yd("ViewportDeferredMermaidBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index11-BtnGHbJw.js"),__vite__mapDeps([9,7]))).default}catch(N){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',N),Di}}),loadingComponent:uS,delay:0}),uS),PB=Yd("ViewportDeferredInfographicBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index10-DRKt26_3.js"),[])).default}catch(N){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',N),Di}}),loadingComponent:cS,delay:0}),cS),FB=Yd("ViewportDeferredD2BlockNode",Rl(()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index8-Cir0nNuz.js"),[])).default}catch(N){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',N),Di}})),Di),Ey={text:is,paragraph:B0,heading:Zp,code_block:rm,list:hu,list_item:pu,blockquote:x4,table:_2,definition_list:S4,footnote:C4,footnote_reference:rl,footnote_anchor:k2,admonition:E4,vmr_container:A4,hardbreak:f1,link:Li,image:d1,thematic_break:M4,math_inline:fr,math_block:l$,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,inline_code:hi,html_inline:al,reference:Ti,html_block:b2},jB=B(()=>x6()),Iy=B(()=>Kx(C.codeBlockProps)),OB=B(()=>Kx(C.codeBlockProps,{omit:["langs"]})),Ly=B(()=>St(St({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,monacoOptions:C.codeBlockMonacoOptions,themes:C.themes,langs:h.value==="shiki"?C.langs:void 0,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ye.value=="boolean"?{showTooltips:ye.value}:{}),OB.value)),$y=B(()=>St(wn(St({},Ly.value),{langs:C.langs}),Iy.value));function Ny(N){return typeof N=="boolean"?N:void 0}const HB=B(()=>{const N=C.codeBlockProps||{},G={},re=Ny(N.showLineNumbers);re!==void 0&&(G.showLineNumbers=re);const ce=Ny(N.diffInline);ce!==void 0&&(G.diffInline=ce);const we=(function(ze){const De=Number(ze);return Number.isFinite(De)&&De>0?De:void 0})(N.reservedHeightPx);return we!==void 0&&(G.reservedHeightPx=we),G}),DB=B(()=>St(St({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,themes:C.themes,langs:C.langs,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ye.value=="boolean"?{showTooltips:ye.value}:{}),Iy.value)),VB=B(()=>St({},C.mermaidProps||{})),zy=B(()=>St({},C.d2Props||{})),WB=B(()=>St({},C.infographicProps||{})),dd=B(()=>({typewriter:f.value,fade:C.fade,customHtmlTags:Io.value.customHtmlTags})),qB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltip:ye.value}:{})),UB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{})),ZB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{})),KB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{}));function GB(N){return Array.isArray(N.children)&&N.children.length>0}const Zf=B(()=>bB.value.map(N=>{var G,re,ce,we,ze,De,Ue,ut;let Ze=(function(_t){var Ot,Kt,an,sn,un,Ln,On;if(_t.type!=="code_block")return _t;const wo=_t,Ys=[String((Ot=wo.language)!=null?Ot:""),String((Kt=wo.loading)!=null?Kt:""),String((an=wo.diff)!=null?an:""),String((sn=wo.code)!=null?sn:""),String((un=wo.originalCode)!=null?un:""),String((Ln=wo.updatedCode)!=null?Ln:""),String((On=wo.raw)!=null?On:"")].join("\0"),Ds=Ta.get(wo);if(Ds&&Ds.signature===Ys)return Ds.node;const Xl=St({},wo);return Ta.set(wo,{signature:Ys,node:Xl}),Xl})(N.node);const tt=Kf(Ze);let ct=Fy(Ze,tt);if((Ze.type==="html_block"||Ze.type==="html_inline")&&ct===Ey[Ze.type]){const _t=Ze,Ot=String((G=_t.tag)!=null?G:"").trim().toLowerCase()||NI(_t.content);if(Ot){const Kt=Un.value[Ot];if(hs.value.has(Ot)&&Kt)ct=Kt,Ze=wn(St({},_t),{type:Ot,tag:Ot,content:_ae(_t.content,Ot)});else if(zI((re=_t.content)!=null?re:_t.raw,Ot)){const an=String((we=(ce=_t.content)!=null?ce:_t.raw)!=null?we:"");Ze.type==="html_inline"?(ct=is,Ze={type:"text",content:an,raw:an}):(ct=B0,Ze={type:"paragraph",children:[{type:"text",content:an,raw:an}],raw:an})}}}const Ve=Ze.type==="code_block"&&h.value==="pre"&&ct===Di&&!Q6(Un.value,tt);let nt=St({},(function(_t,Ot,Kt){const an=Ot??Kf(_t);if(_t.type==="code_block"){const sn=an?Q6(Un.value,an):void 0;if(Kt&&h.value==="pre"&&!sn&&Kt===Di)return HB.value;if(Kt&&an&&Kt===sn)return an==="mermaid"?Ry(_t):an==="infographic"?Py(_t):an==="d2"||an==="d2lang"?zy.value:$y.value;if(Kt&&Kt===Un.value.code_block)return $y.value;if(oy(Kt))return DB.value}return an==="mermaid"?Ry(_t):an==="infographic"?Py(_t):an==="d2"||an==="d2lang"?zy.value:_t.type==="link"?qB.value:_t.type==="list"?UB.value:_t.type==="blockquote"?ZB.value:_t.type==="table"?KB.value:_t.type==="code_block"?Ly.value:dd.value})(Ze,tt,ct));const gt=Pe.value?sc.value[N.index]:null;Ze.type==="code_block"&>?.kind==="code-block"&&(nt=wn(St({},nt),Ve?{reservedHeightPx:(ze=gt.height)!=null?ze:gt.contentHeight}:{estimatedHeightPx:gt.height,estimatedContentHeightPx:gt.contentHeight,estimatedDiffInline:gt.diffInline})),Ve||Ze.type!=="code_block"||tt!=="mermaid"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(St({},nt),{estimatedPreviewHeightPx:L5(E5(String((De=Ze.code)!=null?De:"")))})),Ve||Ze.type!=="code_block"||tt!=="infographic"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(St({},nt),{estimatedPreviewHeightPx:$5(I5(String((Ue=Ze.code)!=null?Ue:"")))})),Ze.type==="math_block"&&(nt=wn(St({},nt),{cacheScope:Bo}));const mt=(function(_t,Ot){const Kt=String(_t.type);return!Af(Kt)&&Un.value[Kt]===Ot})(Ze,ct),Et=mt?Mv(Ze,ve.value):void 0;return wn(St({},N),{node:Ze,component:ct,bindings:nt,customBindings:St(St({},Et??{}),nt),rendersCustomNode:mt,hasSlotChildren:GB(Ze),slotContent:String((ut=Ze.content)!=null?ut:""),isCodeBlock:Ze.type==="code_block",indexKey:`${jB.value}-${N.index}`,vnodeKey:`${xB.value}\0${N.index}\0${Ze.type}`})}));function Kf(N){var G;return N?.type==="code_block"?String((G=N.language)!=null?G:"").trim().toLowerCase():""}function Q6(N,G){const re=G.trim().toLowerCase();if(re)for(const ce of[re,Wp(re),HL(re)]){const we=ce&&N[ce];if(we)return we}}function By(N,G,re,ce){var we,ze;const De=St({},N.value);return Kc(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=ce(re(String((we=G?.code)!=null?we:"")),void 0,De.maxHeight==="none"?null:(ze=Kc(De.maxHeight))!=null?ze:void 0)),De}function Ry(N){return By(VB,N,E5,L5)}function Py(N){return By(WB,N,I5,$5)}function Fy(N,G){if(!N)return g7;const re=Un.value,ce=re[String(N.type)];if(N.type==="code_block"){const we=G??Kf(N),ze=we?Q6(re,we):void 0;return ze||(h.value==="pre"?re.code_block||Di:we==="mermaid"?re.mermaid||RB:we==="infographic"?re.infographic||PB:we==="d2"||we==="d2lang"?re.d2||FB:ce||re.code_block||sy.value)}return ce||Ey[String(N.type)]||g7}function eh(N){s("click",N)}function YB(N){var G;(G=N.target)!=null&&G.closest("[data-node-index]")&&s("mouseover",N)}function XB(N){var G;(G=N.target)!=null&&G.closest("[data-node-index]")&&s("mouseout",N)}function jy(N){s("mouseover",N)}function Oy(N){s("mouseout",N)}const X1=V(null),Ri=V(!1),fd=V(null),JB=B(()=>!(C.domMode!=="minimal"||K.value||C.fade!==!1||f.value||Ri.value||mn.value||pn.value||We.value||Ro.value||vl.value||Object.keys(Un.value).length!==0));let pd,mc=null,th=0,Gf=0,Yf=0;const Hy=["code_block","admonition","table","math_block","html_block","image","thematic_break"],QB=new Set(Hy),Dy=[".typewriter-cursor",".height-estimation-probes",...Hy.map(N=>`[data-node-type="${N}"]`),"script","style"].join(",");function Vy(N){if(!N||typeof N!="object")return!1;const G=N.type;return typeof G=="string"&&QB.has(G)}function Xf(N){var G,re;if(!N||typeof N!="object")return 0;const ce=N,we=(re=(G=ce.raw)!=null?G:ce.content)!=null?re:ce.code;if(typeof we=="string")return we.length;const ze=ce.children;if(Array.isArray(ze))return ze.reduce((Ue,ut)=>Ue+Xf(ut),0);const De=ce.items;return Array.isArray(De)?De.reduce((Ue,ut)=>Ue+Xf(ut),0):0}function Jf(){pd&&(clearTimeout(pd),pd=void 0)}function nh(){th+=1,mc!=null&&(Lo?.(mc),mc=null)}function hd(){nh(),$a(),X1.value&&(X1.value.style.visibility="hidden")}function eR(N){var G;if(N.nodeType!==Node.TEXT_NODE||!((G=N.textContent)!=null?G:"").trim())return!1;const re=N.parentElement;return!!re&&!re.closest(Dy)}function tR(N){let G=N.lastChild;for(;G;){if(eR(G))return G;if(G.nodeType===Node.ELEMENT_NODE){const re=G;if(!re.matches(Dy)&&re.lastChild){G=re.lastChild;continue}}for(;G&&G!==N&&!G.previousSibling;)G=G.parentNode;if(!G||G===N)break;G=G.previousSibling}return null}function Wy(){const N=Zf.value;for(let G=N.length-1;G>=0;G--){const re=N[G];if(!re||Vy(re.node)||!Wf(re.index))continue;const ce=no.get(re.index);if(!ce)continue;const we=tR(ce);if(we)return we}return null}function $a(){fd.value&&(fd.value.classList.remove(dS),fd.value=null)}function Qf(){if(d.value!=="simple"||!F||!Ri.value||!M.value)return void $a();const N=Wy(),G=N?(function(re){var ce;const we=(ce=re.parentElement)==null?void 0:ce.closest(".text-node");return we instanceof HTMLElement?we:re.parentElement})(N):null;G!==fd.value&&($a(),G&&(G.classList.add(dS),fd.value=G))}function e3(){if(d.value!=="precise"||!F||!Ri.value||mc!=null)return;const N=th,G=()=>{mc=null,N===th&&(function(){var re,ce;if(d.value!=="precise"||!(F&&Ri.value&&M.value&&X1.value))return;const we=M.value,ze=X1.value;ze.style.visibility="hidden";const De=Wy();if(!De)return;let Ue=0,ut=0,Ze=20,tt=!1;if(De?.textContent){const ct=De.textContent.length,Ve=document.createRange();Ve.setStart(De,Math.max(0,ct-1)),Ve.setEnd(De,ct);const nt=typeof Ve.getClientRects=="function"?Ve.getClientRects():void 0,gt=(ce=nt?.[nt.length-1])!=null?ce:(re=De.parentElement)==null?void 0:re.getBoundingClientRect();if(gt){const mt=Qt("typewriterCursor.root.getBoundingClientRect",()=>we.getBoundingClientRect());Ue=gt.right-mt.left+we.scrollLeft,ut=gt.top-mt.top+we.scrollTop,Ze=gt.height||Ze,tt=!0}Ve.detach()}tt&&(ze.style.transform=`translate(${Math.max(0,Ue)}px, ${Math.max(0,ut)}px)`,ze.style.height=`${Ze}px`,ze.style.visibility="visible")})()};yo?mc=yo(G):G()}return Ke([ge,()=>o.content,()=>o.nodes,()=>C.typewriter,Fe],()=>zo(null,null,function*(){var N,G;if(!F||K.value||!de.value)return;if(Fe.value)return Ri.value=!1,Jf(),void hd();if((N=o.nodes)!=null&&N.length)return Ri.value=!1,Jf(),hd(),Gf=((G=o.content)!=null?G:"").length,void(Yf=ge.value.length);const re=(function(){var Ue,ut;return(Ue=o.nodes)!=null&&Ue.length?o.nodes.reduce((Ze,tt)=>Ze+Xf(tt),0):((ut=o.content)!=null?ut:"").length})(),ce=(function(){var Ue;return(Ue=o.nodes)!=null&&Ue.length?o.nodes.reduce((ut,Ze)=>ut+Xf(Ze),0):ge.value.length})(),we=!Vy(Rt.value[Rt.value.length-1]),ze=re>Gf,De=ce>Yf;if(!f.value||!we||!ze&&!De)return f.value&&we||(Ri.value=!1,hd()),Gf=re,void(Yf=ce);Gf=re,Yf=ce,Ri.value=!0,d.value==="precise"&&X1.value&&(X1.value.style.visibility="hidden"),Jf(),yield yt(),d.value==="simple"?Qf():($a(),e3()),pd=setTimeout(()=>{pd=void 0,Ri.value=!1},3e3)}),{flush:"post",immediate:!0}),Ke(Ri,N=>zo(null,null,function*(){N?(yield yt(),d.value!=="simple"?($a(),d.value==="precise"&&e3()):Qf()):hd()}),{flush:"post"}),Ke(d,()=>zo(null,null,function*(){if(F&&!K.value&&de.value&&Ri.value){if(yield yt(),d.value==="simple")return nh(),void Qf();$a(),d.value!=="precise"?hd():e3()}}),{flush:"post"}),Ke([()=>Ae.value,()=>ys.start,()=>ys.end],()=>zo(null,null,function*(){F&&!K.value&&de.value&&Ri.value&&(yield yt(),d.value!=="simple"?($a(),d.value==="precise"&&e3()):Qf())}),{flush:"post"}),vo(()=>{Jf(),nh(),$a(),Zn.clear()}),(N,G)=>{const re=yg("NodeRenderer",!0);return v(K)?(g(!0),S(Ce,{key:0},rt(Zf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onClick:eh,onMouseover:jy,onMouseout:Oy,onCopy:G[0]||(G[0]=we=>i(we)),onHandleArtifactClick:G[1]||(G[1]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onClick:eh,onMouseover:jy,onMouseout:Oy,onCopy:G[2]||(G[2]=we=>i(we)),onHandleArtifactClick:G[3]||(G[3]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(g(),S("div",{key:1,ref_key:"containerRef",ref:M,class:Be(["markstream-vue markdown-renderer",[{dark:C.isDark},{virtualized:pn.value},{"virtual-scroll-coordinated":qe.value},{"stable-layout":Sl.value},{"typewriter-simple-cursor":Ri.value&&d.value==="simple"}]]),"data-custom-id":C.customId,onClick:eh,onMouseover:YB,onMouseout:XB},[bt.value||pn.value?(g(),S(Ce,{key:0},[bt.value?(g(),ue(g4e,{key:0,width:So.value,"flow-root":pn.value||qe.value,"paragraph-node":dt.value,"list-item-node":Mt.value,"list-node":Ft.value,"heading-nodes":Ut.value,"set-paragraph-wrapper":mB,"set-list-item-wrapper":gB,"set-list-wrapper":vB,"set-heading-wrapper":kB},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):Y("",!0),pn.value?(g(),S("div",{key:1,class:"node-spacer",style:Gt({height:`${b6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],64)):Y("",!0),JB.value?(g(!0),S(Ce,{key:1},rt(Zf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[Wf(ce.index)?(g(),ue(cs(ce.component),io({key:0,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onMouseover:G[4]||(G[4]=we=>s("mouseover",we)),onMouseout:G[5]||(G[5]=we=>s("mouseout",we)),onCopy:G[6]||(G[6]=we=>i(we)),onHandleArtifactClick:G[7]||(G[7]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"])):Y("",!0)],64))),128)):(g(!0),S(Ce,{key:2},rt(Zf.value,ce=>(g(),S("div",{key:ce.vnodeKey,ref_for:!0,ref:we=>qf(ce.index,we),class:"node-slot","data-node-index":ce.index,"data-node-type":ce.node.type},[Wf(ce.index)?(g(),S("div",{key:0,ref_for:!0,ref:we=>(function(ze,De){var Ue;De||(function(ct){const Ve=`${x6()}-${ct}`;let nt=!1;for(const gt of Array.from(yn.keys())){const mt=Yt.get(gt);(mt?.index===ct||gt===Ve||gt.startsWith(`${Ve}-`))&&(yn.delete(gt),Yt.delete(gt),nt=!0)}nt&&(ic(),$o("async-node"))})(ze),Kl.delete(ze),(function(ct){var Ve;const nt=((Ve=Bi.get(ct))!=null?Ve:0)+1;Bi.set(ct,nt)})(ze);const ut=mr.get(ze);if(ut){for(const ct of ut)Bf(ct);mr.delete(ze)}if((function(ct){const Ve=Vo.get(ct);Ve&&(Os?.unobserve(Ve),Qi.delete(Ve),Vo.delete(ct))})(ze),!De||!Us.value)return Cl.delete(ze),void Bi.delete(ze);Cl.set(ze,De);const Ze=()=>{Uf(ze,De)};queueMicrotask(Ze);const tt=(Os||typeof ResizeObserver>"u"||(Os=new ResizeObserver(ct=>{if(ct.length)for(const Ve of ct){const nt=Qi.get(Ve.target),gt=Vo.get(nt??-1);nt!=null&>&&Uf(nt,gt)}else Wr()})),Os);if(tt&&(Vo.set(ze,De),Qi.set(De,ze),tt.observe(De)),typeof window<"u"){const ct=((Ue=Rt.value[ze])==null?void 0:Ue.type)==="code_block"?[16,80,240,800]:Fe.value?[80]:[];if(ct.length){const Ve=ct.map(nt=>Gu(nt,Ze,"node-resize")).filter(nt=>nt!=null);Ve.length&&mr.set(ze,Ve)}}})(ce.index,we),class:"node-content"},[ce.isCodeBlock?ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:1,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[12]||(G[12]=we=>i(we)),onHandleArtifactClick:G[13]||(G[13]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:2,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[14]||(G[14]=we=>i(we)),onHandleArtifactClick:G[15]||(G[15]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(qi,{key:0,name:"fade",css:C.fade!==!1,appear:C.fade!==!1},{default:ae(()=>[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[8]||(G[8]=we=>i(we)),onHandleArtifactClick:G[9]||(G[9]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[10]||(G[10]=we=>i(we)),onHandleArtifactClick:G[11]||(G[11]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(g(),S("div",{key:1,class:"node-placeholder",style:Gt({height:`${Wt(ce.index)}px`})},null,4))],8,w4e))),128)),Ri.value&&d.value==="precise"?(g(),S("span",{key:3,ref_key:"typewriterCursorRef",ref:X1,class:"typewriter-cursor","aria-hidden":"true"},null,512)):Y("",!0),pn.value?(g(),S("div",{key:4,class:"node-spacer",style:Gt({height:`${_6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],42,y4e))}}})),[["__scopeId","data-v-a9489508"]]),Xi=k$;Xi.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Xi.__name,Xi.name].filter(n=>!!n));for(const n of t)e.component(n,k$)};const Ov=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"})),k4e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},b4e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},_4e={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},x4e={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},S4e={class:"admonition-title"},C4e=["aria-expanded","aria-controls"],M4e=["id"],E4=ho(Je({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=B(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const c=o.node.kind||"note";return c.charAt(0).toUpperCase()+c.slice(1)}),l=V(!!o.node.collapsible&&!((n=o.node.open)==null||n));function r(){o.node.collapsible&&(l.value=!l.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(c,u)=>(g(),S("div",{class:Be(["admonition",[`admonition-${o.node.kind}`]])},[b("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(g(),S("svg",k4e,[...u[1]||(u[1]=[b("circle",{cx:"12",cy:"12",r:"10"},null,-1),b("path",{d:"M12 16v-4"},null,-1),b("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(g(),S("svg",b4e,[...u[2]||(u[2]=[b("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),b("path",{d:"M9 18h6"},null,-1),b("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(g(),S("svg",_4e,[...u[3]||(u[3]=[b("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),b("path",{d:"M12 9v4"},null,-1),b("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(g(),S("svg",x4e,[...u[4]||(u[4]=[b("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),b("path",{d:"M12 8v4"},null,-1),b("path",{d:"M12 16h.01"},null,-1)])])):Y("",!0),b("span",S4e,I(i.value),1),o.node.collapsible?(g(),S("button",{key:4,class:"admonition-toggle","aria-expanded":!l.value,"aria-controls":`${a}-content`,onClick:r},[(g(),S("svg",{style:Gt({rotate:l.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...u[5]||(u[5]=[b("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,C4e)):Y("",!0)]),Jn(b("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[W(v(Xi),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:u[0]||(u[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,M4e),[[_i,!l.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);E4.install=e=>{e.component(E4.__name,E4)};const b7=()=>Cs(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let H3=null,D3=b7,V3=null,fS=!1,pS=!1;function LKe(){return zo(this,null,function*(){if(H3)return H3;const e=D3;return e?e===b7&&fS?null:V3||(V3=zo(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===b7)return e===D3&&(fS=!0,(function(o){pS||(pS=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===D3&&(V3=null)}return e!==D3?null:t?(H3=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),H3):null}),V3):null})}let W3=null,b$=null,q3=null;function $Ke(){return typeof b$=="function"}function NKe(){return zo(this,null,function*(){if(W3)return W3;const e=b$;return e?q3||(q3=zo(null,null,function*(){const t=yield e(),n=(function(o){var s,i,l;if(!o)return null;const r=(s=o.default)!=null?s:o,a=typeof r=="function"&&typeof((i=r.prototype)==null?void 0:i.render)=="function"?r:(l=o.Infographic)!=null?l:r?.Infographic;return typeof a=="function"?a:null})(t);return n?(W3=n,W3):null}).finally(()=>{q3=null}),q3):null})}const zKe=Symbol("markstreamLanguageIconResolver"),_$=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],A4e=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),_7=[..._$].toSorted((e,t)=>t.length-e.length).join("|"),ym=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${_7}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${_7})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(""),"gi"),x$=/[),.;!?]+$/;function T4e(e){const t=e.toLowerCase();return _$.some(n=>t.endsWith(`.${n}`))}function E4e(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${_7}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function I4e(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(x$,"");if(!s)return null;const i=s.split("/").pop()??s,l=s.includes("/"),r=A4e.has(i),a=T4e(i);if(l&&!r&&!a)return null;if(!l&&!r){const d=t.aliases?.get(i);if(!d)return null;s=d}const c=o[2]??o[3],u=c?Number(c):void 0;return{path:s,line:u!==void 0&&Number.isFinite(u)&&u>0?u:void 0}}function L4e(e,t={}){const n=[];ym.lastIndex=0;let o;for(;(o=ym.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",l=s.indexOf(i);if(l<0)continue;const r=o[2]??o[3];let a=i+(r?s.slice(l+i.length):"");const c=a.replace(x$,""),u=a.length-c.length;a=c;const d=I4e(a,t);if(!d)continue;const f=o.index+l,p=f+a.length;n.push({...d,start:f,end:p,text:a}),u>0&&(ym.lastIndex-=u)}return n}const $4e=12e4,N4e=6e4,z4e=32,B4e=3e4,hS=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function R4e(e){let t=0,n=0,o=0;hS.lastIndex=0;let s;for(;(s=hS.exec(e))!==null;){const l=s[3]??"";t+=1,n+=l.length,o=Math.max(o,l.length)}return{codeRenderer:e.length>=$4e||n>=N4e||t>=z4e||o>=B4e?"pre":"shiki",codeFenceCount:t,codeChars:n}}function U3(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o--)n++;return n%2===1}const P4e=/\s/,F4e=/\p{Nd}/u;function p1(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function j4e(e,t){if(t<=0)return;const n=e.codePointAt(t-1),o=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function mS(e){return e!==void 0&&P4e.test(e)}function Au(e){return e!==void 0&&F4e.test(e)}function H5(e){return e!==void 0&&e>="A"&&e<="Z"}const S$=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function O4e(e,t){if(!H5(e[t-1]))return!1;let n=t-1;for(;n>0&&H5(e[n-1]);)n--;return S$.test(e.slice(n,t))||Au(p1(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(p1(e,t+1)??"")}function H4e(e,t){if(!H5(e[t-1]))return!1;let n=t-1;for(;n>0&&H5(e[n-1]);)n--;return S$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}function D4e(e,t){const n=e[t+1];return Au(p1(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−")&&Au(p1(e,t+2))}const V4e=/^[-–—,;:~([/]$/;function W4e(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Au(p1(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&V4e.test(o)}const wm=String.raw`[,;:~\-–—/\s()=*×]|and|or`;function q4e(e){let t=e.replace(new RegExp(String.raw`^(?:${wm})+`,"u"),"");for(;;){const o=t.replace(new RegExp(String.raw`^\p{L}+(?:${wm})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(o===t)break;t=o}if(!/\p{Nd}/u.test(t))return!1;const n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${wm})+${n}(?:\p{L}+)?)*$`,"u").test(t)}const gS=1,vS=2,yS=3,kr=-1;function U4e(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(kr),s=new Int32Array(t+1),i=new Int32Array(t+1),l=[],r=[];{const M=[];for(let Z=0;Z`*—–“”‘’'),c=[];for(const M of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))c.push(M.index);for(const M of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))c.push(M.index);for(const M of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(M.index===0||!/[\w~/.-]/.test(e[M.index-1]??""))&&c.push(M.index);c.sort((M,R)=>M-R);let u=-1;for(const M of c){if(MM+7&&!/[\w/?#@~.+&=%-]/.test(e[R+1]??""))break}}l.push([M,R]),u=R}const d=[];for(let M=0;M]/.test(q))continue;let te=kr,ee=kr;for(;O"){ee=O;break}if(!U&&J==="/"&&e[O+1]===">"){ee=O+1;break}if(!/\s/.test(J)){te=O;break}for(;O"){ee=O;break}if(U){te=O;break}if(se==="/"&&e[O+1]===">"){ee=O+1;break}const Q=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(O));if(!Q){te=O;break}O+=Q[0].length;let me=O;for(;me`]+/.exec(e.slice(me));if(!Ye){te=me;break}O=me+Ye[0].length}}}if(ee!==kr)d.push([M,ee+1]),M=ee;else if(te!==kr){const J=e.indexOf("<",M+1);M=(J!==-1&&J",M+2);te===-1?f=!1:(d.push([M,te+2]),M=te+1,O=!0)}else if(R==="!"){if(e[M+2]==="-"&&e[M+3]==="-"){if(p){const te=e.indexOf("-->",M+4);te===-1?p=!1:(d.push([M,te+3]),M=te+2,O=!0)}}else if(e.startsWith("[CDATA[",M+2)){if(h){const te=e.indexOf("]]>",M+9);te===-1?h=!1:(d.push([M,te+3]),M=te+2,O=!0)}}else if(m&&/[A-Z]/.test(e[M+2]??"")){const te=e.indexOf(">",M+3);te===-1?m=!1:(d.push([M,te+1]),M=te,O=!0)}}if(O)continue;if(R!==void 0&&/[a-zA-Z]/.test(R)){const te=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(M+1));if(te){let ee=M+1+te[0].length;for(;ee"&&e[ee]!=="<"&&!/\s/.test(e[ee]);)ee++;if(e[ee]===">"){d.push([M,ee+1]),M=ee;continue}}}if(R===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(R))continue;let U=M+1;for(;U"&&(d.push([M,U+1]),M=U)}}d.sort((M,R)=>M[0]-R[0]);const k=[];for(const M of d){const R=k.at(-1);R&&M[0]<=R[1]?R[1]=Math.max(R[1],M[1]):k.push([M[0],M[1]])}l.push(...k);const x=M=>{let R=0;for(;R=(r[R]?.[1]??0);)R++;const O=r[R];return O!==void 0&&M>=O[0]},y=M=>{let R=0;for(;R=(k[R]?.[1]??0);)R++;const O=k[R];return O!==void 0&&M>=O[0]},w=[];let _=null,A=0,P=!1;for(let M=0;M"&&(P=!1);continue}if(!(x(M)||y(M))){if(_!==null){e[M]===_&&(_=null);continue}if(w.length>0&&(e[M]==='"'||e[M]==="'")&&M>0&&/\s/.test(e[M-1]??""))_=e[M];else if(e[M]==="[")A++;else if(e[M]==="]")A>0&&e[M+1]==="("&&(w.push(M),P=e[M+2]==="<",M++),A=Math.max(0,A-1);else if(e[M]==="("&&w.length>0)w.push(-1);else if(e[M]===")"&&w.length>0){const R=w.pop();if(R!==void 0&&R>=0){const O=e.slice(R+2,M);(/\s/.exec(O)===null||O.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(O)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(O))&&l.push([R,M+1])}}}}l.sort((M,R)=>M[0]-R[0]);const z=[];for(const M of l){const R=z.at(-1);R&&M[0]<=R[1]?R[1]=Math.max(R[1],M[1]):z.push([M[0],M[1]])}const L=M=>{let R=0,O=z.length-1;for(;R<=O;){const U=R+O>>1,Z=z[U];if(Z===void 0)return!1;if(M=Z[1])R=U+1;else return!0}return!1},E=new Uint8Array(t);{let M=-1,R=!1,O=!1,U=0;for(let Z=0;Z<=t;Z++){const q=Z0&&(te==="{"?U++:te==="}"&&U--)}}for(let M=0;M=0;M--)n[M]===yS&&(T=M),o[M]=T;const $=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,C=/[^\p{L}\p{Nd}\s]$/u,j=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,D=(M,R)=>{const O=p1(e,M+1);if(O===void 0||!$.test(O))return!1;const U=o[M+1]??kr;if(U!==kr){const Z=e.slice(M+1,U);return!(U-(M+1)===((e.codePointAt(M+1)??0)>65535?2:1))&&j.test(Z)||/[,;:!?]$/.test(Z)||/^[a-z]{2,}$/.test(Z)?!1:(s[U]??0)-(s[M+1]??0)===0&&(i[U]??0)-(i[M+1]??0)===0}return C.test(R)||j.test(R)||H.test(R)};return(M,R=-1)=>{if(e[M]!=="$"||n[M]===gS||e[M+1]==="$"||e[M-1]==="$"&&R!==M||O4e(e,M)||M+1>=t||mS(p1(e,M+1)))return null;const O=o[M+1]??kr;if(O===kr||(s[O]??0)-(s[M+1]??0)>0||(i[O]??0)-(i[M+1]??0)>0)return null;const U=e.slice(M+1,O);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(U)||e[O+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(U)||Au(j4e(e,M))&&q4e(U)||D4e(e,M)&&(D(O,U)||H4e(e,O)||/\s/.test(U)&&/\p{Nd}$/u.test(U)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(U)||!1)||e[O+1]==="$"&&!/\p{L}/u.test(U)&&C.test(U)?null:{content:U,end:O+1}}}const Z4e=/^---[ \t]*(?:\r\n|\n)/,K4e=/^---[ \t]*$/;function G4e(e){const t=Z4e.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const o=n;for(;n<=e.length;){let s=e.indexOf(` +`,n);s===-1&&(s=e.length);let i=e.slice(n,s);if(i.endsWith("\r")&&(i=i.slice(0,-1)),K4e.test(i)){const l=e.slice(o,n);if(l==="")return{frontmatter:null,body:e};const r=s\n]*>|[^()\s]+)\)/g,Y4e=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,X4e=/^[a-zA-Z]:(?:[\\/]|%5c)/i,J4e=/^[A-Za-z0-9._~-]$/,D5="pythinker-code://skill/";let kS;function bS(e){return e.replaceAll("%","%25").replaceAll("&","%26").replaceAll("<","%3C").replaceAll(">","%3E").replaceAll(/[[\]\\]/g,"\\$&").replaceAll(` +`,"%0A").replaceAll("\r","%0D")}function Q4e(e){return e.replaceAll(/\\([\\[\]])/g,"$1").replaceAll("%26","&").replaceAll("%3C","<").replaceAll("%3E",">").replaceAll("%0A",` +`).replaceAll("%0D","\r").replaceAll("%25","%")}function C$(e){let t="";for(const n of e){const o=n.codePointAt(0);o>127||J4e.test(n)?t+=n:t+=`%${o.toString(16).toUpperCase().padStart(2,"0")}`}return t}function e5e(e){const t=e.split("/").map(C$).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function M$(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function _S(e){const t=M$(e);try{return decodeURIComponent(t)}catch{return t}}function t5e(e){const t=M$(e);return!t||t.startsWith("#")||t.startsWith("?")||t.startsWith("//")?null:t.startsWith(D5)&&t.length>D5.length?"skill":Y4e.test(t)&&!X4e.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?"folder":"file"}function km(e,t){if(!t)return;const n=e.at(-1);n?.type==="text"?n.value+=t:e.push({type:"text",value:t})}function Hv(e){if(e.kind==="skill")return`[${bS(e.name)}](${D5}${C$(e.name)})`;const t=e.kind==="folder"&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${bS(e.name)}](${e5e(t)})`}function A$(e){const t=[];let n=0;wS.lastIndex=0;for(const o of e.matchAll(wS)){const s=o.index;km(t,e.slice(n,s));const i=o[0],l=o[1],r=o[2],a=e[s-1]==="!"?null:t5e(r);if(a&&l){const c=a==="skill"?_S(r).slice(D5.length):void 0;t.push({type:"mention",attrs:{kind:a,name:c??Q4e(l),path:a==="skill"?"":_S(r)}})}else km(t,i);n=s+i.length}return km(t,e.slice(n)),t}function T$(e){const t=A$(e.args??"").filter(o=>o.type==="mention"&&o.attrs.kind==="skill"),n=t[0];return t.length===1&&n?.type==="mention"&&n.attrs.name===e.name}function E$(e,t){if(T$(e))return t.revivePill?e.args??"":null;if(e.name.includes(" "))return null;const n=e.args??"";return`/skill:${e.name}${n.length>0?` ${n}`:""}`}function n5e(e,t){return E$(e,t)!==null}function o5e(e){if(T$(e))return e.args??"";const t=Hv({kind:"skill",name:e.name,path:""});return e.args?`${t} ${e.args}`:t}function xS(e){return kS??=new Intl.Segmenter("und",{granularity:"grapheme"}),Array.from(kS.segment(e),({segment:t})=>t)}function I$(e){const t=xS(e);if(t.length<=32)return e;const n=e.lastIndexOf("."),s=(n>=0?xS(e.slice(n)).length:0)+4,i=31-s;return i<8?`${t.slice(0,31).join("")}…`:`${t.slice(0,i).join("")}…${t.slice(-s).join("")}`}function s5e(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function i5e(e){return new Worker("/assets/mermaidParser.worker-DimdFOud.js",{type:"module",name:e?.name})}const l5e={key:0,class:"md-frontmatter"},r5e={class:"diff-bar"},a5e=["aria-label","onClick"],c5e={class:"diff-pre"},u5e={key:0,class:"diff-sign"},d5e={class:"diff-text"},f5e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Z3="pythinker-code://skill/",SS="md-table-wide",CS="md-table-toggle",MS="md-table-fade",AS="md-table-toggle--show",p5e="md-table-at-end",h5e=26,TS="md-code-wrap",bm="md-code-wrap-toggle",_m="md-code-nums",ES="md-code-nums-toggle",IS="data-md-code-css",m5e=` [data-line], [data-no-newline] { padding-inline: var(--space-3); } pre::selection, pre ::selection { background: var(--color-code-selection); @@ -899,53 +813,53 @@ pre[data-md-nums="on"] [data-line]::before { color: var(--color-text-faint); user-select: none; } -`,ES="github-light",IS="github-dark",Y4e=Je({__name:"Markdown",props:{text:{},openFile:{},skills:{},streaming:{type:Boolean,default:!1}},setup(e){Bde(),Kde(),Pde(),Xde(),Rde(new F4e),Yde(new j4e);const t=new WeakMap;function n(ze,Ge){if(ze.src[ze.pos]!=="$")return!1;let ot=t.get(ze);(!ot||ot.src!==ze.src)&&(ot={src:ze.src,match:M4e(ze.src),lastEnd:-1},t.set(ze,ot));const dt=ot.match(ze.pos,ot.lastEnd);if(!dt||dt.end>ze.posMax)return!1;if(ot.lastEnd=dt.end,Ge)return ze.pos=dt.end,!0;const Ct=ze.push("math_inline","math",0);return Ct.content=dt.content,Ct.markup="$",Ct.raw=ze.src.slice(ze.pos,dt.end),Ct.loading=!1,ze.pos=dt.end,!0}function o(ze){return ze.set({typographer:!1}),ze.inline.ruler.disable("math"),ze.inline.ruler.before("escape","math",n),ze}const{t:s,locale:i}=Lt(),l=fn("resolveImage"),r=V(null),a=e,c=z(()=>!a.streaming),u=z(()=>E4e(a.text??"")),d=z(()=>u.value.body),f=z(()=>c4e(d.value)),p=z(()=>a.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:g4e(d.value)),h=Tp(),m=z(()=>!a.streaming),k=ds(new Map),x=new Set,y=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,w=/(]*?\bsrc=")([^"]+)(")/gi;function _(ze){return!/^(https?:|data:|blob:)/i.test(ze)}function M(ze){if(!l)return;const Ge=[];for(const ot of[y,w]){ot.lastIndex=0;let dt;for(;(dt=ot.exec(ze))!==null;)Ge.push(dt[2]??"")}for(const ot of Ge)!ot||!_(ot)||k.has(ot)||x.has(ot)||(x.add(ot),l(ot).then(dt=>{k.set(ot,dt!==ot?dt:"")}).catch(()=>{k.set(ot,"")}).finally(()=>{x.delete(ot)}))}function P(ze){if(!l)return ze;const Ge=ot=>{if(!_(ot))return null;const dt=k.get(ot);return dt===void 0?U4e:dt===""?null:dt};return ze.replace(y,(ot,dt,Ct,Ft)=>{const Ut=Ge(Ct);return Ut===null?ot:`${dt}${Ut}${Ft}`}).replace(w,(ot,dt,Ct,Ft)=>{const Ut=Ge(Ct);return Ut===null?ot:`${dt}${Ut}${Ft}`})}Ze(()=>d.value,ze=>M(ze),{immediate:!0});function B(){if(!r.value||!a.openFile||a.streaming)return;const ze=document.createTreeWalker(r.value,NodeFilter.SHOW_TEXT),Ge=[];let ot=ze.nextNode();for(;ot;){const dt=ot,Ct=dt.parentElement;Ct&&!Ct.closest("a, pre, .md-file-link, svg")&&dt.data.trim().length>0&&Ge.push(dt),ot=ze.nextNode()}for(const dt of Ge){const Ct=d4e(dt.data,{aliases:f.value});if(Ct.length===0||!dt.parentNode)continue;const Ft=document.createDocumentFragment();let Ut=0;for(const en of Ct){en.start>Ut&&Ft.append(document.createTextNode(dt.data.slice(Ut,en.start)));const tn=document.createElement("button");tn.type="button",tn.className="md-file-link",tn.textContent=en.text,tn.title=en.line?`${en.path}:${en.line}`:en.path,tn.addEventListener("click",eo=>{eo.preventDefault(),eo.stopPropagation(),a.openFile?.({path:en.path,line:en.line})}),Ft.append(tn),Ut=en.end}Utq3.length?"skill":ze.startsWith("#")||ze.startsWith("?")||ze.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(ze)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(ze)?null:ze.endsWith("/")||ze.endsWith("\\")||/%5c$/i.test(ze)?"folder":"file":null}function N(ze){try{return decodeURIComponent(ze.slice(q3.length))}catch{return ze.slice(q3.length)}}function C(ze){return ze.replace(/%0A/g,` -`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function O(){if(!r.value||a.streaming)return;const ze=r.value.querySelectorAll("a[href]");for(const Ge of ze){if(Ge.dataset.mdLinkHandled==="true"||Ge.closest("svg")||Ge.querySelector("img"))continue;const ot=Ge.getAttribute("href")??"",dt=I(ot);if(dt===null)continue;Ge.dataset.mdLinkHandled="true",Ge.removeAttribute("title");const Ct=dt==="skill"?ot:$(ot),Ft=C(Ge.textContent??"");Ge.classList.add("mention-pill",`mention-${dt}`),Ge.dataset.mentionKind=dt,Ge.dataset.mentionName=dt==="skill"?N(ot):Ft,Ge.dataset.mentionPath=Ct,(dt==="skill"||a.openFile)&&Ge.removeAttribute("href"),(dt==="skill"||dt==="file"&&a.openFile)&&(Ge.tabIndex=0,Ge.setAttribute("role","button"));const Ut=AL(Ft),en=document.createElement("span");if(en.className="mention-pill-name",en.textContent=Ut,Ge.replaceChildren(en),!Ge.querySelector(".mention-pill-icon")){const tn=document.createElement("span");tn.className="mention-pill-icon",tn.setAttribute("aria-hidden","true"),tn.innerHTML=dt==="skill"?$l("sparkles","sm"):dt==="folder"?$l("folder","sm"):ju(Ct,Ft),Ge.prepend(tn)}Ge.addEventListener("click",tn=>{dt!=="skill"&&!a.openFile||(tn.preventDefault(),tn.stopPropagation(),dt==="file"&&a.openFile?.({path:T($(ot))}))}),dt==="file"&&a.openFile&&Ge.addEventListener("keydown",tn=>{tn.key!=="Enter"&&tn.key!==" "||(tn.preventDefault(),tn.stopPropagation(),a.openFile?.({path:T($(ot))}))}),ge(Ge)}}function H(ze){const Ge=ze.dataset.mentionKind??(ze.classList.contains("mention-skill")?"skill":ze.classList.contains("mention-folder")?"folder":"file"),ot=ze.dataset.mentionName??ze.querySelector(".mention-pill-name")?.textContent??"";return{kind:Ge,name:ot,path:ze.dataset.mentionPath??""}}function D(ze,Ge){let ot;return()=>{if(ot===void 0){const dt=getComputedStyle(document.documentElement).getPropertyValue(ze).trim(),Ct=parseFloat(dt);ot=Number.isFinite(Ct)?dt.endsWith("s")?Ct*1e3:Ct:Ge}return ot}}const A=D("--space-1-5",6),R=D("--p-mention-tip-vmargin",12),j=D("--duration-tooltip",150),q=D("--duration-fast",120),K=D("--duration-flash",1e3),U=V(null);let te=null,J=0,ee=0;function ie(ze){return U.value?.contains(ze)??!1}function Q(){let ze=U.value;return ze||(ze=document.createElement("div"),ze.className="mention-tip",ze.id="mention-tip",ze.setAttribute("role","tooltip"),ze.addEventListener("mouseenter",()=>window.clearTimeout(ee)),ze.addEventListener("mouseleave",()=>Z()),ze.addEventListener("focusin",()=>window.clearTimeout(ee)),ze.addEventListener("focusout",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&(ze.contains(ot)||te?.contains(ot))||se()}),document.body.append(ze),U.value=ze),ze}function he(){const ze=U.value,Ge=te;if(!ze||!Ge)return;const ot=Ge.getBoundingClientRect(),dt=A(),Ct=R();let Ft=ot.top-dt-ze.offsetHeight;FtGe.name===ze)}function Ye(ze){const Ge=document.createElement("div");Ge.className="mention-tip-path";const ot=document.createElement("div");ot.className="mention-tip-path-text";const dt=ze.split(/([/\\])/);let Ct=dt.length-1;for(;Ct>0&&(dt[Ct]===""||dt[Ct]==="/"||dt[Ct]==="\\");)Ct--;for(let en=0;en{en.preventDefault(),en.stopPropagation(),fs(ze).then(tn=>{tn&&(Ft.innerHTML=$l("check","sm"),window.setTimeout(()=>{Ft.innerHTML=Ut},K()))})}),Ge.append(Ft),Ge}function st(ze){const Ge=document.createElement("div");Ge.className="mention-tip-skill";const ot=document.createElement("div");ot.className="mention-tip-head";const dt=document.createElement("span");if(dt.className="mention-tip-name",dt.textContent=ze.name,ot.append(dt),ze.path&&a.openFile){const Ct=document.createElement("button");Ct.type="button",Ct.className="mention-tip-open",Ct.setAttribute("aria-label",s("mention.openSkill")),Ct.innerHTML=$l("external-link","sm");const Ft=ze.path;Ct.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),se(),a.openFile?.({path:Ft})}),ot.append(Ct)}if(Ge.append(ot),ze.description){const Ct=document.createElement("div");Ct.className="mention-tip-desc",Ct.textContent=ze.description,Ge.append(Ct)}return Ge}function X(ze){const Ge=Q();te?.removeAttribute("aria-describedby"),te=ze,ze.setAttribute("aria-describedby",Ge.id);const ot=H(ze);Ge.replaceChildren(ot.kind==="skill"?st(xe(ot.name)??{name:ot.name,description:""}):Ye(ot.path||ot.name)),Ge.classList.remove("positioned"),he(),Ge.classList.add("positioned"),Ge.removeAttribute("inert")}function se(){window.clearTimeout(J),window.clearTimeout(ee),te?.removeAttribute("aria-describedby"),te=null;const ze=U.value;ze?.classList.remove("positioned"),ze?.setAttribute("inert","")}function F(ze){window.clearTimeout(ee),window.clearTimeout(J);const Ge=U.value?.classList.contains("positioned")&&te===ze;J=window.setTimeout(()=>{ze.isConnected&&X(ze)},Ge?0:j())}function Z(){window.clearTimeout(J),window.clearTimeout(ee),ee=window.setTimeout(se,q())}function fe(ze){const Ge=U.value;if(!(!Ge||!Ge.classList.contains("positioned")||!te)){if(ze.key==="Escape"){ze.target instanceof Node&&Ge.contains(ze.target)&&te.focus(),se(),ze.preventDefault(),ze.stopImmediatePropagation();return}if(ze.key==="Tab"&&ze.target instanceof Node&&Ge.contains(ze.target)){const ot=Array.from(Ge.querySelectorAll("button")),dt=ot[0],Ct=ot[ot.length-1];(!ze.shiftKey&&ze.target===Ct||ze.shiftKey&&ze.target===dt)&&(ze.preventDefault(),te.focus(),se())}}}function ve(ze){const Ge=ze.target;Ge instanceof Node&&(ie(Ge)||te?.contains(Ge))||se()}function ge(ze){ze.addEventListener("mouseenter",()=>F(ze)),ze.addEventListener("mouseleave",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&ie(ot)||Z()}),ze.addEventListener("focus",()=>F(ze)),ze.addEventListener("blur",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&ie(ot)||Z()})}function oe(){se()}function de(ze){return ze.querySelector(`button.${xS}`)}function ke(ze){return ze.querySelector(`.${SS}`)}function Se(ze){const Ge=de(ze);if(!Ge)return;const ot=ze.querySelector("thead tr")??ze.querySelector("tr");if(!ot)return;const dt=ot.getBoundingClientRect(),Ct=ze.getBoundingClientRect().top,Ft=Math.max(2,Math.round(dt.top-Ct+(dt.height-K4e)/2));Ge.style.top=`${Ft}px`,Ge.style.right=`${Ft}px`}function me(ze){const Ge=ze.querySelector("table");return Ge!==null&&Ge.scrollWidth>ze.clientWidth+1}function Ae(ze){const Ge=`translateX(${ze.scrollLeft}px)`,ot=ke(ze);ot&&(ot.style.transform=Ge);const dt=de(ze);dt&&(dt.style.transform=Ge);const Ct=ze.scrollLeft+ze.clientWidth>=ze.scrollWidth-2;ze.classList.toggle(Z4e,Ct)}function le(ze){const Ge=de(ze);if(!Ge)return;const ot=me(ze),dt=ze.classList.contains(_S);Ge.classList.toggle(CS,ot||dt),ke(ze)?.classList.toggle(CS,ot),Se(ze),Ae(ze)}function be(ze){const Ge=de(ze);if(Ge)return Ge;if(!ze.closest(".a-msg .msg"))return null;const ot=document.createElement("div");ot.className=SS,ot.setAttribute("aria-hidden","true");const dt=document.createElement("button");return dt.type="button",dt.className=xS,dt.innerHTML=$l("expand","sm"),dt.setAttribute("aria-label",s("conversation.widenTable")),dt.title=s("conversation.widenTable"),dt.addEventListener("click",Ct=>{Ct.preventDefault(),Ct.stopPropagation(),_e(ze)}),ze.append(ot,dt),ze.addEventListener("scroll",()=>Ae(ze),{passive:!0}),le(ze),dt}function _e(ze){const Ge=ze.classList.toggle(_S),ot=de(ze);if(ot){ot.innerHTML=$l(Ge?"collapse":"expand","sm");const dt=s(Ge?"conversation.restoreTableWidth":"conversation.widenTable");ot.setAttribute("aria-label",dt),ot.title=dt}le(ze),ze.dispatchEvent(new CustomEvent("pythinker-table-layout",{bubbles:!0}))}function Ke(){if(!(!r.value||a.streaming))for(const ze of r.value.querySelectorAll(".table-node-wrapper"))be(ze)}function Qe(){if(!(!r.value||a.streaming))for(const ze of r.value.querySelectorAll(".table-node-wrapper"))le(ze)}function mt(ze){return`${Math.max(String(ze).length+1,4)}ch`}const Tt={stateClass:km,toggleClass:AS,iconOn:"list-numbers",iconOff:"list-numbers",labelOn:()=>s("conversation.hideLineNumbers"),labelOff:()=>s("conversation.showLineNumbers")},qt={stateClass:MS,toggleClass:wm,iconOn:"text-wrap-disabled",iconOff:"text-wrap",labelOn:()=>s("conversation.unwrapCode"),labelOff:()=>s("conversation.wrapCode")},nn=new WeakMap;function Jt(ze){const Ge=ze.querySelector("diffs-container"),ot=Ge?.shadowRoot;if(!Ge||!ot)return;if(!nn.has(Ge)){const Ut=new MutationObserver(()=>Jt(ze));Ut.observe(ot,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-overflow","data-md-nums"]}),nn.set(Ge,Ut)}if(!ot.querySelector(`style[${TS}]`)){const Ut=document.createElement("style");Ut.setAttribute(TS,""),Ut.textContent=G4e,ot.append(Ut)}const dt=ot.querySelector("pre[data-overflow]");if(!dt)return;const Ct=ze.classList.contains(MS)?"wrap":"scroll";dt.getAttribute("data-overflow")!==Ct&&dt.setAttribute("data-overflow",Ct);const Ft=ze.classList.contains(km)?"on":"off";if(dt.getAttribute("data-md-nums")!==Ft&&dt.setAttribute("data-md-nums",Ft),Ft==="on"){const Ut=mt(ot.querySelectorAll("[data-line]").length);dt.style.getPropertyValue("--md-nums-gutter")!==Ut&&dt.style.setProperty("--md-nums-gutter",Ut)}else dt.style.getPropertyValue("--md-nums-gutter")&&dt.style.removeProperty("--md-nums-gutter")}function kn(ze,Ge){const ot=ze.querySelector(`button.${Ge.toggleClass}`);if(!ot)return;const dt=ze.classList.contains(Ge.stateClass),Ct=dt?Ge.labelOn():Ge.labelOff(),Ft=$l(dt?Ge.iconOn:Ge.iconOff,"sm");ot.innerHTML!==Ft&&(ot.innerHTML=Ft),ot.setAttribute("aria-label",Ct),ot.setAttribute("aria-pressed",String(dt)),ot.title=Ct}function Dn(ze){kn(ze,Tt),kn(ze,qt),Jt(ze)}function xn(ze,Ge,ot){const dt=ze.querySelector(`button.${ot.toggleClass}`);if(dt)return kn(ze,ot),dt;if(!Ge)return null;const Ct=document.createElement("button");Ct.type="button",Ct.className=`${Ge.anchor.className} ${ot.toggleClass}`,Ct.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),ze.classList.toggle(ot.stateClass),Dn(ze)});const Ft=ot===Tt?ze.querySelector(`button.${wm}`)??Ge.anchor:Ge.anchor;return Ge.row.insertBefore(Ct,Ft),kn(ze,ot),Ct}function Ln(ze){const Ge=ze.querySelector(`.code-block-header .code-action-btn:not([disabled]):not(.${wm}):not(.${AS})`),ot=Ge?.parentElement;return Ge&&ot?{row:ot,anchor:Ge}:null}function Hn(){if(!(!r.value||a.streaming))for(const ze of r.value.querySelectorAll(".code-block-container")){const Ge=Ln(ze);ze.querySelector("diffs-container")&&xn(ze,Ge,Tt),xn(ze,Ge,qt),Jt(ze)}}function bn(){se(),yt().then(()=>{B(),O(),Ke(),Hn()})}Ze(()=>a.text,bn),Ze(()=>a.streaming,bn),Ze(i,()=>{if(r.value)for(const ze of r.value.querySelectorAll(".code-block-container"))kn(ze,Tt),kn(ze,qt)});let Wn=null,Pn=null;In(()=>{bn(),r.value&&(Wn=new MutationObserver(bn),Wn.observe(r.value,{childList:!0,subtree:!0}),typeof ResizeObserver<"u"&&(Pn=new ResizeObserver(Qe),Pn.observe(r.value))),window.addEventListener("scroll",oe,{capture:!0}),window.addEventListener("resize",oe),document.addEventListener("pointerdown",ve,{capture:!0}),document.addEventListener("keydown",fe,{capture:!0})}),En(()=>{Wn?.disconnect(),Pn?.disconnect(),window.removeEventListener("scroll",oe,{capture:!0}),window.removeEventListener("resize",oe),document.removeEventListener("pointerdown",ve,{capture:!0}),document.removeEventListener("keydown",fe,{capture:!0}),se(),U.value?.remove(),U.value=null});const Mn={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},Nn=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,An=z(()=>{const ze=P(d.value),Ge=[];let ot=0;Nn.lastIndex=0;let dt;for(;(dt=Nn.exec(ze))!==null;){const Ft=dt[1]??"",Ut=ze.slice(ot,dt.index)+(Ft||"");Ut.trim()&&Ge.push({kind:"md",text:Ut}),Ge.push({kind:"diff",code:dt[2]??""}),ot=Nn.lastIndex}const Ct=ze.slice(ot);return(Ct.trim()||Ge.length===0)&&Ge.push({kind:"md",text:Ct}),Ge});function Qn(ze){return ze.split(` -`).map(Ge=>Ge.startsWith("@@")?{type:"hunk",sign:"",text:Ge}:/^\+(?!\+\+)/.test(Ge)?{type:"add",sign:"+",text:Ge.slice(1)}:/^-(?!--)/.test(Ge)?{type:"del",sign:"-",text:Ge.slice(1)}:Ge.startsWith(" ")?{type:"ctx",sign:"",text:Ge.slice(1)}:{type:"ctx",sign:"",text:Ge})}const Fn=ds(new Set),Qt=ds(new Set),uo=z(()=>{const ze=new Map;return An.value.map(Ge=>{if(Ge.kind!=="diff")return"";const ot=(ze.get(Ge.code)??0)+1;return ze.set(Ge.code,ot),`${ot}#${Ge.code}`})});Ze(uo,ze=>{const Ge=new Set(ze);for(const ot of[Fn,Qt]){const dt=Array.from(ot).filter(Ct=>!Ge.has(Ct));for(const Ct of dt)ot.delete(Ct)}});function Zn(ze,Ge){const ot=uo.value[Ge];ot===void 0||ot===""||(ze.has(ot)?ze.delete(ot):ze.add(ot))}function Bo(ze){const Ge=uo.value[ze];return Ge!==void 0&&Ge!==""&&Fn.has(Ge)}function Un(ze){const Ge=uo.value[ze];return Ge!==void 0&&Ge!==""&&Qt.has(Ge)}function hs(ze){Zn(Fn,ze)}function Io(ze){Zn(Qt,ze)}function Bt(){for(const ze of r.value?.querySelectorAll(".diff-wrap .diff-pre")??[]){if(!ze.closest(".diff-wrap")?.classList.contains(km)){ze.style.removeProperty("--md-nums-gutter");continue}const Ge=ze.querySelectorAll(".diff-line:not(.diff-hunk)").length;ze.style.setProperty("--md-nums-gutter",mt(Ge))}}Ze([()=>Qt.size,An],()=>{yt(Bt)});const Jo=V(null);function $s(ze,Ge){fs(ze).then(ot=>{ot&&(Jo.value=Ge,setTimeout(()=>{Jo.value=null},1400))})}return(ze,Ge)=>(g(),S("div",{ref_key:"mdRef",ref:r,class:"md"},[u.value.frontmatter!==null?(g(),S("pre",O4e,E(u.value.frontmatter),1)):Y("",!0),(g(!0),S(Ce,null,at(An.value,(ot,dt)=>(g(),S(Ce,{key:dt},[ot.kind==="md"?(g(),ue(v(Xi),{key:0,content:ot.text,"custom-markdown-it":o,mode:"chat","code-renderer":p.value.codeRenderer,"is-dark":v(h),"code-block-light-theme":ES,"code-block-dark-theme":IS,themes:[ES,IS],"code-block-props":Mn,final:c.value,"smooth-streaming":e.streaming,"batch-rendering":m.value,"defer-nodes-until-visible":!1,onCopy:v(sH)},null,8,["content","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(g(),S("div",{key:1,class:Pe(["diff-wrap",{"md-code-wrap":Bo(dt),"md-code-nums":Un(dt)}])},[b("div",H4e,[Ge[0]||(Ge[0]=b("span",{class:"diff-lang"},"diff",-1)),W(Cn,{text:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers")},{default:ae(()=>[W(Dt,{size:"sm",label:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers"),"aria-pressed":Un(dt),onClick:Ct=>Io(dt)},{default:ae(()=>[W(Ie,{name:"list-numbers",size:"sm"})]),_:1},8,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode")},{default:ae(()=>[W(Dt,{size:"sm",label:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode"),"aria-pressed":Bo(dt),onClick:Ct=>hs(dt)},{default:ae(()=>[W(Ie,{name:Bo(dt)?"text-wrap-disabled":"text-wrap",size:"sm"},null,8,["name"])]),_:2},1032,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:v(s)("filePreview.copyCode")},{default:ae(()=>[b("button",{class:"diff-copy","aria-label":v(s)("filePreview.copyCode"),onClick:Ct=>$s(ot.code,dt)},[W(Ie,{name:Jo.value===dt?"check":"copy",size:"sm"},null,8,["name"])],8,D4e)]),_:2},1032,["text"])]),b("pre",V4e,[b("code",null,[(g(!0),S(Ce,null,at(Qn(ot.code),(Ct,Ft)=>(g(),S("span",{key:Ft,class:Pe(["diff-line",`diff-${Ct.type}`])},[Ct.type!=="hunk"?(g(),S("span",W4e,E(Ct.sign),1)):Y("",!0),b("span",q4e,E(Ct.text),1)],2))),128))])])],2))],64))),128))],512))}}),zr=vt(Y4e,[["__scopeId","data-v-1b44ea19"]]),X4e=Object.freeze(Object.defineProperty({__proto__:null,default:zr},Symbol.toStringTag,{value:"Module"})),J4e={class:"activity-notice",role:"status"},Q4e={"aria-hidden":"true"},e5e={class:"an-label"},t5e=Je({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",J4e,[b("span",Q4e,[W(Zo,{size:"sm"})]),b("span",e5e,E(e.label),1)]))}}),n5e=vt(t5e,[["__scopeId","data-v-5e7a6420"]]);function o5e(e,t="Yesterday"){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=u=>String(u).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,l=n.getFullYear()===o.getFullYear(),r=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(l&&r&&a)return i;const c=new Date(o);return c.setDate(o.getDate()-1),n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()?`${t} ${i}`:l?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const s5e=Je({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=Lt(),o=V(!1),s=z(()=>{const r=new Date(t.time);if(Number.isNaN(r.getTime()))return t.time;const a=c=>String(c).padStart(2,"0");return`${r.getFullYear()}-${a(r.getMonth()+1)}-${a(r.getDate())} ${a(r.getHours())}:${a(r.getMinutes())}`}),i=z(()=>o.value?s.value:o5e(t.time,n("conversation.yesterday")));function l(){o.value=!o.value}return(r,a)=>(g(),S("button",{type:"button",class:"msg-time",onClick:_t(l,["stop"])},E(i.value),1))}}),Ov=vt(s5e,[["__scopeId","data-v-6761370d"]]);function i5e(e){return e.length===1?`0${e}`:e}function l5e(e,t){return`${String(Number(e))}:${i5e(t)}`}const $S=e=>/^\d+$/.test(e);function r5e(e,t){const n=e.trim().split(/\s+/);if(n.length!==5)return e;const[o,s,i,l,r]=n,a=i==="*"&&l==="*"&&r==="*",c=i==="*"&&l==="*";if(o==="*"&&s==="*"&&a)return t("conversation.cron.everyMinute");const u=/^\*\/(\d+)$/.exec(o);if(u&&s==="*"&&a)return u[1]==="1"?t("conversation.cron.everyMinute"):t("conversation.cron.everyNMinutes",{n:u[1]});if(o==="0"&&s==="*"&&a)return t("conversation.cron.everyHour");const d=/^\*\/(\d+)$/.exec(s);if(o==="0"&&d&&a)return t("conversation.cron.everyNHours",{n:d[1]});if($S(o)&&$S(s)&&c){const f=l5e(s,o);if(r==="1-5")return t("conversation.cron.weekdaysAt",{time:f});if(r==="*")return t("conversation.cron.dailyAt",{time:f})}return e}const a5e=["data-turn-id"],c5e={class:"cn-bubble"},u5e={class:"cn-title"},d5e={key:0,class:"cn-prompt"},f5e={class:"cn-meta"},p5e={key:0,class:"cn-meta-item"},h5e={key:1,class:"cn-meta-item"},m5e=["aria-label"],g5e=["title"],v5e=Je({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=Lt(),o=z(()=>t.cron),s=z(()=>o.value?.missedCount!==void 0),i=z(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),l=z(()=>{const u=o.value?.cron;return u?r5e(u,n):""}),r=z(()=>s.value?"error":"ok"),a=z(()=>{const u=o.value;if(!u)return"";const d=[];return u.recurring===!1&&d.push(n("conversation.cron.oneShot")),typeof u.coalescedCount=="number"&&u.coalescedCount>1&&d.push(n("conversation.cron.coalesced",{n:u.coalescedCount})),u.missedCount!==void 0&&d.push(n("conversation.cron.missedCount",{n:u.missedCount})),u.stale===!0&&d.push(n("conversation.cron.finalDelivery")),d.join(" · ")}),c=z(()=>t.text??"");return(u,d)=>(g(),S("div",{class:Pe(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[b("div",c5e,[b("span",u5e,E(i.value),1),c.value?(g(),S("span",d5e,E(c.value),1)):Y("",!0)]),b("div",f5e,[W(Ie,{name:"clock",size:"sm",class:"cn-meta-ico","aria-hidden":"true"}),l.value?(g(),S("span",p5e,E(l.value),1)):Y("",!0),a.value?(g(),S("span",h5e,E(a.value),1)):Y("",!0),b("span",{class:Pe(["cn-status",r.value]),"aria-label":r.value},[r.value==="ok"?(g(),ue(Ie,{key:0,name:"check",size:"sm"})):(g(),ue(Ie,{key:1,name:"close",size:"sm"}))],10,m5e),o.value?.jobId?(g(),S("span",{key:2,class:"cn-meta-item cn-id",title:v(n)("conversation.cron.job",{id:o.value.jobId})},E(o.value.jobId),9,g5e)):Y("",!0),e.createdAt?(g(),ue(Ov,{key:3,time:e.createdAt},null,8,["time"])):Y("",!0)])],10,a5e))}}),y5e=vt(v5e,[["__scopeId","data-v-d3807b0f"]]),TL="pythinkerWeb.taskNotification",w5e=/]*)>([\s\S]*?)<\/notification>/g,k5e=/([\w-]+)="([^"]*)"/g,b5e=/]*)>[\s\S]*?<\/output-file>/,_5e=/]*)>([\s\S]*?)<\/output-preview>/,x5e=/^Title: (.*)$/m,S5e=/^Severity: (.*)$/m;function E4(e){return e.replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function bm(e){const t={};for(const n of e.matchAll(k5e))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=E4(n[2]));return t}function _m(e){if(e===void 0)return;const t=Number(e);return Number.isFinite(t)?t:void 0}function C5e(e,t,n){const o=bm(e),s=x5e.exec(t)?.[1]?.trim()??"",i=S5e.exec(t)?.[1]?.trim()??"";let l=t.split(` +`,LS="github-light",$S="github-dark",g5e=Je({__name:"Markdown",props:{text:{},openFile:{},skills:{},streaming:{type:Boolean,default:!1}},setup(e){t2e(),h2e(),o2e(),v2e(),n2e(new s5e),g2e(new i5e);const t=new WeakMap;function n($e,Ge){if($e.src[$e.pos]!=="$")return!1;let ot=t.get($e);(!ot||ot.src!==$e.src)&&(ot={src:$e.src,match:U4e($e.src),lastEnd:-1},t.set($e,ot));const dt=ot.match($e.pos,ot.lastEnd);if(!dt||dt.end>$e.posMax)return!1;if(ot.lastEnd=dt.end,Ge)return $e.pos=dt.end,!0;const Mt=$e.push("math_inline","math",0);return Mt.content=dt.content,Mt.markup="$",Mt.raw=$e.src.slice($e.pos,dt.end),Mt.loading=!1,$e.pos=dt.end,!0}function o($e){return $e.set({typographer:!1}),$e.inline.ruler.disable("math"),$e.inline.ruler.before("escape","math",n),$e}const{t:s,locale:i}=$t(),l=fn("resolveImage"),r=V(null),a=e,c=B(()=>!a.streaming),u=B(()=>G4e(a.text??"")),d=B(()=>u.value.body),f=B(()=>E4e(d.value)),p=B(()=>a.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:R4e(d.value)),h=Ip(),m=B(()=>!a.streaming),k=ds(new Map),x=new Set,y=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,w=/(]*?\bsrc=")([^"]+)(")/gi;function _($e){return!/^(https?:|data:|blob:)/i.test($e)}function A($e){if(!l)return;const Ge=[];for(const ot of[y,w]){ot.lastIndex=0;let dt;for(;(dt=ot.exec($e))!==null;)Ge.push(dt[2]??"")}for(const ot of Ge)!ot||!_(ot)||k.has(ot)||x.has(ot)||(x.add(ot),l(ot).then(dt=>{k.set(ot,dt!==ot?dt:"")}).catch(()=>{k.set(ot,"")}).finally(()=>{x.delete(ot)}))}function P($e){if(!l)return $e;const Ge=ot=>{if(!_(ot))return null;const dt=k.get(ot);return dt===void 0?f5e:dt===""?null:dt};return $e.replace(y,(ot,dt,Mt,Ft)=>{const Ut=Ge(Mt);return Ut===null?ot:`${dt}${Ut}${Ft}`}).replace(w,(ot,dt,Mt,Ft)=>{const Ut=Ge(Mt);return Ut===null?ot:`${dt}${Ut}${Ft}`})}Ke(()=>d.value,$e=>A($e),{immediate:!0});function z(){if(!r.value||!a.openFile||a.streaming)return;const $e=document.createTreeWalker(r.value,NodeFilter.SHOW_TEXT),Ge=[];let ot=$e.nextNode();for(;ot;){const dt=ot,Mt=dt.parentElement;Mt&&!Mt.closest("a, pre, .md-file-link, svg")&&dt.data.trim().length>0&&Ge.push(dt),ot=$e.nextNode()}for(const dt of Ge){const Mt=L4e(dt.data,{aliases:f.value});if(Mt.length===0||!dt.parentNode)continue;const Ft=document.createDocumentFragment();let Ut=0;for(const en of Mt){en.start>Ut&&Ft.append(document.createTextNode(dt.data.slice(Ut,en.start)));const tn=document.createElement("button");tn.type="button",tn.className="md-file-link",tn.textContent=en.text,tn.title=en.line?`${en.path}:${en.line}`:en.path,tn.addEventListener("click",eo=>{eo.preventDefault(),eo.stopPropagation(),a.openFile?.({path:en.path,line:en.line})}),Ft.append(tn),Ut=en.end}UtZ3.length?"skill":$e.startsWith("#")||$e.startsWith("?")||$e.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test($e)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test($e)?null:$e.endsWith("/")||$e.endsWith("\\")||/%5c$/i.test($e)?"folder":"file":null}function $($e){try{return decodeURIComponent($e.slice(Z3.length))}catch{return $e.slice(Z3.length)}}function C($e){return $e.replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function j(){if(!r.value||a.streaming)return;const $e=r.value.querySelectorAll("a[href]");for(const Ge of $e){if(Ge.dataset.mdLinkHandled==="true"||Ge.closest("svg")||Ge.querySelector("img"))continue;const ot=Ge.getAttribute("href")??"",dt=T(ot);if(dt===null)continue;Ge.dataset.mdLinkHandled="true",Ge.removeAttribute("title");const Mt=dt==="skill"?ot:L(ot),Ft=C(Ge.textContent??"");Ge.classList.add("mention-pill",`mention-${dt}`),Ge.dataset.mentionKind=dt,Ge.dataset.mentionName=dt==="skill"?$(ot):Ft,Ge.dataset.mentionPath=Mt,(dt==="skill"||a.openFile)&&Ge.removeAttribute("href"),(dt==="skill"||dt==="file"&&a.openFile)&&(Ge.tabIndex=0,Ge.setAttribute("role","button"));const Ut=I$(Ft),en=document.createElement("span");if(en.className="mention-pill-name",en.textContent=Ut,Ge.replaceChildren(en),!Ge.querySelector(".mention-pill-icon")){const tn=document.createElement("span");tn.className="mention-pill-icon",tn.setAttribute("aria-hidden","true"),tn.innerHTML=dt==="skill"?Ll("sparkles","sm"):dt==="folder"?Ll("folder","sm"):ju(Mt,Ft),Ge.prepend(tn)}Ge.addEventListener("click",tn=>{dt!=="skill"&&!a.openFile||(tn.preventDefault(),tn.stopPropagation(),dt==="file"&&a.openFile?.({path:E(L(ot))}))}),dt==="file"&&a.openFile&&Ge.addEventListener("keydown",tn=>{tn.key!=="Enter"&&tn.key!==" "||(tn.preventDefault(),tn.stopPropagation(),a.openFile?.({path:E(L(ot))}))}),ve(Ge)}}function H($e){const Ge=$e.dataset.mentionKind??($e.classList.contains("mention-skill")?"skill":$e.classList.contains("mention-folder")?"folder":"file"),ot=$e.dataset.mentionName??$e.querySelector(".mention-pill-name")?.textContent??"";return{kind:Ge,name:ot,path:$e.dataset.mentionPath??""}}function D($e,Ge){let ot;return()=>{if(ot===void 0){const dt=getComputedStyle(document.documentElement).getPropertyValue($e).trim(),Mt=parseFloat(dt);ot=Number.isFinite(Mt)?dt.endsWith("s")?Mt*1e3:Mt:Ge}return ot}}const M=D("--space-1-5",6),R=D("--p-mention-tip-vmargin",12),O=D("--duration-tooltip",150),U=D("--duration-fast",120),Z=D("--duration-flash",1e3),q=V(null);let te=null,ee=0,J=0;function se($e){return q.value?.contains($e)??!1}function Q(){let $e=q.value;return $e||($e=document.createElement("div"),$e.className="mention-tip",$e.id="mention-tip",$e.setAttribute("role","tooltip"),$e.addEventListener("mouseenter",()=>window.clearTimeout(J)),$e.addEventListener("mouseleave",()=>K()),$e.addEventListener("focusin",()=>window.clearTimeout(J)),$e.addEventListener("focusout",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&($e.contains(ot)||te?.contains(ot))||oe()}),document.body.append($e),q.value=$e),$e}function me(){const $e=q.value,Ge=te;if(!$e||!Ge)return;const ot=Ge.getBoundingClientRect(),dt=M(),Mt=R();let Ft=ot.top-dt-$e.offsetHeight;FtGe.name===$e)}function Ye($e){const Ge=document.createElement("div");Ge.className="mention-tip-path";const ot=document.createElement("div");ot.className="mention-tip-path-text";const dt=$e.split(/([/\\])/);let Mt=dt.length-1;for(;Mt>0&&(dt[Mt]===""||dt[Mt]==="/"||dt[Mt]==="\\");)Mt--;for(let en=0;en{en.preventDefault(),en.stopPropagation(),fs($e).then(tn=>{tn&&(Ft.innerHTML=Ll("check","sm"),window.setTimeout(()=>{Ft.innerHTML=Ut},Z()))})}),Ge.append(Ft),Ge}function at($e){const Ge=document.createElement("div");Ge.className="mention-tip-skill";const ot=document.createElement("div");ot.className="mention-tip-head";const dt=document.createElement("span");if(dt.className="mention-tip-name",dt.textContent=$e.name,ot.append(dt),$e.path&&a.openFile){const Mt=document.createElement("button");Mt.type="button",Mt.className="mention-tip-open",Mt.setAttribute("aria-label",s("mention.openSkill")),Mt.innerHTML=Ll("external-link","sm");const Ft=$e.path;Mt.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),oe(),a.openFile?.({path:Ft})}),ot.append(Mt)}if(Ge.append(ot),$e.description){const Mt=document.createElement("div");Mt.className="mention-tip-desc",Mt.textContent=$e.description,Ge.append(Mt)}return Ge}function X($e){const Ge=Q();te?.removeAttribute("aria-describedby"),te=$e,$e.setAttribute("aria-describedby",Ge.id);const ot=H($e);Ge.replaceChildren(ot.kind==="skill"?at(xe(ot.name)??{name:ot.name,description:""}):Ye(ot.path||ot.name)),Ge.classList.remove("positioned"),me(),Ge.classList.add("positioned"),Ge.removeAttribute("inert")}function oe(){window.clearTimeout(ee),window.clearTimeout(J),te?.removeAttribute("aria-describedby"),te=null;const $e=q.value;$e?.classList.remove("positioned"),$e?.setAttribute("inert","")}function F($e){window.clearTimeout(J),window.clearTimeout(ee);const Ge=q.value?.classList.contains("positioned")&&te===$e;ee=window.setTimeout(()=>{$e.isConnected&&X($e)},Ge?0:O())}function K(){window.clearTimeout(ee),window.clearTimeout(J),J=window.setTimeout(oe,U())}function he($e){const Ge=q.value;if(!(!Ge||!Ge.classList.contains("positioned")||!te)){if($e.key==="Escape"){$e.target instanceof Node&&Ge.contains($e.target)&&te.focus(),oe(),$e.preventDefault(),$e.stopImmediatePropagation();return}if($e.key==="Tab"&&$e.target instanceof Node&&Ge.contains($e.target)){const ot=Array.from(Ge.querySelectorAll("button")),dt=ot[0],Mt=ot[ot.length-1];(!$e.shiftKey&&$e.target===Mt||$e.shiftKey&&$e.target===dt)&&($e.preventDefault(),te.focus(),oe())}}}function ye($e){const Ge=$e.target;Ge instanceof Node&&(se(Ge)||te?.contains(Ge))||oe()}function ve($e){$e.addEventListener("mouseenter",()=>F($e)),$e.addEventListener("mouseleave",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&se(ot)||K()}),$e.addEventListener("focus",()=>F($e)),$e.addEventListener("blur",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&se(ot)||K()})}function ie(){oe()}function de($e){return $e.querySelector(`button.${CS}`)}function be($e){return $e.querySelector(`.${MS}`)}function Se($e){const Ge=de($e);if(!Ge)return;const ot=$e.querySelector("thead tr")??$e.querySelector("tr");if(!ot)return;const dt=ot.getBoundingClientRect(),Mt=$e.getBoundingClientRect().top,Ft=Math.max(2,Math.round(dt.top-Mt+(dt.height-h5e)/2));Ge.style.top=`${Ft}px`,Ge.style.right=`${Ft}px`}function je($e){const Ge=$e.querySelector("table");return Ge!==null&&Ge.scrollWidth>$e.clientWidth+1}function et($e){const Ge=`translateX(${$e.scrollLeft}px)`,ot=be($e);ot&&(ot.style.transform=Ge);const dt=de($e);dt&&(dt.style.transform=Ge);const Mt=$e.scrollLeft+$e.clientWidth>=$e.scrollWidth-2;$e.classList.toggle(p5e,Mt)}function le($e){const Ge=de($e);if(!Ge)return;const ot=je($e),dt=$e.classList.contains(SS);Ge.classList.toggle(AS,ot||dt),be($e)?.classList.toggle(AS,ot),Se($e),et($e)}function fe($e){const Ge=de($e);if(Ge)return Ge;if(!$e.closest(".a-msg .msg"))return null;const ot=document.createElement("div");ot.className=MS,ot.setAttribute("aria-hidden","true");const dt=document.createElement("button");return dt.type="button",dt.className=CS,dt.innerHTML=Ll("expand","sm"),dt.setAttribute("aria-label",s("conversation.widenTable")),dt.title=s("conversation.widenTable"),dt.addEventListener("click",Mt=>{Mt.preventDefault(),Mt.stopPropagation(),ge($e)}),$e.append(ot,dt),$e.addEventListener("scroll",()=>et($e),{passive:!0}),le($e),dt}function ge($e){const Ge=$e.classList.toggle(SS),ot=de($e);if(ot){ot.innerHTML=Ll(Ge?"collapse":"expand","sm");const dt=s(Ge?"conversation.restoreTableWidth":"conversation.widenTable");ot.setAttribute("aria-label",dt),ot.title=dt}le($e),$e.dispatchEvent(new CustomEvent("pythinker-table-layout",{bubbles:!0}))}function Oe(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".table-node-wrapper"))fe($e)}function Fe(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".table-node-wrapper"))le($e)}function pt($e){return`${Math.max(String($e).length+1,4)}ch`}const kt={stateClass:_m,toggleClass:ES,iconOn:"list-numbers",iconOff:"list-numbers",labelOn:()=>s("conversation.hideLineNumbers"),labelOff:()=>s("conversation.showLineNumbers")},qt={stateClass:TS,toggleClass:bm,iconOn:"text-wrap-disabled",iconOff:"text-wrap",labelOn:()=>s("conversation.unwrapCode"),labelOff:()=>s("conversation.wrapCode")},nn=new WeakMap;function Jt($e){const Ge=$e.querySelector("diffs-container"),ot=Ge?.shadowRoot;if(!Ge||!ot)return;if(!nn.has(Ge)){const Ut=new MutationObserver(()=>Jt($e));Ut.observe(ot,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-overflow","data-md-nums"]}),nn.set(Ge,Ut)}if(!ot.querySelector(`style[${IS}]`)){const Ut=document.createElement("style");Ut.setAttribute(IS,""),Ut.textContent=m5e,ot.append(Ut)}const dt=ot.querySelector("pre[data-overflow]");if(!dt)return;const Mt=$e.classList.contains(TS)?"wrap":"scroll";dt.getAttribute("data-overflow")!==Mt&&dt.setAttribute("data-overflow",Mt);const Ft=$e.classList.contains(_m)?"on":"off";if(dt.getAttribute("data-md-nums")!==Ft&&dt.setAttribute("data-md-nums",Ft),Ft==="on"){const Ut=pt(ot.querySelectorAll("[data-line]").length);dt.style.getPropertyValue("--md-nums-gutter")!==Ut&&dt.style.setProperty("--md-nums-gutter",Ut)}else dt.style.getPropertyValue("--md-nums-gutter")&&dt.style.removeProperty("--md-nums-gutter")}function kn($e,Ge){const ot=$e.querySelector(`button.${Ge.toggleClass}`);if(!ot)return;const dt=$e.classList.contains(Ge.stateClass),Mt=dt?Ge.labelOn():Ge.labelOff(),Ft=Ll(dt?Ge.iconOn:Ge.iconOff,"sm");ot.innerHTML!==Ft&&(ot.innerHTML=Ft),ot.setAttribute("aria-label",Mt),ot.setAttribute("aria-pressed",String(dt)),ot.title=Mt}function Dn($e){kn($e,kt),kn($e,qt),Jt($e)}function xn($e,Ge,ot){const dt=$e.querySelector(`button.${ot.toggleClass}`);if(dt)return kn($e,ot),dt;if(!Ge)return null;const Mt=document.createElement("button");Mt.type="button",Mt.className=`${Ge.anchor.className} ${ot.toggleClass}`,Mt.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),$e.classList.toggle(ot.stateClass),Dn($e)});const Ft=ot===kt?$e.querySelector(`button.${bm}`)??Ge.anchor:Ge.anchor;return Ge.row.insertBefore(Mt,Ft),kn($e,ot),Mt}function $n($e){const Ge=$e.querySelector(`.code-block-header .code-action-btn:not([disabled]):not(.${bm}):not(.${ES})`),ot=Ge?.parentElement;return Ge&&ot?{row:ot,anchor:Ge}:null}function Hn(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".code-block-container")){const Ge=$n($e);$e.querySelector("diffs-container")&&xn($e,Ge,kt),xn($e,Ge,qt),Jt($e)}}function bn(){oe(),yt().then(()=>{z(),j(),Oe(),Hn()})}Ke(()=>a.text,bn),Ke(()=>a.streaming,bn),Ke(i,()=>{if(r.value)for(const $e of r.value.querySelectorAll(".code-block-container"))kn($e,kt),kn($e,qt)});let Wn=null,Pn=null;In(()=>{bn(),r.value&&(Wn=new MutationObserver(bn),Wn.observe(r.value,{childList:!0,subtree:!0}),typeof ResizeObserver<"u"&&(Pn=new ResizeObserver(Fe),Pn.observe(r.value))),window.addEventListener("scroll",ie,{capture:!0}),window.addEventListener("resize",ie),document.addEventListener("pointerdown",ye,{capture:!0}),document.addEventListener("keydown",he,{capture:!0})}),En(()=>{Wn?.disconnect(),Pn?.disconnect(),window.removeEventListener("scroll",ie,{capture:!0}),window.removeEventListener("resize",ie),document.removeEventListener("pointerdown",ye,{capture:!0}),document.removeEventListener("keydown",he,{capture:!0}),oe(),q.value?.remove(),q.value=null});const Mn={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},Nn=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,An=B(()=>{const $e=P(d.value),Ge=[];let ot=0;Nn.lastIndex=0;let dt;for(;(dt=Nn.exec($e))!==null;){const Ft=dt[1]??"",Ut=$e.slice(ot,dt.index)+(Ft||"");Ut.trim()&&Ge.push({kind:"md",text:Ut}),Ge.push({kind:"diff",code:dt[2]??""}),ot=Nn.lastIndex}const Mt=$e.slice(ot);return(Mt.trim()||Ge.length===0)&&Ge.push({kind:"md",text:Mt}),Ge});function Qn($e){return $e.split(` +`).map(Ge=>Ge.startsWith("@@")?{type:"hunk",sign:"",text:Ge}:/^\+(?!\+\+)/.test(Ge)?{type:"add",sign:"+",text:Ge.slice(1)}:/^-(?!--)/.test(Ge)?{type:"del",sign:"-",text:Ge.slice(1)}:Ge.startsWith(" ")?{type:"ctx",sign:"",text:Ge.slice(1)}:{type:"ctx",sign:"",text:Ge})}const Fn=ds(new Set),Qt=ds(new Set),uo=B(()=>{const $e=new Map;return An.value.map(Ge=>{if(Ge.kind!=="diff")return"";const ot=($e.get(Ge.code)??0)+1;return $e.set(Ge.code,ot),`${ot}#${Ge.code}`})});Ke(uo,$e=>{const Ge=new Set($e);for(const ot of[Fn,Qt]){const dt=Array.from(ot).filter(Mt=>!Ge.has(Mt));for(const Mt of dt)ot.delete(Mt)}});function Zn($e,Ge){const ot=uo.value[Ge];ot===void 0||ot===""||($e.has(ot)?$e.delete(ot):$e.add(ot))}function Bo($e){const Ge=uo.value[$e];return Ge!==void 0&&Ge!==""&&Fn.has(Ge)}function Un($e){const Ge=uo.value[$e];return Ge!==void 0&&Ge!==""&&Qt.has(Ge)}function hs($e){Zn(Fn,$e)}function Io($e){Zn(Qt,$e)}function Rt(){for(const $e of r.value?.querySelectorAll(".diff-wrap .diff-pre")??[]){if(!$e.closest(".diff-wrap")?.classList.contains(_m)){$e.style.removeProperty("--md-nums-gutter");continue}const Ge=$e.querySelectorAll(".diff-line:not(.diff-hunk)").length;$e.style.setProperty("--md-nums-gutter",pt(Ge))}}Ke([()=>Qt.size,An],()=>{yt(Rt)});const Jo=V(null);function Ls($e,Ge){fs($e).then(ot=>{ot&&(Jo.value=Ge,setTimeout(()=>{Jo.value=null},1400))})}return($e,Ge)=>(g(),S("div",{ref_key:"mdRef",ref:r,class:"md"},[u.value.frontmatter!==null?(g(),S("pre",l5e,I(u.value.frontmatter),1)):Y("",!0),(g(!0),S(Ce,null,rt(An.value,(ot,dt)=>(g(),S(Ce,{key:dt},[ot.kind==="md"?(g(),ue(v(Xi),{key:0,content:ot.text,"custom-markdown-it":o,mode:"chat","code-renderer":p.value.codeRenderer,"is-dark":v(h),"code-block-light-theme":LS,"code-block-dark-theme":$S,themes:[LS,$S],"code-block-props":Mn,final:c.value,"smooth-streaming":e.streaming,"batch-rendering":m.value,"defer-nodes-until-visible":!1,onCopy:v(dH)},null,8,["content","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(g(),S("div",{key:1,class:Be(["diff-wrap",{"md-code-wrap":Bo(dt),"md-code-nums":Un(dt)}])},[b("div",r5e,[Ge[0]||(Ge[0]=b("span",{class:"diff-lang"},"diff",-1)),W(Cn,{text:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers")},{default:ae(()=>[W(Dt,{size:"sm",label:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers"),"aria-pressed":Un(dt),onClick:Mt=>Io(dt)},{default:ae(()=>[W(Ee,{name:"list-numbers",size:"sm"})]),_:1},8,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode")},{default:ae(()=>[W(Dt,{size:"sm",label:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode"),"aria-pressed":Bo(dt),onClick:Mt=>hs(dt)},{default:ae(()=>[W(Ee,{name:Bo(dt)?"text-wrap-disabled":"text-wrap",size:"sm"},null,8,["name"])]),_:2},1032,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:v(s)("filePreview.copyCode")},{default:ae(()=>[b("button",{class:"diff-copy","aria-label":v(s)("filePreview.copyCode"),onClick:Mt=>Ls(ot.code,dt)},[W(Ee,{name:Jo.value===dt?"check":"copy",size:"sm"},null,8,["name"])],8,a5e)]),_:2},1032,["text"])]),b("pre",c5e,[b("code",null,[(g(!0),S(Ce,null,rt(Qn(ot.code),(Mt,Ft)=>(g(),S("span",{key:Ft,class:Be(["diff-line",`diff-${Mt.type}`])},[Mt.type!=="hunk"?(g(),S("span",u5e,I(Mt.sign),1)):Y("",!0),b("span",d5e,I(Mt.text),1)],2))),128))])])],2))],64))),128))],512))}}),Br=vt(g5e,[["__scopeId","data-v-1b44ea19"]]),v5e=Object.freeze(Object.defineProperty({__proto__:null,default:Br},Symbol.toStringTag,{value:"Module"})),y5e={class:"activity-notice",role:"status"},w5e={"aria-hidden":"true"},k5e={class:"an-label"},b5e=Je({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",y5e,[b("span",w5e,[W(Zo,{size:"sm"})]),b("span",k5e,I(e.label),1)]))}}),_5e=vt(b5e,[["__scopeId","data-v-5e7a6420"]]);function x5e(e,t="Yesterday"){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=u=>String(u).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,l=n.getFullYear()===o.getFullYear(),r=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(l&&r&&a)return i;const c=new Date(o);return c.setDate(o.getDate()-1),n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()?`${t} ${i}`:l?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const S5e=Je({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=$t(),o=V(!1),s=B(()=>{const r=new Date(t.time);if(Number.isNaN(r.getTime()))return t.time;const a=c=>String(c).padStart(2,"0");return`${r.getFullYear()}-${a(r.getMonth()+1)}-${a(r.getDate())} ${a(r.getHours())}:${a(r.getMinutes())}`}),i=B(()=>o.value?s.value:x5e(t.time,n("conversation.yesterday")));function l(){o.value=!o.value}return(r,a)=>(g(),S("button",{type:"button",class:"msg-time",onClick:xt(l,["stop"])},I(i.value),1))}}),Dv=vt(S5e,[["__scopeId","data-v-6761370d"]]);function C5e(e){return e.length===1?`0${e}`:e}function M5e(e,t){return`${String(Number(e))}:${C5e(t)}`}const NS=e=>/^\d+$/.test(e);function A5e(e,t){const n=e.trim().split(/\s+/);if(n.length!==5)return e;const[o,s,i,l,r]=n,a=i==="*"&&l==="*"&&r==="*",c=i==="*"&&l==="*";if(o==="*"&&s==="*"&&a)return t("conversation.cron.everyMinute");const u=/^\*\/(\d+)$/.exec(o);if(u&&s==="*"&&a)return u[1]==="1"?t("conversation.cron.everyMinute"):t("conversation.cron.everyNMinutes",{n:u[1]});if(o==="0"&&s==="*"&&a)return t("conversation.cron.everyHour");const d=/^\*\/(\d+)$/.exec(s);if(o==="0"&&d&&a)return t("conversation.cron.everyNHours",{n:d[1]});if(NS(o)&&NS(s)&&c){const f=M5e(s,o);if(r==="1-5")return t("conversation.cron.weekdaysAt",{time:f});if(r==="*")return t("conversation.cron.dailyAt",{time:f})}return e}const T5e=["data-turn-id"],E5e={class:"cn-bubble"},I5e={class:"cn-title"},L5e={key:0,class:"cn-prompt"},$5e={class:"cn-meta"},N5e={key:0,class:"cn-meta-item"},z5e={key:1,class:"cn-meta-item"},B5e=["aria-label"],R5e=["title"],P5e=Je({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=$t(),o=B(()=>t.cron),s=B(()=>o.value?.missedCount!==void 0),i=B(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),l=B(()=>{const u=o.value?.cron;return u?A5e(u,n):""}),r=B(()=>s.value?"error":"ok"),a=B(()=>{const u=o.value;if(!u)return"";const d=[];return u.recurring===!1&&d.push(n("conversation.cron.oneShot")),typeof u.coalescedCount=="number"&&u.coalescedCount>1&&d.push(n("conversation.cron.coalesced",{n:u.coalescedCount})),u.missedCount!==void 0&&d.push(n("conversation.cron.missedCount",{n:u.missedCount})),u.stale===!0&&d.push(n("conversation.cron.finalDelivery")),d.join(" · ")}),c=B(()=>t.text??"");return(u,d)=>(g(),S("div",{class:Be(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[b("div",E5e,[b("span",I5e,I(i.value),1),c.value?(g(),S("span",L5e,I(c.value),1)):Y("",!0)]),b("div",$5e,[W(Ee,{name:"clock",size:"sm",class:"cn-meta-ico","aria-hidden":"true"}),l.value?(g(),S("span",N5e,I(l.value),1)):Y("",!0),a.value?(g(),S("span",z5e,I(a.value),1)):Y("",!0),b("span",{class:Be(["cn-status",r.value]),"aria-label":r.value},[r.value==="ok"?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):(g(),ue(Ee,{key:1,name:"close",size:"sm"}))],10,B5e),o.value?.jobId?(g(),S("span",{key:2,class:"cn-meta-item cn-id",title:v(n)("conversation.cron.job",{id:o.value.jobId})},I(o.value.jobId),9,R5e)):Y("",!0),e.createdAt?(g(),ue(Dv,{key:3,time:e.createdAt},null,8,["time"])):Y("",!0)])],10,T5e))}}),F5e=vt(P5e,[["__scopeId","data-v-d3807b0f"]]),L$="pythinkerWeb.taskNotification",j5e=/]*)>([\s\S]*?)<\/notification>/g,O5e=/([\w-]+)="([^"]*)"/g,H5e=/]*)>[\s\S]*?<\/output-file>/,D5e=/]*)>([\s\S]*?)<\/output-preview>/,V5e=/^Title: (.*)$/m,W5e=/^Severity: (.*)$/m;function I4(e){return e.replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function xm(e){const t={};for(const n of e.matchAll(O5e))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=I4(n[2]));return t}function Sm(e){if(e===void 0)return;const t=Number(e);return Number.isFinite(t)?t:void 0}function q5e(e,t,n){const o=xm(e),s=V5e.exec(t)?.[1]?.trim()??"",i=W5e.exec(t)?.[1]?.trim()??"";let l=t.split(` `).filter(k=>!k.startsWith("Title: ")&&!k.startsWith("Severity: ")).join(` -`);const r=l.search(/^<\w/m);r!==-1&&(l=l.slice(0,r));const a=b5e.exec(t),c=a?bm(a[1]??""):void 0,u=c?.path?{path:c.path,bytes:_m(c.bytes)}:void 0,d=_5e.exec(t),f=d?bm(d[1]??""):void 0,p=(d?.[2]??"").replace(/^\n/,""),h=p.indexOf(` -`),m=d?{text:E4(h===-1?"":p.slice(h+1)).replace(/\n$/,""),bytes:_m(f?.bytes),totalBytes:_m(f?.total_bytes),truncated:f?.truncated==="true"?!0:f?.truncated==="false"?!1:void 0}:void 0;return{id:o.id??"",category:o.category??"",type:o.type??"",sourceKind:o.source_kind??"",sourceId:o.source_id??"",agentId:o.agent_id,title:E4(s),severity:i,body:E4(l.trim()),outputFile:u,outputPreview:m,raw:n}}function EL(e){if(!e.includes("{h=null,p.value=null},1200))}return En(()=>{h!==null&&clearTimeout(h)}),(k,x)=>(g(),S("div",T5e,[(g(!0),S(Ce,null,at(t.items,(y,w)=>(g(),S("div",{key:s(y,w),class:Pe(["ntn",v(A5e)(y)]),role:"status"},[b("div",E5e,[W(Ie,{name:i(y),size:"sm",class:"ntn-ico","aria-hidden":"true"},null,8,["name"]),b("span",I5e,E(c(y)),1)]),b("div",$5e,[y.title?(g(),S("div",L5e,E(y.title),1)):Y("",!0),y.body?(g(),S("div",N5e,E(y.body),1)):Y("",!0),y.outputFile?(g(),S("div",z5e,[W(Ie,{class:"ntn-out-ic",name:"file-text",size:"sm","aria-hidden":"true"}),b("span",{class:"ntn-out-path",title:y.outputFile.path},E(y.outputFile.path),9,B5e),y.outputFile.bytes!==void 0?(g(),S("span",R5e,E(u(y.outputFile.bytes)),1)):Y("",!0),W(Nt,{"data-testid":"notification-copy-path",variant:"secondary",size:"sm",type:"button",onClick:_=>m(y.outputFile.path,s(y,w))},{default:ae(()=>[W(Ie,{name:"copy",size:"sm","aria-hidden":"true"}),Oe(" "+E(p.value===s(y,w)?v(n)("conversation.notification.copied"):v(n)("conversation.notification.copyPath")),1)]),_:2},1032,["onClick"])])):Y("",!0),f(y)?(g(),S("div",P5e,[d(y)?(g(),S("div",F5e,E(d(y)),1)):Y("",!0),y.outputPreview?.text?(g(),S("pre",j5e,E(y.outputPreview.text),1)):Y("",!0)])):Y("",!0),b("details",O5e,[b("summary",null,[W(Ie,{class:"ntn-raw-car",name:"chevron-right",size:"sm","aria-hidden":"true"}),b("span",null,E(v(n)("conversation.notification.rawPayload")),1)]),b("div",H5e,[b("div",D5e,[b("span",V5e,E(v(n)("conversation.notification.fields.type")),1),b("span",W5e,E(y.type),1),b("span",q5e,E(v(n)("conversation.notification.fields.source")),1),b("span",U5e,E(y.sourceKind)+" · "+E(y.sourceId),1),b("span",Z5e,E(v(n)("conversation.notification.fields.severity")),1),b("span",K5e,E(y.severity||"—"),1)]),b("pre",G5e,E(y.raw),1)])])]),b("div",Y5e,[y.createdAt?(g(),ue(Ov,{key:0,time:y.createdAt},null,8,["time"])):Y("",!0)])],2))),128))]))}}),IL=vt(X5e,[["__scopeId","data-v-6e055dc6"]]),LS=dn.clientId,J5e="pythinker-code-web",Q5e="web";function $L(){return{serverHttpUrl:tpe(),clientId:ope(),clientName:J5e,clientVersion:spe(),clientUiMode:Q5e}}function epe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function tpe(e){const t=epe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Yc(e,t,n="v1"){return`${e}/api/${n}${t.startsWith("/")?t:`/${t}`}`}function npe(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}function ope(){const e=ls(LS);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Es(LS,t),t}function spe(){return"0.1.2".trim()?"0.1.2":"0.0.0-dev"}const LL="pythinkerWeb.compaction";class NL extends Error{constructor(t){super("The subagent model policy changed on the server; reloaded the saved policy."),this.current=t,this.name="SubagentModelPolicyConflictError"}}function ipe(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}function lpe(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}const rpe={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function ape(e,t){switch(t.op){case"reset":return cpe(e,t);case"turn.upsert":return dpe(e,t.turn);case"step.upsert":return ppe(e,t.turnId,t.step);case"frame.upsert":return mpe(e,t);case"append":return vpe(e,t);case"marker.upsert":return zS(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return zS(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return kpe(e,t.task);case"interaction.upsert":return bpe(e,t.interaction);case"attachment.upsert":return xpe(e,t.attachment);case"todo.upsert":return Cpe(e,t.todo);case"prompt.upsert":return Ape(e,t.prompt);case"meta.merge":return Ipe(e,t.meta);case"items.remove":return wpe(e,t.ids)}}function cpe(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function NS(e,t){return{...e,kind:"turn",steps:[...t]}}function zL(e){return{kind:"turn",turnId:e,ordinal:ipe(e),state:"running",origin:{kind:"other"},steps:[]}}function upe(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Au(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function Hv(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function Zp(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function dpe(e,t){const n=Au(e,t.turnId);return n?fpe(n,t)?{state:e,changed:!1}:{state:{...e,items:Zp(e.items,t.turnId,o=>NS(t,o.steps))},changed:!0}:{state:{...e,items:Hv(e.items,NS(t,[]))},changed:!0}}function fpe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&("taskId"in e.origin?e.origin.taskId:void 0)===("taskId"in t.origin?t.origin.taskId:void 0)&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function ppe(e,t,n){const o=Au(e,t)??zL(t),s=o.steps.findIndex(c=>c.stepId===n.stepId);let i,l=!0;if(s>=0){const c=o.steps[s];c&&hpe(c,n)?(l=!1,i=o.steps):i=o.steps.map(u=>u.stepId===n.stepId?{...n,kind:"step",frames:u.frames}:u)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((c,u)=>c.ordinal-u.ordinal);if(!l)return{state:e,changed:!1};const r={...o,steps:[...i]},a=Au(e,t)?Zp(e.items,t,()=>r):Hv(e.items,r);return{state:{...e,items:a},changed:!0}}function hpe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function mpe(e,t){const n=Au(e,t.turnId)??zL(t.turnId),o=n.steps.find(u=>u.stepId===t.stepId)??upe(t.stepId,t.turnId),s=o.frames.findIndex(u=>u.frameId===t.frame.frameId);let i;if(s>=0){const u=o.frames[s];if(u!==void 0&&gpe(u,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const l={...o,frames:[...i]},r=n.steps.some(u=>u.stepId===t.stepId)?n.steps.map(u=>u.stepId===t.stepId?l:u):[...n.steps,l].toSorted((u,d)=>u.ordinal-d.ordinal),a={...n,steps:r},c=Au(e,t.turnId)?Zp(e.items,t.turnId,()=>a):Hv(e.items,a);return{state:{...e,items:c},changed:!0}}function gpe(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail&&e.source===t.source:!1}function vpe(e,t){if(t.target.type==="task")return ype(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Au(e,n),l=i?.steps.find(f=>f.stepId===o),r=l?.frames.find(f=>f.frameId===s);if(!i||!l||!r||r.kind!=="text"&&r.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=BL(r.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const c={...r,text:a.text},u={...l,frames:l.frames.map(f=>f.frameId===s?c:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?u:f)};return{state:{...e,items:Zp(e.items,n,()=>d)},changed:!0}}function ype(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=BL(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const l=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},r=new Map(e.tasks);return r.set(n,l),{state:{...e,tasks:r},changed:!0}}function BL(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function zS(e,t,n,o){if(e.items.some(i=>_7(i)===n)){let i=!1;const l=e.items.map(r=>_7(r)!==n||r===t?r:(i=!0,t));return i?{state:{...e,items:l},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let l=i.length;for(let r=0;r=o){l=r;break}}return i.splice(l,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function _7(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function wpe(e,t){const n=new Set(t),o=e.items.filter(r=>r.kind==="turn"&&n.has(r.turnId)),s=e.items.filter(r=>!n.has(_7(r)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,l=e.interactions;if(o.length>0){const r=new Set,a=new Set(i),c=new Set;for(const u of o)for(const d of u.steps)for(const f of d.frames)f.kind==="tool"&&r.add(f.toolCallId);for(const u of l.values())u.toolCallId!==void 0&&r.has(u.toolCallId)&&(c.add(u.interactionId),a.delete(u.interactionId));if(c.size>0){const u=new Map(l);for(const d of c)u.delete(d);l=u}i=a}return{state:{...e,items:s,interactions:l,pendingInteractions:i},changed:!0}}function kpe(e,t){const n=e.tasks.get(t.taskId);if(n&&Epe(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function bpe(e,t){const n=e.interactions.get(t.interactionId);if(n&&_pe(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function _pe(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function xpe(e,t){const n=e.attachments.get(t.attachmentId);if(n&&Spe(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function Spe(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function Cpe(e,t){const n=e.todos.get(t.todoId);if(n&&Mpe(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function Mpe(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function Ape(e,t){const n=e.prompts.get(t.promptId);if(n&&Tpe(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function Tpe(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function Epe(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function Ipe(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,dynamic_workflow:t.modes.dynamic_workflow===null?void 0:t.modes.dynamic_workflow??e.meta.modes?.dynamic_workflow,tower:t.modes.tower===null?void 0:t.modes.tower??e.meta.modes?.tower}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal===null?void 0:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.dynamic_workflow===void 0&&n.tower===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class $pe{constructor(t){this.agentId=t}#e=rpe;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const l=ape(s,i);if(l.gap){o={target:i.target,...l.gap};continue}l.changed&&(s=l.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const l of this.#t)l(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,l)=>l.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,l=[];let r=0;for(const a of n)if(a.kind==="turn"){if(r+=1,r<=i)continue;l.push(a)}else r>i&&l.push(a);n=l,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}var BS;function wt(e,t,n){function o(r,a){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:a,constr:l,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,a);const c=l.prototype,u=Object.keys(c);for(let d=0;dn?.Parent&&r instanceof n.Parent?!0:r?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class mu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class RL extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(BS=globalThis).__zod_globalConfig??(BS.__zod_globalConfig={});const Dv=globalThis.__zod_globalConfig;function Sa(e){return Dv}function PL(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function x7(e,t){return typeof t=="bigint"?t.toString():t}function Kp(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Vv(e){return e==null}function Wv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Lpe(e,t){const n=e/t,o=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o){};function of(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const zpe=Kp(()=>{if(Dv.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Tu(e){if(of(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(of(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function jL(e){return Tu(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Bpe=new Set(["string","number","symbol"]);function Eu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L1(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function hn(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Rpe(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Ppe={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Fpe(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=$1(e._zod.def,{get shape(){const l={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(l[r]=n.shape[r])}return Y0(this,"shape",l),l},checks:[]});return L1(e,i)}function jpe(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=$1(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&delete l[r]}return Y0(this,"shape",l),l},checks:[]});return L1(e,i)}function Ope(e,t){if(!Tu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=$1(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Y0(this,"shape",i),i}});return L1(e,s)}function Hpe(e,t){if(!Tu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Y0(this,"shape",o),o}});return L1(e,n)}function Dpe(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=$1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Y0(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return L1(e,n)}function Vpe(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=$1(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const c in n){if(!(c in r))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(a[c]=e?new e({type:"optional",innerType:r[c]}):r[c])}else for(const c in r)a[c]=e?new e({type:"optional",innerType:r[c]}):r[c];return Y0(this,"shape",a),a},checks:[]});return L1(t,l)}function Wpe(e,t,n){const o=$1(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)i[l]=new e({type:"nonoptional",innerType:s[l]});return Y0(this,"shape",i),i}});return L1(t,o)}function Xc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function U3(e){return typeof e=="string"?e:e?.message}function Ca(e,t,n){const o=e.message?e.message:U3(e.inst?._zod.def?.error?.(e))??U3(t?.error?.(e))??U3(n.customError?.(e))??U3(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:l,...r}=e;return r.path??(r.path=[]),r.message=o,t?.reportInput&&(r.input=l),r}function qv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function sf(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const OL=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,x7,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},HL=wt("$ZodError",OL),DL=wt("$ZodError",OL,{Parent:Error});function Upe(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function Zpe(e,t=n=>n.message){const n={_errors:[]},o=(s,i=[])=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(r=>o({issues:r},[...i,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...i,...l.path]);else{const r=[...i,...l.path];if(r.length===0)n._errors.push(t(l));else{let a=n,c=0;for(;c(t,n,o,s)=>{const i=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new mu;if(l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Ca(a,i,Sa())));throw FL(r,s?.callee),r}return l.value},Zv=e=>async(t,n,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Ca(a,i,Sa())));throw FL(r,s?.callee),r}return l.value},Gp=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new mu;return i.issues.length?{success:!1,error:new(e??HL)(i.issues.map(l=>Ca(l,s,Sa())))}:{success:!0,data:i.value}},Kpe=Gp(DL),Yp=e=>async(t,n,o)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Ca(l,s,Sa())))}:{success:!0,data:i.value}},Gpe=Yp(DL),Ype=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Uv(e)(t,n,s)},Xpe=e=>(t,n,o)=>Uv(e)(t,n,o),Jpe=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Zv(e)(t,n,s)},Qpe=e=>async(t,n,o)=>Zv(e)(t,n,o),e6e=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Gp(e)(t,n,s)},t6e=e=>(t,n,o)=>Gp(e)(t,n,o),n6e=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Yp(e)(t,n,s)},o6e=e=>async(t,n,o)=>Yp(e)(t,n,o),s6e=/^[cC][0-9a-z]{6,}$/,i6e=/^[0-9a-z]+$/,l6e=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,r6e=/^[0-9a-vA-V]{20}$/,a6e=/^[A-Za-z0-9]{27}$/,c6e=/^[a-zA-Z0-9_-]{21}$/,u6e=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,d6e=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,FS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,f6e=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,p6e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function h6e(){return new RegExp(p6e,"u")}const m6e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,g6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,v6e=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,y6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,w6e=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,VL=/^[A-Za-z0-9_-]*$/,k6e=/^https?$/,b6e=/^\+[1-9]\d{6,14}$/,WL="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",_6e=new RegExp(`^${WL}$`);function qL(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function x6e(e){return new RegExp(`^${qL(e)}$`)}function S6e(e){const t=qL({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${WL}T(?:${o})$`)}const C6e=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},M6e=/^-?\d+$/,UL=/^-?\d+(?:\.\d+)?$/,A6e=/^(?:true|false)$/i,T6e=/^[^A-Z]*$/,E6e=/^[^a-z]*$/,Ji=wt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ZL={number:"number",bigint:"bigint",object:"date"},KL=wt("$ZodCheckLessThan",(e,t)=>{Ji.init(e,t);const n=ZL[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Ji.init(e,t);const n=ZL[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),I6e=wt("$ZodCheckMultipleOf",(e,t)=>{Ji.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Lpe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$6e=wt("$ZodCheckNumberFormat",(e,t)=>{Ji.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=Ppe[t.format];e._zod.onattach.push(l=>{const r=l._zod.bag;r.format=t.format,r.minimum=s,r.maximum=i,n&&(r.pattern=M6e)}),e._zod.check=l=>{const r=l.value;if(n){if(!Number.isInteger(r)){l.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:r,inst:e});return}if(!Number.isSafeInteger(r)){r>0?l.issues.push({input:r,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):l.issues.push({input:r,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}ri&&l.issues.push({origin:"number",input:r,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),L6e=wt("$ZodCheckMaxLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Vv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const l=qv(s);o.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),N6e=wt("$ZodCheckMinLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Vv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const l=qv(s);o.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),z6e=wt("$ZodCheckLengthEquals",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Vv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const l=qv(s),r=i>t.length;o.issues.push({origin:l,...r?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Xp=wt("$ZodCheckStringFormat",(e,t)=>{var n,o;Ji.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),B6e=wt("$ZodCheckRegex",(e,t)=>{Xp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),R6e=wt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=T6e),Xp.init(e,t)}),P6e=wt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=E6e),Xp.init(e,t)}),F6e=wt("$ZodCheckIncludes",(e,t)=>{Ji.init(e,t);const n=Eu(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),j6e=wt("$ZodCheckStartsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`^${Eu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),O6e=wt("$ZodCheckEndsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`.*${Eu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),H6e=wt("$ZodCheckOverwrite",(e,t)=>{Ji.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class D6e{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` +`);const r=l.search(/^<\w/m);r!==-1&&(l=l.slice(0,r));const a=H5e.exec(t),c=a?xm(a[1]??""):void 0,u=c?.path?{path:c.path,bytes:Sm(c.bytes)}:void 0,d=D5e.exec(t),f=d?xm(d[1]??""):void 0,p=(d?.[2]??"").replace(/^\n/,""),h=p.indexOf(` +`),m=d?{text:I4(h===-1?"":p.slice(h+1)).replace(/\n$/,""),bytes:Sm(f?.bytes),totalBytes:Sm(f?.total_bytes),truncated:f?.truncated==="true"?!0:f?.truncated==="false"?!1:void 0}:void 0;return{id:o.id??"",category:o.category??"",type:o.type??"",sourceKind:o.source_kind??"",sourceId:o.source_id??"",agentId:o.agent_id,title:I4(s),severity:i,body:I4(l.trim()),outputFile:u,outputPreview:m,raw:n}}function $$(e){if(!e.includes("{h=null,p.value=null},1200))}return En(()=>{h!==null&&clearTimeout(h)}),(k,x)=>(g(),S("div",K5e,[(g(!0),S(Ce,null,rt(t.items,(y,w)=>(g(),S("div",{key:s(y,w),class:Be(["ntn",v(Z5e)(y)]),role:"status"},[b("div",G5e,[W(Ee,{name:i(y),size:"sm",class:"ntn-ico","aria-hidden":"true"},null,8,["name"]),b("span",Y5e,I(c(y)),1)]),b("div",X5e,[y.title?(g(),S("div",J5e,I(y.title),1)):Y("",!0),y.body?(g(),S("div",Q5e,I(y.body),1)):Y("",!0),y.outputFile?(g(),S("div",epe,[W(Ee,{class:"ntn-out-ic",name:"file-text",size:"sm","aria-hidden":"true"}),b("span",{class:"ntn-out-path",title:y.outputFile.path},I(y.outputFile.path),9,tpe),y.outputFile.bytes!==void 0?(g(),S("span",npe,I(u(y.outputFile.bytes)),1)):Y("",!0),W(Nt,{"data-testid":"notification-copy-path",variant:"secondary",size:"sm",type:"button",onClick:_=>m(y.outputFile.path,s(y,w))},{default:ae(()=>[W(Ee,{name:"copy",size:"sm","aria-hidden":"true"}),He(" "+I(p.value===s(y,w)?v(n)("conversation.notification.copied"):v(n)("conversation.notification.copyPath")),1)]),_:2},1032,["onClick"])])):Y("",!0),f(y)?(g(),S("div",ope,[d(y)?(g(),S("div",spe,I(d(y)),1)):Y("",!0),y.outputPreview?.text?(g(),S("pre",ipe,I(y.outputPreview.text),1)):Y("",!0)])):Y("",!0),b("details",lpe,[b("summary",null,[W(Ee,{class:"ntn-raw-car",name:"chevron-right",size:"sm","aria-hidden":"true"}),b("span",null,I(v(n)("conversation.notification.rawPayload")),1)]),b("div",rpe,[b("div",ape,[b("span",cpe,I(v(n)("conversation.notification.fields.type")),1),b("span",upe,I(y.type),1),b("span",dpe,I(v(n)("conversation.notification.fields.source")),1),b("span",fpe,I(y.sourceKind)+" · "+I(y.sourceId),1),b("span",ppe,I(v(n)("conversation.notification.fields.severity")),1),b("span",hpe,I(y.severity||"—"),1)]),b("pre",mpe,I(y.raw),1)])])]),b("div",gpe,[y.createdAt?(g(),ue(Dv,{key:0,time:y.createdAt},null,8,["time"])):Y("",!0)])],2))),128))]))}}),N$=vt(vpe,[["__scopeId","data-v-6e055dc6"]]),zS=dn.clientId,ype="pythinker-code-web",wpe="web";function z$(){return{serverHttpUrl:bpe(),clientId:xpe(),clientName:ype,clientVersion:Spe(),clientUiMode:wpe}}function kpe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function bpe(e){const t=kpe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Yc(e,t,n="v1"){return`${e}/api/${n}${t.startsWith("/")?t:`/${t}`}`}function _pe(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}function xpe(){const e=ls(zS);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Es(zS,t),t}function Spe(){return"0.1.2".trim()?"0.1.2":"0.0.0-dev"}const B$="pythinkerWeb.compaction";class R$ extends Error{constructor(t){super("The subagent model policy changed on the server; reloaded the saved policy."),this.current=t,this.name="SubagentModelPolicyConflictError"}}function Cpe(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}function Mpe(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}const Ape={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function Tpe(e,t){switch(t.op){case"reset":return Epe(e,t);case"turn.upsert":return Lpe(e,t.turn);case"step.upsert":return Npe(e,t.turnId,t.step);case"frame.upsert":return Bpe(e,t);case"append":return Ppe(e,t);case"marker.upsert":return RS(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return RS(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return Ope(e,t.task);case"interaction.upsert":return Hpe(e,t.interaction);case"attachment.upsert":return Vpe(e,t.attachment);case"todo.upsert":return qpe(e,t.todo);case"prompt.upsert":return Zpe(e,t.prompt);case"meta.merge":return Ype(e,t.meta);case"items.remove":return jpe(e,t.ids)}}function Epe(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function BS(e,t){return{...e,kind:"turn",steps:[...t]}}function P$(e){return{kind:"turn",turnId:e,ordinal:Cpe(e),state:"running",origin:{kind:"other"},steps:[]}}function Ipe(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Tu(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function Vv(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function Gp(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function Lpe(e,t){const n=Tu(e,t.turnId);return n?$pe(n,t)?{state:e,changed:!1}:{state:{...e,items:Gp(e.items,t.turnId,o=>BS(t,o.steps))},changed:!0}:{state:{...e,items:Vv(e.items,BS(t,[]))},changed:!0}}function $pe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&("taskId"in e.origin?e.origin.taskId:void 0)===("taskId"in t.origin?t.origin.taskId:void 0)&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function Npe(e,t,n){const o=Tu(e,t)??P$(t),s=o.steps.findIndex(c=>c.stepId===n.stepId);let i,l=!0;if(s>=0){const c=o.steps[s];c&&zpe(c,n)?(l=!1,i=o.steps):i=o.steps.map(u=>u.stepId===n.stepId?{...n,kind:"step",frames:u.frames}:u)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((c,u)=>c.ordinal-u.ordinal);if(!l)return{state:e,changed:!1};const r={...o,steps:[...i]},a=Tu(e,t)?Gp(e.items,t,()=>r):Vv(e.items,r);return{state:{...e,items:a},changed:!0}}function zpe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function Bpe(e,t){const n=Tu(e,t.turnId)??P$(t.turnId),o=n.steps.find(u=>u.stepId===t.stepId)??Ipe(t.stepId,t.turnId),s=o.frames.findIndex(u=>u.frameId===t.frame.frameId);let i;if(s>=0){const u=o.frames[s];if(u!==void 0&&Rpe(u,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const l={...o,frames:[...i]},r=n.steps.some(u=>u.stepId===t.stepId)?n.steps.map(u=>u.stepId===t.stepId?l:u):[...n.steps,l].toSorted((u,d)=>u.ordinal-d.ordinal),a={...n,steps:r},c=Tu(e,t.turnId)?Gp(e.items,t.turnId,()=>a):Vv(e.items,a);return{state:{...e,items:c},changed:!0}}function Rpe(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail&&e.source===t.source:!1}function Ppe(e,t){if(t.target.type==="task")return Fpe(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Tu(e,n),l=i?.steps.find(f=>f.stepId===o),r=l?.frames.find(f=>f.frameId===s);if(!i||!l||!r||r.kind!=="text"&&r.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=F$(r.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const c={...r,text:a.text},u={...l,frames:l.frames.map(f=>f.frameId===s?c:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?u:f)};return{state:{...e,items:Gp(e.items,n,()=>d)},changed:!0}}function Fpe(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=F$(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const l=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},r=new Map(e.tasks);return r.set(n,l),{state:{...e,tasks:r},changed:!0}}function F$(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function RS(e,t,n,o){if(e.items.some(i=>S7(i)===n)){let i=!1;const l=e.items.map(r=>S7(r)!==n||r===t?r:(i=!0,t));return i?{state:{...e,items:l},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let l=i.length;for(let r=0;r=o){l=r;break}}return i.splice(l,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function S7(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function jpe(e,t){const n=new Set(t),o=e.items.filter(r=>r.kind==="turn"&&n.has(r.turnId)),s=e.items.filter(r=>!n.has(S7(r)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,l=e.interactions;if(o.length>0){const r=new Set,a=new Set(i),c=new Set;for(const u of o)for(const d of u.steps)for(const f of d.frames)f.kind==="tool"&&r.add(f.toolCallId);for(const u of l.values())u.toolCallId!==void 0&&r.has(u.toolCallId)&&(c.add(u.interactionId),a.delete(u.interactionId));if(c.size>0){const u=new Map(l);for(const d of c)u.delete(d);l=u}i=a}return{state:{...e,items:s,interactions:l,pendingInteractions:i},changed:!0}}function Ope(e,t){const n=e.tasks.get(t.taskId);if(n&&Gpe(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function Hpe(e,t){const n=e.interactions.get(t.interactionId);if(n&&Dpe(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function Dpe(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function Vpe(e,t){const n=e.attachments.get(t.attachmentId);if(n&&Wpe(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function Wpe(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function qpe(e,t){const n=e.todos.get(t.todoId);if(n&&Upe(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function Upe(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function Zpe(e,t){const n=e.prompts.get(t.promptId);if(n&&Kpe(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function Kpe(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function Gpe(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function Ype(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,dynamic_workflow:t.modes.dynamic_workflow===null?void 0:t.modes.dynamic_workflow??e.meta.modes?.dynamic_workflow,tower:t.modes.tower===null?void 0:t.modes.tower??e.meta.modes?.tower}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal===null?void 0:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.dynamic_workflow===void 0&&n.tower===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class Xpe{constructor(t){this.agentId=t}#e=Ape;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const l=Tpe(s,i);if(l.gap){o={target:i.target,...l.gap};continue}l.changed&&(s=l.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const l of this.#t)l(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,l)=>l.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,l=[];let r=0;for(const a of n)if(a.kind==="turn"){if(r+=1,r<=i)continue;l.push(a)}else r>i&&l.push(a);n=l,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}var PS;function wt(e,t,n){function o(r,a){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:a,constr:l,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,a);const c=l.prototype,u=Object.keys(c);for(let d=0;dn?.Parent&&r instanceof n.Parent?!0:r?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class mu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class j$ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(PS=globalThis).__zod_globalConfig??(PS.__zod_globalConfig={});const Wv=globalThis.__zod_globalConfig;function xa(e){return Wv}function O$(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function C7(e,t){return typeof t=="bigint"?t.toString():t}function Yp(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function qv(e){return e==null}function Uv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Jpe(e,t){const n=e/t,o=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o){};function of(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const e6e=Yp(()=>{if(Wv.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Eu(e){if(of(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(of(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function D$(e){return Eu(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const t6e=new Set(["string","number","symbol"]);function Iu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L1(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function hn(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function n6e(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const o6e={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function s6e(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=I1(e._zod.def,{get shape(){const l={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(l[r]=n.shape[r])}return G0(this,"shape",l),l},checks:[]});return L1(e,i)}function i6e(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=I1(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&delete l[r]}return G0(this,"shape",l),l},checks:[]});return L1(e,i)}function l6e(e,t){if(!Eu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=I1(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return G0(this,"shape",i),i}});return L1(e,s)}function r6e(e,t){if(!Eu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=I1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return G0(this,"shape",o),o}});return L1(e,n)}function a6e(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=I1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return G0(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return L1(e,n)}function c6e(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=I1(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const c in n){if(!(c in r))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(a[c]=e?new e({type:"optional",innerType:r[c]}):r[c])}else for(const c in r)a[c]=e?new e({type:"optional",innerType:r[c]}):r[c];return G0(this,"shape",a),a},checks:[]});return L1(t,l)}function u6e(e,t,n){const o=I1(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)i[l]=new e({type:"nonoptional",innerType:s[l]});return G0(this,"shape",i),i}});return L1(t,o)}function Xc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function K3(e){return typeof e=="string"?e:e?.message}function Sa(e,t,n){const o=e.message?e.message:K3(e.inst?._zod.def?.error?.(e))??K3(t?.error?.(e))??K3(n.customError?.(e))??K3(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:l,...r}=e;return r.path??(r.path=[]),r.message=o,t?.reportInput&&(r.input=l),r}function Zv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function sf(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const V$=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,C7,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},W$=wt("$ZodError",V$),q$=wt("$ZodError",V$,{Parent:Error});function f6e(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function p6e(e,t=n=>n.message){const n={_errors:[]},o=(s,i=[])=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(r=>o({issues:r},[...i,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...i,...l.path]);else{const r=[...i,...l.path];if(r.length===0)n._errors.push(t(l));else{let a=n,c=0;for(;c(t,n,o,s)=>{const i=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new mu;if(l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Sa(a,i,xa())));throw H$(r,s?.callee),r}return l.value},Gv=e=>async(t,n,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Sa(a,i,xa())));throw H$(r,s?.callee),r}return l.value},Xp=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new mu;return i.issues.length?{success:!1,error:new(e??W$)(i.issues.map(l=>Sa(l,s,xa())))}:{success:!0,data:i.value}},h6e=Xp(q$),Jp=e=>async(t,n,o)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Sa(l,s,xa())))}:{success:!0,data:i.value}},m6e=Jp(q$),g6e=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Kv(e)(t,n,s)},v6e=e=>(t,n,o)=>Kv(e)(t,n,o),y6e=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Gv(e)(t,n,s)},w6e=e=>async(t,n,o)=>Gv(e)(t,n,o),k6e=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Xp(e)(t,n,s)},b6e=e=>(t,n,o)=>Xp(e)(t,n,o),_6e=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Jp(e)(t,n,s)},x6e=e=>async(t,n,o)=>Jp(e)(t,n,o),S6e=/^[cC][0-9a-z]{6,}$/,C6e=/^[0-9a-z]+$/,M6e=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,A6e=/^[0-9a-vA-V]{20}$/,T6e=/^[A-Za-z0-9]{27}$/,E6e=/^[a-zA-Z0-9_-]{21}$/,I6e=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,L6e=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,OS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,$6e=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,N6e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function z6e(){return new RegExp(N6e,"u")}const B6e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,R6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,P6e=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,F6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,j6e=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,U$=/^[A-Za-z0-9_-]*$/,O6e=/^https?$/,H6e=/^\+[1-9]\d{6,14}$/,Z$="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",D6e=new RegExp(`^${Z$}$`);function K$(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function V6e(e){return new RegExp(`^${K$(e)}$`)}function W6e(e){const t=K$({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Z$}T(?:${o})$`)}const q6e=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},U6e=/^-?\d+$/,G$=/^-?\d+(?:\.\d+)?$/,Z6e=/^(?:true|false)$/i,K6e=/^[^A-Z]*$/,G6e=/^[^a-z]*$/,Ji=wt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Y$={number:"number",bigint:"bigint",object:"date"},X$=wt("$ZodCheckLessThan",(e,t)=>{Ji.init(e,t);const n=Y$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Ji.init(e,t);const n=Y$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Y6e=wt("$ZodCheckMultipleOf",(e,t)=>{Ji.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Jpe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),X6e=wt("$ZodCheckNumberFormat",(e,t)=>{Ji.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=o6e[t.format];e._zod.onattach.push(l=>{const r=l._zod.bag;r.format=t.format,r.minimum=s,r.maximum=i,n&&(r.pattern=U6e)}),e._zod.check=l=>{const r=l.value;if(n){if(!Number.isInteger(r)){l.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:r,inst:e});return}if(!Number.isSafeInteger(r)){r>0?l.issues.push({input:r,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):l.issues.push({input:r,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}ri&&l.issues.push({origin:"number",input:r,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),J6e=wt("$ZodCheckMaxLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!qv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const l=Zv(s);o.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Q6e=wt("$ZodCheckMinLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!qv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const l=Zv(s);o.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ehe=wt("$ZodCheckLengthEquals",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!qv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const l=Zv(s),r=i>t.length;o.issues.push({origin:l,...r?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Qp=wt("$ZodCheckStringFormat",(e,t)=>{var n,o;Ji.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),the=wt("$ZodCheckRegex",(e,t)=>{Qp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),nhe=wt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=K6e),Qp.init(e,t)}),ohe=wt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=G6e),Qp.init(e,t)}),she=wt("$ZodCheckIncludes",(e,t)=>{Ji.init(e,t);const n=Iu(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),ihe=wt("$ZodCheckStartsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`^${Iu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),lhe=wt("$ZodCheckEndsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`.*${Iu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),rhe=wt("$ZodCheckOverwrite",(e,t)=>{Ji.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class ahe{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` `).filter(l=>l),s=Math.min(...o.map(l=>l.length-l.trimStart().length)),i=o.map(l=>l.slice(s)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(` -`))}}const V6e={major:4,minor:4,patch:3},Go=wt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=V6e;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,r,a)=>{let c=Xc(l),u;for(const d of r){if(d._zod.def.when){if(qpe(l)||!d._zod.def.when(l))continue}else if(c)continue;const f=l.issues.length,p=d._zod.check(l);if(p instanceof Promise&&a?.async===!1)throw new mu;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,l.issues.length!==f&&(c||(c=Xc(l,f)))});else{if(l.issues.length===f)continue;c||(c=Xc(l,f))}}return u?u.then(()=>l):l},i=(l,r,a)=>{if(Xc(l))return l.aborted=!0,l;const c=s(r,o,a);if(c instanceof Promise){if(a.async===!1)throw new mu;return c.then(u=>e._zod.parse(u,a))}return e._zod.parse(c,a)};e._zod.run=(l,r)=>{if(r.skipChecks)return e._zod.parse(l,r);if(r.direction==="backward"){const c=e._zod.parse({value:l.value,issues:[]},{...r,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,l,r)):i(c,l,r)}const a=e._zod.parse(l,r);if(a instanceof Promise){if(r.async===!1)throw new mu;return a.then(c=>s(c,o,r))}return s(a,o,r)}}_o(e,"~standard",()=>({validate:s=>{try{const i=Kpe(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Gpe(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Kv=wt("$ZodString",(e,t)=>{Go.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??C6e(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ho=wt("$ZodStringFormat",(e,t)=>{Xp.init(e,t),Kv.init(e,t)}),W6e=wt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=d6e),Ho.init(e,t)}),q6e=wt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=FS(o))}else t.pattern??(t.pattern=FS());Ho.init(e,t)}),U6e=wt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=f6e),Ho.init(e,t)}),Z6e=wt("$ZodURL",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{try{const o=n.value.trim();if(!t.normalize&&t.protocol?.source===k6e.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),K6e=wt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=h6e()),Ho.init(e,t)}),G6e=wt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=c6e),Ho.init(e,t)}),Y6e=wt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=s6e),Ho.init(e,t)}),X6e=wt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=i6e),Ho.init(e,t)}),J6e=wt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=l6e),Ho.init(e,t)}),Q6e=wt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=r6e),Ho.init(e,t)}),ehe=wt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=a6e),Ho.init(e,t)}),the=wt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=S6e(t)),Ho.init(e,t)}),nhe=wt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=_6e),Ho.init(e,t)}),ohe=wt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=x6e(t)),Ho.init(e,t)}),she=wt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=u6e),Ho.init(e,t)}),ihe=wt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=m6e),Ho.init(e,t),e._zod.bag.format="ipv4"}),lhe=wt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=g6e),Ho.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),rhe=wt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=v6e),Ho.init(e,t)}),ahe=wt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=y6e),Ho.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function YL(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const che=wt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=w6e),Ho.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{YL(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function uhe(e){if(!VL.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return YL(n)}const dhe=wt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=VL),Ho.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{uhe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),fhe=wt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=b6e),Ho.init(e,t)});function phe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const hhe=wt("$ZodJWT",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{phe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),XL=wt("$ZodNumber",(e,t)=>{Go.init(e,t),e._zod.pattern=e._zod.bag.pattern??UL,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),mhe=wt("$ZodNumberFormat",(e,t)=>{$6e.init(e,t),XL.init(e,t)}),ghe=wt("$ZodBoolean",(e,t)=>{Go.init(e,t),e._zod.pattern=A6e,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),vhe=wt("$ZodUnknown",(e,t)=>{Go.init(e,t),e._zod.parse=n=>n}),yhe=wt("$ZodNever",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function jS(e,t,n){e.issues.length&&t.issues.push(...Jc(n,e.issues)),t.value[n]=e.value}const whe=wt("$ZodArray",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let l=0;ljS(c,n,l))):jS(a,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function D5(e,t,n,o,s,i){const l=n in o;if(e.issues.length){if(s&&i&&!l)return;t.issues.push(...Jc(n,e.issues))}if(!l&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function JL(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=Rpe(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function QL(e,t,n,o,s,i){const l=[],r=s.keySet,a=s.catchall._zod,c=a.def.type,u=a.optin==="optional",d=a.optout==="optional";for(const f in t){if(f==="__proto__"||r.has(f))continue;if(c==="never"){l.push(f);continue}const p=a.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(h=>D5(h,n,f,t,u,d))):D5(p,n,f,t,u,d)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const khe=wt("$ZodObject",(e,t)=>{if(Go.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const r=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...r};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=Kp(()=>JL(t));_o(e._zod,"propValues",()=>{const r=t.shape,a={};for(const c in r){const u=r[c]._zod;if(u.values){a[c]??(a[c]=new Set);for(const d of u.values)a[c].add(d)}}return a});const s=of,i=t.catchall;let l;e._zod.parse=(r,a)=>{l??(l=o.value);const c=r.value;if(!s(c))return r.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),r;r.value={};const u=[],d=l.shape;for(const f of l.keys){const p=d[f],h=p._zod.optin==="optional",m=p._zod.optout==="optional",k=p._zod.run({value:c[f],issues:[]},a);k instanceof Promise?u.push(k.then(x=>D5(x,r,f,c,h,m))):D5(k,r,f,c,h,m)}return i?QL(u,c,r,a,o.value,e):u.length?Promise.all(u).then(()=>r):r}}),bhe=wt("$ZodObjectJIT",(e,t)=>{khe.init(e,t);const n=e._zod.parse,o=Kp(()=>JL(t)),s=f=>{const p=new D6e(["shape","payload","ctx"]),h=o.value,m=w=>{const _=PS(w);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};p.write("const input = payload.value;");const k=Object.create(null);let x=0;for(const w of h.keys)k[w]=`key_${x++}`;p.write("const newResult = {};");for(const w of h.keys){const _=k[w],M=PS(w),P=f[w],B=P?._zod?.optin==="optional",$=P?._zod?.optout==="optional";p.write(`const ${_} = ${m(w)};`),B&&$?p.write(` +`))}}const che={major:4,minor:4,patch:3},Go=wt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=che;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,r,a)=>{let c=Xc(l),u;for(const d of r){if(d._zod.def.when){if(d6e(l)||!d._zod.def.when(l))continue}else if(c)continue;const f=l.issues.length,p=d._zod.check(l);if(p instanceof Promise&&a?.async===!1)throw new mu;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,l.issues.length!==f&&(c||(c=Xc(l,f)))});else{if(l.issues.length===f)continue;c||(c=Xc(l,f))}}return u?u.then(()=>l):l},i=(l,r,a)=>{if(Xc(l))return l.aborted=!0,l;const c=s(r,o,a);if(c instanceof Promise){if(a.async===!1)throw new mu;return c.then(u=>e._zod.parse(u,a))}return e._zod.parse(c,a)};e._zod.run=(l,r)=>{if(r.skipChecks)return e._zod.parse(l,r);if(r.direction==="backward"){const c=e._zod.parse({value:l.value,issues:[]},{...r,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,l,r)):i(c,l,r)}const a=e._zod.parse(l,r);if(a instanceof Promise){if(r.async===!1)throw new mu;return a.then(c=>s(c,o,r))}return s(a,o,r)}}_o(e,"~standard",()=>({validate:s=>{try{const i=h6e(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return m6e(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Yv=wt("$ZodString",(e,t)=>{Go.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??q6e(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ho=wt("$ZodStringFormat",(e,t)=>{Qp.init(e,t),Yv.init(e,t)}),uhe=wt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=L6e),Ho.init(e,t)}),dhe=wt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=OS(o))}else t.pattern??(t.pattern=OS());Ho.init(e,t)}),fhe=wt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$6e),Ho.init(e,t)}),phe=wt("$ZodURL",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{try{const o=n.value.trim();if(!t.normalize&&t.protocol?.source===O6e.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),hhe=wt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=z6e()),Ho.init(e,t)}),mhe=wt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=E6e),Ho.init(e,t)}),ghe=wt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=S6e),Ho.init(e,t)}),vhe=wt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=C6e),Ho.init(e,t)}),yhe=wt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=M6e),Ho.init(e,t)}),whe=wt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=A6e),Ho.init(e,t)}),khe=wt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=T6e),Ho.init(e,t)}),bhe=wt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=W6e(t)),Ho.init(e,t)}),_he=wt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=D6e),Ho.init(e,t)}),xhe=wt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=V6e(t)),Ho.init(e,t)}),She=wt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=I6e),Ho.init(e,t)}),Che=wt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=B6e),Ho.init(e,t),e._zod.bag.format="ipv4"}),Mhe=wt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=R6e),Ho.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ahe=wt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=P6e),Ho.init(e,t)}),The=wt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=F6e),Ho.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Q$(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ehe=wt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=j6e),Ho.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Q$(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ihe(e){if(!U$.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Q$(n)}const Lhe=wt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=U$),Ho.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Ihe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),$he=wt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=H6e),Ho.init(e,t)});function Nhe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const zhe=wt("$ZodJWT",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{Nhe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),eN=wt("$ZodNumber",(e,t)=>{Go.init(e,t),e._zod.pattern=e._zod.bag.pattern??G$,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),Bhe=wt("$ZodNumberFormat",(e,t)=>{X6e.init(e,t),eN.init(e,t)}),Rhe=wt("$ZodBoolean",(e,t)=>{Go.init(e,t),e._zod.pattern=Z6e,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),Phe=wt("$ZodUnknown",(e,t)=>{Go.init(e,t),e._zod.parse=n=>n}),Fhe=wt("$ZodNever",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function HS(e,t,n){e.issues.length&&t.issues.push(...Jc(n,e.issues)),t.value[n]=e.value}const jhe=wt("$ZodArray",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let l=0;lHS(c,n,l))):HS(a,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function V5(e,t,n,o,s,i){const l=n in o;if(e.issues.length){if(s&&i&&!l)return;t.issues.push(...Jc(n,e.issues))}if(!l&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function tN(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=n6e(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function nN(e,t,n,o,s,i){const l=[],r=s.keySet,a=s.catchall._zod,c=a.def.type,u=a.optin==="optional",d=a.optout==="optional";for(const f in t){if(f==="__proto__"||r.has(f))continue;if(c==="never"){l.push(f);continue}const p=a.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(h=>V5(h,n,f,t,u,d))):V5(p,n,f,t,u,d)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Ohe=wt("$ZodObject",(e,t)=>{if(Go.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const r=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...r};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=Yp(()=>tN(t));_o(e._zod,"propValues",()=>{const r=t.shape,a={};for(const c in r){const u=r[c]._zod;if(u.values){a[c]??(a[c]=new Set);for(const d of u.values)a[c].add(d)}}return a});const s=of,i=t.catchall;let l;e._zod.parse=(r,a)=>{l??(l=o.value);const c=r.value;if(!s(c))return r.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),r;r.value={};const u=[],d=l.shape;for(const f of l.keys){const p=d[f],h=p._zod.optin==="optional",m=p._zod.optout==="optional",k=p._zod.run({value:c[f],issues:[]},a);k instanceof Promise?u.push(k.then(x=>V5(x,r,f,c,h,m))):V5(k,r,f,c,h,m)}return i?nN(u,c,r,a,o.value,e):u.length?Promise.all(u).then(()=>r):r}}),Hhe=wt("$ZodObjectJIT",(e,t)=>{Ohe.init(e,t);const n=e._zod.parse,o=Yp(()=>tN(t)),s=f=>{const p=new ahe(["shape","payload","ctx"]),h=o.value,m=w=>{const _=jS(w);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};p.write("const input = payload.value;");const k=Object.create(null);let x=0;for(const w of h.keys)k[w]=`key_${x++}`;p.write("const newResult = {};");for(const w of h.keys){const _=k[w],A=jS(w),P=f[w],z=P?._zod?.optin==="optional",L=P?._zod?.optout==="optional";p.write(`const ${_} = ${m(w)};`),z&&L?p.write(` if (${_}.issues.length) { - if (${M} in input) { + if (${A} in input) { payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ ...iss, - path: iss.path ? [${M}, ...iss.path] : [${M}] + path: iss.path ? [${A}, ...iss.path] : [${A}] }))); } } if (${_}.value === undefined) { - if (${M} in input) { - newResult[${M}] = undefined; + if (${A} in input) { + newResult[${A}] = undefined; } } else { - newResult[${M}] = ${_}.value; + newResult[${A}] = ${_}.value; } - `):B?p.write(` + `):z?p.write(` if (${_}.issues.length) { payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ ...iss, - path: iss.path ? [${M}, ...iss.path] : [${M}] + path: iss.path ? [${A}, ...iss.path] : [${A}] }))); } if (${_}.value === undefined) { - if (${M} in input) { - newResult[${M}] = undefined; + if (${A} in input) { + newResult[${A}] = undefined; } } else { - newResult[${M}] = ${_}.value; + newResult[${A}] = ${_}.value; } `):p.write(` - const ${_}_present = ${M} in input; + const ${_}_present = ${A} in input; if (${_}.issues.length) { payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ ...iss, - path: iss.path ? [${M}, ...iss.path] : [${M}] + path: iss.path ? [${A}, ...iss.path] : [${A}] }))); } if (!${_}_present && !${_}.issues.length) { @@ -953,86 +867,86 @@ pre[data-md-nums="on"] [data-line]::before { code: "invalid_type", expected: "nonoptional", input: undefined, - path: [${M}] + path: [${A}] }); } if (${_}_present) { if (${_}.value === undefined) { - newResult[${M}] = undefined; + newResult[${A}] = undefined; } else { - newResult[${M}] = ${_}.value; + newResult[${A}] = ${_}.value; } } - `)}p.write("payload.value = newResult;"),p.write("return payload;");const y=p.compile();return(w,_)=>y(f,w,_)};let i;const l=of,r=!Dv.jitless,c=r&&zpe.value,u=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=o.value);const h=f.value;return l(h)?r&&c&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),f=i(f,p),u?QL([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function OS(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Xc(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>Ca(l,o,Sa())))}),t)}const eN=wt("$ZodUnion",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_o(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_o(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),_o(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Wv(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(n)return n(o,s);let i=!1;const l=[];for(const r of t.options){const a=r._zod.run({value:o.value,issues:[]},s);if(a instanceof Promise)l.push(a),i=!0;else{if(a.issues.length===0)return a;l.push(a)}}return i?Promise.all(l).then(r=>OS(r,o,e,s)):OS(l,o,e,s)}}),_he=wt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,eN.init(e,t);const n=e._zod.parse;_o(e._zod,"propValues",()=>{const s={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[r,a]of Object.entries(l)){s[r]||(s[r]=new Set);for(const c of a)s[r].add(c)}}return s});const o=Kp(()=>{const s=t.options,i=new Map;for(const l of s){const r=l._zod.propValues?.[t.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const a of r){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,l)}}return i});e._zod.parse=(s,i)=>{const l=s.value;if(!of(l))return s.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),s;const r=o.value.get(l?.[t.discriminator]);return r?r._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:l,path:[t.discriminator],inst:e}),s)}}),xhe=wt("$ZodIntersection",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),l=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([a,c])=>HS(n,a,c)):HS(n,i,l)}});function S7(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Tu(e)&&Tu(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const l=S7(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};s[i]=l.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;or.l&&r.r).map(([r])=>r);if(i.length&&s&&e.issues.push({...s,keys:i}),Xc(e))return e;const l=S7(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const She=wt("$ZodRecord",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Tu(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const r=new Set;for(const c of l)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){r.add(typeof c=="number"?c.toString():c);const u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Ca(p,o,Sa())),input:c,path:[c],inst:e});continue}const d=u.value,f=t.valueType._zod.run({value:s[c],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...Jc(c,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Jc(c,f.issues)),n.value[d]=f.value)}let a;for(const c in s)r.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const r of Reflect.ownKeys(s)){if(r==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,r))continue;let a=t.keyType._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof r=="string"&&UL.test(r)&&a.issues.length){const d=t.keyType._zod.run({value:Number(r),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[r]=s[r]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>Ca(d,o,Sa())),input:r,path:[r],inst:e});continue}const u=t.valueType._zod.run({value:s[r],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&n.issues.push(...Jc(r,d.issues)),n.value[a.value]=d.value})):(u.issues.length&&n.issues.push(...Jc(r,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Che=wt("$ZodEnum",(e,t)=>{Go.init(e,t);const n=PL(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>Bpe.has(typeof s)).map(s=>typeof s=="string"?Eu(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const l=s.value;return o.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),Mhe=wt("$ZodLiteral",(e,t)=>{if(Go.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Eu(o):o?Eu(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Ahe=wt("$ZodTransform",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new RL(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n.fallback=!0,n));if(s instanceof Promise)throw new mu;return n.value=s,n.fallback=!0,n}});function DS(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const tN=wt("$ZodOptional",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Wv(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>DS(l,s)):DS(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),The=wt("$ZodExactOptional",(e,t)=>{tN.init(e,t),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Ehe=wt("$ZodNullable",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.innerType._zod.optin),_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Wv(n.source)}|null)$`):void 0}),_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Ihe=wt("$ZodDefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>VS(i,t)):VS(s,t)}});function VS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const $he=wt("$ZodPrefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Lhe=wt("$ZodNonOptional",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>WS(i,e)):WS(s,e)}});function WS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Nhe=wt("$ZodCatch",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Ca(l,o,Sa()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Ca(i,o,Sa()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),zhe=wt("$ZodPipe",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>t.in._zod.values),_o(e._zod,"optin",()=>t.in._zod.optin),_o(e._zod,"optout",()=>t.out._zod.optout),_o(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(l=>Z3(l,t.in,o)):Z3(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>Z3(i,t.out,o)):Z3(s,t.out,o)}});function Z3(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Bhe=wt("$ZodReadonly",(e,t)=>{Go.init(e,t),_o(e._zod,"propValues",()=>t.innerType._zod.propValues),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"optin",()=>t.innerType?._zod?.optin),_o(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(qS):qS(s)}});function qS(e){return e.value=Object.freeze(e.value),e}const Rhe=wt("$ZodCustom",(e,t)=>{Ji.init(e,t),Go.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>US(i,n,o,e));US(s,n,o,e)}});function US(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(sf(s))}}var ZS;class Phe{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Fhe(){return new Phe}(ZS=globalThis).__zod_globalRegistry??(ZS.__zod_globalRegistry=Fhe());const Xd=globalThis.__zod_globalRegistry;function jhe(e,t){return new e({type:"string",...hn(t)})}function Ohe(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...hn(t)})}function KS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...hn(t)})}function Hhe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...hn(t)})}function Dhe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...hn(t)})}function Vhe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...hn(t)})}function Whe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...hn(t)})}function qhe(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...hn(t)})}function Uhe(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...hn(t)})}function Zhe(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...hn(t)})}function Khe(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...hn(t)})}function Ghe(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...hn(t)})}function Yhe(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...hn(t)})}function Xhe(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...hn(t)})}function Jhe(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...hn(t)})}function Qhe(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...hn(t)})}function eme(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...hn(t)})}function tme(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...hn(t)})}function nme(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...hn(t)})}function ome(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...hn(t)})}function sme(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...hn(t)})}function ime(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...hn(t)})}function lme(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...hn(t)})}function rme(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...hn(t)})}function ame(e,t){return new e({type:"string",format:"date",check:"string_format",...hn(t)})}function cme(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...hn(t)})}function ume(e,t){return new e({type:"string",format:"duration",check:"string_format",...hn(t)})}function dme(e,t){return new e({type:"number",checks:[],...hn(t)})}function fme(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...hn(t)})}function pme(e,t){return new e({type:"boolean",...hn(t)})}function hme(e){return new e({type:"unknown"})}function mme(e,t){return new e({type:"never",...hn(t)})}function GS(e,t){return new KL({check:"less_than",...hn(t),value:e,inclusive:!1})}function xm(e,t){return new KL({check:"less_than",...hn(t),value:e,inclusive:!0})}function YS(e,t){return new GL({check:"greater_than",...hn(t),value:e,inclusive:!1})}function Sm(e,t){return new GL({check:"greater_than",...hn(t),value:e,inclusive:!0})}function XS(e,t){return new I6e({check:"multiple_of",...hn(t),value:e})}function nN(e,t){return new L6e({check:"max_length",...hn(t),maximum:e})}function V5(e,t){return new N6e({check:"min_length",...hn(t),minimum:e})}function oN(e,t){return new z6e({check:"length_equals",...hn(t),length:e})}function gme(e,t){return new B6e({check:"string_format",format:"regex",...hn(t),pattern:e})}function vme(e){return new R6e({check:"string_format",format:"lowercase",...hn(e)})}function yme(e){return new P6e({check:"string_format",format:"uppercase",...hn(e)})}function wme(e,t){return new F6e({check:"string_format",format:"includes",...hn(t),includes:e})}function kme(e,t){return new j6e({check:"string_format",format:"starts_with",...hn(t),prefix:e})}function bme(e,t){return new O6e({check:"string_format",format:"ends_with",...hn(t),suffix:e})}function Vu(e){return new H6e({check:"overwrite",tx:e})}function _me(e){return Vu(t=>t.normalize(e))}function xme(){return Vu(e=>e.trim())}function Sme(){return Vu(e=>e.toLowerCase())}function Cme(){return Vu(e=>e.toUpperCase())}function Mme(){return Vu(e=>Npe(e))}function Ame(e,t,n){return new e({type:"array",element:t,...hn(n)})}function Tme(e,t,n){return new e({type:"custom",check:"custom",fn:t,...hn(n)})}function Eme(e,t){const n=Ime(o=>(o.addIssue=s=>{if(typeof s=="string")o.issues.push(sf(s,o.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(sf(i))}},e(o.value,o)),t);return n}function Ime(e,t){const n=new Ji({check:"custom",...hn(t)});return n._zod.check=e,n}function sN(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Xd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function As(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const r=e._zod.toJSONSchema?.();if(r)l.schema=r;else{const u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,u);else{const f=l.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,u)}const d=e._zod.parent;d&&(l.ref||(l.ref=d),As(d,t,u),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(l.schema,a),t.io==="input"&&bi(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((o=l.schema).default??(o.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function iN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const l of e.seen.entries()){const r=e.metadataRegistry.get(l[0])?.id;if(r){const a=o.get(r);if(a&&a!==l[0])throw new Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(r,l[0])}}const s=l=>{const r=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(l[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const p=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=p,{defId:p,ref:`${f("__shared")}#/${r}/${p}`}}if(l[1]===n)return{ref:"#"};const c=`#/${r}/`,u=l[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=l=>{if(l[1].schema.$ref)return;const r=l[1],{ref:a,defId:c}=s(l);r.def={...r.schema},c&&(r.defId=c);const u=r.schema;for(const d in u)delete u[d];u.$ref=a};if(e.cycles==="throw")for(const l of e.seen.entries()){const r=l[1];if(r.cycle)throw new Error(`Cycle detected: #/${r.cycle?.join("/")}/ + `)}p.write("payload.value = newResult;"),p.write("return payload;");const y=p.compile();return(w,_)=>y(f,w,_)};let i;const l=of,r=!Wv.jitless,c=r&&e6e.value,u=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=o.value);const h=f.value;return l(h)?r&&c&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),f=i(f,p),u?nN([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function DS(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Xc(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>Sa(l,o,xa())))}),t)}const oN=wt("$ZodUnion",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_o(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_o(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),_o(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Uv(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(n)return n(o,s);let i=!1;const l=[];for(const r of t.options){const a=r._zod.run({value:o.value,issues:[]},s);if(a instanceof Promise)l.push(a),i=!0;else{if(a.issues.length===0)return a;l.push(a)}}return i?Promise.all(l).then(r=>DS(r,o,e,s)):DS(l,o,e,s)}}),Dhe=wt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,oN.init(e,t);const n=e._zod.parse;_o(e._zod,"propValues",()=>{const s={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[r,a]of Object.entries(l)){s[r]||(s[r]=new Set);for(const c of a)s[r].add(c)}}return s});const o=Yp(()=>{const s=t.options,i=new Map;for(const l of s){const r=l._zod.propValues?.[t.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const a of r){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,l)}}return i});e._zod.parse=(s,i)=>{const l=s.value;if(!of(l))return s.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),s;const r=o.value.get(l?.[t.discriminator]);return r?r._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:l,path:[t.discriminator],inst:e}),s)}}),Vhe=wt("$ZodIntersection",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),l=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([a,c])=>VS(n,a,c)):VS(n,i,l)}});function M7(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Eu(e)&&Eu(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const l=M7(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};s[i]=l.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;or.l&&r.r).map(([r])=>r);if(i.length&&s&&e.issues.push({...s,keys:i}),Xc(e))return e;const l=M7(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const Whe=wt("$ZodRecord",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Eu(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const r=new Set;for(const c of l)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){r.add(typeof c=="number"?c.toString():c);const u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Sa(p,o,xa())),input:c,path:[c],inst:e});continue}const d=u.value,f=t.valueType._zod.run({value:s[c],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...Jc(c,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Jc(c,f.issues)),n.value[d]=f.value)}let a;for(const c in s)r.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const r of Reflect.ownKeys(s)){if(r==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,r))continue;let a=t.keyType._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof r=="string"&&G$.test(r)&&a.issues.length){const d=t.keyType._zod.run({value:Number(r),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[r]=s[r]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>Sa(d,o,xa())),input:r,path:[r],inst:e});continue}const u=t.valueType._zod.run({value:s[r],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&n.issues.push(...Jc(r,d.issues)),n.value[a.value]=d.value})):(u.issues.length&&n.issues.push(...Jc(r,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),qhe=wt("$ZodEnum",(e,t)=>{Go.init(e,t);const n=O$(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>t6e.has(typeof s)).map(s=>typeof s=="string"?Iu(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const l=s.value;return o.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),Uhe=wt("$ZodLiteral",(e,t)=>{if(Go.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Iu(o):o?Iu(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Zhe=wt("$ZodTransform",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new j$(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n.fallback=!0,n));if(s instanceof Promise)throw new mu;return n.value=s,n.fallback=!0,n}});function WS(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const sN=wt("$ZodOptional",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Uv(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>WS(l,s)):WS(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Khe=wt("$ZodExactOptional",(e,t)=>{sN.init(e,t),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Ghe=wt("$ZodNullable",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.innerType._zod.optin),_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Uv(n.source)}|null)$`):void 0}),_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Yhe=wt("$ZodDefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>qS(i,t)):qS(s,t)}});function qS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Xhe=wt("$ZodPrefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Jhe=wt("$ZodNonOptional",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>US(i,e)):US(s,e)}});function US(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Qhe=wt("$ZodCatch",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Sa(l,o,xa()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Sa(i,o,xa()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),eme=wt("$ZodPipe",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>t.in._zod.values),_o(e._zod,"optin",()=>t.in._zod.optin),_o(e._zod,"optout",()=>t.out._zod.optout),_o(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(l=>G3(l,t.in,o)):G3(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>G3(i,t.out,o)):G3(s,t.out,o)}});function G3(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const tme=wt("$ZodReadonly",(e,t)=>{Go.init(e,t),_o(e._zod,"propValues",()=>t.innerType._zod.propValues),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"optin",()=>t.innerType?._zod?.optin),_o(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(ZS):ZS(s)}});function ZS(e){return e.value=Object.freeze(e.value),e}const nme=wt("$ZodCustom",(e,t)=>{Ji.init(e,t),Go.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>KS(i,n,o,e));KS(s,n,o,e)}});function KS(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(sf(s))}}var GS;class ome{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function sme(){return new ome}(GS=globalThis).__zod_globalRegistry??(GS.__zod_globalRegistry=sme());const Xd=globalThis.__zod_globalRegistry;function ime(e,t){return new e({type:"string",...hn(t)})}function lme(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...hn(t)})}function YS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...hn(t)})}function rme(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...hn(t)})}function ame(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...hn(t)})}function cme(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...hn(t)})}function ume(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...hn(t)})}function dme(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...hn(t)})}function fme(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...hn(t)})}function pme(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...hn(t)})}function hme(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...hn(t)})}function mme(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...hn(t)})}function gme(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...hn(t)})}function vme(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...hn(t)})}function yme(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...hn(t)})}function wme(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...hn(t)})}function kme(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...hn(t)})}function bme(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...hn(t)})}function _me(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...hn(t)})}function xme(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...hn(t)})}function Sme(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...hn(t)})}function Cme(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...hn(t)})}function Mme(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...hn(t)})}function Ame(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...hn(t)})}function Tme(e,t){return new e({type:"string",format:"date",check:"string_format",...hn(t)})}function Eme(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...hn(t)})}function Ime(e,t){return new e({type:"string",format:"duration",check:"string_format",...hn(t)})}function Lme(e,t){return new e({type:"number",checks:[],...hn(t)})}function $me(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...hn(t)})}function Nme(e,t){return new e({type:"boolean",...hn(t)})}function zme(e){return new e({type:"unknown"})}function Bme(e,t){return new e({type:"never",...hn(t)})}function XS(e,t){return new X$({check:"less_than",...hn(t),value:e,inclusive:!1})}function Cm(e,t){return new X$({check:"less_than",...hn(t),value:e,inclusive:!0})}function JS(e,t){return new J$({check:"greater_than",...hn(t),value:e,inclusive:!1})}function Mm(e,t){return new J$({check:"greater_than",...hn(t),value:e,inclusive:!0})}function QS(e,t){return new Y6e({check:"multiple_of",...hn(t),value:e})}function iN(e,t){return new J6e({check:"max_length",...hn(t),maximum:e})}function W5(e,t){return new Q6e({check:"min_length",...hn(t),minimum:e})}function lN(e,t){return new ehe({check:"length_equals",...hn(t),length:e})}function Rme(e,t){return new the({check:"string_format",format:"regex",...hn(t),pattern:e})}function Pme(e){return new nhe({check:"string_format",format:"lowercase",...hn(e)})}function Fme(e){return new ohe({check:"string_format",format:"uppercase",...hn(e)})}function jme(e,t){return new she({check:"string_format",format:"includes",...hn(t),includes:e})}function Ome(e,t){return new ihe({check:"string_format",format:"starts_with",...hn(t),prefix:e})}function Hme(e,t){return new lhe({check:"string_format",format:"ends_with",...hn(t),suffix:e})}function Vu(e){return new rhe({check:"overwrite",tx:e})}function Dme(e){return Vu(t=>t.normalize(e))}function Vme(){return Vu(e=>e.trim())}function Wme(){return Vu(e=>e.toLowerCase())}function qme(){return Vu(e=>e.toUpperCase())}function Ume(){return Vu(e=>Qpe(e))}function Zme(e,t,n){return new e({type:"array",element:t,...hn(n)})}function Kme(e,t,n){return new e({type:"custom",check:"custom",fn:t,...hn(n)})}function Gme(e,t){const n=Yme(o=>(o.addIssue=s=>{if(typeof s=="string")o.issues.push(sf(s,o.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(sf(i))}},e(o.value,o)),t);return n}function Yme(e,t){const n=new Ji({check:"custom",...hn(t)});return n._zod.check=e,n}function rN(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Xd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function As(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const r=e._zod.toJSONSchema?.();if(r)l.schema=r;else{const u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,u);else{const f=l.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,u)}const d=e._zod.parent;d&&(l.ref||(l.ref=d),As(d,t,u),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(l.schema,a),t.io==="input"&&bi(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((o=l.schema).default??(o.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function aN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const l of e.seen.entries()){const r=e.metadataRegistry.get(l[0])?.id;if(r){const a=o.get(r);if(a&&a!==l[0])throw new Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(r,l[0])}}const s=l=>{const r=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(l[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const p=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=p,{defId:p,ref:`${f("__shared")}#/${r}/${p}`}}if(l[1]===n)return{ref:"#"};const c=`#/${r}/`,u=l[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=l=>{if(l[1].schema.$ref)return;const r=l[1],{ref:a,defId:c}=s(l);r.def={...r.schema},c&&(r.defId=c);const u=r.schema;for(const d in u)delete u[d];u.$ref=a};if(e.cycles==="throw")for(const l of e.seen.entries()){const r=l[1];if(r.cycle)throw new Error(`Cycle detected: #/${r.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const r=l[1];if(t===l[0]){i(l);continue}if(e.external){const c=e.external.registry.get(l[0])?.id;if(t!==l[0]&&c){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(r.cycle){i(l);continue}if(r.count>1&&e.reused==="ref"){i(l);continue}}}function lN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=r=>{const a=e.seen.get(r);if(a.ref===null)return;const c=a.def??a.schema,u={...c},d=a.ref;if(a.ref=null,d){o(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),r._zod.parent===d)for(const k in c)k==="$ref"||k==="allOf"||k in u||delete c[k];if(h.$ref&&p.def)for(const k in c)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(c[k])===JSON.stringify(p.def[k])&&delete c[k]}const f=r._zod.parent;if(f&&f!==d){o(f);const p=e.seen.get(f);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(const h in c)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(c[h])===JSON.stringify(p.def[h])&&delete c[h]}e.override({zodSchema:r,jsonSchema:c,path:a.path??[]})};for(const r of[...e.seen.entries()].reverse())o(r[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const l=e.external?.defs??{};for(const r of e.seen.entries()){const a=r[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,l[a.defId]=a.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:W5(t,"input",e.processors),output:W5(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function bi(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return bi(o.element,n);if(o.type==="set")return bi(o.valueType,n);if(o.type==="lazy")return bi(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return bi(o.innerType,n);if(o.type==="intersection")return bi(o.left,n)||bi(o.right,n);if(o.type==="record"||o.type==="map")return bi(o.keyType,n)||bi(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:bi(o.in,n)||bi(o.out,n);if(o.type==="object"){for(const s in o.shape)if(bi(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(bi(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(bi(s,n))return!0;return!!(o.rest&&bi(o.rest,n))}return!1}const $me=(e,t={})=>n=>{const o=sN({...n,processors:t});return As(e,o),iN(o,e),lN(o,e)},W5=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},l=sN({...s??{},target:i,io:t,processors:n});return As(e,l),iN(l,e),lN(l,e)},Lme={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Nme=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:l,format:r,patterns:a,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof l=="number"&&(s.maxLength=l),r&&(s.format=Lme[r]??r,s.format===""&&delete s.format,r==="time"&&delete s.format),c&&(s.contentEncoding=c),a&&a.size>0){const u=[...a];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},zme=(e,t,n,o)=>{const s=n,{minimum:i,maximum:l,format:r,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof r=="string"&&r.includes("int")?s.type="integer":s.type="number";const d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(l??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u:typeof i=="number"&&(s.minimum=i),f?p?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c:typeof l=="number"&&(s.maximum=l),typeof a=="number"&&(s.multipleOf=a)},Bme=(e,t,n,o)=>{n.type="boolean"},Rme=(e,t,n,o)=>{n.not={}},Pme=(e,t,n,o)=>{},Fme=(e,t,n,o)=>{const s=e._zod.def,i=PL(s.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},jme=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const l of s.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},Ome=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Hme=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Dme=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:l,maximum:r}=e._zod.bag;typeof l=="number"&&(s.minItems=l),typeof r=="number"&&(s.maxItems=r),s.type="array",s.items=As(i.element,t,{...o,path:[...o.path,"items"]})},Vme=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const l=i.shape;for(const c in l)s.properties[c]=As(l[c],t,{...o,path:[...o.path,"properties",c]});const r=new Set(Object.keys(l)),a=new Set([...r].filter(c=>{const u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=As(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},Wme=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,l=s.options.map((r,a)=>As(r,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=l:n.anyOf=l},qme=(e,t,n,o)=>{const s=e._zod.def,i=As(s.left,t,{...o,path:[...o.path,"allOf",0]}),l=As(s.right,t,{...o,path:[...o.path,"allOf",1]}),r=c=>"allOf"in c&&Object.keys(c).length===1,a=[...r(i)?i.allOf:[i],...r(l)?l.allOf:[l]];n.allOf=a},Ume=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const l=i.keyType,a=l._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const u=As(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=As(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=As(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const c=l._zod.values;if(c){const u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(s.required=u)}},Zme=(e,t,n,o)=>{const s=e._zod.def,i=As(s.innerType,t,o),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Kme=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},Gme=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},Yme=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Xme=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let l;try{l=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},Jme=(e,t,n,o)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?i?s.out:s.in:s.out;As(l,t,o);const r=t.seen.get(e);r.ref=l},Qme=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},rN=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},e8e=wt("ZodISODateTime",(e,t)=>{the.init(e,t),Xo.init(e,t)});function t8e(e){return rme(e8e,e)}const n8e=wt("ZodISODate",(e,t)=>{nhe.init(e,t),Xo.init(e,t)});function o8e(e){return ame(n8e,e)}const s8e=wt("ZodISOTime",(e,t)=>{ohe.init(e,t),Xo.init(e,t)});function i8e(e){return cme(s8e,e)}const l8e=wt("ZodISODuration",(e,t)=>{she.init(e,t),Xo.init(e,t)});function r8e(e){return ume(l8e,e)}const a8e=(e,t)=>{HL.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Zpe(e,n)},flatten:{value:n=>Upe(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,x7,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,x7,2)}},isEmpty:{get(){return e.issues.length===0}}})},Wl=wt("ZodError",a8e,{Parent:Error}),c8e=Uv(Wl),u8e=Zv(Wl),d8e=Gp(Wl),f8e=Yp(Wl),p8e=Ype(Wl),h8e=Xpe(Wl),m8e=Jpe(Wl),g8e=Qpe(Wl),v8e=e6e(Wl),y8e=t6e(Wl),w8e=n6e(Wl),k8e=o6e(Wl),JS=new WeakMap;function Mf(e,t,n){const o=Object.getPrototypeOf(e);let s=JS.get(o);if(s||(s=new Set,JS.set(o,s)),!s.has(t)){s.add(t);for(const i in n){const l=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const r=l.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(r){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r})}})}}}const Yo=wt("ZodType",(e,t)=>(Go.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:W5(e,"input"),output:W5(e,"output")}}),e.toJSONSchema=$me(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>c8e(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>d8e(e,n,o),e.parseAsync=async(n,o)=>u8e(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>f8e(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>p8e(e,n,o),e.decode=(n,o)=>h8e(e,n,o),e.encodeAsync=async(n,o)=>m8e(e,n,o),e.decodeAsync=async(n,o)=>g8e(e,n,o),e.safeEncode=(n,o)=>v8e(e,n,o),e.safeDecode=(n,o)=>y8e(e,n,o),e.safeEncodeAsync=async(n,o)=>w8e(e,n,o),e.safeDecodeAsync=async(n,o)=>k8e(e,n,o),Mf(e,"ZodType",{check(...n){const o=this.def;return this.clone($1(o,{checks:[...o.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return L1(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(p7e(n,o))},superRefine(n,o){return this.check(h7e(n,o))},overwrite(n){return this.check(Vu(n))},optional(){return nC(this)},exactOptional(){return e7e(this)},nullable(){return oC(this)},nullish(){return nC(oC(this))},nonoptional(n){return l7e(this,n)},array(){return ro(this)},or(n){return U8e([this,n])},and(n){return G8e(this,n)},transform(n){return sC(this,J8e(n))},default(n){return o7e(this,n)},prefault(n){return i7e(this,n)},catch(n){return a7e(this,n)},pipe(n){return sC(this,n)},readonly(){return d7e(this)},describe(n){const o=this.clone();return Xd.add(o,{description:n}),o},meta(...n){if(n.length===0)return Xd.get(this);const o=this.clone();return Xd.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Xd.get(e)?.description},configurable:!0}),e)),aN=wt("_ZodString",(e,t)=>{Kv.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>Nme(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Mf(e,"_ZodString",{regex(...o){return this.check(gme(...o))},includes(...o){return this.check(wme(...o))},startsWith(...o){return this.check(kme(...o))},endsWith(...o){return this.check(bme(...o))},min(...o){return this.check(V5(...o))},max(...o){return this.check(nN(...o))},length(...o){return this.check(oN(...o))},nonempty(...o){return this.check(V5(1,...o))},lowercase(o){return this.check(vme(o))},uppercase(o){return this.check(yme(o))},trim(){return this.check(xme())},normalize(...o){return this.check(_me(...o))},toLowerCase(){return this.check(Sme())},toUpperCase(){return this.check(Cme())},slugify(){return this.check(Mme())}})}),b8e=wt("ZodString",(e,t)=>{Kv.init(e,t),aN.init(e,t),e.email=n=>e.check(Ohe(_8e,n)),e.url=n=>e.check(qhe(x8e,n)),e.jwt=n=>e.check(lme(F8e,n)),e.emoji=n=>e.check(Uhe(S8e,n)),e.guid=n=>e.check(KS(QS,n)),e.uuid=n=>e.check(Hhe(K3,n)),e.uuidv4=n=>e.check(Dhe(K3,n)),e.uuidv6=n=>e.check(Vhe(K3,n)),e.uuidv7=n=>e.check(Whe(K3,n)),e.nanoid=n=>e.check(Zhe(C8e,n)),e.guid=n=>e.check(KS(QS,n)),e.cuid=n=>e.check(Khe(M8e,n)),e.cuid2=n=>e.check(Ghe(A8e,n)),e.ulid=n=>e.check(Yhe(T8e,n)),e.base64=n=>e.check(ome(B8e,n)),e.base64url=n=>e.check(sme(R8e,n)),e.xid=n=>e.check(Xhe(E8e,n)),e.ksuid=n=>e.check(Jhe(I8e,n)),e.ipv4=n=>e.check(Qhe($8e,n)),e.ipv6=n=>e.check(eme(L8e,n)),e.cidrv4=n=>e.check(tme(N8e,n)),e.cidrv6=n=>e.check(nme(z8e,n)),e.e164=n=>e.check(ime(P8e,n)),e.datetime=n=>e.check(t8e(n)),e.date=n=>e.check(o8e(n)),e.time=n=>e.check(i8e(n)),e.duration=n=>e.check(r8e(n))});function At(e){return jhe(b8e,e)}const Xo=wt("ZodStringFormat",(e,t)=>{Ho.init(e,t),aN.init(e,t)}),_8e=wt("ZodEmail",(e,t)=>{U6e.init(e,t),Xo.init(e,t)}),QS=wt("ZodGUID",(e,t)=>{W6e.init(e,t),Xo.init(e,t)}),K3=wt("ZodUUID",(e,t)=>{q6e.init(e,t),Xo.init(e,t)}),x8e=wt("ZodURL",(e,t)=>{Z6e.init(e,t),Xo.init(e,t)}),S8e=wt("ZodEmoji",(e,t)=>{K6e.init(e,t),Xo.init(e,t)}),C8e=wt("ZodNanoID",(e,t)=>{G6e.init(e,t),Xo.init(e,t)}),M8e=wt("ZodCUID",(e,t)=>{Y6e.init(e,t),Xo.init(e,t)}),A8e=wt("ZodCUID2",(e,t)=>{X6e.init(e,t),Xo.init(e,t)}),T8e=wt("ZodULID",(e,t)=>{J6e.init(e,t),Xo.init(e,t)}),E8e=wt("ZodXID",(e,t)=>{Q6e.init(e,t),Xo.init(e,t)}),I8e=wt("ZodKSUID",(e,t)=>{ehe.init(e,t),Xo.init(e,t)}),$8e=wt("ZodIPv4",(e,t)=>{ihe.init(e,t),Xo.init(e,t)}),L8e=wt("ZodIPv6",(e,t)=>{lhe.init(e,t),Xo.init(e,t)}),N8e=wt("ZodCIDRv4",(e,t)=>{rhe.init(e,t),Xo.init(e,t)}),z8e=wt("ZodCIDRv6",(e,t)=>{ahe.init(e,t),Xo.init(e,t)}),B8e=wt("ZodBase64",(e,t)=>{che.init(e,t),Xo.init(e,t)}),R8e=wt("ZodBase64URL",(e,t)=>{dhe.init(e,t),Xo.init(e,t)}),P8e=wt("ZodE164",(e,t)=>{fhe.init(e,t),Xo.init(e,t)}),F8e=wt("ZodJWT",(e,t)=>{hhe.init(e,t),Xo.init(e,t)}),cN=wt("ZodNumber",(e,t)=>{XL.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>zme(e,o,s),Mf(e,"ZodNumber",{gt(o,s){return this.check(YS(o,s))},gte(o,s){return this.check(Sm(o,s))},min(o,s){return this.check(Sm(o,s))},lt(o,s){return this.check(GS(o,s))},lte(o,s){return this.check(xm(o,s))},max(o,s){return this.check(xm(o,s))},int(o){return this.check(eC(o))},safe(o){return this.check(eC(o))},positive(o){return this.check(YS(0,o))},nonnegative(o){return this.check(Sm(0,o))},negative(o){return this.check(GS(0,o))},nonpositive(o){return this.check(xm(0,o))},multipleOf(o,s){return this.check(XS(o,s))},step(o,s){return this.check(XS(o,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ln(e){return dme(cN,e)}const j8e=wt("ZodNumberFormat",(e,t)=>{mhe.init(e,t),cN.init(e,t)});function eC(e){return fme(j8e,e)}const O8e=wt("ZodBoolean",(e,t)=>{ghe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Bme(e,n,o)});function Af(e){return pme(O8e,e)}const H8e=wt("ZodUnknown",(e,t)=>{vhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Pme()});function Rs(){return hme(H8e)}const D8e=wt("ZodNever",(e,t)=>{yhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Rme(e,n,o)});function V8e(e){return mme(D8e,e)}const W8e=wt("ZodArray",(e,t)=>{whe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Dme(e,n,o,s),e.element=t.element,Mf(e,"ZodArray",{min(n,o){return this.check(V5(n,o))},nonempty(n){return this.check(V5(1,n))},max(n,o){return this.check(nN(n,o))},length(n,o){return this.check(oN(n,o))},unwrap(){return this.element}})});function ro(e,t){return Ame(W8e,e,t)}const q8e=wt("ZodObject",(e,t)=>{bhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Vme(e,n,o,s),_o(e,"shape",()=>t.shape),Mf(e,"ZodObject",{keyof(){return Oo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Rs()})},loose(){return this.clone({...this._zod.def,catchall:Rs()})},strict(){return this.clone({...this._zod.def,catchall:V8e()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ope(this,n)},safeExtend(n){return Hpe(this,n)},merge(n){return Dpe(this,n)},pick(n){return Fpe(this,n)},omit(n){return jpe(this,n)},partial(...n){return Vpe(dN,this,n[0])},required(...n){return Wpe(fN,this,n[0])}})});function Pt(e,t){const n={type:"object",shape:e??{},...hn(t)};return new q8e(n)}const uN=wt("ZodUnion",(e,t)=>{eN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Wme(e,n,o,s),e.options=t.options});function U8e(e,t){return new uN({type:"union",options:e,...hn(t)})}const Z8e=wt("ZodDiscriminatedUnion",(e,t)=>{uN.init(e,t),_he.init(e,t)});function N1(e,t,n){return new Z8e({type:"union",options:t,discriminator:e,...hn(n)})}const K8e=wt("ZodIntersection",(e,t)=>{xhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>qme(e,n,o,s)});function G8e(e,t){return new K8e({type:"intersection",left:e,right:t})}const tC=wt("ZodRecord",(e,t)=>{She.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Ume(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function Gv(e,t,n){return!t||!t._zod?new tC({type:"record",keyType:At(),valueType:e,...hn(t)}):new tC({type:"record",keyType:e,valueType:t,...hn(n)})}const C7=wt("ZodEnum",(e,t)=>{Che.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>Fme(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const l of o)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new C7({...t,checks:[],...hn(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const l of o)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new C7({...t,checks:[],...hn(s),entries:i})}});function Oo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new C7({type:"enum",entries:n,...hn(t)})}const Y8e=wt("ZodLiteral",(e,t)=>{Mhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>jme(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Rn(e,t){return new Y8e({type:"literal",values:Array.isArray(e)?e:[e],...hn(t)})}const X8e=wt("ZodTransform",(e,t)=>{Ahe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Hme(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new RL(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(sf(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(sf(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function J8e(e){return new X8e({type:"transform",transform:e})}const dN=wt("ZodOptional",(e,t)=>{tN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>rN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function nC(e){return new dN({type:"optional",innerType:e})}const Q8e=wt("ZodExactOptional",(e,t)=>{The.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>rN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function e7e(e){return new Q8e({type:"optional",innerType:e})}const t7e=wt("ZodNullable",(e,t)=>{Ehe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Zme(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function oC(e){return new t7e({type:"nullable",innerType:e})}const n7e=wt("ZodDefault",(e,t)=>{Ihe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Gme(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function o7e(e,t){return new n7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():jL(t)}})}const s7e=wt("ZodPrefault",(e,t)=>{$he.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Yme(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function i7e(e,t){return new s7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():jL(t)}})}const fN=wt("ZodNonOptional",(e,t)=>{Lhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Kme(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function l7e(e,t){return new fN({type:"nonoptional",innerType:e,...hn(t)})}const r7e=wt("ZodCatch",(e,t)=>{Nhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Xme(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function a7e(e,t){return new r7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const c7e=wt("ZodPipe",(e,t)=>{zhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Jme(e,n,o,s),e.in=t.in,e.out=t.out});function sC(e,t){return new c7e({type:"pipe",in:e,out:t})}const u7e=wt("ZodReadonly",(e,t)=>{Bhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Qme(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function d7e(e){return new u7e({type:"readonly",innerType:e})}const f7e=wt("ZodCustom",(e,t)=>{Rhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Ome(e,n)});function p7e(e,t={}){return Tme(f7e,e,t)}function h7e(e,t){return Eme(e,t)}const D0=At().min(1),Yv=At().min(1),Tf=At().min(1),V0=At().min(1),pl=At().min(1),m7e=/^[A-Za-z0-9._-]{1,128}$/;function g7e(e){return m7e.test(e)&&e!=="."&&e!==".."}const pN=N1("kind",[Pt({kind:Rn("user"),payload:Rs().optional()}),Pt({kind:Rn("cron"),taskId:V0.optional(),payload:Rs().optional()}),Pt({kind:Rn("task"),taskId:V0,payload:Rs().optional()}),Pt({kind:Rn("hook"),payload:Rs().optional()}),Pt({kind:Rn("compaction"),payload:Rs().optional()}),Pt({kind:Rn("side"),payload:Rs().optional()}),Pt({kind:Rn("other"),payload:Rs().optional()})]),v7e=Pt({inputTokens:ln().optional(),outputTokens:ln().optional(),cachedTokens:ln().optional(),cost:ln().optional()}),C2=Pt({inputOther:ln(),output:ln(),inputCacheRead:ln(),inputCacheCreation:ln()}),y7e=Pt({llmFirstTokenLatencyMs:ln().optional(),llmStreamDurationMs:ln().optional(),llmRequestBuildMs:ln().optional(),llmServerFirstTokenMs:ln().optional(),llmServerDecodeMs:ln().optional(),llmClientConsumeMs:ln().optional()}),w7e=Pt({failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:At(),errorMessage:At(),statusCode:ln().optional()}),hN=Oo(["queued","running","completed","failed","cancelled"]),k7e=Oo(["running","completed","interrupted","failed"]),b7e=Pt({kind:Rn("text"),frameId:Tf,role:Oo(["assistant","user"]),text:At(),attachmentIds:ro(At()).optional(),taskId:V0.optional(),promptIds:ro(At()).optional()}),_7e=Pt({kind:Rn("thinking"),frameId:Tf,text:At()}),x7e=Pt({agentId:pl,role:Oo(["child","member"]).optional()}),S7e=Pt({kind:Oo(["stdout","stderr","progress","status","custom"]),text:At().optional(),percent:ln().optional(),customKind:At().optional(),customData:Rs().optional()}),C7e=Pt({kind:Rn("tool"),frameId:Tf,toolCallId:At(),name:At(),view:At().optional(),state:Oo(["running","done","error"]),input:Rs().optional(),output:Rs().optional(),display:Rs().optional(),error:At().optional(),inputText:At().optional(),progress:S7e.optional(),taskId:V0.optional(),approvalId:At().optional(),todoId:At().optional(),agentRefs:ro(x7e).optional()}),Xv=Pt({interactionId:At(),interactionKind:Oo(["approval","question"]),toolCallId:At().optional(),state:Oo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Rs().optional(),response:Rs().optional()}),M7e=Pt({kind:Rn("notice"),frameId:Tf,level:Oo(["error","warning","info"]),source:At().optional(),message:At(),detail:Rs().optional()}),mN=N1("kind",[b7e,_7e,C7e,M7e]),gN=Pt({kind:Rn("step"),stepId:Yv,turnId:D0,ordinal:ln().int(),state:k7e,frames:ro(mN),startedAt:At().optional(),endedAt:At().optional(),usage:C2.optional(),finishReason:At().optional(),timing:y7e.optional(),retry:w7e.optional(),endReason:At().optional(),endMessage:At().optional()}),vN=Pt({kind:Rn("turn"),turnId:D0,ordinal:ln().int(),state:hN,origin:pN,prompt:At().optional(),attachmentIds:ro(At()).optional(),steps:ro(gN),startedAt:At().optional(),endedAt:At().optional(),usage:v7e.optional(),durationMs:ln().optional(),error:At().optional()}),yN=Pt({kind:Rn("marker"),markerId:At(),marker:At(),payload:Rs().optional(),at:At().optional()}),wN=Pt({kind:Rn("taskref"),refId:At(),taskId:V0,at:At().optional()}),kN=N1("kind",[vN,yN,wN]),Jv=Pt({taskId:V0,kind:Oo(["shell","subagent","tool","other"]),state:Oo(["running","completed","failed","timed_out","killed","lost"]),detached:Af(),description:At().optional(),agentId:pl.optional(),outputTail:At(),startedAt:At().optional(),endedAt:At().optional(),resultSummary:At().optional(),error:At().optional(),stateReason:At().optional(),usage:C2.optional(),model:At().optional(),thinkingEffort:At().optional()}),bN=Pt({objective:At(),status:Oo(["active","paused","blocked","complete"]),completionCriterion:At().optional(),budgetUsed:ln().optional(),budgetLimit:ln().optional()}),A7e=Pt({plan:Pt({reviewPath:At().optional(),version:ln().optional()}).optional(),dynamic_workflow:Pt({trigger:At().optional()}).optional(),tower:Pt({}).optional()}),T7e=Pt({plan:Pt({reviewPath:At().optional(),version:ln().optional()}).nullable().optional(),dynamic_workflow:Pt({trigger:At().optional()}).nullable().optional(),tower:Pt({}).nullable().optional()}),E7e=N1("kind",[Pt({kind:Rn("idle")}),Pt({kind:Rn("running"),turnId:ln(),step:ln(),stepId:At(),since:ln()}),Pt({kind:Rn("streaming"),turnId:ln(),step:ln(),stepId:At(),stream:Oo(["assistant","thinking","tool_call"]),toolCallId:At().optional(),toolName:At().optional(),since:ln()}),Pt({kind:Rn("tool_call"),turnId:ln(),step:ln(),toolCallId:At(),name:At(),since:ln()}),Pt({kind:Rn("retrying"),turnId:ln(),step:ln(),stepId:At(),failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:At().optional(),statusCode:ln().optional(),since:ln()}),Pt({kind:Rn("awaiting_approval"),turnId:ln(),step:ln().optional(),approval:Rs().optional(),since:ln()}),Pt({kind:Rn("interrupted"),turnId:ln(),step:ln().optional(),reason:Oo(["aborted","max_steps","error"]),message:At().optional(),at:ln()}),Pt({kind:Rn("ended"),turnId:ln(),reason:Oo(["completed","cancelled","failed","blocked"]),durationMs:ln().optional(),at:ln()})]),I7e=Pt({byModel:Gv(At(),C2).optional(),currentTurn:C2.optional(),total:C2.optional()}),$7e=Pt({model:At().optional(),thinkingEffort:At().optional(),usage:I7e.optional(),contextTokens:ln().optional(),maxContextTokens:ln().optional(),contextUsage:ln().optional(),permission:Oo(["manual","yolo","auto"]).optional(),phase:E7e.optional()}),Qv=Pt({goal:bN.optional(),modes:A7e.optional(),activity:Oo(["idle","turn","disposing","unknown"]).optional(),agent:$7e.optional()}),L7e=Qv.extend({goal:bN.nullable().optional(),modes:T7e.optional()}),Jp=Pt({attachmentId:At(),mediaType:At(),name:At().optional(),size:ln().optional(),source:N1("kind",[Pt({kind:Rn("url"),url:At()}),Pt({kind:Rn("file"),fileId:At()}),Pt({kind:Rn("session_media"),fileId:At()})]).optional(),placeholder:At().optional()}),N7e=Pt({title:At(),status:Oo(["pending","in_progress","done"])}),e9=Pt({todoId:At(),items:ro(N7e),updatedAt:At().optional()}),t9=Pt({promptId:At(),status:Oo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:At().optional(),content:Rs().optional(),createdAt:At(),finishedAt:At().optional(),steeredAt:At().optional()}),_N=Pt({items:ro(kN),tasks:ro(Jv),interactions:ro(Xv).default([]),attachments:ro(Jp).default([]),todos:ro(e9).default([]),prompts:ro(t9).default([]),meta:Qv,hasMoreOlder:Af().optional()}),z7e=vN.omit({steps:!0}),B7e=gN.omit({frames:!0}),R7e=N1("type",[Pt({type:Rn("frame"),turnId:D0,stepId:Yv,frameId:Tf}),Pt({type:Rn("task"),taskId:V0})]),n9=N1("op",[Pt({op:Rn("reset"),agentId:pl,snapshot:_N}),Pt({op:Rn("turn.upsert"),turn:z7e}),Pt({op:Rn("step.upsert"),turnId:D0,step:B7e}),Pt({op:Rn("frame.upsert"),turnId:D0,stepId:Yv,frame:mN}),Pt({op:Rn("append"),target:R7e,offset:ln().int().nonnegative(),text:At()}),Pt({op:Rn("marker.upsert"),item:yN,beforeTurn:ln().int().optional()}),Pt({op:Rn("taskref.upsert"),item:wN,beforeTurn:ln().int().optional()}),Pt({op:Rn("task.upsert"),task:Jv}),Pt({op:Rn("interaction.upsert"),interaction:Xv}),Pt({op:Rn("attachment.upsert"),attachment:Jp}),Pt({op:Rn("todo.upsert"),todo:e9}),Pt({op:Rn("prompt.upsert"),prompt:t9}),Pt({op:Rn("meta.merge"),meta:L7e}),Pt({op:Rn("items.remove"),ids:ro(At())})]);Pt({agentId:pl,ops:ro(n9)});const P7e=Oo(["off","turn","block","delta"]),Iu=ln().int().nonnegative(),F7e=Gv(At(),P7e);Pt({session_id:At().min(1),transcript:F7e,transcript_since:Gv(At(),Iu).optional()});Pt({agent_id:pl,before_turn:At().min(1).optional(),after_turn:At().min(1).optional(),page_size:ln().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),g7e(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const j7e=Pt({agentId:pl,type:Oo(["main","sub","independent"]).optional(),parentAgentId:pl.optional(),label:At().optional(),createdAt:At().optional(),disposedAt:At().optional()}),O7e=Pt({agent_id:pl,items:ro(kN),has_more:Af(),tasks:ro(Jv),interactions:ro(Xv).default([]),attachments:ro(Jp).default([]),todos:ro(e9).default([]),prompts:ro(t9).default([]),meta:Qv,agents:ro(j7e),pending_interactions:ro(At()),seq:Iu.optional()});Pt({agent_id:pl,batches:ro(Pt({seq:Iu,ops:ro(n9)})),latest_seq:Iu,complete:Af()});const H7e=Pt({turn_id:D0,ordinal:ln().int(),state:hN,origin:pN,prompt:At(),attachment_ids:ro(At()).optional(),started_at:At().optional()});Pt({agents:ro(Pt({agent_id:pl,messages:ro(H7e),attachments:ro(Jp).default([])}))});const D7e=Pt({state:Oo(["pending","approved","rejected","cancelled"]),selected_option:At().optional(),feedback:At().optional()}),V7e=Pt({tool_call_id:At(),turn_id:D0,source:Oo(["interaction","display","output"]),plan:At(),path:At().optional(),options:ro(Pt({label:At(),description:At().optional()})).optional(),review:D7e.optional()});Pt({agent_id:pl,plans:ro(V7e)});const W7e=Pt({agent_id:pl,snapshot:_N,has_more_older:Af(),seq:Iu.optional()}),q7e=Pt({agent_id:pl,ops:ro(n9),seq:Iu.optional()}),xN=W7e.extend({type:Rn("transcript.reset")}),SN=q7e.extend({type:Rn("transcript.ops")});N1("type",[xN,SN]);const U7e=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],CN=500,q5=256*1024,iC=200,Cm=16384,Mm=500,Am=50,Tm=50,Z7e=6,K7e=/api[_-]?key|authorization|token|secret|password|cookie|credential/i,G7e=/^[A-Za-z0-9+/=_-]{200,}$/;let Em=null;function pr(){if(Em!==null)return Em;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=ls(dn.debug)==="1"),Em=e,e}const m1=[],Qc=[];let Jd=0;const w0=[];let Qd=0,Y7e=1;const U5=new TextEncoder,X7e=new Set(U7e),o9=V(0),e2=Uo(!1);function J7e(){return m1}function Q7e(){m1.length=0,Qc.length=0,Jd=0,w0.length=0,Qd=0,o9.value++}function Ta(e){if(!e2.value){try{const t={id:Y7e++,ts:Date.now(),source:e.source,kind:String(gu(e.kind)),label:String(gu(e.label)),sessionId:e.sessionId===void 0?void 0:String(gu(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:z1(e.detail)},n=JSON.stringify(t),o=U5.encode(n).byteLength;if(o>q5)return;for(m1.push(t),Qc.push(n),Jd+=o+(Qc.length>1?1:0);m1.length>CN||Jd>q5;){const s=Qc.shift();m1.shift(),s!==void 0&&(Jd-=U5.encode(s).byteLength,Qc.length>0&&(Jd-=1))}}catch{return}o9.value++}}function a0(e){if(typeof e=="string")return e.length<=iC?e:e.slice(0,iC)}function Al(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function ege(e,t){if(X7e.has(e))try{const n={ts:Date.now(),event:e,sessionId:a0(t?.sessionId),status:a0(t?.status),operation:a0(t?.operation),seq:Al(t?.seq),durationMs:Al(t?.durationMs),messageCount:Al(t?.messageCount),contentCount:Al(t?.contentCount),mediaCount:Al(t?.mediaCount),sessionCount:Al(t?.sessionCount),workspaceCount:Al(t?.workspaceCount),promptId:a0(t?.promptId),zipBytes:Al(t?.zipBytes),errorName:a0(t?.errorName),errorCode:Al(t?.errorCode),requestId:a0(t?.requestId),phase:a0(t?.phase),httpStatus:Al(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Al(t?.line),col:Al(t?.col)},o=JSON.stringify(n),s=U5.encode(o).byteLength;if(s>q5)return;for(w0.push(o),Qd+=s+(w0.length>1?1:0);w0.length>CN||Qd>q5;){const i=w0.shift();i!==void 0&&(Qd-=U5.encode(i).byteLength,w0.length>0&&(Qd-=1))}}catch{return}}function gu(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return G7e.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>Mm?`${i.slice(0,Mm)}… [+${i.length-Mm} chars]`:i}if(n!=="object")return String(e);if(t>=Z7e)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,Am).map(l=>gu(l,t+1));return e.length>Am&&i.push(`[+${e.length-Am} more items]`),i}const o={},s=Object.entries(e);for(const[i,l]of s.slice(0,Tm))o[i]=K7e.test(i)?"[redacted]":gu(l,t+1);return s.length>Tm&&(o._truncatedKeys=s.length-Tm),o}function z1(e){if(e===void 0)return;const t=gu(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>Cm)return{_truncated:`detail JSON was ${n.length} chars; first ${Cm} kept`,preview:n.slice(0,Cm)}}catch{return"[unserializable detail]"}return t}function G3(e){pr()&&Ta({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:z1(e.body)}})}function Ac(e){if(!pr())return;const t=e.code!==0;Ta({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:z1(e.data)}})}function Va(e){pr()&&Ta({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Tc(e,t){pr()&&Ta({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:z1(t)})}function tge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;Ta({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:z1(e)})}function nge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,l=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Ta({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${l.length>0?` (${l.join(" ")})`:""}`,detail:z1(t.payload)})}const oge={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function sge(e,t,n){pr()&&Ta({source:"client",kind:`client:${e}`,label:`${oge[e]} ${t}`,detail:z1(n)})}function ia(e,t){pr()&&Ta({source:"client",kind:"client:event",label:`· ${e}`,detail:z1(t)})}function _s(e,t){ege(e,t),Ta({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let Im=!1,Y3=null;function ige(){if(Im)return()=>Y3?.();Im=!0;const e=[];try{if(typeof window<"u"){const n=s=>{_s("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno})},o=s=>{const i=s.reason;_s("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i})};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(pr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{sge(n,i.map(lge).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(Y3===t){for(const n of e.toReversed())n();Y3=null,Im=!1}};return Y3=t,t}function lge(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function MN(e=m1){if(typeof document>"u")return;const t=new Blob([rge(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`pythinker-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function rge(e=m1){return e===m1?Qc.join(` +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const r=l[1];if(t===l[0]){i(l);continue}if(e.external){const c=e.external.registry.get(l[0])?.id;if(t!==l[0]&&c){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(r.cycle){i(l);continue}if(r.count>1&&e.reused==="ref"){i(l);continue}}}function cN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=r=>{const a=e.seen.get(r);if(a.ref===null)return;const c=a.def??a.schema,u={...c},d=a.ref;if(a.ref=null,d){o(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),r._zod.parent===d)for(const k in c)k==="$ref"||k==="allOf"||k in u||delete c[k];if(h.$ref&&p.def)for(const k in c)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(c[k])===JSON.stringify(p.def[k])&&delete c[k]}const f=r._zod.parent;if(f&&f!==d){o(f);const p=e.seen.get(f);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(const h in c)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(c[h])===JSON.stringify(p.def[h])&&delete c[h]}e.override({zodSchema:r,jsonSchema:c,path:a.path??[]})};for(const r of[...e.seen.entries()].reverse())o(r[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const l=e.external?.defs??{};for(const r of e.seen.entries()){const a=r[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,l[a.defId]=a.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:q5(t,"input",e.processors),output:q5(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function bi(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return bi(o.element,n);if(o.type==="set")return bi(o.valueType,n);if(o.type==="lazy")return bi(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return bi(o.innerType,n);if(o.type==="intersection")return bi(o.left,n)||bi(o.right,n);if(o.type==="record"||o.type==="map")return bi(o.keyType,n)||bi(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:bi(o.in,n)||bi(o.out,n);if(o.type==="object"){for(const s in o.shape)if(bi(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(bi(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(bi(s,n))return!0;return!!(o.rest&&bi(o.rest,n))}return!1}const Xme=(e,t={})=>n=>{const o=rN({...n,processors:t});return As(e,o),aN(o,e),cN(o,e)},q5=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},l=rN({...s??{},target:i,io:t,processors:n});return As(e,l),aN(l,e),cN(l,e)},Jme={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Qme=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:l,format:r,patterns:a,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof l=="number"&&(s.maxLength=l),r&&(s.format=Jme[r]??r,s.format===""&&delete s.format,r==="time"&&delete s.format),c&&(s.contentEncoding=c),a&&a.size>0){const u=[...a];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},e8e=(e,t,n,o)=>{const s=n,{minimum:i,maximum:l,format:r,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof r=="string"&&r.includes("int")?s.type="integer":s.type="number";const d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(l??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u:typeof i=="number"&&(s.minimum=i),f?p?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c:typeof l=="number"&&(s.maximum=l),typeof a=="number"&&(s.multipleOf=a)},t8e=(e,t,n,o)=>{n.type="boolean"},n8e=(e,t,n,o)=>{n.not={}},o8e=(e,t,n,o)=>{},s8e=(e,t,n,o)=>{const s=e._zod.def,i=O$(s.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},i8e=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const l of s.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},l8e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},r8e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},a8e=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:l,maximum:r}=e._zod.bag;typeof l=="number"&&(s.minItems=l),typeof r=="number"&&(s.maxItems=r),s.type="array",s.items=As(i.element,t,{...o,path:[...o.path,"items"]})},c8e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const l=i.shape;for(const c in l)s.properties[c]=As(l[c],t,{...o,path:[...o.path,"properties",c]});const r=new Set(Object.keys(l)),a=new Set([...r].filter(c=>{const u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=As(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},u8e=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,l=s.options.map((r,a)=>As(r,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=l:n.anyOf=l},d8e=(e,t,n,o)=>{const s=e._zod.def,i=As(s.left,t,{...o,path:[...o.path,"allOf",0]}),l=As(s.right,t,{...o,path:[...o.path,"allOf",1]}),r=c=>"allOf"in c&&Object.keys(c).length===1,a=[...r(i)?i.allOf:[i],...r(l)?l.allOf:[l]];n.allOf=a},f8e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const l=i.keyType,a=l._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const u=As(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=As(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=As(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const c=l._zod.values;if(c){const u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(s.required=u)}},p8e=(e,t,n,o)=>{const s=e._zod.def,i=As(s.innerType,t,o),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},h8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},m8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},g8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},v8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let l;try{l=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},y8e=(e,t,n,o)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?i?s.out:s.in:s.out;As(l,t,o);const r=t.seen.get(e);r.ref=l},w8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},uN=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},k8e=wt("ZodISODateTime",(e,t)=>{bhe.init(e,t),Xo.init(e,t)});function b8e(e){return Ame(k8e,e)}const _8e=wt("ZodISODate",(e,t)=>{_he.init(e,t),Xo.init(e,t)});function x8e(e){return Tme(_8e,e)}const S8e=wt("ZodISOTime",(e,t)=>{xhe.init(e,t),Xo.init(e,t)});function C8e(e){return Eme(S8e,e)}const M8e=wt("ZodISODuration",(e,t)=>{She.init(e,t),Xo.init(e,t)});function A8e(e){return Ime(M8e,e)}const T8e=(e,t)=>{W$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>p6e(e,n)},flatten:{value:n=>f6e(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,C7,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,C7,2)}},isEmpty:{get(){return e.issues.length===0}}})},Wl=wt("ZodError",T8e,{Parent:Error}),E8e=Kv(Wl),I8e=Gv(Wl),L8e=Xp(Wl),$8e=Jp(Wl),N8e=g6e(Wl),z8e=v6e(Wl),B8e=y6e(Wl),R8e=w6e(Wl),P8e=k6e(Wl),F8e=b6e(Wl),j8e=_6e(Wl),O8e=x6e(Wl),eC=new WeakMap;function Tf(e,t,n){const o=Object.getPrototypeOf(e);let s=eC.get(o);if(s||(s=new Set,eC.set(o,s)),!s.has(t)){s.add(t);for(const i in n){const l=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const r=l.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(r){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r})}})}}}const Yo=wt("ZodType",(e,t)=>(Go.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:q5(e,"input"),output:q5(e,"output")}}),e.toJSONSchema=Xme(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>E8e(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>L8e(e,n,o),e.parseAsync=async(n,o)=>I8e(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>$8e(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>N8e(e,n,o),e.decode=(n,o)=>z8e(e,n,o),e.encodeAsync=async(n,o)=>B8e(e,n,o),e.decodeAsync=async(n,o)=>R8e(e,n,o),e.safeEncode=(n,o)=>P8e(e,n,o),e.safeDecode=(n,o)=>F8e(e,n,o),e.safeEncodeAsync=async(n,o)=>j8e(e,n,o),e.safeDecodeAsync=async(n,o)=>O8e(e,n,o),Tf(e,"ZodType",{check(...n){const o=this.def;return this.clone(I1(o,{checks:[...o.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return L1(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(N7e(n,o))},superRefine(n,o){return this.check(z7e(n,o))},overwrite(n){return this.check(Vu(n))},optional(){return sC(this)},exactOptional(){return k7e(this)},nullable(){return iC(this)},nullish(){return sC(iC(this))},nonoptional(n){return M7e(this,n)},array(){return ro(this)},or(n){return f7e([this,n])},and(n){return m7e(this,n)},transform(n){return lC(this,y7e(n))},default(n){return x7e(this,n)},prefault(n){return C7e(this,n)},catch(n){return T7e(this,n)},pipe(n){return lC(this,n)},readonly(){return L7e(this)},describe(n){const o=this.clone();return Xd.add(o,{description:n}),o},meta(...n){if(n.length===0)return Xd.get(this);const o=this.clone();return Xd.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Xd.get(e)?.description},configurable:!0}),e)),dN=wt("_ZodString",(e,t)=>{Yv.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>Qme(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Tf(e,"_ZodString",{regex(...o){return this.check(Rme(...o))},includes(...o){return this.check(jme(...o))},startsWith(...o){return this.check(Ome(...o))},endsWith(...o){return this.check(Hme(...o))},min(...o){return this.check(W5(...o))},max(...o){return this.check(iN(...o))},length(...o){return this.check(lN(...o))},nonempty(...o){return this.check(W5(1,...o))},lowercase(o){return this.check(Pme(o))},uppercase(o){return this.check(Fme(o))},trim(){return this.check(Vme())},normalize(...o){return this.check(Dme(...o))},toLowerCase(){return this.check(Wme())},toUpperCase(){return this.check(qme())},slugify(){return this.check(Ume())}})}),H8e=wt("ZodString",(e,t)=>{Yv.init(e,t),dN.init(e,t),e.email=n=>e.check(lme(D8e,n)),e.url=n=>e.check(dme(V8e,n)),e.jwt=n=>e.check(Mme(s7e,n)),e.emoji=n=>e.check(fme(W8e,n)),e.guid=n=>e.check(YS(tC,n)),e.uuid=n=>e.check(rme(Y3,n)),e.uuidv4=n=>e.check(ame(Y3,n)),e.uuidv6=n=>e.check(cme(Y3,n)),e.uuidv7=n=>e.check(ume(Y3,n)),e.nanoid=n=>e.check(pme(q8e,n)),e.guid=n=>e.check(YS(tC,n)),e.cuid=n=>e.check(hme(U8e,n)),e.cuid2=n=>e.check(mme(Z8e,n)),e.ulid=n=>e.check(gme(K8e,n)),e.base64=n=>e.check(xme(t7e,n)),e.base64url=n=>e.check(Sme(n7e,n)),e.xid=n=>e.check(vme(G8e,n)),e.ksuid=n=>e.check(yme(Y8e,n)),e.ipv4=n=>e.check(wme(X8e,n)),e.ipv6=n=>e.check(kme(J8e,n)),e.cidrv4=n=>e.check(bme(Q8e,n)),e.cidrv6=n=>e.check(_me(e7e,n)),e.e164=n=>e.check(Cme(o7e,n)),e.datetime=n=>e.check(b8e(n)),e.date=n=>e.check(x8e(n)),e.time=n=>e.check(C8e(n)),e.duration=n=>e.check(A8e(n))});function Tt(e){return ime(H8e,e)}const Xo=wt("ZodStringFormat",(e,t)=>{Ho.init(e,t),dN.init(e,t)}),D8e=wt("ZodEmail",(e,t)=>{fhe.init(e,t),Xo.init(e,t)}),tC=wt("ZodGUID",(e,t)=>{uhe.init(e,t),Xo.init(e,t)}),Y3=wt("ZodUUID",(e,t)=>{dhe.init(e,t),Xo.init(e,t)}),V8e=wt("ZodURL",(e,t)=>{phe.init(e,t),Xo.init(e,t)}),W8e=wt("ZodEmoji",(e,t)=>{hhe.init(e,t),Xo.init(e,t)}),q8e=wt("ZodNanoID",(e,t)=>{mhe.init(e,t),Xo.init(e,t)}),U8e=wt("ZodCUID",(e,t)=>{ghe.init(e,t),Xo.init(e,t)}),Z8e=wt("ZodCUID2",(e,t)=>{vhe.init(e,t),Xo.init(e,t)}),K8e=wt("ZodULID",(e,t)=>{yhe.init(e,t),Xo.init(e,t)}),G8e=wt("ZodXID",(e,t)=>{whe.init(e,t),Xo.init(e,t)}),Y8e=wt("ZodKSUID",(e,t)=>{khe.init(e,t),Xo.init(e,t)}),X8e=wt("ZodIPv4",(e,t)=>{Che.init(e,t),Xo.init(e,t)}),J8e=wt("ZodIPv6",(e,t)=>{Mhe.init(e,t),Xo.init(e,t)}),Q8e=wt("ZodCIDRv4",(e,t)=>{Ahe.init(e,t),Xo.init(e,t)}),e7e=wt("ZodCIDRv6",(e,t)=>{The.init(e,t),Xo.init(e,t)}),t7e=wt("ZodBase64",(e,t)=>{Ehe.init(e,t),Xo.init(e,t)}),n7e=wt("ZodBase64URL",(e,t)=>{Lhe.init(e,t),Xo.init(e,t)}),o7e=wt("ZodE164",(e,t)=>{$he.init(e,t),Xo.init(e,t)}),s7e=wt("ZodJWT",(e,t)=>{zhe.init(e,t),Xo.init(e,t)}),fN=wt("ZodNumber",(e,t)=>{eN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>e8e(e,o,s),Tf(e,"ZodNumber",{gt(o,s){return this.check(JS(o,s))},gte(o,s){return this.check(Mm(o,s))},min(o,s){return this.check(Mm(o,s))},lt(o,s){return this.check(XS(o,s))},lte(o,s){return this.check(Cm(o,s))},max(o,s){return this.check(Cm(o,s))},int(o){return this.check(nC(o))},safe(o){return this.check(nC(o))},positive(o){return this.check(JS(0,o))},nonnegative(o){return this.check(Mm(0,o))},negative(o){return this.check(XS(0,o))},nonpositive(o){return this.check(Cm(0,o))},multipleOf(o,s){return this.check(QS(o,s))},step(o,s){return this.check(QS(o,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ln(e){return Lme(fN,e)}const i7e=wt("ZodNumberFormat",(e,t)=>{Bhe.init(e,t),fN.init(e,t)});function nC(e){return $me(i7e,e)}const l7e=wt("ZodBoolean",(e,t)=>{Rhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>t8e(e,n,o)});function Ef(e){return Nme(l7e,e)}const r7e=wt("ZodUnknown",(e,t)=>{Phe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>o8e()});function Rs(){return zme(r7e)}const a7e=wt("ZodNever",(e,t)=>{Fhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>n8e(e,n,o)});function c7e(e){return Bme(a7e,e)}const u7e=wt("ZodArray",(e,t)=>{jhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>a8e(e,n,o,s),e.element=t.element,Tf(e,"ZodArray",{min(n,o){return this.check(W5(n,o))},nonempty(n){return this.check(W5(1,n))},max(n,o){return this.check(iN(n,o))},length(n,o){return this.check(lN(n,o))},unwrap(){return this.element}})});function ro(e,t){return Zme(u7e,e,t)}const d7e=wt("ZodObject",(e,t)=>{Hhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>c8e(e,n,o,s),_o(e,"shape",()=>t.shape),Tf(e,"ZodObject",{keyof(){return Oo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Rs()})},loose(){return this.clone({...this._zod.def,catchall:Rs()})},strict(){return this.clone({...this._zod.def,catchall:c7e()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return l6e(this,n)},safeExtend(n){return r6e(this,n)},merge(n){return a6e(this,n)},pick(n){return s6e(this,n)},omit(n){return i6e(this,n)},partial(...n){return c6e(hN,this,n[0])},required(...n){return u6e(mN,this,n[0])}})});function Pt(e,t){const n={type:"object",shape:e??{},...hn(t)};return new d7e(n)}const pN=wt("ZodUnion",(e,t)=>{oN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>u8e(e,n,o,s),e.options=t.options});function f7e(e,t){return new pN({type:"union",options:e,...hn(t)})}const p7e=wt("ZodDiscriminatedUnion",(e,t)=>{pN.init(e,t),Dhe.init(e,t)});function $1(e,t,n){return new p7e({type:"union",options:t,discriminator:e,...hn(n)})}const h7e=wt("ZodIntersection",(e,t)=>{Vhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>d8e(e,n,o,s)});function m7e(e,t){return new h7e({type:"intersection",left:e,right:t})}const oC=wt("ZodRecord",(e,t)=>{Whe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>f8e(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function Xv(e,t,n){return!t||!t._zod?new oC({type:"record",keyType:Tt(),valueType:e,...hn(t)}):new oC({type:"record",keyType:e,valueType:t,...hn(n)})}const A7=wt("ZodEnum",(e,t)=>{qhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>s8e(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const l of o)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new A7({...t,checks:[],...hn(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const l of o)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new A7({...t,checks:[],...hn(s),entries:i})}});function Oo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new A7({type:"enum",entries:n,...hn(t)})}const g7e=wt("ZodLiteral",(e,t)=>{Uhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>i8e(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Rn(e,t){return new g7e({type:"literal",values:Array.isArray(e)?e:[e],...hn(t)})}const v7e=wt("ZodTransform",(e,t)=>{Zhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>r8e(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new j$(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(sf(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(sf(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function y7e(e){return new v7e({type:"transform",transform:e})}const hN=wt("ZodOptional",(e,t)=>{sN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>uN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function sC(e){return new hN({type:"optional",innerType:e})}const w7e=wt("ZodExactOptional",(e,t)=>{Khe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>uN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function k7e(e){return new w7e({type:"optional",innerType:e})}const b7e=wt("ZodNullable",(e,t)=>{Ghe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>p8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function iC(e){return new b7e({type:"nullable",innerType:e})}const _7e=wt("ZodDefault",(e,t)=>{Yhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>m8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function x7e(e,t){return new _7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():D$(t)}})}const S7e=wt("ZodPrefault",(e,t)=>{Xhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>g8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function C7e(e,t){return new S7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():D$(t)}})}const mN=wt("ZodNonOptional",(e,t)=>{Jhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>h8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function M7e(e,t){return new mN({type:"nonoptional",innerType:e,...hn(t)})}const A7e=wt("ZodCatch",(e,t)=>{Qhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>v8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function T7e(e,t){return new A7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const E7e=wt("ZodPipe",(e,t)=>{eme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>y8e(e,n,o,s),e.in=t.in,e.out=t.out});function lC(e,t){return new E7e({type:"pipe",in:e,out:t})}const I7e=wt("ZodReadonly",(e,t)=>{tme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>w8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function L7e(e){return new I7e({type:"readonly",innerType:e})}const $7e=wt("ZodCustom",(e,t)=>{nme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>l8e(e,n)});function N7e(e,t={}){return Kme($7e,e,t)}function z7e(e,t){return Gme(e,t)}const H0=Tt().min(1),Jv=Tt().min(1),If=Tt().min(1),D0=Tt().min(1),pl=Tt().min(1),B7e=/^[A-Za-z0-9._-]{1,128}$/;function R7e(e){return B7e.test(e)&&e!=="."&&e!==".."}const gN=$1("kind",[Pt({kind:Rn("user"),payload:Rs().optional()}),Pt({kind:Rn("cron"),taskId:D0.optional(),payload:Rs().optional()}),Pt({kind:Rn("task"),taskId:D0,payload:Rs().optional()}),Pt({kind:Rn("hook"),payload:Rs().optional()}),Pt({kind:Rn("compaction"),payload:Rs().optional()}),Pt({kind:Rn("side"),payload:Rs().optional()}),Pt({kind:Rn("other"),payload:Rs().optional()})]),P7e=Pt({inputTokens:ln().optional(),outputTokens:ln().optional(),cachedTokens:ln().optional(),cost:ln().optional()}),S2=Pt({inputOther:ln(),output:ln(),inputCacheRead:ln(),inputCacheCreation:ln()}),F7e=Pt({llmFirstTokenLatencyMs:ln().optional(),llmStreamDurationMs:ln().optional(),llmRequestBuildMs:ln().optional(),llmServerFirstTokenMs:ln().optional(),llmServerDecodeMs:ln().optional(),llmClientConsumeMs:ln().optional()}),j7e=Pt({failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:Tt(),errorMessage:Tt(),statusCode:ln().optional()}),vN=Oo(["queued","running","completed","failed","cancelled"]),O7e=Oo(["running","completed","interrupted","failed"]),H7e=Pt({kind:Rn("text"),frameId:If,role:Oo(["assistant","user"]),text:Tt(),attachmentIds:ro(Tt()).optional(),taskId:D0.optional(),promptIds:ro(Tt()).optional()}),D7e=Pt({kind:Rn("thinking"),frameId:If,text:Tt()}),V7e=Pt({agentId:pl,role:Oo(["child","member"]).optional()}),W7e=Pt({kind:Oo(["stdout","stderr","progress","status","custom"]),text:Tt().optional(),percent:ln().optional(),customKind:Tt().optional(),customData:Rs().optional()}),q7e=Pt({kind:Rn("tool"),frameId:If,toolCallId:Tt(),name:Tt(),view:Tt().optional(),state:Oo(["running","done","error"]),input:Rs().optional(),output:Rs().optional(),display:Rs().optional(),error:Tt().optional(),inputText:Tt().optional(),progress:W7e.optional(),taskId:D0.optional(),approvalId:Tt().optional(),todoId:Tt().optional(),agentRefs:ro(V7e).optional()}),Qv=Pt({interactionId:Tt(),interactionKind:Oo(["approval","question"]),toolCallId:Tt().optional(),state:Oo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Rs().optional(),response:Rs().optional()}),U7e=Pt({kind:Rn("notice"),frameId:If,level:Oo(["error","warning","info"]),source:Tt().optional(),message:Tt(),detail:Rs().optional()}),yN=$1("kind",[H7e,D7e,q7e,U7e]),wN=Pt({kind:Rn("step"),stepId:Jv,turnId:H0,ordinal:ln().int(),state:O7e,frames:ro(yN),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:S2.optional(),finishReason:Tt().optional(),timing:F7e.optional(),retry:j7e.optional(),endReason:Tt().optional(),endMessage:Tt().optional()}),kN=Pt({kind:Rn("turn"),turnId:H0,ordinal:ln().int(),state:vN,origin:gN,prompt:Tt().optional(),attachmentIds:ro(Tt()).optional(),steps:ro(wN),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:P7e.optional(),durationMs:ln().optional(),error:Tt().optional()}),bN=Pt({kind:Rn("marker"),markerId:Tt(),marker:Tt(),payload:Rs().optional(),at:Tt().optional()}),_N=Pt({kind:Rn("taskref"),refId:Tt(),taskId:D0,at:Tt().optional()}),xN=$1("kind",[kN,bN,_N]),e9=Pt({taskId:D0,kind:Oo(["shell","subagent","tool","other"]),state:Oo(["running","completed","failed","timed_out","killed","lost"]),detached:Ef(),description:Tt().optional(),agentId:pl.optional(),outputTail:Tt(),startedAt:Tt().optional(),endedAt:Tt().optional(),resultSummary:Tt().optional(),error:Tt().optional(),stateReason:Tt().optional(),usage:S2.optional(),model:Tt().optional(),thinkingEffort:Tt().optional()}),SN=Pt({objective:Tt(),status:Oo(["active","paused","blocked","complete"]),completionCriterion:Tt().optional(),budgetUsed:ln().optional(),budgetLimit:ln().optional()}),Z7e=Pt({plan:Pt({reviewPath:Tt().optional(),version:ln().optional()}).optional(),dynamic_workflow:Pt({trigger:Tt().optional()}).optional(),tower:Pt({}).optional()}),K7e=Pt({plan:Pt({reviewPath:Tt().optional(),version:ln().optional()}).nullable().optional(),dynamic_workflow:Pt({trigger:Tt().optional()}).nullable().optional(),tower:Pt({}).nullable().optional()}),G7e=$1("kind",[Pt({kind:Rn("idle")}),Pt({kind:Rn("running"),turnId:ln(),step:ln(),stepId:Tt(),since:ln()}),Pt({kind:Rn("streaming"),turnId:ln(),step:ln(),stepId:Tt(),stream:Oo(["assistant","thinking","tool_call"]),toolCallId:Tt().optional(),toolName:Tt().optional(),since:ln()}),Pt({kind:Rn("tool_call"),turnId:ln(),step:ln(),toolCallId:Tt(),name:Tt(),since:ln()}),Pt({kind:Rn("retrying"),turnId:ln(),step:ln(),stepId:Tt(),failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:Tt().optional(),statusCode:ln().optional(),since:ln()}),Pt({kind:Rn("awaiting_approval"),turnId:ln(),step:ln().optional(),approval:Rs().optional(),since:ln()}),Pt({kind:Rn("interrupted"),turnId:ln(),step:ln().optional(),reason:Oo(["aborted","max_steps","error"]),message:Tt().optional(),at:ln()}),Pt({kind:Rn("ended"),turnId:ln(),reason:Oo(["completed","cancelled","failed","blocked"]),durationMs:ln().optional(),at:ln()})]),Y7e=Pt({byModel:Xv(Tt(),S2).optional(),currentTurn:S2.optional(),total:S2.optional()}),X7e=Pt({model:Tt().optional(),thinkingEffort:Tt().optional(),usage:Y7e.optional(),contextTokens:ln().optional(),maxContextTokens:ln().optional(),contextUsage:ln().optional(),permission:Oo(["manual","yolo","auto"]).optional(),phase:G7e.optional()}),t9=Pt({goal:SN.optional(),modes:Z7e.optional(),activity:Oo(["idle","turn","disposing","unknown"]).optional(),agent:X7e.optional()}),J7e=t9.extend({goal:SN.nullable().optional(),modes:K7e.optional()}),e6=Pt({attachmentId:Tt(),mediaType:Tt(),name:Tt().optional(),size:ln().optional(),source:$1("kind",[Pt({kind:Rn("url"),url:Tt()}),Pt({kind:Rn("file"),fileId:Tt()}),Pt({kind:Rn("session_media"),fileId:Tt()})]).optional(),placeholder:Tt().optional()}),Q7e=Pt({title:Tt(),status:Oo(["pending","in_progress","done"])}),n9=Pt({todoId:Tt(),items:ro(Q7e),updatedAt:Tt().optional()}),o9=Pt({promptId:Tt(),status:Oo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:Tt().optional(),content:Rs().optional(),createdAt:Tt(),finishedAt:Tt().optional(),steeredAt:Tt().optional()}),CN=Pt({items:ro(xN),tasks:ro(e9),interactions:ro(Qv).default([]),attachments:ro(e6).default([]),todos:ro(n9).default([]),prompts:ro(o9).default([]),meta:t9,hasMoreOlder:Ef().optional()}),ege=kN.omit({steps:!0}),tge=wN.omit({frames:!0}),nge=$1("type",[Pt({type:Rn("frame"),turnId:H0,stepId:Jv,frameId:If}),Pt({type:Rn("task"),taskId:D0})]),s9=$1("op",[Pt({op:Rn("reset"),agentId:pl,snapshot:CN}),Pt({op:Rn("turn.upsert"),turn:ege}),Pt({op:Rn("step.upsert"),turnId:H0,step:tge}),Pt({op:Rn("frame.upsert"),turnId:H0,stepId:Jv,frame:yN}),Pt({op:Rn("append"),target:nge,offset:ln().int().nonnegative(),text:Tt()}),Pt({op:Rn("marker.upsert"),item:bN,beforeTurn:ln().int().optional()}),Pt({op:Rn("taskref.upsert"),item:_N,beforeTurn:ln().int().optional()}),Pt({op:Rn("task.upsert"),task:e9}),Pt({op:Rn("interaction.upsert"),interaction:Qv}),Pt({op:Rn("attachment.upsert"),attachment:e6}),Pt({op:Rn("todo.upsert"),todo:n9}),Pt({op:Rn("prompt.upsert"),prompt:o9}),Pt({op:Rn("meta.merge"),meta:J7e}),Pt({op:Rn("items.remove"),ids:ro(Tt())})]);Pt({agentId:pl,ops:ro(s9)});const oge=Oo(["off","turn","block","delta"]),Lu=ln().int().nonnegative(),sge=Xv(Tt(),oge);Pt({session_id:Tt().min(1),transcript:sge,transcript_since:Xv(Tt(),Lu).optional()});Pt({agent_id:pl,before_turn:Tt().min(1).optional(),after_turn:Tt().min(1).optional(),page_size:ln().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),R7e(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const ige=Pt({agentId:pl,type:Oo(["main","sub","independent"]).optional(),parentAgentId:pl.optional(),label:Tt().optional(),createdAt:Tt().optional(),disposedAt:Tt().optional()}),lge=Pt({agent_id:pl,items:ro(xN),has_more:Ef(),tasks:ro(e9),interactions:ro(Qv).default([]),attachments:ro(e6).default([]),todos:ro(n9).default([]),prompts:ro(o9).default([]),meta:t9,agents:ro(ige),pending_interactions:ro(Tt()),seq:Lu.optional()});Pt({agent_id:pl,batches:ro(Pt({seq:Lu,ops:ro(s9)})),latest_seq:Lu,complete:Ef()});const rge=Pt({turn_id:H0,ordinal:ln().int(),state:vN,origin:gN,prompt:Tt(),attachment_ids:ro(Tt()).optional(),started_at:Tt().optional()});Pt({agents:ro(Pt({agent_id:pl,messages:ro(rge),attachments:ro(e6).default([])}))});const age=Pt({state:Oo(["pending","approved","rejected","cancelled"]),selected_option:Tt().optional(),feedback:Tt().optional()}),cge=Pt({tool_call_id:Tt(),turn_id:H0,source:Oo(["interaction","display","output"]),plan:Tt(),path:Tt().optional(),options:ro(Pt({label:Tt(),description:Tt().optional()})).optional(),review:age.optional()});Pt({agent_id:pl,plans:ro(cge)});const uge=Pt({agent_id:pl,snapshot:CN,has_more_older:Ef(),seq:Lu.optional()}),dge=Pt({agent_id:pl,ops:ro(s9),seq:Lu.optional()}),MN=uge.extend({type:Rn("transcript.reset")}),AN=dge.extend({type:Rn("transcript.ops")});$1("type",[MN,AN]);const fge=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],TN=500,U5=256*1024,rC=200,Am=16384,Tm=500,Em=50,Im=50,pge=6,hge=/api[_-]?key|authorization|token|secret|password|cookie|credential/i,mge=/^[A-Za-z0-9+/=_-]{200,}$/;let Lm=null;function pr(){if(Lm!==null)return Lm;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=ls(dn.debug)==="1"),Lm=e,e}const h1=[],Qc=[];let Jd=0;const y0=[];let Qd=0,gge=1;const Z5=new TextEncoder,vge=new Set(fge),i9=V(0),e2=Uo(!1);function yge(){return h1}function wge(){h1.length=0,Qc.length=0,Jd=0,y0.length=0,Qd=0,i9.value++}function Aa(e){if(!e2.value){try{const t={id:gge++,ts:Date.now(),source:e.source,kind:String(gu(e.kind)),label:String(gu(e.label)),sessionId:e.sessionId===void 0?void 0:String(gu(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:N1(e.detail)},n=JSON.stringify(t),o=Z5.encode(n).byteLength;if(o>U5)return;for(h1.push(t),Qc.push(n),Jd+=o+(Qc.length>1?1:0);h1.length>TN||Jd>U5;){const s=Qc.shift();h1.shift(),s!==void 0&&(Jd-=Z5.encode(s).byteLength,Qc.length>0&&(Jd-=1))}}catch{return}i9.value++}}function r0(e){if(typeof e=="string")return e.length<=rC?e:e.slice(0,rC)}function Al(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function kge(e,t){if(vge.has(e))try{const n={ts:Date.now(),event:e,sessionId:r0(t?.sessionId),status:r0(t?.status),operation:r0(t?.operation),seq:Al(t?.seq),durationMs:Al(t?.durationMs),messageCount:Al(t?.messageCount),contentCount:Al(t?.contentCount),mediaCount:Al(t?.mediaCount),sessionCount:Al(t?.sessionCount),workspaceCount:Al(t?.workspaceCount),promptId:r0(t?.promptId),zipBytes:Al(t?.zipBytes),errorName:r0(t?.errorName),errorCode:Al(t?.errorCode),requestId:r0(t?.requestId),phase:r0(t?.phase),httpStatus:Al(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Al(t?.line),col:Al(t?.col)},o=JSON.stringify(n),s=Z5.encode(o).byteLength;if(s>U5)return;for(y0.push(o),Qd+=s+(y0.length>1?1:0);y0.length>TN||Qd>U5;){const i=y0.shift();i!==void 0&&(Qd-=Z5.encode(i).byteLength,y0.length>0&&(Qd-=1))}}catch{return}}function gu(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return mge.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>Tm?`${i.slice(0,Tm)}… [+${i.length-Tm} chars]`:i}if(n!=="object")return String(e);if(t>=pge)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,Em).map(l=>gu(l,t+1));return e.length>Em&&i.push(`[+${e.length-Em} more items]`),i}const o={},s=Object.entries(e);for(const[i,l]of s.slice(0,Im))o[i]=hge.test(i)?"[redacted]":gu(l,t+1);return s.length>Im&&(o._truncatedKeys=s.length-Im),o}function N1(e){if(e===void 0)return;const t=gu(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>Am)return{_truncated:`detail JSON was ${n.length} chars; first ${Am} kept`,preview:n.slice(0,Am)}}catch{return"[unserializable detail]"}return t}function X3(e){pr()&&Aa({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:N1(e.body)}})}function Ac(e){if(!pr())return;const t=e.code!==0;Aa({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:N1(e.data)}})}function Da(e){pr()&&Aa({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Tc(e,t){pr()&&Aa({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:N1(t)})}function bge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;Aa({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:N1(e)})}function _ge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,l=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Aa({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${l.length>0?` (${l.join(" ")})`:""}`,detail:N1(t.payload)})}const xge={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Sge(e,t,n){pr()&&Aa({source:"client",kind:`client:${e}`,label:`${xge[e]} ${t}`,detail:N1(n)})}function ia(e,t){pr()&&Aa({source:"client",kind:"client:event",label:`· ${e}`,detail:N1(t)})}function _s(e,t){kge(e,t),Aa({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let $m=!1,J3=null;function Cge(){if($m)return()=>J3?.();$m=!0;const e=[];try{if(typeof window<"u"){const n=s=>{_s("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno})},o=s=>{const i=s.reason;_s("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i})};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(pr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{Sge(n,i.map(Mge).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(J3===t){for(const n of e.toReversed())n();J3=null,$m=!1}};return J3=t,t}function Mge(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function EN(e=h1){if(typeof document>"u")return;const t=new Blob([Age(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`pythinker-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Age(e=h1){return e===h1?Qc.join(` `):e.map(t=>JSON.stringify(t)).join(` -`)}function age(){return w0.join(` -`)}function AN(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function M7(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function tr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:AN(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function M2(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function lC(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url,id:e.id}}function s9(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:lC(e.source)};case"video":return{type:"video",source:lC(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function A7(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(s9),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function cge(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url,id:t.id},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function uge(e){return{content:e.content.map(cge),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,dynamic_workflow_mode:e.dynamicWorkflowMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function dge(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function TN(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function fge(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function pge(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(fge),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function EN(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(pge),createdAt:e.created_at}}function hge(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function mge(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=hge(o);return{answers:t,method:e.method,note:e.note}}const gge=["spawn","fork","resume"],vge=["requested","default","fork-inherit","resume-existing"],yge=["caller","policy-default","policy-pool","policy-force","fork-inherit","resume-existing"],wge=["inherit","default","pool","force"],kge=["config","default"],bge=["master-env","env","config","default"];function Ec(e,t){return typeof t=="string"&&e.includes(t)?t:void 0}function rC(e){return typeof e=="string"&&e.length>0?e:void 0}function IN(e,t){const n=Ec(gge,e[t.operation]),o=Ec(vge,e[t.profileSource]),s=Ec(yge,e[t.modelSource]),i=Ec(wge,e[t.policyMode]),l=Ec(kge,e[t.policySource]),r=Ec(bge,e[t.featureSource]),a=rC(e[t.routingEnvRevision]),c=rC(e[t.routeDecision]);if(!(n===void 0||o===void 0||s===void 0||i===void 0||l===void 0||r===void 0||a===void 0||c===void 0))return{operation:n,profileSource:o,modelSource:s,policyMode:i,policySource:l,featureSource:r,routingEnvRevision:a,routeDecision:c}}const _ge={operation:"operation",profileSource:"profile_source",modelSource:"model_source",policyMode:"policy_mode",policySource:"policy_source",featureSource:"feature_source",routingEnvRevision:"routing_env_revision",routeDecision:"route_decision"},xge={operation:"operation",profileSource:"profileSource",modelSource:"modelSource",policyMode:"policyMode",policySource:"policySource",featureSource:"featureSource",routingEnvRevision:"resolvedFromRoutingEnvironmentRevision",routeDecision:"routeDecisionFingerprint"};function Sge(e){if(!(typeof e!="object"||e===null))return IN(e,_ge)}function aC(e){if(!(typeof e!="object"||e===null))return IN(e,xge)}function $m(e){switch(e.mode){case"default":return{mode:"default",defaultModel:e.default_model??"",defaultEffort:e.default_effort};case"pool":return{mode:"pool",defaultModel:e.default_model??"",models:e.models??{},defaultEffort:e.default_effort};case"force":return{mode:"force",defaultModel:e.default_model??"",defaultEffort:e.default_effort};default:return{mode:"inherit"}}}function Cge(e){switch(e.mode){case"default":return{mode:"default",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};case"pool":return{mode:"pool",default_model:e.defaultModel,models:e.models,default_effort:e.defaultEffort||void 0};case"force":return{mode:"force",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};default:return{mode:"inherit"}}}function cC(e){return{policy:$m(e.policy),resourceVersion:e.resource_version,configuredPolicy:$m(e.effective.configured_policy),effectivePolicy:$m(e.effective.effective_policy),policySource:e.effective.policy_source,feature:{enabled:e.effective.feature.enabled,source:e.effective.feature.source}}}function I4(e){return{id:e.id,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,agentId:e.agent_id,model:e.model,thinkingEffort:e.thinking_effort,routing:Sge(e.routing),currentRoutingEnvRevision:e.current_routing_env_revision,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,dynamicWorkflowIndex:e.dynamic_workflow_index,swarmIndex:e.swarm_index,runInBackground:e.run_in_background}}function uC(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function Wa(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ic(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Tl(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function $N(e){if(!e||typeof e!="object")return null;const t=e,n=Wa(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:Wa(t,"goalId")??Wa(t,"goal_id")??"goal",objective:Wa(t,"objective")??"",completionCriterion:Wa(t,"completionCriterion")??Wa(t,"completion_criterion"),status:n,turnsUsed:Ic(t,"turnsUsed")??Ic(t,"turns_used")??0,tokensUsed:Ic(t,"tokensUsed")??Ic(t,"tokens_used")??0,wallClockMs:Ic(t,"wallClockMs")??Ic(t,"wall_clock_ms")??0,terminalReason:Wa(t,"terminalReason")??Wa(t,"terminal_reason"),budget:{tokenBudget:Tl(s,"tokenBudget")??Tl(s,"token_budget"),remainingTokens:Tl(s,"remainingTokens")??Tl(s,"remaining_tokens"),turnBudget:Tl(s,"turnBudget")??Tl(s,"turn_budget"),remainingTurns:Tl(s,"remainingTurns")??Tl(s,"remaining_turns"),wallClockBudgetMs:Tl(s,"wallClockBudgetMs")??Tl(s,"wall_clock_budget_ms"),remainingWallClockMs:Tl(s,"remainingWallClockMs")??Tl(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function Mge(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:tr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:tr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.session.archived":return{type:"sessionArchived",sessionId:t.session_id,workspaceId:t.payload.workspace_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:M2(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:M2(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:AN(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=$N(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:A7(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(s9),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:TN(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:EN(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:I4(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:T7(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function Age(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort,adaptiveThinking:e.adaptive_thinking}}function Lm(e){return{loginId:e.login_id,state:e.state,defaultModel:e.default_model,message:e.message}}function Ld(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function LN(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function Tge(e){return{provider:LN(e.provider),modelsImported:e.models_imported}}function Ege(e){return Array.isArray(e)?e.map(t=>({id:t.id,enabled:t.enabled===!0,source:t.source,configValue:typeof t.config_value=="boolean"?t.config_value:void 0,defaultEnabled:t.default_enabled===!0,externallyControlled:t.externally_controlled===!0,overridden:t.overridden===!0})):[]}function T7(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultThinking:e.default_thinking,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,disabledSkills:e.disabled_skills,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry}}function Ige(e){return e.session_id}function $ge(e){return e.seq}const Lge="main",Nge=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function ta(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function zge(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}const E7=new Map;function Bge(e){return E7.get(e)}function dC(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0}}function as(e,t){const n=e[t];return typeof n=="string"?n:void 0}function c0(e){return e.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}function f0(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function El(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function Rge(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=as(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=as(t,"goalId")??as(t,"goal_id")??"goal",l=as(t,"objective")??"";return{goalId:i,objective:l,completionCriterion:as(t,"completionCriterion")??as(t,"completion_criterion"),status:s,turnsUsed:f0(t,"turnsUsed")??f0(t,"turns_used")??0,tokensUsed:f0(t,"tokensUsed")??f0(t,"tokens_used")??0,wallClockMs:f0(t,"wallClockMs")??f0(t,"wall_clock_ms")??0,terminalReason:as(t,"terminalReason")??as(t,"terminal_reason"),budget:{tokenBudget:El(o,"tokenBudget")??El(o,"token_budget"),remainingTokens:El(o,"remainingTokens")??El(o,"remaining_tokens"),turnBudget:El(o,"turnBudget")??El(o,"turn_budget"),remainingTurns:El(o,"remainingTurns")??El(o,"remaining_turns"),wallClockBudgetMs:El(o,"wallClockBudgetMs")??El(o,"wall_clock_budget_ms"),remainingWallClockMs:El(o,"remainingWallClockMs")??El(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function k0(e,t,n,o,s=[]){if(typeof n!="string"||n.length===0)return null;const i=e.subagentMeta.get(n)??{id:n,sessionId:t,kind:"subagent",description:"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},r=(i.status==="completed"||i.status==="failed"||i.status==="cancelled")&&o.status==="running"?{...o,status:i.status,subagentPhase:i.subagentPhase,startedAt:i.startedAt,completedAt:i.completedAt,outputPreview:i.outputPreview,outputBytes:i.outputBytes,suspendedReason:i.suspendedReason}:o,a=Object.fromEntries(Object.entries(r).filter(([,u])=>u!==void 0)),c={...i,...a,id:n,agentId:n,sessionId:t,kind:"subagent"};for(const u of s)u in a||delete c[u];return e.subagentMeta.set(n,c),c}function Pge(e,t){if(e==="turn.step.started")return null;if(e==="tool.use"||e==="tool.call.started"){const n=as(t,"name")??as(t,"toolName")??"tool",o=ni(Fge(n)),s=jge(n,t.args??t.input);return s?`Calling ${o}: ${s}`:`Calling ${o}`}if(e==="tool.progress"){const n=t.update;if(n&&typeof n=="object"){const s=as(n,"text");if(s)return Nm(s);const i=as(n,"message");if(i)return Nm(i)}const o=as(t,"message");if(o)return Nm(o)}return null}function Fge(e){return e.replace(/_\d+$/,"")}const fC=2e3;function Nm(e){return e.length>fC?`${e.slice(0,fC)}…`:e}function jge(e,t){if(t==null)return"";const n=typeof t=="string"?t:JSON.stringify(t);return ba(e,n)}function Oge(e,t,n,o,s,i){if(i.has(n)&&o==="turn.step.started")return[];if(o==="assistant.delta"){const u=as(s,"delta");if(!u)return[];const d=e.subagentMeta.get(n),f=k0(e,t,n,{status:"running",subagentPhase:"working",startedAt:d?.startedAt??new Date().toISOString()}),p=[];return f&&p.push({type:"taskCreated",sessionId:t,task:f}),p.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:u,stream:"stdout",kind:"text"}),p}const l=Pge(o,s);if(l===null||l.length===0)return[];const r=e.subagentMeta.get(n),a=k0(e,t,n,{status:"running",subagentPhase:"working",startedAt:r?.startedAt??new Date().toISOString()}),c=[];return a&&c.push({type:"taskCreated",sessionId:t,task:a}),c.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:l,stream:"stdout"}),c}function $c(e){return{...e,content:e.content.map(t=>({...t}))}}function pC(e,t,n){const o={id:ta("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function Hge(e,t,n,o,s,i){const l={id:o,sessionId:t,role:"user",content:s,createdAt:i,promptId:n};return e.messages.push(l),l}function Dge(e){return Array.isArray(e)?e.map(t=>s9(t)):[]}function hC(e,t,n,o){const s=e.messages.find(l=>l.id===t);if(!s)return-1;const i=s.content.at(-1);return i&&i.type===n?(n==="text"?i.text+=o:i.thinking+=o,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:o}:{type:"thinking",thinking:o}),s.content.length-1)}function Vge(e,t,n,o,s,i){const l=e.messages.find(r=>r.id===t);l&&l.content.push({type:"toolUse",toolCallId:n,toolName:o,input:s,outputLines:i})}function Wge(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",i=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return i.length>0?{outputChunk:i,stream:s}:null}function mC(e,t){e.messages.find(n=>n.id===t)}function qge(e,t,n,o,s,i){const l={id:ta("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:o,isError:s}],createdAt:new Date().toISOString(),promptId:i};return e.messages.push(l),l}function Nd(e,t){return e.messages.find(n=>n.id===t)}function gC(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function Uge(){const e=new Map,t=new Set;function n(u){let d=e.get(u);return d||(d=dC(),e.set(u,d)),d}function o(u){e.set(u,dC())}function s(u){t.add(u)}function i(u,d){const f=n(u);f.currentPromptId=d}function l(u,d){o(u);const f=n(u),p=d.promptId??ta("pr_");f.currentPromptId=p,f.turnPromptId.set(d.turnId,p);const h=pC(f,u,p);d.thinkingText.length>0&&h.content.push({type:"thinking",thinking:d.thinkingText}),d.assistantText.length>0&&h.content.push({type:"text",text:d.assistantText});for(const m of d.runningTools){const k=typeof m.lastProgress?.text=="string"&&m.lastProgress.text.length>0?[m.lastProgress.text]:void 0;h.content.push({type:"toolUse",toolCallId:m.toolCallId,toolName:m.name,input:m.args??{},outputLines:k}),f.toolStartTimes.set(m.toolCallId,Date.now())}return f.currentAssistantMsgId=h.id,f.turnTextLen=d.assistantText.length,f.turnThinkLen=d.thinkingText.length,[{type:"messageCreated",message:$c(h)}]}function r(u,d,f,p){try{return c(u,d,f,p)}catch(h){return console.error("[agentProjector] Error projecting event:",u,h instanceof Error?h.message:h),[]}}function a(u,d){return d===void 0?"append":du?"gap":"append"}function c(u,d,f,p){const h=n(f),m=d,k=[],x=m?.agentId;if(typeof x=="string"&&x!==Lge){const y=t.has(x);if(y&&(u==="thinking.delta"||u==="assistant.delta")){const w=m?.delta??"";return w?[{type:"agentDelta",sessionId:f,agentId:x,delta:{[u==="thinking.delta"?"thinking":"text"]:w}}]:[]}if(y&&u==="turn.ended")return[{type:"agentTurnEnded",sessionId:f,agentId:x,reason:m?.reason}];if(Nge.has(u))return Oge(h,f,x,u,m??{},t)}switch(u){case"session.meta.updated":{const y=m?.patch?.title??m?.title,w=m?.patch?.lastPrompt,_={};typeof y=="string"&&y.length>0&&(_.title=y),typeof w=="string"&&(_.lastPrompt=w),(_.title!==void 0||_.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:f,..._});break}case"prompt.submitted":{const y=m?.promptId,w=m?.userMessageId;if(!y||!w)break;const _=Dge(m?.content);if(_.length===0)break;h.currentPromptId=y;const M=Hge(h,f,y,w,_,typeof m?.createdAt=="string"?m.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:$c(M)});break}case"turn.started":{const y=m?.turnId,w=h.currentPromptId??ta("pr_");h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w),h.turnTextLen=0,h.turnThinkLen=0,E7.delete(f),k.push({type:"turnActiveChanged",sessionId:f,active:!0});break}case"turn.step.started":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;if(w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w)),h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId!==void 0){const M=h.retryReuseMsgId;if(h.retryReuseMsgId=void 0,Nd(h,M)!==void 0){h.currentAssistantMsgId=M;break}}const _=pC(h,f,w);h.currentAssistantMsgId=_.id,k.push({type:"messageCreated",message:$c(_)});break}case"thinking.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnThinkLen>0&&(h.turnThinkLen=0);const _=a(h.turnThinkLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const M=hC(h,y,"thinking",w);if(M<0)break;h.turnThinkLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:M,delta:{thinking:w}});break}case"assistant.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnTextLen>0&&(h.turnTextLen=0);const _=a(h.turnTextLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const M=hC(h,y,"text",w);if(M<0)break;h.turnTextLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:M,delta:{text:w}});break}case"tool.use":case"tool.call.started":{const y=h.currentAssistantMsgId,w=m?.turnId,_=h.turnPromptId.get(w)??h.currentPromptId;if(!y||!_)break;const M=m?.toolCallId,P=m?.name??m?.toolName??"",B=m?.args??m?.input??{};Vge(h,y,M,P,B);const $=Nd(h,y);$&&$.content.length-1,h.toolStartTimes.set(M,Date.now()),$&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:$.content.map(T=>({...T})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const y=m?.toolCallId,w=Wge(m??{});y&&w&&k.push({type:"toolOutput",sessionId:f,toolCallId:y,outputChunk:w.outputChunk,stream:w.stream});break}case"tool.result":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w));const _=m?.toolCallId,M=m?.output,P=m?.isError??!1;h.toolStartTimes.get(_)??Date.now(),h.toolStartTimes.delete(_);const B=qge(h,f,_,M,P,w);k.push({type:"messageCreated",message:$c(B)}),h.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const y=h.currentAssistantMsgId,w=zge(m?.usage);if(h.totalInput+=w.input,h.totalOutput+=w.output,h.totalCacheRead+=w.cacheRead,h.totalCacheCreate+=w.cacheCreate,y){mC(h,y);const _=Nd(h,y);_&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:_.content.map(M=>({...M})),status:"completed"})}break}case"agent.status.updated":{m?.model&&(h.model=m.model),m?.contextTokens!==void 0&&(h.contextTokens=m.contextTokens),m?.maxContextTokens!==void 0&&(h.contextLimit=m.maxContextTokens),k.push({type:"sessionUsageUpdated",sessionId:f,usage:gC(h),model:h.model||void 0,dynamicWorkflowMode:m?.dynamicWorkflowMode===!0?!0:m?.dynamicWorkflowMode===!1?!1:void 0,planMode:m?.planMode===!0?!0:m?.planMode===!1?!1:void 0,thinking:typeof m?.thinkingEffort=="string"&&m.thinkingEffort.length>0?m.thinkingEffort:void 0});break}case"turn.ended":{const y=h.currentAssistantMsgId,w=m?.reason??"completed",_=f0(m??{},"durationMs");if(k.push({type:"turnActiveChanged",sessionId:f,active:!1,reason:m?.reason}),y){mC(h,y);const P=Nd(h,y);P&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:P.content.map(B=>({...B})),status:w==="failed"||w==="blocked"?"error":"completed",durationMs:_})}h.turnCount++;const M=gC(h);k.push({type:"sessionUsageUpdated",sessionId:f,usage:M}),h.currentAssistantMsgId=void 0,h.currentPromptId=void 0,h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId=void 0;break}case"prompt.completed":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptCompleted",sessionId:f,promptId:y,reason:m?.reason??"completed"});break}case"prompt.aborted":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptAborted",sessionId:f,promptId:y});break}case"turn.step.retrying":{const y=h.currentAssistantMsgId;if(y!==void 0){const w=Nd(h,y);w!==void 0&&(w.content=w.content.filter(_=>_.type!=="text"&&_.type!=="thinking"&&_.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:f,messageId:y,content:w.content.map(_=>({..._})),status:"pending"}),h.retryReuseMsgId=y)}h.turnTextLen=0,h.turnThinkLen=0,h.toolStartTimes.clear();break}case"turn.step.interrupted":{h.currentAssistantMsgId=void 0,h.retryReuseMsgId=void 0;const y=typeof m?.reason=="string"&&m.reason.length>0?m.reason:"error",w=typeof m?.message=="string"&&m.message.length>0?m.message:void 0;E7.set(f,{reason:y,message:w,turnId:typeof m?.turnId=="number"?m.turnId:void 0,at:Date.now()});break}case"subagent.spawned":{const y=typeof m?.subagentId=="string"&&m.subagentId.length>0?m.subagentId:ta("task_"),w={id:y,agentId:y,sessionId:f,kind:"subagent",description:typeof m?.description=="string"?m.description:m?.subagentName??"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof m?.subagentName=="string"?m.subagentName:void 0,model:typeof m?.model=="string"?m.model:void 0,thinkingEffort:typeof m?.thinkingEffort=="string"?m.thinkingEffort:void 0,routing:aC(m?.routing),currentRoutingEnvRevision:typeof m?.currentRoutingEnvironmentRevision=="string"?m.currentRoutingEnvironmentRevision:void 0,parentToolCallId:typeof m?.parentToolCallId=="string"?m.parentToolCallId:void 0,dynamicWorkflowIndex:typeof m?.dynamicWorkflowIndex=="number"?m.dynamicWorkflowIndex:void 0,runInBackground:m?.runInBackground===!0};h.subagentMeta.set(w.id,w),k.push({type:"taskCreated",sessionId:f,task:w});break}case"subagent.started":{const y=k0(h,f,m?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.suspended":{const y=k0(h,f,m?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof m?.reason=="string"?m.reason:void 0},["suspendedReason"]);y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.completed":{const y=typeof m?.resultSummary=="string"?m.resultSummary:void 0,w=k0(h,f,m?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"completed",outputPreview:y});break}case"subagent.failed":{const y=typeof m?.error=="string"?m.error:void 0,w=k0(h,f,m?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"failed",outputPreview:y});break}case"task.notified":{const y=as(m??{},"notificationType"),w=as(m??{},"sourceKind"),_=as(m??{},"sourceId");if(!y||!w||!_)break;const M=y.startsWith("task.")?y.slice(5):y,P=`task:${_}:${M}`,B=as(m??{},"title")??"",$=as(m??{},"severity")??"",T=as(m??{},"body")??"",I=` -`+(B!==""?`Title: ${c0(B)} -`:"")+($!==""?`Severity: ${c0($)} -`:"")+(T!==""?`${c0(T)} -`:"")+"",N={id:`task_ntf_${P}`,sessionId:f,role:"user",content:[{type:"text",text:I}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:_,status:M,notificationId:P}}};h.messages.push(N),k.push({type:"messageCreated",message:$c(N)});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:m?.code,message:m?.message,name:m?.name,details:m?.details,retryable:m?.retryable}});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:m?.message}});break}case"task.started":{const y=m?.info??{},w=typeof y.startedAt=="number"?new Date(y.startedAt).toISOString():void 0,_=typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):ta("task_"),M=typeof y.description=="string"?y.description:typeof y.command=="string"?y.command:Mo.global.t("tasks.defaultDescription");if(y.kind==="agent"){const B=typeof y.agentId=="string"&&y.agentId.length>0?y.agentId:void 0;if(B!==void 0){const $=k0(h,f,B,{description:M,backgroundTaskId:_,model:typeof y.model=="string"?y.model:void 0,thinkingEffort:typeof y.thinkingEffort=="string"?y.thinkingEffort:void 0,routing:aC(y.routing),currentRoutingEnvRevision:typeof y.currentRoutingEnvironmentRevision=="string"?y.currentRoutingEnvironmentRevision:void 0,runInBackground:!0});$&&k.push({type:"taskCreated",sessionId:f,task:$})}else k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"subagent",description:M,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,subagentPhase:"queued",runInBackground:!0}});break}const P=typeof y.command=="string"?y.command:void 0;k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"bash",description:M,command:P,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,outputPreview:P!==void 0?`$ ${P}`:void 0}});break}case"task.terminated":{const y=m?.info??{},w=y.status==="failed"||typeof y.exitCode=="number"&&y.exitCode!==0;k.push({type:"taskCompleted",sessionId:f,taskId:typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):"",status:w?"failed":"completed"});break}case"compaction.completed":{const y=m?.result??{};k.push({type:"compactionCompleted",sessionId:f,tokensBefore:typeof y.tokensBefore=="number"?y.tokensBefore:void 0,tokensAfter:typeof y.tokensAfter=="number"?y.tokensAfter:void 0,summary:typeof y.summary=="string"?y.summary:void 0}),k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:f,trigger:m?.trigger==="manual"?"manual":"auto",instruction:typeof m?.instruction=="string"?m.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:f});break}case"goal.updated":{const y=Rge(m?.snapshot??null);k.push({type:"goalUpdated",sessionId:f,goal:y?.status==="complete"?null:y});break}case"cron.fired":{const y=m?.origin,w=as(m??{},"prompt");if(y&&typeof y=="object"&&y.kind==="cron_job"&&w){const _={id:ta("cron_"),sessionId:f,role:"user",content:[{type:"text",text:w}],createdAt:new Date().toISOString(),metadata:{origin:y}};h.messages.push(_),k.push({type:"messageCreated",message:$c(_)})}break}}return k}return{project:r,bindNextPromptId:i,seedInFlight:l,reset:o,markSideChannelAgent:s}}const Zge=new Set(["server_hello","ack","ping","resync_required","error","pong"]),vC=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","task.notified","background.task.started","background.task.terminated","cron.fired"]),Kge=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),Gge=new Set(["assistant.delta","thinking.delta"]);function Yge(e,t){if(Zge.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return Gge.has(o)?Xge(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?Kge.has(o)?{route:"protocol"}:vC.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:vC.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function Xge(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}class t2 extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class Jr extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}function ol(e){return e instanceof t2||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function i9(e){return e instanceof Jr||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}const Xs="pythinker-web.server-credential",Jge="token",Qge=10080*60*1e3;let $r;const I7=new Set;function eve(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(Jge);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function $7(e){return{version:1,credential:e,expiresAt:Date.now()+Qge}}function tve(e){return JSON.stringify(e)}function l9(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function L7(e){globalThis.localStorage?.setItem(Xs,tve(e))}function nve(){try{const e=globalThis.localStorage?.getItem(Xs);if(e){const n=l9(e);if(n===void 0){const o=$7(e);let s=!1;try{L7(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Xs),globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs);return}const t=globalThis.sessionStorage?.getItem(Xs);if(t){const n=$7(t);let o=!1;try{L7(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs),o=!0}catch{}return o?n:void 0}return}catch{return}}function ove(){const e=eve();return e?(zN(e),!0):($r=nve(),$r!==void 0)}function NN(){if($r!==void 0){if($r.expiresAt<=Date.now()){sve($r);return}return $r.credential}}function sve(e){$r=void 0;try{globalThis.sessionStorage?.removeItem(Xs);const t=globalThis.localStorage?.getItem(Xs),n=t==null?void 0:l9(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Xs)}catch{}}function zN(e){const t=$7(e);$r=t;try{L7(t)}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}}function ive(){const e=$r;$r=void 0;try{const t=globalThis.localStorage?.getItem(Xs),o=(t==null?void 0:l9(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(Xs),globalThis.sessionStorage?.removeItem(Xs)}catch{}}function lve(e){return I7.add(e),()=>{I7.delete(e)}}function rve(){ive();for(const e of I7)try{e()}catch{}}const Oc=3e4,X3=5*6e4,BN="0123456789ABCDEFGHJKMNPQRSTVWXYZ",yC=500,RN=40101;function J3(e=Oc){try{return AbortSignal.timeout(e)}catch{return}}function ave(e,t){let n="",o=e;for(let s=0;sBN[n%32]).join("")}function Q3(){return`${ave(Date.now(),10)}${cve(16)}`}function uve(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function zm(e){try{const t=await e.text();return t?t.length>yC?`${t.slice(0,yC)}...`:t:void 0}catch{return}}class N7{constructor(t,n,o="v1"){this.origin=t,this.identity=n,this.apiVersion=o}async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t){const n=Yc(this.origin,t,this.apiVersion),o=Q3(),s={"X-Request-Id":o};this.addClientHeaders(s);const i=Date.now();G3({method:"GET",path:t,url:n,requestId:o});let l;try{l=await fetch(n,{method:"GET",headers:s,signal:J3()})}catch(a){throw Va({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-i,error:a}),new Jr({message:`Network error calling GET ${t}`,cause:a,method:"GET",path:t,url:n,requestId:o,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-i})}if(l.ok)return Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:0,msg:""}),l.blob();let r;try{r=await l.clone().json()}catch{}throw this.checkAuthRequired(l,r?.code??0),Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:r?.code??l.status,msg:r?.msg??l.statusText,envelopeRequestId:r?.request_id}),new t2({code:r?.code??l.status,msg:r?.msg??l.statusText,requestId:r?.request_id??o,details:r?.details,timestamp:Date.now(),durationMs:Date.now()-i})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async exchange(t,n,o={}){return this.request(t,n,o.body,void 0,o.allowCodes??[],o.headers,!0)}async postZip(t,n,o){const s="POST",i=Yc(this.origin,t,this.apiVersion),l=Q3(),r={"X-Request-Id":l,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(r);const a=Date.now();G3({method:s,path:t,url:i,requestId:l,body:o});let c;try{c=await fetch(i,{method:s,headers:r,body:JSON.stringify(n),signal:J3(X3)})}catch(p){throw Va({method:s,path:t,requestId:l,phase:"fetch",durationMs:Date.now()-a,error:p}),new Jr({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"fetch",timeoutMs:X3,timestamp:Date.now(),durationMs:Date.now()-a})}const u=c.headers.get("content-type")??void 0,d=u?.split(";",1)[0]?.trim().toLowerCase();if(!c.ok||d!=="application/zip"){let p;try{p=await c.clone().json()}catch{}if(this.checkAuthRequired(c,p?.code??0),!c.ok||p!==void 0&&p.code!==0){const k=p?.code??c.status,x=p?.msg??c.statusText;throw Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:k,msg:x,envelopeRequestId:p?.request_id}),new t2({code:k,msg:x,requestId:p?.request_id??l,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const h=c.clone(),m=new TypeError(`Expected application/zip, received ${u??"no content type"}`);throw Va({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:m}),new Jr({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:X3,status:c.status,statusText:c.statusText,contentType:u,bodyPreview:await zm(h),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await c.blob()}catch(p){throw Va({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:p}),new Jr({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:X3,status:c.status,statusText:c.statusText,contentType:u,timestamp:Date.now(),durationMs:Date.now()-a})}return Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:c.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=Yc(this.origin,t,this.apiVersion),s=Q3(),i={"X-Request-Id":s};this.addClientHeaders(i);const l=Date.now();G3({method:"POST",path:t,url:o,requestId:s,body:uve(n)});let r;try{r=await fetch(o,{method:"POST",headers:i,body:n,signal:J3()})}catch(u){throw Va({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-l,error:u}),new Jr({message:`Network error calling POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-l})}let a;const c=r.clone();try{a=await r.json()}catch(u){throw Va({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-l,status:r.status,error:u}),new Jr({message:`Failed to parse JSON response from POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:Oc,status:r.status,statusText:r.statusText,contentType:r.headers.get("content-type")??void 0,bodyPreview:await zm(c),timestamp:Date.now(),durationMs:Date.now()-l})}if(Ac({method:"POST",path:t,requestId:s,status:r.status,durationMs:Date.now()-l,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(r,a.code),a.code!==0)throw new t2({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-l});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[],l,r){let a=Yc(this.origin,n,this.apiVersion);if(s){const m=new URLSearchParams;for(const[x,y]of Object.entries(s))y!==void 0&&m.set(x,String(y));const k=m.toString();k&&(a=`${a}?${k}`)}const c=Q3(),u={"X-Request-Id":c};this.addClientHeaders(u),o!==void 0&&(u["Content-Type"]="application/json; charset=utf-8"),l!==void 0&&Object.assign(u,l);const d=Date.now();G3({method:t,path:n,url:a,requestId:c,body:o});let f;try{f=await fetch(a,{method:t,headers:u,body:o!==void 0?JSON.stringify(o):void 0,signal:J3()})}catch(m){throw Va({method:t,path:n,requestId:c,phase:"fetch",durationMs:Date.now()-d,error:m}),new Jr({message:`Network error calling ${t} ${n}`,cause:m,method:t,path:n,url:a,requestId:c,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-d})}let p;const h=f.clone();try{p=await f.json()}catch(m){throw Va({method:t,path:n,requestId:c,phase:"parse",durationMs:Date.now()-d,status:f.status,error:m}),new Jr({message:`Failed to parse JSON response from ${t} ${n}`,cause:m,method:t,path:n,url:a,requestId:c,phase:"parse",timeoutMs:Oc,status:f.status,statusText:f.statusText,contentType:f.headers.get("content-type")??void 0,bodyPreview:await zm(h),timestamp:Date.now(),durationMs:Date.now()-d})}if(Ac({method:t,path:n,requestId:c,status:f.status,durationMs:Date.now()-d,code:p.code,msg:p.msg,envelopeRequestId:p.request_id,data:p.data}),this.checkAuthRequired(f,p.code),p.code!==0&&!i.includes(p.code))throw new t2({code:p.code,msg:p.msg,requestId:p.request_id,details:p.details,timestamp:Date.now(),durationMs:Date.now()-d});return r===!0?{data:p.data,code:p.code,headers:f.headers}:p.data}addClientHeaders(t){const n=NN();n!==void 0&&(t.Authorization=`Bearer ${n}`),this.identity!==void 0&&(t["X-Pythinker-Client-Id"]=this.identity.clientId,t["X-Pythinker-Client-Name"]=this.identity.clientName,t["X-Pythinker-Client-Version"]=this.identity.clientVersion,t["X-Pythinker-Client-Ui-Mode"]=this.identity.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===RN)&&rve()}}const dve="pythinker-code.bearer.",fve=3e4;class pve{constructor(t,n,o){this.wsUrl=t,this.clientId=n,this.handlers=o}ws=null;connected=!1;closed=!1;subscriptions=new Map;pendingSubscriptions=[];transcriptSubscriptions=new Map;terminalAttachments=new Map;msgSeq=0;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),Tc("connect",{url:this.wsUrl,attempt:this.reconnectAttempts});const t=NN(),n=t!==void 0?[`${dve}${t}`]:void 0,o=new WebSocket(this.wsUrl,n);this.ws=o,o.onopen=()=>{Tc("open")},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));nge(i),this.handleFrame(i)}catch(i){Tc("parse-error",{error:String(i)}),this.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{Tc("error"),this.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{Tc("close",s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0),this.connected=!1,this.ws=null,this.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,Tc("reconnect-scheduled",{delayMs:n,attempt:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,sinceSeq:o}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=e4(t,n),i=this.terminalAttachments.get(s),l=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:l}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,l)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(e4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(e4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,fve),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=xN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const l=s.data;this.handlers.onTranscriptReset?.(i,l.agent_id,{...l.snapshot,hasMoreOlder:l.has_more_older},l.seq);const r=this.transcriptSubscriptions.get(i);r?.agentId===l.agent_id&&l.seq!==void 0&&(r.sinceSeq=l.seq);return}if(o==="transcript.ops"){const s=SN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const l=s.data,r=this.handlers.onTranscriptOps?.(i,l.agent_id,l.ops,l.seq),a=this.transcriptSubscriptions.get(i);r!==!1&&a?.agentId===l.agent_id&&l.seq!==void 0&&(a.sinceSeq=l.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.handlers.onRawAgentEvent?this.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,l=n.seq,r=e4(s,i),a=this.terminalAttachments.get(r);a&&this.terminalAttachments.set(r,{...a,lastSeq:Math.max(a.lastSeq,l)});const c=typeof n.payload?.data=="string"?n.payload.data:"";this.handlers.onTerminalOutput?.(s,i,c,l);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,l=n.payload?.exit_code,r=typeof l=="number"?l:null;this.handlers.onTerminalExit?.(s,i,r);break}default:{this.trackCursor(n);const s=n.type,i=Yge(s,n.payload);if(i.route==="protocol"){this.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const l=n,r=n;this.handlers.onRawAgentEvent({type:i.agentType,seq:l.seq,session_id:l.session_id,timestamp:l.timestamp,payload:l.payload,...r.volatile!==void 0?{volatile:r.volatile}:{},...r.offset!==void 0?{offset:r.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const o of this.pendingSubscriptions)this.subscriptions.set(o.sessionId,o.cursor),t.includes(o.sessionId)||t.push(o.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[o,s]of this.subscriptions.entries())n[o]=s;this.send({type:"client_hello",id:this.nextId(),payload:{client_id:this.clientId,subscriptions:t,cursors:n}});for(const[o,s]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(o,s.agentId,s.sinceSeq);for(const o of this.terminalAttachments.values())this.sendTerminalAttach(o.sessionId,o.terminalId,o.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n}})}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),tge(t)}catch{}}nextId(){return`c_${++this.msgSeq}`}}function e4(e,t){return`${e}\0${t}`}function hve(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function wC(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function mve(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:e.activity.model??"",usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id||void 0}}function gve(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function kC(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function bC(e){const t={type:e.type,models:e.models.map(n=>({model:n.model,max_context_size:n.maxContextSize,display_name:n.displayName,capabilities:n.capabilities,max_output_size:n.maxOutputSize,support_efforts:n.supportEfforts,adaptive_thinking:n.adaptiveThinking}))};return"id"in e&&(t.id=e.id),"newId"in e&&e.newId!==void 0&&(t.new_id=e.newId),e.apiKey!==void 0&&(t.api_key=e.apiKey),e.baseUrl!==void 0&&(t.base_url=e.baseUrl),e.defaultModel!==void 0&&(t.default_model=e.defaultModel),t}function Bm(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function _C(e){return e==="auto_compact"||e==="manual_compact"}const xC=41201;class vve{http;httpV2;config;constructor(t){this.config=t;const n={clientId:t.clientId,clientName:t.clientName,clientVersion:t.clientVersion,clientUiMode:t.clientUiMode};this.http=new N7(t.serverHttpUrl,n),this.httpV2=new N7(t.serverHttpUrl,n,"v2")}async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,backend:t.backend==="v2"?"v2":"v1",experimentalFlagStates:Ege(t.experimental_flag_states)}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(tr),hasMore:o.has_more}}async listSessionGroupsV2(t){const n=await this.httpV2.get("/sessions",{view:"by_workspace","group.page_size":t?.groupPageSize,"meta.has_prompt":t?.hasPrompt,page_size:t?.pageSize,page_token:t?.pageToken});return{groups:n.groups.map(o=>({workspace:o.workspace,sessions:o.sessions.map(mve),total:o.total})),hasMore:n.has_more,nextPageToken:n.next_page_token,total:n.total}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return tr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return tr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.dynamicWorkflowMode!==void 0&&(s.dynamic_workflow_mode=n.dynamicWorkflowMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),n.tools!==void 0&&(s.tools=n.tools),n.mcpServers!==void 0&&(s.mcp_servers=n.mcpServers),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return tr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,dynamicWorkflowMode:n.dynamic_workflow_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return $N(n)}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return tr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(A7),hasMore:s.has_more}}async getSessionTranscript(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=O7e.parse(o);return{agentId:s.agent_id,snapshot:{items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more},agents:s.agents,pendingInteractions:s.pending_interactions,seq:s.seq}}async getSessionSnapshot(t){const n=Date.now();_s("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:tr(o.session),messages:o.messages.items.map(A7),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map(TN),pendingQuestions:o.pending_questions.map(EN),subagents:(o.subagents??[]).map(I4)};return _s("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw _s("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...wC(o)}),o}}async exportSession(t,n){const o=n===void 0?0:new TextEncoder().encode(n).byteLength,s=n===void 0||n.length===0?0:n.split(` -`).length,i=await this.http.postZip(`/sessions/${encodeURIComponent(t)}/export`,{web_log:n},{web_log_bytes:o,web_log_entries:s}),l=`${t}.zip`;return{blob:i.blob,fileName:hve(i.contentDisposition,l)}}async submitPrompt(t,n){const o=Date.now();_s("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,uge(n));return _s("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw _s("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...wC(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return tr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return tr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(tr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,dge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,mge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o)).items.map(I4)}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return I4(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async detachTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:detach`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(Bm)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return Bm(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return Bm(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listTools(t){return((await this.http.get("/tools",{session_id:t})).tools??[]).map(o=>({name:o.name,description:o.description,inputSchema:o.input_schema,source:o.source,mcpServerId:o.mcp_server_id}))}async listConnectors(){return((await this.http.get("/mcp/servers")).servers??[]).map(n=>({id:n.id,name:n.name,transport:n.transport,status:n.status,toolCount:n.tool_count,lastError:n.last_error,editable:n.editable,definition:n.definition===void 0?void 0:gve(n.definition)}))}async createConnector(t){return this.http.post("/mcp/servers",{mcp_server_id:t.name,config:kC(t)})}async updateConnector(t,n){return this.http.put(`/mcp/servers/${encodeURIComponent(t)}`,{config:kC(n)})}async removeConnector(t){return this.http.delete(`/mcp/servers/${encodeURIComponent(t)}`)}async restartConnector(t){return this.http.post(`/mcp/servers/${encodeURIComponent(t)}:restart`,{})}async listPlugins(){return((await this.http.get("/plugins")).plugins??[]).map(n=>({id:n.id,displayName:n.display_name,version:n.version,enabled:n.enabled,state:n.state,skillCount:n.skill_count,mcpServerCount:n.mcp_server_count,hasErrors:n.has_errors,source:n.source}))}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:set-enabled`,{enabled:n})}async listSubagents(t){return((await this.http.get("/agent-profiles",{work_dir:t})).profiles??[]).map(o=>({name:o.name,description:o.description,source:o.source,tools:o.tools,model:o.model,effort:o.effort,whenToUse:o.when_to_use}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([l,r])=>[l,r.map(uC)])):void 0;return{items:s.items.map(uC),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length),n.encoding!==void 0&&(o.encoding=n.encoding);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async writeFile(t,n){const o={path:n.path,content:n.content};n.encoding!==void 0&&(o.encoding=n.encoding),n.baseEtag!==void 0&&(o.base_etag=n.baseEtag);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:write`,o);return{path:s.path,size:s.size,etag:s.etag,created:s.created}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Yc(this.config.serverHttpUrl,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async revealSavedPlan(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/transcript/plan:reveal`,{agent_id:n.agentId,tool_call_id:n.toolCallId})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(M2)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return M2(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return M2(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async generateSessionTitle(t,n){const o={};return n?.force===!0&&(o.force=!0),n?.source!==void 0&&(o.source=n.source),this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,o)}async listModels(){return(await this.http.get("/models")).items.map(Age)}async listProviders(){return(await this.http.get("/providers")).items.map(Ld)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=Ld(n);return n.api_key===void 0?o:{...o,apiKey:n.api_key}}async addProvider(t){const n=await this.http.post("/providers",bC(t));return Ld(n)}async updateProvider(t,n){const o=await this.http.put(`/providers/${encodeURIComponent(t)}`,bC(n));return{provider:Ld(o.provider)}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map(Ld),modelsImported:o.models_imported}}async deleteProvider(t){return this.http.delete(`/providers/${encodeURIComponent(t)}`)}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return SC(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return SC(t)}async startCodexLogin(){const t=await this.http.post("/auth/codex:start");return{loginId:t.login_id,authorizeUrl:t.authorize_url,loopback:t.loopback,expiresAt:t.expires_at}}async getCodexLoginStatus(t){const n=await this.http.get(`/auth/codex/${encodeURIComponent(t)}`);return Lm(n)}async submitCodexLoginRedirect(t,n){const o=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:submit_code`,{redirect_url:n});return Lm(o)}async cancelCodexLogin(t){const n=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:cancel`);return Lm(n)}async getConfig(){const t=await this.http.get("/config");return T7(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultThinking:"default_thinking",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",disabledSkills:"disabled_skills",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry"};for(const[i,l]of Object.entries(t)){const r=o[i];r!==void 0&&(n[r]=l)}const s=await this.http.post("/config",n);return T7(s)}async getSubagentModelPolicy(){const t=await this.http.exchange("GET","/config/subagent-model-policy");return cC(t.data)}async setSubagentModelPolicy(t,n){return this.subagentModelPolicyWrite("PUT",Cge(t),n)}async clearSubagentModelPolicy(t){return this.subagentModelPolicyWrite("DELETE",void 0,t)}async subagentModelPolicyWrite(t,n,o){const s=o===void 0?void 0:{"If-Match":`"${o}"`},i=await this.http.exchange(t,"/config/subagent-model-policy",{body:n,headers:s,allowCodes:[xC]});if(i.code===xC||i.data===null)throw new NL(await this.getSubagentModelPolicy());return cC(i.data)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model}}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return Yc(this.config.serverHttpUrl,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}connectEvents(t){const n=npe(this.config.serverHttpUrl,this.config.clientId),o=Uge(),s=new pve(n,this.config.clientId,{onWireEvent:i=>{const l=Ige(i),r=$ge(i),a=Mge(i);a.type==="historyCompacted"&&!_C(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:l,seq:r})},onRawAgentEvent:i=>{const{type:l,seq:r,session_id:a,payload:c,offset:u}=i,d=o.project(l,c,a,{offset:u});for(const f of d){const p=c?.turnId,h=f.type==="assistantDelta"&&typeof p=="number"&&typeof u=="number"&&(l==="assistant.delta"||l==="thinking.delta")?{turnId:p,offset:u,kind:l==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!_C(f.reason)&&t.onResync(a,r),t.onEvent(f,{sessionId:a,seq:r,stream:h})}},onResync:(i,l,r)=>{o.reset(i),t.onResync(i,l,r)},onConnectionState:i=>{t.onConnectionChange(i)},onError:(i,l,r)=>{t.onError(i,l,r)},onTranscriptReset:(i,l,r,a)=>{t.onTranscriptReset?.(i,l,r,a)},onTranscriptOps:(i,l,r,a)=>t.onTranscriptOps?.(i,l,r,a),onTerminalOutput:(i,l,r,a)=>{t.onTerminalOutput?.(i,l,r,a)},onTerminalExit:(i,l,r)=>{t.onTerminalExit?.(i,l,r)}});return s.connect(),{subscribe(i,l){s.subscribe(i,l??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,l,r){s.subscribeTranscript(i,l,r)},unsubscribeTranscript(i,l){s.unsubscribeTranscript(i,l)},seedSnapshot(i,l){if(l.inFlightTurn===null){o.reset(i);return}const r=o.seedInFlight(i,l.inFlightTurn);for(const a of r)t.onEvent(a,{sessionId:i,seq:l.asOfSeq})},bindNextPromptId(i,l){o.bindNextPromptId(i,l)},abort(i,l){s.abort(i,l)},terminalAttach(i,l,r){s.terminalAttach(i,l,r)},terminalInput(i,l,r){s.terminalInput(i,l,r)},terminalResize(i,l,r,a){s.terminalResize(i,l,r,a)},terminalDetach(i,l){s.terminalDetach(i,l)},terminalClose(i,l){s.terminalClose(i,l)},markSideChannelAgent(i){o.markSideChannelAgent(i)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function SC(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function yve(e){const t=new N7(e.serverHttpUrl,{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode});return{async listCatalogProviders(){return(await t.get("/catalog/providers")).items.map(LN)},async importCatalogProvider(n){const o={catalog_id:n.catalogId};n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.id!==void 0&&(o.id=n.id);const s=await t.post("/providers:import_catalog",o);return Tge(s)}}}let Rm;function St(){if(Rm===void 0){const e=$L();Rm=Object.assign(new vve(e),yve(e))}return Rm}const wve=["src","controls","muted"],kve=["aria-label"],bve=["src","alt"],_ve=["aria-label"],z7=Je({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=V(t.fileId?"":t.url),o=V(null),s=V(!t.fileId);let i=null,l=0,r=!1,a=null;function c(){i!==null&&(URL.revokeObjectURL(i),i=null)}async function u(){const d=++l;if(c(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await St().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(r||d!==l){URL.revokeObjectURL(p);return}i=p,n.value=i}catch{if(r||d!==l)return;n.value=t.url}}return Ze(()=>[t.fileId,t.url,s.value],u,{immediate:!0}),In(()=>{typeof IntersectionObserver=="function"&&o.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(o.value)):s.value=!0}),vo(()=>{r=!0,a?.disconnect(),a=null,c()}),(d,f)=>e.kind==="video"?(g(),S(Ce,{key:0},[n.value?(g(),S("video",{key:0,ref_key:"mediaEl",ref:o,class:Pe(e.mediaClass),src:n.value,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,wve)):(g(),S("span",{key:1,ref_key:"mediaEl",ref:o,class:Pe(e.mediaClass),role:"status","aria-label":e.alt||""},null,10,kve))],64)):n.value?(g(),S("img",{key:1,ref_key:"mediaEl",ref:o,class:Pe(e.mediaClass),src:n.value,alt:e.alt||"",loading:"lazy"},null,10,bve)):(g(),S("span",{key:2,ref_key:"mediaEl",ref:o,class:Pe(e.mediaClass),role:"img","aria-label":e.alt||""},null,10,_ve))}}),xve=["title","data-kind"],Sve=["aria-label","aria-haspopup","aria-expanded"],Cve={class:"att-tile"},Mve={class:"att-name"},Ave={key:1,class:"att-err"},Tve=["aria-label"],Eve=["data-side","aria-label"],Ive={class:"att-tip-preview"},$ve={key:1,class:"att-tip-placeholder"},Lve={class:"att-tip-meta"},Nve={key:0},zve={key:0,class:"att-tip-error"},Bve={class:"att-tip-foot"},Rve=Je({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(null),l=V(null),r=V(!1),a=V("top"),c=V({});let u=null;const d=z(()=>{const $=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return $?$.toUpperCase():void 0}),f=z(()=>{const B=d.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(B)?"file-text":"file"}),p=z(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function h(B){return B<1024?`${B} B`:B<1024*1024?`${Math.round(B/1024)} KB`:`${(B/(1024*1024)).toFixed(1)} MB`}const m=z(()=>{const B=[p.value];return n.size!==void 0&&B.push(h(n.size)),B.join(" · ")}),k=z(()=>n.kind!=="file"),x=z(()=>k.value&&(!!n.url||!!n.fileId)),y=z(()=>n.error?s("mention.stateUploadFailed"):n.uploading?s("mention.stateUploading"):s("mention.stateUploaded"));function w(){const B=i.value,$=l.value;if(!B||!$)return;const T=B.getBoundingClientRect(),I=8,N=8,C=$.offsetWidth,O=$.offsetHeight;let H=T.top-O-N,D="top";H{r.value=!1,u=null},120)}function P(){u!==null&&clearTimeout(u),u=null,r.value=!1}return Ze(r,B=>{const $=B?"addEventListener":"removeEventListener";window[$]("resize",w),window[$]("scroll",w,!0)}),En(()=>{P(),window.removeEventListener("resize",w),window.removeEventListener("scroll",w,!0)}),(B,$)=>(g(),S(Ce,null,[b("span",{ref_key:"anchorRef",ref:i,class:Pe(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:m.value,"data-kind":e.kind,onMouseenter:_,onMouseleave:M,onFocusin:_,onFocusout:M,onKeydown:go(P,["esc"])},[b("button",{type:"button",class:"att-activate","aria-label":m.value,"aria-haspopup":k.value?"dialog":void 0,"aria-expanded":k.value?r.value:void 0,onClick:$[0]||($[0]=T=>o("activate"))},[b("span",Cve,[e.kind==="image"&&e.url?(g(),ue(z7,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(g(),ue(Ie,{key:1,name:"play",size:"sm"})):e.kind==="image"?(g(),ue(Ie,{key:2,name:"image",size:"sm"})):(g(),ue(Ie,{key:3,name:f.value,size:"sm"},null,8,["name"]))]),b("span",Mve,E(p.value),1),e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("composer.uploading")},null,8,["label"])):e.error?(g(),S("span",Ave,[W(Ie,{name:"info",size:"sm"})])):Y("",!0)],8,Sve),e.removable?(g(),ue(Cn,{key:0,text:e.removeLabel??v(s)("composer.remove")},{default:ae(()=>[b("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??v(s)("composer.remove"),onClick:$[1]||($[1]=T=>o("remove"))},[W(Ie,{name:"close",size:"sm"})],8,Tve)]),_:1},8,["text"])):Y("",!0)],42,xve),(g(),ue(hl,{to:"body"},[r.value&&k.value?(g(),S("div",{key:0,ref_key:"tipRef",ref:l,class:"att-tip","data-side":a.value,style:Gt(c.value),role:"dialog","aria-label":m.value,onMouseenter:_,onMouseleave:M,onFocusin:_,onFocusout:M,onKeydown:go(P,["esc"])},[$[3]||($[3]=b("span",{class:"att-tip-caret","aria-hidden":"true"},null,-1)),b("div",Ive,[x.value?(g(),ue(z7,{key:0,url:e.url??"",kind:e.kind==="video"?"video":"image",alt:p.value,"file-id":e.fileId,"media-class":"att-tip-media",controls:e.kind==="video",muted:""},null,8,["url","kind","alt","file-id","controls"])):(g(),S("span",$ve,[e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("mention.mediaPreviewUploading")},null,8,["label"])):(g(),ue(Ie,{key:1,name:e.kind==="video"?"play":"image"},null,8,["name"])),b("span",null,E(e.uploading?v(s)("mention.mediaPreviewUploading"):v(s)("mention.mediaPreviewUnavailable")),1)]))]),b("div",Lve,[W(Ie,{name:e.kind==="video"?"play":"image",size:"sm"},null,8,["name"]),b("strong",null,E(p.value),1),e.size!==void 0?(g(),S("span",Nve,"· "+E(h(e.size)),1)):Y("",!0)]),e.error?(g(),S("div",zve,E(v(s)("mention.attachmentUploadFailed")),1)):Y("",!0),b("div",Bve,[b("span",{class:Pe(["att-tip-state",{danger:e.error}])},[e.uploading?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),Oe(" "+E(y.value),1)],2),x.value?(g(),S("button",{key:0,type:"button",class:"att-tip-open",onClick:$[2]||($[2]=T=>o("activate"))},[W(Ie,{name:"expand",size:"sm"}),b("span",null,E(v(s)("mention.viewFullscreen")),1)])):Y("",!0)])],44,Eve)):Y("",!0)]))],64))}}),B7=vt(Rve,[["__scopeId","data-v-e59edff1"]]),Pve=["data-mention-kind","data-mention-name","data-mention-path","tabindex","role","onClick","onKeydown"],Fve=["innerHTML"],jve={class:"mention-pill-name"},CC=Je({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{}},setup(e){const t=e,n=V(null),o=z(()=>SL(t.text));function s(l,r){r.kind!=="file"||!t.interactive||!t.openFile||(l.preventDefault(),l.stopPropagation(),t.openFile({path:r.path}))}function i(l){const r=window.getSelection(),a=n.value;if(!r||r.rangeCount===0||!a||!l.clipboardData)return;const c=r.getRangeAt(0);if(!c.intersectsNode(a))return;const u=c.cloneContents();for(const d of u.querySelectorAll(".mention-pill")){const{mentionKind:f,mentionName:p,mentionPath:h}=d.dataset;f!=="file"&&f!=="folder"&&f!=="skill"||p===void 0||h===void 0||d.replaceWith(document.createTextNode(jv({kind:f,name:p,path:h})))}l.clipboardData.setData("text/plain",u.textContent??""),l.preventDefault()}return(l,r)=>(g(),S("span",{ref_key:"root",ref:n,class:"composer-text",onCopy:i},[(g(!0),S(Ce,null,at(o.value,(a,c)=>(g(),S(Ce,{key:c},[a.type==="text"?(g(),S(Ce,{key:0},[Oe(E(a.value),1)],64)):(g(),S("span",{key:1,class:Pe(["mention-pill",`mention-${a.attrs.kind}`]),"data-mention-kind":a.attrs.kind,"data-mention-name":a.attrs.name,"data-mention-path":a.attrs.path,tabindex:a.attrs.kind==="file"&&e.interactive&&e.openFile?0:void 0,role:a.attrs.kind==="file"&&e.interactive&&e.openFile?"button":void 0,onClick:u=>s(u,a.attrs),onKeydown:[go(u=>s(u,a.attrs),["enter"]),go(u=>s(u,a.attrs),["space"])]},[b("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:a.attrs.kind==="skill"?v($l)("sparkles","sm"):v(ju)(a.attrs.path,a.attrs.name)},null,8,Fve),b("span",jve,E(v(AL)(a.attrs.name)),1)],42,Pve))],64))),128))],544))}}),Ove=["aria-expanded","title"],Hve={class:"tf-sum"},Dve=["inert"],Vve={class:"tf-body-inner"},Wve={key:1,class:"msg"},qve=Je({__name:"TurnFold",props:{items:{},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},streamingTailIndex:{default:null},durationMs:{default:void 0},toolDiffPanel:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent","detach"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=z(()=>n.streamingTailIndex!==null),l=z(()=>n.live?n.parked?"parked":"live":"settled"),r=V(!1),a=z(()=>i.value||r.value),c=V(a.value),u=V(a.value);let d=null;Ze(a,B=>{if(B){if(d!==null&&(clearTimeout(d),d=null),c.value){u.value=!0;return}c.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{u.value=!0})});return}u.value=!1,d=setTimeout(()=>{d=null,c.value=!1},200)});const f=fn("pinScroll",()=>{}),p=V(null);function h(){r.value=!r.value,yt(()=>{const B=p.value;B&&f(B)})}const m=V(Date.now());let k=null;function x(){k!==null&&(clearInterval(k),k=null)}Ze(l,(B,$)=>{B!=="settled"?(m.value=Date.now(),k===null&&(k=setInterval(()=>{m.value=Date.now()},1e3))):x(),$==="live"&&B!=="live"&&(r.value=!1)},{immediate:!0}),En(()=>{x(),d!==null&&clearTimeout(d)});const y=z(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),w=z(()=>{if(l.value==="settled")return n.durationMs!==void 0?Math.max(0,n.durationMs):y.value===void 0||n.endedMs===void 0?void 0:Math.max(0,n.endedMs-y.value);if(y.value!==void 0)return Math.max(0,m.value-y.value)}),_=z(()=>{const B=w.value;if(B===void 0)return s("conversation.fold.workedUnknown");const $=V2(B);return $?s("conversation.fold.worked",{duration:$}):s("conversation.fold.workedUnknown")});function M(B){return u1(B)?!1:n.streamingTailIndex!==null&&"sourceIndex"in B&&B.sourceIndex===n.streamingTailIndex}function P(B){if(n.streamingTailIndex===null)return!1;const $=B.items.at(-1);return $!==void 0&&u1($)?!1:$!==void 0&&$.sourceIndex===n.streamingTailIndex}return(B,$)=>e.items.length>0?(g(),S("div",{key:0,class:Pe(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?Y("",!0):(g(),S("button",{key:0,ref_key:"headEl",ref:p,type:"button",class:"tf-head","aria-expanded":r.value,title:_.value,onClick:h},[b("span",Hve,E(_.value),1),W(Ie,{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,Ove)),c.value?(g(),S("div",{key:1,class:Pe(["tf-body",{open:u.value}]),inert:!a.value},[b("div",Vve,[(g(!0),S(Ce,null,at(e.items,(T,I)=>(g(),S(Ce,{key:v(lE)(T,I)},[T.kind==="thinking"?(g(),ue(Hg,{key:0,text:T.thinking,mobile:e.mobile,streaming:M(T),"started-at-ms":v(W2)(T.startedAt),"duration-ms":T.durationMs},null,8,["text","mobile","streaming","started-at-ms","duration-ms"])):T.kind==="text"&&T.text?(g(),S("div",Wve,[W(zr,{text:T.text,streaming:M(T),"open-file":N=>o("openFile",N)},null,8,["text","streaming","open-file"])])):T.kind==="activity-run"?(g(),ue(aE,{key:2,items:T.items,mobile:e.mobile,streaming:P(T),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[0]||($[0]=N=>o("openMedia",N)),onOpenFile:$[1]||($[1]=N=>o("openFile",N)),onOpenToolDiff:$[2]||($[2]=N=>o("openToolDiff",N)),onOpenAgent:$[3]||($[3]=N=>o("openAgent",N)),onDetach:$[4]||($[4]=N=>o("detach",N))},null,8,["items","mobile","streaming","tool-diff-panel"])):T.kind==="tool"?(g(),ue(Og,{key:3,tool:T.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[5]||($[5]=N=>o("openMedia",N)),onOpenFile:$[6]||($[6]=N=>o("openFile",N)),onOpenToolDiff:$[7]||($[7]=N=>o("openToolDiff",N)),onOpenAgent:$[8]||($[8]=N=>o("openAgent",N)),onDetach:$[9]||($[9]=N=>o("detach",N))},null,8,["tool","mobile","tool-diff-panel"])):T.kind==="notification"?(g(),ue(IL,{key:4,items:T.items},null,8,["items"])):Y("",!0)],64))),128))])],10,Dve)):Y("",!0)],2)):Y("",!0)}}),Uve=vt(qve,[["__scopeId","data-v-331ba726"]]),Zve={key:0,class:"ui-card__head"},Kve={class:"ui-card__body"},Gve={key:1,class:"ui-card__foot"},Yve=Je({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("div",{class:Pe(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(g(),S("div",Zve,[jn(t.$slots,"head",{},void 0,!0)])):Y("",!0),b("div",Kve,[jn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(g(),S("div",Gve,[jn(t.$slots,"foot",{},void 0,!0)])):Y("",!0)],2))}}),r9=vt(Yve,[["__scopeId","data-v-d2cab471"]]),Xve={class:"tf-ic"},Jve={class:"tf-title"},Qve={key:0,class:"tf-stats"},e9e={key:0,class:"tf-add"},t9e={key:1,class:"tf-del"},n9e={class:"diffbar","aria-hidden":"true"},o9e={class:"tf-list"},s9e=["innerHTML"],i9e={class:"tf-dir"},l9e={class:"tf-base"},r9e={key:0,class:"tf-stats"},a9e={key:0,class:"tf-add"},c9e={key:1,class:"tf-del"},u9e=Je({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=t,{t:o}=Lt(),s=Uo(!1),i=z(()=>s.value?e.changes:e.changes.slice(0,3)),l=z(()=>Math.max(0,e.changes.length-3)),r=z(()=>e.changes.reduce((k,x)=>k+x.added,0)),a=z(()=>e.changes.reduce((k,x)=>k+x.removed,0)),c=z(()=>e.changes.every(k=>!k.statsIncomplete)),u=z(()=>r.value+a.value),d=z(()=>u.value===0?1:r.value),f=z(()=>u.value===0?1:a.value);function p(k){if(!e.cwd)return k;const x=e.cwd.replaceAll("\\","/").replace(/\/$/,""),y=k.replaceAll("\\","/");return y.startsWith(`${x}/`)?y.slice(x.length+1):k}function h(k){const x=p(k).replaceAll("\\","/"),y=x.lastIndexOf("/");return y<0?{dir:"",base:x}:{dir:x.slice(0,y+1),base:x.slice(y+1)}}function m(k){e.interactive&&(k.hasWrite?n("openFile",{path:k.path}):n("openDiff",k))}return(k,x)=>(g(),ue(r9,{class:"turn-files"},L2({head:ae(()=>[b("span",Xve,[W(Ie,{name:"pencil",size:"sm"})]),b("span",Jve,E(v(o)(e.changes.length===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:e.changes.length})),1),c.value&&u.value>0?(g(),S("span",Qve,[r.value>0?(g(),S("span",e9e,"+"+E(r.value),1)):Y("",!0),a.value>0?(g(),S("span",t9e,"−"+E(a.value),1)):Y("",!0),b("span",n9e,[b("span",{class:"seg-add",style:Gt({flexGrow:d.value})},null,4),b("span",{class:"seg-del",style:Gt({flexGrow:f.value})},null,4)])])):Y("",!0)]),default:ae(()=>[b("ul",o9e,[(g(!0),S(Ce,null,at(i.value,y=>(g(),S("li",{key:y.path,class:"tf-row"},[(g(),ue(cs(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:"tf-file",onClick:w=>m(y)},{default:ae(()=>[b("span",{class:"tf-ficon","aria-hidden":"true",innerHTML:v(ju)(y.path)},null,8,s9e),b("span",i9e,E(h(y.path).dir),1),b("span",l9e,E(h(y.path).base),1)]),_:2},1032,["type","onClick"])),!y.statsIncomplete&&(y.added>0||y.removed>0)?(g(),S("span",r9e,[y.added>0?(g(),S("span",a9e,"+"+E(y.added),1)):Y("",!0),y.removed>0?(g(),S("span",c9e,"−"+E(y.removed),1)):Y("",!0)])):Y("",!0)]))),128))])]),_:2},[l.value>0?{name:"foot",fn:ae(()=>[W(Nt,{class:"tf-more",variant:"ghost",size:"sm",onClick:x[0]||(x[0]=y=>s.value=!s.value)},{default:ae(()=>[W(Ie,{class:Pe(["tf-more-car",{open:s.value}]),name:"chevron-down",size:"sm"},null,8,["class"]),Oe(" "+E(s.value?v(o)("conversation.turnFiles.showLess"):v(o)(l.value===1?"conversation.turnFiles.moreOne":"conversation.turnFiles.more",{number:l.value})),1)]),_:1})]),key:"0"}:void 0]),1024))}}),d9e=vt(u9e,[["__scopeId","data-v-11486090"]]),f9e=["src"],p9e=6,h9e=300,m9e=6,g9e=250,v9e=Je({__name:"MascotSprite",props:{state:{},size:{default:48}},setup(e){const t=p9e*h9e,n=m9e*g9e,o=e,s=V("laptop");let i;const l=z(()=>{const d=o.size;return{width:`${d}px`,height:`${d*208/192}px`}}),r=z(()=>o.state==="failed"?"/brand/mascot-failed.png":`/brand/mascot-${s.value}.png`);function a(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function c(){i!==void 0&&(clearTimeout(i),i=void 0)}function u(){if(c(),o.state==="failed"||a())return;const d=s.value==="laptop"?t:n;i=setTimeout(()=>{i=void 0,s.value=s.value==="laptop"?"review":"laptop",u()},d)}return In(u),En(c),Ze(()=>o.state==="failed",d=>{if(d){c();return}s.value="laptop",u()}),(d,f)=>(g(),S("img",{"aria-hidden":"true",class:"mascot-apng",src:r.value,style:Gt(l.value)},null,12,f9e))}}),y9e=vt(v9e,[["__scopeId","data-v-c03cab60"]]),w9e={class:"working-indicator",role:"status"},k9e={class:"wi-mascot","aria-hidden":"true"},b9e={class:"wi-label ui-shimmer"},_9e=Je({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",w9e,[b("span",k9e,[W(y9e,{state:"running",size:40})]),b("span",b9e,E(e.label),1)]))}}),x9e=vt(_9e,[["__scopeId","data-v-934cc635"]]),Ar=V(null),vu=V(!1);function a9(e){const t=Ar.value;!t||vu.value||(Ar.value=null,t.resolve(e))}async function S9e(){const e=Ar.value;if(!(!e||vu.value)){if(!e.action){a9(!0);return}vu.value=!0;try{await e.action(),Ar.value===e&&(Ar.value=null),e.resolve(!0)}catch(t){Ar.value===e&&(Ar.value=null),e.reject(t)}finally{vu.value=!1}}}function C9e(e){return vu.value?Promise.resolve(!1):(Ar.value&&a9(!1),new Promise((t,n)=>{Ar.value={...e,resolve:t,reject:n}}))}function B1(){return{current:Ar,busy:vu,confirm:C9e,settle:a9,runAction:S9e}}const M9e=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,A9e=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,T9e=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,MC="text/plain;charset=utf-8";function E9e(e,t){const n=(t??"").toLowerCase();if(M9e.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:MC;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:A9e.test(o)?MC:T9e.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function PN(e,t,n){const o=E9e(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await St().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const l=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=l;else{const r=document.createElement("a");r.href=l,r.download=t??e,r.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}function I9e(e){const t=e.replaceAll("\\","/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const l=n!=="",r=[];for(const c of o.split("/"))!c||c==="."||(c===".."?r.length>0&&r.at(-1)!==".."?r.pop():l||r.push(c):r.push(c));const a=n+r.join("/");return s?a.toLowerCase():a}function $9e(e,t){let n=0,o=0;for(const s of e)s.oldNo!==void 0&&(n=Math.max(n,s.oldNo)),s.newNo!==void 0&&(o=Math.max(o,s.newNo));return t.map(s=>({...s,oldNo:s.oldNo===void 0?void 0:s.oldNo+n,newNo:s.newNo===void 0?void 0:s.newNo+o}))}function L9e(e){const t=new Map;for(const n of c1(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=pi(n.tool.name);if(o!=="edit"&&o!=="multi_edit"&&o!=="write")continue;const s=jg(n.tool.arg);if(!s)continue;const i=o==="write",l=i?null:Fg(n.tool),r=l?tE(l):{added:0,removed:0},a=i||l===null,c=I9e(s),u=t.get(c);if(!u){t.set(c,{path:s,...r,hasWrite:i,statsIncomplete:a,diff:l});continue}u.added+=r.added,u.removed+=r.removed,u.hasWrite||=i,u.statsIncomplete||=a,u.diff!==null&&l!==null?u.diff=[...u.diff,{type:"hunk",text:"···"},...$9e(u.diff,l)]:u.diff=null}return[...t.values()]}const N9e={class:"chat"},z9e={key:0,class:"chat-loading"},B9e={class:"chat-loading-text"},R9e={key:1,class:"chat-empty"},P9e={key:1,class:"top-sentinel-text"},F9e={key:0,class:"u-turn"},j9e=["data-turn-id"],O9e={key:0,class:"u-atts"},H9e={key:1,class:"skill-act"},D9e={class:"skill-act-head"},V9e=["aria-expanded","onClick"],W9e={key:0,class:"u-meta"},q9e=["aria-label","onClick"],U9e=["aria-label","onClick"],Z9e=["data-turn-id"],K9e=["onClick"],G9e={class:"cd-view"},Y9e={key:1,class:"cd-label"},X9e=["data-turn-id"],J9e={key:1,class:"msg"},Q9e={key:1,class:"a-msg-ft"},eye={key:0,class:"a-duration"},tye=["aria-label","onClick"],nye={key:3,class:"turn-failed",role:"alert"},oye={class:"tf-chip","aria-hidden":"true"},sye={class:"tf-main"},iye={class:"tf-title"},lye=["title"],rye={key:5,class:"sending-placeholder"},aye={key:6,class:"q-stack"},cye={class:"q-head"},uye={class:"q-title"},dye=["onDragover","onDrop"],fye=["aria-label","onClick"],pye={class:"u-bub q-bub"},hye=["title","onDragstart"],mye=["title","onClick"],gye={key:0,class:"u-text q-text"},vye={key:1,class:"q-text q-text-placeholder"},yye={key:0,class:"q-imgs"},wye={key:0,class:"q-file"},kye=["aria-label","onClick"],bye={key:0,class:"open-unsupported",role:"status"},_ye=2500,xye=Je({__name:"ChatPane",props:{turns:{},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},fastMoon:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},turnFolding:{type:Boolean,default:!0},activityRunFolding:{type:Boolean,default:!0},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},cwd:{},queued:{default:()=>[]}},emits:["openFile","openMedia","copyConversationCopied","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","editMessage","loadOlderMessages","unqueue","editQueued","reorderQueue","steerQueued","continueTurn"],setup(e,{expose:t,emit:n}){const{t:o}=Lt(),{confirm:s}=B1();En(()=>{for(const me of x.values())me.disconnect();x.clear(),k.clear(),st!==null&&(clearTimeout(st),st=null),J!==null&&(clearTimeout(J),J=null),q!==null&&(clearTimeout(q),q=null),fe!==null&&(clearTimeout(fe),fe=null)});const i=e,l=V(null);let r=null;function a(){!l.value||typeof IntersectionObserver>"u"||(r?.disconnect(),r=new IntersectionObserver(me=>{me[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&p("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),r.observe(l.value))}In(a),En(()=>{r?.disconnect(),r=null}),Ze(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{yt().then(a)});const c=z(()=>{if(!i.turnActive||i.turns.length===0)return null;const me=i.turns.at(-1);return me.role==="assistant"?me.id:null}),u=z(()=>i.working),d=z(()=>{const me=new Map;for(const Ae of i.turns){if(Ae.role!=="assistant")continue;const le=Lne(Ae,i.activityRunFolding),{folded:be,visible:_e}=Nne(le,i.turnFolding);me.set(Ae.id,{all:le,folded:be,visible:_e,changes:L9e(Ae)})}return me}),f=z(()=>{const me=i.turns.at(-1);if(me?.role!=="assistant")return o("conversation.requesting");const Ae=d.value.get(me.id)?.all.some(le=>le.kind==="text"?le.text.trim().length>0:!0);return o(Ae?"conversation.working":"conversation.requesting")}),p=n,h=V({}),m=V({}),k=new Map,x=new Map;function y(me){const le=k.get(me)?.querySelector(".u-text");if(!le)return;const be=Number.parseFloat(getComputedStyle(le).lineHeight)||24;m.value[me]=le.scrollHeight>be*10+1}function w(me,Ae){const le=Ae instanceof HTMLElement?Ae:null;if(!le){x.get(me)?.disconnect(),x.delete(me),k.delete(me);return}if(k.get(me)!==le){if(x.get(me)?.disconnect(),k.set(me,le),typeof ResizeObserver<"u"){const be=new ResizeObserver(()=>y(me));be.observe(le.querySelector(".u-text")??le),x.set(me,be)}yt(()=>y(me))}}function _(me){h.value[me]=!h.value[me]}const M=V(null),P=V(null);function B(me){return(me.attachments?.length??0)>0}function $(me){p("editQueued",me)}function T(me,Ae){if(M.value=me,!Ae.dataTransfer)return;Ae.dataTransfer.effectAllowed="move",Ae.dataTransfer.setData("text/plain",String(me));const le=Ae.currentTarget?.closest(".q-turn");le&&Ae.dataTransfer.setDragImage(le,24,24)}function I(me,Ae){if(M.value===null)return;Ae.preventDefault(),Ae.dataTransfer&&(Ae.dataTransfer.dropEffect="move");const le=Ae.currentTarget.getBoundingClientRect(),be=Ae.clientY{for(let me=i.turns.length-1;me>=0;me--)if(i.turns[me].role==="user")return i.turns[me].id;return null});function H(me){return!i.readOnly&&me.role==="user"&&me.id===O.value&&!i.working&&!me.pluginCommand&&!(me.skillActivation&&!R4e(me.skillActivation,{revivePill:!1}))}function D(me){return me.skillActivation?P4e(me.skillActivation):me.pluginCommand?me.pluginCommand.args||null:me.text||null}function A(me){const Ae=me.compaction,le=Ae?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof Ae?.tokensBefore=="number"&&typeof Ae?.tokensAfter=="number"?le+o("conversation.compactedTokens",{before:_a(Ae.tokensBefore),after:_a(Ae.tokensAfter)}):le}const R=V(null),j=V(null);let q=null;async function K(me){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&U(me)}function U(me){if(j.value!==null)return;j.value=me.id;const Ae=me.skillActivation?ML(me.skillActivation,{revivePill:!1})??me.text:me.text;p("editMessage",{text:Ae,attachments:me.attachments}),q=setTimeout(()=>{q=null,j.value=null},_ye)}Ze(()=>i.turns,me=>{j.value!==null&&(me.some(Ae=>Ae.id===j.value)||(j.value=null,q!==null&&(clearTimeout(q),q=null)))},{flush:"post"});const te=V(!1);let J=null;function ee(){if(i.turns.length===0)return;const me=[];for(const le of i.turns){if(le.role==="compaction"||le.role==="cron")continue;const be=le.role==="user"?"User":"Assistant",_e=Bne(le);_e.trim()&&me.push(`**${be}** +`)}function Tge(){return y0.join(` +`)}function IN(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function T7(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function tr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:IN(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function C2(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function aC(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url,id:e.id}}function l9(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:aC(e.source)};case"video":return{type:"video",source:aC(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function E7(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(l9),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function Ege(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url,id:t.id},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function Ige(e){return{content:e.content.map(Ege),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,dynamic_workflow_mode:e.dynamicWorkflowMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function Lge(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function LN(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function $ge(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function Nge(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map($ge),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function $N(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(Nge),createdAt:e.created_at}}function zge(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function Bge(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=zge(o);return{answers:t,method:e.method,note:e.note}}const Rge=["spawn","fork","resume"],Pge=["requested","default","fork-inherit","resume-existing"],Fge=["caller","policy-default","policy-pool","policy-force","fork-inherit","resume-existing"],jge=["inherit","default","pool","force"],Oge=["config","default"],Hge=["master-env","env","config","default"];function Ec(e,t){return typeof t=="string"&&e.includes(t)?t:void 0}function cC(e){return typeof e=="string"&&e.length>0?e:void 0}function NN(e,t){const n=Ec(Rge,e[t.operation]),o=Ec(Pge,e[t.profileSource]),s=Ec(Fge,e[t.modelSource]),i=Ec(jge,e[t.policyMode]),l=Ec(Oge,e[t.policySource]),r=Ec(Hge,e[t.featureSource]),a=cC(e[t.routingEnvRevision]),c=cC(e[t.routeDecision]);if(!(n===void 0||o===void 0||s===void 0||i===void 0||l===void 0||r===void 0||a===void 0||c===void 0))return{operation:n,profileSource:o,modelSource:s,policyMode:i,policySource:l,featureSource:r,routingEnvRevision:a,routeDecision:c}}const Dge={operation:"operation",profileSource:"profile_source",modelSource:"model_source",policyMode:"policy_mode",policySource:"policy_source",featureSource:"feature_source",routingEnvRevision:"routing_env_revision",routeDecision:"route_decision"},Vge={operation:"operation",profileSource:"profileSource",modelSource:"modelSource",policyMode:"policyMode",policySource:"policySource",featureSource:"featureSource",routingEnvRevision:"resolvedFromRoutingEnvironmentRevision",routeDecision:"routeDecisionFingerprint"};function Wge(e){if(!(typeof e!="object"||e===null))return NN(e,Dge)}function uC(e){if(!(typeof e!="object"||e===null))return NN(e,Vge)}function Nm(e){switch(e.mode){case"default":return{mode:"default",defaultModel:e.default_model??"",defaultEffort:e.default_effort};case"pool":return{mode:"pool",defaultModel:e.default_model??"",models:e.models??{},defaultEffort:e.default_effort};case"force":return{mode:"force",defaultModel:e.default_model??"",defaultEffort:e.default_effort};default:return{mode:"inherit"}}}function qge(e){switch(e.mode){case"default":return{mode:"default",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};case"pool":return{mode:"pool",default_model:e.defaultModel,models:e.models,default_effort:e.defaultEffort||void 0};case"force":return{mode:"force",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};default:return{mode:"inherit"}}}function dC(e){return{policy:Nm(e.policy),resourceVersion:e.resource_version,configuredPolicy:Nm(e.effective.configured_policy),effectivePolicy:Nm(e.effective.effective_policy),policySource:e.effective.policy_source,feature:{enabled:e.effective.feature.enabled,source:e.effective.feature.source}}}function L4(e){return{id:e.id,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,agentId:e.agent_id,model:e.model,thinkingEffort:e.thinking_effort,routing:Wge(e.routing),currentRoutingEnvRevision:e.current_routing_env_revision,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,dynamicWorkflowIndex:e.dynamic_workflow_index,swarmIndex:e.swarm_index,runInBackground:e.run_in_background}}function fC(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function Va(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ic(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Tl(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function zN(e){if(!e||typeof e!="object")return null;const t=e,n=Va(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:Va(t,"goalId")??Va(t,"goal_id")??"goal",objective:Va(t,"objective")??"",completionCriterion:Va(t,"completionCriterion")??Va(t,"completion_criterion"),status:n,turnsUsed:Ic(t,"turnsUsed")??Ic(t,"turns_used")??0,tokensUsed:Ic(t,"tokensUsed")??Ic(t,"tokens_used")??0,wallClockMs:Ic(t,"wallClockMs")??Ic(t,"wall_clock_ms")??0,terminalReason:Va(t,"terminalReason")??Va(t,"terminal_reason"),budget:{tokenBudget:Tl(s,"tokenBudget")??Tl(s,"token_budget"),remainingTokens:Tl(s,"remainingTokens")??Tl(s,"remaining_tokens"),turnBudget:Tl(s,"turnBudget")??Tl(s,"turn_budget"),remainingTurns:Tl(s,"remainingTurns")??Tl(s,"remaining_turns"),wallClockBudgetMs:Tl(s,"wallClockBudgetMs")??Tl(s,"wall_clock_budget_ms"),remainingWallClockMs:Tl(s,"remainingWallClockMs")??Tl(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function Uge(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:tr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:tr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.session.archived":return{type:"sessionArchived",sessionId:t.session_id,workspaceId:t.payload.workspace_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:C2(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:C2(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:IN(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=zN(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:E7(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(l9),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:LN(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:$N(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:L4(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:I7(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function Zge(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort,adaptiveThinking:e.adaptive_thinking}}function zm(e){return{loginId:e.login_id,state:e.state,defaultModel:e.default_model,message:e.message}}function $d(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function BN(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function Kge(e){return{provider:BN(e.provider),modelsImported:e.models_imported}}function Gge(e){return Array.isArray(e)?e.map(t=>({id:t.id,enabled:t.enabled===!0,source:t.source,configValue:typeof t.config_value=="boolean"?t.config_value:void 0,defaultEnabled:t.default_enabled===!0,externallyControlled:t.externally_controlled===!0,overridden:t.overridden===!0})):[]}function I7(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultThinking:e.default_thinking,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,disabledSkills:e.disabled_skills,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry}}function Yge(e){return e.session_id}function Xge(e){return e.seq}const Jge="main",Qge=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function ta(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function eve(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}const L7=new Map;function tve(e){return L7.get(e)}function pC(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0}}function as(e,t){const n=e[t];return typeof n=="string"?n:void 0}function a0(e){return e.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}function d0(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function El(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function nve(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=as(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=as(t,"goalId")??as(t,"goal_id")??"goal",l=as(t,"objective")??"";return{goalId:i,objective:l,completionCriterion:as(t,"completionCriterion")??as(t,"completion_criterion"),status:s,turnsUsed:d0(t,"turnsUsed")??d0(t,"turns_used")??0,tokensUsed:d0(t,"tokensUsed")??d0(t,"tokens_used")??0,wallClockMs:d0(t,"wallClockMs")??d0(t,"wall_clock_ms")??0,terminalReason:as(t,"terminalReason")??as(t,"terminal_reason"),budget:{tokenBudget:El(o,"tokenBudget")??El(o,"token_budget"),remainingTokens:El(o,"remainingTokens")??El(o,"remaining_tokens"),turnBudget:El(o,"turnBudget")??El(o,"turn_budget"),remainingTurns:El(o,"remainingTurns")??El(o,"remaining_turns"),wallClockBudgetMs:El(o,"wallClockBudgetMs")??El(o,"wall_clock_budget_ms"),remainingWallClockMs:El(o,"remainingWallClockMs")??El(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function w0(e,t,n,o,s=[]){if(typeof n!="string"||n.length===0)return null;const i=e.subagentMeta.get(n)??{id:n,sessionId:t,kind:"subagent",description:"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},r=(i.status==="completed"||i.status==="failed"||i.status==="cancelled")&&o.status==="running"?{...o,status:i.status,subagentPhase:i.subagentPhase,startedAt:i.startedAt,completedAt:i.completedAt,outputPreview:i.outputPreview,outputBytes:i.outputBytes,suspendedReason:i.suspendedReason}:o,a=Object.fromEntries(Object.entries(r).filter(([,u])=>u!==void 0)),c={...i,...a,id:n,agentId:n,sessionId:t,kind:"subagent"};for(const u of s)u in a||delete c[u];return e.subagentMeta.set(n,c),c}function ove(e,t){if(e==="turn.step.started")return null;if(e==="tool.use"||e==="tool.call.started"){const n=as(t,"name")??as(t,"toolName")??"tool",o=ni(sve(n)),s=ive(n,t.args??t.input);return s?`Calling ${o}: ${s}`:`Calling ${o}`}if(e==="tool.progress"){const n=t.update;if(n&&typeof n=="object"){const s=as(n,"text");if(s)return Bm(s);const i=as(n,"message");if(i)return Bm(i)}const o=as(t,"message");if(o)return Bm(o)}return null}function sve(e){return e.replace(/_\d+$/,"")}const hC=2e3;function Bm(e){return e.length>hC?`${e.slice(0,hC)}…`:e}function ive(e,t){if(t==null)return"";const n=typeof t=="string"?t:JSON.stringify(t);return ka(e,n)}function lve(e,t,n,o,s,i){if(i.has(n)&&o==="turn.step.started")return[];if(o==="assistant.delta"){const u=as(s,"delta");if(!u)return[];const d=e.subagentMeta.get(n),f=w0(e,t,n,{status:"running",subagentPhase:"working",startedAt:d?.startedAt??new Date().toISOString()}),p=[];return f&&p.push({type:"taskCreated",sessionId:t,task:f}),p.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:u,stream:"stdout",kind:"text"}),p}const l=ove(o,s);if(l===null||l.length===0)return[];const r=e.subagentMeta.get(n),a=w0(e,t,n,{status:"running",subagentPhase:"working",startedAt:r?.startedAt??new Date().toISOString()}),c=[];return a&&c.push({type:"taskCreated",sessionId:t,task:a}),c.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:l,stream:"stdout"}),c}function Lc(e){return{...e,content:e.content.map(t=>({...t}))}}function mC(e,t,n){const o={id:ta("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function rve(e,t,n,o,s,i){const l={id:o,sessionId:t,role:"user",content:s,createdAt:i,promptId:n};return e.messages.push(l),l}function ave(e){return Array.isArray(e)?e.map(t=>l9(t)):[]}function gC(e,t,n,o){const s=e.messages.find(l=>l.id===t);if(!s)return-1;const i=s.content.at(-1);return i&&i.type===n?(n==="text"?i.text+=o:i.thinking+=o,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:o}:{type:"thinking",thinking:o}),s.content.length-1)}function cve(e,t,n,o,s,i){const l=e.messages.find(r=>r.id===t);l&&l.content.push({type:"toolUse",toolCallId:n,toolName:o,input:s,outputLines:i})}function uve(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",i=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return i.length>0?{outputChunk:i,stream:s}:null}function vC(e,t){e.messages.find(n=>n.id===t)}function dve(e,t,n,o,s,i){const l={id:ta("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:o,isError:s}],createdAt:new Date().toISOString(),promptId:i};return e.messages.push(l),l}function Nd(e,t){return e.messages.find(n=>n.id===t)}function yC(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function fve(){const e=new Map,t=new Set;function n(u){let d=e.get(u);return d||(d=pC(),e.set(u,d)),d}function o(u){e.set(u,pC())}function s(u){t.add(u)}function i(u,d){const f=n(u);f.currentPromptId=d}function l(u,d){o(u);const f=n(u),p=d.promptId??ta("pr_");f.currentPromptId=p,f.turnPromptId.set(d.turnId,p);const h=mC(f,u,p);d.thinkingText.length>0&&h.content.push({type:"thinking",thinking:d.thinkingText}),d.assistantText.length>0&&h.content.push({type:"text",text:d.assistantText});for(const m of d.runningTools){const k=typeof m.lastProgress?.text=="string"&&m.lastProgress.text.length>0?[m.lastProgress.text]:void 0;h.content.push({type:"toolUse",toolCallId:m.toolCallId,toolName:m.name,input:m.args??{},outputLines:k}),f.toolStartTimes.set(m.toolCallId,Date.now())}return f.currentAssistantMsgId=h.id,f.turnTextLen=d.assistantText.length,f.turnThinkLen=d.thinkingText.length,[{type:"messageCreated",message:Lc(h)}]}function r(u,d,f,p){try{return c(u,d,f,p)}catch(h){return console.error("[agentProjector] Error projecting event:",u,h instanceof Error?h.message:h),[]}}function a(u,d){return d===void 0?"append":du?"gap":"append"}function c(u,d,f,p){const h=n(f),m=d,k=[],x=m?.agentId;if(typeof x=="string"&&x!==Jge){const y=t.has(x);if(y&&(u==="thinking.delta"||u==="assistant.delta")){const w=m?.delta??"";return w?[{type:"agentDelta",sessionId:f,agentId:x,delta:{[u==="thinking.delta"?"thinking":"text"]:w}}]:[]}if(y&&u==="turn.ended")return[{type:"agentTurnEnded",sessionId:f,agentId:x,reason:m?.reason}];if(Qge.has(u))return lve(h,f,x,u,m??{},t)}switch(u){case"session.meta.updated":{const y=m?.patch?.title??m?.title,w=m?.patch?.lastPrompt,_={};typeof y=="string"&&y.length>0&&(_.title=y),typeof w=="string"&&(_.lastPrompt=w),(_.title!==void 0||_.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:f,..._});break}case"prompt.submitted":{const y=m?.promptId,w=m?.userMessageId;if(!y||!w)break;const _=ave(m?.content);if(_.length===0)break;h.currentPromptId=y;const A=rve(h,f,y,w,_,typeof m?.createdAt=="string"?m.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:Lc(A)});break}case"turn.started":{const y=m?.turnId,w=h.currentPromptId??ta("pr_");h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w),h.turnTextLen=0,h.turnThinkLen=0,L7.delete(f),k.push({type:"turnActiveChanged",sessionId:f,active:!0});break}case"turn.step.started":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;if(w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w)),h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId!==void 0){const A=h.retryReuseMsgId;if(h.retryReuseMsgId=void 0,Nd(h,A)!==void 0){h.currentAssistantMsgId=A;break}}const _=mC(h,f,w);h.currentAssistantMsgId=_.id,k.push({type:"messageCreated",message:Lc(_)});break}case"thinking.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnThinkLen>0&&(h.turnThinkLen=0);const _=a(h.turnThinkLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const A=gC(h,y,"thinking",w);if(A<0)break;h.turnThinkLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:A,delta:{thinking:w}});break}case"assistant.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnTextLen>0&&(h.turnTextLen=0);const _=a(h.turnTextLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const A=gC(h,y,"text",w);if(A<0)break;h.turnTextLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:A,delta:{text:w}});break}case"tool.use":case"tool.call.started":{const y=h.currentAssistantMsgId,w=m?.turnId,_=h.turnPromptId.get(w)??h.currentPromptId;if(!y||!_)break;const A=m?.toolCallId,P=m?.name??m?.toolName??"",z=m?.args??m?.input??{};cve(h,y,A,P,z);const L=Nd(h,y);L&&L.content.length-1,h.toolStartTimes.set(A,Date.now()),L&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:L.content.map(E=>({...E})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const y=m?.toolCallId,w=uve(m??{});y&&w&&k.push({type:"toolOutput",sessionId:f,toolCallId:y,outputChunk:w.outputChunk,stream:w.stream});break}case"tool.result":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w));const _=m?.toolCallId,A=m?.output,P=m?.isError??!1;h.toolStartTimes.get(_)??Date.now(),h.toolStartTimes.delete(_);const z=dve(h,f,_,A,P,w);k.push({type:"messageCreated",message:Lc(z)}),h.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const y=h.currentAssistantMsgId,w=eve(m?.usage);if(h.totalInput+=w.input,h.totalOutput+=w.output,h.totalCacheRead+=w.cacheRead,h.totalCacheCreate+=w.cacheCreate,y){vC(h,y);const _=Nd(h,y);_&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:_.content.map(A=>({...A})),status:"completed"})}break}case"agent.status.updated":{m?.model&&(h.model=m.model),m?.contextTokens!==void 0&&(h.contextTokens=m.contextTokens),m?.maxContextTokens!==void 0&&(h.contextLimit=m.maxContextTokens),k.push({type:"sessionUsageUpdated",sessionId:f,usage:yC(h),model:h.model||void 0,dynamicWorkflowMode:m?.dynamicWorkflowMode===!0?!0:m?.dynamicWorkflowMode===!1?!1:void 0,planMode:m?.planMode===!0?!0:m?.planMode===!1?!1:void 0,thinking:typeof m?.thinkingEffort=="string"&&m.thinkingEffort.length>0?m.thinkingEffort:void 0});break}case"turn.ended":{const y=h.currentAssistantMsgId,w=m?.reason??"completed",_=d0(m??{},"durationMs");if(k.push({type:"turnActiveChanged",sessionId:f,active:!1,reason:m?.reason}),y){vC(h,y);const P=Nd(h,y);P&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:P.content.map(z=>({...z})),status:w==="failed"||w==="blocked"?"error":"completed",durationMs:_})}h.turnCount++;const A=yC(h);k.push({type:"sessionUsageUpdated",sessionId:f,usage:A}),h.currentAssistantMsgId=void 0,h.currentPromptId=void 0,h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId=void 0;break}case"prompt.completed":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptCompleted",sessionId:f,promptId:y,reason:m?.reason??"completed"});break}case"prompt.aborted":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptAborted",sessionId:f,promptId:y});break}case"turn.step.retrying":{const y=h.currentAssistantMsgId;if(y!==void 0){const w=Nd(h,y);w!==void 0&&(w.content=w.content.filter(_=>_.type!=="text"&&_.type!=="thinking"&&_.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:f,messageId:y,content:w.content.map(_=>({..._})),status:"pending"}),h.retryReuseMsgId=y)}h.turnTextLen=0,h.turnThinkLen=0,h.toolStartTimes.clear();break}case"turn.step.interrupted":{h.currentAssistantMsgId=void 0,h.retryReuseMsgId=void 0;const y=typeof m?.reason=="string"&&m.reason.length>0?m.reason:"error",w=typeof m?.message=="string"&&m.message.length>0?m.message:void 0;L7.set(f,{reason:y,message:w,turnId:typeof m?.turnId=="number"?m.turnId:void 0,at:Date.now()});break}case"subagent.spawned":{const y=typeof m?.subagentId=="string"&&m.subagentId.length>0?m.subagentId:ta("task_"),w={id:y,agentId:y,sessionId:f,kind:"subagent",description:typeof m?.description=="string"?m.description:m?.subagentName??"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof m?.subagentName=="string"?m.subagentName:void 0,model:typeof m?.model=="string"?m.model:void 0,thinkingEffort:typeof m?.thinkingEffort=="string"?m.thinkingEffort:void 0,routing:uC(m?.routing),currentRoutingEnvRevision:typeof m?.currentRoutingEnvironmentRevision=="string"?m.currentRoutingEnvironmentRevision:void 0,parentToolCallId:typeof m?.parentToolCallId=="string"?m.parentToolCallId:void 0,dynamicWorkflowIndex:typeof m?.dynamicWorkflowIndex=="number"?m.dynamicWorkflowIndex:void 0,runInBackground:m?.runInBackground===!0};h.subagentMeta.set(w.id,w),k.push({type:"taskCreated",sessionId:f,task:w});break}case"subagent.started":{const y=w0(h,f,m?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.suspended":{const y=w0(h,f,m?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof m?.reason=="string"?m.reason:void 0},["suspendedReason"]);y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.completed":{const y=typeof m?.resultSummary=="string"?m.resultSummary:void 0,w=w0(h,f,m?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"completed",outputPreview:y});break}case"subagent.failed":{const y=typeof m?.error=="string"?m.error:void 0,w=w0(h,f,m?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"failed",outputPreview:y});break}case"task.notified":{const y=as(m??{},"notificationType"),w=as(m??{},"sourceKind"),_=as(m??{},"sourceId");if(!y||!w||!_)break;const A=y.startsWith("task.")?y.slice(5):y,P=`task:${_}:${A}`,z=as(m??{},"title")??"",L=as(m??{},"severity")??"",E=as(m??{},"body")??"",T=` +`+(z!==""?`Title: ${a0(z)} +`:"")+(L!==""?`Severity: ${a0(L)} +`:"")+(E!==""?`${a0(E)} +`:"")+"",$={id:`task_ntf_${P}`,sessionId:f,role:"user",content:[{type:"text",text:T}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:_,status:A,notificationId:P}}};h.messages.push($),k.push({type:"messageCreated",message:Lc($)});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:m?.code,message:m?.message,name:m?.name,details:m?.details,retryable:m?.retryable}});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:m?.message}});break}case"task.started":{const y=m?.info??{},w=typeof y.startedAt=="number"?new Date(y.startedAt).toISOString():void 0,_=typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):ta("task_"),A=typeof y.description=="string"?y.description:typeof y.command=="string"?y.command:Mo.global.t("tasks.defaultDescription");if(y.kind==="agent"){const z=typeof y.agentId=="string"&&y.agentId.length>0?y.agentId:void 0;if(z!==void 0){const L=w0(h,f,z,{description:A,backgroundTaskId:_,model:typeof y.model=="string"?y.model:void 0,thinkingEffort:typeof y.thinkingEffort=="string"?y.thinkingEffort:void 0,routing:uC(y.routing),currentRoutingEnvRevision:typeof y.currentRoutingEnvironmentRevision=="string"?y.currentRoutingEnvironmentRevision:void 0,runInBackground:!0});L&&k.push({type:"taskCreated",sessionId:f,task:L})}else k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"subagent",description:A,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,subagentPhase:"queued",runInBackground:!0}});break}const P=typeof y.command=="string"?y.command:void 0;k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"bash",description:A,command:P,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,outputPreview:P!==void 0?`$ ${P}`:void 0}});break}case"task.terminated":{const y=m?.info??{},w=y.status==="failed"||typeof y.exitCode=="number"&&y.exitCode!==0;k.push({type:"taskCompleted",sessionId:f,taskId:typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):"",status:w?"failed":"completed"});break}case"compaction.completed":{const y=m?.result??{};k.push({type:"compactionCompleted",sessionId:f,tokensBefore:typeof y.tokensBefore=="number"?y.tokensBefore:void 0,tokensAfter:typeof y.tokensAfter=="number"?y.tokensAfter:void 0,summary:typeof y.summary=="string"?y.summary:void 0}),k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:f,trigger:m?.trigger==="manual"?"manual":"auto",instruction:typeof m?.instruction=="string"?m.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:f});break}case"goal.updated":{const y=nve(m?.snapshot??null);k.push({type:"goalUpdated",sessionId:f,goal:y?.status==="complete"?null:y});break}case"cron.fired":{const y=m?.origin,w=as(m??{},"prompt");if(y&&typeof y=="object"&&y.kind==="cron_job"&&w){const _={id:ta("cron_"),sessionId:f,role:"user",content:[{type:"text",text:w}],createdAt:new Date().toISOString(),metadata:{origin:y}};h.messages.push(_),k.push({type:"messageCreated",message:Lc(_)})}break}}return k}return{project:r,bindNextPromptId:i,seedInFlight:l,reset:o,markSideChannelAgent:s}}const pve=new Set(["server_hello","ack","ping","resync_required","error","pong"]),wC=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","task.notified","background.task.started","background.task.terminated","cron.fired"]),hve=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),mve=new Set(["assistant.delta","thinking.delta"]);function gve(e,t){if(pve.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return mve.has(o)?vve(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?hve.has(o)?{route:"protocol"}:wC.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:wC.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function vve(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}class t2 extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class Jr extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}function ol(e){return e instanceof t2||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function r9(e){return e instanceof Jr||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}const Xs="pythinker-web.server-credential",yve="token",wve=10080*60*1e3;let $r;const $7=new Set;function kve(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(yve);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function N7(e){return{version:1,credential:e,expiresAt:Date.now()+wve}}function bve(e){return JSON.stringify(e)}function a9(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function z7(e){globalThis.localStorage?.setItem(Xs,bve(e))}function _ve(){try{const e=globalThis.localStorage?.getItem(Xs);if(e){const n=a9(e);if(n===void 0){const o=N7(e);let s=!1;try{z7(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Xs),globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs);return}const t=globalThis.sessionStorage?.getItem(Xs);if(t){const n=N7(t);let o=!1;try{z7(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs),o=!0}catch{}return o?n:void 0}return}catch{return}}function xve(){const e=kve();return e?(PN(e),!0):($r=_ve(),$r!==void 0)}function RN(){if($r!==void 0){if($r.expiresAt<=Date.now()){Sve($r);return}return $r.credential}}function Sve(e){$r=void 0;try{globalThis.sessionStorage?.removeItem(Xs);const t=globalThis.localStorage?.getItem(Xs),n=t==null?void 0:a9(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Xs)}catch{}}function PN(e){const t=N7(e);$r=t;try{z7(t)}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}}function Cve(){const e=$r;$r=void 0;try{const t=globalThis.localStorage?.getItem(Xs),o=(t==null?void 0:a9(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(Xs),globalThis.sessionStorage?.removeItem(Xs)}catch{}}function Mve(e){return $7.add(e),()=>{$7.delete(e)}}function Ave(){Cve();for(const e of $7)try{e()}catch{}}const Oc=3e4,Q3=5*6e4,FN="0123456789ABCDEFGHJKMNPQRSTVWXYZ",kC=500,jN=40101;function e4(e,t=Oc){let n;try{n=AbortSignal.timeout(t)}catch{n=void 0}if(e===void 0)return n;if(n===void 0)return e;try{return AbortSignal.any([e,n])}catch{return e}}function Tve(e,t){let n="",o=e;for(let s=0;sFN[n%32]).join("")}function t4(){return`${Tve(Date.now(),10)}${Eve(16)}`}function Ive(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function Rm(e){try{const t=await e.text();return t?t.length>kC?`${t.slice(0,kC)}...`:t:void 0}catch{return}}class B7{constructor(t,n,o="v1"){this.origin=t,this.identity=n,this.apiVersion=o}async get(t,n,o){return this.request("GET",t,void 0,n,[],void 0,!1,o?.signal)}async getBlob(t){const n=Yc(this.origin,t,this.apiVersion),o=t4(),s={"X-Request-Id":o};this.addClientHeaders(s);const i=Date.now();X3({method:"GET",path:t,url:n,requestId:o});let l;try{l=await fetch(n,{method:"GET",headers:s,signal:e4()})}catch(a){throw Da({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-i,error:a}),new Jr({message:`Network error calling GET ${t}`,cause:a,method:"GET",path:t,url:n,requestId:o,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-i})}if(l.ok)return Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:0,msg:""}),l.blob();let r;try{r=await l.clone().json()}catch{}throw this.checkAuthRequired(l,r?.code??0),Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:r?.code??l.status,msg:r?.msg??l.statusText,envelopeRequestId:r?.request_id}),new t2({code:r?.code??l.status,msg:r?.msg??l.statusText,requestId:r?.request_id??o,details:r?.details,timestamp:Date.now(),durationMs:Date.now()-i})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async exchange(t,n,o={}){return this.request(t,n,o.body,void 0,o.allowCodes??[],o.headers,!0)}async postZip(t,n,o){const s="POST",i=Yc(this.origin,t,this.apiVersion),l=t4(),r={"X-Request-Id":l,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(r);const a=Date.now();X3({method:s,path:t,url:i,requestId:l,body:o});let c;try{c=await fetch(i,{method:s,headers:r,body:JSON.stringify(n),signal:e4(void 0,Q3)})}catch(p){throw Da({method:s,path:t,requestId:l,phase:"fetch",durationMs:Date.now()-a,error:p}),new Jr({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"fetch",timeoutMs:Q3,timestamp:Date.now(),durationMs:Date.now()-a})}const u=c.headers.get("content-type")??void 0,d=u?.split(";",1)[0]?.trim().toLowerCase();if(!c.ok||d!=="application/zip"){let p;try{p=await c.clone().json()}catch{}if(this.checkAuthRequired(c,p?.code??0),!c.ok||p!==void 0&&p.code!==0){const k=p?.code??c.status,x=p?.msg??c.statusText;throw Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:k,msg:x,envelopeRequestId:p?.request_id}),new t2({code:k,msg:x,requestId:p?.request_id??l,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const h=c.clone(),m=new TypeError(`Expected application/zip, received ${u??"no content type"}`);throw Da({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:m}),new Jr({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:Q3,status:c.status,statusText:c.statusText,contentType:u,bodyPreview:await Rm(h),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await c.blob()}catch(p){throw Da({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:p}),new Jr({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:Q3,status:c.status,statusText:c.statusText,contentType:u,timestamp:Date.now(),durationMs:Date.now()-a})}return Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:c.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=Yc(this.origin,t,this.apiVersion),s=t4(),i={"X-Request-Id":s};this.addClientHeaders(i);const l=Date.now();X3({method:"POST",path:t,url:o,requestId:s,body:Ive(n)});let r;try{r=await fetch(o,{method:"POST",headers:i,body:n,signal:e4()})}catch(u){throw Da({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-l,error:u}),new Jr({message:`Network error calling POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-l})}let a;const c=r.clone();try{a=await r.json()}catch(u){throw Da({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-l,status:r.status,error:u}),new Jr({message:`Failed to parse JSON response from POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:Oc,status:r.status,statusText:r.statusText,contentType:r.headers.get("content-type")??void 0,bodyPreview:await Rm(c),timestamp:Date.now(),durationMs:Date.now()-l})}if(Ac({method:"POST",path:t,requestId:s,status:r.status,durationMs:Date.now()-l,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(r,a.code),a.code!==0)throw new t2({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-l});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[],l,r,a){let c=Yc(this.origin,n,this.apiVersion);if(s){const k=new URLSearchParams;for(const[y,w]of Object.entries(s))w!==void 0&&k.set(y,String(w));const x=k.toString();x&&(c=`${c}?${x}`)}const u=t4(),d={"X-Request-Id":u};this.addClientHeaders(d),o!==void 0&&(d["Content-Type"]="application/json; charset=utf-8"),l!==void 0&&Object.assign(d,l);const f=Date.now();X3({method:t,path:n,url:c,requestId:u,body:o});let p;try{p=await fetch(c,{method:t,headers:d,body:o!==void 0?JSON.stringify(o):void 0,signal:e4(a)})}catch(k){throw Da({method:t,path:n,requestId:u,phase:"fetch",durationMs:Date.now()-f,error:k}),new Jr({message:`Network error calling ${t} ${n}`,cause:k,method:t,path:n,url:c,requestId:u,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-f})}let h;const m=p.clone();try{h=await p.json()}catch(k){throw Da({method:t,path:n,requestId:u,phase:"parse",durationMs:Date.now()-f,status:p.status,error:k}),new Jr({message:`Failed to parse JSON response from ${t} ${n}`,cause:k,method:t,path:n,url:c,requestId:u,phase:"parse",timeoutMs:Oc,status:p.status,statusText:p.statusText,contentType:p.headers.get("content-type")??void 0,bodyPreview:await Rm(m),timestamp:Date.now(),durationMs:Date.now()-f})}if(Ac({method:t,path:n,requestId:u,status:p.status,durationMs:Date.now()-f,code:h.code,msg:h.msg,envelopeRequestId:h.request_id,data:h.data}),this.checkAuthRequired(p,h.code),h.code!==0&&!i.includes(h.code))throw new t2({code:h.code,msg:h.msg,requestId:h.request_id,details:h.details,timestamp:Date.now(),durationMs:Date.now()-f});return r===!0?{data:h.data,code:h.code,headers:p.headers}:h.data}addClientHeaders(t){const n=RN();n!==void 0&&(t.Authorization=`Bearer ${n}`),this.identity!==void 0&&(t["X-Pythinker-Client-Id"]=this.identity.clientId,t["X-Pythinker-Client-Name"]=this.identity.clientName,t["X-Pythinker-Client-Version"]=this.identity.clientVersion,t["X-Pythinker-Client-Ui-Mode"]=this.identity.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===jN)&&Ave()}}const Lve="pythinker-code.bearer.",$ve=3e4;class Nve{constructor(t,n,o){this.wsUrl=t,this.clientId=n,this.handlers=o}ws=null;connected=!1;closed=!1;subscriptions=new Map;pendingSubscriptions=[];transcriptSubscriptions=new Map;terminalAttachments=new Map;msgSeq=0;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),Tc("connect",{url:this.wsUrl,attempt:this.reconnectAttempts});const t=RN(),n=t!==void 0?[`${Lve}${t}`]:void 0,o=new WebSocket(this.wsUrl,n);this.ws=o,o.onopen=()=>{Tc("open")},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));_ge(i),this.handleFrame(i)}catch(i){Tc("parse-error",{error:String(i)}),this.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{Tc("error"),this.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{Tc("close",s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0),this.connected=!1,this.ws=null,this.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,Tc("reconnect-scheduled",{delayMs:n,attempt:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,sinceSeq:o}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=n4(t,n),i=this.terminalAttachments.get(s),l=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:l}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,l)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(n4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(n4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,$ve),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=MN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const l=s.data;this.handlers.onTranscriptReset?.(i,l.agent_id,{...l.snapshot,hasMoreOlder:l.has_more_older},l.seq);const r=this.transcriptSubscriptions.get(i);r?.agentId===l.agent_id&&l.seq!==void 0&&(r.sinceSeq=l.seq);return}if(o==="transcript.ops"){const s=AN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const l=s.data,r=this.handlers.onTranscriptOps?.(i,l.agent_id,l.ops,l.seq),a=this.transcriptSubscriptions.get(i);r!==!1&&a?.agentId===l.agent_id&&l.seq!==void 0&&(a.sinceSeq=l.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.handlers.onRawAgentEvent?this.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,l=n.seq,r=n4(s,i),a=this.terminalAttachments.get(r);a&&this.terminalAttachments.set(r,{...a,lastSeq:Math.max(a.lastSeq,l)});const c=typeof n.payload?.data=="string"?n.payload.data:"";this.handlers.onTerminalOutput?.(s,i,c,l);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,l=n.payload?.exit_code,r=typeof l=="number"?l:null;this.handlers.onTerminalExit?.(s,i,r);break}default:{this.trackCursor(n);const s=n.type,i=gve(s,n.payload);if(i.route==="protocol"){this.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const l=n,r=n;this.handlers.onRawAgentEvent({type:i.agentType,seq:l.seq,session_id:l.session_id,timestamp:l.timestamp,payload:l.payload,...r.volatile!==void 0?{volatile:r.volatile}:{},...r.offset!==void 0?{offset:r.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const o of this.pendingSubscriptions)this.subscriptions.set(o.sessionId,o.cursor),t.includes(o.sessionId)||t.push(o.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[o,s]of this.subscriptions.entries())n[o]=s;this.send({type:"client_hello",id:this.nextId(),payload:{client_id:this.clientId,subscriptions:t,cursors:n}});for(const[o,s]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(o,s.agentId,s.sinceSeq);for(const o of this.terminalAttachments.values())this.sendTerminalAttach(o.sessionId,o.terminalId,o.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n}})}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),bge(t)}catch{}}nextId(){return`c_${++this.msgSeq}`}}function n4(e,t){return`${e}\0${t}`}function zve(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function bC(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function Bve(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:e.activity.model??"",usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id||void 0}}function Rve(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function _C(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function xC(e){const t={type:e.type,models:e.models.map(n=>({model:n.model,max_context_size:n.maxContextSize,display_name:n.displayName,capabilities:n.capabilities,max_output_size:n.maxOutputSize,support_efforts:n.supportEfforts,adaptive_thinking:n.adaptiveThinking}))};return"id"in e&&(t.id=e.id),"newId"in e&&e.newId!==void 0&&(t.new_id=e.newId),e.apiKey!==void 0&&(t.api_key=e.apiKey),e.baseUrl!==void 0&&(t.base_url=e.baseUrl),e.defaultModel!==void 0&&(t.default_model=e.defaultModel),t}function Pm(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function SC(e){return e==="auto_compact"||e==="manual_compact"}const CC=41201;class Pve{http;httpV2;config;constructor(t){this.config=t;const n={clientId:t.clientId,clientName:t.clientName,clientVersion:t.clientVersion,clientUiMode:t.clientUiMode};this.http=new B7(t.serverHttpUrl,n),this.httpV2=new B7(t.serverHttpUrl,n,"v2")}async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,backend:t.backend==="v2"?"v2":"v1",experimentalFlagStates:Gge(t.experimental_flag_states)}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(tr),hasMore:o.has_more}}async listSessionGroupsV2(t){const n=await this.httpV2.get("/sessions",{view:"by_workspace","group.page_size":t?.groupPageSize,"meta.has_prompt":t?.hasPrompt,page_size:t?.pageSize,page_token:t?.pageToken});return{groups:n.groups.map(o=>({workspace:o.workspace,sessions:o.sessions.map(Bve),total:o.total})),hasMore:n.has_more,nextPageToken:n.next_page_token,total:n.total}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return tr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return tr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.dynamicWorkflowMode!==void 0&&(s.dynamic_workflow_mode=n.dynamicWorkflowMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),n.tools!==void 0&&(s.tools=n.tools),n.mcpServers!==void 0&&(s.mcp_servers=n.mcpServers),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return tr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,dynamicWorkflowMode:n.dynamic_workflow_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return zN(n)}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return tr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(E7),hasMore:s.has_more}}async getSessionTranscript(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=lge.parse(o);return{agentId:s.agent_id,snapshot:{items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more},agents:s.agents,pendingInteractions:s.pending_interactions,seq:s.seq}}async getSessionSnapshot(t){const n=Date.now();_s("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:tr(o.session),messages:o.messages.items.map(E7),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map(LN),pendingQuestions:o.pending_questions.map($N),subagents:(o.subagents??[]).map(L4)};return _s("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw _s("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...bC(o)}),o}}async exportSession(t,n){const o=n===void 0?0:new TextEncoder().encode(n).byteLength,s=n===void 0||n.length===0?0:n.split(` +`).length,i=await this.http.postZip(`/sessions/${encodeURIComponent(t)}/export`,{web_log:n},{web_log_bytes:o,web_log_entries:s}),l=`${t}.zip`;return{blob:i.blob,fileName:zve(i.contentDisposition,l)}}async submitPrompt(t,n){const o=Date.now();_s("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,Ige(n));return _s("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw _s("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...bC(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return tr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return tr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(tr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,Lge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,Bge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n?.status,with_output:n?.withOutput,output_bytes:n?.outputBytes,output_status:n?.outputStatus};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o,{signal:n?.signal})).items.map(L4)}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s,{signal:o?.signal});return L4(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async detachTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:detach`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(Pm)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return Pm(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return Pm(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listTools(t){return((await this.http.get("/tools",{session_id:t})).tools??[]).map(o=>({name:o.name,description:o.description,inputSchema:o.input_schema,source:o.source,mcpServerId:o.mcp_server_id}))}async listConnectors(){return((await this.http.get("/mcp/servers")).servers??[]).map(n=>({id:n.id,name:n.name,transport:n.transport,status:n.status,toolCount:n.tool_count,lastError:n.last_error,editable:n.editable,definition:n.definition===void 0?void 0:Rve(n.definition)}))}async createConnector(t){return this.http.post("/mcp/servers",{mcp_server_id:t.name,config:_C(t)})}async updateConnector(t,n){return this.http.put(`/mcp/servers/${encodeURIComponent(t)}`,{config:_C(n)})}async removeConnector(t){return this.http.delete(`/mcp/servers/${encodeURIComponent(t)}`)}async restartConnector(t){return this.http.post(`/mcp/servers/${encodeURIComponent(t)}:restart`,{})}async listPlugins(){return((await this.http.get("/plugins")).plugins??[]).map(n=>({id:n.id,displayName:n.display_name,version:n.version,enabled:n.enabled,state:n.state,skillCount:n.skill_count,mcpServerCount:n.mcp_server_count,hasErrors:n.has_errors,source:n.source}))}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:set-enabled`,{enabled:n})}async listSubagents(t){return((await this.http.get("/agent-profiles",{work_dir:t})).profiles??[]).map(o=>({name:o.name,description:o.description,source:o.source,tools:o.tools,model:o.model,effort:o.effort,whenToUse:o.when_to_use}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([l,r])=>[l,r.map(fC)])):void 0;return{items:s.items.map(fC),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length),n.encoding!==void 0&&(o.encoding=n.encoding);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async writeFile(t,n){const o={path:n.path,content:n.content};n.encoding!==void 0&&(o.encoding=n.encoding),n.baseEtag!==void 0&&(o.base_etag=n.baseEtag);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:write`,o);return{path:s.path,size:s.size,etag:s.etag,created:s.created}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Yc(this.config.serverHttpUrl,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async revealSavedPlan(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/transcript/plan:reveal`,{agent_id:n.agentId,tool_call_id:n.toolCallId})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(C2)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return C2(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return C2(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async generateSessionTitle(t,n){const o={};return n?.force===!0&&(o.force=!0),n?.source!==void 0&&(o.source=n.source),this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,o)}async listModels(){return(await this.http.get("/models")).items.map(Zge)}async listProviders(){return(await this.http.get("/providers")).items.map($d)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=$d(n);return n.api_key===void 0?o:{...o,apiKey:n.api_key}}async addProvider(t){const n=await this.http.post("/providers",xC(t));return $d(n)}async updateProvider(t,n){const o=await this.http.put(`/providers/${encodeURIComponent(t)}`,xC(n));return{provider:$d(o.provider)}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map($d),modelsImported:o.models_imported}}async deleteProvider(t){return this.http.delete(`/providers/${encodeURIComponent(t)}`)}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return MC(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return MC(t)}async startCodexLogin(){const t=await this.http.post("/auth/codex:start");return{loginId:t.login_id,authorizeUrl:t.authorize_url,loopback:t.loopback,expiresAt:t.expires_at}}async getCodexLoginStatus(t){const n=await this.http.get(`/auth/codex/${encodeURIComponent(t)}`);return zm(n)}async submitCodexLoginRedirect(t,n){const o=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:submit_code`,{redirect_url:n});return zm(o)}async cancelCodexLogin(t){const n=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:cancel`);return zm(n)}async getConfig(){const t=await this.http.get("/config");return I7(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultThinking:"default_thinking",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",disabledSkills:"disabled_skills",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry"};for(const[i,l]of Object.entries(t)){const r=o[i];r!==void 0&&(n[r]=l)}const s=await this.http.post("/config",n);return I7(s)}async getSubagentModelPolicy(){const t=await this.http.exchange("GET","/config/subagent-model-policy");return dC(t.data)}async setSubagentModelPolicy(t,n){return this.subagentModelPolicyWrite("PUT",qge(t),n)}async clearSubagentModelPolicy(t){return this.subagentModelPolicyWrite("DELETE",void 0,t)}async subagentModelPolicyWrite(t,n,o){const s=o===void 0?void 0:{"If-Match":`"${o}"`},i=await this.http.exchange(t,"/config/subagent-model-policy",{body:n,headers:s,allowCodes:[CC]});if(i.code===CC||i.data===null)throw new R$(await this.getSubagentModelPolicy());return dC(i.data)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model}}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return Yc(this.config.serverHttpUrl,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}connectEvents(t){const n=_pe(this.config.serverHttpUrl,this.config.clientId),o=fve(),s=new Nve(n,this.config.clientId,{onWireEvent:i=>{const l=Yge(i),r=Xge(i),a=Uge(i);a.type==="historyCompacted"&&!SC(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:l,seq:r})},onRawAgentEvent:i=>{const{type:l,seq:r,session_id:a,payload:c,offset:u}=i,d=o.project(l,c,a,{offset:u});for(const f of d){const p=c?.turnId,h=f.type==="assistantDelta"&&typeof p=="number"&&typeof u=="number"&&(l==="assistant.delta"||l==="thinking.delta")?{turnId:p,offset:u,kind:l==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!SC(f.reason)&&t.onResync(a,r),t.onEvent(f,{sessionId:a,seq:r,stream:h})}},onResync:(i,l,r)=>{o.reset(i),t.onResync(i,l,r)},onConnectionState:i=>{t.onConnectionChange(i)},onError:(i,l,r)=>{t.onError(i,l,r)},onTranscriptReset:(i,l,r,a)=>{t.onTranscriptReset?.(i,l,r,a)},onTranscriptOps:(i,l,r,a)=>t.onTranscriptOps?.(i,l,r,a),onTerminalOutput:(i,l,r,a)=>{t.onTerminalOutput?.(i,l,r,a)},onTerminalExit:(i,l,r)=>{t.onTerminalExit?.(i,l,r)}});return s.connect(),{subscribe(i,l){s.subscribe(i,l??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,l,r){s.subscribeTranscript(i,l,r)},unsubscribeTranscript(i,l){s.unsubscribeTranscript(i,l)},seedSnapshot(i,l){if(l.inFlightTurn===null){o.reset(i);return}const r=o.seedInFlight(i,l.inFlightTurn);for(const a of r)t.onEvent(a,{sessionId:i,seq:l.asOfSeq})},bindNextPromptId(i,l){o.bindNextPromptId(i,l)},abort(i,l){s.abort(i,l)},terminalAttach(i,l,r){s.terminalAttach(i,l,r)},terminalInput(i,l,r){s.terminalInput(i,l,r)},terminalResize(i,l,r,a){s.terminalResize(i,l,r,a)},terminalDetach(i,l){s.terminalDetach(i,l)},terminalClose(i,l){s.terminalClose(i,l)},markSideChannelAgent(i){o.markSideChannelAgent(i)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function MC(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function Fve(e){const t=new B7(e.serverHttpUrl,{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode});return{async listCatalogProviders(){return(await t.get("/catalog/providers")).items.map(BN)},async importCatalogProvider(n){const o={catalog_id:n.catalogId};n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.id!==void 0&&(o.id=n.id);const s=await t.post("/providers:import_catalog",o);return Kge(s)}}}let Fm;function Ct(){if(Fm===void 0){const e=z$();Fm=Object.assign(new Pve(e),Fve(e))}return Fm}const jve=["src","controls","muted"],Ove=["aria-label"],Hve=["src","alt"],Dve=["aria-label"],R7=Je({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=V(t.fileId?"":t.url),o=V(null),s=V(!t.fileId);let i=null,l=0,r=!1,a=null;function c(){i!==null&&(URL.revokeObjectURL(i),i=null)}async function u(){const d=++l;if(c(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await Ct().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(r||d!==l){URL.revokeObjectURL(p);return}i=p,n.value=i}catch{if(r||d!==l)return;n.value=t.url}}return Ke(()=>[t.fileId,t.url,s.value],u,{immediate:!0}),In(()=>{typeof IntersectionObserver=="function"&&o.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(o.value)):s.value=!0}),vo(()=>{r=!0,a?.disconnect(),a=null,c()}),(d,f)=>e.kind==="video"?(g(),S(Ce,{key:0},[n.value?(g(),S("video",{key:0,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,jve)):(g(),S("span",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"status","aria-label":e.alt||""},null,10,Ove))],64)):n.value?(g(),S("img",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,alt:e.alt||"",loading:"lazy"},null,10,Hve)):(g(),S("span",{key:2,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"img","aria-label":e.alt||""},null,10,Dve))}}),Vve=["title","data-kind"],Wve=["aria-label","aria-haspopup","aria-expanded"],qve={class:"att-tile"},Uve={class:"att-name"},Zve={key:1,class:"att-err"},Kve=["aria-label"],Gve=["data-side","aria-label"],Yve={class:"att-tip-preview"},Xve={key:1,class:"att-tip-placeholder"},Jve={class:"att-tip-meta"},Qve={key:0},e9e={key:0,class:"att-tip-error"},t9e={class:"att-tip-foot"},n9e=Je({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(!1),a=V("top"),c=V({});let u=null;const d=B(()=>{const L=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return L?L.toUpperCase():void 0}),f=B(()=>{const z=d.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(z)?"file-text":"file"}),p=B(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function h(z){return z<1024?`${z} B`:z<1024*1024?`${Math.round(z/1024)} KB`:`${(z/(1024*1024)).toFixed(1)} MB`}const m=B(()=>{const z=[p.value];return n.size!==void 0&&z.push(h(n.size)),z.join(" · ")}),k=B(()=>n.kind!=="file"),x=B(()=>k.value&&(!!n.url||!!n.fileId)),y=B(()=>n.error?s("mention.stateUploadFailed"):n.uploading?s("mention.stateUploading"):s("mention.stateUploaded"));function w(){const z=i.value,L=l.value;if(!z||!L)return;const E=z.getBoundingClientRect(),T=8,$=8,C=L.offsetWidth,j=L.offsetHeight;let H=E.top-j-$,D="top";H{r.value=!1,u=null},120)}function P(){u!==null&&clearTimeout(u),u=null,r.value=!1}return Ke(r,z=>{const L=z?"addEventListener":"removeEventListener";window[L]("resize",w),window[L]("scroll",w,!0)}),En(()=>{P(),window.removeEventListener("resize",w),window.removeEventListener("scroll",w,!0)}),(z,L)=>(g(),S(Ce,null,[b("span",{ref_key:"anchorRef",ref:i,class:Be(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:m.value,"data-kind":e.kind,onMouseenter:_,onMouseleave:A,onFocusin:_,onFocusout:A,onKeydown:go(P,["esc"])},[b("button",{type:"button",class:"att-activate","aria-label":m.value,"aria-haspopup":k.value?"dialog":void 0,"aria-expanded":k.value?r.value:void 0,onClick:L[0]||(L[0]=E=>o("activate"))},[b("span",qve,[e.kind==="image"&&e.url?(g(),ue(R7,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(g(),ue(Ee,{key:1,name:"play",size:"sm"})):e.kind==="image"?(g(),ue(Ee,{key:2,name:"image",size:"sm"})):(g(),ue(Ee,{key:3,name:f.value,size:"sm"},null,8,["name"]))]),b("span",Uve,I(p.value),1),e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("composer.uploading")},null,8,["label"])):e.error?(g(),S("span",Zve,[W(Ee,{name:"info",size:"sm"})])):Y("",!0)],8,Wve),e.removable?(g(),ue(Cn,{key:0,text:e.removeLabel??v(s)("composer.remove")},{default:ae(()=>[b("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??v(s)("composer.remove"),onClick:L[1]||(L[1]=E=>o("remove"))},[W(Ee,{name:"close",size:"sm"})],8,Kve)]),_:1},8,["text"])):Y("",!0)],42,Vve),(g(),ue(hl,{to:"body"},[r.value&&k.value?(g(),S("div",{key:0,ref_key:"tipRef",ref:l,class:"att-tip","data-side":a.value,style:Gt(c.value),role:"dialog","aria-label":m.value,onMouseenter:_,onMouseleave:A,onFocusin:_,onFocusout:A,onKeydown:go(P,["esc"])},[L[3]||(L[3]=b("span",{class:"att-tip-caret","aria-hidden":"true"},null,-1)),b("div",Yve,[x.value?(g(),ue(R7,{key:0,url:e.url??"",kind:e.kind==="video"?"video":"image",alt:p.value,"file-id":e.fileId,"media-class":"att-tip-media",controls:e.kind==="video",muted:""},null,8,["url","kind","alt","file-id","controls"])):(g(),S("span",Xve,[e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("mention.mediaPreviewUploading")},null,8,["label"])):(g(),ue(Ee,{key:1,name:e.kind==="video"?"play":"image"},null,8,["name"])),b("span",null,I(e.uploading?v(s)("mention.mediaPreviewUploading"):v(s)("mention.mediaPreviewUnavailable")),1)]))]),b("div",Jve,[W(Ee,{name:e.kind==="video"?"play":"image",size:"sm"},null,8,["name"]),b("strong",null,I(p.value),1),e.size!==void 0?(g(),S("span",Qve,"· "+I(h(e.size)),1)):Y("",!0)]),e.error?(g(),S("div",e9e,I(v(s)("mention.attachmentUploadFailed")),1)):Y("",!0),b("div",t9e,[b("span",{class:Be(["att-tip-state",{danger:e.error}])},[e.uploading?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),He(" "+I(y.value),1)],2),x.value?(g(),S("button",{key:0,type:"button",class:"att-tip-open",onClick:L[2]||(L[2]=E=>o("activate"))},[W(Ee,{name:"expand",size:"sm"}),b("span",null,I(v(s)("mention.viewFullscreen")),1)])):Y("",!0)])],44,Gve)):Y("",!0)]))],64))}}),P7=vt(n9e,[["__scopeId","data-v-e59edff1"]]),o9e=["data-mention-kind","data-mention-name","data-mention-path","tabindex","role","onClick","onKeydown"],s9e=["innerHTML"],i9e={class:"mention-pill-name"},AC=Je({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{}},setup(e){const t=e,n=V(null),o=B(()=>A$(t.text));function s(l,r){r.kind!=="file"||!t.interactive||!t.openFile||(l.preventDefault(),l.stopPropagation(),t.openFile({path:r.path}))}function i(l){const r=window.getSelection(),a=n.value;if(!r||r.rangeCount===0||!a||!l.clipboardData)return;const c=r.getRangeAt(0);if(!c.intersectsNode(a))return;const u=c.cloneContents();for(const d of u.querySelectorAll(".mention-pill")){const{mentionKind:f,mentionName:p,mentionPath:h}=d.dataset;f!=="file"&&f!=="folder"&&f!=="skill"||p===void 0||h===void 0||d.replaceWith(document.createTextNode(Hv({kind:f,name:p,path:h})))}l.clipboardData.setData("text/plain",u.textContent??""),l.preventDefault()}return(l,r)=>(g(),S("span",{ref_key:"root",ref:n,class:"composer-text",onCopy:i},[(g(!0),S(Ce,null,rt(o.value,(a,c)=>(g(),S(Ce,{key:c},[a.type==="text"?(g(),S(Ce,{key:0},[He(I(a.value),1)],64)):(g(),S("span",{key:1,class:Be(["mention-pill",`mention-${a.attrs.kind}`]),"data-mention-kind":a.attrs.kind,"data-mention-name":a.attrs.name,"data-mention-path":a.attrs.path,tabindex:a.attrs.kind==="file"&&e.interactive&&e.openFile?0:void 0,role:a.attrs.kind==="file"&&e.interactive&&e.openFile?"button":void 0,onClick:u=>s(u,a.attrs),onKeydown:[go(u=>s(u,a.attrs),["enter"]),go(u=>s(u,a.attrs),["space"])]},[b("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:a.attrs.kind==="skill"?v(Ll)("sparkles","sm"):v(ju)(a.attrs.path,a.attrs.name)},null,8,s9e),b("span",i9e,I(v(I$)(a.attrs.name)),1)],42,o9e))],64))),128))],544))}}),l9e=["aria-expanded","title"],r9e={class:"tf-sum"},a9e=["inert"],c9e={class:"tf-body-inner"},u9e={key:1,class:"msg"},d9e=Je({__name:"TurnFold",props:{items:{},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},streamingTailIndex:{default:null},durationMs:{default:void 0},toolDiffPanel:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent","detach"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=B(()=>n.streamingTailIndex!==null),l=B(()=>n.live?n.parked?"parked":"live":"settled"),r=V(!1),a=B(()=>i.value||r.value),c=V(a.value),u=V(a.value);let d=null;Ke(a,z=>{if(z){if(d!==null&&(clearTimeout(d),d=null),c.value){u.value=!0;return}c.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{u.value=!0})});return}u.value=!1,d=setTimeout(()=>{d=null,c.value=!1},200)});const f=fn("pinScroll",()=>{}),p=V(null);function h(){r.value=!r.value,yt(()=>{const z=p.value;z&&f(z)})}const m=V(Date.now());let k=null;function x(){k!==null&&(clearInterval(k),k=null)}Ke(l,(z,L)=>{z!=="settled"?(m.value=Date.now(),k===null&&(k=setInterval(()=>{m.value=Date.now()},1e3))):x(),L==="live"&&z!=="live"&&(r.value=!1)},{immediate:!0}),En(()=>{x(),d!==null&&clearTimeout(d)});const y=B(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),w=B(()=>{if(l.value==="settled")return n.durationMs!==void 0?Math.max(0,n.durationMs):y.value===void 0||n.endedMs===void 0?void 0:Math.max(0,n.endedMs-y.value);if(y.value!==void 0)return Math.max(0,m.value-y.value)}),_=B(()=>{const z=w.value;if(z===void 0)return s("conversation.fold.workedUnknown");const L=V2(z);return L?s("conversation.fold.worked",{duration:L}):s("conversation.fold.workedUnknown")});function A(z){return c1(z)?!1:n.streamingTailIndex!==null&&"sourceIndex"in z&&z.sourceIndex===n.streamingTailIndex}function P(z){if(n.streamingTailIndex===null)return!1;const L=z.items.at(-1);return L!==void 0&&c1(L)?!1:L!==void 0&&L.sourceIndex===n.streamingTailIndex}return(z,L)=>e.items.length>0?(g(),S("div",{key:0,class:Be(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?Y("",!0):(g(),S("button",{key:0,ref_key:"headEl",ref:p,type:"button",class:"tf-head","aria-expanded":r.value,title:_.value,onClick:h},[b("span",r9e,I(_.value),1),W(Ee,{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,l9e)),c.value?(g(),S("div",{key:1,class:Be(["tf-body",{open:u.value}]),inert:!a.value},[b("div",c9e,[(g(!0),S(Ce,null,rt(e.items,(E,T)=>(g(),S(Ce,{key:v(cE)(E,T)},[E.kind==="thinking"?(g(),ue(Vg,{key:0,text:E.thinking,mobile:e.mobile,streaming:A(E),"started-at-ms":v(W2)(E.startedAt),"duration-ms":E.durationMs},null,8,["text","mobile","streaming","started-at-ms","duration-ms"])):E.kind==="text"&&E.text?(g(),S("div",u9e,[W(Br,{text:E.text,streaming:A(E),"open-file":$=>o("openFile",$)},null,8,["text","streaming","open-file"])])):E.kind==="activity-run"?(g(),ue(dE,{key:2,items:E.items,mobile:e.mobile,streaming:P(E),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:L[0]||(L[0]=$=>o("openMedia",$)),onOpenFile:L[1]||(L[1]=$=>o("openFile",$)),onOpenToolDiff:L[2]||(L[2]=$=>o("openToolDiff",$)),onOpenAgent:L[3]||(L[3]=$=>o("openAgent",$)),onDetach:L[4]||(L[4]=$=>o("detach",$))},null,8,["items","mobile","streaming","tool-diff-panel"])):E.kind==="tool"?(g(),ue(Dg,{key:3,tool:E.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:L[5]||(L[5]=$=>o("openMedia",$)),onOpenFile:L[6]||(L[6]=$=>o("openFile",$)),onOpenToolDiff:L[7]||(L[7]=$=>o("openToolDiff",$)),onOpenAgent:L[8]||(L[8]=$=>o("openAgent",$)),onDetach:L[9]||(L[9]=$=>o("detach",$))},null,8,["tool","mobile","tool-diff-panel"])):E.kind==="notification"?(g(),ue(N$,{key:4,items:E.items},null,8,["items"])):Y("",!0)],64))),128))])],10,a9e)):Y("",!0)],2)):Y("",!0)}}),f9e=vt(d9e,[["__scopeId","data-v-331ba726"]]),p9e={key:0,class:"ui-card__head"},h9e={class:"ui-card__body"},m9e={key:1,class:"ui-card__foot"},g9e=Je({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(g(),S("div",p9e,[jn(t.$slots,"head",{},void 0,!0)])):Y("",!0),b("div",h9e,[jn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(g(),S("div",m9e,[jn(t.$slots,"foot",{},void 0,!0)])):Y("",!0)],2))}}),c9=vt(g9e,[["__scopeId","data-v-d2cab471"]]),v9e={class:"tf-ic"},y9e={class:"tf-title"},w9e={key:0,class:"tf-stats"},k9e={key:0,class:"tf-add"},b9e={key:1,class:"tf-del"},_9e={class:"diffbar","aria-hidden":"true"},x9e={class:"tf-list"},S9e=["innerHTML"],C9e={class:"tf-dir"},M9e={class:"tf-base"},A9e={key:0,class:"tf-stats"},T9e={key:0,class:"tf-add"},E9e={key:1,class:"tf-del"},I9e=Je({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=Uo(!1),i=B(()=>s.value?e.changes:e.changes.slice(0,3)),l=B(()=>Math.max(0,e.changes.length-3)),r=B(()=>e.changes.reduce((k,x)=>k+x.added,0)),a=B(()=>e.changes.reduce((k,x)=>k+x.removed,0)),c=B(()=>e.changes.every(k=>!k.statsIncomplete)),u=B(()=>r.value+a.value),d=B(()=>u.value===0?1:r.value),f=B(()=>u.value===0?1:a.value);function p(k){if(!e.cwd)return k;const x=e.cwd.replaceAll("\\","/").replace(/\/$/,""),y=k.replaceAll("\\","/");return y.startsWith(`${x}/`)?y.slice(x.length+1):k}function h(k){const x=p(k).replaceAll("\\","/"),y=x.lastIndexOf("/");return y<0?{dir:"",base:x}:{dir:x.slice(0,y+1),base:x.slice(y+1)}}function m(k){e.interactive&&(k.hasWrite?n("openFile",{path:k.path}):n("openDiff",k))}return(k,x)=>(g(),ue(c9,{class:"turn-files"},$2({head:ae(()=>[b("span",v9e,[W(Ee,{name:"pencil",size:"sm"})]),b("span",y9e,I(v(o)(e.changes.length===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:e.changes.length})),1),c.value&&u.value>0?(g(),S("span",w9e,[r.value>0?(g(),S("span",k9e,"+"+I(r.value),1)):Y("",!0),a.value>0?(g(),S("span",b9e,"−"+I(a.value),1)):Y("",!0),b("span",_9e,[b("span",{class:"seg-add",style:Gt({flexGrow:d.value})},null,4),b("span",{class:"seg-del",style:Gt({flexGrow:f.value})},null,4)])])):Y("",!0)]),default:ae(()=>[b("ul",x9e,[(g(!0),S(Ce,null,rt(i.value,y=>(g(),S("li",{key:y.path,class:"tf-row"},[(g(),ue(cs(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:"tf-file",onClick:w=>m(y)},{default:ae(()=>[b("span",{class:"tf-ficon","aria-hidden":"true",innerHTML:v(ju)(y.path)},null,8,S9e),b("span",C9e,I(h(y.path).dir),1),b("span",M9e,I(h(y.path).base),1)]),_:2},1032,["type","onClick"])),!y.statsIncomplete&&(y.added>0||y.removed>0)?(g(),S("span",A9e,[y.added>0?(g(),S("span",T9e,"+"+I(y.added),1)):Y("",!0),y.removed>0?(g(),S("span",E9e,"−"+I(y.removed),1)):Y("",!0)])):Y("",!0)]))),128))])]),_:2},[l.value>0?{name:"foot",fn:ae(()=>[W(Nt,{class:"tf-more",variant:"ghost",size:"sm",onClick:x[0]||(x[0]=y=>s.value=!s.value)},{default:ae(()=>[W(Ee,{class:Be(["tf-more-car",{open:s.value}]),name:"chevron-down",size:"sm"},null,8,["class"]),He(" "+I(s.value?v(o)("conversation.turnFiles.showLess"):v(o)(l.value===1?"conversation.turnFiles.moreOne":"conversation.turnFiles.more",{number:l.value})),1)]),_:1})]),key:"0"}:void 0]),1024))}}),L9e=vt(I9e,[["__scopeId","data-v-11486090"]]),$9e=["src"],N9e=6,z9e=300,B9e=6,R9e=250,P9e=Je({__name:"MascotSprite",props:{state:{},size:{default:48}},setup(e){const t=N9e*z9e,n=B9e*R9e,o=e,s=V("laptop");let i;const l=B(()=>{const d=o.size;return{width:`${d}px`,height:`${d*208/192}px`}}),r=B(()=>o.state==="failed"?"/brand/mascot-failed.png":`/brand/mascot-${s.value}.png`);function a(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function c(){i!==void 0&&(clearTimeout(i),i=void 0)}function u(){if(c(),o.state==="failed"||a())return;const d=s.value==="laptop"?t:n;i=setTimeout(()=>{i=void 0,s.value=s.value==="laptop"?"review":"laptop",u()},d)}return In(u),En(c),Ke(()=>o.state==="failed",d=>{if(d){c();return}s.value="laptop",u()}),(d,f)=>(g(),S("img",{"aria-hidden":"true",class:"mascot-apng",src:r.value,style:Gt(l.value)},null,12,$9e))}}),F9e=vt(P9e,[["__scopeId","data-v-c03cab60"]]),j9e={class:"working-indicator",role:"status"},O9e={class:"wi-mascot","aria-hidden":"true"},H9e={class:"wi-label ui-shimmer"},D9e=Je({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",j9e,[b("span",O9e,[W(F9e,{state:"running",size:40})]),b("span",H9e,I(e.label),1)]))}}),V9e=vt(D9e,[["__scopeId","data-v-934cc635"]]),Tr=V(null),vu=V(!1);function u9(e){const t=Tr.value;!t||vu.value||(Tr.value=null,t.resolve(e))}async function W9e(){const e=Tr.value;if(!(!e||vu.value)){if(!e.action){u9(!0);return}vu.value=!0;try{await e.action(),Tr.value===e&&(Tr.value=null),e.resolve(!0)}catch(t){Tr.value===e&&(Tr.value=null),e.reject(t)}finally{vu.value=!1}}}function q9e(e){return vu.value?Promise.resolve(!1):(Tr.value&&u9(!1),new Promise((t,n)=>{Tr.value={...e,resolve:t,reject:n}}))}function z1(){return{current:Tr,busy:vu,confirm:q9e,settle:u9,runAction:W9e}}const U9e=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,Z9e=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,K9e=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,TC="text/plain;charset=utf-8";function G9e(e,t){const n=(t??"").toLowerCase();if(U9e.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:TC;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:Z9e.test(o)?TC:K9e.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function ON(e,t,n){const o=G9e(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await Ct().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const l=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=l;else{const r=document.createElement("a");r.href=l,r.download=t??e,r.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}function Y9e(e){const t=e.replaceAll("\\","/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const l=n!=="",r=[];for(const c of o.split("/"))!c||c==="."||(c===".."?r.length>0&&r.at(-1)!==".."?r.pop():l||r.push(c):r.push(c));const a=n+r.join("/");return s?a.toLowerCase():a}function X9e(e,t){let n=0,o=0;for(const s of e)s.oldNo!==void 0&&(n=Math.max(n,s.oldNo)),s.newNo!==void 0&&(o=Math.max(o,s.newNo));return t.map(s=>({...s,oldNo:s.oldNo===void 0?void 0:s.oldNo+n,newNo:s.newNo===void 0?void 0:s.newNo+o}))}function J9e(e){const t=new Map;for(const n of a1(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=pi(n.tool.name);if(o!=="edit"&&o!=="multi_edit"&&o!=="write")continue;const s=Hg(n.tool.arg);if(!s)continue;const i=o==="write",l=i?null:Og(n.tool),r=l?sE(l):{added:0,removed:0},a=i||l===null,c=Y9e(s),u=t.get(c);if(!u){t.set(c,{path:s,...r,hasWrite:i,statsIncomplete:a,diff:l});continue}u.added+=r.added,u.removed+=r.removed,u.hasWrite||=i,u.statsIncomplete||=a,u.diff!==null&&l!==null?u.diff=[...u.diff,{type:"hunk",text:"···"},...X9e(u.diff,l)]:u.diff=null}return[...t.values()]}const Q9e={class:"chat"},eye={key:0,class:"chat-loading"},tye={class:"chat-loading-text"},nye={key:1,class:"chat-empty"},oye={key:1,class:"top-sentinel-text"},sye={key:0,class:"u-turn"},iye=["data-turn-id"],lye={key:0,class:"u-atts"},rye={key:1,class:"skill-act"},aye={class:"skill-act-head"},cye=["aria-expanded","onClick"],uye={key:0,class:"u-meta"},dye=["aria-label","onClick"],fye=["aria-label","onClick"],pye=["data-turn-id"],hye=["onClick"],mye={class:"cd-view"},gye={key:1,class:"cd-label"},vye=["data-turn-id"],yye={key:1,class:"msg"},wye={key:1,class:"a-msg-ft"},kye={key:0,class:"a-duration"},bye=["aria-label","onClick"],_ye={key:3,class:"turn-failed",role:"alert"},xye={class:"tf-chip","aria-hidden":"true"},Sye={class:"tf-main"},Cye={class:"tf-title"},Mye=["title"],Aye={key:5,class:"sending-placeholder"},Tye={key:6,class:"q-stack"},Eye={class:"q-head"},Iye={class:"q-title"},Lye=["onDragover","onDrop"],$ye=["aria-label","onClick"],Nye={class:"u-bub q-bub"},zye=["title","onDragstart"],Bye=["title","onClick"],Rye={key:0,class:"u-text q-text"},Pye={key:1,class:"q-text q-text-placeholder"},Fye={key:0,class:"q-imgs"},jye={key:0,class:"q-file"},Oye=["aria-label","onClick"],Hye={key:0,class:"open-unsupported",role:"status"},Dye=2500,Vye=Je({__name:"ChatPane",props:{turns:{},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},fastMoon:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},turnFolding:{type:Boolean,default:!0},activityRunFolding:{type:Boolean,default:!0},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},cwd:{},queued:{default:()=>[]}},emits:["openFile","openMedia","copyConversationCopied","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","editMessage","loadOlderMessages","unqueue","editQueued","reorderQueue","steerQueued","continueTurn"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),{confirm:s}=z1();En(()=>{for(const le of w.values())le.disconnect();w.clear(),y.clear(),oe!==null&&(clearTimeout(oe),oe=null),se!==null&&(clearTimeout(se),se=null),q!==null&&(clearTimeout(q),q=null),ve!==null&&(clearTimeout(ve),ve=null)});const i=e,l=V(null);let r=null;function a(){!l.value||typeof IntersectionObserver>"u"||(r?.disconnect(),r=new IntersectionObserver(le=>{le[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&m("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),r.observe(l.value))}In(a),En(()=>{r?.disconnect(),r=null}),Ke(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{yt().then(a)});const c=B(()=>{if(!i.turnActive||i.turns.length===0)return null;const le=i.turns.at(-1);return le.role==="assistant"?le.id:null}),u=B(()=>i.working),d=new WeakMap;function f(le){const fe=d.get(le);if(fe?.activityRunFolding===i.activityRunFolding&&fe.turnFolding===i.turnFolding)return fe.model;const ge=Jne(le,i.activityRunFolding),{folded:Oe,visible:Fe}=Qne(ge,i.turnFolding),pt={all:ge,folded:Oe,visible:Fe,changes:J9e(le)};return d.set(le,{activityRunFolding:i.activityRunFolding,turnFolding:i.turnFolding,model:pt}),pt}const p=B(()=>{const le=new Map;for(const fe of i.turns)fe.role==="assistant"&&le.set(fe.id,f(fe));return le}),h=B(()=>{const le=i.turns.at(-1);if(le?.role!=="assistant")return o("conversation.requesting");const fe=p.value.get(le.id)?.all.some(ge=>ge.kind==="text"?ge.text.trim().length>0:!0);return o(fe?"conversation.working":"conversation.requesting")}),m=n,k=V({}),x=V({}),y=new Map,w=new Map;function _(le){const ge=y.get(le)?.querySelector(".u-text");if(!ge)return;const Oe=Number.parseFloat(getComputedStyle(ge).lineHeight)||24;x.value[le]=ge.scrollHeight>Oe*10+1}function A(le,fe){const ge=fe instanceof HTMLElement?fe:null;if(!ge){w.get(le)?.disconnect(),w.delete(le),y.delete(le);return}if(y.get(le)!==ge){if(w.get(le)?.disconnect(),y.set(le,ge),typeof ResizeObserver<"u"){const Oe=new ResizeObserver(()=>_(le));Oe.observe(ge.querySelector(".u-text")??ge),w.set(le,Oe)}yt(()=>_(le))}}function P(le){k.value[le]=!k.value[le]}const z=V(null),L=V(null);function E(le){return(le.attachments?.length??0)>0}function T(le){m("editQueued",le)}function $(le,fe){if(z.value=le,!fe.dataTransfer)return;fe.dataTransfer.effectAllowed="move",fe.dataTransfer.setData("text/plain",String(le));const ge=fe.currentTarget?.closest(".q-turn");ge&&fe.dataTransfer.setDragImage(ge,24,24)}function C(le,fe){if(z.value===null)return;fe.preventDefault(),fe.dataTransfer&&(fe.dataTransfer.dropEffect="move");const ge=fe.currentTarget.getBoundingClientRect(),Oe=fe.clientY{for(let le=i.turns.length-1;le>=0;le--)if(i.turns[le].role==="user")return i.turns[le].id;return null});function M(le){return!i.readOnly&&le.role==="user"&&le.id===D.value&&!i.working&&!le.pluginCommand&&!(le.skillActivation&&!n5e(le.skillActivation,{revivePill:!1}))}function R(le){return le.skillActivation?o5e(le.skillActivation):le.pluginCommand?le.pluginCommand.args||null:le.text||null}function O(le){const fe=le.compaction,ge=fe?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof fe?.tokensBefore=="number"&&typeof fe?.tokensAfter=="number"?ge+o("conversation.compactedTokens",{before:ba(fe.tokensBefore),after:ba(fe.tokensAfter)}):ge}const U=V(null),Z=V(null);let q=null;async function te(le){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&ee(le)}function ee(le){if(Z.value!==null)return;Z.value=le.id;const fe=le.skillActivation?E$(le.skillActivation,{revivePill:!1})??le.text:le.text;m("editMessage",{text:fe,attachments:le.attachments}),q=setTimeout(()=>{q=null,Z.value=null},Dye)}Ke(()=>i.turns,le=>{Z.value!==null&&(le.some(fe=>fe.id===Z.value)||(Z.value=null,q!==null&&(clearTimeout(q),q=null)))},{flush:"post"});const J=V(!1);let se=null;function Q(){if(i.turns.length===0)return;const le=[];for(const ge of i.turns){if(ge.role==="compaction"||ge.role==="cron")continue;const Oe=ge.role==="user"?"User":"Assistant",Fe=toe(ge);Fe.trim()&&le.push(`**${Oe}** -${_e}`)}const Ae=me.join(` +${Fe}`)}const fe=le.join(` --- -`);fs(Ae).then(le=>{le&&(te.value=!0,p("copyConversationCopied"),J!==null&&clearTimeout(J),J=setTimeout(()=>{J=null,te.value=!1},2e3))}).catch(()=>{})}function ie(me){const Ae=[];for(let le=me;le>=0;le--){const be=i.turns[le];if(!be||be.role!=="assistant")break;Ae.unshift(be)}return Ae}function Q(me){return ie(me).map(Ae=>zne(Ae)).filter(Boolean).join(` +`);fs(fe).then(ge=>{ge&&(J.value=!0,m("copyConversationCopied"),se!==null&&clearTimeout(se),se=setTimeout(()=>{se=null,J.value=!1},2e3))}).catch(()=>{})}function me(le){const fe=[];for(let ge=le;ge>=0;ge--){const Oe=i.turns[ge];if(!Oe||Oe.role!=="assistant")break;fe.unshift(Oe)}return fe}function xe(le){return me(le).map(fe=>eoe(fe)).filter(Boolean).join(` -`)}function he(){for(let me=i.turns.length-1;me>=0;me-=1)if(i.turns[me]?.role==="assistant")return Q(me);return""}function xe(){const me=he();me.trim()&&fs(me).then(Ae=>{Ae&&(te.value=!0,p("copyConversationCopied"),J!==null&&clearTimeout(J),J=setTimeout(()=>{J=null,te.value=!1},2e3))}).catch(()=>{})}t({copyConversation:ee,copyFinalSummary:xe});function Ye(me){const Ae=i.turns[me];if(!Ae||Ae.role!=="assistant")return!1;const le=i.turns[me+1];return!le||le.role!=="assistant"}let st=null;function X(me){const Ae=i.turns[me];if(!Ae)return;const le=Q(me);le.trim()&&fs(le).then(be=>{be&&(R.value=Ae.id,st!==null&&clearTimeout(st),st=setTimeout(()=>{st=null,R.value=null},1400))}).catch(()=>{})}function se(me){const Ae=me.text;Ae.trim()&&fs(Ae).then(le=>{le&&(R.value=me.id,st!==null&&clearTimeout(st),st=setTimeout(()=>{st=null,R.value=null},1400))}).catch(()=>{})}function F(me){return{kind:me.kind==="video"?"video":"image",url:me.url,path:me.name,fileId:me.fileId}}const Z=V(null);let fe=null;function ve(me){if(me.kind==="image"||me.kind==="video"){p("openMedia",F(me));return}me.fileId!==void 0&&PN(me.fileId,me.name,me.mediaType).then(Ae=>{Ae==="unsupported"&&(Z.value=me.name??me.fileId??"",fe!==null&&clearTimeout(fe),fe=setTimeout(()=>{fe=null,Z.value=null},2400))})}function ge(me,Ae){return me.id!==c.value||u1(Ae)?!1:Ae.sourceIndex===c1(me).length-1}function oe(me){if(me.id!==c.value)return null;const Ae=c1(me),le=Ae.at(-1);if(le!==void 0&&u1(le))return null;if(le?.kind==="tool"&&le.tool.status==="running"){const be=le.tool.id;if(i.approvals.some(Ke=>Ke.toolCallId===be)||(i.questions??[]).some(Ke=>Ke.toolCallId===be))return null}return Ae.length-1}function de(me){if(!me.createdAt)return;const Ae=Date.parse(me.createdAt);return Number.isFinite(Ae)?Ae:void 0}function ke(me,Ae){if(me.id!==c.value)return!1;const le=Ae.items.at(-1);return le!==void 0&&u1(le)?!1:le!==void 0&&le.sourceIndex===c1(me).length-1}function Se(){p("continueTurn",o("conversation.turnFailedResumeText"))}return(me,Ae)=>(g(),S(Ce,null,[b("div",N9e,[e.sessionLoading?(g(),S("div",z9e,[W(Zo,{size:"sm"}),b("span",B9e,E(v(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(g(),S("div",R9e)):Y("",!0),e.hasMoreMessages||e.loadingMore?(g(),S("div",{key:2,ref_key:"topSentinelRef",ref:l,class:Pe(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(g(),S("span",P9e,[W(Zo,{size:"sm"}),Oe(" "+E(v(o)("conversation.loadingOlder")),1)])):(g(),S("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:Ae[0]||(Ae[0]=le=>p("loadOlderMessages"))},E(v(o)("conversation.loadOlder")),1))],2)):Y("",!0),(g(!0),S(Ce,null,at(e.turns,(le,be)=>(g(),S(Ce,{key:le.id},[le.role==="user"?(g(),S("div",F9e,[b("div",{class:Pe(["u-bub turn-anchor",{undoing:j.value===le.id}]),"data-turn-id":le.id},[le.attachments&&le.attachments.length>0?(g(),S("div",O9e,[(g(!0),S(Ce,null,at(le.attachments,(_e,Ke)=>(g(),ue(B7,{key:Ke,kind:_e.kind,name:_e.name,url:_e.url,"file-id":_e.fileId,"media-type":_e.mediaType,size:_e.size,onActivate:Qe=>ve(_e)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):Y("",!0),le.pluginCommand?(g(),S("div",H9e,[b("div",D9e,[Ae[17]||(Ae[17]=b("span",{class:"skill-act-arrow"},"▶",-1)),b("span",null,"/"+E(le.pluginCommand.pluginId)+":"+E(le.pluginCommand.commandName),1)])])):Y("",!0),D(le)!==null?(g(),S("div",{key:2,ref_for:!0,ref:_e=>w(le.id,_e),class:Pe(["u-text-wrap",{"u-text-wrap-args":!!le.pluginCommand,"is-clamped":m.value[le.id]&&!h.value[le.id]}])},[b("div",{class:Pe(le.pluginCommand?"skill-act-args":"u-text")},[W(CC,{text:D(le)??"","open-file":_e=>p("openFile",_e)},null,8,["text","open-file"])],2),m.value[le.id]?(g(),S("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!!h.value[le.id],onClick:_e=>_(le.id)},[Oe(E(v(o)(h.value[le.id]?"conversation.userMessage.collapse":"conversation.userMessage.expand"))+" ",1),W(Ie,{class:"u-text-toggle-car",name:"chevron-down",size:"sm"})],8,V9e)):Y("",!0)],2)):Y("",!0)],10,j9e),le.createdAt||H(le)?(g(),S("div",W9e,[H(le)?(g(),S("div",{key:0,class:Pe(["u-edit-wrap",{undoing:j.value===le.id}])},[b("button",{type:"button",class:"u-edit","aria-label":v(o)("conversation.undoTooltip"),onClick:_e=>K(le)},[W(Ie,{name:"undo",size:"sm"})],8,q9e)],2)):Y("",!0),le.text.trim().length>0?(g(),S("button",{key:1,type:"button",class:"u-copy","aria-label":v(o)("filePreview.copy"),onClick:_t(_e=>se(le),["stop"])},[R.value!==le.id?(g(),ue(Ie,{key:0,name:"copy",size:"sm"})):(g(),ue(Ie,{key:1,name:"check",size:"sm"}))],8,U9e)):Y("",!0),le.createdAt?(g(),ue(Ov,{key:2,time:le.createdAt},null,8,["time"])):Y("",!0)])):Y("",!0)])):le.role==="compaction"?(g(),S("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":le.id,role:"separator"},[Ae[18]||(Ae[18]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1)),le.text?(g(),S("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:_e=>p("openCompaction",{turnId:le.id})},[b("span",null,E(A(le)),1),b("span",G9e,E(v(o)("conversation.viewSummary")),1)],8,K9e)):(g(),S("span",Y9e,E(A(le)),1)),Ae[19]||(Ae[19]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,Z9e)):le.role==="cron"?(g(),ue(y5e,{key:2,text:le.text,cron:le.cron,"turn-id":le.id,"created-at":le.createdAt},null,8,["text","cron","turn-id","created-at"])):(g(),S("div",{key:3,class:"a-msg turn-anchor","data-turn-id":le.id},[W(Uve,{items:d.value.get(le.id)?.folded??[],live:le.id===c.value,parked:le.id===c.value&&oe(le)===null,"streaming-tail-index":oe(le),"seed-ms":v($ne)(le),"created-ms":de(le),"duration-ms":le.durationMs,"tool-diff-panel":e.toolDiffPanel,mobile:"",onOpenMedia:Ae[1]||(Ae[1]=_e=>p("openMedia",_e)),onOpenFile:Ae[2]||(Ae[2]=_e=>p("openFile",_e)),onOpenToolDiff:Ae[3]||(Ae[3]=_e=>p("openToolDiff",_e)),onOpenAgent:Ae[4]||(Ae[4]=_e=>p("openAgent",_e)),onDetach:Ae[5]||(Ae[5]=_e=>p("detachTask",_e))},null,8,["items","live","parked","streaming-tail-index","seed-ms","created-ms","duration-ms","tool-diff-panel"]),(g(!0),S(Ce,null,at(d.value.get(le.id)?.visible??[],(_e,Ke)=>(g(),S(Ce,{key:v(lE)(_e,Ke)},[_e.kind==="thinking"?(g(),ue(Hg,{key:0,text:_e.thinking,mobile:"",streaming:ge(le,_e),"started-at-ms":v(W2)(_e.startedAt),"duration-ms":_e.durationMs},null,8,["text","streaming","started-at-ms","duration-ms"])):_e.kind==="text"&&_e.text?(g(),S("div",J9e,[W(zr,{text:_e.text,streaming:ge(le,_e),"open-file":Qe=>p("openFile",Qe)},null,8,["text","streaming","open-file"])])):_e.kind==="activity-run"?(g(),ue(aE,{key:2,items:_e.items,mobile:"",streaming:ke(le,_e),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:Ae[6]||(Ae[6]=Qe=>p("openMedia",Qe)),onOpenFile:Ae[7]||(Ae[7]=Qe=>p("openFile",Qe)),onOpenToolDiff:Ae[8]||(Ae[8]=Qe=>p("openToolDiff",Qe)),onOpenAgent:Ae[9]||(Ae[9]=Qe=>p("openAgent",Qe)),onDetach:Ae[10]||(Ae[10]=Qe=>p("detachTask",Qe))},null,8,["items","streaming","tool-diff-panel"])):_e.kind==="tool"?(g(),ue(Og,{key:3,tool:_e.tool,mobile:"","tool-diff-panel":e.toolDiffPanel,onOpenMedia:Ae[11]||(Ae[11]=Qe=>p("openMedia",Qe)),onOpenFile:Ae[12]||(Ae[12]=Qe=>p("openFile",Qe)),onOpenToolDiff:Ae[13]||(Ae[13]=Qe=>p("openToolDiff",Qe)),onOpenAgent:Ae[14]||(Ae[14]=Qe=>p("openAgent",Qe)),onDetach:Ae[15]||(Ae[15]=Qe=>p("detachTask",Qe))},null,8,["tool","tool-diff-panel"])):_e.kind==="notification"?(g(),ue(IL,{key:4,items:_e.items},null,8,["items"])):Y("",!0)],64))),128)),le.id!==c.value&&(d.value.get(le.id)?.changes.length??0)>0?(g(),ue(d9e,{key:0,changes:d.value.get(le.id)?.changes??[],cwd:e.cwd,onOpenDiff:_e=>p("openTurnDiff",{turnId:le.id,changes:d.value.get(le.id)?.changes??[]}),onOpenFile:Ae[16]||(Ae[16]=_e=>p("openFile",_e))},null,8,["changes","cwd","onOpenDiff"])):Y("",!0),le.id!==c.value&&Ye(be)&&(Q(be).trim().length>0||le.durationMs!==void 0)?(g(),S("div",Q9e,[W(Cn,{text:`${le.durationMs} ms`},{default:ae(()=>[le.durationMs!==void 0?(g(),S("span",eye,E(v(Ine)(le.durationMs)),1)):Y("",!0)]),_:2},1032,["text"]),Q(be).trim().length>0?(g(),S("button",{key:0,class:"a-cpbtn","aria-label":v(o)("filePreview.copy"),onClick:_e=>X(be)},[R.value!==le.id?(g(),ue(Ie,{key:0,name:"copy",size:"sm"})):(g(),ue(Ie,{key:1,name:"check",size:"sm"}))],8,tye)):Y("",!0)])):Y("",!0)],8,X9e))],64))),128)),e.lastTurnReason==="failed"&&!e.working?(g(),S("div",nye,[b("span",oye,[W(Ie,{name:"alert-triangle",size:"sm"})]),b("div",sye,[b("span",iye,E(e.turnErrorKind==="max_steps"?v(o)("conversation.turnFailedMaxSteps"):v(o)("conversation.turnFailed")),1),e.turnErrorMessage?(g(),S("span",{key:0,class:"tf-sub",title:e.turnErrorMessage},E(e.turnErrorMessage),9,lye)):Y("",!0)]),W(Nt,{variant:"secondary",size:"sm",onClick:Se},{default:ae(()=>[Oe(E(v(o)("conversation.turnFailedResume")),1)]),_:1})])):Y("",!0),e.compaction?(g(),ue(n5e,{key:4,label:v(o)("conversation.compacting")},null,8,["label"])):Y("",!0),u.value?(g(),S("div",rye,[W(x9e,{label:f.value},null,8,["label"])])):Y("",!0),e.queued.length>0?(g(),S("div",aye,[b("div",cye,[b("span",uye,[W(Ie,{name:"mail",size:"sm"}),Oe(" "+E(v(o)("composer.queueLabel"))+" · ",1),b("b",null,E(v(o)("composer.queuePending",{n:e.queued.length})),1)])]),(g(!0),S(Ce,null,at(e.queued,(le,be)=>(g(),S("div",{key:le.id,class:Pe(["u-turn q-turn",{"q-dragging":M.value===be,"drop-before":P.value?.index===be&&P.value.position==="before","drop-after":P.value?.index===be&&P.value.position==="after"}]),onDragover:_e=>I(be,_e),onDrop:_e=>N(be,_e)},[be===0?(g(),ue(Cn,{key:0,text:v(o)("composer.queueSteer")},{default:ae(()=>[b("button",{type:"button",class:"q-send","aria-label":v(o)("composer.queueSteer"),onClick:_t(_e=>p("steerQueued",be),["stop"])},[W(Ie,{name:"send",size:"lg"})],8,fye)]),_:2},1032,["text"])):Y("",!0),b("div",pye,[b("span",{class:"q-grip",title:v(o)("composer.queueDragTitle"),draggable:"true",onDragstart:_e=>T(be,_e),onDragend:C},[W(Ie,{name:"grip",size:"sm"})],40,hye),b("button",{type:"button",class:"q-body",title:v(o)("composer.editQueued"),onClick:_e=>$(be)},[le.text?(g(),S("span",gye,[W(CC,{text:le.text,interactive:!1},null,8,["text"])])):(g(),S("span",vye,[W(Ie,{name:"file",size:"sm"}),Oe(" "+E(v(o)("composer.queuedAttachments",{n:le.attachments?.length??0})),1)]))],8,mye),B(le)?(g(),S("div",yye,[(g(!0),S(Ce,null,at(le.attachments,(_e,Ke)=>(g(),S(Ce,{key:Ke},[_e.kind==="file"?(g(),S("span",wye,[W(Ie,{name:"file",size:"sm"}),Oe(" "+E(_e.name??_e.fileId),1)])):(g(),ue(z7,{key:1,url:_e.url,kind:_e.kind,"file-id":_e.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):Y("",!0),b("button",{type:"button",class:"q-rm","aria-label":v(o)("composer.remove"),onClick:_t(_e=>p("unqueue",be),["stop"])},[W(Ie,{name:"close",size:"sm"})],8,kye)])],42,dye))),128))])):Y("",!0)]),Z.value!==null?(g(),S("div",bye,E(v(o)("composer.attachmentOpenUnsupported",{name:Z.value})),1)):Y("",!0)],64))}}),c9=vt(xye,[["__scopeId","data-v-9f61c8f4"]]),Sye={class:"ch-id"},Cye={key:0,class:"ch-ws"},Mye={key:1,class:"ch-sep"},Aye=["onKeydown"],Tye={class:"ch-ses"},Eye={key:0,class:"ch-pill ch-sync-pill"},Iye={key:0,class:"ch-ahead"},$ye={key:1,class:"ch-behind"},Lye={key:1,class:"ch-pill ch-diff-pill"},Nye={key:0,class:"ch-add"},zye={key:1,class:"ch-del"},Bye={class:"ch-pill ch-pr pr-merged ch-done-pill"},Rye=Je({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},sessionDone:{type:Boolean},pinned:{type:Boolean},panelVisible:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","togglePin","archiveSession","restoreSession","exportSession","togglePanel"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t,i=z(()=>o.ahead??0),l=z(()=>o.behind??0),r=z(()=>o.gitDiffStats?.totalAdditions??0),a=z(()=>o.gitDiffStats?.totalDeletions??0),c=z(()=>r.value>0||a.value>0),u={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(U){return U.trim().toLowerCase().replaceAll("_","-")}function f(U){const te=d(U);return u[te]?`pr-${te}`:"pr-unknown"}function p(U){return n(u[d(U)]??"header.prStatusUnknown")}const h=V(!1),m=V(null),k=V(null),x=V({});function y(U){const te=U.target;k.value?.el?.contains(te)||m.value?.el?.contains(te)||M()}function w(){M()}async function _(U){if(U.stopPropagation(),h.value){M();return}h.value=!0,document.addEventListener("mousedown",y),window.addEventListener("resize",w),await yt();const te=m.value?.el,J=k.value?.el;if(!te||!J)return;const ee=te.getBoundingClientRect(),ie=4,Q=8,he=J.offsetWidth,xe=J.offsetHeight;let Ye=ee.bottom+ie;Ye+xe>window.innerHeight-Q&&(Ye=Math.max(Q,ee.top-xe-ie));let st=ee.left;st+he>window.innerWidth-Q&&(st=Math.max(Q,ee.right-he)),x.value={top:`${Math.round(Ye)}px`,left:`${Math.round(st)}px`}}function M(){h.value=!1,document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)}En(()=>{document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)});function P(){s("copyAll"),M()}function B(){s("copyFinalSummary"),M()}const $=V(!1);function T(){o.sessionId&&fs(o.sessionId).then(U=>{U&&($.value=!0,setTimeout(()=>{$.value=!1},1200))})}const I=V(!1),N=V(""),C=V(null);async function O(){if(M(),!!o.sessionId){I.value=!0,N.value=o.sessionTitle??"",await yt();try{C.value?.focus(),C.value?.select()}catch{}}}function H(){const U=N.value.trim();U&&o.sessionId&&U!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,U),I.value=!1}function D(){I.value=!1}function A(){o.sessionId&&(M(),s("forkSession",o.sessionId))}function R(){o.sessionId&&(M(),s("exportSession",o.sessionId))}function j(){o.sessionId&&(M(),s("togglePin",o.sessionId))}function q(){o.sessionId&&(M(),s("archiveSession",o.sessionId))}function K(){o.sessionId&&(M(),s("restoreSession",o.sessionId))}return(U,te)=>(g(),S("header",{class:Pe(["chat-header",{"macos-desktop":v(Rg)}])},[b("div",Sye,[e.workspaceName?(g(),S("span",Cye,E(e.workspaceName),1)):Y("",!0),e.workspaceName&&e.sessionTitle?(g(),S("span",Mye,"/")):Y("",!0),I.value?Jn((g(),S("input",{key:2,ref_key:"renameInputRef",ref:C,"onUpdate:modelValue":te[0]||(te[0]=J=>N.value=J),class:"ch-rename",type:"text",onKeydown:[go(_t(H,["stop"]),["enter"]),go(_t(D,["stop"]),["esc"])],onBlur:H,onClick:te[1]||(te[1]=_t(()=>{},["stop"]))},null,40,Aye)),[[js,N.value]]):e.sessionTitle?(g(),ue(Cn,{key:3,text:e.sessionTitle},{default:ae(()=>[b("span",Tye,E(e.sessionTitle),1)]),_:1},8,["text"])):Y("",!0)]),e.panelVisible?Y("",!0):(g(),ue(Dt,{key:0,class:"ch-panel",label:v(n)("panel.openPanel"),onClick:te[2]||(te[2]=J=>s("togglePanel"))},{default:ae(()=>[W(Ie,{name:"panel-expand-right",size:"md"})]),_:1},8,["label"])),W(Dt,{ref_key:"kebabRef",ref:m,class:Pe(["ch-act-more",{open:h.value}]),label:v(n)("header.options"),"aria-expanded":h.value,"aria-haspopup":"menu",onClick:te[3]||(te[3]=_t(J=>_(J),["stop"]))},{default:ae(()=>[W(Ie,{name:"dots-horizontal",size:"md"})]),_:1},8,["class","label","aria-expanded"]),h.value?(g(),ue(Nr,{key:1,ref_key:"menuRef",ref:k,class:"ch-menu",style:Gt(x.value),onClick:te[4]||(te[4]=_t(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{onClick:P},{default:ae(()=>[W(Ie,{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),Oe(" "+E(e.copied?v(n)("header.copied"):v(n)("header.copyAll")),1)]),_:1}),W(Bn,{onClick:B},{default:ae(()=>[W(Ie,{name:"file-text",size:"sm"}),Oe(" "+E(v(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(g(),S(Ce,{key:0},[W(Bn,{separator:""}),W(Bn,{onClick:T},{default:ae(()=>[W(Ie,{name:$.value?"check":"copy",size:"sm"},null,8,["name"]),Oe(" "+E($.value?v(n)("header.copied"):v(n)("header.copySessionId")),1)]),_:1}),e.sessionDone?Y("",!0):(g(),ue(Bn,{key:0,onClick:j},{default:ae(()=>[W(Ie,{name:e.pinned?"pushpin-fill":"pushpin-line",size:"sm"},null,8,["name"]),Oe(" "+E(e.pinned?v(n)("header.unpinSession"):v(n)("header.pinSession")),1)]),_:1})),W(Bn,{onClick:O},{default:ae(()=>[W(Ie,{name:"pencil",size:"sm"}),Oe(" "+E(v(n)("header.renameSession")),1)]),_:1}),W(Bn,{onClick:A},{default:ae(()=>[W(Ie,{name:"git-fork",size:"sm"}),Oe(" "+E(v(n)("header.forkSession")),1)]),_:1}),W(Bn,{onClick:R},{default:ae(()=>[W(Ie,{name:"download",size:"sm"}),Oe(" "+E(v(n)("header.exportSession")),1)]),_:1}),e.sessionDone?(g(),ue(Bn,{key:1,onClick:K},{default:ae(()=>[W(Ie,{name:"undo",size:"sm"}),Oe(" "+E(v(n)("header.reopenSession")),1)]),_:1})):(g(),ue(Bn,{key:2,onClick:q},{default:ae(()=>[W(Ie,{name:"archive",size:"sm"}),Oe(" "+E(v(n)("header.markSessionDone")),1)]),_:1}))],64)):Y("",!0)]),_:1},8,["style"])):Y("",!0),te[7]||(te[7]=b("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(g(),S("button",{key:2,type:"button",class:"ch-git",onClick:te[5]||(te[5]=J=>s("openChanges"))},[b("span",{class:Pe(["ch-branch",{"ch-detached":!e.branch}])},E(e.branch||v(n)("header.detached")),3),i.value>0||l.value>0?(g(),S("span",Eye,[i.value>0?(g(),S("span",Iye,"↑"+E(i.value),1)):Y("",!0),l.value>0?(g(),S("span",$ye,"↓"+E(l.value),1)):Y("",!0)])):Y("",!0),c.value?(g(),S("span",Lye,[r.value>0?(g(),S("span",Nye,"+"+E(r.value),1)):Y("",!0),a.value>0?(g(),S("span",zye,"-"+E(a.value),1)):Y("",!0)])):Y("",!0)])):Y("",!0),e.pr?(g(),S("button",{key:3,type:"button",class:Pe(["ch-pill ch-pr",f(e.pr.state)]),onClick:te[6]||(te[6]=J=>e.pr&&s("openPr",e.pr.url))},[W(Ie,{name:"git-pull-request",size:"sm"}),b("span",null,"PR #"+E(e.pr.number)+" · "+E(p(e.pr.state)),1)],2)):Y("",!0),e.sessionId&&e.sessionDone?(g(),S(Ce,{key:4},[b("span",Bye,[W(Ie,{name:"circle-check",size:"sm"}),b("span",null,E(v(n)("header.sessionDone")),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:K},{default:ae(()=>[W(Ie,{name:"undo",size:"sm"}),Oe(" "+E(v(n)("header.reopenSession")),1)]),_:1})],64)):Y("",!0)],2))}}),Pye=vt(Rye,[["__scopeId","data-v-25d0d989"]]),Fye=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],AC=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function jye(e){if(e<=255)return Fye[e];let t=0,n=AC.length-1;for(;t<=n;){const o=t+n>>1,s=AC[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function Oye(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let c=0;c=55296&&u<=56319&&c+1=56320&&h<=57343&&(d=(u-55296<<10)+(h-56320)+65536,f=2)}const p=jye(d);(p==="R"||p==="AL"||p==="AN")&&(o=!0);for(let h=0;h=0&&n[u]==="ET";u--)n[u]="EN";for(u=c+1;u0?n[c-1]:r,f=u0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Uye(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` +`)}function Ye(){for(let le=i.turns.length-1;le>=0;le-=1)if(i.turns[le]?.role==="assistant")return xe(le);return""}function at(){const le=Ye();le.trim()&&fs(le).then(fe=>{fe&&(J.value=!0,m("copyConversationCopied"),se!==null&&clearTimeout(se),se=setTimeout(()=>{se=null,J.value=!1},2e3))}).catch(()=>{})}t({copyConversation:Q,copyFinalSummary:at});function X(le){const fe=i.turns[le];if(!fe||fe.role!=="assistant")return!1;const ge=i.turns[le+1];return!ge||ge.role!=="assistant"}let oe=null;function F(le){const fe=i.turns[le];if(!fe)return;const ge=xe(le);ge.trim()&&fs(ge).then(Oe=>{Oe&&(U.value=fe.id,oe!==null&&clearTimeout(oe),oe=setTimeout(()=>{oe=null,U.value=null},1400))}).catch(()=>{})}function K(le){const fe=le.text;fe.trim()&&fs(fe).then(ge=>{ge&&(U.value=le.id,oe!==null&&clearTimeout(oe),oe=setTimeout(()=>{oe=null,U.value=null},1400))}).catch(()=>{})}function he(le){return{kind:le.kind==="video"?"video":"image",url:le.url,path:le.name,fileId:le.fileId}}const ye=V(null);let ve=null;function ie(le){if(le.kind==="image"||le.kind==="video"){m("openMedia",he(le));return}le.fileId!==void 0&&ON(le.fileId,le.name,le.mediaType).then(fe=>{fe==="unsupported"&&(ye.value=le.name??le.fileId??"",ve!==null&&clearTimeout(ve),ve=setTimeout(()=>{ve=null,ye.value=null},2400))})}function de(le,fe){return le.id!==c.value||c1(fe)?!1:fe.sourceIndex===a1(le).length-1}function be(le){if(le.id!==c.value)return null;const fe=a1(le),ge=fe.at(-1);if(ge!==void 0&&c1(ge))return null;if(ge?.kind==="tool"&&ge.tool.status==="running"){const Oe=ge.tool.id;if(i.approvals.some(pt=>pt.toolCallId===Oe)||(i.questions??[]).some(pt=>pt.toolCallId===Oe))return null}return fe.length-1}function Se(le){if(!le.createdAt)return;const fe=Date.parse(le.createdAt);return Number.isFinite(fe)?fe:void 0}function je(le,fe){if(le.id!==c.value)return!1;const ge=fe.items.at(-1);return ge!==void 0&&c1(ge)?!1:ge!==void 0&&ge.sourceIndex===a1(le).length-1}function et(){m("continueTurn",o("conversation.turnFailedResumeText"))}return(le,fe)=>(g(),S(Ce,null,[b("div",Q9e,[e.sessionLoading?(g(),S("div",eye,[W(Zo,{size:"sm"}),b("span",tye,I(v(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(g(),S("div",nye)):Y("",!0),e.hasMoreMessages||e.loadingMore?(g(),S("div",{key:2,ref_key:"topSentinelRef",ref:l,class:Be(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(g(),S("span",oye,[W(Zo,{size:"sm"}),He(" "+I(v(o)("conversation.loadingOlder")),1)])):(g(),S("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:fe[0]||(fe[0]=ge=>m("loadOlderMessages"))},I(v(o)("conversation.loadOlder")),1))],2)):Y("",!0),(g(!0),S(Ce,null,rt(e.turns,(ge,Oe)=>(g(),S(Ce,{key:ge.id},[ge.role==="user"?(g(),S("div",sye,[b("div",{class:Be(["u-bub turn-anchor",{undoing:Z.value===ge.id}]),"data-turn-id":ge.id},[ge.attachments&&ge.attachments.length>0?(g(),S("div",lye,[(g(!0),S(Ce,null,rt(ge.attachments,(Fe,pt)=>(g(),ue(P7,{key:pt,kind:Fe.kind,name:Fe.name,url:Fe.url,"file-id":Fe.fileId,"media-type":Fe.mediaType,size:Fe.size,onActivate:kt=>ie(Fe)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):Y("",!0),ge.pluginCommand?(g(),S("div",rye,[b("div",aye,[fe[17]||(fe[17]=b("span",{class:"skill-act-arrow"},"▶",-1)),b("span",null,"/"+I(ge.pluginCommand.pluginId)+":"+I(ge.pluginCommand.commandName),1)])])):Y("",!0),R(ge)!==null?(g(),S("div",{key:2,ref_for:!0,ref:Fe=>A(ge.id,Fe),class:Be(["u-text-wrap",{"u-text-wrap-args":!!ge.pluginCommand,"is-clamped":x.value[ge.id]&&!k.value[ge.id]}])},[b("div",{class:Be(ge.pluginCommand?"skill-act-args":"u-text")},[W(AC,{text:R(ge)??"","open-file":Fe=>m("openFile",Fe)},null,8,["text","open-file"])],2),x.value[ge.id]?(g(),S("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!!k.value[ge.id],onClick:Fe=>P(ge.id)},[He(I(v(o)(k.value[ge.id]?"conversation.userMessage.collapse":"conversation.userMessage.expand"))+" ",1),W(Ee,{class:"u-text-toggle-car",name:"chevron-down",size:"sm"})],8,cye)):Y("",!0)],2)):Y("",!0)],10,iye),ge.createdAt||M(ge)?(g(),S("div",uye,[M(ge)?(g(),S("div",{key:0,class:Be(["u-edit-wrap",{undoing:Z.value===ge.id}])},[b("button",{type:"button",class:"u-edit","aria-label":v(o)("conversation.undoTooltip"),onClick:Fe=>te(ge)},[W(Ee,{name:"undo",size:"sm"})],8,dye)],2)):Y("",!0),ge.text.trim().length>0?(g(),S("button",{key:1,type:"button",class:"u-copy","aria-label":v(o)("filePreview.copy"),onClick:xt(Fe=>K(ge),["stop"])},[U.value!==ge.id?(g(),ue(Ee,{key:0,name:"copy",size:"sm"})):(g(),ue(Ee,{key:1,name:"check",size:"sm"}))],8,fye)):Y("",!0),ge.createdAt?(g(),ue(Dv,{key:2,time:ge.createdAt},null,8,["time"])):Y("",!0)])):Y("",!0)])):ge.role==="compaction"?(g(),S("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":ge.id,role:"separator"},[fe[18]||(fe[18]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1)),ge.text?(g(),S("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Fe=>m("openCompaction",{turnId:ge.id})},[b("span",null,I(O(ge)),1),b("span",mye,I(v(o)("conversation.viewSummary")),1)],8,hye)):(g(),S("span",gye,I(O(ge)),1)),fe[19]||(fe[19]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,pye)):ge.role==="cron"?(g(),ue(F5e,{key:2,text:ge.text,cron:ge.cron,"turn-id":ge.id,"created-at":ge.createdAt},null,8,["text","cron","turn-id","created-at"])):(g(),S("div",{key:3,class:"a-msg turn-anchor","data-turn-id":ge.id},[W(f9e,{items:p.value.get(ge.id)?.folded??[],live:ge.id===c.value,parked:ge.id===c.value&&be(ge)===null,"streaming-tail-index":be(ge),"seed-ms":v(Xne)(ge),"created-ms":Se(ge),"duration-ms":ge.durationMs,"tool-diff-panel":e.toolDiffPanel,mobile:"",onOpenMedia:fe[1]||(fe[1]=Fe=>m("openMedia",Fe)),onOpenFile:fe[2]||(fe[2]=Fe=>m("openFile",Fe)),onOpenToolDiff:fe[3]||(fe[3]=Fe=>m("openToolDiff",Fe)),onOpenAgent:fe[4]||(fe[4]=Fe=>m("openAgent",Fe)),onDetach:fe[5]||(fe[5]=Fe=>m("detachTask",Fe))},null,8,["items","live","parked","streaming-tail-index","seed-ms","created-ms","duration-ms","tool-diff-panel"]),(g(!0),S(Ce,null,rt(p.value.get(ge.id)?.visible??[],(Fe,pt)=>(g(),S(Ce,{key:v(cE)(Fe,pt)},[Fe.kind==="thinking"?(g(),ue(Vg,{key:0,text:Fe.thinking,mobile:"",streaming:de(ge,Fe),"started-at-ms":v(W2)(Fe.startedAt),"duration-ms":Fe.durationMs},null,8,["text","streaming","started-at-ms","duration-ms"])):Fe.kind==="text"&&Fe.text?(g(),S("div",yye,[W(Br,{text:Fe.text,streaming:de(ge,Fe),"open-file":kt=>m("openFile",kt)},null,8,["text","streaming","open-file"])])):Fe.kind==="activity-run"?(g(),ue(dE,{key:2,items:Fe.items,mobile:"",streaming:je(ge,Fe),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:fe[6]||(fe[6]=kt=>m("openMedia",kt)),onOpenFile:fe[7]||(fe[7]=kt=>m("openFile",kt)),onOpenToolDiff:fe[8]||(fe[8]=kt=>m("openToolDiff",kt)),onOpenAgent:fe[9]||(fe[9]=kt=>m("openAgent",kt)),onDetach:fe[10]||(fe[10]=kt=>m("detachTask",kt))},null,8,["items","streaming","tool-diff-panel"])):Fe.kind==="tool"?(g(),ue(Dg,{key:3,tool:Fe.tool,mobile:"","tool-diff-panel":e.toolDiffPanel,onOpenMedia:fe[11]||(fe[11]=kt=>m("openMedia",kt)),onOpenFile:fe[12]||(fe[12]=kt=>m("openFile",kt)),onOpenToolDiff:fe[13]||(fe[13]=kt=>m("openToolDiff",kt)),onOpenAgent:fe[14]||(fe[14]=kt=>m("openAgent",kt)),onDetach:fe[15]||(fe[15]=kt=>m("detachTask",kt))},null,8,["tool","tool-diff-panel"])):Fe.kind==="notification"?(g(),ue(N$,{key:4,items:Fe.items},null,8,["items"])):Y("",!0)],64))),128)),ge.id!==c.value&&(p.value.get(ge.id)?.changes.length??0)>0?(g(),ue(L9e,{key:0,changes:p.value.get(ge.id)?.changes??[],cwd:e.cwd,onOpenDiff:Fe=>m("openTurnDiff",{turnId:ge.id,changes:p.value.get(ge.id)?.changes??[]}),onOpenFile:fe[16]||(fe[16]=Fe=>m("openFile",Fe))},null,8,["changes","cwd","onOpenDiff"])):Y("",!0),ge.id!==c.value&&X(Oe)&&(xe(Oe).trim().length>0||ge.durationMs!==void 0)?(g(),S("div",wye,[W(Cn,{text:`${ge.durationMs} ms`},{default:ae(()=>[ge.durationMs!==void 0?(g(),S("span",kye,I(v(Yne)(ge.durationMs)),1)):Y("",!0)]),_:2},1032,["text"]),xe(Oe).trim().length>0?(g(),S("button",{key:0,class:"a-cpbtn","aria-label":v(o)("filePreview.copy"),onClick:Fe=>F(Oe)},[U.value!==ge.id?(g(),ue(Ee,{key:0,name:"copy",size:"sm"})):(g(),ue(Ee,{key:1,name:"check",size:"sm"}))],8,bye)):Y("",!0)])):Y("",!0)],8,vye))],64))),128)),e.lastTurnReason==="failed"&&!e.working?(g(),S("div",_ye,[b("span",xye,[W(Ee,{name:"alert-triangle",size:"sm"})]),b("div",Sye,[b("span",Cye,I(e.turnErrorKind==="max_steps"?v(o)("conversation.turnFailedMaxSteps"):v(o)("conversation.turnFailed")),1),e.turnErrorMessage?(g(),S("span",{key:0,class:"tf-sub",title:e.turnErrorMessage},I(e.turnErrorMessage),9,Mye)):Y("",!0)]),W(Nt,{variant:"secondary",size:"sm",onClick:et},{default:ae(()=>[He(I(v(o)("conversation.turnFailedResume")),1)]),_:1})])):Y("",!0),e.compaction?(g(),ue(_5e,{key:4,label:v(o)("conversation.compacting")},null,8,["label"])):Y("",!0),u.value?(g(),S("div",Aye,[W(V9e,{label:h.value},null,8,["label"])])):Y("",!0),e.queued.length>0?(g(),S("div",Tye,[b("div",Eye,[b("span",Iye,[W(Ee,{name:"mail",size:"sm"}),He(" "+I(v(o)("composer.queueLabel"))+" · ",1),b("b",null,I(v(o)("composer.queuePending",{n:e.queued.length})),1)])]),(g(!0),S(Ce,null,rt(e.queued,(ge,Oe)=>(g(),S("div",{key:ge.id,class:Be(["u-turn q-turn",{"q-dragging":z.value===Oe,"drop-before":L.value?.index===Oe&&L.value.position==="before","drop-after":L.value?.index===Oe&&L.value.position==="after"}]),onDragover:Fe=>C(Oe,Fe),onDrop:Fe=>j(Oe,Fe)},[Oe===0?(g(),ue(Cn,{key:0,text:v(o)("composer.queueSteer")},{default:ae(()=>[b("button",{type:"button",class:"q-send","aria-label":v(o)("composer.queueSteer"),onClick:xt(Fe=>m("steerQueued",Oe),["stop"])},[W(Ee,{name:"send",size:"lg"})],8,$ye)]),_:2},1032,["text"])):Y("",!0),b("div",Nye,[b("span",{class:"q-grip",title:v(o)("composer.queueDragTitle"),draggable:"true",onDragstart:Fe=>$(Oe,Fe),onDragend:H},[W(Ee,{name:"grip",size:"sm"})],40,zye),b("button",{type:"button",class:"q-body",title:v(o)("composer.editQueued"),onClick:Fe=>T(Oe)},[ge.text?(g(),S("span",Rye,[W(AC,{text:ge.text,interactive:!1},null,8,["text"])])):(g(),S("span",Pye,[W(Ee,{name:"file",size:"sm"}),He(" "+I(v(o)("composer.queuedAttachments",{n:ge.attachments?.length??0})),1)]))],8,Bye),E(ge)?(g(),S("div",Fye,[(g(!0),S(Ce,null,rt(ge.attachments,(Fe,pt)=>(g(),S(Ce,{key:pt},[Fe.kind==="file"?(g(),S("span",jye,[W(Ee,{name:"file",size:"sm"}),He(" "+I(Fe.name??Fe.fileId),1)])):(g(),ue(R7,{key:1,url:Fe.url,kind:Fe.kind,"file-id":Fe.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):Y("",!0),b("button",{type:"button",class:"q-rm","aria-label":v(o)("composer.remove"),onClick:xt(Fe=>m("unqueue",Oe),["stop"])},[W(Ee,{name:"close",size:"sm"})],8,Oye)])],42,Lye))),128))])):Y("",!0)]),ye.value!==null?(g(),S("div",Hye,I(v(o)("composer.attachmentOpenUnsupported",{name:ye.value})),1)):Y("",!0)],64))}}),d9=vt(Vye,[["__scopeId","data-v-bb073357"]]),Wye={class:"ch-id"},qye={key:0,class:"ch-ws"},Uye={key:1,class:"ch-sep"},Zye=["onKeydown"],Kye={class:"ch-ses"},Gye={key:0,class:"ch-pill ch-sync-pill"},Yye={key:0,class:"ch-ahead"},Xye={key:1,class:"ch-behind"},Jye={key:1,class:"ch-pill ch-diff-pill"},Qye={key:0,class:"ch-add"},ewe={key:1,class:"ch-del"},twe={class:"ch-pill ch-pr pr-merged ch-done-pill"},nwe=Je({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},sessionDone:{type:Boolean},pinned:{type:Boolean},panelVisible:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","togglePin","archiveSession","restoreSession","exportSession","togglePanel"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=B(()=>o.ahead??0),l=B(()=>o.behind??0),r=B(()=>o.gitDiffStats?.totalAdditions??0),a=B(()=>o.gitDiffStats?.totalDeletions??0),c=B(()=>r.value>0||a.value>0),u={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(q){return q.trim().toLowerCase().replaceAll("_","-")}function f(q){const te=d(q);return u[te]?`pr-${te}`:"pr-unknown"}function p(q){return n(u[d(q)]??"header.prStatusUnknown")}const h=V(!1),m=V(null),k=V(null),x=V({});function y(q){const te=q.target;k.value?.el?.contains(te)||m.value?.el?.contains(te)||A()}function w(){A()}async function _(q){if(q.stopPropagation(),h.value){A();return}h.value=!0,document.addEventListener("mousedown",y),window.addEventListener("resize",w),await yt();const te=m.value?.el,ee=k.value?.el;if(!te||!ee)return;const J=te.getBoundingClientRect(),se=4,Q=8,me=ee.offsetWidth,xe=ee.offsetHeight;let Ye=J.bottom+se;Ye+xe>window.innerHeight-Q&&(Ye=Math.max(Q,J.top-xe-se));let at=J.left;at+me>window.innerWidth-Q&&(at=Math.max(Q,J.right-me)),x.value={top:`${Math.round(Ye)}px`,left:`${Math.round(at)}px`}}function A(){h.value=!1,document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)}En(()=>{document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)});function P(){s("copyAll"),A()}function z(){s("copyFinalSummary"),A()}const L=V(!1);function E(){o.sessionId&&fs(o.sessionId).then(q=>{q&&(L.value=!0,setTimeout(()=>{L.value=!1},1200))})}const T=V(!1),$=V(""),C=V(null);async function j(){if(A(),!!o.sessionId){T.value=!0,$.value=o.sessionTitle??"",await yt();try{C.value?.focus(),C.value?.select()}catch{}}}function H(){const q=$.value.trim();q&&o.sessionId&&q!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,q),T.value=!1}function D(){T.value=!1}function M(){o.sessionId&&(A(),s("forkSession",o.sessionId))}function R(){o.sessionId&&(A(),s("exportSession",o.sessionId))}function O(){o.sessionId&&(A(),s("togglePin",o.sessionId))}function U(){o.sessionId&&(A(),s("archiveSession",o.sessionId))}function Z(){o.sessionId&&(A(),s("restoreSession",o.sessionId))}return(q,te)=>(g(),S("header",{class:Be(["chat-header",{"macos-desktop":v(Fg)}])},[b("div",Wye,[e.workspaceName?(g(),S("span",qye,I(e.workspaceName),1)):Y("",!0),e.workspaceName&&e.sessionTitle?(g(),S("span",Uye,"/")):Y("",!0),T.value?Jn((g(),S("input",{key:2,ref_key:"renameInputRef",ref:C,"onUpdate:modelValue":te[0]||(te[0]=ee=>$.value=ee),class:"ch-rename",type:"text",onKeydown:[go(xt(H,["stop"]),["enter"]),go(xt(D,["stop"]),["esc"])],onBlur:H,onClick:te[1]||(te[1]=xt(()=>{},["stop"]))},null,40,Zye)),[[js,$.value]]):e.sessionTitle?(g(),ue(Cn,{key:3,text:e.sessionTitle},{default:ae(()=>[b("span",Kye,I(e.sessionTitle),1)]),_:1},8,["text"])):Y("",!0)]),e.panelVisible?Y("",!0):(g(),ue(Dt,{key:0,class:"ch-panel",label:v(n)("panel.openPanel"),onClick:te[2]||(te[2]=ee=>s("togglePanel"))},{default:ae(()=>[W(Ee,{name:"panel-expand-right",size:"md"})]),_:1},8,["label"])),W(Dt,{ref_key:"kebabRef",ref:m,class:Be(["ch-act-more",{open:h.value}]),label:v(n)("header.options"),"aria-expanded":h.value,"aria-haspopup":"menu",onClick:te[3]||(te[3]=xt(ee=>_(ee),["stop"]))},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["class","label","aria-expanded"]),h.value?(g(),ue(zr,{key:1,ref_key:"menuRef",ref:k,class:"ch-menu",style:Gt(x.value),onClick:te[4]||(te[4]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{onClick:P},{default:ae(()=>[W(Ee,{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),He(" "+I(e.copied?v(n)("header.copied"):v(n)("header.copyAll")),1)]),_:1}),W(Bn,{onClick:z},{default:ae(()=>[W(Ee,{name:"file-text",size:"sm"}),He(" "+I(v(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(g(),S(Ce,{key:0},[W(Bn,{separator:""}),W(Bn,{onClick:E},{default:ae(()=>[W(Ee,{name:L.value?"check":"copy",size:"sm"},null,8,["name"]),He(" "+I(L.value?v(n)("header.copied"):v(n)("header.copySessionId")),1)]),_:1}),e.sessionDone?Y("",!0):(g(),ue(Bn,{key:0,onClick:O},{default:ae(()=>[W(Ee,{name:e.pinned?"pushpin-fill":"pushpin-line",size:"sm"},null,8,["name"]),He(" "+I(e.pinned?v(n)("header.unpinSession"):v(n)("header.pinSession")),1)]),_:1})),W(Bn,{onClick:j},{default:ae(()=>[W(Ee,{name:"pencil",size:"sm"}),He(" "+I(v(n)("header.renameSession")),1)]),_:1}),W(Bn,{onClick:M},{default:ae(()=>[W(Ee,{name:"git-fork",size:"sm"}),He(" "+I(v(n)("header.forkSession")),1)]),_:1}),W(Bn,{onClick:R},{default:ae(()=>[W(Ee,{name:"download",size:"sm"}),He(" "+I(v(n)("header.exportSession")),1)]),_:1}),e.sessionDone?(g(),ue(Bn,{key:1,onClick:Z},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"}),He(" "+I(v(n)("header.reopenSession")),1)]),_:1})):(g(),ue(Bn,{key:2,onClick:U},{default:ae(()=>[W(Ee,{name:"archive",size:"sm"}),He(" "+I(v(n)("header.markSessionDone")),1)]),_:1}))],64)):Y("",!0)]),_:1},8,["style"])):Y("",!0),te[7]||(te[7]=b("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(g(),S("button",{key:2,type:"button",class:"ch-git",onClick:te[5]||(te[5]=ee=>s("openChanges"))},[b("span",{class:Be(["ch-branch",{"ch-detached":!e.branch}])},I(e.branch||v(n)("header.detached")),3),i.value>0||l.value>0?(g(),S("span",Gye,[i.value>0?(g(),S("span",Yye,"↑"+I(i.value),1)):Y("",!0),l.value>0?(g(),S("span",Xye,"↓"+I(l.value),1)):Y("",!0)])):Y("",!0),c.value?(g(),S("span",Jye,[r.value>0?(g(),S("span",Qye,"+"+I(r.value),1)):Y("",!0),a.value>0?(g(),S("span",ewe,"-"+I(a.value),1)):Y("",!0)])):Y("",!0)])):Y("",!0),e.pr?(g(),S("button",{key:3,type:"button",class:Be(["ch-pill ch-pr",f(e.pr.state)]),onClick:te[6]||(te[6]=ee=>e.pr&&s("openPr",e.pr.url))},[W(Ee,{name:"git-pull-request",size:"sm"}),b("span",null,"PR #"+I(e.pr.number)+" · "+I(p(e.pr.state)),1)],2)):Y("",!0),e.sessionId&&e.sessionDone?(g(),S(Ce,{key:4},[b("span",twe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,I(v(n)("header.sessionDone")),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Z},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"}),He(" "+I(v(n)("header.reopenSession")),1)]),_:1})],64)):Y("",!0)],2))}}),owe=vt(nwe,[["__scopeId","data-v-25d0d989"]]),swe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],EC=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function iwe(e){if(e<=255)return swe[e];let t=0,n=EC.length-1;for(;t<=n;){const o=t+n>>1,s=EC[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function lwe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let c=0;c=55296&&u<=56319&&c+1=56320&&h<=57343&&(d=(u-55296<<10)+(h-56320)+65536,f=2)}const p=iwe(d);(p==="R"||p==="AL"||p==="AN")&&(o=!0);for(let h=0;h=0&&n[u]==="ET";u--)n[u]="EN";for(u=c+1;u0?n[c-1]:r,f=u0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function fwe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` `).replace(/[\r\f]/g,` -`):e}let Pm=null,Zye;function Kye(){return Pm===null&&(Pm=new Intl.Segmenter(Zye,{granularity:"word"})),Pm}const Gye=/\p{Script=Arabic}/u,R1=/\p{M}/u,u9=/\p{Nd}/u;function TC(e){return Gye.test(e)}function EC(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Br(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if(EC(s))return!0;t++;continue}}if(EC(n))return!0}}return!1}function Yye(e){const t=Ef(e);return t!==null&&(d9.has(t)||W0.has(t))}const Xye=new Set([" "," ","⁠","\uFEFF"]),Jye=new Set(["-","‐","–","—"]);function Qye(e){const t=Ef(e);return t!==null&&Xye.has(t)}function ewe(e){const t=Ef(e);return t!==null&&Jye.has(t)}function FN(e,t){return Qye(e)?!1:t?!(Yye(e)||ewe(e)):!0}const d9=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Qp=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),f9=new Set(["'","’"]),W0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),twe=new Set([":",".","،","؛"]),nwe=new Set(["၏"]),owe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function swe(e){if(p9(e))return!0;let t=!1;for(const n of e){if(W0.has(n)||t6(n)){t=!0;continue}if(!(t&&R1.test(n)))return!1}return t}function iwe(e){for(const t of e)if(!d9.has(t)&&!W0.has(t))return!1;return e.length>0}function lwe(e){if(p9(e))return!0;for(const t of e)if(!Qp.has(t)&&!f9.has(t)&&!R1.test(t)&&!t6(t))return!1;return e.length>0}function p9(e){let t=!1;for(const n of e)if(!(n==="\\"||R1.test(n))){if(Qp.has(n)||W0.has(n)||f9.has(n)){t=!0;continue}return!1}return t}function e6(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function Ef(e){if(e.length===0)return null;const t=e6(e,e.length);return e.slice(t)}function rwe(e){for(const t of e)if(!R1.test(t))return t;return null}function awe(e){for(let t=e.length;t>0;){const n=e6(e,t),o=e.slice(n,t);if(!R1.test(o))return o;t=n}return null}const cwe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function uwe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function t6(e){const t=e.codePointAt(0);return t!==void 0&&uwe(t,cwe)}function dwe(e){const t=awe(e);return t!==null&&t6(t)}function fwe(e){const t=rwe(e);return t!==null&&u9.test(t)}function pwe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(R1.test(o)){n--;continue}if(Qp.has(o)||f9.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function hwe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function IC(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function $C(e,t){return e&&t!==null&&twe.has(t)}function mwe(e){const t=Ef(e);return t!==null&&nwe.has(t)}function gwe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function R7(e){let t=e.length;for(;t>0;){const n=e6(e,t),o=e.slice(n,t);if(owe.has(o))return!0;if(!W0.has(o))return!1;t=n}return!1}function vwe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const ywe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function ar(e){return e.length===1?e[0]:e.join("")}function wwe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),ar(n)}function kwe(e,t,n,o){if(!ywe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=vwe(u,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){l.push(u),c+=u.length;continue}i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length}return i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),s}function P7(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const bwe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function _we(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:bwe.test(n)&&t+1=e.len||P7(e.kinds[r]))continue;const a=[],c=e.starts[r];let u=r;for(;u0&&(t.push(ar(a)),n.push(!0),o.push("text"),s.push(c),i=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const Mwe=new Set([":","-","/","×",",",".","+","–","—"]),Awe=/[\p{P}\p{S}\p{Co}]/u,Twe=/\p{Emoji_Presentation}/u,Ewe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function Iwe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function jN(e){const t=e.charCodeAt(0);return t<128?Iwe(t):!Ewe.has(e)&&!Twe.test(e)&&Awe.test(e)}function LC(e){let t=!1;for(const n of e)if(!R1.test(n)){if(!jN(n))return!1;t=!0}return t}function $we(e){for(let t=e.length;t>0;){const n=e6(e,t),o=e.slice(n,t);if(R1.test(o)){t=n;continue}return jN(o)||t6(o)}return!1}function Lwe(e,t,n,o){const s=!t&&LC(e),i=!o&&LC(n),l=dwe(e),r=(t||l)&&$we(e);return!s&&!i&&!r||Br(e)||Br(n)?!1:(t||s||l)&&(o||i)}function ON(e){for(const t of e)if(u9.test(t))return!0;return!1}function Z5(e){if(e.length===0)return!1;for(const t of e)if(!(u9.test(t)||Mwe.has(t)))return!1;return!0}function Nwe(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(ar(c)),n.push(d),o.push("text"),s.push(e.starts[i]),i=u;continue}}t.push(l),n.push(a),o.push(r),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function Bwe(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let c=0;c0&&a[D]==="text"&&I&&f[D]&&h[D]||$&&s>0&&a[D]==="text"&&iwe(B.text)&&f[D]||$&&s>0&&a[D]==="text"&&m[D]?A():$&&s>0&&a[D]==="text"&&B.isWordLike&&N&&k[D]?(A(),r[D]=!0):T!==null&&s>0&&a[D]==="text"&&u[D]===T?d[D]=(d[D]??1)+1:$&&!B.isWordLike&&s>0&&a[D]==="text"&&!f[D]&&(swe(B.text)||B.text==="-"&&r[D])?A():(i[s]=B.text,l[s]=[B.text],r[s]=B.isWordLike,a[s]=B.kind,c[s]=B.start,u[s]=T,d[s]=T===null?0:1,f[s]=I,p[s]=N,h[s]=O,m[s]=H,k[s]=$C(N,C),s++)}for(let P=0;Pnull);let y=-1;for(let P=s-1;P>=0;P--){const B=i[P];if(B.length!==0){if(a[P]==="text"&&!r[P]&&y>=0&&a[y]==="text"&&(lwe(B)||B==="-"&&fwe(i[y]))){const $=x[y]??[];$.push(B),x[y]=$,c[y]=c[P],i[P]="";continue}y=P}}for(let P=0;P=0&&!FN(t.texts[f-1],n)&&d(f),r<0&&(r=f),a=a||Br(p);continue}d(f),o.push(p),s.push(t.isWordLike[f]),i.push(h),l.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:l}}function Hwe(e,t,n="normal",o="normal"){const s=Wye(n),i=s.mode==="pre-wrap"?Uye(e):qye(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=Fwe(i,t,s),r=o==="keep-all"?Owe(i,l,t.breakKeepAllAfterPunctuation):l;return{normalized:i,chunks:jwe(r,s),...r}}let Lc=null;const NC=new Map;let Nc=null;const Dwe=96,Vwe=/\p{Emoji_Presentation}/u,Wwe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Fm=null;const zC=new Map;function h9(){if(Lc!==null)return Lc;if(typeof OffscreenCanvas<"u")return Lc=new OffscreenCanvas(1,1).getContext("2d"),Lc;if(typeof document<"u")return Lc=document.createElement("canvas").getContext("2d"),Lc;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function qwe(e){let t=NC.get(e);return t||(t=new Map,NC.set(e,t)),t}function i1(e,t){let n=t.get(e);return n===void 0&&(n={width:h9().measureText(e).width,containsCJK:Br(e)},t.set(e,n)),n}function n6(){if(Nc!==null)return Nc;if(typeof navigator>"u")return Nc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Nc;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Nc={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Nc}function Uwe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function HN(){return Fm===null&&(Fm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Fm}function Zwe(e){return Vwe.test(e)||e.includes("️")}function Kwe(e){return Wwe.test(e)}function Gwe(e,t){let n=zC.get(e);if(n!==void 0)return n;const o=h9();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const l=i.getBoundingClientRect().width;document.body.removeChild(i),s-l>.5&&(n=s-l)}return zC.set(e,n),n}function Ywe(e){let t=0;const n=HN();for(const o of n.segment(e))Zwe(o.segment)&&t++;return t}function Xwe(e,t){return t.emojiCount===void 0&&(t.emojiCount=Ywe(e)),t.emojiCount}function A0(e,t,n){return n===0?t.width:t.width-Xwe(e,t)*n}function Jwe(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=HN(),l=[];for(const u of i.segment(e))l.push(u.segment);if(l.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const u=[];for(const d of l){const f=i1(d,n);u.push(A0(d,f,o))}return t.breakableFitAdvances=u,t.breakableFitAdvances}if(s==="pair-context"||l.length>Dwe){const u=[];let d=null,f=0;for(const p of l){const h=i1(p,n),m=A0(p,h,o);if(d===null)u.push(m);else{const k=d+p,x=i1(k,n);u.push(A0(k,x,o)-f)}d=p,f=m}return t.breakableFitAdvances=u,t.breakableFitAdvances}const r=[];let a="",c=0;for(const u of l){a+=u;const d=i1(a,n),f=A0(a,d,o);r.push(f-c),c=f}return t.breakableFitAdvances=r,t.breakableFitAdvances}function Qwe(e,t){const n=h9();n.font=e;const o=qwe(e),s=Uwe(e),i=t?Gwe(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function eke(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function DN(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function VN(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function m9(e,t){return t===0?0:e+t}function oke(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function ske(e,t,n,o,s){const i=t==="tab"?s+oke(e,n):e.lineEndFitAdvances[n];return m9(o,i)}function BC(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return m9(o,s)}function RC(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return m9(o,i)}function ike(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function lke(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function K5(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const l=e.kinds[i];if(!(l==="space"||l==="zero-width-break"||l==="hard-break")){if(l==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function ake(e,t,n,o,s,i){return t+rke(e,n,o,s,i)}function cke(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l}=e;if(o.length===0)return 0;const a=n6().lineFitEpsilon,c=t+a;let u=0,d=0,f=!1,p=0,h=0,m=0,k=0,x=-1,y=0;function w(){x=-1,y=0}function _(I=m,N=k,C=d){u++,n?.(C,p,h,I,N),d=0,f=!1,w()}function M(I,N){f=!0,p=I,h=0,m=I+1,k=0,d=N}function P(I,N,C){f=!0,p=I,h=N,m=I,k=N+1,d=C}function B(I,N){if(!f){M(I,N);return}d+=N,m=I+1,k=0}function $(I,N){const C=i[I],O=l[I]??null;let H=O===null?-1:K5(O,0,N+1),D=-1,A=0,R=N;for(;Rc){if(O!==null&&D>N){_(I,D,A),R=D,H=K5(O,H,R+1),D=-1,A=0;continue}_(),P(I,R,j)}else d+=j,m=I,k=R+1;const q=R+1;O!==null&&O[H]===q&&(D=q,A=d,H++),R++}f&&m===I&&k===C.length&&(m=I+1,k=0)}let T=0;for(;T=o.length));){const I=o[T],N=s[T],C=DN(N);if(!f){I>c&&i[T]!==null?$(T,0):M(T,I),C&&(x=T+1,y=d-I),T++;continue}if(d+I>c){if(C){B(T,I),_(T+1,0,d-I),T++;continue}if(x>=0){if(m>x||m===x&&k>0){_();continue}_(x,0,y);continue}if(I>c&&i[T]!==null){_(),$(T,0),T++;continue}_();continue}B(T,I),C&&(x=T+1,y=d-I),T++}return f&&_(),u}function uke(e,t,n){if(e.simpleLineWalkFastPath)return cke(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l,discretionaryHyphenWidth:r,chunks:a}=e;if(o.length===0||a.length===0)return 0;const c=n6(),u=c.lineFitEpsilon,d=t+u;let f=0,p=0,h=!1,m=0,k=0,x=0,y=0,w=-1,_=0,M=0,P=null;function B(){w=-1,_=0,M=0,P=null}function $(){return P==="soft-hyphen"&&w===x&&y===0?M:p}function T(A=x,R=y,j){f++,n!==void 0&&n(ake(e,j??$(),m,k,A,R),m,k,A,R),p=0,h=!1,B()}function I(A,R){h=!0,m=A,k=0,x=A+1,y=0,p=R}function N(A,R,j){h=!0,m=A,k=R,x=A,y=R+1,p=j}function C(A,R){if(!h){I(A,R);return}p+=R,x=A+1,y=0}function O(A,R,j,q,K,U){if(!R)return;const te=BC(e,A,j,K),J=RC(e,A,j,K,q);w=j+1,_=p-U+te,M=p-U+J,P=A}function H(A,R){const j=i[A],q=l[A]??null;let K=q===null?-1:K5(q,0,R+1),U=-1,te=0,J=R;for(;Jd){if(q!==null&&U>R){T(A,U,te),J=U,K=K5(q,K,J+1),U=-1,te=0;continue}T(),N(A,J,ee)}else p=he,x=A,y=J+1}const ie=J+1;q!==null&&q[K]===ie&&(U=ie,te=p,K++),J++}h&&x===A&&y===j.length&&(x=A+1,y=0)}function D(A){f++,n?.(0,A.startSegmentIndex,0,A.consumedEndSegmentIndex,0),B()}for(let A=0;A=R.endSegmentIndex));){const q=s[j],K=DN(q),U=nke(e,h,j),te=q==="tab"?tke(p+U,e.tabStopAdvance):o[j],J=U+te,ee=ske(e,q,j,U,te);if(q==="soft-hyphen"){h&&(x=j+1,y=0,w=j+1,_=p+r,M=p+r,P=q),j++;continue}if(!h){ee>d&&i[j]!==null?H(j,0):I(j,te),O(q,K,j,te,U,J),j++;continue}if(p+ee>d){const Q=p+BC(e,q,j,U),he=p+RC(e,q,j,U,te);if(P==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&_<=d){T(w,0,M);continue}if(K&&Q<=d){C(j,J),T(j+1,0,he),j++;continue}if(w>=0&&_<=d){if(x>w||x===w&&y>0){T();continue}const xe=w;T(xe,0,M),j=xe;continue}if(ee>d&&i[j]!==null){T(),H(j,0),j++;continue}T();continue}C(j,J),O(q,K,j,te,U,J),j++}if(h){const q=w===R.consumedEndSegmentIndex?M:p;T(R.consumedEndSegmentIndex,0,q)}}return f}let jm=null;function g9(){return jm===null&&(jm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),jm}function dke(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function fke(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=R7(d),r=Qp.has(d)}function u(d,f){o.push(d),i=i||f;const p=R7(d);d.length===1&&W0.has(d)?l=l||p:l=p,r=!1}for(const d of g9().segment(e)){const f=d.segment,p=Br(f);if(o.length===0){c(f,d.index,p);continue}if(r||d9.has(f)||W0.has(f)||t.carryCJKAfterClosingQuote&&p&&l){u(f,p);continue}if(!i&&!p){u(f,p);continue}a(),c(f,d.index,p)}return a(),n}function pke(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(a,c){const u=t[a].start,d=c=0&&!FN(t[a-1].text,n)&&r(a),s<0&&(s=a),i=i||Br(c.text)}return r(t.length),o}function PC(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=g9();for(const s of o.segment(e))n++;return n}function hke(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function mke(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of g9().segment(e))n++,hke(o.segment)&&t.push(n);return t.length===0?null:t}function gke(e,t,n){return t>1?e+(t-1)*n:e}function vke(e,t,n,o,s){const i=n6(),{cache:l,emojiCorrection:r}=Qwe(t,Kwe(e.normalized)),a=A0("-",i1("-",l),r)+(s===0?0:s*2),u=A0(" ",i1(" ",l),r)*8,d=s!==0;if(e.len===0)return dke();const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=n?[]:null,y=[],w=[],_=[],M=n?[]:null,P=Array.from({length:e.len});function B(N,C,O,H,D,A,R,j,q){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(O),h.push(H),m.push(D),x?.push(A),y.push(R),w.push(j),d&&_.push(q),M!==null&&M.push(N)}function $(N,C,O,H,D){const A=i1(N,l),R=d?PC(N,C):0,j=gke(A0(N,A,r),R,s),q=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:j,K=q===0?0:q+(R>0?s:0),U=C==="space"||C==="zero-width-break"?0:j;if(D&&H&&N.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":Z5(N)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const J=Jwe(N,A,l,r,te),ee=J===null||o==="keep-all"?null:mke(N);B(N,j,K,U,C,O,J,ee,R);return}B(N,j,K,U,C,O,null,null,R)}for(let N=0;N{n>t&&(t=n)}),t}function _ke(e){const t=e.toLowerCase(),n=[];let o=0;for(const s of e){const i=s.toLowerCase().length;for(let l=0;l=0&&ao[0]-s[0]),n=[];for(const o of t){const s=n.at(-1);s&&o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):n.push([...o])}return n}function jC(e,t){if(!t||t.length===0||e.length===0)return[{text:e,hit:!1}];const n=[];let o=0;for(const[s,i]of xke(t)){const l=Math.max(0,Math.min(s,e.length)),r=Math.max(l,Math.min(i,e.length));r<=l||(l>o&&n.push({text:e.slice(o,l),hit:!1}),n.push({text:e.slice(l,r),hit:!0}),o=r)}return o0?n:[{text:e,hit:!1}]}function OC(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function Ske(e,t){const n=e.toLowerCase();let o=-1,s=-1,i=0;for(let l=0;l0,a.value=w.scrollTop+w.clientHeight{const w={},_="var(--menu-scroll-fade)";let M;return r.value&&a.value?M=`linear-gradient(to bottom, transparent 0, black ${_}, black calc(100% - ${_}), transparent 100%)`:r.value?M=`linear-gradient(to bottom, transparent, black ${_})`:a.value&&(M=`linear-gradient(to top, transparent, black ${_})`),M&&(w.maskImage=M,w.WebkitMaskImage=M),u.value&&(w.maxHeight=u.value),Object.keys(w).length>0?w:void 0}),p=z(()=>{const w=c.value;return w?{top:`${w.top}px`,height:`${w.height}px`}:void 0});function h(){const w=t.value,_=n.value,M=w?.offsetParent;if(!w||!_||!M)return;const P=getComputedStyle(w),B=zd(w,"--space-2",8),$=(parseFloat(P.paddingTop)||0)+(parseFloat(P.paddingBottom)||0),T=zd(_,o,Number.POSITIVE_INFINITY),I=window.visualViewport?.offsetTop??0,N=M.getBoundingClientRect().top-I-B-$;u.value=`${Math.max(Math.floor(Math.min(T,N)),0)}px`,yt(d)}function m(){const w=n.value;if(!w)return;const _=w.querySelectorAll('[role="option"]')[s?.value??-1];if(!_)return;const M=w.getBoundingClientRect(),P=_.getBoundingClientRect(),B=P.top-M.top+w.scrollTop,$=B+P.height;Bw.scrollTop+w.clientHeight&&(w.scrollTop=$-w.clientHeight)}let k=null;function x(w){const _=n.value,M=c.value;if(!_||!M)return;w.preventDefault(),k?.();const P=w.pointerId;(w.target instanceof Element?w.target:null)?.setPointerCapture?.(P);const $=zd(_,"--menu-scrollbar-track-inset",0),T=_.clientHeight-$*2-M.height,I=_.scrollHeight-_.clientHeight,N=w.clientY,C=_.scrollTop,O=A=>{A.pointerId!==P||T<=0||(_.scrollTop=C+(A.clientY-N)/T*I)},H=A=>{A.pointerId===P&&k?.()};k=()=>{window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",H),window.removeEventListener("pointercancel",H),k=null},window.addEventListener("pointermove",O),window.addEventListener("pointerup",H),window.addEventListener("pointercancel",H)}let y=null;return In(()=>{if(typeof ResizeObserver=="function"&&n.value&&(y=new ResizeObserver(w=>{for(const _ of w)_.target===n.value?d():h()}),y.observe(n.value),l)){const w=t.value?.offsetParent;w&&y.observe(w)}l&&(window.addEventListener("resize",h),window.visualViewport?.addEventListener("resize",h),window.visualViewport?.addEventListener("scroll",h),h()),d()}),En(()=>{y?.disconnect(),y=null,k?.(),window.removeEventListener("resize",h),window.visualViewport?.removeEventListener("resize",h),window.visualViewport?.removeEventListener("scroll",h)}),Ze(()=>[s?.value,i?.value],()=>{yt(()=>{d(),m()})}),{atTop:r,atBottom:a,thumb:c,scrollStyle:f,thumbStyle:p,onScroll:d,onThumbPointerDown:x}}const Mke={key:0,class:"slash-empty",role:"status"},Ake=["id","aria-selected","onMouseenter","onMousedown"],Tke={class:"slash-name"},Eke={key:0,class:"slash-match"},Ike={class:"slash-desc"},$ke={key:0,class:"slash-desc-match"},Lke=Je({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{default:()=>[]},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(null);ca(i);const l=V(null),r=z(()=>n.activeIndex),a=z(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=WN({menuEl:i,scrollEl:l,maxHeightVar:"--p-slash-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"}),h=z(()=>n.items.map((m,k)=>{const x=m.isSkill?m.desc:s(m.desc),y=n.ranges[k]??Cke(n.query,m.name,x);return{item:m,namePieces:jC(m.name,y.name),desc:x,descPieces:jC(x,y.desc)}}));return(m,k)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Pe(["slash-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.items.length===0?(g(),S("div",Mke,E(v(s)("composer.noCommands")),1)):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"slash-scroll",role:"listbox",style:Gt(v(u)),onScroll:k[0]||(k[0]=(...x)=>v(f)&&v(f)(...x))},[(g(!0),S(Ce,null,at(h.value,(x,y)=>(g(),S("div",{id:`composer-slash-option-${y}`,key:`${x.item.name}-${y}`,class:Pe(["slash-item",{active:y===n.activeIndex}]),role:"option","aria-selected":y===n.activeIndex,onMouseenter:w=>o("hover",y),onMousedown:_t(w=>o("select",x.item),["prevent"])},[b("span",Tke,[(g(!0),S(Ce,null,at(x.namePieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",Eke,E(w.text),1)):(g(),S(Ce,{key:1},[Oe(E(w.text),1)],64))],64))),128))]),b("span",Ike,[(g(!0),S(Ce,null,at(x.descPieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",$ke,E(w.text),1)):(g(),S(Ce,{key:1},[Oe(E(w.text),1)],64))],64))),128))])],42,Ake))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:1,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:k[1]||(k[1]=(...x)=>v(p)&&v(p)(...x))},null,36)):Y("",!0)],2))}}),HC=vt(Lke,[["__scopeId","data-v-9f177a8d"]]),Nke={key:0,class:"mention-state dim",role:"status"},zke={key:1,class:"mention-state dim",role:"status"},Bke=["id","aria-selected","onMouseenter","onMousedown"],Rke=["innerHTML"],Pke={class:"mention-name"},Fke={key:0,class:"mention-hit"},jke={class:"mention-meta"},Oke=["innerHTML"],Hke={class:"mention-name"},Dke={key:0,class:"mention-hit"},Vke={key:0,class:"mention-meta"},Wke={key:0,class:"mention-hit"},qke=Je({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean,default:!1},stale:{type:Boolean,default:!1},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(null);ca(i);const l=V(null),r=z(()=>n.activeIndex),a=z(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=WN({menuEl:i,scrollEl:l,maxHeightVar:"--p-mention-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"});function h(w){const _=w.endsWith("/")?w.slice(0,-1):w,M=_.lastIndexOf("/");return M===-1?"":_.slice(0,M)}function m(w){const _=w.file.path.endsWith("/")?w.file.path.slice(0,-1):w.file.path;return Om(w.file.name,w.file.matchPositions,Math.max(0,_.length-w.file.name.length))}function k(w){return Om(h(w.file.path),w.file.matchPositions,0)}function x(w){return Om(w.skill.name,w.matchPositions,0)}function y(w){return w.kind==="skill"?`skill:${w.skill.name}`:w.file.path}return(w,_)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Pe(["mention-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.loading&&n.items.length===0?(g(),S("div",Nke,E(v(s)("mention.searching")),1)):n.items.length===0?(g(),S("div",zke,E(v(s)("mention.noMatch")),1)):Y("",!0),n.loading&&n.items.length>0?(g(),ue(Zo,{key:2,class:"mention-spin",size:"sm",label:v(s)("mention.searching")},null,8,["label"])):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"mention-scroll",role:"listbox",style:Gt(v(u)),onScroll:_[0]||(_[0]=(...M)=>v(f)&&v(f)(...M))},[(g(!0),S(Ce,null,at(n.items,(M,P)=>(g(),S("div",{id:`composer-mention-option-${P}`,key:y(M),class:Pe(["mention-item",{active:P===n.activeIndex,stale:n.stale&&M.kind!=="skill"}]),role:"option","aria-selected":P===n.activeIndex,onMouseenter:B=>o("hover",P),onMousedown:_t(B=>o("select",M),["prevent"])},[M.kind==="skill"?(g(),S(Ce,{key:0},[b("span",{class:"mention-icon",innerHTML:v($l)("sparkles","sm"),"aria-hidden":"true"},null,8,Rke),b("span",Pke,[(g(!0),S(Ce,null,at(x(M),(B,$)=>(g(),S(Ce,{key:$},[B.hit?(g(),S("span",Fke,E(B.text),1)):(g(),S(Ce,{key:1},[Oe(E(B.text),1)],64))],64))),128))]),b("span",jke,E(M.skill.description),1)],64)):(g(),S(Ce,{key:1},[b("span",{class:"mention-icon",innerHTML:v(ju)(M.file.path,M.file.name),"aria-hidden":"true"},null,8,Oke),b("span",Hke,[(g(!0),S(Ce,null,at(m(M),(B,$)=>(g(),S(Ce,{key:$},[B.hit?(g(),S("span",Dke,E(B.text),1)):(g(),S(Ce,{key:1},[Oe(E(B.text),1)],64))],64))),128))]),h(M.file.path)?(g(),S("span",Vke,[(g(!0),S(Ce,null,at(k(M),(B,$)=>(g(),S(Ce,{key:$},[B.hit?(g(),S("span",Wke,E(B.text),1)):(g(),S(Ce,{key:1},[Oe(E(B.text),1)],64))],64))),128))])):Y("",!0)],64))],42,Bke))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:3,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:_[1]||(_[1]=(...M)=>v(p)&&v(p)(...M))},null,36)):Y("",!0)],2))}}),DC=vt(qke,[["__scopeId","data-v-0ac2fbc1"]]),qN=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/workflow",desc:"commands.dynamicWorkflow.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function Uke(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const G5="skill:";function Zke(e){return e.startsWith(G5)?e.slice(G5.length):e}function UN(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${G5}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...qN,...t]}function Kke(e,t=qN){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let l=0;return i===n?l=3:i.startsWith(n)?l=2:i.includes(n)&&(l=1),{item:o,index:s,score:l}}).filter(({score:o})=>o>0).toSorted((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}function o6(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function ZN(e){return e?.supportEfforts??[]}function Gke(e){return e[Math.floor(e.length/2)]}function lf(e){if(o6(e)==="unsupported")return"off";const t=ZN(e);return t.length>0?e?.defaultEffort??Gke(t):"on"}function s6(e){const t=ZN(e),n=o6(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function rf(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Yke(e,t){return s6(e).includes(t)}function KN(e,t){return t==="off"?"off":t==="on"?lf(e):t}function v9(e,t){return t??lf(e)}function Xke(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function Jke(e,t,n){return!n||e===void 0?t:lf(e)}const Y5=100;function Qke(e){const t=Fu(dn.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>Y5?n.slice(-Y5):n,s={[e]:o};return E1(dn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function ebe(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=V(Qke(s())),l=z(()=>i.value[s()??""]??[]);let r=-1,a="";function c(x){const y=s();if(r=-1,!y)return;const w=x.trim();if(!w)return;const _=i.value[y]??[];if(_.at(-1)===w)return;const M=[..._,w],P=M.length>Y5?M.slice(-Y5):M;i.value={...i.value,[y]:P},E1(dn.inputHistory,i.value)}function u(){const x=n.value;return x?(x.selectionStart??0)===0:!1}function d(x){t.value=x,yt(()=>{const y=n.value;if(!y)return;o();const w=x.length;y.setSelectionRange(w,w)})}function f(){const x=l.value;if(x.length!==0){if(r===-1)a=t.value,r=x.length-1;else if(r>0)r-=1;else return;d(x[r])}}function p(){if(r===-1)return;const x=l.value;r0}return Ze(s,()=>{r=-1}),{push:c,caretAtTextStart:u,recallOlder:f,recallNewer:p,resetBrowsing:h,isBrowsing:m,hasHistory:k}}function tbe(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:l,clearDraft:r}=e,a=V(!1),c=V([]),u=V(0);function d(){const p=t.value;p.startsWith("/")&&!p.includes(" ")?(c.value=Kke(p,UN(s())),u.value=0,a.value=c.value.length>0):a.value=!1}function f(p){if(a.value=!1,p.acceptsInput){t.value=`${p.name} `,yt(()=>{const h=n.value;if(!h)return;const m=t.value.length;h.setSelectionRange(m,m),h.focus(),o()});return}t.value="",r?.(),l(p.name),i(p.name)}return{open:a,items:c,active:u,update:d,select:f}}function nbe(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s,searchSkills:i,insertSkill:l}=e,r=V(!1),a=V([]),c=V(0),u=V(!1),d=V(!1);let f=null,p=0;function h(){const y=t.value,w=n.value?.selectionStart??y.length;let _=w-1;for(;_>=0&&!/\s/.test(y[_]);)_--;_++;const M=y.slice(_,w);return M.startsWith("@")?{token:M.slice(1),start:_,end:w}:null}function m(){const y=h(),w=s(),_=i?.();if(!y||!w&&!_){r.value=!1,d.value=!1;return}const M=y.token;f!==null&&clearTimeout(f),f=setTimeout(async()=>{const P=++p;u.value=!0,r.value=!0,c.value=0,a.value.length>0&&(d.value=!0);try{const[B,$]=await Promise.all([w?w(M).catch(()=>[]):Promise.resolve([]),_?_(M).catch(()=>[]):Promise.resolve([])]);if(P!==p)return;a.value=[...B.map(T=>({kind:T.path.endsWith("/")?"folder":"file",file:{...T,matchPositions:FC(M,T.path)}})),...$.map(T=>({kind:"skill",skill:T,matchPositions:FC(M,T.name)}))]}catch{P===p&&(a.value=[])}finally{P===p&&(u.value=!1,d.value=!1)}},200)}function k(){f!==null&&clearTimeout(f),f=null,p++,r.value=!1,u.value=!1,d.value=!1}function x(y){const w=h();if(!w)return;if(r.value=!1,y.kind==="skill"){l?.(y.skill.name);return}const _=t.value,M=y.file.name||y.file.path.split(/[\\/]/).findLast(Boolean)||y.file.path,P=jv({kind:y.kind,name:M,path:y.file.path});t.value=`${_.slice(0,w.start)}${P} ${_.slice(w.end)}`,yt(()=>{const B=n.value;if(!B)return;const $=w.start+P.length+1;B.setSelectionRange($,$),B.focus(),o()})}return{open:r,items:a,active:c,loading:u,stale:d,update:m,select:x,close:k,getMentionToken:h}}function obe(e){const{sessionId:t}=e;function n(c){return ls(kk(c))??""}function o(c,u){const d=kk(c);u?Es(d,u):w1(d)}const s=V(n(t())),i=V(null);function l(){const c=i.value;c&&(c.style.height="auto",c.style.height=`${c.scrollHeight}px`)}Ze(s,c=>{yt(l),o(t(),c)}),Ze(t,(c,u)=>{c!==u&&(o(u,s.value),s.value=n(c),yt(l))});function r(c){s.value=c,yt(()=>{const u=i.value;if(!u)return;u.focus();const d=c.length;u.setSelectionRange(d,d),l()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:l,loadForEdit:r,clearDraft:a}}function sbe(e){const{uploadImage:t,sessionId:n}=e,o=V({}),s=z(()=>o.value[n()??""]??[]),i=V(null),l=V(null),r=V(!1);let a=0;function c(){return`att_${++a}`}function u(R,j){o.value={...o.value,[R]:j}}function d(R){if(R.previewUrl!==void 0)try{URL.revokeObjectURL(R.previewUrl)}catch{}}function f(R){return R.startsWith("image/")?"image":R.startsWith("video/")?"video":"file"}async function p(R){const j=t();if(!j)return;const q=n()??"";if(R.length!==0)for(const K of R){const U=f(K.type),te=c(),J=U==="file"?void 0:URL.createObjectURL(K),ee={localId:te,name:K.name,kind:U,previewUrl:J,mediaType:K.type||"application/octet-stream",size:K.size,uploading:!0};u(q,[...o.value[q]??[],ee]),j(K,K.name).then(ie=>{const Q=o.value[q]??[];u(q,Q.map(he=>he.localId===te?{...he,uploading:!1,fileId:ie?.fileId,mediaType:ie?.mediaType??he.mediaType,error:ie===null}:he))}).catch(()=>{const ie=o.value[q]??[];u(q,ie.map(Q=>Q.localId===te?{...Q,uploading:!1,error:!0}:Q))})}}function h(R){const j=n()??"",q=o.value[j]??[],K=q.find(U=>U.localId===R);i.value?.localId===R&&(i.value=null),K&&d(K),u(j,q.filter(U=>U.localId!==R))}function m(R){i.value=R}function k(){i.value=null}function x(){l.value?.click()}function y(R){const j=R.target,q=Array.from(j.files??[]);p(q),j.value=""}function w(R){if(!t())return;const j=R.clipboardData;if(!j)return;const q=[],K=new Set,U=(te,J)=>{const ee=`${te.size}:${te.type}:${J}`;if(K.has(ee))return;K.add(ee);const ie=te.type.split("/")[1]??"png",Q=J.includes(".")?J:`paste-${Date.now()}.${ie}`;q.push(te instanceof File?te:new File([te],Q,{type:te.type}))};for(const te of Array.from(j.items))if(te.kind==="file"){const J=te.getAsFile();J&&U(J,J.name||`paste-${Date.now()}.${te.type.split("/")[1]??"png"}`)}for(const te of Array.from(j.files))U(te,te.name);q.length!==0&&(R.preventDefault(),p(q))}let _=0;function M(R){!t()||!Array.from(R.dataTransfer?.items??[]).some(q=>q.kind==="file")||(R.preventDefault(),R.stopPropagation(),r.value=!0)}function P(){r.value=!1}function B(R){if(_=0,r.value=!1,!t())return;R.preventDefault(),R.stopPropagation();const j=Array.from(R.dataTransfer?.files??[]);p(j)}function $(R){return Array.from(R.dataTransfer?.items??[]).some(j=>j.kind==="file")}function T(R){!t()||!$(R)||(R.preventDefault(),_+=1,r.value=!0)}function I(R){!t()||!$(R)||R.preventDefault()}function N(R){!t()||!$(R)||(_=Math.max(0,_-1),_===0&&(r.value=!1))}function C(R){if(_=0,r.value=!1,!t())return;R.preventDefault();const j=Array.from(R.dataTransfer?.files??[]);p(j)}function O(){const R=n()??"";for(const j of o.value[R]??[])d(j);u(R,[])}function H(R,j,q){const K=o.value[R]??[];K.some(U=>U.localId===j)&&u(R,K.map(U=>U.localId===j?{...U,...q}:U))}function D(R){return fetch(R).then(j=>{if(!j.ok)throw new Error(`fetch failed: ${j.status}`);return j.blob()})}function A(R){const j=n()??"";for(const q of o.value[j]??[])d(q);u(j,[]);for(const q of R){const K=c(),U=/^data:/i.test(q.url),te=/^blob:/i.test(q.url),J=q.name??q.kind;if(q.fileId){const ee={localId:K,name:J,kind:q.kind,previewUrl:q.kind==="file"?void 0:q.url,uploading:!1,fileId:q.fileId};u(j,[...o.value[j]??[],ee]),q.kind!=="file"&&!U&&!te&&St().getFileBlob(q.fileId).then(ie=>{const Q=URL.createObjectURL(ie);if(!(o.value[j]??[]).some(xe=>xe.localId===K)){URL.revokeObjectURL(Q);return}H(j,K,{previewUrl:Q})}).catch(()=>{})}else{if(!q.url)continue;const ee=t();if(!ee)continue;const ie={localId:K,name:J,kind:q.kind,previewUrl:q.url,uploading:!0};u(j,[...o.value[j]??[],ie]),D(q.url).then(Q=>{const he=J.includes(".")?J:`${J}.${Q.type.split("/")[1]??"bin"}`;return ee(Q,he)}).then(Q=>{if(Q===null){const he=o.value[j]??[];u(j,he.filter(xe=>xe.localId!==K));return}H(j,K,{uploading:!1,fileId:Q.fileId})}).catch(()=>{const Q=o.value[j]??[];u(j,Q.filter(he=>he.localId!==K))})}}}return Ze(n,()=>{i.value=null}),In(()=>{document.addEventListener("paste",w),document.addEventListener("dragenter",T),document.addEventListener("dragover",I),document.addEventListener("dragleave",N),document.addEventListener("drop",C)}),En(()=>{document.removeEventListener("paste",w),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",I),document.removeEventListener("dragleave",N),document.removeEventListener("drop",C);for(const R of Object.values(o.value))for(const j of R)d(j);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:l,isDragOver:r,removeAttachment:h,openAttachmentPreview:m,closeAttachmentPreview:k,openFilePicker:x,handleFileInputChange:y,handleDragOver:M,handleDragLeave:P,handleDrop:B,clearAfterSubmit:O,loadAttachments:A}}const ibe=640,lbe=`(max-width: ${ibe}px)`;function i6(){const e=V(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(lbe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),En(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),En(()=>t.removeListener(n))),e}const rbe={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},abe=["stroke-dasharray","stroke-dashoffset"],Hm=7,cbe=Je({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*Hm;return(o,s)=>(g(),S("svg",rbe,[b("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:Hm,fill:"none","stroke-width":"2.5"}),b("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:Hm,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,abe)]))}}),ube=vt(cbe,[["__scopeId","data-v-97f3cf66"]]),dbe=["aria-selected","onClick"],fbe=Je({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("div",{class:Pe(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[(g(!0),S(Ce,null,at(e.options,i=>(g(),S("button",{key:i.value,class:Pe(["ui-seg__item",{"is-on":i.value===e.modelValue}]),type:"button",role:"tab","aria-selected":i.value===e.modelValue,onClick:l=>n("update:modelValue",i.value)},E(i.label),11,dbe))),128))],2))}}),di=vt(fbe,[["__scopeId","data-v-bffb3dae"]]),Dm=["pythinking","pyreasoning","pypondering","pyplanning","pyiterating","pyorchestrating","reasonating","pondercrafting","neuroning","logic-weaving","rubber-duckoning","token-wrangling","bug-whispering","stack-divining","gizmo-tinkering"],GN=6e4;function pbe(e=Date.now()){const t=Math.floor(e/GN)%Dm.length;return Dm[t]??Dm[0]}function hbe(e=Date.now()){return`${pbe(e)}…`}const ua=["⣷","⣯","⣟","⡿","⢿","⣻","⣽","⣾"],R0=80,mbe=["aria-label"],gbe=Je({__name:"ActivitySpinner",props:{fast:{type:Boolean},label:{}},setup(e){const t=ua.length*R0,n=R0/2,o=e,s=V(Date.now());let i;In(()=>{o.label===void 0&&(i=setInterval(()=>{s.value=Date.now()},GN))}),En(()=>{i!==void 0&&clearInterval(i)});const l=z(()=>o.label??hbe(s.value));function r(a){return{"--spinner-frame-delay":`${a*R0-t}ms`,"--spinner-frame-fast-delay":`${a*n-t/2}ms`}}return(a,c)=>(g(),S("span",{class:Pe(["activity-spin",{"activity-spin--fast":e.fast}]),"aria-label":l.value,role:"img"},[(g(!0),S(Ce,null,at(v(ua),(u,d)=>(g(),S("span",{key:u,class:"activity-frame",style:Gt(r(d)),"aria-hidden":"true"},E(u),5))),128))],10,mbe))}}),Vm=vt(gbe,[["__scopeId","data-v-c12d8332"]]),vbe=["disabled"],ybe={key:0,class:"leading"},wbe={class:"label"},kbe={key:1,class:"count"},bbe={key:2,class:"trailing"},_be=Je({__name:"MenuRow",props:{count:{},active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("button",{type:"button",class:Pe(["menu-row",{active:e.active,selected:e.selected,disabled:e.disabled}]),disabled:e.disabled},[t.$slots.leading?(g(),S("span",ybe,[jn(t.$slots,"leading",{},void 0,!0)])):Y("",!0),b("span",wbe,[jn(t.$slots,"label",{},()=>[jn(t.$slots,"default",{},void 0,!0)],!0)]),e.count!==void 0?(g(),S("span",kbe,E(e.count),1)):Y("",!0),t.$slots.trailing?(g(),S("span",bbe,[jn(t.$slots,"trailing",{},void 0,!0)])):Y("",!0)],10,vbe))}}),zc=vt(_be,[["__scopeId","data-v-261bf74a"]]),xbe=["aria-checked","disabled"],Sbe=Je({__name:"SwitchToggle",props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function s(){n.disabled||o("update:modelValue",!n.modelValue)}function i(l){n.disabled||l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),s())}return(l,r)=>(g(),S("button",{type:"button",class:"switch-toggle",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,onClick:s,onKeydown:i},[...r[0]||(r[0]=[b("span",{class:"track","aria-hidden":"true"},null,-1),b("span",{class:"thumb","aria-hidden":"true"},null,-1)])],40,xbe))}}),VC=vt(Sbe,[["__scopeId","data-v-169237c7"]]);function Cbe({initialized:e,onboardingCompleted:t,authReady:n}){return e?t?n?"app":"recovery":"first-run":"loading"}function Mbe(e,t){return e||t}function Abe(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const Tbe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function sl(e){const t=e.replaceAll("\\","/"),n=Tbe.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function Ebe(e,t){const n=sl(t.cwd);return e.find(o=>sl(o.root)===n)?.id??t.workspaceId??t.cwd}function Ibe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(sl)),l=new Map;for(const d of t){const f=sl(d.root);i.has(f)||l.has(f)||l.set(f,{...d})}for(const d of n){const f=d.cwd;if(!f)continue;const p=sl(f);i.has(p)||l.has(p)||l.set(p,{id:d.workspaceId??f,root:f,name:Abe(f),sessionCount:0})}const r=new Map;for(const d of n){const f=Ebe(t,d);r.set(f,(r.get(f)??0)+1)}const a=[];for(const d of t){const f=sl(d.root);!i.has(f)&&!a.includes(f)&&a.push(f)}const c=[...l.keys()].filter(d=>!a.includes(d));c.sort((d,f)=>l.get(d).root.localeCompare(l.get(f).root));const u=[];for(const d of[...a,...c]){const f=l.get(d),p=r.get(f.id)??r.get(f.root)??0,h=s[f.id]===!1?p:Math.max(f.sessionCount,p);u.push({...f,sessionCount:h})}return u}function $be(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const o=new Set(t.map(l=>l.id)),s=new Set(t.filter(l=>l.role==="user").map(l=>l.id)),i=e.filter(l=>{const r=Date.parse(l.createdAt);return!(Number.isNaN(r)||r>=n||o.has(l.id)||l.role==="user"&&l.promptId!==void 0&&s.has(l.promptId))});return i.length>0?[...i,...t]:t}function WC(e,t){const n=new Set(e.map(c=>c.id)),o=t.filter(c=>c.kind==="subagent"&&!n.has(c.id));if(o.length===0)return e;const s=new Map(e.map(c=>[c.id,c])),i=new Map;for(const c of e)c.kind==="subagent"&&c.agentId!==void 0&&!i.has(c.agentId)&&i.set(c.agentId,c);const l=new Set,r=o.map(c=>{const u=(c.backgroundTaskId!==void 0?s.get(c.backgroundTaskId):void 0)??i.get(c.id)??(c.agentId!==void 0?i.get(c.agentId):void 0);if(u===void 0)return c;l.add(u.id);const d=c.status==="running"&&u.status!=="running",f=u.completedAt!==void 0&&u.completedAtEstimated!==!0;return{...c,status:c.status==="running"?u.status:c.status,subagentPhase:d?u.status==="completed"?"completed":u.status==="cancelled"?"cancelled":"failed":c.subagentPhase,agentId:c.agentId??u.agentId,model:c.model??u.model,thinkingEffort:c.thinkingEffort??u.thinkingEffort,routing:c.routing??u.routing,currentRoutingEnvRevision:c.currentRoutingEnvRevision??u.currentRoutingEnvRevision,completedAt:f?u.completedAt:c.completedAt??u.completedAt,completedAtEstimated:f?u.completedAtEstimated:c.completedAt!==void 0?c.completedAtEstimated:u.completedAtEstimated,outputPreview:u.outputPreview??c.outputPreview,outputBytes:u.outputBytes??c.outputBytes}});return[...e.filter(c=>!l.has(c.id)),...r]}function Lbe(e,t){if(e.length===0)return t;const n=new Map(t.map(l=>[l.id,l])),o=new Set(e.map(l=>l.id)),s=e.map(l=>{const r=n.get(l.id);return r?{...l,outputLines:r.outputLines,text:r.text}:l}),i=t.filter(l=>!o.has(l.id));return i.length===0?s:[...s,...i]}function Nbe(e){const t=new Map,n=new Set;function o(i){const l=t.get(i);if(l!==void 0)return l;const r=(async()=>e(i))().finally(()=>{t.delete(i),n.delete(i)&&o(i)});return t.set(i,r),r}function s(i){if(t.has(i)){n.add(i);return}o(i)}return{run:o,request:s}}const zbe=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function Bbe(e){return zbe.has(e.type)}const Rbe=50,Pbe=100,F7=32*1024,Fbe={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,Rbe)},cancelTask(e){clearTimeout(e)}};function jbe(e,t,n={}){const o=n.scheduler??Fbe,s=Math.max(1,Math.floor(n.maxItemsPerSlice??Pbe)),i=[];let l=0,r=null,a=null,c=0,u=!1;const d=()=>i.length-l,f=()=>{c+=1,r!==null&&(o.cancelFrame(r),r=null),a!==null&&(o.cancelTask(a),a=null)},p=()=>{l===i.length?(i.length=0,l=0):l>=1024&&(i.splice(0,l),l=0)};let h;const m=()=>{if(u||r!==null||a!==null||d()===0)return;const x=++c,y=()=>{x===c&&h()};r=o.requestFrame(y),a=o.requestTask(y)};h=()=>{f();let x=0;for(;!u&&x{if(!u){if(t(x)){const y=i.length>l?i.at(-1):void 0,w=y===void 0?void 0:n.coalesce?.(y,x);w===void 0?i.push(x):i[i.length-1]=w,m();return}if(d()===0){e(x);return}i.push(x),h()}});return k.flush=()=>{if(!u){for(f();!u&&l{if(u||d()===0)return;let y=l;for(let w=l;w{u||(u=!0,f(),i.length=0,l=0)},k}function j7(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function Obe(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=j7(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=F7)return[e];const s=[];let i=0;for(;ii&&/[\uD800-\uDBFF]/u.test(o.value[l-1])&&/[\uDC00-\uDFFF]/u.test(o.value[l])&&(l-=1);const r=o.value.slice(i,l);s.push({appEvent:{...t,delta:o.kind==="text"?{text:r}:{thinking:r}},meta:{...e.meta,stream:{...n,offset:n.offset+i}}}),i=l}return s}function Hbe(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=j7(e.appEvent),i=j7(t.appEvent);if(n===void 0||o===void 0||s===void 0||i===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==o.turnId||n.kind!==o.kind||s.kind!==i.kind||n.kind!==s.kind||o.kind!==i.kind||o.offset!==n.offset+s.value.length||s.value.length+i.value.length>F7)return;const l=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:l}:{thinking:l}},meta:{...t.meta,stream:{...n}}}}const YN=[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],XN=new Set(["blue","mono"]),JN=new Set(["light","dark","system"]),QN=14,Dbe=12,Vbe=20,Wbe={small:12,medium:14,large:16,xlarge:18};function qbe(){const e=ls(dn.accent);return e&&XN.has(e)?e:"blue"}function Ube(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.accent=e)}function Zbe(){const e=ls(dn.colorScheme);return e&&JN.has(e)?e:"system"}function Kbe(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?"#121212":e==="light"?"#ffffff":null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?"#121212":"#ffffff";o.setAttribute("content",n??i)})}function y9(e){return Number.isFinite(e)?Math.min(Vbe,Math.max(Dbe,Math.round(e))):QN}function w9(e){const t=y9(e);return t<=13?"small":t<=15?"medium":t<=17?"large":"xlarge"}function ez(e){return Wbe[e]}function Gbe(){const e=ls(dn.uiFontSize);return e===null?QN:y9(Number(e))}function Ybe(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=w9(e))}const k9=V(Zbe()),b9=V(qbe()),_9=V(Gbe());Ze(k9,Kbe,{immediate:!0});Ze(b9,Ube,{immediate:!0});Ze(_9,Ybe,{immediate:!0});function Xbe(e){JN.has(e)&&(k9.value=e,Es(dn.colorScheme,e))}function Jbe(e){XN.has(e)&&(b9.value=e,Es(dn.accent,e))}function Qbe(e){const t=y9(e);_9.value=t,Es(dn.uiFontSize,String(t))}const e_e=600,t_e=250,l6=250,n_e=1e3,o_e=160,X5=V(!1);let b0=[],T0=null,J5=-l6;function s_e(){b0=[],J5=-l6,X5.value=!1,T0!==null&&(clearTimeout(T0),T0=null)}function i_e(){X5.value=!0,T0!==null&&clearTimeout(T0),T0=setTimeout(()=>{T0=null,b0=[],J5=-l6,X5.value=!1},n_e)}function l_e(e){if(e<=0)return;const t=Date.now();b0.push({time:t,chars:e});const n=t-e_e;if(b0=b0.filter(r=>r.time>=n),t-J5r+a.chars,0)/s*1e3>=o_e&&i_e()}function x9(){return{colorScheme:k9,accent:b9,uiFontSize:_9,fastMoon:X5,setColorScheme:Xbe,setAccent:Jbe,setUiFontSize:Qbe,resetFastMoon:s_e,recordMoonDelta:l_e}}function r_e(e,t,n){return e==="idle"&&!t&&!n}function S9(e,t){const n=ls(e);return n===null?t:n==="1"}const C9=V(S9(dn.notifyOnComplete,!0)),M9=V(S9(dn.notifyOnQuestion,!1)),A9=V(S9(dn.notifyOnApproval,!1)),T9=V(typeof Notification<"u"?Notification.permission:"denied"),a_e="/favicon.ico";async function E9(e,t,n){if(!n){e.value=!1,Es(t,"0");return}if(typeof Notification>"u")return;let o=Notification.permission;if(o==="default")try{o=await Notification.requestPermission()}catch{}T9.value=o,o==="granted"&&(e.value=!0,Es(t,"1"))}function c_e(e){return E9(C9,dn.notifyOnComplete,e)}function u_e(e){return E9(M9,dn.notifyOnQuestion,e)}function d_e(e){return E9(A9,dn.notifyOnApproval,e)}function I9(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function f_e(e){return{title:Mo.global.t("settings.notifyTitle"),body:I9(e,Mo.global.t("settings.notifyFallback"))}}function p_e(e,t){return{title:Mo.global.t("settings.notifyQuestionTitle"),body:I9(t,e,Mo.global.t("settings.notifyQuestionFallback"))}}function h_e(e,t){return{title:Mo.global.t("settings.notifyApprovalTitle"),body:I9(t,e,Mo.global.t("settings.notifyApprovalFallback"))}}function $9(e,t,n,o){if(!e||typeof Notification>"u")return;const s=Notification.permission;if(s!=="denied"){if(s==="default"){Notification.requestPermission().then(i=>{T9.value=i,i==="granted"&&qC(t,n,o)});return}qC(t,n,o)}}function qC(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:a_e});o.onclick=()=>{try{window.focus()}catch{}e.onClick(),o.close()}}catch{}}function m_e(e,t){$9(C9.value,t,f_e(t.sessionTitle),`pythinker-complete-${e}-${t.promptId??Date.now()}`)}function g_e(e){$9(M9.value,e,p_e(e.sessionTitle,e.questionPreview),`pythinker-question-${e.questionId}`)}function v_e(e){$9(A9.value,e,h_e(e.sessionTitle,e.toolName),`pythinker-approval-${e.approvalId}`)}function y_e(){return{notifyOnComplete:C9,notifyOnQuestion:M9,notifyOnApproval:A9,notifyPermission:T9,setNotifyOnComplete:c_e,setNotifyOnQuestion:u_e,setNotifyOnApproval:d_e,maybeNotifyCompletion:m_e,maybeNotifyQuestion:g_e,maybeNotifyApproval:v_e}}function w_e(){return ls(dn.soundOnComplete)==="1"}const Wu=V(w_e());function k_e(){if(typeof window>"u")return;const e=window;return window.AudioContext??e.webkitAudioContext}let Wm=null;function tz(){const e=k_e();if(!e)return null;if(Wm===null)try{Wm=new e}catch{return null}return Wm}function nz(){if(!Wu.value)return;const e=tz();e!==null&&e.state==="suspended"&&e.resume().then(()=>{ia("sound: audio context resumed",{state:e.state})},t=>{ia("sound: audio context resume rejected",{error:String(t)})})}let UC=!1;function b_e(){if(UC||typeof window>"u")return;UC=!0;const e=()=>{nz()};window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("keydown",e,{capture:!0})}b_e();function __e(e){Wu.value=e,Es(dn.soundOnComplete,e?"1":"0"),e&&nz()}function ZC(e,t,n,o,s){const i=e.createOscillator(),l=e.createGain();i.type="sine",i.frequency.value=t,i.connect(l),l.connect(e.destination);const r=e.currentTime+n;l.gain.setValueAtTime(1e-4,r),l.gain.exponentialRampToValueAtTime(s,r+.01),l.gain.exponentialRampToValueAtTime(1e-4,r+o),i.start(r),i.stop(r+o+.02)}function L9(){const e=tz();if(e===null){ia("sound: skipped, AudioContext unavailable");return}if(e.state!=="running"){ia("sound: skipped, context not running",{state:e.state}),e.state==="suspended"&&e.resume().then(()=>{ia("sound: context resumed for next time",{state:e.state})},t=>{ia("sound: resume rejected",{error:String(t)})});return}try{ZC(e,880,0,.16,.18),ZC(e,1320,.1,.22,.16),ia("sound: chime scheduled",{state:e.state})}catch(t){ia("sound: failed to play",{error:String(t)})}}function x_e(){Wu.value&&L9()}function S_e(){Wu.value&&L9()}function C_e(){Wu.value&&L9()}function M_e(){return{soundOnComplete:Wu,setSoundOnComplete:__e,maybePlayCompletionSound:x_e,maybePlayQuestionSound:S_e,maybePlayApprovalSound:C_e}}const A_e=1e3,T_e=4096,KC=32*1024;function E_e(e,t){let n=null,o;const s=new Set;async function i(f){try{const h=await St().listTasks(f);e.tasksBySession={...e.tasksBySession,[f]:WC(h,e.tasksBySession[f]??[])},await l(f,h)}catch{}}async function l(f,p){if(e.activeSessionId!==f)return;const h=p??e.tasksBySession[f]??[],m=St(),k=new Map;if(await Promise.all(h.map(async y=>{if((y.status==="completed"||y.status==="failed"||y.status==="cancelled")&&!s.has(y.id)&&!((y.outputLines?.length??0)>0))try{const _=await m.getTask(f,y.id,{withOutput:!0,outputBytes:KC});_.outputPreview!==void 0&&k.set(y.id,{preview:_.outputPreview,bytes:_.outputBytes}),s.add(y.id)}catch{}})),k.size===0)return;const x=e.tasksBySession[f]??[];e.tasksBySession={...e.tasksBySession,[f]:x.map(y=>{const w=k.get(y.id)??(y.backgroundTaskId!==void 0?k.get(y.backgroundTaskId):void 0);return w?{...y,outputPreview:w.preview,outputBytes:w.bytes}:y})}}async function r(f){if(e.activeSessionId!==f)return;const p=St();let h;try{h=await p.listTasks(f)}catch{return}const m=new Map;await Promise.all(h.map(async w=>{const _=w.status==="running",M=w.status==="completed"||w.status==="failed"||w.status==="cancelled";if(!(!_&&!M)&&!(M&&(s.has(w.id)||(w.outputLines?.length??0)>0)))try{const P=await p.getTask(f,w.id,{withOutput:!0,outputBytes:_?T_e:KC});P.outputPreview!==void 0&&m.set(w.id,{preview:P.outputPreview,bytes:P.outputBytes}),M&&s.add(w.id)}catch{}}));const k=e.tasksBySession[f]??[],x=new Map(k.map(w=>[w.id,w])),y=h.map(w=>{const _=x.get(w.id),M=m.get(w.id);return{...w,outputLines:_?.outputLines,text:_?.text,outputPreview:M?.preview??_?.outputPreview,outputBytes:M?.bytes??_?.outputBytes}});e.tasksBySession={...e.tasksBySession,[f]:WC(y,k)}}function a(f){n!==null&&o===f||(c(),o=f,r(f),n=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===f?r(f):c())},A_e))}function c(){n!==null&&(clearInterval(n),n=null),o=void 0,s.clear()}const u=V(0);let d=null;return Ze(()=>t.value.some(f=>f.status==="running"),f=>{f&&d===null?d=setInterval(()=>{u.value=(u.value+1)%Number.MAX_SAFE_INTEGER},1e3):!f&&d!==null&&(clearInterval(d),d=null)},{immediate:!0}),Ze(()=>{const f=e.activeSessionId;if(!f)return{sid:void 0,hasRunning:!1};const p=e.tasksBySession[f]??[];return{sid:f,hasRunning:p.some(h=>h.status==="running")}},({sid:f,hasRunning:p},h,m)=>{let k;p&&f!==void 0?a(f):f!==void 0?k=setTimeout(()=>{(e.tasksBySession[f]??[]).some(y=>y.status==="running")||c()},1500):c(),m(()=>{k!==void 0&&clearTimeout(k)})},{deep:!0,immediate:!0}),{taskClock:z(()=>u.value),loadTasksForSession:i}}function I_e(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function $_e(e){const t=[];if(!e)return t;let n=0,o=0,s=!1;for(const i of e.split(` -`)){if(i.startsWith("diff --git")){s=!1;continue}if(!s&&I_e(i))continue;if(i.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(i);a&&(n=Number.parseInt(a[1],10),o=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:i});continue}if(!s||i.startsWith("\\"))continue;const l=i.charAt(0),r=i.slice(1);l==="+"?(t.push({type:"add",text:r,newNo:o}),o+=1):l==="-"?(t.push({type:"del",text:r,oldNo:n}),n+=1):l===" "&&(t.push({type:"context",text:r,oldNo:n,newNo:o}),n+=1,o+=1)}return t}const O7="/sessions/";function GC(e){const{pathname:t}=e;if(!t.startsWith(O7))return;const n=t.slice(O7.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function L_e(e){return e===void 0||e.length===0?"/":`${O7}${encodeURIComponent(e)}`}const N_e=50,p0=5,z_e=40402,B_e=40410,R_e=40902,P_e=2e3;function qm(e){return ol(e)&&e.code===R_e}const F_e=40904;function YC(e){return ol(e)&&e.code===F_e}const u0=ds({}),t4=ds({}),Um=ds({}),Zm=ds({}),br=ds(new Set),r6=new Map,q0=new Map,Q5=new Map;let j_e=0;const h0=new Map,O_e=3;let XC=0;function H_e(){return XC+=1,`${Date.now().toString(36)}-${XC}`}function D_e(e){return{generation:r6.get(e)??0,pending:(q0.get(e)?.size??0)>0}}function H7(e){const t=++j_e;r6.set(e,t);const n=q0.get(e)??new Set;return n.add(t),q0.set(e,n),t}function D7(e,t){const n=q0.get(e);if(n===void 0||(n.delete(t),n.size>0))return;q0.delete(e);const o=Q5.get(e);Q5.delete(e),o?.()}function V_e(e){r6.delete(e),q0.delete(e),Q5.delete(e),h0.delete(e)}function W_e(e,t){return!t.pending&&t.generation===(r6.get(e)??0)}function q_e(e,t){if((q0.get(e)?.size??0)===0){t();return}Q5.set(e,t)}function U_e(e,t){const{t:n}=Mo.global,{confirm:o}=B1(),{taskPoller:s,sideChat:i,modelProvider:l,pushOperationFailure:r,activity:a,sessionsKnownEmpty:c,setSessions:u,updateSession:d,upsertSessionFront:f,appendSession:p,forgetSession:h,setActiveSessionId:m,updateSessionMessages:k,nextOptimisticMsgId:x,getEventConn:y,syncSessionFromSnapshot:w,reopenSession:_,hasLoadedMessages:M,refreshSessionStatus:P,refreshSessionGoal:B,persistSessionProfile:$,mergedWorkspaces:T,workspacesView:I,status:N,workspaceIdForSession:C,seedPermissionFromDaemonDefault:O,savePlanModeToStorage:H,saveDynamicWorkflowModeToStorage:D,saveGoalModeToStorage:A,draftModes:R,saveUnread:j,saveActiveWorkspaceToStorage:q,saveHiddenWorkspacesToStorage:K,goalErrorMessage:U,resetFastMoon:te,initialized:J,connectIssue:ee,selectedDiffPath:ie,fileDiffLines:Q,fileDiffLoading:he}=t;let xe=!1,Ye=0;function st(){const ne=e.config?.defaultPermissionMode;return ne==="auto"||ne==="yolo"||ne==="manual"?ne:"manual"}function X(ne){return e.permissionBySession[ne]??st()}async function se(ne){if(e.messagesLoadingMoreBySession[ne])return;const we=e.messagesBySession[ne];if(!we||we.length===0)return;const Ee=we[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!1};try{const Be=await St().listMessages(ne,{beforeId:Ee,pageSize:N_e}),et=[...Be.items].toReversed();k(ne,pt=>[...et,...pt]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[ne]:Be.hasMore}}catch(Be){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!0},r("loadOlderMessages",Be,{sessionId:ne})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!1}}}function F(ne){s.loadTasksForSession(ne),ve(ne),P(ne),B(ne),Object.prototype.hasOwnProperty.call(l.skillsBySession.value,ne)||l.loadSkillsForSession(ne)}async function Z(ne){const we=e.activeSessionId;if(we){ie.value=ne,Q.value=[],he.value=!0;try{const Be=await St().getFileDiff(we,ne);if(ie.value!==ne)return;Q.value=$_e(Be.diff)}catch(Ee){ie.value===ne&&(Q.value=[]),console.warn("[loadFileDiff] diff unavailable for",ne,Ee)}finally{ie.value===ne&&(he.value=!1)}}}function fe(){ie.value=null,Q.value=[],he.value=!1}async function ve(ne){try{const Ee=await St().getGitStatus(ne);e.gitStatusBySession={...e.gitStatusBySession,[ne]:Ee}}catch{}}async function ge(){try{const we=await St().getAuth();return e.authReady=we.ready,e.defaultModel=we.defaultModel,ee.value=null,"proceed"}catch(ne){return ol(ne)&&(ne.code===401||ne.code===RN)?(ee.value=null,"server-auth-required"):(ee.value=(ne instanceof Error?ne.message:String(ne)).slice(0,140),"retry")}}async function oe(){let ne=!0;for(;;){const we=await ge();if(we!=="retry")return we;ne&&(ee.value=null,ne=!1),await new Promise(Ee=>{setTimeout(Ee,P_e)})}}async function de(){try{e.subagentModelPolicy=await St().getSubagentModelPolicy()}catch{e.subagentModelPolicy=null}}async function ke(ne){e.subagentModelPolicySaving=!0;try{return e.subagentModelPolicy=await ne(e.subagentModelPolicy?.resourceVersion),!0}catch(we){return we instanceof NL?(e.subagentModelPolicy=we.current,r("saveSubagentModelPolicy",we,{message:we.message}),!1):(r("saveSubagentModelPolicy",we),!1)}finally{e.subagentModelPolicySaving=!1}}function Se(ne){return ke(we=>St().setSubagentModelPolicy(ne,we))}function me(){return ke(ne=>St().clearSubagentModelPolicy(ne))}async function Ae(){await de();try{const ne=St();e.config=await ne.getConfig(),O()}catch{}}function le(ne){ne!=="manual"&&ne!=="auto"&&ne!=="yolo"||e.activeSessionId||(e.permission=ne)}function be(ne,we){if(we===ne)return;l.draftModel.value=null;const Ee=e.activeSessionId;if(!Ee)return;const Be=e.sessions.find(et=>et.id===Ee);Be===void 0||Be.messageCount>0||Be.busy||e.inFlightBySession[Ee]||!Be.model||Be.model.length===0||Be.model!==ne||(d(Ee,et=>({...et,model:we})),$({model:we},Ee))}async function _e(ne){try{const we=St(),Ee=e.defaultModel,Be=await we.setConfig(ne);e.config=Be,e.defaultModel=Be.defaultModel??null;const et=Be.defaultModel;return ne.defaultPermissionMode!==void 0&&le(Be.defaultPermissionMode??ne.defaultPermissionMode),ne.defaultModel!==void 0&&et!==null&&et!==void 0&&et.length>0&&be(Ee,et),!0}catch(we){return r("setConfig",we),!1}}const Ke=100,Qe=30,mt=720*60*1e3;async function Tt(){const ne=St(),we=[];let Ee,Be;for(;;){let et;try{et=await ne.listSessions({pageSize:Ke,beforeId:Ee,excludeEmpty:!0})}catch(pt){if(we.length===0)throw pt;Be=pt;break}if(we.push(...et.items),!et.hasMore||et.items.length===0)break;Ee=et.items.at(-1).id}return{sessions:we,error:Be}}function qt(ne){const we=new Map(e.sessions.map(Ee=>[Ee.id,Ee.usage]));u(ne.map(Ee=>{const Be=we.get(Ee.id);return Be!==void 0&&M7(Ee.usage)&&!M7(Be)?{...Ee,usage:Be}:Ee}))}function nn(ne){const we=[...ne],Ee=new Set(we.map(Be=>Be.id));for(const Be of e.sessions)Ee.has(Be.id)||(we.push(Be),Ee.add(Be.id));return we.sort((Be,et)=>new Date(et.updatedAt).getTime()-new Date(Be.updatedAt).getTime()),we}async function Jt(ne){const we=St(),Ee=[],Be=Date.now(),et=Wt=>Be-new Date(Wt.updatedAt).getTime();let pt,jt=!1,Zt=!0,Vt;for(;;){let Wt;try{Wt=await we.listSessions({workspaceId:ne,pageSize:p0,beforeId:pt,excludeEmpty:!0})}catch(Ht){if(Zt)throw Ht;Vt=Ht,jt=!0;break}if(jt=Wt.hasMore,Wt.items.length===0)break;const on=Wt.items.at(-1),Vn=et(on)>=mt;if(!Zt&&Vn){const Ht=Wt.items.findIndex(zn=>et(zn)>=mt),Tn=Ht>=0?Ht+1:Wt.items.length;Ee.push(...Wt.items.slice(0,Tn)),jt=Wt.hasMore||TnJt(Ht.id))),Ee=[],Be=new Set,et=new Map,pt=new Set;let jt;for(let Ht=0;Htpt.has(Ht.id)).map(Ht=>Ht.root)),Vt=new Set(ne.map(Ht=>Ht.id));for(const Ht of e.sessions)!(Ht.workspaceId!==void 0&&Vt.has(Ht.workspaceId)?pt.has(Ht.workspaceId):Zt.has(Ht.cwd)||pt.has(C(Ht)))||Be.has(Ht.id)||(Ee.push(Ht),Be.add(Ht.id));const Wt={},on={},Vn={};for(const{id:Ht}of ne){const Tn=et.get(Ht);if(Tn===void 0){const zn=e.sessionsHasMoreByWorkspace[Ht],Ns=e.sessionsCursorByWorkspace[Ht],rs=e.sessionsInitialCountByWorkspace[Ht];zn!==void 0&&(Wt[Ht]=zn),Ns!==void 0&&(on[Ht]=Ns),rs!==void 0&&(Vn[Ht]=rs);continue}Wt[Ht]=Tn.hasMore,on[Ht]=Tn.items.length>0?Tn.items.at(-1).id:void 0,Vn[Ht]=Math.max(Tn.items.length,p0)}return e.sessionsHasMoreByWorkspace=Wt,e.sessionsCursorByWorkspace=on,e.sessionsInitialCountByWorkspace=Vn,e.sessionsFullyLoaded=!1,Ee.sort((Ht,Tn)=>new Date(Tn.updatedAt).getTime()-new Date(Ht.updatedAt).getTime()),pt.size>0&&r("load",jt),Ee}function Dn(){const ne=++Ye;if(e.backend!=="v2")return;const we={groupPageSize:p0,hasPrompt:!0};return{firstPage:Promise.resolve().then(()=>St().listSessionGroupsV2(we)).then(Ee=>({page:Ee}),Ee=>({error:Ee})),input:we,serial:ne}}function xn(ne,we){const Ee=new Map(ne.map(on=>[on.workspace.id,on])),Be=new Map;for(const on of ne)on.workspace.cwd!==null&&Be.set(sl(on.workspace.cwd),on);const et=[],pt=new Set,jt={},Zt={},Vt={},Wt=[];for(const on of e.workspaces){const Vn=Ee.get(on.id)??Be.get(sl(on.root));if(Vn===void 0){jt[on.id]=!we,Zt[on.id]=void 0,Vt[on.id]=p0;continue}const Ht=[];for(const Tn of Vn.sessions){if(!Tn.lastPrompt||pt.has(Tn.id))continue;const zn={...Tn,cwd:Tn.cwd||on.root,workspaceId:on.id};et.push(zn),Ht.push(zn),pt.add(zn.id),(zn.busy||zn.pendingInteraction==="approval"||zn.pendingInteraction==="question")&&Wt.push(zn.id)}jt[on.id]=Vn.sessions.lengthnew Date(Vn.updatedAt).getTime()-new Date(on.updatedAt).getTime()),{loaded:et,hasMore:jt,cursors:Zt,counts:Vt,liveIds:Wt}}function Ln(ne,we){if(we===void 0){e.sessionsHasMoreByWorkspace=ne.hasMore,e.sessionsCursorByWorkspace=ne.cursors,e.sessionsInitialCountByWorkspace=ne.counts;return}const Ee={...e.sessionsHasMoreByWorkspace},Be={...e.sessionsCursorByWorkspace},et={...e.sessionsInitialCountByWorkspace};for(const pt of e.workspaces)e.sessionsCursorByWorkspace[pt.id]===we[pt.id]&&(Ee[pt.id]=ne.hasMore[pt.id]??!1,Be[pt.id]=ne.cursors[pt.id],et[pt.id]=ne.counts[pt.id]??p0);e.sessionsHasMoreByWorkspace=Ee,e.sessionsCursorByWorkspace=Be,e.sessionsInitialCountByWorkspace=et}async function Hn(ne,we,Ee){const Be=[...ne.groups];let et=ne.nextPageToken;for(;et!==null;){if(we.serial!==Ye)return;let Vt;try{Vt=await St().listSessionGroupsV2({...we.input,pageToken:et})}catch(Wt){r("load",Wt);return}Be.push(...Vt.groups),et=Vt.nextPageToken}if(we.serial!==Ye)return;const pt=xn(Be,!0),jt=new Set(pt.loaded.map(Vt=>Vt.id)),Zt=[...pt.loaded,...e.sessions.filter(Vt=>!jt.has(Vt.id))].sort((Vt,Wt)=>new Date(Wt.updatedAt).getTime()-new Date(Vt.updatedAt).getTime());if(qt(Zt),e.sessionsFullyLoaded){const Vt={};for(const Wt of e.workspaces)Vt[Wt.id]=!1;e.sessionsHasMoreByWorkspace=Vt}else Ln(pt,Ee.cursors);await Promise.allSettled(pt.liveIds.map(Vt=>P(Vt)))}async function bn(ne){if(e.workspaces.length===0){const pt=await kn();return pt===void 0?void 0:{sessions:pt,liveIds:[]}}const{page:we,error:Ee}=await ne.firstPage;if(we===void 0){r("load",Ee);return}const Be=we.nextPageToken===null,et=xn(we.groups,Be);return Ln(et),e.sessionsFullyLoaded=!1,{sessions:et.loaded,liveIds:et.liveIds,finishInBackground:Be?void 0:()=>{Hn(we,ne,et)}}}async function Wn(ne){if(e.sessionsLoadingMoreByWorkspace[ne]||e.sessionsHasMoreByWorkspace[ne]===!1)return;const we=e.sessionsCursorByWorkspace[ne];if(we!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!0};try{const Ee=await St().listSessions({workspaceId:ne,pageSize:Qe,beforeId:we,excludeEmpty:!0}),Be=new Set(e.sessions.map(pt=>pt.id)),et=Ee.items.filter(pt=>!Be.has(pt.id));et.length>0&&u([...e.sessions,...et]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[ne]:Ee.items.length>0?Ee.items.at(-1).id:we},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[ne]:Ee.hasMore}}catch(Ee){r("loadMoreSessions",Ee)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!1}}}}async function Pn(){if(e.sessionsFullyLoaded)return;const ne=await Tt().catch(Be=>(console.warn("[pythinker-web] loadAllSessions failed; search covers only loaded sessions",Be),null));if(ne===null)return;const we=ne.error===void 0?ne.sessions:nn(ne.sessions);if(qt(we),e.sessionsFullyLoaded=ne.error===void 0,ne.error!==void 0)return;const Ee={};for(const Be of e.workspaces)Ee[Be.id]=!1;e.sessionsHasMoreByWorkspace=Ee}async function Mn(){const ne=await St().getMeta().catch(()=>null);ne!==null&&(e.serverVersion=ne.serverVersion,e.availableOpenInApps=ne.openInApps,e.dangerousBypassAuth=ne.dangerousBypassAuth,e.backend=ne.backend,e.experimentalFlagStates=ne.experimentalFlagStates,e.serverCapabilities=ne.capabilities)}async function Nn(){const ne=Date.now();let we="accepted";_s("app:load:start"),e.loading=!0;const Ee=!J.value;let Be=!0;try{if(Ee&&await oe()==="server-auth-required"){Be=!1,we="auth-required";return}const et=St();await Promise.all([et.getHealth().catch(()=>null),Mn(),l.loadModels()]),Ee||await ge(),await Ae();const pt=Dn();await An();const jt=pt===void 0?void 0:await bn(pt),Zt=pt===void 0?await kn():jt?.sessions,Vt=Zt??e.sessions;Zt!==void 0&&qt(Zt),jt?.finishInBackground?.(),jt!==void 0&&await Promise.allSettled(jt.liveIds.map(Tn=>P(Tn)));const Wt=Vt[0],on=e.activeWorkspaceId;!(on!==null&&T.value.some(Tn=>Tn.id===on))&&Wt&&Fn(C(Wt)),Ut();const Ht=typeof window<"u"?GC(window.location):void 0;!e.activeSessionId&&Ht!==void 0&&(e.sessions.some(zn=>zn.id===Ht)||await dt(Ht))&&await en(Ht,{urlMode:"replace"}),!e.activeSessionId&&Vt.length>0&&await en(Vt[0].id,{urlMode:"replace"})}catch(et){we="failed",r("load",et)}finally{e.loading=!1,Be&&(J.value=!0),_s("app:load:complete",{status:we,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-ne})}}async function An(){try{const ne=St(),[we,Ee]=await Promise.all([ne.listWorkspaces().catch(()=>[]),ne.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=Qn(we),e.fsHome=Ee.home||null,e.recentRoots=Ee.recentRoots}catch{}}function Qn(ne){const we=h3();return Object.keys(we).length===0?ne:ne.map(Ee=>{const Be=we[Ee.root];return Be!==void 0?{...Ee,name:Be}:Ee})}function Fn(ne){e.activeWorkspaceId=ne,q(ne)}function Qt(ne){Fn(ne);const we=e.sessions.filter(Ee=>C(Ee)===ne);if(we.length>0){const Ee=we[0];Ee&&Ee.id!==e.activeSessionId&&en(Ee.id)}else m(void 0),ot(void 0,"push")}function uo(ne){const we=h3()[ne.root],Ee=we!==void 0?{...ne,name:we}:ne,Be=sl(Ee.root);e.hiddenWorkspaceRoots.some(jt=>sl(jt)===Be)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(jt=>sl(jt)!==Be),K(e.hiddenWorkspaceRoots));const et=e.workspaces.findIndex(jt=>jt.id===Ee.id||jt.root===Ee.root);if(et===-1){e.workspaces=[Ee,...e.workspaces];return}const pt=[...e.workspaces];pt[et]=Ee,e.workspaces=pt}function Zn(ne){if(ne.type==="workspaceCreated"||ne.type==="workspaceUpdated"){uo(ne.workspace);return}const we=e.workspaces.find(Be=>Be.id===ne.workspaceId)?.root??ne.root;if(we&&!e.hiddenWorkspaceRoots.includes(we)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,we],K(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Be=>Be.id!==ne.workspaceId&&Be.root!==we),e.activeWorkspaceId===ne.workspaceId||e.activeWorkspaceId===we){const Be=I.value[0]?.id??null;if(e.activeWorkspaceId=Be,Be)q(Be);else try{w1(dn.activeWorkspace)}catch{}m(void 0),e.sessionLoading=!1,fe(),ot(void 0,"replace")}}function Bo(){m(void 0),e.permission=st(),ot(void 0,"push")}function Un(ne){Fn(ne),Bo(),fe()}async function hs(ne){const we=T.value.find(Vn=>Vn.id===ne);if(!we)return null;const Ee=e.thinking,Be=e.permission,et=St();let pt,jt=we.root;try{const Vn=await et.addWorkspace({root:we.root});pt=Vn.id,jt=Vn.root,uo(Vn)}catch{}const Zt=l.draftModel.value??void 0,Vt=await et.createSession({workspaceId:pt,cwd:jt,model:Zt});l.draftModel.value=null;const Wt=Zt!==void 0&&(!Vt.model||Vt.model.length===0)?{...Vt,model:Zt}:Vt;f(Wt),e.permissionBySession={...e.permissionBySession,[Vt.id]:Be},Fn(Vt.workspaceId??pt??ne),await en(Vt.id);const on=Vt.id;return Ee!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[on]:Ee}),R.planMode&&(e.planModeBySession={...e.planModeBySession,[on]:!0},H()),R.dynamicWorkflowMode&&(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[on]:!0},D()),R.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[on]:!0},A()),R.planMode=!1,R.dynamicWorkflowMode=!1,R.goalMode=!1,on}async function Io(ne,we,Ee){if(!br.has(ne)){br.add(ne);try{const Be=await hs(ne);if(!Be)return;await tn(Be,we,Ee)}catch(Be){r("startSessionAndSendPrompt",Be)}finally{br.delete(ne)}}}async function Bt(ne,we,Ee){if(!br.has(ne)){br.add(ne);try{const Be=await hs(ne);if(!Be)return;const et=e.planModeBySession[Be]??!1,pt=e.dynamicWorkflowModeBySession[Be]??!1,jt=e.sessions.find(Wt=>Wt.id===Be),Zt=(jt?.model&&jt.model.length>0?jt.model:e.defaultModel)??void 0;if(!await $({model:Zt,planMode:et,dynamicWorkflowMode:pt,permissionMode:X(Be)},Be))return;await l.activateSkill(we,Ee,Be)}catch(Be){r("startSessionAndActivateSkill",Be)}finally{br.delete(ne)}}}async function Jo(ne,we){if(!br.has(ne)){br.add(ne);try{const Ee=await hs(ne);if(!Ee)return;await i.openSideChatOn(Ee,we)}catch(Ee){r("startSessionAndOpenSideChat",Ee)}finally{br.delete(ne)}}}async function $s(ne){const we=ne.trim();if(!we)return!1;const Ee=St();try{const Be=await Ee.addWorkspace({root:we});return uo(Be),Un(Be.id),!0}catch(Be){return console.warn("[pythinker-web] addWorkspaceByPath failed for",we,Be),!1}}async function ze(ne){try{return await St().browseFs(ne)}catch{return{path:"",parent:null,entries:[]}}}async function Ge(){try{return await St().getFsHome()}catch{return{home:"",recentRoots:[]}}}function ot(ne,we){if(we==="none"||typeof window>"u"||!window.history)return;const Ee=L_e(ne);if(window.location.pathname!==Ee)try{we==="push"?window.history.pushState(null,"",Ee):window.history.replaceState(null,"",Ee)}catch{}}async function dt(ne){try{const we=await St().getSession(ne);return e.sessions.some(Ee=>Ee.id===we.id)||p(we),!0}catch{return!1}}function Ct(){const ne=GC(window.location);if(ne===void 0){m(void 0);return}if(ne!==e.activeSessionId){if(e.sessions.some(we=>we.id===ne)){en(ne,{urlMode:"none"});return}(async()=>{if(await dt(ne)){await en(ne,{urlMode:"none"});return}const we=e.sessions[0];we?await en(we.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))})()}}let Ft=!1;function Ut(){Ft||typeof window>"u"||(Ft=!0,window.addEventListener("popstate",Ct))}async function en(ne,we){const Ee=M(ne),Be=!Ee&&c.has(ne);c.delete(ne);try{ot(ne,we?.urlMode??"push"),e.sessionLoading=!Ee&&!Be,m(ne),e.permission=X(ne),te(),e.unreadBySession[ne]&&(e.unreadBySession={...e.unreadBySession,[ne]:!1},j({[ne]:!1})),fe();const et=e.sessions.find(pt=>pt.id===ne);if(et){const pt=C(et);e.activeWorkspaceId!==pt&&Fn(pt)}if(Ee){if(await _(ne)==="not-found")return}else if(await w(ne)==="not-found")return;F(ne)}catch(et){r("selectSession",et,{sessionId:ne})}finally{e.activeSessionId===ne&&(e.sessionLoading=!1)}}async function tn(ne,we,Ee){const Be=H7(ne);e.inFlightBySession={...e.inFlightBySession,[ne]:!0};const et=x();try{const pt=St(),jt=[];we&&jt.push({type:"text",text:we});for(const zn of Ee??[])zn.kind==="video"?jt.push({type:"video",source:{kind:"file",fileId:zn.fileId}}):zn.kind==="file"?jt.push({type:"file",fileId:zn.fileId,name:zn.name??"",mediaType:zn.mediaType||"application/octet-stream",size:zn.size??0}):jt.push({type:"image",source:{kind:"file",fileId:zn.fileId}});if(jt.length===0)return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},"rejected";const Zt={id:et,sessionId:ne,role:"user",content:jt,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,zn=>[...zn,Zt]);const Vt=e.sessions.find(zn=>zn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=e.planModeBySession[ne]??!1,Vn=e.dynamicWorkflowModeBySession[ne]??!1,Ht=e.goalModeBySession[ne]??!1;if(Ht&&we)try{await pt.updateSession(ne,{goalObjective:we.trim()})}catch(zn){return r("createGoal",zn,{sessionId:ne}),e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,Ns=>Ns.some(rs=>rs.id===et)?Ns.filter(rs=>rs.id!==et):Ns),"rejected"}const Tn=await pt.submitPrompt(ne,{content:jt,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:on,dynamicWorkflowMode:Vn});return Ht&&(e.goalModeBySession={...e.goalModeBySession,[ne]:!1},A()),e.promptIdBySession={...e.promptIdBySession,[ne]:Tn.promptId},k(ne,zn=>{const Ns=zn.findIndex(_l=>_l.id===et);if(Ns===-1)return zn;const rs=[...zn];return rs[Ns]={...rs[Ns],promptId:rs[Ns].promptId??Tn.promptId},rs}),y()?.bindNextPromptId(ne,Tn.promptId),"ok"}catch(pt){return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,jt=>jt.some(Zt=>Zt.id===et)?jt.filter(Zt=>Zt.id!==et):jt),r("sendPrompt",pt,{sessionId:ne}),ol(pt)?"rejected":"uncertain"}finally{D7(ne,Be)}}async function eo(ne,we){const Ee=e.activeSessionId;if(Ee){if(a.value!=="idle"||e.inFlightBySession[Ee]){kt(ne,we);return}if((e.queuedBySession[Ee]?.length??0)>0){kt(ne,we),It(Ee);return}await tn(Ee,ne,we)}}const Ro=new Map;function Ls(ne,we){const Ee=(Ro.get(ne)??Promise.resolve()).catch(()=>{}).then(we);return Ro.set(ne,Ee),Ee.finally(()=>{Ro.get(ne)===Ee&&Ro.delete(ne)})}function Do(ne,we){const Ee=e.activeSessionId;return Ee?Ls(Ee,()=>Ve(Ee,ne,we)):Promise.resolve()}async function Ve(ne,we,Ee){const Be=e.queuedBySession[ne]??[],et=[],pt=[];for(const Wt of Be){const on=Wt.text.trim();on&&et.push(on),Wt.attachments?.length&&pt.push(...Wt.attachments)}const jt=we.trim();if(jt&&et.push(jt),Ee?.length&&pt.push(...Ee),et.length===0&&pt.length===0||(Be.length>0&&(e.queuedBySession={...e.queuedBySession,[ne]:[]}),await We(ne,et.join(` +`):e}let jm=null,pwe;function hwe(){return jm===null&&(jm=new Intl.Segmenter(pwe,{granularity:"word"})),jm}const mwe=/\p{Script=Arabic}/u,B1=/\p{M}/u,f9=/\p{Nd}/u;function IC(e){return mwe.test(e)}function LC(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Rr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if(LC(s))return!0;t++;continue}}if(LC(n))return!0}}return!1}function gwe(e){const t=Lf(e);return t!==null&&(p9.has(t)||V0.has(t))}const vwe=new Set([" "," ","⁠","\uFEFF"]),ywe=new Set(["-","‐","–","—"]);function wwe(e){const t=Lf(e);return t!==null&&vwe.has(t)}function kwe(e){const t=Lf(e);return t!==null&&ywe.has(t)}function HN(e,t){return wwe(e)?!1:t?!(gwe(e)||kwe(e)):!0}const p9=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),t6=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),h9=new Set(["'","’"]),V0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),bwe=new Set([":",".","،","؛"]),_we=new Set(["၏"]),xwe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Swe(e){if(m9(e))return!0;let t=!1;for(const n of e){if(V0.has(n)||o6(n)){t=!0;continue}if(!(t&&B1.test(n)))return!1}return t}function Cwe(e){for(const t of e)if(!p9.has(t)&&!V0.has(t))return!1;return e.length>0}function Mwe(e){if(m9(e))return!0;for(const t of e)if(!t6.has(t)&&!h9.has(t)&&!B1.test(t)&&!o6(t))return!1;return e.length>0}function m9(e){let t=!1;for(const n of e)if(!(n==="\\"||B1.test(n))){if(t6.has(n)||V0.has(n)||h9.has(n)){t=!0;continue}return!1}return t}function n6(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function Lf(e){if(e.length===0)return null;const t=n6(e,e.length);return e.slice(t)}function Awe(e){for(const t of e)if(!B1.test(t))return t;return null}function Twe(e){for(let t=e.length;t>0;){const n=n6(e,t),o=e.slice(n,t);if(!B1.test(o))return o;t=n}return null}const Ewe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Iwe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function o6(e){const t=e.codePointAt(0);return t!==void 0&&Iwe(t,Ewe)}function Lwe(e){const t=Twe(e);return t!==null&&o6(t)}function $we(e){const t=Awe(e);return t!==null&&f9.test(t)}function Nwe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(B1.test(o)){n--;continue}if(t6.has(o)||h9.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function zwe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function $C(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function NC(e,t){return e&&t!==null&&bwe.has(t)}function Bwe(e){const t=Lf(e);return t!==null&&_we.has(t)}function Rwe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function F7(e){let t=e.length;for(;t>0;){const n=n6(e,t),o=e.slice(n,t);if(xwe.has(o))return!0;if(!V0.has(o))return!1;t=n}return!1}function Pwe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const Fwe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function ar(e){return e.length===1?e[0]:e.join("")}function jwe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),ar(n)}function Owe(e,t,n,o){if(!Fwe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=Pwe(u,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){l.push(u),c+=u.length;continue}i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length}return i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),s}function j7(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Hwe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Dwe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:Hwe.test(n)&&t+1=e.len||j7(e.kinds[r]))continue;const a=[],c=e.starts[r];let u=r;for(;u0&&(t.push(ar(a)),n.push(!0),o.push("text"),s.push(c),i=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const Uwe=new Set([":","-","/","×",",",".","+","–","—"]),Zwe=/[\p{P}\p{S}\p{Co}]/u,Kwe=/\p{Emoji_Presentation}/u,Gwe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function Ywe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function DN(e){const t=e.charCodeAt(0);return t<128?Ywe(t):!Gwe.has(e)&&!Kwe.test(e)&&Zwe.test(e)}function zC(e){let t=!1;for(const n of e)if(!B1.test(n)){if(!DN(n))return!1;t=!0}return t}function Xwe(e){for(let t=e.length;t>0;){const n=n6(e,t),o=e.slice(n,t);if(B1.test(o)){t=n;continue}return DN(o)||o6(o)}return!1}function Jwe(e,t,n,o){const s=!t&&zC(e),i=!o&&zC(n),l=Lwe(e),r=(t||l)&&Xwe(e);return!s&&!i&&!r||Rr(e)||Rr(n)?!1:(t||s||l)&&(o||i)}function VN(e){for(const t of e)if(f9.test(t))return!0;return!1}function K5(e){if(e.length===0)return!1;for(const t of e)if(!(f9.test(t)||Uwe.has(t)))return!1;return!0}function Qwe(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(ar(c)),n.push(d),o.push("text"),s.push(e.starts[i]),i=u;continue}}t.push(l),n.push(a),o.push(r),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function tke(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let c=0;c0&&a[D]==="text"&&T&&f[D]&&h[D]||L&&s>0&&a[D]==="text"&&Cwe(z.text)&&f[D]||L&&s>0&&a[D]==="text"&&m[D]?M():L&&s>0&&a[D]==="text"&&z.isWordLike&&$&&k[D]?(M(),r[D]=!0):E!==null&&s>0&&a[D]==="text"&&u[D]===E?d[D]=(d[D]??1)+1:L&&!z.isWordLike&&s>0&&a[D]==="text"&&!f[D]&&(Swe(z.text)||z.text==="-"&&r[D])?M():(i[s]=z.text,l[s]=[z.text],r[s]=z.isWordLike,a[s]=z.kind,c[s]=z.start,u[s]=E,d[s]=E===null?0:1,f[s]=T,p[s]=$,h[s]=j,m[s]=H,k[s]=NC($,C),s++)}for(let P=0;Pnull);let y=-1;for(let P=s-1;P>=0;P--){const z=i[P];if(z.length!==0){if(a[P]==="text"&&!r[P]&&y>=0&&a[y]==="text"&&(Mwe(z)||z==="-"&&$we(i[y]))){const L=x[y]??[];L.push(z),x[y]=L,c[y]=c[P],i[P]="";continue}y=P}}for(let P=0;P=0&&!HN(t.texts[f-1],n)&&d(f),r<0&&(r=f),a=a||Rr(p);continue}d(f),o.push(p),s.push(t.isWordLike[f]),i.push(h),l.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:l}}function rke(e,t,n="normal",o="normal"){const s=uwe(n),i=s.mode==="pre-wrap"?fwe(e):dwe(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=ske(i,t,s),r=o==="keep-all"?lke(i,l,t.breakKeepAllAfterPunctuation):l;return{normalized:i,chunks:ike(r,s),...r}}let $c=null;const BC=new Map;let Nc=null;const ake=96,cke=/\p{Emoji_Presentation}/u,uke=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Om=null;const RC=new Map;function g9(){if($c!==null)return $c;if(typeof OffscreenCanvas<"u")return $c=new OffscreenCanvas(1,1).getContext("2d"),$c;if(typeof document<"u")return $c=document.createElement("canvas").getContext("2d"),$c;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function dke(e){let t=BC.get(e);return t||(t=new Map,BC.set(e,t)),t}function s1(e,t){let n=t.get(e);return n===void 0&&(n={width:g9().measureText(e).width,containsCJK:Rr(e)},t.set(e,n)),n}function s6(){if(Nc!==null)return Nc;if(typeof navigator>"u")return Nc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Nc;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Nc={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Nc}function fke(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function WN(){return Om===null&&(Om=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Om}function pke(e){return cke.test(e)||e.includes("️")}function hke(e){return uke.test(e)}function mke(e,t){let n=RC.get(e);if(n!==void 0)return n;const o=g9();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const l=i.getBoundingClientRect().width;document.body.removeChild(i),s-l>.5&&(n=s-l)}return RC.set(e,n),n}function gke(e){let t=0;const n=WN();for(const o of n.segment(e))pke(o.segment)&&t++;return t}function vke(e,t){return t.emojiCount===void 0&&(t.emojiCount=gke(e)),t.emojiCount}function M0(e,t,n){return n===0?t.width:t.width-vke(e,t)*n}function yke(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=WN(),l=[];for(const u of i.segment(e))l.push(u.segment);if(l.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const u=[];for(const d of l){const f=s1(d,n);u.push(M0(d,f,o))}return t.breakableFitAdvances=u,t.breakableFitAdvances}if(s==="pair-context"||l.length>ake){const u=[];let d=null,f=0;for(const p of l){const h=s1(p,n),m=M0(p,h,o);if(d===null)u.push(m);else{const k=d+p,x=s1(k,n);u.push(M0(k,x,o)-f)}d=p,f=m}return t.breakableFitAdvances=u,t.breakableFitAdvances}const r=[];let a="",c=0;for(const u of l){a+=u;const d=s1(a,n),f=M0(a,d,o);r.push(f-c),c=f}return t.breakableFitAdvances=r,t.breakableFitAdvances}function wke(e,t){const n=g9();n.font=e;const o=dke(e),s=fke(e),i=t?mke(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function kke(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function qN(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function UN(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function v9(e,t){return t===0?0:e+t}function xke(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Ske(e,t,n,o,s){const i=t==="tab"?s+xke(e,n):e.lineEndFitAdvances[n];return v9(o,i)}function PC(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return v9(o,s)}function FC(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return v9(o,i)}function Cke(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Mke(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function G5(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const l=e.kinds[i];if(!(l==="space"||l==="zero-width-break"||l==="hard-break")){if(l==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Tke(e,t,n,o,s,i){return t+Ake(e,n,o,s,i)}function Eke(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l}=e;if(o.length===0)return 0;const a=s6().lineFitEpsilon,c=t+a;let u=0,d=0,f=!1,p=0,h=0,m=0,k=0,x=-1,y=0;function w(){x=-1,y=0}function _(T=m,$=k,C=d){u++,n?.(C,p,h,T,$),d=0,f=!1,w()}function A(T,$){f=!0,p=T,h=0,m=T+1,k=0,d=$}function P(T,$,C){f=!0,p=T,h=$,m=T,k=$+1,d=C}function z(T,$){if(!f){A(T,$);return}d+=$,m=T+1,k=0}function L(T,$){const C=i[T],j=l[T]??null;let H=j===null?-1:G5(j,0,$+1),D=-1,M=0,R=$;for(;Rc){if(j!==null&&D>$){_(T,D,M),R=D,H=G5(j,H,R+1),D=-1,M=0;continue}_(),P(T,R,O)}else d+=O,m=T,k=R+1;const U=R+1;j!==null&&j[H]===U&&(D=U,M=d,H++),R++}f&&m===T&&k===C.length&&(m=T+1,k=0)}let E=0;for(;E=o.length));){const T=o[E],$=s[E],C=qN($);if(!f){T>c&&i[E]!==null?L(E,0):A(E,T),C&&(x=E+1,y=d-T),E++;continue}if(d+T>c){if(C){z(E,T),_(E+1,0,d-T),E++;continue}if(x>=0){if(m>x||m===x&&k>0){_();continue}_(x,0,y);continue}if(T>c&&i[E]!==null){_(),L(E,0),E++;continue}_();continue}z(E,T),C&&(x=E+1,y=d-T),E++}return f&&_(),u}function Ike(e,t,n){if(e.simpleLineWalkFastPath)return Eke(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l,discretionaryHyphenWidth:r,chunks:a}=e;if(o.length===0||a.length===0)return 0;const c=s6(),u=c.lineFitEpsilon,d=t+u;let f=0,p=0,h=!1,m=0,k=0,x=0,y=0,w=-1,_=0,A=0,P=null;function z(){w=-1,_=0,A=0,P=null}function L(){return P==="soft-hyphen"&&w===x&&y===0?A:p}function E(M=x,R=y,O){f++,n!==void 0&&n(Tke(e,O??L(),m,k,M,R),m,k,M,R),p=0,h=!1,z()}function T(M,R){h=!0,m=M,k=0,x=M+1,y=0,p=R}function $(M,R,O){h=!0,m=M,k=R,x=M,y=R+1,p=O}function C(M,R){if(!h){T(M,R);return}p+=R,x=M+1,y=0}function j(M,R,O,U,Z,q){if(!R)return;const te=PC(e,M,O,Z),ee=FC(e,M,O,Z,U);w=O+1,_=p-q+te,A=p-q+ee,P=M}function H(M,R){const O=i[M],U=l[M]??null;let Z=U===null?-1:G5(U,0,R+1),q=-1,te=0,ee=R;for(;eed){if(U!==null&&q>R){E(M,q,te),ee=q,Z=G5(U,Z,ee+1),q=-1,te=0;continue}E(),$(M,ee,J)}else p=me,x=M,y=ee+1}const se=ee+1;U!==null&&U[Z]===se&&(q=se,te=p,Z++),ee++}h&&x===M&&y===O.length&&(x=M+1,y=0)}function D(M){f++,n?.(0,M.startSegmentIndex,0,M.consumedEndSegmentIndex,0),z()}for(let M=0;M=R.endSegmentIndex));){const U=s[O],Z=qN(U),q=_ke(e,h,O),te=U==="tab"?bke(p+q,e.tabStopAdvance):o[O],ee=q+te,J=Ske(e,U,O,q,te);if(U==="soft-hyphen"){h&&(x=O+1,y=0,w=O+1,_=p+r,A=p+r,P=U),O++;continue}if(!h){J>d&&i[O]!==null?H(O,0):T(O,te),j(U,Z,O,te,q,ee),O++;continue}if(p+J>d){const Q=p+PC(e,U,O,q),me=p+FC(e,U,O,q,te);if(P==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&_<=d){E(w,0,A);continue}if(Z&&Q<=d){C(O,ee),E(O+1,0,me),O++;continue}if(w>=0&&_<=d){if(x>w||x===w&&y>0){E();continue}const xe=w;E(xe,0,A),O=xe;continue}if(J>d&&i[O]!==null){E(),H(O,0),O++;continue}E();continue}C(O,ee),j(U,Z,O,te,q,ee),O++}if(h){const U=w===R.consumedEndSegmentIndex?A:p;E(R.consumedEndSegmentIndex,0,U)}}return f}let Hm=null;function y9(){return Hm===null&&(Hm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Hm}function Lke(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function $ke(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=F7(d),r=t6.has(d)}function u(d,f){o.push(d),i=i||f;const p=F7(d);d.length===1&&V0.has(d)?l=l||p:l=p,r=!1}for(const d of y9().segment(e)){const f=d.segment,p=Rr(f);if(o.length===0){c(f,d.index,p);continue}if(r||p9.has(f)||V0.has(f)||t.carryCJKAfterClosingQuote&&p&&l){u(f,p);continue}if(!i&&!p){u(f,p);continue}a(),c(f,d.index,p)}return a(),n}function Nke(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(a,c){const u=t[a].start,d=c=0&&!HN(t[a-1].text,n)&&r(a),s<0&&(s=a),i=i||Rr(c.text)}return r(t.length),o}function jC(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=y9();for(const s of o.segment(e))n++;return n}function zke(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Bke(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of y9().segment(e))n++,zke(o.segment)&&t.push(n);return t.length===0?null:t}function Rke(e,t,n){return t>1?e+(t-1)*n:e}function Pke(e,t,n,o,s){const i=s6(),{cache:l,emojiCorrection:r}=wke(t,hke(e.normalized)),a=M0("-",s1("-",l),r)+(s===0?0:s*2),u=M0(" ",s1(" ",l),r)*8,d=s!==0;if(e.len===0)return Lke();const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=n?[]:null,y=[],w=[],_=[],A=n?[]:null,P=Array.from({length:e.len});function z($,C,j,H,D,M,R,O,U){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(j),h.push(H),m.push(D),x?.push(M),y.push(R),w.push(O),d&&_.push(U),A!==null&&A.push($)}function L($,C,j,H,D){const M=s1($,l),R=d?jC($,C):0,O=Rke(M0($,M,r),R,s),U=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:O,Z=U===0?0:U+(R>0?s:0),q=C==="space"||C==="zero-width-break"?0:O;if(D&&H&&$.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":K5($)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const ee=yke($,M,l,r,te),J=ee===null||o==="keep-all"?null:Bke($);z($,O,Z,q,C,j,ee,J,R);return}z($,O,Z,q,C,j,null,null,R)}for(let $=0;${n>t&&(t=n)}),t}function Dke(e){const t=e.toLowerCase(),n=[];let o=0;for(const s of e){const i=s.toLowerCase().length;for(let l=0;l=0&&ao[0]-s[0]),n=[];for(const o of t){const s=n.at(-1);s&&o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):n.push([...o])}return n}function HC(e,t){if(!t||t.length===0||e.length===0)return[{text:e,hit:!1}];const n=[];let o=0;for(const[s,i]of Vke(t)){const l=Math.max(0,Math.min(s,e.length)),r=Math.max(l,Math.min(i,e.length));r<=l||(l>o&&n.push({text:e.slice(o,l),hit:!1}),n.push({text:e.slice(l,r),hit:!0}),o=r)}return o0?n:[{text:e,hit:!1}]}function DC(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function Wke(e,t){const n=e.toLowerCase();let o=-1,s=-1,i=0;for(let l=0;l0,a.value=w.scrollTop+w.clientHeight{const w={},_="var(--menu-scroll-fade)";let A;return r.value&&a.value?A=`linear-gradient(to bottom, transparent 0, black ${_}, black calc(100% - ${_}), transparent 100%)`:r.value?A=`linear-gradient(to bottom, transparent, black ${_})`:a.value&&(A=`linear-gradient(to top, transparent, black ${_})`),A&&(w.maskImage=A,w.WebkitMaskImage=A),u.value&&(w.maxHeight=u.value),Object.keys(w).length>0?w:void 0}),p=B(()=>{const w=c.value;return w?{top:`${w.top}px`,height:`${w.height}px`}:void 0});function h(){const w=t.value,_=n.value,A=w?.offsetParent;if(!w||!_||!A)return;const P=getComputedStyle(w),z=zd(w,"--space-2",8),L=(parseFloat(P.paddingTop)||0)+(parseFloat(P.paddingBottom)||0),E=zd(_,o,Number.POSITIVE_INFINITY),T=window.visualViewport?.offsetTop??0,$=A.getBoundingClientRect().top-T-z-L;u.value=`${Math.max(Math.floor(Math.min(E,$)),0)}px`,yt(d)}function m(){const w=n.value;if(!w)return;const _=w.querySelectorAll('[role="option"]')[s?.value??-1];if(!_)return;const A=w.getBoundingClientRect(),P=_.getBoundingClientRect(),z=P.top-A.top+w.scrollTop,L=z+P.height;zw.scrollTop+w.clientHeight&&(w.scrollTop=L-w.clientHeight)}let k=null;function x(w){const _=n.value,A=c.value;if(!_||!A)return;w.preventDefault(),k?.();const P=w.pointerId;(w.target instanceof Element?w.target:null)?.setPointerCapture?.(P);const L=zd(_,"--menu-scrollbar-track-inset",0),E=_.clientHeight-L*2-A.height,T=_.scrollHeight-_.clientHeight,$=w.clientY,C=_.scrollTop,j=M=>{M.pointerId!==P||E<=0||(_.scrollTop=C+(M.clientY-$)/E*T)},H=M=>{M.pointerId===P&&k?.()};k=()=>{window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",H),window.removeEventListener("pointercancel",H),k=null},window.addEventListener("pointermove",j),window.addEventListener("pointerup",H),window.addEventListener("pointercancel",H)}let y=null;return In(()=>{if(typeof ResizeObserver=="function"&&n.value&&(y=new ResizeObserver(w=>{for(const _ of w)_.target===n.value?d():h()}),y.observe(n.value),l)){const w=t.value?.offsetParent;w&&y.observe(w)}l&&(window.addEventListener("resize",h),window.visualViewport?.addEventListener("resize",h),window.visualViewport?.addEventListener("scroll",h),h()),d()}),En(()=>{y?.disconnect(),y=null,k?.(),window.removeEventListener("resize",h),window.visualViewport?.removeEventListener("resize",h),window.visualViewport?.removeEventListener("scroll",h)}),Ke(()=>[s?.value,i?.value],()=>{yt(()=>{d(),m()})}),{atTop:r,atBottom:a,thumb:c,scrollStyle:f,thumbStyle:p,onScroll:d,onThumbPointerDown:x}}const Uke={key:0,class:"slash-empty",role:"status"},Zke=["id","aria-selected","onMouseenter","onMousedown"],Kke={class:"slash-name"},Gke={key:0,class:"slash-match"},Yke={class:"slash-desc"},Xke={key:0,class:"slash-desc-match"},Jke=Je({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{default:()=>[]},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);ca(i);const l=V(null),r=B(()=>n.activeIndex),a=B(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=ZN({menuEl:i,scrollEl:l,maxHeightVar:"--p-slash-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"}),h=B(()=>n.items.map((m,k)=>{const x=m.isSkill?m.desc:s(m.desc),y=n.ranges[k]??qke(n.query,m.name,x);return{item:m,namePieces:HC(m.name,y.name),desc:x,descPieces:HC(x,y.desc)}}));return(m,k)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Be(["slash-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.items.length===0?(g(),S("div",Uke,I(v(s)("composer.noCommands")),1)):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"slash-scroll",role:"listbox",style:Gt(v(u)),onScroll:k[0]||(k[0]=(...x)=>v(f)&&v(f)(...x))},[(g(!0),S(Ce,null,rt(h.value,(x,y)=>(g(),S("div",{id:`composer-slash-option-${y}`,key:`${x.item.name}-${y}`,class:Be(["slash-item",{active:y===n.activeIndex}]),role:"option","aria-selected":y===n.activeIndex,onMouseenter:w=>o("hover",y),onMousedown:xt(w=>o("select",x.item),["prevent"])},[b("span",Kke,[(g(!0),S(Ce,null,rt(x.namePieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",Gke,I(w.text),1)):(g(),S(Ce,{key:1},[He(I(w.text),1)],64))],64))),128))]),b("span",Yke,[(g(!0),S(Ce,null,rt(x.descPieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",Xke,I(w.text),1)):(g(),S(Ce,{key:1},[He(I(w.text),1)],64))],64))),128))])],42,Zke))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:1,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:k[1]||(k[1]=(...x)=>v(p)&&v(p)(...x))},null,36)):Y("",!0)],2))}}),VC=vt(Jke,[["__scopeId","data-v-9f177a8d"]]),Qke={key:0,class:"mention-state dim",role:"status"},ebe={key:1,class:"mention-state dim",role:"status"},tbe=["id","aria-selected","onMouseenter","onMousedown"],nbe=["innerHTML"],obe={class:"mention-name"},sbe={key:0,class:"mention-hit"},ibe={class:"mention-meta"},lbe=["innerHTML"],rbe={class:"mention-name"},abe={key:0,class:"mention-hit"},cbe={key:0,class:"mention-meta"},ube={key:0,class:"mention-hit"},dbe=Je({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean,default:!1},stale:{type:Boolean,default:!1},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);ca(i);const l=V(null),r=B(()=>n.activeIndex),a=B(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=ZN({menuEl:i,scrollEl:l,maxHeightVar:"--p-mention-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"});function h(w){const _=w.endsWith("/")?w.slice(0,-1):w,A=_.lastIndexOf("/");return A===-1?"":_.slice(0,A)}function m(w){const _=w.file.path.endsWith("/")?w.file.path.slice(0,-1):w.file.path;return Dm(w.file.name,w.file.matchPositions,Math.max(0,_.length-w.file.name.length))}function k(w){return Dm(h(w.file.path),w.file.matchPositions,0)}function x(w){return Dm(w.skill.name,w.matchPositions,0)}function y(w){return w.kind==="skill"?`skill:${w.skill.name}`:w.file.path}return(w,_)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Be(["mention-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.loading&&n.items.length===0?(g(),S("div",Qke,I(v(s)("mention.searching")),1)):n.items.length===0?(g(),S("div",ebe,I(v(s)("mention.noMatch")),1)):Y("",!0),n.loading&&n.items.length>0?(g(),ue(Zo,{key:2,class:"mention-spin",size:"sm",label:v(s)("mention.searching")},null,8,["label"])):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"mention-scroll",role:"listbox",style:Gt(v(u)),onScroll:_[0]||(_[0]=(...A)=>v(f)&&v(f)(...A))},[(g(!0),S(Ce,null,rt(n.items,(A,P)=>(g(),S("div",{id:`composer-mention-option-${P}`,key:y(A),class:Be(["mention-item",{active:P===n.activeIndex,stale:n.stale&&A.kind!=="skill"}]),role:"option","aria-selected":P===n.activeIndex,onMouseenter:z=>o("hover",P),onMousedown:xt(z=>o("select",A),["prevent"])},[A.kind==="skill"?(g(),S(Ce,{key:0},[b("span",{class:"mention-icon",innerHTML:v(Ll)("sparkles","sm"),"aria-hidden":"true"},null,8,nbe),b("span",obe,[(g(!0),S(Ce,null,rt(x(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",sbe,I(z.text),1)):(g(),S(Ce,{key:1},[He(I(z.text),1)],64))],64))),128))]),b("span",ibe,I(A.skill.description),1)],64)):(g(),S(Ce,{key:1},[b("span",{class:"mention-icon",innerHTML:v(ju)(A.file.path,A.file.name),"aria-hidden":"true"},null,8,lbe),b("span",rbe,[(g(!0),S(Ce,null,rt(m(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",abe,I(z.text),1)):(g(),S(Ce,{key:1},[He(I(z.text),1)],64))],64))),128))]),h(A.file.path)?(g(),S("span",cbe,[(g(!0),S(Ce,null,rt(k(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",ube,I(z.text),1)):(g(),S(Ce,{key:1},[He(I(z.text),1)],64))],64))),128))])):Y("",!0)],64))],42,tbe))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:3,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:_[1]||(_[1]=(...A)=>v(p)&&v(p)(...A))},null,36)):Y("",!0)],2))}}),WC=vt(dbe,[["__scopeId","data-v-0ac2fbc1"]]),KN=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/workflow",desc:"commands.dynamicWorkflow.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function fbe(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const Y5="skill:";function pbe(e){return e.startsWith(Y5)?e.slice(Y5.length):e}function GN(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Y5}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...KN,...t]}function hbe(e,t=KN){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let l=0;return i===n?l=3:i.startsWith(n)?l=2:i.includes(n)&&(l=1),{item:o,index:s,score:l}}).filter(({score:o})=>o>0).toSorted((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}function i6(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function YN(e){return e?.supportEfforts??[]}function mbe(e){return e[Math.floor(e.length/2)]}function lf(e){if(i6(e)==="unsupported")return"off";const t=YN(e);return t.length>0?e?.defaultEffort??mbe(t):"on"}function l6(e){const t=YN(e),n=i6(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function rf(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function gbe(e,t){return l6(e).includes(t)}function XN(e,t){return t==="off"?"off":t==="on"?lf(e):t}function w9(e,t){return t??lf(e)}function vbe(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function ybe(e,t,n){return!n||e===void 0?t:lf(e)}const X5=100;function wbe(e){const t=Fu(dn.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>X5?n.slice(-X5):n,s={[e]:o};return T1(dn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function kbe(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=V(wbe(s())),l=B(()=>i.value[s()??""]??[]);let r=-1,a="";function c(x){const y=s();if(r=-1,!y)return;const w=x.trim();if(!w)return;const _=i.value[y]??[];if(_.at(-1)===w)return;const A=[..._,w],P=A.length>X5?A.slice(-X5):A;i.value={...i.value,[y]:P},T1(dn.inputHistory,i.value)}function u(){const x=n.value;return x?(x.selectionStart??0)===0:!1}function d(x){t.value=x,yt(()=>{const y=n.value;if(!y)return;o();const w=x.length;y.setSelectionRange(w,w)})}function f(){const x=l.value;if(x.length!==0){if(r===-1)a=t.value,r=x.length-1;else if(r>0)r-=1;else return;d(x[r])}}function p(){if(r===-1)return;const x=l.value;r0}return Ke(s,()=>{r=-1}),{push:c,caretAtTextStart:u,recallOlder:f,recallNewer:p,resetBrowsing:h,isBrowsing:m,hasHistory:k}}function bbe(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:l,clearDraft:r}=e,a=V(!1),c=V([]),u=V(0);function d(){const p=t.value;p.startsWith("/")&&!p.includes(" ")?(c.value=hbe(p,GN(s())),u.value=0,a.value=c.value.length>0):a.value=!1}function f(p){if(a.value=!1,p.acceptsInput){t.value=`${p.name} `,yt(()=>{const h=n.value;if(!h)return;const m=t.value.length;h.setSelectionRange(m,m),h.focus(),o()});return}t.value="",r?.(),l(p.name),i(p.name)}return{open:a,items:c,active:u,update:d,select:f}}function _be(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s,searchSkills:i,insertSkill:l}=e,r=V(!1),a=V([]),c=V(0),u=V(!1),d=V(!1);let f=null,p=0;function h(){const y=t.value,w=n.value?.selectionStart??y.length;let _=w-1;for(;_>=0&&!/\s/.test(y[_]);)_--;_++;const A=y.slice(_,w);return A.startsWith("@")?{token:A.slice(1),start:_,end:w}:null}function m(){const y=h(),w=s(),_=i?.();if(!y||!w&&!_){r.value=!1,d.value=!1;return}const A=y.token;f!==null&&clearTimeout(f),f=setTimeout(async()=>{const P=++p;u.value=!0,r.value=!0,c.value=0,a.value.length>0&&(d.value=!0);try{const[z,L]=await Promise.all([w?w(A).catch(()=>[]):Promise.resolve([]),_?_(A).catch(()=>[]):Promise.resolve([])]);if(P!==p)return;a.value=[...z.map(E=>({kind:E.path.endsWith("/")?"folder":"file",file:{...E,matchPositions:OC(A,E.path)}})),...L.map(E=>({kind:"skill",skill:E,matchPositions:OC(A,E.name)}))]}catch{P===p&&(a.value=[])}finally{P===p&&(u.value=!1,d.value=!1)}},200)}function k(){f!==null&&clearTimeout(f),f=null,p++,r.value=!1,u.value=!1,d.value=!1}function x(y){const w=h();if(!w)return;if(r.value=!1,y.kind==="skill"){l?.(y.skill.name);return}const _=t.value,A=y.file.name||y.file.path.split(/[\\/]/).findLast(Boolean)||y.file.path,P=Hv({kind:y.kind,name:A,path:y.file.path});t.value=`${_.slice(0,w.start)}${P} ${_.slice(w.end)}`,yt(()=>{const z=n.value;if(!z)return;const L=w.start+P.length+1;z.setSelectionRange(L,L),z.focus(),o()})}return{open:r,items:a,active:c,loading:u,stale:d,update:m,select:x,close:k,getMentionToken:h}}function xbe(e){const{sessionId:t}=e;function n(c){return ls(_k(c))??""}function o(c,u){const d=_k(c);u?Es(d,u):y1(d)}const s=V(n(t())),i=V(null);function l(){const c=i.value;c&&(c.style.height="auto",c.style.height=`${c.scrollHeight}px`)}Ke(s,c=>{yt(l),o(t(),c)}),Ke(t,(c,u)=>{c!==u&&(o(u,s.value),s.value=n(c),yt(l))});function r(c){s.value=c,yt(()=>{const u=i.value;if(!u)return;u.focus();const d=c.length;u.setSelectionRange(d,d),l()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:l,loadForEdit:r,clearDraft:a}}function Sbe(e){const{uploadImage:t,sessionId:n}=e,o=V({}),s=B(()=>o.value[n()??""]??[]),i=V(null),l=V(null),r=V(!1);let a=0;function c(){return`att_${++a}`}function u(R,O){o.value={...o.value,[R]:O}}function d(R){if(R.previewUrl!==void 0)try{URL.revokeObjectURL(R.previewUrl)}catch{}}function f(R){return R.startsWith("image/")?"image":R.startsWith("video/")?"video":"file"}async function p(R){const O=t();if(!O)return;const U=n()??"";if(R.length!==0)for(const Z of R){const q=f(Z.type),te=c(),ee=q==="file"?void 0:URL.createObjectURL(Z),J={localId:te,name:Z.name,kind:q,previewUrl:ee,mediaType:Z.type||"application/octet-stream",size:Z.size,uploading:!0};u(U,[...o.value[U]??[],J]),O(Z,Z.name).then(se=>{const Q=o.value[U]??[];u(U,Q.map(me=>me.localId===te?{...me,uploading:!1,fileId:se?.fileId,mediaType:se?.mediaType??me.mediaType,error:se===null}:me))}).catch(()=>{const se=o.value[U]??[];u(U,se.map(Q=>Q.localId===te?{...Q,uploading:!1,error:!0}:Q))})}}function h(R){const O=n()??"",U=o.value[O]??[],Z=U.find(q=>q.localId===R);i.value?.localId===R&&(i.value=null),Z&&d(Z),u(O,U.filter(q=>q.localId!==R))}function m(R){i.value=R}function k(){i.value=null}function x(){l.value?.click()}function y(R){const O=R.target,U=Array.from(O.files??[]);p(U),O.value=""}function w(R){if(!t())return;const O=R.clipboardData;if(!O)return;const U=[],Z=new Set,q=(te,ee)=>{const J=`${te.size}:${te.type}:${ee}`;if(Z.has(J))return;Z.add(J);const se=te.type.split("/")[1]??"png",Q=ee.includes(".")?ee:`paste-${Date.now()}.${se}`;U.push(te instanceof File?te:new File([te],Q,{type:te.type}))};for(const te of Array.from(O.items))if(te.kind==="file"){const ee=te.getAsFile();ee&&q(ee,ee.name||`paste-${Date.now()}.${te.type.split("/")[1]??"png"}`)}for(const te of Array.from(O.files))q(te,te.name);U.length!==0&&(R.preventDefault(),p(U))}let _=0;function A(R){!t()||!Array.from(R.dataTransfer?.items??[]).some(U=>U.kind==="file")||(R.preventDefault(),R.stopPropagation(),r.value=!0)}function P(){r.value=!1}function z(R){if(_=0,r.value=!1,!t())return;R.preventDefault(),R.stopPropagation();const O=Array.from(R.dataTransfer?.files??[]);p(O)}function L(R){return Array.from(R.dataTransfer?.items??[]).some(O=>O.kind==="file")}function E(R){!t()||!L(R)||(R.preventDefault(),_+=1,r.value=!0)}function T(R){!t()||!L(R)||R.preventDefault()}function $(R){!t()||!L(R)||(_=Math.max(0,_-1),_===0&&(r.value=!1))}function C(R){if(_=0,r.value=!1,!t())return;R.preventDefault();const O=Array.from(R.dataTransfer?.files??[]);p(O)}function j(){const R=n()??"";for(const O of o.value[R]??[])d(O);u(R,[])}function H(R,O,U){const Z=o.value[R]??[];Z.some(q=>q.localId===O)&&u(R,Z.map(q=>q.localId===O?{...q,...U}:q))}function D(R){return fetch(R).then(O=>{if(!O.ok)throw new Error(`fetch failed: ${O.status}`);return O.blob()})}function M(R){const O=n()??"";for(const U of o.value[O]??[])d(U);u(O,[]);for(const U of R){const Z=c(),q=/^data:/i.test(U.url),te=/^blob:/i.test(U.url),ee=U.name??U.kind;if(U.fileId){const J={localId:Z,name:ee,kind:U.kind,previewUrl:U.kind==="file"?void 0:U.url,uploading:!1,fileId:U.fileId};u(O,[...o.value[O]??[],J]),U.kind!=="file"&&!q&&!te&&Ct().getFileBlob(U.fileId).then(se=>{const Q=URL.createObjectURL(se);if(!(o.value[O]??[]).some(xe=>xe.localId===Z)){URL.revokeObjectURL(Q);return}H(O,Z,{previewUrl:Q})}).catch(()=>{})}else{if(!U.url)continue;const J=t();if(!J)continue;const se={localId:Z,name:ee,kind:U.kind,previewUrl:U.url,uploading:!0};u(O,[...o.value[O]??[],se]),D(U.url).then(Q=>{const me=ee.includes(".")?ee:`${ee}.${Q.type.split("/")[1]??"bin"}`;return J(Q,me)}).then(Q=>{if(Q===null){const me=o.value[O]??[];u(O,me.filter(xe=>xe.localId!==Z));return}H(O,Z,{uploading:!1,fileId:Q.fileId})}).catch(()=>{const Q=o.value[O]??[];u(O,Q.filter(me=>me.localId!==Z))})}}}return Ke(n,()=>{i.value=null}),In(()=>{document.addEventListener("paste",w),document.addEventListener("dragenter",E),document.addEventListener("dragover",T),document.addEventListener("dragleave",$),document.addEventListener("drop",C)}),En(()=>{document.removeEventListener("paste",w),document.removeEventListener("dragenter",E),document.removeEventListener("dragover",T),document.removeEventListener("dragleave",$),document.removeEventListener("drop",C);for(const R of Object.values(o.value))for(const O of R)d(O);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:l,isDragOver:r,removeAttachment:h,openAttachmentPreview:m,closeAttachmentPreview:k,openFilePicker:x,handleFileInputChange:y,handleDragOver:A,handleDragLeave:P,handleDrop:z,clearAfterSubmit:j,loadAttachments:M}}const Cbe=640,Mbe=`(max-width: ${Cbe}px)`;function r6(){const e=V(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(Mbe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),En(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),En(()=>t.removeListener(n))),e}const Abe={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},Tbe=["stroke-dasharray","stroke-dashoffset"],Vm=7,Ebe=Je({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*Vm;return(o,s)=>(g(),S("svg",Abe,[b("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:Vm,fill:"none","stroke-width":"2.5"}),b("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:Vm,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,Tbe)]))}}),Ibe=vt(Ebe,[["__scopeId","data-v-97f3cf66"]]),Lbe=["aria-selected","onClick"],$be=Je({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("div",{class:Be(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[(g(!0),S(Ce,null,rt(e.options,i=>(g(),S("button",{key:i.value,class:Be(["ui-seg__item",{"is-on":i.value===e.modelValue}]),type:"button",role:"tab","aria-selected":i.value===e.modelValue,onClick:l=>n("update:modelValue",i.value)},I(i.label),11,Lbe))),128))],2))}}),di=vt($be,[["__scopeId","data-v-bffb3dae"]]),Wm=["pythinking","pyreasoning","pypondering","pyplanning","pyiterating","pyorchestrating","reasonating","pondercrafting","neuroning","logic-weaving","rubber-duckoning","token-wrangling","bug-whispering","stack-divining","gizmo-tinkering"],JN=6e4;function Nbe(e=Date.now()){const t=Math.floor(e/JN)%Wm.length;return Wm[t]??Wm[0]}function zbe(e=Date.now()){return`${Nbe(e)}…`}const af=["⣷","⣯","⣟","⡿","⢿","⣻","⣽","⣾"],yu=80,Bbe=["aria-label"],Rbe=Je({__name:"ActivitySpinner",props:{fast:{type:Boolean},label:{}},setup(e){const t=af.length*yu,n=yu/2,o=e,s=V(Date.now());let i;In(()=>{o.label===void 0&&(i=setInterval(()=>{s.value=Date.now()},JN))}),En(()=>{i!==void 0&&clearInterval(i)});const l=B(()=>o.label??zbe(s.value));function r(a){return{"--spinner-frame-delay":`${a*yu-t}ms`,"--spinner-frame-fast-delay":`${a*n-t/2}ms`}}return(a,c)=>(g(),S("span",{class:Be(["activity-spin",{"activity-spin--fast":e.fast}]),"aria-label":l.value,role:"img"},[(g(!0),S(Ce,null,rt(v(af),(u,d)=>(g(),S("span",{key:u,class:"activity-frame",style:Gt(r(d)),"aria-hidden":"true"},I(u),5))),128))],10,Bbe))}}),qm=vt(Rbe,[["__scopeId","data-v-c12d8332"]]),Pbe=["disabled"],Fbe={key:0,class:"leading"},jbe={class:"label"},Obe={key:1,class:"count"},Hbe={key:2,class:"trailing"},Dbe=Je({__name:"MenuRow",props:{count:{},active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("button",{type:"button",class:Be(["menu-row",{active:e.active,selected:e.selected,disabled:e.disabled}]),disabled:e.disabled},[t.$slots.leading?(g(),S("span",Fbe,[jn(t.$slots,"leading",{},void 0,!0)])):Y("",!0),b("span",jbe,[jn(t.$slots,"label",{},()=>[jn(t.$slots,"default",{},void 0,!0)],!0)]),e.count!==void 0?(g(),S("span",Obe,I(e.count),1)):Y("",!0),t.$slots.trailing?(g(),S("span",Hbe,[jn(t.$slots,"trailing",{},void 0,!0)])):Y("",!0)],10,Pbe))}}),zc=vt(Dbe,[["__scopeId","data-v-261bf74a"]]),Vbe=["aria-checked","disabled"],Wbe=Je({__name:"SwitchToggle",props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function s(){n.disabled||o("update:modelValue",!n.modelValue)}function i(l){n.disabled||l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),s())}return(l,r)=>(g(),S("button",{type:"button",class:"switch-toggle",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,onClick:s,onKeydown:i},[...r[0]||(r[0]=[b("span",{class:"track","aria-hidden":"true"},null,-1),b("span",{class:"thumb","aria-hidden":"true"},null,-1)])],40,Vbe))}}),qC=vt(Wbe,[["__scopeId","data-v-169237c7"]]);function qbe({initialized:e,onboardingCompleted:t,authReady:n}){return e?t?n?"app":"recovery":"first-run":"loading"}function Ube(e,t){return e||t}function Zbe(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const Kbe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function sl(e){const t=e.replaceAll("\\","/"),n=Kbe.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function Gbe(e,t){const n=sl(t.cwd);return e.find(o=>sl(o.root)===n)?.id??t.workspaceId??t.cwd}function Ybe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(sl)),l=new Map;for(const d of t){const f=sl(d.root);i.has(f)||l.has(f)||l.set(f,{...d})}for(const d of n){const f=d.cwd;if(!f)continue;const p=sl(f);i.has(p)||l.has(p)||l.set(p,{id:d.workspaceId??f,root:f,name:Zbe(f),sessionCount:0})}const r=new Map;for(const d of n){const f=Gbe(t,d);r.set(f,(r.get(f)??0)+1)}const a=[];for(const d of t){const f=sl(d.root);!i.has(f)&&!a.includes(f)&&a.push(f)}const c=[...l.keys()].filter(d=>!a.includes(d));c.sort((d,f)=>l.get(d).root.localeCompare(l.get(f).root));const u=[];for(const d of[...a,...c]){const f=l.get(d),p=r.get(f.id)??r.get(f.root)??0,h=s[f.id]===!1?p:Math.max(f.sessionCount,p);u.push({...f,sessionCount:h})}return u}function Xbe(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const o=new Set(t.map(l=>l.id)),s=new Set(t.filter(l=>l.role==="user").map(l=>l.id)),i=e.filter(l=>{const r=Date.parse(l.createdAt);return!(Number.isNaN(r)||r>=n||o.has(l.id)||l.role==="user"&&l.promptId!==void 0&&s.has(l.promptId))});return i.length>0?[...i,...t]:t}function Jbe(e,t){const n=new Set(e.map(c=>c.id)),o=t.filter(c=>c.kind==="subagent"&&!n.has(c.id));if(o.length===0)return e;const s=new Map(e.map(c=>[c.id,c])),i=new Map;for(const c of e)c.kind==="subagent"&&c.agentId!==void 0&&!i.has(c.agentId)&&i.set(c.agentId,c);const l=new Set,r=o.map(c=>{const u=(c.backgroundTaskId!==void 0?s.get(c.backgroundTaskId):void 0)??i.get(c.id)??(c.agentId!==void 0?i.get(c.agentId):void 0);if(u===void 0)return c;l.add(u.id);const d=c.status==="running"&&u.status!=="running",f=u.completedAt!==void 0&&u.completedAtEstimated!==!0;return{...c,status:c.status==="running"?u.status:c.status,subagentPhase:d?u.status==="completed"?"completed":u.status==="cancelled"?"cancelled":"failed":c.subagentPhase,agentId:c.agentId??u.agentId,model:c.model??u.model,thinkingEffort:c.thinkingEffort??u.thinkingEffort,routing:c.routing??u.routing,currentRoutingEnvRevision:c.currentRoutingEnvRevision??u.currentRoutingEnvRevision,completedAt:f?u.completedAt:c.completedAt??u.completedAt,completedAtEstimated:f?u.completedAtEstimated:c.completedAt!==void 0?c.completedAtEstimated:u.completedAtEstimated,outputPreview:u.outputPreview??c.outputPreview,outputBytes:u.outputBytes??c.outputBytes}});return[...e.filter(c=>!l.has(c.id)),...r]}function Qbe(e,t){if(e.length===0)return t;const n=new Map(t.map(l=>[l.id,l])),o=new Set(e.map(l=>l.id)),s=e.map(l=>{const r=n.get(l.id);return r?{...l,outputLines:r.outputLines,text:r.text}:l}),i=t.filter(l=>!o.has(l.id));return i.length===0?s:[...s,...i]}function e_e(e){const t=new Map,n=new Set;function o(i){const l=t.get(i);if(l!==void 0)return l;const r=(async()=>e(i))().finally(()=>{t.delete(i),n.delete(i)&&o(i)});return t.set(i,r),r}function s(i){if(t.has(i)){n.add(i);return}o(i)}return{run:o,request:s}}const t_e=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function n_e(e){return t_e.has(e.type)}const o_e=50,s_e=100,O7=32*1024,i_e={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,o_e)},cancelTask(e){clearTimeout(e)}};function l_e(e,t,n={}){const o=n.scheduler??i_e,s=Math.max(1,Math.floor(n.maxItemsPerSlice??s_e)),i=[];let l=0,r=null,a=null,c=0,u=!1;const d=()=>i.length-l,f=()=>{c+=1,r!==null&&(o.cancelFrame(r),r=null),a!==null&&(o.cancelTask(a),a=null)},p=()=>{l===i.length?(i.length=0,l=0):l>=1024&&(i.splice(0,l),l=0)};let h;const m=()=>{if(u||r!==null||a!==null||d()===0)return;const x=++c,y=()=>{x===c&&h()};r=o.requestFrame(y),a=o.requestTask(y)};h=()=>{f();let x=0;for(;!u&&x{if(!u){if(t(x)){const y=i.length>l?i.at(-1):void 0,w=y===void 0?void 0:n.coalesce?.(y,x);w===void 0?i.push(x):i[i.length-1]=w,m();return}if(d()===0){e(x);return}i.push(x),h()}});return k.flush=()=>{if(!u){for(f();!u&&l{if(u||d()===0)return;let y=l;for(let w=l;w{u||(u=!0,f(),i.length=0,l=0)},k}function H7(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function r_e(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=H7(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=O7)return[e];const s=[];let i=0;for(;ii&&/[\uD800-\uDBFF]/u.test(o.value[l-1])&&/[\uDC00-\uDFFF]/u.test(o.value[l])&&(l-=1);const r=o.value.slice(i,l);s.push({appEvent:{...t,delta:o.kind==="text"?{text:r}:{thinking:r}},meta:{...e.meta,stream:{...n,offset:n.offset+i}}}),i=l}return s}function a_e(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=H7(e.appEvent),i=H7(t.appEvent);if(n===void 0||o===void 0||s===void 0||i===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==o.turnId||n.kind!==o.kind||s.kind!==i.kind||n.kind!==s.kind||o.kind!==i.kind||o.offset!==n.offset+s.value.length||s.value.length+i.value.length>O7)return;const l=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:l}:{thinking:l}},meta:{...t.meta,stream:{...n}}}}const QN=[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],ez=new Set(["blue","mono"]),tz=new Set(["light","dark","system"]),nz=14,c_e=12,u_e=20,d_e={small:12,medium:14,large:16,xlarge:18};function f_e(){const e=ls(dn.accent);return e&&ez.has(e)?e:"blue"}function p_e(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.accent=e)}function h_e(){const e=ls(dn.colorScheme);return e&&tz.has(e)?e:"system"}function m_e(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?"#121212":e==="light"?"#ffffff":null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?"#121212":"#ffffff";o.setAttribute("content",n??i)})}function k9(e){return Number.isFinite(e)?Math.min(u_e,Math.max(c_e,Math.round(e))):nz}function b9(e){const t=k9(e);return t<=13?"small":t<=15?"medium":t<=17?"large":"xlarge"}function oz(e){return d_e[e]}function g_e(){const e=ls(dn.uiFontSize);return e===null?nz:k9(Number(e))}function v_e(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=b9(e))}const _9=V(h_e()),x9=V(f_e()),S9=V(g_e());Ke(_9,m_e,{immediate:!0});Ke(x9,p_e,{immediate:!0});Ke(S9,v_e,{immediate:!0});function y_e(e){tz.has(e)&&(_9.value=e,Es(dn.colorScheme,e))}function w_e(e){ez.has(e)&&(x9.value=e,Es(dn.accent,e))}function k_e(e){const t=k9(e);S9.value=t,Es(dn.uiFontSize,String(t))}const b_e=600,__e=250,a6=250,x_e=1e3,S_e=160,J5=V(!1);let k0=[],A0=null,Q5=-a6;function C_e(){k0=[],Q5=-a6,J5.value=!1,A0!==null&&(clearTimeout(A0),A0=null)}function M_e(){J5.value=!0,A0!==null&&clearTimeout(A0),A0=setTimeout(()=>{A0=null,k0=[],Q5=-a6,J5.value=!1},x_e)}function A_e(e){if(e<=0)return;const t=Date.now();k0.push({time:t,chars:e});const n=t-b_e;if(k0=k0.filter(r=>r.time>=n),t-Q5r+a.chars,0)/s*1e3>=S_e&&M_e()}function C9(){return{colorScheme:_9,accent:x9,uiFontSize:S9,fastMoon:J5,setColorScheme:y_e,setAccent:w_e,setUiFontSize:k_e,resetFastMoon:C_e,recordMoonDelta:A_e}}function T_e(e,t,n){return e==="idle"&&!t&&!n}function M9(e,t){const n=ls(e);return n===null?t:n==="1"}const A9=V(M9(dn.notifyOnComplete,!0)),T9=V(M9(dn.notifyOnQuestion,!1)),E9=V(M9(dn.notifyOnApproval,!1)),I9=V(typeof Notification<"u"?Notification.permission:"denied"),E_e="/favicon.ico";async function L9(e,t,n){if(!n){e.value=!1,Es(t,"0");return}if(typeof Notification>"u")return;let o=Notification.permission;if(o==="default")try{o=await Notification.requestPermission()}catch{}I9.value=o,o==="granted"&&(e.value=!0,Es(t,"1"))}function I_e(e){return L9(A9,dn.notifyOnComplete,e)}function L_e(e){return L9(T9,dn.notifyOnQuestion,e)}function $_e(e){return L9(E9,dn.notifyOnApproval,e)}function $9(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function N_e(e){return{title:Mo.global.t("settings.notifyTitle"),body:$9(e,Mo.global.t("settings.notifyFallback"))}}function z_e(e,t){return{title:Mo.global.t("settings.notifyQuestionTitle"),body:$9(t,e,Mo.global.t("settings.notifyQuestionFallback"))}}function B_e(e,t){return{title:Mo.global.t("settings.notifyApprovalTitle"),body:$9(t,e,Mo.global.t("settings.notifyApprovalFallback"))}}function N9(e,t,n,o){if(!e||typeof Notification>"u")return;const s=Notification.permission;if(s!=="denied"){if(s==="default"){Notification.requestPermission().then(i=>{I9.value=i,i==="granted"&&UC(t,n,o)});return}UC(t,n,o)}}function UC(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:E_e});o.onclick=()=>{try{window.focus()}catch{}e.onClick(),o.close()}}catch{}}function R_e(e,t){N9(A9.value,t,N_e(t.sessionTitle),`pythinker-complete-${e}-${t.promptId??Date.now()}`)}function P_e(e){N9(T9.value,e,z_e(e.sessionTitle,e.questionPreview),`pythinker-question-${e.questionId}`)}function F_e(e){N9(E9.value,e,B_e(e.sessionTitle,e.toolName),`pythinker-approval-${e.approvalId}`)}function j_e(){return{notifyOnComplete:A9,notifyOnQuestion:T9,notifyOnApproval:E9,notifyPermission:I9,setNotifyOnComplete:I_e,setNotifyOnQuestion:L_e,setNotifyOnApproval:$_e,maybeNotifyCompletion:R_e,maybeNotifyQuestion:P_e,maybeNotifyApproval:F_e}}function O_e(){return ls(dn.soundOnComplete)==="1"}const Wu=V(O_e());function H_e(){if(typeof window>"u")return;const e=window;return window.AudioContext??e.webkitAudioContext}let Um=null;function sz(){const e=H_e();if(!e)return null;if(Um===null)try{Um=new e}catch{return null}return Um}function iz(){if(!Wu.value)return;const e=sz();e!==null&&e.state==="suspended"&&e.resume().then(()=>{ia("sound: audio context resumed",{state:e.state})},t=>{ia("sound: audio context resume rejected",{error:String(t)})})}let ZC=!1;function D_e(){if(ZC||typeof window>"u")return;ZC=!0;const e=()=>{iz()};window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("keydown",e,{capture:!0})}D_e();function V_e(e){Wu.value=e,Es(dn.soundOnComplete,e?"1":"0"),e&&iz()}function KC(e,t,n,o,s){const i=e.createOscillator(),l=e.createGain();i.type="sine",i.frequency.value=t,i.connect(l),l.connect(e.destination);const r=e.currentTime+n;l.gain.setValueAtTime(1e-4,r),l.gain.exponentialRampToValueAtTime(s,r+.01),l.gain.exponentialRampToValueAtTime(1e-4,r+o),i.start(r),i.stop(r+o+.02)}function z9(){const e=sz();if(e===null){ia("sound: skipped, AudioContext unavailable");return}if(e.state!=="running"){ia("sound: skipped, context not running",{state:e.state}),e.state==="suspended"&&e.resume().then(()=>{ia("sound: context resumed for next time",{state:e.state})},t=>{ia("sound: resume rejected",{error:String(t)})});return}try{KC(e,880,0,.16,.18),KC(e,1320,.1,.22,.16),ia("sound: chime scheduled",{state:e.state})}catch(t){ia("sound: failed to play",{error:String(t)})}}function W_e(){Wu.value&&z9()}function q_e(){Wu.value&&z9()}function U_e(){Wu.value&&z9()}function Z_e(){return{soundOnComplete:Wu,setSoundOnComplete:V_e,maybePlayCompletionSound:W_e,maybePlayQuestionSound:q_e,maybePlayApprovalSound:U_e}}const K_e=1e3,G_e=4096,GC=32*1024;function Y_e(e,t){return e.length===t.length&&e.every((n,o)=>Object.is(n,t[o]))}function lz(e,t){const n=e,o=t,s=new Set([...Object.keys(n),...Object.keys(o)]);for(const i of s){const l=n[i],r=o[i];if(i==="outputLines"&&Array.isArray(l)&&Array.isArray(r)){if(!Y_e(l,r))return!1}else if(i==="routing"&&l&&r){if(!lz(l,r))return!1}else if(!Object.is(l,r))return!1}return!0}function X_e(e,t){const n=new Map(t.map(s=>[s.id,s])),o=e.map(s=>{const i=n.get(s.id);return i&&lz(s,i)?i:s});return o.length===t.length&&o.every((s,i)=>s===t[i])?t:o}function J_e(e,t){const n=new Map(t.map(o=>[o.id,o]));return e.map(o=>{const s=n.get(o.id);return{...o,outputLines:s?.outputLines,text:s?.text,outputPreview:o.outputPreview??s?.outputPreview,outputBytes:o.outputBytes??s?.outputBytes}})}function YC(e){return e.status!=="running"}function Q_e(e,t){let n=null,o=null,s=null,i=null,l=null,r,a;const c=new Set,u=V(0);function d(T){a!==T&&(a=T,c.clear())}function f(T,$){const C=e.tasksBySession[T]??[],j=Jbe(J_e($,C),C),H=X_e(j,C);H!==C&&(e.tasksBySession={...e.tasksBySession,[T]:H})}function p(T){for(const $ of T)YC($)&&c.add($.id)}function h(T){return T.some($=>YC($)&&!c.has($.id))}async function m(T){if(e.activeSessionId!==T)return;d(T),l?.abort();const $=new AbortController;l=$;try{const C=await Ct().listTasks(T,{withOutput:!0,outputBytes:GC,outputStatus:"all",signal:$.signal});if($.signal.aborted||e.activeSessionId!==T)return;p(C),f(T,C)}catch{return}finally{l===$&&(l=null)}}async function k(T,$){try{const C=Ct();let j=await C.listTasks(T,{withOutput:!0,outputBytes:G_e,outputStatus:"running",signal:$});if($.aborted||e.activeSessionId!==T)return;if(h(j)){if(j=await C.listTasks(T,{withOutput:!0,outputBytes:GC,outputStatus:"all",signal:$}),$.aborted||e.activeSessionId!==T)return;p(j)}f(T,j)}catch{return}}function x(T){return(e.tasksBySession[T]??[]).some($=>$.status==="running")}function y(T,$){n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,w(T)},$)}async function w(T){if(r!==T||e.activeSessionId!==T||!x(T)||typeof document<"u"&&document.visibilityState==="hidden")return;const $=new AbortController;i=$,await k(T,$.signal),i===$&&(i=null),!$.signal.aborted&&r===T&&e.activeSessionId===T&&x(T)&&y(T,K_e)}function _(){document.visibilityState!=="visible"||r===void 0||n!==null||i!==null||w(r)}typeof document<"u"&&document.addEventListener("visibilitychange",_);function A(){n!==null&&(clearTimeout(n),n=null),i?.abort(),i=null,r=void 0}function P(T){r!==T&&(A(),d(T),r=T,w(T))}const z=Ke(()=>t.value.some(T=>T.status==="running"),T=>{T&&s===null?s=setInterval(()=>{u.value=(u.value+1)%Number.MAX_SAFE_INTEGER},1e3):!T&&s!==null&&(clearInterval(s),s=null)},{immediate:!0}),L=Ke([()=>e.activeSessionId,()=>{const T=e.activeSessionId;return T===void 0?!1:x(T)}],([T,$],[C,j])=>{if(o!==null&&(clearTimeout(o),o=null),T!==C&&(l?.abort(),l=null,d(T)),T!==void 0&&$){P(T);return}if(A(),T===void 0||!j)return;const H=e.tasksBySession[T]??[];h(H)&&(o=setTimeout(()=>{o=null,e.activeSessionId===T&&!x(T)&&m(T)},1500))},{immediate:!0});function E(){typeof document<"u"&&document.removeEventListener("visibilitychange",_),z(),L(),A(),l?.abort(),l=null,o!==null&&clearTimeout(o),o=null,s!==null&&clearInterval(s),s=null,c.clear()}return{taskClock:B(()=>u.value),loadTasksForSession:m,dispose:E}}function exe(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function txe(e){const t=[];if(!e)return t;let n=0,o=0,s=!1;for(const i of e.split(` +`)){if(i.startsWith("diff --git")){s=!1;continue}if(!s&&exe(i))continue;if(i.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(i);a&&(n=Number.parseInt(a[1],10),o=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:i});continue}if(!s||i.startsWith("\\"))continue;const l=i.charAt(0),r=i.slice(1);l==="+"?(t.push({type:"add",text:r,newNo:o}),o+=1):l==="-"?(t.push({type:"del",text:r,oldNo:n}),n+=1):l===" "&&(t.push({type:"context",text:r,oldNo:n,newNo:o}),n+=1,o+=1)}return t}const D7="/sessions/";function XC(e){const{pathname:t}=e;if(!t.startsWith(D7))return;const n=t.slice(D7.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function nxe(e){return e===void 0||e.length===0?"/":`${D7}${encodeURIComponent(e)}`}const oxe=50,f0=5,sxe=40402,ixe=40410,lxe=40902,rxe=2e3;function Zm(e){return ol(e)&&e.code===lxe}const axe=40904;function JC(e){return ol(e)&&e.code===axe}const c0=ds({}),o4=ds({}),Km=ds({}),Gm=ds({}),br=ds(new Set),c6=new Map,W0=new Map,ep=new Map;let cxe=0;const p0=new Map,uxe=3;let QC=0;function dxe(){return QC+=1,`${Date.now().toString(36)}-${QC}`}function fxe(e){return{generation:c6.get(e)??0,pending:(W0.get(e)?.size??0)>0}}function V7(e){const t=++cxe;c6.set(e,t);const n=W0.get(e)??new Set;return n.add(t),W0.set(e,n),t}function W7(e,t){const n=W0.get(e);if(n===void 0||(n.delete(t),n.size>0))return;W0.delete(e);const o=ep.get(e);ep.delete(e),o?.()}function pxe(e){c6.delete(e),W0.delete(e),ep.delete(e),p0.delete(e)}function hxe(e,t){return!t.pending&&t.generation===(c6.get(e)??0)}function mxe(e,t){if((W0.get(e)?.size??0)===0){t();return}ep.set(e,t)}function gxe(e,t){const{t:n}=Mo.global,{confirm:o}=z1(),{taskPoller:s,sideChat:i,modelProvider:l,pushOperationFailure:r,activity:a,sessionsKnownEmpty:c,setSessions:u,updateSession:d,upsertSessionFront:f,appendSession:p,forgetSession:h,setActiveSessionId:m,updateSessionMessages:k,nextOptimisticMsgId:x,getEventConn:y,syncSessionFromSnapshot:w,reopenSession:_,hasLoadedMessages:A,refreshSessionStatus:P,refreshSessionGoal:z,persistSessionProfile:L,mergedWorkspaces:E,workspacesView:T,status:$,workspaceIdForSession:C,seedPermissionFromDaemonDefault:j,savePlanModeToStorage:H,saveDynamicWorkflowModeToStorage:D,saveGoalModeToStorage:M,draftModes:R,saveUnread:O,saveActiveWorkspaceToStorage:U,saveHiddenWorkspacesToStorage:Z,goalErrorMessage:q,resetFastMoon:te,initialized:ee,connectIssue:J,selectedDiffPath:se,fileDiffLines:Q,fileDiffLoading:me}=t;let xe=!1,Ye=0;function at(){const ne=e.config?.defaultPermissionMode;return ne==="auto"||ne==="yolo"||ne==="manual"?ne:"manual"}function X(ne){return e.permissionBySession[ne]??at()}async function oe(ne){if(e.messagesLoadingMoreBySession[ne])return;const ke=e.messagesBySession[ne];if(!ke||ke.length===0)return;const Te=ke[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!1};try{const Ne=await Ct().listMessages(ne,{beforeId:Te,pageSize:oxe}),Qe=[...Ne.items].toReversed();k(ne,ht=>[...Qe,...ht]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[ne]:Ne.hasMore}}catch(Ne){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!0},r("loadOlderMessages",Ne,{sessionId:ne})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!1}}}function F(ne){s.loadTasksForSession(ne),ye(ne),P(ne),z(ne),Object.prototype.hasOwnProperty.call(l.skillsBySession.value,ne)||l.loadSkillsForSession(ne)}async function K(ne){const ke=e.activeSessionId;if(ke){se.value=ne,Q.value=[],me.value=!0;try{const Ne=await Ct().getFileDiff(ke,ne);if(se.value!==ne)return;Q.value=txe(Ne.diff)}catch(Te){se.value===ne&&(Q.value=[]),console.warn("[loadFileDiff] diff unavailable for",ne,Te)}finally{se.value===ne&&(me.value=!1)}}}function he(){se.value=null,Q.value=[],me.value=!1}async function ye(ne){try{const Te=await Ct().getGitStatus(ne);e.gitStatusBySession={...e.gitStatusBySession,[ne]:Te}}catch{}}async function ve(){try{const ke=await Ct().getAuth();return e.authReady=ke.ready,e.defaultModel=ke.defaultModel,J.value=null,"proceed"}catch(ne){return ol(ne)&&(ne.code===401||ne.code===jN)?(J.value=null,"server-auth-required"):(J.value=(ne instanceof Error?ne.message:String(ne)).slice(0,140),"retry")}}async function ie(){let ne=!0;for(;;){const ke=await ve();if(ke!=="retry")return ke;ne&&(J.value=null,ne=!1),await new Promise(Te=>{setTimeout(Te,rxe)})}}async function de(){try{e.subagentModelPolicy=await Ct().getSubagentModelPolicy()}catch{e.subagentModelPolicy=null}}async function be(ne){e.subagentModelPolicySaving=!0;try{return e.subagentModelPolicy=await ne(e.subagentModelPolicy?.resourceVersion),!0}catch(ke){return ke instanceof R$?(e.subagentModelPolicy=ke.current,r("saveSubagentModelPolicy",ke,{message:ke.message}),!1):(r("saveSubagentModelPolicy",ke),!1)}finally{e.subagentModelPolicySaving=!1}}function Se(ne){return be(ke=>Ct().setSubagentModelPolicy(ne,ke))}function je(){return be(ne=>Ct().clearSubagentModelPolicy(ne))}async function et(){await de();try{const ne=Ct();e.config=await ne.getConfig(),j()}catch{}}function le(ne){ne!=="manual"&&ne!=="auto"&&ne!=="yolo"||e.activeSessionId||(e.permission=ne)}function fe(ne,ke){if(ke===ne)return;l.draftModel.value=null;const Te=e.activeSessionId;if(!Te)return;const Ne=e.sessions.find(Qe=>Qe.id===Te);Ne===void 0||Ne.messageCount>0||Ne.busy||e.inFlightBySession[Te]||!Ne.model||Ne.model.length===0||Ne.model!==ne||(d(Te,Qe=>({...Qe,model:ke})),L({model:ke},Te))}async function ge(ne){try{const ke=Ct(),Te=e.defaultModel,Ne=await ke.setConfig(ne);e.config=Ne,e.defaultModel=Ne.defaultModel??null;const Qe=Ne.defaultModel;return ne.defaultPermissionMode!==void 0&&le(Ne.defaultPermissionMode??ne.defaultPermissionMode),ne.defaultModel!==void 0&&Qe!==null&&Qe!==void 0&&Qe.length>0&&fe(Te,Qe),!0}catch(ke){return r("setConfig",ke),!1}}const Oe=100,Fe=30,pt=720*60*1e3;async function kt(){const ne=Ct(),ke=[];let Te,Ne;for(;;){let Qe;try{Qe=await ne.listSessions({pageSize:Oe,beforeId:Te,excludeEmpty:!0})}catch(ht){if(ke.length===0)throw ht;Ne=ht;break}if(ke.push(...Qe.items),!Qe.hasMore||Qe.items.length===0)break;Te=Qe.items.at(-1).id}return{sessions:ke,error:Ne}}function qt(ne){const ke=new Map(e.sessions.map(Te=>[Te.id,Te.usage]));u(ne.map(Te=>{const Ne=ke.get(Te.id);return Ne!==void 0&&T7(Te.usage)&&!T7(Ne)?{...Te,usage:Ne}:Te}))}function nn(ne){const ke=[...ne],Te=new Set(ke.map(Ne=>Ne.id));for(const Ne of e.sessions)Te.has(Ne.id)||(ke.push(Ne),Te.add(Ne.id));return ke.sort((Ne,Qe)=>new Date(Qe.updatedAt).getTime()-new Date(Ne.updatedAt).getTime()),ke}async function Jt(ne){const ke=Ct(),Te=[],Ne=Date.now(),Qe=Wt=>Ne-new Date(Wt.updatedAt).getTime();let ht,jt=!1,Zt=!0,Vt;for(;;){let Wt;try{Wt=await ke.listSessions({workspaceId:ne,pageSize:f0,beforeId:ht,excludeEmpty:!0})}catch(Ht){if(Zt)throw Ht;Vt=Ht,jt=!0;break}if(jt=Wt.hasMore,Wt.items.length===0)break;const on=Wt.items.at(-1),Vn=Qe(on)>=pt;if(!Zt&&Vn){const Ht=Wt.items.findIndex(zn=>Qe(zn)>=pt),Tn=Ht>=0?Ht+1:Wt.items.length;Te.push(...Wt.items.slice(0,Tn)),jt=Wt.hasMore||TnJt(Ht.id))),Te=[],Ne=new Set,Qe=new Map,ht=new Set;let jt;for(let Ht=0;Htht.has(Ht.id)).map(Ht=>Ht.root)),Vt=new Set(ne.map(Ht=>Ht.id));for(const Ht of e.sessions)!(Ht.workspaceId!==void 0&&Vt.has(Ht.workspaceId)?ht.has(Ht.workspaceId):Zt.has(Ht.cwd)||ht.has(C(Ht)))||Ne.has(Ht.id)||(Te.push(Ht),Ne.add(Ht.id));const Wt={},on={},Vn={};for(const{id:Ht}of ne){const Tn=Qe.get(Ht);if(Tn===void 0){const zn=e.sessionsHasMoreByWorkspace[Ht],Ns=e.sessionsCursorByWorkspace[Ht],rs=e.sessionsInitialCountByWorkspace[Ht];zn!==void 0&&(Wt[Ht]=zn),Ns!==void 0&&(on[Ht]=Ns),rs!==void 0&&(Vn[Ht]=rs);continue}Wt[Ht]=Tn.hasMore,on[Ht]=Tn.items.length>0?Tn.items.at(-1).id:void 0,Vn[Ht]=Math.max(Tn.items.length,f0)}return e.sessionsHasMoreByWorkspace=Wt,e.sessionsCursorByWorkspace=on,e.sessionsInitialCountByWorkspace=Vn,e.sessionsFullyLoaded=!1,Te.sort((Ht,Tn)=>new Date(Tn.updatedAt).getTime()-new Date(Ht.updatedAt).getTime()),ht.size>0&&r("load",jt),Te}function Dn(){const ne=++Ye;if(e.backend!=="v2")return;const ke={groupPageSize:f0,hasPrompt:!0};return{firstPage:Promise.resolve().then(()=>Ct().listSessionGroupsV2(ke)).then(Te=>({page:Te}),Te=>({error:Te})),input:ke,serial:ne}}function xn(ne,ke){const Te=new Map(ne.map(on=>[on.workspace.id,on])),Ne=new Map;for(const on of ne)on.workspace.cwd!==null&&Ne.set(sl(on.workspace.cwd),on);const Qe=[],ht=new Set,jt={},Zt={},Vt={},Wt=[];for(const on of e.workspaces){const Vn=Te.get(on.id)??Ne.get(sl(on.root));if(Vn===void 0){jt[on.id]=!ke,Zt[on.id]=void 0,Vt[on.id]=f0;continue}const Ht=[];for(const Tn of Vn.sessions){if(!Tn.lastPrompt||ht.has(Tn.id))continue;const zn={...Tn,cwd:Tn.cwd||on.root,workspaceId:on.id};Qe.push(zn),Ht.push(zn),ht.add(zn.id),(zn.busy||zn.pendingInteraction==="approval"||zn.pendingInteraction==="question")&&Wt.push(zn.id)}jt[on.id]=Vn.sessions.lengthnew Date(Vn.updatedAt).getTime()-new Date(on.updatedAt).getTime()),{loaded:Qe,hasMore:jt,cursors:Zt,counts:Vt,liveIds:Wt}}function $n(ne,ke){if(ke===void 0){e.sessionsHasMoreByWorkspace=ne.hasMore,e.sessionsCursorByWorkspace=ne.cursors,e.sessionsInitialCountByWorkspace=ne.counts;return}const Te={...e.sessionsHasMoreByWorkspace},Ne={...e.sessionsCursorByWorkspace},Qe={...e.sessionsInitialCountByWorkspace};for(const ht of e.workspaces)e.sessionsCursorByWorkspace[ht.id]===ke[ht.id]&&(Te[ht.id]=ne.hasMore[ht.id]??!1,Ne[ht.id]=ne.cursors[ht.id],Qe[ht.id]=ne.counts[ht.id]??f0);e.sessionsHasMoreByWorkspace=Te,e.sessionsCursorByWorkspace=Ne,e.sessionsInitialCountByWorkspace=Qe}async function Hn(ne,ke,Te){const Ne=[...ne.groups];let Qe=ne.nextPageToken;for(;Qe!==null;){if(ke.serial!==Ye)return;let Vt;try{Vt=await Ct().listSessionGroupsV2({...ke.input,pageToken:Qe})}catch(Wt){r("load",Wt);return}Ne.push(...Vt.groups),Qe=Vt.nextPageToken}if(ke.serial!==Ye)return;const ht=xn(Ne,!0),jt=new Set(ht.loaded.map(Vt=>Vt.id)),Zt=[...ht.loaded,...e.sessions.filter(Vt=>!jt.has(Vt.id))].sort((Vt,Wt)=>new Date(Wt.updatedAt).getTime()-new Date(Vt.updatedAt).getTime());if(qt(Zt),e.sessionsFullyLoaded){const Vt={};for(const Wt of e.workspaces)Vt[Wt.id]=!1;e.sessionsHasMoreByWorkspace=Vt}else $n(ht,Te.cursors);await Promise.allSettled(ht.liveIds.map(Vt=>P(Vt)))}async function bn(ne){if(e.workspaces.length===0){const ht=await kn();return ht===void 0?void 0:{sessions:ht,liveIds:[]}}const{page:ke,error:Te}=await ne.firstPage;if(ke===void 0){r("load",Te);return}const Ne=ke.nextPageToken===null,Qe=xn(ke.groups,Ne);return $n(Qe),e.sessionsFullyLoaded=!1,{sessions:Qe.loaded,liveIds:Qe.liveIds,finishInBackground:Ne?void 0:()=>{Hn(ke,ne,Qe)}}}async function Wn(ne){if(e.sessionsLoadingMoreByWorkspace[ne]||e.sessionsHasMoreByWorkspace[ne]===!1)return;const ke=e.sessionsCursorByWorkspace[ne];if(ke!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!0};try{const Te=await Ct().listSessions({workspaceId:ne,pageSize:Fe,beforeId:ke,excludeEmpty:!0}),Ne=new Set(e.sessions.map(ht=>ht.id)),Qe=Te.items.filter(ht=>!Ne.has(ht.id));Qe.length>0&&u([...e.sessions,...Qe]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[ne]:Te.items.length>0?Te.items.at(-1).id:ke},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[ne]:Te.hasMore}}catch(Te){r("loadMoreSessions",Te)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!1}}}}async function Pn(){if(e.sessionsFullyLoaded)return;const ne=await kt().catch(Ne=>(console.warn("[pythinker-web] loadAllSessions failed; search covers only loaded sessions",Ne),null));if(ne===null)return;const ke=ne.error===void 0?ne.sessions:nn(ne.sessions);if(qt(ke),e.sessionsFullyLoaded=ne.error===void 0,ne.error!==void 0)return;const Te={};for(const Ne of e.workspaces)Te[Ne.id]=!1;e.sessionsHasMoreByWorkspace=Te}async function Mn(){const ne=await Ct().getMeta().catch(()=>null);ne!==null&&(e.serverVersion=ne.serverVersion,e.availableOpenInApps=ne.openInApps,e.dangerousBypassAuth=ne.dangerousBypassAuth,e.backend=ne.backend,e.experimentalFlagStates=ne.experimentalFlagStates,e.serverCapabilities=ne.capabilities)}async function Nn(){const ne=Date.now();let ke="accepted";_s("app:load:start"),e.loading=!0;const Te=!ee.value;let Ne=!0;try{if(Te&&await ie()==="server-auth-required"){Ne=!1,ke="auth-required";return}const Qe=Ct();await Promise.all([Qe.getHealth().catch(()=>null),Mn(),l.loadModels()]),Te||await ve(),await et();const ht=Dn();await An();const jt=ht===void 0?void 0:await bn(ht),Zt=ht===void 0?await kn():jt?.sessions,Vt=Zt??e.sessions;Zt!==void 0&&qt(Zt),jt?.finishInBackground?.(),jt!==void 0&&await Promise.allSettled(jt.liveIds.map(Tn=>P(Tn)));const Wt=Vt[0],on=e.activeWorkspaceId;!(on!==null&&E.value.some(Tn=>Tn.id===on))&&Wt&&Fn(C(Wt)),Ut();const Ht=typeof window<"u"?XC(window.location):void 0;!e.activeSessionId&&Ht!==void 0&&(e.sessions.some(zn=>zn.id===Ht)||await dt(Ht))&&await en(Ht,{urlMode:"replace"}),!e.activeSessionId&&Vt.length>0&&await en(Vt[0].id,{urlMode:"replace"})}catch(Qe){ke="failed",r("load",Qe)}finally{e.loading=!1,Ne&&(ee.value=!0),_s("app:load:complete",{status:ke,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-ne})}}async function An(){try{const ne=Ct(),[ke,Te]=await Promise.all([ne.listWorkspaces().catch(()=>[]),ne.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=Qn(ke),e.fsHome=Te.home||null,e.recentRoots=Te.recentRoots}catch{}}function Qn(ne){const ke=g3();return Object.keys(ke).length===0?ne:ne.map(Te=>{const Ne=ke[Te.root];return Ne!==void 0?{...Te,name:Ne}:Te})}function Fn(ne){e.activeWorkspaceId=ne,U(ne)}function Qt(ne){Fn(ne);const ke=e.sessions.filter(Te=>C(Te)===ne);if(ke.length>0){const Te=ke[0];Te&&Te.id!==e.activeSessionId&&en(Te.id)}else m(void 0),ot(void 0,"push")}function uo(ne){const ke=g3()[ne.root],Te=ke!==void 0?{...ne,name:ke}:ne,Ne=sl(Te.root);e.hiddenWorkspaceRoots.some(jt=>sl(jt)===Ne)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(jt=>sl(jt)!==Ne),Z(e.hiddenWorkspaceRoots));const Qe=e.workspaces.findIndex(jt=>jt.id===Te.id||jt.root===Te.root);if(Qe===-1){e.workspaces=[Te,...e.workspaces];return}const ht=[...e.workspaces];ht[Qe]=Te,e.workspaces=ht}function Zn(ne){if(ne.type==="workspaceCreated"||ne.type==="workspaceUpdated"){uo(ne.workspace);return}const ke=e.workspaces.find(Ne=>Ne.id===ne.workspaceId)?.root??ne.root;if(ke&&!e.hiddenWorkspaceRoots.includes(ke)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,ke],Z(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Ne=>Ne.id!==ne.workspaceId&&Ne.root!==ke),e.activeWorkspaceId===ne.workspaceId||e.activeWorkspaceId===ke){const Ne=T.value[0]?.id??null;if(e.activeWorkspaceId=Ne,Ne)U(Ne);else try{y1(dn.activeWorkspace)}catch{}m(void 0),e.sessionLoading=!1,he(),ot(void 0,"replace")}}function Bo(){m(void 0),e.permission=at(),ot(void 0,"push")}function Un(ne){Fn(ne),Bo(),he()}async function hs(ne){const ke=E.value.find(Vn=>Vn.id===ne);if(!ke)return null;const Te=e.thinking,Ne=e.permission,Qe=Ct();let ht,jt=ke.root;try{const Vn=await Qe.addWorkspace({root:ke.root});ht=Vn.id,jt=Vn.root,uo(Vn)}catch{}const Zt=l.draftModel.value??void 0,Vt=await Qe.createSession({workspaceId:ht,cwd:jt,model:Zt});l.draftModel.value=null;const Wt=Zt!==void 0&&(!Vt.model||Vt.model.length===0)?{...Vt,model:Zt}:Vt;f(Wt),e.permissionBySession={...e.permissionBySession,[Vt.id]:Ne},Fn(Vt.workspaceId??ht??ne),await en(Vt.id);const on=Vt.id;return Te!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[on]:Te}),R.planMode&&(e.planModeBySession={...e.planModeBySession,[on]:!0},H()),R.dynamicWorkflowMode&&(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[on]:!0},D()),R.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[on]:!0},M()),R.planMode=!1,R.dynamicWorkflowMode=!1,R.goalMode=!1,on}async function Io(ne,ke,Te){if(!br.has(ne)){br.add(ne);try{const Ne=await hs(ne);if(!Ne)return;await tn(Ne,ke,Te)}catch(Ne){r("startSessionAndSendPrompt",Ne)}finally{br.delete(ne)}}}async function Rt(ne,ke,Te){if(!br.has(ne)){br.add(ne);try{const Ne=await hs(ne);if(!Ne)return;const Qe=e.planModeBySession[Ne]??!1,ht=e.dynamicWorkflowModeBySession[Ne]??!1,jt=e.sessions.find(Wt=>Wt.id===Ne),Zt=(jt?.model&&jt.model.length>0?jt.model:e.defaultModel)??void 0;if(!await L({model:Zt,planMode:Qe,dynamicWorkflowMode:ht,permissionMode:X(Ne)},Ne))return;await l.activateSkill(ke,Te,Ne)}catch(Ne){r("startSessionAndActivateSkill",Ne)}finally{br.delete(ne)}}}async function Jo(ne,ke){if(!br.has(ne)){br.add(ne);try{const Te=await hs(ne);if(!Te)return;await i.openSideChatOn(Te,ke)}catch(Te){r("startSessionAndOpenSideChat",Te)}finally{br.delete(ne)}}}async function Ls(ne){const ke=ne.trim();if(!ke)return!1;const Te=Ct();try{const Ne=await Te.addWorkspace({root:ke});return uo(Ne),Un(Ne.id),!0}catch(Ne){return console.warn("[pythinker-web] addWorkspaceByPath failed for",ke,Ne),!1}}async function $e(ne){try{return await Ct().browseFs(ne)}catch{return{path:"",parent:null,entries:[]}}}async function Ge(){try{return await Ct().getFsHome()}catch{return{home:"",recentRoots:[]}}}function ot(ne,ke){if(ke==="none"||typeof window>"u"||!window.history)return;const Te=nxe(ne);if(window.location.pathname!==Te)try{ke==="push"?window.history.pushState(null,"",Te):window.history.replaceState(null,"",Te)}catch{}}async function dt(ne){try{const ke=await Ct().getSession(ne);return e.sessions.some(Te=>Te.id===ke.id)||p(ke),!0}catch{return!1}}function Mt(){const ne=XC(window.location);if(ne===void 0){m(void 0);return}if(ne!==e.activeSessionId){if(e.sessions.some(ke=>ke.id===ne)){en(ne,{urlMode:"none"});return}(async()=>{if(await dt(ne)){await en(ne,{urlMode:"none"});return}const ke=e.sessions[0];ke?await en(ke.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))})()}}let Ft=!1;function Ut(){Ft||typeof window>"u"||(Ft=!0,window.addEventListener("popstate",Mt))}async function en(ne,ke){const Te=A(ne),Ne=!Te&&c.has(ne);c.delete(ne);try{ot(ne,ke?.urlMode??"push"),e.sessionLoading=!Te&&!Ne,m(ne),e.permission=X(ne),te(),e.unreadBySession[ne]&&(e.unreadBySession={...e.unreadBySession,[ne]:!1},O({[ne]:!1})),he();const Qe=e.sessions.find(ht=>ht.id===ne);if(Qe){const ht=C(Qe);e.activeWorkspaceId!==ht&&Fn(ht)}if(Te){if(await _(ne)==="not-found")return}else if(await w(ne)==="not-found")return;F(ne)}catch(Qe){r("selectSession",Qe,{sessionId:ne})}finally{e.activeSessionId===ne&&(e.sessionLoading=!1)}}async function tn(ne,ke,Te){const Ne=V7(ne);e.inFlightBySession={...e.inFlightBySession,[ne]:!0};const Qe=x();try{const ht=Ct(),jt=[];ke&&jt.push({type:"text",text:ke});for(const zn of Te??[])zn.kind==="video"?jt.push({type:"video",source:{kind:"file",fileId:zn.fileId}}):zn.kind==="file"?jt.push({type:"file",fileId:zn.fileId,name:zn.name??"",mediaType:zn.mediaType||"application/octet-stream",size:zn.size??0}):jt.push({type:"image",source:{kind:"file",fileId:zn.fileId}});if(jt.length===0)return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},"rejected";const Zt={id:Qe,sessionId:ne,role:"user",content:jt,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,zn=>[...zn,Zt]);const Vt=e.sessions.find(zn=>zn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=e.planModeBySession[ne]??!1,Vn=e.dynamicWorkflowModeBySession[ne]??!1,Ht=e.goalModeBySession[ne]??!1;if(Ht&&ke)try{await ht.updateSession(ne,{goalObjective:ke.trim()})}catch(zn){return r("createGoal",zn,{sessionId:ne}),e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,Ns=>Ns.some(rs=>rs.id===Qe)?Ns.filter(rs=>rs.id!==Qe):Ns),"rejected"}const Tn=await ht.submitPrompt(ne,{content:jt,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:on,dynamicWorkflowMode:Vn});return Ht&&(e.goalModeBySession={...e.goalModeBySession,[ne]:!1},M()),e.promptIdBySession={...e.promptIdBySession,[ne]:Tn.promptId},k(ne,zn=>{const Ns=zn.findIndex(_l=>_l.id===Qe);if(Ns===-1)return zn;const rs=[...zn];return rs[Ns]={...rs[Ns],promptId:rs[Ns].promptId??Tn.promptId},rs}),y()?.bindNextPromptId(ne,Tn.promptId),"ok"}catch(ht){return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,jt=>jt.some(Zt=>Zt.id===Qe)?jt.filter(Zt=>Zt.id!==Qe):jt),r("sendPrompt",ht,{sessionId:ne}),ol(ht)?"rejected":"uncertain"}finally{W7(ne,Ne)}}async function eo(ne,ke){const Te=e.activeSessionId;if(Te){if(a.value!=="idle"||e.inFlightBySession[Te]){bt(ne,ke);return}if((e.queuedBySession[Te]?.length??0)>0){bt(ne,ke),Lt(Te);return}await tn(Te,ne,ke)}}const Ro=new Map;function $s(ne,ke){const Te=(Ro.get(ne)??Promise.resolve()).catch(()=>{}).then(ke);return Ro.set(ne,Te),Te.finally(()=>{Ro.get(ne)===Te&&Ro.delete(ne)})}function Do(ne,ke){const Te=e.activeSessionId;return Te?$s(Te,()=>We(Te,ne,ke)):Promise.resolve()}async function We(ne,ke,Te){const Ne=e.queuedBySession[ne]??[],Qe=[],ht=[];for(const Wt of Ne){const on=Wt.text.trim();on&&Qe.push(on),Wt.attachments?.length&&ht.push(...Wt.attachments)}const jt=ke.trim();if(jt&&Qe.push(jt),Te?.length&&ht.push(...Te),Qe.length===0&&ht.length===0||(Ne.length>0&&(e.queuedBySession={...e.queuedBySession,[ne]:[]}),await qe(ne,Qe.join(` -`),pt)!=="rejected"||Be.length===0))return;const Vt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[...Be,...Vt]}}function it(ne){const we=e.activeSessionId;if(!we)return Promise.resolve();const Ee=(e.queuedBySession[we]??[])[ne];if(Ee===void 0)return Promise.resolve();const Be=Ee.id??Ee.text;return Ls(we,()=>Xe(we,Be))}async function Xe(ne,we){const Ee=e.queuedBySession[ne]??[],Be=Ee.findIndex(Wt=>(Wt.id??Wt.text)===we),et=Be>=0?Ee[Be]:void 0;if(et===void 0)return;const pt=et.attachments??[];if(et.text.trim().length===0&&pt.length===0)return;const jt=[...Ee];if(jt.splice(Be,1),e.queuedBySession={...e.queuedBySession,[ne]:jt},await We(ne,et.text,pt)!=="rejected"||!e.sessions.some(Wt=>Wt.id===ne))return;const Vt=[...e.queuedBySession[ne]??[]];Vt.splice(Math.min(Be,Vt.length),0,et),e.queuedBySession={...e.queuedBySession,[ne]:Vt}}async function We(ne,we,Ee){if(a.value==="idle"&&!e.inFlightBySession[ne])return tn(ne,we,Ee);const Be=[];we&&Be.push({type:"text",text:we});for(const Zt of Ee)Zt.kind==="video"?Be.push({type:"video",source:{kind:"file",fileId:Zt.fileId}}):Zt.kind==="file"?Be.push({type:"file",fileId:Zt.fileId,name:Zt.name??"",mediaType:Zt.mediaType||"application/octet-stream",size:Zt.size??0}):Be.push({type:"image",source:{kind:"file",fileId:Zt.fileId}});const et=x(),pt={id:et,sessionId:ne,role:"user",content:Be,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,Zt=>[...Zt,pt]);const jt=H7(ne);try{const Zt=St(),Vt=e.sessions.find(Vn=>Vn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=await Zt.submitPrompt(ne,{content:Be,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:e.planModeBySession[ne]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[ne]??!1});if(k(ne,Vn=>{const Ht=Vn.findIndex(zn=>zn.id===et);if(Ht===-1)return Vn;const Tn=[...Vn];return Tn[Ht]={...Tn[Ht],promptId:Tn[Ht].promptId??on.promptId},Tn}),on.status!=="queued")return e.promptIdBySession={...e.promptIdBySession,[ne]:on.promptId},y()?.bindNextPromptId(ne,on.promptId),"ok";try{await Zt.steerPrompts(ne,[on.promptId])}catch{return"ok"}return"ok"}catch(Zt){return k(ne,Vt=>Vt.filter(Wt=>Wt.id!==et)),r("steer",Zt,{sessionId:ne}),ol(Zt)?"rejected":"uncertain"}finally{D7(ne,jt)}}async function je(ne,we){try{const Be=await St().uploadFile({file:ne,name:we});return{fileId:Be.id,name:Be.name,mediaType:Be.mediaType}}catch(Ee){return r("uploadImage",Ee),null}}function kt(ne,we){const Ee=e.activeSessionId;if(!Ee)return;const Be=e.queuedBySession[Ee]??[],et={text:ne,attachments:we,id:H_e()};e.queuedBySession={...e.queuedBySession,[Ee]:[...Be,et]}}function It(ne){const[we,...Ee]=e.queuedBySession[ne]??[];we!==void 0&&(e.queuedBySession={...e.queuedBySession,[ne]:Ee},tn(ne,we.text,we.attachments).then(Be=>{if(Be==="ok"){h0.delete(ne);return}if(Be==="uncertain"){h0.delete(ne);return}if(!e.sessions.some(Vt=>Vt.id===ne)){h0.delete(ne);return}const et=we.id??we.text,pt=h0.get(ne),jt=pt!==void 0&&pt.key===et?pt.count+1:1;if(jt>=O_e){h0.delete(ne),(e.queuedBySession[ne]?.length??0)>0&&It(ne);return}h0.set(ne,{key:et,count:jt});const Zt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[we,...Zt]}}))}function cn(ne,we){const Ee=e.inFlightBySession[ne]===!0;if(e.inFlightBySession={...e.inFlightBySession,[ne]:!1},e.promptIdBySession[ne]!==void 0){const et={...e.promptIdBySession};delete et[ne],e.promptIdBySession=et}return ne===e.activeSessionId&&te(),(Ee||we?.turnWasActive===!0||(e.turnActiveBySession[ne]??!1))&&It(ne),Ee}function So(ne,we){we.inFlightTurn!==null&&we.busy||cn(ne)}async function Qo(){const ne=e.activeSessionId;if(!ne)return;const we=e.sessions.find(et=>et.id===ne);let Ee=e.promptIdBySession[ne];if(Ee===void 0){const et=we?.currentPromptId;et!==void 0&&et.length>0&&!et.startsWith("pr_")&&(Ee=et)}const Be=St();if(Ee!==void 0)try{if((await Be.abortPrompt(ne,Ee)).aborted)return;const pt={...e.promptIdBySession};delete pt[ne],e.promptIdBySession=pt}catch(et){if(ol(et)&&et.code===z_e){const pt={...e.promptIdBySession};delete pt[ne],e.promptIdBySession=pt}else{r("abortCurrentPrompt",et,{sessionId:ne});return}}try{await Be.abortSession(ne)}catch(et){r("abortCurrentPrompt",et,{sessionId:ne})}}function Po(ne,we){const Ee=e.approvalsBySession[ne]??[];e.approvalsBySession={...e.approvalsBySession,[ne]:Ee.filter(Be=>Be.approvalId!==we)}}function Xn(ne,we){const Ee=e.questionsBySession[ne]??[];e.questionsBySession={...e.questionsBySession,[ne]:Ee.filter(Be=>Be.questionId!==we)}}async function pn(ne,we){const Ee=e.activeSessionId;if(Ee&&!t4[ne]){t4[ne]=!0;try{const Be=St(),et={decision:we.decision,scope:we.scope,feedback:we.feedback,selectedLabel:we.selectedLabel};await Be.respondApproval(Ee,ne,et),Po(Ee,ne)}catch(Be){qm(Be)?Po(Ee,ne):r("respondApproval",Be,{sessionId:Ee})}finally{delete t4[ne]}}}async function Us(ne,we){const Ee=e.activeSessionId;if(Ee&&!u0[ne]){u0[ne]="answer";try{await St().respondQuestion(Ee,ne,we),Xn(Ee,ne)}catch(Be){qm(Be)?Xn(Ee,ne):r("respondQuestion",Be,{sessionId:Ee})}finally{delete u0[ne]}}}async function mi(ne){const we=e.activeSessionId;if(we&&!u0[ne]){u0[ne]="dismiss";try{await St().dismissQuestion(we,ne),Xn(we,ne)}catch(Ee){qm(Ee)?Xn(we,ne):r("dismissQuestion",Ee,{sessionId:we})}finally{delete u0[ne]}}}async function oi(ne){const we=e.activeSessionId;if(we&&!Zm[ne]){Zm[ne]=!0;try{const Ee=St(),Be=Wt=>Wt.id===ne||Wt.parentToolCallId===ne;let et=(e.tasksBySession[we]??[]).find(Be),pt;if(et===void 0){let Wt;try{Wt=await Ee.listTasks(we)}catch(Vn){r("detachTask",Vn,{sessionId:we});return}const on=Wt.find(Be);if(on===void 0)return;et=on,pt=on.id}const jt=et;pt??=jt.backgroundTaskId??jt.id;const Zt=await Ee.detachTask(we,pt),Vt=e.tasksBySession[we]??[];e.tasksBySession={...e.tasksBySession,[we]:Vt.map(Wt=>Wt.id!==jt.id?Wt:Zt.status==="running"?{...Wt,runInBackground:!0}:{...Wt,status:Zt.status,completedAt:Wt.completedAt??new Date().toISOString(),completedAtEstimated:Wt.completedAt===void 0?!0:Wt.completedAtEstimated})}}catch(Ee){YC(Ee)||r("detachTask",Ee,{sessionId:we})}finally{delete Zm[ne]}}}async function ql(ne){const we=e.activeSessionId;if(we&&!Um[ne]){Um[ne]=!0;try{const Ee=St(),Be=(e.tasksBySession[we]??[]).find(pt=>pt.id===ne)?.backgroundTaskId;await Ee.cancelTask(we,Be??ne);const et=e.tasksBySession[we]??[];e.tasksBySession={...e.tasksBySession,[we]:et.map(pt=>pt.id===ne?{...pt,status:"cancelled"}:pt)}}catch(Ee){YC(Ee)||r("cancelTask",Ee,{sessionId:we})}finally{delete Um[ne]}}}function vl(ne){const we=e.activeSessionId;we?(e.planModeBySession={...e.planModeBySession,[we]:ne},H(),$({planMode:ne})):R.planMode=ne}function Zs(){const ne=e.activeSessionId,we=ne?e.planModeBySession[ne]??!1:R.planMode;vl(!we)}function yo(ne){const we=e.activeSessionId;we?(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[we]:ne},D(),$({dynamicWorkflowMode:ne})):R.dynamicWorkflowMode=ne}async function $o(){const ne=e.activeSessionId,Ee=!(ne?e.dynamicWorkflowModeBySession[ne]??!1:R.dynamicWorkflowMode);Ee&&e.permission==="manual"&&!await o({title:n("workspace.dynamicWorkflowEnableTitle"),message:n("workspace.dynamicWorkflowEnableConfirm"),variant:"primary"})||yo(Ee)}function yl(ne){const we=e.activeSessionId;we?(e.goalModeBySession={...e.goalModeBySession,[we]:ne},A()):R.goalMode=ne}function ms(){const ne=e.activeSessionId,we=ne?e.goalModeBySession[ne]??!1:R.goalMode;yl(!we)}async function wl(ne){const we=ne.trim();if(!we||e.permission==="manual"&&!await o({title:n("workspace.goalStartConfirm",{objective:we}),variant:"primary"}))return;let Ee=e.activeSessionId;if(!Ee){const Be=e.activeWorkspaceId,et=Be&&I.value.some(pt=>pt.id===Be)?Be:I.value[0]?.id??null;if(!et)return;try{Ee=await hs(et)??void 0}catch(pt){r("createGoal",pt);return}if(!Ee)return}try{await St().updateSession(Ee,{goalObjective:we})}catch(Be){r("createGoal",Be,{sessionId:Ee,message:U(Be)});return}e.goalModeBySession[Ee]&&(e.goalModeBySession={...e.goalModeBySession,[Ee]:!1},A()),e.activeSessionId===Ee?await eo(we):await tn(Ee,we)}function gi(ne){const we=e.activeSessionId;we&&Promise.resolve(St().updateSession(we,{goalControl:ne})).catch(Ee=>{r("controlGoal",Ee,{sessionId:we,message:U(Ee)})})}function si(ne){e.permission=ne;const we=e.activeSessionId;we&&(e.permissionBySession={...e.permissionBySession,[we]:ne},$({permissionMode:ne},we))}function Ul(ne){const we=[...e.warnings];we.splice(ne,1),e.warnings=we}async function Ni(ne,we){try{await St().updateSession(ne,{title:we}),d(ne,Be=>({...Be,title:we}))}catch(Ee){r("renameSession",Ee,{sessionId:ne})}}async function Te(ne){try{const Ee=await St().generateSessionTitle(ne,{force:!0,source:"digest"});return Ee.title.length>0?Ee.title:null}catch(we){return console.warn("[pythinker-web] generateSessionTitle failed for",ne,we),null}}async function $e(ne,we){const Ee=e.workspaces.find(et=>et.id===ne)?.root,Be=()=>{e.workspaces=e.workspaces.map(et=>et.id===ne?{...et,name:we}:et)};try{if(await St().updateWorkspace(ne,{name:we}),Ee!==void 0){const et=h3();Ee in et&&(delete et[Ee],bk(et))}Be()}catch(et){if(Ee!==void 0&&ol(et)&&et.code===B_e){bk({...h3(),[Ee]:we}),Be();return}r("renameWorkspace",et)}}async function Mt(ne){const we=e.workspaces.find(pt=>pt.id===ne)?.root??T.value.find(pt=>pt.id===ne)?.root??ne,Ee=e.activeSessionId?e.sessions.find(pt=>pt.id===e.activeSessionId):void 0,Be=e.activeWorkspaceId===ne||e.activeWorkspaceId===we,et=!!(Ee&&(Ee.cwd===we||Ee.workspaceId===ne||C(Ee)===ne));we&&!e.hiddenWorkspaceRoots.includes(we)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,we],K(e.hiddenWorkspaceRoots));try{await St().deleteWorkspace(ne)}catch(pt){console.warn("[pythinker-web] deleteWorkspace registry cleanup failed for",ne,pt)}if(e.workspaces=e.workspaces.filter(pt=>pt.id!==ne&&pt.root!==we),Be||et){const pt=I.value[0]?.id??null;if(e.activeWorkspaceId=pt,pt)q(pt);else try{w1(dn.activeWorkspace)}catch{}}(Be||et)&&(m(void 0),e.sessionLoading=!1,fe(),ot(void 0,"replace"))}async function rt(ne){try{await St().archiveSession(ne),h(ne),i.clearSideChatForSession(ne);const{[ne]:Ee,...Be}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=Be,e.activeSessionId===ne){const et=e.sessions[0];et?await en(et.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))}}catch(we){r("archiveSession",we,{sessionId:ne})}}async function mn(ne){if(xe)return!1;const we=ne??e.activeSessionId;if(!we){const Be=n("commands.export.noSession");return _s("export:failed",{status:"no-session"}),r("exportSession",new Error(Be),{message:Be}),!1}xe=!0;const Ee=Date.now();_s("export:start",{sessionId:we});try{const Be=age(),{blob:et,fileName:pt}=await St().exportSession(we,Be);if(typeof document>"u")throw new Error("Document is unavailable");const jt=URL.createObjectURL(et);let Zt;try{Zt=document.createElement("a"),Zt.href=jt,Zt.download=pt,document.body.append(Zt),Zt.click()}finally{Zt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(jt)}catch{}},0)}return _s("export:accepted",{sessionId:we,status:"accepted",zipBytes:et.size,durationMs:Date.now()-Ee}),!0}catch(Be){const et=typeof Be=="object"&&Be!==null?Be:void 0;return _s("export:failed",{sessionId:we,status:"failed",durationMs:Date.now()-Ee,errorName:typeof et?.name=="string"?et.name:typeof Be,errorCode:typeof et?.code=="number"?et.code:void 0,requestId:typeof et?.requestId=="string"?et.requestId:void 0,phase:typeof et?.phase=="string"?et.phase:void 0,httpStatus:typeof et?.status=="number"?et.status:void 0}),r("exportSession",Be,{sessionId:we}),!1}finally{xe=!1}}async function Kn(ne){try{const we=await St().restoreSession(ne);return f(we),!0}catch(we){return r("restoreSession",we,{sessionId:ne}),!1}}function to(ne){return St().listSessions({archivedOnly:!0,beforeId:ne?.beforeId,pageSize:ne?.pageSize??50})}function Co(ne){const we=e.activeSessionId;we&&St().compactSession(we,ne).catch(Ee=>{r("compact",Ee,{sessionId:we})})}async function no(ne){const we=ne??e.activeSessionId;if(we)try{const Ee=await St().forkSession(we);f(Ee),await en(Ee.id)}catch(Ee){r("fork",Ee,{sessionId:we})}}async function Vo(ne=1){const we=e.activeSessionId;if(!we)return null;const Ee=(()=>{const Be=e.messagesBySession[we]??[];for(let et=Be.length-1;et>=0;et--){const pt=Be[et];if(pt.role==="user"&&!(pt.metadata?.origin&&pt.metadata.origin.kind!=="user"))return pt.content.filter(jt=>jt.type==="text").map(jt=>jt.text).join(` -`)}return null})();try{return await St().undoSession(we,ne),await w(we),Ee}catch(Be){return r("undo",Be,{sessionId:we}),null}}function Qi(ne){const we=e.activeSessionId;if(!we)return;const Ee=e.queuedBySession[we]??[];if(ne<0||ne>=Ee.length)return;const Be=[...Ee];Be.splice(ne,1),e.queuedBySession={...e.queuedBySession,[we]:Be}}function Os(ne,we){const Ee=e.activeSessionId;if(!Ee)return;const Be=e.queuedBySession[Ee]??[];if(ne===we||ne<0||ne>=Be.length||we<0||we>=Be.length)return;const et=[...Be],[pt]=et.splice(ne,1);pt!==void 0&&(et.splice(we,0,pt),e.queuedBySession={...e.queuedBySession,[Ee]:et})}async function Ea(ne){const we=e.activeSessionId;if(!we)return[];try{return(await St().listDirectory(we,{path:ne,includeGitStatus:!0})).items}catch{return[]}}async function Wo(ne){const we=e.activeSessionId;if(!we)return null;try{const Be=await St().readFile(we,{path:ne});return{path:Be.path,content:Be.content,encoding:Be.encoding,mime:Be.mime,languageId:Be.languageId,isBinary:Be.isBinary,size:Be.size,lineCount:Be.lineCount}}catch(Ee){return console.warn("[pythinker-web] readFileContent failed for",ne,Ee),null}}const zi=10485760;function gs(ne){const we=e.activeSessionId;return we?St().getFileDownloadUrl(we,ne):null}async function kl(ne,we){const Ee=e.activeSessionId;if(!Ee)return!1;try{return await St().openFile(Ee,{path:ne,line:we}),!0}catch(Be){return r("openFile",Be,{sessionId:Ee}),!1}}async function es(ne){const we=e.activeSessionId;if(!we)return;const Ee=N.value.cwd||".";try{await St().openInApp(we,ne,Ee)}catch(Be){r("openInApp",Be,{sessionId:we})}}async function Hs(ne){const we=e.activeSessionId;if(!we)return!1;try{return await St().revealFile(we,{path:ne}),!0}catch(Ee){return r("revealFile",Ee,{sessionId:we}),!1}}async function vs(ne,we){const Ee=e.activeSessionId;if(!Ee)return!1;try{return await St().revealSavedPlan(Ee,{agentId:ne,toolCallId:we}),!0}catch(Be){return r("revealSavedPlan",Be,{sessionId:Ee}),!1}}async function bl(ne){if(/^(https?:|data:|blob:)/i.test(ne))return ne;const we=e.activeSessionId;if(!we)return ne;let Ee=ne;if(Ee.startsWith("/")){const Be=e.sessions.find(et=>et.id===we)?.cwd;if(Be&&(Ee===Be||Ee.startsWith(Be.endsWith("/")?Be:`${Be}/`))){if(Ee=Ee.slice(Be.length).replace(/^\//,""),!Ee)return ne}else return ne}try{const et=await St().readFile(we,{path:Ee,length:zi});return!et.isBinary||et.encoding!=="base64"||et.truncated?ne:`data:${et.mime};base64,${et.content}`}catch{return ne}}async function Ks(ne){const we=e.sessions.find(Be=>Be.id===e.activeSessionId),Ee=we===void 0?e.activeWorkspaceId:C(we);if(!Ee)return[];try{return(await St().searchFiles(Ee,{query:ne,limit:20})).items.map(pt=>({path:pt.path,name:pt.name}))}catch{return[]}}return{loadFileDiff:Z,clearFileDiff:fe,loadGitStatus:ve,checkAuth:ge,loadConfig:Ae,updateConfig:_e,loadSubagentModelPolicy:de,saveSubagentModelPolicy:Se,clearSubagentModelPolicy:me,listAllSessionsGlobal:Tt,load:Nn,refreshServerMeta:Mn,loadWorkspaces:An,loadMoreSessions:Wn,loadAllSessions:Pn,selectWorkspace:Fn,openWorkspace:Qt,upsertWorkspacePreserveOrder:uo,applyWorkspaceEvent:Zn,clearActiveSession:Bo,openWorkspaceDraft:Un,startSessionAndSendPrompt:Io,startSessionAndActivateSkill:Bt,startSessionAndOpenSideChat:Jo,addWorkspaceByPath:$s,browseFs:ze,getFsHome:Ge,writeSessionUrl:ot,fetchSessionIntoList:dt,onSessionRoutePopState:Ct,bindSessionRoute:Ut,selectSession:en,submitPromptInternal:tn,finishPromptLocal:cn,localTurnStartState:D_e,isLocalTurnSnapshotCurrent:W_e,afterLocalTurnStartsSettle:q_e,handleSessionSnapshot:So,sendPrompt:eo,steerPrompt:Do,steerQueued:it,uploadImage:je,enqueue:kt,unqueue:Qi,reorderQueue:Os,abortCurrentPrompt:Qo,respondApproval:pn,respondQuestion:Us,dismissQuestion:mi,pendingQuestionActions:u0,pendingApprovalActions:t4,cancelTask:ql,detachTask:oi,setPlanMode:vl,togglePlanMode:Zs,setDynamicWorkflowMode:yo,toggleDynamicWorkflowMode:$o,setGoalMode:yl,toggleGoalMode:ms,createGoal:wl,controlGoal:gi,setPermission:si,dismissWarning:Ul,renameSession:Ni,generateSessionTitle:Te,renameWorkspace:$e,deleteWorkspace:Mt,archiveSession:rt,exportSession:mn,restoreSession:Kn,loadArchivedSessions:to,compact:Co,forkSession:no,undo:Vo,listDir:Ea,readFileContent:Wo,getFileDownloadUrl:gs,openWorkspaceFile:kl,openInApp:es,revealWorkspaceFile:Hs,revealSavedPlan:vs,resolveImageUrl:bl,searchFiles:Ks,loadOlderMessages:se,refreshSessionSidecars:F,isStartingFirstPrompt:()=>br.size>0}}const oz=dn.starredModels,JC=new Error("profile persist failed");function Z_e(){try{const e=ls(oz);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function K_e(e){try{Es(oz,JSON.stringify(e))}catch{}}function G_e(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:l,updateSessionMessages:r}=t,a=V([]),c=V(Z_e()),u=V({}),d=V({}),f=V([]),p=V([]),h=V(null);function m(K){if(!(K==null||K.length===0))return a.value.find(U=>U.id===K)??a.value.find(U=>U.model===K)}function k(){const K=e.activeSessionId?e.sessions.find(te=>te.id===e.activeSessionId):void 0,U=K===void 0?h.value??e.defaultModel:K.model||e.defaultModel;return m(U)?.id??U??void 0}function x(K){if(K===void 0)return;const U=m(K);return U===void 0?void 0:lf(U)}function y(K,U){const te=K==null?void 0:e.thinkingBySession[K];return te!==void 0&&Yke(U,te)?te:lf(U)}function w(K,U){if(U===void 0)return;const te=m(U);return te===void 0?void 0:y(K,te)}async function _(K,U){return K!=null&&e.thinkingBySession[K]===void 0&&await o(K),w(K,U)}function M(K){e.thinking=K;const U=e.activeSessionId;return K!==void 0&&U!==null&&U!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[U]:K}),K}Ze([()=>e.activeSessionId,()=>k(),()=>{const K=e.activeSessionId;return K==null?void 0:e.thinkingBySession[K]}],()=>{const K=m(k());K!==void 0&&(e.thinking=y(e.activeSessionId,K))});function P(K){St().setConfig({thinking:Xke(K,m(k())?.supportEfforts)}).catch(U=>n("setConfig",U))}async function B(K){try{const te=await St().listSkills(K);u.value={...u.value,[K]:te}}catch{}}async function $(K){try{const te=await St().listSkillsForWorkspace(K);d.value={...d.value,[K]:te}}catch{}}async function T(){try{const K=St();a.value=await K.listModels();const U=m(k());U!==void 0&&(e.thinking=y(e.activeSessionId,U))}catch(K){n("loadModels",K)}}async function I(){try{const K=St();f.value=await K.listProviders()}catch(K){n("loadProviders",K)}}async function N(){try{const K=St();p.value=await K.listCatalogProviders()}catch(K){n("loadCatalogProviders",K)}}async function C(K){const U=e.activeSessionId,te=m(K),J=e.thinking,ee=U?e.sessions.find(he=>he.id===U)?.model:void 0,ie=k()!==(te?.id??K),Q=Jke(te,J,ie);if(!U)return h.value=K,e.thinking=Q,Q!==J&&Q!==void 0&&P(Q),!0;l(U,he=>({...he,model:K})),Q!==J&&(e.thinking=Q,Q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[U]:Q}));try{await St().updateSession(U,{model:K,thinking:Q!==J?Q:void 0})}catch(he){return l(U,xe=>({...xe,model:ee??xe.model})),Q!==J&&(e.thinking=J,J!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[U]:J})),n("setModel",he,{sessionId:U}),!1}return Q!==J&&Q!==void 0&&P(Q),await o(U),!0}function O(K){const U=new Set(c.value);U.has(K)?U.delete(K):U.add(K),c.value=Array.from(U),K_e(c.value)}async function H(K,U,te){const J=te??e.activeSessionId;if(!J)return;const ee=i.value==="idle"&&!e.inFlightBySession[J],ie=`msg_skill_opt_${Date.now().toString(36)}`,Q=ee?H7(J):void 0;if(ee){e.inFlightBySession={...e.inFlightBySession,[J]:!0};const he={id:ie,sessionId:J,role:"user",content:[{type:"text",text:`/${K}${U?` ${U}`:""}`}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:K,skillArgs:U}}};r(J,xe=>[...xe,he])}try{const he=e.sessions.find(st=>st.id===J)?.model,xe=(he&&he.length>0?he:e.defaultModel)??void 0;if(!await s({thinking:await _(J,xe)??e.thinking},J))throw JC;await St().activateSkill(J,K,U)}catch(he){ee&&(e.inFlightBySession={...e.inFlightBySession,[J]:!1},r(J,xe=>xe.filter(Ye=>Ye.id!==ie))),he!==JC&&n("activateSkill",he,{sessionId:J})}finally{Q!==void 0&&D7(J,Q)}}async function D(K){try{await St().importCatalogProvider(K),await Promise.all([I(),T()])}catch(U){n("importCatalogProvider",U)}}async function A(K){try{await St().deleteProvider(K),await Promise.all([I(),T()])}catch(U){n("deleteProvider",U)}}async function R(K){try{const U=await St().refreshProvider(K);for(const te of U.failed)n("refreshProvider",new Error(te.reason),{message:te.provider});await Promise.all([I(),T()])}catch(U){n("refreshProvider",U)}}async function j(){try{const K=await St().refreshAllProviders();for(const U of K.failed)n("refreshAllProviders",new Error(U.reason),{message:U.provider});await Promise.all([I(),T()])}catch(K){n("refreshAllProviders",K)}}function q(K){const U=M(K);s({thinking:U}),U!==void 0&&P(U)}return{models:a,starredModelIds:c,providers:f,catalogProviders:p,draftModel:h,skillsBySession:u,skillsByWorkspace:d,loadSkillsForSession:B,loadSkillsForWorkspace:$,loadModels:T,loadProviders:I,loadCatalogProviders:N,setModel:C,thinkingLevelForModelId:x,thinkingLevelForSessionId:w,resolveThinkingForPrompt:_,toggleStarModel:O,activateSkill:H,importCatalogProvider:D,addProvider:K=>D({catalogId:K.type,apiKey:K.apiKey,baseUrl:K.baseUrl}),deleteProvider:A,refreshProvider:R,refreshAllProviders:j,setThinking:q}}const Y_e=/^read[_-]?media(?:file)?$/i,X_e=/^data:([^;]+);base64,(.*)$/s,J_e=/^<(image|video|audio)\s+path="([^"]+)">$/,Q_e=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,exe=/Mime type:\s*([^.\s]+)/i,txe=/Size:\s*(\d+)\s*bytes/i,nxe=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,oxe="Image compressed to fit model limits:",sxe=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function ixe(e){return e.includes(oxe)?e.replace(sxe,""):e}function lxe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function rxe(e){const t=Q_e.exec(e.trim());return t?{kind:t[1],path:lxe(t[2])}:null}const sz=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,axe=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function cxe(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return sz.test(o)?o:void 0}const uxe=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function dxe(e){const t=uxe.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=axe.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&sz.test(o)?o:void 0}}function fxe(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function pxe(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function hxe(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const i=s.url;return typeof i=="string"?{kind:n,url:i}:null}function mxe(e,t){if(!Y_e.test(e))return;const n=pxe(t);if(n===null)return;let o,s,i,l,r,a=null;for(const u of n){if(typeof u!="object"||u===null)continue;const d=u;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,h=J_e.exec(p);h&&(s=h[1],o=h[2]);const m=exe.exec(p);m?.[1]&&(i=m[1]);const k=txe.exec(p);k?.[1]&&(l=Number(k[1]));const x=nxe.exec(p);x?.[1]&&x[2]&&(r=`${x[1]}x${x[2]}`);continue}const f=hxe(d);f&&(a=f)}if(a===null)return;const c=X_e.exec(a.url);return c?.[1]&&(i=c[1]),c?.[2]&&(l=fxe(c[2])),{kind:a.kind??s??"image",url:a.url,path:o,mimeType:i,bytes:Number.isFinite(l)?l:void 0,dimensions:r}}function gxe(e){if(e!=null){if(typeof e=="string")return e.split(` +`),ht)!=="rejected"||Ne.length===0))return;const Vt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[...Ne,...Vt]}}function st(ne){const ke=e.activeSessionId;if(!ke)return Promise.resolve();const Te=(e.queuedBySession[ke]??[])[ne];if(Te===void 0)return Promise.resolve();const Ne=Te.id??Te.text;return $s(ke,()=>Xe(ke,Ne))}async function Xe(ne,ke){const Te=e.queuedBySession[ne]??[],Ne=Te.findIndex(Wt=>(Wt.id??Wt.text)===ke),Qe=Ne>=0?Te[Ne]:void 0;if(Qe===void 0)return;const ht=Qe.attachments??[];if(Qe.text.trim().length===0&&ht.length===0)return;const jt=[...Te];if(jt.splice(Ne,1),e.queuedBySession={...e.queuedBySession,[ne]:jt},await qe(ne,Qe.text,ht)!=="rejected"||!e.sessions.some(Wt=>Wt.id===ne))return;const Vt=[...e.queuedBySession[ne]??[]];Vt.splice(Math.min(Ne,Vt.length),0,Qe),e.queuedBySession={...e.queuedBySession,[ne]:Vt}}async function qe(ne,ke,Te){if(a.value==="idle"&&!e.inFlightBySession[ne])return tn(ne,ke,Te);const Ne=[];ke&&Ne.push({type:"text",text:ke});for(const Zt of Te)Zt.kind==="video"?Ne.push({type:"video",source:{kind:"file",fileId:Zt.fileId}}):Zt.kind==="file"?Ne.push({type:"file",fileId:Zt.fileId,name:Zt.name??"",mediaType:Zt.mediaType||"application/octet-stream",size:Zt.size??0}):Ne.push({type:"image",source:{kind:"file",fileId:Zt.fileId}});const Qe=x(),ht={id:Qe,sessionId:ne,role:"user",content:Ne,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,Zt=>[...Zt,ht]);const jt=V7(ne);try{const Zt=Ct(),Vt=e.sessions.find(Vn=>Vn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=await Zt.submitPrompt(ne,{content:Ne,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:e.planModeBySession[ne]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[ne]??!1});if(k(ne,Vn=>{const Ht=Vn.findIndex(zn=>zn.id===Qe);if(Ht===-1)return Vn;const Tn=[...Vn];return Tn[Ht]={...Tn[Ht],promptId:Tn[Ht].promptId??on.promptId},Tn}),on.status!=="queued")return e.promptIdBySession={...e.promptIdBySession,[ne]:on.promptId},y()?.bindNextPromptId(ne,on.promptId),"ok";try{await Zt.steerPrompts(ne,[on.promptId])}catch{return"ok"}return"ok"}catch(Zt){return k(ne,Vt=>Vt.filter(Wt=>Wt.id!==Qe)),r("steer",Zt,{sessionId:ne}),ol(Zt)?"rejected":"uncertain"}finally{W7(ne,jt)}}async function Pe(ne,ke){try{const Ne=await Ct().uploadFile({file:ne,name:ke});return{fileId:Ne.id,name:Ne.name,mediaType:Ne.mediaType}}catch(Te){return r("uploadImage",Te),null}}function bt(ne,ke){const Te=e.activeSessionId;if(!Te)return;const Ne=e.queuedBySession[Te]??[],Qe={text:ne,attachments:ke,id:dxe()};e.queuedBySession={...e.queuedBySession,[Te]:[...Ne,Qe]}}function Lt(ne){const[ke,...Te]=e.queuedBySession[ne]??[];ke!==void 0&&(e.queuedBySession={...e.queuedBySession,[ne]:Te},tn(ne,ke.text,ke.attachments).then(Ne=>{if(Ne==="ok"){p0.delete(ne);return}if(Ne==="uncertain"){p0.delete(ne);return}if(!e.sessions.some(Vt=>Vt.id===ne)){p0.delete(ne);return}const Qe=ke.id??ke.text,ht=p0.get(ne),jt=ht!==void 0&&ht.key===Qe?ht.count+1:1;if(jt>=uxe){p0.delete(ne),(e.queuedBySession[ne]?.length??0)>0&&Lt(ne);return}p0.set(ne,{key:Qe,count:jt});const Zt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[ke,...Zt]}}))}function cn(ne,ke){const Te=e.inFlightBySession[ne]===!0;if(e.inFlightBySession={...e.inFlightBySession,[ne]:!1},e.promptIdBySession[ne]!==void 0){const Qe={...e.promptIdBySession};delete Qe[ne],e.promptIdBySession=Qe}return ne===e.activeSessionId&&te(),(Te||ke?.turnWasActive===!0||(e.turnActiveBySession[ne]??!1))&&Lt(ne),Te}function So(ne,ke){ke.inFlightTurn!==null&&ke.busy||cn(ne)}async function Qo(){const ne=e.activeSessionId;if(!ne)return;const ke=e.sessions.find(Qe=>Qe.id===ne);let Te=e.promptIdBySession[ne];if(Te===void 0){const Qe=ke?.currentPromptId;Qe!==void 0&&Qe.length>0&&!Qe.startsWith("pr_")&&(Te=Qe)}const Ne=Ct();if(Te!==void 0)try{if((await Ne.abortPrompt(ne,Te)).aborted)return;const ht={...e.promptIdBySession};delete ht[ne],e.promptIdBySession=ht}catch(Qe){if(ol(Qe)&&Qe.code===sxe){const ht={...e.promptIdBySession};delete ht[ne],e.promptIdBySession=ht}else{r("abortCurrentPrompt",Qe,{sessionId:ne});return}}try{await Ne.abortSession(ne)}catch(Qe){r("abortCurrentPrompt",Qe,{sessionId:ne})}}function Po(ne,ke){const Te=e.approvalsBySession[ne]??[];e.approvalsBySession={...e.approvalsBySession,[ne]:Te.filter(Ne=>Ne.approvalId!==ke)}}function Xn(ne,ke){const Te=e.questionsBySession[ne]??[];e.questionsBySession={...e.questionsBySession,[ne]:Te.filter(Ne=>Ne.questionId!==ke)}}async function pn(ne,ke){const Te=e.activeSessionId;if(Te&&!o4[ne]){o4[ne]=!0;try{const Ne=Ct(),Qe={decision:ke.decision,scope:ke.scope,feedback:ke.feedback,selectedLabel:ke.selectedLabel};await Ne.respondApproval(Te,ne,Qe),Po(Te,ne)}catch(Ne){Zm(Ne)?Po(Te,ne):r("respondApproval",Ne,{sessionId:Te})}finally{delete o4[ne]}}}async function Us(ne,ke){const Te=e.activeSessionId;if(Te&&!c0[ne]){c0[ne]="answer";try{await Ct().respondQuestion(Te,ne,ke),Xn(Te,ne)}catch(Ne){Zm(Ne)?Xn(Te,ne):r("respondQuestion",Ne,{sessionId:Te})}finally{delete c0[ne]}}}async function mi(ne){const ke=e.activeSessionId;if(ke&&!c0[ne]){c0[ne]="dismiss";try{await Ct().dismissQuestion(ke,ne),Xn(ke,ne)}catch(Te){Zm(Te)?Xn(ke,ne):r("dismissQuestion",Te,{sessionId:ke})}finally{delete c0[ne]}}}async function oi(ne){const ke=e.activeSessionId;if(ke&&!Gm[ne]){Gm[ne]=!0;try{const Te=Ct(),Ne=Wt=>Wt.id===ne||Wt.parentToolCallId===ne;let Qe=(e.tasksBySession[ke]??[]).find(Ne),ht;if(Qe===void 0){let Wt;try{Wt=await Te.listTasks(ke)}catch(Vn){r("detachTask",Vn,{sessionId:ke});return}const on=Wt.find(Ne);if(on===void 0)return;Qe=on,ht=on.id}const jt=Qe;ht??=jt.backgroundTaskId??jt.id;const Zt=await Te.detachTask(ke,ht),Vt=e.tasksBySession[ke]??[];e.tasksBySession={...e.tasksBySession,[ke]:Vt.map(Wt=>Wt.id!==jt.id?Wt:Zt.status==="running"?{...Wt,runInBackground:!0}:{...Wt,status:Zt.status,completedAt:Wt.completedAt??new Date().toISOString(),completedAtEstimated:Wt.completedAt===void 0?!0:Wt.completedAtEstimated})}}catch(Te){JC(Te)||r("detachTask",Te,{sessionId:ke})}finally{delete Gm[ne]}}}async function ql(ne){const ke=e.activeSessionId;if(ke&&!Km[ne]){Km[ne]=!0;try{const Te=Ct(),Ne=(e.tasksBySession[ke]??[]).find(ht=>ht.id===ne)?.backgroundTaskId;await Te.cancelTask(ke,Ne??ne);const Qe=e.tasksBySession[ke]??[];e.tasksBySession={...e.tasksBySession,[ke]:Qe.map(ht=>ht.id===ne?{...ht,status:"cancelled"}:ht)}}catch(Te){JC(Te)||r("cancelTask",Te,{sessionId:ke})}finally{delete Km[ne]}}}function vl(ne){const ke=e.activeSessionId;ke?(e.planModeBySession={...e.planModeBySession,[ke]:ne},H(),L({planMode:ne})):R.planMode=ne}function Zs(){const ne=e.activeSessionId,ke=ne?e.planModeBySession[ne]??!1:R.planMode;vl(!ke)}function yo(ne){const ke=e.activeSessionId;ke?(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[ke]:ne},D(),L({dynamicWorkflowMode:ne})):R.dynamicWorkflowMode=ne}async function Lo(){const ne=e.activeSessionId,Te=!(ne?e.dynamicWorkflowModeBySession[ne]??!1:R.dynamicWorkflowMode);Te&&e.permission==="manual"&&!await o({title:n("workspace.dynamicWorkflowEnableTitle"),message:n("workspace.dynamicWorkflowEnableConfirm"),variant:"primary"})||yo(Te)}function yl(ne){const ke=e.activeSessionId;ke?(e.goalModeBySession={...e.goalModeBySession,[ke]:ne},M()):R.goalMode=ne}function ms(){const ne=e.activeSessionId,ke=ne?e.goalModeBySession[ne]??!1:R.goalMode;yl(!ke)}async function wl(ne){const ke=ne.trim();if(!ke||e.permission==="manual"&&!await o({title:n("workspace.goalStartConfirm",{objective:ke}),variant:"primary"}))return;let Te=e.activeSessionId;if(!Te){const Ne=e.activeWorkspaceId,Qe=Ne&&T.value.some(ht=>ht.id===Ne)?Ne:T.value[0]?.id??null;if(!Qe)return;try{Te=await hs(Qe)??void 0}catch(ht){r("createGoal",ht);return}if(!Te)return}try{await Ct().updateSession(Te,{goalObjective:ke})}catch(Ne){r("createGoal",Ne,{sessionId:Te,message:q(Ne)});return}e.goalModeBySession[Te]&&(e.goalModeBySession={...e.goalModeBySession,[Te]:!1},M()),e.activeSessionId===Te?await eo(ke):await tn(Te,ke)}function gi(ne){const ke=e.activeSessionId;ke&&Promise.resolve(Ct().updateSession(ke,{goalControl:ne})).catch(Te=>{r("controlGoal",Te,{sessionId:ke,message:q(Te)})})}function si(ne){e.permission=ne;const ke=e.activeSessionId;ke&&(e.permissionBySession={...e.permissionBySession,[ke]:ne},L({permissionMode:ne},ke))}function Ul(ne){const ke=[...e.warnings];ke.splice(ne,1),e.warnings=ke}async function Ni(ne,ke){try{await Ct().updateSession(ne,{title:ke}),d(ne,Ne=>({...Ne,title:ke}))}catch(Te){r("renameSession",Te,{sessionId:ne})}}async function Ae(ne){try{const Te=await Ct().generateSessionTitle(ne,{force:!0,source:"digest"});return Te.title.length>0?Te.title:null}catch(ke){return console.warn("[pythinker-web] generateSessionTitle failed for",ne,ke),null}}async function Ie(ne,ke){const Te=e.workspaces.find(Qe=>Qe.id===ne)?.root,Ne=()=>{e.workspaces=e.workspaces.map(Qe=>Qe.id===ne?{...Qe,name:ke}:Qe)};try{if(await Ct().updateWorkspace(ne,{name:ke}),Te!==void 0){const Qe=g3();Te in Qe&&(delete Qe[Te],xk(Qe))}Ne()}catch(Qe){if(Te!==void 0&&ol(Qe)&&Qe.code===ixe){xk({...g3(),[Te]:ke}),Ne();return}r("renameWorkspace",Qe)}}async function At(ne){const ke=e.workspaces.find(ht=>ht.id===ne)?.root??E.value.find(ht=>ht.id===ne)?.root??ne,Te=e.activeSessionId?e.sessions.find(ht=>ht.id===e.activeSessionId):void 0,Ne=e.activeWorkspaceId===ne||e.activeWorkspaceId===ke,Qe=!!(Te&&(Te.cwd===ke||Te.workspaceId===ne||C(Te)===ne));ke&&!e.hiddenWorkspaceRoots.includes(ke)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,ke],Z(e.hiddenWorkspaceRoots));try{await Ct().deleteWorkspace(ne)}catch(ht){console.warn("[pythinker-web] deleteWorkspace registry cleanup failed for",ne,ht)}if(e.workspaces=e.workspaces.filter(ht=>ht.id!==ne&&ht.root!==ke),Ne||Qe){const ht=T.value[0]?.id??null;if(e.activeWorkspaceId=ht,ht)U(ht);else try{y1(dn.activeWorkspace)}catch{}}(Ne||Qe)&&(m(void 0),e.sessionLoading=!1,he(),ot(void 0,"replace"))}async function lt(ne){try{await Ct().archiveSession(ne),h(ne),i.clearSideChatForSession(ne);const{[ne]:Te,...Ne}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=Ne,e.activeSessionId===ne){const Qe=e.sessions[0];Qe?await en(Qe.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))}}catch(ke){r("archiveSession",ke,{sessionId:ne})}}async function mn(ne){if(xe)return!1;const ke=ne??e.activeSessionId;if(!ke){const Ne=n("commands.export.noSession");return _s("export:failed",{status:"no-session"}),r("exportSession",new Error(Ne),{message:Ne}),!1}xe=!0;const Te=Date.now();_s("export:start",{sessionId:ke});try{const Ne=Tge(),{blob:Qe,fileName:ht}=await Ct().exportSession(ke,Ne);if(typeof document>"u")throw new Error("Document is unavailable");const jt=URL.createObjectURL(Qe);let Zt;try{Zt=document.createElement("a"),Zt.href=jt,Zt.download=ht,document.body.append(Zt),Zt.click()}finally{Zt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(jt)}catch{}},0)}return _s("export:accepted",{sessionId:ke,status:"accepted",zipBytes:Qe.size,durationMs:Date.now()-Te}),!0}catch(Ne){const Qe=typeof Ne=="object"&&Ne!==null?Ne:void 0;return _s("export:failed",{sessionId:ke,status:"failed",durationMs:Date.now()-Te,errorName:typeof Qe?.name=="string"?Qe.name:typeof Ne,errorCode:typeof Qe?.code=="number"?Qe.code:void 0,requestId:typeof Qe?.requestId=="string"?Qe.requestId:void 0,phase:typeof Qe?.phase=="string"?Qe.phase:void 0,httpStatus:typeof Qe?.status=="number"?Qe.status:void 0}),r("exportSession",Ne,{sessionId:ke}),!1}finally{xe=!1}}async function Kn(ne){try{const ke=await Ct().restoreSession(ne);return f(ke),!0}catch(ke){return r("restoreSession",ke,{sessionId:ne}),!1}}function to(ne){return Ct().listSessions({archivedOnly:!0,beforeId:ne?.beforeId,pageSize:ne?.pageSize??50})}function Co(ne){const ke=e.activeSessionId;ke&&Ct().compactSession(ke,ne).catch(Te=>{r("compact",Te,{sessionId:ke})})}async function no(ne){const ke=ne??e.activeSessionId;if(ke)try{const Te=await Ct().forkSession(ke);f(Te),await en(Te.id)}catch(Te){r("fork",Te,{sessionId:ke})}}async function Vo(ne=1){const ke=e.activeSessionId;if(!ke)return null;const Te=(()=>{const Ne=e.messagesBySession[ke]??[];for(let Qe=Ne.length-1;Qe>=0;Qe--){const ht=Ne[Qe];if(ht.role==="user"&&!(ht.metadata?.origin&&ht.metadata.origin.kind!=="user"))return ht.content.filter(jt=>jt.type==="text").map(jt=>jt.text).join(` +`)}return null})();try{return await Ct().undoSession(ke,ne),await w(ke),Te}catch(Ne){return r("undo",Ne,{sessionId:ke}),null}}function Qi(ne){const ke=e.activeSessionId;if(!ke)return;const Te=e.queuedBySession[ke]??[];if(ne<0||ne>=Te.length)return;const Ne=[...Te];Ne.splice(ne,1),e.queuedBySession={...e.queuedBySession,[ke]:Ne}}function Os(ne,ke){const Te=e.activeSessionId;if(!Te)return;const Ne=e.queuedBySession[Te]??[];if(ne===ke||ne<0||ne>=Ne.length||ke<0||ke>=Ne.length)return;const Qe=[...Ne],[ht]=Qe.splice(ne,1);ht!==void 0&&(Qe.splice(ke,0,ht),e.queuedBySession={...e.queuedBySession,[Te]:Qe})}async function Ta(ne){const ke=e.activeSessionId;if(!ke)return[];try{return(await Ct().listDirectory(ke,{path:ne,includeGitStatus:!0})).items}catch{return[]}}async function Wo(ne){const ke=e.activeSessionId;if(!ke)return null;try{const Ne=await Ct().readFile(ke,{path:ne});return{path:Ne.path,content:Ne.content,encoding:Ne.encoding,mime:Ne.mime,languageId:Ne.languageId,isBinary:Ne.isBinary,size:Ne.size,lineCount:Ne.lineCount}}catch(Te){return console.warn("[pythinker-web] readFileContent failed for",ne,Te),null}}const zi=10485760;function gs(ne){const ke=e.activeSessionId;return ke?Ct().getFileDownloadUrl(ke,ne):null}async function kl(ne,ke){const Te=e.activeSessionId;if(!Te)return!1;try{return await Ct().openFile(Te,{path:ne,line:ke}),!0}catch(Ne){return r("openFile",Ne,{sessionId:Te}),!1}}async function es(ne){const ke=e.activeSessionId;if(!ke)return;const Te=$.value.cwd||".";try{await Ct().openInApp(ke,ne,Te)}catch(Ne){r("openInApp",Ne,{sessionId:ke})}}async function Hs(ne){const ke=e.activeSessionId;if(!ke)return!1;try{return await Ct().revealFile(ke,{path:ne}),!0}catch(Te){return r("revealFile",Te,{sessionId:ke}),!1}}async function vs(ne,ke){const Te=e.activeSessionId;if(!Te)return!1;try{return await Ct().revealSavedPlan(Te,{agentId:ne,toolCallId:ke}),!0}catch(Ne){return r("revealSavedPlan",Ne,{sessionId:Te}),!1}}async function bl(ne){if(/^(https?:|data:|blob:)/i.test(ne))return ne;const ke=e.activeSessionId;if(!ke)return ne;let Te=ne;if(Te.startsWith("/")){const Ne=e.sessions.find(Qe=>Qe.id===ke)?.cwd;if(Ne&&(Te===Ne||Te.startsWith(Ne.endsWith("/")?Ne:`${Ne}/`))){if(Te=Te.slice(Ne.length).replace(/^\//,""),!Te)return ne}else return ne}try{const Qe=await Ct().readFile(ke,{path:Te,length:zi});return!Qe.isBinary||Qe.encoding!=="base64"||Qe.truncated?ne:`data:${Qe.mime};base64,${Qe.content}`}catch{return ne}}async function Ks(ne){const ke=e.sessions.find(Ne=>Ne.id===e.activeSessionId),Te=ke===void 0?e.activeWorkspaceId:C(ke);if(!Te)return[];try{return(await Ct().searchFiles(Te,{query:ne,limit:20})).items.map(ht=>({path:ht.path,name:ht.name}))}catch{return[]}}return{loadFileDiff:K,clearFileDiff:he,loadGitStatus:ye,checkAuth:ve,loadConfig:et,updateConfig:ge,loadSubagentModelPolicy:de,saveSubagentModelPolicy:Se,clearSubagentModelPolicy:je,listAllSessionsGlobal:kt,load:Nn,refreshServerMeta:Mn,loadWorkspaces:An,loadMoreSessions:Wn,loadAllSessions:Pn,selectWorkspace:Fn,openWorkspace:Qt,upsertWorkspacePreserveOrder:uo,applyWorkspaceEvent:Zn,clearActiveSession:Bo,openWorkspaceDraft:Un,startSessionAndSendPrompt:Io,startSessionAndActivateSkill:Rt,startSessionAndOpenSideChat:Jo,addWorkspaceByPath:Ls,browseFs:$e,getFsHome:Ge,writeSessionUrl:ot,fetchSessionIntoList:dt,onSessionRoutePopState:Mt,bindSessionRoute:Ut,selectSession:en,submitPromptInternal:tn,finishPromptLocal:cn,localTurnStartState:fxe,isLocalTurnSnapshotCurrent:hxe,afterLocalTurnStartsSettle:mxe,handleSessionSnapshot:So,sendPrompt:eo,steerPrompt:Do,steerQueued:st,uploadImage:Pe,enqueue:bt,unqueue:Qi,reorderQueue:Os,abortCurrentPrompt:Qo,respondApproval:pn,respondQuestion:Us,dismissQuestion:mi,pendingQuestionActions:c0,pendingApprovalActions:o4,cancelTask:ql,detachTask:oi,setPlanMode:vl,togglePlanMode:Zs,setDynamicWorkflowMode:yo,toggleDynamicWorkflowMode:Lo,setGoalMode:yl,toggleGoalMode:ms,createGoal:wl,controlGoal:gi,setPermission:si,dismissWarning:Ul,renameSession:Ni,generateSessionTitle:Ae,renameWorkspace:Ie,deleteWorkspace:At,archiveSession:lt,exportSession:mn,restoreSession:Kn,loadArchivedSessions:to,compact:Co,forkSession:no,undo:Vo,listDir:Ta,readFileContent:Wo,getFileDownloadUrl:gs,openWorkspaceFile:kl,openInApp:es,revealWorkspaceFile:Hs,revealSavedPlan:vs,resolveImageUrl:bl,searchFiles:Ks,loadOlderMessages:oe,refreshSessionSidecars:F,isStartingFirstPrompt:()=>br.size>0}}const rz=dn.starredModels,eM=new Error("profile persist failed");function vxe(){try{const e=ls(rz);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function yxe(e){try{Es(rz,JSON.stringify(e))}catch{}}function wxe(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:l,updateSessionMessages:r}=t,a=V([]),c=V(vxe()),u=V({}),d=V({}),f=V([]),p=V([]),h=V(null);function m(Z){if(!(Z==null||Z.length===0))return a.value.find(q=>q.id===Z)??a.value.find(q=>q.model===Z)}function k(){const Z=e.activeSessionId?e.sessions.find(te=>te.id===e.activeSessionId):void 0,q=Z===void 0?h.value??e.defaultModel:Z.model||e.defaultModel;return m(q)?.id??q??void 0}function x(Z){if(Z===void 0)return;const q=m(Z);return q===void 0?void 0:lf(q)}function y(Z,q){const te=Z==null?void 0:e.thinkingBySession[Z];return te!==void 0&&gbe(q,te)?te:lf(q)}function w(Z,q){if(q===void 0)return;const te=m(q);return te===void 0?void 0:y(Z,te)}async function _(Z,q){return Z!=null&&e.thinkingBySession[Z]===void 0&&await o(Z),w(Z,q)}function A(Z){e.thinking=Z;const q=e.activeSessionId;return Z!==void 0&&q!==null&&q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:Z}),Z}Ke([()=>e.activeSessionId,()=>k(),()=>{const Z=e.activeSessionId;return Z==null?void 0:e.thinkingBySession[Z]}],()=>{const Z=m(k());Z!==void 0&&(e.thinking=y(e.activeSessionId,Z))});function P(Z){Ct().setConfig({thinking:vbe(Z,m(k())?.supportEfforts)}).catch(q=>n("setConfig",q))}async function z(Z){try{const te=await Ct().listSkills(Z);u.value={...u.value,[Z]:te}}catch{}}async function L(Z){try{const te=await Ct().listSkillsForWorkspace(Z);d.value={...d.value,[Z]:te}}catch{}}async function E(){try{const Z=Ct();a.value=await Z.listModels();const q=m(k());q!==void 0&&(e.thinking=y(e.activeSessionId,q))}catch(Z){n("loadModels",Z)}}async function T(){try{const Z=Ct();f.value=await Z.listProviders()}catch(Z){n("loadProviders",Z)}}async function $(){try{const Z=Ct();p.value=await Z.listCatalogProviders()}catch(Z){n("loadCatalogProviders",Z)}}async function C(Z){const q=e.activeSessionId,te=m(Z),ee=e.thinking,J=q?e.sessions.find(me=>me.id===q)?.model:void 0,se=k()!==(te?.id??Z),Q=ybe(te,ee,se);if(!q)return h.value=Z,e.thinking=Q,Q!==ee&&Q!==void 0&&P(Q),!0;l(q,me=>({...me,model:Z})),Q!==ee&&(e.thinking=Q,Q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:Q}));try{await Ct().updateSession(q,{model:Z,thinking:Q!==ee?Q:void 0})}catch(me){return l(q,xe=>({...xe,model:J??xe.model})),Q!==ee&&(e.thinking=ee,ee!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:ee})),n("setModel",me,{sessionId:q}),!1}return Q!==ee&&Q!==void 0&&P(Q),await o(q),!0}function j(Z){const q=new Set(c.value);q.has(Z)?q.delete(Z):q.add(Z),c.value=Array.from(q),yxe(c.value)}async function H(Z,q,te){const ee=te??e.activeSessionId;if(!ee)return;const J=i.value==="idle"&&!e.inFlightBySession[ee],se=`msg_skill_opt_${Date.now().toString(36)}`,Q=J?V7(ee):void 0;if(J){e.inFlightBySession={...e.inFlightBySession,[ee]:!0};const me={id:se,sessionId:ee,role:"user",content:[{type:"text",text:`/${Z}${q?` ${q}`:""}`}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:Z,skillArgs:q}}};r(ee,xe=>[...xe,me])}try{const me=e.sessions.find(at=>at.id===ee)?.model,xe=(me&&me.length>0?me:e.defaultModel)??void 0;if(!await s({thinking:await _(ee,xe)??e.thinking},ee))throw eM;await Ct().activateSkill(ee,Z,q)}catch(me){J&&(e.inFlightBySession={...e.inFlightBySession,[ee]:!1},r(ee,xe=>xe.filter(Ye=>Ye.id!==se))),me!==eM&&n("activateSkill",me,{sessionId:ee})}finally{Q!==void 0&&W7(ee,Q)}}async function D(Z){try{await Ct().importCatalogProvider(Z),await Promise.all([T(),E()])}catch(q){n("importCatalogProvider",q)}}async function M(Z){try{await Ct().deleteProvider(Z),await Promise.all([T(),E()])}catch(q){n("deleteProvider",q)}}async function R(Z){try{const q=await Ct().refreshProvider(Z);for(const te of q.failed)n("refreshProvider",new Error(te.reason),{message:te.provider});await Promise.all([T(),E()])}catch(q){n("refreshProvider",q)}}async function O(){try{const Z=await Ct().refreshAllProviders();for(const q of Z.failed)n("refreshAllProviders",new Error(q.reason),{message:q.provider});await Promise.all([T(),E()])}catch(Z){n("refreshAllProviders",Z)}}function U(Z){const q=A(Z);s({thinking:q}),q!==void 0&&P(q)}return{models:a,starredModelIds:c,providers:f,catalogProviders:p,draftModel:h,skillsBySession:u,skillsByWorkspace:d,loadSkillsForSession:z,loadSkillsForWorkspace:L,loadModels:E,loadProviders:T,loadCatalogProviders:$,setModel:C,thinkingLevelForModelId:x,thinkingLevelForSessionId:w,resolveThinkingForPrompt:_,toggleStarModel:j,activateSkill:H,importCatalogProvider:D,addProvider:Z=>D({catalogId:Z.type,apiKey:Z.apiKey,baseUrl:Z.baseUrl}),deleteProvider:M,refreshProvider:R,refreshAllProviders:O,setThinking:U}}const kxe=/^read[_-]?media(?:file)?$/i,bxe=/^data:([^;]+);base64,(.*)$/s,_xe=/^<(image|video|audio)\s+path="([^"]+)">$/,xxe=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,Sxe=/Mime type:\s*([^.\s]+)/i,Cxe=/Size:\s*(\d+)\s*bytes/i,Mxe=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,Axe="Image compressed to fit model limits:",Txe=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function Exe(e){return e.includes(Axe)?e.replace(Txe,""):e}function Ixe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Lxe(e){const t=xxe.exec(e.trim());return t?{kind:t[1],path:Ixe(t[2])}:null}const az=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,$xe=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function Nxe(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return az.test(o)?o:void 0}const zxe=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function Bxe(e){const t=zxe.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=$xe.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&az.test(o)?o:void 0}}function Rxe(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function Pxe(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function Fxe(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const i=s.url;return typeof i=="string"?{kind:n,url:i}:null}function jxe(e,t){if(!kxe.test(e))return;const n=Pxe(t);if(n===null)return;let o,s,i,l,r,a=null;for(const u of n){if(typeof u!="object"||u===null)continue;const d=u;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,h=_xe.exec(p);h&&(s=h[1],o=h[2]);const m=Sxe.exec(p);m?.[1]&&(i=m[1]);const k=Cxe.exec(p);k?.[1]&&(l=Number(k[1]));const x=Mxe.exec(p);x?.[1]&&x[2]&&(r=`${x[1]}x${x[2]}`);continue}const f=Fxe(d);f&&(a=f)}if(a===null)return;const c=bxe.exec(a.url);return c?.[1]&&(i=c[1]),c?.[2]&&(l=Rxe(c[2])),{kind:a.kind??s??"image",url:a.url,path:o,mimeType:i,bytes:Number.isFinite(l)?l:void 0,dimensions:r}}function Oxe(e){if(e!=null){if(typeof e=="string")return e.split(` `);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` `));else if(n&&typeof n=="object"){const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` `)):o.type==="think"&&typeof o.think=="string"?t.push(...o.think.split(` -`)):o.type==="image_url"||o.type==="image"?t.push("[image]"):typeof o.type=="string"?t.push(`[${o.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function vxe(e){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.subagentPhase??(e.status==="completed"?"completed":e.status==="failed"?"failed":"working"),status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,dynamicWorkflowIndex:e.dynamicWorkflowIndex}}function yxe(e,t){const n=e.split(` +`)):o.type==="image_url"||o.type==="image"?t.push("[image]"):typeof o.type=="string"?t.push(`[${o.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function Hxe(e){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.subagentPhase??(e.status==="completed"?"completed":e.status==="failed"?"failed":"working"),status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,dynamicWorkflowIndex:e.dynamicWorkflowIndex}}function Dxe(e,t){const n=e.split(` `),o=t.split(` -`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function wxe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:yxe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command")return{kind:"shell",command:typeof t.command=="string"?t.command:e.action,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:void 0};if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}function kxe(e){const t=` +`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function Vxe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:Dxe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command")return{kind:"shell",command:typeof t.command=="string"?t.command:e.action,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:void 0};if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}const cz={};function Wxe(e){const t=` `,n=` -`,o=e.indexOf(t),s=e.lastIndexOf(n);return o>=0&&s>=o+t.length?e.slice(o+t.length,s):bxe(e)}function bxe(e){const t=e.split(` +`,o=e.indexOf(t),s=e.lastIndexOf(n);return o>=0&&s>=o+t.length?e.slice(o+t.length,s):qxe(e)}function qxe(e){const t=e.split(` `);return t.length>=2&&t[0]?.startsWith(""?t.slice(1,-1).join(` -`):e}function _xe(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function xxe(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` -`);return kxe(t)}function Sxe(e,t){const n=e.metadata?.origin??{},o=xxe(e);return t==="cron_missed"?{text:o,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:o,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function Cxe(e,t,n){const{text:o,cron:s}=Sxe(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function Mxe(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function Axe(e){return e.metadata?.origin?.kind==="compaction_summary"}function Txe(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function Exe(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function Ixe(e){let t="",n="";const o=[],s=[];for(const i of e)i.type==="text"?t+=i.text:i.type==="thinking"?n+=i.thinking:i.type==="toolUse"?o.push(i.toolCallId):s.push(JSON.stringify(i));return o.sort(),s.sort(),{text:t,thinking:n,toolIds:o,rest:s}}function $xe(e,t){return t.text!==""&&t.text!==e.text||t.thinking!==""&&t.thinking!==e.thinking?!1:t.toolIds.every(n=>e.toolIds.includes(n))&&t.rest.every(n=>e.rest.includes(n))}function N9(e,t,n,o=!0,s={}){const i=[];let l=1;const r=new Map;for(const p of t)r.set(p.toolCallId,p);let a=null;function c(p=!1){if(!a)return;const h=a;if(a=null,!p||!o)for(let m=0;mw.kind==="tool"&&w.tool.id===x.id);y&&y.kind==="tool"&&(y.tool=x)}i.push({id:h.id,role:"assistant",no:l++,text:h.textParts.join(` +`):e}function Uxe(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function Zxe(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` +`);return Wxe(t)}function Kxe(e,t){const n=e.metadata?.origin??{},o=Zxe(e);return t==="cron_missed"?{text:o,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:o,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function Gxe(e,t,n){const{text:o,cron:s}=Kxe(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function Yxe(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function B9(e){return e.metadata?.origin?.kind==="compaction_summary"}function Xxe(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function Jxe(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function Qxe(e){let t="",n="";const o=[],s=[];for(const i of e)i.type==="text"?t+=i.text:i.type==="thinking"?n+=i.thinking:i.type==="toolUse"?o.push(i.toolCallId):s.push(JSON.stringify(i));return o.sort(),s.sort(),{text:t,thinking:n,toolIds:o,rest:s}}function eSe(e,t){return t.text!==""&&t.text!==e.text||t.thinking!==""&&t.thinking!==e.thinking?!1:t.toolIds.every(n=>e.toolIds.includes(n))&&t.rest.every(n=>e.rest.includes(n))}function M2(e,t,n,o=!0,s=cz){const i=[];let l=1;const r=new Map;for(const p of t)r.set(p.toolCallId,p);let a=null;function c(p=!1){if(!a)return;const h=a;if(a=null,!p||!o)for(let m=0;mw.kind==="tool"&&w.tool.id===x.id);y&&y.kind==="tool"&&(y.tool=x)}i.push({id:h.id,role:"assistant",no:l++,text:h.textParts.join(` `),thinking:h.thinkingParts.length>0?h.thinkingParts.join(` `):void 0,tools:h.tools.length>0?h.tools:void 0,blocks:h.blocks.length>0?h.blocks:void 0,approval:h.approval,approvalId:h.approvalId,durationMs:h.durationMs})}function u(p,h){for(const m of h)if(m.type==="text"){if(m.text){p.textParts.push(m.text);const k=p.blocks.at(-1);k&&k.kind==="text"?k.text+=` `+m.text:p.blocks.push({kind:"text",text:m.text})}}else if(m.type==="thinking"){if(m.thinking){p.thinkingParts.push(m.thinking);const k=p.blocks.at(-1);k&&k.kind==="thinking"?(k.thinking+=` -`+m.thinking,k.durationMs=m.durationMs):p.blocks.push({kind:"thinking",thinking:m.thinking,startedAt:m.startedAt,durationMs:m.durationMs})}}else if(m.type==="toolUse"){const k=r.get(m.toolCallId),x={id:m.toolCallId,name:m.toolName,arg:typeof m.input=="string"?m.input:JSON.stringify(m.input),status:"running",output:m.outputLines,planPath:m.toolName==="ExitPlanMode"?s[m.toolCallId]?.path:void 0};p.tools.push(x),p.blocks.push({kind:"tool",tool:x}),k&&(p.approval=wxe(k),p.approvalId=k.approvalId)}else if(m.type==="toolResult"){const k=p.tools.findIndex(x=>x.id===m.toolCallId);if(k!==-1){const x=p.tools[k],y={...x,status:m.isError?"error":"ok",output:gxe(m.output),media:m.isError?void 0:mxe(x.name,m.output)};y.name==="ExitPlanMode"&&!y.planPath&&(y.planPath=Exe(y.output)),p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}}function d(p,h){for(const m of h){if(m.type!=="toolUse"||!m.outputLines?.length)continue;const k=p.tools.findIndex(_=>_.id===m.toolCallId);if(k===-1)continue;const x=p.tools[k];if(x.output!==void 0)continue;const y={...x,output:m.outputLines};p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}function f(p){if(p.type==="image"||p.type==="video"){const h=p.type,m=p.source;if(m.kind==="url")return{url:m.url,kind:h};if(m.kind==="base64")return{url:`data:${m.mediaType};base64,${m.data}`,kind:h};if(m.kind==="file"&&n)return{url:n(m.fileId),kind:h,fileId:m.fileId}}if(p.type==="file"&&n){if(p.mediaType.startsWith("image/"))return{url:n(p.fileId),kind:"image",fileId:p.fileId};if(p.mediaType.startsWith("video/"))return{url:n(p.fileId),kind:"video",fileId:p.fileId}}}for(const p of e){if(p.role==="system")continue;if(Axe(p)){c();const y=p.metadata?.[LL];i.push({id:p.id,role:"compaction",no:l,text:p.content.filter(w=>w.type==="text").map(w=>w.text).join(` -`),compaction:{trigger:y?.trigger,tokensBefore:y?.tokensBefore,tokensAfter:y?.tokensAfter}});continue}if(p.role==="user"){const y=_xe(p);if(y!==void 0){c(),i.push(Cxe(p,l++,y));continue}const w=p.metadata?.origin?.kind;if(w==="task"||w==="background_task"||w==="task_notification"){const T=p.content.filter(C=>C.type==="text").map(C=>C.text).join(` -`),I=M5e(p.metadata),N=I?[I]:EL(T);if(N.length>0){a??={id:p.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[]};for(const C of N)a.blocks.push({kind:"notification",notification:{...C,createdAt:p.createdAt}})}continue}if(c(),!Mxe(p))continue;const _=p.metadata?.origin,M=_?.kind==="skill_activation"&&_?.trigger==="user-slash",P=_?.kind==="plugin_command"&&_?.trigger==="user-slash",B=[],$=[];for(const T of p.content){if(T.type==="text")if(M)B.push(_.skillArgs??"");else if(P)B.push(_.commandArgs??"");else{const N=rxe(T.text);if(N&&(N.kind==="video"||N.kind==="image")&&n){const H=cxe(N.path);if(H){$.push({url:n(H),kind:N.kind,fileId:H});continue}}const C=dxe(T.text);if(C){$.push({kind:"file",url:C.fileId&&n?n(C.fileId):"",fileId:C.fileId,name:C.name,mediaType:C.mediaType,size:C.size});continue}const O=ixe(T.text);if(O!==T.text&&O.trim().length===0)continue;B.push(O)}const I=f(T);if(I){$.push({url:I.url,kind:I.kind,name:T.type==="file"?T.name:void 0,fileId:I.fileId});continue}T.type==="file"&&n&&$.push({kind:"file",url:n(T.fileId),fileId:T.fileId,name:T.name,mediaType:T.mediaType||void 0,size:T.size})}i.push({id:p.id,role:"user",no:l++,text:B.join(` -`),attachments:$.length>0?$:void 0,skillActivation:M?{name:_.skillName,args:_.skillArgs}:void 0,pluginCommand:P?{pluginId:_.pluginId,commandName:_.commandName,args:_.commandArgs}:void 0,createdAt:p.createdAt});continue}if(p.role==="tool"){a&&u(a,p.content);continue}const h=p.promptId;Txe(a,h)?a!==null&&a.promptId===void 0&&h!==void 0&&(a.promptId=h):(c(),a={id:p.id,promptId:h,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[],durationMs:p.durationMs});const k=a;if(k===null)continue;const x=Ixe(p.content);if(k.promptId!==void 0&&k.foldedSigs.some(y=>$xe(y,x))){d(k,p.content);continue}k.foldedSigs.push(x),u(k,p.content)}return c(!0),i}function Lxe(e,t){const{pushOperationFailure:n,nextOptimisticMsgId:o,connectEventsIfNeeded:s,getEventConn:i,resolveThinkingForPrompt:l}=t,r=V({}),a=z(()=>{const I=e.activeSessionId;if(!I)return null;const N=r.value[I];return N?{parentId:I,agentId:N.agentId}:null}),c=z(()=>a.value?.parentId??null),u=z(()=>a.value!==null),d=z(()=>{const I=a.value;return I?!!e.sideChatSendingByAgent[I.agentId]:!1}),f=z(()=>{const I=a.value;return I?e.sideChatSendingByAgent[I.agentId]?!0:(e.tasksBySession[I.parentId]??[]).some(N=>N.id===I.agentId&&N.status==="running"):!1}),p=z(()=>{const I=a.value;if(!I)return[];const N=e.sideChatMessagesByAgent[I.agentId]??[];return N9(N,[],C=>St().getFileUrl(C),f.value)});function h(I,N){e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[I]:N(e.sideChatMessagesByAgent[I]??[])}}function m(I,N){h(I,C=>[...C,N])}function k(I){h(I,N=>{const C=[...N].reverse().findIndex(H=>H.role==="user");if(C===-1)return N;const O=N.length-1-C;return N.filter((H,D)=>D!==O)})}function x(I,N){h(I,C=>{const O=[...C];for(let H=O.length-1;H>=0;H-=1){const D=O[H];if(D.role==="user")return O[H]={...D,promptId:D.promptId??N},O}return C})}function y(I,N,C){C&&h(I,O=>{const H=O.at(-1);if(H?.role==="assistant"){const D=H.content[0],A=D?.type==="text"?D.text:"";return[...O.slice(0,-1),{...H,content:[{type:"text",text:`${A}${C}`}]}]}return[...O,{id:o(),sessionId:N,role:"assistant",content:[{type:"text",text:C}],createdAt:new Date().toISOString()}]})}function w(I,N,C){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[I]:!1},!C)return;const H=(e.sideChatMessagesByAgent[I]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||y(I,N,C)}async function _(I){const N=e.activeSessionId;N&&await M(N,I)}async function M(I,N){if(!r.value[I]){let C;try{({agentId:C}=await St().startBtw(I))}catch(O){n("openSideChat",O,{sessionId:I});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[C]:e.sideChatMessagesByAgent[C]??[]},r.value={...r.value,[I]:{agentId:C}},s(),i()?.markSideChannelAgent(C)}N&&N.trim()&&await P(I,N.trim())}async function P(I,N){const C=r.value[I],O=N.trim();if(!C||!O)return;const H=I,D=C.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!0};const A={id:o(),sessionId:H,role:"user",content:[{type:"text",text:O}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};m(D,A);try{const R=e.sessions.find(K=>K.id===H),j=(R?.model&&R.model.length>0?R.model:e.defaultModel)??void 0,q=await St().submitPrompt(H,{content:[{type:"text",text:O}],agentId:D,model:j,thinking:await l(H,j)??e.thinking,permissionMode:e.permissionBySession[H]??e.permission,planMode:e.planModeBySession[H]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[H]??!1});x(D,q.promptId),e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[H]:[...e.sideChatUserMessageIdsBySession[H]??[],q.userMessageId]}}catch(R){n("sendSideChatPrompt",R,{sessionId:H}),k(D),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!1}}}function B(){const I=e.activeSessionId;if(!I)return;const{[I]:N,...C}=r.value;r.value=C}async function $(I){const N=a.value;N&&await P(N.parentId,I)}function T(I){if(!r.value[I])return;const{[I]:N,...C}=r.value;r.value=C}return{sideChatTargetBySession:r,sideChatSessionId:c,sideChatVisible:u,sideChatSending:d,sideChatRunning:f,sideChatTurns:p,appendSideChatAssistantText:y,finishSideChatAgent:w,openSideChat:_,openSideChatOn:M,closeSideChat:B,sendSideChatPrompt:$,clearSideChatForSession:T}}const QC=20;class Nxe{constructor(t,n,o,s,i){this.sessionId=t,this.agentId=n,this.fetchPage=o,this.onChange=s,this.onGap=i,this.transcript=new $pe(n)}transcript;refreshPromise=null;buffered=[];agentsValue=[];seqValue;loadingOlderValue=!1;loadOlderErrorValue=!1;refreshErrorValue=!1;get snapshot(){return this.transcript.snapshot()}get agents(){return this.agentsValue}get seq(){return this.seqValue}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlderValue}get loadOlderError(){return this.loadOlderErrorValue}get refreshError(){return this.refreshErrorValue}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshErrorValue=!1;const t=this.fetchPage({pageSize:QC}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshErrorValue=!0,n}).finally(()=>{this.refreshPromise=null,this.flushBuffered(),this.onChange()});return this.refreshPromise=t,this.onChange(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seqValue=n),this.refreshErrorValue=!1,this.onChange()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlderValue)return this.buffered.push({ops:t,seq:n}),!1;if(n!==void 0&&this.seqValue!==void 0){if(n<=this.seqValue)return!0;if(n!==this.seqValue+1)return this.onGap(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seqValue=n),o.gap!==void 0&&this.onGap(),o.accepted.length>0&&this.onChange(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlderValue)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlderValue=!0,this.loadOlderErrorValue=!1,this.onChange();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:QC});this.applyPage(n,!1)}catch(n){throw this.loadOlderErrorValue=!0,n}finally{this.loadingOlderValue=!1,this.flushBuffered(),this.onChange()}}}applyPage(t,n){this.agentsValue=t.agents;const o=this.snapshot,s=n?t.snapshot:{...t.snapshot,items:zxe(t.snapshot.items,o.items),hasMoreOlder:t.snapshot.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}flushBuffered(){const t=this.buffered;this.buffered=[];for(const n of t)this.applyOps(n.ops,n.seq)}}function zxe(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=lpe(s);n.has(i)||(n.add(i),o.push(s))}return o}function eM(e,t){return`${e}\0${t}`}function Bxe(e){const t=new Map,n=new Map,o=new Map;function s(u){u.version.value+=1}function i(u,d,f){const p=e.getEventConnection();p!==null&&(p.subscribeTranscript(u,d,f),o.set(u,d))}function l(u,d){const f=eM(u,d),p=t.get(f);if(p!==void 0)return p;let h;return h={channel:new Nxe(u,d,k=>e.api.getSessionTranscript(u,{...k,agentId:d}),()=>s(h),()=>void r(h)),version:Uo(0)},t.set(f,h),h}async function r(u){try{await u.channel.refresh(),n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId,u.channel.seq)}catch{n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId)}}function a(u,d){e.connectEventsIfNeeded(),n.set(u,d);const f=l(u,d);return f.channel.snapshot.items.length>0||f.channel.seq!==void 0?i(u,d,f.channel.seq):r(f),f}function c(u,d){if(n.get(u)!==d)return;n.delete(u);const f=o.get(u);f!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(u,[f]),o.delete(u))}return{getEntry(u,d){return t.get(eM(u,d))},activate:a,deactivate:c,receiveReset(u,d,f,p){if(n.get(u)!==d)return;l(u,d).channel.receiveReset(f,p)},applyOps(u,d,f,p){return n.get(u)!==d?!0:l(u,d).channel.applyOps(f,p)},forgetSession(u){const d=n.get(u);d!==void 0&&c(u,d);for(const f of t.keys())f.startsWith(`${u}\0`)&&t.delete(f)}}}const Rxe="pythinkerWeb.optimisticUserMessage",tM="Sub Agent";function Pxe(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},compactionBySession:{},warnings:[]}}function Fxe(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function jxe(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Km(e){return e.role==="user"&&e.metadata?.[Rxe]===!0}function Oxe(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function Hxe(e,t){return JSON.stringify(e.content)===JSON.stringify(t.content)}function Dxe(e,t){if(e.role!=="assistant"||t.role!=="assistant"||e.promptId===void 0||e.promptId!==t.promptId)return!1;const n=o=>JSON.stringify(o.content.map(s=>s.type==="thinking"?{type:s.type,thinking:s.thinking}:s.type==="toolUse"?{type:s.type,toolCallId:s.toolCallId,toolName:s.toolName,input:s.input}:s));return n(e)===n(t)}const Vxe=/^<(image|video|audio)\s+path="[^"]+"><\/\1>$/;function nM(e){let t="",n=0;for(const o of e.content)o.type==="text"?Vxe.test(o.text.trim())?n+=1:t+=o.text:(o.type==="image"||o.type==="video"||o.type==="file")&&(n+=1);return{text:t,media:n}}function Wxe(e,t){const n=nM(e),o=nM(t);return n.text===o.text&&n.media===o.media}function qxe(e,t){const n=t.promptId;if(n!==void 0)for(let o=e.length-1;o>=0;o--){const s=e[o];if(Km(s)&&s.promptId===n)return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Km(s)&&Hxe(s,t))return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Km(s)&&Wxe(s,t))return o}return-1}function Uxe(e,t,n){let o=!1;const s=e.map(i=>{let l=!1;const r=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(l=!0,{...a,outputLines:[...a.outputLines??[],n]}));return l?(o=!0,{...i,content:r}):i});return o?s:e}function n4(e,t,n=e.length){for(let o=0;o{typeof r=="number"||typeof r=="boolean"?n.push({label:l,value:String(r)}):typeof r=="string"&&r.length>0&&n.push({label:l,value:r})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[l,r]of Object.entries(s))l==="statusCode"||l==="requestId"||o(l,r);const i=(e.code!==void 0?Zxe[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function Gxe(e,t,n){const o=Fxe(e);switch(jxe(o,n.sessionId,n.seq),t.type){case"sessionCreated":{o.sessions.some(i=>i.id===t.session.id)||(o.sessions=[t.session,...o.sessions]);break}case"sessionUpdated":{o.sessions=o.sessions.map(s=>s.id===t.session.id?t.session:s);break}case"sessionDeleted":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),delete o.messagesBySession[s],delete o.tasksBySession[s],delete o.goalBySession[s],delete o.approvalsBySession[s],delete o.questionsBySession[s],delete o.lastSeqBySession[s],delete o.turnActiveBySession[s],o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionArchived":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionWorkChanged":{o.sessions=o.sessions.map(s=>s.id!==t.sessionId?s:{...s,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?s.mainTurnActive:!1),pendingInteraction:t.pendingInteraction??s.pendingInteraction,lastTurnReason:t.lastTurnReason}),t.mainTurnActive===!0?o.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&delete o.turnActiveBySession[t.sessionId];break}case"sessionMetaUpdated":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,title:t.title??s.title,lastPrompt:t.lastPrompt??s.lastPrompt}:s);break}case"sessionUsageUpdated":{o.sessions=o.sessions.map(s=>{if(s.id!==t.sessionId)return s;const i=t.model&&t.model.length>0?t.model:s.model;return{...s,usage:t.usage,model:i}});break}case"historyCompacted":break;case"compactionStarted":{o.compactionBySession={...o.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const s=t.sessionId,i=o.compactionBySession[s],{[s]:l,...r}=o.compactionBySession;if(o.compactionBySession=r,Object.prototype.hasOwnProperty.call(o.messagesBySession,s)){const a=o.messagesBySession[s]??[],c=`compaction_${s}_${n.seq}`;if(!a.some(u=>u.id===c)){const u={trigger:i?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};o.messagesBySession[s]=[...a,{id:c,sessionId:s,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[LL]:u}}]}}break}case"compactionCancelled":{const{[t.sessionId]:s,...i}=o.compactionBySession;o.compactionBySession=i;break}case"messageCreated":{const s=t.message.sessionId,i=t.message.createdAt;o.sessions=o.sessions.map(a=>a.id===s&&i>a.updatedAt?{...a,updatedAt:i}:a);const l=o.messagesBySession[s]??[];if(!l.some(a=>a.id===t.message.id||Dxe(a,t.message))){if(t.message.role==="user"&&!Oxe(t.message)){const a=qxe(l,t.message);if(a!==-1){const c=[...l],u=c[a];c[a]={...t.message,id:u.id,promptId:t.message.promptId??u.promptId,metadata:{...t.message.metadata,...u.metadata}},o.messagesBySession[s]=c;break}}o.messagesBySession[s]=[...l,t.message]}break}case"messageUpdated":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(l=>{if(l.id!==t.messageId)return l;const r=t.content.map((c,u)=>{const d=l.content[u];return c.type==="thinking"&&d?.type==="thinking"?{...c,startedAt:d.startedAt,durationMs:d.durationMs}:c}),a=Date.now();return n4(r,a,r.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&n4(r,a),{...l,content:r,durationMs:t.durationMs??l.durationMs}});break}case"assistantDelta":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(l=>{if(l.id!==t.messageId)return l;const r=[...l.content],a=t.contentIndex,c=r.length<=a;for(;r.length<=a;)r.push({type:"text",text:""});const u=r[a];let d;return t.delta.text!==void 0?u.type==="text"&&!c?d={type:"text",text:u.text+t.delta.text}:(n4(r,Date.now(),a),d={type:"text",text:t.delta.text}):t.delta.thinking!==void 0?u.type==="thinking"?d={type:"thinking",thinking:u.thinking+t.delta.thinking,signature:u.signature,startedAt:u.startedAt,durationMs:u.durationMs}:(n4(r,Date.now(),a),d={type:"thinking",thinking:t.delta.thinking,startedAt:new Date().toISOString()}):d=u,r[a]=d,{...l,content:r}});break}case"toolOutput":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=Uxe(i,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const s=t.sessionId,i=o.approvalsBySession[s]??[];i.some(a=>a.approvalId===t.approval.approvalId)||(o.approvalsBySession[s]=[...i,t.approval]);const r=t.approval.display;r?.kind==="plan_review"&&typeof r.plan=="string"&&r.plan.length>0&&(o.planReviewByToolCallId={...o.planReviewByToolCallId,[t.approval.toolCallId]:{plan:r.plan,path:typeof r.path=="string"?r.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const s=t.sessionId,i=t.approvalId,l=o.approvalsBySession[s]??[];o.approvalsBySession[s]=l.filter(r=>r.approvalId!==i);break}case"questionRequested":{const s=t.sessionId,i=o.questionsBySession[s]??[];i.some(r=>r.questionId===t.question.questionId)||(o.questionsBySession[s]=[...i,t.question]);break}case"questionAnswered":case"questionDismissed":{const s=t.sessionId,i=t.questionId,l=o.questionsBySession[s]??[];o.questionsBySession[s]=l.filter(r=>r.questionId!==i);break}case"taskCreated":{const s=t.sessionId,i=o.tasksBySession[s]??[],l=i.findIndex(r=>r.id===t.task.id);if(l===-1)o.tasksBySession[s]=[...i,t.task];else{const r=[...i],a=i[l],c=a.kind==="subagent"&&(a.status==="completed"||a.status==="failed"||a.status==="cancelled")&&t.task.kind==="subagent"&&t.task.status==="running"&&t.task.subagentPhase==="queued",u=!c&&a.completedAt!==void 0&&a.completedAtEstimated!==!0&&t.task.completedAtEstimated===!0;r[l]={...t.task,outputLines:c?t.task.outputLines:a.outputLines,text:c?t.task.text:a.text,completedAt:u?a.completedAt:t.task.completedAt,completedAtEstimated:u?a.completedAtEstimated:t.task.completedAtEstimated,description:t.task.description===tM&&a.description!==tM?a.description:t.task.description,dynamicWorkflowIndex:t.task.dynamicWorkflowIndex??a.dynamicWorkflowIndex,parentToolCallId:t.task.parentToolCallId??a.parentToolCallId,subagentType:t.task.subagentType??a.subagentType,runInBackground:t.task.runInBackground??a.runInBackground,backgroundTaskId:t.task.backgroundTaskId??a.backgroundTaskId},o.tasksBySession[s]=r}break}case"taskProgress":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const r=l.outputLines??[];if(r.at(-1)===t.outputChunk)return l;const a=[...r,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?a:a.slice(-40)}});break}case"taskCompleted":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId&&l.backgroundTaskId!==t.taskId)return l;const r=l.status==="completed"||l.status==="failed"||l.status==="cancelled";return{...l,status:r?l.status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview??l.outputPreview,outputBytes:t.outputBytes??l.outputBytes}});break}case"goalUpdated":{const s=t.sessionId;o.goalVersionBySession[s]=(o.goalVersionBySession[s]??0)+1,t.goal===null||t.goal.status==="complete"?delete o.goalBySession[s]:o.goalBySession[s]=t.goal;break}case"configChanged":{o.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":case"promptAborted":break;case"turnActiveChanged":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,mainTurnActive:t.active}:s),t.active?o.turnActiveBySession[t.sessionId]=!0:delete o.turnActiveBySession[t.sessionId];break}case"unknown":{const s=t.raw;if(!(s&&s._noop===!0))if(s&&s._agentError)o.warnings=[...o.warnings,Kxe(s)];else if(s&&s._agentWarning){const i=s.message??s.code??"agent warning";o.warnings=[...o.warnings,`${Mo.global.t("warnings.noteLabel")}: ${i}`]}else{const i=s?.type??"(unknown)";o.warnings=[...o.warnings,`Unhandled event: ${i}`]}break}}return o}function Yxe(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function Xxe(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type!=="toolUse"||pi(s.toolName)!=="todo")continue;let i=s.input;if(typeof i=="string")try{i=JSON.parse(i)}catch{continue}const l=i?.todos;if(Array.isArray(l))return l.flatMap(r=>{const a=r??{},c=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return c?[{title:c,status:Yxe(a.status)}]:[]})}}return[]}const Jxe=["queued","working","suspended","completed","failed","cancelled"];function iz(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function Qxe(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function eSe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.dynamicWorkflowIndex===void 0)continue;const o=n.parentToolCallId??"dynamic-workflow",s=t.get(o)??[];s.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:iz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((l,r)=>l.dynamicWorkflowIndex-r.dynamicWorkflowIndex||l.id.localeCompare(r.id)),i=Qxe();for(const l of s)i[l.phase]++;return{id:n,members:s,counts:i}}).filter(n=>n.members.length>1).toSorted((n,o)=>{const s=n.members.at(0)?.dynamicWorkflowIndex??0,i=o.members.at(0)?.dynamicWorkflowIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function tSe(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of Jxe)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=o.counts[s])}return{done:t,total:n}}function nSe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const o=t.get(n.parentToolCallId)??[];o.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:iz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.dynamicWorkflowIndex-i.dynamicWorkflowIndex||s.id.localeCompare(i.id)));return t}const na=x9(),Cr=y_e(),af=M_e(),lz=dn.activeWorkspace,rz=dn.planMode,az=dn.planArmed,cz=dn.dynamicWorkflowMode,uz=dn.goalMode,oM=40401,dz=dn.onboarded;w1(dn.codeFont);w1(dn.theme);w1(dn.thinking);w1(dn.permission);function o4(e){const t=ls(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const o={};for(const[s,i]of Object.entries(n))i===!0&&(o[s]=!0);return o}catch{return{}}}function a6(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);Es(e,JSON.stringify(n))}catch{}}function fz(){a6(rz,Le.planModeBySession)}function oSe(){a6(az,Le.planArmedBySession)}function pz(){a6(cz,Le.dynamicWorkflowModeBySession)}function hz(){a6(uz,Le.goalModeBySession)}function sSe(){try{return ls(lz)}catch{return null}}const mz=dn.hiddenWorkspaces;function iSe(){try{const e=ls(mz);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function lSe(e){try{Es(mz,JSON.stringify(e))}catch{}}function rSe(e){try{Es(lz,e)}catch{}}function aSe(e,t){if(t&&e.startsWith(t)){const o=e.slice(t.length);return o?`~${o}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const Le=ds({...Pxe(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlagStates:[],subagentModelPolicy:null,subagentModelPolicySaving:!1,workspaceName:"pythinker-web",connection:"disconnected",permission:"manual",permissionBySession:{},thinking:void 0,thinkingBySession:{},planModeBySession:o4(rz),planArmedBySession:o4(az),dynamicWorkflowModeBySession:o4(cz),goalModeBySession:o4(uz),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:zg(),authReady:!1,defaultModel:null,workspaces:[],activeWorkspaceId:sSe(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:iSe(),availableOpenInApps:[],serverCapabilities:{},config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1}),If=ds({planMode:!1,dynamicWorkflowMode:!1,goalMode:!1});function cSe(){if(Le.activeSessionId)return;const e=Le.config?.defaultPermissionMode;(e==="auto"||e==="yolo"||e==="manual")&&(Le.permission=e)}function gz(e){Le.sessions=e}function c6(e,t){Le.sessions=Le.sessions.map(n=>n.id===e?t(n):n)}function uSe(e){Le.sessions=[e,...Le.sessions.filter(t=>t.id!==e.id)]}function dSe(e){Le.sessions=[...Le.sessions,e]}function fSe(e){Le.sessions=Le.sessions.filter(t=>t.id!==e)}function vz(){const e=Le.activeSessionId;e&&Le.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(Le.unreadBySession={...Le.unreadBySession,[e]:!1},Bg({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===dn.unread&&(Le.unreadBySession=zg(),vz())});function V7(){if(ul===null||!ul.health().stale)return;_s("ws:stale-reconnect",{sessionId:Le.activeSessionId,status:"stale"}),ia("ws: stale socket on focus, reconnecting",{activeSessionId:Le.activeSessionId}),ul.reconnect();const e=Le.activeSessionId;e&&np.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(vz(),V7())});typeof window<"u"&&(window.addEventListener("focus",V7),window.addEventListener("online",V7));function z9(e){Le.activeSessionId=e}function pSe(e){Le.messagesBySession=e}function hSe(e,t){Le.messagesBySession={...Le.messagesBySession,[e]:t}}function yz(e,t){Le.messagesBySession={...Le.messagesBySession,[e]:t(Le.messagesBySession[e]??[])}}function mSe(e){const{[e]:t,...n}=Le.messagesBySession;Le.messagesBySession=n}function wz(e){ul?.unsubscribe(e),HSe(e),ep.discard(({meta:t})=>t.sessionId===e),fSe(e),mSe(e),delete Le.approvalsBySession[e],delete Le.questionsBySession[e],delete Le.tasksBySession[e],delete Le.goalBySession[e],delete Le.gitStatusBySession[e],delete Le.lastSeqBySession[e],delete Le.compactionBySession[e],delete Le.messagesLoadingMoreBySession[e],delete Le.messagesHasMoreBySession[e],delete Le.messagesLoadMoreErrorBySession[e],delete q7[e],tp.delete(e),$4.delete(e),Lz.delete(e),V_e(e),delete Le.queuedBySession[e],delete Le.promptIdBySession[e],delete Le.inFlightBySession[e],delete Le.turnActiveBySession[e],delete Le.planModeBySession[e],delete Le.planArmedBySession[e],delete Le.dynamicWorkflowModeBySession[e],delete Le.goalModeBySession[e],delete Le.thinkingBySession[e],fz(),oSe(),pz(),hz()}const kz=V(null),bz=V([]),_z=V(!1),u6=V(!1),xz=V(null);async function $f(e){let t;try{t=await St().getSessionStatus(e)}catch{return}c6(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),Le.dynamicWorkflowModeBySession={...Le.dynamicWorkflowModeBySession,[e]:t.dynamicWorkflowMode},Le.planModeBySession={...Le.planModeBySession,[e]:t.planMode},(t.permission==="auto"||t.permission==="yolo"||t.permission==="manual")&&(Le.permissionBySession={...Le.permissionBySession,[e]:t.permission},Le.activeSessionId===e&&(Le.permission=t.permission)),t.thinkingEffort.length>0&&(Le.thinkingBySession={...Le.thinkingBySession,[e]:t.thinkingEffort})}async function gSe(e){const t=Le.goalVersionBySession[e]??0;let n;try{n=await St().getSessionGoal(e)}catch{return}if((Le.goalVersionBySession[e]??0)!==t)return;const o={...Le.goalBySession};n===null||n.status==="complete"?delete o[e]:o[e]=n,Le.goalBySession=o}function Sz(e,t){const n=t??Le.activeSessionId;return n?Promise.resolve(St().updateSession(n,e)).then(()=>$f(n)).then(()=>!0).catch(o=>(X0("persistSessionProfile",o,{sessionId:n}),!1)):Promise.resolve(!1)}const Cz=dn.conversationToc;function vSe(){try{const e=ls(Cz);return e===null?!0:e==="true"}catch{return!0}}function ySe(e){try{Es(Cz,e?"true":"false")}catch{}}const Mz=V(vSe());function wSe(e){Mz.value=e,ySe(e)}function Az(e){try{return ls(e)!=="false"}catch{return!0}}function Tz(e,t){try{Es(e,t?"true":"false")}catch{}}const Ez=V(Az(dn.turnFolding));function kSe(e){Ez.value=e,Tz(dn.turnFolding,e)}const Iz=V(Az(dn.activityRunFolding));function bSe(e){Iz.value=e,Tz(dn.activityRunFolding,e)}function _Se(e){try{return ls(e)??""}catch{return""}}const B9=V(_Se(dz)==="1");function xSe(e){B9.value=e;try{Es(dz,e?"1":"0")}catch{}}let ul=null;const W7=Bxe({api:St(),connectEventsIfNeeded:R9,getEventConnection:()=>ul});let sM=0;function $z(){return sM+=1,`msg_opt_${Date.now().toString(36)}_${sM}`}function SSe(e,t,n){const o={sessions:Le.sessions,activeSessionId:Le.activeSessionId,messagesBySession:Le.messagesBySession,approvalsBySession:Le.approvalsBySession,planReviewByToolCallId:Le.planReviewByToolCallId,questionsBySession:Le.questionsBySession,tasksBySession:Le.tasksBySession,goalBySession:Le.goalBySession,goalVersionBySession:Le.goalVersionBySession,lastSeqBySession:Le.lastSeqBySession,turnActiveBySession:Le.turnActiveBySession,compactionBySession:Le.compactionBySession,config:Le.config,warnings:Le.warnings},s=Gxe(o,e,{sessionId:t,seq:n});gz(s.sessions),z9(s.activeSessionId),pSe(s.messagesBySession),Le.approvalsBySession=s.approvalsBySession,Le.planReviewByToolCallId=s.planReviewByToolCallId,Le.questionsBySession=s.questionsBySession,Le.tasksBySession=s.tasksBySession,Le.goalBySession=s.goalBySession,Le.goalVersionBySession=s.goalVersionBySession,Le.lastSeqBySession=s.lastSeqBySession,Le.turnActiveBySession=s.turnActiveBySession,Le.compactionBySession=s.compactionBySession,Le.config=s.config??null,Le.warnings=s.warnings,e.type==="configChanged"&&(Le.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Eo.loadModels(),Eo.loadProviders()),e.type==="sessionUsageUpdated"&&(e.dynamicWorkflowMode!==void 0&&(Le.dynamicWorkflowModeBySession={...Le.dynamicWorkflowModeBySession,[e.sessionId]:e.dynamicWorkflowMode}),e.planMode!==void 0&&(Le.planModeBySession={...Le.planModeBySession,[e.sessionId]:e.planMode}),e.thinking!==void 0&&(Le.thinkingBySession={...Le.thinkingBySession,[e.sessionId]:e.thinking}))}function CSe(e,t){const n=Le.lastSeqBySession[t.sessionId]??0,o=Le.turnActiveBySession[t.sessionId]??!1;SSe(e,t.sessionId,t.seq);const s=Si.sideChatTargetBySession.value[t.sessionId];if(s){const{agentId:i}=s,l=t.sessionId;e.type==="agentDelta"&&e.agentId===i?e.delta.text&&Si.appendSideChatAssistantText(i,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===i?Si.finishSideChatAgent(i,l):e.type==="taskProgress"&&e.taskId===i?Si.appendSideChatAssistantText(i,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===i&&Si.finishSideChatAgent(i,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const i=e.message.sessionId;Le.promptIdBySession[i]!==e.message.promptId&&(Le.promptIdBySession={...Le.promptIdBySession,[i]:e.message.promptId})}if(e.type==="assistantDelta"&&t.sessionId===Le.activeSessionId&&na.recordMoonDelta((e.delta.text?.length??0)+(e.delta.thinking?.length??0)),e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const i=e.reason;dMe(e.sessionId,i==="cancelled"||i==="failed"||i==="blocked"?"aborted":"idle",o)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&uMe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&Le.promptIdBySession[e.sessionId]===e.promptId&&zt.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&fMe(e.sessionId,e.question),e.type==="approvalRequested"&&pMe(e.sessionId,e.approval)}const ep=jbe(({appEvent:e,meta:t})=>CSe(e,t),({appEvent:e})=>Bbe(e),{coalesce:Hbe});function R9(){if(ul!==null||typeof WebSocket>"u")return;_s("ws:connection",{status:"connecting"}),Le.connection="connecting",ul=St().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){zt.applyWorkspaceEvent(t);return}for(const o of Obe({appEvent:t,meta:n}))ep(o)},onResync(t,n,o){_s("ws:resync",{sessionId:t,status:"required",seq:n}),ep.flush(),tp.add(t),np.request(t)},onError(t,n,o){_s("ws:error",{status:"failed",errorCode:t,fatal:o}),P9({severity:"error",title:Mo.global.t("warnings.wsTitle"),message:n,details:[qo("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){_s("ws:connection",{status:t?"connected":"disconnected"}),Le.connected=t,Le.connection=t?"connected":"disconnected",t&&(NSe(),zt.refreshServerMeta())},onTranscriptReset(t,n,o,s){W7.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return W7.applyOps(t,n,o,s)}})}const q7={},tp=new Set,$4=new Set,Lz=new Set;function MSe(e){return ol(e)&&e.code===oM?!0:typeof e=="object"&&e!==null&&e.code===oM}function qo(e,t){if(!(t==null||t===""))return{label:Mo.global.t(`warnings.details.${e}`),value:Nz(t)}}function Nz(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function ASe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function TSe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function ESe(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function ISe(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function iM(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function $Se(e,t,n){const o=i9(t),s=ol(t),i=o||s?t.timestamp:void 0,l=o||s?t.durationMs:void 0,r=[qo("operation",e),qo("sessionId",n??Le.activeSessionId),qo("connection",Le.connection),qo("timestamp",ISe(i??Date.now()))];return o?r.push(qo("duration",iM(l)),qo("request",`${t.method} ${t.path}`),qo("endpoint",t.url),qo("requestId",t.requestId),qo("phase",t.phase),qo("timeout",`${t.timeoutMs}ms`),qo("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),qo("contentType",t.contentType),qo("responsePreview",t.bodyPreview),qo("cause",t.cause)):s?r.push(qo("duration",iM(l)),qo("code",t.code),qo("requestId",t.requestId),qo("message",t.message),qo("details",t.details)):r.push(qo("errorName",ASe(t)),qo("message",TSe(t)??Nz(t)),qo("stack",ESe(t))),r.filter(a=>a!==void 0)}function LSe(e,t,n={}){const o=i9(t),s=ol(t),i=n.title??(o?Mo.global.t("warnings.daemonNetworkTitle"):s?Mo.global.t("warnings.daemonApiTitle"):Mo.global.t("warnings.operationFailedTitle")),l=n.message??(o?Mo.global.t("warnings.daemonNetworkMessage"):s?t.message:Mo.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:l,details:$Se(e,t,n.sessionId)}}function P9(e){Le.warnings=[...Le.warnings,e]}function NSe(){const e=Mo.global.t("warnings.wsTitle"),t=Le.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==Le.warnings.length&&(Le.warnings=t)}function X0(e,t,n){console.error(`[pythinker-web] operation failed: ${e}`,t);const o=ol(t),s=i9(t);_s("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:o?t.code:void 0,requestId:o||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),P9(LSe(e,t,n))}const zSe={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function BSe(e){if(!ol(e))return;const t=zSe[e.code];return t?Mo.global.t(t):void 0}async function RSe(e){if(wz(e),Le.activeSessionId!==e)return;const t=Le.sessions[0];t?await zt.selectSession(t.id,{urlMode:"replace"}):(z9(void 0),Le.sessionLoading=!1,zt.writeSessionUrl(void 0,"replace"))}const lM=new Set;async function PSe(e){if(!lM.has(e)){lM.add(e);try{const t=await St().getSessionWarnings(e),n=Mo.global.t("warnings.noteLabel");for(const o of t)P9(`${n}: ${o.message}`)}catch{}}}async function F9(e){const t=zt.localTurnStartState(e);try{const o=await St().getSessionSnapshot(e);if(!Le.sessions.some(a=>a.id===e))return"ok";ep.flush();const s=Le.lastSeqBySession[e]??0,i=q7[e];if(!(tp.has(e)||op.has(e))&&i!==void 0&&i===o.epoch&&s>o.asOfSeq)return $4.delete(e)||($4.add(e),np.request(e)),"ok";if(!zt.isLocalTurnSnapshotCurrent(e,t))return zt.afterLocalTurnStartsSettle(e,()=>{np.request(e)}),"ok";const r=M7(o.session.usage);c6(e,a=>({...o.session,model:o.session.model&&o.session.model.length>0?o.session.model:a.model,usage:r?a.usage:o.session.usage})),hSe(e,$be(Le.messagesBySession[e]??[],o.messages)),Le.tasksBySession={...Le.tasksBySession,[e]:Lbe(o.subagents,Le.tasksBySession[e]??[])},Le.messagesHasMoreBySession={...Le.messagesHasMoreBySession,[e]:o.hasMoreMessages},Le.approvalsBySession={...Le.approvalsBySession,[e]:o.pendingApprovals};for(const a of o.pendingApprovals){const c=a.display;c?.kind==="plan_review"&&typeof c.plan=="string"&&c.plan.length>0&&(Le.planReviewByToolCallId={...Le.planReviewByToolCallId,[a.toolCallId]:{plan:c.plan,path:typeof c.path=="string"?c.path:void 0}})}Le.questionsBySession={...Le.questionsBySession,[e]:o.pendingQuestions},Le.lastSeqBySession={...Le.lastSeqBySession,[e]:o.asOfSeq},q7[e]=o.epoch,tp.delete(e),$4.delete(e),zt.handleSessionSnapshot(e,{inFlightTurn:o.inFlightTurn,busy:o.session.busy});{const a={...Le.turnActiveBySession};o.session.mainTurnActive??(o.inFlightTurn!==null&&o.session.busy)?a[e]=!0:delete a[e],Le.turnActiveBySession=a}return R9(),ul&&(ul.seedSnapshot(e,o),ul.subscribe(e,{seq:o.asOfSeq,epoch:o.epoch}),OSe(e)),op.delete(e),r&&$f(e),PSe(e),"ok"}catch(n){return MSe(n)?(await RSe(e),"not-found"):(X0("getSessionSnapshot",n,{title:Mo.global.t("warnings.sessionSnapshotTitle"),message:Mo.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const np=Nbe(F9);function FSe(e){return Object.prototype.hasOwnProperty.call(Le.messagesBySession,e)}const jSe=4,oa=[],op=new Set;function OSe(e){const t=oa.indexOf(e);for(t!==-1&&oa.splice(t,1),oa.unshift(e);oa.length>jSe;){let n=-1;for(let s=oa.length-1;s>=0;s--)if(oa[s]!==Le.activeSessionId){n=s;break}if(n===-1)break;const[o]=oa.splice(n,1);if(o===void 0)break;ul?.unsubscribe(o),op.add(o)}}function HSe(e){const t=oa.indexOf(e);t!==-1&&oa.splice(t,1),op.delete(e)}async function DSe(e){return F9(e)}function j9(e,t){return(Le.inFlightBySession[e]??!1)||(Le.turnActiveBySession[e]??!1)||(t??Le.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function O9(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return Mo.global.t("sessions.justNow");if(s<1)return`${Math.round(o/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const i=o/864e5;return i<7?`${Math.round(i)}d`:i<30?`${Math.round(i/7)}w`:i<365?`${Math.round(i/30)}mo`:`${Math.round(i/365)}y`}catch{return e}}const VSe=3e4,cf=V(0);let Gm=null;function WSe(){Gm===null&&(Gm=setInterval(()=>{cf.value=(cf.value+1)%Number.MAX_SAFE_INTEGER},VSe),Gm.unref?.())}function qSe(e,t){const n=e.split(` +`+m.thinking,k.durationMs=m.durationMs):p.blocks.push({kind:"thinking",thinking:m.thinking,startedAt:m.startedAt,durationMs:m.durationMs})}}else if(m.type==="toolUse"){const k=r.get(m.toolCallId),x={id:m.toolCallId,name:m.toolName,arg:typeof m.input=="string"?m.input:JSON.stringify(m.input),status:"running",output:m.outputLines,planPath:m.toolName==="ExitPlanMode"?s[m.toolCallId]?.path:void 0};p.tools.push(x),p.blocks.push({kind:"tool",tool:x}),k&&(p.approval=Vxe(k),p.approvalId=k.approvalId)}else if(m.type==="toolResult"){const k=p.tools.findIndex(x=>x.id===m.toolCallId);if(k!==-1){const x=p.tools[k],y={...x,status:m.isError?"error":"ok",output:Oxe(m.output),media:m.isError?void 0:jxe(x.name,m.output)};y.name==="ExitPlanMode"&&!y.planPath&&(y.planPath=Jxe(y.output)),p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}}function d(p,h){for(const m of h){if(m.type!=="toolUse"||!m.outputLines?.length)continue;const k=p.tools.findIndex(_=>_.id===m.toolCallId);if(k===-1)continue;const x=p.tools[k];if(x.output!==void 0)continue;const y={...x,output:m.outputLines};p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}function f(p){if(p.type==="image"||p.type==="video"){const h=p.type,m=p.source;if(m.kind==="url")return{url:m.url,kind:h};if(m.kind==="base64")return{url:`data:${m.mediaType};base64,${m.data}`,kind:h};if(m.kind==="file"&&n)return{url:n(m.fileId),kind:h,fileId:m.fileId}}if(p.type==="file"&&n){if(p.mediaType.startsWith("image/"))return{url:n(p.fileId),kind:"image",fileId:p.fileId};if(p.mediaType.startsWith("video/"))return{url:n(p.fileId),kind:"video",fileId:p.fileId}}}for(const p of e){if(p.role==="system")continue;if(B9(p)){c();const y=p.metadata?.[B$];i.push({id:p.id,role:"compaction",no:l,text:p.content.filter(w=>w.type==="text").map(w=>w.text).join(` +`),compaction:{trigger:y?.trigger,tokensBefore:y?.tokensBefore,tokensAfter:y?.tokensAfter}});continue}if(p.role==="user"){const y=Uxe(p);if(y!==void 0){c(),i.push(Gxe(p,l++,y));continue}const w=p.metadata?.origin?.kind;if(w==="task"||w==="background_task"||w==="task_notification"){const E=p.content.filter(C=>C.type==="text").map(C=>C.text).join(` +`),T=U5e(p.metadata),$=T?[T]:$$(E);if($.length>0){a??={id:p.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[]};for(const C of $)a.blocks.push({kind:"notification",notification:{...C,createdAt:p.createdAt}})}continue}if(c(),!Yxe(p))continue;const _=p.metadata?.origin,A=_?.kind==="skill_activation"&&_?.trigger==="user-slash",P=_?.kind==="plugin_command"&&_?.trigger==="user-slash",z=[],L=[];for(const E of p.content){if(E.type==="text")if(A)z.push(_.skillArgs??"");else if(P)z.push(_.commandArgs??"");else{const $=Lxe(E.text);if($&&($.kind==="video"||$.kind==="image")&&n){const H=Nxe($.path);if(H){L.push({url:n(H),kind:$.kind,fileId:H});continue}}const C=Bxe(E.text);if(C){L.push({kind:"file",url:C.fileId&&n?n(C.fileId):"",fileId:C.fileId,name:C.name,mediaType:C.mediaType,size:C.size});continue}const j=Exe(E.text);if(j!==E.text&&j.trim().length===0)continue;z.push(j)}const T=f(E);if(T){L.push({url:T.url,kind:T.kind,name:E.type==="file"?E.name:void 0,fileId:T.fileId});continue}E.type==="file"&&n&&L.push({kind:"file",url:n(E.fileId),fileId:E.fileId,name:E.name,mediaType:E.mediaType||void 0,size:E.size})}i.push({id:p.id,role:"user",no:l++,text:z.join(` +`),attachments:L.length>0?L:void 0,skillActivation:A?{name:_.skillName,args:_.skillArgs}:void 0,pluginCommand:P?{pluginId:_.pluginId,commandName:_.commandName,args:_.commandArgs}:void 0,createdAt:p.createdAt});continue}if(p.role==="tool"){a&&u(a,p.content);continue}const h=p.promptId;Xxe(a,h)?a!==null&&a.promptId===void 0&&h!==void 0&&(a.promptId=h):(c(),a={id:p.id,promptId:h,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[],durationMs:p.durationMs});const k=a;if(k===null)continue;const x=Qxe(p.content);if(k.promptId!==void 0&&k.foldedSigs.some(y=>eSe(y,x))){d(k,p.content);continue}k.foldedSigs.push(x),u(k,p.content)}return c(!0),i}function tSe(e){if(B9(e))return!0;if(e.role!=="user")return!1;const t=e.metadata?.origin?.kind;return t!=="task"&&t!=="background_task"&&t!=="task_notification"}function nSe(e){for(let t=e.length-1;t>=0;t-=1)if(tSe(e[t]))return t;return 0}function oSe(){let e;return(t,n,o,s=!0,i=cz)=>{const l=t.at(-1),r=e!==void 0&&(e.approvals===n||e.approvals.length===0&&n.length===0)&&e.getFileUrl===o&&e.sessionActive===s&&e.planReviewByToolCallId===i;if(e!==void 0&&r&&e.messages===t&&e.messageCount===t.length){if(e.lastMessage===l)return e.turns;if(l?.role==="assistant"&&!B9(l)&&e.lastMessage?.role==="assistant"&&e.lastMessage.id===l.id){const d=M2(t.slice(e.boundaryIndex),n,o,s,i),f=e.prefixTurns.filter(k=>k.role!=="compaction").length,p=d.map(k=>({...k,no:k.no+f})),h=e.tailTurns;if(p.length===h.length&&p.every((k,x)=>k.id===h[x]?.id&&k.role===h[x]?.role)){for(let x=0;x{const T=e.activeSessionId;if(!T)return null;const $=r.value[T];return $?{parentId:T,agentId:$.agentId}:null}),c=B(()=>a.value?.parentId??null),u=B(()=>a.value!==null),d=B(()=>{const T=a.value;return T?!!e.sideChatSendingByAgent[T.agentId]:!1}),f=B(()=>{const T=a.value;return T?e.sideChatSendingByAgent[T.agentId]?!0:(e.tasksBySession[T.parentId]??[]).some($=>$.id===T.agentId&&$.status==="running"):!1}),p=B(()=>{const T=a.value;if(!T)return[];const $=e.sideChatMessagesByAgent[T.agentId]??[];return M2($,[],C=>Ct().getFileUrl(C),f.value)});function h(T,$){e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[T]:$(e.sideChatMessagesByAgent[T]??[])}}function m(T,$){h(T,C=>[...C,$])}function k(T){h(T,$=>{const C=[...$].reverse().findIndex(H=>H.role==="user");if(C===-1)return $;const j=$.length-1-C;return $.filter((H,D)=>D!==j)})}function x(T,$){h(T,C=>{const j=[...C];for(let H=j.length-1;H>=0;H-=1){const D=j[H];if(D.role==="user")return j[H]={...D,promptId:D.promptId??$},j}return C})}function y(T,$,C){C&&h(T,j=>{const H=j.at(-1);if(H?.role==="assistant"){const D=H.content[0],M=D?.type==="text"?D.text:"";return[...j.slice(0,-1),{...H,content:[{type:"text",text:`${M}${C}`}]}]}return[...j,{id:o(),sessionId:$,role:"assistant",content:[{type:"text",text:C}],createdAt:new Date().toISOString()}]})}function w(T,$,C){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[T]:!1},!C)return;const H=(e.sideChatMessagesByAgent[T]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||y(T,$,C)}async function _(T){const $=e.activeSessionId;$&&await A($,T)}async function A(T,$){if(!r.value[T]){let C;try{({agentId:C}=await Ct().startBtw(T))}catch(j){n("openSideChat",j,{sessionId:T});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[C]:e.sideChatMessagesByAgent[C]??[]},r.value={...r.value,[T]:{agentId:C}},s(),i()?.markSideChannelAgent(C)}$&&$.trim()&&await P(T,$.trim())}async function P(T,$){const C=r.value[T],j=$.trim();if(!C||!j)return;const H=T,D=C.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!0};const M={id:o(),sessionId:H,role:"user",content:[{type:"text",text:j}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};m(D,M);try{const R=e.sessions.find(Z=>Z.id===H),O=(R?.model&&R.model.length>0?R.model:e.defaultModel)??void 0,U=await Ct().submitPrompt(H,{content:[{type:"text",text:j}],agentId:D,model:O,thinking:await l(H,O)??e.thinking,permissionMode:e.permissionBySession[H]??e.permission,planMode:e.planModeBySession[H]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[H]??!1});x(D,U.promptId),e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[H]:[...e.sideChatUserMessageIdsBySession[H]??[],U.userMessageId]}}catch(R){n("sendSideChatPrompt",R,{sessionId:H}),k(D),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!1}}}function z(){const T=e.activeSessionId;if(!T)return;const{[T]:$,...C}=r.value;r.value=C}async function L(T){const $=a.value;$&&await P($.parentId,T)}function E(T){if(!r.value[T])return;const{[T]:$,...C}=r.value;r.value=C}return{sideChatTargetBySession:r,sideChatSessionId:c,sideChatVisible:u,sideChatSending:d,sideChatRunning:f,sideChatTurns:p,appendSideChatAssistantText:y,finishSideChatAgent:w,openSideChat:_,openSideChatOn:A,closeSideChat:z,sendSideChatPrompt:L,clearSideChatForSession:E}}const tM=20;class iSe{constructor(t,n,o,s,i){this.sessionId=t,this.agentId=n,this.fetchPage=o,this.onChange=s,this.onGap=i,this.transcript=new Xpe(n)}transcript;refreshPromise=null;buffered=[];agentsValue=[];seqValue;loadingOlderValue=!1;loadOlderErrorValue=!1;refreshErrorValue=!1;get snapshot(){return this.transcript.snapshot()}get agents(){return this.agentsValue}get seq(){return this.seqValue}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlderValue}get loadOlderError(){return this.loadOlderErrorValue}get refreshError(){return this.refreshErrorValue}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshErrorValue=!1;const t=this.fetchPage({pageSize:tM}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshErrorValue=!0,n}).finally(()=>{this.refreshPromise=null,this.flushBuffered(),this.onChange()});return this.refreshPromise=t,this.onChange(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seqValue=n),this.refreshErrorValue=!1,this.onChange()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlderValue)return this.buffered.push({ops:t,seq:n}),!1;if(n!==void 0&&this.seqValue!==void 0){if(n<=this.seqValue)return!0;if(n!==this.seqValue+1)return this.onGap(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seqValue=n),o.gap!==void 0&&this.onGap(),o.accepted.length>0&&this.onChange(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlderValue)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlderValue=!0,this.loadOlderErrorValue=!1,this.onChange();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:tM});this.applyPage(n,!1)}catch(n){throw this.loadOlderErrorValue=!0,n}finally{this.loadingOlderValue=!1,this.flushBuffered(),this.onChange()}}}applyPage(t,n){this.agentsValue=t.agents;const o=this.snapshot,s=n?t.snapshot:{...t.snapshot,items:lSe(t.snapshot.items,o.items),hasMoreOlder:t.snapshot.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}flushBuffered(){const t=this.buffered;this.buffered=[];for(const n of t)this.applyOps(n.ops,n.seq)}}function lSe(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=Mpe(s);n.has(i)||(n.add(i),o.push(s))}return o}function nM(e,t){return`${e}\0${t}`}function rSe(e){const t=new Map,n=new Map,o=new Map;function s(u){u.version.value+=1}function i(u,d,f){const p=e.getEventConnection();p!==null&&(p.subscribeTranscript(u,d,f),o.set(u,d))}function l(u,d){const f=nM(u,d),p=t.get(f);if(p!==void 0)return p;let h;return h={channel:new iSe(u,d,k=>e.api.getSessionTranscript(u,{...k,agentId:d}),()=>s(h),()=>void r(h)),version:Uo(0)},t.set(f,h),h}async function r(u){try{await u.channel.refresh(),n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId,u.channel.seq)}catch{n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId)}}function a(u,d){e.connectEventsIfNeeded(),n.set(u,d);const f=l(u,d);return f.channel.snapshot.items.length>0||f.channel.seq!==void 0?i(u,d,f.channel.seq):r(f),f}function c(u,d){if(n.get(u)!==d)return;n.delete(u);const f=o.get(u);f!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(u,[f]),o.delete(u))}return{getEntry(u,d){return t.get(nM(u,d))},activate:a,deactivate:c,receiveReset(u,d,f,p){if(n.get(u)!==d)return;l(u,d).channel.receiveReset(f,p)},applyOps(u,d,f,p){return n.get(u)!==d?!0:l(u,d).channel.applyOps(f,p)},forgetSession(u){const d=n.get(u);d!==void 0&&c(u,d);for(const f of t.keys())f.startsWith(`${u}\0`)&&t.delete(f)}}}const aSe="pythinkerWeb.optimisticUserMessage",oM="Sub Agent";function cSe(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},compactionBySession:{},warnings:[]}}function uSe(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function dSe(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Ym(e){return e.role==="user"&&e.metadata?.[aSe]===!0}function fSe(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function pSe(e,t){return JSON.stringify(e.content)===JSON.stringify(t.content)}function hSe(e,t){if(e.role!=="assistant"||t.role!=="assistant"||e.promptId===void 0||e.promptId!==t.promptId)return!1;const n=o=>JSON.stringify(o.content.map(s=>s.type==="thinking"?{type:s.type,thinking:s.thinking}:s.type==="toolUse"?{type:s.type,toolCallId:s.toolCallId,toolName:s.toolName,input:s.input}:s));return n(e)===n(t)}const mSe=/^<(image|video|audio)\s+path="[^"]+"><\/\1>$/;function sM(e){let t="",n=0;for(const o of e.content)o.type==="text"?mSe.test(o.text.trim())?n+=1:t+=o.text:(o.type==="image"||o.type==="video"||o.type==="file")&&(n+=1);return{text:t,media:n}}function gSe(e,t){const n=sM(e),o=sM(t);return n.text===o.text&&n.media===o.media}function vSe(e,t){const n=t.promptId;if(n!==void 0)for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ym(s)&&s.promptId===n)return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ym(s)&&pSe(s,t))return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ym(s)&&gSe(s,t))return o}return-1}function ySe(e,t,n){let o=!1;const s=e.map(i=>{let l=!1;const r=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(l=!0,{...a,outputLines:[...a.outputLines??[],n]}));return l?(o=!0,{...i,content:r}):i});return o?s:e}function tp(e,t,n=e.length){for(let o=0;os.id===t.messageId);return o===-1?!1:(e[o]=uz(e[o],t),!0)}const kSe={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function bSe(e){const t=Mo.global.t,n=[],o=(l,r)=>{typeof r=="number"||typeof r=="boolean"?n.push({label:l,value:String(r)}):typeof r=="string"&&r.length>0&&n.push({label:l,value:r})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[l,r]of Object.entries(s))l==="statusCode"||l==="requestId"||o(l,r);const i=(e.code!==void 0?kSe[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function _Se(e,t,n){const o=uSe(e);switch(dSe(o,n.sessionId,n.seq),t.type){case"sessionCreated":{o.sessions.some(i=>i.id===t.session.id)||(o.sessions=[t.session,...o.sessions]);break}case"sessionUpdated":{o.sessions=o.sessions.map(s=>s.id===t.session.id?t.session:s);break}case"sessionDeleted":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),delete o.messagesBySession[s],delete o.tasksBySession[s],delete o.goalBySession[s],delete o.approvalsBySession[s],delete o.questionsBySession[s],delete o.lastSeqBySession[s],delete o.turnActiveBySession[s],o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionArchived":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionWorkChanged":{o.sessions=o.sessions.map(s=>s.id!==t.sessionId?s:{...s,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?s.mainTurnActive:!1),pendingInteraction:t.pendingInteraction??s.pendingInteraction,lastTurnReason:t.lastTurnReason}),t.mainTurnActive===!0?o.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&delete o.turnActiveBySession[t.sessionId];break}case"sessionMetaUpdated":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,title:t.title??s.title,lastPrompt:t.lastPrompt??s.lastPrompt}:s);break}case"sessionUsageUpdated":{o.sessions=o.sessions.map(s=>{if(s.id!==t.sessionId)return s;const i=t.model&&t.model.length>0?t.model:s.model;return{...s,usage:t.usage,model:i}});break}case"historyCompacted":break;case"compactionStarted":{o.compactionBySession={...o.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const s=t.sessionId,i=o.compactionBySession[s],{[s]:l,...r}=o.compactionBySession;if(o.compactionBySession=r,Object.prototype.hasOwnProperty.call(o.messagesBySession,s)){const a=o.messagesBySession[s]??[],c=`compaction_${s}_${n.seq}`;if(!a.some(u=>u.id===c)){const u={trigger:i?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};o.messagesBySession[s]=[...a,{id:c,sessionId:s,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[B$]:u}}]}}break}case"compactionCancelled":{const{[t.sessionId]:s,...i}=o.compactionBySession;o.compactionBySession=i;break}case"messageCreated":{const s=t.message.sessionId,i=t.message.createdAt;o.sessions=o.sessions.map(a=>a.id===s&&i>a.updatedAt?{...a,updatedAt:i}:a);const l=o.messagesBySession[s]??[];if(!l.some(a=>a.id===t.message.id||hSe(a,t.message))){if(t.message.role==="user"&&!fSe(t.message)){const a=vSe(l,t.message);if(a!==-1){const c=[...l],u=c[a];c[a]={...t.message,id:u.id,promptId:t.message.promptId??u.promptId,metadata:{...t.message.metadata,...u.metadata}},o.messagesBySession[s]=c;break}}o.messagesBySession[s]=[...l,t.message]}break}case"messageUpdated":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(l=>{if(l.id!==t.messageId)return l;const r=t.content.map((c,u)=>{const d=l.content[u];return c.type==="thinking"&&d?.type==="thinking"?{...c,startedAt:d.startedAt,durationMs:d.durationMs}:c}),a=Date.now();return tp(r,a,r.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&tp(r,a),{...l,content:r,durationMs:t.durationMs??l.durationMs}});break}case"assistantDelta":{const s=t.sessionId,i=o.messagesBySession[s]??[],l=i.findIndex(r=>r.id===t.messageId);l!==-1&&(o.messagesBySession[s]=i.with(l,uz(i[l],t)));break}case"toolOutput":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=ySe(i,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const s=t.sessionId,i=o.approvalsBySession[s]??[];i.some(a=>a.approvalId===t.approval.approvalId)||(o.approvalsBySession[s]=[...i,t.approval]);const r=t.approval.display;r?.kind==="plan_review"&&typeof r.plan=="string"&&r.plan.length>0&&(o.planReviewByToolCallId={...o.planReviewByToolCallId,[t.approval.toolCallId]:{plan:r.plan,path:typeof r.path=="string"?r.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const s=t.sessionId,i=t.approvalId,l=o.approvalsBySession[s]??[];o.approvalsBySession[s]=l.filter(r=>r.approvalId!==i);break}case"questionRequested":{const s=t.sessionId,i=o.questionsBySession[s]??[];i.some(r=>r.questionId===t.question.questionId)||(o.questionsBySession[s]=[...i,t.question]);break}case"questionAnswered":case"questionDismissed":{const s=t.sessionId,i=t.questionId,l=o.questionsBySession[s]??[];o.questionsBySession[s]=l.filter(r=>r.questionId!==i);break}case"taskCreated":{const s=t.sessionId,i=o.tasksBySession[s]??[],l=i.findIndex(r=>r.id===t.task.id);if(l===-1)o.tasksBySession[s]=[...i,t.task];else{const r=[...i],a=i[l],c=a.kind==="subagent"&&(a.status==="completed"||a.status==="failed"||a.status==="cancelled")&&t.task.kind==="subagent"&&t.task.status==="running"&&t.task.subagentPhase==="queued",u=!c&&a.completedAt!==void 0&&a.completedAtEstimated!==!0&&t.task.completedAtEstimated===!0;r[l]={...t.task,outputLines:c?t.task.outputLines:a.outputLines,text:c?t.task.text:a.text,completedAt:u?a.completedAt:t.task.completedAt,completedAtEstimated:u?a.completedAtEstimated:t.task.completedAtEstimated,description:t.task.description===oM&&a.description!==oM?a.description:t.task.description,dynamicWorkflowIndex:t.task.dynamicWorkflowIndex??a.dynamicWorkflowIndex,parentToolCallId:t.task.parentToolCallId??a.parentToolCallId,subagentType:t.task.subagentType??a.subagentType,runInBackground:t.task.runInBackground??a.runInBackground,backgroundTaskId:t.task.backgroundTaskId??a.backgroundTaskId},o.tasksBySession[s]=r}break}case"taskProgress":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const r=l.outputLines??[];if(r.at(-1)===t.outputChunk)return l;const a=[...r,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?a:a.slice(-40)}});break}case"taskCompleted":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId&&l.backgroundTaskId!==t.taskId)return l;const r=l.status==="completed"||l.status==="failed"||l.status==="cancelled";return{...l,status:r?l.status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview??l.outputPreview,outputBytes:t.outputBytes??l.outputBytes}});break}case"goalUpdated":{const s=t.sessionId;o.goalVersionBySession[s]=(o.goalVersionBySession[s]??0)+1,t.goal===null||t.goal.status==="complete"?delete o.goalBySession[s]:o.goalBySession[s]=t.goal;break}case"configChanged":{o.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":case"promptAborted":break;case"turnActiveChanged":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,mainTurnActive:t.active}:s),t.active?o.turnActiveBySession[t.sessionId]=!0:delete o.turnActiveBySession[t.sessionId];break}case"unknown":{const s=t.raw;if(!(s&&s._noop===!0))if(s&&s._agentError)o.warnings=[...o.warnings,bSe(s)];else if(s&&s._agentWarning){const i=s.message??s.code??"agent warning";o.warnings=[...o.warnings,`${Mo.global.t("warnings.noteLabel")}: ${i}`]}else{const i=s?.type??"(unknown)";o.warnings=[...o.warnings,`Unhandled event: ${i}`]}break}}return o}function xSe(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function SSe(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type!=="toolUse"||pi(s.toolName)!=="todo")continue;let i=s.input;if(typeof i=="string")try{i=JSON.parse(i)}catch{continue}const l=i?.todos;if(Array.isArray(l))return l.flatMap(r=>{const a=r??{},c=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return c?[{title:c,status:xSe(a.status)}]:[]})}}return[]}const CSe=["queued","working","suspended","completed","failed","cancelled"];function dz(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function MSe(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function ASe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.dynamicWorkflowIndex===void 0)continue;const o=n.parentToolCallId??"dynamic-workflow",s=t.get(o)??[];s.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:dz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((l,r)=>l.dynamicWorkflowIndex-r.dynamicWorkflowIndex||l.id.localeCompare(r.id)),i=MSe();for(const l of s)i[l.phase]++;return{id:n,members:s,counts:i}}).filter(n=>n.members.length>1).toSorted((n,o)=>{const s=n.members.at(0)?.dynamicWorkflowIndex??0,i=o.members.at(0)?.dynamicWorkflowIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function TSe(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of CSe)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=o.counts[s])}return{done:t,total:n}}function ESe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const o=t.get(n.parentToolCallId)??[];o.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:dz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.dynamicWorkflowIndex-i.dynamicWorkflowIndex||s.id.localeCompare(i.id)));return t}const na=C9(),Mr=j_e(),cf=Z_e(),fz=dn.activeWorkspace,pz=dn.planMode,hz=dn.planArmed,mz=dn.dynamicWorkflowMode,gz=dn.goalMode,iM=40401,vz=dn.onboarded;y1(dn.codeFont);y1(dn.theme);y1(dn.thinking);y1(dn.permission);function s4(e){const t=ls(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const o={};for(const[s,i]of Object.entries(n))i===!0&&(o[s]=!0);return o}catch{return{}}}function u6(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);Es(e,JSON.stringify(n))}catch{}}function yz(){u6(pz,_e.planModeBySession)}function ISe(){u6(hz,_e.planArmedBySession)}function wz(){u6(mz,_e.dynamicWorkflowModeBySession)}function kz(){u6(gz,_e.goalModeBySession)}function LSe(){try{return ls(fz)}catch{return null}}const bz=dn.hiddenWorkspaces;function $Se(){try{const e=ls(bz);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function NSe(e){try{Es(bz,JSON.stringify(e))}catch{}}function zSe(e){try{Es(fz,e)}catch{}}function BSe(e,t){if(t&&e.startsWith(t)){const o=e.slice(t.length);return o?`~${o}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const _e=ds({...cSe(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlagStates:[],subagentModelPolicy:null,subagentModelPolicySaving:!1,workspaceName:"pythinker-web",connection:"disconnected",permission:"manual",permissionBySession:{},thinking:void 0,thinkingBySession:{},planModeBySession:s4(pz),planArmedBySession:s4(hz),dynamicWorkflowModeBySession:s4(mz),goalModeBySession:s4(gz),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:Rg(),authReady:!1,defaultModel:null,workspaces:[],activeWorkspaceId:LSe(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:$Se(),availableOpenInApps:[],serverCapabilities:{},config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1}),$f=ds({planMode:!1,dynamicWorkflowMode:!1,goalMode:!1});function RSe(){if(_e.activeSessionId)return;const e=_e.config?.defaultPermissionMode;(e==="auto"||e==="yolo"||e==="manual")&&(_e.permission=e)}function _z(e,t){return e===t||e.length===t.length&&e.every((n,o)=>n===t[o])}function xr(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every(s=>e[s]===t[s])}function xz(e){_z(_e.sessions,e)||(_e.sessions=e)}function d6(e,t){_e.sessions=_e.sessions.map(n=>n.id===e?t(n):n)}function PSe(e){_e.sessions=[e,..._e.sessions.filter(t=>t.id!==e.id)]}function FSe(e){_e.sessions=[..._e.sessions,e]}function jSe(e){_e.sessions=_e.sessions.filter(t=>t.id!==e)}function Sz(){const e=_e.activeSessionId;e&&_e.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(_e.unreadBySession={..._e.unreadBySession,[e]:!1},Pg({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===dn.unread&&(_e.unreadBySession=Rg(),Sz())});function q7(){if(ul===null||!ul.health().stale)return;_s("ws:stale-reconnect",{sessionId:_e.activeSessionId,status:"stale"}),ia("ws: stale socket on focus, reconnecting",{activeSessionId:_e.activeSessionId}),ul.reconnect();const e=_e.activeSessionId;e&&sp.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(Sz(),q7())});typeof window<"u"&&(window.addEventListener("focus",q7),window.addEventListener("online",q7));function R9(e){_e.activeSessionId=e}function OSe(e){xr(_e.messagesBySession,e)||(_e.messagesBySession=e)}function HSe(e,t){_e.messagesBySession={..._e.messagesBySession,[e]:t}}function Cz(e,t){_e.messagesBySession={..._e.messagesBySession,[e]:t(_e.messagesBySession[e]??[])}}function DSe(e){const{[e]:t,...n}=_e.messagesBySession;_e.messagesBySession=n}function Mz(e){ul?.unsubscribe(e),hCe(e),np.discard(({meta:t})=>t.sessionId===e),jSe(e),DSe(e),delete _e.approvalsBySession[e],delete _e.questionsBySession[e],delete _e.tasksBySession[e],delete _e.goalBySession[e],delete _e.gitStatusBySession[e],delete _e.lastSeqBySession[e],delete _e.compactionBySession[e],delete _e.messagesLoadingMoreBySession[e],delete _e.messagesHasMoreBySession[e],delete _e.messagesLoadMoreErrorBySession[e],delete Z7[e],op.delete(e),$4.delete(e),jz.delete(e),pxe(e),delete _e.queuedBySession[e],delete _e.promptIdBySession[e],delete _e.inFlightBySession[e],delete _e.turnActiveBySession[e],delete _e.planModeBySession[e],delete _e.planArmedBySession[e],delete _e.dynamicWorkflowModeBySession[e],delete _e.goalModeBySession[e],delete _e.thinkingBySession[e],yz(),ISe(),wz(),kz()}const Az=V(null),Tz=V([]),Ez=V(!1),f6=V(!1),Iz=V(null);async function Nf(e){let t;try{t=await Ct().getSessionStatus(e)}catch{return}d6(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),_e.dynamicWorkflowModeBySession={..._e.dynamicWorkflowModeBySession,[e]:t.dynamicWorkflowMode},_e.planModeBySession={..._e.planModeBySession,[e]:t.planMode},(t.permission==="auto"||t.permission==="yolo"||t.permission==="manual")&&(_e.permissionBySession={..._e.permissionBySession,[e]:t.permission},_e.activeSessionId===e&&(_e.permission=t.permission)),t.thinkingEffort.length>0&&(_e.thinkingBySession={..._e.thinkingBySession,[e]:t.thinkingEffort})}async function VSe(e){const t=_e.goalVersionBySession[e]??0;let n;try{n=await Ct().getSessionGoal(e)}catch{return}if((_e.goalVersionBySession[e]??0)!==t)return;const o={..._e.goalBySession};n===null||n.status==="complete"?delete o[e]:o[e]=n,_e.goalBySession=o}function Lz(e,t){const n=t??_e.activeSessionId;return n?Promise.resolve(Ct().updateSession(n,e)).then(()=>Nf(n)).then(()=>!0).catch(o=>(Y0("persistSessionProfile",o,{sessionId:n}),!1)):Promise.resolve(!1)}const $z=dn.conversationToc;function WSe(){try{const e=ls($z);return e===null?!0:e==="true"}catch{return!0}}function qSe(e){try{Es($z,e?"true":"false")}catch{}}const Nz=V(WSe());function USe(e){Nz.value=e,qSe(e)}function zz(e){try{return ls(e)!=="false"}catch{return!0}}function Bz(e,t){try{Es(e,t?"true":"false")}catch{}}const Rz=V(zz(dn.turnFolding));function ZSe(e){Rz.value=e,Bz(dn.turnFolding,e)}const Pz=V(zz(dn.activityRunFolding));function KSe(e){Pz.value=e,Bz(dn.activityRunFolding,e)}function GSe(e){try{return ls(e)??""}catch{return""}}const P9=V(GSe(vz)==="1");function YSe(e){P9.value=e;try{Es(vz,e?"1":"0")}catch{}}let ul=null;const U7=rSe({api:Ct(),connectEventsIfNeeded:F9,getEventConnection:()=>ul});let lM=0;function Fz(){return lM+=1,`msg_opt_${Date.now().toString(36)}_${lM}`}function XSe(e,t,n){if(e.type==="assistantDelta"){const l=_e.messagesBySession[e.sessionId]??[];if(l.at(-1)?.id===e.messageId){wSe(l,e);const r=_e.lastSeqBySession[t]??0;n>0&&n>r&&(_e.lastSeqBySession={..._e.lastSeqBySession,[t]:n});return}}const o={sessions:_e.sessions,activeSessionId:_e.activeSessionId,messagesBySession:_e.messagesBySession,approvalsBySession:_e.approvalsBySession,planReviewByToolCallId:_e.planReviewByToolCallId,questionsBySession:_e.questionsBySession,tasksBySession:_e.tasksBySession,goalBySession:_e.goalBySession,goalVersionBySession:_e.goalVersionBySession,lastSeqBySession:_e.lastSeqBySession,turnActiveBySession:_e.turnActiveBySession,compactionBySession:_e.compactionBySession,config:_e.config,warnings:_e.warnings},s=_Se(o,e,{sessionId:t,seq:n});xz(s.sessions),R9(s.activeSessionId),OSe(s.messagesBySession),xr(_e.approvalsBySession,s.approvalsBySession)||(_e.approvalsBySession=s.approvalsBySession),xr(_e.planReviewByToolCallId,s.planReviewByToolCallId)||(_e.planReviewByToolCallId=s.planReviewByToolCallId),xr(_e.questionsBySession,s.questionsBySession)||(_e.questionsBySession=s.questionsBySession),xr(_e.tasksBySession,s.tasksBySession)||(_e.tasksBySession=s.tasksBySession),xr(_e.goalBySession,s.goalBySession)||(_e.goalBySession=s.goalBySession),xr(_e.goalVersionBySession,s.goalVersionBySession)||(_e.goalVersionBySession=s.goalVersionBySession),xr(_e.lastSeqBySession,s.lastSeqBySession)||(_e.lastSeqBySession=s.lastSeqBySession),xr(_e.turnActiveBySession,s.turnActiveBySession)||(_e.turnActiveBySession=s.turnActiveBySession),xr(_e.compactionBySession,s.compactionBySession)||(_e.compactionBySession=s.compactionBySession);const i=s.config??null;_e.config!==i&&(_e.config=i),_z(_e.warnings,s.warnings)||(_e.warnings=s.warnings),e.type==="configChanged"&&(_e.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Eo.loadModels(),Eo.loadProviders()),e.type==="sessionUsageUpdated"&&(e.dynamicWorkflowMode!==void 0&&(_e.dynamicWorkflowModeBySession={..._e.dynamicWorkflowModeBySession,[e.sessionId]:e.dynamicWorkflowMode}),e.planMode!==void 0&&(_e.planModeBySession={..._e.planModeBySession,[e.sessionId]:e.planMode}),e.thinking!==void 0&&(_e.thinkingBySession={..._e.thinkingBySession,[e.sessionId]:e.thinking}))}function JSe(e,t){const n=_e.lastSeqBySession[t.sessionId]??0,o=_e.turnActiveBySession[t.sessionId]??!1;XSe(e,t.sessionId,t.seq);const s=Si.sideChatTargetBySession.value[t.sessionId];if(s){const{agentId:i}=s,l=t.sessionId;e.type==="agentDelta"&&e.agentId===i?e.delta.text&&Si.appendSideChatAssistantText(i,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===i?Si.finishSideChatAgent(i,l):e.type==="taskProgress"&&e.taskId===i?Si.appendSideChatAssistantText(i,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===i&&Si.finishSideChatAgent(i,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const i=e.message.sessionId;_e.promptIdBySession[i]!==e.message.promptId&&(_e.promptIdBySession={..._e.promptIdBySession,[i]:e.message.promptId})}if(e.type==="assistantDelta"&&t.sessionId===_e.activeSessionId&&na.recordMoonDelta((e.delta.text?.length??0)+(e.delta.thinking?.length??0)),e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const i=e.reason;WMe(e.sessionId,i==="cancelled"||i==="failed"||i==="blocked"?"aborted":"idle",o)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&VMe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&_e.promptIdBySession[e.sessionId]===e.promptId&&Bt.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&qMe(e.sessionId,e.question),e.type==="approvalRequested"&&UMe(e.sessionId,e.approval)}const np=l_e(({appEvent:e,meta:t})=>JSe(e,t),({appEvent:e})=>n_e(e),{coalesce:a_e});function F9(){if(ul!==null||typeof WebSocket>"u")return;_s("ws:connection",{status:"connecting"}),_e.connection="connecting",ul=Ct().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Bt.applyWorkspaceEvent(t);return}for(const o of r_e({appEvent:t,meta:n}))np(o)},onResync(t,n,o){_s("ws:resync",{sessionId:t,status:"required",seq:n}),np.flush(),op.add(t),sp.request(t)},onError(t,n,o){_s("ws:error",{status:"failed",errorCode:t,fatal:o}),j9({severity:"error",title:Mo.global.t("warnings.wsTitle"),message:n,details:[qo("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){_s("ws:connection",{status:t?"connected":"disconnected"}),_e.connected=t,_e.connection=t?"connected":"disconnected",t&&(lCe(),Bt.refreshServerMeta())},onTranscriptReset(t,n,o,s){U7.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return U7.applyOps(t,n,o,s)}})}const Z7={},op=new Set,$4=new Set,jz=new Set;function QSe(e){return ol(e)&&e.code===iM?!0:typeof e=="object"&&e!==null&&e.code===iM}function qo(e,t){if(!(t==null||t===""))return{label:Mo.global.t(`warnings.details.${e}`),value:Oz(t)}}function Oz(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function eCe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function tCe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function nCe(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function oCe(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function rM(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function sCe(e,t,n){const o=r9(t),s=ol(t),i=o||s?t.timestamp:void 0,l=o||s?t.durationMs:void 0,r=[qo("operation",e),qo("sessionId",n??_e.activeSessionId),qo("connection",_e.connection),qo("timestamp",oCe(i??Date.now()))];return o?r.push(qo("duration",rM(l)),qo("request",`${t.method} ${t.path}`),qo("endpoint",t.url),qo("requestId",t.requestId),qo("phase",t.phase),qo("timeout",`${t.timeoutMs}ms`),qo("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),qo("contentType",t.contentType),qo("responsePreview",t.bodyPreview),qo("cause",t.cause)):s?r.push(qo("duration",rM(l)),qo("code",t.code),qo("requestId",t.requestId),qo("message",t.message),qo("details",t.details)):r.push(qo("errorName",eCe(t)),qo("message",tCe(t)??Oz(t)),qo("stack",nCe(t))),r.filter(a=>a!==void 0)}function iCe(e,t,n={}){const o=r9(t),s=ol(t),i=n.title??(o?Mo.global.t("warnings.daemonNetworkTitle"):s?Mo.global.t("warnings.daemonApiTitle"):Mo.global.t("warnings.operationFailedTitle")),l=n.message??(o?Mo.global.t("warnings.daemonNetworkMessage"):s?t.message:Mo.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:l,details:sCe(e,t,n.sessionId)}}function j9(e){_e.warnings=[..._e.warnings,e]}function lCe(){const e=Mo.global.t("warnings.wsTitle"),t=_e.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==_e.warnings.length&&(_e.warnings=t)}function Y0(e,t,n){console.error(`[pythinker-web] operation failed: ${e}`,t);const o=ol(t),s=r9(t);_s("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:o?t.code:void 0,requestId:o||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),j9(iCe(e,t,n))}const rCe={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function aCe(e){if(!ol(e))return;const t=rCe[e.code];return t?Mo.global.t(t):void 0}async function cCe(e){if(Mz(e),_e.activeSessionId!==e)return;const t=_e.sessions[0];t?await Bt.selectSession(t.id,{urlMode:"replace"}):(R9(void 0),_e.sessionLoading=!1,Bt.writeSessionUrl(void 0,"replace"))}const aM=new Set;async function uCe(e){if(!aM.has(e)){aM.add(e);try{const t=await Ct().getSessionWarnings(e),n=Mo.global.t("warnings.noteLabel");for(const o of t)j9(`${n}: ${o.message}`)}catch{}}}async function O9(e){const t=Bt.localTurnStartState(e);try{const o=await Ct().getSessionSnapshot(e);if(!_e.sessions.some(a=>a.id===e))return"ok";np.flush();const s=_e.lastSeqBySession[e]??0,i=Z7[e];if(!(op.has(e)||ip.has(e))&&i!==void 0&&i===o.epoch&&s>o.asOfSeq)return $4.delete(e)||($4.add(e),sp.request(e)),"ok";if(!Bt.isLocalTurnSnapshotCurrent(e,t))return Bt.afterLocalTurnStartsSettle(e,()=>{sp.request(e)}),"ok";const r=T7(o.session.usage);d6(e,a=>({...o.session,model:o.session.model&&o.session.model.length>0?o.session.model:a.model,usage:r?a.usage:o.session.usage})),HSe(e,Xbe(_e.messagesBySession[e]??[],o.messages)),_e.tasksBySession={..._e.tasksBySession,[e]:Qbe(o.subagents,_e.tasksBySession[e]??[])},_e.messagesHasMoreBySession={..._e.messagesHasMoreBySession,[e]:o.hasMoreMessages},_e.approvalsBySession={..._e.approvalsBySession,[e]:o.pendingApprovals};for(const a of o.pendingApprovals){const c=a.display;c?.kind==="plan_review"&&typeof c.plan=="string"&&c.plan.length>0&&(_e.planReviewByToolCallId={..._e.planReviewByToolCallId,[a.toolCallId]:{plan:c.plan,path:typeof c.path=="string"?c.path:void 0}})}_e.questionsBySession={..._e.questionsBySession,[e]:o.pendingQuestions},_e.lastSeqBySession={..._e.lastSeqBySession,[e]:o.asOfSeq},Z7[e]=o.epoch,op.delete(e),$4.delete(e),Bt.handleSessionSnapshot(e,{inFlightTurn:o.inFlightTurn,busy:o.session.busy});{const a={..._e.turnActiveBySession};o.session.mainTurnActive??(o.inFlightTurn!==null&&o.session.busy)?a[e]=!0:delete a[e],_e.turnActiveBySession=a}return F9(),ul&&(ul.seedSnapshot(e,o),ul.subscribe(e,{seq:o.asOfSeq,epoch:o.epoch}),pCe(e)),ip.delete(e),r&&Nf(e),uCe(e),"ok"}catch(n){return QSe(n)?(await cCe(e),"not-found"):(Y0("getSessionSnapshot",n,{title:Mo.global.t("warnings.sessionSnapshotTitle"),message:Mo.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const sp=e_e(O9);function dCe(e){return Object.prototype.hasOwnProperty.call(_e.messagesBySession,e)}const fCe=4,oa=[],ip=new Set;function pCe(e){const t=oa.indexOf(e);for(t!==-1&&oa.splice(t,1),oa.unshift(e);oa.length>fCe;){let n=-1;for(let s=oa.length-1;s>=0;s--)if(oa[s]!==_e.activeSessionId){n=s;break}if(n===-1)break;const[o]=oa.splice(n,1);if(o===void 0)break;ul?.unsubscribe(o),ip.add(o)}}function hCe(e){const t=oa.indexOf(e);t!==-1&&oa.splice(t,1),ip.delete(e)}async function mCe(e){return O9(e)}function H9(e,t){return(_e.inFlightBySession[e]??!1)||(_e.turnActiveBySession[e]??!1)||(t??_e.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function D9(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return Mo.global.t("sessions.justNow");if(s<1)return`${Math.round(o/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const i=o/864e5;return i<7?`${Math.round(i)}d`:i<30?`${Math.round(i/7)}w`:i<365?`${Math.round(i/30)}mo`:`${Math.round(i/365)}y`}catch{return e}}const gCe=3e4,uf=V(0);let Xm=null;function vCe(){Xm===null&&(Xm=setInterval(()=>{uf.value=(uf.value+1)%Number.MAX_SAFE_INTEGER},gCe),Xm.unref?.())}function yCe(e,t){const n=e.split(` `),o=t.split(` -`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function USe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:qSe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,i=typeof t.danger=="string"?t.danger:void 0;return{kind:"shell",command:o,cwd:s,danger:i}}if(n==="file_content"||n==="file"){const o=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",i=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:o,content:s,language:i}}if(n==="file_op"||n==="fileop"){const o=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:o,path:s,detail:i}}if(n==="url_fetch"||n==="url"){const o=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:o}}if(n==="search"){const o=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:o,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const o=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,i=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:o,name:s,description:i}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}function ZSe(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel,otherDescription:t.otherDescription}))}}function KSe(e){const t=Le.messagesBySession[e.sessionId];if(!t||t.length===0)return;const n=new Map;for(const s of t)if(s.role==="assistant")for(const i of s.content){if(i.type!=="toolUse"||i.toolName!=="Bash"&&i.toolName!=="bash")continue;const l=i.input,r=l&&typeof l.command=="string"?l.command:void 0;r&&n.set(i.toolCallId,r)}if(n.size===0)return;const o=`task_id: ${e.id}`;for(const s of t)if(s.role==="tool")for(const i of s.content){if(i.type!=="toolResult")continue;if((typeof i.output=="string"?i.output:i.output!==void 0?JSON.stringify(i.output):"").includes(o)){const r=n.get(i.toolCallId);if(r)return r}}}function GSe(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",o;if(e.status==="running"&&e.startedAt){o=Date.now()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3),a=Math.floor(r/60),c=r%60;n=Mo.global.t("tasks.timingRunning",{time:`${a}:${String(c).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){o=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3);n=Mo.global.t("tasks.timingDone",{sec:r})}else n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,i=e.command??KSe(e),l=e.kind==="bash"&&i?`$ ${i}`:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:o,meta:l,output:s,subagentType:e.subagentType,phase:e.subagentPhase,model:e.model,thinkingEffort:e.thinkingEffort,dynamicWorkflowIndex:e.dynamicWorkflowIndex,swarmIndex:e.swarmIndex,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,createdAt:e.createdAt,completedAt:e.completedAt}}const YSe=z(()=>{const e=Le.sessions.find(n=>n.id===Le.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:Le.workspaceName,branch:t}}),XSe=z(()=>(cf.value,Le.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:O9(e.updatedAt),busy:j9(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})))),JSe=z(()=>Le.activeSessionId??""),QSe=z(()=>{const e=Le.activeSessionId;if(e)return Eo.skillsBySession.value[e]??[];const t=f6.value;return t?Eo.skillsByWorkspace.value[t]??[]:[]}),n2=V({}),U7=V([]),Z7=V(!1),n1=V([]),K7=V(!1),Hc=V({}),eCe=z(()=>{const e=Le.activeSessionId;return e?Hc.value[e]??{}:{}});async function tCe(e){n2.value={...n2.value,[e]:!0};try{await Eo.loadSkillsForSession(e)}finally{n2.value={...n2.value,[e]:!1}}}async function nCe(){Z7.value=!0;try{U7.value=await St().listConnectors()}catch{U7.value=[]}finally{Z7.value=!1}}async function zz(){K7.value=!0;try{n1.value=await St().listPlugins()}catch{n1.value=[]}finally{K7.value=!1}}async function oCe(e,t){const n=n1.value.find(o=>o.id===e)?.enabled;n1.value=n1.value.map(o=>o.id===e?{...o,enabled:t}:o);try{await St().setPluginEnabled(e,t)}catch(o){n!==void 0&&(n1.value=n1.value.map(s=>s.id===e?{...s,enabled:n}:s)),X0("setPluginEnabled",o);return}await zz()}async function sCe(e){await Promise.all([tCe(e),nCe(),zz()])}async function iCe(e){const t=Le.activeSessionId;if(!t)return;const n=Hc.value[t]??{};Hc.value={...Hc.value,[t]:{...n,...e}};try{await St().updateSession(t,e)}catch(o){throw Hc.value={...Hc.value,[t]:n},X0("updateCapabilities",o,{sessionId:t}),o}}const H9=z(()=>{const e=Le.activeSessionId;return e?Le.inFlightBySession[e]??!1:!1}),lCe=z(()=>zt.isStartingFirstPrompt()),Si=Lxe(Le,{pushOperationFailure:X0,nextOptimisticMsgId:$z,connectEventsIfNeeded:R9,getEventConn:()=>ul,resolveThinkingForPrompt:(e,t)=>Eo.resolveThinkingForPrompt(e,t)}),$u=z(()=>{const e=Le.activeSessionId;if(!e)return[];const t=Si.sideChatTargetBySession.value[e]?.agentId;return(Le.tasksBySession[e]??[]).filter(n=>n.id!==t)}),Bz=E_e(Le,$u),rCe=z(()=>{const e=Le.activeSessionId;if(!e)return[];const t=new Set(Le.sideChatUserMessageIdsBySession[e]??[]),n=(Le.messagesBySession[e]??[]).filter(s=>!t.has(s.id)),o=Le.approvalsBySession[e]??[];return N9(n,o,s=>St().getFileUrl(s),d6.value,Le.planReviewByToolCallId)}),d6=z(()=>{const e=Le.activeSessionId;return e?(Le.turnActiveBySession[e]??!1)||(Le.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),aCe=z(()=>H9.value||d6.value),rM=new Map,cCe=z(()=>{Bz.taskClock.value;const e=$u.value.filter(o=>o.kind==="subagent"&&o.runInBackground).toSorted((o,s)=>Date.parse(o.createdAt)-Date.parse(s.createdAt)),t=Le.activeSessionId??"__draft__",n=rM.get(t)??{indexes:new Map,next:1};rM.set(t,n);for(const o of e){const i=n.indexes.get(o.id)??(o.backgroundTaskId?n.indexes.get(o.backgroundTaskId):void 0)??n.next++;n.indexes.set(o.id,i),o.backgroundTaskId&&n.indexes.set(o.backgroundTaskId,i)}return $u.value.map(o=>{const s=GSe(o);return o.kind==="subagent"&&o.runInBackground&&(s.dynamicWorkflowIndex=o.dynamicWorkflowIndex??n.indexes.get(o.id)),s})}),uCe=z(()=>{const e=Le.activeSessionId;if(!e)return{};const t={};for(const n of Le.messagesBySession[e]??[])for(const o of n.content){if(o.type!=="toolUse"||o.toolName!=="ExitPlanMode")continue;const s=o.input&&typeof o.input=="object"?o.input:{},i=Le.planReviewByToolCallId[o.toolCallId],l=i?.plan??(typeof s.plan=="string"?s.plan:void 0),r=i?.path??(typeof s.path=="string"?s.path:void 0)??(typeof s.planPath=="string"?s.planPath:void 0);t[o.toolCallId]={agentId:"main",toolCallId:o.toolCallId,turnId:n.id,source:"interaction",plan:l,path:r}}return t}),Rz=z(()=>eSe($u.value)),dCe=z(()=>nSe($u.value)),Dc=z(()=>{const e=Le.activeSessionId;return e?Le.goalBySession[e]??null:null}),fCe=z(()=>{const e=Le.activeSessionId;return e?Xxe(Le.messagesBySession[e]??[]):[]}),pCe=z(()=>{const e=Le.activeSessionId;return e?Le.compactionBySession[e]??null:null}),hCe=z(()=>Le.connection),mCe=z(()=>Le.loading),gCe=z(()=>Le.sessionLoading),vCe=z(()=>{const e=Le.activeSessionId;return e?Le.messagesLoadingMoreBySession[e]??!1:!1}),yCe=z(()=>{const e=Le.activeSessionId;return e?Le.messagesHasMoreBySession[e]??!1:!1}),wCe=z(()=>{const e=Le.activeSessionId;return e?Le.messagesLoadMoreErrorBySession[e]??!1:!1}),kCe=z(()=>Le.serverVersion),bCe=z(()=>Le.backend),_Ce=z(()=>Le.experimentalFlagStates),xCe=z(()=>Le.subagentModelPolicy),SCe=z(()=>Le.subagentModelPolicySaving);function CCe(e){return Le.experimentalFlagStates.find(t=>t.id===e)}const MCe=z(()=>Le.dangerousBypassAuth);function ACe(){Le.dangerousBypassAuth=!1}const TCe=z(()=>Le.permission),ECe=z(()=>Le.thinking),Pz=z(()=>{const e=Le.activeSessionId;return e?Le.planModeBySession[e]??!1:If.planMode}),ICe=z(()=>{const e=Le.activeSessionId;return e?Le.planArmedBySession[e]??!1:If.planMode}),$Ce=z(()=>{const e=Le.activeSessionId;return e?Le.dynamicWorkflowModeBySession[e]??!1:If.dynamicWorkflowMode}),LCe=z(()=>{const e=Le.activeSessionId;return e?Le.goalModeBySession[e]??!1:If.goalMode}),NCe=z(()=>{const e=tSe(Rz.value);return{plan:Pz.value,goal:Dc.value&&Dc.value.status!=="complete"?{status:Dc.value.status,turnsUsed:Dc.value.turnsUsed,elapsedMs:Dc.value.wallClockMs}:null,dynamicWorkflow:e.total>0?e:null}}),zCe=z(()=>{const e=Le.activeSessionId;if(!e)return[];const t=St();return(Le.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(o=>({fileId:o.fileId,kind:o.kind,url:t.getFileUrl(o.fileId),name:o.name}))}))}),BCe=z(()=>Le.warnings),RCe=z(()=>{const e=Le.activeSessionId;return e?(Le.questionsBySession[e]??[]).map(ZSe):[]}),PCe=z(()=>{const e=Le.activeSessionId;return e?(Le.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:USe(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),D9=z(()=>{const e=Le.activeSessionId;return e?(Le.approvalsBySession[e]??[]).length>0?"awaiting-approval":(Le.questionsBySession[e]??[]).length>0?"awaiting-question":H9.value||d6.value?"running":"idle":"idle"}),Eo=G_e(Le,{pushOperationFailure:X0,refreshSessionStatus:$f,persistSessionProfile:Sz,activity:D9,updateSession:c6,updateSessionMessages:yz}),G7=z(()=>{const e=Le.activeSessionId;if(!e)return null;const t=Le.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),FCe=z(()=>{const e=Le.activeSessionId;return e?Le.gitStatusBySession[e]?.pullRequest??null:null}),jCe=z(()=>{const e=Le.activeSessionId;if(!e)return[];const t=Le.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).toSorted((n,o)=>n.path.localeCompare(o.path)):[]}),OCe=z(()=>{const e=Le.activeSessionId;if(!e)return null;const t=Le.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),Fz=z(()=>{const e=Le.sessions.find(l=>l.id===Le.activeSessionId),t=G7.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Eo.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??Le.defaultModel)??"—",s=Eo.models.value.find(l=>l.id===o)??Eo.models.value.find(l=>l.model===o);return{model:s?.displayName||s?.model||(o.includes("/")?o.split("/").pop():o),modelId:s?.id??o,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:e?Le.permissionBySession[e.id]??Le.permission:Le.permission,branch:t,cwd:e?.cwd??"",isGitRepo:G7.value!==null}}),HCe=z(()=>bz.value),DCe=z(()=>Le.sessions.find(t=>t.id===Le.activeSessionId)?.usage.totalCostUsd??0),V9=z(()=>Le.authReady),Y7=V(null);Ze(u6,e=>{e&&Y7.value===null&&(Y7.value=V9.value)},{immediate:!0});const jz=z(()=>Mbe(B9.value,Y7.value??!1)),VCe=z(()=>Cbe({initialized:u6.value,onboardingCompleted:jz.value,authReady:V9.value})),WCe=z(()=>Le.defaultModel),qCe=z(()=>Le.config),UCe=z(()=>{const e=Le.activeSessionId;if(!e)return{};const t=Le.gitStatusBySession[e];return t?{...t.entries}:{}});function Lu(e){const t=sl(e.cwd);return Le.workspaces.find(n=>sl(n.root)===t)?.id??e.workspaceId??e.cwd}const W9=z(()=>Ibe({workspaces:Le.workspaces,sessions:Le.sessions,hiddenWorkspaceRoots:Le.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:Le.sessionsHasMoreByWorkspace})),sp=V(rH()),Nu=V(aH()==="manual"?"manual":"recent");function ZCe(e){const t=Fu(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}const Tr=V(ZCe(dn.pinnedSessions)),L4=V(ls(dn.pinnedCollapsed)==="true");function KCe(e){Tr.value=Tr.value.includes(e)?Tr.value.filter(t=>t!==e):[...Tr.value,e],E1(dn.pinnedSessions,Tr.value)}function GCe(e){const t=new Set(Tr.value),n=e.filter(o=>t.has(o));Tr.value=[...n,...Tr.value.filter(o=>!n.includes(o))],E1(dn.pinnedSessions,Tr.value)}function YCe(){L4.value=!L4.value,Es(dn.pinnedCollapsed,String(L4.value))}Ze(()=>[W9.value.map(e=>e.id).join("\0"),Le.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=cH(n,sp.value);o!==null&&(sp.value=o,FT(o))});const U0=z(()=>{const e=W9.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:aSe(t.root,Le.fsHome),sessionCount:t.sessionCount}));if(Nu.value==="recent"){const t=new Map;for(const n of Le.sessions){if(n.parentSessionId)continue;const o=Lu(n),s=new Date(n.updatedAt).getTime();s>(t.get(o)??Number.NEGATIVE_INFINITY)&&t.set(o,s)}return fH(e,t)}return uH(e,sp.value)}),f6=z(()=>{const e=Le.activeWorkspaceId,t=U0.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ze(f6,e=>{e&&(Object.prototype.hasOwnProperty.call(Eo.skillsByWorkspace.value,e)||Eo.loadSkillsForWorkspace(e))},{immediate:!0});const XCe=z(()=>{const e=f6.value;return e?U0.value.find(t=>t.id===e)??null:null}),JCe=z(()=>{cf.value;const e=new Set(U0.value.map(n=>n.id)),t=new Map(U0.value.map(n=>[n.id,n.name]));return Le.sessions.filter(n=>!n.parentSessionId&&e.has(Lu(n))).map(n=>{const o=Lu(n);return{id:n.id,title:n.title,time:O9(n.updatedAt),busy:j9(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),QCe=z(()=>{cf.value;const e=new Map;for(const t of Le.sessions.toSorted((n,o)=>new Date(o.updatedAt).getTime()-new Date(n.updatedAt).getTime())){if(t.parentSessionId)continue;const n=Lu(t),o={id:t.id,title:t.title,time:O9(t.updatedAt),busy:j9(t.id,t.mainTurnActive),pendingInteraction:t.pendingInteraction,lastTurnReason:t.lastTurnReason,updatedAt:t.updatedAt},s=e.get(n)??[];s.push(o),e.set(n,s)}return U0.value.map(t=>({workspace:t,sessions:e.get(t.id)??[],hasMore:Le.sessionsHasMoreByWorkspace[t.id]??!1,loadingMore:Le.sessionsLoadingMoreByWorkspace[t.id]??!1,initialCount:Le.sessionsInitialCountByWorkspace[t.id]??p0}))});function eMe(e){sp.value=e,FT(e),Nu.value!=="manual"&&(Nu.value="manual",jT("manual"))}function tMe(e){Nu.value!==e&&(Nu.value=e,jT(e))}const Oz=z(()=>{const e={};for(const[t,n]of Object.entries(Le.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(Le.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),nMe=z(()=>{const e={};for(const[t,n]of Object.entries(Le.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(Le.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),oMe=z(()=>{const e={};for(const[t,n]of Object.entries(Le.unreadBySession))n&&(e[t]=!0);return e}),sMe=z(()=>{const e={},t=Oz.value;for(const n of Le.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Lu(n);e[s]=(e[s]??0)+o}return e}),iMe=z(()=>Le.recentRoots),lMe=z(()=>Le.availableOpenInApps),rMe=z(()=>Le.serverCapabilities.fs_write===!0),zt=U_e(Le,{taskPoller:Bz,sideChat:Si,modelProvider:Eo,pushOperationFailure:X0,activity:D9,sessionsKnownEmpty:Lz,setSessions:gz,updateSession:c6,upsertSessionFront:uSe,appendSession:dSe,forgetSession:wz,setActiveSessionId:z9,updateSessionMessages:yz,nextOptimisticMsgId:$z,getEventConn:()=>ul,syncSessionFromSnapshot:F9,reopenSession:DSe,hasLoadedMessages:FSe,refreshSessionStatus:$f,refreshSessionGoal:gSe,persistSessionProfile:Sz,mergedWorkspaces:W9,workspacesView:U0,status:Fz,workspaceIdForSession:Lu,seedPermissionFromDaemonDefault:cSe,savePlanModeToStorage:fz,saveDynamicWorkflowModeToStorage:pz,saveGoalModeToStorage:hz,draftModes:If,saveUnread:Bg,saveActiveWorkspaceToStorage:rSe,saveHiddenWorkspacesToStorage:lSe,goalErrorMessage:BSe,resetFastMoon:na.resetFastMoon,initialized:u6,connectIssue:xz,selectedDiffPath:kz,fileDiffLines:bz,fileDiffLoading:_z});async function aMe(){await zt.loadConfig(),await Promise.all([zt.checkAuth(),Eo.loadModels(),Eo.loadProviders()])}function cMe(e,t){const n=Le.sessions.find(o=>o.id===e);return n?zt.renameSession(e,UT(t,n.title)):Promise.resolve()}function q9(e){return e===Le.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function uMe(e){if(Le.turnActiveBySession[e]){const t={...Le.turnActiveBySession};delete t[e],Le.turnActiveBySession=t}Le.inFlightBySession[e]&&(Le.inFlightBySession={...Le.inFlightBySession,[e]:!1})}function dMe(e,t,n){const o=Le.promptIdBySession[e];zt.finishPromptLocal(e,{turnWasActive:n}),e===Le.activeSessionId?(zt.loadGitStatus(e),$f(e)):t==="idle"&&(Le.unreadBySession={...Le.unreadBySession,[e]:!0},Bg({[e]:!0}));const s=(Le.approvalsBySession[e]??[]).length>0,i=(Le.questionsBySession[e]??[]).length>0;r_e(t,s,i)&&Cr.maybeNotifyCompletion(e,{isUserWatching:q9(e),sessionTitle:Le.sessions.find(l=>l.id===e)?.title??"",promptId:o,onClick:()=>{zt.selectSession(e)}}),t==="idle"&&af.maybePlayCompletionSound()}function fMe(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;Cr.maybeNotifyQuestion({isUserWatching:q9(e),sessionTitle:Le.sessions.find(l=>l.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{zt.selectSession(e)}}),af.maybePlayQuestionSound()}function pMe(e,t){Cr.maybeNotifyApproval({isUserWatching:q9(e),sessionTitle:Le.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{zt.selectSession(e)}}),af.maybePlayApprovalSound()}function P1(){return WSe(),{workspace:YSe,sessions:XSe,activeSessionId:JSe,workspacesView:U0,workspaceSortMode:Nu,pinnedSessionIds:Tr,pinnedCollapsed:L4,visibleWorkspace:XCe,activeWorkspaceId:f6,sessionsForView:JCe,workspaceGroups:QCe,attentionBySession:Oz,pendingBySession:nMe,attentionByWorkspace:sMe,unreadBySession:oMe,recentRoots:iMe,turns:rCe,tasks:cCe,activeAppTasks:$u,auxiliaryTranscripts:W7,todos:fCe,goal:Dc,dynamicWorkflows:Rz,dynamicWorkflowMembersByToolCallId:dCe,activationBadges:NCe,compaction:pCe,status:Fz,sessionCost:DCe,fileDiff:HCe,selectedDiffPath:kz,fileDiffLoading:_z,changes:jCe,gitInfo:G7,gitDiffStats:OCe,activePullRequest:FCe,changesByPath:UCe,pendingApprovals:PCe,availableOpenInApps:lMe,fsWriteSupported:rMe,connection:hCe,loading:mCe,sessionLoading:gCe,loadingMoreMessages:vCe,hasMoreMessages:yCe,loadMoreMessagesError:wCe,serverVersion:kCe,backend:bCe,experimentalFlagStates:_Ce,experimentalFlagState:CCe,subagentModelPolicy:xCe,subagentModelPolicySaving:SCe,saveSubagentModelPolicy:zt.saveSubagentModelPolicy,clearSubagentModelPolicy:zt.clearSubagentModelPolicy,reloadSubagentModelPolicy:zt.loadSubagentModelPolicy,dangerousBypassAuth:MCe,clearDangerousBypassAuth:ACe,initialized:u6,connectIssue:xz,permission:TCe,thinking:ECe,planMode:Pz,planArmed:ICe,sessionPlans:uCe,dynamicWorkflowMode:$Ce,goalMode:LCe,queued:zCe,warnings:BCe,questions:RCe,activity:D9,turnActive:d6,inFlight:H9,working:aCe,isStartingFirstPrompt:lCe,fastMoon:na.fastMoon,models:Eo.models,starredModelIds:Eo.starredModelIds,providers:Eo.providers,uiFontSize:na.uiFontSize,setUiFontSize:na.setUiFontSize,conversationToc:Mz,setConversationToc:wSe,turnFolding:Ez,setTurnFolding:kSe,activityRunFolding:Iz,setActivityRunFolding:bSe,colorScheme:na.colorScheme,setColorScheme:na.setColorScheme,accent:na.accent,setAccent:na.setAccent,notifyOnComplete:Cr.notifyOnComplete,notifyOnQuestion:Cr.notifyOnQuestion,notifyOnApproval:Cr.notifyOnApproval,notifyPermission:Cr.notifyPermission,setNotifyOnComplete:Cr.setNotifyOnComplete,setNotifyOnQuestion:Cr.setNotifyOnQuestion,setNotifyOnApproval:Cr.setNotifyOnApproval,soundOnComplete:af.soundOnComplete,setSoundOnComplete:af.setSoundOnComplete,onboarded:B9,setOnboarded:xSe,onboardingCompleted:jz,appState:VCe,load:zt.load,selectSession:zt.selectSession,clearActiveSession:zt.clearActiveSession,loadOlderMessages:zt.loadOlderMessages,loadWorkspaces:zt.loadWorkspaces,loadMoreSessions:zt.loadMoreSessions,loadAllSessions:zt.loadAllSessions,selectWorkspace:zt.selectWorkspace,openWorkspace:zt.openWorkspace,openWorkspaceDraft:zt.openWorkspaceDraft,startSessionAndSendPrompt:zt.startSessionAndSendPrompt,startSessionAndActivateSkill:zt.startSessionAndActivateSkill,startSessionAndOpenSideChat:zt.startSessionAndOpenSideChat,addWorkspaceByPath:zt.addWorkspaceByPath,browseFs:zt.browseFs,getFsHome:zt.getFsHome,sendPrompt:zt.sendPrompt,steerPrompt:zt.steerPrompt,steerQueued:zt.steerQueued,sideChatVisible:Si.sideChatVisible,sideChatSessionId:Si.sideChatSessionId,sideChatTurns:Si.sideChatTurns,sideChatRunning:Si.sideChatRunning,sideChatSending:Si.sideChatSending,openSideChat:Si.openSideChat,closeSideChat:Si.closeSideChat,sendSideChatPrompt:Si.sendSideChatPrompt,uploadImage:zt.uploadImage,abortCurrentPrompt:zt.abortCurrentPrompt,respondApproval:zt.respondApproval,respondQuestion:zt.respondQuestion,dismissQuestion:zt.dismissQuestion,pendingQuestionActions:zt.pendingQuestionActions,pendingApprovalActions:zt.pendingApprovalActions,cancelTask:zt.cancelTask,detachTask:zt.detachTask,setPermission:zt.setPermission,setThinking:Eo.setThinking,setPlanMode:zt.setPlanMode,togglePlanMode:zt.togglePlanMode,setDynamicWorkflowMode:zt.setDynamicWorkflowMode,toggleDynamicWorkflowMode:zt.toggleDynamicWorkflowMode,setGoalMode:zt.setGoalMode,toggleGoalMode:zt.toggleGoalMode,createGoal:zt.createGoal,controlGoal:zt.controlGoal,enqueue:zt.enqueue,dismissWarning:zt.dismissWarning,renameSession:zt.renameSession,renameWorkspace:zt.renameWorkspace,deleteWorkspace:zt.deleteWorkspace,reorderWorkspaces:eMe,setWorkspaceSortMode:tMe,togglePinnedSession:KCe,reorderPinnedSessions:GCe,togglePinnedCollapsed:YCe,setSessionEmoji:cMe,archiveSession:zt.archiveSession,exportSession:zt.exportSession,restoreSession:zt.restoreSession,loadArchivedSessions:zt.loadArchivedSessions,compact:zt.compact,forkSession:zt.forkSession,generateSessionTitle:zt.generateSessionTitle,undo:zt.undo,unqueue:zt.unqueue,reorderQueue:zt.reorderQueue,searchFiles:zt.searchFiles,loadGitStatus:zt.loadGitStatus,loadFileDiff:zt.loadFileDiff,clearFileDiff:zt.clearFileDiff,listDir:zt.listDir,readFileContent:zt.readFileContent,getFileDownloadUrl:zt.getFileDownloadUrl,openWorkspaceFile:zt.openWorkspaceFile,openInApp:zt.openInApp,revealWorkspaceFile:zt.revealWorkspaceFile,revealSavedPlan:zt.revealSavedPlan,resolveImageUrl:zt.resolveImageUrl,getFileUrl:e=>St().getFileUrl(e),loadModels:Eo.loadModels,loadProviders:Eo.loadProviders,skills:QSe,skillsLoadingBySession:n2,connectors:U7,connectorsLoading:Z7,plugins:n1,pluginsLoading:K7,activeSessionCapabilities:eCe,loadCapabilityData:sCe,updateCapabilities:iCe,setPluginEnabled:oCe,activateSkill:Eo.activateSkill,setModel:Eo.setModel,toggleStarModel:Eo.toggleStarModel,addProvider:Eo.addProvider,deleteProvider:Eo.deleteProvider,refreshProvider:Eo.refreshProvider,refreshAllProviders:Eo.refreshAllProviders,authReady:V9,defaultModel:WCe,config:qCe,updateConfig:zt.updateConfig,refreshServerMeta:zt.refreshServerMeta,checkAuth:zt.checkAuth,refreshRuntimeState:aMe}}const hMe=["aria-expanded","aria-label"],mMe={class:"capability-trigger-label"},gMe={class:"capability-panel"},vMe={class:"capability-viewport"},yMe={class:"capability-view"},wMe={key:1,class:"capability-group"},kMe={class:"capability-group-title"},bMe={class:"capability-caption"},_Me={key:0,class:"capability-loading"},xMe={class:"capability-view capability-view-secondary"},SMe={class:"capability-caption"},CMe={key:0,class:"capability-loading"},MMe={class:"capability-caption"},AMe={key:0,class:"capability-loading"},TMe=Je({__name:"CapabilityMenu",props:{sessionId:{},triggerless:{type:Boolean}},setup(e,{expose:t}){const n=e,{t:o}=Lt(),s=P1(),i=V(null),l=V(null),r=V(!1),a=V("root"),c=V([]),u=z(()=>n.sessionId===s.activeSessionId.value?s.skills.value:[]),d=z(()=>{const H=n.sessionId;return H?s.skillsLoadingBySession.value[H]===!0:!1}),f=z(()=>s.connectors.value),p=z(()=>s.connectorsLoading.value),h=z(()=>s.plugins.value),m=z(()=>s.pluginsLoading.value),k=z(()=>n.sessionId===s.activeSessionId.value?s.activeSessionCapabilities.value:{}),x=z(()=>d.value||u.value.length>0),y=z(()=>p.value||f.value.length>0),w=z(()=>m.value||h.value.length>0),_=z(()=>{switch(a.value){case"skills":return o("capabilityMenu.skills.title");case"plugins":return o("capabilityMenu.plugins.title");case"root":return""}}),M=z(()=>{switch(a.value){case"skills":return u.value.length;case"plugins":return h.value.length;case"root":return 0}});function P(){c.value=k.value.mcpServers!==void 0?[...k.value.mcpServers]:f.value.map(H=>H.id)}Ze([()=>n.sessionId,f,k],P,{immediate:!0}),Ze([u,d,h,m],()=>{a.value==="skills"&&!d.value&&u.value.length===0&&(a.value="root"),a.value==="plugins"&&!m.value&&h.value.length===0&&(a.value="root")});function B(){if(r.value=!r.value,!r.value){a.value="root";return}n.sessionId&&s.loadCapabilityData(n.sessionId)}t({toggleOpen:B});function $(){r.value=!1,a.value="root"}const T={tools:Promise.resolve(),mcpServers:Promise.resolve()},I={tools:0,mcpServers:0};function N(H,D,A){const R=++I[H],j=n.sessionId,q=T[H].then(async()=>{if(n.sessionId===j)try{await s.updateCapabilities({[H]:[...D.value]})}catch{R===I[H]&&n.sessionId===j&&(D.value=A)}});return T[H]=q,q}function C(H,D){const A=[...c.value],R=new Set(A);return D?R.add(H):R.delete(H),c.value=[...R],N("mcpServers",c,A)}function O(H,D){s.setPluginEnabled(H,D)}return(H,D)=>(g(),S("div",{ref_key:"rootRef",ref:i,class:"capability-control"},[n.triggerless?Y("",!0):(g(),S("button",{key:0,ref_key:"triggerRef",ref:l,type:"button",class:Pe(["capability-trigger",{open:r.value}]),"aria-expanded":r.value,"aria-haspopup":"dialog","aria-label":v(o)("capabilityMenu.triggerLabel"),onClick:_t(B,["stop"])},[D[5]||(D[5]=r2('',1)),b("span",mMe,E(v(o)("capabilityMenu.trigger")),1)],10,hMe)),W(GT,{anchor:n.triggerless?i.value:l.value,open:r.value,label:v(o)("capabilityMenu.triggerLabel"),onClose:$},{default:ae(()=>[b("div",gMe,[b("div",vMe,[b("div",{class:Pe(["capability-track",{"is-drilled":a.value!=="root"}])},[b("div",yMe,[x.value?(g(),ue(zc,{key:0,count:u.value.length,onClick:D[0]||(D[0]=A=>a.value="skills")},{label:ae(()=>[Oe(E(v(o)("capabilityMenu.skills.title")),1)]),trailing:ae(()=>[...D[6]||(D[6]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0),y.value?(g(),S("div",wMe,[b("div",kMe,E(v(o)("capabilityMenu.mcp.title")),1),b("p",bMe,E(v(o)("capabilityMenu.mcp.caption")),1),p.value?(g(),S("div",_Me,[W(Vm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},at(f.value,A=>(g(),ue(zc,{key:A.id,class:"mcp-row",selected:c.value.includes(A.id),title:A.name,onClick:R=>void C(A.id,!c.value.includes(A.id))},{label:ae(()=>[Oe(E(A.name),1)]),trailing:ae(()=>[W(VC,{"model-value":c.value.includes(A.id),"aria-label":v(o)("capabilityMenu.mcp.toggle",{name:A.name}),onClick:D[1]||(D[1]=_t(()=>{},["stop"])),"onUpdate:modelValue":R=>void C(A.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))])):Y("",!0),w.value?(g(),ue(zc,{key:2,count:h.value.length,onClick:D[2]||(D[2]=A=>a.value="plugins")},{label:ae(()=>[Oe(E(v(o)("capabilityMenu.plugins.title")),1)]),trailing:ae(()=>[...D[7]||(D[7]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0)]),b("div",xMe,[a.value!=="root"?(g(),ue(zc,{key:0,class:"capability-back",count:M.value,onClick:D[3]||(D[3]=A=>a.value="root")},{leading:ae(()=>[...D[8]||(D[8]=[b("svg",{class:"back-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m10 3-5 5 5 5"})],-1)])]),label:ae(()=>[Oe(E(_.value||v(o)("capabilityMenu.back")),1)]),_:1},8,["count"])):Y("",!0),a.value==="skills"?(g(),S(Ce,{key:1},[b("p",SMe,E(v(o)("capabilityMenu.skills.caption")),1),d.value?(g(),S("div",CMe,[W(Vm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},at(u.value,A=>(g(),ue(zc,{key:A.name,class:"skill-row",disabled:"",title:A.description},{label:ae(()=>[Oe(E(A.name),1)]),_:2},1032,["title"]))),128))],64)):a.value==="plugins"?(g(),S(Ce,{key:2},[b("p",MMe,E(v(o)("capabilityMenu.plugins.caption")),1),m.value?(g(),S("div",AMe,[W(Vm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},at(h.value,A=>(g(),ue(zc,{key:A.id,class:"plugin-row",selected:A.enabled,title:A.displayName,onClick:R=>O(A.id,!A.enabled)},{label:ae(()=>[Oe(E(A.displayName),1)]),trailing:ae(()=>[W(VC,{"model-value":A.enabled,"aria-label":v(o)("capabilityMenu.plugins.toggle",{name:A.displayName}),onClick:D[4]||(D[4]=_t(()=>{},["stop"])),"onUpdate:modelValue":R=>O(A.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))],64)):Y("",!0)])],2)])])]),_:1},8,["anchor","open","label"])],512))}}),EMe=vt(TMe,[["__scopeId","data-v-ff3a96c4"]]);let Bd=0,Ym=null;function Hz(){function e(){typeof document>"u"||(Bd+=1,Bd===1&&(Ym=document.body.style.overflow,document.body.style.overflow="hidden"))}function t(){Bd<=0||(Bd-=1,Bd===0&&typeof document<"u"&&(document.body.style.overflow=Ym??"",Ym=null))}return{lock:e,unlock:t}}const IMe={key:0,class:"sheet-root"},$Me=["aria-label"],LMe=["aria-label"],NMe={key:0,class:"sheet-head"},zMe={class:"sheet-title"},BMe={class:"sheet-body"},RMe=Je({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t,{lock:i,unlock:l}=Hz();function r(){s("update:modelValue",!1),s("close")}function a(c){c.key==="Escape"&&o.closeOnEsc&&r()}return Ze(()=>o.modelValue,c=>{typeof document>"u"||(c?(i(),document.addEventListener("keydown",a)):(l(),document.removeEventListener("keydown",a)))},{immediate:!0}),En(()=>{typeof document<"u"&&(l(),document.removeEventListener("keydown",a))}),(c,u)=>(g(),ue(qi,{name:"sheet"},{default:ae(()=>[e.modelValue?(g(),S("div",IMe,[b("div",{class:"sheet-scrim",onClick:r}),b("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||v(n)("mobile.sheetLabel")},[b("button",{type:"button",class:"sheet-grab","aria-label":v(n)("mobile.closeSheet"),onClick:r},null,8,LMe),e.title?(g(),S("div",NMe,[b("span",zMe,E(e.title),1)])):Y("",!0),b("div",BMe,[jn(c.$slots,"default",{},void 0,!0)])],8,$Me)])):Y("",!0)]),_:3}))}}),yu=vt(RMe,[["__scopeId","data-v-92ecd88c"]]),PMe={class:"ui-toast__icon","aria-hidden":"true"},FMe={class:"ui-toast__body"},jMe={class:"ui-toast__title"},OMe={key:0,class:"ui-toast__msg"},HMe=Je({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e){return(t,n)=>(g(),S("div",{class:Pe(["ui-toast",`ui-toast--${e.variant}`])},[b("span",PMe,[jn(t.$slots,"icon",{},()=>[e.variant==="success"?(g(),ue(Ie,{key:0,name:"check"})):e.variant==="danger"?(g(),ue(Ie,{key:1,name:"close"})):e.variant==="warning"?(g(),ue(Ie,{key:2,name:"alert-triangle"})):(g(),ue(Ie,{key:3,name:"info"}))],!0)]),b("div",FMe,[b("div",jMe,E(e.title),1),e.message?(g(),S("div",OMe,E(e.message),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-toast__close",size:"sm",label:e.dismissLabel,onClick:n[0]||(n[0]=o=>t.$emit("dismiss"))},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),Dz=vt(HMe,[["__scopeId","data-v-44bc260b"]]),DMe={class:"att-lightbox-card"},VMe=["src"],WMe=["src","alt"],qMe={class:"att-lightbox-name"},UMe=["aria-label"],ZMe={class:"quote-copy"},KMe={key:0,class:"quote-source"},GMe={class:"quote-text"},YMe={key:1,class:"quote-comment"},XMe={key:1,class:"att-strip"},JMe={class:"att-scroll-content"},QMe={key:1,class:"att-row"},eAe={key:0,class:"att-more"},tAe={class:"cin-wrap"},nAe=["onClick"],oAe={class:"am-icon"},sAe={class:"am-name"},iAe={key:0,class:"am-desc"},lAe={class:"input-row"},rAe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],aAe=["aria-label"],cAe={class:"toolbar-left"},uAe=["aria-label","onKeydown"],dAe={class:"perm-pill-label"},fAe=["onClick"],pAe={class:"pd-info"},hAe={class:"pd-desc"},mAe={class:"pd-check"},gAe={key:1,class:"workflow-chip"},vAe={class:"workflow-label"},yAe=["aria-label"],wAe=["aria-expanded","aria-label"],kAe=["disabled","aria-expanded","aria-label","onKeydown"],bAe={class:"thinking-pill-label"},_Ae=["aria-label"],xAe=["aria-label","disabled"],SAe={class:"md-list"},CAe={key:0,class:"md-section"},MAe=["onClick"],AAe={class:"md-check"},TAe={class:"md-name"},EAe={class:"md-provider"},IAe={key:1,class:"md-divider"},$Ae={key:2,class:"md-section"},LAe=["onClick"],NAe={class:"md-check"},zAe={class:"md-name"},BAe={key:0,class:"md-divider"},RAe={class:"md-check md-more-icon"},PAe={class:"md-name"},FAe=["aria-label","onKeydown"],jAe={class:"thinking-dropdown-title"},OAe={class:"thinking-cache-note"},HAe={class:"drop-card"},DAe={key:0,class:"composer-warning-toast",role:"status","aria-live":"polite"},VAe={class:"msheet-search"},WAe={class:"msheet-search"},qAe=["onClick"],UAe={class:"am-icon"},ZAe={class:"am-name"},KAe={key:0,class:"am-desc"},aM=36,GAe=Je({__name:"Composer",props:{running:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},working:{type:Boolean,default:!1},goalMode:{type:Boolean},workflowActive:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean,default:!1}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel"],setup(e,{expose:t,emit:n}){const o=e,s=z(()=>o.starting?l("composer.starting"):o.running?l("composer.placeholderRunning"):o.goalMode?l("status.goalPlaceholder"):o.planArmed||o.planMode?l("status.planPlaceholder"):l("composer.placeholder")),i=n,{t:l,locale:r}=Lt(),a=i6(),{text:c,textareaRef:u,autosize:d,loadForEdit:f,clearDraft:p}=obe({sessionId:()=>o.sessionId}),h=V([]);let m=1;function k(Me){const lt=Me.quote.trim();lt&&(h.value.push({id:m++,text:lt,comment:Me.comment?.trim()||void 0,source:Me.source?.trim()||void 0}),yt(bn))}function x(Me){h.value=h.value.filter(lt=>lt.id!==Me)}function y(Me){return[...h.value.map(ft=>{const yn=ft.text.split(` +`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function wCe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:yCe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,i=typeof t.danger=="string"?t.danger:void 0;return{kind:"shell",command:o,cwd:s,danger:i}}if(n==="file_content"||n==="file"){const o=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",i=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:o,content:s,language:i}}if(n==="file_op"||n==="fileop"){const o=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:o,path:s,detail:i}}if(n==="url_fetch"||n==="url"){const o=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:o}}if(n==="search"){const o=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:o,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const o=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,i=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:o,name:s,description:i}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}function kCe(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel,otherDescription:t.otherDescription}))}}function bCe(e){const t=_e.messagesBySession[e.sessionId];if(!t||t.length===0)return;const n=new Map;for(const s of t)if(s.role==="assistant")for(const i of s.content){if(i.type!=="toolUse"||i.toolName!=="Bash"&&i.toolName!=="bash")continue;const l=i.input,r=l&&typeof l.command=="string"?l.command:void 0;r&&n.set(i.toolCallId,r)}if(n.size===0)return;const o=`task_id: ${e.id}`;for(const s of t)if(s.role==="tool")for(const i of s.content){if(i.type!=="toolResult")continue;if((typeof i.output=="string"?i.output:i.output!==void 0?JSON.stringify(i.output):"").includes(o)){const r=n.get(i.toolCallId);if(r)return r}}}function _Ce(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",o;if(e.status==="running"&&e.startedAt){o=Date.now()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3),a=Math.floor(r/60),c=r%60;n=Mo.global.t("tasks.timingRunning",{time:`${a}:${String(c).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){o=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3);n=Mo.global.t("tasks.timingDone",{sec:r})}else n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,i=e.command??bCe(e),l=e.kind==="bash"&&i?`$ ${i}`:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:o,meta:l,output:s,subagentType:e.subagentType,phase:e.subagentPhase,model:e.model,thinkingEffort:e.thinkingEffort,dynamicWorkflowIndex:e.dynamicWorkflowIndex,swarmIndex:e.swarmIndex,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,createdAt:e.createdAt,completedAt:e.completedAt}}const xCe=B(()=>{const e=_e.sessions.find(n=>n.id===_e.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:_e.workspaceName,branch:t}}),SCe=B(()=>(uf.value,_e.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:D9(e.updatedAt),busy:H9(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})))),CCe=B(()=>_e.activeSessionId??""),MCe=B(()=>{const e=_e.activeSessionId;if(e)return Eo.skillsBySession.value[e]??[];const t=h6.value;return t?Eo.skillsByWorkspace.value[t]??[]:[]}),n2=V({}),K7=V([]),G7=V(!1),t1=V([]),Y7=V(!1),Hc=V({}),ACe=B(()=>{const e=_e.activeSessionId;return e?Hc.value[e]??{}:{}});async function TCe(e){n2.value={...n2.value,[e]:!0};try{await Eo.loadSkillsForSession(e)}finally{n2.value={...n2.value,[e]:!1}}}async function ECe(){G7.value=!0;try{K7.value=await Ct().listConnectors()}catch{K7.value=[]}finally{G7.value=!1}}async function Hz(){Y7.value=!0;try{t1.value=await Ct().listPlugins()}catch{t1.value=[]}finally{Y7.value=!1}}async function ICe(e,t){const n=t1.value.find(o=>o.id===e)?.enabled;t1.value=t1.value.map(o=>o.id===e?{...o,enabled:t}:o);try{await Ct().setPluginEnabled(e,t)}catch(o){n!==void 0&&(t1.value=t1.value.map(s=>s.id===e?{...s,enabled:n}:s)),Y0("setPluginEnabled",o);return}await Hz()}async function LCe(e){await Promise.all([TCe(e),ECe(),Hz()])}async function $Ce(e){const t=_e.activeSessionId;if(!t)return;const n=Hc.value[t]??{};Hc.value={...Hc.value,[t]:{...n,...e}};try{await Ct().updateSession(t,e)}catch(o){throw Hc.value={...Hc.value,[t]:n},Y0("updateCapabilities",o,{sessionId:t}),o}}const V9=B(()=>{const e=_e.activeSessionId;return e?_e.inFlightBySession[e]??!1:!1}),NCe=B(()=>Bt.isStartingFirstPrompt()),Si=sSe(_e,{pushOperationFailure:Y0,nextOptimisticMsgId:Fz,connectEventsIfNeeded:F9,getEventConn:()=>ul,resolveThinkingForPrompt:(e,t)=>Eo.resolveThinkingForPrompt(e,t)}),$u=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Si.sideChatTargetBySession.value[e]?.agentId;return(_e.tasksBySession[e]??[]).filter(n=>n.id!==t)}),Dz=Q_e(_e,$u),zCe=oSe(),BCe=e=>Ct().getFileUrl(e),RCe=[],PCe=[],FCe=[];let cM;function jCe(e,t){if(t.length===0)return e;const n=e.at(-1),o=cM;if(o!==void 0&&o.source===e&&o.length===e.length&&o.hiddenIds===t){if(o.last===n)return o.result;const i=o.result.at(-1);if(n!==void 0&&i!==void 0&&o.last?.id===n.id&&i.id===n.id)return o.result[o.result.length-1]=n,o.last=n,o.result}const s=e.filter(i=>!t.includes(i.id));return cM={source:e,length:e.length,hiddenIds:t,last:n,result:s},s}const OCe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.sideChatUserMessageIdsBySession[e]??FCe,n=_e.messagesBySession[e]??PCe,o=jCe(n,t),s=_e.approvalsBySession[e]??RCe;return zCe(o,s,BCe,p6.value,_e.planReviewByToolCallId)}),p6=B(()=>{const e=_e.activeSessionId;return e?(_e.turnActiveBySession[e]??!1)||(_e.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),HCe=B(()=>V9.value||p6.value),uM=new Map,DCe=B(()=>{Dz.taskClock.value;const e=$u.value.filter(o=>o.kind==="subagent"&&o.runInBackground).toSorted((o,s)=>Date.parse(o.createdAt)-Date.parse(s.createdAt)),t=_e.activeSessionId??"__draft__",n=uM.get(t)??{indexes:new Map,next:1};uM.set(t,n);for(const o of e){const i=n.indexes.get(o.id)??(o.backgroundTaskId?n.indexes.get(o.backgroundTaskId):void 0)??n.next++;n.indexes.set(o.id,i),o.backgroundTaskId&&n.indexes.set(o.backgroundTaskId,i)}return $u.value.map(o=>{const s=_Ce(o);return o.kind==="subagent"&&o.runInBackground&&(s.dynamicWorkflowIndex=o.dynamicWorkflowIndex??n.indexes.get(o.id)),s})}),VCe=B(()=>{const e=_e.activeSessionId;if(!e)return{};const t={};for(const n of _e.messagesBySession[e]??[])for(const o of n.content){if(o.type!=="toolUse"||o.toolName!=="ExitPlanMode")continue;const s=o.input&&typeof o.input=="object"?o.input:{},i=_e.planReviewByToolCallId[o.toolCallId],l=i?.plan??(typeof s.plan=="string"?s.plan:void 0),r=i?.path??(typeof s.path=="string"?s.path:void 0)??(typeof s.planPath=="string"?s.planPath:void 0);t[o.toolCallId]={agentId:"main",toolCallId:o.toolCallId,turnId:n.id,source:"interaction",plan:l,path:r}}return t}),Vz=B(()=>ASe($u.value)),WCe=B(()=>ESe($u.value)),Dc=B(()=>{const e=_e.activeSessionId;return e?_e.goalBySession[e]??null:null}),qCe=B(()=>{const e=_e.activeSessionId;return e?SSe(_e.messagesBySession[e]??[]):[]}),UCe=B(()=>{const e=_e.activeSessionId;return e?_e.compactionBySession[e]??null:null}),ZCe=B(()=>_e.connection),KCe=B(()=>_e.loading),GCe=B(()=>_e.sessionLoading),YCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadingMoreBySession[e]??!1:!1}),XCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesHasMoreBySession[e]??!1:!1}),JCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadMoreErrorBySession[e]??!1:!1}),QCe=B(()=>_e.serverVersion),eMe=B(()=>_e.backend),tMe=B(()=>_e.experimentalFlagStates),nMe=B(()=>_e.subagentModelPolicy),oMe=B(()=>_e.subagentModelPolicySaving);function sMe(e){return _e.experimentalFlagStates.find(t=>t.id===e)}const iMe=B(()=>_e.dangerousBypassAuth);function lMe(){_e.dangerousBypassAuth=!1}const rMe=B(()=>_e.permission),aMe=B(()=>_e.thinking),Wz=B(()=>{const e=_e.activeSessionId;return e?_e.planModeBySession[e]??!1:$f.planMode}),cMe=B(()=>{const e=_e.activeSessionId;return e?_e.planArmedBySession[e]??!1:$f.planMode}),uMe=B(()=>{const e=_e.activeSessionId;return e?_e.dynamicWorkflowModeBySession[e]??!1:$f.dynamicWorkflowMode}),dMe=B(()=>{const e=_e.activeSessionId;return e?_e.goalModeBySession[e]??!1:$f.goalMode}),fMe=B(()=>{const e=TSe(Vz.value);return{plan:Wz.value,goal:Dc.value&&Dc.value.status!=="complete"?{status:Dc.value.status,turnsUsed:Dc.value.turnsUsed,elapsedMs:Dc.value.wallClockMs}:null,dynamicWorkflow:e.total>0?e:null}}),pMe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Ct();return(_e.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(o=>({fileId:o.fileId,kind:o.kind,url:t.getFileUrl(o.fileId),name:o.name}))}))}),hMe=B(()=>_e.warnings),mMe=B(()=>{const e=_e.activeSessionId;return e?(_e.questionsBySession[e]??[]).map(kCe):[]}),gMe=B(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:wCe(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),W9=B(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).length>0?"awaiting-approval":(_e.questionsBySession[e]??[]).length>0?"awaiting-question":V9.value||p6.value?"running":"idle":"idle"}),Eo=wxe(_e,{pushOperationFailure:Y0,refreshSessionStatus:Nf,persistSessionProfile:Lz,activity:W9,updateSession:d6,updateSessionMessages:Cz}),X7=B(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),vMe=B(()=>{const e=_e.activeSessionId;return e?_e.gitStatusBySession[e]?.pullRequest??null:null}),yMe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).toSorted((n,o)=>n.path.localeCompare(o.path)):[]}),wMe=B(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),qz=B(()=>{const e=_e.sessions.find(l=>l.id===_e.activeSessionId),t=X7.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Eo.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??_e.defaultModel)??"—",s=Eo.models.value.find(l=>l.id===o)??Eo.models.value.find(l=>l.model===o);return{model:s?.displayName||s?.model||(o.includes("/")?o.split("/").pop():o),modelId:s?.id??o,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:e?_e.permissionBySession[e.id]??_e.permission:_e.permission,branch:t,cwd:e?.cwd??"",isGitRepo:X7.value!==null}}),kMe=B(()=>Tz.value),bMe=B(()=>_e.sessions.find(t=>t.id===_e.activeSessionId)?.usage.totalCostUsd??0),q9=B(()=>_e.authReady),J7=V(null);Ke(f6,e=>{e&&J7.value===null&&(J7.value=q9.value)},{immediate:!0});const Uz=B(()=>Ube(P9.value,J7.value??!1)),_Me=B(()=>qbe({initialized:f6.value,onboardingCompleted:Uz.value,authReady:q9.value})),xMe=B(()=>_e.defaultModel),SMe=B(()=>_e.config),CMe=B(()=>{const e=_e.activeSessionId;if(!e)return{};const t=_e.gitStatusBySession[e];return t?{...t.entries}:{}});function Nu(e){const t=sl(e.cwd);return _e.workspaces.find(n=>sl(n.root)===t)?.id??e.workspaceId??e.cwd}const U9=B(()=>Ybe({workspaces:_e.workspaces,sessions:_e.sessions,hiddenWorkspaceRoots:_e.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:_e.sessionsHasMoreByWorkspace})),lp=V(hH()),zu=V(mH()==="manual"?"manual":"recent");function MMe(e){const t=Fu(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}const Er=V(MMe(dn.pinnedSessions)),N4=V(ls(dn.pinnedCollapsed)==="true");function AMe(e){Er.value=Er.value.includes(e)?Er.value.filter(t=>t!==e):[...Er.value,e],T1(dn.pinnedSessions,Er.value)}function TMe(e){const t=new Set(Er.value),n=e.filter(o=>t.has(o));Er.value=[...n,...Er.value.filter(o=>!n.includes(o))],T1(dn.pinnedSessions,Er.value)}function EMe(){N4.value=!N4.value,Es(dn.pinnedCollapsed,String(N4.value))}Ke(()=>[U9.value.map(e=>e.id).join("\0"),_e.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=gH(n,lp.value);o!==null&&(lp.value=o,HT(o))});const q0=B(()=>{const e=U9.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:BSe(t.root,_e.fsHome),sessionCount:t.sessionCount}));if(zu.value==="recent"){const t=new Map;for(const n of _e.sessions){if(n.parentSessionId)continue;const o=Nu(n),s=new Date(n.updatedAt).getTime();s>(t.get(o)??Number.NEGATIVE_INFINITY)&&t.set(o,s)}return wH(e,t)}return vH(e,lp.value)}),h6=B(()=>{const e=_e.activeWorkspaceId,t=q0.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ke(h6,e=>{e&&(Object.prototype.hasOwnProperty.call(Eo.skillsByWorkspace.value,e)||Eo.loadSkillsForWorkspace(e))},{immediate:!0});const IMe=B(()=>{const e=h6.value;return e?q0.value.find(t=>t.id===e)??null:null}),LMe=B(()=>{uf.value;const e=new Set(q0.value.map(n=>n.id)),t=new Map(q0.value.map(n=>[n.id,n.name]));return _e.sessions.filter(n=>!n.parentSessionId&&e.has(Nu(n))).map(n=>{const o=Nu(n);return{id:n.id,title:n.title,time:D9(n.updatedAt),busy:H9(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),$Me=B(()=>{uf.value;const e=new Map;for(const t of _e.sessions.toSorted((n,o)=>new Date(o.updatedAt).getTime()-new Date(n.updatedAt).getTime())){if(t.parentSessionId)continue;const n=Nu(t),o={id:t.id,title:t.title,time:D9(t.updatedAt),busy:H9(t.id,t.mainTurnActive),pendingInteraction:t.pendingInteraction,lastTurnReason:t.lastTurnReason,updatedAt:t.updatedAt},s=e.get(n)??[];s.push(o),e.set(n,s)}return q0.value.map(t=>({workspace:t,sessions:e.get(t.id)??[],hasMore:_e.sessionsHasMoreByWorkspace[t.id]??!1,loadingMore:_e.sessionsLoadingMoreByWorkspace[t.id]??!1,initialCount:_e.sessionsInitialCountByWorkspace[t.id]??f0}))});function NMe(e){lp.value=e,HT(e),zu.value!=="manual"&&(zu.value="manual",DT("manual"))}function zMe(e){zu.value!==e&&(zu.value=e,DT(e))}const Zz=B(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),BMe=B(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),RMe=B(()=>{const e={};for(const[t,n]of Object.entries(_e.unreadBySession))n&&(e[t]=!0);return e}),PMe=B(()=>{const e={},t=Zz.value;for(const n of _e.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Nu(n);e[s]=(e[s]??0)+o}return e}),FMe=B(()=>_e.recentRoots),jMe=B(()=>_e.availableOpenInApps),OMe=B(()=>_e.serverCapabilities.fs_write===!0),Bt=gxe(_e,{taskPoller:Dz,sideChat:Si,modelProvider:Eo,pushOperationFailure:Y0,activity:W9,sessionsKnownEmpty:jz,setSessions:xz,updateSession:d6,upsertSessionFront:PSe,appendSession:FSe,forgetSession:Mz,setActiveSessionId:R9,updateSessionMessages:Cz,nextOptimisticMsgId:Fz,getEventConn:()=>ul,syncSessionFromSnapshot:O9,reopenSession:mCe,hasLoadedMessages:dCe,refreshSessionStatus:Nf,refreshSessionGoal:VSe,persistSessionProfile:Lz,mergedWorkspaces:U9,workspacesView:q0,status:qz,workspaceIdForSession:Nu,seedPermissionFromDaemonDefault:RSe,savePlanModeToStorage:yz,saveDynamicWorkflowModeToStorage:wz,saveGoalModeToStorage:kz,draftModes:$f,saveUnread:Pg,saveActiveWorkspaceToStorage:zSe,saveHiddenWorkspacesToStorage:NSe,goalErrorMessage:aCe,resetFastMoon:na.resetFastMoon,initialized:f6,connectIssue:Iz,selectedDiffPath:Az,fileDiffLines:Tz,fileDiffLoading:Ez});async function HMe(){await Bt.loadConfig(),await Promise.all([Bt.checkAuth(),Eo.loadModels(),Eo.loadProviders()])}function DMe(e,t){const n=_e.sessions.find(o=>o.id===e);return n?Bt.renameSession(e,GT(t,n.title)):Promise.resolve()}function Z9(e){return e===_e.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function VMe(e){if(_e.turnActiveBySession[e]){const t={..._e.turnActiveBySession};delete t[e],_e.turnActiveBySession=t}_e.inFlightBySession[e]&&(_e.inFlightBySession={..._e.inFlightBySession,[e]:!1})}function WMe(e,t,n){const o=_e.promptIdBySession[e];Bt.finishPromptLocal(e,{turnWasActive:n}),e===_e.activeSessionId?(Bt.loadGitStatus(e),Nf(e)):t==="idle"&&(_e.unreadBySession={..._e.unreadBySession,[e]:!0},Pg({[e]:!0}));const s=(_e.approvalsBySession[e]??[]).length>0,i=(_e.questionsBySession[e]??[]).length>0;T_e(t,s,i)&&Mr.maybeNotifyCompletion(e,{isUserWatching:Z9(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",promptId:o,onClick:()=>{Bt.selectSession(e)}}),t==="idle"&&cf.maybePlayCompletionSound()}function qMe(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;Mr.maybeNotifyQuestion({isUserWatching:Z9(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{Bt.selectSession(e)}}),cf.maybePlayQuestionSound()}function UMe(e,t){Mr.maybeNotifyApproval({isUserWatching:Z9(e),sessionTitle:_e.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Bt.selectSession(e)}}),cf.maybePlayApprovalSound()}function R1(){return vCe(),{workspace:xCe,sessions:SCe,activeSessionId:CCe,workspacesView:q0,workspaceSortMode:zu,pinnedSessionIds:Er,pinnedCollapsed:N4,visibleWorkspace:IMe,activeWorkspaceId:h6,sessionsForView:LMe,workspaceGroups:$Me,attentionBySession:Zz,pendingBySession:BMe,attentionByWorkspace:PMe,unreadBySession:RMe,recentRoots:FMe,turns:OCe,tasks:DCe,activeAppTasks:$u,auxiliaryTranscripts:U7,todos:qCe,goal:Dc,dynamicWorkflows:Vz,dynamicWorkflowMembersByToolCallId:WCe,activationBadges:fMe,compaction:UCe,status:qz,sessionCost:bMe,fileDiff:kMe,selectedDiffPath:Az,fileDiffLoading:Ez,changes:yMe,gitInfo:X7,gitDiffStats:wMe,activePullRequest:vMe,changesByPath:CMe,pendingApprovals:gMe,availableOpenInApps:jMe,fsWriteSupported:OMe,connection:ZCe,loading:KCe,sessionLoading:GCe,loadingMoreMessages:YCe,hasMoreMessages:XCe,loadMoreMessagesError:JCe,serverVersion:QCe,backend:eMe,experimentalFlagStates:tMe,experimentalFlagState:sMe,subagentModelPolicy:nMe,subagentModelPolicySaving:oMe,saveSubagentModelPolicy:Bt.saveSubagentModelPolicy,clearSubagentModelPolicy:Bt.clearSubagentModelPolicy,reloadSubagentModelPolicy:Bt.loadSubagentModelPolicy,dangerousBypassAuth:iMe,clearDangerousBypassAuth:lMe,initialized:f6,connectIssue:Iz,permission:rMe,thinking:aMe,planMode:Wz,planArmed:cMe,sessionPlans:VCe,dynamicWorkflowMode:uMe,goalMode:dMe,queued:pMe,warnings:hMe,questions:mMe,activity:W9,turnActive:p6,inFlight:V9,working:HCe,isStartingFirstPrompt:NCe,fastMoon:na.fastMoon,models:Eo.models,starredModelIds:Eo.starredModelIds,providers:Eo.providers,uiFontSize:na.uiFontSize,setUiFontSize:na.setUiFontSize,conversationToc:Nz,setConversationToc:USe,turnFolding:Rz,setTurnFolding:ZSe,activityRunFolding:Pz,setActivityRunFolding:KSe,colorScheme:na.colorScheme,setColorScheme:na.setColorScheme,accent:na.accent,setAccent:na.setAccent,notifyOnComplete:Mr.notifyOnComplete,notifyOnQuestion:Mr.notifyOnQuestion,notifyOnApproval:Mr.notifyOnApproval,notifyPermission:Mr.notifyPermission,setNotifyOnComplete:Mr.setNotifyOnComplete,setNotifyOnQuestion:Mr.setNotifyOnQuestion,setNotifyOnApproval:Mr.setNotifyOnApproval,soundOnComplete:cf.soundOnComplete,setSoundOnComplete:cf.setSoundOnComplete,onboarded:P9,setOnboarded:YSe,onboardingCompleted:Uz,appState:_Me,load:Bt.load,selectSession:Bt.selectSession,clearActiveSession:Bt.clearActiveSession,loadOlderMessages:Bt.loadOlderMessages,loadWorkspaces:Bt.loadWorkspaces,loadMoreSessions:Bt.loadMoreSessions,loadAllSessions:Bt.loadAllSessions,selectWorkspace:Bt.selectWorkspace,openWorkspace:Bt.openWorkspace,openWorkspaceDraft:Bt.openWorkspaceDraft,startSessionAndSendPrompt:Bt.startSessionAndSendPrompt,startSessionAndActivateSkill:Bt.startSessionAndActivateSkill,startSessionAndOpenSideChat:Bt.startSessionAndOpenSideChat,addWorkspaceByPath:Bt.addWorkspaceByPath,browseFs:Bt.browseFs,getFsHome:Bt.getFsHome,sendPrompt:Bt.sendPrompt,steerPrompt:Bt.steerPrompt,steerQueued:Bt.steerQueued,sideChatVisible:Si.sideChatVisible,sideChatSessionId:Si.sideChatSessionId,sideChatTurns:Si.sideChatTurns,sideChatRunning:Si.sideChatRunning,sideChatSending:Si.sideChatSending,openSideChat:Si.openSideChat,closeSideChat:Si.closeSideChat,sendSideChatPrompt:Si.sendSideChatPrompt,uploadImage:Bt.uploadImage,abortCurrentPrompt:Bt.abortCurrentPrompt,respondApproval:Bt.respondApproval,respondQuestion:Bt.respondQuestion,dismissQuestion:Bt.dismissQuestion,pendingQuestionActions:Bt.pendingQuestionActions,pendingApprovalActions:Bt.pendingApprovalActions,cancelTask:Bt.cancelTask,detachTask:Bt.detachTask,setPermission:Bt.setPermission,setThinking:Eo.setThinking,setPlanMode:Bt.setPlanMode,togglePlanMode:Bt.togglePlanMode,setDynamicWorkflowMode:Bt.setDynamicWorkflowMode,toggleDynamicWorkflowMode:Bt.toggleDynamicWorkflowMode,setGoalMode:Bt.setGoalMode,toggleGoalMode:Bt.toggleGoalMode,createGoal:Bt.createGoal,controlGoal:Bt.controlGoal,enqueue:Bt.enqueue,dismissWarning:Bt.dismissWarning,renameSession:Bt.renameSession,renameWorkspace:Bt.renameWorkspace,deleteWorkspace:Bt.deleteWorkspace,reorderWorkspaces:NMe,setWorkspaceSortMode:zMe,togglePinnedSession:AMe,reorderPinnedSessions:TMe,togglePinnedCollapsed:EMe,setSessionEmoji:DMe,archiveSession:Bt.archiveSession,exportSession:Bt.exportSession,restoreSession:Bt.restoreSession,loadArchivedSessions:Bt.loadArchivedSessions,compact:Bt.compact,forkSession:Bt.forkSession,generateSessionTitle:Bt.generateSessionTitle,undo:Bt.undo,unqueue:Bt.unqueue,reorderQueue:Bt.reorderQueue,searchFiles:Bt.searchFiles,loadGitStatus:Bt.loadGitStatus,loadFileDiff:Bt.loadFileDiff,clearFileDiff:Bt.clearFileDiff,listDir:Bt.listDir,readFileContent:Bt.readFileContent,getFileDownloadUrl:Bt.getFileDownloadUrl,openWorkspaceFile:Bt.openWorkspaceFile,openInApp:Bt.openInApp,revealWorkspaceFile:Bt.revealWorkspaceFile,revealSavedPlan:Bt.revealSavedPlan,resolveImageUrl:Bt.resolveImageUrl,getFileUrl:e=>Ct().getFileUrl(e),loadModels:Eo.loadModels,loadProviders:Eo.loadProviders,skills:MCe,skillsLoadingBySession:n2,connectors:K7,connectorsLoading:G7,plugins:t1,pluginsLoading:Y7,activeSessionCapabilities:ACe,loadCapabilityData:LCe,updateCapabilities:$Ce,setPluginEnabled:ICe,activateSkill:Eo.activateSkill,setModel:Eo.setModel,toggleStarModel:Eo.toggleStarModel,addProvider:Eo.addProvider,deleteProvider:Eo.deleteProvider,refreshProvider:Eo.refreshProvider,refreshAllProviders:Eo.refreshAllProviders,authReady:q9,defaultModel:xMe,config:SMe,updateConfig:Bt.updateConfig,refreshServerMeta:Bt.refreshServerMeta,checkAuth:Bt.checkAuth,refreshRuntimeState:HMe}}const ZMe=["aria-expanded","aria-label"],KMe={class:"capability-trigger-label"},GMe={class:"capability-panel"},YMe={class:"capability-viewport"},XMe={class:"capability-view"},JMe={key:1,class:"capability-group"},QMe={class:"capability-group-title"},eAe={class:"capability-caption"},tAe={key:0,class:"capability-loading"},nAe={class:"capability-view capability-view-secondary"},oAe={class:"capability-caption"},sAe={key:0,class:"capability-loading"},iAe={class:"capability-caption"},lAe={key:0,class:"capability-loading"},rAe=Je({__name:"CapabilityMenu",props:{sessionId:{},triggerless:{type:Boolean}},setup(e,{expose:t}){const n=e,{t:o}=$t(),s=R1(),i=V(null),l=V(null),r=V(!1),a=V("root"),c=V([]),u=B(()=>n.sessionId===s.activeSessionId.value?s.skills.value:[]),d=B(()=>{const H=n.sessionId;return H?s.skillsLoadingBySession.value[H]===!0:!1}),f=B(()=>s.connectors.value),p=B(()=>s.connectorsLoading.value),h=B(()=>s.plugins.value),m=B(()=>s.pluginsLoading.value),k=B(()=>n.sessionId===s.activeSessionId.value?s.activeSessionCapabilities.value:{}),x=B(()=>d.value||u.value.length>0),y=B(()=>p.value||f.value.length>0),w=B(()=>m.value||h.value.length>0),_=B(()=>{switch(a.value){case"skills":return o("capabilityMenu.skills.title");case"plugins":return o("capabilityMenu.plugins.title");case"root":return""}}),A=B(()=>{switch(a.value){case"skills":return u.value.length;case"plugins":return h.value.length;case"root":return 0}});function P(){c.value=k.value.mcpServers!==void 0?[...k.value.mcpServers]:f.value.map(H=>H.id)}Ke([()=>n.sessionId,f,k],P,{immediate:!0}),Ke([u,d,h,m],()=>{a.value==="skills"&&!d.value&&u.value.length===0&&(a.value="root"),a.value==="plugins"&&!m.value&&h.value.length===0&&(a.value="root")});function z(){if(r.value=!r.value,!r.value){a.value="root";return}n.sessionId&&s.loadCapabilityData(n.sessionId)}t({toggleOpen:z});function L(){r.value=!1,a.value="root"}const E={tools:Promise.resolve(),mcpServers:Promise.resolve()},T={tools:0,mcpServers:0};function $(H,D,M){const R=++T[H],O=n.sessionId,U=E[H].then(async()=>{if(n.sessionId===O)try{await s.updateCapabilities({[H]:[...D.value]})}catch{R===T[H]&&n.sessionId===O&&(D.value=M)}});return E[H]=U,U}function C(H,D){const M=[...c.value],R=new Set(M);return D?R.add(H):R.delete(H),c.value=[...R],$("mcpServers",c,M)}function j(H,D){s.setPluginEnabled(H,D)}return(H,D)=>(g(),S("div",{ref_key:"rootRef",ref:i,class:"capability-control"},[n.triggerless?Y("",!0):(g(),S("button",{key:0,ref_key:"triggerRef",ref:l,type:"button",class:Be(["capability-trigger",{open:r.value}]),"aria-expanded":r.value,"aria-haspopup":"dialog","aria-label":v(o)("capabilityMenu.triggerLabel"),onClick:xt(z,["stop"])},[D[5]||(D[5]=L0('',1)),b("span",KMe,I(v(o)("capabilityMenu.trigger")),1)],10,ZMe)),W(JT,{anchor:n.triggerless?i.value:l.value,open:r.value,label:v(o)("capabilityMenu.triggerLabel"),onClose:L},{default:ae(()=>[b("div",GMe,[b("div",YMe,[b("div",{class:Be(["capability-track",{"is-drilled":a.value!=="root"}])},[b("div",XMe,[x.value?(g(),ue(zc,{key:0,count:u.value.length,onClick:D[0]||(D[0]=M=>a.value="skills")},{label:ae(()=>[He(I(v(o)("capabilityMenu.skills.title")),1)]),trailing:ae(()=>[...D[6]||(D[6]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0),y.value?(g(),S("div",JMe,[b("div",QMe,I(v(o)("capabilityMenu.mcp.title")),1),b("p",eAe,I(v(o)("capabilityMenu.mcp.caption")),1),p.value?(g(),S("div",tAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(f.value,M=>(g(),ue(zc,{key:M.id,class:"mcp-row",selected:c.value.includes(M.id),title:M.name,onClick:R=>void C(M.id,!c.value.includes(M.id))},{label:ae(()=>[He(I(M.name),1)]),trailing:ae(()=>[W(qC,{"model-value":c.value.includes(M.id),"aria-label":v(o)("capabilityMenu.mcp.toggle",{name:M.name}),onClick:D[1]||(D[1]=xt(()=>{},["stop"])),"onUpdate:modelValue":R=>void C(M.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))])):Y("",!0),w.value?(g(),ue(zc,{key:2,count:h.value.length,onClick:D[2]||(D[2]=M=>a.value="plugins")},{label:ae(()=>[He(I(v(o)("capabilityMenu.plugins.title")),1)]),trailing:ae(()=>[...D[7]||(D[7]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0)]),b("div",nAe,[a.value!=="root"?(g(),ue(zc,{key:0,class:"capability-back",count:A.value,onClick:D[3]||(D[3]=M=>a.value="root")},{leading:ae(()=>[...D[8]||(D[8]=[b("svg",{class:"back-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m10 3-5 5 5 5"})],-1)])]),label:ae(()=>[He(I(_.value||v(o)("capabilityMenu.back")),1)]),_:1},8,["count"])):Y("",!0),a.value==="skills"?(g(),S(Ce,{key:1},[b("p",oAe,I(v(o)("capabilityMenu.skills.caption")),1),d.value?(g(),S("div",sAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(u.value,M=>(g(),ue(zc,{key:M.name,class:"skill-row",disabled:"",title:M.description},{label:ae(()=>[He(I(M.name),1)]),_:2},1032,["title"]))),128))],64)):a.value==="plugins"?(g(),S(Ce,{key:2},[b("p",iAe,I(v(o)("capabilityMenu.plugins.caption")),1),m.value?(g(),S("div",lAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(h.value,M=>(g(),ue(zc,{key:M.id,class:"plugin-row",selected:M.enabled,title:M.displayName,onClick:R=>j(M.id,!M.enabled)},{label:ae(()=>[He(I(M.displayName),1)]),trailing:ae(()=>[W(qC,{"model-value":M.enabled,"aria-label":v(o)("capabilityMenu.plugins.toggle",{name:M.displayName}),onClick:D[4]||(D[4]=xt(()=>{},["stop"])),"onUpdate:modelValue":R=>j(M.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))],64)):Y("",!0)])],2)])])]),_:1},8,["anchor","open","label"])],512))}}),aAe=vt(rAe,[["__scopeId","data-v-ff3a96c4"]]);let Bd=0,Jm=null;function Kz(){function e(){typeof document>"u"||(Bd+=1,Bd===1&&(Jm=document.body.style.overflow,document.body.style.overflow="hidden"))}function t(){Bd<=0||(Bd-=1,Bd===0&&typeof document<"u"&&(document.body.style.overflow=Jm??"",Jm=null))}return{lock:e,unlock:t}}const cAe={key:0,class:"sheet-root"},uAe=["aria-label"],dAe=["aria-label"],fAe={key:0,class:"sheet-head"},pAe={class:"sheet-title"},hAe={class:"sheet-body"},mAe=Je({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{lock:i,unlock:l}=Kz();function r(){s("update:modelValue",!1),s("close")}function a(c){c.key==="Escape"&&o.closeOnEsc&&r()}return Ke(()=>o.modelValue,c=>{typeof document>"u"||(c?(i(),document.addEventListener("keydown",a)):(l(),document.removeEventListener("keydown",a)))},{immediate:!0}),En(()=>{typeof document<"u"&&(l(),document.removeEventListener("keydown",a))}),(c,u)=>(g(),ue(qi,{name:"sheet"},{default:ae(()=>[e.modelValue?(g(),S("div",cAe,[b("div",{class:"sheet-scrim",onClick:r}),b("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||v(n)("mobile.sheetLabel")},[b("button",{type:"button",class:"sheet-grab","aria-label":v(n)("mobile.closeSheet"),onClick:r},null,8,dAe),e.title?(g(),S("div",fAe,[b("span",pAe,I(e.title),1)])):Y("",!0),b("div",hAe,[jn(c.$slots,"default",{},void 0,!0)])],8,uAe)])):Y("",!0)]),_:3}))}}),wu=vt(mAe,[["__scopeId","data-v-92ecd88c"]]),gAe={class:"ui-toast__icon","aria-hidden":"true"},vAe={class:"ui-toast__body"},yAe={class:"ui-toast__title"},wAe={key:0,class:"ui-toast__msg"},kAe=Je({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-toast",`ui-toast--${e.variant}`])},[b("span",gAe,[jn(t.$slots,"icon",{},()=>[e.variant==="success"?(g(),ue(Ee,{key:0,name:"check"})):e.variant==="danger"?(g(),ue(Ee,{key:1,name:"close"})):e.variant==="warning"?(g(),ue(Ee,{key:2,name:"alert-triangle"})):(g(),ue(Ee,{key:3,name:"info"}))],!0)]),b("div",vAe,[b("div",yAe,I(e.title),1),e.message?(g(),S("div",wAe,I(e.message),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-toast__close",size:"sm",label:e.dismissLabel,onClick:n[0]||(n[0]=o=>t.$emit("dismiss"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),Gz=vt(kAe,[["__scopeId","data-v-44bc260b"]]),bAe={class:"att-lightbox-card"},_Ae=["src"],xAe=["src","alt"],SAe={class:"att-lightbox-name"},CAe=["aria-label"],MAe={class:"quote-copy"},AAe={key:0,class:"quote-source"},TAe={class:"quote-text"},EAe={key:1,class:"quote-comment"},IAe={key:1,class:"att-strip"},LAe={class:"att-scroll-content"},$Ae={key:1,class:"att-row"},NAe={key:0,class:"att-more"},zAe={class:"cin-wrap"},BAe=["onClick"],RAe={class:"am-icon"},PAe={class:"am-name"},FAe={key:0,class:"am-desc"},jAe={class:"input-row"},OAe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],HAe=["aria-label"],DAe={class:"toolbar-left"},VAe=["aria-label","onKeydown"],WAe={class:"perm-pill-label"},qAe=["onClick"],UAe={class:"pd-info"},ZAe={class:"pd-desc"},KAe={class:"pd-check"},GAe={key:1,class:"workflow-chip"},YAe={class:"workflow-label"},XAe=["aria-label"],JAe=["aria-expanded","aria-label"],QAe=["disabled","aria-expanded","aria-label","onKeydown"],eTe={class:"thinking-pill-label"},tTe=["aria-label"],nTe=["aria-label","disabled"],oTe={class:"md-list"},sTe={key:0,class:"md-section"},iTe=["onClick"],lTe={class:"md-check"},rTe={class:"md-name"},aTe={class:"md-provider"},cTe={key:1,class:"md-divider"},uTe={key:2,class:"md-section"},dTe=["onClick"],fTe={class:"md-check"},pTe={class:"md-name"},hTe={key:0,class:"md-divider"},mTe={class:"md-check md-more-icon"},gTe={class:"md-name"},vTe=["aria-label","onKeydown"],yTe={class:"thinking-dropdown-title"},wTe={class:"thinking-cache-note"},kTe={class:"drop-card"},bTe={key:0,class:"composer-warning-toast",role:"status","aria-live":"polite"},_Te={class:"msheet-search"},xTe={class:"msheet-search"},STe=["onClick"],CTe={class:"am-icon"},MTe={class:"am-name"},ATe={key:0,class:"am-desc"},dM=36,TTe=Je({__name:"Composer",props:{running:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},working:{type:Boolean,default:!1},goalMode:{type:Boolean},workflowActive:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean,default:!1}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel"],setup(e,{expose:t,emit:n}){const o=e,s=B(()=>o.starting?l("composer.starting"):o.running?l("composer.placeholderRunning"):o.goalMode?l("status.goalPlaceholder"):o.planArmed||o.planMode?l("status.planPlaceholder"):l("composer.placeholder")),i=n,{t:l,locale:r}=$t(),a=r6(),{text:c,textareaRef:u,autosize:d,loadForEdit:f,clearDraft:p}=xbe({sessionId:()=>o.sessionId}),h=V([]);let m=1;function k(Me){const it=Me.quote.trim();it&&(h.value.push({id:m++,text:it,comment:Me.comment?.trim()||void 0,source:Me.source?.trim()||void 0}),yt(bn))}function x(Me){h.value=h.value.filter(it=>it.id!==Me)}function y(Me){return[...h.value.map(ft=>{const yn=ft.text.split(` `).map(Yt=>`> ${Yt}`).join(` `);return[ft.source?`From ${ft.source}:`:void 0,yn,ft.comment].filter(Yt=>!!Yt).join(` `)}),Me].filter(Boolean).join(` -`)}function w(){o.planArmed||o.planMode||(o.goalMode&&i("toggleGoal"),i("togglePlan"))}function _(){if(no.value){i("focusGoal");return}o.goalMode||((o.planArmed||o.planMode)&&i("togglePlan"),i("toggleGoal"))}const M=V(!1);function P(){M.value=!M.value,yt(()=>{d(),I(),u.value?.focus()})}function B(){M.value&&(M.value=!1,yt(d))}function $(Me){if(typeof getComputedStyle>"u")return aM;const lt=Number.parseFloat(getComputedStyle(Me).minHeight);return Number.isFinite(lt)&<>0?lt:aM}const T=V(!1);function I(){const Me=u.value;T.value=!!Me&&Me.scrollHeight>$(Me)}Ze(c,()=>{yt(I)}),Ze(()=>o.sessionId,()=>{M.value=!1,C.value=!1,R.value=!1,h.value=[]});const N=ebe({text:c,textareaRef:u,autosize:d,sessionId:()=>o.sessionId}),{open:C,items:O,active:H,update:D,select:A}=tbe({text:c,textareaRef:u,autosize:d,skills:()=>o.skills,emitCommand:Me=>{if(Me==="/plan"){w();return}if(Me==="/goal"){_();return}i("command",Me)},historyPush:Me=>N.push(Me),clearDraft:p}),{open:R,items:j,active:q,loading:K,stale:U,update:te,select:J,close:ee,getMentionToken:ie}=nbe({text:c,textareaRef:u,autosize:d,searchFiles:()=>o.searchFiles}),Q=V(null),he=V(null),xe=V(null);function Ye(Me){u.value?.setSelectionRange(Me,Me)}const st=z({get:()=>c.value.startsWith("/")?c.value.slice(1):c.value,set:Me=>{c.value=`/${Me}`,yt(()=>{Ye(c.value.length),D()})}}),X=z({get:()=>{const Me=xe.value;return Me?c.value.slice(Me.start+1,Me.end):""},set:Me=>{const lt=xe.value;if(!lt)return;c.value=`${c.value.slice(0,lt.start)}@${Me}${c.value.slice(lt.end)}`;const ft=lt.start+Me.length+1;xe.value={start:lt.start,end:ft},yt(()=>{Ye(ft),te()})}});Ze([C,a],async([Me,lt])=>{!Me||!lt||(await yt(),Q.value?.focus())}),Ze([R,a],async([Me,lt])=>{!Me||!lt||(xe.value=ie(),await yt(),he.value?.focus())});function se(){C.value=!1,u.value?.focus()}function F(Me){Me||se()}function Z(){ee(),xe.value=null,u.value?.focus()}function fe(Me){Me||Z()}function ve(){N.resetBrowsing(),D(),te()}const{attachments:ge,previewAttachment:oe,fileInputRef:de,isDragOver:ke,removeAttachment:Se,openAttachmentPreview:me,closeAttachmentPreview:Ae,openFilePicker:le,handleFileInputChange:be,handleDragOver:_e,handleDragLeave:Ke,handleDrop:Qe,clearAfterSubmit:mt,loadAttachments:Tt}=sbe({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId});function qt(){const Me=ge.value.map(lt=>lt.localId);for(const lt of Me)Se(lt)}const nn=z(()=>ge.value.filter(Me=>Me.kind!=="file")),Jt=z(()=>ge.value.filter(Me=>Me.kind==="file")),kn=V(null),Dn=V(null),xn=V(!1);let Ln=null;function Hn(){const Me=kn.value;xn.value=Me!==null&&Me.scrollHeight>Me.clientHeight+1}Ze(kn,Me=>{Ln?.disconnect(),Ln=null,Me&&typeof ResizeObserver=="function"&&(Ln=new ResizeObserver(Hn),Ln.observe(Me)),Hn()},{immediate:!0}),Ze(ge,()=>void yt(Hn),{deep:!0}),Ze(()=>[nn.value.length,Jt.value.length],([Me,lt],[ft,yn])=>{Me<=ft&<<=yn||yt(()=>{const Yt=kn.value;Yt&&(Yt.scrollTop=Me>ft&&Dn.value?Dn.value.offsetHeight-Yt.clientHeight:Yt.scrollHeight)})}),In(()=>{c.value&&yt(()=>{d(),I()})}),En(()=>{document.removeEventListener("click",oi,!0),Ln?.disconnect(),ne?.disconnect(),Wo?.disconnect(),hs()});function bn(){u.value?.focus({preventScroll:!0})}function Wn(Me){Tt(Me)}const Pn=z(()=>C.value||R.value||Ft.value||Ut.value||en.value||es.value),Mn=z(()=>c.value.trim().length===0&&ge.value.length===0&&h.value.length===0);t({loadForEdit:f,loadAttachmentsForEdit:Wn,insertQuote:k,focus:bn,anyPopupOpen:Pn,isEmpty:Mn});const Nn=V(null);let An=null;function Qn(Me){Nn.value=l("composer.noArgCommand",{cmd:Me}),An!==null&&clearTimeout(An),An=setTimeout(()=>{Nn.value=null,An=null},3e3)}En(()=>{An!==null&&clearTimeout(An)});function Fn(Me){return{fileId:Me.fileId,kind:Me.kind,name:Me.name,mediaType:Me.mediaType,size:Me.size}}function Qt(Me){if(Me.kind==="file"){Me.fileId!==void 0&&PN(Me.fileId,Me.name,Me.mediaType);return}me(Me)}function uo(){const Me=c.value.trim(),lt=y(Me);if(ge.value.some(Yt=>Yt.uploading))return;const ft=ge.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!lt&&ft.length===0)return;if(h.value.length===0&&Me==="/plan"){N.push(Me),c.value="",p(),C.value=!1,B(),w();return}if(h.value.length===0&&Me==="/goal"){N.push(Me),c.value="",p(),C.value=!1,B(),_();return}if(h.value.length===0&&Me){const Yt=Uke(Me),li=Yt?UN(o.skills).find(vi=>vi.name===Yt.cmd||vi.name===`/${G5}${Yt.cmd.slice(1)}`):void 0;if(Yt&&li){if(Yt.arg.trim()&&li.acceptsInput!==!0){Qn(Yt.cmd);return}N.push(Me),c.value="",p(),C.value=!1,B(),i("command",Yt.arg?`${Yt.cmd} ${Yt.arg}`:Yt.cmd);return}}Me&&N.push(Me);const yn={text:lt,attachments:ft.map(Yt=>Fn(Yt))};oe.value=null,mt(),c.value="",h.value=[],p(),C.value=!1,R.value=!1,B(),i("submit",yn)}function Zn(){if(!o.running||ge.value.some(Yt=>Yt.uploading))return;const Me=c.value.trim(),lt=y(Me),ft=ge.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!lt&&ft.length===0&&o.queued.length===0)return;const yn={text:lt,attachments:ft.map(Yt=>Fn(Yt))};mt(),Me&&N.push(Me),c.value="",h.value=[],p(),C.value=!1,R.value=!1,B(),i("steer",yn)}let Bo=!1,Un=null;function hs(){Un!==null&&(clearTimeout(Un),Un=null)}function Io(){hs(),Bo=!0}function Bt(){hs(),Un=setTimeout(()=>{Un=null,Bo=!1},0)}function Jo(Me){return Bo||Me.isComposing||Me.keyCode===229}function $s(Me){if(!Jo(Me)){if(Vo.value&&Me.key==="Backspace"&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const lt=u.value;if(lt&<.selectionStart===0&<.selectionEnd===0){Me.preventDefault(),zi();return}}if(Me.key==="Escape"){if(es.value){Me.preventDefault(),Be();return}if(Ft.value){Me.preventDefault(),Xn();return}if(Ut.value){Me.preventDefault(),Po();return}if(en.value){Me.preventDefault(),Us();return}}if(C.value){if(Me.key==="Escape"){Me.preventDefault(),C.value=!1;return}if(Me.key==="Tab"&&O.value.length===0){C.value=!1;return}if(Me.key==="ArrowDown"){Me.preventDefault(),H.value=(H.value+1)%O.value.length;return}if(Me.key==="ArrowUp"){Me.preventDefault(),H.value=(H.value-1+O.value.length)%O.value.length;return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const lt=O.value[H.value];lt&&A(lt);return}}if(R.value&&!K.value){if(Me.key==="ArrowDown"){Me.preventDefault(),q.value=(q.value+1)%Math.max(1,j.value.length);return}if(Me.key==="ArrowUp"){Me.preventDefault(),q.value=(q.value-1+Math.max(1,j.value.length))%Math.max(1,j.value.length);return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const lt=j.value[q.value];lt&&J(lt);return}if(Me.key==="Escape"){Me.preventDefault(),R.value=!1;return}}if(Me.key==="s"&&(Me.ctrlKey||Me.metaKey)&&!Me.shiftKey&&!Me.altKey){o.running&&(Me.preventDefault(),Zn());return}if(!M.value&&!C.value&&!R.value&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const lt=N.isBrowsing();if(Me.key==="ArrowUp"&&N.hasHistory()&&(lt||N.caretAtTextStart())){Me.preventDefault(),N.recallOlder(),C.value=!1;return}if(Me.key==="ArrowDown"&<){Me.preventDefault(),N.recallNewer(),C.value=!1;return}}if(Me.key==="Enter"&&!Me.shiftKey){if(M.value&&!(Me.metaKey||Me.ctrlKey))return;Me.preventDefault(),uo()}}}const ze=z(()=>l("composer.send")),Ge=z(()=>!!o.uploadImage),ot=z(()=>!ge.value.some(Me=>Me.uploading)&&(c.value.trim()!==""||h.value.length>0||ge.value.some(Me=>!Me.error&&Me.fileId))),dt=z(()=>{if(C.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),Ct=z(()=>{if(C.value&&O.value.length>0)return`composer-slash-option-${H.value}`;if(R.value&&j.value.length>0)return`composer-mention-option-${q.value}`}),Ft=V(!1),Ut=V(!1),en=V(!1),tn=V(null),eo=V(null),Ro=V(null),Ls=V(null),Do=V(null),Ve=V(null),it=V(null),Xe=V(null);ca(Ve),ca(it),ca(Xe);const We=V(""),je=V(""),kt=V(""),It=V(""),cn=V(!1);function So(){Ft.value=!Ft.value,Ft.value&&(vl(),Ut.value=!1,en.value=!1,Be(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Qo(){Ni.value||(Ut.value=!Ut.value,Ut.value&&(Zs(),Ft.value=!1,en.value=!1,Be(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0)))}function Po(){Ut.value=!1,mi()}function Xn(){Ft.value=!1,mi()}function pn(){en.value=!en.value,en.value&&(ql(),Ft.value=!1,Ut.value=!1,Be(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Us(){en.value=!1,mi()}function mi(){!Ft.value&&!Ut.value&&!en.value&&!es.value&&document.removeEventListener("click",oi,!0)}function oi(Me){const lt=Me.target;tn.value?.contains(lt)||Hs.value?.contains(lt)||vs.value?.contains(lt)||(Xn(),Po(),Us(),Be())}function ql(){const Me=eo.value,lt=tn.value;We.value=Me&<?`${Math.round(Me.getBoundingClientRect().left-lt.getBoundingClientRect().left)}px`:""}function vl(){const Me=Ro.value,lt=tn.value;je.value=Me&<?`${Math.round(lt.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}function Zs(){const Me=Ls.value,lt=tn.value;kt.value=Me&<?`${Math.round(lt.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}const yo=z(()=>{const Me=o.status?.ctxMax??0;return Me<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/Me*100)))}),$o=z(()=>{const Me=_a(o.status?.ctxUsed??0),lt=_a(o.status?.ctxMax??0);return l("status.ctxTooltip",{used:Me,max:lt,pct:yo.value})}),yl=z(()=>yo.value>=80),ms=z(()=>o.models?.find(Me=>Me.id===o.status?.modelId)),wl=z(()=>o6(ms.value)),gi=z(()=>s6(ms.value)),si=z(()=>v9(ms.value,o.thinking)),Ul=z(()=>gi.value.includes(si.value)?si.value:""),Ni=z(()=>wl.value==="unsupported"||gi.value.length<=1),Te=z(()=>{const Me=(ms.value?.supportEfforts?.length??0)>0,lt=si.value;return Me&<!=="on"&<!=="off"?rf(lt):rt(lt)}),$e=z(()=>l("composer.thinkingControl",{level:Te.value}));function Mt(Me){Ni.value||(i("setThinking",KN(ms.value,Me)),Po())}function rt(Me){return Me==="on"?l("status.thinkingOn"):Me==="off"?l("status.thinkingOff"):rf(Me)}const mn=z(()=>gi.value.map(Me=>({value:Me,label:rt(Me)}))),Kn=z(()=>o.planArmed===!0||o.planMode===!0),to=z(()=>o.workflowActive===!0),Co=z(()=>o.goal?.status??o.activationBadges?.goal?.status??null),no=z(()=>Co.value!==null&&Co.value!=="complete"),Vo=z(()=>o.goalMode?"goal":o.planArmed?"plan":null),Qi=V(null),Os=V(""),Ea=z(()=>Os.value?{textIndent:Os.value}:void 0);let Wo=null;function zi(){Vo.value==="goal"?i("toggleGoal"):Vo.value==="plan"&&i("togglePlan")}function gs(){const Me=Qi.value;Os.value=Me?`calc(${Me.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ze(Vo,async Me=>{if(Wo?.disconnect(),Wo=null,!Me){Os.value="";return}await yt(),gs(),typeof ResizeObserver=="function"&&Qi.value&&(Wo=new ResizeObserver(gs),Wo.observe(Qi.value))},{immediate:!0});const kl=V(null),es=V(!1),Hs=V(null),vs=V(null);ca(Hs),ca(vs);const bl=V(null),Ks=V(null);let ne=null;const we=z(()=>{const Me=[];return Ge.value&&Me.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Vt}),a.value&&Me.push({id:"slash",icon:"terminal",nameKey:"composer.addSlash",descKey:"composer.addSlashDesc",action:Wt},{id:"mention",icon:"link",nameKey:"composer.addMention",descKey:"composer.addMentionDesc",action:on}),Me.push({id:"capabilities",icon:"sliders",nameKey:"capabilityMenu.trigger",action:Vn},{id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:Ht},{id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:Tn},{id:"workflow",icon:"sparkles",nameKey:"status.dynamicWorkflowLabel",descKey:"composer.addWorkflowDesc",action:zn}),Me});function Ee(){const Me=bl.value;if(!Me||Me.scrollHeight<=Me.clientHeight+1){Ks.value=null;return}const lt=getComputedStyle(Me),ft=Number.parseFloat(lt.getPropertyValue("--menu-scrollbar-track-inset"))||0,yn=Number.parseFloat(lt.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Yt=Me.clientHeight-ft*2,li=Math.max(yn,Me.clientHeight/Me.scrollHeight*Yt),vi=Me.scrollHeight-Me.clientHeight;Ks.value={top:Me.offsetTop+ft+Me.scrollTop/vi*(Yt-li),height:li}}Ze(es,async Me=>{ne?.disconnect(),ne=null,Ks.value=null,Me&&(await yt(),Ee(),typeof ResizeObserver=="function"&&bl.value&&(ne=new ResizeObserver(Ee),ne.observe(bl.value)))});function Be(){es.value=!1,mi()}function et(Me){Me||Be()}function pt(){if(es.value){Be();return}Xn(),Po(),Us(),C.value=!1,R.value=!1,es.value=!0,document.addEventListener("click",oi,!0),yt(()=>{(a.value?vs.value:Hs.value)?.querySelector(".am-row")?.focus()})}function jt(Me){Me.action(),a.value&&Me.id==="files"||u.value?.focus()}function Zt(Me){if(Me.key==="Escape"){Me.preventDefault(),Be(),u.value?.focus();return}if(Me.key==="Tab"){Be();return}if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;Me.preventDefault();const lt=a.value?vs.value:Hs.value,ft=Array.from(lt?.querySelectorAll(".am-row")??[]);if(ft.length===0)return;const yn=ft.indexOf(document.activeElement),Yt=Me.key==="ArrowDown"?(yn+1)%ft.length:(yn-1+ft.length)%ft.length;ft[Yt]?.focus()}function Vt(){Be(),le()}function Wt(){Be(),c.value="/",yt(()=>{Ye(1),D()})}function on(){Be(),c.value="@",yt(()=>{Ye(1),te()})}function Vn(){Be(),kl.value?.toggleOpen()}function Ht(){Be(),o.goalMode||_()}function Tn(){Be(),Kn.value||w()}function zn(){Be(),to.value||i("toggleWorkflow")}const Ns=[{mode:"manual",icon:"fingerprint",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],rs=V(null),_l=V("");function J0(Me){const lt={};return Me&&(lt["--composer-menu-desc-width"]=Me),lt}const Q0=z(()=>{const Me=J0(_l.value);return We.value&&(Me.left=We.value),Me}),qu=z(()=>{const Me={};return je.value&&(Me.right=je.value),It.value&&(Me.maxHeight=It.value),Me}),hr=z(()=>{const Me={};return kt.value&&(Me.right=kt.value),Me});let ts=null;function Pr(Me){const lt=Number.parseFloat(Me);return Number.isFinite(lt)?lt:0}function Uu(Me){return`${Me.fontStyle||"normal"} ${Me.fontWeight||"400"} ${Me.fontSize} ${Me.fontFamily}`}function ec(Me){return Me.letterSpacing==="normal"?0:Pr(Me.letterSpacing)}function Fr(Me,lt){if(!Me)return 0;const ft=kke(Me,Uu(lt),{letterSpacing:ec(lt)});return bke(ft)}function F1(){const Me=rs.value?.querySelector(".pd-desc");if(!Me)return;const lt=getComputedStyle(Me),ft=Math.max(0,...Ns.map(yn=>Fr(l(yn.descKey),lt)));_l.value=ft>0?`${Math.ceil(ft)}px`:""}function j1(){typeof window>"u"||(ts!==null&&window.cancelAnimationFrame(ts),yt(()=>{ts=window.requestAnimationFrame(()=>{ts=null,F1()})}))}Ze(r,j1,{immediate:!0}),In(()=>{j1(),document.fonts?.ready.then(j1)}),En(()=>{ts!==null&&(window.cancelAnimationFrame(ts),ts=null)});function Fe(Me){i("setPermission",Me),Us()}const pe=z(()=>Ns.find(Me=>Me.mode===o.status?.permission)),Ne=z(()=>pe.value?l(pe.value.labelKey):""),Sn=z(()=>pe.value?.icon??"fingerprint"),ii=V(!1),el=V(!1),Ia=V(!1),jr=V(!1);let Or=0,tc=0,O1=0,nc=0;const Zu=V(null);let H1=null;function Ku(Me,lt,ft){const yn=Me.getPropertyValue(lt).trim(),Yt=Number.parseFloat(yn);return Number.isFinite(Yt)?yn.endsWith("em")?Yt*Number.parseFloat(Me.fontSize):Yt:ft}function xl(Me){return Me.scrollWidth>Me.clientWidth+1||Me.clientWidth===0&&(Me.textContent?.length??0)>0}function Lf(Me){const lt=Me.getBoundingClientRect().left;for(const ft of Me.querySelectorAll(".compact-chip, .ctx-group, .model-pill, .stop, .send")){const yn=ft.getBoundingClientRect();if(yn.width>0&&yn.leftnc+yn&&(jr.value=!1,yt(Sl));return}if(Ia.value){if(Yt>O1+yn){Ia.value=!1,yt(Sl);return}li&&Lf(li)&&(nc=Yt,jr.value=!0,yt(Sl));return}if(el.value){if(Yt>tc+yn){el.value=!1,yt(Sl);return}li&&Lf(li)&&(yl.value?(O1=Yt,Ia.value=!0):(nc=Yt,jr.value=!0),yt(Sl));return}if(ii.value&&Yt>Or+yn){ii.value=!1,yt(Sl);return}const vi=Do.value;!vi||!xl(vi)||vi.getBoundingClientRect().width>=ft||(ii.value?(tc=Yt,el.value=!0):(Or=Yt,ii.value=!0),yt(Sl))}In(()=>{typeof ResizeObserver=="function"&&tn.value&&(H1=new ResizeObserver(Sl),H1.observe(tn.value)),document.fonts?.ready.then(Sl)}),Ze([Ne,to,yl,Te,()=>o.status?.model,()=>o.working,r],()=>{ii.value=!1,el.value=!1,Ia.value=!1,jr.value=!1,yt(Sl)}),En(()=>{H1?.disconnect(),H1=null});const D1=z(()=>ms.value?.provider??""),oc=z(()=>!D1.value||!o.models?.length?[]:o.models.filter(Me=>Me.provider===D1.value)),Zl=z(()=>new Set(o.starredIds??[]));function ys(Me){return Zl.value.has(Me)}const Hr=z(()=>o.models?.length?o.models.filter(Me=>ys(Me.id)&&Me.provider!==D1.value):[]);function Cl(){const Me=Ve.value,lt=tn.value;if(!Me||!lt)return;const ft=getComputedStyle(Me),yn=Pr(ft.getPropertyValue("--space-1"))||4,Yt=Pr(ft.getPropertyValue("--space-2"))||8,li=window.visualViewport,vi=li?.offsetTop??0,yi=vi+(li?.height??window.innerHeight),W1=lt.getBoundingClientRect(),$a=W1.top-vi-yn-Yt,Gu=yi-W1.bottom-yn-Yt;Me.offsetHeight>$a&&Gu>$a?(cn.value=!0,It.value=`${Math.max(Math.floor(Gu),0)}px`):(cn.value=!1,It.value=`${Math.max(Math.floor($a),0)}px`)}function Bi(){Xn()}function mr(){window.addEventListener("resize",Bi),window.visualViewport?.addEventListener("resize",Bi),window.visualViewport?.addEventListener("scroll",Bi)}function V1(){window.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("scroll",Bi)}Ze(Ft,async Me=>{if(!Me){V1();return}mr(),cn.value=!1,It.value="",await yt(),Cl(),(Ve.value?.querySelector(".md-row.is-current")??Ve.value?.querySelector(".md-row"))?.focus()}),En(V1);function Kl(Me){if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;const lt=Array.from(Ve.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(lt.length===0)return;Me.preventDefault();const ft=lt.indexOf(document.activeElement),yn=Me.key==="ArrowDown"?(ft+1)%lt.length:(ft-1+lt.length)%lt.length;lt[yn]?.focus()}function Gl(Me){i("selectModel",Me),Xn()}return(Me,lt)=>(g(),S("div",{class:Pe(["composer",{"drag-over":v(ke),expanded:M.value}]),onDragover:lt[27]||(lt[27]=(...ft)=>v(_e)&&v(_e)(...ft)),onDragleave:lt[28]||(lt[28]=(...ft)=>v(Ke)&&v(Ke)(...ft)),onDrop:lt[29]||(lt[29]=(...ft)=>v(Qe)&&v(Qe)(...ft))},[v(oe)?(g(),S("div",{key:0,class:"att-lightbox",onClick:lt[1]||(lt[1]=_t((...ft)=>v(Ae)&&v(Ae)(...ft),["self"]))},[b("div",DMe,[W(Cn,{text:v(l)("model.close")},{default:ae(()=>[b("button",{type:"button",class:"att-lightbox-close",onClick:lt[0]||(lt[0]=(...ft)=>v(Ae)&&v(Ae)(...ft))},"✕")]),_:1},8,["text"]),v(oe).kind==="video"?(g(),S("video",{key:0,class:"att-lightbox-media",src:v(oe).previewUrl,controls:"",playsinline:""},null,8,VMe)):(g(),S("img",{key:1,class:"att-lightbox-media",src:v(oe).previewUrl,alt:v(oe).name},null,8,WMe)),b("div",qMe,E(v(oe).name),1)])])):Y("",!0),b("div",{class:Pe(["composer-card",{"labels-collapsed":ii.value}])},[h.value.length>0?(g(),S("div",{key:0,class:"quote-strip","aria-label":v(l)("selection.quoteLabel")},[(g(!0),S(Ce,null,at(h.value,ft=>(g(),S("div",{key:ft.id,class:"quote-chip"},[b("span",ZMe,[ft.source?(g(),S("span",KMe,E(ft.source),1)):Y("",!0),b("span",GMe,E(ft.text),1),ft.comment?(g(),S("span",YMe,E(ft.comment),1)):Y("",!0)]),W(Dt,{size:"sm",label:v(l)("composer.removeNamed",{name:ft.text}),onClick:yn=>x(ft.id)},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])]))),128))],8,UMe)):Y("",!0),v(ge).length>0?(g(),S("div",XMe,[b("div",{ref_key:"attachmentScrollRef",ref:kn,class:Pe(["att-scroll",{"is-overflowing":xn.value}])},[b("div",JMe,[nn.value.length>0?(g(),S("div",{key:0,ref_key:"attachmentMediaRowRef",ref:Dn,class:"att-row att-row-media"},[(g(!0),S(Ce,null,at(nn.value,ft=>(g(),ue(B7,{key:ft.localId,kind:ft.kind,name:ft.name,url:ft.previewUrl,"file-id":ft.fileId,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["kind","name","url","file-id","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):Y("",!0),Jt.value.length>0?(g(),S("div",QMe,[(g(!0),S(Ce,null,at(Jt.value,ft=>(g(),ue(B7,{key:ft.localId,kind:"file",name:ft.name,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):Y("",!0)])],2),xn.value?(g(),S("span",eAe,E(v(l)("composer.attachmentCount",{n:v(ge).length})),1)):Y("",!0),v(ge).length>=2?(g(),ue(Cn,{key:1,text:v(l)("composer.clearAll")},{default:ae(()=>[W(Dt,{class:"att-clear",size:"sm",label:v(l)("composer.clearAll"),onClick:qt},{default:ae(()=>[W(Ie,{name:"trash"})]),_:1},8,["label"])]),_:1},8,["text"])):Y("",!0)])):Y("",!0),b("div",tAe,[v(C)&&!v(a)?(g(),ue(HC,{key:0,id:"composer-slash-menu",items:v(O),"active-index":v(H),onSelect:v(A),onHover:lt[2]||(lt[2]=ft=>H.value=ft)},null,8,["items","active-index","onSelect"])):Y("",!0),v(R)&&!v(a)?(g(),ue(DC,{key:1,id:"composer-mention-menu",items:v(j),"active-index":v(q),loading:v(K),stale:v(U),onSelect:v(J),onHover:lt[3]||(lt[3]=ft=>q.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[es.value&&!v(a)?(g(),S("div",{key:0,ref_key:"modesMenuRef",ref:Hs,class:"add-menu",onClick:lt[5]||(lt[5]=_t(()=>{},["stop"])),onKeydown:Zt},[b("div",{ref_key:"addMenuScrollRef",ref:bl,class:"am-scroll",role:"menu",onScroll:Ee},[(g(!0),S(Ce,null,at(we.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:lt[4]||(lt[4]=_t(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",oAe,[W(Ie,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",sAe,E(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",iAe,E(v(l)(ft.descKey)),1)):Y("",!0)],40,nAe))),128))],544),Ks.value?(g(),S("div",{key:0,class:"scroll-thumb",style:Gt({top:`${Ks.value.top}px`,height:`${Ks.value.height}px`})},null,4)):Y("",!0)],544)):Y("",!0)]),_:1}),b("div",lAe,[Vo.value?(g(),S("span",{key:0,ref_key:"workModePillRef",ref:Qi,class:"wm-pill"},[W(Ie,{name:Vo.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),b("span",null,E(Vo.value==="goal"?v(l)("status.goalLabel"):v(l)("status.planLabel")),1),W(Dt,{class:"wm-x",size:"sm",label:v(l)("status.workModeDismiss"),onMousedown:lt[6]||(lt[6]=_t(()=>{},["prevent"])),onClick:zi},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label"])],512)):Y("",!0),Jn(b("textarea",{ref_key:"textareaRef",ref:u,"onUpdate:modelValue":lt[7]||(lt[7]=ft=>ps(c)?c.value=ft:null),class:"ph",style:Gt(Ea.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!dt.value,"aria-controls":dt.value,"aria-activedescendant":Ct.value,onKeydown:$s,onCompositionstart:Io,onCompositionend:Bt,onInput:ve,onBlur:lt[8]||(lt[8]=ft=>{v(a)||(C.value=!1,R.value=!1)})},null,44,rAe),[[js,v(c)]]),W(Cn,{text:M.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle")},{default:ae(()=>[M.value||T.value?(g(),S("button",{key:0,class:"expand-btn",type:"button","aria-label":M.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle"),onClick:P},[M.value?(g(),ue(Ie,{key:0,name:"collapse",size:"sm"})):(g(),ue(Ie,{key:1,name:"expand",size:"sm"}))],8,aAe)):Y("",!0)]),_:1},8,["text"])])]),Ge.value?(g(),S("input",{key:2,ref_key:"fileInputRef",ref:de,type:"file",multiple:"",class:"file-input-hidden",onChange:lt[9]||(lt[9]=(...ft)=>v(be)&&v(be)(...ft))},null,544)):Y("",!0),b("div",{ref_key:"toolbarRef",ref:tn,class:"toolbar"},[b("div",{ref_key:"menuMeasureRef",ref:rs,class:"menu-measure","aria-hidden":"true"},[...lt[30]||(lt[30]=[b("span",{class:"pd-desc"},null,-1)])],512),b("div",cAe,[W(Dt,{size:"md",class:"composer-attach",label:v(l)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":es.value,onMousedown:lt[10]||(lt[10]=_t(()=>{},["prevent"])),onClick:_t(pt,["stop"])},{default:ae(()=>[W(Ie,{name:"plus"})]),_:1},8,["label","aria-expanded"]),W(EMe,{ref_key:"capMenuRef",ref:kl,"session-id":e.sessionId,triggerless:""},null,8,["session-id"]),e.status?(g(),S("span",{key:0,ref_key:"permissionPillRef",ref:eo,class:Pe(["perm-pill",["perm-"+e.status.permission,{open:en.value}]]),role:"button",tabindex:"0","aria-label":Ne.value,onClick:_t(pn,["stop"]),onKeydown:[go(pn,["enter"]),go(_t(pn,["prevent"]),["space"])]},[W(Ie,{class:"perm-pill-icon",name:Sn.value,size:"md"},null,8,["name"]),b("span",dAe,E(Ne.value),1)],42,uAe)):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[en.value&&e.status?(g(),S("div",{key:0,ref_key:"permDropdownRef",ref:Xe,class:"perm-dropdown",style:Gt(Q0.value),role:"menu",onClick:lt[11]||(lt[11]=_t(()=>{},["stop"]))},[(g(),S(Ce,null,at(Ns,ft=>b("button",{key:ft.mode,class:Pe(["pd-row",{"is-current":ft.mode===e.status.permission}]),role:"menuitem",onClick:yn=>Fe(ft.mode)},[b("span",{class:"pd-icon",style:Gt({color:ft.color})},[W(Ie,{name:ft.icon,size:"md"},null,8,["name"])],4),b("span",pAe,[b("span",{class:"pd-name",style:Gt({color:ft.color})},E(v(l)(ft.labelKey)),5),b("span",hAe,E(v(l)(ft.descKey)),1)]),b("span",mAe,[ft.mode===e.status.permission?(g(),ue(Ie,{key:0,name:"check",size:"sm"})):Y("",!0)])],10,fAe)),64))],4)):Y("",!0)]),_:1}),to.value?(g(),S("span",gAe,[W(Ie,{class:"workflow-ic",name:"sparkles",size:"md"}),b("span",vAe,E(v(l)("status.dynamicWorkflowLabel")),1),W(Dt,{class:"workflow-x",size:"sm",label:v(l)("status.dynamicWorkflowDismiss"),onMousedown:lt[12]||(lt[12]=_t(()=>{},["prevent"])),onClick:lt[13]||(lt[13]=_t(ft=>i("toggleWorkflow"),["stop"]))},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label"])])):Y("",!0)]),b("div",{ref_key:"toolbarRightRef",ref:Zu,class:"toolbar-right"},[yl.value?(g(),S("button",{key:0,class:Pe(["compact-chip",{gone:Ia.value}]),onClick:lt[14]||(lt[14]=_t(ft=>i("compact"),["stop"]))},"/compact",2)):Y("",!0),W(Cn,{text:$o.value},{default:ae(()=>[e.status&&!e.hideContext?(g(),S("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":$o.value},[W(ube,{pct:yo.value},null,8,["pct"])],8,yAe)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:el.value?e.status?.model:null},{default:ae(()=>[e.status?(g(),S("button",{key:0,ref_key:"modelPillRef",ref:Ro,type:"button",class:Pe(["model-pill",{open:Ft.value,"icon-only":el.value,"model-gone":jr.value}]),"aria-haspopup":"menu","aria-expanded":Ft.value,"aria-label":el.value?e.status.model:void 0,onClick:_t(So,["stop"])},[el.value?(g(),ue(Ie,{key:0,name:"cute-bot",size:"md"})):(g(),S(Ce,{key:1},[b("span",{ref_key:"modelNameRef",ref:Do,class:"mp-name"},E(e.status.model),513),W(Ie,{class:"cv",name:"chevron-down",size:"sm"})],64))],10,wAe)):Y("",!0)]),_:1},8,["text"]),e.status&&wl.value!=="unsupported"?(g(),ue(Cn,{key:1,text:$e.value},{default:ae(()=>[b("button",{ref_key:"thinkingPillRef",ref:Ls,type:"button",class:Pe(["thinking-pill",{open:Ut.value}]),disabled:Ni.value,"aria-haspopup":"dialog","aria-expanded":Ut.value,"aria-label":$e.value,onClick:_t(Qo,["stop"]),onKeydown:go(_t(Po,["prevent"]),["escape"])},[W(Ie,{name:"thinking",size:"sm"}),b("span",bAe,E(Te.value),1),Ni.value?Y("",!0):(g(),ue(Ie,{key:0,class:"cv",name:"chevron-down",size:"sm"}))],42,kAe)]),_:1},8,["text"])):Y("",!0),e.working?(g(),ue(Cn,{key:2,text:v(l)("composer.interruptTitle")},{default:ae(()=>[b("button",{class:"stop","aria-label":v(l)("composer.interrupt"),onClick:lt[15]||(lt[15]=ft=>i("interrupt"))},[...lt[31]||(lt[31]=[b("span",{class:"stop-square","aria-hidden":"true"},null,-1)])],8,_Ae)]),_:1},8,["text"])):Y("",!0),b("button",{class:Pe(["send",{"is-starting":e.starting}]),"aria-label":ze.value,disabled:e.starting||!ot.value,onClick:lt[16]||(lt[16]=ft=>uo())},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(Ie,{key:1,name:"send",size:"sm"}))],10,xAe)],512),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ft.value&&e.status?(g(),S("div",{key:0,ref_key:"modelDropdownRef",ref:Ve,class:Pe(["composer-dropdown model-dropdown",{"flip-down":cn.value}]),style:Gt(qu.value),role:"menu",onClick:lt[18]||(lt[18]=_t(()=>{},["stop"])),onKeydown:Kl},[b("div",SAe,[Hr.value.length>0?(g(),S("div",CAe,E(v(l)("status.starredModels")),1)):Y("",!0),(g(!0),S(Ce,null,at(Hr.value,ft=>(g(),S("button",{key:ft.id,class:Pe(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",AAe,[ft.id===e.status.modelId?(g(),ue(Ie,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",TAe,E(ft.displayName??ft.model),1),b("span",EAe,E(ft.provider),1),W(Ie,{class:"md-star",name:"star",size:"sm"})],10,MAe))),128)),Hr.value.length>0?(g(),S("div",IAe)):Y("",!0),oc.value.length>0?(g(),S("div",$Ae,E(D1.value),1)):Y("",!0),(g(!0),S(Ce,null,at(oc.value,ft=>(g(),S("button",{key:ft.id,class:Pe(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",NAe,[ft.id===e.status.modelId?(g(),ue(Ie,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",zAe,E(ft.displayName??ft.model),1),ys(ft.id)?(g(),ue(Ie,{key:0,class:"md-star",name:"star",size:"sm"})):Y("",!0)],10,LAe))),128))]),oc.value.length>0?(g(),S("div",BAe)):Y("",!0),b("button",{class:"md-row md-row-more",role:"menuitem",onClick:lt[17]||(lt[17]=ft=>{Xn(),i("pickModel")})},[b("span",RAe,[W(Ie,{name:"list",size:"sm"})]),b("span",PAe,E(v(l)("status.moreModels")),1),W(Ie,{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],38)):Y("",!0)]),_:1}),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ut.value&&e.status?(g(),S("div",{key:0,ref_key:"thinkingDropdownRef",ref:it,class:"composer-dropdown thinking-dropdown",style:Gt(hr.value),role:"dialog","aria-label":v(l)("composer.thinkingMenuTitle"),onClick:lt[19]||(lt[19]=_t(()=>{},["stop"])),onKeydown:go(_t(Po,["prevent"]),["escape"])},[b("div",jAe,[W(Ie,{name:"thinking",size:"sm"}),b("span",null,E(v(l)("composer.thinkingMenuTitle")),1)]),W(di,{"model-value":Ul.value,options:mn.value,size:"sm","onUpdate:modelValue":Mt},null,8,["model-value","options"]),b("div",OAe,E(v(l)("status.cacheNote")),1)],44,FAe)):Y("",!0)]),_:1})],512)],2),b("div",{class:Pe(["drop-overlay",{show:v(ke)}]),"aria-hidden":"true"},[b("div",HAe,[W(Ie,{name:"file-plus",size:"lg"}),b("span",null,E(v(l)("composer.dropToAttach")),1)])],2),(g(),ue(hl,{to:"body"},[W(qi,{name:"composer-warning"},{default:ae(()=>[Nn.value?(g(),S("div",DAe,[W(Dz,{variant:"warning",title:Nn.value,"dismiss-label":v(l)("common.dismiss"),onDismiss:lt[20]||(lt[20]=ft=>Nn.value=null)},null,8,["title","dismiss-label"])])):Y("",!0)]),_:1}),W(yu,{"model-value":v(a)&&v(C),title:v(l)("composer.slashSheetTitle"),"onUpdate:modelValue":F},{default:ae(()=>[b("div",VAe,[W(us,{ref_key:"slashSheetSearchRef",ref:Q,modelValue:st.value,"onUpdate:modelValue":lt[21]||(lt[21]=ft=>st.value=ft),placeholder:v(l)("composer.slashSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:$s},null,8,["modelValue","placeholder"])]),W(HC,{id:"composer-slash-menu",layout:"sheet",items:v(O),"active-index":v(H),query:st.value,onSelect:v(A),onHover:lt[22]||(lt[22]=ft=>H.value=ft)},null,8,["items","active-index","query","onSelect"])]),_:1},8,["model-value","title"]),W(yu,{"model-value":v(a)&&v(R),title:v(l)("composer.mentionSheetTitle"),"onUpdate:modelValue":fe},{default:ae(()=>[b("div",WAe,[W(us,{ref_key:"mentionSheetSearchRef",ref:he,modelValue:X.value,"onUpdate:modelValue":lt[23]||(lt[23]=ft=>X.value=ft),placeholder:v(l)("composer.mentionSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:$s},null,8,["modelValue","placeholder"])]),W(DC,{id:"composer-mention-menu",layout:"sheet",items:v(j),"active-index":v(q),loading:v(K),stale:v(U),onSelect:v(J),onHover:lt[24]||(lt[24]=ft=>q.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])]),_:1},8,["model-value","title"]),W(yu,{"model-value":v(a)&&es.value,"onUpdate:modelValue":et},{default:ae(()=>[b("div",{ref_key:"mobileModesMenuRef",ref:vs,class:"msheet-add",role:"menu",onClick:lt[26]||(lt[26]=_t(()=>{},["stop"])),onKeydown:Zt},[(g(!0),S(Ce,null,at(we.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:lt[25]||(lt[25]=_t(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",UAe,[W(Ie,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",ZAe,E(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",KAe,E(v(l)(ft.descKey)),1)):Y("",!0)],40,qAe))),128))],544)]),_:1},8,["model-value"])]))],34))}}),Vz=vt(GAe,[["__scopeId","data-v-203386fd"]]),YAe={class:"ah"},XAe={class:"akind"},JAe={class:"apath"},QAe={class:"ah-path"},eTe={class:"dg"},tTe={class:"dc"},nTe={key:2,class:"body-shell"},oTe={class:"shell-cmd"},sTe={key:0,class:"shell-cwd"},iTe={key:1,class:"shell-danger"},lTe={class:"file-bar"},rTe={class:"file-lang"},aTe={class:"file-ln"},cTe={class:"file-text"},uTe={key:4,class:"body-chip"},dTe={class:"chip-label"},fTe={class:"chip-value"},pTe={key:0,class:"chip-detail"},hTe={key:5,class:"body-chip"},mTe={key:0,class:"chip-label"},gTe={class:"chip-value"},vTe={key:6,class:"body-chip"},yTe={class:"chip-label"},wTe={class:"chip-value"},kTe={key:0,class:"chip-detail"},bTe={key:7,class:"body-chip"},_Te={class:"chip-label"},xTe={class:"chip-value"},STe={key:0,class:"chip-detail"},CTe={key:8,class:"body-todo"},MTe={class:"todo-glyph"},ATe={key:10,class:"body-generic"},TTe={class:"gen-text"},ETe={key:11,class:"feedback-wrap"},ITe=["placeholder"],$Te={class:"feedback-hint"},LTe={key:0,class:"plan-actions"},NTe={key:1,class:"abtn"},zTe=.4,BTe=Je({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=z(()=>{const se=n.block;return se.kind!=="plan_review"?null:{plan:se.plan,path:se.path,options:se.options??[]}}),l=V(!1),r=V(!1),a=z(()=>["plan_review","diff","file"].includes(n.block.kind)),c=V(null),u=V(null),d=V(null),f=V({top:!1,bottom:!1}),p=V({top:!1,bottom:!1}),h=V({top:!1,bottom:!1});function m(se){return F=>{const Z=F.currentTarget;Z instanceof HTMLElement&&(se.value={top:Z.scrollTop>0,bottom:Z.scrollTop+Z.clientHeight{const{top:F,bottom:Z}=se.value;if(!F&&!Z)return;const fe="var(--menu-scroll-fade)",ve=F&&Z?`linear-gradient(to bottom, transparent 0, black ${fe}, black calc(100% - ${fe}), transparent 100%)`:F?`linear-gradient(to bottom, transparent, black ${fe})`:`linear-gradient(to top, transparent, black ${fe})`;return{maskImage:ve,WebkitMaskImage:ve}})}const _=w(f),M=w(p),P=w(h);function B(){const se=[[c.value,f],[u.value,p],[d.value,h]];for(const[F,Z]of se)F&&(Z.value={top:F.scrollTop>0,bottom:F.scrollTop+F.clientHeightvoid yt(B)),Ze(l,()=>void yt(B)),Ze(()=>n.block,()=>void yt(B));const $=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function T(){const se=$.includes(n.block.kind)?n.block.kind:"generic";return s(`approval.title.${se}`)}const I=V(!1),N=V(""),C=V(null);function O(){const se=C.value;if(!se)return;se.style.height="auto";const Z=(window.visualViewport?.height??window.innerHeight)*zTe,fe=Math.min(se.scrollHeight,Z);se.style.height=`${fe}px`,se.style.overflowY=se.scrollHeight>Z?"auto":"hidden"}let H=null,D=0;function A(){if(H?.disconnect(),H=null,typeof ResizeObserver>"u")return;const se=C.value;se&&(H=new ResizeObserver(F=>{const Z=F[0]?.contentRect.width??0;Z!==D&&(D=Z,O())}),H.observe(se))}Ze(N,()=>void yt(O)),Ze(I,se=>{if(!se){H?.disconnect(),H=null;return}yt(()=>{O(),A()})}),Ze(l,se=>{se||yt(O)});const{uiFontSize:R}=x9();Ze(R,()=>void yt(O));function j(){n.busy||(I.value=!0,N.value="",setTimeout(()=>C.value?.focus(),0))}function q(){if(n.busy)return;const se=N.value.trim();i.value?J("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:se||void 0}):J("feedback",{decision:"rejected",feedback:se||void 0}),I.value=!1,N.value=""}function K(){I.value=!1,N.value=""}function U(se){se.key==="Enter"&&!se.shiftKey?(se.preventDefault(),q()):se.key==="Escape"&&(se.preventDefault(),K())}const te=V(null);Ze(()=>n.busy,se=>{se||(te.value=null)});function J(se,F){n.busy||(te.value=se,o("decide",F))}function ee(){J("approve",{decision:"approved"})}function ie(){J("approveSession",{decision:"approved",scope:"session"})}function Q(){J("reject",{decision:"rejected"})}function he(){J("approvePlan",{decision:"approved"})}function xe(se){J(`option:${se}`,{decision:"approved",selectedLabel:se})}function Ye(){n.busy||j()}function st(){J("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function X(se){const F=(document.activeElement?.tagName??"").toLowerCase();if(F==="input"||F==="textarea"||n.busy||l.value)return;const Z=i.value;if(Z){if(Z.options.length===0){se.key==="1"?(se.preventDefault(),he()):se.key==="2"?(se.preventDefault(),Ye()):se.key==="3"&&(se.preventDefault(),st());return}se.key==="1"&&Z.options[0]?(se.preventDefault(),xe(Z.options[0].label)):se.key==="2"&&Z.options[1]?(se.preventDefault(),xe(Z.options[1].label)):se.key==="3"&&Z.options[2]&&(se.preventDefault(),xe(Z.options[2].label));return}se.key==="1"?(se.preventDefault(),ee()):se.key==="2"?(se.preventDefault(),ie()):se.key==="3"?(se.preventDefault(),Q()):se.key==="4"&&(se.preventDefault(),j())}return In(()=>{document.addEventListener("keydown",X),window.addEventListener("resize",O),window.visualViewport?.addEventListener("resize",O)}),En(()=>{document.removeEventListener("keydown",X),window.removeEventListener("resize",O),window.visualViewport?.removeEventListener("resize",O),H?.disconnect(),H=null}),(se,F)=>(g(),ue(r9,{class:Pe(["appr",{minimized:l.value}])},L2({head:ae(()=>[b("div",YAe,[F[6]||(F[6]=b("span",{class:"ah-ic"},"!",-1)),b("span",XAe,E(T()),1),b("span",JAe,[e.block.kind==="diff"||e.block.kind==="file"||e.block.kind==="fileop"?(g(),S(Ce,{key:0},[Oe(E(e.block.path),1)],64)):e.block.kind==="shell"?(g(),S(Ce,{key:1},[Oe(E(e.block.command),1)],64)):e.block.kind==="url"?(g(),S(Ce,{key:2},[Oe(E(e.block.url),1)],64)):e.block.kind==="search"?(g(),S(Ce,{key:3},[Oe(E(e.block.query),1)],64)):e.block.kind==="invocation"?(g(),S(Ce,{key:4},[Oe(E(e.block.name),1)],64)):e.block.kind==="generic"?(g(),S(Ce,{key:5},[Oe(E(e.block.summary),1)],64)):Y("",!0)]),e.agentName&&!l.value?(g(),ue(Fl,{key:0,variant:"neutral",size:"sm"},{default:ae(()=>[Oe(E(v(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):Y("",!0),l.value?Y("",!0):(g(),ue(Fl,{key:1,variant:"warning",size:"sm",class:"aw"},{default:ae(()=>[Oe(E(v(s)("approval.required")),1)]),_:1})),a.value&&!l.value?(g(),ue(Dt,{key:2,class:"aexpand",size:"sm",label:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),tooltip:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),onClick:F[0]||(F[0]=Z=>r.value=!r.value)},{default:ae(()=>[W(Ie,{name:r.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):Y("",!0),W(Dt,{class:"amin",size:"sm",label:l.value?v(s)("question.expand"):v(s)("question.minimize"),onClick:F[1]||(F[1]=Z=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ie,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ie,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[e.block.kind==="plan_review"&&e.block.path?(g(),ue(Cn,{key:0,text:e.block.path},{default:ae(()=>[b("div",QAe,E(e.block.path),1)]),_:1},8,["text"])):Y("",!0),e.block.kind==="diff"?(g(),S("div",{key:1,ref_key:"diffBodyRef",ref:c,class:Pe(["diff",{expanded:r.value}]),style:Gt(v(_)),onScroll:F[2]||(F[2]=(...Z)=>v(k)&&v(k)(...Z))},[(g(!0),S(Ce,null,at(e.block.diff,(Z,fe)=>(g(),S("div",{key:fe,class:Pe(["dl",Z.kind==="add"?"add":Z.kind==="rem"?"del":""])},[b("span",eTe,E(Z.gutter),1),b("span",tTe,E(Z.text),1)],2))),128))],38)):e.block.kind==="shell"?(g(),S("div",nTe,[b("div",oTe,[F[7]||(F[7]=b("span",{class:"shell-dollar"},"$",-1)),Oe(" "+E(e.block.command),1)]),e.block.cwd?(g(),S("div",sTe,"cwd: "+E(e.block.cwd),1)):Y("",!0),e.block.danger?(g(),S("div",iTe,E(v(s)("approval.danger",{detail:e.block.danger})),1)):Y("",!0)])):e.block.kind==="file"?(g(),S("div",{key:3,class:Pe(["body-file",{expanded:r.value}])},[b("div",lTe,[b("span",rTe,E(e.block.language??""),1)]),b("div",{class:"file-content",ref_key:"fileBodyRef",ref:u,style:Gt(v(M)),onScroll:F[3]||(F[3]=(...Z)=>v(x)&&v(x)(...Z))},[(g(!0),S(Ce,null,at(e.block.content.split(` -`),(Z,fe)=>(g(),S("div",{key:fe,class:"file-line"},[b("span",aTe,E(fe+1),1),b("span",cTe,E(Z),1)]))),128))],36)],2)):e.block.kind==="fileop"?(g(),S("div",uTe,[b("span",dTe,E(e.block.op),1),b("span",fTe,E(e.block.path),1),e.block.detail?(g(),S("span",pTe,E(e.block.detail),1)):Y("",!0)])):e.block.kind==="url"?(g(),S("div",hTe,[e.block.method?(g(),S("span",mTe,E(e.block.method),1)):Y("",!0),b("span",gTe,E(e.block.url),1)])):e.block.kind==="search"?(g(),S("div",vTe,[b("span",yTe,E(v(s)("approval.searchQueryLabel")),1),b("span",wTe,E(e.block.query),1),e.block.scope?(g(),S("span",kTe,E(v(s)("approval.searchScope",{scope:e.block.scope})),1)):Y("",!0)])):e.block.kind==="invocation"?(g(),S("div",bTe,[b("span",_Te,E(e.block.kind2),1),b("span",xTe,E(e.block.name),1),e.block.description?(g(),S("span",STe,E(e.block.description),1)):Y("",!0)])):e.block.kind==="todo"?(g(),S("div",CTe,[(g(!0),S(Ce,null,at(e.block.items,(Z,fe)=>(g(),S("div",{key:fe,class:"todo-item"},[b("span",MTe,E(Z.status==="done"||Z.status==="completed"?"✓":"○"),1),b("span",{class:Pe(["todo-title",{"todo-done":Z.status==="done"||Z.status==="completed"}])},E(Z.title),3)]))),128))])):e.block.kind==="plan_review"?(g(),S("div",{key:9,ref_key:"planBodyRef",ref:d,class:Pe(["body-plan",{expanded:r.value}]),style:Gt(v(P)),onScroll:F[4]||(F[4]=(...Z)=>v(y)&&v(y)(...Z))},[W(zr,{text:e.block.plan},null,8,["text"])],38)):(g(),S("div",ATe,[b("span",TTe,E(e.block.summary),1)])),I.value?(g(),S("div",ETe,[Jn(b("textarea",{ref_key:"feedbackRef",ref:C,"onUpdate:modelValue":F[5]||(F[5]=Z=>N.value=Z),class:"feedback-ta",placeholder:v(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:U},null,40,ITe),[[js,N.value]]),b("div",$Te,E(v(s)("approval.feedbackHint")),1)])):Y("",!0)]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[i.value?(g(),S("div",LTe,[i.value.options.length>0?(g(!0),S(Ce,{key:0},at(i.value.options,(Z,fe)=>(g(),ue(Cn,{key:fe,text:Z.description},{default:ae(()=>[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value===`option:${Z.label}`,disabled:e.busy,onClick:ve=>xe(Z.label)},{default:ae(()=>[Oe(E(Z.label),1),W(Yr,{class:"k",keys:[String(fe+1)]},null,8,["keys"])]),_:2},1032,["loading","disabled","onClick"])]),_:2},1032,["text"]))),128)):(g(),ue(Nt,{key:1,class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approvePlan",disabled:e.busy,onClick:he},{default:ae(()=>[Oe(E(v(s)("approval.approvePlan")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"])),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:Ye},{default:ae(()=>[Oe(E(v(s)("approval.revise")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["2"]})):Y("",!0)]),_:1},8,["disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"danger-soft",loading:te.value==="rejectAndExit",disabled:e.busy,onClick:st},{default:ae(()=>[Oe(E(v(s)("approval.rejectAndExit")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["3"]})):Y("",!0)]),_:1},8,["loading","disabled"])])):(g(),S("div",NTe,[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approve",disabled:e.busy,onClick:ee},{default:ae(()=>[Oe(E(v(s)("approval.approve")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="approveSession",disabled:e.busy,onClick:ie},{default:ae(()=>[Oe(E(v(s)("approval.approveSession")),1),W(Yr,{class:"k",keys:["2"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="reject",disabled:e.busy,onClick:Q},{default:ae(()=>[Oe(E(v(s)("approval.reject")),1),W(Yr,{class:"k",keys:["3"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:j},{default:ae(()=>[Oe(E(v(s)("approval.feedback")),1),W(Yr,{class:"k",keys:["4"]})]),_:1},8,["disabled"])]))]),key:"1"}]),1032,["class"]))}}),RTe=vt(BTe,[["__scopeId","data-v-f7485122"]]),PTe={class:"goal-panel"},FTe={key:0,class:"goal-criterion"},jTe={class:"goal-criterion-label"},OTe=Je({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=Lt();return(n,o)=>(g(),S("div",PTe,[W(zr,{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(g(),S("div",FTe,[b("div",jTe,[W(Ie,{name:"check-list",size:"md"}),b("span",null,E(v(t)("status.goalDoneWhen")),1)]),W(zr,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):Y("",!0)]))}}),HTe=vt(OTe,[["__scopeId","data-v-81a928ba"]]),DTe={class:"plan-panel"},VTe={key:0,class:"plan-review-row"},WTe={class:"plan-review-label"},qTe={key:1,class:"plan-review-row plan-review-feedback"},UTe={class:"plan-review-label"},ZTe={key:3,class:"plan-path-only"},KTe={class:"plan-path-hint"},GTe={class:"plan-path"},YTe={key:4,class:"plan-empty"},XTe=Je({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},setup(e){const{t}=Lt();return(n,o)=>(g(),S("div",DTe,[e.plan?.selectedOption?(g(),S("div",VTe,[b("span",WTe,E(v(t)("tools.plan.selectedOption")),1),b("span",null,E(e.plan.selectedOption),1)])):Y("",!0),e.plan?.feedback?(g(),S("div",qTe,[b("span",UTe,E(v(t)("tools.plan.feedback")),1),b("span",null,E(e.plan.feedback),1)])):Y("",!0),e.plan?.plan?(g(),ue(zr,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):e.plan?.path?(g(),S("div",ZTe,[b("span",KTe,E(v(t)("tools.plan.pathOnlyHint")),1),b("span",GTe,E(e.plan.path),1),e.revealSavedPlan?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:o[0]||(o[0]=s=>void e.revealSavedPlan(e.plan.agentId,e.plan.toolCallId))},{default:ae(()=>[W(Ie,{name:"external-link",size:"sm"}),Oe(" "+E(v(t)("tools.plan.revealInFileManager")),1)]),_:1})):Y("",!0)])):(g(),S("div",YTe,[W(Ie,{class:"plan-empty-ico",name:"file-edit",size:"lg"}),b("span",null,E(v(t)(e.planModeOn?"status.planEmptyArmed":"status.planEmptyIdle")),1)]))]))}}),JTe=vt(XTe,[["__scopeId","data-v-2883948d"]]),QTe={class:"qh"},eEe={class:"qtitle"},tEe={key:0,class:"qstep"},nEe={key:1,class:"qmin-peek"},oEe={class:"qbody"},sEe=["aria-label"],iEe=["aria-selected","aria-label","onClick"],lEe={class:"qstep-num"},rEe={key:1,class:"qheader-chip"},aEe={class:"qtext"},cEe={class:"qopts"},uEe=["onClick"],dEe={class:"qopt-key"},fEe={class:"qopt-glyph"},pEe={key:0,class:"chk"},hEe={key:1,class:"rad"},mEe={class:"qopt-text"},gEe={class:"qopt-label"},vEe={key:0,class:"qopt-desc"},yEe={class:"qopt-glyph"},wEe={key:0,class:"chk"},kEe={key:1,class:"rad"},bEe={class:"qopt-text qopt-text-other"},_Ee={class:"qopt-label"},xEe={key:0,class:"qopt-desc"},SEe=["placeholder"],CEe={class:"qfoot"},MEe=Je({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=Lt(),s=t,i=V(0),l=V(!1),r=z(()=>n.question.questions[i.value]),a=z(()=>n.question.questions.length);function c(){i.value>0&&i.value--}function u(){i.value=0&&A0:R.kind==="multiWithOther"?R.optionIds.length>0||R.otherText.trim().length>0:R.kind==="other"?R.text.trim().length>0:!0:!1}function p(){return f(r.value.id)}const h=V({});function m(A){return A.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${A.label} ${A.description??""}`.toLowerCase())}function k(){const A={...h.value};let R=!1;for(const j of n.question.questions){if(A[j.id])continue;const q=j.options.filter(m);q.length!==0&&(A[j.id]=j.multiSelect?{kind:"multi",optionIds:q.map(K=>K.id)}:{kind:"single",optionId:q[0].id},R=!0)}R&&(h.value=A)}Ze(()=>n.question.questionId,()=>{i.value=0,l.value=!1,h.value={},w.value={}}),Ze(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),k()},{immediate:!0,deep:!0});function x(A,R){const j=h.value[A];if(j&&j.kind==="single"&&j.optionId===R){const q={...h.value};delete q[A],h.value=q}else h.value={...h.value,[A]:{kind:"single",optionId:R}}}function y(A,R){const j=h.value[A],q=j&&(j.kind==="multi"||j.kind==="multiWithOther")?j.kind==="multi"?[...j.optionIds]:[...j.optionIds]:[],K=q.indexOf(R);K>=0?q.splice(K,1):q.push(R);const U=h.value[A],te=U&&U.kind==="multiWithOther"?U.otherText:"";te?h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:q,otherText:te}}:h.value={...h.value,[A]:{kind:"multi",optionIds:q}}}const w=V({}),_=V(null);function M(A){const R=n.question.questions.find(q=>q.id===A),j=w.value[A]??"";if(R.multiSelect){const q=h.value[A],K=q&&(q.kind==="multi"||q.kind==="multiWithOther")?q.kind==="multi"?[...q.optionIds]:[...q.optionIds]:[];h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:K,otherText:j}}}else h.value={...h.value,[A]:{kind:"other",text:j}}}function P(A){M(A),yt(()=>_.value?.focus())}function B(A,R){const j=h.value[A];return j?j.kind==="single"?j.optionId===R:j.kind==="multi"||j.kind==="multiWithOther"?j.optionIds.includes(R):!1:!1}function $(A){const R=h.value[A];return!!(R&&(R.kind==="other"||R.kind==="multiWithOther"))}function T(){return n.question.questions.every(A=>f(A.id))}const I=z(()=>n.busyKind==="answer"),N=z(()=>n.busyKind==="dismiss"),C=z(()=>!!n.busyKind);function O(){if(C.value||!T())return;const A={answers:h.value,method:"click"};s("answer",n.question.questionId,A)}function H(){C.value||s("dismiss",n.question.questionId)}function D(A){const R=(document.activeElement?.tagName??"").toLowerCase(),j=R==="input"||R==="textarea";if(C.value)return;if(A.key==="Enter"){if(A.preventDefault(),l.value)return;i.value=1&&q<=9){A.preventDefault();const K=r.value,U=q-1,te=K.options[U];te&&(K.multiSelect?y(K.id,te.id):x(K.id,te.id))}}return In(()=>document.addEventListener("keydown",D)),En(()=>document.removeEventListener("keydown",D)),(A,R)=>(g(),ue(r9,{class:Pe(["qcard",{minimized:l.value}])},L2({head:ae(()=>[b("div",QTe,[R[5]||(R[5]=b("span",{class:"qh-ic"},"?",-1)),b("span",eEe,E(v(o)("question.title")),1),a.value>1&&!l.value?(g(),S("span",tEe,E(v(o)("question.step",{current:i.value+1,total:a.value})),1)):Y("",!0),l.value?(g(),S("span",nEe,E(r.value.question),1)):Y("",!0),W(Dt,{class:"qmin",size:"sm",label:l.value?v(o)("question.expand"):v(o)("question.minimize"),onClick:R[0]||(R[0]=j=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ie,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ie,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[b("div",oEe,[a.value>1?(g(),S("div",{key:0,class:"qsteps",role:"tablist","aria-label":v(o)("question.step",{current:i.value+1,total:a.value})},[(g(!0),S(Ce,null,at(n.question.questions,(j,q)=>(g(),S("button",{key:j.id,type:"button",class:Pe(["qstep-dot",{active:q===i.value,answered:f(j.id)}]),"aria-selected":q===i.value,"aria-label":v(o)("question.step",{current:q+1,total:a.value}),onClick:K=>d(q)},[b("span",lEe,E(q+1),1)],10,iEe))),128))],8,sEe)):Y("",!0),r.value.header?(g(),S("div",rEe,[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[Oe(E(r.value.header),1)]),_:1})])):Y("",!0),b("div",aEe,E(r.value.question),1),r.value.body?(g(),ue(zr,{key:2,text:r.value.body,class:"qmdbody"},null,8,["text"])):Y("",!0),b("div",cEe,[(g(!0),S(Ce,null,at(r.value.options,(j,q)=>(g(),S("label",{key:j.id,class:Pe(["qopt",{selected:B(r.value.id,j.id)}]),onClick:_t(K=>r.value.multiSelect?y(r.value.id,j.id):x(r.value.id,j.id),["prevent"])},[b("span",dEe,E(q+1),1),b("span",fEe,[r.value.multiSelect?(g(),S("span",pEe,E(B(r.value.id,j.id)?"■":"□"),1)):(g(),S("span",hEe,E(B(r.value.id,j.id)?"●":"○"),1))]),b("span",mEe,[b("span",gEe,E(j.label),1),j.description?(g(),S("span",vEe,E(j.description),1)):Y("",!0)])],10,uEe))),128)),r.value.allowOther?(g(),S("label",{key:0,class:Pe(["qopt",{selected:$(r.value.id)}]),onClick:R[4]||(R[4]=_t(j=>P(r.value.id),["prevent"]))},[R[6]||(R[6]=b("span",{class:"qopt-key"},null,-1)),b("span",yEe,[r.value.multiSelect?(g(),S("span",wEe,E($(r.value.id)?"■":"□"),1)):(g(),S("span",kEe,E($(r.value.id)?"●":"○"),1))]),b("span",bEe,[b("span",_Ee,E(r.value.otherLabel??v(o)("question.otherDefault")),1),r.value.otherDescription?(g(),S("span",xEe,E(r.value.otherDescription),1)):Y("",!0)]),Jn(b("input",{ref_key:"otherInputEl",ref:_,"onUpdate:modelValue":R[1]||(R[1]=j=>w.value[r.value.id]=j),class:"other-input",type:"text",placeholder:r.value.otherLabel??v(o)("question.otherDefault"),onInput:R[2]||(R[2]=j=>M(r.value.id)),onFocus:R[3]||(R[3]=j=>M(r.value.id))},null,40,SEe),[[js,w.value[r.value.id]]])],2)):Y("",!0)])])]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[b("div",CEe,[i.value[Oe(E(v(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(g(),ue(Nt,{key:1,class:"qfoot-btn qfoot-main",size:"sm",variant:"primary",disabled:!T(),loading:I.value,onClick:O},{default:ae(()=>[Oe(E(v(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),a.value>1?(g(),ue(Nt,{key:2,class:"qfoot-btn",size:"sm",variant:"secondary",disabled:i.value===0||C.value,onClick:c},{default:ae(()=>[Oe(E(v(o)("question.back")),1)]),_:1},8,["disabled"])):Y("",!0),W(Nt,{class:"qfoot-btn",size:"sm",variant:"ghost",loading:N.value,disabled:C.value,onClick:H},{default:ae(()=>[Oe(E(v(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])])]),key:"1"}]),1032,["class"]))}}),AEe=vt(MEe,[["__scopeId","data-v-ce0bd159"]]),TEe=Je({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e,n={pending:"○",run:"●",done:"✓",fail:"✗"};return(o,s)=>(g(),S("span",{class:Pe(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},E(n[t.status]),3))}}),ip=vt(TEe,[["__scopeId","data-v-f870866a"]]),EEe={key:0,class:"sg-empty"},IEe={key:1,class:"sg-grid"},$Ee=["aria-label","onClick"],LEe={class:"sg-top"},NEe={class:"sg-num"},zEe={class:"sg-name"},BEe={key:1,class:"sg-desc"},REe={class:"sg-foot"},PEe={key:0,class:"sg-model"},FEe={class:"sg-status"},jEe={class:"sg-state"},OEe={key:0,class:"sg-time"},HEe=Je({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=Lt();function s(f){return f}function i(f){return f==="running"?"tasks.emptyRunning":f==="done"?"tasks.emptyDone":f==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}const l=fn("modelDisplay"),r=fn("subagentEffort");function a(f){const{model:p,thinkingEffort:h}=f;return[l?.(p)??p,r?.(h)].filter(Boolean).join(" · ")||void 0}function c(f){const p=f.state;return o(p==="done"?"tasks.stateDone":p==="fail"?"tasks.stateFail":p==="cancelled"?"tasks.stateCancelled":"tasks.running")}function u(f,p){return String(f.dynamicWorkflowIndex??p+1).padStart(2,"0")}function d(f){return!!(f.agentId||f.output?.length)}return(f,p)=>e.tasks.length===0?(g(),S("div",EEe,E(v(o)(i(e.filter))),1)):(g(),S("div",IEe,[(g(!0),S(Ce,null,at(e.tasks,(h,m)=>(g(),S("article",{key:h.id,class:Pe(["sg-card",[`s-${h.state}`,{openable:d(h)}]])},[d(h)?(g(),S("button",{key:0,class:"sg-open",type:"button","aria-label":h.name,onClick:k=>n("open",h.agentId??h.id)},null,8,$Ee)):Y("",!0),b("div",LEe,[b("span",NEe,E(u(h,m)),1),b("span",zEe,E(h.name),1)]),h.meta?(g(),S("div",BEe,E(h.meta),1)):Y("",!0),b("div",REe,[a(h)?(g(),S("div",PEe,[b("span",null,E(a(h)),1)])):Y("",!0),b("div",FEe,[b("span",jEe,[h.state==="run"?(g(),ue(ip,{key:0,status:"run"})):h.state==="done"?(g(),ue(Ie,{key:1,class:"sg-ic-done",name:"check",size:"sm"})):(g(),ue(Ie,{key:2,name:"close",size:"sm"})),Oe(" "+E(c(h)),1)]),h.timing?(g(),S("span",OEe,[W(Ie,{name:"clock",size:"sm"}),Oe(" "+E(h.timing),1)])):Y("",!0)])]),h.state==="run"?(g(),ue(Dt,{key:2,class:"sg-cancel",size:"sm",label:v(o)("tasks.stop"),onClick:_t(k=>n("cancel",h.id),["stop"])},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0)],2))),128))]))}}),DEe=vt(HEe,[["__scopeId","data-v-5945b343"]]),VEe={class:"taskspane"},WEe={class:"tp-list"},qEe={key:0,class:"tp-empty"},UEe={class:"tp-main"},ZEe=["aria-label","onClick"],KEe=["aria-label"],GEe={class:"tp-name"},YEe={key:1,class:"tp-meta"},XEe={key:2,class:"tp-model"},JEe={key:3,class:"tp-model"},QEe={key:4,class:"tp-time"},eIe=Je({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=Lt();function s(p){return p}function i(p){return p==="running"?"tasks.emptyRunning":p==="done"?"tasks.emptyDone":p==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function l(p){return p.kind==="subagent"||!!(p.output?.length||p.meta)}function r(p){l(p)&&n("open",p.agentId??p.id)}function a(p){const h=p.state;return o(h==="done"?"tasks.stateDone":h==="fail"?"tasks.stateFail":h==="cancelled"?"tasks.stateCancelled":"tasks.running")}const c=fn("modelDisplay"),u=fn("subagentEffort");function d(p){if(p.kind!=="subagent")return;const h=p.model;return c?.(h)??h}function f(p){if(p.kind==="subagent")return u?.(p.thinkingEffort)}return(p,h)=>(g(),S("div",VEe,[b("div",WEe,[e.tasks.length===0?(g(),S("div",qEe,E(v(o)(i(e.filter))),1)):(g(!0),S(Ce,{key:1},at(e.tasks,m=>(g(),S("div",{key:m.id,class:Pe(["tp-row",{fail:m.state==="fail",expandable:l(m)}])},[b("div",UEe,[l(m)?(g(),S("button",{key:0,class:"tp-open",type:"button","aria-label":m.name,onClick:k=>r(m)},null,8,ZEe)):Y("",!0),b("span",{class:"tp-glyph",role:"img","aria-label":a(m)},[m.state==="run"?(g(),ue(ip,{key:0,status:"run"})):m.state==="done"?(g(),ue(Ie,{key:1,class:"tp-done",name:"check",size:"sm"})):m.state==="cancelled"?(g(),ue(Ie,{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(g(),ue(Ie,{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,KEe),b("span",GEe,E(m.name),1),m.meta?(g(),S("span",YEe,E(m.meta),1)):Y("",!0),d(m)?(g(),S("span",XEe,E(d(m)),1)):Y("",!0),f(m)?(g(),S("span",JEe,E(f(m)),1)):Y("",!0),m.timing?(g(),S("span",QEe,E(m.timing),1)):Y("",!0),m.state==="run"?(g(),ue(Dt,{key:5,class:"tp-stop",size:"sm",label:v(o)("tasks.stop"),onClick:_t(k=>n("cancel",m.id),["stop"])},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0),l(m)?(g(),ue(Ie,{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):Y("",!0)])],2))),128))])]))}}),tIe=vt(eIe,[["__scopeId","data-v-f4589f0b"]]),nIe={class:"todo-card"},oIe={key:0,class:"tc-empty"},sIe={class:"tc-name"},iIe=Je({__name:"TodoCard",props:{todos:{}},setup(e){const{t}=Lt();return(n,o)=>(g(),S("div",nIe,[e.todos.length===0?(g(),S("div",oIe,[W(Ie,{class:"tc-empty-ico",name:"list",size:"lg"}),b("span",null,E(v(t)("tasks.emptyTodo")),1)])):(g(!0),S(Ce,{key:1},at(e.todos,(s,i)=>(g(),S("div",{key:i,class:Pe(["tc-row",`s-${s.status}`])},[b("span",{class:Pe(["tc-glyph",`g-${s.status}`])},[s.status==="done"?(g(),ue(Ie,{key:0,name:"check",size:"md"})):s.status==="in_progress"?(g(),ue(Zo,{key:1,class:"tc-spin",size:"sm"})):Y("",!0)],2),b("span",sIe,E(s.title),1)],2))),128))]))}}),lIe=vt(iIe,[["__scopeId","data-v-4e4d0054"]]),rIe=["disabled","aria-pressed"],aIe=Je({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(g(),S("button",{key:0,class:Pe(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[jn(t.$slots,"default",{},void 0,!0)],10,rIe)):(g(),S("span",{key:1,class:Pe(["ui-pill",{"is-active":e.active}])},[jn(t.$slots,"default",{},void 0,!0)],2))}}),Wz=vt(aIe,[["__scopeId","data-v-0fb1a50d"]]),cIe={class:"fc-label"},uIe=Je({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=z(()=>n.options.find(I=>I.value===n.modelValue)),i=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",l=V(null),r=V(!1);let a=0,c=null;async function u(){const I=l.value?.closest(".dock-work-head");if(!I)return;const N=I.querySelector(".wp-head-tab"),C=getComputedStyle(I),O=(Number.parseFloat(C.columnGap)||0)*2,H=I.clientWidth-Number.parseFloat(C.paddingLeft)-Number.parseFloat(C.paddingRight)-O,D=N?.scrollWidth??0;if(!r.value){const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth)}const A=D+a>H;if(r.value=A,!A){await yt();const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth),r.value=D+a>H}}const d=V(!1),f=V(null),p=V(null),h=V({left:"0px",top:"0px"});function m(){return f.value?.$el??null}async function k(){if(d.value){x();return}d.value=!0,await yt(),y(),w(),window.addEventListener("mousedown",P,!0),window.addEventListener("keydown",B,!0),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0)}function x(I){d.value=!1,window.removeEventListener("mousedown",P,!0),window.removeEventListener("keydown",B,!0),window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0),I?.refocus&&m()?.focus()}function y(){const I=m();if(!I)return;const N=I.getBoundingClientRect(),C=p.value?.offsetHeight??0,O=getComputedStyle(document.documentElement),H=Number.parseFloat(O.getPropertyValue("--space-2"))||0,D=Number.parseFloat(O.getPropertyValue("--space-1"))||0,A=p.value?.offsetWidth??0,R=Math.min(N.left,Math.max(H,window.innerWidth-A-H));N.bottom+D+C<=window.innerHeight-H?h.value={left:`${R}px`,top:`${N.bottom+D}px`}:h.value={left:`${R}px`,bottom:`${window.innerHeight-N.top+D}px`}}function w(){const I=p.value;if(!I)return;(I.querySelector(".ui-menu-item.is-active")??I.querySelector(".ui-menu-item"))?.focus()}function _(){d.value||k()}function M(I){const N=I.relatedTarget;N&&(p.value?.contains(N)||m()?.contains(N))||x()}function P(I){const N=I.target;if(N){if(p.value?.contains(N)){I.stopImmediatePropagation();return}m()?.contains(N)||x()}}function B(I){I.key==="Escape"&&(I.preventDefault(),I.stopImmediatePropagation(),x({refocus:!0}))}function $(I){if(I.key!=="ArrowDown"&&I.key!=="ArrowUp")return;I.preventDefault();const N=Array.from(p.value?.querySelectorAll(".ui-menu-item")??[]);if(N.length===0)return;const C=N.indexOf(document.activeElement),O=I.key==="ArrowDown"?(C+1)%N.length:(C-1+N.length)%N.length;N[O]?.focus()}function T(I){o("update:modelValue",I),x({refocus:!0})}return In(()=>{const I=l.value?.closest(".dock-work-head");!I||typeof ResizeObserver!="function"||(c=new ResizeObserver(()=>void u()),c.observe(I),u())}),Ze(r,I=>{!I&&d.value&&x()}),Ze(()=>n.options,async()=>{a=0,await yt(),await u()},{flush:"post"}),vo(()=>{c?.disconnect(),d.value&&x()}),(I,N)=>(g(),S("span",{ref_key:"root",ref:l,class:"filter-control"},[r.value?(g(),S(Ce,{key:0},[W(Wz,{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:k,onKeydown:[go(_t(_,["prevent"]),["down"]),go(_t(_,["prevent"]),["up"])],onFocusout:M},{default:ae(()=>[s.value?.icon?(g(),ue(Ie,{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):Y("",!0),b("span",null,E(s.value?.label),1),W(Ie,{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(g(),ue(hl,{to:"body"},[d.value?(g(),S("div",{key:0,ref_key:"menuBoxRef",ref:p,class:"fc-menu",style:Gt(h.value),onKeydown:$,onFocusout:M},[W(Nr,null,{default:ae(()=>[(g(!0),S(Ce,null,at(e.options,C=>(g(),ue(Bn,{key:C.value,role:"menuitemradio",active:C.value===e.modelValue,"aria-checked":C.value===e.modelValue,size:v(i),onClick:O=>T(C.value)},{default:ae(()=>[C.icon?(g(),ue(Ie,{key:0,name:C.icon,size:"sm","data-icon":C.icon},null,8,["name","data-icon"])):Y("",!0),b("span",cIe,E(C.label),1),C.value===e.modelValue?(g(),ue(Ie,{key:1,class:"fc-check",name:"check",size:"sm"})):Y("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):Y("",!0)]))],64)):(g(),ue(di,{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":N[0]||(N[0]=C=>o("update:modelValue",C))},null,8,["model-value","options"]))],512))}}),cM=vt(uIe,[["__scopeId","data-v-658870b5"]]),dIe={class:"wp-head-tab"},fIe={key:0,class:"wp-head-meta"},pIe={key:0,class:"wp-head-actions"},hIe=Je({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(g(),S(Ce,null,[b("span",dIe,[W(Ie,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,E(e.title),1),e.meta?(g(),S("span",fIe,E(e.meta),1)):Y("",!0)]),t.$slots.actions?(g(),S("span",pIe,[jn(t.$slots,"actions",{},void 0,!0)])):Y("",!0)],64))}}),Rd=vt(hIe,[["__scopeId","data-v-408c4b07"]]),Pd=Je({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e){return(t,n)=>(g(),ue(Wz,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},{default:ae(()=>[W(Ie,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,[jn(t.$slots,"default")]),jn(t.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),mIe={class:"dock-work-head"},gIe={key:0,class:"dock-workbar"},vIe={class:"dw-running"},yIe={class:"dw-running"},wIe={class:"dw-count"},kIe=Je({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=Lt(),{confirm:l,current:r}=B1(),a=V(null),c=V(null),u=V(null),d=V(null),f=V(!1),p=V(!1),h=V("50% 100%"),m=V("active"),k=V("active"),x=z(()=>Object.values(o.sessionPlans??{}).at(-1)),y=z(()=>a.value?.anyPopupOpen??!1),w=z(()=>[{value:"active",label:i("tasks.filterRecent"),icon:"clock"},{value:"running",label:i("tasks.filterRunning"),icon:"play"},{value:"done",label:i("tasks.filterDone"),icon:"circle-check"},{value:"all",label:i("tasks.filterAll"),icon:"list"}]),_=z(()=>(o.todos?.length??0)>0&&o.todoDoneCount===(o.todos?.length??0)),M=z(()=>o.goal?i(`status.goalStatus${o.goal.status[0].toUpperCase()}${o.goal.status.slice(1)}`):""),P=z(()=>{const te=Math.max(0,Math.round((o.goal?.wallClockMs??0)/1e3)),J=Math.floor(te/3600),ee=Math.floor(te%3600/60);return J?`${J}${i("status.timeUnitHour")} ${ee}${i("status.timeUnitMinute")}`:ee?`${ee}${i("status.timeUnitMinute")} ${te%60}${i("status.timeUnitSecond")}`:`${te}${i("status.timeUnitSecond")}`}),B=z(()=>o.bashTasks.some(te=>te.kind==="tool")?i("tasks.dockTasks"):i("tasks.dockBash"));function $(te,J){if(J==="all")return te;if(J==="running")return te.filter(Q=>Q.state==="run");if(J==="done")return te.filter(Q=>Q.state!=="run");const ee=te.filter(Q=>Q.state==="run"),ie=te.filter(Q=>Q.state!=="run").toSorted((Q,he)=>Date.parse(he.completedAt??he.createdAt??"")-Date.parse(Q.completedAt??Q.createdAt??"")).slice(0,5);return[...ee,...ie]}const T=z(()=>$(o.bashTasks,m.value)),I=z(()=>$(o.subagentTasks,k.value));function N(te,J){const ee=J.currentTarget,ie=c.value;if(ee&&ie){const Q=ee.getBoundingClientRect(),he=ie.getBoundingClientRect();h.value=`${Q.left+Q.width/2-he.left}px 100%`}s("toggle-dock-panel",te)}function C(){p.value=(d.value?.scrollTop??0)>0}function O(te){if(!o.dockPanel)return;const J=te.target;!J||u.value?.contains(J)||J.closest(".ui-pill")||s("close-dock-panel")}function H(te){o.dockPanel&&(te.key!=="Escape"||te.repeat||te.isComposing||te.defaultPrevented||y.value||r.value||o.overlayOpen||(te.preventDefault(),te.stopImmediatePropagation(),s("close-dock-panel")))}async function D(){await l({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}function A(){const te=c.value;if(!te)return;document.documentElement.style.setProperty("--dock-h",`${te.offsetHeight}px`);const J=Number.parseFloat(getComputedStyle(te).getPropertyValue("--p-bp-sm"))||640;f.value=te.offsetWidth{document.addEventListener("mousedown",O,!0),document.addEventListener("keydown",H,!0),typeof ResizeObserver=="function"&&c.value&&(R=new ResizeObserver(()=>{A(),C()}),R.observe(c.value),A())}),En(()=>{document.removeEventListener("mousedown",O,!0),document.removeEventListener("keydown",H,!0),R?.disconnect()}),Ze(()=>o.dockPanel,()=>{p.value=!1,yt(C)});function j(te){return a.value?.loadForEdit(te)??!1}function q(te){a.value?.loadAttachmentsForEdit(te)}function K(){a.value?.focus()}function U(te){a.value?.insertQuote(te)}return t({loadForEdit:j,loadAttachmentsForEdit:q,insertQuote:U,focus:K,anyPopupOpen:y,isEmpty:z(()=>a.value?.isEmpty??!0)}),(te,J)=>(g(),S("div",{ref_key:"dockRef",ref:c,class:Pe(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":y.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":f.value}]]),onClick:J[36]||(J[36]=_t(()=>{},["stop"]))},[W(qi,{name:"dock-panel"},{default:ae(()=>[e.dockPanel?(g(),S("div",{key:e.dockPanel,ref_key:"workPanelRef",ref:u,class:Pe(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":p.value}]]),style:Gt({transformOrigin:h.value})},[b("div",mIe,[e.dockPanel==="bash"?(g(),ue(Rd,{key:0,icon:"terminal",title:B.value,meta:`${e.bashRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(cM,{modelValue:m.value,"onUpdate:modelValue":J[0]||(J[0]=ee=>m.value=ee),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(g(),ue(Rd,{key:1,icon:"sparkles",title:v(i)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(cM,{modelValue:k.value,"onUpdate:modelValue":J[1]||(J[1]=ee=>k.value=ee),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(g(),ue(Rd,{key:2,icon:_.value?"check-list":"list",title:v(i)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(g(),ue(Rd,{key:3,icon:"target",title:v(i)("status.goalLabel"),meta:P.value},{actions:ae(()=>[e.goal?.status==="active"?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("status.goalPause"),onClick:J[2]||(J[2]=ee=>s("controlGoal","pause"))},{default:ae(()=>[W(Ie,{name:"pause",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.goalResume"),onClick:J[3]||(J[3]=ee=>s("controlGoal","resume"))},{default:ae(()=>[W(Ie,{name:"play",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("status.goalCancel"),onClick:D},{default:ae(()=>[W(Ie,{name:"power",size:"sm"})]),_:1},8,["label"]),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:J[4]||(J[4]=ee=>s("close-dock-panel"))},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"])):(g(),ue(Rd,{key:4,icon:"file-edit",title:v(i)("status.planLabel"),meta:x.value?.reviewState?v(i)(`tools.plan.review.${x.value.reviewState}`):""},{actions:ae(()=>[x.value?.path?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("tools.plan.revealInFileManager"),onClick:J[5]||(J[5]=ee=>void e.revealSavedPlan?.(x.value.agentId,x.value.toolCallId))},{default:ae(()=>[W(Ie,{name:"external-link",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.planArmed||e.planMode?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.workModeDismiss"),onClick:J[6]||(J[6]=ee=>s("togglePlan"))},{default:ae(()=>[W(Ie,{name:"power",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:J[7]||(J[7]=ee=>s("close-dock-panel"))},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"]))]),b("div",{ref_key:"workBodyRef",ref:d,class:"dock-work-body",onScroll:C},[e.dockPanel==="bash"?(g(),ue(tIe,{key:0,tasks:T.value,filter:m.value,onCancel:J[8]||(J[8]=ee=>s("cancelTask",ee)),onOpen:J[9]||(J[9]=ee=>s("openAgent",ee))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(g(),ue(DEe,{key:1,tasks:I.value,filter:k.value,onCancel:J[10]||(J[10]=ee=>s("cancelTask",ee)),onOpen:J[11]||(J[11]=ee=>s("openAgent",ee))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(g(),ue(lIe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(g(),ue(HTe,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):(g(),ue(JTe,{key:4,plan:x.value,"plan-mode-on":e.planMode,"open-file":e.openFile,"reveal-saved-plan":e.revealSavedPlan},null,8,["plan","plan-mode-on","open-file","reveal-saved-plan"]))],544)],6)):Y("",!0)]),_:1}),e.hasDockWork||e.planMode||x.value?(g(),S("div",gIe,[e.goal?(g(),ue(Pd,{key:0,icon:"target",active:e.dockPanel==="goal",label:`${v(i)("status.goalLabel")} ${M.value}`,onClick:J[12]||(J[12]=ee=>N("goal",ee))},{meta:ae(()=>[b("span",{class:Pe(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},E(M.value),3)]),default:ae(()=>[Oe(E(v(i)("status.goalLabel"))+" ",1)]),_:1},8,["active","label"])):Y("",!0),e.planMode||x.value?(g(),ue(Pd,{key:1,icon:"file-edit",active:e.dockPanel==="plan",label:v(i)("status.planLabel"),onClick:J[13]||(J[13]=ee=>N("plan",ee))},{default:ae(()=>[Oe(E(v(i)("status.planLabel")),1)]),_:1},8,["active","label"])):Y("",!0),e.bashTasks.length?(g(),ue(Pd,{key:2,icon:"terminal",active:e.dockPanel==="bash",label:B.value,onClick:J[14]||(J[14]=ee=>N("bash",ee))},L2({default:ae(()=>[Oe(E(B.value)+" ",1)]),_:2},[e.bashRunning?{name:"meta",fn:ae(()=>[b("span",vIe,[W(ip,{status:"run"}),Oe(E(e.bashRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.subagentTasks.length?(g(),ue(Pd,{key:3,icon:"sparkles",active:e.dockPanel==="subagent",label:v(i)("tasks.dockSubagent"),onClick:J[15]||(J[15]=ee=>N("subagent",ee))},L2({default:ae(()=>[Oe(E(v(i)("tasks.dockSubagent"))+" ",1)]),_:2},[e.subagentRunning?{name:"meta",fn:ae(()=>[b("span",yIe,[W(ip,{status:"run"}),Oe(E(e.subagentRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.todos?.length?(g(),ue(Pd,{key:4,icon:_.value?"check-list":"list",active:e.dockPanel==="todos",label:v(i)("tasks.todoProgressTitle"),onClick:J[16]||(J[16]=ee=>N("todos",ee))},{meta:ae(()=>[b("span",wIe,E(e.todoDoneCount)+"/"+E(e.todos?.length),1)]),default:ae(()=>[Oe(E(v(i)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","active","label"])):Y("",!0)])):Y("",!0),e.pendingQuestion?(g(),ue(AEe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:J[17]||(J[17]=(ee,ie)=>s("answer",ee,ie)),onDismiss:J[18]||(J[18]=ee=>s("dismiss",ee))},null,8,["question","busy-kind"])):e.pendingApproval?(g(),ue(RTe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:J[19]||(J[19]=ee=>s("approval",e.pendingApproval.approvalId,ee))},null,8,["block","agent-name","busy"])):(g(),ue(Vz,{key:3,ref_key:"composerRef",ref:a,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:J[20]||(J[20]=ee=>s("submit",ee)),onSteer:J[21]||(J[21]=ee=>s("steer",ee)),onCommand:J[22]||(J[22]=ee=>s("command",ee)),onInterrupt:J[23]||(J[23]=ee=>s("interrupt")),onSetPermission:J[24]||(J[24]=ee=>s("setPermission",ee)),onSetThinking:J[25]||(J[25]=ee=>s("setThinking",ee)),onTogglePlan:J[26]||(J[26]=ee=>s("togglePlan")),onToggleWorkflow:J[27]||(J[27]=ee=>s("toggleWorkflow")),onToggleGoal:J[28]||(J[28]=ee=>s("toggleGoal")),onOpenBtw:J[29]||(J[29]=ee=>s("openBtw")),onCreateGoal:J[30]||(J[30]=ee=>s("createGoal",ee)),onControlGoal:J[31]||(J[31]=ee=>s("controlGoal",ee)),onFocusGoal:J[32]||(J[32]=ee=>s("focusGoal")),onCompact:J[33]||(J[33]=ee=>s("compact")),onPickModel:J[34]||(J[34]=ee=>s("pickModel")),onSelectModel:J[35]||(J[35]=ee=>s("selectModel",ee))},null,8,["session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills"]))],2))}}),bIe=vt(kIe,[["__scopeId","data-v-e4431eaa"]]),_Ie=["aria-label","aria-hidden"],xIe=["data-turn-id","tabindex","aria-current","aria-label","onMouseenter","onFocus","onKeydown","onClick"],SIe=["aria-label"],CIe={class:"toc-preview__prompt"},MIe={key:0,class:"toc-preview__response"},AIe=80,TIe=Je({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(null),l=V(null),r=V(null),a=V(!0);let c=null;function u(){const I=i.value,N=I?.offsetParent;if(!I||!N)return;const C=I.getBoundingClientRect(),O=N.getBoundingClientRect();a.value=C.left>=O.left&&C.right<=O.right}const d=z(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1),f=z(()=>l.value!==null&&n.items.some(I=>I.id===l.value)?l.value:n.activeTurnId!==null&&n.items.some(I=>I.id===n.activeTurnId)?n.activeTurnId:n.items[0]?.id??null),p=z(()=>r.value??l.value??n.activeTurnId),h=z(()=>{const I=r.value??l.value;return I===null?void 0:n.items.find(N=>N.id===I)}),m=V(0);let k=null;function x(){k!==null&&clearTimeout(k),k=null}function y(){x(),k=setTimeout(()=>{r.value=null,k=null},AIe)}function w(){return i.value===null?[]:Array.from(i.value.querySelectorAll(".toc-row"))}function _(I,N){let C=I;if(N.key==="ArrowDown")C=Math.min(n.items.length-1,I+1);else if(N.key==="ArrowUp")C=Math.max(0,I-1);else if(N.key==="Home")C=0;else if(N.key==="End")C=n.items.length-1;else return;N.preventDefault(),w()[C]?.focus()}function M(I){const N=I??w().find(O=>O.dataset.turnId===h.value?.id),C=N?.parentElement;!N||!C||(m.value=N.offsetTop-C.scrollTop+N.offsetHeight/2)}function P(I,N){x(),r.value=I,M(N.currentTarget)}function B(I,N){x(),l.value=I,M(N.currentTarget)}function $(I){x();const N=document.activeElement;N instanceof HTMLElement&&i.value?.contains(N)&&N.blur(),r.value=null,l.value=null,o("select",I)}function T(I){const N=I.relatedTarget;(!(N instanceof Node)||!i.value?.contains(N))&&(l.value=null)}return Ze(d,I=>{c?.disconnect(),c=null,I&&yt(()=>{const N=i.value,C=N?.offsetParent;!N||!C||(typeof ResizeObserver<"u"&&(c=new ResizeObserver(u),c.observe(C)),u())})},{immediate:!0}),Ze([()=>n.activeTurnId,d],([I,N])=>{!N||I===null||yt(()=>{const C=w().find(O=>O.dataset.turnId===I);typeof C?.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})})},{immediate:!0}),vo(()=>{x(),c?.disconnect(),c=null}),(I,N)=>d.value?(g(),S("nav",{key:0,ref_key:"navRef",ref:i,class:Pe(["conversation-toc",{"toc-clipped":!a.value||e.occluded}]),"aria-label":v(s)("conversation.toc"),"aria-hidden":a.value&&!e.occluded?void 0:!0,onMouseenter:x,onMouseleave:y,onFocusout:T},[b("div",{class:"toc-scroll",onScroll:N[0]||(N[0]=C=>M())},[(g(!0),S(Ce,null,at(e.items,(C,O)=>(g(),S("button",{key:C.id,type:"button",class:Pe(["toc-row",{active:e.activeTurnId===C.id,highlighted:p.value===C.id,previewing:r.value===C.id||l.value===C.id}]),"data-turn-id":C.id,tabindex:f.value===C.id?0:-1,"aria-current":e.activeTurnId===C.id?"location":void 0,"aria-label":C.title,onMouseenter:H=>P(C.id,H),onFocus:H=>B(C.id,H),onKeydown:H=>_(O,H),onClick:H=>$(C.id)},[...N[2]||(N[2]=[b("span",{class:"toc-marker","aria-hidden":"true"},null,-1)])],42,xIe))),128))],32),h.value?(g(),S("button",{key:0,type:"button",class:"toc-preview",style:Gt({top:`${m.value}px`}),"aria-label":h.value.title,tabindex:"-1",onMouseenter:x,onClick:N[1]||(N[1]=C=>$(h.value.id))},[b("span",CIe,E(h.value.title),1),h.value.preview?(g(),S("span",MIe,E(h.value.preview),1)):Y("",!0)],44,SIe)):Y("",!0)],42,_Ie)):Y("",!0)}}),EIe=vt(TIe,[["__scopeId","data-v-8a1c40d2"]]),uM="script, style, noscript, template, [inert], .top-sentinel",qz="pythinker-transcript-search",X7="pythinker-transcript-search-current",IIe=1e3;function $Ie(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function LIe(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(l,r)=>r)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let l=0;ldM(c.text)),o=[];let s="";for(let c=0;c0&&e[c].gapBefore&&(s+="\0"),o[c]=s.length,s+=n[c].folded;const i=zIe(dM(t).folded);if(i===null)return;const l=new RegExp(i,"g");function r(c){let u=0,d=o.length-1,f=0;for(;u<=d;){const p=u+d>>1;o[p]<=c?(f=p,u=p+1):d=p-1}return f}let a;for(;;){const c=l.exec(s);if(c===null)return;const u=c.index,d=u+c[0].length-1,f=r(u),p=r(d),h=n[f].map[u-o[f]],m=n[p].map[d-o[p]],k={startSegment:f,startOffset:h.start,endSegment:p,endOffset:m.start+m.length};(a?.startSegment!==k.startSegment||a.startOffset!==k.startOffset||a.endSegment!==k.endSegment||a.endOffset!==k.endOffset)&&(a=k,yield k)}}const RIe=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),PIe=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function FIe(e,t){const n=t.get(e);if(n!==void 0)return n;const o=RIe.has(e.tagName)||!PIe.has(getComputedStyle(e).display);return t.set(e,o),o}function jIe(e,t,n){let o=e.parentElement;for(;o!==null&&o!==t&&!FIe(o,n);)o=o.parentElement;return o??t}function OIe(e){const t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,o=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(a){if(a.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;const c=a;return c.matches(uM)?n.FILTER_REJECT:c.matches("br, hr, wbr")&&!c.closest(uM)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),s=new WeakMap,i=new WeakMap,l=[];let r=!1;for(let a=o.nextNode();a!==null;a=o.nextNode()){if(a.nodeType===Node.ELEMENT_NODE){r=!0;continue}const c=a.nodeValue??"";if(c.length===0)continue;const u=a.parentElement;if(u===null)continue;let d=i.get(u);d===void 0&&(d=$Ie(getComputedStyle(u).whiteSpace),i.set(u,d));let{text:f,map:p}=LIe(c,d);if(f.length===0)continue;const h=jIe(a,e,s),m=l.at(-1),k=r||m===void 0||m.block!==h;!k&&m.text.endsWith(" ")&&f.startsWith(" ")&&(f=f.slice(1),p=p.slice(1),f.length===0)||(l.push({text:f,gapBefore:k,node:a,block:h,whitespaceMap:p}),r=!1)}return l}function HIe(e,t){if(t.length===0)return[];const n=OIe(e),o=[];for(const s of BIe(n,t)){const i=n[s.startSegment],l=n[s.endSegment],r=e.ownerDocument.createRange();r.setStart(i.node,i.whitespaceMap[s.startOffset]),r.setEnd(l.node,l.whitespaceMap[s.endOffset-1]+1),o.push(r)}return o}function DIe(e,t,n=o=>o.getClientRects().length!==0){const o=[];for(const s of HIe(e,t))if(n(s)){if(o.length>=IIe)return{ranges:o,truncated:!0};o.push(s)}return{ranges:o,truncated:!1}}function Uz(){return globalThis.CSS?.highlights??null}function fM(e,t){const n=Uz(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){N4();return}const s=new o;for(const l of e)s.add(l);n.set(qz,s);const i=e[t];if(i){const l=new o;l.add(i),n.set(X7,l)}else n.delete(X7)}function N4(){const e=Uz();e?.delete(qz),e?.delete(X7)}const VIe={class:"tsearch-main"},WIe=["placeholder"],qIe=["inert"],UIe={class:"tsearch-foot"},ZIe={class:"tsearch-count","aria-live":"polite"},KIe={class:"tsearch-rings"},GIe=Je({__name:"TranscriptSearch",props:{pane:{},mobile:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=l4("input"),l=Uo(""),r=Uo(!1),a=Uo([]),c=Uo(0),u=Uo(!1),d=Uo(!1),f=Uo([]),p=z(()=>a.value.length),h=z(()=>l.value.trim()!==""),m=z(()=>{if(r.value)return s("conversation.search.searching");if(!h.value)return"";if(p.value===0)return s("conversation.search.noResults");const j={current:c.value+1,total:p.value};return u.value?s("conversation.search.resultsCapped",j):s("conversation.search.results",j)});let k=null,x=null,y=null,w=null,_=null;function M(){return n.pane.querySelector(".chat")}function P(){const j=a.value[c.value];if(!j){f.value=[];return}const q=n.pane.getBoundingClientRect();f.value=Array.from(j.getClientRects(),K=>({top:`${K.top-q.top+n.pane.scrollTop}px`,left:`${K.left-q.left}px`,width:`${K.width}px`,height:`${K.height}px`}))}function B(){f.value.length!==0&&(y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,P()},120))}function $(j){const q=n.pane.getBoundingClientRect().top,K=j.findIndex(U=>{const te=U.getClientRects(),J=te[te.length-1];return J!==void 0&&J.bottom>=q});return K===-1?0:K}function T(){const j=a.value[c.value];fM(a.value,c.value),(j?.startContainer instanceof Element?j.startContainer:j?.startContainer.parentElement)?.scrollIntoView({block:"center"}),P()}function I(j="first"){k!==null&&(clearTimeout(k),k=null),r.value=!1;const q=M(),K=l.value.trim();if(!q||K===""){a.value=[],u.value=!1,c.value=0,N4(),P();return}const U=a.value[c.value],te=U?.startContainer,J=U?.startOffset,ee=DIe(q,K);if(a.value=ee.ranges,u.value=ee.truncated,ee.ranges.length===0){c.value=0,N4(),P();return}if(j!==!1){const Q=$(ee.ranges);c.value=j==="backward"?(Q-1+ee.ranges.length)%ee.ranges.length:Q,T();return}const ie=ee.ranges.findIndex(Q=>Q.startContainer===te&&Q.startOffset===J);c.value=ie>=0?ie:$(ee.ranges),fM(ee.ranges,c.value),P()}function N(){if(k!==null&&clearTimeout(k),l.value.trim()===""){r.value=!1,I();return}r.value=!0,k=setTimeout(()=>I(),150)}function C(j){p.value!==0&&(c.value=(c.value+j+p.value)%p.value,T())}function O(j){if(!(j.key!=="Enter"||d.value||j.isComposing)){if(j.preventDefault(),k!==null){I(j.shiftKey?"backward":"first");return}C(j.shiftKey?-1:1)}}function H(j){j.key!=="Escape"||d.value||j.isComposing||(j.preventDefault(),j.stopPropagation(),o("close"))}function D(j){return j instanceof Element&&(j.classList.contains("tsearch-rings")||j.closest(".tsearch-rings")!==null)}function A(j){if(j.type==="attributes"&&j.target===n.pane||D(j.target))return!0;if(j.type!=="childList")return!1;const q=[...j.addedNodes,...j.removedNodes];return q.length>0&&q.every(D)}function R(j){l.value.trim()===""||j.every(A)||k!==null||(x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k===null&&I(!1)},150))}return In(()=>{if(yt(()=>i.value?.focus()),typeof MutationObserver=="function"&&(w=new MutationObserver(R),w.observe(n.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),n.pane.addEventListener("scroll",B,{passive:!0}),window.addEventListener("resize",B,{passive:!0}),typeof ResizeObserver=="function"){_=new ResizeObserver(P),_.observe(n.pane);const j=n.pane.querySelector(".content-wrap");j&&_.observe(j)}}),En(()=>{k!==null&&clearTimeout(k),x!==null&&clearTimeout(x),y!==null&&clearTimeout(y),w?.disconnect(),_?.disconnect(),n.pane.removeEventListener("scroll",B),window.removeEventListener("resize",B),N4()}),(j,q)=>(g(),S("div",{class:Pe(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:H},[b("div",VIe,[W(Ie,{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Jn(b("input",{ref:"input","onUpdate:modelValue":q[0]||(q[0]=K=>l.value=K),type:"text",class:"tsearch-input",placeholder:v(s)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:N,onKeydown:O,onCompositionstart:q[1]||(q[1]=K=>d.value=!0),onCompositionend:q[2]||(q[2]=K=>d.value=!1)},null,40,WIe),[[js,l.value]]),r.value?(g(),ue(Zo,{key:0,class:"tsearch-spin",size:"sm",label:v(s)("conversation.search.searching")},null,8,["label"])):Y("",!0),q[6]||(q[6]=b("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),W(Dt,{class:"tsearch-close",size:"sm",label:v(s)("conversation.search.close"),onClick:q[3]||(q[3]=K=>o("close"))},{default:ae(()=>[W(Ie,{name:"close"})]),_:1},8,["label"])]),b("div",{class:Pe(["tsearch-foot-wrap",{open:h.value}]),inert:!h.value},[b("div",UIe,[W(Dt,{size:"sm",label:v(s)("conversation.search.previous"),disabled:p.value===0,onClick:q[4]||(q[4]=K=>C(-1))},{default:ae(()=>[W(Ie,{name:"arrow-up"})]),_:1},8,["label","disabled"]),W(Dt,{size:"sm",label:v(s)("conversation.search.next"),disabled:p.value===0,onClick:q[5]||(q[5]=K=>C(1))},{default:ae(()=>[W(Ie,{name:"arrow-down"})]),_:1},8,["label","disabled"]),b("span",ZIe,E(m.value),1)])],10,qIe),(g(),ue(hl,{to:e.pane},[b("div",KIe,[(g(!0),S(Ce,null,at(f.value,(K,U)=>(g(),S("div",{key:U,class:"tsearch-ring",style:Gt(K)},null,4))),128))])],8,["to"]))],34))}}),YIe=vt(GIe,[["__scopeId","data-v-d7187e08"]]);function XIe(e,t=2e4){const n=V(`${e}?r=0`);let o=0;const s=setInterval(()=>{o+=1,n.value=`${e}?r=${o}`},t);return En(()=>clearInterval(s)),n}const JIe=["src","alt","role"],QIe=Je({__name:"PythinkerLogo",props:{size:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:"Pythinker Code"},interactive:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=XIe("/brand/mascot-waving.png"),o=e,s=t;function i(){o.interactive&&s("click")}return(l,r)=>(g(),S("img",{src:e.animated?v(n):"/brand/icon.svg",class:Pe(["pythinker-logo",[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?"button":"img",onClick:i},null,10,JIe))}}),uf=vt(QIe,[["__scopeId","data-v-58c4fde0"]]),e$e=5;function t$e(e,t,n,o=e$e){if(n||e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(l=>l.id===t);i&&(s[o-1]=i)}return s}const n$e={key:0,class:"recent"},o$e={class:"recent-caption"},s$e=["onClick"],i$e={class:"recent-title"},l$e={class:"recent-time"},r$e={class:"recent-foot"},a$e=Je({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["select","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:o}=Lt();return(s,i)=>e.sessions.length?(g(),S("section",n$e,[b("h2",o$e,E(v(o)("sessions.recentSessions")),1),(g(!0),S(Ce,null,at(e.sessions,l=>(g(),S("button",{key:l.id,type:"button",class:"recent-row",onClick:r=>n("select",l.id)},[b("span",{class:Pe(["recent-ico",l.archived?"recent-ico--done":"recent-ico--open"])},[W(Ie,{name:l.archived?"circle-check":"circle-dashed",size:"sm"},null,8,["name"])],2),b("span",i$e,E(l.title),1),b("span",l$e,E(l.time),1)],8,s$e))),128)),b("div",r$e,[W(Cn,{text:v(o)("conversation.sessionAdminTooltip")},{default:ae(()=>[b("button",{type:"button",class:"recent-more",onClick:i[0]||(i[0]=l=>n("openSessionAdmin"))},[Oe(E(v(o)("conversation.viewMoreSessions"))+" ",1),W(Ie,{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])])):Y("",!0)}}),c$e=vt(a$e,[["__scopeId","data-v-cd5a729d"]]),u$e={class:"chat-layout"},d$e={class:"empty-hint"},f$e={key:0,class:"empty-hint-text"},p$e={key:1,class:"ws-pick"},h$e={class:"ws-pick-name"},m$e={key:1,class:"ws-pick-menu"},g$e=["onClick"],v$e={class:"ws-pick-item-name"},y$e={class:"ws-pick-item-path"},w$e=["aria-label"],k$e={key:0,class:"abort-toast",role:"status","aria-live":"polite"},b$e={class:"abort-toast-text"},_$e=48,Xm=80,pM=1e3,x$e=420,S$e=3e3,C$e=Je({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{},revealSavedPlan:{type:Function},panelVisible:{type:Boolean},panelExpanded:{type:Boolean},activePanelType:{},togglePanel:{type:Function}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","steerQueued","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","openFile","openMedia","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","openChanges","refreshGitStatus","editMessage","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","restoreSession","selectSession","exportSession","togglePin","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:o}=Lt(),s=e,i=n,l=V(!1),r=V(!1),a=z(()=>s.workspaces?.find($e=>$e.id===s.activeWorkspaceId)?.name??s.workspaceName??""),c=z(()=>(s.workspaces?.length??0)>0),u=z(()=>t$e(s.workspaces??[],s.activeWorkspaceId,r.value)),d=z(()=>(s.workspaces?.length??0)-u.value.length);Ze(l,Te=>{Te||(r.value=!1)});function f(Te){l.value=!1,Te!==s.activeWorkspaceId&&i("selectWorkspace",Te)}w1(dn.contentAlign);const p=V(null),h=V(null),m=V(null),k=V(!1);let x=null;function y(Te,$e){const Mt=m.value??h.value;return!Mt||Mt.loadForEdit(Te)===!1?!1:(Mt.loadAttachmentsForEdit($e??[]),!0)}function w(){k.value=!0,x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k.value=!1},2e3)}function _(){s.goal&&(A.value="goal")}const M=z(()=>s.tasks.filter(Te=>Te.kind==="bash"||Te.kind==="tool"&&!Te.id.startsWith("question-"))),P=z(()=>s.tasks.filter(Te=>Te.kind==="subagent"&&Te.runInBackground)),B=z(()=>M.value.filter(Te=>Te.state==="run").length),$=z(()=>P.value.filter(Te=>Te.state==="run").length);function T(Te){const $e=s.tasks,Mt=$e.find(mn=>mn.id===Te)??$e.find(mn=>mn.parentToolCallId===Te);if(Mt)return Mt.id;const rt=$e.filter(mn=>mn.kind==="subagent"&&!mn.parentToolCallId);if(rt.length===1)return rt[0].id}qn("resolveAgentTaskId",T);function I(Te){const $e=s.tasks.filter(Mt=>Mt.id===Te||Mt.parentToolCallId===Te);if($e.length!==0)return $e.some(Mt=>Mt.state==="run"&&Mt.runInBackground!==!0)}qn("resolveDetachableTask",I);const N=fn("modelDisplay"),C=fn("subagentEffort");function O(Te){const $e=T(Te);if($e===void 0)return;const Mt=s.tasks.find(Kn=>Kn.id===$e||Kn.agentId===$e),rt=N?.(Mt?.model),mn=C?.(Mt?.thinkingEffort);if(!(rt===void 0&&mn===void 0))return{display:rt,effort:mn}}qn("resolveAgentModel",O),qn("resolvePlan",Te=>s.sessionPlans?.[Te]),qn("revealSavedPlan",(Te,$e)=>s.revealSavedPlan?.(Te,$e)??Promise.resolve(!1)),qn("pinScroll",hs);const H=z(()=>(s.todos??[]).filter(Te=>Te.status==="done").length),D=z(()=>s.goal!==null&&s.goal!==void 0||M.value.length>0||P.value.length>0||(s.todos?.length??0)>0),A=V(null),R=z(()=>s.gitInfo?s.changes?.length??0:0);function j(Te){A.value=A.value===Te?null:Te}function q(){A.value=null}Ze([A,()=>s.goal,M,P,()=>s.todos,()=>s.planMode,()=>s.sessionPlans],()=>{(A.value==="goal"&&!s.goal||A.value==="bash"&&M.value.length===0||A.value==="subagent"&&P.value.length===0||A.value==="todos"&&(s.todos?.length??0)===0||A.value==="plan"&&!s.planMode&&Object.keys(s.sessionPlans??{}).length===0)&&q()});function K(Te){if(Te.role==="compaction")return o("conversation.compactedPlain");if(Te.role==="user"){if(Te.skillActivation)return`/${Te.skillActivation.name}`;if(Te.pluginCommand)return`/${Te.pluginCommand.pluginId}:${Te.pluginCommand.commandName}`;const Mt=Te.text.trim().replaceAll(/\s+/g," ");return Mt.length>0?Mt:"user"}const $e=(Te.text||Te.thinking||"").trim().replaceAll(/\s+/g," ");return $e.length>0?$e:(Te.tools?.length??0)>0?`${Te.tools.length} tools`:"pythinker"}function U(Te){for(let $e=Te+1;$e0)return rt}return""}const te=z(()=>{let Te=0;return s.turns.flatMap(($e,Mt)=>$e.role!=="user"?[]:(Te+=1,[{id:$e.id,role:$e.role,no:Te,title:K($e),preview:U(Mt)}]))}),J=V(null);function ee(){const Te=F.value;if(!Te)return;const $e=Te.querySelectorAll(".turn-anchor[data-turn-id]");if($e.length===0)return;const Mt=te.value;if(Mt.length===0)return;const rt=new Set(Mt.map(Co=>Co.id));if(le.value&&_e()<=Xm){J.value=Mt[Mt.length-1].id;return}const mn=Te.getBoundingClientRect(),Kn=mn.height/2;let to=null;$e.forEach(Co=>{const no=Co.dataset.turnId;if(!no||!rt.has(no))return;Co.getBoundingClientRect().top-mn.top<=Kn&&(to=no)}),J.value=to??Mt[0].id}const ie=V(!1);let Q=0;function he(){Q||(Q=Qn(()=>{Q=0,xe()}))}function xe(){const Te=F.value,$e=!s.mobile&&s.conversationToc&&Te?Te.closest(".con")?.querySelector(".conversation-toc"):null,Mt=$e?.querySelector(".toc-marker");let rt=!1;if(Te&&$e&&Mt){const mn=Mt.getBoundingClientRect(),Kn=$e.getBoundingClientRect(),to=mn.left+mn.width/2;rt=Array.from(Te.querySelectorAll(".table-node-wrapper")).some(Co=>{const no=Co.getBoundingClientRect();return no.left<=to&&to<=no.right&&no.topKn.top})}ie.value!==rt&&(ie.value=rt)}const Ye=z(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),st=z(()=>{const Te=Ye.value;if(Te)return s.pendingQuestionActions?.[Te.questionId]}),X=z(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),se=z(()=>{const Te=X.value;return Te?!!s.pendingApprovalActions?.[Te.approvalId]:!1}),F=V(null),Z=V(!1),fe=V(null),ve=V(0),ge=V(0),oe=z(()=>({"--panes-scrollbar-width":`${ve.value}px`})),de=z(()=>({"--chat-dock-height":`${ge.value+_$e}px`}));function ke(Te){return Te instanceof HTMLElement?Te:Te&&"$el"in Te&&Te.$el instanceof HTMLElement?Te.$el:null}function Se(){const Te=F.value;ve.value=Te?Math.max(0,Te.offsetWidth-Te.clientWidth):0,ge.value=fe.value?.offsetHeight??0}function me(Te){const $e=ke(Te);F.value=$e,$e&&ql()}function Ae(Te){const $e=ke(Te);fe.value=$e??null,Te&&"loadForEdit"in Te&&typeof Te.loadForEdit=="function"&&"focus"in Te&&typeof Te.focus=="function"?m.value={loadForEdit:Te.loadForEdit.bind(Te),loadAttachmentsForEdit:"loadAttachmentsForEdit"in Te&&typeof Te.loadAttachmentsForEdit=="function"?Te.loadAttachmentsForEdit.bind(Te):()=>{},insertQuote:"insertQuote"in Te&&typeof Te.insertQuote=="function"?Te.insertQuote.bind(Te):()=>{},focus:Te.focus.bind(Te)}:m.value=null,oi()}const le=V(!0),be=V(!1);function _e(){const Te=F.value;return Te?Te.scrollHeight-Te.scrollTop-Te.clientHeight:0}let Ke=0,Qe=0,mt=0,Tt=0,qt=0,nn=0;function Jt(){return Date.now()1?(le.value=!1,be.value=!0):Mt<=Xm&&$e>Ke+1&&(le.value=!0,be.value=!1),Ke=$e,ee()}function Dn(Te=!1){const $e=F.value;le.value=!0,be.value=!1,$e&&(!Te&&performance.now()({node:Kn,top:xn(Te,Kn)})),rt=Mt.findIndex(Kn=>Kn.top>=$e),mn=rt<0?Math.max(0,Mt.length-1):rt;return Mt.slice(mn,mn+2).flatMap(Kn=>{const to=Kn.node.dataset.scrollAnchorId,Co=to??Kn.node.dataset.turnId;return Co?[{kind:to?"tool":"turn",id:Co,top:Kn.top}]:[]})}const Hn=new Map;function bn(Te,$e){for(const Mt of $e.anchors){const rt=Mt.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",mn=Te.querySelector(`[${rt}="${Mn(Mt.id)}"]`);if(mn)return xn(Te,mn)-Mt.top}return Te.scrollHeight-$e.oldHeight}function Wn(Te,$e,Mt=Te.scrollTop){return Te.scrollTop=Mt+bn(Te,$e),Ke=Te.scrollTop,Te.scrollTop}async function Pn(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Xe.value||!s.hasMoreMessages)return;const Te=s.sessionId,$e=F.value,Mt=$e?.scrollTop??0,rt={anchors:$e?Ln($e,Mt):[],oldHeight:$e?.scrollHeight??0};We(Te,!0),kt();try{if(await yt(),await s.loadOlderMessages(Te),await yt(),s.sessionId!==Te){Hn.set(Te,rt);return}const mn=F.value;if(!mn)return;Wn(mn,rt),Hn.delete(Te)}finally{We(Te,!1)}}function Mn(Te){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(Te):Te.replaceAll(/["\\]/g,"\\$&")}function Nn(Te){const $e=F.value;if(!$e)return;const Mt=$e.querySelector(`.turn-anchor[data-turn-id="${Mn(Te)}"]`);Mt&&(It(),le.value=!1,J.value=Te,be.value=_e()>Xm,Mt.scrollIntoView({behavior:"smooth",block:"center"}))}function An(){const Te=F.value;if(!Te)return"none";const $e=Te.firstElementChild,Mt=$e instanceof HTMLElement?$e.offsetHeight:0,rt=fe.value?.offsetHeight??0;return`${Te.scrollHeight}:${Te.clientHeight}:${Mt}:${rt}`}function Qn(Te){return typeof requestAnimationFrame=="function"?requestAnimationFrame(Te):setTimeout(Te,16)}function Fn(Te){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(Te):clearTimeout(Te)}let Qt=0,uo=0,Zn=null,Bo=0;function Un(){return performance.now(){if(uo=0,performance.now()>=Qt||!Zn){Zn=null;return}const mn=Zn.getBoundingClientRect().top-Bo;mn&&(Mt.scrollTop+=mn),uo=Qn(rt)};uo=Qn(rt)}function Io(Te=36){if(!le.value&&!Jt())return;const $e=++nn;let Mt="",rt=0,mn=0;qt&&(Fn(qt),qt=0);const Kn=()=>{if(qt=0,$e!==nn||!le.value&&!Jt())return;Dn(!1);const to=An();rt=to===Mt?rt+1:0,Mt=to,mn++,rt<3&&mn0&&$e.length>=Te.length&&Te.firstId!==$e.firstId&&Te.lastId===$e.lastId&&Te.lastTextLen===$e.lastTextLen&&Te.lastThinkingLen===$e.lastThinkingLen&&Te.lastToolsLen===$e.lastToolsLen&&Te.approvalIds===$e.approvalIds}const Jo=z(()=>{const Te=(s.approvals??[]).map(Kn=>Kn.approvalId).join(","),$e=s.turns,Mt=$e.at(-1),rt=Mt?.thinking?.length??0,mn=Mt?.tools?.reduce((Kn,to)=>Kn+to.name.length+(to.arg?.length??0)+(to.output?.join("").length??0),0)??0;return{length:$e.length,firstId:$e[0]?.id??"",lastId:Mt?.id??"",lastTextLen:Mt?.text.length??0,lastThinkingLen:rt,lastToolsLen:mn,approvalIds:Te}});Ze(Jo,async(Te,$e)=>{if(Xe.value&&Bt($e,Te)){ee();return}await yt(),le.value||Jt()?Dn(Te.length<$e.length):be.value=!0,ee()}),Ze(fe,()=>{oi()}),Ze(()=>s.mobile,async()=>{await yt(),Se()});const $s=new Map;Ze(()=>s.fileReloadKey,async(Te,$e)=>{const Mt=F.value;$e&&Mt&&$s.set(String($e),{top:Mt.scrollTop,following:le.value}),It(),await yt();const rt=F.value,mn=Te?$s.get(String(Te)):void 0;if(mn&&rt){const Kn=Hn.get(String(Te)),to=Kn?Wn(rt,Kn,mn.top):mn.top;Kn&&Hn.delete(String(Te)),le.value=mn.following,rt.scrollTop=to,Ke=rt.scrollTop,be.value=!mn.following&&_e()>1,mn.following&&Io()}else le.value=!0,Ke=0,Dn(!1),Io();ee()}),Ze(()=>s.sessionLoading,async(Te,$e)=>{Te||!$e||(le.value=!0,await yt(),Io(),ee())}),Ze(()=>s.turnActive,async(Te,$e)=>{Te||!$e||!le.value&&!Jt()||(await yt(),Io(48),ee())});function ze(){le.value=!0,be.value=!1,Qe=Date.now()+pM,yt(()=>{Dn(!0),Io(16)})}function Ge(Te){ze(),i("submit",Te)}function ot(Te){le.value=!0,be.value=!1,Qe=Date.now()+pM,i("editMessage",Te)}function dt(Te){const $e=s.queued?.[Te],Mt=$e?.text??"";y(Mt,$e?.attachments)&&i("editQueued",Te)}function Ct(Te){i("reorderQueue",Te)}function Ft(Te,$e){ze(),i("answer",Te,$e)}function Ut(Te,$e){!Te||!$e||i("approval",Te,$e)}let en=null,tn=null,eo=null,Ro=null,Ls=0,Do=0,Ve=0;const it=V(new Set),Xe=z(()=>!!s.sessionId&&it.value.has(s.sessionId));function We(Te,$e){const Mt=new Set(it.value);$e?Mt.add(Te):Mt.delete(Te),it.value=Mt}function je(){Xe.value||Ve||(Ve=Qn(()=>{Ve=0,!Xe.value&&(Un()||(le.value||Jt())&&Dn(!1))}))}function kt(){nn++,qt&&(Fn(qt),qt=0),Ve&&(Fn(Ve),Ve=0)}function It(){const Te=F.value;if(Qe=0,kt(),Qt=0,Zn=null,Te){const $e=Te.scrollTop;typeof Te.scrollTo=="function"?Te.scrollTo({top:$e,behavior:"auto"}):Te.scrollTop=$e}Tt=0,mt=Number.NEGATIVE_INFINITY,Te&&(Ke=Te.scrollTop)}function cn(){const Te=F.value;!Te||Te.scrollHeight-Te.clientHeight<=1&&!s.hasMoreMessages||(le.value=!1,It(),Te.scrollHeight-Te.clientHeight>1&&(be.value=!0))}function So(Te){const $e=F.value;if(!$e)return!1;for(const Mt of Te.composedPath()){if(Mt===$e)return!1;if(Mt instanceof HTMLElement&&Mt.scrollHeight>Mt.clientHeight+1&&Mt.scrollTop>1)return!0}return!1}function Qo(Te){Te.defaultPrevented||Te.ctrlKey||Te.shiftKey||Te.deltaY>=0||So(Te)||cn()}function Po(Te){const $e=F.value;if(!$e||Te.defaultPrevented||Te.button!==0||Te.pointerType==="touch")return;const Mt=$e.getBoundingClientRect(),rt=$e.offsetWidth-$e.clientWidth,mn=rt>0?rt:12;Te.target===$e&&Te.clientX>=Mt.right-mn&&cn()}let Xn=null;function pn(Te){Xn=Te.touches.length===1?Te.touches[0].clientY:null}function Us(Te){const $e=Te.touches.length===1?Te.touches[0].clientY:null;$e!==null&&Xn!==null&&$e>Xn+2&&!So(Te)&&cn(),Xn=$e}function mi(){if(!tn)return;const Te=F.value?.firstElementChild??null;Te!==eo&&(eo&&tn.unobserve(eo),eo=Te,Te&&tn.observe(Te))}function oi(){if(!tn)return;const Te=fe.value;Te!==Ro&&(Ro&&tn.unobserve(Ro),Ro=Te,Te&&tn.observe(Te))}function ql(){const Te=F.value;Se(),en&&(en.disconnect(),Te&&en.observe(Te,{childList:!0,subtree:!0,characterData:!0})),tn&&(tn.disconnect(),eo=null,Ro=null,Te&&tn.observe(Te),mi(),oi()),Ls=Te?.scrollHeight??0,Do=Te?.clientHeight??0,he()}function vl(){mi(),je(),he()}function Zs(){typeof document>"u"||document.visibilityState==="visible"&&le.value&&Io()}const yo=V(!1);let $o=null;function yl(){yo.value=!0,$o!==null&&clearTimeout($o),$o=setTimeout(()=>{yo.value=!1},S$e)}function ms(){yl(),i("interrupt")}function wl(Te){if((Te.metaKey||Te.ctrlKey)&&Te.key.toLowerCase()==="f"){if(s.overlayOpen)return;Te.preventDefault(),Z.value=!0,yt(()=>{F.value?.closest(".con")?.querySelector(".tsearch-input")?.focus()});return}Te.key==="Escape"&&(s.running||s.working)&&(Te.preventDefault(),ms())}function gi(){Z.value=!1,yt(()=>F.value?.focus({preventScroll:!0}))}function si(){le.value&&je()}In(()=>{yt(()=>{typeof MutationObserver=="function"&&(en=new MutationObserver(vl)),typeof ResizeObserver=="function"&&(tn=new ResizeObserver(()=>{he(),Se();const Te=F.value;if(!Te)return;const{scrollHeight:$e,clientHeight:Mt}=Te,rt=$e>Ls+1,mn=Mt{en&&en.disconnect(),tn&&tn.disconnect(),Ve&&Fn(Ve),qt&&Fn(qt),uo&&Fn(uo),Q&&Fn(Q),$o!==null&&clearTimeout($o),x!==null&&(clearTimeout(x),x=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Zs),document.removeEventListener("keydown",wl)),window.visualViewport?.removeEventListener("resize",si)});function Ul(){(m.value??h.value)?.focus()}function Ni(Te){(m.value??h.value)?.insertQuote(Te)}return t({loadComposerForEdit:y,focusComposer:Ul,insertComposerQuote:Ni}),(Te,$e)=>{const Mt=gg("IconButton");return g(),S("section",{class:Pe(["con",{mobile:e.mobile,"toc-enabled":e.conversationToc}]),style:Gt(de.value)},[Z.value&&F.value?(g(),ue(YIe,{key:0,pane:F.value,mobile:e.mobile,onClose:gi},null,8,["pane","mobile"])):Y("",!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(g(),ue(Pye,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":R.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,"session-done":e.sessionDone,pinned:e.pinned,"panel-visible":e.panelVisible,onOpenChanges:$e[0]||($e[0]=rt=>i("openChanges")),onCopyAll:$e[1]||($e[1]=rt=>p.value?.copyConversation()),onCopyFinalSummary:$e[2]||($e[2]=rt=>p.value?.copyFinalSummary()),onOpenPr:$e[3]||($e[3]=rt=>e.pr&&i("openPr",e.pr.url)),onRenameSession:$e[4]||($e[4]=(rt,mn)=>i("renameSession",rt,mn)),onForkSession:$e[5]||($e[5]=rt=>i("forkSession",rt)),onTogglePin:$e[6]||($e[6]=rt=>i("togglePin",rt)),onArchiveSession:$e[7]||($e[7]=rt=>i("archiveSession",rt)),onRestoreSession:$e[8]||($e[8]=rt=>i("restoreSession",rt)),onExportSession:$e[9]||($e[9]=rt=>i("exportSession",rt)),onTogglePanel:$e[10]||($e[10]=rt=>e.togglePanel?.())},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","session-done","pinned","panel-visible"])):Y("",!0),!e.mobile&&!e.panelVisible&&e.turns.length===0&&!e.sessionLoading?(g(),ue(Mt,{key:2,class:"empty-panel-btn",label:v(o)("panel.openPanel"),onClick:$e[11]||($e[11]=rt=>e.togglePanel?.())},{default:ae(()=>[W(Ie,{name:"panel-expand-right"})]),_:1},8,["label"])):Y("",!0),e.conversationToc?(g(),ue(EIe,{key:3,items:te.value,"active-turn-id":J.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:ie.value,onSelect:Nn},null,8,["items","active-turn-id","mobile","session-loading","occluded"])):Y("",!0),b("div",u$e,[b("div",{ref:me,class:Pe(["panes chat-scroll",{"is-following":le.value,"history-prepending":Xe.value}]),tabindex:"-1",onScrollPassive:kn,onWheelPassive:Qo,onPointerdownPassive:Po,onTouchstartPassive:pn,onTouchmovePassive:Us},[b("div",{class:Pe(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(g(),S(Ce,{key:0},[$e[64]||($e[64]=b("div",{class:"empty-spacer"},null,-1)),b("div",d$e,[b("span",{class:Pe(["empty-hint-title",{"is-starting":e.starting}])},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(uf,{key:1,size:"md",label:"","aria-hidden":"true"})),b("span",null,E(e.starting?v(o)("conversation.starting"):v(o)("composer.emptyConversationTitle")),1)],2),e.starting?Y("",!0):(g(),S("span",f$e,E(v(o)("composer.emptyConversation")),1)),c.value&&!e.starting?(g(),S("div",p$e,[W(Cn,{text:v(o)("conversation.switchWorkspace")},{default:ae(()=>[b("button",{type:"button",class:"ws-pick-btn",onClick:$e[12]||($e[12]=_t(rt=>l.value=!l.value,["stop"]))},[W(Ie,{name:"folder",size:"sm"}),b("span",h$e,E(a.value),1),W(Ie,{class:Pe(["ws-pick-chev",{open:l.value}]),name:"chevron-down",size:"sm"},null,8,["class"])])]),_:1},8,["text"]),l.value?(g(),S("div",{key:0,class:"ws-pick-backdrop",onClick:$e[13]||($e[13]=rt=>l.value=!1)})):Y("",!0),l.value?(g(),S("div",m$e,[(g(!0),S(Ce,null,at(u.value,rt=>(g(),S("button",{key:rt.id,type:"button",class:Pe(["ws-pick-item",{on:rt.id===e.activeWorkspaceId}]),onClick:_t(mn=>f(rt.id),["stop"])},[b("span",v$e,E(rt.name),1),b("span",y$e,E(rt.shortPath),1)],10,g$e))),128)),d.value>0?(g(),S("button",{key:0,type:"button",class:"ws-pick-item ws-pick-more",onClick:$e[14]||($e[14]=_t(rt=>r.value=!r.value,["stop"]))},[b("span",null,E(v(o)("conversation.moreWorkspaces",{count:d.value})),1)])):Y("",!0),$e[63]||($e[63]=b("div",{class:"ws-pick-divider"},null,-1)),b("button",{type:"button",class:"ws-pick-action",onClick:$e[15]||($e[15]=_t(rt=>{l.value=!1,i("addWorkspace")},["stop"]))},[W(Ie,{name:"plus",size:"sm"}),b("span",null,E(v(o)("conversation.addWorkspace")),1)])])):Y("",!0)])):e.starting?Y("",!0):(g(),S("button",{key:2,type:"button",class:"empty-add-workspace",onClick:$e[16]||($e[16]=rt=>i("addWorkspace"))},[W(Ie,{name:"folder-plus",size:"sm"}),b("span",null,E(v(o)("conversation.addWorkspace")),1)]))]),e.sessionId?Y("",!0):(g(),ue(c$e,{key:0,sessions:e.recentSessions??[],onSelect:$e[17]||($e[17]=rt=>i("selectSession",rt)),onOpenSessionAdmin:$e[18]||($e[18]=rt=>i("openSessionAdmin"))},null,8,["sessions"])),W(Vz,{ref_key:"emptyComposerRef",ref:h,class:"empty-composer","session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:Ge,onSteer:$e[19]||($e[19]=rt=>i("steer",rt)),onCommand:$e[20]||($e[20]=rt=>i("command",rt)),onInterrupt:ms,onUnqueue:$e[21]||($e[21]=rt=>i("unqueue",rt)),onEditQueued:$e[22]||($e[22]=rt=>i("editQueued",rt)),onSetPermission:$e[23]||($e[23]=rt=>i("setPermission",rt)),onSetThinking:$e[24]||($e[24]=rt=>i("setThinking",rt)),onTogglePlan:$e[25]||($e[25]=rt=>i("togglePlan")),onToggleWorkflow:$e[26]||($e[26]=rt=>i("toggleWorkflow")),onToggleGoal:$e[27]||($e[27]=rt=>i("toggleGoal")),onOpenBtw:$e[28]||($e[28]=rt=>i("command","/btw")),onCreateGoal:$e[29]||($e[29]=rt=>i("createGoal",rt)),onControlGoal:$e[30]||($e[30]=rt=>i("controlGoal",rt)),onFocusGoal:_,onCompact:$e[31]||($e[31]=rt=>i("compact")),onPickModel:$e[32]||($e[32]=rt=>i("pickModel")),onSelectModel:$e[33]||($e[33]=rt=>i("selectModel",rt))},null,8,["session-id","running","queued","search-files","upload-image","status","thinking","plan-mode","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills","starting"]),$e[65]||($e[65]=b("div",{class:"empty-spacer"},null,-1))],64)):(g(),ue(c9,{ref_key:"chatPaneRef",ref:p,key:e.fileReloadKey??"no-session",turns:e.turns,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":le.value,"tool-diff-panel":!0,"turn-folding":e.turnFolding??!0,"activity-run-folding":e.activityRunFolding??!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:$e[34]||($e[34]=rt=>i("openFile",rt)),onOpenMedia:$e[35]||($e[35]=rt=>i("openMedia",rt)),onCopyConversationCopied:w,onOpenCompaction:$e[36]||($e[36]=rt=>i("openCompaction",rt)),onOpenAgent:$e[37]||($e[37]=rt=>i("openAgent",rt)),onDetachTask:$e[38]||($e[38]=rt=>i("detachTask",rt)),onOpenToolDiff:$e[39]||($e[39]=rt=>i("openToolDiff",rt)),onOpenTurnDiff:$e[40]||($e[40]=rt=>i("openTurnDiff",rt)),onEditMessage:ot,onLoadOlderMessages:Pn,onUnqueue:$e[41]||($e[41]=rt=>i("unqueue",rt)),onEditQueued:dt,onReorderQueue:Ct,onSteerQueued:$e[42]||($e[42]=rt=>i("steerQueued",rt)),onContinueTurn:$e[43]||($e[43]=rt=>Ge({text:rt,attachments:[]}))},null,8,["turns","approvals","questions","turn-active","working","fast-moon","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","cwd","queued"]))],2)],34),(g(),ue(hl,{defer:"",to:".pfc-host",disabled:!e.panelExpanded||e.activePanelType==="btw"},[e.turns.length===0&&!e.sessionLoading?Y("",!0):(g(),ue(bIe,{key:0,ref:Ae,style:Gt(oe.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":rt=>i("openFile",rt),"reveal-saved-plan":e.revealSavedPlan,"dock-panel":A.value,"bash-tasks":M.value,"subagent-tasks":P.value,"bash-running":B.value,"subagent-running":$.value,"todo-done-count":H.value,"has-dock-work":D.value,todos:e.todos,"pending-question":Ye.value,"question-busy-kind":st.value,"pending-approval":X.value,"approval-busy":se.value,mobile:e.mobile,onToggleDockPanel:$e[44]||($e[44]=rt=>j(rt)),onCloseDockPanel:$e[45]||($e[45]=rt=>q()),onOpenAgent:$e[46]||($e[46]=rt=>i("openAgent",rt)),onAnswer:Ft,onDismiss:$e[47]||($e[47]=rt=>i("dismiss",rt)),onApproval:Ut,onCancelTask:$e[48]||($e[48]=rt=>i("cancelTask",rt)),onControlGoal:$e[49]||($e[49]=rt=>i("controlGoal",rt)),onSubmit:Ge,onSteer:$e[50]||($e[50]=rt=>i("steer",rt)),onCommand:$e[51]||($e[51]=rt=>i("command",rt)),onInterrupt:ms,onSetPermission:$e[52]||($e[52]=rt=>i("setPermission",rt)),onSetThinking:$e[53]||($e[53]=rt=>i("setThinking",rt)),onTogglePlan:$e[54]||($e[54]=rt=>i("togglePlan")),onToggleWorkflow:$e[55]||($e[55]=rt=>i("toggleWorkflow")),onToggleGoal:$e[56]||($e[56]=rt=>i("toggleGoal")),onOpenBtw:$e[57]||($e[57]=rt=>i("command","/btw")),onCreateGoal:$e[58]||($e[58]=rt=>i("createGoal",rt)),onFocusGoal:_,onCompact:$e[59]||($e[59]=rt=>i("compact")),onPickModel:$e[60]||($e[60]=rt=>i("pickModel")),onSelectModel:$e[61]||($e[61]=rt=>i("selectModel",rt))},null,8,["style","session-id","running","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","working","goal-mode","dynamic-workflow-mode","activation-badges","models","starred-ids","skills","goal","session-plans","overlay-open","open-file","reveal-saved-plan","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile"]))],8,["disabled"]))]),W(qi,{name:"pill"},{default:ae(()=>[be.value?(g(),S("button",{key:0,class:"newmsg-pill",style:Gt({bottom:`${ge.value+12}px`}),"aria-label":v(o)("conversation.jumpToLatestAria"),onClick:$e[62]||($e[62]=rt=>Dn(!0))},[W(Ie,{class:"pill-chevron",name:"chevron-down",size:"md"}),Oe(" "+E(v(o)("conversation.newMessages")),1)],12,w$e)):Y("",!0)]),_:1}),W(qi,{name:"abort-toast"},{default:ae(()=>[yo.value?(g(),S("div",k$e,[b("span",b$e,E(v(o)("conversation.manuallyAborted")),1)])):Y("",!0)]),_:1})],6)}}}),M$e=vt(C$e,[["__scopeId","data-v-0a30b1ee"]]),A$e=["role","aria-label"],T$e={key:0,class:"sab-comment"},E$e=["placeholder"],I$e=["disabled"],$$e=Je({__name:"SelectionActionBar",props:{enabled:{type:Boolean},panelSource:{}},emits:["add"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(!1),l=V(!1),r=V(""),a=V(""),c=V(),u=V({}),d=V(null),f=V(null);let p=0;function h(){i.value=!1,l.value=!1,r.value=""}function m($){const T=$.commonAncestorContainer;return T.nodeType===Node.ELEMENT_NODE?T:T.parentElement}function k(){if(p=0,!n.enabled||l.value&&d.value?.contains(document.activeElement))return;const $=window.getSelection();if(!$||$.rangeCount===0||$.isCollapsed){h();return}const T=$.getRangeAt(0),I=m(T),N=I?.closest(".con, .pt-body");if(!I||!N||I.closest('.sab, input, textarea, button, [contenteditable="true"]')){h();return}const C=$.toString().trim(),O=T.getBoundingClientRect();if(!C||O.width===0&&O.height===0){h();return}a.value=C,c.value=N.classList.contains("pt-body")?n.panelSource:void 0;const H=220,D=Math.min(window.innerWidth-H-8,Math.max(8,O.left+O.width/2-H/2)),A=O.bottom+8;u.value={left:`${Math.round(D)}px`,top:`${Math.round(A)}px`,width:`${H}px`},i.value=!0,l.value=!1}function x(){p&&cancelAnimationFrame(p),p=requestAnimationFrame(k)}function y(){window.getSelection()?.removeAllRanges()}function w($){const T=a.value.trim();if(!T)return;const I=$?.trim();o("add",{quote:T,comment:I||void 0,source:c.value}),y(),h()}function _(){l.value=!0,yt(()=>f.value?.focus())}function M($){if(l.value||$.key!=="ArrowDown"&&$.key!=="ArrowUp")return;$.preventDefault();const T=Array.from(d.value?.querySelectorAll(".sab-action")??[]),I=T.indexOf(document.activeElement),N=$.key==="ArrowDown"?(I+1)%T.length:(I-1+T.length)%T.length;T[N]?.focus()}function P($){!i.value||d.value?.contains($.target)||h()}function B($){$.key==="Escape"&&i.value&&($.preventDefault(),$.stopImmediatePropagation(),h())}return In(()=>{document.addEventListener("selectionchange",x),document.addEventListener("pointerdown",P,!0),document.addEventListener("keydown",B,!0)}),En(()=>{p&&cancelAnimationFrame(p),document.removeEventListener("selectionchange",x),document.removeEventListener("pointerdown",P,!0),document.removeEventListener("keydown",B,!0)}),($,T)=>(g(),ue(hl,{to:"body"},[i.value?(g(),S("div",{key:0,ref_key:"barRef",ref:d,class:"sab",style:Gt(u.value),role:l.value?"dialog":"menu","aria-label":l.value?v(s)("selection.comment"):void 0,onPointerdown:T[4]||(T[4]=_t(()=>{},["prevent"])),onKeydown:M},[l.value?(g(),S("div",T$e,[Jn(b("input",{ref_key:"commentInputRef",ref:f,"onUpdate:modelValue":T[0]||(T[0]=I=>r.value=I),placeholder:v(s)("selection.commentPlaceholder"),onKeydown:T[1]||(T[1]=go(_t(I=>w(r.value),["prevent"]),["enter"]))},null,40,E$e),[[js,r.value]]),b("button",{type:"button",disabled:!r.value.trim(),onClick:T[2]||(T[2]=I=>w(r.value))},E(v(s)("selection.confirm")),9,I$e)])):(g(),S(Ce,{key:1},[b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:_},[W(Ie,{name:"message",size:"sm"}),b("span",null,E(v(s)("selection.comment")),1)]),b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:T[3]||(T[3]=I=>w())},[W(Ie,{name:"plus",size:"sm"}),b("span",null,E(v(s)("selection.addToChat")),1)])],64))],44,A$e)):Y("",!0)]))}}),L$e=vt($$e,[["__scopeId","data-v-d37e8069"]]),N$e=["aria-label"],z$e={class:"media-lightbox-card"},B$e=["src","alt"],R$e=["src"],P$e={key:0,class:"media-preview-caption"},F$e=Je({__name:"MediaLightbox",props:{media:{},src:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),i=l4("overlay"),l=l4("close"),r=l4("image"),a=z(()=>n.media.kind==="image"),c=z(()=>n.media.path??(a.value?"Image preview":"Video preview")),u=Uo(1),d=Uo(0),f=Uo(0),p=Uo(!1),h=z(()=>({transform:`translate(${d.value}px, ${f.value}px) scale(${u.value})`,cursor:u.value>1?p.value?"grabbing":"grab":"zoom-in"}));let m=null,k=null,x=0,y=0,w=0,_=0;const{lock:M,unlock:P}=Hz();function B(){u.value=1,d.value=0,f.value=0}function $(H){if(!a.value)return;H.preventDefault();const D=Math.min(8,Math.max(1,u.value*(H.deltaY<0?1.1:.9)));u.value=D,D===1&&(d.value=0,f.value=0)}function T(){if(u.value!==1){B();return}const H=r.value;H&&(u.value=Math.min(8,Math.max(1,H.naturalWidth/H.clientWidth)))}function I(H){u.value<=1||(k=H.pointerId,x=H.clientX,y=H.clientY,w=d.value,_=f.value,p.value=!0,r.value?.setPointerCapture(H.pointerId))}function N(H){k===H.pointerId&&(d.value=w+H.clientX-x,f.value=_+H.clientY-y)}function C(H){k===H.pointerId&&(r.value?.releasePointerCapture(H.pointerId),k=null,p.value=!1)}function O(H){if(H.key==="Escape"){H.preventDefault(),H.stopPropagation(),o("close");return}if(H.key!=="Tab"||!i.value)return;const D=i.value.querySelectorAll(s),A=D[0],R=D[D.length-1];!A||!R||(i.value.contains(document.activeElement)?H.shiftKey&&document.activeElement===A?(H.preventDefault(),R.focus()):!H.shiftKey&&document.activeElement===R&&(H.preventDefault(),A.focus()):(H.preventDefault(),(H.shiftKey?R:A).focus()))}return In(()=>{M(),m=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener("keydown",O),l.value?.focus()}),En(()=>{P(),window.removeEventListener("keydown",O),m?.focus()}),(H,D)=>(g(),ue(hl,{to:"body"},[b("div",{ref:"overlay",class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":c.value,onMousedown:D[1]||(D[1]=_t(A=>o("close"),["self"]))},[b("button",{ref:"close",type:"button",class:"media-lightbox-close","aria-label":"Close",onClick:D[0]||(D[0]=A=>o("close"))},[W(Ie,{name:"close",size:"sm"})],512),b("div",z$e,[b("div",{class:"media-lightbox-frame",onWheel:$},[a.value?(g(),S("img",{key:0,ref:"image",class:"media-lightbox-media",src:e.src,alt:e.media.path??"",draggable:"false",style:Gt(h.value),onDblclick:T,onPointerdown:I,onPointermove:N,onPointerup:C,onPointercancel:C},null,44,B$e)):(g(),S("video",{key:1,class:"media-lightbox-media",src:e.src,controls:"",autoplay:""},null,8,R$e))],32)]),e.media.path?(g(),S("div",P$e,E(e.media.path),1)):Y("",!0)],40,N$e)]))}}),j$e=vt(F$e,[["__scopeId","data-v-a5036dce"]]),O$e={class:"ui-panel-header__main"},H$e={class:"ui-panel-header__title"},D$e={key:0,class:"ui-panel-header__sub"},V$e=Je({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:"Close"},wrap:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(g(),S("div",{class:Pe(["ui-panel-header",{wrap:e.wrap}])},[b("div",O$e,[b("span",H$e,E(e.title),1),W(Cn,{text:e.subtitle},{default:ae(()=>[e.subtitle?(g(),S("span",D$e,E(e.subtitle),1)):Y("",!0)]),_:1},8,["text"]),jn(t.$slots,"default",{},void 0,!0)]),e.closable?(g(),ue(Dt,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel,onClick:n[0]||(n[0]=o=>t.$emit("close"))},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label"])):Y("",!0)],2))}}),Ma=vt(V$e,[["__scopeId","data-v-47211810"]]),W$e={key:0,class:"fp-empty fp-error"},q$e={key:1,class:"fp-empty"},U$e={key:2,class:"fp-loading"},Z$e={class:"fp-path"},K$e={class:"fp-meta"},G$e={key:0,class:"fp-lines"},Y$e={class:"fp-size"},X$e={key:3,class:"fp-search"},J$e=["placeholder"],Q$e={key:0,class:"fp-search-count"},eLe={key:1,class:"fp-code"},tLe={class:"fp-line-table"},nLe=["data-line"],oLe={class:"fp-gutter"},sLe=["innerHTML"],iLe={key:1,class:"fp-body fp-code"},lLe={class:"fp-line-table"},rLe=["data-line"],aLe={class:"fp-gutter"},cLe=["innerHTML"],uLe={key:2,class:"fp-body"},dLe=["srcdoc","title"],fLe={key:1,class:"fp-code"},pLe={class:"fp-line-table"},hLe=["data-line"],mLe={class:"fp-gutter"},gLe=["innerHTML"],vLe={key:3,class:"fp-body fp-pdf-wrap"},yLe=["src","title"],wLe={key:1,class:"fp-binary-card"},kLe={class:"fp-binary-label"},bLe={key:4,class:"fp-body fp-table-wrap"},_Le={class:"fp-table"},xLe=["data-line"],SLe={key:5,class:"fp-body fp-image-wrap"},CLe=["src","alt"],MLe={key:1,class:"fp-binary-card"},ALe={class:"fp-binary-icon"},TLe={class:"fp-binary-label"},ELe={key:6,class:"fp-body fp-image-wrap"},ILe=["src"],$Le={key:1,class:"fp-binary-card"},LLe={class:"fp-binary-icon"},NLe={class:"fp-binary-label"},zLe={key:7,class:"fp-body fp-code"},BLe={class:"fp-line-table"},RLe=["data-line"],PLe={class:"fp-gutter"},FLe=["innerHTML"],jLe={key:8,class:"fp-body fp-binary-wrap"},OLe={class:"fp-binary-card"},HLe={class:"fp-binary-icon"},DLe={class:"fp-binary-label"},VLe=Je({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},editable:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal","openEditor"],setup(e,{emit:t}){const{t:n}=Lt();function o(X,se){const F=se?se.split("/").filter(Boolean):[];for(const Z of X.split("/"))Z===""||Z==="."||(Z===".."?F.pop():F.push(Z));return F.join("/")}const s=fn("resolveImage",async X=>X),i=z(()=>{const X=c.file?.path??"",se=X.lastIndexOf("/");return se>0?X.slice(0,se):""});function l(X){if(/^(https?:|data:|blob:)/i.test(X)||X.startsWith("/"))return X;const se=i.value;return se?o(X,se):X}async function r(X){const se=l(X);return s?s(se):se}qn("resolveImage",r);function a(X){let se=X.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(se)||se.startsWith("/"))return X;for(const Z of["#","?"]){const fe=se.indexOf(Z);fe!==-1&&(se=se.slice(0,fe))}const F=i.value;return{...X,path:o(se,F)}}const c=e,u=z(()=>{const X=c.file;return X!==null&&!X.isBinary}),d=t;function f(X){c.openFile?.(a(X))}const p=V(null),h=z(()=>{const X=c.file;if(!X)return"binary";const se=X.mime??"",F=X.languageId??"",Z=X.path.toLowerCase();return se==="text/markdown"||F==="markdown"||F==="md"||Z.endsWith(".mdx")?"markdown":se==="application/json"||F==="json"?"json":se==="text/html"||F==="html"||Z.endsWith(".html")||Z.endsWith(".htm")?"html":se==="application/pdf"||Z.endsWith(".pdf")?"pdf":se==="text/csv"||F==="csv"||Z.endsWith(".csv")?"csv":se.startsWith("image/")?"image":se.startsWith("video/")?"video":X.isBinary?"binary":se.startsWith("text/")||F!==""?"text":"binary"});function m(X){const se=atob(X),F=Uint8Array.from(se,Z=>Z.charCodeAt(0));return new TextDecoder().decode(F)}const k=z(()=>{const X=c.file;if(!X)return"";if(X.encoding==="base64")try{return m(X.content)}catch{return X.content}return X.content}),x=z(()=>{if(h.value!=="json"||!c.file)return"";try{return JSON.stringify(JSON.parse(k.value),null,2)}catch{return k.value}}),y=z(()=>c.file?(h.value==="json"?x.value:k.value).split(` -`):[]),w=z(()=>c.file?h.value==="json"?x.value:k.value:""),_=V(""),M=V(0),P=z(()=>{const X=_.value.trim().toLowerCase();if(!X)return[];const se=[];return y.value.forEach((F,Z)=>{F.toLowerCase().includes(X)&&se.push(Z+1)}),se});Ze(_,()=>{M.value=0});function B(X,se=!1){X&&yt(()=>{const F=p.value?.querySelector(".fp-body"),Z=F?.querySelector(`[data-line="${X}"]`);if(!F||!Z)return;se&&(F.scrollTop=0);const fe=F.getBoundingClientRect(),ve=Z.getBoundingClientRect(),ge=ve.top-fe.top+F.scrollTop;F.scrollTop=ge-F.clientHeight/2+ve.height/2})}Ze(()=>[c.file?.path,c.line],()=>B(c.line,!0),{immediate:!0});function $(X){const se=P.value;se.length!==0&&(M.value=(M.value+X+se.length)%se.length,B(se[M.value]))}function T(X){const se=P.value;return{target:c.line===X,hit:se.includes(X),active:se[M.value]===X}}function I(X){return X<1024?`${X} B`:X<1024*1024?`${(X/1024).toFixed(1)} KB`:`${(X/(1024*1024)).toFixed(1)} MB`}const N=V(!1),C=V(!1);function O(){c.file&&fs(w.value).then(X=>{X&&(N.value=!0,setTimeout(()=>{N.value=!1},1400))})}function H(){c.file&&fs(c.file.path).then(X=>{X&&(C.value=!0,setTimeout(()=>{C.value=!1},1400))})}const D=V("preview"),A=V("preview"),R=V("fit");function j(X){D.value=X}function q(X){A.value=X}function K(X){R.value=X}Ze(h,X=>{D.value=X==="html"?"preview":"source",A.value="preview",R.value="fit"});const U=z(()=>{const X=c.file;return!X||h.value!=="image"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:X.mime==="image/svg+xml"?`data:${X.mime};charset=utf-8,${encodeURIComponent(X.content)}`:null}),te=z(()=>{const X=c.file;return!X||h.value!=="video"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),J=z(()=>{const X=c.file;return!X||h.value!=="pdf"?null:c.downloadUrl?c.downloadUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),ee=z(()=>c.file?["",'',``,k.value].join(""):"");function ie(X){const se=[];let F="",Z=!1;for(let fe=0;fey.value.slice(0,200).map(ie));function he(X){return X.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function xe(){const X=c.file;if(!X)return"";const se=X.languageId?.toLowerCase();return se||(X.path.split(".").pop()?.toLowerCase()??"")}function Ye(X){const se=xe();let F=he(X);return h.value==="json"||se==="json"||se==="jsonc"?(F=F.replace(/("[^&]*?")(\s*:)/g,'$1$2'),F=F.replace(/(:\s*)("[^&]*?")/g,'$1$2'),F=F.replace(/\b(true|false|null)\b/g,'$1'),F=F.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,'$1$2'),F):h.value==="html"||se==="html"||se==="xml"||se==="svg"?(F=F.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,' $1$2'),F=F.replace(/(".*?")/g,'$1'),F=F.replace(/(<\/?)([A-Za-z][\w:-]*)/g,'$1$2'),F):(F=F.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,'$1'),F=F.replace(/(".*?"|'.*?')/g,'$1'),F=F.replace(/(\/\/.*)$/g,'$1'),F)}function st(X,se=55){return!X||X.length<=se?X:"…"+X.slice(X.length-se+1)}return(X,se)=>(g(),S("div",{ref_key:"rootRef",ref:p,class:"file-preview"},[e.error&&!e.loading?(g(),S("div",W$e,[b("span",null,E(e.error),1),e.closable?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:se[0]||(se[0]=F=>d("close"))},{default:ae(()=>[Oe(E(v(n)("filePreview.close")),1)]),_:1})):Y("",!0)])):!e.file&&!e.loading?(g(),S("div",q$e,E(v(n)("filePreview.empty")),1)):e.loading?(g(),S("div",U$e,[se[8]||(se[8]=b("span",{class:"spinner"},null,-1)),b("span",null,E(v(n)("filePreview.loading")),1)])):e.file?(g(),S(Ce,{key:3},[W(Ma,{wrap:"",title:v(n)("common.preview"),closable:e.closable,"close-label":v(n)("filePreview.close"),onClose:se[7]||(se[7]=F=>d("close"))},{default:ae(()=>[W(Cn,{text:e.file.path},{default:ae(()=>[b("span",Z$e,E(st(e.file.path)),1)]),_:1},8,["text"]),b("span",K$e,[e.file.lineCount?(g(),S("span",G$e,E(v(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):Y("",!0),b("span",Y$e,E(I(e.file.size)),1)]),h.value==="html"?(g(),ue(di,{key:0,"model-value":D.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":j},null,8,["model-value","options"])):Y("",!0),h.value==="markdown"?(g(),ue(di,{key:1,"model-value":A.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":q},null,8,["model-value","options"])):Y("",!0),h.value==="image"?(g(),ue(di,{key:2,"model-value":R.value,size:"sm",options:[{value:"fit",label:v(n)("filePreview.fit")},{value:"actual",label:v(n)("filePreview.actual")}],"onUpdate:modelValue":K},null,8,["model-value","options"])):Y("",!0),h.value==="text"||h.value==="json"||h.value==="html"||h.value==="csv"?(g(),S("div",X$e,[Jn(b("input",{"onUpdate:modelValue":se[1]||(se[1]=F=>_.value=F),class:"fp-search-input",type:"search",placeholder:v(n)("filePreview.search")},null,8,J$e),[[js,_.value]]),_.value.trim()?(g(),S("span",Q$e,E(P.value.length),1)):Y("",!0),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.prevMatch"),onClick:se[2]||(se[2]=F=>$(-1))},{default:ae(()=>[W(Ie,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.nextMatch"),onClick:se[3]||(se[3]=F=>$(1))},{default:ae(()=>[W(Ie,{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):Y("",!0),W(Dt,{size:"sm",class:Pe({copied:C.value}),label:C.value?v(n)("filePreview.copied"):v(n)("filePreview.copyPath"),onClick:H},{default:ae(()=>[C.value?(g(),ue(Ie,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ie,{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.editable&&u.value&&e.file!==null?(g(),ue(Dt,{key:4,size:"sm",label:v(n)("editor.title"),onClick:se[4]||(se[4]=F=>d("openEditor",e.file.path))},{default:ae(()=>[W(Ie,{name:"pencil",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:5,size:"sm",label:v(n)("filePreview.openInEditor"),onClick:se[5]||(se[5]=F=>d("openExternal"))},{default:ae(()=>[W(Ie,{name:"external-link",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:6,size:"sm",label:v(n)("filePreview.reveal"),onClick:se[6]||(se[6]=F=>d("reveal"))},{default:ae(()=>[W(Ie,{name:"folder",size:"md"})]),_:1},8,["label"])):Y("",!0),!e.file.isBinary&&h.value!=="image"?(g(),ue(Dt,{key:7,size:"sm",class:Pe({copied:N.value}),label:N.value?v(n)("filePreview.copied"):v(n)("filePreview.copy"),onClick:O},{default:ae(()=>[N.value?(g(),ue(Ie,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ie,{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):Y("",!0)]),_:1},8,["title","closable","close-label"]),h.value==="markdown"?(g(),S("div",{key:0,class:Pe(["fp-body",{"fp-markdown":A.value==="preview"}])},[A.value==="preview"?(g(),ue(zr,{key:0,text:k.value,"open-file":c.openFile?f:void 0},null,8,["text","open-file"])):(g(),S("div",eLe,[b("div",tLe,[(g(!0),S(Ce,null,at(y.value,(F,Z)=>(g(),S("div",{key:Z,class:Pe(["fp-line-row",T(Z+1)]),"data-line":Z+1},[b("span",oLe,E(Z+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,sLe)],10,nLe))),128))])]))],2)):h.value==="json"?(g(),S("div",iLe,[b("div",lLe,[(g(!0),S(Ce,null,at(y.value,(F,Z)=>(g(),S("div",{key:Z,class:Pe(["fp-line-row",T(Z+1)]),"data-line":Z+1},[b("span",aLe,E(Z+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,cLe)],10,rLe))),128))])])):h.value==="html"?(g(),S("div",uLe,[D.value==="preview"?(g(),S("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:ee.value,title:e.file.path},null,8,dLe)):(g(),S("div",fLe,[b("div",pLe,[(g(!0),S(Ce,null,at(y.value,(F,Z)=>(g(),S("div",{key:Z,class:Pe(["fp-line-row",T(Z+1)]),"data-line":Z+1},[b("span",mLe,E(Z+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,gLe)],10,hLe))),128))])]))])):h.value==="pdf"?(g(),S("div",vLe,[J.value?(g(),S("iframe",{key:0,class:"fp-pdf-frame",src:J.value,title:e.file.path},null,8,yLe)):(g(),S("div",wLe,[b("span",kLe,E(v(n)("filePreview.pdfNoPreview")),1)]))])):h.value==="csv"?(g(),S("div",bLe,[b("table",_Le,[b("tbody",null,[(g(!0),S(Ce,null,at(Q.value,(F,Z)=>(g(),S("tr",{key:Z,class:Pe(T(Z+1)),"data-line":Z+1},[b("th",null,E(Z+1),1),(g(!0),S(Ce,null,at(F,(fe,ve)=>(g(),S("td",{key:ve},E(fe),1))),128))],10,xLe))),128))])])])):h.value==="image"?(g(),S("div",SLe,[U.value?(g(),S("img",{key:0,src:U.value,alt:e.file.path,class:Pe(["fp-image",{actual:R.value==="actual"}])},null,10,CLe)):(g(),S("div",MLe,[b("span",ALe,[W(Ie,{name:"image-off",size:"lg"})]),b("span",TLe,E(v(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:I(e.file.size)})),1)]))])):h.value==="video"?(g(),S("div",ELe,[te.value?(g(),S("video",{key:0,src:te.value,class:"fp-image",controls:"",playsinline:"",preload:"metadata"},null,8,ILe)):(g(),S("div",$Le,[b("span",LLe,[W(Ie,{name:"image-off",size:"lg"})]),b("span",NLe,E(v(n)("filePreview.videoNoPreview",{mime:e.file.mime,size:I(e.file.size)})),1)]))])):h.value==="text"?(g(),S("div",zLe,[b("div",BLe,[(g(!0),S(Ce,null,at(y.value,(F,Z)=>(g(),S("div",{key:Z,class:Pe(["fp-line-row",T(Z+1)]),"data-line":Z+1},[b("span",PLe,E(Z+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,FLe)],10,RLe))),128))])])):(g(),S("div",jLe,[b("div",OLe,[b("span",HLe,[W(Ie,{name:"file-off",size:"lg"})]),b("span",DLe,E(v(n)("filePreview.binaryNoPreview",{mime:e.file.mime||v(n)("filePreview.unknownType"),size:I(e.file.size)})),1)])]))],64)):Y("",!0)],512))}}),WLe=vt(VLe,[["__scopeId","data-v-97c52e24"]]),qLe={class:"ui-banner__icon","aria-hidden":"true"},ULe={class:"ui-banner__text"},ZLe=Je({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(g(),S("div",{class:Pe(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[b("span",qLe,[jn(t.$slots,"icon",{},()=>[e.variant==="info"?(g(),ue(Ie,{key:0,name:"info",size:"md"})):(g(),ue(Ie,{key:1,name:"alert-triangle",size:"md"}))],!0)]),b("span",ULe,[jn(t.$slots,"default",{},void 0,!0)])],2))}}),U9=vt(ZLe,[["__scopeId","data-v-566a0ac8"]]),z4=Mo.global.t,KLe=40928,GLe=10485760,gn=ds({open:!1,path:null,loading:!1,saving:!1,loadError:null,savingError:null,conflict:!1,dirty:!1,savedAt:null,languageId:void 0});let l1=null,da=0,lp=null;const Zz={getContent:null};function hM(e){Zz.getContent=e}function YLe(){return gn}function XLe(){da+=1,gn.path=null,gn.loading=!1,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,l1=null,lp=null}async function Kz(e){const t=nNe();if(!t){da+=1,gn.open=!0,gn.path=e.path,gn.loading=!1,gn.loadError=z4("editor.readOnlyWhileMissingSession"),gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,gn.saving=!1,l1=null,lp=null;return}const n=++da;gn.open=!0,gn.path=e.path,gn.loading=!0,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,l1=null,lp=t;try{const o=await St().readFile(t,{path:e.path,length:GLe,encoding:"utf-8"});if(n!==da)return;if(o.isBinary||o.encoding!=="utf-8"){gn.loadError=z4("editor.binaryNotEditable");return}l1=o.etag,gn.languageId=o.languageId,B4=o.content,J7=e.line,Gz+=1}catch(o){if(n!==da)return;l1=null,gn.loadError=o instanceof Error&&o.message.length>0?o.message:z4("editor.loadFailed")}finally{n===da&&(gn.loading=!1)}}let B4,J7,Gz=0;function JLe(){if(B4===void 0)return null;const e={content:B4,line:J7,revision:Gz};return B4=void 0,J7=void 0,e}function QLe(){gn.dirty||(gn.dirty=!0,gn.savedAt=null),gn.savingError!==null&&(gn.savingError=null)}function Q7(){XLe(),gn.open=!1}async function eNe(){gn.path!==null&&await Kz({path:gn.path})}async function eg(e){const t=lp,n=gn.path;if(!t||!n||gn.saving||gn.loading||gn.conflict)return;const o=Zz.getContent;if(!o)return;const s=++da;gn.saving=!0,gn.savingError=null;try{const i=await St().writeFile(t,{path:n,content:o(),...e?.force===!0||l1===null?{}:{baseEtag:l1}});if(s!==da)return;l1=i.etag,gn.dirty=!1,gn.conflict=!1,gn.savedAt=Date.now()}catch(i){if(s!==da)return;if(ol(i)&&i.code===KLe){gn.conflict=!0;return}gn.savingError=i instanceof Error&&i.message.length>0?i.message:z4("editor.loadFailed")}finally{gn.saving=!1}}async function tNe(){gn.conflict=!1,await eg({force:!0})}function nNe(){return Yz?.()??null}let Yz=null;function oNe(e){Yz=e}const Z9="pythinker-light",K9="pythinker-dark";function sNe(e,t){const n=e.trim();if(/^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n))return n;if(/^#[0-9a-f]{3,4}$/i.test(n))return`#${Array.from(n.slice(1),a=>a+a).join("")}`;const o=/^rgba?\(([^)]*)\)$/i.exec(n);if(o===null)return t;const s=o[1].split(/[\s,/]+/).filter(a=>a.length>0);if(s.length<3||s.length>4)return t;const i=s.slice(0,3).map(a=>mM(a,255)),l=s.length===4?mM(s[3],1):255;return i.some(a=>a===null)||l===null?t:`#${[...i,l===255?null:l].filter(a=>a!==null).map(a=>a.toString(16).padStart(2,"0")).join("")}`}function mM(e,t){const n=e.endsWith("%"),o=Number(n?e.slice(0,-1):e);if(!Number.isFinite(o))return null;const s=n?o/100:o/t;return Math.max(0,Math.min(255,Math.round(s*255)))}function Ql(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return sNe(n.length>0?n:t,t)}function iNe(){return{bg:Ql("--p-bg","#ffffff"),surface:Ql("--color-surface","#fafbfc"),text:Ql("--color-text","#14171c"),textMuted:Ql("--color-text-muted","#6b7280"),line:Ql("--color-line","#e7eaee"),accent:Ql("--color-accent","#1783ff"),accentSoft:Ql("--p-accent-soft","#1783ff24"),selection:Ql("--p-selection","#1783ff2e"),danger:Ql("--color-danger","#c0392b"),warning:Ql("--color-warning","#a9610a"),success:Ql("--color-success","#0e7a38")}}function Fd(e){return e.slice(1,7)}function lNe(e,t){const n=iNe();e.editor.defineTheme(t?K9:Z9,{base:t?"vs-dark":"vs",inherit:!0,rules:[{token:"comment",foreground:Fd(n.textMuted),fontStyle:"italic"},{token:"string",foreground:Fd(n.success)},{token:"keyword",foreground:Fd(n.accent)},{token:"number",foreground:Fd(n.warning)},{token:"type",foreground:Fd(n.accent)}],colors:{"editor.background":n.bg,"editor.foreground":n.text,"editorLineNumber.foreground":n.textMuted,"editorLineNumber.activeForeground":n.text,"editor.selectionBackground":n.selection,"editor.lineHighlightBackground":n.surface,"editorCursor.foreground":n.accent,"editorIndentGuide.background1":n.line,"editorIndentGuide.activeBackground1":n.textMuted,"editorWidget.background":n.surface,"editorWidget.border":n.line,"editorError.foreground":n.danger,"editorWarning.foreground":n.warning,"scrollbarSlider.background":n.accentSoft,"scrollbarSlider.hoverBackground":n.accentSoft,"scrollbarSlider.activeBackground":n.accent}})}function gM(e,t){lNe(e,t),e.editor.setTheme(t?K9:Z9)}const R4=Tp();let vM=null;function rNe(){return vM??=Cs(()=>import("./editor.main-BVyazG_A.js").then(e=>e.b),__vite__mapDeps([10,5,11])).then(e=>{gM(e,R4.value),Ze(R4,()=>gM(e,R4.value))}),vM}function aNe(){return R4.value?K9:Z9}function cNe(){return rNe()}const uNe={class:"monaco-pane"},dNe={key:0,class:"monaco-pane__boot"},fNe=Je({__name:"MonacoPane",props:{path:{},languageId:{}},setup(e){const t=V(null),n=V(!0);let o=null,s=null,i=null,l=null;function r(){window.MonacoEnvironment===void 0&&Cs(()=>import("./editor.worker-CNGv4jKH.js"),[]).then(d=>{window.MonacoEnvironment={getWorker:()=>new d.default}})}function a(d){if(d!==void 0&&new Set(["typescript","javascript","json","css","html","markdown","python","rust","go","yaml"]).has(d))return d;if(d==="typescriptreact"||d==="javascriptreact")return d.replace("react","");if(d==="shellscript")return"shell"}async function c(){if(o===null||s===null)return;const d=JLe(),f=u.path;if(f===null)return;const p=o.Uri.parse(`pythinker://session/${encodeURIComponent(f)}`),h=o.editor.getModel(p);if(l?.dispose(),l=null,i!==null&&i!==h&&i.dispose(),h===null)i=o.editor.createModel(d?.content??"",a(u.languageId),p);else{i=h,d!==null&&i.setValue(d.content);const m=a(u.languageId);m!==void 0&&o.editor.setModelLanguage(i,m)}l=i.onDidChangeContent(()=>QLe()),s.setModel(i),hM(()=>i?.getValue()??""),d?.line!==void 0&&d.line>0&&(s.revealLineInCenter(d.line),s.setPosition({lineNumber:d.line,column:1}))}In(async()=>{r(),await cNe(),t.value!==null&&(o=await Cs(()=>import("./editor.main-BVyazG_A.js").then(d=>d.b),__vite__mapDeps([10,5,11])),t.value!==null&&(s=o.editor.create(t.value,{model:null,theme:aNe(),automaticLayout:!0,fontSize:12.5,fontFamily:'"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace',minimap:{enabled:!1},scrollBeyondLastLine:!1,renderLineHighlight:"line",padding:{top:8}}),n.value=!1,await c()))}),En(()=>{hM(null),l?.dispose(),i?.dispose(),s?.dispose(),i=null,l=null,s=null,o=null});const u=e;return Ze(()=>[u.path,u.languageId],async()=>{s!==null&&await c()}),(d,f)=>(g(),S("div",uNe,[n.value?(g(),S("div",dNe,[W(Zo,{size:"sm"})])):Y("",!0),b("div",{ref_key:"rootRef",ref:t,class:"monaco-pane__host"},null,512)]))}}),pNe=vt(fNe,[["__scopeId","data-v-cb5f64f3"]]),hNe={class:"editor-panel"},mNe={class:"ed-path"},gNe={key:1,class:"ed-saved"},vNe={key:1,class:"ed-saving"},yNe={key:0,class:"editor-panel__empty"},wNe={class:"editor-panel__conflict-actions"},kNe={key:1,class:"editor-panel__save-error"},bNe=Je({__name:"EditorPanel",emits:["close"],setup(e,{emit:t}){const{t:n}=Lt(),o=YLe(),s=t;function i(){Q7(),s("close")}function l(c){const u=c.split("/").at(-1)??c;return u.length>0?u:c}const r=z(()=>o.savedAt===null||o.dirty?!1:Date.now()-o.savedAt<2e3);function a(c){(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()==="s"&&(c.preventDefault(),eg())}return window.addEventListener("keydown",a),En(()=>window.removeEventListener("keydown",a)),Ze(()=>o.open,c=>{c||s("close")}),(c,u)=>(g(),S("div",hNe,[W(Ma,{wrap:"",title:v(n)("editor.title"),closable:"","close-label":v(n)("editor.closeEditor"),onClose:i},{default:ae(()=>[v(o).path!==null?(g(),S(Ce,{key:0},[W(Cn,{text:v(o).path},{default:ae(()=>[b("span",mNe,E(l(v(o).path)),1)]),_:1},8,["text"]),v(o).dirty?(g(),ue(Cn,{key:0,text:v(n)("editor.unsavedDot")},{default:ae(()=>[...u[3]||(u[3]=[b("span",{class:"ed-dirty"},null,-1)])]),_:1},8,["text"])):Y("",!0),r.value?(g(),S("span",gNe,E(v(n)("editor.saved")),1)):Y("",!0)],64)):Y("",!0),v(o).path!==null&&v(o).loadError===null?(g(),S(Ce,{key:1},[v(o).conflict?Y("",!0):(g(),ue(Dt,{key:0,size:"sm",label:v(n)("editor.save"),disabled:!v(o).dirty||v(o).saving,onClick:u[0]||(u[0]=d=>v(eg)())},{default:ae(()=>[W(Ie,{name:"check",size:"sm"})]),_:1},8,["label","disabled"])),v(o).saving?(g(),S("span",vNe,[W(Zo,{size:"sm"})])):Y("",!0)],64)):Y("",!0)]),_:1},8,["title","close-label"]),v(o).loadError!==null?(g(),S("div",yNe,[W(Pg,null,{default:ae(()=>[b("span",null,E(v(o).loadError),1),W(Nt,{variant:"secondary",size:"sm",onClick:i},{default:ae(()=>[Oe(E(v(n)("filePreview.close")),1)]),_:1})]),_:1})])):(g(),S(Ce,{key:1},[v(o).conflict?(g(),ue(U9,{key:0,variant:"warning",class:"editor-panel__conflict"},{default:ae(()=>[b("span",null,E(v(n)("editor.conflictText")),1),b("span",wNe,[W(Nt,{variant:"secondary",size:"sm",onClick:u[1]||(u[1]=d=>v(eNe)())},{default:ae(()=>[Oe(E(v(n)("editor.conflictReload")),1)]),_:1}),W(Nt,{variant:"danger",size:"sm",disabled:v(o).saving,onClick:u[2]||(u[2]=d=>v(tNe)())},{default:ae(()=>[Oe(E(v(n)("editor.conflictOverwrite")),1)]),_:1},8,["disabled"])])]),_:1})):Y("",!0),v(o).savingError!==null?(g(),S("p",kNe,E(v(o).savingError),1)):Y("",!0),v(o).path!==null?(g(),ue(pNe,{key:2,path:v(o).path,"language-id":v(o).languageId},null,8,["path","language-id"])):Y("",!0)],64))]))}}),_Ne=vt(bNe,[["__scopeId","data-v-579cb4a1"]]),xNe={class:"tp"},SNe=Je({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(null);return Ze(()=>n.text,()=>{const l=i.value;!l||!(l.scrollHeight-l.scrollTop-l.clientHeight<24)||yt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(l,r)=>(g(),S("div",xNe,[W(Ma,{title:v(s)("common.preview"),subtitle:e.subtitle??v(s)("thinking.panelTitle"),"close-label":v(s)("thinking.close"),onClose:r[0]||(r[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),b("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},E(e.text),513)]))}}),CNe=vt(SNe,[["__scopeId","data-v-e1ad626c"]]),MNe={class:"agent-panel"},ANe={key:0,class:"agent-meta"},TNe={class:"agent-meta-text"},ENe={key:1,class:"agent-prompt"},INe={class:"agent-prompt-bubble"},$Ne=["aria-expanded"],LNe={class:"agent-transcript-inner"},NNe={key:0,class:"agent-fallback"},zNe={key:0,class:"agent-error"},BNe={key:1,class:"fallback-lines"},RNe=Je({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=i6(),l=z(()=>i.value?"lg":"sm"),r=V(null),a=V(null),c=V(!0),u=V(!1);let d=null,f=0;const p=z(()=>{const A=new Set,R=[],j=n.member.prompt?.trim(),q=j?`$ ${j}`:void 0;for(const K of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` -`),n.member.summary]){const U=K?.trim();!U||A.has(U)||U===q||(A.add(U),R.push(U))}return R}),h=z(()=>p.value.filter(A=>A!==n.member.prompt?.trim()).join(` -`)),m=fn("modelDisplay"),k=fn("subagentEffort"),x=z(()=>[n.member.subagentType,m?.(n.member.model),k?.(n.member.thinkingEffort)].filter(Boolean).join(" · ")||void 0),y=z(()=>n.member.prompt?.trim()??""),w=z(()=>y.value.startsWith("/")&&!y.value.includes(` -`)),_=z(()=>n.turns.length===0&&!n.loading&&(n.loadError||p.value.length>0)),M=V(null),P=V(!0),B=V(!1);function $(){const A=M.value;if(!A){B.value=!1;return}B.value=A.scrollHeight>A.clientHeight+1}function T(){P.value=!P.value,yt($)}Ze(()=>[n.member.id,y.value],()=>{P.value=!0,yt($)},{immediate:!0});function I(){const A=r.value;A&&(c.value=A.scrollHeight-A.scrollTop-A.clientHeight<24)}function N(){yt(()=>{const A=r.value;A&&(A.scrollTop=A.scrollHeight)})}function C(){c.value=!0,N()}qn("pinScroll",A=>{const R=r.value;if(!R)return;const j=A.getBoundingClientRect().top;requestAnimationFrame(()=>{R.scrollTop+=A.getBoundingClientRect().top-j})}),Ze(()=>{const A=n.turns.at(-1);return`${n.member.id}:${n.turns.length}:${A?.text.length??0}:${A?.tools?.length??0}`},()=>{c.value&&N()},{immediate:!0});function O(A){const R=A[0].toUpperCase()+A.slice(1);return s(`tools.dynamic_workflow.phase${R}`)}function H(){d!==null&&clearTimeout(d),u.value=!0,d=setTimeout(()=>{d=null,u.value=!1},1400)}async function D(){if(!_.value&&n.turns.length>0){a.value?.copyConversation();return}const A=[n.member.prompt?.trim(),h.value].filter(Boolean).join(` - -`);if(!A)return;const R=++f;!await fs(A)||R!==f||H()}return Ze(()=>n.member.id,()=>{f+=1,d!==null&&clearTimeout(d),d=null,u.value=!1}),En(()=>{d!==null&&clearTimeout(d)}),(A,R)=>(g(),S("div",MNe,[W(Ma,{title:e.member.name,"close-label":v(s)("thinking.close"),onClose:R[0]||(R[0]=j=>o("close"))},{default:ae(()=>[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[Oe(E(O(e.member.phase)),1)]),_:1}),e.member.prompt||h.value||e.turns.length>0?(g(),ue(Dt,{key:0,size:l.value,label:v(s)("tasks.copy"),onClick:D},{default:ae(()=>[W(Ie,{name:u.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","label"])):Y("",!0)]),_:1},8,["title","close-label"]),x.value?(g(),S("div",ANe,[b("span",TNe,E(x.value),1)])):Y("",!0),y.value?(g(),S("div",ENe,[b("div",INe,[b("div",{class:Pe(["agent-prompt-wrap",{"is-clamped":P.value}])},[b("div",{ref_key:"promptTextEl",ref:M,class:Pe(["agent-prompt-text",{"is-command":w.value}])},[w.value?(g(),S(Ce,{key:0},[Oe(E(y.value),1)],64)):(g(),ue(zr,{key:1,text:y.value,"open-file":j=>o("openFile",j)},null,8,["text","open-file"]))],2),B.value||!P.value?(g(),S("button",{key:0,type:"button",class:"agent-prompt-toggle","aria-expanded":!P.value,onClick:T},[b("span",null,E(P.value?v(s)("tasks.expand"):v(s)("tasks.collapse")),1),W(Ie,{class:Pe(["agent-prompt-toggle-car",{open:!P.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])],8,$Ne)):Y("",!0)],2)])])):Y("",!0),b("div",{ref_key:"bodyEl",ref:r,class:"agent-transcript",onScrollPassive:I},[b("div",LNe,[_.value?(g(),S("div",NNe,[e.loadError?(g(),S("div",zNe,E(v(s)("tasks.transcriptLoadError")),1)):Y("",!0),p.value.length>0?(g(),S("pre",BNe,E(p.value.join(` -`)),1)):Y("",!0)])):(g(),ue(c9,{key:1,ref_key:"chatPaneRef",ref:a,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":c.value,"read-only":"",inspector:"",onLoadOlderMessages:R[1]||(R[1]=j=>o("loadOlderMessages")),onOpenAgent:R[2]||(R[2]=j=>o("openAgent",j)),onOpenFile:R[3]||(R[3]=j=>o("openFile",j)),onOpenMedia:R[4]||(R[4]=j=>o("openMedia",j)),onOpenTurnDiff:R[5]||(R[5]=j=>o("openTurnDiff",j)),onCopyConversationCopied:H},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))]),W(qi,{name:"agent-jump"},{default:ae(()=>[c.value?Y("",!0):(g(),S("button",{key:0,type:"button",class:"agent-jump-btn",onClick:C},[W(Ie,{class:"agent-jump-car",name:"arrow-down",size:"sm","aria-hidden":"true"}),b("span",null,E(v(s)("conversation.backToBottom")),1)]))]),_:1})],544)]))}}),PNe=vt(RNe,[["__scopeId","data-v-9ea90d44"]]),FNe={class:"tdp"},jNe={class:"tdp-body"},ONe={key:1,class:"tdp-output"},HNe={key:2,class:"tdp-empty"},DNe=Je({__name:"ToolDiffPanel",props:{target:{}},emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=Lt();return(s,i)=>(g(),S("div",FNe,[W(Ma,{title:e.target.title,subtitle:e.target.path,"close-label":v(o)("thinking.close"),onClose:i[0]||(i[0]=l=>n("close"))},null,8,["title","subtitle","close-label"]),b("div",jNe,[e.target.lines&&e.target.lines.length>0?(g(),ue(oE,{key:0,lines:e.target.lines},null,8,["lines"])):e.target.output&&e.target.output.length>0?(g(),S("div",ONe,[(g(!0),S(Ce,null,at(e.target.output,(l,r)=>(g(),S("div",{key:r},E(l),1))),128))])):(g(),S("div",HNe,E(v(o)("diff.noDiff")),1))])]))}}),VNe=vt(DNe,[["__scopeId","data-v-8b9af3ab"]]),WNe={class:"hl-body"},qNe={key:0,class:"hl-gutter"},UNe={class:"hl-sign"},ZNe={class:"hl-text"},KNe=["data-line"],GNe={key:0,class:"hl-gutter"},YNe={class:"hl-text"},XNe=200,JNe=Je({__name:"HighlightedCode",props:{code:{},lines:{},path:{},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{},responsiveWrap:{type:Boolean,default:!1}},setup(e){const t={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},n={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function o(D){const A=D?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!A)return;const R=n[A];if(R)return R;const j=A.lastIndexOf(".");if(!(j<=0))return t[A.slice(j+1)]}function s(D){return D.split(/\r?\n/)}function i(D){const A={};D.color&&(A.color=D.color);const R=D.fontStyle??0;return R&1&&(A.fontStyle="italic"),R&2&&(A.fontWeight="var(--weight-semibold)"),R&4&&(A.textDecoration="underline"),A}const l=e,r=Tp(),a=z(()=>l.lines!==void 0),c=z(()=>(l.lines??[]).some(D=>D.oldNo!==void 0)),u=z(()=>(l.lines??[]).some(D=>D.newNo!==void 0)),d=z(()=>l.lineNumbers===!0&&a.value),f=z(()=>Array.isArray(l.lineNumbers)?l.lineNumbers:null),p=z(()=>d.value?Number(c.value)+Number(u.value):f.value===null?0:1),h=z(()=>Array.isArray(l.code)?l.code:s(l.code??"")),m=z(()=>{const D=l.lines;return D?l.fullTexts?l.fullTexts:{before:D.filter(A=>A.oldNo!==void 0).map(A=>A.text).join(` -`),after:D.filter(A=>A.newNo!==void 0).map(A=>A.text).join(` -`)}:null}),k=V(null),x=V(null),y=V(null);function w(){k.value=null,x.value=null,y.value=null}let _=0,M=0,P=null,B=null;async function $(){const D=++_;M=Date.now();const A=o(l.path);if(!A){D===_&&w();return}try{B??=Cs(()=>import("./index-CfszvQ96.js").then(K=>K.i),[]).then(K=>K.codeToTokens);const R=await B,j=r.value?"github-dark":"github-light",q=m.value;if(q){const[K,U]=await Promise.all([q.before?R(q.before,{lang:A,theme:j}):null,q.after?R(q.after,{lang:A,theme:j}):null]);if(D!==_)return;x.value=K?.tokens??null,y.value=U?.tokens??null}else{const K=h.value.length>0?await R(h.value.join(` -`),{lang:A,theme:j}):null;if(D!==_)return;k.value=K?.tokens??null}}catch{D===_&&w()}}function T(){if(P!==null)return;const D=Math.max(0,XNe-(Date.now()-M));P=setTimeout(()=>{P=null,$()},D)}Ze([()=>h.value.join(` -`),()=>m.value?.before??null,()=>m.value?.after??null],T),Ze([()=>l.path,r,()=>l.fullTexts],()=>{_++,w(),T()}),In(()=>void $()),vo(()=>{_++,P!==null&&clearTimeout(P)});const I=z(()=>{const D=new Map;let A=0;for(const R of l.lines??[])R.oldNo!==void 0&&D.set(R.oldNo,A++);return D}),N=z(()=>{const D=new Map;let A=0;for(const R of l.lines??[])R.newNo!==void 0&&D.set(R.newNo,A++);return D});function C(D){if(D.type==="del"){if(D.oldNo===void 0)return null;const R=l.fullTexts?D.oldNo-1:I.value.get(D.oldNo);return R===void 0?null:x.value?.[R]??null}if(D.newNo===void 0)return null;const A=l.fullTexts?D.newNo-1:N.value.get(D.newNo);return A===void 0?null:y.value?.[A]??null}function O(D){return D.type==="add"?"+":D.type==="del"?"-":" "}const H=z(()=>{let D=0;if(f.value)for(const A of f.value)A>D&&(D=A);else for(const A of l.lines??[])A.oldNo!==void 0&&A.oldNo>D&&(D=A.oldNo),A.newNo!==void 0&&A.newNo>D&&(D=A.newNo);return Math.max(4,String(D).length)});return(D,A)=>(g(),S("div",{class:Pe(["hl-code",{gutter:d.value,"plain-pad":!a.value&&f.value===null,framed:e.framed,"responsive-wrap":e.responsiveWrap,"one-gutter":p.value===1,"two-gutters":p.value===2}]),style:Gt({"--gutter-ch":`${H.value}ch`})},[b("div",WNe,[a.value?(g(!0),S(Ce,{key:0},at(e.lines,(R,j)=>(g(),S("div",{key:j,class:Pe(["hl-row",`row-${R.type}`])},[d.value?(g(),S(Ce,{key:0},[c.value?(g(),S("span",qNe,E(R.oldNo??""),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Pe(["hl-gutter new",{offset:c.value}])},E(R.newNo??""),3)):Y("",!0)],64)):Y("",!0),b("span",UNe,E(O(R)),1),b("span",ZNe,[C(R)?(g(!0),S(Ce,{key:0},at(C(R),(q,K)=>(g(),S("span",{key:K,style:Gt(i(q))},E(q.content),5))),128)):(g(),S(Ce,{key:1},[Oe(E(R.text),1)],64))])],2))),128)):(g(!0),S(Ce,{key:1},at(h.value,(R,j)=>(g(),S("div",{key:j,class:Pe(["hl-row",e.lineClass?e.lineClass(f.value?.[j]??-1):void 0]),"data-line":f.value?f.value[j]:void 0},[f.value?(g(),S("span",GNe,E(f.value[j]??""),1)):Y("",!0),b("span",YNe,[k.value&&k.value[j]?(g(!0),S(Ce,{key:0},at(k.value[j],(q,K)=>(g(),S("span",{key:K,style:Gt(i(q))},E(q.content),5))),128)):(g(),S(Ce,{key:1},[Oe(E(R),1)],64))])],10,KNe))),128))])],6))}}),Xz=vt(JNe,[["__scopeId","data-v-4b6e3ce1"]]),QNe={class:"turn-diff-panel"},eze={class:"tdp-body"},tze={class:"tdp-file-head"},nze={class:"tdp-path"},oze={key:0,class:"tdp-diff"},sze={key:1,class:"tdp-unavailable"},ize=Je({__name:"TurnDiffPanel",props:{changes:{},cwd:{}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt();function i(a,c){if(!c)return null;const u=y=>y.replaceAll("\\","/"),d=u(a);let f=u(c);f.length>1&&(f=f.replace(/\/+$/,""));const p=/^[a-z]:\//i.test(f)||/^[a-z]:\//i.test(d)||f.startsWith("//")||d.startsWith("//"),h=p?f.toLowerCase():f,m=p?d.toLowerCase():d,k=h.endsWith("/")?h:`${h}/`;if(m!==h&&!m.startsWith(k))return null;const x=m===h?"":d.slice(k.length);return x.split("/").includes("..")?null:x||null}function l(a,c=48){return!a||a.length<=c?a:"…"+a.slice(a.length-c+1)}function r(a){return i(a.path,n.cwd)??a.path}return(a,c)=>(g(),S("div",QNe,[W(Ma,{title:v(s)("conversation.turnFiles.diffTitle"),onClose:c[0]||(c[0]=u=>o("close"))},null,8,["title"]),b("div",eze,[(g(!0),S(Ce,null,at(e.changes,u=>(g(),S("section",{key:u.path,class:"tdp-file"},[b("div",tze,[W(Cn,{text:u.path},{default:ae(()=>[b("span",nze,E(l(r(u))),1)]),_:2},1032,["text"]),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[Oe(E(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]),u.diff?(g(),S("div",oze,[W(Xz,{lines:u.diff,path:u.path,framed:!1},null,8,["lines","path"])])):(g(),S("div",sze,[b("p",null,E(v(s)("conversation.turnFiles.diffUnavailable")),1),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[Oe(E(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]))]))),128))])]))}}),lze=vt(ize,[["__scopeId","data-v-67a3cc7e"]]),rze=["aria-label"],aze=Je({__name:"ThinkingIndicator",props:{size:{default:"md"},fast:{type:Boolean},label:{default:"Waiting for response…"}},setup(e){const t=ua.length*R0;function n(o){return{"--thinking-frame-delay":`${o*R0-t}ms`,"--thinking-frame-fast-delay":`${o*(R0/2)-t/2}ms`}}return(o,s)=>(g(),S("span",{class:Pe(["ui-thinking-indicator",[`ui-thinking-indicator--${e.size}`,{"ui-thinking-indicator--fast":e.fast}]]),"aria-label":e.label,role:"status"},[(g(!0),S(Ce,null,at(v(ua),(i,l)=>(g(),S("span",{key:i,class:"ui-thinking-indicator__frame",style:Gt(n(l)),"aria-hidden":"true"},E(i),5))),128))],10,rze))}}),cze=vt(aze,[["__scopeId","data-v-ed8aef9e"]]),uze={class:"sc"},dze={key:0,class:"sc-empty"},fze={key:2,class:"sc-loading","aria-hidden":"true"},pze={class:"sc-composer"},hze=["placeholder"],mze=["disabled"],gze=Je({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=Lt(),l=z(()=>o.turns.find(_=>_.role==="user")?.text?.trim()??""),r=z(()=>o.title?.trim()||i("sideChat.title")),a=z(()=>o.subtitle?.trim()?o.subtitle.trim():l.value||i("sideChat.subtitle")),c=V(""),u=V(null),d=V(null);function f(){const w=c.value.trim();w&&(s("send",w),c.value="",yt(()=>{u.value&&(u.value.style.height="auto"),p()}))}function p(){const w=d.value;w&&(w.scrollTop=w.scrollHeight)}const h=z(()=>{const w=o.turns;if(w.length===0)return"0";const _=w.at(-1),M=_.thinking?.length??0,P=_.tools?.reduce((B,$)=>B+$.name.length+($.arg?.length??0)+($.output?.join("").length??0),0)??0;return`${w.length}:${_.text.length}:${M}:${P}`});Ze(h,async()=>{!o.running&&!o.sending||(await yt(),p())});const m=z(()=>o.sending?o.turns.at(-1)?.role==="user":!1);function k(w){w.key==="Enter"&&!w.shiftKey&&!w.isComposing&&(w.preventDefault(),f())}function x(){const w=u.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}function y(){u.value?.focus()}return t({focusInput:y}),(w,_)=>(g(),S("div",uze,[W(Ma,{title:r.value,subtitle:a.value,"close-label":v(i)("thinking.close"),onClose:_[0]||(_[0]=M=>s("close"))},null,8,["title","subtitle","close-label"]),b("div",{ref_key:"bodyRef",ref:d,class:"sc-body"},[e.turns.length===0?(g(),S("div",dze,E(v(i)("sideChat.empty")),1)):(g(),ue(c9,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running},null,8,["turns","turn-active","working"])),m.value?(g(),S("div",fze,[W(cze)])):Y("",!0)],512),b("div",pze,[Jn(b("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":_[1]||(_[1]=M=>c.value=M),class:"sc-input",rows:"1",placeholder:v(i)("sideChat.placeholder"),onInput:x,onKeydown:k},null,40,hze),[[js,c.value]]),W(Cn,{text:v(i)("sideChat.send")},{default:ae(()=>[b("button",{type:"button",class:"sc-send",disabled:!c.value.trim(),onClick:f},[W(Ie,{name:"arrow-right",size:"sm"})],8,mze)]),_:1},8,["text"])])]))}}),vze=vt(gze,[["__scopeId","data-v-130e8cd2"]]),yze={class:"changes-pane"},wze={class:"dv-path"},kze={class:"diff-head"},bze={class:"back-label"},_ze={key:"loading",class:"empty-state diff-loading"},xze={key:"empty",class:"empty-state"},Sze={class:"dv-change-count"},Cze={class:"ch-head"},Mze={class:"br-label"},Aze={class:"br-name"},Tze={key:0,class:"sync-info"},Eze={key:0,class:"ahead"},Ize={key:0,class:"behind"},$ze={key:1,class:"empty-head"},Lze={key:0,class:"ch-list"},Nze=["onClick"],zze={class:"fpath"},Bze={key:1,class:"ch-list ch-tree"},Rze={class:"tree-list"},Pze=["onClick"],Fze={class:"tree-name"},jze=["onClick"],Oze={class:"tree-name"},Hze={key:2,class:"empty-state"},Dze={key:3,class:"empty-state"},Vze=Je({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{default:null},emptyFile:{type:Boolean,default:!1},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t;function i(C){const O=C.toLowerCase();return O==="modified"?"modified":O==="added"?"added":O==="deleted"?"deleted":O==="renamed"?"renamed":O==="untracked"?"untracked":O==="conflicted"?"conflicted":O==="ignored"?"ignored":O==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function r(C){return l[i(C)]??"?"}function a(C,O=60){return C.length<=O?C:"…"+C.slice(C.length-O+1)}const c=z(()=>o.gitInfo!==null),u=z(()=>o.changes.length>0),d=z(()=>(o.selectedDiffPath??null)!==null),f=z(()=>o.mode==="detail"||o.mode==="full"&&d.value),p=z(()=>o.fileDiff??[]),h=z(()=>o.fileDiffLoading===!0),m=V(null);Ze([()=>o.selectedDiffPath,h],([,C])=>{!C&&m.value&&(m.value.scrollLeft=0)},{flush:"post"});function k(C){s("open",C)}function x(){s("back")}function y(){s("close")}const w=V("list");function _(C){w.value=C}function M(C){const O={children:[]},H=[...C].sort((D,A)=>D.path.localeCompare(A.path));for(const D of H){const A=D.path.split("/");let R=O;for(let j=0;jJ.name===q&&J.kind===(K?"file":"folder"));te||(te={name:q,path:U,kind:K?"file":"folder",status:K?D.status:void 0,children:[]},R.children.push(te)),R=te}}return O.children}const P=z(()=>M(o.changes)),B=V(new Set);function $(C){return!B.value.has(C)}const T=z(()=>{const C=[];function O(H,D){for(const A of H)C.push({node:A,depth:D}),A.kind==="folder"&&$(A.path)&&O(A.children,D+1)}return O(P.value,0),C});function I(C){const O=new Set(B.value);O.has(C.path)?O.delete(C.path):O.add(C.path),B.value=O}function N(C){return`${16+C*16}px`}return(C,O)=>(g(),S("div",yze,[f.value?(g(),S(Ce,{key:0},[W(Ma,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[W(Cn,{text:e.selectedDiffPath??""},{default:ae(()=>[b("span",wze,E(a(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),b("div",kze,[e.hideBack?Y("",!0):(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:x},{default:ae(()=>[O[0]||(O[0]=b("span",{"aria-hidden":"true"},"←",-1)),b("span",bze,E(v(n)("diff.back")),1)]),_:1}))]),W(qi,{name:"diff-content",mode:"out-in"},{default:ae(()=>[h.value?(g(),S("div",_ze,[W(Zo,{size:"md"}),b("span",null,E(v(n)("diff.loading")),1)])):p.value.length>0?(g(),S("div",{key:"lines",ref_key:"diffScrollRef",ref:m,class:"dv-lines-wrap"},[W(Xz,{lines:p.value,path:e.selectedDiffPath??void 0,"line-numbers":!0,framed:!1,"full-texts":e.fullTexts,"responsive-wrap":""},null,8,["lines","path","full-texts"])],512)):(g(),S("div",xze,E(e.emptyFile?v(n)("diff.emptyFile"):v(n)("diff.noDiff")),1))]),_:1})],64)):(g(),S(Ce,{key:1},[W(Ma,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[b("span",Sze,E(v(n)(e.changes.length===1?"diff.fileCountOne":"diff.fileCountOther",{number:e.changes.length})),1),W(di,{"model-value":w.value,size:"sm",options:[{value:"list",label:v(n)("diff.list")},{value:"tree",label:v(n)("diff.tree")}],"onUpdate:modelValue":_},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),b("div",Cze,[c.value?(g(),S(Ce,{key:0},[b("span",Mze,E(v(n)("diff.branch")),1),b("span",Aze,E(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(g(),S("span",Tze,[W(Cn,{text:v(n)("diff.aheadTitle")},{default:ae(()=>[e.gitInfo.ahead>0?(g(),S("span",Eze,"↑"+E(e.gitInfo.ahead),1)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:v(n)("diff.behindTitle")},{default:ae(()=>[e.gitInfo.behind>0?(g(),S("span",Ize,"↓"+E(e.gitInfo.behind),1)):Y("",!0)]),_:1},8,["text"])])):Y("",!0)],64)):(g(),S("span",$ze,E(v(n)("diff.empty")),1))]),u.value&&w.value==="list"?(g(),S("div",Lze,[(g(!0),S(Ce,null,at(e.changes,H=>(g(),ue(Cn,{key:H.path,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"ch-row",onClick:D=>k(H.path)},[b("span",{class:Pe(["badge",i(H.status)])},E(r(H.status)),3),b("span",zze,E(a(H.path)),1)],8,Nze)]),_:2},1032,["text"]))),128))])):u.value&&w.value==="tree"?(g(),S("div",Bze,[b("ul",Rze,[(g(!0),S(Ce,null,at(T.value,({node:H,depth:D})=>(g(),S("li",{key:H.path,class:"tree-node"},[H.kind==="folder"?(g(),S("button",{key:0,type:"button",class:"tree-row tree-folder",style:Gt({paddingLeft:N(D)}),onClick:A=>I(H)},[W(Ie,{class:"tree-icon",name:"folder-solid",size:"sm"}),b("span",Fze,E(H.name),1)],12,Pze)):(g(),ue(Cn,{key:1,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"tree-row tree-file",style:Gt({paddingLeft:N(D)}),onClick:A=>k(H.path)},[b("span",{class:Pe(["badge",i(H.status)])},E(r(H.status)),3),b("span",Oze,E(H.name),1)],12,jze)]),_:2},1032,["text"]))]))),128))])])):c.value?(g(),S("div",Hze,E(v(n)("diff.clean")),1)):(g(),S("div",Dze,E(v(n)("diff.empty")),1))],64))]))}}),Wze=vt(Vze,[["__scopeId","data-v-811473b6"]]),qze={class:"panel-tab-bar"},Uze=["data-tab-id"],Zze=["aria-selected","tabindex","title","onClick","onKeydown"],Kze={class:"ptb-t"},Gze=["aria-label","onClick"],Yze={class:"ptb-tail"},Xze=["disabled"],Jze=["disabled"],Qze=Je({__name:"PanelTabBar",props:{tabs:{},activeId:{},expanded:{type:Boolean},mobile:{type:Boolean},canOpenDiff:{type:Boolean},canOpenSideChat:{type:Boolean}},emits:["activate","close","toggleExpanded","hide","openDiff","openSideChat"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(null),l=V(null),r=V(null),a=V(!1);Ze(()=>n.activeId,async m=>{if(!m)return;await yt(),Array.from(i.value?.querySelectorAll("[data-tab-id]")??[]).find(x=>x.dataset.tabId===m)?.scrollIntoView?.({inline:"nearest",block:"nearest"})});function c(m){Array.from(i.value?.querySelectorAll(".ptb-tab-main")??[])[m]?.focus()}function u(m,k){if(n.tabs.length===0)return;let x;m.key==="ArrowRight"?x=(k+1)%n.tabs.length:m.key==="ArrowLeft"?x=(k-1+n.tabs.length)%n.tabs.length:m.key==="Home"?x=0:m.key==="End"&&(x=n.tabs.length-1),x!==void 0&&(m.preventDefault(),o("activate",n.tabs[x].id),yt(()=>c(x)))}function d(){a.value=!1,document.removeEventListener("pointerdown",f,!0)}function f(m){const k=m.target;r.value?.contains(k)||l.value?.el?.contains(k)||d()}function p(){if(a.value){d();return}a.value=!0,document.addEventListener("pointerdown",f,!0),yt(()=>r.value?.querySelector("button:not(:disabled)")?.focus())}function h(m){d(),o(m==="diff"?"openDiff":"openSideChat")}return En(d),(m,k)=>(g(),S("header",qze,[b("div",{ref_key:"tabsRef",ref:i,class:"ptb-tabs",role:"tablist"},[(g(!0),S(Ce,null,at(e.tabs,(x,y)=>(g(),S("div",{key:x.id,class:Pe(["ptb-tab",{on:x.id===e.activeId}]),"data-tab-id":x.id},[b("button",{type:"button",class:"ptb-tab-main",role:"tab","aria-selected":x.id===e.activeId,tabindex:x.id===e.activeId?0:-1,title:x.title,onClick:w=>o("activate",x.id),onKeydown:w=>u(w,y)},[W(Ie,{name:x.icon,size:"sm"},null,8,["name"]),b("span",Kze,E(x.title),1)],40,Zze),W(Cn,{text:v(s)("panel.closeTab")},{default:ae(()=>[b("button",{type:"button",class:"ptb-x","aria-label":v(s)("panel.closeTab"),onClick:_t(w=>o("close",x.id),["stop"])},[W(Ie,{name:"close",size:"sm"})],8,Gze)]),_:2},1032,["text"])],10,Uze))),128))],512),b("div",Yze,[W(Dt,{ref_key:"addButtonRef",ref:l,size:"sm",label:v(s)("panel.newTab"),"aria-haspopup":"menu","aria-expanded":a.value,onClick:p,onKeydown:[go(_t(p,["prevent"]),["down"]),go(_t(p,["prevent"]),["up"])]},{default:ae(()=>[W(Ie,{name:"plus",size:"sm"})]),_:1},8,["label","aria-expanded","onKeydown"]),e.tabs.length>0&&!e.mobile?(g(),ue(Dt,{key:0,size:"sm",label:e.expanded?v(s)("panel.collapse"):v(s)("panel.expand"),onClick:k[0]||(k[0]=x=>o("toggleExpanded"))},{default:ae(()=>[W(Ie,{name:e.expanded?"collapse":"expand",size:"sm"},null,8,["name"])]),_:1},8,["label"])):Y("",!0),W(Dt,{class:"ptb-hide",size:"sm",label:v(s)("panel.hide"),onClick:k[1]||(k[1]=x=>o("hide"))},{default:ae(()=>[W(Ie,{name:e.mobile?"close":"panel-collapse-right",size:"sm"},null,8,["name"])]),_:1},8,["label"]),a.value?(g(),S("div",{key:1,ref_key:"addMenuRef",ref:r,class:"panel-add-menu",role:"menu",onKeydown:k[4]||(k[4]=go(_t(x=>{d(),l.value?.el?.focus()},["prevent"]),["esc"]))},[b("button",{type:"button",role:"menuitem",disabled:!e.canOpenSideChat,onClick:k[2]||(k[2]=x=>h("sideChat"))},[W(Ie,{name:"message",size:"sm"}),b("span",null,E(v(s)("sideChat.title")),1)],8,Xze),b("button",{type:"button",role:"menuitem",disabled:!e.canOpenDiff,onClick:k[3]||(k[3]=x=>h("diff"))},[W(Ie,{name:"git-fork",size:"sm"}),b("span",null,E(v(s)("panel.tabs.diff")),1)],8,Jze)],544)):Y("",!0)])]))}}),eBe=vt(Qze,[["__scopeId","data-v-da364eda"]]);function Jz(e,t){let n=null;In(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,yt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),vo(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const tBe={class:"search-wrap"},nBe={key:0,class:"tab-strip"},oBe={key:1,class:"state-row"},sBe={key:2,class:"state-row unavail"},iBe={key:3,class:"model-list"},lBe=["aria-selected","onClick","onMouseenter"],rBe={class:"check"},aBe={class:"model-main"},cBe={class:"model-name"},uBe={class:"model-id"},dBe={key:0,class:"caps"},fBe={class:"model-provider"},pBe={class:"model-ctx"},hBe={key:0,class:"empty"},mBe={class:"footer-hint"},gBe=Je({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=Lt(),o=i6(),s=z(()=>o.value?yu:K0),i=z(()=>o.value?{modelValue:!0,title:n("model.title"),closeOnEsc:!1}:{open:!0,title:n("model.title"),closeOnEsc:!1,size:"xl",height:"fixed"}),l=e,r=t,a=z(()=>new Set(l.starredIds??[]));function c($){return a.value.has($)}const u=V(""),d=V(null),f=V(null),p=V("all");Jz(f,d);const h=z(()=>{const $=new Set,T=[{id:"all",label:n("model.allTab")}];for(const I of l.models)$.has(I.provider)||($.add(I.provider),T.push({id:I.provider,label:I.provider}));return T}),m=z(()=>{const $=u.value.toLowerCase().trim(),T=l.models.filter(I=>{if(p.value!=="all"&&I.provider!==p.value)return!1;const N=(I.displayName??I.model).toLowerCase().includes($),C=I.provider.toLowerCase().includes($),O=I.id.toLowerCase().includes($);return!$||N||C||O});return p.value!=="all"?T:T.sort((I,N)=>{const C=c(I.id)?1:0;return(c(N.id)?1:0)-C})}),k=z(()=>m.value),x=V(0);Ze([u,p],()=>{x.value=0}),Ze(h,$=>{$.some(T=>T.id===p.value)||(p.value="all")}),Ze(k,$=>{x.value=Math.min(x.value,Math.max($.length-1,0))});function y($){if($.key==="Escape"){r("close");return}if($.key==="ArrowDown")$.preventDefault(),x.value=Math.min(x.value+1,k.value.length-1);else if($.key==="ArrowUp")$.preventDefault(),x.value=Math.max(x.value-1,0);else if($.key==="Enter"){const T=k.value[x.value];T&&r("select",T.id)}}In(()=>{document.addEventListener("keydown",y)}),En(()=>{document.removeEventListener("keydown",y)});function w($){r("select",$)}function _($){return k.value.indexOf($)}function M($){p.value=$}const P={image_in:"imageIn",imageIn:"imageIn",image_out:"imageOut",imageOut:"imageOut",vision:"vision",video_in:"videoIn",videoIn:"videoIn",audio_in:"audioIn",audioIn:"audioIn",audio_out:"audioOut",audioOut:"audioOut",thinking:"thinking",always_thinking:"alwaysThinking",alwaysThinking:"alwaysThinking",adaptive_thinking:"adaptiveThinking",adaptiveThinking:"adaptiveThinking",tool_use:"toolUse",toolUse:"toolUse",fast_mode:"fastMode",fastMode:"fastMode"};function B($){const T=P[$];return T?n(`model.capabilities.${T}`):n("model.capabilities.unknown",{capability:$})}return($,T)=>(g(),ue(cs(s.value),io(i.value,{onClose:T[1]||(T[1]=I=>r("close"))}),{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:f,class:Pe(["mp",{"mp--sheet":v(o)}])},[b("div",tBe,[W(us,{ref_key:"searchRef",ref:d,modelValue:u.value,"onUpdate:modelValue":T[0]||(T[0]=I=>u.value=I),placeholder:v(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:""},null,8,["modelValue","placeholder"])]),h.value.length>1?(g(),S("div",nBe,[(g(!0),S(Ce,null,at(h.value,I=>(g(),ue(Nt,{key:I.id,variant:I.id===p.value?"secondary":"ghost",size:"sm",onClick:N=>M(I.id)},{default:ae(()=>[Oe(E(I.label),1)]),_:2},1032,["variant","onClick"]))),128))])):Y("",!0),e.loading?(g(),S("div",oBe,[W(Zo,{size:"sm"}),b("span",null,E(v(n)("model.loading")),1)])):e.unavailable?(g(),S("div",sBe,[W(Ie,{name:"alert-triangle",size:"lg"}),b("span",null,E(v(n)("model.unavailable")),1)])):(g(),S("div",iBe,[(g(!0),S(Ce,null,at(k.value,I=>(g(),S("div",{key:I.id,class:Pe(["model-row",{"is-current":I.id===e.current,"is-selected":_(I)===x.value}]),role:"option","aria-selected":I.id===e.current,onClick:N=>w(I.id),onMouseenter:N=>x.value=_(I)},[b("span",rBe,[I.id===e.current?(g(),ue(Ie,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",aBe,[b("span",cBe,E(I.displayName??I.model),1),b("span",uBe,E(I.id),1),I.capabilities&&I.capabilities.length>0?(g(),S("span",dBe,[(g(!0),S(Ce,null,at(I.capabilities,N=>(g(),ue(Fl,{key:N,variant:"info",size:"sm"},{default:ae(()=>[Oe(E(B(N)),1)]),_:2},1024))),128))])):Y("",!0)]),b("span",fBe,E(I.provider),1),b("span",pBe,E(v(n)("model.contextSuffix",{size:v(_a)(I.maxContextSize)})),1),W(Dt,{size:"sm",label:c(I.id)?v(n)("model.unstarTitle"):v(n)("model.starTitle"),onClick:_t(N=>r("toggle-star",I.id),["stop"])},{default:ae(()=>[c(I.id)?(g(),ue(Ie,{key:0,name:"star",size:"md"})):(g(),ue(Ie,{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["label","onClick"])],42,lBe))),128)),k.value.length===0&&!e.loading&&!e.unavailable?(g(),S("div",hBe,E(l.models.length===0?v(n)("model.emptyNoModels"):v(n)("model.emptyNoMatch")),1)):Y("",!0)])),b("div",mBe,E(v(n)("model.footerHint")),1)],2)]),_:1},16))}}),vBe=vt(gBe,[["__scopeId","data-v-466b8fec"]]),yBe=["aria-checked","aria-label","disabled"],wBe=Je({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("button",{class:Pe(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[b("span",{class:"ui-switch__thumb"},null,-1)])],10,yBe))}}),wi=vt(wBe,[["__scopeId","data-v-d7337ade"]]),kBe=["value","disabled"],bBe=Je({__name:"Select",props:{modelValue:{},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(s){n("update:modelValue",s.target.value)}return(s,i)=>(g(),S("select",{class:Pe(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error}]]),value:e.modelValue,disabled:e.disabled,onChange:o},[jn(s.$slots,"default",{},void 0,!0)],42,kBe))}}),P4=vt(bBe,[["__scopeId","data-v-77d887db"]]),_Be=["pythinker","openai","openai_responses","anthropic","google-genai","vertexai"],xBe=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function tg(){return{model:"",maxContextSize:"",displayName:""}}function yM(){return{id:"",type:"openai",apiKey:"",baseUrl:"",models:[tg()]}}function Qz(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:""})}return n}function SBe(e,t={}){const n={models:{}},o=e.id.trim();return o===""?n.id="idRequired":xBe.test(o)||(n.id="idInvalid"),t.apiKey===!0&&e.apiKey.trim()===""&&(n.apiKey="apiKeyRequired"),t.baseUrl===!0&&e.baseUrl.trim()===""&&(n.baseUrl="baseUrlRequired"),e.models.length===0&&(n.modelsEmpty="modelRequired"),e.models.forEach((s,i)=>{const l={};s.model.trim()===""&&(l.model="modelRequired");const r=s.maxContextSize.trim(),a=Number(r);r===""?l.maxContextSize="contextSizeRequired":(!/^\d+$/.test(r)||!Number.isSafeInteger(a)||a<1)&&(l.maxContextSize="contextSizeInvalid"),(l.model!==void 0||l.maxContextSize!==void 0)&&(n.models[i]=l)}),n}function CBe(e){return e.id!==void 0||e.apiKey!==void 0||e.baseUrl!==void 0||e.modelsEmpty!==void 0||Object.keys(e.models).length>0}function eB(e){return e.map(t=>({model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),displayName:t.displayName.trim()||void 0}))}function MBe(e){return{id:e.id.trim(),type:e.type,apiKey:e.apiKey.trim()||void 0,baseUrl:e.baseUrl.trim()||void 0,models:eB(e.models)}}function ABe(e,t,n,o){const s=eB(e.models),i=o?.includes("/")?o.slice(o.indexOf("/")+1):o;return{newId:e.id.trim()!==t.id?e.id.trim():void 0,type:e.type,apiKey:e.apiKey.trim()||(n?"":void 0),baseUrl:e.baseUrl.trim()||void 0,defaultModel:i&&s.some(l=>l.model===i)?i:void 0,models:s}}const TBe=Je({__name:"Skeleton",props:{width:{},height:{},circle:{type:Boolean}},setup(e){return(t,n)=>(g(),S("span",{class:Pe(["ui-skeleton",{"is-circle":e.circle}]),style:Gt({width:e.width??"100%",height:e.height??"12px"}),"aria-hidden":"true"},null,6))}}),wM=vt(TBe,[["__scopeId","data-v-f4989189"]]),EBe={key:0,class:"ui-field__label"},IBe={key:1,class:"ui-field__error"},$Be={key:2,class:"ui-field__hint"},LBe=Je({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(g(),S("div",{class:Pe(["ui-field",{"has-error":!!e.error}])},[e.label?(g(),S("label",EBe,E(e.label),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0),e.error?(g(),S("span",IBe,E(e.error),1)):e.hint?(g(),S("span",$Be,E(e.hint),1)):Y("",!0)],2))}}),Er=vt(LBe,[["__scopeId","data-v-bd93f701"]]),NBe={class:"provider-form__fields"},zBe=["value"],BBe={class:"provider-form__key"},RBe={class:"provider-form__models-head"},PBe={class:"provider-form__models"},FBe={class:"provider-form__model provider-form__model--head"},jBe={key:0,class:"provider-form__row-error",role:"alert"},OBe={key:0,class:"provider-form__error",role:"alert"},HBe={class:"provider-form__actions"},DBe=Je({__name:"ProviderForm",props:{mode:{},provider:{},config:{}},emits:["dirtyChange","saved","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=yM(),l=ds(i),r=V({models:{}}),a=V(""),c=V(!1),u=V(!1),d=V(!1),f=V(!1),p=z(()=>_Be.map($=>({value:$,label:s(`providers.types.${$}`)})));function h(){const $=n.provider;if(n.mode==="edit"&&$!==void 0){l.id=$.id,l.type=$.type,l.apiKey="",l.baseUrl=$.baseUrl??"";const T=Qz($,n.config?.models);l.models=T.length>0?T:[tg()]}else Object.assign(l,yM());r.value={models:{}},a.value="",o("dirtyChange",!1)}function m($){const T=r.value[$];return T===void 0?"":s(`providers.error.${T}`)}function k($,T){const I=r.value.models[$]?.[T];return I===void 0?"":s(`providers.error.${I}`)}function x($){if(r.value[$]===void 0)return;const{[$]:T,...I}=r.value;r.value={...I,models:r.value.models}}function y($,T){const I=r.value.models[$];if(I?.[T]===void 0)return;const{[T]:N,...C}=I,{[$]:O,...H}=r.value.models;r.value={...r.value,models:Object.keys(C).length>0?{...H,[$]:C}:H}}async function w(){const $=n.provider;if(!(n.mode!=="edit"||$===void 0||!$.hasApiKey))try{const T=await St().getProvider($.id);T.apiKey&&!f.value&&(l.apiKey=T.apiKey,d.value=!0)}catch{d.value=!1}}function _(){o("dirtyChange",!0)}function M(){l.models.push(tg()),_()}function P($){l.models.length<=1||(l.models.splice($,1),r.value={...r.value,models:{}},_())}async function B(){if(c.value)return;const $=SBe(l,{apiKey:n.mode==="add",baseUrl:n.mode==="add"});if(r.value=$,CBe($)){a.value=$.modelsEmpty===void 0?"":s(`providers.error.${$.modelsEmpty}`);return}c.value=!0,a.value="";try{if(n.mode==="add"){const N=await St().addProvider(MBe(l));o("dirtyChange",!1),o("saved",N.id);return}const T=n.provider;if(T===void 0)return;const I=await St().updateProvider(T.id,ABe(l,T,d.value,n.config?.providers[T.id]?.defaultModel));o("dirtyChange",!1),o("saved",I.provider.id)}catch{a.value=s("providers.saveFailed")}finally{c.value=!1}}return In(()=>{h(),w()}),($,T)=>(g(),S("form",{class:"provider-form",onSubmit:_t(B,["prevent"]),onInput:_},[b("div",NBe,[W(Er,{label:v(s)("providers.fieldId"),error:m("id")},{default:ae(()=>[W(us,{modelValue:l.id,"onUpdate:modelValue":[T[0]||(T[0]=I=>l.id=I),T[1]||(T[1]=I=>x("id"))],autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),_:1},8,["label","error"]),W(Er,{label:v(s)("providers.fieldType")},{default:ae(()=>[W(P4,{modelValue:l.type,"onUpdate:modelValue":T[2]||(T[2]=I=>l.type=I)},{default:ae(()=>[(g(!0),S(Ce,null,at(p.value,I=>(g(),S("option",{key:I.value,value:I.value},E(I.label),9,zBe))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),W(Er,{label:v(s)("providers.fieldApiKey"),error:m("apiKey")},{default:ae(()=>[b("div",BBe,[W(us,{modelValue:l.apiKey,"onUpdate:modelValue":[T[3]||(T[3]=I=>l.apiKey=I),T[4]||(T[4]=I=>{f.value=!0,x("apiKey")})],type:u.value?"text":"password",placeholder:e.provider?.hasApiKey?v(s)("providers.apiKeySet"):"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),W(Dt,{class:"provider-form__eye",size:"sm",label:u.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:T[5]||(T[5]=I=>u.value=!u.value)},{default:ae(()=>[W(Ie,{name:u.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label","error"]),W(Er,{label:v(s)("providers.fieldBaseUrl"),error:m("baseUrl")},{default:ae(()=>[W(us,{modelValue:l.baseUrl,"onUpdate:modelValue":[T[6]||(T[6]=I=>l.baseUrl=I),T[7]||(T[7]=I=>x("baseUrl"))],placeholder:v(s)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label","error"])]),b("div",RBe,[b("strong",null,E(v(s)("providers.fieldModels")),1),W(Nt,{type:"button",size:"sm",variant:"secondary",onClick:M},{default:ae(()=>[W(Ie,{name:"plus",size:"sm"}),Oe(E(v(s)("providers.addModel")),1)]),_:1})]),b("div",PBe,[b("div",FBe,[b("span",null,E(v(s)("providers.colModelId")),1),b("span",null,E(v(s)("providers.colContext")),1),b("span",null,E(v(s)("providers.colDisplayName")),1),T[9]||(T[9]=b("span",null,null,-1))]),(g(!0),S(Ce,null,at(l.models,(I,N)=>(g(),S(Ce,{key:N},[b("div",{class:Pe(["provider-form__model",{"has-error":!!r.value.models[N]}])},[W(us,{modelValue:I.model,"onUpdate:modelValue":[C=>I.model=C,C=>y(N,"model")],placeholder:v(s)("providers.modelIdPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:I.maxContextSize,"onUpdate:modelValue":[C=>I.maxContextSize=C,C=>y(N,"maxContextSize")],inputmode:"numeric",placeholder:v(s)("providers.modelContextPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:I.displayName,"onUpdate:modelValue":C=>I.displayName=C,placeholder:v(s)("providers.modelNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(Dt,{size:"sm",disabled:l.models.length<=1,label:v(s)("providers.removeModel"),onClick:C=>P(N)},{default:ae(()=>[W(Ie,{name:"trash",size:"sm"})]),_:1},8,["disabled","label","onClick"])],2),r.value.models[N]?(g(),S("div",jBe,E([k(N,"model"),k(N,"maxContextSize")].filter(Boolean).join(" · ")),1)):Y("",!0)],64))),128))]),a.value?(g(),S("div",OBe,E(a.value),1)):Y("",!0),b("div",HBe,[W(Nt,{type:"button",variant:"secondary",onClick:T[8]||(T[8]=I=>o("cancel"))},{default:ae(()=>[Oe(E(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:c.value},{default:ae(()=>[Oe(E(v(s)("providers.save")),1)]),_:1},8,["loading"])])],32))}}),tB=vt(DBe,[["__scopeId","data-v-66e70e30"]]),VBe={class:"add-provider-flow"},WBe={key:0,class:"add-provider-flow__section"},qBe={key:0,class:"add-provider-flow__state"},UBe={key:1,class:"add-provider-flow__state"},ZBe={class:"add-provider-flow__catalog"},KBe=["disabled","onClick"],GBe={class:"add-provider-flow__name"},YBe={key:0,class:"add-provider-flow__empty"},XBe={class:"add-provider-flow__key"},JBe={key:1,class:"add-provider-flow__warning"},QBe={class:"add-provider-flow__note"},eRe={key:2,class:"add-provider-flow__error",role:"alert"},tRe={class:"add-provider-flow__actions"},nRe={class:"add-provider-flow__note"},oRe={class:"add-provider-flow__key"},sRe={key:0,class:"add-provider-flow__error",role:"alert"},iRe={class:"add-provider-flow__actions"},lRe={key:2,class:"add-provider-flow__section"},rRe=Je({__name:"AddProviderFlow",props:{config:{},initialSource:{}},emits:["dirtyChange","added","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=V(n.initialSource??"catalog"),l=z(()=>[{value:"catalog",label:s("providers.catalog.sourceCatalog")},{value:"registry",label:s("providers.catalog.sourceRegistry")},{value:"manual",label:s("providers.catalog.sourceManual")}]),r=V([]),a=V("loading"),c=V(""),u=V(null),d=ds({id:"",apiKey:"",baseUrl:""}),f=V(""),p=V(!1),h=V(!1),m=ds({url:"",apiKey:""}),k=V(""),x=V(!1),y=V(!1),w=z(()=>{const N=c.value.trim().toLowerCase();return N===""?r.value:r.value.filter(C=>C.name.toLowerCase().includes(N)||C.id.toLowerCase().includes(N))}),_=z(()=>Object.hasOwn(n.config?.providers??{},d.id.trim()));async function M(){a.value="loading";try{r.value=await St().listCatalogProviders(),a.value="ready";const N=r.value.filter(C=>!C.rejected);N.length===1&&u.value===null&&B(N[0])}catch{a.value="error"}}function P(N){const C=N.rejectReason===null?"":`providers.catalog.rejectReason.${N.rejectReason}`;return C!==""&&s(C)!==C?s(C):s("providers.catalog.rejected")}function B(N){N.rejected||(u.value=N,d.id=N.id,d.apiKey="",d.baseUrl="",f.value="")}function $(){o("dirtyChange",!0)}async function T(){const N=u.value;if(N===null||p.value)return;const C=d.id.trim();if(C===""){f.value=s("providers.error.idRequired");return}if(d.apiKey.trim()===""){f.value=s("providers.error.apiKeyRequired");return}if(N.needsBaseUrl&&d.baseUrl.trim()===""){f.value=s("providers.error.baseUrlRequired");return}p.value=!0,f.value="";try{await St().importCatalogProvider({catalogId:N.id,id:C===N.id?void 0:C,apiKey:d.apiKey.trim(),baseUrl:d.baseUrl.trim()||void 0}),o("dirtyChange",!1),o("added",C)}catch{f.value=s("providers.addFailed")}finally{p.value=!1}}async function I(){if(x.value)return;const N=m.url.trim();if(N===""){k.value=s("providers.error.registryUrlRequired");return}x.value=!0,k.value="";try{const C=await St().importCustomRegistry({url:N,apiKey:m.apiKey.trim()||void 0});o("dirtyChange",!1);const O=C.providers[0];O===void 0?o("cancel"):o("added",O.id)}catch{k.value=s("providers.addFailed")}finally{x.value=!1}}return In(M),(N,C)=>(g(),S("div",VBe,[W(di,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=O=>i.value=O),size:"sm",options:l.value},null,8,["modelValue","options"]),i.value==="catalog"?(g(),S("section",WBe,[a.value==="loading"?(g(),S("div",qBe,[W(Zo,{size:"sm"}),Oe(E(v(s)("providers.catalog.loading")),1)])):a.value==="error"?(g(),S("div",UBe,[b("span",null,E(v(s)("providers.catalog.loadError")),1),W(Nt,{size:"sm",variant:"secondary",onClick:M},{default:ae(()=>[Oe(E(v(s)("providers.catalog.retry")),1)]),_:1})])):u.value===null?(g(),S(Ce,{key:2},[W(us,{modelValue:c.value,"onUpdate:modelValue":C[1]||(C[1]=O=>c.value=O),placeholder:v(s)("providers.catalog.searchPlaceholder"),autocomplete:"off"},null,8,["modelValue","placeholder"]),b("div",ZBe,[(g(!0),S(Ce,null,at(w.value,O=>(g(),S("button",{key:O.id,type:"button",class:"add-provider-flow__entry",disabled:O.rejected,onClick:H=>B(O)},[b("span",GBe,E(O.name),1),O.wireType?(g(),ue(Fl,{key:0,size:"sm",variant:"neutral"},{default:ae(()=>[Oe(E(O.wireType),1)]),_:2},1024)):Y("",!0),C[15]||(C[15]=b("span",{class:"add-provider-flow__grow"},null,-1)),b("span",null,E(O.rejected?P(O):v(s)("providers.modelCount",{count:O.models.length})),1)],8,KBe))),128)),w.value.length===0?(g(),S("div",YBe,E(v(s)("providers.catalog.empty")),1)):Y("",!0)])],64)):(g(),S("form",{key:3,class:"add-provider-flow__form",onSubmit:_t(T,["prevent"]),onInput:$},[b("button",{type:"button",class:"add-provider-flow__back",onClick:C[2]||(C[2]=O=>u.value=null)},[W(Ie,{class:"add-provider-flow__back-icon",name:"chevron-right",size:"sm"}),Oe(E(v(s)("providers.catalog.backToList")),1)]),W(Er,{label:v(s)("providers.fieldId")},{default:ae(()=>[W(us,{modelValue:d.id,"onUpdate:modelValue":C[3]||(C[3]=O=>d.id=O),autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Er,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",XBe,[W(us,{modelValue:d.apiKey,"onUpdate:modelValue":C[4]||(C[4]=O=>d.apiKey=O),type:h.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:h.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[5]||(C[5]=O=>h.value=!h.value)},{default:ae(()=>[W(Ie,{name:h.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),u.value.needsBaseUrl?(g(),ue(Er,{key:0,label:v(s)("providers.fieldBaseUrl")},{default:ae(()=>[W(us,{modelValue:d.baseUrl,"onUpdate:modelValue":C[6]||(C[6]=O=>d.baseUrl=O),placeholder:v(s)("providers.baseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):Y("",!0),_.value?(g(),S("div",JBe,E(v(s)("providers.catalog.overwriteWarning")),1)):Y("",!0),b("div",QBe,E(v(s)("providers.catalog.willImport",{count:u.value.models.length})),1),f.value?(g(),S("div",eRe,E(f.value),1)):Y("",!0),b("div",tRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[7]||(C[7]=O=>o("cancel"))},{default:ae(()=>[Oe(E(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:p.value},{default:ae(()=>[Oe(E(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32))])):i.value==="registry"?(g(),S("form",{key:1,class:"add-provider-flow__section add-provider-flow__form",onSubmit:_t(I,["prevent"]),onInput:$},[b("p",nRe,E(v(s)("providers.catalog.registryHint")),1),W(Er,{label:v(s)("providers.catalog.registryUrlLabel")},{default:ae(()=>[W(us,{modelValue:m.url,"onUpdate:modelValue":C[8]||(C[8]=O=>m.url=O),placeholder:"https://example.com/api.json",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Er,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",oRe,[W(us,{modelValue:m.apiKey,"onUpdate:modelValue":C[9]||(C[9]=O=>m.apiKey=O),type:y.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:y.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[10]||(C[10]=O=>y.value=!y.value)},{default:ae(()=>[W(Ie,{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),k.value?(g(),S("div",sRe,E(k.value),1)):Y("",!0),b("div",iRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[11]||(C[11]=O=>o("cancel"))},{default:ae(()=>[Oe(E(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:x.value},{default:ae(()=>[Oe(E(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32)):(g(),S("div",lRe,[W(tB,{mode:"add",config:e.config,onDirtyChange:C[12]||(C[12]=O=>o("dirtyChange",O)),onSaved:C[13]||(C[13]=O=>o("added",O)),onCancel:C[14]||(C[14]=O=>o("cancel"))},null,8,["config"])]))]))}}),nB=vt(rRe,[["__scopeId","data-v-01edc4ef"]]),aRe={class:"providers-panel"},cRe={class:"providers-panel__heading"},uRe={key:1,class:"providers-panel__split"},dRe=["aria-label"],fRe={class:"providers-pane-label"},pRe=["aria-label"],hRe=["data-testid","aria-current","onClick"],mRe=["aria-label"],gRe={"aria-hidden":"true"},vRe={class:"providers-panel__row-name"},yRe={class:"providers-pane-label"},wRe=["aria-current"],kRe={class:"providers-panel__add-icon"},bRe={class:"providers-panel__row-name"},_Re={class:"providers-panel__detail"},xRe={class:"providers-detail__head"},SRe={class:"providers-detail__tile","aria-hidden":"true"},CRe={class:"providers-detail__identity"},MRe={class:"providers-detail__name-row"},ARe={class:"providers-detail__meta"},TRe={class:"mono"},ERe={class:"providers-detail__sec"},IRe={class:"providers-detail__sec-head"},$Re={class:"providers-pane-label"},LRe={class:"providers-detail__count"},NRe={key:0,class:"providers-model-card"},zRe={key:0,class:"providers-model-name"},BRe={key:1,class:"providers-detail__empty"},RRe={class:"providers-detail__sec"},PRe={class:"providers-detail__foot"},kM="$add",FRe=Je({__name:"ProvidersPanel",props:{discardToken:{default:0}},emits:["dirtyChange"],setup(e,{emit:t}){const n=t,{t:o}=Lt(),{confirm:s}=B1(),i=P1(),l=V([]),r=V(null),a=V(!1),c=V(!1),u=V(null),d=V(!1),f=z(()=>l.value.toSorted((T,I)=>T.id.localeCompare(I.id))),p=z(()=>u.value===kM),h=z(()=>f.value.find(T=>T.id===u.value)??null),m=z(()=>{const T=h.value;if(!T?.models?.length)return[];const I=new Map(Qz(T,r.value?.models).map(N=>[N.model,N.maxContextSize]));return T.models.map(N=>{const C=I.get(N)?.trim()??"";return{id:N,contextBadge:k(C)}})});function k(T){if(!T||!/^\d+$/.test(T))return;const I=Number(T);if(!(!Number.isFinite(I)||I<=0))return I>=1e6?`${x(I/1e6)}M`:I>=1e3?`${x(I/1e3)}K`:String(I)}function x(T){return String(Number(T.toFixed(1)))}function y(T){return T==="connected"?"ok":T==="error"?"error":"idle"}function w(T){return(T.trim()[0]??"?").toUpperCase()}Ze(d,T=>n("dirtyChange",T),{immediate:!0}),Ze(()=>e.discardToken,()=>{d.value=!1,u.value=f.value[0]?.id??null});async function _(){await i.refreshRuntimeState(),await M()}async function M(){a.value=!0,c.value=!1;try{l.value=await St().listProviders(),f.value.some(T=>T.id===u.value)||(u.value=f.value[0]?.id??null)}catch{l.value=[],c.value=!0}try{r.value=await St().getConfig()}catch{r.value=null}finally{a.value=!1}}function P(T){d.value||(u.value=T)}async function B(T){d.value=!1,await _(),u.value=T}async function $(T){await s({title:o("providers.deleteProvider"),message:o("providers.deleteConfirm",{id:T.id,count:T.models?.length??0}),confirmLabel:o("providers.deleteConfirmYes"),cancelLabel:o("common.cancel"),variant:"danger",action:async()=>{await St().deleteProvider(T.id),u.value=null,d.value=!1,await _()}})}return In(M),(T,I)=>(g(),S("section",aRe,[b("div",cRe,[b("div",null,[b("h3",null,E(v(o)("providers.title")),1),b("p",null,E(v(o)("providers.description")),1)]),!a.value&&!c.value?(g(),ue(Dt,{key:0,size:"sm",label:v(o)("providers.refresh"),"data-testid":"providers-refresh",onClick:I[0]||(I[0]=N=>_())},{default:ae(()=>[W(Ie,{name:"undo",size:"sm"})]),_:1},8,["label"])):Y("",!0)]),c.value?(g(),ue(U9,{key:0,variant:"warning"},{default:ae(()=>[Oe(E(v(o)("providers.unavailable")),1)]),_:1})):(g(),S("div",uRe,[b("nav",{class:"providers-panel__list","aria-label":v(o)("providers.title")},[b("div",fRe,E(v(o)("settings.tabs.providers")),1),a.value?(g(),S(Ce,{key:0},at(3,N=>b("div",{key:N,class:"providers-panel__row providers-panel__row--skeleton",role:"status","aria-label":v(o)("providers.loading")},[W(wM,{width:"26px",height:"26px",circle:""}),W(wM,{width:`${52-N*6}%`,height:"11px"},null,8,["width"])],8,pRe)),64)):(g(),S(Ce,{key:1},[(g(!0),S(Ce,null,at(f.value,N=>(g(),S("button",{key:N.id,type:"button",class:Pe(["providers-panel__row",{"is-selected":u.value===N.id}]),"data-testid":`provider-${N.id}-toggle`,"aria-current":u.value===N.id,onClick:C=>P(N.id)},[W(Cn,{text:v(o)(`providers.status.${N.status}`)},{default:ae(()=>[b("span",{class:Pe(["providers-panel__tile",`is-${y(N.status)}`]),role:"img","aria-label":v(o)(`providers.status.${N.status}`)},[b("span",gRe,E(w(N.type)),1)],10,mRe)]),_:2},1032,["text"]),b("span",vRe,E(N.id),1),b("span",{class:Pe(["providers-panel__row-dot",`is-${y(N.status)}`]),"aria-hidden":"true"},null,2)],10,hRe))),128)),b("div",yRe,E(v(o)("providers.customProviders")),1),b("button",{type:"button",class:Pe(["providers-panel__row providers-panel__row--add",{"is-selected":p.value}]),"aria-current":p.value,onClick:I[1]||(I[1]=N=>P(kM))},[b("span",kRe,[W(Ie,{name:"plus",size:"sm"})]),b("span",bRe,E(v(o)("providers.addProvider")),1)],10,wRe)],64))],8,dRe),b("div",_Re,[p.value?(g(),ue(nB,{key:0,config:r.value,onDirtyChange:I[2]||(I[2]=N=>d.value=N),onAdded:B,onCancel:I[3]||(I[3]=N=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["config"])):h.value?(g(),S(Ce,{key:1},[b("header",xRe,[b("span",SRe,E(w(h.value.type)),1),b("div",CRe,[b("div",MRe,[b("h4",null,E(h.value.id),1),W(Fl,{variant:h.value.status==="connected"?"success":h.value.status==="error"?"danger":"neutral",size:"md"},{default:ae(()=>[Oe(E(v(o)(`providers.status.${h.value.status}`)),1)]),_:1},8,["variant"])]),b("p",ARe,[b("span",null,E(h.value.type),1),h.value.baseUrl?(g(),S(Ce,{key:0},[I[7]||(I[7]=b("span",{"aria-hidden":"true"},"·",-1)),b("span",TRe,E(h.value.baseUrl),1)],64)):Y("",!0)])])]),b("section",ERe,[b("div",IRe,[b("span",$Re,E(v(o)("providers.fieldModels")),1),b("span",LRe,E(v(o)("providers.modelCount",{count:h.value.models?.length??0})),1)]),m.value.length>0?(g(),S("div",NRe,[(g(!0),S(Ce,null,at(m.value,N=>(g(),S("div",{key:N.id,class:"providers-model-row"},[b("code",null,E(N.id),1),N.displayName?(g(),S("span",zRe,E(N.displayName),1)):Y("",!0),I[8]||(I[8]=b("span",{class:"providers-model-grow"},null,-1)),N.contextBadge?(g(),ue(Fl,{key:1,variant:"neutral",size:"sm"},{default:ae(()=>[Oe(E(N.contextBadge),1)]),_:2},1024)):Y("",!0)]))),128))])):(g(),S("p",BRe,E(v(o)("providers.noModels")),1))]),b("section",RRe,[W(tB,{mode:"edit",provider:h.value,config:r.value,onDirtyChange:I[4]||(I[4]=N=>d.value=N),onSaved:B,onCancel:I[5]||(I[5]=N=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["provider","config"])]),b("footer",PRe,[W(Nt,{variant:"danger-soft",size:"sm","data-testid":`provider-${h.value.id}-delete`,onClick:I[6]||(I[6]=N=>$(h.value))},{default:ae(()=>[W(Ie,{name:"trash",size:"sm"}),Oe(E(v(o)("providers.deleteProvider")),1)]),_:1},8,["data-testid"])])],64)):l.value.length===0&&!a.value?(g(),ue(Pg,{key:2,title:v(o)("providers.empty"),hint:v(o)("providers.emptyHint")},{icon:ae(()=>[W(Ie,{name:"bolt"})]),_:1},8,["title","hint"])):Y("",!0)])]))]))}}),jRe=vt(FRe,[["__scopeId","data-v-66a5ed6a"]]),ORe=["aria-expanded","aria-label","disabled"],HRe=["aria-label"],DRe=["aria-label"],VRe=["aria-selected"],WRe={class:"sm-picker__option-label"},qRe={class:"sm-picker__group"},URe=["aria-selected","onMouseenter","onClick"],ZRe={class:"sm-picker__option-label"},KRe=["aria-label"],GRe={class:"sm-picker__group"},YRe=["aria-selected","onMouseenter","onClick"],XRe={class:"sm-picker__option-label"},JRe=250,QRe=188,ePe=Je({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{},disabled:{type:Boolean}},emits:["inherit","select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt(),i=`sm-picker-${Math.random().toString(36).slice(2,9)}`,l=V(null),r=V(null),a=V(null),c=V(!1),u=V(!1),d=V({}),f=V(null),p=V(""),h=V(0),m=V("models"),k=V(0),x=V(0),y=V("right"),w=new Map;let _=null;const M=z(()=>[{id:"",label:s("settings.noSecondaryModel")},...n.groups.flatMap(X=>X.options)]),P=z(()=>n.modelValue?M.value.find(X=>X.id===n.modelValue)?.label??n.modelValue:""),B=z(()=>n.modelValue?n.effort?`${P.value} · ${n.effort}`:P.value:s("settings.noSecondaryModel")),$=z(()=>{const X=f.value;if(X===null||X==="")return[];const se=s6(n.modelInfoById[X]),F=n.effort===""?[null,...se]:[...se];return n.modelValue===X&&n.effort!==""&&!se.includes(n.effort)&&F.push(n.effort),F});function T(X){return n.modelValue!==f.value?!1:X===null?n.effort==="":n.effort===X}function I(){const X=$.value.findIndex(T);return X>=0?X:0}function N(X,se){X instanceof HTMLElement?w.set(se,X):w.delete(se)}function C(){_!==null&&(clearTimeout(_),_=null)}function O(){C(),_=setTimeout(()=>{f.value=null,m.value==="efforts"&&(m.value="models")},JRe)}function H(X){X!==p.value&&(p.value=X,h.value=Math.max(0,M.value.findIndex(se=>se.id===X)))}function D(){const X=l.value,se=r.value;if(!X||!se)return;const F=X.getBoundingClientRect(),Z=se.offsetHeight,fe=window.innerHeight-F.bottom;u.value=feZ;const ve=Math.max(8,window.innerWidth-F.right);d.value=u.value?{right:`${ve}px`,bottom:`${window.innerHeight-F.top+4}px`,top:"auto"}:{right:`${ve}px`,top:`${F.bottom+4}px`,bottom:"auto"}}function A(){const X=r.value,se=f.value===null?void 0:w.get(f.value);if(!X||!se)return;const F=X.getBoundingClientRect(),Z=se.getBoundingClientRect(),fe=a.value?.offsetHeight??0,ve=Math.max(0,window.innerHeight-8-fe-F.top);x.value=Math.max(0,Math.min(Z.top-F.top-4,X.offsetHeight-40,ve));const ge=window.innerWidth-F.right;y.value=ge>=QRe||ge>=F.left?"right":"left"}function R(){c.value||n.disabled||(c.value=!0,p.value=n.modelValue||M.value[0]?.id||"",h.value=Math.max(0,M.value.findIndex(X=>X.id===p.value)),f.value=null,m.value="models",yt(D))}function j({restoreFocus:X=!1}={}){c.value&&(C(),c.value=!1,f.value=null,X&&yt(()=>l.value?.focus()))}function q(){c.value?j({restoreFocus:!0}):R()}function K(){f.value=null,m.value="models"}function U(X,{moveFocus:se=!1}={}){if(H(X),C(),X===""){f.value=null,m.value="models";return}f.value=X,yt(A),se&&(m.value="efforts",k.value=I())}function te(X){const se=f.value;if(se===null)return;const F={model:se,...X===null?{}:{effort:X}};(F.model!==n.modelValue||(F.effort??"")!==n.effort)&&o("select",F),j({restoreFocus:!0})}function J(){o("inherit"),j({restoreFocus:!0})}function ee(){yt(()=>{r.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function ie(X){const se=M.value;if(se.length===0)return;const F=se[(h.value+X+se.length)%se.length];H(F.id),f.value!==null&&U(F.id),ee()}function Q(X){const se=$.value;se.length!==0&&(k.value=(k.value+X+se.length)%se.length,ee())}function he(X){if(!c.value){(X.key==="Enter"||X.key===" "||X.key==="ArrowDown")&&(X.preventDefault(),R());return}if(X.key==="ArrowDown")X.preventDefault(),m.value==="models"?ie(1):Q(1);else if(X.key==="ArrowUp")X.preventDefault(),m.value==="models"?ie(-1):Q(-1);else if(X.key==="ArrowRight")X.preventDefault(),p.value!==""&&U(p.value,{moveFocus:!0});else if(X.key==="ArrowLeft")X.preventDefault(),f.value!==null&&K();else if(X.key==="Enter"||X.key===" ")X.preventDefault(),m.value==="models"&&p.value===""?J():m.value==="models"?U(p.value,{moveFocus:!0}):te($.value[k.value]??null);else if(X.key==="Home"||X.key==="End"){X.preventDefault();const se=X.key==="Home";if(m.value==="models"){const F=M.value;if(F.length===0)return;const Z=(se?F[0]:F.at(-1)).id;H(Z),f.value!==null&&U(Z)}else k.value=se?0:$.value.length-1;ee()}else X.key==="Escape"&&(X.preventDefault(),j({restoreFocus:!0}))}function xe(X){const se=X.target;se instanceof Node&&(l.value?.contains(se)||r.value?.contains(se)||j())}function Ye(X){if(c.value){if(r.value?.contains(X.target instanceof Node?X.target:null)){A();return}j(),D()}}function st(){c.value&&D()}return In(()=>{document.addEventListener("pointerdown",xe),document.addEventListener("scroll",Ye,!0),window.addEventListener("resize",st)}),En(()=>{document.removeEventListener("pointerdown",xe),document.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",st),C()}),(X,se)=>(g(),S("div",{class:Pe(["sm-picker",{"is-open":c.value}])},[b("button",{ref_key:"triggerRef",ref:l,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":i,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":v(s)("settings.secondaryModel"),disabled:e.disabled,onClick:q,onKeydown:he},[b("span",{class:Pe(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[b("span",null,E(B.value),1)],2),W(Ie,{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,ORe),(g(),ue(hl,{to:"body"},[c.value?(g(),S("div",{key:0,id:i,ref_key:"menuRef",ref:r,class:Pe(["sm-picker__menu",{"sm-picker__menu--up":u.value}]),style:Gt(d.value),role:"dialog","aria-label":v(s)("settings.secondaryModel")},[b("div",{class:"sm-picker__models",role:"listbox","aria-label":v(s)("settings.secondaryModel")},[b("button",{ref:F=>N(F,""),type:"button",class:Pe(["sm-picker__option",{"is-selected":e.modelValue==="","is-active":p.value==="","is-kb-active":m.value==="models"&&p.value===""}]),role:"option","aria-selected":e.modelValue==="",onMouseenter:se[0]||(se[0]=F=>U("")),onClick:J},[W(Ie,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",WRe,E(v(s)("settings.noSecondaryModel")),1)],42,VRe),se[1]||(se[1]=b("div",{class:"sm-picker__divider"},null,-1)),(g(!0),S(Ce,null,at(e.groups,F=>(g(),S(Ce,{key:F.provider},[b("div",qRe,E(F.provider),1),(g(!0),S(Ce,null,at(F.options,Z=>(g(),S("button",{key:Z.id,ref_for:!0,ref:fe=>N(fe,Z.id),type:"button",class:Pe(["sm-picker__option",{"is-selected":Z.id===e.modelValue,"is-active":Z.id===p.value,"is-kb-active":m.value==="models"&&Z.id===p.value}]),role:"option","aria-selected":Z.id===e.modelValue,onMouseenter:fe=>U(Z.id),onMouseleave:O,onClick:fe=>U(Z.id,{moveFocus:!0})},[W(Ie,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",ZRe,E(Z.label),1),W(Ie,{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,URe))),128))],64))),128))],8,DRe),f.value!==null?(g(),S("div",{key:0,ref_key:"flyoutRef",ref:a,class:Pe(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:Gt({top:`${x.value}px`}),role:"listbox","aria-label":v(s)("settings.secondaryModelEffort"),onMouseenter:C,onMouseleave:O},[b("div",GRe,E(v(s)("settings.secondaryModelEffort")),1),(g(!0),S(Ce,null,at($.value,(F,Z)=>(g(),S("button",{key:F??"__default__",type:"button",class:Pe(["sm-picker__option",{"is-selected":T(F),"is-kb-active":m.value==="efforts"&&Z===k.value,"is-muted":F===null}]),role:"option","aria-selected":T(F),onMouseenter:fe=>{m.value="efforts",k.value=Z},onClick:fe=>te(F)},[W(Ie,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",XRe,E(F??v(s)("settings.secondaryModelEffortAuto")),1)],42,YRe))),128))],46,KRe)):Y("",!0)],14,HRe)):Y("",!0)]))],2))}}),tPe=vt(ePe,[["__scopeId","data-v-5b749db7"]]),nPe=["aria-label"],oPe=["aria-selected","onClick"],sPe={class:"body"},iPe={class:"panel"},lPe={class:"sec"},rPe={class:"sec-title"},aPe={class:"row"},cPe={class:"rlabel"},uPe={class:"row"},dPe={class:"rlabel"},fPe={class:"row"},pPe={class:"rlabel"},hPe={class:"sec"},mPe={class:"sec-title"},gPe={class:"row"},vPe={class:"rlabel"},yPe={class:"hint"},wPe={class:"row"},kPe={class:"rlabel"},bPe={class:"hint"},_Pe={class:"sec"},xPe={class:"sec-title"},SPe={class:"row"},CPe={class:"rlabel"},MPe={key:0,class:"hint"},APe={class:"row"},TPe={class:"rlabel"},EPe={key:0,class:"hint"},IPe={class:"row"},$Pe={class:"rlabel"},LPe={key:0,class:"hint"},NPe={class:"row"},zPe={class:"rlabel"},BPe={class:"panel"},RPe={class:"sec"},PPe={class:"sec-title"},FPe={class:"row"},jPe={class:"rlabel"},OPe={key:0,class:"rvalue"},HPe={class:"actions"},DPe={class:"panel"},VPe={class:"panel"},WPe={class:"sec"},qPe={class:"sec-head"},UPe={class:"sec-title"},ZPe={key:0,class:"saving"},KPe={class:"row"},GPe={class:"rlabel"},YPe={class:"hint"},XPe={key:0,class:"select-wrap"},JPe={key:0,value:"",disabled:""},QPe=["label"],eFe=["value"],tFe={key:1,class:"rvalue mono"},nFe={key:0,class:"sec","data-testid":"subagent-routing"},oFe={class:"sec-title"},sFe=["aria-label"],iFe=["value","checked","disabled","onChange"],lFe={class:"routing-mode-title"},rFe={class:"hint"},aFe={key:0,class:"row"},cFe={class:"rlabel"},uFe={class:"hint"},dFe={key:1,class:"rvalue"},fFe={key:1,class:"row routing-pool"},pFe={class:"rlabel"},hFe={class:"hint"},mFe={class:"pool-list","data-testid":"routing-pool"},gFe=["value","checked","disabled","onChange"],vFe={class:"pool-name"},yFe=["disabled","onClick"],wFe={class:"row routing-effective","data-testid":"effective-routing"},kFe={class:"rlabel"},bFe={class:"rvalue mono","data-testid":"saved-policy"},_Fe={class:"rlabel"},xFe={class:"rvalue mono","data-testid":"effective-policy"},SFe={key:0,class:"hint","data-testid":"feature-disabled"},CFe={class:"row"},MFe={class:"rlabel"},AFe={class:"hint"},TFe={class:"row"},EFe={class:"rlabel"},IFe={class:"hint"},$Fe={class:"row"},LFe={class:"rlabel"},NFe={class:"hint"},zFe={class:"row"},BFe={class:"rlabel"},RFe={class:"hint"},PFe={key:1,class:"empty-config"},FFe={class:"panel"},jFe={class:"sec"},OFe={class:"sec-title"},HFe={class:"row"},DFe={class:"rlabel"},VFe={class:"hint"},WFe={class:"rvalue mono"},qFe={class:"row"},UFe={class:"rlabel"},ZFe={class:"hint"},KFe={class:"value-wrap"},GFe={class:"rvalue mono"},YFe={class:"row"},XFe={class:"rlabel"},JFe={class:"hint"},QFe={class:"value-wrap"},eje={class:"rvalue mono"},tje={class:"row"},nje={class:"rlabel"},oje={class:"rvalue mono"},sje={key:0,class:"sec"},ije={key:0,class:"row"},lje={class:"rlabel"},rje={class:"hint"},aje={class:"hint"},cje={class:"sec"},uje={class:"sec-title"},dje={class:"row"},fje={class:"rlabel"},pje={key:0,class:"hint"},hje={class:"row"},mje={class:"rlabel"},gje={class:"panel"},vje={key:0,class:"sec"},yje={class:"sec-title"},wje={"data-testid":"desktop-update-controls",class:"desktop-update-card"},kje={class:"desktop-update-row desktop-update-summary"},bje={class:"desktop-update-summary-copy"},_je={class:"desktop-update-icon","aria-hidden":"true"},xje={class:"rlabel"},Sje={class:"desktop-update-title","aria-live":"polite"},Cje={class:"hint"},Mje={class:"desktop-update-row"},Aje={class:"rlabel"},Tje={class:"hint"},Eje={class:"select-wrap desktop-update-select"},Ije=["value"],$je={class:"desktop-update-row"},Lje={class:"rlabel"},Nje={class:"hint"},zje={class:"desktop-update-row"},Bje={class:"rlabel"},Rje={class:"hint"},Pje={key:0,class:"desktop-update-detail"},Fje={key:0,class:"desktop-update-progress"},jje=["aria-label"],Oje=["value","aria-label"],Hje={"data-testid":"settings-update-progress-detail"},Dje={class:"desktop-update-actions"},Vje={class:"panel"},Wje={class:"sec"},qje={class:"sec-title"},Uje={class:"row"},Zje={class:"rlabel"},Kje={class:"hint"},Gje={class:"row"},Yje={class:"rlabel"},Xje={class:"hint"},Jje={key:0,class:"flag-chip"},Qje={key:1,class:"flag-chip flag-chip--warn"},eOe={class:"row"},tOe={class:"rlabel"},nOe={class:"hint"},oOe={key:0,class:"flag-chip"},sOe={key:1,class:"flag-chip flag-chip--warn"},iOe={key:1,class:"empty-config"},lOe={class:"panel"},rOe={class:"panel-head"},aOe={class:"panel-title"},cOe={class:"panel-desc"},uOe={class:"archive-toolbar"},dOe={class:"archive-search"},fOe=["placeholder"],pOe={value:"all"},hOe=["value"],mOe={key:0,class:"archive-empty"},gOe={key:0,class:"archive-list"},vOe={class:"archive-workspace"},yOe={class:"path"},wOe={class:"count"},kOe={class:"setting-card"},bOe={class:"archive-meta"},_Oe={class:"archive-name"},xOe={class:"archive-time"},SOe={key:1,class:"archive-empty"},COe=100,MOe=Je({__name:"SettingsDialog",props:{colorScheme:{},accent:{},uiFontSize:{},authReady:{type:Boolean},accountModel:{},notify:{type:Boolean},notifyQuestion:{type:Boolean},notifyApproval:{type:Boolean},notifyPermission:{},sound:{type:Boolean},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},backend:{},experimentalFlagStates:{},subagentModelPolicy:{},subagentModelPolicySaving:{type:Boolean},initialTab:{}},emits:["setColorScheme","setAccent","setUiFontSize","setNotify","setNotifyQuestion","setNotifyApproval","setSound","setConversationToc","setTurnFolding","setActivityRunFolding","openOnboarding","updateConfig","saveSubagentModelPolicy","clearSubagentModelPolicy","close"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t,i=V(o.initialTab??"general"),l=z(()=>w9(o.uiFontSize)),r=typeof window>"u"?void 0:window.pythinkerDesktop,a=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"cute-bot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"},...r===void 0?[]:[{id:"update",labelKey:"settings.tabs.update",icon:"update-available"}],{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"}],c=$L().serverHttpUrl,u="0.1.2".trim()?"0.1.2":"0.0.0-dev",d=V(),f=V(!1),p=V();let h;const m=z(()=>d.value?.installedVersion??u),k=V(null),x=z(()=>k.value?.serverVersion||o.serverVersion||"-"),y=z(()=>k.value?.backend??o.backend??"v1"),w=z(()=>y.value==="v2"?"agent-gateway":"server"),_=V(!1),M=V(!1),P=V(0),{confirm:B,current:$}=B1(),T=["manual","yolo","auto"],I={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},N=V(null);Jz(N);function C(Ve){Ve.key==="Escape"&&$.value===null&&mt()}In(()=>{document.addEventListener("keydown",C),F(),r!==void 0&&(h=r.onUpdateState(Ve=>{d.value=Ve}),r.getUpdateState().then(Ve=>{d.value=Ve}))}),En(()=>{document.removeEventListener("keydown",C),h?.(),kn!==null&&clearTimeout(kn)});const O=z(()=>{const Ve=d.value;if(Ve===void 0)return n("settings.desktop.loading");switch(Ve.status){case"disabled":return n("settings.desktop.disabled");case"checking":return n("settings.desktop.checking");case"available":return n("settings.desktop.available",{version:Ve.availableVersion});case"downloading":return n("settings.desktop.downloading",{version:Ve.availableVersion});case"downloaded":return n("settings.desktop.downloaded",{version:Ve.availableVersion});case"skipped":return n("settings.desktop.skipped",{version:Ve.skippedVersion??Ve.availableVersion});case"error":return Ve.message??n("settings.desktop.errorGeneric");default:return n("settings.desktop.upToDate")}}),H=z(()=>{const Ve=d.value?.percent;return Ve===void 0||!Number.isFinite(Ve)?void 0:Math.min(100,Math.max(0,Ve))}),D=["stable","beta","nightly"],A=z(()=>{const Ve=d.value?.status;return f.value||Ve===void 0||Ve==="checking"||Ve==="downloading"||Ve==="downloaded"}),R=z(()=>{const Ve=d.value?.status;return f.value||Ve===void 0||Ve==="disabled"||Ve==="checking"||Ve==="downloading"||Ve==="downloaded"}),j=z(()=>{const Ve=d.value?.lastCheckedAt;if(Ve===void 0)return n("settings.desktop.neverChecked");const it=new Date(Ve);return Number.isNaN(it.getTime())?n("settings.desktop.neverChecked"):n("settings.desktop.lastChecked",{time:new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"}).format(it)})});function q(Ve){const it=["B","KB","MB","GB"];let Xe=Math.max(0,Ve),We=0;for(;Xe>=1024&&We{const Ve=d.value;if(Ve?.status!=="downloading")return"";const it=[];return H.value!==void 0&&it.push(`${Math.round(H.value)}%`),Ve.transferred!==void 0&&Ve.total!==void 0?it.push(n("settings.desktop.bytesOfTotal",{transferred:q(Ve.transferred),total:q(Ve.total)})):Ve.transferred!==void 0&&it.push(q(Ve.transferred)),Ve.bytesPerSecond!==void 0&&it.push(`${q(Ve.bytesPerSecond)}/s`),it.join(" · ")}),U=z(()=>p.value!==void 0?p.value:d.value?.status==="error"?O.value:void 0);async function te(Ve){if(!f.value){f.value=!0,p.value=void 0;try{d.value=await Ve()}catch(it){p.value=it instanceof Error?it.message:String(it)}finally{f.value=!1}}}function J(Ve){r!==void 0&&te(()=>r.setAutoUpdate(Ve))}function ee(Ve){r!==void 0&&D.includes(Ve)&&te(()=>r.setUpdateChannel(Ve))}function ie(Ve){r!==void 0&&te(()=>r.setNotifyUpdate(Ve))}function Q(){r!==void 0&&te(()=>r.checkForUpdates())}function he(){r!==void 0&&te(()=>r.downloadUpdate())}function xe(){const Ve=d.value?.availableVersion;r!==void 0&&Ve!==void 0&&te(()=>r.skipUpdate(Ve))}function Ye(){r!==void 0&&te(()=>r.undoSkippedUpdate())}function st(){const Ve=d.value?.availableVersion;r!==void 0&&Ve!==void 0&&te(()=>r.openUpdateReleaseNotes(Ve))}function X(){r!==void 0&&te(()=>r.restartToUpdate())}let se=0;async function F(){const Ve=++se;let it;try{it=await St().getMeta()}catch{it=null}Ve===se&&(k.value=it)}Ze(()=>o.config,()=>{F()});function Z(){MN()}const fe=z(()=>{const Ve=new Map;for(const it of o.models??[])Ve.set(it.id,{id:it.id,label:it.displayName??it.model??it.id,provider:it.provider});for(const[it,Xe]of Object.entries(o.config?.models??{})){if(Ve.has(it))continue;const We=oe(Xe);Ve.set(it,{id:it,label:de(it,Xe,We),provider:We??it})}return Array.from(Ve.values())}),ve=z(()=>{const Ve=new Map;for(const it of fe.value){const Xe=Ve.get(it.provider)??[];Xe.push(it),Ve.set(it.provider,Xe)}for(const[it,Xe]of Ve)Ve.set(it,Xe.toSorted((We,je)=>We.label.localeCompare(je.label)));return Array.from(Ve.entries()).toSorted(([it],[Xe])=>it.localeCompare(Xe)).map(([it,Xe])=>({provider:it,options:Xe}))}),ge=z(()=>{const Ve=o.config?.defaultPermissionMode;return Ve==="auto"||Ve==="yolo"||Ve==="manual"?Ve:"manual"});function oe(Ve){if(!Ve||typeof Ve!="object")return;const it=Ve;return typeof it.provider=="string"?it.provider:void 0}function de(Ve,it,Xe){if(!it||typeof it!="object")return Ve;const We=it,je=typeof We.model=="string"?We.model:void 0,kt=Xe??oe(it);return je&&kt?`${Ve} (${kt}/${je})`:je?`${Ve} (${je})`:Ve}function ke(Ve){return Ve===!0}function Se(Ve){!Ve||Ve===o.config?.defaultModel||s("updateConfig",{defaultModel:Ve})}function me(Ve){Ve!==ge.value&&s("updateConfig",{defaultPermissionMode:Ve})}function Ae(Ve){const it=o.config?.[Ve];s("updateConfig",{[Ve]:!ke(it)})}function le(){const Ve=o.config?.thinking;return!Ve||typeof Ve!="object"?!0:Ve.enabled!==!1}function be(){s("updateConfig",{thinking:{enabled:!le()}})}function _e(){const Ve=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!Ve})}async function Ke(Ve){Ve!==i.value&&await Qe()&&(i.value=Ve)}async function Qe(){if(!M.value)return!0;const Ve=await B({title:n("providers.unsavedTitle"),message:n("providers.unsavedBody"),confirmLabel:n("providers.unsavedDiscard"),cancelLabel:n("providers.unsavedStay"),variant:"danger"});return Ve&&(M.value=!1,P.value+=1),Ve}async function mt(){await Qe()&&s("close")}function Tt(){return[`App version: ${m.value}`,`Server version: ${x.value}`,`Backend: ${y.value}`,`Server address: ${c}`,`Server ID: ${k.value?.serverId||"-"}`,`User agent: ${typeof navigator>"u"?"-":navigator.userAgent}`].join(` -`)}async function qt(){_.value=await fs(Tt())}const nn=V(!1),Jt=V(!1);let kn=null;function Dn(){kn!==null&&clearTimeout(kn),kn=setTimeout(()=>{nn.value=!1,Jt.value=!1,kn=null},1500)}async function xn(){await fs(x.value)&&(nn.value=!0,Dn())}async function Ln(){await fs(c)&&(Jt.value=!0,Dn())}const Hn=z(()=>Object.fromEntries((o.models??[]).map(Ve=>[Ve.id,Ve])));function bn(Ve){return o.config?.experimental?.[Ve]===!0}function Wn(Ve){return k.value?.experimentalFlagStates?.find(Xe=>Xe.id===Ve)??o.experimentalFlagStates?.find(Xe=>Xe.id===Ve)}function Pn(Ve,it){const Xe={...o.config?.experimental,[Ve]:it};s("updateConfig",{experimental:Xe})}const Mn=["inherit","default","pool","force"],Nn=V("inherit"),An=V(""),Qn=V(""),Fn=V(new Set);function Qt(Ve){Nn.value=Ve?.mode??"inherit",An.value=Ve!==void 0&&Ve.mode!=="inherit"?Ve.defaultModel:"",Qn.value=Ve!==void 0&&Ve.mode!=="inherit"?Ve.defaultEffort??"":"",Fn.value=new Set(Ve?.mode==="pool"?Object.keys(Ve.models):[])}Ze(()=>o.subagentModelPolicy?.policy,Qt,{immediate:!0,deep:!0});function uo(){const Ve=Qn.value||void 0;switch(Nn.value){case"inherit":return{mode:"inherit"};case"default":case"force":return An.value?{mode:Nn.value,defaultModel:An.value,defaultEffort:Ve}:void 0;case"pool":{if(Fn.value.size===0||!Fn.value.has(An.value))return;const it=Object.fromEntries([...Fn.value].map(Xe=>[Xe,""]));return{mode:"pool",defaultModel:An.value,models:it,defaultEffort:Ve}}}}function Zn(){const Ve=uo();if(Ve!==void 0){if(Ve.mode==="inherit"){o.subagentModelPolicy?.policy.mode!=="inherit"&&s("clearSubagentModelPolicy");return}s("saveSubagentModelPolicy",Ve)}}function Bo(Ve){Nn.value!==Ve&&(Nn.value=Ve,Ve==="pool"&&Fn.value.size===0&&An.value&&(Fn.value=new Set([An.value])),Zn())}function Un(Ve){An.value=Ve.model,Qn.value=Ve.effort??"",Zn()}function hs(Ve){const it=new Set(Fn.value);it.has(Ve)?it.delete(Ve):it.add(Ve),Fn.value=it,it.has(An.value)||(An.value=[...it][0]??""),Zn()}function Io(Ve){!Fn.value.has(Ve)||An.value===Ve||(An.value=Ve,Zn())}function Bt(Ve){return fe.value.find(it=>it.id===Ve)?.label??Ve}function Jo(Ve){switch(Ve.mode){case"inherit":return n("settings.subagentRouting.summaryInherit");case"pool":return`${n("settings.subagentRouting.mode.pool")} · ${n("settings.subagentRouting.summaryPool",{count:Object.keys(Ve.models).length,model:Bt(Ve.defaultModel)})}`;default:{const it=Ve.defaultEffort?` · ${Ve.defaultEffort}`:"";return`${n(`settings.subagentRouting.mode.${Ve.mode}`)} · ${Bt(Ve.defaultModel)}${it}`}}}function $s(Ve){const it=ez(Ve);it!==void 0&&s("setUiFontSize",it)}const ze=P1(),Ge=V([]),ot=V(!1),dt=V(!1),Ct=V(""),Ft=V("all"),Ut=V("archived-desc");async function en(){if(!(ot.value||dt.value)){ot.value=!0;try{const Ve=[];let it;for(;;){const Xe=await ze.loadArchivedSessions({beforeId:it,pageSize:COe});if(Ve.push(...Xe.items),!Xe.hasMore||Xe.items.length===0)break;const We=Xe.items.at(-1)?.id;if(We===void 0)break;it=We}Ge.value=Ve,dt.value=!0}catch(Ve){console.warn("loadAllArchived failed",Ve)}finally{ot.value=!1}}}Ze(i,Ve=>{Ve==="archived"&&!dt.value&&en()});const tn=z(()=>{const Ve=new Set;for(const it of Ge.value)Ve.add(it.cwd);return Array.from(Ve).toSorted((it,Xe)=>it.localeCompare(Xe))}),eo=z(()=>{const Ve=Ct.value.trim().toLowerCase();let it=Ge.value.filter(Xe=>Xe.archived===!0);return Ft.value!=="all"&&(it=it.filter(Xe=>Xe.cwd===Ft.value)),Ve&&(it=it.filter(Xe=>Xe.title.toLowerCase().includes(Ve))),Ut.value==="archived-desc"?it.toSorted((Xe,We)=>We.updatedAt.localeCompare(Xe.updatedAt)):Ut.value==="created-desc"?it.toSorted((Xe,We)=>We.createdAt.localeCompare(Xe.createdAt)):it.toSorted((Xe,We)=>Xe.title.localeCompare(We.title,"en"))}),Ro=z(()=>{const Ve=new Map;for(const it of eo.value){const Xe=Ve.get(it.cwd)??[];Xe.push(it),Ve.set(it.cwd,Xe)}return Array.from(Ve.entries()).map(([it,Xe])=>({cwd:it,items:Xe}))});async function Ls(Ve){await ze.restoreSession(Ve)&&(Ge.value=Ge.value.filter(Xe=>Xe.id!==Ve))}function Do(Ve){const it=new Date(Ve);if(Number.isNaN(it.getTime()))return Ve;const Xe=We=>String(We).padStart(2,"0");return`${it.getFullYear()}-${Xe(it.getMonth()+1)}-${Xe(it.getDate())} ${Xe(it.getHours())}:${Xe(it.getMinutes())}`}return(Ve,it)=>(g(),ue(K0,{open:!0,"close-on-esc":!1,title:v(n)("settings.title"),size:"xl",height:"fixed",padded:!1,onClose:mt},{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:N,class:"sd"},[b("nav",{class:"settings-tabs",role:"tablist","aria-label":v(n)("settings.title")},[(g(),S(Ce,null,at(a,Xe=>b("button",{key:Xe.id,type:"button",class:Pe(["tab",{on:i.value===Xe.id}]),role:"tab","aria-selected":i.value===Xe.id,onClick:We=>Ke(Xe.id)},[W(Ie,{name:Xe.icon,size:"sm"},null,8,["name"]),Oe(" "+E(v(n)(Xe.labelKey)),1)],10,oPe)),64))],8,nPe),b("div",sPe,[Jn(b("section",iPe,[b("section",lPe,[b("h3",rPe,E(v(n)("settings.appearance")),1),b("div",aPe,[b("span",cPe,E(v(n)("theme.colorSchemeLabel")),1),W(di,{"model-value":e.colorScheme,options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":it[0]||(it[0]=Xe=>s("setColorScheme",Xe))},null,8,["model-value","options"])]),b("div",uPe,[b("span",dPe,E(v(n)("theme.accentLabel")),1),W(di,{"model-value":e.accent,options:[{value:"blue",label:v(n)("theme.accentBlue")},{value:"mono",label:v(n)("theme.accentBlack")}],"onUpdate:modelValue":it[1]||(it[1]=Xe=>s("setAccent",Xe))},null,8,["model-value","options"])]),b("div",fPe,[b("span",pPe,E(v(n)("settings.uiFontSize")),1),W(di,{"model-value":l.value,options:v(YN),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":$s},null,8,["model-value","options","aria-label"])])]),b("section",hPe,[b("h3",mPe,E(v(n)("settings.messageFolding")),1),b("div",gPe,[b("span",vPe,[Oe(E(v(n)("settings.turnFolding"))+" ",1),b("span",yPe,E(v(n)("settings.turnFoldingHint")),1)]),W(wi,{"model-value":e.turnFolding??!0,label:v(n)("settings.turnFolding"),"onUpdate:modelValue":it[2]||(it[2]=Xe=>s("setTurnFolding",Xe))},null,8,["model-value","label"])]),b("div",wPe,[b("span",kPe,[Oe(E(v(n)("settings.activityRunFolding"))+" ",1),b("span",bPe,E(v(n)("settings.activityRunFoldingHint")),1)]),W(wi,{"model-value":e.activityRunFolding??!0,label:v(n)("settings.activityRunFolding"),"onUpdate:modelValue":it[3]||(it[3]=Xe=>s("setActivityRunFolding",Xe))},null,8,["model-value","label"])])]),b("section",_Pe,[b("h3",xPe,E(v(n)("settings.notifications")),1),b("div",SPe,[b("span",CPe,[Oe(E(v(n)("settings.notifyOnComplete"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",MPe,E(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnComplete"),"onUpdate:modelValue":it[4]||(it[4]=Xe=>s("setNotify",Xe))},null,8,["model-value","disabled","label"])]),b("div",APe,[b("span",TPe,[Oe(E(v(n)("settings.notifyOnQuestion"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",EPe,E(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyQuestion,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnQuestion"),"onUpdate:modelValue":it[5]||(it[5]=Xe=>s("setNotifyQuestion",Xe))},null,8,["model-value","disabled","label"])]),b("div",IPe,[b("span",$Pe,[Oe(E(v(n)("settings.notifyOnApproval"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",LPe,E(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyApproval,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnApproval"),"onUpdate:modelValue":it[6]||(it[6]=Xe=>s("setNotifyApproval",Xe))},null,8,["model-value","disabled","label"])]),b("div",NPe,[b("span",zPe,E(v(n)("settings.soundOnComplete")),1),W(wi,{"model-value":e.sound,label:v(n)("settings.soundOnComplete"),"onUpdate:modelValue":it[7]||(it[7]=Xe=>s("setSound",Xe))},null,8,["model-value","label"])])])],512),[[_i,i.value==="general"]]),Jn(b("section",BPe,[b("section",RPe,[b("h3",PPe,E(v(n)("settings.account")),1),b("div",FPe,[b("span",jPe,E(e.authReady?v(n)("settings.providers"):v(n)("sidebar.notSignedIn")),1),W(Cn,{text:e.accountModel},{default:ae(()=>[e.authReady&&e.accountModel?(g(),S("span",OPe,E(e.accountModel),1)):Y("",!0)]),_:1},8,["text"])]),b("div",HPe,[W(Nt,{variant:"secondary",size:"sm",onClick:it[8]||(it[8]=Xe=>{s("openOnboarding"),s("close")})},{default:ae(()=>[Oe(E(v(n)("onboarding.reopen")),1)]),_:1}),W(Nt,{variant:"primary",size:"sm",onClick:it[9]||(it[9]=Xe=>Ke("providers"))},{default:ae(()=>[Oe(E(v(n)("settings.manageProviders")),1)]),_:1})])])],512),[[_i,i.value==="account"]]),Jn(b("section",DPe,[W(jRe,{"discard-token":P.value,onDirtyChange:it[10]||(it[10]=Xe=>M.value=Xe)},null,8,["discard-token"])],512),[[_i,i.value==="providers"]]),Jn(b("section",VPe,[b("section",WPe,[b("div",qPe,[b("h3",UPe,E(v(n)("settings.agentDefaults")),1),e.configSaving?(g(),S("span",ZPe,E(v(n)("settings.saving")),1)):Y("",!0)]),e.config?(g(),S(Ce,{key:0},[b("div",KPe,[b("span",GPe,[Oe(E(v(n)("settings.defaultModel"))+" ",1),b("span",YPe,E(v(n)("settings.defaultModelHint")),1)]),ve.value.length>0?(g(),S("div",XPe,[W(P4,{"model-value":e.config.defaultModel??"",disabled:e.configSaving,"aria-label":v(n)("settings.defaultModel"),"onUpdate:modelValue":Se},{default:ae(()=>[e.config.defaultModel?Y("",!0):(g(),S("option",JPe,E(v(n)("settings.noDefaultModel")),1)),(g(!0),S(Ce,null,at(ve.value,Xe=>(g(),S("optgroup",{key:Xe.provider,label:Xe.provider},[(g(!0),S(Ce,null,at(Xe.options,We=>(g(),S("option",{key:We.id,value:We.id},E(We.label),9,eFe))),128))],8,QPe))),128))]),_:1},8,["model-value","disabled","aria-label"])])):(g(),S("span",tFe,E(e.config.defaultModel??v(n)("settings.noDefaultModel")),1))]),e.subagentModelPolicy?(g(),S("section",nFe,[b("h3",oFe,E(v(n)("settings.subagentRouting.title")),1),b("div",{class:"routing-modes",role:"radiogroup","aria-label":v(n)("settings.subagentRouting.title")},[(g(),S(Ce,null,at(Mn,Xe=>b("label",{key:Xe,class:Pe(["routing-mode",{on:Nn.value===Xe}])},[b("input",{type:"radio",name:"subagent-routing-mode",value:Xe,checked:Nn.value===Xe,disabled:e.subagentModelPolicySaving,onChange:We=>Bo(Xe)},null,40,iFe),b("span",lFe,E(v(n)(`settings.subagentRouting.mode.${Xe}`)),1),b("span",rFe,E(v(n)(`settings.subagentRouting.modeHint.${Xe}`)),1)],2)),64))],8,sFe),Nn.value==="default"||Nn.value==="force"?(g(),S("div",aFe,[b("span",cFe,[Oe(E(v(n)("settings.subagentRouting.model"))+" ",1),b("span",uFe,E(v(n)("settings.subagentRouting.modelHint")),1)]),ve.value.length>0?(g(),ue(tPe,{key:0,"model-value":An.value,effort:Qn.value,groups:ve.value,"model-info-by-id":Hn.value,disabled:e.subagentModelPolicySaving,onInherit:it[11]||(it[11]=Xe=>Bo("inherit")),onSelect:Un},null,8,["model-value","effort","groups","model-info-by-id","disabled"])):(g(),S("span",dFe,E(v(n)("settings.noSecondaryModel")),1))])):Nn.value==="pool"?(g(),S("div",fFe,[b("span",pFe,[Oe(E(v(n)("settings.subagentRouting.pool"))+" ",1),b("span",hFe,E(v(n)("settings.subagentRouting.poolHint")),1)]),b("div",mFe,[(g(!0),S(Ce,null,at(fe.value,Xe=>(g(),S("label",{key:Xe.id,class:"pool-item"},[b("input",{type:"checkbox",value:Xe.id,checked:Fn.value.has(Xe.id),disabled:e.subagentModelPolicySaving,onChange:We=>hs(Xe.id)},null,40,gFe),b("span",vFe,E(Xe.label),1),b("button",{type:"button",class:Pe(["pool-default",{on:An.value===Xe.id}]),disabled:!Fn.value.has(Xe.id)||e.subagentModelPolicySaving,onClick:We=>Io(Xe.id)},E(An.value===Xe.id?v(n)("settings.subagentRouting.poolDefault"):v(n)("settings.subagentRouting.makeDefault")),11,yFe)]))),128))])])):Y("",!0),b("div",wFe,[b("span",kFe,[Oe(E(v(n)("settings.subagentRouting.saved"))+" ",1),b("span",bFe,E(Jo(e.subagentModelPolicy.configuredPolicy)),1)]),b("span",_Fe,[Oe(E(v(n)("settings.subagentRouting.effective"))+" ",1),b("span",xFe,E(Jo(e.subagentModelPolicy.effectivePolicy)),1)]),e.subagentModelPolicy.feature.enabled?Y("",!0):(g(),S("span",SFe,E(v(n)("settings.subagentRouting.featureDisabled")),1))])])):Y("",!0),b("div",CFe,[b("span",MFe,[Oe(E(v(n)("settings.defaultPermission"))+" ",1),b("span",AFe,E(v(n)("settings.defaultPermissionHint")),1)]),W(di,{"model-value":ge.value,options:T.map(Xe=>({value:Xe,label:v(n)(I[Xe])})),"onUpdate:modelValue":it[12]||(it[12]=Xe=>me(Xe))},null,8,["model-value","options"])]),b("div",TFe,[b("span",EFe,[Oe(E(v(n)("settings.defaultThinking"))+" ",1),b("span",IFe,E(v(n)("settings.defaultThinkingHint")),1)]),W(wi,{"model-value":le(),disabled:e.configSaving,label:v(n)("settings.defaultThinking"),"onUpdate:modelValue":it[13]||(it[13]=Xe=>be())},null,8,["model-value","disabled","label"])]),b("div",$Fe,[b("span",LFe,[Oe(E(v(n)("settings.defaultPlanMode"))+" ",1),b("span",NFe,E(v(n)("settings.defaultPlanModeHint")),1)]),W(wi,{"model-value":ke(e.config.defaultPlanMode),disabled:e.configSaving,label:v(n)("settings.defaultPlanMode"),"onUpdate:modelValue":it[14]||(it[14]=Xe=>Ae("defaultPlanMode"))},null,8,["model-value","disabled","label"])]),b("div",zFe,[b("span",BFe,[Oe(E(v(n)("settings.mergeSkills"))+" ",1),b("span",RFe,E(v(n)("settings.mergeSkillsHint")),1)]),W(wi,{"model-value":ke(e.config.mergeAllAvailableSkills),disabled:e.configSaving,label:v(n)("settings.mergeSkills"),"onUpdate:modelValue":it[15]||(it[15]=Xe=>Ae("mergeAllAvailableSkills"))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",PFe,E(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="agent"]]),Jn(b("section",FFe,[b("section",jFe,[b("h3",OFe,E(v(n)("settings.versionAndUpdates")),1),b("div",HFe,[b("span",DFe,[Oe(E(v(n)("settings.appVersion"))+" ",1),b("span",VFe,E(v(n)("settings.appVersionHint")),1)]),b("span",WFe,E(m.value),1)]),b("div",qFe,[b("span",UFe,[Oe(E(v(n)("settings.serverVersion"))+" ",1),b("span",ZFe,E(v(n)("settings.serverVersionHint")),1)]),b("span",KFe,[b("span",GFe,E(x.value),1),W(Dt,{size:"sm",label:nn.value?v(n)("settings.copied"):v(n)("settings.copyServerVersion"),"data-testid":"copy-server-version",onClick:xn},{default:ae(()=>[W(Ie,{name:nn.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",YFe,[b("span",XFe,[Oe(E(v(n)("settings.serverAddress"))+" ",1),b("span",JFe,E(v(n)("settings.serverAddressHint")),1)]),b("span",QFe,[b("span",eje,E(v(c)),1),W(Dt,{size:"sm",label:Jt.value?v(n)("settings.copied"):v(n)("settings.copyServerAddress"),"data-testid":"copy-server-address",onClick:Ln},{default:ae(()=>[W(Ie,{name:Jt.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",tje,[b("span",nje,E(v(n)("settings.backend")),1),b("span",oje,E(w.value),1)])]),e.config?(g(),S("section",sje,[e.config?(g(),S("div",ije,[b("span",lje,[Oe(E(v(n)("settings.telemetry"))+" ",1),b("span",rje,E(v(n)("settings.telemetryHint")),1),b("span",aje,E(v(n)("settings.telemetryRestartHint")),1)]),W(wi,{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:v(n)("settings.telemetry"),"onUpdate:modelValue":it[16]||(it[16]=Xe=>_e())},null,8,["model-value","disabled","label"])])):Y("",!0)])):Y("",!0),b("section",cje,[b("h3",uje,E(v(n)("settings.diagnostics")),1),b("div",dje,[b("span",fje,[Oe(E(v(n)("settings.exportLog"))+" ",1),v(pr)()?Y("",!0):(g(),S("span",pje,E(v(n)("settings.logHint")),1))]),W(Nt,{variant:"secondary",size:"sm",onClick:Z},{default:ae(()=>[Oe(E(v(n)("settings.exportLogBtn")),1)]),_:1})]),b("div",hje,[b("span",mje,E(v(n)("settings.copyDetails")),1),W(Nt,{"data-testid":"copy-diagnostics",variant:"secondary",size:"sm",onClick:qt},{default:ae(()=>[Oe(E(_.value?v(n)("settings.copied"):v(n)("settings.copyDetails")),1)]),_:1})])])],512),[[_i,i.value==="advanced"]]),Jn(b("section",gje,[v(r)?(g(),S("section",vje,[b("h3",yje,E(v(n)("settings.tabs.update")),1),b("div",wje,[b("div",kje,[b("div",bje,[b("span",_je,[W(Ie,{name:"download",size:"md"})]),b("span",xje,[b("span",Sje,E(O.value),1),b("span",Cje,E(j.value),1)])]),W(Nt,{"data-testid":"settings-check-update",variant:"secondary",size:"sm",loading:d.value?.status==="checking",disabled:R.value,onClick:Q},{default:ae(()=>[Oe(E(v(n)("settings.desktop.checkNow")),1)]),_:1},8,["loading","disabled"])]),b("div",Mje,[b("span",Aje,[Oe(E(v(n)("settings.desktop.updateChannel"))+" ",1),b("span",Tje,E(v(n)("settings.desktop.updateChannelHint")),1)]),b("div",Eje,[W(P4,{"data-testid":"desktop-update-channel",size:"sm","model-value":d.value?.channel??"stable",disabled:A.value,"aria-label":v(n)("settings.desktop.updateChannel"),"onUpdate:modelValue":ee},{default:ae(()=>[(g(),S(Ce,null,at(D,Xe=>b("option",{key:Xe,value:Xe},E(v(n)(`settings.desktop.channels.${Xe}`)),9,Ije)),64))]),_:1},8,["model-value","disabled","aria-label"])])]),b("div",$je,[b("span",Lje,[Oe(E(v(n)("settings.desktop.automaticChecks"))+" ",1),b("span",Nje,E(v(n)("settings.desktop.automaticChecksHint")),1)]),W(wi,{"data-testid":"automatic-update-checks","model-value":d.value?.autoUpdate??!1,disabled:f.value||d.value===void 0||d.value.status==="disabled",label:v(n)("settings.desktop.automaticChecks"),"onUpdate:modelValue":J},null,8,["model-value","disabled","label"])]),b("div",zje,[b("span",Bje,[Oe(E(v(n)("settings.desktop.notifyUpdates"))+" ",1),b("span",Rje,E(v(n)("settings.desktop.notifyUpdatesHint")),1)]),W(wi,{"data-testid":"update-notifications","model-value":d.value?.notifyUpdate??!0,disabled:f.value||d.value===void 0,label:v(n)("settings.desktop.notifyUpdates"),"onUpdate:modelValue":ie},null,8,["model-value","disabled","label"])]),d.value?.status==="downloading"||U.value||d.value?.availableVersion?(g(),S("div",Pje,[d.value?.status==="downloading"?(g(),S("div",Fje,[H.value===void 0?(g(),S("progress",{key:0,"data-testid":"settings-update-progress",max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,jje)):(g(),S("progress",{key:1,"data-testid":"settings-update-progress",value:H.value,max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,Oje)),b("span",Hje,E(K.value||v(n)("settings.desktop.fetching")),1)])):Y("",!0),U.value?(g(),ue(U9,{key:1,variant:"danger"},{default:ae(()=>[Oe(E(U.value),1)]),_:1})):Y("",!0),b("div",Dje,[d.value?.availableVersion?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",disabled:f.value,onClick:st},{default:ae(()=>[Oe(E(v(n)("settings.desktop.viewNotes")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"?(g(),ue(Nt,{key:1,variant:"ghost",size:"sm",disabled:f.value,onClick:xe},{default:ae(()=>[Oe(E(v(n)("settings.desktop.skip")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"||d.value?.status==="error"&&d.value.availableVersion?(g(),ue(Nt,{key:2,"data-testid":"settings-download-update",size:"sm",loading:f.value,onClick:he},{default:ae(()=>[Oe(E(d.value?.status==="error"?v(n)("settings.desktop.retryDownload"):v(n)("settings.desktop.download")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="skipped"?(g(),ue(Nt,{key:3,size:"sm",loading:f.value,onClick:Ye},{default:ae(()=>[Oe(E(v(n)("settings.desktop.undoSkip")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="downloaded"?(g(),ue(Nt,{key:4,"data-testid":"settings-restart-update",size:"sm",loading:f.value,onClick:X},{default:ae(()=>[Oe(E(v(n)("settings.desktop.restartToUpdate")),1)]),_:1},8,["loading"])):Y("",!0)])])):Y("",!0)])])):Y("",!0)],512),[[_i,i.value==="update"]]),Jn(b("section",Vje,[b("section",Wje,[b("h3",qje,E(v(n)("settings.tabs.lab")),1),b("div",Uje,[b("span",Zje,[Oe(E(v(n)("settings.conversationToc"))+" ",1),b("span",Kje,E(v(n)("settings.conversationTocHint")),1)]),W(wi,{"model-value":e.conversationToc??!0,label:v(n)("settings.conversationToc"),"onUpdate:modelValue":it[17]||(it[17]=Xe=>s("setConversationToc",Xe))},null,8,["model-value","label"])]),e.config?(g(),S(Ce,{key:0},[b("div",Gje,[b("span",Yje,[Oe(E(v(n)("settings.lab.sidebarTabs"))+" ",1),b("span",Xje,E(v(n)("settings.lab.sidebarTabsHint")),1),Wn("sidebarTabs")?.externallyControlled?(g(),S("span",Jje,E(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("sidebarTabs")?.overridden?(g(),S("span",Qje,E(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("sidebarTabs"),disabled:e.configSaving,label:v(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":it[18]||(it[18]=Xe=>Pn("sidebarTabs",Xe))},null,8,["model-value","disabled","label"])]),b("div",eOe,[b("span",tOe,[Oe(E(v(n)("settings.lab.secondaryModel"))+" ",1),b("span",nOe,E(v(n)("settings.lab.secondaryModelHint")),1),Wn("secondary-model")?.externallyControlled?(g(),S("span",oOe,E(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("secondary-model")?.overridden?(g(),S("span",sOe,E(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("secondary-model"),disabled:e.configSaving,label:v(n)("settings.lab.secondaryModel"),"onUpdate:modelValue":it[19]||(it[19]=Xe=>Pn("secondary-model",Xe))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",iOe,E(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="lab"]]),Jn(b("section",lOe,[b("div",rOe,[it[23]||(it[23]=b("div",{class:"panel-kicker"},"Archived sessions",-1)),b("h4",aOe,E(v(n)("settings.archivedTitle")),1),b("p",cOe,E(v(n)("settings.archivedDesc")),1)]),b("div",uOe,[b("label",dOe,[it[24]||(it[24]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("circle",{cx:"11",cy:"11",r:"7"}),b("path",{d:"m21 21-4.3-4.3"})],-1)),Jn(b("input",{"onUpdate:modelValue":it[20]||(it[20]=Xe=>Ct.value=Xe),placeholder:v(n)("settings.archivedSearch")},null,8,fOe),[[js,Ct.value]])]),W(P4,{"model-value":Ft.value,size:"sm","aria-label":v(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":it[21]||(it[21]=Xe=>Ft.value=Xe)},{default:ae(()=>[b("option",pOe,E(v(n)("settings.archivedAllWorkspaces")),1),(g(!0),S(Ce,null,at(tn.value,Xe=>(g(),S("option",{key:Xe,value:Xe},E(Xe),9,hOe))),128))]),_:1},8,["model-value","aria-label"]),W(di,{size:"sm","model-value":Ut.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":it[22]||(it[22]=Xe=>Ut.value=Xe)},null,8,["model-value","options"])]),ot.value?(g(),S("div",mOe,E(v(n)("settings.archivedLoadingAll")),1)):(g(),S(Ce,{key:1},[Ro.value.length>0?(g(),S("div",gOe,[(g(!0),S(Ce,null,at(Ro.value,Xe=>(g(),S("section",{key:Xe.cwd,class:"archive-card"},[b("div",vOe,[it[25]||(it[25]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("path",{d:"M3 7h6l2 2h10v9H3z"}),b("path",{d:"M3 7V5h6l2 2"})],-1)),b("span",yOe,E(Xe.cwd),1),b("span",wOe,E(v(n)("settings.archivedSessionsCount",{count:Xe.items.length})),1)]),b("div",kOe,[(g(!0),S(Ce,null,at(Xe.items,We=>(g(),S("div",{key:We.id,class:"archive-row"},[b("div",bOe,[b("div",_Oe,E(We.title),1),b("div",xOe,E(v(n)("settings.archivedAt",{time:Do(We.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:je=>Ls(We.id)},{default:ae(()=>[Oe(E(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(g(),S("div",SOe,E(Ge.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))],512),[[_i,i.value==="archived"]])])],512)]),_:1},8,["title"]))}}),AOe=vt(MOe,[["__scopeId","data-v-c89555a1"]]),TOe=/^(?:\/|~(?:\/|$)|[A-Za-z]:[\\/]|\\\\)/,oB=/^[A-Za-z]:[\\/]/,EOe=/^\/\/(?!\/)/;function Jm(e){return TOe.test(e.trim())}function IOe(e,t){return e==="~"?t||e:e.startsWith("~/")?(t||"~")+e.slice(1):e}function $Oe(e){return EOe.test(e)?`//${e.slice(2).replaceAll(/\/{2,}/g,"/")}`:e.replaceAll(/\/{2,}/g,"/")}function LOe(e){return oB.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function NOe(e){return oB.test(e)?3:e.startsWith("\\\\")||e.startsWith("//")?2:e.startsWith("/")?1:0}function ng(e,t){let n=$Oe(IOe(e.trim(),t));const o=LOe(n),s=n==="/"||n==="//"||n==="\\\\"||/^[A-Za-z]:[\\/]$/.test(n),i=o?/[\\/]$/.test(n):n.endsWith("/");!s&&i&&(n=n.slice(0,-1));const l=n.lastIndexOf("/"),r=o?n.lastIndexOf("\\"):-1,a=Math.max(l,r),c=r>l?"\\":"/",u=NOe(n),d=ad.value.trim().length>0);let m=0,k=null;const x=z(()=>Jm(d.value)),y=V("idle"),w=V(""),_=V("/"),M=V([]),P=V(""),B=V(null),$=V(null),T=z(()=>y.value!=="valid"?null:BOe(d.value,P.value,$.value));let I=0,N=null;function C(ie,Q){const he=ie.toLowerCase(),xe=Q.toLowerCase();let Ye=0;for(let st=0;st0&&X=bM))break;se.depth+1{k&&clearTimeout(k),N&&clearTimeout(N),I++,y.value="idle",M.value=[],$.value=null;const Q=ie.trim();if(Q===""){m++,p.value=[],f.value=!1;return}if(Jm(Q)){if(m++,p.value=[],f.value=!1,r.value)return;y.value="checking",N=setTimeout(()=>void H(Q),150);return}k=setTimeout(()=>void O(ie),220)});async function H(ie){const Q=++I;y.value="checking",$.value=null;const he=ng(ie,P.value),{target:xe}=he;try{const st=await o.browseFs(xe);if(Q!==I)return;if(st.path){y.value="valid",M.value=[],$.value=xe,a.value=st.path,c.value=st.parent,u.value=st.entries,r.value=!1;return}}catch{}if(Q!==I)return;const Ye=he.base.toLowerCase();w.value=he.parent,_.value=he.separator;try{const st=await o.browseFs(he.parent);if(Q!==I)return;if(st.path){M.value=st.entries.filter(X=>X.isDir&&X.name.toLowerCase().startsWith(Ye)),y.value="not-found";return}}catch{}Q===I&&(M.value=[],y.value="bad-parent")}function D(ie){d.value=zOe(w.value,ie,_.value),B.value?.focus()}const A=z(()=>r.value?n("workspace.degradedPlaceholder"):n("workspace.searchPlaceholder")),R=z(()=>r.value?n("workspace.degradedHint"):x.value&&y.value==="valid"?n("workspace.pathFollowHint"):n("workspace.browseHint"));function j(ie){if(ie.key==="Escape"){d.value?d.value="":s("close");return}if(ie.key!=="Enter")return;const Q=d.value.trim();if(Jm(Q)){if(ie.preventDefault(),r.value){const{target:he}=ng(Q,P.value);he&&s("add",he);return}y.value==="valid"?ee():y.value==="not-found"&&M.value[0]&&D(M.value[0].name)}}const q=z(()=>{const ie=a.value;if(!ie)return[];const Q=ie.split("/").filter(Boolean),he=[{label:"/",path:"/"}];let xe="";for(const Ye of Q)xe+=`/${Ye}`,he.push({label:Ye,path:xe});return he}),K=z(()=>!(a.value.length===0||x.value&&T.value===null));async function U(ie){l.value=!0;try{const Q=await o.browseFs(ie);if(!Q.path){r.value=!0;return}a.value=Q.path,c.value=Q.parent,u.value=Q.entries,d.value="",r.value=!1}catch{r.value=!0}finally{l.value=!1}}function te(ie){ie.isDir&&U(ie.path)}function J(){c.value&&U(c.value)}function ee(){K.value&&s("add",T.value??a.value)}return In(async()=>{l.value=!0;try{const ie=await o.getFsHome().catch(()=>({home:"",recentRoots:[]}));if(ie.home&&(P.value=ie.home),o.defaultPath&&(await U(o.defaultPath),!r.value))return;P.value?await U(P.value):r.value=!0}catch{r.value=!0}finally{l.value=!1}}),En(()=>{k&&clearTimeout(k),N&&clearTimeout(N)}),(ie,Q)=>(g(),ue(K0,{open:i.value,"onUpdate:open":Q[2]||(Q[2]=he=>i.value=he),title:v(n)("workspace.addTitle"),size:"lg",height:"fixed",onClose:Q[3]||(Q[3]=he=>s("close"))},{default:ae(()=>[b("div",ROe,[r.value?Y("",!0):(g(),S("div",POe,[W(Dt,{size:"sm",disabled:!c.value,label:v(n)("workspace.up"),onClick:J},{default:ae(()=>[W(Ie,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),b("div",FOe,[(g(!0),S(Ce,null,at(q.value,(he,xe)=>(g(),S(Ce,{key:he.path},[xe>1?(g(),S("span",jOe,"/")):Y("",!0),b("button",{class:Pe(["crumb",{last:xe===q.value.length-1}]),onClick:Ye=>U(he.path)},E(he.label),11,OOe)],64))),128))])])),!l.value||r.value?(g(),S("div",{key:1,class:Pe(["filterbar",{"has-error":y.value==="not-found"||y.value==="bad-parent"}])},[W(Ie,{class:"filter-icon",name:"search",size:"md"}),Jn(b("input",{ref_key:"filterEl",ref:B,"onUpdate:modelValue":Q[0]||(Q[0]=he=>d.value=he),class:"filter-input",type:"text",placeholder:A.value,autocomplete:"off",spellcheck:"false",onKeydown:_t(j,["stop"])},null,40,HOe),[[js,d.value]]),f.value||y.value==="checking"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0)],2)):Y("",!0),r.value?(g(),S("div",oHe,E(v(n)("workspace.degradedHint")),1)):(g(),S("div",DOe,[l.value?(g(),S("div",VOe,E(v(n)("workspace.browsing")),1)):x.value&&y.value!=="valid"?(g(),S(Ce,{key:1},[y.value==="checking"?(g(),S("div",WOe,E(v(n)("workspace.checkingPath")),1)):y.value==="not-found"?(g(),S(Ce,{key:1},[M.value.length>0?(g(),S("div",qOe,E(v(n)("workspace.pathPickHint")),1)):Y("",!0),(g(!0),S(Ce,null,at(M.value,he=>(g(),S("button",{key:he.path,class:"folder-row",onClick:xe=>D(he.name)},[W(Ie,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",ZOe,E(he.name),1)],8,UOe))),128)),M.value.length===0?(g(),S("div",KOe,E(v(n)("workspace.noPathMatch",{parent:w.value})),1)):Y("",!0)],64)):y.value==="bad-parent"?(g(),S("div",GOe,E(v(n)("workspace.badParent",{parent:w.value})),1)):Y("",!0)],64)):h.value&&!x.value?(g(),S(Ce,{key:2},[(g(!0),S(Ce,null,at(p.value,he=>(g(),S("button",{key:he.path,class:"folder-row",onClick:xe=>U(he.path)},[W(Ie,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",XOe,E(he.rel),1)],8,YOe))),128)),!f.value&&p.value.length===0?(g(),S("div",JOe,E(v(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(g(),S("div",QOe,E(v(n)("workspace.searching")),1)):Y("",!0)],64)):(g(),S(Ce,{key:3},[(g(!0),S(Ce,null,at(u.value,he=>(g(),S("button",{key:he.path,class:"folder-row",onClick:xe=>te(he)},[W(Ie,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",tHe,E(he.name),1)],8,eHe))),128)),u.value.length===0?(g(),S("div",nHe,E(v(n)("workspace.noSubfolders")),1)):Y("",!0)],64))])),e.error?(g(),S("div",sHe,E(e.error),1)):Y("",!0),b("div",iHe,[W(Cn,{text:a.value},{default:ae(()=>[r.value?Y("",!0):(g(),ue(Nt,{key:0,variant:"primary",disabled:!K.value,onClick:ee},{default:ae(()=>[Oe(E(v(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),W(Nt,{variant:"secondary",onClick:Q[1]||(Q[1]=he=>s("close"))},{default:ae(()=>[Oe(E(v(n)("workspace.cancel")),1)]),_:1})]),b("div",lHe,E(R.value),1)])]),_:1},8,["open","title"]))}}),uHe=vt(cHe,[["__scopeId","data-v-09b74e91"]]),dHe={key:0,class:"confirm-dialog__message"},fHe=Je({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt();function i(){n.loading||(o("update:open",!1),o("cancel"))}function l(r){if(r.key!=="Enter"||!n.open||n.loading)return;const a=r.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(r.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",l),vo(()=>{typeof window<"u"&&window.removeEventListener("keydown",l)}),(r,a)=>(g(),ue(K0,{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=c=>o("update:open",c)),onClose:i},{foot:ae(()=>[W(Nt,{variant:"secondary",disabled:e.loading,onClick:i},{default:ae(()=>[Oe(E(e.cancelLabel??v(s)("common.cancel")),1)]),_:1},8,["disabled"]),W(Nt,{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=c=>o("confirm"))},{default:ae(()=>[Oe(E(e.confirmLabel??v(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:ae(()=>[e.message?(g(),S("p",dHe,E(e.message),1)):Y("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),pHe=vt(fHe,[["__scopeId","data-v-074405fe"]]),hHe=Je({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=B1();function i(){s()}return(l,r)=>(g(),ue(pHe,{open:v(t)!==null,title:v(t)?.title??"",message:v(t)?.message,"confirm-label":v(t)?.confirmLabel,"cancel-label":v(t)?.cancelLabel,variant:v(t)?.variant,loading:v(n),onConfirm:i,onCancel:r[0]||(r[0]=a=>v(o)(!1))},null,8,["open","title","message","confirm-label","cancel-label","variant","loading"]))}}),mHe={class:"rows"},gHe={class:"row"},vHe={class:"row"},yHe={class:"row"},wHe={class:"row"},kHe={class:"row"},bHe={class:"row"},_He={class:"ctx-text"},xHe={key:0,class:"bar"},SHe={class:"row"},CHe=Je({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t,i=V(!0),l=z(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),r=z(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:_a(o.status.ctxUsed),max:_a(o.status.ctxMax),pct:l.value}):n("status.statusNone"));function a(h){return n(h==="yolo"?"status.permissionYolo":h==="auto"?"status.permissionAuto":"status.permissionManual")}const c=z(()=>{const h=o.status.permission;return h==="yolo"?"var(--color-warning)":h==="auto"?"var(--color-danger)":"var(--color-text)"}),u=z(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=z(()=>o.dynamicWorkflowMode?n("status.dynamicWorkflowOn"):n("status.dynamicWorkflowOff")),f=z(()=>typeof o.costUsd=="number"&&o.costUsd>0),p=z(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(h,m)=>(g(),ue(K0,{open:i.value,"onUpdate:open":m[0]||(m[0]=k=>i.value=k),title:v(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=k=>s("close"))},{default:ae(()=>[b("dl",mHe,[b("div",gHe,[b("dt",null,E(v(n)("status.statusModel")),1),b("dd",null,E(e.status.model),1)]),b("div",vHe,[b("dt",null,E(v(n)("status.statusThinking")),1),b("dd",null,E(e.thinking),1)]),b("div",yHe,[b("dt",null,E(v(n)("status.statusPermission")),1),b("dd",{style:Gt({color:c.value})},E(a(e.status.permission)),5)]),b("div",wHe,[b("dt",null,E(v(n)("status.statusPlanMode")),1),b("dd",{class:Pe({"plan-on":e.planMode})},E(u.value),3)]),b("div",kHe,[b("dt",null,E(v(n)("status.statusDynamicWorkflowMode")),1),b("dd",{class:Pe({"workflow-on":e.dynamicWorkflowMode})},E(d.value),3)]),b("div",bHe,[b("dt",null,E(v(n)("status.statusContext")),1),b("dd",null,[b("span",_He,E(r.value),1),e.status.ctxMax>0?(g(),S("span",xHe,[b("i",{style:Gt({width:l.value+"%"})},null,4)])):Y("",!0)])]),b("div",SHe,[b("dt",null,E(v(n)("status.statusCost")),1),b("dd",null,E(p.value),1)])])]),_:1},8,["open","title"]))}}),MHe=vt(CHe,[["__scopeId","data-v-7992546c"]]),AHe={key:0,class:"actions"},THe=["onClick"],EHe=["onClick"],IHe={key:1,class:"details"},$He=Je({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Lt();function i(T){return typeof T=="object"&&T!==null}function l(T){return i(T)?T.title:T}function r(T){return i(T)?T.message??"":""}function a(T){return i(T)?T.details:void 0}function c(T){return i(T)?T.severity==="error":T.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|failed/i.test(T)}function u(T){if(!i(T))return c(T)?"danger":"warning";switch(T.severity){case"error":case"danger":return"danger";case"success":return"success";case"info":return"info";default:return"warning"}}function d(T){return i(T)?`notice:${T.severity}:${T.title}:${T.message??""}:${JSON.stringify(T.details??[])}`:`text:${T}`}function f(T){if(!i(T))return T;const I=[T.title];T.message&&I.push(T.message);const N=T.details??[];if(N.length>0){I.push("",`${s("warnings.diagnostics")}:`);for(const C of N)I.push(`${C.label}: ${C.value}`)}return I.join(` -`)}let p=1;const h=V([]),m=new Map,k=new Map;function x(T){const I=c(T)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?I+5e3:I}function y(T,I){const N=m.get(T)??{handle:null,deadline:0,remaining:0};N.handle=setTimeout(()=>$(T),I),N.deadline=Date.now()+I,m.set(T,N)}function w(T){const I=m.get(T);I&&I.handle!==null&&clearTimeout(I.handle),m.delete(T)}function _(T){const I=m.get(T);!I||I.handle===null||(clearTimeout(I.handle),I.handle=null,I.remaining=Math.max(0,I.deadline-Date.now()))}function M(T){if(h.value.find(C=>C.id===T)?.detailsOpen)return;const N=m.get(T);!N||N.handle!==null||y(T,N.remaining)}function P(T){T.detailsOpen=!T.detailsOpen,T.detailsOpen?_(T.id):M(T.id)}async function B(T){if(!await fs(f(T.warning)))return;T.copied=!0;const N=k.get(T.id);N&&clearTimeout(N),k.set(T.id,setTimeout(()=>{T.copied=!1,k.delete(T.id)},1400))}function $(T){w(T);const I=k.get(T);I&&clearTimeout(I),k.delete(T);const N=h.value.findIndex(C=>C.id===T);N!==-1&&(h.value=h.value.filter(C=>C.id!==T),o("dismiss",N))}return Ze(()=>n.warnings,T=>{const I=[...h.value];h.value=T.map(N=>{const C=d(N),O=I.findIndex(A=>A.key===C),H=O===-1?void 0:I.splice(O,1)[0];if(H)return H.warning=N,H;const D={id:p++,key:C,warning:N,detailsOpen:!1,copied:!1};return y(D.id,x(N)),D});for(const N of I){w(N.id);const C=k.get(N.id);C&&clearTimeout(C),k.delete(N.id)}},{immediate:!0,flush:"post"}),En(()=>{m.forEach(T=>{T.handle!==null&&clearTimeout(T.handle)}),m.clear(),k.forEach(T=>clearTimeout(T)),k.clear()}),(T,I)=>(g(),ue($F,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:ae(()=>[(g(!0),S(Ce,null,at(h.value,N=>(g(),ue(Dz,{key:N.id,variant:u(N.warning),title:l(N.warning),message:r(N.warning),"dismiss-label":v(s)("warnings.dismiss"),onDismiss:C=>$(N.id),onPointerenter:C=>_(N.id),onPointerleave:C=>M(N.id)},{default:ae(()=>[a(N.warning)?.length?(g(),S("div",AHe,[b("button",{class:"link",type:"button",onClick:C=>P(N)},E(N.detailsOpen?v(s)("warnings.hideDetails"):v(s)("warnings.showDetails")),9,THe),b("button",{class:"link",type:"button",onClick:C=>B(N)},E(N.copied?v(s)("warnings.copied"):v(s)("warnings.copyDetails")),9,EHe)])):Y("",!0),N.detailsOpen&&a(N.warning)?.length?(g(),S("dl",IHe,[(g(!0),S(Ce,null,at(a(N.warning),C=>(g(),S("div",{key:`${C.label}:${C.value}`,class:"detail-row"},[b("dt",null,E(C.label),1),b("dd",null,E(C.value),1)]))),128))])):Y("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),LHe=vt($He,[["__scopeId","data-v-6d8f28b8"]]),NHe={class:"update-dialog__head"},zHe={class:"update-dialog__brand","data-testid":"update-dialog-brand"},BHe={class:"update-dialog__titles"},RHe={class:"update-dialog__title","data-testid":"update-dialog-title"},PHe={key:0,class:"update-dialog__date","data-testid":"update-dialog-date"},FHe={key:0,class:"update-dialog__progress"},jHe={class:"update-dialog__progress-row"},OHe={class:"update-dialog__progress-label"},HHe={class:"update-dialog__progress-meta","data-testid":"update-dialog-progress-meta"},DHe={key:0,"data-testid":"update-dialog-bytes"},VHe={key:1},WHe=["aria-label"],qHe=["value","aria-label"],UHe={key:2,class:"update-dialog__message","data-testid":"update-dialog-message"},ZHe=Je({__name:"UpdateDialog",setup(e){const{t}=Lt(),n=XT();In(()=>n.subscribe()),En(()=>n.unsubscribe());const o=z(()=>n.availableVersion.value??""),s=z(()=>n.status.value==="downloading"?t("update.dialogDownloading",{version:o.value}):n.status.value==="downloaded"?t("update.dialogReady",{version:o.value}):n.status.value==="error"?t("update.failed"):t("update.dialogAvailable",{version:o.value})),i=z(()=>{const d=n.state.value?.releaseDate;if(d===void 0)return"";const f=new Date(d);return Number.isNaN(f.getTime())?"":new Intl.DateTimeFormat(void 0,{dateStyle:"long"}).format(f)}),l=z(()=>{const d=n.state.value?.transferred;return d===void 0?void 0:Wk(d)}),r=z(()=>{const d=n.state.value?.total;return d===void 0?void 0:Wk(d)}),a=z(()=>n.status.value==="error"?n.state.value?.message??t("update.failedMessage"):n.status.value==="downloaded"?t("update.restart"):t("update.prompt")),c=z(()=>n.status.value!=="downloading");function u(){c.value&&n.closeDialog()}return(d,f)=>(g(),ue(K0,{open:v(n).dialogOpen.value,title:s.value,description:i.value||void 0,"close-on-overlay":c.value,"close-on-esc":c.value,"show-close":!1,size:"md-wide",onClose:u},{head:ae(()=>[b("div",NHe,[b("span",zHe,[W(uf,{size:"sm",animated:!1})]),b("div",BHe,[b("div",RHe,E(s.value),1),i.value?(g(),S("div",PHe,[W(Ie,{name:"calendar-schedule",size:"sm","aria-hidden":"true"}),b("span",null,E(i.value),1)])):Y("",!0)])])]),foot:ae(()=>[v(n).status.value==="downloading"?(g(),ue(Nt,{key:0,"data-testid":"cancel-update-download",variant:"secondary",loading:v(n).busy.value,onClick:f[1]||(f[1]=p=>void v(n).cancelDownload())},{default:ae(()=>[Oe(E(v(t)("update.cancelDownload")),1)]),_:1},8,["loading"])):v(n).status.value==="downloaded"?(g(),S(Ce,{key:1},[W(Nt,{"data-testid":"later-update",variant:"ghost",onClick:u},{default:ae(()=>[Oe(E(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"restart-to-update",loading:v(n).busy.value,onClick:f[2]||(f[2]=p=>void v(n).restart())},{default:ae(()=>[Oe(E(v(t)("update.restartAction")),1)]),_:1},8,["loading"])],64)):v(n).status.value==="error"?(g(),S(Ce,{key:2},[W(Nt,{"data-testid":"dismiss-update",variant:"ghost",onClick:u},{default:ae(()=>[Oe(E(v(t)("update.dismiss")),1)]),_:1}),W(Nt,{"data-testid":"retry-update",loading:v(n).busy.value,onClick:f[3]||(f[3]=p=>void v(n).retry())},{default:ae(()=>[Oe(E(v(t)("update.retryDownload")),1)]),_:1},8,["loading"])],64)):(g(),S(Ce,{key:3},[W(Nt,{"data-testid":"skip-update",variant:"secondary",onClick:f[4]||(f[4]=p=>void v(n).skip())},{default:ae(()=>[Oe(E(v(t)("update.skip")),1)]),_:1}),f[6]||(f[6]=b("span",{class:"update-dialog__foot-spacer"},null,-1)),W(Nt,{"data-testid":"later-update",variant:"secondary",onClick:u},{default:ae(()=>[Oe(E(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"download-update",loading:v(n).busy.value,onClick:f[5]||(f[5]=p=>void v(n).download())},{default:ae(()=>[Oe(E(v(t)("update.download")),1)]),_:1},8,["loading"])],64))]),default:ae(()=>[v(n).status.value==="downloading"?(g(),S("div",FHe,[b("div",jHe,[b("span",OHe,E(v(t)("update.downloadProgress")),1),b("span",HHe,[l.value&&r.value?(g(),S("span",DHe,E(v(t)("update.bytesProgress",{transferred:l.value,total:r.value})),1)):(g(),S("span",VHe,E(v(t)("update.fetching")),1))])]),v(n).percent.value===void 0?(g(),S("progress",{key:0,"data-testid":"update-dialog-progress",max:"100","aria-label":v(t)("update.progressLabel")},null,8,WHe)):(g(),S("progress",{key:1,"data-testid":"update-dialog-progress",value:v(n).percent.value,max:"100","aria-label":v(t)("update.progressLabel")},null,8,qHe))])):v(n).status.value==="available"?(g(),ue(D2,{key:1,"data-testid":"automatic-update-preference","model-value":v(n).state.value?.autoUpdate??!1,disabled:v(n).busy.value,"onUpdate:modelValue":f[0]||(f[0]=p=>void v(n).setAutomaticChecks(p))},{default:ae(()=>[Oe(E(v(t)("update.automaticChecks")),1)]),_:1},8,["model-value","disabled"])):(g(),S("p",UHe,E(a.value),1))]),_:1},8,["open","title","description","close-on-overlay","close-on-esc"]))}}),KHe=vt(ZHe,[["__scopeId","data-v-13aac9b0"]]),GHe={class:"ui-action-toast-host"},YHe={class:"ui-action-toast__body"},XHe=Je({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=t,{t:o}=Lt();let s=null,i=0,l=e.duration;function r(u){if(u<=0){n("dismiss",e.dismissToken);return}s=setTimeout(()=>n("dismiss",e.dismissToken),u),i=Date.now()+u}function a(){s!==null&&(clearTimeout(s),s=null,l=Math.max(0,i-Date.now()))}function c(){s===null&&r(l)}return r(e.duration),En(()=>{s!==null&&clearTimeout(s)}),(u,d)=>(g(),S("div",GHe,[b("div",{class:"ui-action-toast",role:"status",onPointerenter:a,onPointerleave:c},[b("span",YHe,[jn(u.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??v(o)("common.dismiss"),onClick:d[0]||(d[0]=f=>n("dismiss",e.dismissToken))},{default:ae(()=>[W(Ie,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),Qm=vt(XHe,[["__scopeId","data-v-9efa207b"]]),JHe={key:0,class:"window-controls"},QHe=["aria-label"],eDe=["aria-label"],tDe=["aria-label"],nDe=Je({__name:"WindowControls",setup(e){const{t}=Lt(),n=z(()=>window.pythinkerDesktop?.platform==="win32");function o(){window.pythinkerDesktop?.minimizeWindow()}function s(){window.pythinkerDesktop?.toggleMaximizeWindow()}function i(){window.pythinkerDesktop?.closeWindow()}return(l,r)=>n.value?(g(),S("div",JHe,[b("button",{type:"button",class:"wc wc-min","aria-label":v(t)("app.minimizeWindow"),onClick:o},[...r[0]||(r[0]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M2.5 5h5"})],-1)])],8,QHe),b("button",{type:"button",class:"wc wc-max","aria-label":v(t)("app.maximizeWindow"),onClick:s},[...r[1]||(r[1]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round","aria-hidden":"true"},[b("rect",{x:"2.4",y:"2.4",width:"5.2",height:"5.2",rx:"1"})],-1)])],8,eDe),b("button",{type:"button",class:"wc wc-close","aria-label":v(t)("app.closeWindow"),onClick:i},[...r[2]||(r[2]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M3 3l4 4M7 3l-4 4"})],-1)])],8,tDe)])):Y("",!0)}}),oDe=vt(nDe,[["__scopeId","data-v-768f9703"]]),sDe={class:"topbar"},iDe={class:"wsq"},lDe=["aria-label"],rDe={class:"tb-path"},aDe={class:"ws"},cDe={class:"se"},uDe={class:"tb-sub"},dDe=Je({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t,i=z(()=>{const a=o.workspace,u=(a?.name||a?.root||"").trim().charAt(0);return u?u.toUpperCase():"K"}),l=z(()=>o.workspace?.name??n("workspace.noWorkspace")),r=z(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,c)=>(g(),S("div",sDe,[b("span",iDe,E(i.value),1),b("button",{type:"button",class:"tb-mid","aria-label":v(n)("mobile.openSwitcher"),onClick:c[0]||(c[0]=u=>s("openSwitcher"))},[b("span",rDe,[b("span",aDe,E(l.value),1),e.sessionTitle?(g(),S(Ce,{key:0},[c[2]||(c[2]=b("span",{class:"sl"},"/",-1)),b("span",cDe,E(e.sessionTitle),1)],64)):Y("",!0),c[3]||(c[3]=b("span",{class:"cv"},"⌄",-1))]),b("span",uDe,[b("span",{class:Pe(["rd",{on:e.running}])},null,2),b("span",null,E(r.value),1),e.branch?(g(),S(Ce,{key:0},[Oe(" · "+E(e.branch),1)],64)):Y("",!0),e.sessionCount>0?(g(),S(Ce,{key:1},[Oe(" · "+E(v(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):Y("",!0)])],8,lDe),W(Dt,{size:"lg",label:v(n)("mobile.openSettings"),onClick:c[1]||(c[1]=u=>s("openSettings"))},{default:ae(()=>[W(Ie,{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),fDe=vt(dDe,[["__scopeId","data-v-27a83eb2"]]),pDe={class:"mlist"},hDe={key:0,class:"mempty"},mDe=["onClick"],gDe={class:"mgh-main"},vDe={class:"mgh-name"},yDe={class:"mgh-path"},wDe={key:2,class:"att"},kDe={key:0,class:"mempty small"},bDe=["onClick"],_De={class:"m"},xDe={class:"s"},SDe={key:0,class:"att"},CDe=["disabled","onClick"],MDe=["onClick"],ADe=Je({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t;function i(){s("update:modelValue",!1)}function l(N){s("select",N),i()}function r(N){s("createInWorkspace",N),i()}function a(){s("create"),i()}function c(){s("addWorkspace"),i()}const u=V(new Set);function d(N){return u.value.has(N)}function f(N){const C=new Set(u.value);C.has(N)?C.delete(N):C.add(N),u.value=C,w.value=null,B.value=null}const p=V(new Set);function h(N){return p.value.has(N)}function m(N){const C=new Set(p.value);C.has(N)?C.delete(N):C.add(N),p.value=C}function k(N){if(h(N.workspace.id))return N.sessions;const C=N.sessions.slice(0,N.initialCount);if(o.activeId&&!C.some(O=>O.id===o.activeId)){const O=N.sessions.find(H=>H.id===o.activeId);if(O)return[...C,O]}return C}function x(N){if(!p.value.has(N)){const C=new Set(p.value);C.add(N),p.value=C}s("loadMore",N)}function y(N){return o.attentionByWorkspace[N]??0}const w=V(null);function _(N){w.value=w.value===N?null:N,B.value=null}function M(N){w.value=null;const O=(typeof window<"u"?window.prompt(n("sidebar.rename"),N.title):null)?.trim();O&&s("rename",N.id,O)}function P(N){w.value=null,s("archive",N)}const B=V(null);function $(N){B.value=B.value===N?null:N,w.value=null}function T(N){fs(N.root),B.value=null}function I(N){B.value=null,s("deleteWorkspace",N.id)}return(N,C)=>(g(),ue(yu,{"model-value":e.modelValue,"onUpdate:modelValue":C[2]||(C[2]=O=>s("update:modelValue",O))},{default:ae(()=>[b("button",{type:"button",class:"newrow",onClick:a},[W(Ie,{name:"message",size:"sm"}),Oe(" "+E(v(n)("sidebar.newChat")),1)]),b("button",{type:"button",class:"newrow secondary",onClick:c},[W(Ie,{name:"folder",size:"sm"}),Oe(" "+E(v(n)("sidebar.newWorkspace")),1)]),b("div",pDe,[e.groups.length===0?(g(),S("div",hDe,E(v(n)("workspace.noWorkspace")),1)):Y("",!0),(g(!0),S(Ce,null,at(e.groups,O=>(g(),S("div",{key:O.workspace.id,class:"mgroup"},[b("div",{class:Pe(["mgh",{on:O.workspace.id===e.activeWorkspaceId}]),onClick:H=>f(O.workspace.id)},[d(O.workspace.id)?(g(),ue(Ie,{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(g(),ue(Ie,{key:1,class:"mgh-folder",name:"folder",size:"sm"})),b("div",gDe,[b("span",vDe,E(O.workspace.name),1),W(Cn,{text:O.workspace.root},{default:ae(()=>[b("span",yDe,E(O.workspace.shortPath),1)]),_:2},1032,["text"])]),d(O.workspace.id)&&y(O.workspace.id)>0?(g(),S("span",wDe,E(y(O.workspace.id)),1)):Y("",!0),W(Dt,{size:"lg",class:"mgh-more",label:v(n)("sidebar.options"),onClick:_t(H=>$(O.workspace.id),["stop"])},{default:ae(()=>[W(Ie,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),W(Dt,{size:"lg",class:"mgh-add",label:v(n)("workspace.newInGroup"),onClick:_t(H=>r(O.workspace.id),["stop"])},{default:ae(()=>[W(Ie,{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),B.value===O.workspace.id?(g(),ue(Nr,{key:3,class:"kmenu wsmenu",onClick:C[0]||(C[0]=_t(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:H=>T(O.workspace)},{default:ae(()=>[Oe(E(v(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:H=>I(O.workspace)},{default:ae(()=>[Oe(E(v(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,mDe),Jn(b("div",null,[O.sessions.length===0?(g(),S("div",kDe,E(v(n)("sidebar.noSessions")),1)):Y("",!0),(g(!0),S(Ce,null,at(k(O),H=>(g(),S("div",{key:H.id,class:Pe(["srow",{cur:H.id===e.activeId}]),onClick:D=>l(H.id)},[b("div",_De,[b("div",{class:Pe(["t",{run:H.busy,aborted:!H.busy&&(e.attentionBySession[H.id]??0)===0&&(H.lastTurnReason==="cancelled"||H.lastTurnReason==="failed")}])},E(H.title),3),b("div",xDe,E(H.time),1)]),(e.attentionBySession[H.id]??0)>0?(g(),S("span",SDe,E(e.attentionBySession[H.id]),1)):Y("",!0),W(Dt,{size:"lg",class:"kb",label:v(n)("sidebar.options"),onClick:_t(D=>_(H.id),["stop"])},{default:ae(()=>[W(Ie,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),w.value===H.id?(g(),ue(Nr,{key:1,class:"kmenu",onClick:C[1]||(C[1]=_t(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:D=>M(H)},{default:ae(()=>[Oe(E(v(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:D=>P(H.id)},{default:ae(()=>[Oe(E(v(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,bDe))),128)),O.hasMore||O.loadingMore?(g(),S("button",{key:1,type:"button",class:"mshow-more",disabled:O.loadingMore,onClick:_t(H=>x(O.workspace.id),["stop"])},E(O.loadingMore?v(n)("sidebar.loadingMore"):v(n)("sidebar.showMore",{count:Math.max(0,O.workspace.sessionCount-O.sessions.length)})),9,CDe)):Y("",!0),O.sessions.length>O.initialCount?(g(),S("button",{key:2,type:"button",class:"mshow-more",onClick:_t(H=>m(O.workspace.id),["stop"])},E(h(O.workspace.id)?v(n)("sidebar.showLess"):v(n)("sidebar.showAll",{count:O.sessions.length-O.initialCount})),9,MDe)):Y("",!0)],512),[[_i,!d(O.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),TDe=vt(ADe,[["__scopeId","data-v-4c7bceaf"]]),EDe={class:"group-title"},IDe={class:"srow-main"},$De={class:"srow-label"},LDe={class:"srow-sub"},NDe={class:"srow read-only"},zDe={class:"srow-main"},BDe={class:"srow-label"},RDe={key:0,class:"srow-sub"},PDe={class:"cache-note"},FDe={class:"srow-main"},jDe={class:"srow-label"},ODe={class:"srow-sub"},HDe=["aria-checked"],DDe={key:0,class:"srow read-only"},VDe={class:"srow-main"},WDe={class:"srow-label"},qDe={class:"srow-sub"},UDe={class:"goal-actions"},ZDe=["aria-checked"],KDe={class:"srow-main"},GDe={class:"srow-label"},YDe={class:"srow-sub"},XDe=["aria-checked"],JDe={class:"srow-main"},QDe={class:"srow-label"},eVe={class:"srow-sub"},tVe={class:"srow-main"},nVe={class:"srow-label"},oVe={class:"srow read-only"},sVe={class:"srow-main"},iVe={class:"srow-label"},lVe={class:"srow-sub"},rVe=["aria-label"],aVe={class:"group-title"},cVe={class:"srow-main"},uVe={class:"srow-label"},dVe={class:"srow-sub"},fVe={class:"srow read-only pref"},pVe={class:"srow-main"},hVe={class:"srow-label"},mVe={class:"srow read-only pref"},gVe={class:"srow-main"},vVe={class:"srow-label"},yVe={class:"srow-main"},wVe={class:"srow-label"},kVe={class:"srow-sub"},bVe=["aria-checked"],_Ve={class:"srow-main"},xVe={class:"srow-label"},SVe={key:2,class:"srow read-only"},CVe={class:"srow-main"},MVe={class:"srow-label"},AVe={class:"srow-val dim"},TVe={class:"arch-subhead"},EVe={class:"arch-count"},IVe={class:"arch-tools"},$Ve={key:0,class:"arch-empty"},LVe={class:"arch-meta"},NVe={class:"arch-name"},zVe={class:"arch-time"},BVe={key:2,class:"arch-empty"},RVe=100,PVe=Je({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goal:{default:null},dynamicWorkflowMode:{type:Boolean},colorScheme:{default:"system"},uiFontSize:{default:14},conversationToc:{type:Boolean},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleWorkflow","toggleGoal","controlGoal","setPermission","setColorScheme","setUiFontSize","setConversationToc","login"],setup(e,{emit:t}){const{t:n}=Lt(),o=e,s=t,{confirm:i}=B1();function l(Q){s("setColorScheme",Q)}const r=["manual","yolo","auto"],a=z(()=>o.models?.find(Q=>Q.id===o.status?.modelId)),c=z(()=>o6(a.value)),u=z(()=>s6(a.value)),d=z(()=>v9(a.value,o.thinking)),f=z(()=>u.value.includes(d.value)?d.value:""),p=z(()=>u.value.map(Q=>({value:Q,label:rf(Q)}))),h=z(()=>o.planMode===!0),m=z(()=>o.goalMode===!0),k=z(()=>o.goal!==null&&["active","paused","blocked"].includes(o.goal?.status??"")),x=z(()=>{const Q=o.goal?.status;return Q?n(`status.goalStatus${Q[0].toUpperCase()}${Q.slice(1)}`):""});async function y(){await i({title:n("status.goalCancel"),message:n("status.goalCancelConfirm"),confirmLabel:n("status.goalCancelConfirmYes"),cancelLabel:n("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const w=z(()=>w9(o.uiFontSize));function _(Q){const he=ez(Q);he!==void 0&&s("setUiFontSize",he)}const M=z(()=>{const Q=o.status.permission;return Q==="yolo"?"var(--color-warning)":Q==="auto"?"var(--color-danger)":"var(--color-text-muted)"}),P=z(()=>{const Q=o.status.permission,he=n(Q==="yolo"?"mobile.permYoloSub":Q==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${Q} · ${he}`}),B=z(()=>o.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100))):0),$=z(()=>o.status.ctxMax>0?`${_a(o.status.ctxUsed)}/${_a(o.status.ctxMax)}`:n("status.statusNone"));function T(Q){s("setThinking",KN(a.value,Q))}function I(){const Q=r.indexOf(o.status.permission),he=r[(Q+1)%r.length];s("setPermission",he)}function N(){s("pickModel"),s("update:modelValue",!1)}function C(){s("login"),s("update:modelValue",!1)}const O=P1(),H=V("main"),D=V([]),A=V(!1),R=V(!1),j=V(""),q=V("archived-desc");async function K(){if(!A.value){A.value=!0,R.value=!1;try{const Q=[];let he;for(;;){const xe=await O.loadArchivedSessions({beforeId:he,pageSize:RVe});if(Q.push(...xe.items),!xe.hasMore||xe.items.length===0)break;const Ye=xe.items.at(-1)?.id;if(Ye===void 0)break;he=Ye}D.value=Q,R.value=!0}catch(Q){console.warn("loadAllArchived failed",Q)}finally{A.value=!1}}}function U(){H.value="archived",j.value="",K()}function te(){H.value="main"}const J=z(()=>{const Q=j.value.trim().toLowerCase();let he=D.value.filter(xe=>xe.archived===!0);return Q&&(he=he.filter(xe=>xe.title.toLowerCase().includes(Q))),he=he.slice(),q.value==="archived-desc"?he.sort((xe,Ye)=>Ye.updatedAt.localeCompare(xe.updatedAt)):q.value==="created-desc"?he.sort((xe,Ye)=>Ye.createdAt.localeCompare(xe.createdAt)):he.sort((xe,Ye)=>xe.title.localeCompare(Ye.title,"en")),he});async function ee(Q){await O.restoreSession(Q)&&(D.value=D.value.filter(xe=>xe.id!==Q))}function ie(Q){const he=new Date(Q);if(Number.isNaN(he.getTime()))return Q;const xe=Ye=>String(Ye).padStart(2,"0");return`${he.getFullYear()}-${xe(he.getMonth()+1)}-${xe(he.getDate())} ${xe(he.getHours())}:${xe(he.getMinutes())}`}return Ze(()=>o.modelValue,Q=>{Q||(H.value="main")}),(Q,he)=>(g(),ue(yu,{"model-value":e.modelValue,title:v(n)("mobile.settingsTitle"),"onUpdate:modelValue":he[8]||(he[8]=xe=>s("update:modelValue",xe))},{default:ae(()=>[H.value==="main"?(g(),S(Ce,{key:0},[b("div",EDe,E(v(n)("mobile.groupSession")),1),b("button",{type:"button",class:"srow",onClick:N},[b("span",IDe,[b("span",$De,E(v(n)("status.statusModel")),1),b("span",LDe,E(e.status.model),1)]),he[9]||(he[9]=b("span",{class:"chev"},"›",-1))]),b("div",NDe,[b("span",zDe,[b("span",BDe,E(v(n)("status.statusThinking")),1),c.value==="unsupported"?(g(),S("span",RDe,E(v(n)("status.modeNotSupported")),1)):Y("",!0)]),u.value.length>1?(g(),ue(di,{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":T},null,8,["model-value","options"])):(g(),S("span",{key:1,class:Pe(["srow-val",{dim:d.value==="off"}])},E(d.value==="off"?v(n)("status.planOff"):v(rf)(d.value)),3))]),b("div",PDe,E(v(n)("status.cacheNote")),1),b("button",{type:"button",class:"srow",onClick:he[0]||(he[0]=xe=>s("togglePlan"))},[b("span",FDe,[b("span",jDe,E(v(n)("status.statusPlanMode")),1),b("span",ODe,E(v(n)("mobile.planModeSub")),1)]),b("span",{class:Pe(["toggle",{on:h.value}]),role:"switch","aria-checked":h.value},null,10,HDe)]),k.value?(g(),S("div",DDe,[b("span",VDe,[b("span",WDe,E(v(n)("status.goalLabel")),1),b("span",qDe,E(x.value),1)]),b("span",UDe,[e.goal?.status==="active"?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:he[1]||(he[1]=xe=>s("controlGoal","pause"))},{default:ae(()=>[Oe(E(v(n)("status.goalPause")),1)]),_:1})):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Nt,{key:1,variant:"secondary",size:"sm",onClick:he[2]||(he[2]=xe=>s("controlGoal","resume"))},{default:ae(()=>[Oe(E(v(n)("status.goalResume")),1)]),_:1})):Y("",!0),W(Nt,{variant:"ghost",size:"sm",onClick:y},{default:ae(()=>[Oe(E(v(n)("status.goalCancel")),1)]),_:1})])])):(g(),S("button",{key:1,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:he[3]||(he[3]=xe=>s("toggleGoal"))},[b("span",KDe,[b("span",GDe,E(v(n)("status.goalLabel")),1),b("span",YDe,E(v(n)("mobile.goalModeSub")),1)]),b("span",{class:Pe(["toggle",{on:m.value}])},null,2)],8,ZDe)),b("button",{type:"button",class:"srow",role:"switch","aria-checked":e.dynamicWorkflowMode,onClick:he[4]||(he[4]=xe=>s("toggleWorkflow"))},[b("span",JDe,[b("span",QDe,E(v(n)("status.statusDynamicWorkflowMode")),1),b("span",eVe,E(v(n)("mobile.workflowModeSub")),1)]),b("span",{class:Pe(["toggle",{on:e.dynamicWorkflowMode}])},null,2)],8,XDe),b("button",{type:"button",class:"srow",onClick:I},[b("span",tVe,[b("span",nVe,E(v(n)("status.statusPermission")),1),b("span",{class:"srow-sub",style:Gt({color:M.value})},E(P.value),5)]),he[10]||(he[10]=b("span",{class:"chev"},"›",-1))]),b("div",oVe,[b("span",sVe,[b("span",iVe,E(v(n)("status.statusContext")),1),b("span",lVe,E($.value),1)]),b("span",{class:"ctx-meter","aria-label":$.value},[b("i",{style:Gt({width:B.value+"%"})},null,4)],8,rVe)]),b("div",aVe,E(v(n)("mobile.groupApp")),1),b("button",{type:"button",class:"srow",onClick:U},[b("span",cVe,[b("span",uVe,E(v(n)("mobile.archivedSessions")),1),b("span",dVe,E(v(n)("mobile.archivedSessionsSub")),1)]),he[11]||(he[11]=b("span",{class:"chev"},"›",-1))]),b("div",fVe,[b("span",pVe,[b("span",hVe,E(v(n)("theme.colorSchemeLabel")),1)]),W(di,{"model-value":e.colorScheme??"system",options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":l},null,8,["model-value","options"])]),b("div",mVe,[b("span",gVe,[b("span",vVe,E(v(n)("settings.uiFontSize")),1)]),W(di,{"model-value":w.value,options:v(YN),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":_},null,8,["model-value","options","aria-label"])]),b("button",{type:"button",class:"srow",onClick:he[5]||(he[5]=xe=>s("setConversationToc",!e.conversationToc))},[b("span",yVe,[b("span",wVe,E(v(n)("settings.conversationToc")),1),b("span",kVe,E(v(n)("settings.conversationTocHint")),1)]),b("span",{class:Pe(["toggle",{on:e.conversationToc}]),role:"switch","aria-checked":e.conversationToc},null,10,bVe)]),b("button",{type:"button",class:"srow acct in",onClick:C},[b("span",_Ve,[b("span",xVe,E(v(n)("settings.manageProviders")),1)])]),e.serverVersion?(g(),S("div",SVe,[b("span",CVe,[b("span",MVe,E(v(n)("settings.serverVersion")),1)]),b("span",AVe,E(e.serverVersion),1)])):Y("",!0)],64)):(g(),S(Ce,{key:1},[b("div",TVe,[b("button",{type:"button",class:"arch-back",onClick:te},[he[12]||(he[12]=b("span",{class:"chev back"},"‹",-1)),Oe(" "+E(v(n)("mobile.archivedBack")),1)]),b("span",EVe,E(v(n)("mobile.sessionCount",{n:J.value.length})),1)]),b("div",IVe,[W(us,{class:"arch-search-input","model-value":j.value,size:"sm",placeholder:v(n)("settings.archivedSearch"),"onUpdate:modelValue":he[6]||(he[6]=xe=>j.value=xe)},null,8,["model-value","placeholder"]),W(di,{size:"sm","model-value":q.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":he[7]||(he[7]=xe=>q.value=xe)},null,8,["model-value","options"])]),A.value?(g(),S("div",$Ve,E(v(n)("settings.archivedLoadingAll")),1)):J.value.length>0?(g(!0),S(Ce,{key:1},at(J.value,xe=>(g(),S("div",{key:xe.id,class:"arch-row"},[b("div",LVe,[b("div",NVe,E(xe.title),1),b("div",zVe,E(v(n)("settings.archivedAt",{time:ie(xe.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Ye=>ee(xe.id)},{default:ae(()=>[Oe(E(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(g(),S("div",BVe,E(D.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title"]))}}),FVe=vt(PVe,[["__scopeId","data-v-bcda0873"]]),jVe=["role","aria-modal","aria-label"],OVe={class:"wiz-rail"},HVe={class:"rail-inner"},DVe={class:"eyebrow-pill"},VVe={class:"wiz-title"},WVe={class:"wiz-sub"},qVe={class:"pref-group"},UVe={class:"pref-label"},ZVe={class:"theme-cards"},KVe=["onClick"],GVe={class:"opt-label"},YVe={class:"pref-group"},XVe={class:"pref-label"},JVe={class:"accent-cards"},QVe=["onClick"],eWe={class:"opt-label"},tWe={key:1,class:"wiz-actions"},nWe={key:2,class:"wiz-hint"},oWe={key:0,class:"wiz-hero","aria-hidden":"true"},sWe={class:"hero-inner"},iWe={class:"hero-tagline"},lWe={class:"hero-sub"},rWe={class:"frost-stage"},aWe={class:"frost-card"},cWe={class:"frost-card"},uWe=Je({__name:"Onboarding",props:{embedded:{type:Boolean,default:!1}},emits:["complete","skip"],setup(e,{emit:t}){const n=t,{t:o}=Lt(),{colorScheme:s,accent:i,setColorScheme:l,setAccent:r}=x9(),a=[{value:"system",label:o("theme.system")},{value:"light",label:o("theme.light")},{value:"dark",label:o("theme.dark")}],c=[{value:"blue",label:o("theme.accentBlue")},{value:"mono",label:o("theme.accentBlack")}];return(u,d)=>(g(),S("div",{class:Pe(["wizard",{"is-embedded":e.embedded}]),role:e.embedded?void 0:"dialog","aria-modal":e.embedded?void 0:"true","aria-label":e.embedded?void 0:v(o)("onboarding.title")},[b("div",OVe,[b("div",HVe,[e.embedded?Y("",!0):(g(),S(Ce,{key:0},[b("span",DVe,E(v(o)("onboarding.eyebrow")),1),W(uf,{class:"brand-mark",size:"lg",animated:!1,label:"Pythinker Code"}),b("h1",VVe,E(v(o)("onboarding.title")),1),b("p",WVe,E(v(o)("onboarding.subtitle")),1)],64)),b("div",qVe,[b("div",UVe,E(v(o)("theme.colorSchemeLabel")),1),b("div",ZVe,[(g(),S(Ce,null,at(a,f=>b("button",{key:f.value,type:"button",class:Pe(["opt-card theme-card",{selected:v(s)===f.value}]),onClick:p=>v(l)(f.value)},[b("span",{class:Pe(["theme-preview",`theme-preview--${f.value}`]),"aria-hidden":"true"},[f.value==="system"?(g(),S(Ce,{key:0},[d[2]||(d[2]=r2('',2))],64)):(g(),S(Ce,{key:1},[d[3]||(d[3]=b("span",{class:"theme-side"},null,-1)),d[4]||(d[4]=b("span",{class:"theme-lines"},[b("span"),b("span"),b("span")],-1))],64))],2),b("span",GVe,E(f.label),1)],10,KVe)),64))])]),b("div",YVe,[b("div",XVe,E(v(o)("theme.accentLabel")),1),b("div",JVe,[(g(),S(Ce,null,at(c,f=>b("button",{key:f.value,type:"button",class:Pe(["opt-card accent-card",{selected:v(i)===f.value}]),onClick:p=>v(r)(f.value)},[b("span",{class:Pe(["opt-radio",{on:v(i)===f.value}])},null,2),b("span",{class:Pe(["accent-swatch",`accent-swatch--${f.value}`]),"aria-hidden":"true"},null,2),b("span",eWe,E(f.label),1)],10,QVe)),64))])]),e.embedded?Y("",!0):(g(),S("div",tWe,[W(Nt,{variant:"primary",size:"lg",class:"wiz-action","data-testid":"onboarding-complete",onClick:d[0]||(d[0]=f=>n("complete"))},{default:ae(()=>[b("span",null,E(v(o)("onboarding.start")),1),W(Ie,{name:"arrow-right",size:"sm"})]),_:1}),W(Nt,{variant:"secondary",size:"lg",class:"wiz-action","data-testid":"onboarding-skip",onClick:d[1]||(d[1]=f=>n("skip"))},{default:ae(()=>[b("span",null,E(v(o)("onboarding.skip")),1),W(Ie,{name:"arrow-right",size:"sm"})]),_:1})])),e.embedded?Y("",!0):(g(),S("p",nWe,E(v(o)("onboarding.hint")),1))])]),e.embedded?Y("",!0):(g(),S("aside",oWe,[d[7]||(d[7]=b("div",{class:"hero-ambient"},[b("span",{class:"orb orb-a"}),b("span",{class:"orb orb-b"}),b("span",{class:"orb orb-c"})],-1)),b("div",sWe,[W(uf,{size:"hero",animated:!1,label:""}),b("p",iWe,E(v(o)("onboarding.heroTitle")),1),b("p",lWe,E(v(o)("onboarding.heroSub")),1),b("div",rWe,[b("figure",aWe,[d[5]||(d[5]=r2('',2)),b("figcaption",null,E(v(o)("onboarding.platformMac")),1)]),b("figure",cWe,[d[6]||(d[6]=r2('',2)),b("figcaption",null,E(v(o)("onboarding.platformWindows")),1)])])])]))],10,jVe))}}),sB=vt(uWe,[["__scopeId","data-v-2c24b7cb"]]),dWe=2e3;function fWe(e){const t=V("idle"),n=V(void 0),o=V(void 0),s=V(!1),i=V(!0),l=V(""),r=z(()=>t.value==="starting"||t.value==="exchanging"||t.value==="loading_models");let a,c,u=!1,d=!1;function f(){return t.value==="waiting_for_browser"||t.value==="waiting_for_code"}function p(){a!==void 0&&(clearInterval(a),a=void 0)}function h(){n.value=void 0,o.value=void 0,s.value=!1}function m(){c?.close(),c=void 0}function k($){u||(l.value=$,t.value="failed",p(),m(),h())}async function x($,T){if(u||n.value!==$||!f()&&t.value!=="exchanging"||T.state==="pending")return;if(p(),T.state==="failed"){k(T.message??"");return}if(T.state==="cancelled"){t.value="cancelled",m(),h();return}c=void 0,t.value="loading_models";let I=!0;try{I=await e?.()??!0}catch(N){k(N instanceof Error?N.message:String(N));return}finally{h()}u||(I?t.value="connected":k(""))}async function y(){if(u||d||!f())return;const $=n.value;if($!==void 0){d=!0;try{await x($,await St().getCodexLoginStatus($))}catch{}finally{d=!1}}}function w(){y()}function _(){document.visibilityState==="visible"&&y()}async function M(){if(u||r.value||f())return;t.value="starting",l.value="",h();let $=null;try{$=typeof window>"u"?null:window.open("about:blank","_blank"),$!==null&&($.opener=null,c=$)}catch{$?.close(),$=null}s.value=$===null;try{const T=St(),I=await T.startCodexLogin();if(u){m(),T.cancelCodexLogin(I.loginId).catch(()=>{});return}if(n.value=I.loginId,o.value=I.authorizeUrl,i.value=I.loopback,$!==null)try{$.location.href=I.authorizeUrl}catch{m(),s.value=!0}t.value=I.loopback?"waiting_for_browser":"waiting_for_code",p(),a=setInterval(()=>void y(),dWe)}catch(T){m(),k(T instanceof Error?T.message:String(T))}}async function P($){const T=n.value;if(u||r.value||!f()||T===void 0)return;const I=t.value;t.value="exchanging",l.value="";try{await x(T,await St().submitCodexLoginRedirect(T,$)),!u&&t.value==="exchanging"&&(t.value=I)}catch(N){u||(l.value=N instanceof Error?N.message:String(N),t.value=I)}}async function B(){const $=n.value;if(p(),m(),h(),t.value="cancelled",l.value="",$!==void 0)try{await St().cancelCodexLogin($)}catch{}}return In(()=>{window.addEventListener("focus",w),document.addEventListener("visibilitychange",_)}),En(()=>{u=!0,window.removeEventListener("focus",w),document.removeEventListener("visibilitychange",_),p(),m();const $=n.value;$!==void 0&&f()&&St().cancelCodexLogin($).catch(()=>{})}),{phase:zl(t),busy:r,loginId:zl(n),authorizeUrl:zl(o),popupBlocked:zl(s),loopback:zl(i),error:zl(l),start:M,submitRedirect:P,cancel:B}}const pWe={class:"codex-signin"},hWe={key:0,class:"codex-signin__denied",role:"status"},mWe={key:1,class:"codex-signin__ok",role:"status"},gWe={class:"codex-signin__status",role:"status"},vWe={key:0,class:"codex-signin__hint"},yWe=["href"],wWe={class:"codex-signin__hint"},kWe={key:2,class:"codex-signin__error",role:"alert"},bWe={class:"codex-signin__actions"},_We=Je({__name:"CodexSignIn",emits:["connected"],setup(e,{emit:t}){const n=t,{t:o}=Lt(),s=P1(),i=V(""),l=fWe(async()=>{await s.refreshRuntimeState();const a=s.authReady.value;return a&&n("connected"),a});async function r(){const a=i.value.trim();a!==""&&(await l.submitRedirect(a),i.value="")}return(a,c)=>(g(),S("div",pWe,[v(l).phase.value==="idle"||v(l).phase.value==="cancelled"?(g(),S(Ce,{key:0},[v(l).phase.value==="cancelled"?(g(),S("p",hWe,E(v(o)("login.deniedTitle")),1)):Y("",!0),W(Nt,{variant:"primary","data-testid":"codex-signin-start",onClick:c[0]||(c[0]=u=>v(l).start())},{default:ae(()=>[W(Ie,{name:"log-in",size:"sm"}),b("span",null,E(v(o)("codexLogin.signIn")),1)]),_:1})],64)):v(l).phase.value==="connected"?(g(),S("p",mWe,[W(Ie,{name:"circle-check",size:"sm"}),b("span",null,E(v(o)("codexLogin.connected")),1)])):(g(),S(Ce,{key:2},[b("p",gWe,[v(l).busy.value||v(l).phase.value!=="failed"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),b("span",null,E(v(o)(`codexLogin.phase.${v(l).phase.value}`)),1)]),v(l).authorizeUrl.value?(g(),S("p",vWe,[Oe(E(v(o)("codexLogin.openLinkHint"))+" ",1),b("a",{href:v(l).authorizeUrl.value,target:"_blank",rel:"noreferrer noopener"},E(v(o)("codexLogin.openLink")),9,yWe)])):Y("",!0),v(l).phase.value==="waiting_for_code"||v(l).phase.value==="exchanging"?(g(),S("form",{key:1,class:"codex-signin__paste",onSubmit:_t(r,["prevent"])},[b("p",wWe,E(v(o)("codexLogin.pasteHint")),1),W(Er,{label:v(o)("codexLogin.pasteLabel")},{default:ae(()=>[W(us,{modelValue:i.value,"onUpdate:modelValue":c[1]||(c[1]=u=>i.value=u),placeholder:v(o)("codexLogin.pastePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),W(Nt,{type:"submit",variant:"primary",loading:v(l).busy.value},{default:ae(()=>[Oe(E(v(o)("codexLogin.submit")),1)]),_:1},8,["loading"])],32)):Y("",!0),v(l).error.value?(g(),S("p",kWe,E(v(o)("codexLogin.failed",{message:v(l).error.value})),1)):Y("",!0),b("div",bWe,[v(l).phase.value==="failed"?(g(),ue(Nt,{key:0,variant:"primary",onClick:c[2]||(c[2]=u=>v(l).start())},{default:ae(()=>[Oe(E(v(o)("codexLogin.retry")),1)]),_:1})):(g(),ue(Nt,{key:1,variant:"secondary",onClick:c[3]||(c[3]=u=>v(l).cancel())},{default:ae(()=>[Oe(E(v(o)("codexLogin.cancel")),1)]),_:1}))])],64))]))}}),xWe=vt(_We,[["__scopeId","data-v-3bd16f58"]]),SWe=["aria-label"],CWe={class:"first-run__panel"},MWe={class:"first-run__steps"},AWe={class:"first-run__dot"},TWe={key:0,class:"first-run__body"},EWe={class:"first-run__sub"},IWe={key:0,class:"first-run__options"},$We={class:"first-run__option-main"},LWe={class:"first-run__option-name"},NWe={class:"first-run__option-desc"},zWe={class:"first-run__badge"},BWe={class:"first-run__option-main"},RWe={class:"first-run__option-name"},PWe={class:"first-run__option-desc"},FWe={class:"first-run__option-main"},jWe={class:"first-run__option-name"},OWe={class:"first-run__option-desc"},HWe={key:1,class:"first-run__route"},DWe={class:"first-run__actions"},VWe={key:2,class:"first-run__skip-hint"},WWe={key:1,class:"first-run__body"},qWe={class:"first-run__sub"},UWe={key:0,class:"first-run__empty"},ZWe={key:1,class:"first-run__models"},KWe=["data-testid","onClick"],GWe={class:"first-run__model-id"},YWe={key:0,class:"first-run__badge"},XWe={class:"first-run__model-ctx"},JWe={class:"first-run__actions"},QWe={key:2,class:"first-run__body"},eqe={class:"first-run__sub"},tqe={class:"first-run__ready"},nqe={class:"first-run__actions"},oqe=Je({__name:"FirstRun",emits:["complete"],setup(e,{emit:t}){const n=t,{t:o}=Lt(),s=P1(),i=V("connect"),l=V(null),r=V(null),a=V(!1),c=V(!1),u=["connect","model","appearance"],d=z(()=>u.indexOf(i.value)),f=z(()=>(s.models.value??[]).filter(T=>T.capabilities===void 0||T.capabilities.length===0||T.capabilities.some(I=>I.trim().toLowerCase()==="tool_use"))),p=z(()=>s.defaultModel.value??void 0),h=z(()=>{const T=p.value;return f.value.toSorted((I,N)=>I.id===T?-1:N.id===T?1:N.maxContextSize-I.maxContextSize||I.id.localeCompare(N.id))}),m=z(()=>a.value?h.value:h.value.slice(0,5)),k=z(()=>(s.providers.value??[])[0]?.id??""),x=z(()=>s.authReady.value&&f.value.length>0),y=z(()=>r.value!==null);Ze([p,f],()=>{r.value===null&&(r.value=p.value??f.value[0]?.id??null)},{immediate:!0});function w(){x.value&&(i.value="model")}async function _(){const T=r.value;if(!(T===null||c.value)){c.value=!0;try{T!==s.defaultModel.value&&await s.updateConfig({defaultModel:T}),await s.refreshRuntimeState(),s.authReady.value&&(i.value="appearance")}finally{c.value=!1}}}function M(){s.setOnboarded(!0),n("complete")}function P(){M()}function B(T){l.value=T}async function $(){await s.refreshRuntimeState(),x.value&&w()}return(T,I)=>(g(),S("div",{class:"first-run",role:"dialog","aria-modal":"true","aria-label":v(o)("firstRun.connect.title")},[b("div",CWe,[b("ol",MWe,[(g(),S(Ce,null,at(u,(N,C)=>b("li",{key:N,class:Pe(["first-run__step",{"is-current":C===d.value,"is-done":CB("codex"))},[b("span",$We,[b("span",LWe,E(v(o)("firstRun.connect.codexName")),1),b("span",NWe,E(v(o)("firstRun.connect.codexDesc")),1)]),b("span",zWe,E(v(o)("firstRun.connect.codexBadge")),1)]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-catalog",onClick:I[1]||(I[1]=N=>B("catalog"))},[b("span",BWe,[b("span",RWe,E(v(o)("firstRun.connect.catalogName")),1),b("span",PWe,E(v(o)("firstRun.connect.catalogDesc")),1)]),W(Ie,{name:"chevron-right",size:"sm"})]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-manual",onClick:I[2]||(I[2]=N=>B("manual"))},[b("span",FWe,[b("span",jWe,E(v(o)("firstRun.connect.manualName")),1),b("span",OWe,E(v(o)("firstRun.connect.manualDesc")),1)]),W(Ie,{name:"chevron-right",size:"sm"})])])):(g(),S("div",HWe,[l.value==="codex"?(g(),ue(xWe,{key:0,onConnected:$})):(g(),ue(nB,{key:1,config:v(s).config.value,"initial-source":l.value==="manual"?"manual":"catalog",onAdded:$,onCancel:I[3]||(I[3]=N=>l.value=null)},null,8,["config","initial-source"])),W(Nt,{variant:"ghost",size:"sm",onClick:I[4]||(I[4]=N=>l.value=null)},{default:ae(()=>[Oe(E(v(o)("firstRun.connect.back")),1)]),_:1})])),b("div",DWe,[W(Nt,{variant:"ghost","data-testid":"first-run-skip",onClick:P},{default:ae(()=>[Oe(E(v(o)("firstRun.connect.skip")),1)]),_:1}),I[8]||(I[8]=b("span",{class:"first-run__spacer"},null,-1)),x.value?(g(),ue(Nt,{key:0,variant:"primary","data-testid":"first-run-connect-continue",onClick:w},{default:ae(()=>[Oe(E(v(o)("firstRun.continue")),1)]),_:1})):Y("",!0)]),l.value===null?(g(),S("p",VWe,E(v(o)("firstRun.connect.skipHint")),1)):Y("",!0)])):i.value==="model"?(g(),S("section",WWe,[b("h1",null,E(v(o)("firstRun.model.title")),1),b("p",qWe,E(v(o)("firstRun.model.connected",{provider:k.value,count:f.value.length},f.value.length))+" "+E(v(o)("firstRun.model.subtitle")),1),f.value.length===0?(g(),S("p",UWe,E(v(o)("firstRun.model.none")),1)):(g(),S("ul",ZWe,[(g(!0),S(Ce,null,at(m.value,N=>(g(),S("li",{key:N.id},[b("button",{type:"button",class:Pe(["first-run__model",{"is-selected":r.value===N.id}]),"data-testid":`first-run-model-${N.id}`,onClick:C=>r.value=N.id},[I[9]||(I[9]=b("span",{class:"first-run__radio","aria-hidden":"true"},null,-1)),b("span",GWe,E(N.id),1),N.id===p.value?(g(),S("span",YWe,E(v(o)("firstRun.model.recommended")),1)):Y("",!0),b("span",XWe,E(Math.round(N.maxContextSize/1e3))+"K",1)],10,KWe)]))),128))])),h.value.length>5?(g(),ue(Nt,{key:2,variant:"ghost",size:"sm",onClick:I[5]||(I[5]=N=>a.value=!a.value)},{default:ae(()=>[Oe(E(a.value?v(o)("firstRun.model.showFewer"):v(o)("firstRun.model.showAll",{count:h.value.length})),1)]),_:1})):Y("",!0),b("div",JWe,[W(Nt,{variant:"secondary",onClick:I[6]||(I[6]=N=>i.value="connect")},{default:ae(()=>[Oe(E(v(o)("firstRun.back")),1)]),_:1}),I[10]||(I[10]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary",loading:c.value,disabled:!y.value,"data-testid":"first-run-model-continue",onClick:_},{default:ae(()=>[Oe(E(v(o)("firstRun.continue")),1)]),_:1},8,["loading","disabled"])])])):(g(),S("section",QWe,[b("h1",null,E(v(o)("firstRun.appearance.title")),1),b("p",eqe,E(v(o)("firstRun.appearance.subtitle")),1),W(sB,{embedded:"",onComplete:M,onSkip:M}),b("p",tqe,[W(Ie,{name:"circle-check",size:"sm"}),b("span",null,E(v(o)("firstRun.appearance.ready",{model:r.value??""})),1)]),b("div",nqe,[W(Nt,{variant:"secondary",onClick:I[7]||(I[7]=N=>i.value="model")},{default:ae(()=>[Oe(E(v(o)("firstRun.back")),1)]),_:1}),I[11]||(I[11]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary","data-testid":"first-run-finish",onClick:M},{default:ae(()=>[Oe(E(v(o)("firstRun.appearance.finish")),1)]),_:1})])]))])],8,SWe))}}),sqe=vt(oqe,[["__scopeId","data-v-23e77d0d"]]),iqe={class:"recovery"},lqe={class:"recovery__inner"},rqe={class:"recovery__mark","aria-hidden":"true"},aqe={class:"recovery__copy"},cqe={class:"recovery__options"},uqe={class:"recovery__option-name"},dqe={class:"recovery__option-desc"},fqe={class:"recovery__option-name"},pqe={class:"recovery__option-desc"},hqe={class:"recovery__actions"},mqe=Je({__name:"Recovery",emits:["openProviders","dismiss"],setup(e,{emit:t}){const n=t,{t:o}=Lt(),s=P1(),i=z(()=>s.providers.value??[]),l=z(()=>i.value[0]),r=z(()=>i.value.length===0?"noProvider":i.value.some(u=>u.status==="connected")?"noModel":"credential"),a=z(()=>r.value==="noProvider"?o("recovery.noProvider"):o(`recovery.${r.value}`,{provider:l.value?.id??""}));async function c(){await s.refreshRuntimeState()}return(u,d)=>(g(),S("section",iqe,[b("div",lqe,[b("span",rqe,[W(Ie,{name:"alert-triangle",size:"md"})]),b("div",aqe,[b("h1",null,E(v(o)("recovery.title")),1),b("p",null,E(a.value),1)]),b("div",cqe,[r.value!=="noProvider"?(g(),S("button",{key:0,type:"button",class:"recovery__option is-primary","data-testid":"recovery-open-providers",onClick:d[0]||(d[0]=f=>n("openProviders"))},[b("span",uqe,E(v(o)("recovery.fixProvider")),1),b("span",dqe,E(v(o)("recovery.fixProviderDesc")),1)])):Y("",!0),b("button",{type:"button",class:Pe(["recovery__option",{"is-primary":r.value==="noProvider"}]),"data-testid":"recovery-add-provider",onClick:d[1]||(d[1]=f=>n("openProviders"))},[b("span",fqe,E(v(o)("recovery.addProvider")),1),b("span",pqe,E(v(o)("recovery.addProviderDesc")),1)],2)]),b("div",hqe,[W(Nt,{variant:"secondary","data-testid":"recovery-retry",onClick:c},{default:ae(()=>[Oe(E(v(o)("recovery.retry")),1)]),_:1}),W(Nt,{variant:"ghost","data-testid":"recovery-dismiss",onClick:d[2]||(d[2]=f=>n("dismiss"))},{default:ae(()=>[Oe(E(v(o)("recovery.dismiss")),1)]),_:1})])])]))}}),gqe=vt(mqe,[["__scopeId","data-v-68311778"]]),vqe="/logo.png",yqe=["aria-label"],wqe={class:"gload-box"},kqe={class:"gload-text"},bqe={key:0,class:"gload-issue"},_qe={class:"gload-issue-detail"},xqe=Je({__name:"GlobalLoading",props:{issue:{}},setup(e){const{t}=Lt();return(n,o)=>(g(),S("div",{class:"gload",role:"status","aria-label":v(t)("app.connecting")},[b("div",wqe,[o[0]||(o[0]=b("img",{class:"gload-logo",src:vqe,alt:"Pythinker",width:"120",height:"120"},null,-1)),W(Zo,{size:"md",label:v(t)("app.connecting")},null,8,["label"]),b("div",kqe,E(v(t)("app.connecting")),1),e.issue?(g(),S("div",bqe,[b("div",null,E(v(t)("app.connectRetrying")),1),b("div",_qe,E(e.issue),1)])):Y("",!0)])],8,yqe))}}),Sqe=vt(xqe,[["__scopeId","data-v-2468172e"]]),Cqe={class:"kap-root"},Mqe={class:"kap-head"},Aqe={class:"kap-count"},Tqe={class:"kap-head-actions"},Eqe={class:"kap-filters"},Iqe=["value"],$qe={class:"kap-check"},Lqe={class:"kap-check"},Nqe={class:"kap-view-toggle",role:"group"},zqe={key:0,class:"kap-empty"},Bqe=["onClick"],Rqe={class:"kap-ts"},Pqe={class:"kap-label"},Fqe={key:0,class:"kap-detail"},jqe={class:"kap-detail-actions"},Oqe=["onClick"],Hqe={key:1,class:"kap-agg"},Dqe={class:"mono"},Vqe={class:"mono"},Wqe={class:"num"},qqe={class:"num"},Uqe={key:0},Zqe={class:"mono"},Kqe={class:"num"},Gqe={class:"num"},Yqe={key:0},Xqe=Je({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=V("all"),s=V(""),i=V(""),l=V(!1),r=V("timeline"),a=z(()=>(o9.value,[...J7e()])),c=z(()=>{const T=new Set;for(const I of a.value)I.sessionId&&T.add(I.sessionId);return[...T].sort()});function u(T){return T.kind==="rest:error"||T.code!==void 0&&T.code!==0||T.eventType==="error"||T.eventType==="parse-error"}const d=z(()=>{const T=s.value.trim().toLowerCase();return a.value.filter(I=>!(o.value!=="all"&&I.source!==o.value||i.value&&I.sessionId!==i.value||l.value&&!u(I)||T&&!`${I.label} ${I.kind} ${I.eventType??""} ${I.sessionId??""} ${I.requestId??""}`.toLowerCase().includes(T)))}),f=z(()=>{const T=new Map;for(const I of d.value){if(I.kind!=="ws:in"&&I.kind!=="ws:out")continue;const N=I.kind==="ws:in"?"←":"→",C=`${N} ${I.eventType??"?"} @ ${I.sessionId??"-"}`,O=T.get(C)??{key:C,sessionId:I.sessionId??"-",eventType:I.eventType??"?",dir:N,count:0};O.count++,I.seq!==void 0&&(O.lastSeq=I.seq),T.set(C,O)}return[...T.values()].sort((I,N)=>N.count-I.count)}),p=z(()=>{const T=new Map;for(const I of d.value){if(I.source!=="rest"||I.kind==="rest:request")continue;const N=`${I.method??"?"} ${I.path??"?"}`,C=T.get(N)??{count:0,errors:0,totalMs:0,timed:0};C.count++,u(I)&&C.errors++,I.durationMs!==void 0&&(C.totalMs+=I.durationMs,C.timed++),T.set(N,C)}return[...T.entries()].map(([I,N])=>({key:I,count:N.count,errors:N.errors,avgMs:N.timed>0?Math.round(N.totalMs/N.timed):0})).sort((I,N)=>N.count-I.count)}),h=V(null),m=V(!0),k=V(null),x=V(null);Ze(()=>d.value.length,async()=>{if(!m.value||r.value!=="timeline")return;await yt();const T=k.value;T&&(T.scrollTop=T.scrollHeight)});function y(T){h.value=h.value===T?null:T}function w(T){const I=new Date(T),N=(C,O=2)=>String(C).padStart(O,"0");return`${N(I.getHours())}:${N(I.getMinutes())}:${N(I.getSeconds())}.${N(I.getMilliseconds(),3)}`}function _(T){return JSON.stringify(T,null,2)}async function M(T){await fs(_(T))&&(x.value=T.id,setTimeout(()=>{x.value===T.id&&(x.value=null)},1500))}function P(){MN(d.value)}function B(T){return u(T)||T.source==="client"?"b-err":T.source==="rest"?"b-rest":T.kind==="ws:lifecycle"?"b-life":T.kind==="ws:out"?"b-out":"b-in"}function $(T){return T.source==="rest"?"REST":T.source==="client"?"APP":"WS"}return(T,I)=>(g(),S("section",Cqe,[b("header",Mqe,[I[11]||(I[11]=b("strong",null,"KAP debug",-1)),b("span",Aqe,E(d.value.length)+"/"+E(a.value.length),1),b("div",Tqe,[b("button",{type:"button",class:Pe({on:v(e2)}),onClick:I[0]||(I[0]=N=>e2.value=!v(e2))},E(v(e2)?"resume":"pause"),3),b("button",{type:"button",onClick:I[1]||(I[1]=N=>v(Q7e)())},"clear"),b("button",{type:"button",onClick:I[2]||(I[2]=N=>P())},"export jsonl"),W(Cn,{text:"Close window"},{default:ae(()=>[b("button",{type:"button",onClick:I[3]||(I[3]=N=>n("close"))},"✕")]),_:1})])]),b("div",Eqe,[Jn(b("select",{"onUpdate:modelValue":I[4]||(I[4]=N=>o.value=N),"aria-label":"Source filter"},[...I[12]||(I[12]=[b("option",{value:"all"},"rest + ws + app",-1),b("option",{value:"rest"},"rest",-1),b("option",{value:"ws"},"ws",-1),b("option",{value:"client"},"app errors",-1)])],512),[[w8,o.value]]),Jn(b("select",{"onUpdate:modelValue":I[5]||(I[5]=N=>i.value=N),"aria-label":"Session filter"},[I[13]||(I[13]=b("option",{value:""},"all sessions",-1)),(g(!0),S(Ce,null,at(c.value,N=>(g(),S("option",{key:N,value:N},E(N),9,Iqe))),128))],512),[[w8,i.value]]),Jn(b("input",{"onUpdate:modelValue":I[6]||(I[6]=N=>s.value=N),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[js,s.value]]),b("label",$qe,[Jn(b("input",{"onUpdate:modelValue":I[7]||(I[7]=N=>l.value=N),type:"checkbox"},null,512),[[t5,l.value]]),I[14]||(I[14]=Oe(" errors",-1))]),b("label",Lqe,[Jn(b("input",{"onUpdate:modelValue":I[8]||(I[8]=N=>m.value=N),type:"checkbox"},null,512),[[t5,m.value]]),I[15]||(I[15]=Oe(" follow",-1))]),b("div",Nqe,[b("button",{type:"button",class:Pe({on:r.value==="timeline"}),onClick:I[9]||(I[9]=N=>r.value="timeline")},"timeline",2),b("button",{type:"button",class:Pe({on:r.value==="aggregate"}),onClick:I[10]||(I[10]=N=>r.value="aggregate")},"aggregate",2)])]),r.value==="timeline"?(g(),S("div",{key:0,ref_key:"listRef",ref:k,class:"kap-list"},[d.value.length===0?(g(),S("div",zqe," No trace entries yet. REST calls and WS frames will appear here. ")):Y("",!0),(g(!0),S(Ce,null,at(d.value,N=>(g(),S("div",{key:N.id,class:"kap-row-wrap"},[b("button",{type:"button",class:Pe(["kap-row",{expanded:h.value===N.id}]),onClick:C=>y(N.id)},[b("span",Rqe,E(w(N.ts)),1),b("span",{class:Pe(["kap-badge",B(N)])},E($(N)),3),b("span",Pqe,E(N.label),1)],10,Bqe),h.value===N.id?(g(),S("div",Fqe,[b("div",jqe,[b("button",{type:"button",onClick:C=>M(N)},E(x.value===N.id?"copied ✓":"copy json"),9,Oqe)]),b("pre",null,E(_(N)),1)])):Y("",!0)]))),128))],512)):(g(),S("div",Hqe,[I[20]||(I[20]=b("h4",null,"WS frames by session / type",-1)),b("table",null,[I[17]||(I[17]=b("thead",null,[b("tr",null,[b("th",null,"dir"),b("th",null,"type"),b("th",null,"session"),b("th",null,"count"),b("th",null,"last seq")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,at(f.value,N=>(g(),S("tr",{key:N.key},[b("td",null,E(N.dir),1),b("td",Dqe,E(N.eventType),1),b("td",Vqe,E(N.sessionId),1),b("td",Wqe,E(N.count),1),b("td",qqe,E(N.lastSeq??"—"),1)]))),128)),f.value.length===0?(g(),S("tr",Uqe,[...I[16]||(I[16]=[b("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):Y("",!0)])]),I[21]||(I[21]=b("h4",null,"REST by endpoint",-1)),b("table",null,[I[19]||(I[19]=b("thead",null,[b("tr",null,[b("th",null,"endpoint"),b("th",null,"count"),b("th",null,"errors"),b("th",null,"avg ms")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,at(p.value,N=>(g(),S("tr",{key:N.key},[b("td",Zqe,E(N.key),1),b("td",Kqe,E(N.count),1),b("td",{class:Pe(["num",{err:N.errors>0}])},E(N.errors),3),b("td",Gqe,E(N.avgMs),1)]))),128)),p.value.length===0?(g(),S("tr",Yqe,[...I[18]||(I[18]=[b("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):Y("",!0)])])]))]))}}),Jqe=vt(Xqe,[["__scopeId","data-v-7bab00af"]]),Qqe=Je({__name:"DebugPanel",setup(e){const t=V(!1);let n=null,o=null,s=null;const i=["data-color-scheme","data-accent"];function l(u){const d=document.documentElement,f=u.documentElement;for(const p of i){const h=d.getAttribute(p);h!==null?f.setAttribute(p,h):f.removeAttribute(p)}}function r(u){const d=u.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const h of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(h.cloneNode(!0));l(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function c(){if(n&&!n.closed){n.focus();return}const u=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!u)return;n=u;const d=r(u),f=n5(Jqe,{onClose:()=>u.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&l(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),u.addEventListener("pagehide",a),u.addEventListener("beforeunload",a)}return In(()=>{c()}),vo(()=>{n&&!n.closed&&n.close(),a()}),(u,d)=>(g(),ue(Cn,{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:ae(()=>[b("button",{class:"kap-fab",type:"button",onClick:c}," KAP ")]),_:1},8,["text"]))}}),eUe=vt(Qqe,[["__scopeId","data-v-992ae84c"]]);function tUe({client:e}){const t=z(()=>e.appState.value==="first-run"||e.appState.value==="recovery"),n="/login",o=V(null);function s(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function i(l){typeof window>"u"||window.history.replaceState(window.history.state,"",l)}return Ze(t,l=>{if(!(typeof window>"u")){if(l){window.location.pathname!==n&&(o.value=s(),i(n));return}window.location.pathname===n&&(i(o.value??"/"),o.value=null)}},{immediate:!0}),{showAuthGate:t}}function nUe({running:e,showAuthGate:t}){const{t:n}=Lt(),o=V(ua[0]);let s=0,i;function l(){i!==void 0&&clearInterval(i),i=void 0}Ze(e,a=>{l(),s=0,o.value=ua[0],a&&(i=setInterval(()=>{s=(s+1)%ua.length,o.value=ua[s]??ua[0]},R0))},{immediate:!0}),Bu(l);const r=z(()=>{const a=e.value?`${o.value} `:"";return t.value?`${a}${n("app.authPageTitle")} - Pythinker Code Web`:`${a}Pythinker Code Web`});tA(()=>{typeof document<"u"&&(document.title=r.value)})}function oUe(e,t,n){const o=new Map(e.attachments.map(a=>[a.attachmentId,a])),s=new Map(e.tasks.map(a=>[a.taskId,a])),i=e.items.find(a=>a.kind==="turn"),l=e.items.findLast(a=>a.kind==="turn"),r=e.items.flatMap(a=>a.kind==="turn"?sUe(a,o,s,{...n,startedAt:a.turnId===i?.turnId?t?.createdAt:void 0,endedAt:a.turnId===l?.turnId?t?.disposedAt:void 0}):[]);return N9(r,[],a=>n.getFileUrl(a),e.meta.activity==="turn")}function sUe(e,t,n,o){const s=[],i=aUe([e.startedAt,...e.steps.map(c=>c.startedAt),o.startedAt]),l=jd(e.endedAt)??jd(o.endedAt),r=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const c=[{type:"text",text:e.prompt}];for(const u of e.attachmentIds??[]){const d=lUe(t.get(u));d!==void 0&&c.push(d)}s.push({id:`${e.turnId}:input`,sessionId:o.sessionId,role:"user",content:c,createdAt:i,promptId:r,metadata:{origin:e.origin}})}for(const c of e.steps){const u=jd(c.startedAt)??i;for(const d of c.frames){if(d.kind==="text"){if(d.text.length===0||d.role==="user"&&d.taskId===void 0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:d.role,content:[{type:"text",text:d.text}],createdAt:u,promptId:r,metadata:d.taskId===void 0?void 0:{origin:{kind:"task",taskId:d.taskId},task:n.get(d.taskId),[TL]:iUe(d.taskId,d.text,n.get(d.taskId))}});continue}if(d.kind==="thinking"){if(d.text.length===0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:"assistant",content:[{type:"thinking",thinking:d.text,startedAt:u,durationMs:_M(u,jd(c.endedAt))}],createdAt:u,promptId:r});continue}d.kind==="tool"&&(s.push({id:`${d.frameId}:call`,sessionId:o.sessionId,role:"assistant",content:[{type:"toolUse",toolCallId:d.toolCallId,toolName:d.name,input:d.input??d.display??{},outputLines:d.state==="running"?rUe(d.output):void 0}],createdAt:u,promptId:r}),d.state!=="running"&&s.push({id:`${d.frameId}:result`,sessionId:o.sessionId,role:"tool",content:[{type:"toolResult",toolCallId:d.toolCallId,output:d.output??d.error??"",isError:d.state==="error"}],createdAt:jd(c.endedAt)??u,promptId:r}))}}const a=e.durationMs??_M(i,l);if(a!==void 0){const c=s.findLastIndex(u=>u.role==="assistant");c>=0&&(s[c]={...s[c],durationMs:a})}return s}function iUe(e,t,n){if(EL(t).length>0)return;const[o="",...s]=t.split(` +`)}function w(){o.planArmed||o.planMode||(o.goalMode&&i("toggleGoal"),i("togglePlan"))}function _(){if(no.value){i("focusGoal");return}o.goalMode||((o.planArmed||o.planMode)&&i("togglePlan"),i("toggleGoal"))}const A=V(!1);function P(){A.value=!A.value,yt(()=>{d(),T(),u.value?.focus()})}function z(){A.value&&(A.value=!1,yt(d))}function L(Me){if(typeof getComputedStyle>"u")return dM;const it=Number.parseFloat(getComputedStyle(Me).minHeight);return Number.isFinite(it)&&it>0?it:dM}const E=V(!1);function T(){const Me=u.value;E.value=!!Me&&Me.scrollHeight>L(Me)}Ke(c,()=>{yt(T)}),Ke(()=>o.sessionId,()=>{A.value=!1,C.value=!1,R.value=!1,h.value=[]});const $=kbe({text:c,textareaRef:u,autosize:d,sessionId:()=>o.sessionId}),{open:C,items:j,active:H,update:D,select:M}=bbe({text:c,textareaRef:u,autosize:d,skills:()=>o.skills,emitCommand:Me=>{if(Me==="/plan"){w();return}if(Me==="/goal"){_();return}i("command",Me)},historyPush:Me=>$.push(Me),clearDraft:p}),{open:R,items:O,active:U,loading:Z,stale:q,update:te,select:ee,close:J,getMentionToken:se}=_be({text:c,textareaRef:u,autosize:d,searchFiles:()=>o.searchFiles}),Q=V(null),me=V(null),xe=V(null);function Ye(Me){u.value?.setSelectionRange(Me,Me)}const at=B({get:()=>c.value.startsWith("/")?c.value.slice(1):c.value,set:Me=>{c.value=`/${Me}`,yt(()=>{Ye(c.value.length),D()})}}),X=B({get:()=>{const Me=xe.value;return Me?c.value.slice(Me.start+1,Me.end):""},set:Me=>{const it=xe.value;if(!it)return;c.value=`${c.value.slice(0,it.start)}@${Me}${c.value.slice(it.end)}`;const ft=it.start+Me.length+1;xe.value={start:it.start,end:ft},yt(()=>{Ye(ft),te()})}});Ke([C,a],async([Me,it])=>{!Me||!it||(await yt(),Q.value?.focus())}),Ke([R,a],async([Me,it])=>{!Me||!it||(xe.value=se(),await yt(),me.value?.focus())});function oe(){C.value=!1,u.value?.focus()}function F(Me){Me||oe()}function K(){J(),xe.value=null,u.value?.focus()}function he(Me){Me||K()}function ye(){$.resetBrowsing(),D(),te()}const{attachments:ve,previewAttachment:ie,fileInputRef:de,isDragOver:be,removeAttachment:Se,openAttachmentPreview:je,closeAttachmentPreview:et,openFilePicker:le,handleFileInputChange:fe,handleDragOver:ge,handleDragLeave:Oe,handleDrop:Fe,clearAfterSubmit:pt,loadAttachments:kt}=Sbe({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId});function qt(){const Me=ve.value.map(it=>it.localId);for(const it of Me)Se(it)}const nn=B(()=>ve.value.filter(Me=>Me.kind!=="file")),Jt=B(()=>ve.value.filter(Me=>Me.kind==="file")),kn=V(null),Dn=V(null),xn=V(!1);let $n=null;function Hn(){const Me=kn.value;xn.value=Me!==null&&Me.scrollHeight>Me.clientHeight+1}Ke(kn,Me=>{$n?.disconnect(),$n=null,Me&&typeof ResizeObserver=="function"&&($n=new ResizeObserver(Hn),$n.observe(Me)),Hn()},{immediate:!0}),Ke(ve,()=>void yt(Hn),{deep:!0}),Ke(()=>[nn.value.length,Jt.value.length],([Me,it],[ft,yn])=>{Me<=ft&&it<=yn||yt(()=>{const Yt=kn.value;Yt&&(Yt.scrollTop=Me>ft&&Dn.value?Dn.value.offsetHeight-Yt.clientHeight:Yt.scrollHeight)})}),In(()=>{c.value&&yt(()=>{d(),T()})}),En(()=>{document.removeEventListener("click",oi,!0),$n?.disconnect(),ne?.disconnect(),Wo?.disconnect(),hs()});function bn(){u.value?.focus({preventScroll:!0})}function Wn(Me){kt(Me)}const Pn=B(()=>C.value||R.value||Ft.value||Ut.value||en.value||es.value),Mn=B(()=>c.value.trim().length===0&&ve.value.length===0&&h.value.length===0);t({loadForEdit:f,loadAttachmentsForEdit:Wn,insertQuote:k,focus:bn,anyPopupOpen:Pn,isEmpty:Mn});const Nn=V(null);let An=null;function Qn(Me){Nn.value=l("composer.noArgCommand",{cmd:Me}),An!==null&&clearTimeout(An),An=setTimeout(()=>{Nn.value=null,An=null},3e3)}En(()=>{An!==null&&clearTimeout(An)});function Fn(Me){return{fileId:Me.fileId,kind:Me.kind,name:Me.name,mediaType:Me.mediaType,size:Me.size}}function Qt(Me){if(Me.kind==="file"){Me.fileId!==void 0&&ON(Me.fileId,Me.name,Me.mediaType);return}je(Me)}function uo(){const Me=c.value.trim(),it=y(Me);if(ve.value.some(Yt=>Yt.uploading))return;const ft=ve.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!it&&ft.length===0)return;if(h.value.length===0&&Me==="/plan"){$.push(Me),c.value="",p(),C.value=!1,z(),w();return}if(h.value.length===0&&Me==="/goal"){$.push(Me),c.value="",p(),C.value=!1,z(),_();return}if(h.value.length===0&&Me){const Yt=fbe(Me),li=Yt?GN(o.skills).find(vi=>vi.name===Yt.cmd||vi.name===`/${Y5}${Yt.cmd.slice(1)}`):void 0;if(Yt&&li){if(Yt.arg.trim()&&li.acceptsInput!==!0){Qn(Yt.cmd);return}$.push(Me),c.value="",p(),C.value=!1,z(),i("command",Yt.arg?`${Yt.cmd} ${Yt.arg}`:Yt.cmd);return}}Me&&$.push(Me);const yn={text:it,attachments:ft.map(Yt=>Fn(Yt))};ie.value=null,pt(),c.value="",h.value=[],p(),C.value=!1,R.value=!1,z(),i("submit",yn)}function Zn(){if(!o.running||ve.value.some(Yt=>Yt.uploading))return;const Me=c.value.trim(),it=y(Me),ft=ve.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!it&&ft.length===0&&o.queued.length===0)return;const yn={text:it,attachments:ft.map(Yt=>Fn(Yt))};pt(),Me&&$.push(Me),c.value="",h.value=[],p(),C.value=!1,R.value=!1,z(),i("steer",yn)}let Bo=!1,Un=null;function hs(){Un!==null&&(clearTimeout(Un),Un=null)}function Io(){hs(),Bo=!0}function Rt(){hs(),Un=setTimeout(()=>{Un=null,Bo=!1},0)}function Jo(Me){return Bo||Me.isComposing||Me.keyCode===229}function Ls(Me){if(!Jo(Me)){if(Vo.value&&Me.key==="Backspace"&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const it=u.value;if(it&&it.selectionStart===0&&it.selectionEnd===0){Me.preventDefault(),zi();return}}if(Me.key==="Escape"){if(es.value){Me.preventDefault(),Ne();return}if(Ft.value){Me.preventDefault(),Xn();return}if(Ut.value){Me.preventDefault(),Po();return}if(en.value){Me.preventDefault(),Us();return}}if(C.value){if(Me.key==="Escape"){Me.preventDefault(),C.value=!1;return}if(Me.key==="Tab"&&j.value.length===0){C.value=!1;return}if(Me.key==="ArrowDown"){Me.preventDefault(),H.value=(H.value+1)%j.value.length;return}if(Me.key==="ArrowUp"){Me.preventDefault(),H.value=(H.value-1+j.value.length)%j.value.length;return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const it=j.value[H.value];it&&M(it);return}}if(R.value&&!Z.value){if(Me.key==="ArrowDown"){Me.preventDefault(),U.value=(U.value+1)%Math.max(1,O.value.length);return}if(Me.key==="ArrowUp"){Me.preventDefault(),U.value=(U.value-1+Math.max(1,O.value.length))%Math.max(1,O.value.length);return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const it=O.value[U.value];it&&ee(it);return}if(Me.key==="Escape"){Me.preventDefault(),R.value=!1;return}}if(Me.key==="s"&&(Me.ctrlKey||Me.metaKey)&&!Me.shiftKey&&!Me.altKey){o.running&&(Me.preventDefault(),Zn());return}if(!A.value&&!C.value&&!R.value&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const it=$.isBrowsing();if(Me.key==="ArrowUp"&&$.hasHistory()&&(it||$.caretAtTextStart())){Me.preventDefault(),$.recallOlder(),C.value=!1;return}if(Me.key==="ArrowDown"&&it){Me.preventDefault(),$.recallNewer(),C.value=!1;return}}if(Me.key==="Enter"&&!Me.shiftKey){if(A.value&&!(Me.metaKey||Me.ctrlKey))return;Me.preventDefault(),uo()}}}const $e=B(()=>l("composer.send")),Ge=B(()=>!!o.uploadImage),ot=B(()=>!ve.value.some(Me=>Me.uploading)&&(c.value.trim()!==""||h.value.length>0||ve.value.some(Me=>!Me.error&&Me.fileId))),dt=B(()=>{if(C.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),Mt=B(()=>{if(C.value&&j.value.length>0)return`composer-slash-option-${H.value}`;if(R.value&&O.value.length>0)return`composer-mention-option-${U.value}`}),Ft=V(!1),Ut=V(!1),en=V(!1),tn=V(null),eo=V(null),Ro=V(null),$s=V(null),Do=V(null),We=V(null),st=V(null),Xe=V(null);ca(We),ca(st),ca(Xe);const qe=V(""),Pe=V(""),bt=V(""),Lt=V(""),cn=V(!1);function So(){Ft.value=!Ft.value,Ft.value&&(vl(),Ut.value=!1,en.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Qo(){Ni.value||(Ut.value=!Ut.value,Ut.value&&(Zs(),Ft.value=!1,en.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0)))}function Po(){Ut.value=!1,mi()}function Xn(){Ft.value=!1,mi()}function pn(){en.value=!en.value,en.value&&(ql(),Ft.value=!1,Ut.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Us(){en.value=!1,mi()}function mi(){!Ft.value&&!Ut.value&&!en.value&&!es.value&&document.removeEventListener("click",oi,!0)}function oi(Me){const it=Me.target;tn.value?.contains(it)||Hs.value?.contains(it)||vs.value?.contains(it)||(Xn(),Po(),Us(),Ne())}function ql(){const Me=eo.value,it=tn.value;qe.value=Me&&it?`${Math.round(Me.getBoundingClientRect().left-it.getBoundingClientRect().left)}px`:""}function vl(){const Me=Ro.value,it=tn.value;Pe.value=Me&&it?`${Math.round(it.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}function Zs(){const Me=$s.value,it=tn.value;bt.value=Me&&it?`${Math.round(it.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}const yo=B(()=>{const Me=o.status?.ctxMax??0;return Me<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/Me*100)))}),Lo=B(()=>{const Me=ba(o.status?.ctxUsed??0),it=ba(o.status?.ctxMax??0);return l("status.ctxTooltip",{used:Me,max:it,pct:yo.value})}),yl=B(()=>yo.value>=80),ms=B(()=>o.models?.find(Me=>Me.id===o.status?.modelId)),wl=B(()=>i6(ms.value)),gi=B(()=>l6(ms.value)),si=B(()=>w9(ms.value,o.thinking)),Ul=B(()=>gi.value.includes(si.value)?si.value:""),Ni=B(()=>wl.value==="unsupported"||gi.value.length<=1),Ae=B(()=>{const Me=(ms.value?.supportEfforts?.length??0)>0,it=si.value;return Me&&it!=="on"&&it!=="off"?rf(it):lt(it)}),Ie=B(()=>l("composer.thinkingControl",{level:Ae.value}));function At(Me){Ni.value||(i("setThinking",XN(ms.value,Me)),Po())}function lt(Me){return Me==="on"?l("status.thinkingOn"):Me==="off"?l("status.thinkingOff"):rf(Me)}const mn=B(()=>gi.value.map(Me=>({value:Me,label:lt(Me)}))),Kn=B(()=>o.planArmed===!0||o.planMode===!0),to=B(()=>o.workflowActive===!0),Co=B(()=>o.goal?.status??o.activationBadges?.goal?.status??null),no=B(()=>Co.value!==null&&Co.value!=="complete"),Vo=B(()=>o.goalMode?"goal":o.planArmed?"plan":null),Qi=V(null),Os=V(""),Ta=B(()=>Os.value?{textIndent:Os.value}:void 0);let Wo=null;function zi(){Vo.value==="goal"?i("toggleGoal"):Vo.value==="plan"&&i("togglePlan")}function gs(){const Me=Qi.value;Os.value=Me?`calc(${Me.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ke(Vo,async Me=>{if(Wo?.disconnect(),Wo=null,!Me){Os.value="";return}await yt(),gs(),typeof ResizeObserver=="function"&&Qi.value&&(Wo=new ResizeObserver(gs),Wo.observe(Qi.value))},{immediate:!0});const kl=V(null),es=V(!1),Hs=V(null),vs=V(null);ca(Hs),ca(vs);const bl=V(null),Ks=V(null);let ne=null;const ke=B(()=>{const Me=[];return Ge.value&&Me.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Vt}),a.value&&Me.push({id:"slash",icon:"terminal",nameKey:"composer.addSlash",descKey:"composer.addSlashDesc",action:Wt},{id:"mention",icon:"link",nameKey:"composer.addMention",descKey:"composer.addMentionDesc",action:on}),Me.push({id:"capabilities",icon:"sliders",nameKey:"capabilityMenu.trigger",action:Vn},{id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:Ht},{id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:Tn},{id:"workflow",icon:"sparkles",nameKey:"status.dynamicWorkflowLabel",descKey:"composer.addWorkflowDesc",action:zn}),Me});function Te(){const Me=bl.value;if(!Me||Me.scrollHeight<=Me.clientHeight+1){Ks.value=null;return}const it=getComputedStyle(Me),ft=Number.parseFloat(it.getPropertyValue("--menu-scrollbar-track-inset"))||0,yn=Number.parseFloat(it.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Yt=Me.clientHeight-ft*2,li=Math.max(yn,Me.clientHeight/Me.scrollHeight*Yt),vi=Me.scrollHeight-Me.clientHeight;Ks.value={top:Me.offsetTop+ft+Me.scrollTop/vi*(Yt-li),height:li}}Ke(es,async Me=>{ne?.disconnect(),ne=null,Ks.value=null,Me&&(await yt(),Te(),typeof ResizeObserver=="function"&&bl.value&&(ne=new ResizeObserver(Te),ne.observe(bl.value)))});function Ne(){es.value=!1,mi()}function Qe(Me){Me||Ne()}function ht(){if(es.value){Ne();return}Xn(),Po(),Us(),C.value=!1,R.value=!1,es.value=!0,document.addEventListener("click",oi,!0),yt(()=>{(a.value?vs.value:Hs.value)?.querySelector(".am-row")?.focus()})}function jt(Me){Me.action(),a.value&&Me.id==="files"||u.value?.focus()}function Zt(Me){if(Me.key==="Escape"){Me.preventDefault(),Ne(),u.value?.focus();return}if(Me.key==="Tab"){Ne();return}if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;Me.preventDefault();const it=a.value?vs.value:Hs.value,ft=Array.from(it?.querySelectorAll(".am-row")??[]);if(ft.length===0)return;const yn=ft.indexOf(document.activeElement),Yt=Me.key==="ArrowDown"?(yn+1)%ft.length:(yn-1+ft.length)%ft.length;ft[Yt]?.focus()}function Vt(){Ne(),le()}function Wt(){Ne(),c.value="/",yt(()=>{Ye(1),D()})}function on(){Ne(),c.value="@",yt(()=>{Ye(1),te()})}function Vn(){Ne(),kl.value?.toggleOpen()}function Ht(){Ne(),o.goalMode||_()}function Tn(){Ne(),Kn.value||w()}function zn(){Ne(),to.value||i("toggleWorkflow")}const Ns=[{mode:"manual",icon:"fingerprint",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],rs=V(null),_l=V("");function X0(Me){const it={};return Me&&(it["--composer-menu-desc-width"]=Me),it}const J0=B(()=>{const Me=X0(_l.value);return qe.value&&(Me.left=qe.value),Me}),qu=B(()=>{const Me={};return Pe.value&&(Me.right=Pe.value),Lt.value&&(Me.maxHeight=Lt.value),Me}),hr=B(()=>{const Me={};return bt.value&&(Me.right=bt.value),Me});let ts=null;function Fr(Me){const it=Number.parseFloat(Me);return Number.isFinite(it)?it:0}function Uu(Me){return`${Me.fontStyle||"normal"} ${Me.fontWeight||"400"} ${Me.fontSize} ${Me.fontFamily}`}function Q0(Me){return Me.letterSpacing==="normal"?0:Fr(Me.letterSpacing)}function jr(Me,it){if(!Me)return 0;const ft=Oke(Me,Uu(it),{letterSpacing:Q0(it)});return Hke(ft)}function P1(){const Me=rs.value?.querySelector(".pd-desc");if(!Me)return;const it=getComputedStyle(Me),ft=Math.max(0,...Ns.map(yn=>jr(l(yn.descKey),it)));_l.value=ft>0?`${Math.ceil(ft)}px`:""}function F1(){typeof window>"u"||(ts!==null&&window.cancelAnimationFrame(ts),yt(()=>{ts=window.requestAnimationFrame(()=>{ts=null,P1()})}))}Ke(r,F1,{immediate:!0}),In(()=>{F1(),document.fonts?.ready.then(F1)}),En(()=>{ts!==null&&(window.cancelAnimationFrame(ts),ts=null)});function Re(Me){i("setPermission",Me),Us()}const pe=B(()=>Ns.find(Me=>Me.mode===o.status?.permission)),Le=B(()=>pe.value?l(pe.value.labelKey):""),Sn=B(()=>pe.value?.icon??"fingerprint"),ii=V(!1),el=V(!1),Ea=V(!1),Or=V(!1);let Hr=0,ec=0,j1=0,tc=0;const Zu=V(null);let O1=null;function Ku(Me,it,ft){const yn=Me.getPropertyValue(it).trim(),Yt=Number.parseFloat(yn);return Number.isFinite(Yt)?yn.endsWith("em")?Yt*Number.parseFloat(Me.fontSize):Yt:ft}function xl(Me){return Me.scrollWidth>Me.clientWidth+1||Me.clientWidth===0&&(Me.textContent?.length??0)>0}function zf(Me){const it=Me.getBoundingClientRect().left;for(const ft of Me.querySelectorAll(".compact-chip, .ctx-group, .model-pill, .stop, .send")){const yn=ft.getBoundingClientRect();if(yn.width>0&&yn.lefttc+yn&&(Or.value=!1,yt(Sl));return}if(Ea.value){if(Yt>j1+yn){Ea.value=!1,yt(Sl);return}li&&zf(li)&&(tc=Yt,Or.value=!0,yt(Sl));return}if(el.value){if(Yt>ec+yn){el.value=!1,yt(Sl);return}li&&zf(li)&&(yl.value?(j1=Yt,Ea.value=!0):(tc=Yt,Or.value=!0),yt(Sl));return}if(ii.value&&Yt>Hr+yn){ii.value=!1,yt(Sl);return}const vi=Do.value;!vi||!xl(vi)||vi.getBoundingClientRect().width>=ft||(ii.value?(ec=Yt,el.value=!0):(Hr=Yt,ii.value=!0),yt(Sl))}In(()=>{typeof ResizeObserver=="function"&&tn.value&&(O1=new ResizeObserver(Sl),O1.observe(tn.value)),document.fonts?.ready.then(Sl)}),Ke([Le,to,yl,Ae,()=>o.status?.model,()=>o.working,r],()=>{ii.value=!1,el.value=!1,Ea.value=!1,Or.value=!1,yt(Sl)}),En(()=>{O1?.disconnect(),O1=null});const H1=B(()=>ms.value?.provider??""),nc=B(()=>!H1.value||!o.models?.length?[]:o.models.filter(Me=>Me.provider===H1.value)),Zl=B(()=>new Set(o.starredIds??[]));function ys(Me){return Zl.value.has(Me)}const Dr=B(()=>o.models?.length?o.models.filter(Me=>ys(Me.id)&&Me.provider!==H1.value):[]);function Cl(){const Me=We.value,it=tn.value;if(!Me||!it)return;const ft=getComputedStyle(Me),yn=Fr(ft.getPropertyValue("--space-1"))||4,Yt=Fr(ft.getPropertyValue("--space-2"))||8,li=window.visualViewport,vi=li?.offsetTop??0,yi=vi+(li?.height??window.innerHeight),V1=it.getBoundingClientRect(),Ia=V1.top-vi-yn-Yt,Gu=yi-V1.bottom-yn-Yt;Me.offsetHeight>Ia&&Gu>Ia?(cn.value=!0,Lt.value=`${Math.max(Math.floor(Gu),0)}px`):(cn.value=!1,Lt.value=`${Math.max(Math.floor(Ia),0)}px`)}function Bi(){Xn()}function mr(){window.addEventListener("resize",Bi),window.visualViewport?.addEventListener("resize",Bi),window.visualViewport?.addEventListener("scroll",Bi)}function D1(){window.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("scroll",Bi)}Ke(Ft,async Me=>{if(!Me){D1();return}mr(),cn.value=!1,Lt.value="",await yt(),Cl(),(We.value?.querySelector(".md-row.is-current")??We.value?.querySelector(".md-row"))?.focus()}),En(D1);function Kl(Me){if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;const it=Array.from(We.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(it.length===0)return;Me.preventDefault();const ft=it.indexOf(document.activeElement),yn=Me.key==="ArrowDown"?(ft+1)%it.length:(ft-1+it.length)%it.length;it[yn]?.focus()}function Gl(Me){i("selectModel",Me),Xn()}return(Me,it)=>(g(),S("div",{class:Be(["composer",{"drag-over":v(be),expanded:A.value}]),onDragover:it[27]||(it[27]=(...ft)=>v(ge)&&v(ge)(...ft)),onDragleave:it[28]||(it[28]=(...ft)=>v(Oe)&&v(Oe)(...ft)),onDrop:it[29]||(it[29]=(...ft)=>v(Fe)&&v(Fe)(...ft))},[v(ie)?(g(),S("div",{key:0,class:"att-lightbox",onClick:it[1]||(it[1]=xt((...ft)=>v(et)&&v(et)(...ft),["self"]))},[b("div",bAe,[W(Cn,{text:v(l)("model.close")},{default:ae(()=>[b("button",{type:"button",class:"att-lightbox-close",onClick:it[0]||(it[0]=(...ft)=>v(et)&&v(et)(...ft))},"✕")]),_:1},8,["text"]),v(ie).kind==="video"?(g(),S("video",{key:0,class:"att-lightbox-media",src:v(ie).previewUrl,controls:"",playsinline:""},null,8,_Ae)):(g(),S("img",{key:1,class:"att-lightbox-media",src:v(ie).previewUrl,alt:v(ie).name},null,8,xAe)),b("div",SAe,I(v(ie).name),1)])])):Y("",!0),b("div",{class:Be(["composer-card",{"labels-collapsed":ii.value}])},[h.value.length>0?(g(),S("div",{key:0,class:"quote-strip","aria-label":v(l)("selection.quoteLabel")},[(g(!0),S(Ce,null,rt(h.value,ft=>(g(),S("div",{key:ft.id,class:"quote-chip"},[b("span",MAe,[ft.source?(g(),S("span",AAe,I(ft.source),1)):Y("",!0),b("span",TAe,I(ft.text),1),ft.comment?(g(),S("span",EAe,I(ft.comment),1)):Y("",!0)]),W(Dt,{size:"sm",label:v(l)("composer.removeNamed",{name:ft.text}),onClick:yn=>x(ft.id)},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])]))),128))],8,CAe)):Y("",!0),v(ve).length>0?(g(),S("div",IAe,[b("div",{ref_key:"attachmentScrollRef",ref:kn,class:Be(["att-scroll",{"is-overflowing":xn.value}])},[b("div",LAe,[nn.value.length>0?(g(),S("div",{key:0,ref_key:"attachmentMediaRowRef",ref:Dn,class:"att-row att-row-media"},[(g(!0),S(Ce,null,rt(nn.value,ft=>(g(),ue(P7,{key:ft.localId,kind:ft.kind,name:ft.name,url:ft.previewUrl,"file-id":ft.fileId,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["kind","name","url","file-id","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):Y("",!0),Jt.value.length>0?(g(),S("div",$Ae,[(g(!0),S(Ce,null,rt(Jt.value,ft=>(g(),ue(P7,{key:ft.localId,kind:"file",name:ft.name,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):Y("",!0)])],2),xn.value?(g(),S("span",NAe,I(v(l)("composer.attachmentCount",{n:v(ve).length})),1)):Y("",!0),v(ve).length>=2?(g(),ue(Cn,{key:1,text:v(l)("composer.clearAll")},{default:ae(()=>[W(Dt,{class:"att-clear",size:"sm",label:v(l)("composer.clearAll"),onClick:qt},{default:ae(()=>[W(Ee,{name:"trash"})]),_:1},8,["label"])]),_:1},8,["text"])):Y("",!0)])):Y("",!0),b("div",zAe,[v(C)&&!v(a)?(g(),ue(VC,{key:0,id:"composer-slash-menu",items:v(j),"active-index":v(H),onSelect:v(M),onHover:it[2]||(it[2]=ft=>H.value=ft)},null,8,["items","active-index","onSelect"])):Y("",!0),v(R)&&!v(a)?(g(),ue(WC,{key:1,id:"composer-mention-menu",items:v(O),"active-index":v(U),loading:v(Z),stale:v(q),onSelect:v(ee),onHover:it[3]||(it[3]=ft=>U.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[es.value&&!v(a)?(g(),S("div",{key:0,ref_key:"modesMenuRef",ref:Hs,class:"add-menu",onClick:it[5]||(it[5]=xt(()=>{},["stop"])),onKeydown:Zt},[b("div",{ref_key:"addMenuScrollRef",ref:bl,class:"am-scroll",role:"menu",onScroll:Te},[(g(!0),S(Ce,null,rt(ke.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:it[4]||(it[4]=xt(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",RAe,[W(Ee,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",PAe,I(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",FAe,I(v(l)(ft.descKey)),1)):Y("",!0)],40,BAe))),128))],544),Ks.value?(g(),S("div",{key:0,class:"scroll-thumb",style:Gt({top:`${Ks.value.top}px`,height:`${Ks.value.height}px`})},null,4)):Y("",!0)],544)):Y("",!0)]),_:1}),b("div",jAe,[Vo.value?(g(),S("span",{key:0,ref_key:"workModePillRef",ref:Qi,class:"wm-pill"},[W(Ee,{name:Vo.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),b("span",null,I(Vo.value==="goal"?v(l)("status.goalLabel"):v(l)("status.planLabel")),1),W(Dt,{class:"wm-x",size:"sm",label:v(l)("status.workModeDismiss"),onMousedown:it[6]||(it[6]=xt(()=>{},["prevent"])),onClick:zi},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],512)):Y("",!0),Jn(b("textarea",{ref_key:"textareaRef",ref:u,"onUpdate:modelValue":it[7]||(it[7]=ft=>ps(c)?c.value=ft:null),class:"ph",style:Gt(Ta.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!dt.value,"aria-controls":dt.value,"aria-activedescendant":Mt.value,onKeydown:Ls,onCompositionstart:Io,onCompositionend:Rt,onInput:ye,onBlur:it[8]||(it[8]=ft=>{v(a)||(C.value=!1,R.value=!1)})},null,44,OAe),[[js,v(c)]]),W(Cn,{text:A.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle")},{default:ae(()=>[A.value||E.value?(g(),S("button",{key:0,class:"expand-btn",type:"button","aria-label":A.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle"),onClick:P},[A.value?(g(),ue(Ee,{key:0,name:"collapse",size:"sm"})):(g(),ue(Ee,{key:1,name:"expand",size:"sm"}))],8,HAe)):Y("",!0)]),_:1},8,["text"])])]),Ge.value?(g(),S("input",{key:2,ref_key:"fileInputRef",ref:de,type:"file",multiple:"",class:"file-input-hidden",onChange:it[9]||(it[9]=(...ft)=>v(fe)&&v(fe)(...ft))},null,544)):Y("",!0),b("div",{ref_key:"toolbarRef",ref:tn,class:"toolbar"},[b("div",{ref_key:"menuMeasureRef",ref:rs,class:"menu-measure","aria-hidden":"true"},[...it[30]||(it[30]=[b("span",{class:"pd-desc"},null,-1)])],512),b("div",DAe,[W(Dt,{size:"md",class:"composer-attach",label:v(l)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":es.value,onMousedown:it[10]||(it[10]=xt(()=>{},["prevent"])),onClick:xt(ht,["stop"])},{default:ae(()=>[W(Ee,{name:"plus"})]),_:1},8,["label","aria-expanded"]),W(aAe,{ref_key:"capMenuRef",ref:kl,"session-id":e.sessionId,triggerless:""},null,8,["session-id"]),e.status?(g(),S("span",{key:0,ref_key:"permissionPillRef",ref:eo,class:Be(["perm-pill",["perm-"+e.status.permission,{open:en.value}]]),role:"button",tabindex:"0","aria-label":Le.value,onClick:xt(pn,["stop"]),onKeydown:[go(pn,["enter"]),go(xt(pn,["prevent"]),["space"])]},[W(Ee,{class:"perm-pill-icon",name:Sn.value,size:"md"},null,8,["name"]),b("span",WAe,I(Le.value),1)],42,VAe)):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[en.value&&e.status?(g(),S("div",{key:0,ref_key:"permDropdownRef",ref:Xe,class:"perm-dropdown",style:Gt(J0.value),role:"menu",onClick:it[11]||(it[11]=xt(()=>{},["stop"]))},[(g(),S(Ce,null,rt(Ns,ft=>b("button",{key:ft.mode,class:Be(["pd-row",{"is-current":ft.mode===e.status.permission}]),role:"menuitem",onClick:yn=>Re(ft.mode)},[b("span",{class:"pd-icon",style:Gt({color:ft.color})},[W(Ee,{name:ft.icon,size:"md"},null,8,["name"])],4),b("span",UAe,[b("span",{class:"pd-name",style:Gt({color:ft.color})},I(v(l)(ft.labelKey)),5),b("span",ZAe,I(v(l)(ft.descKey)),1)]),b("span",KAe,[ft.mode===e.status.permission?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)])],10,qAe)),64))],4)):Y("",!0)]),_:1}),to.value?(g(),S("span",GAe,[W(Ee,{class:"workflow-ic",name:"sparkles",size:"md"}),b("span",YAe,I(v(l)("status.dynamicWorkflowLabel")),1),W(Dt,{class:"workflow-x",size:"sm",label:v(l)("status.dynamicWorkflowDismiss"),onMousedown:it[12]||(it[12]=xt(()=>{},["prevent"])),onClick:it[13]||(it[13]=xt(ft=>i("toggleWorkflow"),["stop"]))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])])):Y("",!0)]),b("div",{ref_key:"toolbarRightRef",ref:Zu,class:"toolbar-right"},[yl.value?(g(),S("button",{key:0,class:Be(["compact-chip",{gone:Ea.value}]),onClick:it[14]||(it[14]=xt(ft=>i("compact"),["stop"]))},"/compact",2)):Y("",!0),W(Cn,{text:Lo.value},{default:ae(()=>[e.status&&!e.hideContext?(g(),S("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":Lo.value},[W(Ibe,{pct:yo.value},null,8,["pct"])],8,XAe)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:el.value?e.status?.model:null},{default:ae(()=>[e.status?(g(),S("button",{key:0,ref_key:"modelPillRef",ref:Ro,type:"button",class:Be(["model-pill",{open:Ft.value,"icon-only":el.value,"model-gone":Or.value}]),"aria-haspopup":"menu","aria-expanded":Ft.value,"aria-label":el.value?e.status.model:void 0,onClick:xt(So,["stop"])},[el.value?(g(),ue(Ee,{key:0,name:"cute-bot",size:"md"})):(g(),S(Ce,{key:1},[b("span",{ref_key:"modelNameRef",ref:Do,class:"mp-name"},I(e.status.model),513),W(Ee,{class:"cv",name:"chevron-down",size:"sm"})],64))],10,JAe)):Y("",!0)]),_:1},8,["text"]),e.status&&wl.value!=="unsupported"?(g(),ue(Cn,{key:1,text:Ie.value},{default:ae(()=>[b("button",{ref_key:"thinkingPillRef",ref:$s,type:"button",class:Be(["thinking-pill",{open:Ut.value}]),disabled:Ni.value,"aria-haspopup":"dialog","aria-expanded":Ut.value,"aria-label":Ie.value,onClick:xt(Qo,["stop"]),onKeydown:go(xt(Po,["prevent"]),["escape"])},[W(Ee,{name:"thinking",size:"sm"}),b("span",eTe,I(Ae.value),1),Ni.value?Y("",!0):(g(),ue(Ee,{key:0,class:"cv",name:"chevron-down",size:"sm"}))],42,QAe)]),_:1},8,["text"])):Y("",!0),e.working?(g(),ue(Cn,{key:2,text:v(l)("composer.interruptTitle")},{default:ae(()=>[b("button",{class:"stop","aria-label":v(l)("composer.interrupt"),onClick:it[15]||(it[15]=ft=>i("interrupt"))},[...it[31]||(it[31]=[b("span",{class:"stop-square","aria-hidden":"true"},null,-1)])],8,tTe)]),_:1},8,["text"])):Y("",!0),b("button",{class:Be(["send",{"is-starting":e.starting}]),"aria-label":$e.value,disabled:e.starting||!ot.value,onClick:it[16]||(it[16]=ft=>uo())},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(Ee,{key:1,name:"send",size:"sm"}))],10,nTe)],512),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ft.value&&e.status?(g(),S("div",{key:0,ref_key:"modelDropdownRef",ref:We,class:Be(["composer-dropdown model-dropdown",{"flip-down":cn.value}]),style:Gt(qu.value),role:"menu",onClick:it[18]||(it[18]=xt(()=>{},["stop"])),onKeydown:Kl},[b("div",oTe,[Dr.value.length>0?(g(),S("div",sTe,I(v(l)("status.starredModels")),1)):Y("",!0),(g(!0),S(Ce,null,rt(Dr.value,ft=>(g(),S("button",{key:ft.id,class:Be(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",lTe,[ft.id===e.status.modelId?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",rTe,I(ft.displayName??ft.model),1),b("span",aTe,I(ft.provider),1),W(Ee,{class:"md-star",name:"star",size:"sm"})],10,iTe))),128)),Dr.value.length>0?(g(),S("div",cTe)):Y("",!0),nc.value.length>0?(g(),S("div",uTe,I(H1.value),1)):Y("",!0),(g(!0),S(Ce,null,rt(nc.value,ft=>(g(),S("button",{key:ft.id,class:Be(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",fTe,[ft.id===e.status.modelId?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",pTe,I(ft.displayName??ft.model),1),ys(ft.id)?(g(),ue(Ee,{key:0,class:"md-star",name:"star",size:"sm"})):Y("",!0)],10,dTe))),128))]),nc.value.length>0?(g(),S("div",hTe)):Y("",!0),b("button",{class:"md-row md-row-more",role:"menuitem",onClick:it[17]||(it[17]=ft=>{Xn(),i("pickModel")})},[b("span",mTe,[W(Ee,{name:"list",size:"sm"})]),b("span",gTe,I(v(l)("status.moreModels")),1),W(Ee,{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],38)):Y("",!0)]),_:1}),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ut.value&&e.status?(g(),S("div",{key:0,ref_key:"thinkingDropdownRef",ref:st,class:"composer-dropdown thinking-dropdown",style:Gt(hr.value),role:"dialog","aria-label":v(l)("composer.thinkingMenuTitle"),onClick:it[19]||(it[19]=xt(()=>{},["stop"])),onKeydown:go(xt(Po,["prevent"]),["escape"])},[b("div",yTe,[W(Ee,{name:"thinking",size:"sm"}),b("span",null,I(v(l)("composer.thinkingMenuTitle")),1)]),W(di,{"model-value":Ul.value,options:mn.value,size:"sm","onUpdate:modelValue":At},null,8,["model-value","options"]),b("div",wTe,I(v(l)("status.cacheNote")),1)],44,vTe)):Y("",!0)]),_:1})],512)],2),b("div",{class:Be(["drop-overlay",{show:v(be)}]),"aria-hidden":"true"},[b("div",kTe,[W(Ee,{name:"file-plus",size:"lg"}),b("span",null,I(v(l)("composer.dropToAttach")),1)])],2),(g(),ue(hl,{to:"body"},[W(qi,{name:"composer-warning"},{default:ae(()=>[Nn.value?(g(),S("div",bTe,[W(Gz,{variant:"warning",title:Nn.value,"dismiss-label":v(l)("common.dismiss"),onDismiss:it[20]||(it[20]=ft=>Nn.value=null)},null,8,["title","dismiss-label"])])):Y("",!0)]),_:1}),W(wu,{"model-value":v(a)&&v(C),title:v(l)("composer.slashSheetTitle"),"onUpdate:modelValue":F},{default:ae(()=>[b("div",_Te,[W(us,{ref_key:"slashSheetSearchRef",ref:Q,modelValue:at.value,"onUpdate:modelValue":it[21]||(it[21]=ft=>at.value=ft),placeholder:v(l)("composer.slashSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:Ls},null,8,["modelValue","placeholder"])]),W(VC,{id:"composer-slash-menu",layout:"sheet",items:v(j),"active-index":v(H),query:at.value,onSelect:v(M),onHover:it[22]||(it[22]=ft=>H.value=ft)},null,8,["items","active-index","query","onSelect"])]),_:1},8,["model-value","title"]),W(wu,{"model-value":v(a)&&v(R),title:v(l)("composer.mentionSheetTitle"),"onUpdate:modelValue":he},{default:ae(()=>[b("div",xTe,[W(us,{ref_key:"mentionSheetSearchRef",ref:me,modelValue:X.value,"onUpdate:modelValue":it[23]||(it[23]=ft=>X.value=ft),placeholder:v(l)("composer.mentionSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:Ls},null,8,["modelValue","placeholder"])]),W(WC,{id:"composer-mention-menu",layout:"sheet",items:v(O),"active-index":v(U),loading:v(Z),stale:v(q),onSelect:v(ee),onHover:it[24]||(it[24]=ft=>U.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])]),_:1},8,["model-value","title"]),W(wu,{"model-value":v(a)&&es.value,"onUpdate:modelValue":Qe},{default:ae(()=>[b("div",{ref_key:"mobileModesMenuRef",ref:vs,class:"msheet-add",role:"menu",onClick:it[26]||(it[26]=xt(()=>{},["stop"])),onKeydown:Zt},[(g(!0),S(Ce,null,rt(ke.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:it[25]||(it[25]=xt(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",CTe,[W(Ee,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",MTe,I(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",ATe,I(v(l)(ft.descKey)),1)):Y("",!0)],40,STe))),128))],544)]),_:1},8,["model-value"])]))],34))}}),Yz=vt(TTe,[["__scopeId","data-v-203386fd"]]),ETe={class:"ah"},ITe={class:"akind"},LTe={class:"apath"},$Te={class:"ah-path"},NTe={class:"dg"},zTe={class:"dc"},BTe={key:2,class:"body-shell"},RTe={class:"shell-cmd"},PTe={key:0,class:"shell-cwd"},FTe={key:1,class:"shell-danger"},jTe={class:"file-bar"},OTe={class:"file-lang"},HTe={class:"file-ln"},DTe={class:"file-text"},VTe={key:4,class:"body-chip"},WTe={class:"chip-label"},qTe={class:"chip-value"},UTe={key:0,class:"chip-detail"},ZTe={key:5,class:"body-chip"},KTe={key:0,class:"chip-label"},GTe={class:"chip-value"},YTe={key:6,class:"body-chip"},XTe={class:"chip-label"},JTe={class:"chip-value"},QTe={key:0,class:"chip-detail"},eEe={key:7,class:"body-chip"},tEe={class:"chip-label"},nEe={class:"chip-value"},oEe={key:0,class:"chip-detail"},sEe={key:8,class:"body-todo"},iEe={class:"todo-glyph"},lEe={key:10,class:"body-generic"},rEe={class:"gen-text"},aEe={key:11,class:"feedback-wrap"},cEe=["placeholder"],uEe={class:"feedback-hint"},dEe={key:0,class:"plan-actions"},fEe={key:1,class:"abtn"},pEe=.4,hEe=Je({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=B(()=>{const oe=n.block;return oe.kind!=="plan_review"?null:{plan:oe.plan,path:oe.path,options:oe.options??[]}}),l=V(!1),r=V(!1),a=B(()=>["plan_review","diff","file"].includes(n.block.kind)),c=V(null),u=V(null),d=V(null),f=V({top:!1,bottom:!1}),p=V({top:!1,bottom:!1}),h=V({top:!1,bottom:!1});function m(oe){return F=>{const K=F.currentTarget;K instanceof HTMLElement&&(oe.value={top:K.scrollTop>0,bottom:K.scrollTop+K.clientHeight{const{top:F,bottom:K}=oe.value;if(!F&&!K)return;const he="var(--menu-scroll-fade)",ye=F&&K?`linear-gradient(to bottom, transparent 0, black ${he}, black calc(100% - ${he}), transparent 100%)`:F?`linear-gradient(to bottom, transparent, black ${he})`:`linear-gradient(to top, transparent, black ${he})`;return{maskImage:ye,WebkitMaskImage:ye}})}const _=w(f),A=w(p),P=w(h);function z(){const oe=[[c.value,f],[u.value,p],[d.value,h]];for(const[F,K]of oe)F&&(K.value={top:F.scrollTop>0,bottom:F.scrollTop+F.clientHeightvoid yt(z)),Ke(l,()=>void yt(z)),Ke(()=>n.block,()=>void yt(z));const L=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function E(){const oe=L.includes(n.block.kind)?n.block.kind:"generic";return s(`approval.title.${oe}`)}const T=V(!1),$=V(""),C=V(null);function j(){const oe=C.value;if(!oe)return;oe.style.height="auto";const K=(window.visualViewport?.height??window.innerHeight)*pEe,he=Math.min(oe.scrollHeight,K);oe.style.height=`${he}px`,oe.style.overflowY=oe.scrollHeight>K?"auto":"hidden"}let H=null,D=0;function M(){if(H?.disconnect(),H=null,typeof ResizeObserver>"u")return;const oe=C.value;oe&&(H=new ResizeObserver(F=>{const K=F[0]?.contentRect.width??0;K!==D&&(D=K,j())}),H.observe(oe))}Ke($,()=>void yt(j)),Ke(T,oe=>{if(!oe){H?.disconnect(),H=null;return}yt(()=>{j(),M()})}),Ke(l,oe=>{oe||yt(j)});const{uiFontSize:R}=C9();Ke(R,()=>void yt(j));function O(){n.busy||(T.value=!0,$.value="",setTimeout(()=>C.value?.focus(),0))}function U(){if(n.busy)return;const oe=$.value.trim();i.value?ee("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:oe||void 0}):ee("feedback",{decision:"rejected",feedback:oe||void 0}),T.value=!1,$.value=""}function Z(){T.value=!1,$.value=""}function q(oe){oe.key==="Enter"&&!oe.shiftKey?(oe.preventDefault(),U()):oe.key==="Escape"&&(oe.preventDefault(),Z())}const te=V(null);Ke(()=>n.busy,oe=>{oe||(te.value=null)});function ee(oe,F){n.busy||(te.value=oe,o("decide",F))}function J(){ee("approve",{decision:"approved"})}function se(){ee("approveSession",{decision:"approved",scope:"session"})}function Q(){ee("reject",{decision:"rejected"})}function me(){ee("approvePlan",{decision:"approved"})}function xe(oe){ee(`option:${oe}`,{decision:"approved",selectedLabel:oe})}function Ye(){n.busy||O()}function at(){ee("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function X(oe){const F=(document.activeElement?.tagName??"").toLowerCase();if(F==="input"||F==="textarea"||n.busy||l.value)return;const K=i.value;if(K){if(K.options.length===0){oe.key==="1"?(oe.preventDefault(),me()):oe.key==="2"?(oe.preventDefault(),Ye()):oe.key==="3"&&(oe.preventDefault(),at());return}oe.key==="1"&&K.options[0]?(oe.preventDefault(),xe(K.options[0].label)):oe.key==="2"&&K.options[1]?(oe.preventDefault(),xe(K.options[1].label)):oe.key==="3"&&K.options[2]&&(oe.preventDefault(),xe(K.options[2].label));return}oe.key==="1"?(oe.preventDefault(),J()):oe.key==="2"?(oe.preventDefault(),se()):oe.key==="3"?(oe.preventDefault(),Q()):oe.key==="4"&&(oe.preventDefault(),O())}return In(()=>{document.addEventListener("keydown",X),window.addEventListener("resize",j),window.visualViewport?.addEventListener("resize",j)}),En(()=>{document.removeEventListener("keydown",X),window.removeEventListener("resize",j),window.visualViewport?.removeEventListener("resize",j),H?.disconnect(),H=null}),(oe,F)=>(g(),ue(c9,{class:Be(["appr",{minimized:l.value}])},$2({head:ae(()=>[b("div",ETe,[F[6]||(F[6]=b("span",{class:"ah-ic"},"!",-1)),b("span",ITe,I(E()),1),b("span",LTe,[e.block.kind==="diff"||e.block.kind==="file"||e.block.kind==="fileop"?(g(),S(Ce,{key:0},[He(I(e.block.path),1)],64)):e.block.kind==="shell"?(g(),S(Ce,{key:1},[He(I(e.block.command),1)],64)):e.block.kind==="url"?(g(),S(Ce,{key:2},[He(I(e.block.url),1)],64)):e.block.kind==="search"?(g(),S(Ce,{key:3},[He(I(e.block.query),1)],64)):e.block.kind==="invocation"?(g(),S(Ce,{key:4},[He(I(e.block.name),1)],64)):e.block.kind==="generic"?(g(),S(Ce,{key:5},[He(I(e.block.summary),1)],64)):Y("",!0)]),e.agentName&&!l.value?(g(),ue(Fl,{key:0,variant:"neutral",size:"sm"},{default:ae(()=>[He(I(v(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):Y("",!0),l.value?Y("",!0):(g(),ue(Fl,{key:1,variant:"warning",size:"sm",class:"aw"},{default:ae(()=>[He(I(v(s)("approval.required")),1)]),_:1})),a.value&&!l.value?(g(),ue(Dt,{key:2,class:"aexpand",size:"sm",label:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),tooltip:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),onClick:F[0]||(F[0]=K=>r.value=!r.value)},{default:ae(()=>[W(Ee,{name:r.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):Y("",!0),W(Dt,{class:"amin",size:"sm",label:l.value?v(s)("question.expand"):v(s)("question.minimize"),onClick:F[1]||(F[1]=K=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ee,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ee,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[e.block.kind==="plan_review"&&e.block.path?(g(),ue(Cn,{key:0,text:e.block.path},{default:ae(()=>[b("div",$Te,I(e.block.path),1)]),_:1},8,["text"])):Y("",!0),e.block.kind==="diff"?(g(),S("div",{key:1,ref_key:"diffBodyRef",ref:c,class:Be(["diff",{expanded:r.value}]),style:Gt(v(_)),onScroll:F[2]||(F[2]=(...K)=>v(k)&&v(k)(...K))},[(g(!0),S(Ce,null,rt(e.block.diff,(K,he)=>(g(),S("div",{key:he,class:Be(["dl",K.kind==="add"?"add":K.kind==="rem"?"del":""])},[b("span",NTe,I(K.gutter),1),b("span",zTe,I(K.text),1)],2))),128))],38)):e.block.kind==="shell"?(g(),S("div",BTe,[b("div",RTe,[F[7]||(F[7]=b("span",{class:"shell-dollar"},"$",-1)),He(" "+I(e.block.command),1)]),e.block.cwd?(g(),S("div",PTe,"cwd: "+I(e.block.cwd),1)):Y("",!0),e.block.danger?(g(),S("div",FTe,I(v(s)("approval.danger",{detail:e.block.danger})),1)):Y("",!0)])):e.block.kind==="file"?(g(),S("div",{key:3,class:Be(["body-file",{expanded:r.value}])},[b("div",jTe,[b("span",OTe,I(e.block.language??""),1)]),b("div",{class:"file-content",ref_key:"fileBodyRef",ref:u,style:Gt(v(A)),onScroll:F[3]||(F[3]=(...K)=>v(x)&&v(x)(...K))},[(g(!0),S(Ce,null,rt(e.block.content.split(` +`),(K,he)=>(g(),S("div",{key:he,class:"file-line"},[b("span",HTe,I(he+1),1),b("span",DTe,I(K),1)]))),128))],36)],2)):e.block.kind==="fileop"?(g(),S("div",VTe,[b("span",WTe,I(e.block.op),1),b("span",qTe,I(e.block.path),1),e.block.detail?(g(),S("span",UTe,I(e.block.detail),1)):Y("",!0)])):e.block.kind==="url"?(g(),S("div",ZTe,[e.block.method?(g(),S("span",KTe,I(e.block.method),1)):Y("",!0),b("span",GTe,I(e.block.url),1)])):e.block.kind==="search"?(g(),S("div",YTe,[b("span",XTe,I(v(s)("approval.searchQueryLabel")),1),b("span",JTe,I(e.block.query),1),e.block.scope?(g(),S("span",QTe,I(v(s)("approval.searchScope",{scope:e.block.scope})),1)):Y("",!0)])):e.block.kind==="invocation"?(g(),S("div",eEe,[b("span",tEe,I(e.block.kind2),1),b("span",nEe,I(e.block.name),1),e.block.description?(g(),S("span",oEe,I(e.block.description),1)):Y("",!0)])):e.block.kind==="todo"?(g(),S("div",sEe,[(g(!0),S(Ce,null,rt(e.block.items,(K,he)=>(g(),S("div",{key:he,class:"todo-item"},[b("span",iEe,I(K.status==="done"||K.status==="completed"?"✓":"○"),1),b("span",{class:Be(["todo-title",{"todo-done":K.status==="done"||K.status==="completed"}])},I(K.title),3)]))),128))])):e.block.kind==="plan_review"?(g(),S("div",{key:9,ref_key:"planBodyRef",ref:d,class:Be(["body-plan",{expanded:r.value}]),style:Gt(v(P)),onScroll:F[4]||(F[4]=(...K)=>v(y)&&v(y)(...K))},[W(Br,{text:e.block.plan},null,8,["text"])],38)):(g(),S("div",lEe,[b("span",rEe,I(e.block.summary),1)])),T.value?(g(),S("div",aEe,[Jn(b("textarea",{ref_key:"feedbackRef",ref:C,"onUpdate:modelValue":F[5]||(F[5]=K=>$.value=K),class:"feedback-ta",placeholder:v(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:q},null,40,cEe),[[js,$.value]]),b("div",uEe,I(v(s)("approval.feedbackHint")),1)])):Y("",!0)]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[i.value?(g(),S("div",dEe,[i.value.options.length>0?(g(!0),S(Ce,{key:0},rt(i.value.options,(K,he)=>(g(),ue(Cn,{key:he,text:K.description},{default:ae(()=>[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value===`option:${K.label}`,disabled:e.busy,onClick:ye=>xe(K.label)},{default:ae(()=>[He(I(K.label),1),W(Yr,{class:"k",keys:[String(he+1)]},null,8,["keys"])]),_:2},1032,["loading","disabled","onClick"])]),_:2},1032,["text"]))),128)):(g(),ue(Nt,{key:1,class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approvePlan",disabled:e.busy,onClick:me},{default:ae(()=>[He(I(v(s)("approval.approvePlan")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"])),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:Ye},{default:ae(()=>[He(I(v(s)("approval.revise")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["2"]})):Y("",!0)]),_:1},8,["disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"danger-soft",loading:te.value==="rejectAndExit",disabled:e.busy,onClick:at},{default:ae(()=>[He(I(v(s)("approval.rejectAndExit")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["3"]})):Y("",!0)]),_:1},8,["loading","disabled"])])):(g(),S("div",fEe,[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approve",disabled:e.busy,onClick:J},{default:ae(()=>[He(I(v(s)("approval.approve")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="approveSession",disabled:e.busy,onClick:se},{default:ae(()=>[He(I(v(s)("approval.approveSession")),1),W(Yr,{class:"k",keys:["2"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="reject",disabled:e.busy,onClick:Q},{default:ae(()=>[He(I(v(s)("approval.reject")),1),W(Yr,{class:"k",keys:["3"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:O},{default:ae(()=>[He(I(v(s)("approval.feedback")),1),W(Yr,{class:"k",keys:["4"]})]),_:1},8,["disabled"])]))]),key:"1"}]),1032,["class"]))}}),mEe=vt(hEe,[["__scopeId","data-v-f7485122"]]),gEe={class:"goal-panel"},vEe={key:0,class:"goal-criterion"},yEe={class:"goal-criterion-label"},wEe=Je({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",gEe,[W(Br,{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(g(),S("div",vEe,[b("div",yEe,[W(Ee,{name:"check-list",size:"md"}),b("span",null,I(v(t)("status.goalDoneWhen")),1)]),W(Br,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):Y("",!0)]))}}),kEe=vt(wEe,[["__scopeId","data-v-81a928ba"]]),bEe={class:"plan-panel"},_Ee={key:0,class:"plan-review-row"},xEe={class:"plan-review-label"},SEe={key:1,class:"plan-review-row plan-review-feedback"},CEe={class:"plan-review-label"},MEe={key:3,class:"plan-path-only"},AEe={class:"plan-path-hint"},TEe={class:"plan-path"},EEe={key:4,class:"plan-empty"},IEe=Je({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",bEe,[e.plan?.selectedOption?(g(),S("div",_Ee,[b("span",xEe,I(v(t)("tools.plan.selectedOption")),1),b("span",null,I(e.plan.selectedOption),1)])):Y("",!0),e.plan?.feedback?(g(),S("div",SEe,[b("span",CEe,I(v(t)("tools.plan.feedback")),1),b("span",null,I(e.plan.feedback),1)])):Y("",!0),e.plan?.plan?(g(),ue(Br,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):e.plan?.path?(g(),S("div",MEe,[b("span",AEe,I(v(t)("tools.plan.pathOnlyHint")),1),b("span",TEe,I(e.plan.path),1),e.revealSavedPlan?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:o[0]||(o[0]=s=>void e.revealSavedPlan(e.plan.agentId,e.plan.toolCallId))},{default:ae(()=>[W(Ee,{name:"external-link",size:"sm"}),He(" "+I(v(t)("tools.plan.revealInFileManager")),1)]),_:1})):Y("",!0)])):(g(),S("div",EEe,[W(Ee,{class:"plan-empty-ico",name:"file-edit",size:"lg"}),b("span",null,I(v(t)(e.planModeOn?"status.planEmptyArmed":"status.planEmptyIdle")),1)]))]))}}),LEe=vt(IEe,[["__scopeId","data-v-2883948d"]]),$Ee={class:"qh"},NEe={class:"qtitle"},zEe={key:0,class:"qstep"},BEe={key:1,class:"qmin-peek"},REe={class:"qbody"},PEe=["aria-label"],FEe=["aria-selected","aria-label","onClick"],jEe={class:"qstep-num"},OEe={key:1,class:"qheader-chip"},HEe={class:"qtext"},DEe={class:"qopts"},VEe=["onClick"],WEe={class:"qopt-key"},qEe={class:"qopt-glyph"},UEe={key:0,class:"chk"},ZEe={key:1,class:"rad"},KEe={class:"qopt-text"},GEe={class:"qopt-label"},YEe={key:0,class:"qopt-desc"},XEe={class:"qopt-glyph"},JEe={key:0,class:"chk"},QEe={key:1,class:"rad"},eIe={class:"qopt-text qopt-text-other"},tIe={class:"qopt-label"},nIe={key:0,class:"qopt-desc"},oIe=["placeholder"],sIe={class:"qfoot"},iIe=Je({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=$t(),s=t,i=V(0),l=V(!1),r=B(()=>n.question.questions[i.value]),a=B(()=>n.question.questions.length);function c(){i.value>0&&i.value--}function u(){i.value=0&&M0:R.kind==="multiWithOther"?R.optionIds.length>0||R.otherText.trim().length>0:R.kind==="other"?R.text.trim().length>0:!0:!1}function p(){return f(r.value.id)}const h=V({});function m(M){return M.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${M.label} ${M.description??""}`.toLowerCase())}function k(){const M={...h.value};let R=!1;for(const O of n.question.questions){if(M[O.id])continue;const U=O.options.filter(m);U.length!==0&&(M[O.id]=O.multiSelect?{kind:"multi",optionIds:U.map(Z=>Z.id)}:{kind:"single",optionId:U[0].id},R=!0)}R&&(h.value=M)}Ke(()=>n.question.questionId,()=>{i.value=0,l.value=!1,h.value={},w.value={}}),Ke(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),k()},{immediate:!0,deep:!0});function x(M,R){const O=h.value[M];if(O&&O.kind==="single"&&O.optionId===R){const U={...h.value};delete U[M],h.value=U}else h.value={...h.value,[M]:{kind:"single",optionId:R}}}function y(M,R){const O=h.value[M],U=O&&(O.kind==="multi"||O.kind==="multiWithOther")?O.kind==="multi"?[...O.optionIds]:[...O.optionIds]:[],Z=U.indexOf(R);Z>=0?U.splice(Z,1):U.push(R);const q=h.value[M],te=q&&q.kind==="multiWithOther"?q.otherText:"";te?h.value={...h.value,[M]:{kind:"multiWithOther",optionIds:U,otherText:te}}:h.value={...h.value,[M]:{kind:"multi",optionIds:U}}}const w=V({}),_=V(null);function A(M){const R=n.question.questions.find(U=>U.id===M),O=w.value[M]??"";if(R.multiSelect){const U=h.value[M],Z=U&&(U.kind==="multi"||U.kind==="multiWithOther")?U.kind==="multi"?[...U.optionIds]:[...U.optionIds]:[];h.value={...h.value,[M]:{kind:"multiWithOther",optionIds:Z,otherText:O}}}else h.value={...h.value,[M]:{kind:"other",text:O}}}function P(M){A(M),yt(()=>_.value?.focus())}function z(M,R){const O=h.value[M];return O?O.kind==="single"?O.optionId===R:O.kind==="multi"||O.kind==="multiWithOther"?O.optionIds.includes(R):!1:!1}function L(M){const R=h.value[M];return!!(R&&(R.kind==="other"||R.kind==="multiWithOther"))}function E(){return n.question.questions.every(M=>f(M.id))}const T=B(()=>n.busyKind==="answer"),$=B(()=>n.busyKind==="dismiss"),C=B(()=>!!n.busyKind);function j(){if(C.value||!E())return;const M={answers:h.value,method:"click"};s("answer",n.question.questionId,M)}function H(){C.value||s("dismiss",n.question.questionId)}function D(M){const R=(document.activeElement?.tagName??"").toLowerCase(),O=R==="input"||R==="textarea";if(C.value)return;if(M.key==="Enter"){if(M.preventDefault(),l.value)return;i.value=1&&U<=9){M.preventDefault();const Z=r.value,q=U-1,te=Z.options[q];te&&(Z.multiSelect?y(Z.id,te.id):x(Z.id,te.id))}}return In(()=>document.addEventListener("keydown",D)),En(()=>document.removeEventListener("keydown",D)),(M,R)=>(g(),ue(c9,{class:Be(["qcard",{minimized:l.value}])},$2({head:ae(()=>[b("div",$Ee,[R[5]||(R[5]=b("span",{class:"qh-ic"},"?",-1)),b("span",NEe,I(v(o)("question.title")),1),a.value>1&&!l.value?(g(),S("span",zEe,I(v(o)("question.step",{current:i.value+1,total:a.value})),1)):Y("",!0),l.value?(g(),S("span",BEe,I(r.value.question),1)):Y("",!0),W(Dt,{class:"qmin",size:"sm",label:l.value?v(o)("question.expand"):v(o)("question.minimize"),onClick:R[0]||(R[0]=O=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ee,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ee,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[b("div",REe,[a.value>1?(g(),S("div",{key:0,class:"qsteps",role:"tablist","aria-label":v(o)("question.step",{current:i.value+1,total:a.value})},[(g(!0),S(Ce,null,rt(n.question.questions,(O,U)=>(g(),S("button",{key:O.id,type:"button",class:Be(["qstep-dot",{active:U===i.value,answered:f(O.id)}]),"aria-selected":U===i.value,"aria-label":v(o)("question.step",{current:U+1,total:a.value}),onClick:Z=>d(U)},[b("span",jEe,I(U+1),1)],10,FEe))),128))],8,PEe)):Y("",!0),r.value.header?(g(),S("div",OEe,[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[He(I(r.value.header),1)]),_:1})])):Y("",!0),b("div",HEe,I(r.value.question),1),r.value.body?(g(),ue(Br,{key:2,text:r.value.body,class:"qmdbody"},null,8,["text"])):Y("",!0),b("div",DEe,[(g(!0),S(Ce,null,rt(r.value.options,(O,U)=>(g(),S("label",{key:O.id,class:Be(["qopt",{selected:z(r.value.id,O.id)}]),onClick:xt(Z=>r.value.multiSelect?y(r.value.id,O.id):x(r.value.id,O.id),["prevent"])},[b("span",WEe,I(U+1),1),b("span",qEe,[r.value.multiSelect?(g(),S("span",UEe,I(z(r.value.id,O.id)?"■":"□"),1)):(g(),S("span",ZEe,I(z(r.value.id,O.id)?"●":"○"),1))]),b("span",KEe,[b("span",GEe,I(O.label),1),O.description?(g(),S("span",YEe,I(O.description),1)):Y("",!0)])],10,VEe))),128)),r.value.allowOther?(g(),S("label",{key:0,class:Be(["qopt",{selected:L(r.value.id)}]),onClick:R[4]||(R[4]=xt(O=>P(r.value.id),["prevent"]))},[R[6]||(R[6]=b("span",{class:"qopt-key"},null,-1)),b("span",XEe,[r.value.multiSelect?(g(),S("span",JEe,I(L(r.value.id)?"■":"□"),1)):(g(),S("span",QEe,I(L(r.value.id)?"●":"○"),1))]),b("span",eIe,[b("span",tIe,I(r.value.otherLabel??v(o)("question.otherDefault")),1),r.value.otherDescription?(g(),S("span",nIe,I(r.value.otherDescription),1)):Y("",!0)]),Jn(b("input",{ref_key:"otherInputEl",ref:_,"onUpdate:modelValue":R[1]||(R[1]=O=>w.value[r.value.id]=O),class:"other-input",type:"text",placeholder:r.value.otherLabel??v(o)("question.otherDefault"),onInput:R[2]||(R[2]=O=>A(r.value.id)),onFocus:R[3]||(R[3]=O=>A(r.value.id))},null,40,oIe),[[js,w.value[r.value.id]]])],2)):Y("",!0)])])]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[b("div",sIe,[i.value[He(I(v(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(g(),ue(Nt,{key:1,class:"qfoot-btn qfoot-main",size:"sm",variant:"primary",disabled:!E(),loading:T.value,onClick:j},{default:ae(()=>[He(I(v(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),a.value>1?(g(),ue(Nt,{key:2,class:"qfoot-btn",size:"sm",variant:"secondary",disabled:i.value===0||C.value,onClick:c},{default:ae(()=>[He(I(v(o)("question.back")),1)]),_:1},8,["disabled"])):Y("",!0),W(Nt,{class:"qfoot-btn",size:"sm",variant:"ghost",loading:$.value,disabled:C.value,onClick:H},{default:ae(()=>[He(I(v(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])])]),key:"1"}]),1032,["class"]))}}),lIe=vt(iIe,[["__scopeId","data-v-ce0bd159"]]),rIe=Je({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e,n={pending:"○",run:"●",done:"✓",fail:"✗"};return(o,s)=>(g(),S("span",{class:Be(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},I(n[t.status]),3))}}),rp=vt(rIe,[["__scopeId","data-v-f870866a"]]),aIe={key:0,class:"sg-empty"},cIe={key:1,class:"sg-grid"},uIe=["aria-label","onClick"],dIe={class:"sg-top"},fIe={class:"sg-num"},pIe={class:"sg-name"},hIe={key:1,class:"sg-desc"},mIe={class:"sg-foot"},gIe={key:0,class:"sg-model"},vIe={class:"sg-status"},yIe={class:"sg-state"},wIe={key:0,class:"sg-time"},kIe=Je({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(f){return f}function i(f){return f==="running"?"tasks.emptyRunning":f==="done"?"tasks.emptyDone":f==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}const l=fn("modelDisplay"),r=fn("subagentEffort");function a(f){const{model:p,thinkingEffort:h}=f;return[l?.(p)??p,r?.(h)].filter(Boolean).join(" · ")||void 0}function c(f){const p=f.state;return o(p==="done"?"tasks.stateDone":p==="fail"?"tasks.stateFail":p==="cancelled"?"tasks.stateCancelled":"tasks.running")}function u(f,p){return String(f.dynamicWorkflowIndex??p+1).padStart(2,"0")}function d(f){return!!(f.agentId||f.output?.length)}return(f,p)=>e.tasks.length===0?(g(),S("div",aIe,I(v(o)(i(e.filter))),1)):(g(),S("div",cIe,[(g(!0),S(Ce,null,rt(e.tasks,(h,m)=>(g(),S("article",{key:h.id,class:Be(["sg-card",[`s-${h.state}`,{openable:d(h)}]])},[d(h)?(g(),S("button",{key:0,class:"sg-open",type:"button","aria-label":h.name,onClick:k=>n("open",h.agentId??h.id)},null,8,uIe)):Y("",!0),b("div",dIe,[b("span",fIe,I(u(h,m)),1),b("span",pIe,I(h.name),1)]),h.meta?(g(),S("div",hIe,I(h.meta),1)):Y("",!0),b("div",mIe,[a(h)?(g(),S("div",gIe,[b("span",null,I(a(h)),1)])):Y("",!0),b("div",vIe,[b("span",yIe,[h.state==="run"?(g(),ue(rp,{key:0,status:"run"})):h.state==="done"?(g(),ue(Ee,{key:1,class:"sg-ic-done",name:"check",size:"sm"})):(g(),ue(Ee,{key:2,name:"close",size:"sm"})),He(" "+I(c(h)),1)]),h.timing?(g(),S("span",wIe,[W(Ee,{name:"clock",size:"sm"}),He(" "+I(h.timing),1)])):Y("",!0)])]),h.state==="run"?(g(),ue(Dt,{key:2,class:"sg-cancel",size:"sm",label:v(o)("tasks.stop"),onClick:xt(k=>n("cancel",h.id),["stop"])},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0)],2))),128))]))}}),bIe=vt(kIe,[["__scopeId","data-v-5945b343"]]),_Ie={class:"taskspane"},xIe={class:"tp-list"},SIe={key:0,class:"tp-empty"},CIe={class:"tp-main"},MIe=["aria-label","onClick"],AIe=["aria-label"],TIe={class:"tp-name"},EIe={key:1,class:"tp-meta"},IIe={key:2,class:"tp-model"},LIe={key:3,class:"tp-model"},$Ie={key:4,class:"tp-time"},NIe=Je({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(p){return p}function i(p){return p==="running"?"tasks.emptyRunning":p==="done"?"tasks.emptyDone":p==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function l(p){return p.kind==="subagent"||!!(p.output?.length||p.meta)}function r(p){l(p)&&n("open",p.agentId??p.id)}function a(p){const h=p.state;return o(h==="done"?"tasks.stateDone":h==="fail"?"tasks.stateFail":h==="cancelled"?"tasks.stateCancelled":"tasks.running")}const c=fn("modelDisplay"),u=fn("subagentEffort");function d(p){if(p.kind!=="subagent")return;const h=p.model;return c?.(h)??h}function f(p){if(p.kind==="subagent")return u?.(p.thinkingEffort)}return(p,h)=>(g(),S("div",_Ie,[b("div",xIe,[e.tasks.length===0?(g(),S("div",SIe,I(v(o)(i(e.filter))),1)):(g(!0),S(Ce,{key:1},rt(e.tasks,m=>(g(),S("div",{key:m.id,class:Be(["tp-row",{fail:m.state==="fail",expandable:l(m)}])},[b("div",CIe,[l(m)?(g(),S("button",{key:0,class:"tp-open",type:"button","aria-label":m.name,onClick:k=>r(m)},null,8,MIe)):Y("",!0),b("span",{class:"tp-glyph",role:"img","aria-label":a(m)},[m.state==="run"?(g(),ue(rp,{key:0,status:"run"})):m.state==="done"?(g(),ue(Ee,{key:1,class:"tp-done",name:"check",size:"sm"})):m.state==="cancelled"?(g(),ue(Ee,{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(g(),ue(Ee,{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,AIe),b("span",TIe,I(m.name),1),m.meta?(g(),S("span",EIe,I(m.meta),1)):Y("",!0),d(m)?(g(),S("span",IIe,I(d(m)),1)):Y("",!0),f(m)?(g(),S("span",LIe,I(f(m)),1)):Y("",!0),m.timing?(g(),S("span",$Ie,I(m.timing),1)):Y("",!0),m.state==="run"?(g(),ue(Dt,{key:5,class:"tp-stop",size:"sm",label:v(o)("tasks.stop"),onClick:xt(k=>n("cancel",m.id),["stop"])},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0),l(m)?(g(),ue(Ee,{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):Y("",!0)])],2))),128))])]))}}),zIe=vt(NIe,[["__scopeId","data-v-f4589f0b"]]),BIe={class:"todo-card"},RIe={key:0,class:"tc-empty"},PIe={class:"tc-name"},FIe=Je({__name:"TodoCard",props:{todos:{}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",BIe,[e.todos.length===0?(g(),S("div",RIe,[W(Ee,{class:"tc-empty-ico",name:"list",size:"lg"}),b("span",null,I(v(t)("tasks.emptyTodo")),1)])):(g(!0),S(Ce,{key:1},rt(e.todos,(s,i)=>(g(),S("div",{key:i,class:Be(["tc-row",`s-${s.status}`])},[b("span",{class:Be(["tc-glyph",`g-${s.status}`])},[s.status==="done"?(g(),ue(Ee,{key:0,name:"check",size:"md"})):s.status==="in_progress"?(g(),ue(Zo,{key:1,class:"tc-spin",size:"sm"})):Y("",!0)],2),b("span",PIe,I(s.title),1)],2))),128))]))}}),jIe=vt(FIe,[["__scopeId","data-v-4e4d0054"]]),OIe=["disabled","aria-pressed"],HIe=Je({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(g(),S("button",{key:0,class:Be(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[jn(t.$slots,"default",{},void 0,!0)],10,OIe)):(g(),S("span",{key:1,class:Be(["ui-pill",{"is-active":e.active}])},[jn(t.$slots,"default",{},void 0,!0)],2))}}),Xz=vt(HIe,[["__scopeId","data-v-0fb1a50d"]]),DIe={class:"fc-label"},VIe=Je({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=B(()=>n.options.find(T=>T.value===n.modelValue)),i=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",l=V(null),r=V(!1);let a=0,c=null;async function u(){const T=l.value?.closest(".dock-work-head");if(!T)return;const $=T.querySelector(".wp-head-tab"),C=getComputedStyle(T),j=(Number.parseFloat(C.columnGap)||0)*2,H=T.clientWidth-Number.parseFloat(C.paddingLeft)-Number.parseFloat(C.paddingRight)-j,D=$?.scrollWidth??0;if(!r.value){const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth)}const M=D+a>H;if(r.value=M,!M){await yt();const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth),r.value=D+a>H}}const d=V(!1),f=V(null),p=V(null),h=V({left:"0px",top:"0px"});function m(){return f.value?.$el??null}async function k(){if(d.value){x();return}d.value=!0,await yt(),y(),w(),window.addEventListener("mousedown",P,!0),window.addEventListener("keydown",z,!0),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0)}function x(T){d.value=!1,window.removeEventListener("mousedown",P,!0),window.removeEventListener("keydown",z,!0),window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0),T?.refocus&&m()?.focus()}function y(){const T=m();if(!T)return;const $=T.getBoundingClientRect(),C=p.value?.offsetHeight??0,j=getComputedStyle(document.documentElement),H=Number.parseFloat(j.getPropertyValue("--space-2"))||0,D=Number.parseFloat(j.getPropertyValue("--space-1"))||0,M=p.value?.offsetWidth??0,R=Math.min($.left,Math.max(H,window.innerWidth-M-H));$.bottom+D+C<=window.innerHeight-H?h.value={left:`${R}px`,top:`${$.bottom+D}px`}:h.value={left:`${R}px`,bottom:`${window.innerHeight-$.top+D}px`}}function w(){const T=p.value;if(!T)return;(T.querySelector(".ui-menu-item.is-active")??T.querySelector(".ui-menu-item"))?.focus()}function _(){d.value||k()}function A(T){const $=T.relatedTarget;$&&(p.value?.contains($)||m()?.contains($))||x()}function P(T){const $=T.target;if($){if(p.value?.contains($)){T.stopImmediatePropagation();return}m()?.contains($)||x()}}function z(T){T.key==="Escape"&&(T.preventDefault(),T.stopImmediatePropagation(),x({refocus:!0}))}function L(T){if(T.key!=="ArrowDown"&&T.key!=="ArrowUp")return;T.preventDefault();const $=Array.from(p.value?.querySelectorAll(".ui-menu-item")??[]);if($.length===0)return;const C=$.indexOf(document.activeElement),j=T.key==="ArrowDown"?(C+1)%$.length:(C-1+$.length)%$.length;$[j]?.focus()}function E(T){o("update:modelValue",T),x({refocus:!0})}return In(()=>{const T=l.value?.closest(".dock-work-head");!T||typeof ResizeObserver!="function"||(c=new ResizeObserver(()=>void u()),c.observe(T),u())}),Ke(r,T=>{!T&&d.value&&x()}),Ke(()=>n.options,async()=>{a=0,await yt(),await u()},{flush:"post"}),vo(()=>{c?.disconnect(),d.value&&x()}),(T,$)=>(g(),S("span",{ref_key:"root",ref:l,class:"filter-control"},[r.value?(g(),S(Ce,{key:0},[W(Xz,{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:k,onKeydown:[go(xt(_,["prevent"]),["down"]),go(xt(_,["prevent"]),["up"])],onFocusout:A},{default:ae(()=>[s.value?.icon?(g(),ue(Ee,{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):Y("",!0),b("span",null,I(s.value?.label),1),W(Ee,{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(g(),ue(hl,{to:"body"},[d.value?(g(),S("div",{key:0,ref_key:"menuBoxRef",ref:p,class:"fc-menu",style:Gt(h.value),onKeydown:L,onFocusout:A},[W(zr,null,{default:ae(()=>[(g(!0),S(Ce,null,rt(e.options,C=>(g(),ue(Bn,{key:C.value,role:"menuitemradio",active:C.value===e.modelValue,"aria-checked":C.value===e.modelValue,size:v(i),onClick:j=>E(C.value)},{default:ae(()=>[C.icon?(g(),ue(Ee,{key:0,name:C.icon,size:"sm","data-icon":C.icon},null,8,["name","data-icon"])):Y("",!0),b("span",DIe,I(C.label),1),C.value===e.modelValue?(g(),ue(Ee,{key:1,class:"fc-check",name:"check",size:"sm"})):Y("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):Y("",!0)]))],64)):(g(),ue(di,{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":$[0]||($[0]=C=>o("update:modelValue",C))},null,8,["model-value","options"]))],512))}}),fM=vt(VIe,[["__scopeId","data-v-658870b5"]]),WIe={class:"wp-head-tab"},qIe={key:0,class:"wp-head-meta"},UIe={key:0,class:"wp-head-actions"},ZIe=Je({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(g(),S(Ce,null,[b("span",WIe,[W(Ee,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,I(e.title),1),e.meta?(g(),S("span",qIe,I(e.meta),1)):Y("",!0)]),t.$slots.actions?(g(),S("span",UIe,[jn(t.$slots,"actions",{},void 0,!0)])):Y("",!0)],64))}}),Rd=vt(ZIe,[["__scopeId","data-v-408c4b07"]]),Pd=Je({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e){return(t,n)=>(g(),ue(Xz,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},{default:ae(()=>[W(Ee,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,[jn(t.$slots,"default")]),jn(t.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),KIe={class:"dock-work-head"},GIe={key:0,class:"dock-workbar"},YIe={class:"dw-running"},XIe={class:"dw-running"},JIe={class:"dw-count"},QIe=Je({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),{confirm:l,current:r}=z1(),a=V(null),c=V(null),u=V(null),d=V(null),f=V(!1),p=V(!1),h=V("50% 100%"),m=V("active"),k=V("active"),x=B(()=>Object.values(o.sessionPlans??{}).at(-1)),y=B(()=>a.value?.anyPopupOpen??!1),w=B(()=>[{value:"active",label:i("tasks.filterRecent"),icon:"clock"},{value:"running",label:i("tasks.filterRunning"),icon:"play"},{value:"done",label:i("tasks.filterDone"),icon:"circle-check"},{value:"all",label:i("tasks.filterAll"),icon:"list"}]),_=B(()=>(o.todos?.length??0)>0&&o.todoDoneCount===(o.todos?.length??0)),A=B(()=>o.goal?i(`status.goalStatus${o.goal.status[0].toUpperCase()}${o.goal.status.slice(1)}`):""),P=B(()=>{const te=Math.max(0,Math.round((o.goal?.wallClockMs??0)/1e3)),ee=Math.floor(te/3600),J=Math.floor(te%3600/60);return ee?`${ee}${i("status.timeUnitHour")} ${J}${i("status.timeUnitMinute")}`:J?`${J}${i("status.timeUnitMinute")} ${te%60}${i("status.timeUnitSecond")}`:`${te}${i("status.timeUnitSecond")}`}),z=B(()=>o.bashTasks.some(te=>te.kind==="tool")?i("tasks.dockTasks"):i("tasks.dockBash"));function L(te,ee){if(ee==="all")return te;if(ee==="running")return te.filter(Q=>Q.state==="run");if(ee==="done")return te.filter(Q=>Q.state!=="run");const J=te.filter(Q=>Q.state==="run"),se=te.filter(Q=>Q.state!=="run").toSorted((Q,me)=>Date.parse(me.completedAt??me.createdAt??"")-Date.parse(Q.completedAt??Q.createdAt??"")).slice(0,5);return[...J,...se]}const E=B(()=>L(o.bashTasks,m.value)),T=B(()=>L(o.subagentTasks,k.value));function $(te,ee){const J=ee.currentTarget,se=c.value;if(J&&se){const Q=J.getBoundingClientRect(),me=se.getBoundingClientRect();h.value=`${Q.left+Q.width/2-me.left}px 100%`}s("toggle-dock-panel",te)}function C(){p.value=(d.value?.scrollTop??0)>0}function j(te){if(!o.dockPanel)return;const ee=te.target;!ee||u.value?.contains(ee)||ee.closest(".ui-pill")||s("close-dock-panel")}function H(te){o.dockPanel&&(te.key!=="Escape"||te.repeat||te.isComposing||te.defaultPrevented||y.value||r.value||o.overlayOpen||(te.preventDefault(),te.stopImmediatePropagation(),s("close-dock-panel")))}async function D(){await l({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}function M(){const te=c.value;if(!te)return;document.documentElement.style.setProperty("--dock-h",`${te.offsetHeight}px`);const ee=Number.parseFloat(getComputedStyle(te).getPropertyValue("--p-bp-sm"))||640;f.value=te.offsetWidth{document.addEventListener("mousedown",j,!0),document.addEventListener("keydown",H,!0),typeof ResizeObserver=="function"&&c.value&&(R=new ResizeObserver(()=>{M(),C()}),R.observe(c.value),M())}),En(()=>{document.removeEventListener("mousedown",j,!0),document.removeEventListener("keydown",H,!0),R?.disconnect()}),Ke(()=>o.dockPanel,()=>{p.value=!1,yt(C)});function O(te){return a.value?.loadForEdit(te)??!1}function U(te){a.value?.loadAttachmentsForEdit(te)}function Z(){a.value?.focus()}function q(te){a.value?.insertQuote(te)}return t({loadForEdit:O,loadAttachmentsForEdit:U,insertQuote:q,focus:Z,anyPopupOpen:y,isEmpty:B(()=>a.value?.isEmpty??!0)}),(te,ee)=>(g(),S("div",{ref_key:"dockRef",ref:c,class:Be(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":y.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":f.value}]]),onClick:ee[36]||(ee[36]=xt(()=>{},["stop"]))},[W(qi,{name:"dock-panel"},{default:ae(()=>[e.dockPanel?(g(),S("div",{key:e.dockPanel,ref_key:"workPanelRef",ref:u,class:Be(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":p.value}]]),style:Gt({transformOrigin:h.value})},[b("div",KIe,[e.dockPanel==="bash"?(g(),ue(Rd,{key:0,icon:"terminal",title:z.value,meta:`${e.bashRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(fM,{modelValue:m.value,"onUpdate:modelValue":ee[0]||(ee[0]=J=>m.value=J),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(g(),ue(Rd,{key:1,icon:"sparkles",title:v(i)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(fM,{modelValue:k.value,"onUpdate:modelValue":ee[1]||(ee[1]=J=>k.value=J),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(g(),ue(Rd,{key:2,icon:_.value?"check-list":"list",title:v(i)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(g(),ue(Rd,{key:3,icon:"target",title:v(i)("status.goalLabel"),meta:P.value},{actions:ae(()=>[e.goal?.status==="active"?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("status.goalPause"),onClick:ee[2]||(ee[2]=J=>s("controlGoal","pause"))},{default:ae(()=>[W(Ee,{name:"pause",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.goalResume"),onClick:ee[3]||(ee[3]=J=>s("controlGoal","resume"))},{default:ae(()=>[W(Ee,{name:"play",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("status.goalCancel"),onClick:D},{default:ae(()=>[W(Ee,{name:"power",size:"sm"})]),_:1},8,["label"]),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:ee[4]||(ee[4]=J=>s("close-dock-panel"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"])):(g(),ue(Rd,{key:4,icon:"file-edit",title:v(i)("status.planLabel"),meta:x.value?.reviewState?v(i)(`tools.plan.review.${x.value.reviewState}`):""},{actions:ae(()=>[x.value?.path?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("tools.plan.revealInFileManager"),onClick:ee[5]||(ee[5]=J=>void e.revealSavedPlan?.(x.value.agentId,x.value.toolCallId))},{default:ae(()=>[W(Ee,{name:"external-link",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.planArmed||e.planMode?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.workModeDismiss"),onClick:ee[6]||(ee[6]=J=>s("togglePlan"))},{default:ae(()=>[W(Ee,{name:"power",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:ee[7]||(ee[7]=J=>s("close-dock-panel"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"]))]),b("div",{ref_key:"workBodyRef",ref:d,class:"dock-work-body",onScroll:C},[e.dockPanel==="bash"?(g(),ue(zIe,{key:0,tasks:E.value,filter:m.value,onCancel:ee[8]||(ee[8]=J=>s("cancelTask",J)),onOpen:ee[9]||(ee[9]=J=>s("openAgent",J))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(g(),ue(bIe,{key:1,tasks:T.value,filter:k.value,onCancel:ee[10]||(ee[10]=J=>s("cancelTask",J)),onOpen:ee[11]||(ee[11]=J=>s("openAgent",J))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(g(),ue(jIe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(g(),ue(kEe,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):(g(),ue(LEe,{key:4,plan:x.value,"plan-mode-on":e.planMode,"open-file":e.openFile,"reveal-saved-plan":e.revealSavedPlan},null,8,["plan","plan-mode-on","open-file","reveal-saved-plan"]))],544)],6)):Y("",!0)]),_:1}),e.hasDockWork||e.planMode||x.value?(g(),S("div",GIe,[e.goal?(g(),ue(Pd,{key:0,icon:"target",active:e.dockPanel==="goal",label:`${v(i)("status.goalLabel")} ${A.value}`,onClick:ee[12]||(ee[12]=J=>$("goal",J))},{meta:ae(()=>[b("span",{class:Be(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},I(A.value),3)]),default:ae(()=>[He(I(v(i)("status.goalLabel"))+" ",1)]),_:1},8,["active","label"])):Y("",!0),e.planMode||x.value?(g(),ue(Pd,{key:1,icon:"file-edit",active:e.dockPanel==="plan",label:v(i)("status.planLabel"),onClick:ee[13]||(ee[13]=J=>$("plan",J))},{default:ae(()=>[He(I(v(i)("status.planLabel")),1)]),_:1},8,["active","label"])):Y("",!0),e.bashTasks.length?(g(),ue(Pd,{key:2,icon:"terminal",active:e.dockPanel==="bash",label:z.value,onClick:ee[14]||(ee[14]=J=>$("bash",J))},$2({default:ae(()=>[He(I(z.value)+" ",1)]),_:2},[e.bashRunning?{name:"meta",fn:ae(()=>[b("span",YIe,[W(rp,{status:"run"}),He(I(e.bashRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.subagentTasks.length?(g(),ue(Pd,{key:3,icon:"sparkles",active:e.dockPanel==="subagent",label:v(i)("tasks.dockSubagent"),onClick:ee[15]||(ee[15]=J=>$("subagent",J))},$2({default:ae(()=>[He(I(v(i)("tasks.dockSubagent"))+" ",1)]),_:2},[e.subagentRunning?{name:"meta",fn:ae(()=>[b("span",XIe,[W(rp,{status:"run"}),He(I(e.subagentRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.todos?.length?(g(),ue(Pd,{key:4,icon:_.value?"check-list":"list",active:e.dockPanel==="todos",label:v(i)("tasks.todoProgressTitle"),onClick:ee[16]||(ee[16]=J=>$("todos",J))},{meta:ae(()=>[b("span",JIe,I(e.todoDoneCount)+"/"+I(e.todos?.length),1)]),default:ae(()=>[He(I(v(i)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","active","label"])):Y("",!0)])):Y("",!0),e.pendingQuestion?(g(),ue(lIe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:ee[17]||(ee[17]=(J,se)=>s("answer",J,se)),onDismiss:ee[18]||(ee[18]=J=>s("dismiss",J))},null,8,["question","busy-kind"])):e.pendingApproval?(g(),ue(mEe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:ee[19]||(ee[19]=J=>s("approval",e.pendingApproval.approvalId,J))},null,8,["block","agent-name","busy"])):(g(),ue(Yz,{key:3,ref_key:"composerRef",ref:a,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:ee[20]||(ee[20]=J=>s("submit",J)),onSteer:ee[21]||(ee[21]=J=>s("steer",J)),onCommand:ee[22]||(ee[22]=J=>s("command",J)),onInterrupt:ee[23]||(ee[23]=J=>s("interrupt")),onSetPermission:ee[24]||(ee[24]=J=>s("setPermission",J)),onSetThinking:ee[25]||(ee[25]=J=>s("setThinking",J)),onTogglePlan:ee[26]||(ee[26]=J=>s("togglePlan")),onToggleWorkflow:ee[27]||(ee[27]=J=>s("toggleWorkflow")),onToggleGoal:ee[28]||(ee[28]=J=>s("toggleGoal")),onOpenBtw:ee[29]||(ee[29]=J=>s("openBtw")),onCreateGoal:ee[30]||(ee[30]=J=>s("createGoal",J)),onControlGoal:ee[31]||(ee[31]=J=>s("controlGoal",J)),onFocusGoal:ee[32]||(ee[32]=J=>s("focusGoal")),onCompact:ee[33]||(ee[33]=J=>s("compact")),onPickModel:ee[34]||(ee[34]=J=>s("pickModel")),onSelectModel:ee[35]||(ee[35]=J=>s("selectModel",J))},null,8,["session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills"]))],2))}}),eLe=vt(QIe,[["__scopeId","data-v-e4431eaa"]]),tLe=["aria-label","aria-hidden"],nLe=["data-turn-id","tabindex","aria-current","aria-label","onMouseenter","onFocus","onKeydown","onClick"],oLe=["aria-label"],sLe={class:"toc-preview__prompt"},iLe={key:0,class:"toc-preview__response"},lLe=80,rLe=Je({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(null),a=V(!0);let c=null;function u(){const T=i.value,$=T?.offsetParent;if(!T||!$)return;const C=T.getBoundingClientRect(),j=$.getBoundingClientRect();a.value=C.left>=j.left&&C.right<=j.right}const d=B(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1),f=B(()=>l.value!==null&&n.items.some(T=>T.id===l.value)?l.value:n.activeTurnId!==null&&n.items.some(T=>T.id===n.activeTurnId)?n.activeTurnId:n.items[0]?.id??null),p=B(()=>r.value??l.value??n.activeTurnId),h=B(()=>{const T=r.value??l.value;return T===null?void 0:n.items.find($=>$.id===T)}),m=V(0);let k=null;function x(){k!==null&&clearTimeout(k),k=null}function y(){x(),k=setTimeout(()=>{r.value=null,k=null},lLe)}function w(){return i.value===null?[]:Array.from(i.value.querySelectorAll(".toc-row"))}function _(T,$){let C=T;if($.key==="ArrowDown")C=Math.min(n.items.length-1,T+1);else if($.key==="ArrowUp")C=Math.max(0,T-1);else if($.key==="Home")C=0;else if($.key==="End")C=n.items.length-1;else return;$.preventDefault(),w()[C]?.focus()}function A(T){const $=T??w().find(j=>j.dataset.turnId===h.value?.id),C=$?.parentElement;!$||!C||(m.value=$.offsetTop-C.scrollTop+$.offsetHeight/2)}function P(T,$){x(),r.value=T,A($.currentTarget)}function z(T,$){x(),l.value=T,A($.currentTarget)}function L(T){x();const $=document.activeElement;$ instanceof HTMLElement&&i.value?.contains($)&&$.blur(),r.value=null,l.value=null,o("select",T)}function E(T){const $=T.relatedTarget;(!($ instanceof Node)||!i.value?.contains($))&&(l.value=null)}return Ke(d,T=>{c?.disconnect(),c=null,T&&yt(()=>{const $=i.value,C=$?.offsetParent;!$||!C||(typeof ResizeObserver<"u"&&(c=new ResizeObserver(u),c.observe(C)),u())})},{immediate:!0}),Ke([()=>n.activeTurnId,d],([T,$])=>{!$||T===null||yt(()=>{const C=w().find(j=>j.dataset.turnId===T);typeof C?.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})})},{immediate:!0}),vo(()=>{x(),c?.disconnect(),c=null}),(T,$)=>d.value?(g(),S("nav",{key:0,ref_key:"navRef",ref:i,class:Be(["conversation-toc",{"toc-clipped":!a.value||e.occluded}]),"aria-label":v(s)("conversation.toc"),"aria-hidden":a.value&&!e.occluded?void 0:!0,onMouseenter:x,onMouseleave:y,onFocusout:E},[b("div",{class:"toc-scroll",onScroll:$[0]||($[0]=C=>A())},[(g(!0),S(Ce,null,rt(e.items,(C,j)=>(g(),S("button",{key:C.id,type:"button",class:Be(["toc-row",{active:e.activeTurnId===C.id,highlighted:p.value===C.id,previewing:r.value===C.id||l.value===C.id}]),"data-turn-id":C.id,tabindex:f.value===C.id?0:-1,"aria-current":e.activeTurnId===C.id?"location":void 0,"aria-label":C.title,onMouseenter:H=>P(C.id,H),onFocus:H=>z(C.id,H),onKeydown:H=>_(j,H),onClick:H=>L(C.id)},[...$[2]||($[2]=[b("span",{class:"toc-marker","aria-hidden":"true"},null,-1)])],42,nLe))),128))],32),h.value?(g(),S("button",{key:0,type:"button",class:"toc-preview",style:Gt({top:`${m.value}px`}),"aria-label":h.value.title,tabindex:"-1",onMouseenter:x,onClick:$[1]||($[1]=C=>L(h.value.id))},[b("span",sLe,I(h.value.title),1),h.value.preview?(g(),S("span",iLe,I(h.value.preview),1)):Y("",!0)],44,oLe)):Y("",!0)],42,tLe)):Y("",!0)}}),aLe=vt(rLe,[["__scopeId","data-v-8a1c40d2"]]),pM="script, style, noscript, template, [inert], .top-sentinel",Jz="pythinker-transcript-search",Q7="pythinker-transcript-search-current",cLe=1e3;function uLe(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function dLe(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(l,r)=>r)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let l=0;lhM(c.text)),o=[];let s="";for(let c=0;c0&&e[c].gapBefore&&(s+="\0"),o[c]=s.length,s+=n[c].folded;const i=pLe(hM(t).folded);if(i===null)return;const l=new RegExp(i,"g");function r(c){let u=0,d=o.length-1,f=0;for(;u<=d;){const p=u+d>>1;o[p]<=c?(f=p,u=p+1):d=p-1}return f}let a;for(;;){const c=l.exec(s);if(c===null)return;const u=c.index,d=u+c[0].length-1,f=r(u),p=r(d),h=n[f].map[u-o[f]],m=n[p].map[d-o[p]],k={startSegment:f,startOffset:h.start,endSegment:p,endOffset:m.start+m.length};(a?.startSegment!==k.startSegment||a.startOffset!==k.startOffset||a.endSegment!==k.endSegment||a.endOffset!==k.endOffset)&&(a=k,yield k)}}const mLe=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),gLe=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function vLe(e,t){const n=t.get(e);if(n!==void 0)return n;const o=mLe.has(e.tagName)||!gLe.has(getComputedStyle(e).display);return t.set(e,o),o}function yLe(e,t,n){let o=e.parentElement;for(;o!==null&&o!==t&&!vLe(o,n);)o=o.parentElement;return o??t}function wLe(e){const t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,o=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(a){if(a.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;const c=a;return c.matches(pM)?n.FILTER_REJECT:c.matches("br, hr, wbr")&&!c.closest(pM)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),s=new WeakMap,i=new WeakMap,l=[];let r=!1;for(let a=o.nextNode();a!==null;a=o.nextNode()){if(a.nodeType===Node.ELEMENT_NODE){r=!0;continue}const c=a.nodeValue??"";if(c.length===0)continue;const u=a.parentElement;if(u===null)continue;let d=i.get(u);d===void 0&&(d=uLe(getComputedStyle(u).whiteSpace),i.set(u,d));let{text:f,map:p}=dLe(c,d);if(f.length===0)continue;const h=yLe(a,e,s),m=l.at(-1),k=r||m===void 0||m.block!==h;!k&&m.text.endsWith(" ")&&f.startsWith(" ")&&(f=f.slice(1),p=p.slice(1),f.length===0)||(l.push({text:f,gapBefore:k,node:a,block:h,whitespaceMap:p}),r=!1)}return l}function kLe(e,t){if(t.length===0)return[];const n=wLe(e),o=[];for(const s of hLe(n,t)){const i=n[s.startSegment],l=n[s.endSegment],r=e.ownerDocument.createRange();r.setStart(i.node,i.whitespaceMap[s.startOffset]),r.setEnd(l.node,l.whitespaceMap[s.endOffset-1]+1),o.push(r)}return o}function bLe(e,t,n=o=>o.getClientRects().length!==0){const o=[];for(const s of kLe(e,t))if(n(s)){if(o.length>=cLe)return{ranges:o,truncated:!0};o.push(s)}return{ranges:o,truncated:!1}}function Qz(){return globalThis.CSS?.highlights??null}function mM(e,t){const n=Qz(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){z4();return}const s=new o;for(const l of e)s.add(l);n.set(Jz,s);const i=e[t];if(i){const l=new o;l.add(i),n.set(Q7,l)}else n.delete(Q7)}function z4(){const e=Qz();e?.delete(Jz),e?.delete(Q7)}const _Le={class:"tsearch-main"},xLe=["placeholder"],SLe=["inert"],CLe={class:"tsearch-foot"},MLe={class:"tsearch-count","aria-live":"polite"},ALe={class:"tsearch-rings"},TLe=Je({__name:"TranscriptSearch",props:{pane:{},mobile:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=r4("input"),l=Uo(""),r=Uo(!1),a=Uo([]),c=Uo(0),u=Uo(!1),d=Uo(!1),f=Uo([]),p=B(()=>a.value.length),h=B(()=>l.value.trim()!==""),m=B(()=>{if(r.value)return s("conversation.search.searching");if(!h.value)return"";if(p.value===0)return s("conversation.search.noResults");const O={current:c.value+1,total:p.value};return u.value?s("conversation.search.resultsCapped",O):s("conversation.search.results",O)});let k=null,x=null,y=null,w=null,_=null;function A(){return n.pane.querySelector(".chat")}function P(){const O=a.value[c.value];if(!O){f.value=[];return}const U=n.pane.getBoundingClientRect();f.value=Array.from(O.getClientRects(),Z=>({top:`${Z.top-U.top+n.pane.scrollTop}px`,left:`${Z.left-U.left}px`,width:`${Z.width}px`,height:`${Z.height}px`}))}function z(){f.value.length!==0&&(y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,P()},120))}function L(O){const U=n.pane.getBoundingClientRect().top,Z=O.findIndex(q=>{const te=q.getClientRects(),ee=te[te.length-1];return ee!==void 0&&ee.bottom>=U});return Z===-1?0:Z}function E(){const O=a.value[c.value];mM(a.value,c.value),(O?.startContainer instanceof Element?O.startContainer:O?.startContainer.parentElement)?.scrollIntoView({block:"center"}),P()}function T(O="first"){k!==null&&(clearTimeout(k),k=null),r.value=!1;const U=A(),Z=l.value.trim();if(!U||Z===""){a.value=[],u.value=!1,c.value=0,z4(),P();return}const q=a.value[c.value],te=q?.startContainer,ee=q?.startOffset,J=bLe(U,Z);if(a.value=J.ranges,u.value=J.truncated,J.ranges.length===0){c.value=0,z4(),P();return}if(O!==!1){const Q=L(J.ranges);c.value=O==="backward"?(Q-1+J.ranges.length)%J.ranges.length:Q,E();return}const se=J.ranges.findIndex(Q=>Q.startContainer===te&&Q.startOffset===ee);c.value=se>=0?se:L(J.ranges),mM(J.ranges,c.value),P()}function $(){if(k!==null&&clearTimeout(k),l.value.trim()===""){r.value=!1,T();return}r.value=!0,k=setTimeout(()=>T(),150)}function C(O){p.value!==0&&(c.value=(c.value+O+p.value)%p.value,E())}function j(O){if(!(O.key!=="Enter"||d.value||O.isComposing)){if(O.preventDefault(),k!==null){T(O.shiftKey?"backward":"first");return}C(O.shiftKey?-1:1)}}function H(O){O.key!=="Escape"||d.value||O.isComposing||(O.preventDefault(),O.stopPropagation(),o("close"))}function D(O){return O instanceof Element&&(O.classList.contains("tsearch-rings")||O.closest(".tsearch-rings")!==null)}function M(O){if(O.type==="attributes"&&O.target===n.pane||D(O.target))return!0;if(O.type!=="childList")return!1;const U=[...O.addedNodes,...O.removedNodes];return U.length>0&&U.every(D)}function R(O){l.value.trim()===""||O.every(M)||k!==null||(x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k===null&&T(!1)},150))}return In(()=>{if(yt(()=>i.value?.focus()),typeof MutationObserver=="function"&&(w=new MutationObserver(R),w.observe(n.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),n.pane.addEventListener("scroll",z,{passive:!0}),window.addEventListener("resize",z,{passive:!0}),typeof ResizeObserver=="function"){_=new ResizeObserver(P),_.observe(n.pane);const O=n.pane.querySelector(".content-wrap");O&&_.observe(O)}}),En(()=>{k!==null&&clearTimeout(k),x!==null&&clearTimeout(x),y!==null&&clearTimeout(y),w?.disconnect(),_?.disconnect(),n.pane.removeEventListener("scroll",z),window.removeEventListener("resize",z),z4()}),(O,U)=>(g(),S("div",{class:Be(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:H},[b("div",_Le,[W(Ee,{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Jn(b("input",{ref:"input","onUpdate:modelValue":U[0]||(U[0]=Z=>l.value=Z),type:"text",class:"tsearch-input",placeholder:v(s)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:$,onKeydown:j,onCompositionstart:U[1]||(U[1]=Z=>d.value=!0),onCompositionend:U[2]||(U[2]=Z=>d.value=!1)},null,40,xLe),[[js,l.value]]),r.value?(g(),ue(Zo,{key:0,class:"tsearch-spin",size:"sm",label:v(s)("conversation.search.searching")},null,8,["label"])):Y("",!0),U[6]||(U[6]=b("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),W(Dt,{class:"tsearch-close",size:"sm",label:v(s)("conversation.search.close"),onClick:U[3]||(U[3]=Z=>o("close"))},{default:ae(()=>[W(Ee,{name:"close"})]),_:1},8,["label"])]),b("div",{class:Be(["tsearch-foot-wrap",{open:h.value}]),inert:!h.value},[b("div",CLe,[W(Dt,{size:"sm",label:v(s)("conversation.search.previous"),disabled:p.value===0,onClick:U[4]||(U[4]=Z=>C(-1))},{default:ae(()=>[W(Ee,{name:"arrow-up"})]),_:1},8,["label","disabled"]),W(Dt,{size:"sm",label:v(s)("conversation.search.next"),disabled:p.value===0,onClick:U[5]||(U[5]=Z=>C(1))},{default:ae(()=>[W(Ee,{name:"arrow-down"})]),_:1},8,["label","disabled"]),b("span",MLe,I(m.value),1)])],10,SLe),(g(),ue(hl,{to:e.pane},[b("div",ALe,[(g(!0),S(Ce,null,rt(f.value,(Z,q)=>(g(),S("div",{key:q,class:"tsearch-ring",style:Gt(Z)},null,4))),128))])],8,["to"]))],34))}}),ELe=vt(TLe,[["__scopeId","data-v-d7187e08"]]);function ILe(e,t=2e4){const n=V(`${e}?r=0`);let o=0;const s=setInterval(()=>{o+=1,n.value=`${e}?r=${o}`},t);return En(()=>clearInterval(s)),n}const LLe=["src","alt","role"],$Le=Je({__name:"PythinkerLogo",props:{size:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:"Pythinker Code"},interactive:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=ILe("/brand/mascot-waving.png"),o=e,s=t;function i(){o.interactive&&s("click")}return(l,r)=>(g(),S("img",{src:e.animated?v(n):"/brand/icon.svg",class:Be(["pythinker-logo",[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?"button":"img",onClick:i},null,10,LLe))}}),df=vt($Le,[["__scopeId","data-v-58c4fde0"]]),NLe=5;function zLe(e,t,n,o=NLe){if(n||e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(l=>l.id===t);i&&(s[o-1]=i)}return s}const BLe={key:0,class:"recent"},RLe={class:"recent-caption"},PLe=["onClick"],FLe={class:"recent-title"},jLe={class:"recent-time"},OLe={class:"recent-foot"},HLe=Je({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["select","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>e.sessions.length?(g(),S("section",BLe,[b("h2",RLe,I(v(o)("sessions.recentSessions")),1),(g(!0),S(Ce,null,rt(e.sessions,l=>(g(),S("button",{key:l.id,type:"button",class:"recent-row",onClick:r=>n("select",l.id)},[b("span",{class:Be(["recent-ico",l.archived?"recent-ico--done":"recent-ico--open"])},[W(Ee,{name:l.archived?"circle-check":"circle-dashed",size:"sm"},null,8,["name"])],2),b("span",FLe,I(l.title),1),b("span",jLe,I(l.time),1)],8,PLe))),128)),b("div",OLe,[W(Cn,{text:v(o)("conversation.sessionAdminTooltip")},{default:ae(()=>[b("button",{type:"button",class:"recent-more",onClick:i[0]||(i[0]=l=>n("openSessionAdmin"))},[He(I(v(o)("conversation.viewMoreSessions"))+" ",1),W(Ee,{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])])):Y("",!0)}}),DLe=vt(HLe,[["__scopeId","data-v-cd5a729d"]]),VLe={class:"chat-layout"},WLe={class:"empty-hint"},qLe={key:0,class:"empty-hint-text"},ULe={key:1,class:"ws-pick"},ZLe={class:"ws-pick-name"},KLe={key:1,class:"ws-pick-menu"},GLe=["onClick"],YLe={class:"ws-pick-item-name"},XLe={class:"ws-pick-item-path"},JLe=["aria-label"],QLe={key:0,class:"abort-toast",role:"status","aria-live":"polite"},e$e={class:"abort-toast-text"},t$e=48,Qm=80,gM=1e3,n$e=420,o$e=3e3,s$e=Je({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{},revealSavedPlan:{type:Function},panelVisible:{type:Boolean},panelExpanded:{type:Boolean},activePanelType:{},togglePanel:{type:Function}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","steerQueued","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","openFile","openMedia","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","openChanges","refreshGitStatus","editMessage","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","restoreSession","selectSession","exportSession","togglePin","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),s=e,i=n,l=V(!1),r=V(!1),a=B(()=>s.workspaces?.find(Ie=>Ie.id===s.activeWorkspaceId)?.name??s.workspaceName??""),c=B(()=>(s.workspaces?.length??0)>0),u=B(()=>zLe(s.workspaces??[],s.activeWorkspaceId,r.value)),d=B(()=>(s.workspaces?.length??0)-u.value.length);Ke(l,Ae=>{Ae||(r.value=!1)});function f(Ae){l.value=!1,Ae!==s.activeWorkspaceId&&i("selectWorkspace",Ae)}y1(dn.contentAlign);const p=V(null),h=V(null),m=V(null),k=V(!1);let x=null;function y(Ae,Ie){const At=m.value??h.value;return!At||At.loadForEdit(Ae)===!1?!1:(At.loadAttachmentsForEdit(Ie??[]),!0)}function w(){k.value=!0,x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k.value=!1},2e3)}function _(){s.goal&&(M.value="goal")}const A=B(()=>s.tasks.filter(Ae=>Ae.kind==="bash"||Ae.kind==="tool"&&!Ae.id.startsWith("question-"))),P=B(()=>s.tasks.filter(Ae=>Ae.kind==="subagent"&&Ae.runInBackground)),z=B(()=>A.value.filter(Ae=>Ae.state==="run").length),L=B(()=>P.value.filter(Ae=>Ae.state==="run").length);function E(Ae){const Ie=s.tasks,At=Ie.find(mn=>mn.id===Ae)??Ie.find(mn=>mn.parentToolCallId===Ae);if(At)return At.id;const lt=Ie.filter(mn=>mn.kind==="subagent"&&!mn.parentToolCallId);if(lt.length===1)return lt[0].id}qn("resolveAgentTaskId",E);function T(Ae){const Ie=s.tasks.filter(At=>At.id===Ae||At.parentToolCallId===Ae);if(Ie.length!==0)return Ie.some(At=>At.state==="run"&&At.runInBackground!==!0)}qn("resolveDetachableTask",T);const $=fn("modelDisplay"),C=fn("subagentEffort");function j(Ae){const Ie=E(Ae);if(Ie===void 0)return;const At=s.tasks.find(Kn=>Kn.id===Ie||Kn.agentId===Ie),lt=$?.(At?.model),mn=C?.(At?.thinkingEffort);if(!(lt===void 0&&mn===void 0))return{display:lt,effort:mn}}qn("resolveAgentModel",j),qn("resolvePlan",Ae=>s.sessionPlans?.[Ae]),qn("revealSavedPlan",(Ae,Ie)=>s.revealSavedPlan?.(Ae,Ie)??Promise.resolve(!1)),qn("pinScroll",hs);const H=B(()=>(s.todos??[]).filter(Ae=>Ae.status==="done").length),D=B(()=>s.goal!==null&&s.goal!==void 0||A.value.length>0||P.value.length>0||(s.todos?.length??0)>0),M=V(null),R=B(()=>s.gitInfo?s.changes?.length??0:0);function O(Ae){M.value=M.value===Ae?null:Ae}function U(){M.value=null}Ke([M,()=>s.goal,A,P,()=>s.todos,()=>s.planMode,()=>s.sessionPlans],()=>{(M.value==="goal"&&!s.goal||M.value==="bash"&&A.value.length===0||M.value==="subagent"&&P.value.length===0||M.value==="todos"&&(s.todos?.length??0)===0||M.value==="plan"&&!s.planMode&&Object.keys(s.sessionPlans??{}).length===0)&&U()});function Z(Ae){if(Ae.role==="compaction")return o("conversation.compactedPlain");if(Ae.role==="user"){if(Ae.skillActivation)return`/${Ae.skillActivation.name}`;if(Ae.pluginCommand)return`/${Ae.pluginCommand.pluginId}:${Ae.pluginCommand.commandName}`;const At=Ae.text.trim().replaceAll(/\s+/g," ");return At.length>0?At:"user"}const Ie=(Ae.text||Ae.thinking||"").trim().replaceAll(/\s+/g," ");return Ie.length>0?Ie:(Ae.tools?.length??0)>0?`${Ae.tools.length} tools`:"pythinker"}function q(Ae){for(let Ie=Ae+1;Ie0)return lt}return""}const te=B(()=>{let Ae=0;return s.turns.flatMap((Ie,At)=>Ie.role!=="user"?[]:(Ae+=1,[{id:Ie.id,role:Ie.role,no:Ae,title:Z(Ie),preview:q(At)}]))}),ee=V(null);function J(){const Ae=F.value;if(!Ae)return;const Ie=Ae.querySelectorAll(".turn-anchor[data-turn-id]");if(Ie.length===0)return;const At=te.value;if(At.length===0)return;const lt=new Set(At.map(Co=>Co.id));if(le.value&&ge()<=Qm){ee.value=At[At.length-1].id;return}const mn=Ae.getBoundingClientRect(),Kn=mn.height/2;let to=null;Ie.forEach(Co=>{const no=Co.dataset.turnId;if(!no||!lt.has(no))return;Co.getBoundingClientRect().top-mn.top<=Kn&&(to=no)}),ee.value=to??At[0].id}const se=V(!1);let Q=0;function me(){Q||(Q=Qn(()=>{Q=0,xe()}))}function xe(){const Ae=F.value,Ie=!s.mobile&&s.conversationToc&&Ae?Ae.closest(".con")?.querySelector(".conversation-toc"):null,At=Ie?.querySelector(".toc-marker");let lt=!1;if(Ae&&Ie&&At){const mn=At.getBoundingClientRect(),Kn=Ie.getBoundingClientRect(),to=mn.left+mn.width/2;lt=Array.from(Ae.querySelectorAll(".table-node-wrapper")).some(Co=>{const no=Co.getBoundingClientRect();return no.left<=to&&to<=no.right&&no.topKn.top})}se.value!==lt&&(se.value=lt)}const Ye=B(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),at=B(()=>{const Ae=Ye.value;if(Ae)return s.pendingQuestionActions?.[Ae.questionId]}),X=B(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),oe=B(()=>{const Ae=X.value;return Ae?!!s.pendingApprovalActions?.[Ae.approvalId]:!1}),F=V(null),K=V(!1),he=V(null),ye=V(0),ve=V(0),ie=B(()=>({"--panes-scrollbar-width":`${ye.value}px`})),de=B(()=>({"--chat-dock-height":`${ve.value+t$e}px`}));function be(Ae){return Ae instanceof HTMLElement?Ae:Ae&&"$el"in Ae&&Ae.$el instanceof HTMLElement?Ae.$el:null}function Se(){const Ae=F.value;ye.value=Ae?Math.max(0,Ae.offsetWidth-Ae.clientWidth):0,ve.value=he.value?.offsetHeight??0}function je(Ae){const Ie=be(Ae);F.value=Ie,Ie&&ql()}function et(Ae){const Ie=be(Ae);he.value=Ie??null,Ae&&"loadForEdit"in Ae&&typeof Ae.loadForEdit=="function"&&"focus"in Ae&&typeof Ae.focus=="function"?m.value={loadForEdit:Ae.loadForEdit.bind(Ae),loadAttachmentsForEdit:"loadAttachmentsForEdit"in Ae&&typeof Ae.loadAttachmentsForEdit=="function"?Ae.loadAttachmentsForEdit.bind(Ae):()=>{},insertQuote:"insertQuote"in Ae&&typeof Ae.insertQuote=="function"?Ae.insertQuote.bind(Ae):()=>{},focus:Ae.focus.bind(Ae)}:m.value=null,oi()}const le=V(!0),fe=V(!1);function ge(){const Ae=F.value;return Ae?Ae.scrollHeight-Ae.scrollTop-Ae.clientHeight:0}let Oe=0,Fe=0,pt=0,kt=0,qt=0,nn=0;function Jt(){return Date.now()1?(le.value=!1,fe.value=!0):At<=Qm&&Ie>Oe+1&&(le.value=!0,fe.value=!1),Oe=Ie,J()}function Dn(Ae=!1){const Ie=F.value;le.value=!0,fe.value=!1,Ie&&(!Ae&&performance.now()({node:Kn,top:xn(Ae,Kn)})),lt=At.findIndex(Kn=>Kn.top>=Ie),mn=lt<0?Math.max(0,At.length-1):lt;return At.slice(mn,mn+2).flatMap(Kn=>{const to=Kn.node.dataset.scrollAnchorId,Co=to??Kn.node.dataset.turnId;return Co?[{kind:to?"tool":"turn",id:Co,top:Kn.top}]:[]})}const Hn=new Map;function bn(Ae,Ie){for(const At of Ie.anchors){const lt=At.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",mn=Ae.querySelector(`[${lt}="${Mn(At.id)}"]`);if(mn)return xn(Ae,mn)-At.top}return Ae.scrollHeight-Ie.oldHeight}function Wn(Ae,Ie,At=Ae.scrollTop){return Ae.scrollTop=At+bn(Ae,Ie),Oe=Ae.scrollTop,Ae.scrollTop}async function Pn(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Xe.value||!s.hasMoreMessages)return;const Ae=s.sessionId,Ie=F.value,At=Ie?.scrollTop??0,lt={anchors:Ie?$n(Ie,At):[],oldHeight:Ie?.scrollHeight??0};qe(Ae,!0),bt();try{if(await yt(),await s.loadOlderMessages(Ae),await yt(),s.sessionId!==Ae){Hn.set(Ae,lt);return}const mn=F.value;if(!mn)return;Wn(mn,lt),Hn.delete(Ae)}finally{qe(Ae,!1)}}function Mn(Ae){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(Ae):Ae.replaceAll(/["\\]/g,"\\$&")}function Nn(Ae){const Ie=F.value;if(!Ie)return;const At=Ie.querySelector(`.turn-anchor[data-turn-id="${Mn(Ae)}"]`);At&&(Lt(),le.value=!1,ee.value=Ae,fe.value=ge()>Qm,At.scrollIntoView({behavior:"smooth",block:"center"}))}function An(){const Ae=F.value;if(!Ae)return"none";const Ie=Ae.firstElementChild,At=Ie instanceof HTMLElement?Ie.offsetHeight:0,lt=he.value?.offsetHeight??0;return`${Ae.scrollHeight}:${Ae.clientHeight}:${At}:${lt}`}function Qn(Ae){return typeof requestAnimationFrame=="function"?requestAnimationFrame(Ae):setTimeout(Ae,16)}function Fn(Ae){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(Ae):clearTimeout(Ae)}let Qt=0,uo=0,Zn=null,Bo=0;function Un(){return performance.now(){if(uo=0,performance.now()>=Qt||!Zn){Zn=null;return}const mn=Zn.getBoundingClientRect().top-Bo;mn&&(At.scrollTop+=mn),uo=Qn(lt)};uo=Qn(lt)}function Io(Ae=36){if(!le.value&&!Jt())return;const Ie=++nn;let At="",lt=0,mn=0;qt&&(Fn(qt),qt=0);const Kn=()=>{if(qt=0,Ie!==nn||!le.value&&!Jt())return;Dn(!1);const to=An();lt=to===At?lt+1:0,At=to,mn++,lt<3&&mn0&&Ie.length>=Ae.length&&Ae.firstId!==Ie.firstId&&Ae.lastId===Ie.lastId&&Ae.lastTextLen===Ie.lastTextLen&&Ae.lastThinkingLen===Ie.lastThinkingLen&&Ae.lastToolsLen===Ie.lastToolsLen&&Ae.approvalIds===Ie.approvalIds}const Jo=B(()=>{const Ae=(s.approvals??[]).map(Kn=>Kn.approvalId).join(","),Ie=s.turns,At=Ie.at(-1),lt=At?.thinking?.length??0,mn=At?.tools?.reduce((Kn,to)=>Kn+to.name.length+(to.arg?.length??0)+(to.output?.join("").length??0),0)??0;return{length:Ie.length,firstId:Ie[0]?.id??"",lastId:At?.id??"",lastTextLen:At?.text.length??0,lastThinkingLen:lt,lastToolsLen:mn,approvalIds:Ae}});Ke(Jo,async(Ae,Ie)=>{if(Xe.value&&Rt(Ie,Ae)){J();return}await yt(),le.value||Jt()?Dn(Ae.length{oi()}),Ke(()=>s.mobile,async()=>{await yt(),Se()});const Ls=new Map;Ke(()=>s.fileReloadKey,async(Ae,Ie)=>{const At=F.value;Ie&&At&&Ls.set(String(Ie),{top:At.scrollTop,following:le.value}),Lt(),await yt();const lt=F.value,mn=Ae?Ls.get(String(Ae)):void 0;if(mn&<){const Kn=Hn.get(String(Ae)),to=Kn?Wn(lt,Kn,mn.top):mn.top;Kn&&Hn.delete(String(Ae)),le.value=mn.following,lt.scrollTop=to,Oe=lt.scrollTop,fe.value=!mn.following&&ge()>1,mn.following&&Io()}else le.value=!0,Oe=0,Dn(!1),Io();J()}),Ke(()=>s.sessionLoading,async(Ae,Ie)=>{Ae||!Ie||(le.value=!0,await yt(),Io(),J())}),Ke(()=>s.turnActive,async(Ae,Ie)=>{Ae||!Ie||!le.value&&!Jt()||(await yt(),Io(48),J())});function $e(){le.value=!0,fe.value=!1,Fe=Date.now()+gM,yt(()=>{Dn(!0),Io(16)})}function Ge(Ae){$e(),i("submit",Ae)}function ot(Ae){le.value=!0,fe.value=!1,Fe=Date.now()+gM,i("editMessage",Ae)}function dt(Ae){const Ie=s.queued?.[Ae],At=Ie?.text??"";y(At,Ie?.attachments)&&i("editQueued",Ae)}function Mt(Ae){i("reorderQueue",Ae)}function Ft(Ae,Ie){$e(),i("answer",Ae,Ie)}function Ut(Ae,Ie){!Ae||!Ie||i("approval",Ae,Ie)}let en=null,tn=null,eo=null,Ro=null,$s=0,Do=0,We=0;const st=V(new Set),Xe=B(()=>!!s.sessionId&&st.value.has(s.sessionId));function qe(Ae,Ie){const At=new Set(st.value);Ie?At.add(Ae):At.delete(Ae),st.value=At}function Pe(){Xe.value||We||(We=Qn(()=>{We=0,!Xe.value&&(Un()||(le.value||Jt())&&Dn(!1))}))}function bt(){nn++,qt&&(Fn(qt),qt=0),We&&(Fn(We),We=0)}function Lt(){const Ae=F.value;if(Fe=0,bt(),Qt=0,Zn=null,Ae){const Ie=Ae.scrollTop;typeof Ae.scrollTo=="function"?Ae.scrollTo({top:Ie,behavior:"auto"}):Ae.scrollTop=Ie}kt=0,pt=Number.NEGATIVE_INFINITY,Ae&&(Oe=Ae.scrollTop)}function cn(){const Ae=F.value;!Ae||Ae.scrollHeight-Ae.clientHeight<=1&&!s.hasMoreMessages||(le.value=!1,Lt(),Ae.scrollHeight-Ae.clientHeight>1&&(fe.value=!0))}function So(Ae){const Ie=F.value;if(!Ie)return!1;for(const At of Ae.composedPath()){if(At===Ie)return!1;if(At instanceof HTMLElement&&At.scrollHeight>At.clientHeight+1&&At.scrollTop>1)return!0}return!1}function Qo(Ae){Ae.defaultPrevented||Ae.ctrlKey||Ae.shiftKey||Ae.deltaY>=0||So(Ae)||cn()}function Po(Ae){const Ie=F.value;if(!Ie||Ae.defaultPrevented||Ae.button!==0||Ae.pointerType==="touch")return;const At=Ie.getBoundingClientRect(),lt=Ie.offsetWidth-Ie.clientWidth,mn=lt>0?lt:12;Ae.target===Ie&&Ae.clientX>=At.right-mn&&cn()}let Xn=null;function pn(Ae){Xn=Ae.touches.length===1?Ae.touches[0].clientY:null}function Us(Ae){const Ie=Ae.touches.length===1?Ae.touches[0].clientY:null;Ie!==null&&Xn!==null&&Ie>Xn+2&&!So(Ae)&&cn(),Xn=Ie}function mi(){if(!tn)return;const Ae=F.value?.firstElementChild??null;Ae!==eo&&(eo&&tn.unobserve(eo),eo=Ae,Ae&&tn.observe(Ae))}function oi(){if(!tn)return;const Ae=he.value;Ae!==Ro&&(Ro&&tn.unobserve(Ro),Ro=Ae,Ae&&tn.observe(Ae))}function ql(){const Ae=F.value;Se(),en&&(en.disconnect(),Ae&&en.observe(Ae,{childList:!0,subtree:!0,characterData:!0})),tn&&(tn.disconnect(),eo=null,Ro=null,Ae&&tn.observe(Ae),mi(),oi()),$s=Ae?.scrollHeight??0,Do=Ae?.clientHeight??0,me()}function vl(){mi(),Pe(),me()}function Zs(){typeof document>"u"||document.visibilityState==="visible"&&le.value&&Io()}const yo=V(!1);let Lo=null;function yl(){yo.value=!0,Lo!==null&&clearTimeout(Lo),Lo=setTimeout(()=>{yo.value=!1},o$e)}function ms(){yl(),i("interrupt")}function wl(Ae){if((Ae.metaKey||Ae.ctrlKey)&&Ae.key.toLowerCase()==="f"){if(s.overlayOpen)return;Ae.preventDefault(),K.value=!0,yt(()=>{F.value?.closest(".con")?.querySelector(".tsearch-input")?.focus()});return}Ae.key==="Escape"&&(s.running||s.working)&&(Ae.preventDefault(),ms())}function gi(){K.value=!1,yt(()=>F.value?.focus({preventScroll:!0}))}function si(){le.value&&Pe()}In(()=>{yt(()=>{typeof MutationObserver=="function"&&(en=new MutationObserver(vl)),typeof ResizeObserver=="function"&&(tn=new ResizeObserver(()=>{me(),Se();const Ae=F.value;if(!Ae)return;const{scrollHeight:Ie,clientHeight:At}=Ae,lt=Ie>$s+1,mn=At{en&&en.disconnect(),tn&&tn.disconnect(),We&&Fn(We),qt&&Fn(qt),uo&&Fn(uo),Q&&Fn(Q),Lo!==null&&clearTimeout(Lo),x!==null&&(clearTimeout(x),x=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Zs),document.removeEventListener("keydown",wl)),window.visualViewport?.removeEventListener("resize",si)});function Ul(){(m.value??h.value)?.focus()}function Ni(Ae){(m.value??h.value)?.insertQuote(Ae)}return t({loadComposerForEdit:y,focusComposer:Ul,insertComposerQuote:Ni}),(Ae,Ie)=>{const At=yg("IconButton");return g(),S("section",{class:Be(["con",{mobile:e.mobile,"toc-enabled":e.conversationToc}]),style:Gt(de.value)},[K.value&&F.value?(g(),ue(ELe,{key:0,pane:F.value,mobile:e.mobile,onClose:gi},null,8,["pane","mobile"])):Y("",!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(g(),ue(owe,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":R.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,"session-done":e.sessionDone,pinned:e.pinned,"panel-visible":e.panelVisible,onOpenChanges:Ie[0]||(Ie[0]=lt=>i("openChanges")),onCopyAll:Ie[1]||(Ie[1]=lt=>p.value?.copyConversation()),onCopyFinalSummary:Ie[2]||(Ie[2]=lt=>p.value?.copyFinalSummary()),onOpenPr:Ie[3]||(Ie[3]=lt=>e.pr&&i("openPr",e.pr.url)),onRenameSession:Ie[4]||(Ie[4]=(lt,mn)=>i("renameSession",lt,mn)),onForkSession:Ie[5]||(Ie[5]=lt=>i("forkSession",lt)),onTogglePin:Ie[6]||(Ie[6]=lt=>i("togglePin",lt)),onArchiveSession:Ie[7]||(Ie[7]=lt=>i("archiveSession",lt)),onRestoreSession:Ie[8]||(Ie[8]=lt=>i("restoreSession",lt)),onExportSession:Ie[9]||(Ie[9]=lt=>i("exportSession",lt)),onTogglePanel:Ie[10]||(Ie[10]=lt=>e.togglePanel?.())},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","session-done","pinned","panel-visible"])):Y("",!0),!e.mobile&&!e.panelVisible&&e.turns.length===0&&!e.sessionLoading?(g(),ue(At,{key:2,class:"empty-panel-btn",label:v(o)("panel.openPanel"),onClick:Ie[11]||(Ie[11]=lt=>e.togglePanel?.())},{default:ae(()=>[W(Ee,{name:"panel-expand-right"})]),_:1},8,["label"])):Y("",!0),e.conversationToc?(g(),ue(aLe,{key:3,items:te.value,"active-turn-id":ee.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:se.value,onSelect:Nn},null,8,["items","active-turn-id","mobile","session-loading","occluded"])):Y("",!0),b("div",VLe,[b("div",{ref:je,class:Be(["panes chat-scroll",{"is-following":le.value,"history-prepending":Xe.value}]),tabindex:"-1",onScrollPassive:kn,onWheelPassive:Qo,onPointerdownPassive:Po,onTouchstartPassive:pn,onTouchmovePassive:Us},[b("div",{class:Be(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(g(),S(Ce,{key:0},[Ie[64]||(Ie[64]=b("div",{class:"empty-spacer"},null,-1)),b("div",WLe,[b("span",{class:Be(["empty-hint-title",{"is-starting":e.starting}])},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(df,{key:1,size:"md",label:"","aria-hidden":"true"})),b("span",null,I(e.starting?v(o)("conversation.starting"):v(o)("composer.emptyConversationTitle")),1)],2),e.starting?Y("",!0):(g(),S("span",qLe,I(v(o)("composer.emptyConversation")),1)),c.value&&!e.starting?(g(),S("div",ULe,[W(Cn,{text:v(o)("conversation.switchWorkspace")},{default:ae(()=>[b("button",{type:"button",class:"ws-pick-btn",onClick:Ie[12]||(Ie[12]=xt(lt=>l.value=!l.value,["stop"]))},[W(Ee,{name:"folder",size:"sm"}),b("span",ZLe,I(a.value),1),W(Ee,{class:Be(["ws-pick-chev",{open:l.value}]),name:"chevron-down",size:"sm"},null,8,["class"])])]),_:1},8,["text"]),l.value?(g(),S("div",{key:0,class:"ws-pick-backdrop",onClick:Ie[13]||(Ie[13]=lt=>l.value=!1)})):Y("",!0),l.value?(g(),S("div",KLe,[(g(!0),S(Ce,null,rt(u.value,lt=>(g(),S("button",{key:lt.id,type:"button",class:Be(["ws-pick-item",{on:lt.id===e.activeWorkspaceId}]),onClick:xt(mn=>f(lt.id),["stop"])},[b("span",YLe,I(lt.name),1),b("span",XLe,I(lt.shortPath),1)],10,GLe))),128)),d.value>0?(g(),S("button",{key:0,type:"button",class:"ws-pick-item ws-pick-more",onClick:Ie[14]||(Ie[14]=xt(lt=>r.value=!r.value,["stop"]))},[b("span",null,I(v(o)("conversation.moreWorkspaces",{count:d.value})),1)])):Y("",!0),Ie[63]||(Ie[63]=b("div",{class:"ws-pick-divider"},null,-1)),b("button",{type:"button",class:"ws-pick-action",onClick:Ie[15]||(Ie[15]=xt(lt=>{l.value=!1,i("addWorkspace")},["stop"]))},[W(Ee,{name:"plus",size:"sm"}),b("span",null,I(v(o)("conversation.addWorkspace")),1)])])):Y("",!0)])):e.starting?Y("",!0):(g(),S("button",{key:2,type:"button",class:"empty-add-workspace",onClick:Ie[16]||(Ie[16]=lt=>i("addWorkspace"))},[W(Ee,{name:"folder-plus",size:"sm"}),b("span",null,I(v(o)("conversation.addWorkspace")),1)]))]),e.sessionId?Y("",!0):(g(),ue(DLe,{key:0,sessions:e.recentSessions??[],onSelect:Ie[17]||(Ie[17]=lt=>i("selectSession",lt)),onOpenSessionAdmin:Ie[18]||(Ie[18]=lt=>i("openSessionAdmin"))},null,8,["sessions"])),W(Yz,{ref_key:"emptyComposerRef",ref:h,class:"empty-composer","session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:Ge,onSteer:Ie[19]||(Ie[19]=lt=>i("steer",lt)),onCommand:Ie[20]||(Ie[20]=lt=>i("command",lt)),onInterrupt:ms,onUnqueue:Ie[21]||(Ie[21]=lt=>i("unqueue",lt)),onEditQueued:Ie[22]||(Ie[22]=lt=>i("editQueued",lt)),onSetPermission:Ie[23]||(Ie[23]=lt=>i("setPermission",lt)),onSetThinking:Ie[24]||(Ie[24]=lt=>i("setThinking",lt)),onTogglePlan:Ie[25]||(Ie[25]=lt=>i("togglePlan")),onToggleWorkflow:Ie[26]||(Ie[26]=lt=>i("toggleWorkflow")),onToggleGoal:Ie[27]||(Ie[27]=lt=>i("toggleGoal")),onOpenBtw:Ie[28]||(Ie[28]=lt=>i("command","/btw")),onCreateGoal:Ie[29]||(Ie[29]=lt=>i("createGoal",lt)),onControlGoal:Ie[30]||(Ie[30]=lt=>i("controlGoal",lt)),onFocusGoal:_,onCompact:Ie[31]||(Ie[31]=lt=>i("compact")),onPickModel:Ie[32]||(Ie[32]=lt=>i("pickModel")),onSelectModel:Ie[33]||(Ie[33]=lt=>i("selectModel",lt))},null,8,["session-id","running","queued","search-files","upload-image","status","thinking","plan-mode","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills","starting"]),Ie[65]||(Ie[65]=b("div",{class:"empty-spacer"},null,-1))],64)):(g(),ue(d9,{ref_key:"chatPaneRef",ref:p,key:e.fileReloadKey??"no-session",turns:e.turns,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":le.value,"tool-diff-panel":!0,"turn-folding":e.turnFolding??!0,"activity-run-folding":e.activityRunFolding??!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:Ie[34]||(Ie[34]=lt=>i("openFile",lt)),onOpenMedia:Ie[35]||(Ie[35]=lt=>i("openMedia",lt)),onCopyConversationCopied:w,onOpenCompaction:Ie[36]||(Ie[36]=lt=>i("openCompaction",lt)),onOpenAgent:Ie[37]||(Ie[37]=lt=>i("openAgent",lt)),onDetachTask:Ie[38]||(Ie[38]=lt=>i("detachTask",lt)),onOpenToolDiff:Ie[39]||(Ie[39]=lt=>i("openToolDiff",lt)),onOpenTurnDiff:Ie[40]||(Ie[40]=lt=>i("openTurnDiff",lt)),onEditMessage:ot,onLoadOlderMessages:Pn,onUnqueue:Ie[41]||(Ie[41]=lt=>i("unqueue",lt)),onEditQueued:dt,onReorderQueue:Mt,onSteerQueued:Ie[42]||(Ie[42]=lt=>i("steerQueued",lt)),onContinueTurn:Ie[43]||(Ie[43]=lt=>Ge({text:lt,attachments:[]}))},null,8,["turns","approvals","questions","turn-active","working","fast-moon","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","cwd","queued"]))],2)],34),(g(),ue(hl,{defer:"",to:".pfc-host",disabled:!e.panelExpanded||e.activePanelType==="btw"},[e.turns.length===0&&!e.sessionLoading?Y("",!0):(g(),ue(eLe,{key:0,ref:et,style:Gt(ie.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":lt=>i("openFile",lt),"reveal-saved-plan":e.revealSavedPlan,"dock-panel":M.value,"bash-tasks":A.value,"subagent-tasks":P.value,"bash-running":z.value,"subagent-running":L.value,"todo-done-count":H.value,"has-dock-work":D.value,todos:e.todos,"pending-question":Ye.value,"question-busy-kind":at.value,"pending-approval":X.value,"approval-busy":oe.value,mobile:e.mobile,onToggleDockPanel:Ie[44]||(Ie[44]=lt=>O(lt)),onCloseDockPanel:Ie[45]||(Ie[45]=lt=>U()),onOpenAgent:Ie[46]||(Ie[46]=lt=>i("openAgent",lt)),onAnswer:Ft,onDismiss:Ie[47]||(Ie[47]=lt=>i("dismiss",lt)),onApproval:Ut,onCancelTask:Ie[48]||(Ie[48]=lt=>i("cancelTask",lt)),onControlGoal:Ie[49]||(Ie[49]=lt=>i("controlGoal",lt)),onSubmit:Ge,onSteer:Ie[50]||(Ie[50]=lt=>i("steer",lt)),onCommand:Ie[51]||(Ie[51]=lt=>i("command",lt)),onInterrupt:ms,onSetPermission:Ie[52]||(Ie[52]=lt=>i("setPermission",lt)),onSetThinking:Ie[53]||(Ie[53]=lt=>i("setThinking",lt)),onTogglePlan:Ie[54]||(Ie[54]=lt=>i("togglePlan")),onToggleWorkflow:Ie[55]||(Ie[55]=lt=>i("toggleWorkflow")),onToggleGoal:Ie[56]||(Ie[56]=lt=>i("toggleGoal")),onOpenBtw:Ie[57]||(Ie[57]=lt=>i("command","/btw")),onCreateGoal:Ie[58]||(Ie[58]=lt=>i("createGoal",lt)),onFocusGoal:_,onCompact:Ie[59]||(Ie[59]=lt=>i("compact")),onPickModel:Ie[60]||(Ie[60]=lt=>i("pickModel")),onSelectModel:Ie[61]||(Ie[61]=lt=>i("selectModel",lt))},null,8,["style","session-id","running","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","working","goal-mode","dynamic-workflow-mode","activation-badges","models","starred-ids","skills","goal","session-plans","overlay-open","open-file","reveal-saved-plan","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile"]))],8,["disabled"]))]),W(qi,{name:"pill"},{default:ae(()=>[fe.value?(g(),S("button",{key:0,class:"newmsg-pill",style:Gt({bottom:`${ve.value+12}px`}),"aria-label":v(o)("conversation.jumpToLatestAria"),onClick:Ie[62]||(Ie[62]=lt=>Dn(!0))},[W(Ee,{class:"pill-chevron",name:"chevron-down",size:"md"}),He(" "+I(v(o)("conversation.newMessages")),1)],12,JLe)):Y("",!0)]),_:1}),W(qi,{name:"abort-toast"},{default:ae(()=>[yo.value?(g(),S("div",QLe,[b("span",e$e,I(v(o)("conversation.manuallyAborted")),1)])):Y("",!0)]),_:1})],6)}}}),i$e=vt(s$e,[["__scopeId","data-v-0a30b1ee"]]),l$e=["role","aria-label"],r$e={key:0,class:"sab-comment"},a$e=["placeholder"],c$e=["disabled"],u$e=Je({__name:"SelectionActionBar",props:{enabled:{type:Boolean},panelSource:{}},emits:["add"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(!1),l=V(!1),r=V(""),a=V(""),c=V(),u=V({}),d=V(null),f=V(null);let p=0;function h(){i.value=!1,l.value=!1,r.value=""}function m(L){const E=L.commonAncestorContainer;return E.nodeType===Node.ELEMENT_NODE?E:E.parentElement}function k(){if(p=0,!n.enabled||l.value&&d.value?.contains(document.activeElement))return;const L=window.getSelection();if(!L||L.rangeCount===0||L.isCollapsed){h();return}const E=L.getRangeAt(0),T=m(E),$=T?.closest(".con, .pt-body");if(!T||!$||T.closest('.sab, input, textarea, button, [contenteditable="true"]')){h();return}const C=L.toString().trim(),j=E.getBoundingClientRect();if(!C||j.width===0&&j.height===0){h();return}a.value=C,c.value=$.classList.contains("pt-body")?n.panelSource:void 0;const H=220,D=Math.min(window.innerWidth-H-8,Math.max(8,j.left+j.width/2-H/2)),M=j.bottom+8;u.value={left:`${Math.round(D)}px`,top:`${Math.round(M)}px`,width:`${H}px`},i.value=!0,l.value=!1}function x(){p&&cancelAnimationFrame(p),p=requestAnimationFrame(k)}function y(){window.getSelection()?.removeAllRanges()}function w(L){const E=a.value.trim();if(!E)return;const T=L?.trim();o("add",{quote:E,comment:T||void 0,source:c.value}),y(),h()}function _(){l.value=!0,yt(()=>f.value?.focus())}function A(L){if(l.value||L.key!=="ArrowDown"&&L.key!=="ArrowUp")return;L.preventDefault();const E=Array.from(d.value?.querySelectorAll(".sab-action")??[]),T=E.indexOf(document.activeElement),$=L.key==="ArrowDown"?(T+1)%E.length:(T-1+E.length)%E.length;E[$]?.focus()}function P(L){!i.value||d.value?.contains(L.target)||h()}function z(L){L.key==="Escape"&&i.value&&(L.preventDefault(),L.stopImmediatePropagation(),h())}return In(()=>{document.addEventListener("selectionchange",x),document.addEventListener("pointerdown",P,!0),document.addEventListener("keydown",z,!0)}),En(()=>{p&&cancelAnimationFrame(p),document.removeEventListener("selectionchange",x),document.removeEventListener("pointerdown",P,!0),document.removeEventListener("keydown",z,!0)}),(L,E)=>(g(),ue(hl,{to:"body"},[i.value?(g(),S("div",{key:0,ref_key:"barRef",ref:d,class:"sab",style:Gt(u.value),role:l.value?"dialog":"menu","aria-label":l.value?v(s)("selection.comment"):void 0,onPointerdown:E[4]||(E[4]=xt(()=>{},["prevent"])),onKeydown:A},[l.value?(g(),S("div",r$e,[Jn(b("input",{ref_key:"commentInputRef",ref:f,"onUpdate:modelValue":E[0]||(E[0]=T=>r.value=T),placeholder:v(s)("selection.commentPlaceholder"),onKeydown:E[1]||(E[1]=go(xt(T=>w(r.value),["prevent"]),["enter"]))},null,40,a$e),[[js,r.value]]),b("button",{type:"button",disabled:!r.value.trim(),onClick:E[2]||(E[2]=T=>w(r.value))},I(v(s)("selection.confirm")),9,c$e)])):(g(),S(Ce,{key:1},[b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:_},[W(Ee,{name:"message",size:"sm"}),b("span",null,I(v(s)("selection.comment")),1)]),b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:E[3]||(E[3]=T=>w())},[W(Ee,{name:"plus",size:"sm"}),b("span",null,I(v(s)("selection.addToChat")),1)])],64))],44,l$e)):Y("",!0)]))}}),d$e=vt(u$e,[["__scopeId","data-v-d37e8069"]]),f$e=["aria-label"],p$e={class:"media-lightbox-card"},h$e=["src","alt"],m$e=["src"],g$e={key:0,class:"media-preview-caption"},v$e=Je({__name:"MediaLightbox",props:{media:{},src:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),i=r4("overlay"),l=r4("close"),r=r4("image"),a=B(()=>n.media.kind==="image"),c=B(()=>n.media.path??(a.value?"Image preview":"Video preview")),u=Uo(1),d=Uo(0),f=Uo(0),p=Uo(!1),h=B(()=>({transform:`translate(${d.value}px, ${f.value}px) scale(${u.value})`,cursor:u.value>1?p.value?"grabbing":"grab":"zoom-in"}));let m=null,k=null,x=0,y=0,w=0,_=0;const{lock:A,unlock:P}=Kz();function z(){u.value=1,d.value=0,f.value=0}function L(H){if(!a.value)return;H.preventDefault();const D=Math.min(8,Math.max(1,u.value*(H.deltaY<0?1.1:.9)));u.value=D,D===1&&(d.value=0,f.value=0)}function E(){if(u.value!==1){z();return}const H=r.value;H&&(u.value=Math.min(8,Math.max(1,H.naturalWidth/H.clientWidth)))}function T(H){u.value<=1||(k=H.pointerId,x=H.clientX,y=H.clientY,w=d.value,_=f.value,p.value=!0,r.value?.setPointerCapture(H.pointerId))}function $(H){k===H.pointerId&&(d.value=w+H.clientX-x,f.value=_+H.clientY-y)}function C(H){k===H.pointerId&&(r.value?.releasePointerCapture(H.pointerId),k=null,p.value=!1)}function j(H){if(H.key==="Escape"){H.preventDefault(),H.stopPropagation(),o("close");return}if(H.key!=="Tab"||!i.value)return;const D=i.value.querySelectorAll(s),M=D[0],R=D[D.length-1];!M||!R||(i.value.contains(document.activeElement)?H.shiftKey&&document.activeElement===M?(H.preventDefault(),R.focus()):!H.shiftKey&&document.activeElement===R&&(H.preventDefault(),M.focus()):(H.preventDefault(),(H.shiftKey?R:M).focus()))}return In(()=>{A(),m=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener("keydown",j),l.value?.focus()}),En(()=>{P(),window.removeEventListener("keydown",j),m?.focus()}),(H,D)=>(g(),ue(hl,{to:"body"},[b("div",{ref:"overlay",class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":c.value,onMousedown:D[1]||(D[1]=xt(M=>o("close"),["self"]))},[b("button",{ref:"close",type:"button",class:"media-lightbox-close","aria-label":"Close",onClick:D[0]||(D[0]=M=>o("close"))},[W(Ee,{name:"close",size:"sm"})],512),b("div",p$e,[b("div",{class:"media-lightbox-frame",onWheel:L},[a.value?(g(),S("img",{key:0,ref:"image",class:"media-lightbox-media",src:e.src,alt:e.media.path??"",draggable:"false",style:Gt(h.value),onDblclick:E,onPointerdown:T,onPointermove:$,onPointerup:C,onPointercancel:C},null,44,h$e)):(g(),S("video",{key:1,class:"media-lightbox-media",src:e.src,controls:"",autoplay:""},null,8,m$e))],32)]),e.media.path?(g(),S("div",g$e,I(e.media.path),1)):Y("",!0)],40,f$e)]))}}),y$e=vt(v$e,[["__scopeId","data-v-a5036dce"]]),w$e={class:"ui-panel-header__main"},k$e={class:"ui-panel-header__title"},b$e={key:0,class:"ui-panel-header__sub"},_$e=Je({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:"Close"},wrap:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-panel-header",{wrap:e.wrap}])},[b("div",w$e,[b("span",k$e,I(e.title),1),W(Cn,{text:e.subtitle},{default:ae(()=>[e.subtitle?(g(),S("span",b$e,I(e.subtitle),1)):Y("",!0)]),_:1},8,["text"]),jn(t.$slots,"default",{},void 0,!0)]),e.closable?(g(),ue(Dt,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel,onClick:n[0]||(n[0]=o=>t.$emit("close"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])):Y("",!0)],2))}}),Ca=vt(_$e,[["__scopeId","data-v-47211810"]]),x$e={key:0,class:"fp-empty fp-error"},S$e={key:1,class:"fp-empty"},C$e={key:2,class:"fp-loading"},M$e={class:"fp-path"},A$e={class:"fp-meta"},T$e={key:0,class:"fp-lines"},E$e={class:"fp-size"},I$e={key:3,class:"fp-search"},L$e=["placeholder"],$$e={key:0,class:"fp-search-count"},N$e={key:1,class:"fp-code"},z$e={class:"fp-line-table"},B$e=["data-line"],R$e={class:"fp-gutter"},P$e=["innerHTML"],F$e={key:1,class:"fp-body fp-code"},j$e={class:"fp-line-table"},O$e=["data-line"],H$e={class:"fp-gutter"},D$e=["innerHTML"],V$e={key:2,class:"fp-body"},W$e=["srcdoc","title"],q$e={key:1,class:"fp-code"},U$e={class:"fp-line-table"},Z$e=["data-line"],K$e={class:"fp-gutter"},G$e=["innerHTML"],Y$e={key:3,class:"fp-body fp-pdf-wrap"},X$e=["src","title"],J$e={key:1,class:"fp-binary-card"},Q$e={class:"fp-binary-label"},eNe={key:4,class:"fp-body fp-table-wrap"},tNe={class:"fp-table"},nNe=["data-line"],oNe={key:5,class:"fp-body fp-image-wrap"},sNe=["src","alt"],iNe={key:1,class:"fp-binary-card"},lNe={class:"fp-binary-icon"},rNe={class:"fp-binary-label"},aNe={key:6,class:"fp-body fp-image-wrap"},cNe=["src"],uNe={key:1,class:"fp-binary-card"},dNe={class:"fp-binary-icon"},fNe={class:"fp-binary-label"},pNe={key:7,class:"fp-body fp-code"},hNe={class:"fp-line-table"},mNe=["data-line"],gNe={class:"fp-gutter"},vNe=["innerHTML"],yNe={key:8,class:"fp-body fp-binary-wrap"},wNe={class:"fp-binary-card"},kNe={class:"fp-binary-icon"},bNe={class:"fp-binary-label"},_Ne=Je({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},editable:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal","openEditor"],setup(e,{emit:t}){const{t:n}=$t();function o(X,oe){const F=oe?oe.split("/").filter(Boolean):[];for(const K of X.split("/"))K===""||K==="."||(K===".."?F.pop():F.push(K));return F.join("/")}const s=fn("resolveImage",async X=>X),i=B(()=>{const X=c.file?.path??"",oe=X.lastIndexOf("/");return oe>0?X.slice(0,oe):""});function l(X){if(/^(https?:|data:|blob:)/i.test(X)||X.startsWith("/"))return X;const oe=i.value;return oe?o(X,oe):X}async function r(X){const oe=l(X);return s?s(oe):oe}qn("resolveImage",r);function a(X){let oe=X.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(oe)||oe.startsWith("/"))return X;for(const K of["#","?"]){const he=oe.indexOf(K);he!==-1&&(oe=oe.slice(0,he))}const F=i.value;return{...X,path:o(oe,F)}}const c=e,u=B(()=>{const X=c.file;return X!==null&&!X.isBinary}),d=t;function f(X){c.openFile?.(a(X))}const p=V(null),h=B(()=>{const X=c.file;if(!X)return"binary";const oe=X.mime??"",F=X.languageId??"",K=X.path.toLowerCase();return oe==="text/markdown"||F==="markdown"||F==="md"||K.endsWith(".mdx")?"markdown":oe==="application/json"||F==="json"?"json":oe==="text/html"||F==="html"||K.endsWith(".html")||K.endsWith(".htm")?"html":oe==="application/pdf"||K.endsWith(".pdf")?"pdf":oe==="text/csv"||F==="csv"||K.endsWith(".csv")?"csv":oe.startsWith("image/")?"image":oe.startsWith("video/")?"video":X.isBinary?"binary":oe.startsWith("text/")||F!==""?"text":"binary"});function m(X){const oe=atob(X),F=Uint8Array.from(oe,K=>K.charCodeAt(0));return new TextDecoder().decode(F)}const k=B(()=>{const X=c.file;if(!X)return"";if(X.encoding==="base64")try{return m(X.content)}catch{return X.content}return X.content}),x=B(()=>{if(h.value!=="json"||!c.file)return"";try{return JSON.stringify(JSON.parse(k.value),null,2)}catch{return k.value}}),y=B(()=>c.file?(h.value==="json"?x.value:k.value).split(` +`):[]),w=B(()=>c.file?h.value==="json"?x.value:k.value:""),_=V(""),A=V(0),P=B(()=>{const X=_.value.trim().toLowerCase();if(!X)return[];const oe=[];return y.value.forEach((F,K)=>{F.toLowerCase().includes(X)&&oe.push(K+1)}),oe});Ke(_,()=>{A.value=0});function z(X,oe=!1){X&&yt(()=>{const F=p.value?.querySelector(".fp-body"),K=F?.querySelector(`[data-line="${X}"]`);if(!F||!K)return;oe&&(F.scrollTop=0);const he=F.getBoundingClientRect(),ye=K.getBoundingClientRect(),ve=ye.top-he.top+F.scrollTop;F.scrollTop=ve-F.clientHeight/2+ye.height/2})}Ke(()=>[c.file?.path,c.line],()=>z(c.line,!0),{immediate:!0});function L(X){const oe=P.value;oe.length!==0&&(A.value=(A.value+X+oe.length)%oe.length,z(oe[A.value]))}function E(X){const oe=P.value;return{target:c.line===X,hit:oe.includes(X),active:oe[A.value]===X}}function T(X){return X<1024?`${X} B`:X<1024*1024?`${(X/1024).toFixed(1)} KB`:`${(X/(1024*1024)).toFixed(1)} MB`}const $=V(!1),C=V(!1);function j(){c.file&&fs(w.value).then(X=>{X&&($.value=!0,setTimeout(()=>{$.value=!1},1400))})}function H(){c.file&&fs(c.file.path).then(X=>{X&&(C.value=!0,setTimeout(()=>{C.value=!1},1400))})}const D=V("preview"),M=V("preview"),R=V("fit");function O(X){D.value=X}function U(X){M.value=X}function Z(X){R.value=X}Ke(h,X=>{D.value=X==="html"?"preview":"source",M.value="preview",R.value="fit"});const q=B(()=>{const X=c.file;return!X||h.value!=="image"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:X.mime==="image/svg+xml"?`data:${X.mime};charset=utf-8,${encodeURIComponent(X.content)}`:null}),te=B(()=>{const X=c.file;return!X||h.value!=="video"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),ee=B(()=>{const X=c.file;return!X||h.value!=="pdf"?null:c.downloadUrl?c.downloadUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),J=B(()=>c.file?["",'',``,k.value].join(""):"");function se(X){const oe=[];let F="",K=!1;for(let he=0;hey.value.slice(0,200).map(se));function me(X){return X.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function xe(){const X=c.file;if(!X)return"";const oe=X.languageId?.toLowerCase();return oe||(X.path.split(".").pop()?.toLowerCase()??"")}function Ye(X){const oe=xe();let F=me(X);return h.value==="json"||oe==="json"||oe==="jsonc"?(F=F.replace(/("[^&]*?")(\s*:)/g,'$1$2'),F=F.replace(/(:\s*)("[^&]*?")/g,'$1$2'),F=F.replace(/\b(true|false|null)\b/g,'$1'),F=F.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,'$1$2'),F):h.value==="html"||oe==="html"||oe==="xml"||oe==="svg"?(F=F.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,' $1$2'),F=F.replace(/(".*?")/g,'$1'),F=F.replace(/(<\/?)([A-Za-z][\w:-]*)/g,'$1$2'),F):(F=F.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,'$1'),F=F.replace(/(".*?"|'.*?')/g,'$1'),F=F.replace(/(\/\/.*)$/g,'$1'),F)}function at(X,oe=55){return!X||X.length<=oe?X:"…"+X.slice(X.length-oe+1)}return(X,oe)=>(g(),S("div",{ref_key:"rootRef",ref:p,class:"file-preview"},[e.error&&!e.loading?(g(),S("div",x$e,[b("span",null,I(e.error),1),e.closable?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:oe[0]||(oe[0]=F=>d("close"))},{default:ae(()=>[He(I(v(n)("filePreview.close")),1)]),_:1})):Y("",!0)])):!e.file&&!e.loading?(g(),S("div",S$e,I(v(n)("filePreview.empty")),1)):e.loading?(g(),S("div",C$e,[oe[8]||(oe[8]=b("span",{class:"spinner"},null,-1)),b("span",null,I(v(n)("filePreview.loading")),1)])):e.file?(g(),S(Ce,{key:3},[W(Ca,{wrap:"",title:v(n)("common.preview"),closable:e.closable,"close-label":v(n)("filePreview.close"),onClose:oe[7]||(oe[7]=F=>d("close"))},{default:ae(()=>[W(Cn,{text:e.file.path},{default:ae(()=>[b("span",M$e,I(at(e.file.path)),1)]),_:1},8,["text"]),b("span",A$e,[e.file.lineCount?(g(),S("span",T$e,I(v(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):Y("",!0),b("span",E$e,I(T(e.file.size)),1)]),h.value==="html"?(g(),ue(di,{key:0,"model-value":D.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":O},null,8,["model-value","options"])):Y("",!0),h.value==="markdown"?(g(),ue(di,{key:1,"model-value":M.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":U},null,8,["model-value","options"])):Y("",!0),h.value==="image"?(g(),ue(di,{key:2,"model-value":R.value,size:"sm",options:[{value:"fit",label:v(n)("filePreview.fit")},{value:"actual",label:v(n)("filePreview.actual")}],"onUpdate:modelValue":Z},null,8,["model-value","options"])):Y("",!0),h.value==="text"||h.value==="json"||h.value==="html"||h.value==="csv"?(g(),S("div",I$e,[Jn(b("input",{"onUpdate:modelValue":oe[1]||(oe[1]=F=>_.value=F),class:"fp-search-input",type:"search",placeholder:v(n)("filePreview.search")},null,8,L$e),[[js,_.value]]),_.value.trim()?(g(),S("span",$$e,I(P.value.length),1)):Y("",!0),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.prevMatch"),onClick:oe[2]||(oe[2]=F=>L(-1))},{default:ae(()=>[W(Ee,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.nextMatch"),onClick:oe[3]||(oe[3]=F=>L(1))},{default:ae(()=>[W(Ee,{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):Y("",!0),W(Dt,{size:"sm",class:Be({copied:C.value}),label:C.value?v(n)("filePreview.copied"):v(n)("filePreview.copyPath"),onClick:H},{default:ae(()=>[C.value?(g(),ue(Ee,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ee,{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.editable&&u.value&&e.file!==null?(g(),ue(Dt,{key:4,size:"sm",label:v(n)("editor.title"),onClick:oe[4]||(oe[4]=F=>d("openEditor",e.file.path))},{default:ae(()=>[W(Ee,{name:"pencil",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:5,size:"sm",label:v(n)("filePreview.openInEditor"),onClick:oe[5]||(oe[5]=F=>d("openExternal"))},{default:ae(()=>[W(Ee,{name:"external-link",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:6,size:"sm",label:v(n)("filePreview.reveal"),onClick:oe[6]||(oe[6]=F=>d("reveal"))},{default:ae(()=>[W(Ee,{name:"folder",size:"md"})]),_:1},8,["label"])):Y("",!0),!e.file.isBinary&&h.value!=="image"?(g(),ue(Dt,{key:7,size:"sm",class:Be({copied:$.value}),label:$.value?v(n)("filePreview.copied"):v(n)("filePreview.copy"),onClick:j},{default:ae(()=>[$.value?(g(),ue(Ee,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ee,{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):Y("",!0)]),_:1},8,["title","closable","close-label"]),h.value==="markdown"?(g(),S("div",{key:0,class:Be(["fp-body",{"fp-markdown":M.value==="preview"}])},[M.value==="preview"?(g(),ue(Br,{key:0,text:k.value,"open-file":c.openFile?f:void 0},null,8,["text","open-file"])):(g(),S("div",N$e,[b("div",z$e,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",R$e,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,P$e)],10,B$e))),128))])]))],2)):h.value==="json"?(g(),S("div",F$e,[b("div",j$e,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",H$e,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,D$e)],10,O$e))),128))])])):h.value==="html"?(g(),S("div",V$e,[D.value==="preview"?(g(),S("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:J.value,title:e.file.path},null,8,W$e)):(g(),S("div",q$e,[b("div",U$e,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",K$e,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,G$e)],10,Z$e))),128))])]))])):h.value==="pdf"?(g(),S("div",Y$e,[ee.value?(g(),S("iframe",{key:0,class:"fp-pdf-frame",src:ee.value,title:e.file.path},null,8,X$e)):(g(),S("div",J$e,[b("span",Q$e,I(v(n)("filePreview.pdfNoPreview")),1)]))])):h.value==="csv"?(g(),S("div",eNe,[b("table",tNe,[b("tbody",null,[(g(!0),S(Ce,null,rt(Q.value,(F,K)=>(g(),S("tr",{key:K,class:Be(E(K+1)),"data-line":K+1},[b("th",null,I(K+1),1),(g(!0),S(Ce,null,rt(F,(he,ye)=>(g(),S("td",{key:ye},I(he),1))),128))],10,nNe))),128))])])])):h.value==="image"?(g(),S("div",oNe,[q.value?(g(),S("img",{key:0,src:q.value,alt:e.file.path,class:Be(["fp-image",{actual:R.value==="actual"}])},null,10,sNe)):(g(),S("div",iNe,[b("span",lNe,[W(Ee,{name:"image-off",size:"lg"})]),b("span",rNe,I(v(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:T(e.file.size)})),1)]))])):h.value==="video"?(g(),S("div",aNe,[te.value?(g(),S("video",{key:0,src:te.value,class:"fp-image",controls:"",playsinline:"",preload:"metadata"},null,8,cNe)):(g(),S("div",uNe,[b("span",dNe,[W(Ee,{name:"image-off",size:"lg"})]),b("span",fNe,I(v(n)("filePreview.videoNoPreview",{mime:e.file.mime,size:T(e.file.size)})),1)]))])):h.value==="text"?(g(),S("div",pNe,[b("div",hNe,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",gNe,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,vNe)],10,mNe))),128))])])):(g(),S("div",yNe,[b("div",wNe,[b("span",kNe,[W(Ee,{name:"file-off",size:"lg"})]),b("span",bNe,I(v(n)("filePreview.binaryNoPreview",{mime:e.file.mime||v(n)("filePreview.unknownType"),size:T(e.file.size)})),1)])]))],64)):Y("",!0)],512))}}),xNe=vt(_Ne,[["__scopeId","data-v-97c52e24"]]),SNe={class:"ui-banner__icon","aria-hidden":"true"},CNe={class:"ui-banner__text"},MNe=Je({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[b("span",SNe,[jn(t.$slots,"icon",{},()=>[e.variant==="info"?(g(),ue(Ee,{key:0,name:"info",size:"md"})):(g(),ue(Ee,{key:1,name:"alert-triangle",size:"md"}))],!0)]),b("span",CNe,[jn(t.$slots,"default",{},void 0,!0)])],2))}}),K9=vt(MNe,[["__scopeId","data-v-566a0ac8"]]),B4=Mo.global.t,ANe=40928,TNe=10485760,gn=ds({open:!1,path:null,loading:!1,saving:!1,loadError:null,savingError:null,conflict:!1,dirty:!1,savedAt:null,languageId:void 0});let i1=null,ua=0,ap=null;const eB={getContent:null};function vM(e){eB.getContent=e}function ENe(){return gn}function INe(){ua+=1,gn.path=null,gn.loading=!1,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,i1=null,ap=null}async function tB(e){const t=BNe();if(!t){ua+=1,gn.open=!0,gn.path=e.path,gn.loading=!1,gn.loadError=B4("editor.readOnlyWhileMissingSession"),gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,gn.saving=!1,i1=null,ap=null;return}const n=++ua;gn.open=!0,gn.path=e.path,gn.loading=!0,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,i1=null,ap=t;try{const o=await Ct().readFile(t,{path:e.path,length:TNe,encoding:"utf-8"});if(n!==ua)return;if(o.isBinary||o.encoding!=="utf-8"){gn.loadError=B4("editor.binaryNotEditable");return}i1=o.etag,gn.languageId=o.languageId,R4=o.content,eg=e.line,nB+=1}catch(o){if(n!==ua)return;i1=null,gn.loadError=o instanceof Error&&o.message.length>0?o.message:B4("editor.loadFailed")}finally{n===ua&&(gn.loading=!1)}}let R4,eg,nB=0;function LNe(){if(R4===void 0)return null;const e={content:R4,line:eg,revision:nB};return R4=void 0,eg=void 0,e}function $Ne(){gn.dirty||(gn.dirty=!0,gn.savedAt=null),gn.savingError!==null&&(gn.savingError=null)}function tg(){INe(),gn.open=!1}async function NNe(){gn.path!==null&&await tB({path:gn.path})}async function ng(e){const t=ap,n=gn.path;if(!t||!n||gn.saving||gn.loading||gn.conflict)return;const o=eB.getContent;if(!o)return;const s=++ua;gn.saving=!0,gn.savingError=null;try{const i=await Ct().writeFile(t,{path:n,content:o(),...e?.force===!0||i1===null?{}:{baseEtag:i1}});if(s!==ua)return;i1=i.etag,gn.dirty=!1,gn.conflict=!1,gn.savedAt=Date.now()}catch(i){if(s!==ua)return;if(ol(i)&&i.code===ANe){gn.conflict=!0;return}gn.savingError=i instanceof Error&&i.message.length>0?i.message:B4("editor.loadFailed")}finally{gn.saving=!1}}async function zNe(){gn.conflict=!1,await ng({force:!0})}function BNe(){return oB?.()??null}let oB=null;function RNe(e){oB=e}const G9="pythinker-light",Y9="pythinker-dark";function PNe(e,t){const n=e.trim();if(/^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n))return n;if(/^#[0-9a-f]{3,4}$/i.test(n))return`#${Array.from(n.slice(1),a=>a+a).join("")}`;const o=/^rgba?\(([^)]*)\)$/i.exec(n);if(o===null)return t;const s=o[1].split(/[\s,/]+/).filter(a=>a.length>0);if(s.length<3||s.length>4)return t;const i=s.slice(0,3).map(a=>yM(a,255)),l=s.length===4?yM(s[3],1):255;return i.some(a=>a===null)||l===null?t:`#${[...i,l===255?null:l].filter(a=>a!==null).map(a=>a.toString(16).padStart(2,"0")).join("")}`}function yM(e,t){const n=e.endsWith("%"),o=Number(n?e.slice(0,-1):e);if(!Number.isFinite(o))return null;const s=n?o/100:o/t;return Math.max(0,Math.min(255,Math.round(s*255)))}function Ql(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return PNe(n.length>0?n:t,t)}function FNe(){return{bg:Ql("--p-bg","#ffffff"),surface:Ql("--color-surface","#fafbfc"),text:Ql("--color-text","#14171c"),textMuted:Ql("--color-text-muted","#6b7280"),line:Ql("--color-line","#e7eaee"),accent:Ql("--color-accent","#1783ff"),accentSoft:Ql("--p-accent-soft","#1783ff24"),selection:Ql("--p-selection","#1783ff2e"),danger:Ql("--color-danger","#c0392b"),warning:Ql("--color-warning","#a9610a"),success:Ql("--color-success","#0e7a38")}}function Fd(e){return e.slice(1,7)}function jNe(e,t){const n=FNe();e.editor.defineTheme(t?Y9:G9,{base:t?"vs-dark":"vs",inherit:!0,rules:[{token:"comment",foreground:Fd(n.textMuted),fontStyle:"italic"},{token:"string",foreground:Fd(n.success)},{token:"keyword",foreground:Fd(n.accent)},{token:"number",foreground:Fd(n.warning)},{token:"type",foreground:Fd(n.accent)}],colors:{"editor.background":n.bg,"editor.foreground":n.text,"editorLineNumber.foreground":n.textMuted,"editorLineNumber.activeForeground":n.text,"editor.selectionBackground":n.selection,"editor.lineHighlightBackground":n.surface,"editorCursor.foreground":n.accent,"editorIndentGuide.background1":n.line,"editorIndentGuide.activeBackground1":n.textMuted,"editorWidget.background":n.surface,"editorWidget.border":n.line,"editorError.foreground":n.danger,"editorWarning.foreground":n.warning,"scrollbarSlider.background":n.accentSoft,"scrollbarSlider.hoverBackground":n.accentSoft,"scrollbarSlider.activeBackground":n.accent}})}function wM(e,t){jNe(e,t),e.editor.setTheme(t?Y9:G9)}const P4=Ip();let kM=null;function ONe(){return kM??=Cs(()=>import("./editor.main-yCrGDkyO.js").then(e=>e.b),__vite__mapDeps([10,5,11])).then(e=>{wM(e,P4.value),Ke(P4,()=>wM(e,P4.value))}),kM}function HNe(){return P4.value?Y9:G9}function DNe(){return ONe()}const VNe={class:"monaco-pane"},WNe={key:0,class:"monaco-pane__boot"},qNe=Je({__name:"MonacoPane",props:{path:{},languageId:{}},setup(e){const t=V(null),n=V(!0);let o=null,s=null,i=null,l=null;function r(){window.MonacoEnvironment===void 0&&Cs(()=>import("./editor.worker-CNGv4jKH.js"),[]).then(d=>{window.MonacoEnvironment={getWorker:()=>new d.default}})}function a(d){if(d!==void 0&&new Set(["typescript","javascript","json","css","html","markdown","python","rust","go","yaml"]).has(d))return d;if(d==="typescriptreact"||d==="javascriptreact")return d.replace("react","");if(d==="shellscript")return"shell"}async function c(){if(o===null||s===null)return;const d=LNe(),f=u.path;if(f===null)return;const p=o.Uri.parse(`pythinker://session/${encodeURIComponent(f)}`),h=o.editor.getModel(p);if(l?.dispose(),l=null,i!==null&&i!==h&&i.dispose(),h===null)i=o.editor.createModel(d?.content??"",a(u.languageId),p);else{i=h,d!==null&&i.setValue(d.content);const m=a(u.languageId);m!==void 0&&o.editor.setModelLanguage(i,m)}l=i.onDidChangeContent(()=>$Ne()),s.setModel(i),vM(()=>i?.getValue()??""),d?.line!==void 0&&d.line>0&&(s.revealLineInCenter(d.line),s.setPosition({lineNumber:d.line,column:1}))}In(async()=>{r(),await DNe(),t.value!==null&&(o=await Cs(()=>import("./editor.main-yCrGDkyO.js").then(d=>d.b),__vite__mapDeps([10,5,11])),t.value!==null&&(s=o.editor.create(t.value,{model:null,theme:HNe(),automaticLayout:!0,fontSize:12.5,fontFamily:'"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace',minimap:{enabled:!1},scrollBeyondLastLine:!1,renderLineHighlight:"line",padding:{top:8}}),n.value=!1,await c()))}),En(()=>{vM(null),l?.dispose(),i?.dispose(),s?.dispose(),i=null,l=null,s=null,o=null});const u=e;return Ke(()=>[u.path,u.languageId],async()=>{s!==null&&await c()}),(d,f)=>(g(),S("div",VNe,[n.value?(g(),S("div",WNe,[W(Zo,{size:"sm"})])):Y("",!0),b("div",{ref_key:"rootRef",ref:t,class:"monaco-pane__host"},null,512)]))}}),UNe=vt(qNe,[["__scopeId","data-v-cb5f64f3"]]),ZNe={class:"editor-panel"},KNe={class:"ed-path"},GNe={key:1,class:"ed-saved"},YNe={key:1,class:"ed-saving"},XNe={key:0,class:"editor-panel__empty"},JNe={class:"editor-panel__conflict-actions"},QNe={key:1,class:"editor-panel__save-error"},eze=Je({__name:"EditorPanel",emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=ENe(),s=t;function i(){tg(),s("close")}function l(c){const u=c.split("/").at(-1)??c;return u.length>0?u:c}const r=B(()=>o.savedAt===null||o.dirty?!1:Date.now()-o.savedAt<2e3);function a(c){(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()==="s"&&(c.preventDefault(),ng())}return window.addEventListener("keydown",a),En(()=>window.removeEventListener("keydown",a)),Ke(()=>o.open,c=>{c||s("close")}),(c,u)=>(g(),S("div",ZNe,[W(Ca,{wrap:"",title:v(n)("editor.title"),closable:"","close-label":v(n)("editor.closeEditor"),onClose:i},{default:ae(()=>[v(o).path!==null?(g(),S(Ce,{key:0},[W(Cn,{text:v(o).path},{default:ae(()=>[b("span",KNe,I(l(v(o).path)),1)]),_:1},8,["text"]),v(o).dirty?(g(),ue(Cn,{key:0,text:v(n)("editor.unsavedDot")},{default:ae(()=>[...u[3]||(u[3]=[b("span",{class:"ed-dirty"},null,-1)])]),_:1},8,["text"])):Y("",!0),r.value?(g(),S("span",GNe,I(v(n)("editor.saved")),1)):Y("",!0)],64)):Y("",!0),v(o).path!==null&&v(o).loadError===null?(g(),S(Ce,{key:1},[v(o).conflict?Y("",!0):(g(),ue(Dt,{key:0,size:"sm",label:v(n)("editor.save"),disabled:!v(o).dirty||v(o).saving,onClick:u[0]||(u[0]=d=>v(ng)())},{default:ae(()=>[W(Ee,{name:"check",size:"sm"})]),_:1},8,["label","disabled"])),v(o).saving?(g(),S("span",YNe,[W(Zo,{size:"sm"})])):Y("",!0)],64)):Y("",!0)]),_:1},8,["title","close-label"]),v(o).loadError!==null?(g(),S("div",XNe,[W(jg,null,{default:ae(()=>[b("span",null,I(v(o).loadError),1),W(Nt,{variant:"secondary",size:"sm",onClick:i},{default:ae(()=>[He(I(v(n)("filePreview.close")),1)]),_:1})]),_:1})])):(g(),S(Ce,{key:1},[v(o).conflict?(g(),ue(K9,{key:0,variant:"warning",class:"editor-panel__conflict"},{default:ae(()=>[b("span",null,I(v(n)("editor.conflictText")),1),b("span",JNe,[W(Nt,{variant:"secondary",size:"sm",onClick:u[1]||(u[1]=d=>v(NNe)())},{default:ae(()=>[He(I(v(n)("editor.conflictReload")),1)]),_:1}),W(Nt,{variant:"danger",size:"sm",disabled:v(o).saving,onClick:u[2]||(u[2]=d=>v(zNe)())},{default:ae(()=>[He(I(v(n)("editor.conflictOverwrite")),1)]),_:1},8,["disabled"])])]),_:1})):Y("",!0),v(o).savingError!==null?(g(),S("p",QNe,I(v(o).savingError),1)):Y("",!0),v(o).path!==null?(g(),ue(UNe,{key:2,path:v(o).path,"language-id":v(o).languageId},null,8,["path","language-id"])):Y("",!0)],64))]))}}),tze=vt(eze,[["__scopeId","data-v-579cb4a1"]]),nze={class:"tp"},oze=Je({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);return Ke(()=>n.text,()=>{const l=i.value;!l||!(l.scrollHeight-l.scrollTop-l.clientHeight<24)||yt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(l,r)=>(g(),S("div",nze,[W(Ca,{title:v(s)("common.preview"),subtitle:e.subtitle??v(s)("thinking.panelTitle"),"close-label":v(s)("thinking.close"),onClose:r[0]||(r[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),b("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},I(e.text),513)]))}}),sze=vt(oze,[["__scopeId","data-v-e1ad626c"]]),ize={class:"agent-panel"},lze={key:0,class:"agent-meta"},rze={class:"agent-meta-text"},aze={key:1,class:"agent-prompt"},cze={class:"agent-prompt-bubble"},uze=["aria-expanded"],dze={class:"agent-transcript-inner"},fze={key:0,class:"agent-fallback"},pze={key:0,class:"agent-error"},hze={key:1,class:"fallback-lines"},mze=Je({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=r6(),l=B(()=>i.value?"lg":"sm"),r=V(null),a=V(null),c=V(!0),u=V(!1);let d=null,f=0;const p=B(()=>{const M=new Set,R=[],O=n.member.prompt?.trim(),U=O?`$ ${O}`:void 0;for(const Z of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` +`),n.member.summary]){const q=Z?.trim();!q||M.has(q)||q===U||(M.add(q),R.push(q))}return R}),h=B(()=>p.value.filter(M=>M!==n.member.prompt?.trim()).join(` +`)),m=fn("modelDisplay"),k=fn("subagentEffort"),x=B(()=>[n.member.subagentType,m?.(n.member.model),k?.(n.member.thinkingEffort)].filter(Boolean).join(" · ")||void 0),y=B(()=>n.member.prompt?.trim()??""),w=B(()=>y.value.startsWith("/")&&!y.value.includes(` +`)),_=B(()=>n.turns.length===0&&!n.loading&&(n.loadError||p.value.length>0)),A=V(null),P=V(!0),z=V(!1);function L(){const M=A.value;if(!M){z.value=!1;return}z.value=M.scrollHeight>M.clientHeight+1}function E(){P.value=!P.value,yt(L)}Ke(()=>[n.member.id,y.value],()=>{P.value=!0,yt(L)},{immediate:!0});function T(){const M=r.value;M&&(c.value=M.scrollHeight-M.scrollTop-M.clientHeight<24)}function $(){yt(()=>{const M=r.value;M&&(M.scrollTop=M.scrollHeight)})}function C(){c.value=!0,$()}qn("pinScroll",M=>{const R=r.value;if(!R)return;const O=M.getBoundingClientRect().top;requestAnimationFrame(()=>{R.scrollTop+=M.getBoundingClientRect().top-O})}),Ke(()=>{const M=n.turns.at(-1);return`${n.member.id}:${n.turns.length}:${M?.text.length??0}:${M?.tools?.length??0}`},()=>{c.value&&$()},{immediate:!0});function j(M){const R=M[0].toUpperCase()+M.slice(1);return s(`tools.dynamic_workflow.phase${R}`)}function H(){d!==null&&clearTimeout(d),u.value=!0,d=setTimeout(()=>{d=null,u.value=!1},1400)}async function D(){if(!_.value&&n.turns.length>0){a.value?.copyConversation();return}const M=[n.member.prompt?.trim(),h.value].filter(Boolean).join(` + +`);if(!M)return;const R=++f;!await fs(M)||R!==f||H()}return Ke(()=>n.member.id,()=>{f+=1,d!==null&&clearTimeout(d),d=null,u.value=!1}),En(()=>{d!==null&&clearTimeout(d)}),(M,R)=>(g(),S("div",ize,[W(Ca,{title:e.member.name,"close-label":v(s)("thinking.close"),onClose:R[0]||(R[0]=O=>o("close"))},{default:ae(()=>[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[He(I(j(e.member.phase)),1)]),_:1}),e.member.prompt||h.value||e.turns.length>0?(g(),ue(Dt,{key:0,size:l.value,label:v(s)("tasks.copy"),onClick:D},{default:ae(()=>[W(Ee,{name:u.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","label"])):Y("",!0)]),_:1},8,["title","close-label"]),x.value?(g(),S("div",lze,[b("span",rze,I(x.value),1)])):Y("",!0),y.value?(g(),S("div",aze,[b("div",cze,[b("div",{class:Be(["agent-prompt-wrap",{"is-clamped":P.value}])},[b("div",{ref_key:"promptTextEl",ref:A,class:Be(["agent-prompt-text",{"is-command":w.value}])},[w.value?(g(),S(Ce,{key:0},[He(I(y.value),1)],64)):(g(),ue(Br,{key:1,text:y.value,"open-file":O=>o("openFile",O)},null,8,["text","open-file"]))],2),z.value||!P.value?(g(),S("button",{key:0,type:"button",class:"agent-prompt-toggle","aria-expanded":!P.value,onClick:E},[b("span",null,I(P.value?v(s)("tasks.expand"):v(s)("tasks.collapse")),1),W(Ee,{class:Be(["agent-prompt-toggle-car",{open:!P.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])],8,uze)):Y("",!0)],2)])])):Y("",!0),b("div",{ref_key:"bodyEl",ref:r,class:"agent-transcript",onScrollPassive:T},[b("div",dze,[_.value?(g(),S("div",fze,[e.loadError?(g(),S("div",pze,I(v(s)("tasks.transcriptLoadError")),1)):Y("",!0),p.value.length>0?(g(),S("pre",hze,I(p.value.join(` +`)),1)):Y("",!0)])):(g(),ue(d9,{key:1,ref_key:"chatPaneRef",ref:a,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":c.value,"read-only":"",inspector:"",onLoadOlderMessages:R[1]||(R[1]=O=>o("loadOlderMessages")),onOpenAgent:R[2]||(R[2]=O=>o("openAgent",O)),onOpenFile:R[3]||(R[3]=O=>o("openFile",O)),onOpenMedia:R[4]||(R[4]=O=>o("openMedia",O)),onOpenTurnDiff:R[5]||(R[5]=O=>o("openTurnDiff",O)),onCopyConversationCopied:H},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))]),W(qi,{name:"agent-jump"},{default:ae(()=>[c.value?Y("",!0):(g(),S("button",{key:0,type:"button",class:"agent-jump-btn",onClick:C},[W(Ee,{class:"agent-jump-car",name:"arrow-down",size:"sm","aria-hidden":"true"}),b("span",null,I(v(s)("conversation.backToBottom")),1)]))]),_:1})],544)]))}}),gze=vt(mze,[["__scopeId","data-v-9ea90d44"]]),vze={class:"tdp"},yze={class:"tdp-body"},wze={key:1,class:"tdp-output"},kze={key:2,class:"tdp-empty"},bze=Je({__name:"ToolDiffPanel",props:{target:{}},emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>(g(),S("div",vze,[W(Ca,{title:e.target.title,subtitle:e.target.path,"close-label":v(o)("thinking.close"),onClose:i[0]||(i[0]=l=>n("close"))},null,8,["title","subtitle","close-label"]),b("div",yze,[e.target.lines&&e.target.lines.length>0?(g(),ue(lE,{key:0,lines:e.target.lines},null,8,["lines"])):e.target.output&&e.target.output.length>0?(g(),S("div",wze,[(g(!0),S(Ce,null,rt(e.target.output,(l,r)=>(g(),S("div",{key:r},I(l),1))),128))])):(g(),S("div",kze,I(v(o)("diff.noDiff")),1))])]))}}),_ze=vt(bze,[["__scopeId","data-v-8b9af3ab"]]),xze={class:"hl-body"},Sze={key:0,class:"hl-gutter"},Cze={class:"hl-sign"},Mze={class:"hl-text"},Aze=["data-line"],Tze={key:0,class:"hl-gutter"},Eze={class:"hl-text"},Ize=200,Lze=Je({__name:"HighlightedCode",props:{code:{},lines:{},path:{},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{},responsiveWrap:{type:Boolean,default:!1}},setup(e){const t={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},n={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function o(D){const M=D?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!M)return;const R=n[M];if(R)return R;const O=M.lastIndexOf(".");if(!(O<=0))return t[M.slice(O+1)]}function s(D){return D.split(/\r?\n/)}function i(D){const M={};D.color&&(M.color=D.color);const R=D.fontStyle??0;return R&1&&(M.fontStyle="italic"),R&2&&(M.fontWeight="var(--weight-semibold)"),R&4&&(M.textDecoration="underline"),M}const l=e,r=Ip(),a=B(()=>l.lines!==void 0),c=B(()=>(l.lines??[]).some(D=>D.oldNo!==void 0)),u=B(()=>(l.lines??[]).some(D=>D.newNo!==void 0)),d=B(()=>l.lineNumbers===!0&&a.value),f=B(()=>Array.isArray(l.lineNumbers)?l.lineNumbers:null),p=B(()=>d.value?Number(c.value)+Number(u.value):f.value===null?0:1),h=B(()=>Array.isArray(l.code)?l.code:s(l.code??"")),m=B(()=>{const D=l.lines;return D?l.fullTexts?l.fullTexts:{before:D.filter(M=>M.oldNo!==void 0).map(M=>M.text).join(` +`),after:D.filter(M=>M.newNo!==void 0).map(M=>M.text).join(` +`)}:null}),k=V(null),x=V(null),y=V(null);function w(){k.value=null,x.value=null,y.value=null}let _=0,A=0,P=null,z=null;async function L(){const D=++_;A=Date.now();const M=o(l.path);if(!M){D===_&&w();return}try{z??=Cs(()=>import("./index-C_5a8vkb.js").then(Z=>Z.i),[]).then(Z=>Z.codeToTokens);const R=await z,O=r.value?"github-dark":"github-light",U=m.value;if(U){const[Z,q]=await Promise.all([U.before?R(U.before,{lang:M,theme:O}):null,U.after?R(U.after,{lang:M,theme:O}):null]);if(D!==_)return;x.value=Z?.tokens??null,y.value=q?.tokens??null}else{const Z=h.value.length>0?await R(h.value.join(` +`),{lang:M,theme:O}):null;if(D!==_)return;k.value=Z?.tokens??null}}catch{D===_&&w()}}function E(){if(P!==null)return;const D=Math.max(0,Ize-(Date.now()-A));P=setTimeout(()=>{P=null,L()},D)}Ke([()=>h.value.join(` +`),()=>m.value?.before??null,()=>m.value?.after??null],E),Ke([()=>l.path,r,()=>l.fullTexts],()=>{_++,w(),E()}),In(()=>void L()),vo(()=>{_++,P!==null&&clearTimeout(P)});const T=B(()=>{const D=new Map;let M=0;for(const R of l.lines??[])R.oldNo!==void 0&&D.set(R.oldNo,M++);return D}),$=B(()=>{const D=new Map;let M=0;for(const R of l.lines??[])R.newNo!==void 0&&D.set(R.newNo,M++);return D});function C(D){if(D.type==="del"){if(D.oldNo===void 0)return null;const R=l.fullTexts?D.oldNo-1:T.value.get(D.oldNo);return R===void 0?null:x.value?.[R]??null}if(D.newNo===void 0)return null;const M=l.fullTexts?D.newNo-1:$.value.get(D.newNo);return M===void 0?null:y.value?.[M]??null}function j(D){return D.type==="add"?"+":D.type==="del"?"-":" "}const H=B(()=>{let D=0;if(f.value)for(const M of f.value)M>D&&(D=M);else for(const M of l.lines??[])M.oldNo!==void 0&&M.oldNo>D&&(D=M.oldNo),M.newNo!==void 0&&M.newNo>D&&(D=M.newNo);return Math.max(4,String(D).length)});return(D,M)=>(g(),S("div",{class:Be(["hl-code",{gutter:d.value,"plain-pad":!a.value&&f.value===null,framed:e.framed,"responsive-wrap":e.responsiveWrap,"one-gutter":p.value===1,"two-gutters":p.value===2}]),style:Gt({"--gutter-ch":`${H.value}ch`})},[b("div",xze,[a.value?(g(!0),S(Ce,{key:0},rt(e.lines,(R,O)=>(g(),S("div",{key:O,class:Be(["hl-row",`row-${R.type}`])},[d.value?(g(),S(Ce,{key:0},[c.value?(g(),S("span",Sze,I(R.oldNo??""),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Be(["hl-gutter new",{offset:c.value}])},I(R.newNo??""),3)):Y("",!0)],64)):Y("",!0),b("span",Cze,I(j(R)),1),b("span",Mze,[C(R)?(g(!0),S(Ce,{key:0},rt(C(R),(U,Z)=>(g(),S("span",{key:Z,style:Gt(i(U))},I(U.content),5))),128)):(g(),S(Ce,{key:1},[He(I(R.text),1)],64))])],2))),128)):(g(!0),S(Ce,{key:1},rt(h.value,(R,O)=>(g(),S("div",{key:O,class:Be(["hl-row",e.lineClass?e.lineClass(f.value?.[O]??-1):void 0]),"data-line":f.value?f.value[O]:void 0},[f.value?(g(),S("span",Tze,I(f.value[O]??""),1)):Y("",!0),b("span",Eze,[k.value&&k.value[O]?(g(!0),S(Ce,{key:0},rt(k.value[O],(U,Z)=>(g(),S("span",{key:Z,style:Gt(i(U))},I(U.content),5))),128)):(g(),S(Ce,{key:1},[He(I(R),1)],64))])],10,Aze))),128))])],6))}}),sB=vt(Lze,[["__scopeId","data-v-4b6e3ce1"]]),$ze={class:"turn-diff-panel"},Nze={class:"tdp-body"},zze={class:"tdp-file-head"},Bze={class:"tdp-path"},Rze={key:0,class:"tdp-diff"},Pze={key:1,class:"tdp-unavailable"},Fze=Je({__name:"TurnDiffPanel",props:{changes:{},cwd:{}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(a,c){if(!c)return null;const u=y=>y.replaceAll("\\","/"),d=u(a);let f=u(c);f.length>1&&(f=f.replace(/\/+$/,""));const p=/^[a-z]:\//i.test(f)||/^[a-z]:\//i.test(d)||f.startsWith("//")||d.startsWith("//"),h=p?f.toLowerCase():f,m=p?d.toLowerCase():d,k=h.endsWith("/")?h:`${h}/`;if(m!==h&&!m.startsWith(k))return null;const x=m===h?"":d.slice(k.length);return x.split("/").includes("..")?null:x||null}function l(a,c=48){return!a||a.length<=c?a:"…"+a.slice(a.length-c+1)}function r(a){return i(a.path,n.cwd)??a.path}return(a,c)=>(g(),S("div",$ze,[W(Ca,{title:v(s)("conversation.turnFiles.diffTitle"),onClose:c[0]||(c[0]=u=>o("close"))},null,8,["title"]),b("div",Nze,[(g(!0),S(Ce,null,rt(e.changes,u=>(g(),S("section",{key:u.path,class:"tdp-file"},[b("div",zze,[W(Cn,{text:u.path},{default:ae(()=>[b("span",Bze,I(l(r(u))),1)]),_:2},1032,["text"]),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[He(I(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]),u.diff?(g(),S("div",Rze,[W(sB,{lines:u.diff,path:u.path,framed:!1},null,8,["lines","path"])])):(g(),S("div",Pze,[b("p",null,I(v(s)("conversation.turnFiles.diffUnavailable")),1),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[He(I(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]))]))),128))])]))}}),jze=vt(Fze,[["__scopeId","data-v-67a3cc7e"]]),Oze=["aria-label"],Hze=Je({__name:"ThinkingIndicator",props:{size:{default:"md"},fast:{type:Boolean},label:{default:"Waiting for response…"}},setup(e){const t=af.length*yu;function n(o){return{"--thinking-frame-delay":`${o*yu-t}ms`,"--thinking-frame-fast-delay":`${o*(yu/2)-t/2}ms`}}return(o,s)=>(g(),S("span",{class:Be(["ui-thinking-indicator",[`ui-thinking-indicator--${e.size}`,{"ui-thinking-indicator--fast":e.fast}]]),"aria-label":e.label,role:"status"},[(g(!0),S(Ce,null,rt(v(af),(i,l)=>(g(),S("span",{key:i,class:"ui-thinking-indicator__frame",style:Gt(n(l)),"aria-hidden":"true"},I(i),5))),128))],10,Oze))}}),Dze=vt(Hze,[["__scopeId","data-v-ed8aef9e"]]),Vze={class:"sc"},Wze={key:0,class:"sc-empty"},qze={key:2,class:"sc-loading","aria-hidden":"true"},Uze={class:"sc-composer"},Zze=["placeholder"],Kze=["disabled"],Gze=Je({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),l=B(()=>o.turns.find(_=>_.role==="user")?.text?.trim()??""),r=B(()=>o.title?.trim()||i("sideChat.title")),a=B(()=>o.subtitle?.trim()?o.subtitle.trim():l.value||i("sideChat.subtitle")),c=V(""),u=V(null),d=V(null);function f(){const w=c.value.trim();w&&(s("send",w),c.value="",yt(()=>{u.value&&(u.value.style.height="auto"),p()}))}function p(){const w=d.value;w&&(w.scrollTop=w.scrollHeight)}const h=B(()=>{const w=o.turns;if(w.length===0)return"0";const _=w.at(-1),A=_.thinking?.length??0,P=_.tools?.reduce((z,L)=>z+L.name.length+(L.arg?.length??0)+(L.output?.join("").length??0),0)??0;return`${w.length}:${_.text.length}:${A}:${P}`});Ke(h,async()=>{!o.running&&!o.sending||(await yt(),p())});const m=B(()=>o.sending?o.turns.at(-1)?.role==="user":!1);function k(w){w.key==="Enter"&&!w.shiftKey&&!w.isComposing&&(w.preventDefault(),f())}function x(){const w=u.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}function y(){u.value?.focus()}return t({focusInput:y}),(w,_)=>(g(),S("div",Vze,[W(Ca,{title:r.value,subtitle:a.value,"close-label":v(i)("thinking.close"),onClose:_[0]||(_[0]=A=>s("close"))},null,8,["title","subtitle","close-label"]),b("div",{ref_key:"bodyRef",ref:d,class:"sc-body"},[e.turns.length===0?(g(),S("div",Wze,I(v(i)("sideChat.empty")),1)):(g(),ue(d9,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running},null,8,["turns","turn-active","working"])),m.value?(g(),S("div",qze,[W(Dze)])):Y("",!0)],512),b("div",Uze,[Jn(b("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":_[1]||(_[1]=A=>c.value=A),class:"sc-input",rows:"1",placeholder:v(i)("sideChat.placeholder"),onInput:x,onKeydown:k},null,40,Zze),[[js,c.value]]),W(Cn,{text:v(i)("sideChat.send")},{default:ae(()=>[b("button",{type:"button",class:"sc-send",disabled:!c.value.trim(),onClick:f},[W(Ee,{name:"arrow-right",size:"sm"})],8,Kze)]),_:1},8,["text"])])]))}}),Yze=vt(Gze,[["__scopeId","data-v-130e8cd2"]]),Xze={class:"changes-pane"},Jze={class:"dv-path"},Qze={class:"diff-head"},eBe={class:"back-label"},tBe={key:"loading",class:"empty-state diff-loading"},nBe={key:"empty",class:"empty-state"},oBe={class:"dv-change-count"},sBe={class:"ch-head"},iBe={class:"br-label"},lBe={class:"br-name"},rBe={key:0,class:"sync-info"},aBe={key:0,class:"ahead"},cBe={key:0,class:"behind"},uBe={key:1,class:"empty-head"},dBe={key:0,class:"ch-list"},fBe=["onClick"],pBe={class:"fpath"},hBe={key:1,class:"ch-list ch-tree"},mBe={class:"tree-list"},gBe=["onClick"],vBe={class:"tree-name"},yBe=["onClick"],wBe={class:"tree-name"},kBe={key:2,class:"empty-state"},bBe={key:3,class:"empty-state"},_Be=Je({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{default:null},emptyFile:{type:Boolean,default:!1},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(C){const j=C.toLowerCase();return j==="modified"?"modified":j==="added"?"added":j==="deleted"?"deleted":j==="renamed"?"renamed":j==="untracked"?"untracked":j==="conflicted"?"conflicted":j==="ignored"?"ignored":j==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function r(C){return l[i(C)]??"?"}function a(C,j=60){return C.length<=j?C:"…"+C.slice(C.length-j+1)}const c=B(()=>o.gitInfo!==null),u=B(()=>o.changes.length>0),d=B(()=>(o.selectedDiffPath??null)!==null),f=B(()=>o.mode==="detail"||o.mode==="full"&&d.value),p=B(()=>o.fileDiff??[]),h=B(()=>o.fileDiffLoading===!0),m=V(null);Ke([()=>o.selectedDiffPath,h],([,C])=>{!C&&m.value&&(m.value.scrollLeft=0)},{flush:"post"});function k(C){s("open",C)}function x(){s("back")}function y(){s("close")}const w=V("list");function _(C){w.value=C}function A(C){const j={children:[]},H=[...C].sort((D,M)=>D.path.localeCompare(M.path));for(const D of H){const M=D.path.split("/");let R=j;for(let O=0;Oee.name===U&&ee.kind===(Z?"file":"folder"));te||(te={name:U,path:q,kind:Z?"file":"folder",status:Z?D.status:void 0,children:[]},R.children.push(te)),R=te}}return j.children}const P=B(()=>A(o.changes)),z=V(new Set);function L(C){return!z.value.has(C)}const E=B(()=>{const C=[];function j(H,D){for(const M of H)C.push({node:M,depth:D}),M.kind==="folder"&&L(M.path)&&j(M.children,D+1)}return j(P.value,0),C});function T(C){const j=new Set(z.value);j.has(C.path)?j.delete(C.path):j.add(C.path),z.value=j}function $(C){return`${16+C*16}px`}return(C,j)=>(g(),S("div",Xze,[f.value?(g(),S(Ce,{key:0},[W(Ca,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[W(Cn,{text:e.selectedDiffPath??""},{default:ae(()=>[b("span",Jze,I(a(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),b("div",Qze,[e.hideBack?Y("",!0):(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:x},{default:ae(()=>[j[0]||(j[0]=b("span",{"aria-hidden":"true"},"←",-1)),b("span",eBe,I(v(n)("diff.back")),1)]),_:1}))]),W(qi,{name:"diff-content",mode:"out-in"},{default:ae(()=>[h.value?(g(),S("div",tBe,[W(Zo,{size:"md"}),b("span",null,I(v(n)("diff.loading")),1)])):p.value.length>0?(g(),S("div",{key:"lines",ref_key:"diffScrollRef",ref:m,class:"dv-lines-wrap"},[W(sB,{lines:p.value,path:e.selectedDiffPath??void 0,"line-numbers":!0,framed:!1,"full-texts":e.fullTexts,"responsive-wrap":""},null,8,["lines","path","full-texts"])],512)):(g(),S("div",nBe,I(e.emptyFile?v(n)("diff.emptyFile"):v(n)("diff.noDiff")),1))]),_:1})],64)):(g(),S(Ce,{key:1},[W(Ca,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[b("span",oBe,I(v(n)(e.changes.length===1?"diff.fileCountOne":"diff.fileCountOther",{number:e.changes.length})),1),W(di,{"model-value":w.value,size:"sm",options:[{value:"list",label:v(n)("diff.list")},{value:"tree",label:v(n)("diff.tree")}],"onUpdate:modelValue":_},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),b("div",sBe,[c.value?(g(),S(Ce,{key:0},[b("span",iBe,I(v(n)("diff.branch")),1),b("span",lBe,I(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(g(),S("span",rBe,[W(Cn,{text:v(n)("diff.aheadTitle")},{default:ae(()=>[e.gitInfo.ahead>0?(g(),S("span",aBe,"↑"+I(e.gitInfo.ahead),1)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:v(n)("diff.behindTitle")},{default:ae(()=>[e.gitInfo.behind>0?(g(),S("span",cBe,"↓"+I(e.gitInfo.behind),1)):Y("",!0)]),_:1},8,["text"])])):Y("",!0)],64)):(g(),S("span",uBe,I(v(n)("diff.empty")),1))]),u.value&&w.value==="list"?(g(),S("div",dBe,[(g(!0),S(Ce,null,rt(e.changes,H=>(g(),ue(Cn,{key:H.path,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"ch-row",onClick:D=>k(H.path)},[b("span",{class:Be(["badge",i(H.status)])},I(r(H.status)),3),b("span",pBe,I(a(H.path)),1)],8,fBe)]),_:2},1032,["text"]))),128))])):u.value&&w.value==="tree"?(g(),S("div",hBe,[b("ul",mBe,[(g(!0),S(Ce,null,rt(E.value,({node:H,depth:D})=>(g(),S("li",{key:H.path,class:"tree-node"},[H.kind==="folder"?(g(),S("button",{key:0,type:"button",class:"tree-row tree-folder",style:Gt({paddingLeft:$(D)}),onClick:M=>T(H)},[W(Ee,{class:"tree-icon",name:"folder-solid",size:"sm"}),b("span",vBe,I(H.name),1)],12,gBe)):(g(),ue(Cn,{key:1,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"tree-row tree-file",style:Gt({paddingLeft:$(D)}),onClick:M=>k(H.path)},[b("span",{class:Be(["badge",i(H.status)])},I(r(H.status)),3),b("span",wBe,I(H.name),1)],12,yBe)]),_:2},1032,["text"]))]))),128))])])):c.value?(g(),S("div",kBe,I(v(n)("diff.clean")),1)):(g(),S("div",bBe,I(v(n)("diff.empty")),1))],64))]))}}),xBe=vt(_Be,[["__scopeId","data-v-811473b6"]]),SBe={class:"panel-tab-bar"},CBe=["data-tab-id"],MBe=["aria-selected","tabindex","title","onClick","onKeydown"],ABe={class:"ptb-t"},TBe=["aria-label","onClick"],EBe={class:"ptb-tail"},IBe=["disabled"],LBe=["disabled"],$Be=Je({__name:"PanelTabBar",props:{tabs:{},activeId:{},expanded:{type:Boolean},mobile:{type:Boolean},canOpenDiff:{type:Boolean},canOpenSideChat:{type:Boolean}},emits:["activate","close","toggleExpanded","hide","openDiff","openSideChat"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(null),a=V(!1);Ke(()=>n.activeId,async m=>{if(!m)return;await yt(),Array.from(i.value?.querySelectorAll("[data-tab-id]")??[]).find(x=>x.dataset.tabId===m)?.scrollIntoView?.({inline:"nearest",block:"nearest"})});function c(m){Array.from(i.value?.querySelectorAll(".ptb-tab-main")??[])[m]?.focus()}function u(m,k){if(n.tabs.length===0)return;let x;m.key==="ArrowRight"?x=(k+1)%n.tabs.length:m.key==="ArrowLeft"?x=(k-1+n.tabs.length)%n.tabs.length:m.key==="Home"?x=0:m.key==="End"&&(x=n.tabs.length-1),x!==void 0&&(m.preventDefault(),o("activate",n.tabs[x].id),yt(()=>c(x)))}function d(){a.value=!1,document.removeEventListener("pointerdown",f,!0)}function f(m){const k=m.target;r.value?.contains(k)||l.value?.el?.contains(k)||d()}function p(){if(a.value){d();return}a.value=!0,document.addEventListener("pointerdown",f,!0),yt(()=>r.value?.querySelector("button:not(:disabled)")?.focus())}function h(m){d(),o(m==="diff"?"openDiff":"openSideChat")}return En(d),(m,k)=>(g(),S("header",SBe,[b("div",{ref_key:"tabsRef",ref:i,class:"ptb-tabs",role:"tablist"},[(g(!0),S(Ce,null,rt(e.tabs,(x,y)=>(g(),S("div",{key:x.id,class:Be(["ptb-tab",{on:x.id===e.activeId}]),"data-tab-id":x.id},[b("button",{type:"button",class:"ptb-tab-main",role:"tab","aria-selected":x.id===e.activeId,tabindex:x.id===e.activeId?0:-1,title:x.title,onClick:w=>o("activate",x.id),onKeydown:w=>u(w,y)},[W(Ee,{name:x.icon,size:"sm"},null,8,["name"]),b("span",ABe,I(x.title),1)],40,MBe),W(Cn,{text:v(s)("panel.closeTab")},{default:ae(()=>[b("button",{type:"button",class:"ptb-x","aria-label":v(s)("panel.closeTab"),onClick:xt(w=>o("close",x.id),["stop"])},[W(Ee,{name:"close",size:"sm"})],8,TBe)]),_:2},1032,["text"])],10,CBe))),128))],512),b("div",EBe,[W(Dt,{ref_key:"addButtonRef",ref:l,size:"sm",label:v(s)("panel.newTab"),"aria-haspopup":"menu","aria-expanded":a.value,onClick:p,onKeydown:[go(xt(p,["prevent"]),["down"]),go(xt(p,["prevent"]),["up"])]},{default:ae(()=>[W(Ee,{name:"plus",size:"sm"})]),_:1},8,["label","aria-expanded","onKeydown"]),e.tabs.length>0&&!e.mobile?(g(),ue(Dt,{key:0,size:"sm",label:e.expanded?v(s)("panel.collapse"):v(s)("panel.expand"),onClick:k[0]||(k[0]=x=>o("toggleExpanded"))},{default:ae(()=>[W(Ee,{name:e.expanded?"collapse":"expand",size:"sm"},null,8,["name"])]),_:1},8,["label"])):Y("",!0),W(Dt,{class:"ptb-hide",size:"sm",label:v(s)("panel.hide"),onClick:k[1]||(k[1]=x=>o("hide"))},{default:ae(()=>[W(Ee,{name:e.mobile?"close":"panel-collapse-right",size:"sm"},null,8,["name"])]),_:1},8,["label"]),a.value?(g(),S("div",{key:1,ref_key:"addMenuRef",ref:r,class:"panel-add-menu",role:"menu",onKeydown:k[4]||(k[4]=go(xt(x=>{d(),l.value?.el?.focus()},["prevent"]),["esc"]))},[b("button",{type:"button",role:"menuitem",disabled:!e.canOpenSideChat,onClick:k[2]||(k[2]=x=>h("sideChat"))},[W(Ee,{name:"message",size:"sm"}),b("span",null,I(v(s)("sideChat.title")),1)],8,IBe),b("button",{type:"button",role:"menuitem",disabled:!e.canOpenDiff,onClick:k[3]||(k[3]=x=>h("diff"))},[W(Ee,{name:"git-fork",size:"sm"}),b("span",null,I(v(s)("panel.tabs.diff")),1)],8,LBe)],544)):Y("",!0)])]))}}),NBe=vt($Be,[["__scopeId","data-v-da364eda"]]);function iB(e,t){let n=null;In(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,yt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),vo(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const zBe={class:"search-wrap"},BBe={key:0,class:"tab-strip"},RBe={key:1,class:"state-row"},PBe={key:2,class:"state-row unavail"},FBe={key:3,class:"model-list"},jBe=["aria-selected","onClick","onMouseenter"],OBe={class:"check"},HBe={class:"model-main"},DBe={class:"model-name"},VBe={class:"model-id"},WBe={key:0,class:"caps"},qBe={class:"model-provider"},UBe={class:"model-ctx"},ZBe={key:0,class:"empty"},KBe={class:"footer-hint"},GBe=Je({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=$t(),o=r6(),s=B(()=>o.value?wu:Z0),i=B(()=>o.value?{modelValue:!0,title:n("model.title"),closeOnEsc:!1}:{open:!0,title:n("model.title"),closeOnEsc:!1,size:"xl",height:"fixed"}),l=e,r=t,a=B(()=>new Set(l.starredIds??[]));function c(L){return a.value.has(L)}const u=V(""),d=V(null),f=V(null),p=V("all");iB(f,d);const h=B(()=>{const L=new Set,E=[{id:"all",label:n("model.allTab")}];for(const T of l.models)L.has(T.provider)||(L.add(T.provider),E.push({id:T.provider,label:T.provider}));return E}),m=B(()=>{const L=u.value.toLowerCase().trim(),E=l.models.filter(T=>{if(p.value!=="all"&&T.provider!==p.value)return!1;const $=(T.displayName??T.model).toLowerCase().includes(L),C=T.provider.toLowerCase().includes(L),j=T.id.toLowerCase().includes(L);return!L||$||C||j});return p.value!=="all"?E:E.sort((T,$)=>{const C=c(T.id)?1:0;return(c($.id)?1:0)-C})}),k=B(()=>m.value),x=V(0);Ke([u,p],()=>{x.value=0}),Ke(h,L=>{L.some(E=>E.id===p.value)||(p.value="all")}),Ke(k,L=>{x.value=Math.min(x.value,Math.max(L.length-1,0))});function y(L){if(L.key==="Escape"){r("close");return}if(L.key==="ArrowDown")L.preventDefault(),x.value=Math.min(x.value+1,k.value.length-1);else if(L.key==="ArrowUp")L.preventDefault(),x.value=Math.max(x.value-1,0);else if(L.key==="Enter"){const E=k.value[x.value];E&&r("select",E.id)}}In(()=>{document.addEventListener("keydown",y)}),En(()=>{document.removeEventListener("keydown",y)});function w(L){r("select",L)}function _(L){return k.value.indexOf(L)}function A(L){p.value=L}const P={image_in:"imageIn",imageIn:"imageIn",image_out:"imageOut",imageOut:"imageOut",vision:"vision",video_in:"videoIn",videoIn:"videoIn",audio_in:"audioIn",audioIn:"audioIn",audio_out:"audioOut",audioOut:"audioOut",thinking:"thinking",always_thinking:"alwaysThinking",alwaysThinking:"alwaysThinking",adaptive_thinking:"adaptiveThinking",adaptiveThinking:"adaptiveThinking",tool_use:"toolUse",toolUse:"toolUse",fast_mode:"fastMode",fastMode:"fastMode"};function z(L){const E=P[L];return E?n(`model.capabilities.${E}`):n("model.capabilities.unknown",{capability:L})}return(L,E)=>(g(),ue(cs(s.value),io(i.value,{onClose:E[1]||(E[1]=T=>r("close"))}),{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:f,class:Be(["mp",{"mp--sheet":v(o)}])},[b("div",zBe,[W(us,{ref_key:"searchRef",ref:d,modelValue:u.value,"onUpdate:modelValue":E[0]||(E[0]=T=>u.value=T),placeholder:v(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:""},null,8,["modelValue","placeholder"])]),h.value.length>1?(g(),S("div",BBe,[(g(!0),S(Ce,null,rt(h.value,T=>(g(),ue(Nt,{key:T.id,variant:T.id===p.value?"secondary":"ghost",size:"sm",onClick:$=>A(T.id)},{default:ae(()=>[He(I(T.label),1)]),_:2},1032,["variant","onClick"]))),128))])):Y("",!0),e.loading?(g(),S("div",RBe,[W(Zo,{size:"sm"}),b("span",null,I(v(n)("model.loading")),1)])):e.unavailable?(g(),S("div",PBe,[W(Ee,{name:"alert-triangle",size:"lg"}),b("span",null,I(v(n)("model.unavailable")),1)])):(g(),S("div",FBe,[(g(!0),S(Ce,null,rt(k.value,T=>(g(),S("div",{key:T.id,class:Be(["model-row",{"is-current":T.id===e.current,"is-selected":_(T)===x.value}]),role:"option","aria-selected":T.id===e.current,onClick:$=>w(T.id),onMouseenter:$=>x.value=_(T)},[b("span",OBe,[T.id===e.current?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",HBe,[b("span",DBe,I(T.displayName??T.model),1),b("span",VBe,I(T.id),1),T.capabilities&&T.capabilities.length>0?(g(),S("span",WBe,[(g(!0),S(Ce,null,rt(T.capabilities,$=>(g(),ue(Fl,{key:$,variant:"info",size:"sm"},{default:ae(()=>[He(I(z($)),1)]),_:2},1024))),128))])):Y("",!0)]),b("span",qBe,I(T.provider),1),b("span",UBe,I(v(n)("model.contextSuffix",{size:v(ba)(T.maxContextSize)})),1),W(Dt,{size:"sm",label:c(T.id)?v(n)("model.unstarTitle"):v(n)("model.starTitle"),onClick:xt($=>r("toggle-star",T.id),["stop"])},{default:ae(()=>[c(T.id)?(g(),ue(Ee,{key:0,name:"star",size:"md"})):(g(),ue(Ee,{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["label","onClick"])],42,jBe))),128)),k.value.length===0&&!e.loading&&!e.unavailable?(g(),S("div",ZBe,I(l.models.length===0?v(n)("model.emptyNoModels"):v(n)("model.emptyNoMatch")),1)):Y("",!0)])),b("div",KBe,I(v(n)("model.footerHint")),1)],2)]),_:1},16))}}),YBe=vt(GBe,[["__scopeId","data-v-466b8fec"]]),XBe=["aria-checked","aria-label","disabled"],JBe=Je({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("button",{class:Be(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[b("span",{class:"ui-switch__thumb"},null,-1)])],10,XBe))}}),wi=vt(JBe,[["__scopeId","data-v-d7337ade"]]),QBe=["value","disabled"],eRe=Je({__name:"Select",props:{modelValue:{},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(s){n("update:modelValue",s.target.value)}return(s,i)=>(g(),S("select",{class:Be(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error}]]),value:e.modelValue,disabled:e.disabled,onChange:o},[jn(s.$slots,"default",{},void 0,!0)],42,QBe))}}),F4=vt(eRe,[["__scopeId","data-v-77d887db"]]),tRe=["pythinker","openai","openai_responses","anthropic","google-genai","vertexai"],nRe=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function og(){return{model:"",maxContextSize:"",displayName:""}}function bM(){return{id:"",type:"openai",apiKey:"",baseUrl:"",models:[og()]}}function lB(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:""})}return n}function oRe(e,t={}){const n={models:{}},o=e.id.trim();return o===""?n.id="idRequired":nRe.test(o)||(n.id="idInvalid"),t.apiKey===!0&&e.apiKey.trim()===""&&(n.apiKey="apiKeyRequired"),t.baseUrl===!0&&e.baseUrl.trim()===""&&(n.baseUrl="baseUrlRequired"),e.models.length===0&&(n.modelsEmpty="modelRequired"),e.models.forEach((s,i)=>{const l={};s.model.trim()===""&&(l.model="modelRequired");const r=s.maxContextSize.trim(),a=Number(r);r===""?l.maxContextSize="contextSizeRequired":(!/^\d+$/.test(r)||!Number.isSafeInteger(a)||a<1)&&(l.maxContextSize="contextSizeInvalid"),(l.model!==void 0||l.maxContextSize!==void 0)&&(n.models[i]=l)}),n}function sRe(e){return e.id!==void 0||e.apiKey!==void 0||e.baseUrl!==void 0||e.modelsEmpty!==void 0||Object.keys(e.models).length>0}function rB(e){return e.map(t=>({model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),displayName:t.displayName.trim()||void 0}))}function iRe(e){return{id:e.id.trim(),type:e.type,apiKey:e.apiKey.trim()||void 0,baseUrl:e.baseUrl.trim()||void 0,models:rB(e.models)}}function lRe(e,t,n,o){const s=rB(e.models),i=o?.includes("/")?o.slice(o.indexOf("/")+1):o;return{newId:e.id.trim()!==t.id?e.id.trim():void 0,type:e.type,apiKey:e.apiKey.trim()||(n?"":void 0),baseUrl:e.baseUrl.trim()||void 0,defaultModel:i&&s.some(l=>l.model===i)?i:void 0,models:s}}const rRe=Je({__name:"Skeleton",props:{width:{},height:{},circle:{type:Boolean}},setup(e){return(t,n)=>(g(),S("span",{class:Be(["ui-skeleton",{"is-circle":e.circle}]),style:Gt({width:e.width??"100%",height:e.height??"12px"}),"aria-hidden":"true"},null,6))}}),_M=vt(rRe,[["__scopeId","data-v-f4989189"]]),aRe={key:0,class:"ui-field__label"},cRe={key:1,class:"ui-field__error"},uRe={key:2,class:"ui-field__hint"},dRe=Je({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-field",{"has-error":!!e.error}])},[e.label?(g(),S("label",aRe,I(e.label),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0),e.error?(g(),S("span",cRe,I(e.error),1)):e.hint?(g(),S("span",uRe,I(e.hint),1)):Y("",!0)],2))}}),Ir=vt(dRe,[["__scopeId","data-v-bd93f701"]]),fRe={class:"provider-form__fields"},pRe=["value"],hRe={class:"provider-form__key"},mRe={class:"provider-form__models-head"},gRe={class:"provider-form__models"},vRe={class:"provider-form__model provider-form__model--head"},yRe={key:0,class:"provider-form__row-error",role:"alert"},wRe={key:0,class:"provider-form__error",role:"alert"},kRe={class:"provider-form__actions"},bRe=Je({__name:"ProviderForm",props:{mode:{},provider:{},config:{}},emits:["dirtyChange","saved","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=bM(),l=ds(i),r=V({models:{}}),a=V(""),c=V(!1),u=V(!1),d=V(!1),f=V(!1),p=B(()=>tRe.map(L=>({value:L,label:s(`providers.types.${L}`)})));function h(){const L=n.provider;if(n.mode==="edit"&&L!==void 0){l.id=L.id,l.type=L.type,l.apiKey="",l.baseUrl=L.baseUrl??"";const E=lB(L,n.config?.models);l.models=E.length>0?E:[og()]}else Object.assign(l,bM());r.value={models:{}},a.value="",o("dirtyChange",!1)}function m(L){const E=r.value[L];return E===void 0?"":s(`providers.error.${E}`)}function k(L,E){const T=r.value.models[L]?.[E];return T===void 0?"":s(`providers.error.${T}`)}function x(L){if(r.value[L]===void 0)return;const{[L]:E,...T}=r.value;r.value={...T,models:r.value.models}}function y(L,E){const T=r.value.models[L];if(T?.[E]===void 0)return;const{[E]:$,...C}=T,{[L]:j,...H}=r.value.models;r.value={...r.value,models:Object.keys(C).length>0?{...H,[L]:C}:H}}async function w(){const L=n.provider;if(!(n.mode!=="edit"||L===void 0||!L.hasApiKey))try{const E=await Ct().getProvider(L.id);E.apiKey&&!f.value&&(l.apiKey=E.apiKey,d.value=!0)}catch{d.value=!1}}function _(){o("dirtyChange",!0)}function A(){l.models.push(og()),_()}function P(L){l.models.length<=1||(l.models.splice(L,1),r.value={...r.value,models:{}},_())}async function z(){if(c.value)return;const L=oRe(l,{apiKey:n.mode==="add",baseUrl:n.mode==="add"});if(r.value=L,sRe(L)){a.value=L.modelsEmpty===void 0?"":s(`providers.error.${L.modelsEmpty}`);return}c.value=!0,a.value="";try{if(n.mode==="add"){const $=await Ct().addProvider(iRe(l));o("dirtyChange",!1),o("saved",$.id);return}const E=n.provider;if(E===void 0)return;const T=await Ct().updateProvider(E.id,lRe(l,E,d.value,n.config?.providers[E.id]?.defaultModel));o("dirtyChange",!1),o("saved",T.provider.id)}catch{a.value=s("providers.saveFailed")}finally{c.value=!1}}return In(()=>{h(),w()}),(L,E)=>(g(),S("form",{class:"provider-form",onSubmit:xt(z,["prevent"]),onInput:_},[b("div",fRe,[W(Ir,{label:v(s)("providers.fieldId"),error:m("id")},{default:ae(()=>[W(us,{modelValue:l.id,"onUpdate:modelValue":[E[0]||(E[0]=T=>l.id=T),E[1]||(E[1]=T=>x("id"))],autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),_:1},8,["label","error"]),W(Ir,{label:v(s)("providers.fieldType")},{default:ae(()=>[W(F4,{modelValue:l.type,"onUpdate:modelValue":E[2]||(E[2]=T=>l.type=T)},{default:ae(()=>[(g(!0),S(Ce,null,rt(p.value,T=>(g(),S("option",{key:T.value,value:T.value},I(T.label),9,pRe))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey"),error:m("apiKey")},{default:ae(()=>[b("div",hRe,[W(us,{modelValue:l.apiKey,"onUpdate:modelValue":[E[3]||(E[3]=T=>l.apiKey=T),E[4]||(E[4]=T=>{f.value=!0,x("apiKey")})],type:u.value?"text":"password",placeholder:e.provider?.hasApiKey?v(s)("providers.apiKeySet"):"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),W(Dt,{class:"provider-form__eye",size:"sm",label:u.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:E[5]||(E[5]=T=>u.value=!u.value)},{default:ae(()=>[W(Ee,{name:u.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label","error"]),W(Ir,{label:v(s)("providers.fieldBaseUrl"),error:m("baseUrl")},{default:ae(()=>[W(us,{modelValue:l.baseUrl,"onUpdate:modelValue":[E[6]||(E[6]=T=>l.baseUrl=T),E[7]||(E[7]=T=>x("baseUrl"))],placeholder:v(s)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label","error"])]),b("div",mRe,[b("strong",null,I(v(s)("providers.fieldModels")),1),W(Nt,{type:"button",size:"sm",variant:"secondary",onClick:A},{default:ae(()=>[W(Ee,{name:"plus",size:"sm"}),He(I(v(s)("providers.addModel")),1)]),_:1})]),b("div",gRe,[b("div",vRe,[b("span",null,I(v(s)("providers.colModelId")),1),b("span",null,I(v(s)("providers.colContext")),1),b("span",null,I(v(s)("providers.colDisplayName")),1),E[9]||(E[9]=b("span",null,null,-1))]),(g(!0),S(Ce,null,rt(l.models,(T,$)=>(g(),S(Ce,{key:$},[b("div",{class:Be(["provider-form__model",{"has-error":!!r.value.models[$]}])},[W(us,{modelValue:T.model,"onUpdate:modelValue":[C=>T.model=C,C=>y($,"model")],placeholder:v(s)("providers.modelIdPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:T.maxContextSize,"onUpdate:modelValue":[C=>T.maxContextSize=C,C=>y($,"maxContextSize")],inputmode:"numeric",placeholder:v(s)("providers.modelContextPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:T.displayName,"onUpdate:modelValue":C=>T.displayName=C,placeholder:v(s)("providers.modelNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(Dt,{size:"sm",disabled:l.models.length<=1,label:v(s)("providers.removeModel"),onClick:C=>P($)},{default:ae(()=>[W(Ee,{name:"trash",size:"sm"})]),_:1},8,["disabled","label","onClick"])],2),r.value.models[$]?(g(),S("div",yRe,I([k($,"model"),k($,"maxContextSize")].filter(Boolean).join(" · ")),1)):Y("",!0)],64))),128))]),a.value?(g(),S("div",wRe,I(a.value),1)):Y("",!0),b("div",kRe,[W(Nt,{type:"button",variant:"secondary",onClick:E[8]||(E[8]=T=>o("cancel"))},{default:ae(()=>[He(I(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:c.value},{default:ae(()=>[He(I(v(s)("providers.save")),1)]),_:1},8,["loading"])])],32))}}),aB=vt(bRe,[["__scopeId","data-v-66e70e30"]]),_Re={class:"add-provider-flow"},xRe={key:0,class:"add-provider-flow__section"},SRe={key:0,class:"add-provider-flow__state"},CRe={key:1,class:"add-provider-flow__state"},MRe={class:"add-provider-flow__catalog"},ARe=["disabled","onClick"],TRe={class:"add-provider-flow__name"},ERe={key:0,class:"add-provider-flow__empty"},IRe={class:"add-provider-flow__key"},LRe={key:1,class:"add-provider-flow__warning"},$Re={class:"add-provider-flow__note"},NRe={key:2,class:"add-provider-flow__error",role:"alert"},zRe={class:"add-provider-flow__actions"},BRe={class:"add-provider-flow__note"},RRe={class:"add-provider-flow__key"},PRe={key:0,class:"add-provider-flow__error",role:"alert"},FRe={class:"add-provider-flow__actions"},jRe={key:2,class:"add-provider-flow__section"},ORe=Je({__name:"AddProviderFlow",props:{config:{},initialSource:{}},emits:["dirtyChange","added","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(n.initialSource??"catalog"),l=B(()=>[{value:"catalog",label:s("providers.catalog.sourceCatalog")},{value:"registry",label:s("providers.catalog.sourceRegistry")},{value:"manual",label:s("providers.catalog.sourceManual")}]),r=V([]),a=V("loading"),c=V(""),u=V(null),d=ds({id:"",apiKey:"",baseUrl:""}),f=V(""),p=V(!1),h=V(!1),m=ds({url:"",apiKey:""}),k=V(""),x=V(!1),y=V(!1),w=B(()=>{const $=c.value.trim().toLowerCase();return $===""?r.value:r.value.filter(C=>C.name.toLowerCase().includes($)||C.id.toLowerCase().includes($))}),_=B(()=>Object.hasOwn(n.config?.providers??{},d.id.trim()));async function A(){a.value="loading";try{r.value=await Ct().listCatalogProviders(),a.value="ready";const $=r.value.filter(C=>!C.rejected);$.length===1&&u.value===null&&z($[0])}catch{a.value="error"}}function P($){const C=$.rejectReason===null?"":`providers.catalog.rejectReason.${$.rejectReason}`;return C!==""&&s(C)!==C?s(C):s("providers.catalog.rejected")}function z($){$.rejected||(u.value=$,d.id=$.id,d.apiKey="",d.baseUrl="",f.value="")}function L(){o("dirtyChange",!0)}async function E(){const $=u.value;if($===null||p.value)return;const C=d.id.trim();if(C===""){f.value=s("providers.error.idRequired");return}if(d.apiKey.trim()===""){f.value=s("providers.error.apiKeyRequired");return}if($.needsBaseUrl&&d.baseUrl.trim()===""){f.value=s("providers.error.baseUrlRequired");return}p.value=!0,f.value="";try{await Ct().importCatalogProvider({catalogId:$.id,id:C===$.id?void 0:C,apiKey:d.apiKey.trim(),baseUrl:d.baseUrl.trim()||void 0}),o("dirtyChange",!1),o("added",C)}catch{f.value=s("providers.addFailed")}finally{p.value=!1}}async function T(){if(x.value)return;const $=m.url.trim();if($===""){k.value=s("providers.error.registryUrlRequired");return}x.value=!0,k.value="";try{const C=await Ct().importCustomRegistry({url:$,apiKey:m.apiKey.trim()||void 0});o("dirtyChange",!1);const j=C.providers[0];j===void 0?o("cancel"):o("added",j.id)}catch{k.value=s("providers.addFailed")}finally{x.value=!1}}return In(A),($,C)=>(g(),S("div",_Re,[W(di,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=j=>i.value=j),size:"sm",options:l.value},null,8,["modelValue","options"]),i.value==="catalog"?(g(),S("section",xRe,[a.value==="loading"?(g(),S("div",SRe,[W(Zo,{size:"sm"}),He(I(v(s)("providers.catalog.loading")),1)])):a.value==="error"?(g(),S("div",CRe,[b("span",null,I(v(s)("providers.catalog.loadError")),1),W(Nt,{size:"sm",variant:"secondary",onClick:A},{default:ae(()=>[He(I(v(s)("providers.catalog.retry")),1)]),_:1})])):u.value===null?(g(),S(Ce,{key:2},[W(us,{modelValue:c.value,"onUpdate:modelValue":C[1]||(C[1]=j=>c.value=j),placeholder:v(s)("providers.catalog.searchPlaceholder"),autocomplete:"off"},null,8,["modelValue","placeholder"]),b("div",MRe,[(g(!0),S(Ce,null,rt(w.value,j=>(g(),S("button",{key:j.id,type:"button",class:"add-provider-flow__entry",disabled:j.rejected,onClick:H=>z(j)},[b("span",TRe,I(j.name),1),j.wireType?(g(),ue(Fl,{key:0,size:"sm",variant:"neutral"},{default:ae(()=>[He(I(j.wireType),1)]),_:2},1024)):Y("",!0),C[15]||(C[15]=b("span",{class:"add-provider-flow__grow"},null,-1)),b("span",null,I(j.rejected?P(j):v(s)("providers.modelCount",{count:j.models.length})),1)],8,ARe))),128)),w.value.length===0?(g(),S("div",ERe,I(v(s)("providers.catalog.empty")),1)):Y("",!0)])],64)):(g(),S("form",{key:3,class:"add-provider-flow__form",onSubmit:xt(E,["prevent"]),onInput:L},[b("button",{type:"button",class:"add-provider-flow__back",onClick:C[2]||(C[2]=j=>u.value=null)},[W(Ee,{class:"add-provider-flow__back-icon",name:"chevron-right",size:"sm"}),He(I(v(s)("providers.catalog.backToList")),1)]),W(Ir,{label:v(s)("providers.fieldId")},{default:ae(()=>[W(us,{modelValue:d.id,"onUpdate:modelValue":C[3]||(C[3]=j=>d.id=j),autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",IRe,[W(us,{modelValue:d.apiKey,"onUpdate:modelValue":C[4]||(C[4]=j=>d.apiKey=j),type:h.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:h.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[5]||(C[5]=j=>h.value=!h.value)},{default:ae(()=>[W(Ee,{name:h.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),u.value.needsBaseUrl?(g(),ue(Ir,{key:0,label:v(s)("providers.fieldBaseUrl")},{default:ae(()=>[W(us,{modelValue:d.baseUrl,"onUpdate:modelValue":C[6]||(C[6]=j=>d.baseUrl=j),placeholder:v(s)("providers.baseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):Y("",!0),_.value?(g(),S("div",LRe,I(v(s)("providers.catalog.overwriteWarning")),1)):Y("",!0),b("div",$Re,I(v(s)("providers.catalog.willImport",{count:u.value.models.length})),1),f.value?(g(),S("div",NRe,I(f.value),1)):Y("",!0),b("div",zRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[7]||(C[7]=j=>o("cancel"))},{default:ae(()=>[He(I(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:p.value},{default:ae(()=>[He(I(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32))])):i.value==="registry"?(g(),S("form",{key:1,class:"add-provider-flow__section add-provider-flow__form",onSubmit:xt(T,["prevent"]),onInput:L},[b("p",BRe,I(v(s)("providers.catalog.registryHint")),1),W(Ir,{label:v(s)("providers.catalog.registryUrlLabel")},{default:ae(()=>[W(us,{modelValue:m.url,"onUpdate:modelValue":C[8]||(C[8]=j=>m.url=j),placeholder:"https://example.com/api.json",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",RRe,[W(us,{modelValue:m.apiKey,"onUpdate:modelValue":C[9]||(C[9]=j=>m.apiKey=j),type:y.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:y.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[10]||(C[10]=j=>y.value=!y.value)},{default:ae(()=>[W(Ee,{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),k.value?(g(),S("div",PRe,I(k.value),1)):Y("",!0),b("div",FRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[11]||(C[11]=j=>o("cancel"))},{default:ae(()=>[He(I(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:x.value},{default:ae(()=>[He(I(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32)):(g(),S("div",jRe,[W(aB,{mode:"add",config:e.config,onDirtyChange:C[12]||(C[12]=j=>o("dirtyChange",j)),onSaved:C[13]||(C[13]=j=>o("added",j)),onCancel:C[14]||(C[14]=j=>o("cancel"))},null,8,["config"])]))]))}}),cB=vt(ORe,[["__scopeId","data-v-01edc4ef"]]),HRe={class:"providers-panel"},DRe={class:"providers-panel__heading"},VRe={key:1,class:"providers-panel__split"},WRe=["aria-label"],qRe={class:"providers-pane-label"},URe=["aria-label"],ZRe=["data-testid","aria-current","onClick"],KRe=["aria-label"],GRe={"aria-hidden":"true"},YRe={class:"providers-panel__row-name"},XRe={class:"providers-pane-label"},JRe=["aria-current"],QRe={class:"providers-panel__add-icon"},ePe={class:"providers-panel__row-name"},tPe={class:"providers-panel__detail"},nPe={class:"providers-detail__head"},oPe={class:"providers-detail__tile","aria-hidden":"true"},sPe={class:"providers-detail__identity"},iPe={class:"providers-detail__name-row"},lPe={class:"providers-detail__meta"},rPe={class:"mono"},aPe={class:"providers-detail__sec"},cPe={class:"providers-detail__sec-head"},uPe={class:"providers-pane-label"},dPe={class:"providers-detail__count"},fPe={key:0,class:"providers-model-card"},pPe={key:0,class:"providers-model-name"},hPe={key:1,class:"providers-detail__empty"},mPe={class:"providers-detail__sec"},gPe={class:"providers-detail__foot"},xM="$add",vPe=Je({__name:"ProvidersPanel",props:{discardToken:{default:0}},emits:["dirtyChange"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{confirm:s}=z1(),i=R1(),l=V([]),r=V(null),a=V(!1),c=V(!1),u=V(null),d=V(!1),f=B(()=>l.value.toSorted((E,T)=>E.id.localeCompare(T.id))),p=B(()=>u.value===xM),h=B(()=>f.value.find(E=>E.id===u.value)??null),m=B(()=>{const E=h.value;if(!E?.models?.length)return[];const T=new Map(lB(E,r.value?.models).map($=>[$.model,$.maxContextSize]));return E.models.map($=>{const C=T.get($)?.trim()??"";return{id:$,contextBadge:k(C)}})});function k(E){if(!E||!/^\d+$/.test(E))return;const T=Number(E);if(!(!Number.isFinite(T)||T<=0))return T>=1e6?`${x(T/1e6)}M`:T>=1e3?`${x(T/1e3)}K`:String(T)}function x(E){return String(Number(E.toFixed(1)))}function y(E){return E==="connected"?"ok":E==="error"?"error":"idle"}function w(E){return(E.trim()[0]??"?").toUpperCase()}Ke(d,E=>n("dirtyChange",E),{immediate:!0}),Ke(()=>e.discardToken,()=>{d.value=!1,u.value=f.value[0]?.id??null});async function _(){await i.refreshRuntimeState(),await A()}async function A(){a.value=!0,c.value=!1;try{l.value=await Ct().listProviders(),f.value.some(E=>E.id===u.value)||(u.value=f.value[0]?.id??null)}catch{l.value=[],c.value=!0}try{r.value=await Ct().getConfig()}catch{r.value=null}finally{a.value=!1}}function P(E){d.value||(u.value=E)}async function z(E){d.value=!1,await _(),u.value=E}async function L(E){await s({title:o("providers.deleteProvider"),message:o("providers.deleteConfirm",{id:E.id,count:E.models?.length??0}),confirmLabel:o("providers.deleteConfirmYes"),cancelLabel:o("common.cancel"),variant:"danger",action:async()=>{await Ct().deleteProvider(E.id),u.value=null,d.value=!1,await _()}})}return In(A),(E,T)=>(g(),S("section",HRe,[b("div",DRe,[b("div",null,[b("h3",null,I(v(o)("providers.title")),1),b("p",null,I(v(o)("providers.description")),1)]),!a.value&&!c.value?(g(),ue(Dt,{key:0,size:"sm",label:v(o)("providers.refresh"),"data-testid":"providers-refresh",onClick:T[0]||(T[0]=$=>_())},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"})]),_:1},8,["label"])):Y("",!0)]),c.value?(g(),ue(K9,{key:0,variant:"warning"},{default:ae(()=>[He(I(v(o)("providers.unavailable")),1)]),_:1})):(g(),S("div",VRe,[b("nav",{class:"providers-panel__list","aria-label":v(o)("providers.title")},[b("div",qRe,I(v(o)("settings.tabs.providers")),1),a.value?(g(),S(Ce,{key:0},rt(3,$=>b("div",{key:$,class:"providers-panel__row providers-panel__row--skeleton",role:"status","aria-label":v(o)("providers.loading")},[W(_M,{width:"26px",height:"26px",circle:""}),W(_M,{width:`${52-$*6}%`,height:"11px"},null,8,["width"])],8,URe)),64)):(g(),S(Ce,{key:1},[(g(!0),S(Ce,null,rt(f.value,$=>(g(),S("button",{key:$.id,type:"button",class:Be(["providers-panel__row",{"is-selected":u.value===$.id}]),"data-testid":`provider-${$.id}-toggle`,"aria-current":u.value===$.id,onClick:C=>P($.id)},[W(Cn,{text:v(o)(`providers.status.${$.status}`)},{default:ae(()=>[b("span",{class:Be(["providers-panel__tile",`is-${y($.status)}`]),role:"img","aria-label":v(o)(`providers.status.${$.status}`)},[b("span",GRe,I(w($.type)),1)],10,KRe)]),_:2},1032,["text"]),b("span",YRe,I($.id),1),b("span",{class:Be(["providers-panel__row-dot",`is-${y($.status)}`]),"aria-hidden":"true"},null,2)],10,ZRe))),128)),b("div",XRe,I(v(o)("providers.customProviders")),1),b("button",{type:"button",class:Be(["providers-panel__row providers-panel__row--add",{"is-selected":p.value}]),"aria-current":p.value,onClick:T[1]||(T[1]=$=>P(xM))},[b("span",QRe,[W(Ee,{name:"plus",size:"sm"})]),b("span",ePe,I(v(o)("providers.addProvider")),1)],10,JRe)],64))],8,WRe),b("div",tPe,[p.value?(g(),ue(cB,{key:0,config:r.value,onDirtyChange:T[2]||(T[2]=$=>d.value=$),onAdded:z,onCancel:T[3]||(T[3]=$=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["config"])):h.value?(g(),S(Ce,{key:1},[b("header",nPe,[b("span",oPe,I(w(h.value.type)),1),b("div",sPe,[b("div",iPe,[b("h4",null,I(h.value.id),1),W(Fl,{variant:h.value.status==="connected"?"success":h.value.status==="error"?"danger":"neutral",size:"md"},{default:ae(()=>[He(I(v(o)(`providers.status.${h.value.status}`)),1)]),_:1},8,["variant"])]),b("p",lPe,[b("span",null,I(h.value.type),1),h.value.baseUrl?(g(),S(Ce,{key:0},[T[7]||(T[7]=b("span",{"aria-hidden":"true"},"·",-1)),b("span",rPe,I(h.value.baseUrl),1)],64)):Y("",!0)])])]),b("section",aPe,[b("div",cPe,[b("span",uPe,I(v(o)("providers.fieldModels")),1),b("span",dPe,I(v(o)("providers.modelCount",{count:h.value.models?.length??0})),1)]),m.value.length>0?(g(),S("div",fPe,[(g(!0),S(Ce,null,rt(m.value,$=>(g(),S("div",{key:$.id,class:"providers-model-row"},[b("code",null,I($.id),1),$.displayName?(g(),S("span",pPe,I($.displayName),1)):Y("",!0),T[8]||(T[8]=b("span",{class:"providers-model-grow"},null,-1)),$.contextBadge?(g(),ue(Fl,{key:1,variant:"neutral",size:"sm"},{default:ae(()=>[He(I($.contextBadge),1)]),_:2},1024)):Y("",!0)]))),128))])):(g(),S("p",hPe,I(v(o)("providers.noModels")),1))]),b("section",mPe,[W(aB,{mode:"edit",provider:h.value,config:r.value,onDirtyChange:T[4]||(T[4]=$=>d.value=$),onSaved:z,onCancel:T[5]||(T[5]=$=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["provider","config"])]),b("footer",gPe,[W(Nt,{variant:"danger-soft",size:"sm","data-testid":`provider-${h.value.id}-delete`,onClick:T[6]||(T[6]=$=>L(h.value))},{default:ae(()=>[W(Ee,{name:"trash",size:"sm"}),He(I(v(o)("providers.deleteProvider")),1)]),_:1},8,["data-testid"])])],64)):l.value.length===0&&!a.value?(g(),ue(jg,{key:2,title:v(o)("providers.empty"),hint:v(o)("providers.emptyHint")},{icon:ae(()=>[W(Ee,{name:"bolt"})]),_:1},8,["title","hint"])):Y("",!0)])]))]))}}),yPe=vt(vPe,[["__scopeId","data-v-66a5ed6a"]]),wPe=["aria-expanded","aria-label","disabled"],kPe=["aria-label"],bPe=["aria-label"],_Pe=["aria-selected"],xPe={class:"sm-picker__option-label"},SPe={class:"sm-picker__group"},CPe=["aria-selected","onMouseenter","onClick"],MPe={class:"sm-picker__option-label"},APe=["aria-label"],TPe={class:"sm-picker__group"},EPe=["aria-selected","onMouseenter","onClick"],IPe={class:"sm-picker__option-label"},LPe=250,$Pe=188,NPe=Je({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{},disabled:{type:Boolean}},emits:["inherit","select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=`sm-picker-${Math.random().toString(36).slice(2,9)}`,l=V(null),r=V(null),a=V(null),c=V(!1),u=V(!1),d=V({}),f=V(null),p=V(""),h=V(0),m=V("models"),k=V(0),x=V(0),y=V("right"),w=new Map;let _=null;const A=B(()=>[{id:"",label:s("settings.noSecondaryModel")},...n.groups.flatMap(X=>X.options)]),P=B(()=>n.modelValue?A.value.find(X=>X.id===n.modelValue)?.label??n.modelValue:""),z=B(()=>n.modelValue?n.effort?`${P.value} · ${n.effort}`:P.value:s("settings.noSecondaryModel")),L=B(()=>{const X=f.value;if(X===null||X==="")return[];const oe=l6(n.modelInfoById[X]),F=n.effort===""?[null,...oe]:[...oe];return n.modelValue===X&&n.effort!==""&&!oe.includes(n.effort)&&F.push(n.effort),F});function E(X){return n.modelValue!==f.value?!1:X===null?n.effort==="":n.effort===X}function T(){const X=L.value.findIndex(E);return X>=0?X:0}function $(X,oe){X instanceof HTMLElement?w.set(oe,X):w.delete(oe)}function C(){_!==null&&(clearTimeout(_),_=null)}function j(){C(),_=setTimeout(()=>{f.value=null,m.value==="efforts"&&(m.value="models")},LPe)}function H(X){X!==p.value&&(p.value=X,h.value=Math.max(0,A.value.findIndex(oe=>oe.id===X)))}function D(){const X=l.value,oe=r.value;if(!X||!oe)return;const F=X.getBoundingClientRect(),K=oe.offsetHeight,he=window.innerHeight-F.bottom;u.value=heK;const ye=Math.max(8,window.innerWidth-F.right);d.value=u.value?{right:`${ye}px`,bottom:`${window.innerHeight-F.top+4}px`,top:"auto"}:{right:`${ye}px`,top:`${F.bottom+4}px`,bottom:"auto"}}function M(){const X=r.value,oe=f.value===null?void 0:w.get(f.value);if(!X||!oe)return;const F=X.getBoundingClientRect(),K=oe.getBoundingClientRect(),he=a.value?.offsetHeight??0,ye=Math.max(0,window.innerHeight-8-he-F.top);x.value=Math.max(0,Math.min(K.top-F.top-4,X.offsetHeight-40,ye));const ve=window.innerWidth-F.right;y.value=ve>=$Pe||ve>=F.left?"right":"left"}function R(){c.value||n.disabled||(c.value=!0,p.value=n.modelValue||A.value[0]?.id||"",h.value=Math.max(0,A.value.findIndex(X=>X.id===p.value)),f.value=null,m.value="models",yt(D))}function O({restoreFocus:X=!1}={}){c.value&&(C(),c.value=!1,f.value=null,X&&yt(()=>l.value?.focus()))}function U(){c.value?O({restoreFocus:!0}):R()}function Z(){f.value=null,m.value="models"}function q(X,{moveFocus:oe=!1}={}){if(H(X),C(),X===""){f.value=null,m.value="models";return}f.value=X,yt(M),oe&&(m.value="efforts",k.value=T())}function te(X){const oe=f.value;if(oe===null)return;const F={model:oe,...X===null?{}:{effort:X}};(F.model!==n.modelValue||(F.effort??"")!==n.effort)&&o("select",F),O({restoreFocus:!0})}function ee(){o("inherit"),O({restoreFocus:!0})}function J(){yt(()=>{r.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function se(X){const oe=A.value;if(oe.length===0)return;const F=oe[(h.value+X+oe.length)%oe.length];H(F.id),f.value!==null&&q(F.id),J()}function Q(X){const oe=L.value;oe.length!==0&&(k.value=(k.value+X+oe.length)%oe.length,J())}function me(X){if(!c.value){(X.key==="Enter"||X.key===" "||X.key==="ArrowDown")&&(X.preventDefault(),R());return}if(X.key==="ArrowDown")X.preventDefault(),m.value==="models"?se(1):Q(1);else if(X.key==="ArrowUp")X.preventDefault(),m.value==="models"?se(-1):Q(-1);else if(X.key==="ArrowRight")X.preventDefault(),p.value!==""&&q(p.value,{moveFocus:!0});else if(X.key==="ArrowLeft")X.preventDefault(),f.value!==null&&Z();else if(X.key==="Enter"||X.key===" ")X.preventDefault(),m.value==="models"&&p.value===""?ee():m.value==="models"?q(p.value,{moveFocus:!0}):te(L.value[k.value]??null);else if(X.key==="Home"||X.key==="End"){X.preventDefault();const oe=X.key==="Home";if(m.value==="models"){const F=A.value;if(F.length===0)return;const K=(oe?F[0]:F.at(-1)).id;H(K),f.value!==null&&q(K)}else k.value=oe?0:L.value.length-1;J()}else X.key==="Escape"&&(X.preventDefault(),O({restoreFocus:!0}))}function xe(X){const oe=X.target;oe instanceof Node&&(l.value?.contains(oe)||r.value?.contains(oe)||O())}function Ye(X){if(c.value){if(r.value?.contains(X.target instanceof Node?X.target:null)){M();return}O(),D()}}function at(){c.value&&D()}return In(()=>{document.addEventListener("pointerdown",xe),document.addEventListener("scroll",Ye,!0),window.addEventListener("resize",at)}),En(()=>{document.removeEventListener("pointerdown",xe),document.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",at),C()}),(X,oe)=>(g(),S("div",{class:Be(["sm-picker",{"is-open":c.value}])},[b("button",{ref_key:"triggerRef",ref:l,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":i,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":v(s)("settings.secondaryModel"),disabled:e.disabled,onClick:U,onKeydown:me},[b("span",{class:Be(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[b("span",null,I(z.value),1)],2),W(Ee,{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,wPe),(g(),ue(hl,{to:"body"},[c.value?(g(),S("div",{key:0,id:i,ref_key:"menuRef",ref:r,class:Be(["sm-picker__menu",{"sm-picker__menu--up":u.value}]),style:Gt(d.value),role:"dialog","aria-label":v(s)("settings.secondaryModel")},[b("div",{class:"sm-picker__models",role:"listbox","aria-label":v(s)("settings.secondaryModel")},[b("button",{ref:F=>$(F,""),type:"button",class:Be(["sm-picker__option",{"is-selected":e.modelValue==="","is-active":p.value==="","is-kb-active":m.value==="models"&&p.value===""}]),role:"option","aria-selected":e.modelValue==="",onMouseenter:oe[0]||(oe[0]=F=>q("")),onClick:ee},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",xPe,I(v(s)("settings.noSecondaryModel")),1)],42,_Pe),oe[1]||(oe[1]=b("div",{class:"sm-picker__divider"},null,-1)),(g(!0),S(Ce,null,rt(e.groups,F=>(g(),S(Ce,{key:F.provider},[b("div",SPe,I(F.provider),1),(g(!0),S(Ce,null,rt(F.options,K=>(g(),S("button",{key:K.id,ref_for:!0,ref:he=>$(he,K.id),type:"button",class:Be(["sm-picker__option",{"is-selected":K.id===e.modelValue,"is-active":K.id===p.value,"is-kb-active":m.value==="models"&&K.id===p.value}]),role:"option","aria-selected":K.id===e.modelValue,onMouseenter:he=>q(K.id),onMouseleave:j,onClick:he=>q(K.id,{moveFocus:!0})},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",MPe,I(K.label),1),W(Ee,{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,CPe))),128))],64))),128))],8,bPe),f.value!==null?(g(),S("div",{key:0,ref_key:"flyoutRef",ref:a,class:Be(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:Gt({top:`${x.value}px`}),role:"listbox","aria-label":v(s)("settings.secondaryModelEffort"),onMouseenter:C,onMouseleave:j},[b("div",TPe,I(v(s)("settings.secondaryModelEffort")),1),(g(!0),S(Ce,null,rt(L.value,(F,K)=>(g(),S("button",{key:F??"__default__",type:"button",class:Be(["sm-picker__option",{"is-selected":E(F),"is-kb-active":m.value==="efforts"&&K===k.value,"is-muted":F===null}]),role:"option","aria-selected":E(F),onMouseenter:he=>{m.value="efforts",k.value=K},onClick:he=>te(F)},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",IPe,I(F??v(s)("settings.secondaryModelEffortAuto")),1)],42,EPe))),128))],46,APe)):Y("",!0)],14,kPe)):Y("",!0)]))],2))}}),zPe=vt(NPe,[["__scopeId","data-v-5b749db7"]]),BPe=["aria-label"],RPe=["aria-selected","onClick"],PPe={class:"body"},FPe={class:"panel"},jPe={class:"sec"},OPe={class:"sec-title"},HPe={class:"row"},DPe={class:"rlabel"},VPe={class:"row"},WPe={class:"rlabel"},qPe={class:"row"},UPe={class:"rlabel"},ZPe={class:"sec"},KPe={class:"sec-title"},GPe={class:"row"},YPe={class:"rlabel"},XPe={class:"hint"},JPe={class:"row"},QPe={class:"rlabel"},eFe={class:"hint"},tFe={class:"sec"},nFe={class:"sec-title"},oFe={class:"row"},sFe={class:"rlabel"},iFe={key:0,class:"hint"},lFe={class:"row"},rFe={class:"rlabel"},aFe={key:0,class:"hint"},cFe={class:"row"},uFe={class:"rlabel"},dFe={key:0,class:"hint"},fFe={class:"row"},pFe={class:"rlabel"},hFe={class:"panel"},mFe={class:"sec"},gFe={class:"sec-title"},vFe={class:"row"},yFe={class:"rlabel"},wFe={key:0,class:"rvalue"},kFe={class:"actions"},bFe={class:"panel"},_Fe={class:"panel"},xFe={class:"sec"},SFe={class:"sec-head"},CFe={class:"sec-title"},MFe={key:0,class:"saving"},AFe={class:"row"},TFe={class:"rlabel"},EFe={class:"hint"},IFe={key:0,class:"select-wrap"},LFe={key:0,value:"",disabled:""},$Fe=["label"],NFe=["value"],zFe={key:1,class:"rvalue mono"},BFe={key:0,class:"sec","data-testid":"subagent-routing"},RFe={class:"sec-title"},PFe=["aria-label"],FFe=["value","checked","disabled","onChange"],jFe={class:"routing-mode-title"},OFe={class:"hint"},HFe={key:0,class:"row"},DFe={class:"rlabel"},VFe={class:"hint"},WFe={key:1,class:"rvalue"},qFe={key:1,class:"row routing-pool"},UFe={class:"rlabel"},ZFe={class:"hint"},KFe={class:"pool-list","data-testid":"routing-pool"},GFe=["value","checked","disabled","onChange"],YFe={class:"pool-name"},XFe=["disabled","onClick"],JFe={class:"row routing-effective","data-testid":"effective-routing"},QFe={class:"rlabel"},eje={class:"rvalue mono","data-testid":"saved-policy"},tje={class:"rlabel"},nje={class:"rvalue mono","data-testid":"effective-policy"},oje={key:0,class:"hint","data-testid":"feature-disabled"},sje={class:"row"},ije={class:"rlabel"},lje={class:"hint"},rje={class:"row"},aje={class:"rlabel"},cje={class:"hint"},uje={class:"row"},dje={class:"rlabel"},fje={class:"hint"},pje={class:"row"},hje={class:"rlabel"},mje={class:"hint"},gje={key:1,class:"empty-config"},vje={class:"panel"},yje={class:"sec"},wje={class:"sec-title"},kje={class:"row"},bje={class:"rlabel"},_je={class:"hint"},xje={class:"rvalue mono"},Sje={class:"row"},Cje={class:"rlabel"},Mje={class:"hint"},Aje={class:"value-wrap"},Tje={class:"rvalue mono"},Eje={class:"row"},Ije={class:"rlabel"},Lje={class:"hint"},$je={class:"value-wrap"},Nje={class:"rvalue mono"},zje={class:"row"},Bje={class:"rlabel"},Rje={class:"rvalue mono"},Pje={key:0,class:"sec"},Fje={key:0,class:"row"},jje={class:"rlabel"},Oje={class:"hint"},Hje={class:"hint"},Dje={class:"sec"},Vje={class:"sec-title"},Wje={class:"row"},qje={class:"rlabel"},Uje={key:0,class:"hint"},Zje={class:"row"},Kje={class:"rlabel"},Gje={class:"panel"},Yje={key:0,class:"sec"},Xje={class:"sec-title"},Jje={"data-testid":"desktop-update-controls",class:"desktop-update-card"},Qje={class:"desktop-update-row desktop-update-summary"},eOe={class:"desktop-update-summary-copy"},tOe={class:"desktop-update-icon","aria-hidden":"true"},nOe={class:"rlabel"},oOe={class:"desktop-update-title","aria-live":"polite"},sOe={class:"hint"},iOe={class:"desktop-update-row"},lOe={class:"rlabel"},rOe={class:"hint"},aOe={class:"select-wrap desktop-update-select"},cOe=["value"],uOe={class:"desktop-update-row"},dOe={class:"rlabel"},fOe={class:"hint"},pOe={class:"desktop-update-row"},hOe={class:"rlabel"},mOe={class:"hint"},gOe={key:0,class:"desktop-update-detail"},vOe={key:0,class:"desktop-update-progress"},yOe=["aria-label"],wOe=["value","aria-label"],kOe={"data-testid":"settings-update-progress-detail"},bOe={class:"desktop-update-actions"},_Oe={class:"panel"},xOe={class:"sec"},SOe={class:"sec-title"},COe={class:"row"},MOe={class:"rlabel"},AOe={class:"hint"},TOe={class:"row"},EOe={class:"rlabel"},IOe={class:"hint"},LOe={key:0,class:"flag-chip"},$Oe={key:1,class:"flag-chip flag-chip--warn"},NOe={class:"row"},zOe={class:"rlabel"},BOe={class:"hint"},ROe={key:0,class:"flag-chip"},POe={key:1,class:"flag-chip flag-chip--warn"},FOe={key:1,class:"empty-config"},jOe={class:"panel"},OOe={class:"panel-head"},HOe={class:"panel-title"},DOe={class:"panel-desc"},VOe={class:"archive-toolbar"},WOe={class:"archive-search"},qOe=["placeholder"],UOe={value:"all"},ZOe=["value"],KOe={key:0,class:"archive-empty"},GOe={key:0,class:"archive-list"},YOe={class:"archive-workspace"},XOe={class:"path"},JOe={class:"count"},QOe={class:"setting-card"},eHe={class:"archive-meta"},tHe={class:"archive-name"},nHe={class:"archive-time"},oHe={key:1,class:"archive-empty"},sHe=100,iHe=Je({__name:"SettingsDialog",props:{colorScheme:{},accent:{},uiFontSize:{},authReady:{type:Boolean},accountModel:{},notify:{type:Boolean},notifyQuestion:{type:Boolean},notifyApproval:{type:Boolean},notifyPermission:{},sound:{type:Boolean},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},backend:{},experimentalFlagStates:{},subagentModelPolicy:{},subagentModelPolicySaving:{type:Boolean},initialTab:{}},emits:["setColorScheme","setAccent","setUiFontSize","setNotify","setNotifyQuestion","setNotifyApproval","setSound","setConversationToc","setTurnFolding","setActivityRunFolding","openOnboarding","updateConfig","saveSubagentModelPolicy","clearSubagentModelPolicy","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(o.initialTab??"general"),l=B(()=>b9(o.uiFontSize)),r=typeof window>"u"?void 0:window.pythinkerDesktop,a=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"cute-bot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"},...r===void 0?[]:[{id:"update",labelKey:"settings.tabs.update",icon:"update-available"}],{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"}],c=z$().serverHttpUrl,u="0.1.2".trim()?"0.1.2":"0.0.0-dev",d=V(),f=V(!1),p=V();let h;const m=B(()=>d.value?.installedVersion??u),k=V(null),x=B(()=>k.value?.serverVersion||o.serverVersion||"-"),y=B(()=>k.value?.backend??o.backend??"v1"),w=B(()=>y.value==="v2"?"agent-gateway":"server"),_=V(!1),A=V(!1),P=V(0),{confirm:z,current:L}=z1(),E=["manual","yolo","auto"],T={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},$=V(null);iB($);function C(We){We.key==="Escape"&&L.value===null&&pt()}In(()=>{document.addEventListener("keydown",C),F(),r!==void 0&&(h=r.onUpdateState(We=>{d.value=We}),r.getUpdateState().then(We=>{d.value=We}))}),En(()=>{document.removeEventListener("keydown",C),h?.(),kn!==null&&clearTimeout(kn)});const j=B(()=>{const We=d.value;if(We===void 0)return n("settings.desktop.loading");switch(We.status){case"disabled":return n("settings.desktop.disabled");case"checking":return n("settings.desktop.checking");case"available":return n("settings.desktop.available",{version:We.availableVersion});case"downloading":return n("settings.desktop.downloading",{version:We.availableVersion});case"downloaded":return n("settings.desktop.downloaded",{version:We.availableVersion});case"skipped":return n("settings.desktop.skipped",{version:We.skippedVersion??We.availableVersion});case"error":return We.message??n("settings.desktop.errorGeneric");default:return n("settings.desktop.upToDate")}}),H=B(()=>{const We=d.value?.percent;return We===void 0||!Number.isFinite(We)?void 0:Math.min(100,Math.max(0,We))}),D=["stable","beta","nightly"],M=B(()=>{const We=d.value?.status;return f.value||We===void 0||We==="checking"||We==="downloading"||We==="downloaded"}),R=B(()=>{const We=d.value?.status;return f.value||We===void 0||We==="disabled"||We==="checking"||We==="downloading"||We==="downloaded"}),O=B(()=>{const We=d.value?.lastCheckedAt;if(We===void 0)return n("settings.desktop.neverChecked");const st=new Date(We);return Number.isNaN(st.getTime())?n("settings.desktop.neverChecked"):n("settings.desktop.lastChecked",{time:new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"}).format(st)})});function U(We){const st=["B","KB","MB","GB"];let Xe=Math.max(0,We),qe=0;for(;Xe>=1024&&qe{const We=d.value;if(We?.status!=="downloading")return"";const st=[];return H.value!==void 0&&st.push(`${Math.round(H.value)}%`),We.transferred!==void 0&&We.total!==void 0?st.push(n("settings.desktop.bytesOfTotal",{transferred:U(We.transferred),total:U(We.total)})):We.transferred!==void 0&&st.push(U(We.transferred)),We.bytesPerSecond!==void 0&&st.push(`${U(We.bytesPerSecond)}/s`),st.join(" · ")}),q=B(()=>p.value!==void 0?p.value:d.value?.status==="error"?j.value:void 0);async function te(We){if(!f.value){f.value=!0,p.value=void 0;try{d.value=await We()}catch(st){p.value=st instanceof Error?st.message:String(st)}finally{f.value=!1}}}function ee(We){r!==void 0&&te(()=>r.setAutoUpdate(We))}function J(We){r!==void 0&&D.includes(We)&&te(()=>r.setUpdateChannel(We))}function se(We){r!==void 0&&te(()=>r.setNotifyUpdate(We))}function Q(){r!==void 0&&te(()=>r.checkForUpdates())}function me(){r!==void 0&&te(()=>r.downloadUpdate())}function xe(){const We=d.value?.availableVersion;r!==void 0&&We!==void 0&&te(()=>r.skipUpdate(We))}function Ye(){r!==void 0&&te(()=>r.undoSkippedUpdate())}function at(){const We=d.value?.availableVersion;r!==void 0&&We!==void 0&&te(()=>r.openUpdateReleaseNotes(We))}function X(){r!==void 0&&te(()=>r.restartToUpdate())}let oe=0;async function F(){const We=++oe;let st;try{st=await Ct().getMeta()}catch{st=null}We===oe&&(k.value=st)}Ke(()=>o.config,()=>{F()});function K(){EN()}const he=B(()=>{const We=new Map;for(const st of o.models??[])We.set(st.id,{id:st.id,label:st.displayName??st.model??st.id,provider:st.provider});for(const[st,Xe]of Object.entries(o.config?.models??{})){if(We.has(st))continue;const qe=ie(Xe);We.set(st,{id:st,label:de(st,Xe,qe),provider:qe??st})}return Array.from(We.values())}),ye=B(()=>{const We=new Map;for(const st of he.value){const Xe=We.get(st.provider)??[];Xe.push(st),We.set(st.provider,Xe)}for(const[st,Xe]of We)We.set(st,Xe.toSorted((qe,Pe)=>qe.label.localeCompare(Pe.label)));return Array.from(We.entries()).toSorted(([st],[Xe])=>st.localeCompare(Xe)).map(([st,Xe])=>({provider:st,options:Xe}))}),ve=B(()=>{const We=o.config?.defaultPermissionMode;return We==="auto"||We==="yolo"||We==="manual"?We:"manual"});function ie(We){if(!We||typeof We!="object")return;const st=We;return typeof st.provider=="string"?st.provider:void 0}function de(We,st,Xe){if(!st||typeof st!="object")return We;const qe=st,Pe=typeof qe.model=="string"?qe.model:void 0,bt=Xe??ie(st);return Pe&&bt?`${We} (${bt}/${Pe})`:Pe?`${We} (${Pe})`:We}function be(We){return We===!0}function Se(We){!We||We===o.config?.defaultModel||s("updateConfig",{defaultModel:We})}function je(We){We!==ve.value&&s("updateConfig",{defaultPermissionMode:We})}function et(We){const st=o.config?.[We];s("updateConfig",{[We]:!be(st)})}function le(){const We=o.config?.thinking;return!We||typeof We!="object"?!0:We.enabled!==!1}function fe(){s("updateConfig",{thinking:{enabled:!le()}})}function ge(){const We=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!We})}async function Oe(We){We!==i.value&&await Fe()&&(i.value=We)}async function Fe(){if(!A.value)return!0;const We=await z({title:n("providers.unsavedTitle"),message:n("providers.unsavedBody"),confirmLabel:n("providers.unsavedDiscard"),cancelLabel:n("providers.unsavedStay"),variant:"danger"});return We&&(A.value=!1,P.value+=1),We}async function pt(){await Fe()&&s("close")}function kt(){return[`App version: ${m.value}`,`Server version: ${x.value}`,`Backend: ${y.value}`,`Server address: ${c}`,`Server ID: ${k.value?.serverId||"-"}`,`User agent: ${typeof navigator>"u"?"-":navigator.userAgent}`].join(` +`)}async function qt(){_.value=await fs(kt())}const nn=V(!1),Jt=V(!1);let kn=null;function Dn(){kn!==null&&clearTimeout(kn),kn=setTimeout(()=>{nn.value=!1,Jt.value=!1,kn=null},1500)}async function xn(){await fs(x.value)&&(nn.value=!0,Dn())}async function $n(){await fs(c)&&(Jt.value=!0,Dn())}const Hn=B(()=>Object.fromEntries((o.models??[]).map(We=>[We.id,We])));function bn(We){return o.config?.experimental?.[We]===!0}function Wn(We){return k.value?.experimentalFlagStates?.find(Xe=>Xe.id===We)??o.experimentalFlagStates?.find(Xe=>Xe.id===We)}function Pn(We,st){const Xe={...o.config?.experimental,[We]:st};s("updateConfig",{experimental:Xe})}const Mn=["inherit","default","pool","force"],Nn=V("inherit"),An=V(""),Qn=V(""),Fn=V(new Set);function Qt(We){Nn.value=We?.mode??"inherit",An.value=We!==void 0&&We.mode!=="inherit"?We.defaultModel:"",Qn.value=We!==void 0&&We.mode!=="inherit"?We.defaultEffort??"":"",Fn.value=new Set(We?.mode==="pool"?Object.keys(We.models):[])}Ke(()=>o.subagentModelPolicy?.policy,Qt,{immediate:!0,deep:!0});function uo(){const We=Qn.value||void 0;switch(Nn.value){case"inherit":return{mode:"inherit"};case"default":case"force":return An.value?{mode:Nn.value,defaultModel:An.value,defaultEffort:We}:void 0;case"pool":{if(Fn.value.size===0||!Fn.value.has(An.value))return;const st=Object.fromEntries([...Fn.value].map(Xe=>[Xe,""]));return{mode:"pool",defaultModel:An.value,models:st,defaultEffort:We}}}}function Zn(){const We=uo();if(We!==void 0){if(We.mode==="inherit"){o.subagentModelPolicy?.policy.mode!=="inherit"&&s("clearSubagentModelPolicy");return}s("saveSubagentModelPolicy",We)}}function Bo(We){Nn.value!==We&&(Nn.value=We,We==="pool"&&Fn.value.size===0&&An.value&&(Fn.value=new Set([An.value])),Zn())}function Un(We){An.value=We.model,Qn.value=We.effort??"",Zn()}function hs(We){const st=new Set(Fn.value);st.has(We)?st.delete(We):st.add(We),Fn.value=st,st.has(An.value)||(An.value=[...st][0]??""),Zn()}function Io(We){!Fn.value.has(We)||An.value===We||(An.value=We,Zn())}function Rt(We){return he.value.find(st=>st.id===We)?.label??We}function Jo(We){switch(We.mode){case"inherit":return n("settings.subagentRouting.summaryInherit");case"pool":return`${n("settings.subagentRouting.mode.pool")} · ${n("settings.subagentRouting.summaryPool",{count:Object.keys(We.models).length,model:Rt(We.defaultModel)})}`;default:{const st=We.defaultEffort?` · ${We.defaultEffort}`:"";return`${n(`settings.subagentRouting.mode.${We.mode}`)} · ${Rt(We.defaultModel)}${st}`}}}function Ls(We){const st=oz(We);st!==void 0&&s("setUiFontSize",st)}const $e=R1(),Ge=V([]),ot=V(!1),dt=V(!1),Mt=V(""),Ft=V("all"),Ut=V("archived-desc");async function en(){if(!(ot.value||dt.value)){ot.value=!0;try{const We=[];let st;for(;;){const Xe=await $e.loadArchivedSessions({beforeId:st,pageSize:sHe});if(We.push(...Xe.items),!Xe.hasMore||Xe.items.length===0)break;const qe=Xe.items.at(-1)?.id;if(qe===void 0)break;st=qe}Ge.value=We,dt.value=!0}catch(We){console.warn("loadAllArchived failed",We)}finally{ot.value=!1}}}Ke(i,We=>{We==="archived"&&!dt.value&&en()});const tn=B(()=>{const We=new Set;for(const st of Ge.value)We.add(st.cwd);return Array.from(We).toSorted((st,Xe)=>st.localeCompare(Xe))}),eo=B(()=>{const We=Mt.value.trim().toLowerCase();let st=Ge.value.filter(Xe=>Xe.archived===!0);return Ft.value!=="all"&&(st=st.filter(Xe=>Xe.cwd===Ft.value)),We&&(st=st.filter(Xe=>Xe.title.toLowerCase().includes(We))),Ut.value==="archived-desc"?st.toSorted((Xe,qe)=>qe.updatedAt.localeCompare(Xe.updatedAt)):Ut.value==="created-desc"?st.toSorted((Xe,qe)=>qe.createdAt.localeCompare(Xe.createdAt)):st.toSorted((Xe,qe)=>Xe.title.localeCompare(qe.title,"en"))}),Ro=B(()=>{const We=new Map;for(const st of eo.value){const Xe=We.get(st.cwd)??[];Xe.push(st),We.set(st.cwd,Xe)}return Array.from(We.entries()).map(([st,Xe])=>({cwd:st,items:Xe}))});async function $s(We){await $e.restoreSession(We)&&(Ge.value=Ge.value.filter(Xe=>Xe.id!==We))}function Do(We){const st=new Date(We);if(Number.isNaN(st.getTime()))return We;const Xe=qe=>String(qe).padStart(2,"0");return`${st.getFullYear()}-${Xe(st.getMonth()+1)}-${Xe(st.getDate())} ${Xe(st.getHours())}:${Xe(st.getMinutes())}`}return(We,st)=>(g(),ue(Z0,{open:!0,"close-on-esc":!1,title:v(n)("settings.title"),size:"xl",height:"fixed",padded:!1,onClose:pt},{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:$,class:"sd"},[b("nav",{class:"settings-tabs",role:"tablist","aria-label":v(n)("settings.title")},[(g(),S(Ce,null,rt(a,Xe=>b("button",{key:Xe.id,type:"button",class:Be(["tab",{on:i.value===Xe.id}]),role:"tab","aria-selected":i.value===Xe.id,onClick:qe=>Oe(Xe.id)},[W(Ee,{name:Xe.icon,size:"sm"},null,8,["name"]),He(" "+I(v(n)(Xe.labelKey)),1)],10,RPe)),64))],8,BPe),b("div",PPe,[Jn(b("section",FPe,[b("section",jPe,[b("h3",OPe,I(v(n)("settings.appearance")),1),b("div",HPe,[b("span",DPe,I(v(n)("theme.colorSchemeLabel")),1),W(di,{"model-value":e.colorScheme,options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":st[0]||(st[0]=Xe=>s("setColorScheme",Xe))},null,8,["model-value","options"])]),b("div",VPe,[b("span",WPe,I(v(n)("theme.accentLabel")),1),W(di,{"model-value":e.accent,options:[{value:"blue",label:v(n)("theme.accentBlue")},{value:"mono",label:v(n)("theme.accentBlack")}],"onUpdate:modelValue":st[1]||(st[1]=Xe=>s("setAccent",Xe))},null,8,["model-value","options"])]),b("div",qPe,[b("span",UPe,I(v(n)("settings.uiFontSize")),1),W(di,{"model-value":l.value,options:v(QN),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":Ls},null,8,["model-value","options","aria-label"])])]),b("section",ZPe,[b("h3",KPe,I(v(n)("settings.messageFolding")),1),b("div",GPe,[b("span",YPe,[He(I(v(n)("settings.turnFolding"))+" ",1),b("span",XPe,I(v(n)("settings.turnFoldingHint")),1)]),W(wi,{"model-value":e.turnFolding??!0,label:v(n)("settings.turnFolding"),"onUpdate:modelValue":st[2]||(st[2]=Xe=>s("setTurnFolding",Xe))},null,8,["model-value","label"])]),b("div",JPe,[b("span",QPe,[He(I(v(n)("settings.activityRunFolding"))+" ",1),b("span",eFe,I(v(n)("settings.activityRunFoldingHint")),1)]),W(wi,{"model-value":e.activityRunFolding??!0,label:v(n)("settings.activityRunFolding"),"onUpdate:modelValue":st[3]||(st[3]=Xe=>s("setActivityRunFolding",Xe))},null,8,["model-value","label"])])]),b("section",tFe,[b("h3",nFe,I(v(n)("settings.notifications")),1),b("div",oFe,[b("span",sFe,[He(I(v(n)("settings.notifyOnComplete"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",iFe,I(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnComplete"),"onUpdate:modelValue":st[4]||(st[4]=Xe=>s("setNotify",Xe))},null,8,["model-value","disabled","label"])]),b("div",lFe,[b("span",rFe,[He(I(v(n)("settings.notifyOnQuestion"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",aFe,I(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyQuestion,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnQuestion"),"onUpdate:modelValue":st[5]||(st[5]=Xe=>s("setNotifyQuestion",Xe))},null,8,["model-value","disabled","label"])]),b("div",cFe,[b("span",uFe,[He(I(v(n)("settings.notifyOnApproval"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",dFe,I(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyApproval,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnApproval"),"onUpdate:modelValue":st[6]||(st[6]=Xe=>s("setNotifyApproval",Xe))},null,8,["model-value","disabled","label"])]),b("div",fFe,[b("span",pFe,I(v(n)("settings.soundOnComplete")),1),W(wi,{"model-value":e.sound,label:v(n)("settings.soundOnComplete"),"onUpdate:modelValue":st[7]||(st[7]=Xe=>s("setSound",Xe))},null,8,["model-value","label"])])])],512),[[_i,i.value==="general"]]),Jn(b("section",hFe,[b("section",mFe,[b("h3",gFe,I(v(n)("settings.account")),1),b("div",vFe,[b("span",yFe,I(e.authReady?v(n)("settings.providers"):v(n)("sidebar.notSignedIn")),1),W(Cn,{text:e.accountModel},{default:ae(()=>[e.authReady&&e.accountModel?(g(),S("span",wFe,I(e.accountModel),1)):Y("",!0)]),_:1},8,["text"])]),b("div",kFe,[W(Nt,{variant:"secondary",size:"sm",onClick:st[8]||(st[8]=Xe=>{s("openOnboarding"),s("close")})},{default:ae(()=>[He(I(v(n)("onboarding.reopen")),1)]),_:1}),W(Nt,{variant:"primary",size:"sm",onClick:st[9]||(st[9]=Xe=>Oe("providers"))},{default:ae(()=>[He(I(v(n)("settings.manageProviders")),1)]),_:1})])])],512),[[_i,i.value==="account"]]),Jn(b("section",bFe,[W(yPe,{"discard-token":P.value,onDirtyChange:st[10]||(st[10]=Xe=>A.value=Xe)},null,8,["discard-token"])],512),[[_i,i.value==="providers"]]),Jn(b("section",_Fe,[b("section",xFe,[b("div",SFe,[b("h3",CFe,I(v(n)("settings.agentDefaults")),1),e.configSaving?(g(),S("span",MFe,I(v(n)("settings.saving")),1)):Y("",!0)]),e.config?(g(),S(Ce,{key:0},[b("div",AFe,[b("span",TFe,[He(I(v(n)("settings.defaultModel"))+" ",1),b("span",EFe,I(v(n)("settings.defaultModelHint")),1)]),ye.value.length>0?(g(),S("div",IFe,[W(F4,{"model-value":e.config.defaultModel??"",disabled:e.configSaving,"aria-label":v(n)("settings.defaultModel"),"onUpdate:modelValue":Se},{default:ae(()=>[e.config.defaultModel?Y("",!0):(g(),S("option",LFe,I(v(n)("settings.noDefaultModel")),1)),(g(!0),S(Ce,null,rt(ye.value,Xe=>(g(),S("optgroup",{key:Xe.provider,label:Xe.provider},[(g(!0),S(Ce,null,rt(Xe.options,qe=>(g(),S("option",{key:qe.id,value:qe.id},I(qe.label),9,NFe))),128))],8,$Fe))),128))]),_:1},8,["model-value","disabled","aria-label"])])):(g(),S("span",zFe,I(e.config.defaultModel??v(n)("settings.noDefaultModel")),1))]),e.subagentModelPolicy?(g(),S("section",BFe,[b("h3",RFe,I(v(n)("settings.subagentRouting.title")),1),b("div",{class:"routing-modes",role:"radiogroup","aria-label":v(n)("settings.subagentRouting.title")},[(g(),S(Ce,null,rt(Mn,Xe=>b("label",{key:Xe,class:Be(["routing-mode",{on:Nn.value===Xe}])},[b("input",{type:"radio",name:"subagent-routing-mode",value:Xe,checked:Nn.value===Xe,disabled:e.subagentModelPolicySaving,onChange:qe=>Bo(Xe)},null,40,FFe),b("span",jFe,I(v(n)(`settings.subagentRouting.mode.${Xe}`)),1),b("span",OFe,I(v(n)(`settings.subagentRouting.modeHint.${Xe}`)),1)],2)),64))],8,PFe),Nn.value==="default"||Nn.value==="force"?(g(),S("div",HFe,[b("span",DFe,[He(I(v(n)("settings.subagentRouting.model"))+" ",1),b("span",VFe,I(v(n)("settings.subagentRouting.modelHint")),1)]),ye.value.length>0?(g(),ue(zPe,{key:0,"model-value":An.value,effort:Qn.value,groups:ye.value,"model-info-by-id":Hn.value,disabled:e.subagentModelPolicySaving,onInherit:st[11]||(st[11]=Xe=>Bo("inherit")),onSelect:Un},null,8,["model-value","effort","groups","model-info-by-id","disabled"])):(g(),S("span",WFe,I(v(n)("settings.noSecondaryModel")),1))])):Nn.value==="pool"?(g(),S("div",qFe,[b("span",UFe,[He(I(v(n)("settings.subagentRouting.pool"))+" ",1),b("span",ZFe,I(v(n)("settings.subagentRouting.poolHint")),1)]),b("div",KFe,[(g(!0),S(Ce,null,rt(he.value,Xe=>(g(),S("label",{key:Xe.id,class:"pool-item"},[b("input",{type:"checkbox",value:Xe.id,checked:Fn.value.has(Xe.id),disabled:e.subagentModelPolicySaving,onChange:qe=>hs(Xe.id)},null,40,GFe),b("span",YFe,I(Xe.label),1),b("button",{type:"button",class:Be(["pool-default",{on:An.value===Xe.id}]),disabled:!Fn.value.has(Xe.id)||e.subagentModelPolicySaving,onClick:qe=>Io(Xe.id)},I(An.value===Xe.id?v(n)("settings.subagentRouting.poolDefault"):v(n)("settings.subagentRouting.makeDefault")),11,XFe)]))),128))])])):Y("",!0),b("div",JFe,[b("span",QFe,[He(I(v(n)("settings.subagentRouting.saved"))+" ",1),b("span",eje,I(Jo(e.subagentModelPolicy.configuredPolicy)),1)]),b("span",tje,[He(I(v(n)("settings.subagentRouting.effective"))+" ",1),b("span",nje,I(Jo(e.subagentModelPolicy.effectivePolicy)),1)]),e.subagentModelPolicy.feature.enabled?Y("",!0):(g(),S("span",oje,I(v(n)("settings.subagentRouting.featureDisabled")),1))])])):Y("",!0),b("div",sje,[b("span",ije,[He(I(v(n)("settings.defaultPermission"))+" ",1),b("span",lje,I(v(n)("settings.defaultPermissionHint")),1)]),W(di,{"model-value":ve.value,options:E.map(Xe=>({value:Xe,label:v(n)(T[Xe])})),"onUpdate:modelValue":st[12]||(st[12]=Xe=>je(Xe))},null,8,["model-value","options"])]),b("div",rje,[b("span",aje,[He(I(v(n)("settings.defaultThinking"))+" ",1),b("span",cje,I(v(n)("settings.defaultThinkingHint")),1)]),W(wi,{"model-value":le(),disabled:e.configSaving,label:v(n)("settings.defaultThinking"),"onUpdate:modelValue":st[13]||(st[13]=Xe=>fe())},null,8,["model-value","disabled","label"])]),b("div",uje,[b("span",dje,[He(I(v(n)("settings.defaultPlanMode"))+" ",1),b("span",fje,I(v(n)("settings.defaultPlanModeHint")),1)]),W(wi,{"model-value":be(e.config.defaultPlanMode),disabled:e.configSaving,label:v(n)("settings.defaultPlanMode"),"onUpdate:modelValue":st[14]||(st[14]=Xe=>et("defaultPlanMode"))},null,8,["model-value","disabled","label"])]),b("div",pje,[b("span",hje,[He(I(v(n)("settings.mergeSkills"))+" ",1),b("span",mje,I(v(n)("settings.mergeSkillsHint")),1)]),W(wi,{"model-value":be(e.config.mergeAllAvailableSkills),disabled:e.configSaving,label:v(n)("settings.mergeSkills"),"onUpdate:modelValue":st[15]||(st[15]=Xe=>et("mergeAllAvailableSkills"))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",gje,I(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="agent"]]),Jn(b("section",vje,[b("section",yje,[b("h3",wje,I(v(n)("settings.versionAndUpdates")),1),b("div",kje,[b("span",bje,[He(I(v(n)("settings.appVersion"))+" ",1),b("span",_je,I(v(n)("settings.appVersionHint")),1)]),b("span",xje,I(m.value),1)]),b("div",Sje,[b("span",Cje,[He(I(v(n)("settings.serverVersion"))+" ",1),b("span",Mje,I(v(n)("settings.serverVersionHint")),1)]),b("span",Aje,[b("span",Tje,I(x.value),1),W(Dt,{size:"sm",label:nn.value?v(n)("settings.copied"):v(n)("settings.copyServerVersion"),"data-testid":"copy-server-version",onClick:xn},{default:ae(()=>[W(Ee,{name:nn.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",Eje,[b("span",Ije,[He(I(v(n)("settings.serverAddress"))+" ",1),b("span",Lje,I(v(n)("settings.serverAddressHint")),1)]),b("span",$je,[b("span",Nje,I(v(c)),1),W(Dt,{size:"sm",label:Jt.value?v(n)("settings.copied"):v(n)("settings.copyServerAddress"),"data-testid":"copy-server-address",onClick:$n},{default:ae(()=>[W(Ee,{name:Jt.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",zje,[b("span",Bje,I(v(n)("settings.backend")),1),b("span",Rje,I(w.value),1)])]),e.config?(g(),S("section",Pje,[e.config?(g(),S("div",Fje,[b("span",jje,[He(I(v(n)("settings.telemetry"))+" ",1),b("span",Oje,I(v(n)("settings.telemetryHint")),1),b("span",Hje,I(v(n)("settings.telemetryRestartHint")),1)]),W(wi,{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:v(n)("settings.telemetry"),"onUpdate:modelValue":st[16]||(st[16]=Xe=>ge())},null,8,["model-value","disabled","label"])])):Y("",!0)])):Y("",!0),b("section",Dje,[b("h3",Vje,I(v(n)("settings.diagnostics")),1),b("div",Wje,[b("span",qje,[He(I(v(n)("settings.exportLog"))+" ",1),v(pr)()?Y("",!0):(g(),S("span",Uje,I(v(n)("settings.logHint")),1))]),W(Nt,{variant:"secondary",size:"sm",onClick:K},{default:ae(()=>[He(I(v(n)("settings.exportLogBtn")),1)]),_:1})]),b("div",Zje,[b("span",Kje,I(v(n)("settings.copyDetails")),1),W(Nt,{"data-testid":"copy-diagnostics",variant:"secondary",size:"sm",onClick:qt},{default:ae(()=>[He(I(_.value?v(n)("settings.copied"):v(n)("settings.copyDetails")),1)]),_:1})])])],512),[[_i,i.value==="advanced"]]),Jn(b("section",Gje,[v(r)?(g(),S("section",Yje,[b("h3",Xje,I(v(n)("settings.tabs.update")),1),b("div",Jje,[b("div",Qje,[b("div",eOe,[b("span",tOe,[W(Ee,{name:"download",size:"md"})]),b("span",nOe,[b("span",oOe,I(j.value),1),b("span",sOe,I(O.value),1)])]),W(Nt,{"data-testid":"settings-check-update",variant:"secondary",size:"sm",loading:d.value?.status==="checking",disabled:R.value,onClick:Q},{default:ae(()=>[He(I(v(n)("settings.desktop.checkNow")),1)]),_:1},8,["loading","disabled"])]),b("div",iOe,[b("span",lOe,[He(I(v(n)("settings.desktop.updateChannel"))+" ",1),b("span",rOe,I(v(n)("settings.desktop.updateChannelHint")),1)]),b("div",aOe,[W(F4,{"data-testid":"desktop-update-channel",size:"sm","model-value":d.value?.channel??"stable",disabled:M.value,"aria-label":v(n)("settings.desktop.updateChannel"),"onUpdate:modelValue":J},{default:ae(()=>[(g(),S(Ce,null,rt(D,Xe=>b("option",{key:Xe,value:Xe},I(v(n)(`settings.desktop.channels.${Xe}`)),9,cOe)),64))]),_:1},8,["model-value","disabled","aria-label"])])]),b("div",uOe,[b("span",dOe,[He(I(v(n)("settings.desktop.automaticChecks"))+" ",1),b("span",fOe,I(v(n)("settings.desktop.automaticChecksHint")),1)]),W(wi,{"data-testid":"automatic-update-checks","model-value":d.value?.autoUpdate??!1,disabled:f.value||d.value===void 0||d.value.status==="disabled",label:v(n)("settings.desktop.automaticChecks"),"onUpdate:modelValue":ee},null,8,["model-value","disabled","label"])]),b("div",pOe,[b("span",hOe,[He(I(v(n)("settings.desktop.notifyUpdates"))+" ",1),b("span",mOe,I(v(n)("settings.desktop.notifyUpdatesHint")),1)]),W(wi,{"data-testid":"update-notifications","model-value":d.value?.notifyUpdate??!0,disabled:f.value||d.value===void 0,label:v(n)("settings.desktop.notifyUpdates"),"onUpdate:modelValue":se},null,8,["model-value","disabled","label"])]),d.value?.status==="downloading"||q.value||d.value?.availableVersion?(g(),S("div",gOe,[d.value?.status==="downloading"?(g(),S("div",vOe,[H.value===void 0?(g(),S("progress",{key:0,"data-testid":"settings-update-progress",max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,yOe)):(g(),S("progress",{key:1,"data-testid":"settings-update-progress",value:H.value,max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,wOe)),b("span",kOe,I(Z.value||v(n)("settings.desktop.fetching")),1)])):Y("",!0),q.value?(g(),ue(K9,{key:1,variant:"danger"},{default:ae(()=>[He(I(q.value),1)]),_:1})):Y("",!0),b("div",bOe,[d.value?.availableVersion?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",disabled:f.value,onClick:at},{default:ae(()=>[He(I(v(n)("settings.desktop.viewNotes")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"?(g(),ue(Nt,{key:1,variant:"ghost",size:"sm",disabled:f.value,onClick:xe},{default:ae(()=>[He(I(v(n)("settings.desktop.skip")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"||d.value?.status==="error"&&d.value.availableVersion?(g(),ue(Nt,{key:2,"data-testid":"settings-download-update",size:"sm",loading:f.value,onClick:me},{default:ae(()=>[He(I(d.value?.status==="error"?v(n)("settings.desktop.retryDownload"):v(n)("settings.desktop.download")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="skipped"?(g(),ue(Nt,{key:3,size:"sm",loading:f.value,onClick:Ye},{default:ae(()=>[He(I(v(n)("settings.desktop.undoSkip")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="downloaded"?(g(),ue(Nt,{key:4,"data-testid":"settings-restart-update",size:"sm",loading:f.value,onClick:X},{default:ae(()=>[He(I(v(n)("settings.desktop.restartToUpdate")),1)]),_:1},8,["loading"])):Y("",!0)])])):Y("",!0)])])):Y("",!0)],512),[[_i,i.value==="update"]]),Jn(b("section",_Oe,[b("section",xOe,[b("h3",SOe,I(v(n)("settings.tabs.lab")),1),b("div",COe,[b("span",MOe,[He(I(v(n)("settings.conversationToc"))+" ",1),b("span",AOe,I(v(n)("settings.conversationTocHint")),1)]),W(wi,{"model-value":e.conversationToc??!0,label:v(n)("settings.conversationToc"),"onUpdate:modelValue":st[17]||(st[17]=Xe=>s("setConversationToc",Xe))},null,8,["model-value","label"])]),e.config?(g(),S(Ce,{key:0},[b("div",TOe,[b("span",EOe,[He(I(v(n)("settings.lab.sidebarTabs"))+" ",1),b("span",IOe,I(v(n)("settings.lab.sidebarTabsHint")),1),Wn("sidebarTabs")?.externallyControlled?(g(),S("span",LOe,I(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("sidebarTabs")?.overridden?(g(),S("span",$Oe,I(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("sidebarTabs"),disabled:e.configSaving,label:v(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":st[18]||(st[18]=Xe=>Pn("sidebarTabs",Xe))},null,8,["model-value","disabled","label"])]),b("div",NOe,[b("span",zOe,[He(I(v(n)("settings.lab.secondaryModel"))+" ",1),b("span",BOe,I(v(n)("settings.lab.secondaryModelHint")),1),Wn("secondary-model")?.externallyControlled?(g(),S("span",ROe,I(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("secondary-model")?.overridden?(g(),S("span",POe,I(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("secondary-model"),disabled:e.configSaving,label:v(n)("settings.lab.secondaryModel"),"onUpdate:modelValue":st[19]||(st[19]=Xe=>Pn("secondary-model",Xe))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",FOe,I(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="lab"]]),Jn(b("section",jOe,[b("div",OOe,[st[23]||(st[23]=b("div",{class:"panel-kicker"},"Archived sessions",-1)),b("h4",HOe,I(v(n)("settings.archivedTitle")),1),b("p",DOe,I(v(n)("settings.archivedDesc")),1)]),b("div",VOe,[b("label",WOe,[st[24]||(st[24]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("circle",{cx:"11",cy:"11",r:"7"}),b("path",{d:"m21 21-4.3-4.3"})],-1)),Jn(b("input",{"onUpdate:modelValue":st[20]||(st[20]=Xe=>Mt.value=Xe),placeholder:v(n)("settings.archivedSearch")},null,8,qOe),[[js,Mt.value]])]),W(F4,{"model-value":Ft.value,size:"sm","aria-label":v(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":st[21]||(st[21]=Xe=>Ft.value=Xe)},{default:ae(()=>[b("option",UOe,I(v(n)("settings.archivedAllWorkspaces")),1),(g(!0),S(Ce,null,rt(tn.value,Xe=>(g(),S("option",{key:Xe,value:Xe},I(Xe),9,ZOe))),128))]),_:1},8,["model-value","aria-label"]),W(di,{size:"sm","model-value":Ut.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":st[22]||(st[22]=Xe=>Ut.value=Xe)},null,8,["model-value","options"])]),ot.value?(g(),S("div",KOe,I(v(n)("settings.archivedLoadingAll")),1)):(g(),S(Ce,{key:1},[Ro.value.length>0?(g(),S("div",GOe,[(g(!0),S(Ce,null,rt(Ro.value,Xe=>(g(),S("section",{key:Xe.cwd,class:"archive-card"},[b("div",YOe,[st[25]||(st[25]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("path",{d:"M3 7h6l2 2h10v9H3z"}),b("path",{d:"M3 7V5h6l2 2"})],-1)),b("span",XOe,I(Xe.cwd),1),b("span",JOe,I(v(n)("settings.archivedSessionsCount",{count:Xe.items.length})),1)]),b("div",QOe,[(g(!0),S(Ce,null,rt(Xe.items,qe=>(g(),S("div",{key:qe.id,class:"archive-row"},[b("div",eHe,[b("div",tHe,I(qe.title),1),b("div",nHe,I(v(n)("settings.archivedAt",{time:Do(qe.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Pe=>$s(qe.id)},{default:ae(()=>[He(I(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(g(),S("div",oHe,I(Ge.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))],512),[[_i,i.value==="archived"]])])],512)]),_:1},8,["title"]))}}),lHe=vt(iHe,[["__scopeId","data-v-c89555a1"]]),rHe=/^(?:\/|~(?:\/|$)|[A-Za-z]:[\\/]|\\\\)/,uB=/^[A-Za-z]:[\\/]/,aHe=/^\/\/(?!\/)/;function e8(e){return rHe.test(e.trim())}function cHe(e,t){return e==="~"?t||e:e.startsWith("~/")?(t||"~")+e.slice(1):e}function uHe(e){return aHe.test(e)?`//${e.slice(2).replaceAll(/\/{2,}/g,"/")}`:e.replaceAll(/\/{2,}/g,"/")}function dHe(e){return uB.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function fHe(e){return uB.test(e)?3:e.startsWith("\\\\")||e.startsWith("//")?2:e.startsWith("/")?1:0}function sg(e,t){let n=uHe(cHe(e.trim(),t));const o=dHe(n),s=n==="/"||n==="//"||n==="\\\\"||/^[A-Za-z]:[\\/]$/.test(n),i=o?/[\\/]$/.test(n):n.endsWith("/");!s&&i&&(n=n.slice(0,-1));const l=n.lastIndexOf("/"),r=o?n.lastIndexOf("\\"):-1,a=Math.max(l,r),c=r>l?"\\":"/",u=fHe(n),d=ad.value.trim().length>0);let m=0,k=null;const x=B(()=>e8(d.value)),y=V("idle"),w=V(""),_=V("/"),A=V([]),P=V(""),z=V(null),L=V(null),E=B(()=>y.value!=="valid"?null:hHe(d.value,P.value,L.value));let T=0,$=null;function C(se,Q){const me=se.toLowerCase(),xe=Q.toLowerCase();let Ye=0;for(let at=0;at0&&X=SM))break;oe.depth+1{k&&clearTimeout(k),$&&clearTimeout($),T++,y.value="idle",A.value=[],L.value=null;const Q=se.trim();if(Q===""){m++,p.value=[],f.value=!1;return}if(e8(Q)){if(m++,p.value=[],f.value=!1,r.value)return;y.value="checking",$=setTimeout(()=>void H(Q),150);return}k=setTimeout(()=>void j(se),220)});async function H(se){const Q=++T;y.value="checking",L.value=null;const me=sg(se,P.value),{target:xe}=me;try{const at=await o.browseFs(xe);if(Q!==T)return;if(at.path){y.value="valid",A.value=[],L.value=xe,a.value=at.path,c.value=at.parent,u.value=at.entries,r.value=!1;return}}catch{}if(Q!==T)return;const Ye=me.base.toLowerCase();w.value=me.parent,_.value=me.separator;try{const at=await o.browseFs(me.parent);if(Q!==T)return;if(at.path){A.value=at.entries.filter(X=>X.isDir&&X.name.toLowerCase().startsWith(Ye)),y.value="not-found";return}}catch{}Q===T&&(A.value=[],y.value="bad-parent")}function D(se){d.value=pHe(w.value,se,_.value),z.value?.focus()}const M=B(()=>r.value?n("workspace.degradedPlaceholder"):n("workspace.searchPlaceholder")),R=B(()=>r.value?n("workspace.degradedHint"):x.value&&y.value==="valid"?n("workspace.pathFollowHint"):n("workspace.browseHint"));function O(se){if(se.key==="Escape"){d.value?d.value="":s("close");return}if(se.key!=="Enter")return;const Q=d.value.trim();if(e8(Q)){if(se.preventDefault(),r.value){const{target:me}=sg(Q,P.value);me&&s("add",me);return}y.value==="valid"?J():y.value==="not-found"&&A.value[0]&&D(A.value[0].name)}}const U=B(()=>{const se=a.value;if(!se)return[];const Q=se.split("/").filter(Boolean),me=[{label:"/",path:"/"}];let xe="";for(const Ye of Q)xe+=`/${Ye}`,me.push({label:Ye,path:xe});return me}),Z=B(()=>!(a.value.length===0||x.value&&E.value===null));async function q(se){l.value=!0;try{const Q=await o.browseFs(se);if(!Q.path){r.value=!0;return}a.value=Q.path,c.value=Q.parent,u.value=Q.entries,d.value="",r.value=!1}catch{r.value=!0}finally{l.value=!1}}function te(se){se.isDir&&q(se.path)}function ee(){c.value&&q(c.value)}function J(){Z.value&&s("add",E.value??a.value)}return In(async()=>{l.value=!0;try{const se=await o.getFsHome().catch(()=>({home:"",recentRoots:[]}));if(se.home&&(P.value=se.home),o.defaultPath&&(await q(o.defaultPath),!r.value))return;P.value?await q(P.value):r.value=!0}catch{r.value=!0}finally{l.value=!1}}),En(()=>{k&&clearTimeout(k),$&&clearTimeout($)}),(se,Q)=>(g(),ue(Z0,{open:i.value,"onUpdate:open":Q[2]||(Q[2]=me=>i.value=me),title:v(n)("workspace.addTitle"),size:"lg",height:"fixed",onClose:Q[3]||(Q[3]=me=>s("close"))},{default:ae(()=>[b("div",mHe,[r.value?Y("",!0):(g(),S("div",gHe,[W(Dt,{size:"sm",disabled:!c.value,label:v(n)("workspace.up"),onClick:ee},{default:ae(()=>[W(Ee,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),b("div",vHe,[(g(!0),S(Ce,null,rt(U.value,(me,xe)=>(g(),S(Ce,{key:me.path},[xe>1?(g(),S("span",yHe,"/")):Y("",!0),b("button",{class:Be(["crumb",{last:xe===U.value.length-1}]),onClick:Ye=>q(me.path)},I(me.label),11,wHe)],64))),128))])])),!l.value||r.value?(g(),S("div",{key:1,class:Be(["filterbar",{"has-error":y.value==="not-found"||y.value==="bad-parent"}])},[W(Ee,{class:"filter-icon",name:"search",size:"md"}),Jn(b("input",{ref_key:"filterEl",ref:z,"onUpdate:modelValue":Q[0]||(Q[0]=me=>d.value=me),class:"filter-input",type:"text",placeholder:M.value,autocomplete:"off",spellcheck:"false",onKeydown:xt(O,["stop"])},null,40,kHe),[[js,d.value]]),f.value||y.value==="checking"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0)],2)):Y("",!0),r.value?(g(),S("div",RHe,I(v(n)("workspace.degradedHint")),1)):(g(),S("div",bHe,[l.value?(g(),S("div",_He,I(v(n)("workspace.browsing")),1)):x.value&&y.value!=="valid"?(g(),S(Ce,{key:1},[y.value==="checking"?(g(),S("div",xHe,I(v(n)("workspace.checkingPath")),1)):y.value==="not-found"?(g(),S(Ce,{key:1},[A.value.length>0?(g(),S("div",SHe,I(v(n)("workspace.pathPickHint")),1)):Y("",!0),(g(!0),S(Ce,null,rt(A.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>D(me.name)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",MHe,I(me.name),1)],8,CHe))),128)),A.value.length===0?(g(),S("div",AHe,I(v(n)("workspace.noPathMatch",{parent:w.value})),1)):Y("",!0)],64)):y.value==="bad-parent"?(g(),S("div",THe,I(v(n)("workspace.badParent",{parent:w.value})),1)):Y("",!0)],64)):h.value&&!x.value?(g(),S(Ce,{key:2},[(g(!0),S(Ce,null,rt(p.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>q(me.path)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",IHe,I(me.rel),1)],8,EHe))),128)),!f.value&&p.value.length===0?(g(),S("div",LHe,I(v(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(g(),S("div",$He,I(v(n)("workspace.searching")),1)):Y("",!0)],64)):(g(),S(Ce,{key:3},[(g(!0),S(Ce,null,rt(u.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>te(me)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",zHe,I(me.name),1)],8,NHe))),128)),u.value.length===0?(g(),S("div",BHe,I(v(n)("workspace.noSubfolders")),1)):Y("",!0)],64))])),e.error?(g(),S("div",PHe,I(e.error),1)):Y("",!0),b("div",FHe,[W(Cn,{text:a.value},{default:ae(()=>[r.value?Y("",!0):(g(),ue(Nt,{key:0,variant:"primary",disabled:!Z.value,onClick:J},{default:ae(()=>[He(I(v(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),W(Nt,{variant:"secondary",onClick:Q[1]||(Q[1]=me=>s("close"))},{default:ae(()=>[He(I(v(n)("workspace.cancel")),1)]),_:1})]),b("div",jHe,I(R.value),1)])]),_:1},8,["open","title"]))}}),VHe=vt(DHe,[["__scopeId","data-v-09b74e91"]]),WHe={key:0,class:"confirm-dialog__message"},qHe=Je({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(){n.loading||(o("update:open",!1),o("cancel"))}function l(r){if(r.key!=="Enter"||!n.open||n.loading)return;const a=r.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(r.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",l),vo(()=>{typeof window<"u"&&window.removeEventListener("keydown",l)}),(r,a)=>(g(),ue(Z0,{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=c=>o("update:open",c)),onClose:i},{foot:ae(()=>[W(Nt,{variant:"secondary",disabled:e.loading,onClick:i},{default:ae(()=>[He(I(e.cancelLabel??v(s)("common.cancel")),1)]),_:1},8,["disabled"]),W(Nt,{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=c=>o("confirm"))},{default:ae(()=>[He(I(e.confirmLabel??v(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:ae(()=>[e.message?(g(),S("p",WHe,I(e.message),1)):Y("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),UHe=vt(qHe,[["__scopeId","data-v-074405fe"]]),ZHe=Je({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=z1();function i(){s()}return(l,r)=>(g(),ue(UHe,{open:v(t)!==null,title:v(t)?.title??"",message:v(t)?.message,"confirm-label":v(t)?.confirmLabel,"cancel-label":v(t)?.cancelLabel,variant:v(t)?.variant,loading:v(n),onConfirm:i,onCancel:r[0]||(r[0]=a=>v(o)(!1))},null,8,["open","title","message","confirm-label","cancel-label","variant","loading"]))}}),KHe={class:"rows"},GHe={class:"row"},YHe={class:"row"},XHe={class:"row"},JHe={class:"row"},QHe={class:"row"},eDe={class:"row"},tDe={class:"ctx-text"},nDe={key:0,class:"bar"},oDe={class:"row"},sDe=Je({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(!0),l=B(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),r=B(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:ba(o.status.ctxUsed),max:ba(o.status.ctxMax),pct:l.value}):n("status.statusNone"));function a(h){return n(h==="yolo"?"status.permissionYolo":h==="auto"?"status.permissionAuto":"status.permissionManual")}const c=B(()=>{const h=o.status.permission;return h==="yolo"?"var(--color-warning)":h==="auto"?"var(--color-danger)":"var(--color-text)"}),u=B(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=B(()=>o.dynamicWorkflowMode?n("status.dynamicWorkflowOn"):n("status.dynamicWorkflowOff")),f=B(()=>typeof o.costUsd=="number"&&o.costUsd>0),p=B(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(h,m)=>(g(),ue(Z0,{open:i.value,"onUpdate:open":m[0]||(m[0]=k=>i.value=k),title:v(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=k=>s("close"))},{default:ae(()=>[b("dl",KHe,[b("div",GHe,[b("dt",null,I(v(n)("status.statusModel")),1),b("dd",null,I(e.status.model),1)]),b("div",YHe,[b("dt",null,I(v(n)("status.statusThinking")),1),b("dd",null,I(e.thinking),1)]),b("div",XHe,[b("dt",null,I(v(n)("status.statusPermission")),1),b("dd",{style:Gt({color:c.value})},I(a(e.status.permission)),5)]),b("div",JHe,[b("dt",null,I(v(n)("status.statusPlanMode")),1),b("dd",{class:Be({"plan-on":e.planMode})},I(u.value),3)]),b("div",QHe,[b("dt",null,I(v(n)("status.statusDynamicWorkflowMode")),1),b("dd",{class:Be({"workflow-on":e.dynamicWorkflowMode})},I(d.value),3)]),b("div",eDe,[b("dt",null,I(v(n)("status.statusContext")),1),b("dd",null,[b("span",tDe,I(r.value),1),e.status.ctxMax>0?(g(),S("span",nDe,[b("i",{style:Gt({width:l.value+"%"})},null,4)])):Y("",!0)])]),b("div",oDe,[b("dt",null,I(v(n)("status.statusCost")),1),b("dd",null,I(p.value),1)])])]),_:1},8,["open","title"]))}}),iDe=vt(sDe,[["__scopeId","data-v-7992546c"]]),lDe={key:0,class:"actions"},rDe=["onClick"],aDe=["onClick"],cDe={key:1,class:"details"},uDe=Je({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(E){return typeof E=="object"&&E!==null}function l(E){return i(E)?E.title:E}function r(E){return i(E)?E.message??"":""}function a(E){return i(E)?E.details:void 0}function c(E){return i(E)?E.severity==="error":E.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|failed/i.test(E)}function u(E){if(!i(E))return c(E)?"danger":"warning";switch(E.severity){case"error":case"danger":return"danger";case"success":return"success";case"info":return"info";default:return"warning"}}function d(E){return i(E)?`notice:${E.severity}:${E.title}:${E.message??""}:${JSON.stringify(E.details??[])}`:`text:${E}`}function f(E){if(!i(E))return E;const T=[E.title];E.message&&T.push(E.message);const $=E.details??[];if($.length>0){T.push("",`${s("warnings.diagnostics")}:`);for(const C of $)T.push(`${C.label}: ${C.value}`)}return T.join(` +`)}let p=1;const h=V([]),m=new Map,k=new Map;function x(E){const T=c(E)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?T+5e3:T}function y(E,T){const $=m.get(E)??{handle:null,deadline:0,remaining:0};$.handle=setTimeout(()=>L(E),T),$.deadline=Date.now()+T,m.set(E,$)}function w(E){const T=m.get(E);T&&T.handle!==null&&clearTimeout(T.handle),m.delete(E)}function _(E){const T=m.get(E);!T||T.handle===null||(clearTimeout(T.handle),T.handle=null,T.remaining=Math.max(0,T.deadline-Date.now()))}function A(E){if(h.value.find(C=>C.id===E)?.detailsOpen)return;const $=m.get(E);!$||$.handle!==null||y(E,$.remaining)}function P(E){E.detailsOpen=!E.detailsOpen,E.detailsOpen?_(E.id):A(E.id)}async function z(E){if(!await fs(f(E.warning)))return;E.copied=!0;const $=k.get(E.id);$&&clearTimeout($),k.set(E.id,setTimeout(()=>{E.copied=!1,k.delete(E.id)},1400))}function L(E){w(E);const T=k.get(E);T&&clearTimeout(T),k.delete(E);const $=h.value.findIndex(C=>C.id===E);$!==-1&&(h.value=h.value.filter(C=>C.id!==E),o("dismiss",$))}return Ke(()=>n.warnings,E=>{const T=[...h.value];h.value=E.map($=>{const C=d($),j=T.findIndex(M=>M.key===C),H=j===-1?void 0:T.splice(j,1)[0];if(H)return H.warning=$,H;const D={id:p++,key:C,warning:$,detailsOpen:!1,copied:!1};return y(D.id,x($)),D});for(const $ of T){w($.id);const C=k.get($.id);C&&clearTimeout(C),k.delete($.id)}},{immediate:!0,flush:"post"}),En(()=>{m.forEach(E=>{E.handle!==null&&clearTimeout(E.handle)}),m.clear(),k.forEach(E=>clearTimeout(E)),k.clear()}),(E,T)=>(g(),ue(FF,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:ae(()=>[(g(!0),S(Ce,null,rt(h.value,$=>(g(),ue(Gz,{key:$.id,variant:u($.warning),title:l($.warning),message:r($.warning),"dismiss-label":v(s)("warnings.dismiss"),onDismiss:C=>L($.id),onPointerenter:C=>_($.id),onPointerleave:C=>A($.id)},{default:ae(()=>[a($.warning)?.length?(g(),S("div",lDe,[b("button",{class:"link",type:"button",onClick:C=>P($)},I($.detailsOpen?v(s)("warnings.hideDetails"):v(s)("warnings.showDetails")),9,rDe),b("button",{class:"link",type:"button",onClick:C=>z($)},I($.copied?v(s)("warnings.copied"):v(s)("warnings.copyDetails")),9,aDe)])):Y("",!0),$.detailsOpen&&a($.warning)?.length?(g(),S("dl",cDe,[(g(!0),S(Ce,null,rt(a($.warning),C=>(g(),S("div",{key:`${C.label}:${C.value}`,class:"detail-row"},[b("dt",null,I(C.label),1),b("dd",null,I(C.value),1)]))),128))])):Y("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),dDe=vt(uDe,[["__scopeId","data-v-6d8f28b8"]]),fDe={class:"update-dialog__head"},pDe={class:"update-dialog__brand","data-testid":"update-dialog-brand"},hDe={class:"update-dialog__titles"},mDe={class:"update-dialog__title","data-testid":"update-dialog-title"},gDe={key:0,class:"update-dialog__date","data-testid":"update-dialog-date"},vDe={key:0,class:"update-dialog__progress"},yDe={class:"update-dialog__progress-row"},wDe={class:"update-dialog__progress-label"},kDe={class:"update-dialog__progress-meta","data-testid":"update-dialog-progress-meta"},bDe={key:0,"data-testid":"update-dialog-bytes"},_De={key:1},xDe=["aria-label"],SDe=["value","aria-label"],CDe={key:2,class:"update-dialog__message","data-testid":"update-dialog-message"},MDe=Je({__name:"UpdateDialog",setup(e){const{t}=$t(),n=eE();In(()=>n.subscribe()),En(()=>n.unsubscribe());const o=B(()=>n.availableVersion.value??""),s=B(()=>n.status.value==="downloading"?t("update.dialogDownloading",{version:o.value}):n.status.value==="downloaded"?t("update.dialogReady",{version:o.value}):n.status.value==="error"?t("update.failed"):t("update.dialogAvailable",{version:o.value})),i=B(()=>{const d=n.state.value?.releaseDate;if(d===void 0)return"";const f=new Date(d);return Number.isNaN(f.getTime())?"":new Intl.DateTimeFormat(void 0,{dateStyle:"long"}).format(f)}),l=B(()=>{const d=n.state.value?.transferred;return d===void 0?void 0:Uk(d)}),r=B(()=>{const d=n.state.value?.total;return d===void 0?void 0:Uk(d)}),a=B(()=>n.status.value==="error"?n.state.value?.message??t("update.failedMessage"):n.status.value==="downloaded"?t("update.restart"):t("update.prompt")),c=B(()=>n.status.value!=="downloading");function u(){c.value&&n.closeDialog()}return(d,f)=>(g(),ue(Z0,{open:v(n).dialogOpen.value,title:s.value,description:i.value||void 0,"close-on-overlay":c.value,"close-on-esc":c.value,"show-close":!1,size:"md-wide",onClose:u},{head:ae(()=>[b("div",fDe,[b("span",pDe,[W(df,{size:"sm",animated:!1})]),b("div",hDe,[b("div",mDe,I(s.value),1),i.value?(g(),S("div",gDe,[W(Ee,{name:"calendar-schedule",size:"sm","aria-hidden":"true"}),b("span",null,I(i.value),1)])):Y("",!0)])])]),foot:ae(()=>[v(n).status.value==="downloading"?(g(),ue(Nt,{key:0,"data-testid":"cancel-update-download",variant:"secondary",loading:v(n).busy.value,onClick:f[1]||(f[1]=p=>void v(n).cancelDownload())},{default:ae(()=>[He(I(v(t)("update.cancelDownload")),1)]),_:1},8,["loading"])):v(n).status.value==="downloaded"?(g(),S(Ce,{key:1},[W(Nt,{"data-testid":"later-update",variant:"ghost",onClick:u},{default:ae(()=>[He(I(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"restart-to-update",loading:v(n).busy.value,onClick:f[2]||(f[2]=p=>void v(n).restart())},{default:ae(()=>[He(I(v(t)("update.restartAction")),1)]),_:1},8,["loading"])],64)):v(n).status.value==="error"?(g(),S(Ce,{key:2},[W(Nt,{"data-testid":"dismiss-update",variant:"ghost",onClick:u},{default:ae(()=>[He(I(v(t)("update.dismiss")),1)]),_:1}),W(Nt,{"data-testid":"retry-update",loading:v(n).busy.value,onClick:f[3]||(f[3]=p=>void v(n).retry())},{default:ae(()=>[He(I(v(t)("update.retryDownload")),1)]),_:1},8,["loading"])],64)):(g(),S(Ce,{key:3},[W(Nt,{"data-testid":"skip-update",variant:"secondary",onClick:f[4]||(f[4]=p=>void v(n).skip())},{default:ae(()=>[He(I(v(t)("update.skip")),1)]),_:1}),f[6]||(f[6]=b("span",{class:"update-dialog__foot-spacer"},null,-1)),W(Nt,{"data-testid":"later-update",variant:"secondary",onClick:u},{default:ae(()=>[He(I(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"download-update",loading:v(n).busy.value,onClick:f[5]||(f[5]=p=>void v(n).download())},{default:ae(()=>[He(I(v(t)("update.download")),1)]),_:1},8,["loading"])],64))]),default:ae(()=>[v(n).status.value==="downloading"?(g(),S("div",vDe,[b("div",yDe,[b("span",wDe,I(v(t)("update.downloadProgress")),1),b("span",kDe,[l.value&&r.value?(g(),S("span",bDe,I(v(t)("update.bytesProgress",{transferred:l.value,total:r.value})),1)):(g(),S("span",_De,I(v(t)("update.fetching")),1))])]),v(n).percent.value===void 0?(g(),S("progress",{key:0,"data-testid":"update-dialog-progress",max:"100","aria-label":v(t)("update.progressLabel")},null,8,xDe)):(g(),S("progress",{key:1,"data-testid":"update-dialog-progress",value:v(n).percent.value,max:"100","aria-label":v(t)("update.progressLabel")},null,8,SDe))])):v(n).status.value==="available"?(g(),ue(D2,{key:1,"data-testid":"automatic-update-preference","model-value":v(n).state.value?.autoUpdate??!1,disabled:v(n).busy.value,"onUpdate:modelValue":f[0]||(f[0]=p=>void v(n).setAutomaticChecks(p))},{default:ae(()=>[He(I(v(t)("update.automaticChecks")),1)]),_:1},8,["model-value","disabled"])):(g(),S("p",CDe,I(a.value),1))]),_:1},8,["open","title","description","close-on-overlay","close-on-esc"]))}}),ADe=vt(MDe,[["__scopeId","data-v-13aac9b0"]]),TDe={class:"ui-action-toast-host"},EDe={class:"ui-action-toast__body"},IDe=Je({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t();let s=null,i=0,l=e.duration;function r(u){if(u<=0){n("dismiss",e.dismissToken);return}s=setTimeout(()=>n("dismiss",e.dismissToken),u),i=Date.now()+u}function a(){s!==null&&(clearTimeout(s),s=null,l=Math.max(0,i-Date.now()))}function c(){s===null&&r(l)}return r(e.duration),En(()=>{s!==null&&clearTimeout(s)}),(u,d)=>(g(),S("div",TDe,[b("div",{class:"ui-action-toast",role:"status",onPointerenter:a,onPointerleave:c},[b("span",EDe,[jn(u.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??v(o)("common.dismiss"),onClick:d[0]||(d[0]=f=>n("dismiss",e.dismissToken))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),t8=vt(IDe,[["__scopeId","data-v-9efa207b"]]),LDe={key:0,class:"window-controls"},$De=["aria-label"],NDe=["aria-label"],zDe=["aria-label"],BDe=Je({__name:"WindowControls",setup(e){const{t}=$t(),n=B(()=>window.pythinkerDesktop?.platform==="win32");function o(){window.pythinkerDesktop?.minimizeWindow()}function s(){window.pythinkerDesktop?.toggleMaximizeWindow()}function i(){window.pythinkerDesktop?.closeWindow()}return(l,r)=>n.value?(g(),S("div",LDe,[b("button",{type:"button",class:"wc wc-min","aria-label":v(t)("app.minimizeWindow"),onClick:o},[...r[0]||(r[0]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M2.5 5h5"})],-1)])],8,$De),b("button",{type:"button",class:"wc wc-max","aria-label":v(t)("app.maximizeWindow"),onClick:s},[...r[1]||(r[1]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round","aria-hidden":"true"},[b("rect",{x:"2.4",y:"2.4",width:"5.2",height:"5.2",rx:"1"})],-1)])],8,NDe),b("button",{type:"button",class:"wc wc-close","aria-label":v(t)("app.closeWindow"),onClick:i},[...r[2]||(r[2]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M3 3l4 4M7 3l-4 4"})],-1)])],8,zDe)])):Y("",!0)}}),RDe=vt(BDe,[["__scopeId","data-v-768f9703"]]),PDe={class:"topbar"},FDe={class:"wsq"},jDe=["aria-label"],ODe={class:"tb-path"},HDe={class:"ws"},DDe={class:"se"},VDe={class:"tb-sub"},WDe=Je({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=B(()=>{const a=o.workspace,u=(a?.name||a?.root||"").trim().charAt(0);return u?u.toUpperCase():"K"}),l=B(()=>o.workspace?.name??n("workspace.noWorkspace")),r=B(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,c)=>(g(),S("div",PDe,[b("span",FDe,I(i.value),1),b("button",{type:"button",class:"tb-mid","aria-label":v(n)("mobile.openSwitcher"),onClick:c[0]||(c[0]=u=>s("openSwitcher"))},[b("span",ODe,[b("span",HDe,I(l.value),1),e.sessionTitle?(g(),S(Ce,{key:0},[c[2]||(c[2]=b("span",{class:"sl"},"/",-1)),b("span",DDe,I(e.sessionTitle),1)],64)):Y("",!0),c[3]||(c[3]=b("span",{class:"cv"},"⌄",-1))]),b("span",VDe,[b("span",{class:Be(["rd",{on:e.running}])},null,2),b("span",null,I(r.value),1),e.branch?(g(),S(Ce,{key:0},[He(" · "+I(e.branch),1)],64)):Y("",!0),e.sessionCount>0?(g(),S(Ce,{key:1},[He(" · "+I(v(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):Y("",!0)])],8,jDe),W(Dt,{size:"lg",label:v(n)("mobile.openSettings"),onClick:c[1]||(c[1]=u=>s("openSettings"))},{default:ae(()=>[W(Ee,{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),qDe=vt(WDe,[["__scopeId","data-v-27a83eb2"]]),UDe={class:"mlist"},ZDe={key:0,class:"mempty"},KDe=["onClick"],GDe={class:"mgh-main"},YDe={class:"mgh-name"},XDe={class:"mgh-path"},JDe={key:2,class:"att"},QDe={key:0,class:"mempty small"},eVe=["onClick"],tVe={class:"m"},nVe={class:"s"},oVe={key:0,class:"att"},sVe=["disabled","onClick"],iVe=["onClick"],lVe=Je({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(){s("update:modelValue",!1)}function l($){s("select",$),i()}function r($){s("createInWorkspace",$),i()}function a(){s("create"),i()}function c(){s("addWorkspace"),i()}const u=V(new Set);function d($){return u.value.has($)}function f($){const C=new Set(u.value);C.has($)?C.delete($):C.add($),u.value=C,w.value=null,z.value=null}const p=V(new Set);function h($){return p.value.has($)}function m($){const C=new Set(p.value);C.has($)?C.delete($):C.add($),p.value=C}function k($){if(h($.workspace.id))return $.sessions;const C=$.sessions.slice(0,$.initialCount);if(o.activeId&&!C.some(j=>j.id===o.activeId)){const j=$.sessions.find(H=>H.id===o.activeId);if(j)return[...C,j]}return C}function x($){if(!p.value.has($)){const C=new Set(p.value);C.add($),p.value=C}s("loadMore",$)}function y($){return o.attentionByWorkspace[$]??0}const w=V(null);function _($){w.value=w.value===$?null:$,z.value=null}function A($){w.value=null;const j=(typeof window<"u"?window.prompt(n("sidebar.rename"),$.title):null)?.trim();j&&s("rename",$.id,j)}function P($){w.value=null,s("archive",$)}const z=V(null);function L($){z.value=z.value===$?null:$,w.value=null}function E($){fs($.root),z.value=null}function T($){z.value=null,s("deleteWorkspace",$.id)}return($,C)=>(g(),ue(wu,{"model-value":e.modelValue,"onUpdate:modelValue":C[2]||(C[2]=j=>s("update:modelValue",j))},{default:ae(()=>[b("button",{type:"button",class:"newrow",onClick:a},[W(Ee,{name:"message",size:"sm"}),He(" "+I(v(n)("sidebar.newChat")),1)]),b("button",{type:"button",class:"newrow secondary",onClick:c},[W(Ee,{name:"folder",size:"sm"}),He(" "+I(v(n)("sidebar.newWorkspace")),1)]),b("div",UDe,[e.groups.length===0?(g(),S("div",ZDe,I(v(n)("workspace.noWorkspace")),1)):Y("",!0),(g(!0),S(Ce,null,rt(e.groups,j=>(g(),S("div",{key:j.workspace.id,class:"mgroup"},[b("div",{class:Be(["mgh",{on:j.workspace.id===e.activeWorkspaceId}]),onClick:H=>f(j.workspace.id)},[d(j.workspace.id)?(g(),ue(Ee,{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(g(),ue(Ee,{key:1,class:"mgh-folder",name:"folder",size:"sm"})),b("div",GDe,[b("span",YDe,I(j.workspace.name),1),W(Cn,{text:j.workspace.root},{default:ae(()=>[b("span",XDe,I(j.workspace.shortPath),1)]),_:2},1032,["text"])]),d(j.workspace.id)&&y(j.workspace.id)>0?(g(),S("span",JDe,I(y(j.workspace.id)),1)):Y("",!0),W(Dt,{size:"lg",class:"mgh-more",label:v(n)("sidebar.options"),onClick:xt(H=>L(j.workspace.id),["stop"])},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),W(Dt,{size:"lg",class:"mgh-add",label:v(n)("workspace.newInGroup"),onClick:xt(H=>r(j.workspace.id),["stop"])},{default:ae(()=>[W(Ee,{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),z.value===j.workspace.id?(g(),ue(zr,{key:3,class:"kmenu wsmenu",onClick:C[0]||(C[0]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:H=>E(j.workspace)},{default:ae(()=>[He(I(v(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:H=>T(j.workspace)},{default:ae(()=>[He(I(v(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,KDe),Jn(b("div",null,[j.sessions.length===0?(g(),S("div",QDe,I(v(n)("sidebar.noSessions")),1)):Y("",!0),(g(!0),S(Ce,null,rt(k(j),H=>(g(),S("div",{key:H.id,class:Be(["srow",{cur:H.id===e.activeId}]),onClick:D=>l(H.id)},[b("div",tVe,[b("div",{class:Be(["t",{run:H.busy,aborted:!H.busy&&(e.attentionBySession[H.id]??0)===0&&(H.lastTurnReason==="cancelled"||H.lastTurnReason==="failed")}])},I(H.title),3),b("div",nVe,I(H.time),1)]),(e.attentionBySession[H.id]??0)>0?(g(),S("span",oVe,I(e.attentionBySession[H.id]),1)):Y("",!0),W(Dt,{size:"lg",class:"kb",label:v(n)("sidebar.options"),onClick:xt(D=>_(H.id),["stop"])},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),w.value===H.id?(g(),ue(zr,{key:1,class:"kmenu",onClick:C[1]||(C[1]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:D=>A(H)},{default:ae(()=>[He(I(v(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:D=>P(H.id)},{default:ae(()=>[He(I(v(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,eVe))),128)),j.hasMore||j.loadingMore?(g(),S("button",{key:1,type:"button",class:"mshow-more",disabled:j.loadingMore,onClick:xt(H=>x(j.workspace.id),["stop"])},I(j.loadingMore?v(n)("sidebar.loadingMore"):v(n)("sidebar.showMore",{count:Math.max(0,j.workspace.sessionCount-j.sessions.length)})),9,sVe)):Y("",!0),j.sessions.length>j.initialCount?(g(),S("button",{key:2,type:"button",class:"mshow-more",onClick:xt(H=>m(j.workspace.id),["stop"])},I(h(j.workspace.id)?v(n)("sidebar.showLess"):v(n)("sidebar.showAll",{count:j.sessions.length-j.initialCount})),9,iVe)):Y("",!0)],512),[[_i,!d(j.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),rVe=vt(lVe,[["__scopeId","data-v-4c7bceaf"]]),aVe={class:"group-title"},cVe={class:"srow-main"},uVe={class:"srow-label"},dVe={class:"srow-sub"},fVe={class:"srow read-only"},pVe={class:"srow-main"},hVe={class:"srow-label"},mVe={key:0,class:"srow-sub"},gVe={class:"cache-note"},vVe={class:"srow-main"},yVe={class:"srow-label"},wVe={class:"srow-sub"},kVe=["aria-checked"],bVe={key:0,class:"srow read-only"},_Ve={class:"srow-main"},xVe={class:"srow-label"},SVe={class:"srow-sub"},CVe={class:"goal-actions"},MVe=["aria-checked"],AVe={class:"srow-main"},TVe={class:"srow-label"},EVe={class:"srow-sub"},IVe=["aria-checked"],LVe={class:"srow-main"},$Ve={class:"srow-label"},NVe={class:"srow-sub"},zVe={class:"srow-main"},BVe={class:"srow-label"},RVe={class:"srow read-only"},PVe={class:"srow-main"},FVe={class:"srow-label"},jVe={class:"srow-sub"},OVe=["aria-label"],HVe={class:"group-title"},DVe={class:"srow-main"},VVe={class:"srow-label"},WVe={class:"srow-sub"},qVe={class:"srow read-only pref"},UVe={class:"srow-main"},ZVe={class:"srow-label"},KVe={class:"srow read-only pref"},GVe={class:"srow-main"},YVe={class:"srow-label"},XVe={class:"srow-main"},JVe={class:"srow-label"},QVe={class:"srow-sub"},eWe=["aria-checked"],tWe={class:"srow-main"},nWe={class:"srow-label"},oWe={key:2,class:"srow read-only"},sWe={class:"srow-main"},iWe={class:"srow-label"},lWe={class:"srow-val dim"},rWe={class:"arch-subhead"},aWe={class:"arch-count"},cWe={class:"arch-tools"},uWe={key:0,class:"arch-empty"},dWe={class:"arch-meta"},fWe={class:"arch-name"},pWe={class:"arch-time"},hWe={key:2,class:"arch-empty"},mWe=100,gWe=Je({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goal:{default:null},dynamicWorkflowMode:{type:Boolean},colorScheme:{default:"system"},uiFontSize:{default:14},conversationToc:{type:Boolean},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleWorkflow","toggleGoal","controlGoal","setPermission","setColorScheme","setUiFontSize","setConversationToc","login"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{confirm:i}=z1();function l(Q){s("setColorScheme",Q)}const r=["manual","yolo","auto"],a=B(()=>o.models?.find(Q=>Q.id===o.status?.modelId)),c=B(()=>i6(a.value)),u=B(()=>l6(a.value)),d=B(()=>w9(a.value,o.thinking)),f=B(()=>u.value.includes(d.value)?d.value:""),p=B(()=>u.value.map(Q=>({value:Q,label:rf(Q)}))),h=B(()=>o.planMode===!0),m=B(()=>o.goalMode===!0),k=B(()=>o.goal!==null&&["active","paused","blocked"].includes(o.goal?.status??"")),x=B(()=>{const Q=o.goal?.status;return Q?n(`status.goalStatus${Q[0].toUpperCase()}${Q.slice(1)}`):""});async function y(){await i({title:n("status.goalCancel"),message:n("status.goalCancelConfirm"),confirmLabel:n("status.goalCancelConfirmYes"),cancelLabel:n("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const w=B(()=>b9(o.uiFontSize));function _(Q){const me=oz(Q);me!==void 0&&s("setUiFontSize",me)}const A=B(()=>{const Q=o.status.permission;return Q==="yolo"?"var(--color-warning)":Q==="auto"?"var(--color-danger)":"var(--color-text-muted)"}),P=B(()=>{const Q=o.status.permission,me=n(Q==="yolo"?"mobile.permYoloSub":Q==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${Q} · ${me}`}),z=B(()=>o.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100))):0),L=B(()=>o.status.ctxMax>0?`${ba(o.status.ctxUsed)}/${ba(o.status.ctxMax)}`:n("status.statusNone"));function E(Q){s("setThinking",XN(a.value,Q))}function T(){const Q=r.indexOf(o.status.permission),me=r[(Q+1)%r.length];s("setPermission",me)}function $(){s("pickModel"),s("update:modelValue",!1)}function C(){s("login"),s("update:modelValue",!1)}const j=R1(),H=V("main"),D=V([]),M=V(!1),R=V(!1),O=V(""),U=V("archived-desc");async function Z(){if(!M.value){M.value=!0,R.value=!1;try{const Q=[];let me;for(;;){const xe=await j.loadArchivedSessions({beforeId:me,pageSize:mWe});if(Q.push(...xe.items),!xe.hasMore||xe.items.length===0)break;const Ye=xe.items.at(-1)?.id;if(Ye===void 0)break;me=Ye}D.value=Q,R.value=!0}catch(Q){console.warn("loadAllArchived failed",Q)}finally{M.value=!1}}}function q(){H.value="archived",O.value="",Z()}function te(){H.value="main"}const ee=B(()=>{const Q=O.value.trim().toLowerCase();let me=D.value.filter(xe=>xe.archived===!0);return Q&&(me=me.filter(xe=>xe.title.toLowerCase().includes(Q))),me=me.slice(),U.value==="archived-desc"?me.sort((xe,Ye)=>Ye.updatedAt.localeCompare(xe.updatedAt)):U.value==="created-desc"?me.sort((xe,Ye)=>Ye.createdAt.localeCompare(xe.createdAt)):me.sort((xe,Ye)=>xe.title.localeCompare(Ye.title,"en")),me});async function J(Q){await j.restoreSession(Q)&&(D.value=D.value.filter(xe=>xe.id!==Q))}function se(Q){const me=new Date(Q);if(Number.isNaN(me.getTime()))return Q;const xe=Ye=>String(Ye).padStart(2,"0");return`${me.getFullYear()}-${xe(me.getMonth()+1)}-${xe(me.getDate())} ${xe(me.getHours())}:${xe(me.getMinutes())}`}return Ke(()=>o.modelValue,Q=>{Q||(H.value="main")}),(Q,me)=>(g(),ue(wu,{"model-value":e.modelValue,title:v(n)("mobile.settingsTitle"),"onUpdate:modelValue":me[8]||(me[8]=xe=>s("update:modelValue",xe))},{default:ae(()=>[H.value==="main"?(g(),S(Ce,{key:0},[b("div",aVe,I(v(n)("mobile.groupSession")),1),b("button",{type:"button",class:"srow",onClick:$},[b("span",cVe,[b("span",uVe,I(v(n)("status.statusModel")),1),b("span",dVe,I(e.status.model),1)]),me[9]||(me[9]=b("span",{class:"chev"},"›",-1))]),b("div",fVe,[b("span",pVe,[b("span",hVe,I(v(n)("status.statusThinking")),1),c.value==="unsupported"?(g(),S("span",mVe,I(v(n)("status.modeNotSupported")),1)):Y("",!0)]),u.value.length>1?(g(),ue(di,{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":E},null,8,["model-value","options"])):(g(),S("span",{key:1,class:Be(["srow-val",{dim:d.value==="off"}])},I(d.value==="off"?v(n)("status.planOff"):v(rf)(d.value)),3))]),b("div",gVe,I(v(n)("status.cacheNote")),1),b("button",{type:"button",class:"srow",onClick:me[0]||(me[0]=xe=>s("togglePlan"))},[b("span",vVe,[b("span",yVe,I(v(n)("status.statusPlanMode")),1),b("span",wVe,I(v(n)("mobile.planModeSub")),1)]),b("span",{class:Be(["toggle",{on:h.value}]),role:"switch","aria-checked":h.value},null,10,kVe)]),k.value?(g(),S("div",bVe,[b("span",_Ve,[b("span",xVe,I(v(n)("status.goalLabel")),1),b("span",SVe,I(x.value),1)]),b("span",CVe,[e.goal?.status==="active"?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:me[1]||(me[1]=xe=>s("controlGoal","pause"))},{default:ae(()=>[He(I(v(n)("status.goalPause")),1)]),_:1})):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Nt,{key:1,variant:"secondary",size:"sm",onClick:me[2]||(me[2]=xe=>s("controlGoal","resume"))},{default:ae(()=>[He(I(v(n)("status.goalResume")),1)]),_:1})):Y("",!0),W(Nt,{variant:"ghost",size:"sm",onClick:y},{default:ae(()=>[He(I(v(n)("status.goalCancel")),1)]),_:1})])])):(g(),S("button",{key:1,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:me[3]||(me[3]=xe=>s("toggleGoal"))},[b("span",AVe,[b("span",TVe,I(v(n)("status.goalLabel")),1),b("span",EVe,I(v(n)("mobile.goalModeSub")),1)]),b("span",{class:Be(["toggle",{on:m.value}])},null,2)],8,MVe)),b("button",{type:"button",class:"srow",role:"switch","aria-checked":e.dynamicWorkflowMode,onClick:me[4]||(me[4]=xe=>s("toggleWorkflow"))},[b("span",LVe,[b("span",$Ve,I(v(n)("status.statusDynamicWorkflowMode")),1),b("span",NVe,I(v(n)("mobile.workflowModeSub")),1)]),b("span",{class:Be(["toggle",{on:e.dynamicWorkflowMode}])},null,2)],8,IVe),b("button",{type:"button",class:"srow",onClick:T},[b("span",zVe,[b("span",BVe,I(v(n)("status.statusPermission")),1),b("span",{class:"srow-sub",style:Gt({color:A.value})},I(P.value),5)]),me[10]||(me[10]=b("span",{class:"chev"},"›",-1))]),b("div",RVe,[b("span",PVe,[b("span",FVe,I(v(n)("status.statusContext")),1),b("span",jVe,I(L.value),1)]),b("span",{class:"ctx-meter","aria-label":L.value},[b("i",{style:Gt({width:z.value+"%"})},null,4)],8,OVe)]),b("div",HVe,I(v(n)("mobile.groupApp")),1),b("button",{type:"button",class:"srow",onClick:q},[b("span",DVe,[b("span",VVe,I(v(n)("mobile.archivedSessions")),1),b("span",WVe,I(v(n)("mobile.archivedSessionsSub")),1)]),me[11]||(me[11]=b("span",{class:"chev"},"›",-1))]),b("div",qVe,[b("span",UVe,[b("span",ZVe,I(v(n)("theme.colorSchemeLabel")),1)]),W(di,{"model-value":e.colorScheme??"system",options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":l},null,8,["model-value","options"])]),b("div",KVe,[b("span",GVe,[b("span",YVe,I(v(n)("settings.uiFontSize")),1)]),W(di,{"model-value":w.value,options:v(QN),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":_},null,8,["model-value","options","aria-label"])]),b("button",{type:"button",class:"srow",onClick:me[5]||(me[5]=xe=>s("setConversationToc",!e.conversationToc))},[b("span",XVe,[b("span",JVe,I(v(n)("settings.conversationToc")),1),b("span",QVe,I(v(n)("settings.conversationTocHint")),1)]),b("span",{class:Be(["toggle",{on:e.conversationToc}]),role:"switch","aria-checked":e.conversationToc},null,10,eWe)]),b("button",{type:"button",class:"srow acct in",onClick:C},[b("span",tWe,[b("span",nWe,I(v(n)("settings.manageProviders")),1)])]),e.serverVersion?(g(),S("div",oWe,[b("span",sWe,[b("span",iWe,I(v(n)("settings.serverVersion")),1)]),b("span",lWe,I(e.serverVersion),1)])):Y("",!0)],64)):(g(),S(Ce,{key:1},[b("div",rWe,[b("button",{type:"button",class:"arch-back",onClick:te},[me[12]||(me[12]=b("span",{class:"chev back"},"‹",-1)),He(" "+I(v(n)("mobile.archivedBack")),1)]),b("span",aWe,I(v(n)("mobile.sessionCount",{n:ee.value.length})),1)]),b("div",cWe,[W(us,{class:"arch-search-input","model-value":O.value,size:"sm",placeholder:v(n)("settings.archivedSearch"),"onUpdate:modelValue":me[6]||(me[6]=xe=>O.value=xe)},null,8,["model-value","placeholder"]),W(di,{size:"sm","model-value":U.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":me[7]||(me[7]=xe=>U.value=xe)},null,8,["model-value","options"])]),M.value?(g(),S("div",uWe,I(v(n)("settings.archivedLoadingAll")),1)):ee.value.length>0?(g(!0),S(Ce,{key:1},rt(ee.value,xe=>(g(),S("div",{key:xe.id,class:"arch-row"},[b("div",dWe,[b("div",fWe,I(xe.title),1),b("div",pWe,I(v(n)("settings.archivedAt",{time:se(xe.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Ye=>J(xe.id)},{default:ae(()=>[He(I(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(g(),S("div",hWe,I(D.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title"]))}}),vWe=vt(gWe,[["__scopeId","data-v-bcda0873"]]),yWe=["role","aria-modal","aria-label"],wWe={class:"wiz-rail"},kWe={class:"rail-inner"},bWe={class:"eyebrow-pill"},_We={class:"wiz-title"},xWe={class:"wiz-sub"},SWe={class:"pref-group"},CWe={class:"pref-label"},MWe={class:"theme-cards"},AWe=["onClick"],TWe={class:"opt-label"},EWe={class:"pref-group"},IWe={class:"pref-label"},LWe={class:"accent-cards"},$We=["onClick"],NWe={class:"opt-label"},zWe={key:1,class:"wiz-actions"},BWe={key:2,class:"wiz-hint"},RWe={key:0,class:"wiz-hero","aria-hidden":"true"},PWe={class:"hero-inner"},FWe={class:"hero-tagline"},jWe={class:"hero-sub"},OWe={class:"frost-stage"},HWe={class:"frost-card"},DWe={class:"frost-card"},VWe=Je({__name:"Onboarding",props:{embedded:{type:Boolean,default:!1}},emits:["complete","skip"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{colorScheme:s,accent:i,setColorScheme:l,setAccent:r}=C9(),a=[{value:"system",label:o("theme.system")},{value:"light",label:o("theme.light")},{value:"dark",label:o("theme.dark")}],c=[{value:"blue",label:o("theme.accentBlue")},{value:"mono",label:o("theme.accentBlack")}];return(u,d)=>(g(),S("div",{class:Be(["wizard",{"is-embedded":e.embedded}]),role:e.embedded?void 0:"dialog","aria-modal":e.embedded?void 0:"true","aria-label":e.embedded?void 0:v(o)("onboarding.title")},[b("div",wWe,[b("div",kWe,[e.embedded?Y("",!0):(g(),S(Ce,{key:0},[b("span",bWe,I(v(o)("onboarding.eyebrow")),1),W(df,{class:"brand-mark",size:"lg",animated:!1,label:"Pythinker Code"}),b("h1",_We,I(v(o)("onboarding.title")),1),b("p",xWe,I(v(o)("onboarding.subtitle")),1)],64)),b("div",SWe,[b("div",CWe,I(v(o)("theme.colorSchemeLabel")),1),b("div",MWe,[(g(),S(Ce,null,rt(a,f=>b("button",{key:f.value,type:"button",class:Be(["opt-card theme-card",{selected:v(s)===f.value}]),onClick:p=>v(l)(f.value)},[b("span",{class:Be(["theme-preview",`theme-preview--${f.value}`]),"aria-hidden":"true"},[f.value==="system"?(g(),S(Ce,{key:0},[d[2]||(d[2]=L0('',2))],64)):(g(),S(Ce,{key:1},[d[3]||(d[3]=b("span",{class:"theme-side"},null,-1)),d[4]||(d[4]=b("span",{class:"theme-lines"},[b("span"),b("span"),b("span")],-1))],64))],2),b("span",TWe,I(f.label),1)],10,AWe)),64))])]),b("div",EWe,[b("div",IWe,I(v(o)("theme.accentLabel")),1),b("div",LWe,[(g(),S(Ce,null,rt(c,f=>b("button",{key:f.value,type:"button",class:Be(["opt-card accent-card",{selected:v(i)===f.value}]),onClick:p=>v(r)(f.value)},[b("span",{class:Be(["opt-radio",{on:v(i)===f.value}])},null,2),b("span",{class:Be(["accent-swatch",`accent-swatch--${f.value}`]),"aria-hidden":"true"},null,2),b("span",NWe,I(f.label),1)],10,$We)),64))])]),e.embedded?Y("",!0):(g(),S("div",zWe,[W(Nt,{variant:"primary",size:"lg",class:"wiz-action","data-testid":"onboarding-complete",onClick:d[0]||(d[0]=f=>n("complete"))},{default:ae(()=>[b("span",null,I(v(o)("onboarding.start")),1),W(Ee,{name:"arrow-right",size:"sm"})]),_:1}),W(Nt,{variant:"secondary",size:"lg",class:"wiz-action","data-testid":"onboarding-skip",onClick:d[1]||(d[1]=f=>n("skip"))},{default:ae(()=>[b("span",null,I(v(o)("onboarding.skip")),1),W(Ee,{name:"arrow-right",size:"sm"})]),_:1})])),e.embedded?Y("",!0):(g(),S("p",BWe,I(v(o)("onboarding.hint")),1))])]),e.embedded?Y("",!0):(g(),S("aside",RWe,[d[7]||(d[7]=b("div",{class:"hero-ambient"},[b("span",{class:"orb orb-a"}),b("span",{class:"orb orb-b"}),b("span",{class:"orb orb-c"})],-1)),b("div",PWe,[W(df,{size:"hero",animated:!1,label:""}),b("p",FWe,I(v(o)("onboarding.heroTitle")),1),b("p",jWe,I(v(o)("onboarding.heroSub")),1),b("div",OWe,[b("figure",HWe,[d[5]||(d[5]=L0('',2)),b("figcaption",null,I(v(o)("onboarding.platformMac")),1)]),b("figure",DWe,[d[6]||(d[6]=L0('',2)),b("figcaption",null,I(v(o)("onboarding.platformWindows")),1)])])])]))],10,yWe))}}),dB=vt(VWe,[["__scopeId","data-v-2c24b7cb"]]),WWe=2e3;function qWe(e){const t=V("idle"),n=V(void 0),o=V(void 0),s=V(!1),i=V(!0),l=V(""),r=B(()=>t.value==="starting"||t.value==="exchanging"||t.value==="loading_models");let a,c,u=!1,d=!1;function f(){return t.value==="waiting_for_browser"||t.value==="waiting_for_code"}function p(){a!==void 0&&(clearInterval(a),a=void 0)}function h(){n.value=void 0,o.value=void 0,s.value=!1}function m(){c?.close(),c=void 0}function k(L){u||(l.value=L,t.value="failed",p(),m(),h())}async function x(L,E){if(u||n.value!==L||!f()&&t.value!=="exchanging"||E.state==="pending")return;if(p(),E.state==="failed"){k(E.message??"");return}if(E.state==="cancelled"){t.value="cancelled",m(),h();return}c=void 0,t.value="loading_models";let T=!0;try{T=await e?.()??!0}catch($){k($ instanceof Error?$.message:String($));return}finally{h()}u||(T?t.value="connected":k(""))}async function y(){if(u||d||!f())return;const L=n.value;if(L!==void 0){d=!0;try{await x(L,await Ct().getCodexLoginStatus(L))}catch{}finally{d=!1}}}function w(){y()}function _(){document.visibilityState==="visible"&&y()}async function A(){if(u||r.value||f())return;t.value="starting",l.value="",h();let L=null;try{L=typeof window>"u"?null:window.open("about:blank","_blank"),L!==null&&(L.opener=null,c=L)}catch{L?.close(),L=null}s.value=L===null;try{const E=Ct(),T=await E.startCodexLogin();if(u){m(),E.cancelCodexLogin(T.loginId).catch(()=>{});return}if(n.value=T.loginId,o.value=T.authorizeUrl,i.value=T.loopback,L!==null)try{L.location.href=T.authorizeUrl}catch{m(),s.value=!0}t.value=T.loopback?"waiting_for_browser":"waiting_for_code",p(),a=setInterval(()=>void y(),WWe)}catch(E){m(),k(E instanceof Error?E.message:String(E))}}async function P(L){const E=n.value;if(u||r.value||!f()||E===void 0)return;const T=t.value;t.value="exchanging",l.value="";try{await x(E,await Ct().submitCodexLoginRedirect(E,L)),!u&&t.value==="exchanging"&&(t.value=T)}catch($){u||(l.value=$ instanceof Error?$.message:String($),t.value=T)}}async function z(){const L=n.value;if(p(),m(),h(),t.value="cancelled",l.value="",L!==void 0)try{await Ct().cancelCodexLogin(L)}catch{}}return In(()=>{window.addEventListener("focus",w),document.addEventListener("visibilitychange",_)}),En(()=>{u=!0,window.removeEventListener("focus",w),document.removeEventListener("visibilitychange",_),p(),m();const L=n.value;L!==void 0&&f()&&Ct().cancelCodexLogin(L).catch(()=>{})}),{phase:zl(t),busy:r,loginId:zl(n),authorizeUrl:zl(o),popupBlocked:zl(s),loopback:zl(i),error:zl(l),start:A,submitRedirect:P,cancel:z}}const UWe={class:"codex-signin"},ZWe={key:0,class:"codex-signin__denied",role:"status"},KWe={key:1,class:"codex-signin__ok",role:"status"},GWe={class:"codex-signin__status",role:"status"},YWe={key:0,class:"codex-signin__hint"},XWe=["href"],JWe={class:"codex-signin__hint"},QWe={key:2,class:"codex-signin__error",role:"alert"},eqe={class:"codex-signin__actions"},tqe=Je({__name:"CodexSignIn",emits:["connected"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=V(""),l=qWe(async()=>{await s.refreshRuntimeState();const a=s.authReady.value;return a&&n("connected"),a});async function r(){const a=i.value.trim();a!==""&&(await l.submitRedirect(a),i.value="")}return(a,c)=>(g(),S("div",UWe,[v(l).phase.value==="idle"||v(l).phase.value==="cancelled"?(g(),S(Ce,{key:0},[v(l).phase.value==="cancelled"?(g(),S("p",ZWe,I(v(o)("login.deniedTitle")),1)):Y("",!0),W(Nt,{variant:"primary","data-testid":"codex-signin-start",onClick:c[0]||(c[0]=u=>v(l).start())},{default:ae(()=>[W(Ee,{name:"log-in",size:"sm"}),b("span",null,I(v(o)("codexLogin.signIn")),1)]),_:1})],64)):v(l).phase.value==="connected"?(g(),S("p",KWe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,I(v(o)("codexLogin.connected")),1)])):(g(),S(Ce,{key:2},[b("p",GWe,[v(l).busy.value||v(l).phase.value!=="failed"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),b("span",null,I(v(o)(`codexLogin.phase.${v(l).phase.value}`)),1)]),v(l).authorizeUrl.value?(g(),S("p",YWe,[He(I(v(o)("codexLogin.openLinkHint"))+" ",1),b("a",{href:v(l).authorizeUrl.value,target:"_blank",rel:"noreferrer noopener"},I(v(o)("codexLogin.openLink")),9,XWe)])):Y("",!0),v(l).phase.value==="waiting_for_code"||v(l).phase.value==="exchanging"?(g(),S("form",{key:1,class:"codex-signin__paste",onSubmit:xt(r,["prevent"])},[b("p",JWe,I(v(o)("codexLogin.pasteHint")),1),W(Ir,{label:v(o)("codexLogin.pasteLabel")},{default:ae(()=>[W(us,{modelValue:i.value,"onUpdate:modelValue":c[1]||(c[1]=u=>i.value=u),placeholder:v(o)("codexLogin.pastePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),W(Nt,{type:"submit",variant:"primary",loading:v(l).busy.value},{default:ae(()=>[He(I(v(o)("codexLogin.submit")),1)]),_:1},8,["loading"])],32)):Y("",!0),v(l).error.value?(g(),S("p",QWe,I(v(o)("codexLogin.failed",{message:v(l).error.value})),1)):Y("",!0),b("div",eqe,[v(l).phase.value==="failed"?(g(),ue(Nt,{key:0,variant:"primary",onClick:c[2]||(c[2]=u=>v(l).start())},{default:ae(()=>[He(I(v(o)("codexLogin.retry")),1)]),_:1})):(g(),ue(Nt,{key:1,variant:"secondary",onClick:c[3]||(c[3]=u=>v(l).cancel())},{default:ae(()=>[He(I(v(o)("codexLogin.cancel")),1)]),_:1}))])],64))]))}}),nqe=vt(tqe,[["__scopeId","data-v-3bd16f58"]]),oqe=["aria-label"],sqe={class:"first-run__panel"},iqe={class:"first-run__steps"},lqe={class:"first-run__dot"},rqe={key:0,class:"first-run__body"},aqe={class:"first-run__sub"},cqe={key:0,class:"first-run__options"},uqe={class:"first-run__option-main"},dqe={class:"first-run__option-name"},fqe={class:"first-run__option-desc"},pqe={class:"first-run__badge"},hqe={class:"first-run__option-main"},mqe={class:"first-run__option-name"},gqe={class:"first-run__option-desc"},vqe={class:"first-run__option-main"},yqe={class:"first-run__option-name"},wqe={class:"first-run__option-desc"},kqe={key:1,class:"first-run__route"},bqe={class:"first-run__actions"},_qe={key:2,class:"first-run__skip-hint"},xqe={key:1,class:"first-run__body"},Sqe={class:"first-run__sub"},Cqe={key:0,class:"first-run__empty"},Mqe={key:1,class:"first-run__models"},Aqe=["data-testid","onClick"],Tqe={class:"first-run__model-id"},Eqe={key:0,class:"first-run__badge"},Iqe={class:"first-run__model-ctx"},Lqe={class:"first-run__actions"},$qe={key:2,class:"first-run__body"},Nqe={class:"first-run__sub"},zqe={class:"first-run__ready"},Bqe={class:"first-run__actions"},Rqe=Je({__name:"FirstRun",emits:["complete"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=V("connect"),l=V(null),r=V(null),a=V(!1),c=V(!1),u=["connect","model","appearance"],d=B(()=>u.indexOf(i.value)),f=B(()=>(s.models.value??[]).filter(E=>E.capabilities===void 0||E.capabilities.length===0||E.capabilities.some(T=>T.trim().toLowerCase()==="tool_use"))),p=B(()=>s.defaultModel.value??void 0),h=B(()=>{const E=p.value;return f.value.toSorted((T,$)=>T.id===E?-1:$.id===E?1:$.maxContextSize-T.maxContextSize||T.id.localeCompare($.id))}),m=B(()=>a.value?h.value:h.value.slice(0,5)),k=B(()=>(s.providers.value??[])[0]?.id??""),x=B(()=>s.authReady.value&&f.value.length>0),y=B(()=>r.value!==null);Ke([p,f],()=>{r.value===null&&(r.value=p.value??f.value[0]?.id??null)},{immediate:!0});function w(){x.value&&(i.value="model")}async function _(){const E=r.value;if(!(E===null||c.value)){c.value=!0;try{E!==s.defaultModel.value&&await s.updateConfig({defaultModel:E}),await s.refreshRuntimeState(),s.authReady.value&&(i.value="appearance")}finally{c.value=!1}}}function A(){s.setOnboarded(!0),n("complete")}function P(){A()}function z(E){l.value=E}async function L(){await s.refreshRuntimeState(),x.value&&w()}return(E,T)=>(g(),S("div",{class:"first-run",role:"dialog","aria-modal":"true","aria-label":v(o)("firstRun.connect.title")},[b("div",sqe,[b("ol",iqe,[(g(),S(Ce,null,rt(u,($,C)=>b("li",{key:$,class:Be(["first-run__step",{"is-current":C===d.value,"is-done":Cz("codex"))},[b("span",uqe,[b("span",dqe,I(v(o)("firstRun.connect.codexName")),1),b("span",fqe,I(v(o)("firstRun.connect.codexDesc")),1)]),b("span",pqe,I(v(o)("firstRun.connect.codexBadge")),1)]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-catalog",onClick:T[1]||(T[1]=$=>z("catalog"))},[b("span",hqe,[b("span",mqe,I(v(o)("firstRun.connect.catalogName")),1),b("span",gqe,I(v(o)("firstRun.connect.catalogDesc")),1)]),W(Ee,{name:"chevron-right",size:"sm"})]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-manual",onClick:T[2]||(T[2]=$=>z("manual"))},[b("span",vqe,[b("span",yqe,I(v(o)("firstRun.connect.manualName")),1),b("span",wqe,I(v(o)("firstRun.connect.manualDesc")),1)]),W(Ee,{name:"chevron-right",size:"sm"})])])):(g(),S("div",kqe,[l.value==="codex"?(g(),ue(nqe,{key:0,onConnected:L})):(g(),ue(cB,{key:1,config:v(s).config.value,"initial-source":l.value==="manual"?"manual":"catalog",onAdded:L,onCancel:T[3]||(T[3]=$=>l.value=null)},null,8,["config","initial-source"])),W(Nt,{variant:"ghost",size:"sm",onClick:T[4]||(T[4]=$=>l.value=null)},{default:ae(()=>[He(I(v(o)("firstRun.connect.back")),1)]),_:1})])),b("div",bqe,[W(Nt,{variant:"ghost","data-testid":"first-run-skip",onClick:P},{default:ae(()=>[He(I(v(o)("firstRun.connect.skip")),1)]),_:1}),T[8]||(T[8]=b("span",{class:"first-run__spacer"},null,-1)),x.value?(g(),ue(Nt,{key:0,variant:"primary","data-testid":"first-run-connect-continue",onClick:w},{default:ae(()=>[He(I(v(o)("firstRun.continue")),1)]),_:1})):Y("",!0)]),l.value===null?(g(),S("p",_qe,I(v(o)("firstRun.connect.skipHint")),1)):Y("",!0)])):i.value==="model"?(g(),S("section",xqe,[b("h1",null,I(v(o)("firstRun.model.title")),1),b("p",Sqe,I(v(o)("firstRun.model.connected",{provider:k.value,count:f.value.length},f.value.length))+" "+I(v(o)("firstRun.model.subtitle")),1),f.value.length===0?(g(),S("p",Cqe,I(v(o)("firstRun.model.none")),1)):(g(),S("ul",Mqe,[(g(!0),S(Ce,null,rt(m.value,$=>(g(),S("li",{key:$.id},[b("button",{type:"button",class:Be(["first-run__model",{"is-selected":r.value===$.id}]),"data-testid":`first-run-model-${$.id}`,onClick:C=>r.value=$.id},[T[9]||(T[9]=b("span",{class:"first-run__radio","aria-hidden":"true"},null,-1)),b("span",Tqe,I($.id),1),$.id===p.value?(g(),S("span",Eqe,I(v(o)("firstRun.model.recommended")),1)):Y("",!0),b("span",Iqe,I(Math.round($.maxContextSize/1e3))+"K",1)],10,Aqe)]))),128))])),h.value.length>5?(g(),ue(Nt,{key:2,variant:"ghost",size:"sm",onClick:T[5]||(T[5]=$=>a.value=!a.value)},{default:ae(()=>[He(I(a.value?v(o)("firstRun.model.showFewer"):v(o)("firstRun.model.showAll",{count:h.value.length})),1)]),_:1})):Y("",!0),b("div",Lqe,[W(Nt,{variant:"secondary",onClick:T[6]||(T[6]=$=>i.value="connect")},{default:ae(()=>[He(I(v(o)("firstRun.back")),1)]),_:1}),T[10]||(T[10]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary",loading:c.value,disabled:!y.value,"data-testid":"first-run-model-continue",onClick:_},{default:ae(()=>[He(I(v(o)("firstRun.continue")),1)]),_:1},8,["loading","disabled"])])])):(g(),S("section",$qe,[b("h1",null,I(v(o)("firstRun.appearance.title")),1),b("p",Nqe,I(v(o)("firstRun.appearance.subtitle")),1),W(dB,{embedded:"",onComplete:A,onSkip:A}),b("p",zqe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,I(v(o)("firstRun.appearance.ready",{model:r.value??""})),1)]),b("div",Bqe,[W(Nt,{variant:"secondary",onClick:T[7]||(T[7]=$=>i.value="model")},{default:ae(()=>[He(I(v(o)("firstRun.back")),1)]),_:1}),T[11]||(T[11]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary","data-testid":"first-run-finish",onClick:A},{default:ae(()=>[He(I(v(o)("firstRun.appearance.finish")),1)]),_:1})])]))])],8,oqe))}}),Pqe=vt(Rqe,[["__scopeId","data-v-23e77d0d"]]),Fqe={class:"recovery"},jqe={class:"recovery__inner"},Oqe={class:"recovery__mark","aria-hidden":"true"},Hqe={class:"recovery__copy"},Dqe={class:"recovery__options"},Vqe={class:"recovery__option-name"},Wqe={class:"recovery__option-desc"},qqe={class:"recovery__option-name"},Uqe={class:"recovery__option-desc"},Zqe={class:"recovery__actions"},Kqe=Je({__name:"Recovery",emits:["openProviders","dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=B(()=>s.providers.value??[]),l=B(()=>i.value[0]),r=B(()=>i.value.length===0?"noProvider":i.value.some(u=>u.status==="connected")?"noModel":"credential"),a=B(()=>r.value==="noProvider"?o("recovery.noProvider"):o(`recovery.${r.value}`,{provider:l.value?.id??""}));async function c(){await s.refreshRuntimeState()}return(u,d)=>(g(),S("section",Fqe,[b("div",jqe,[b("span",Oqe,[W(Ee,{name:"alert-triangle",size:"md"})]),b("div",Hqe,[b("h1",null,I(v(o)("recovery.title")),1),b("p",null,I(a.value),1)]),b("div",Dqe,[r.value!=="noProvider"?(g(),S("button",{key:0,type:"button",class:"recovery__option is-primary","data-testid":"recovery-open-providers",onClick:d[0]||(d[0]=f=>n("openProviders"))},[b("span",Vqe,I(v(o)("recovery.fixProvider")),1),b("span",Wqe,I(v(o)("recovery.fixProviderDesc")),1)])):Y("",!0),b("button",{type:"button",class:Be(["recovery__option",{"is-primary":r.value==="noProvider"}]),"data-testid":"recovery-add-provider",onClick:d[1]||(d[1]=f=>n("openProviders"))},[b("span",qqe,I(v(o)("recovery.addProvider")),1),b("span",Uqe,I(v(o)("recovery.addProviderDesc")),1)],2)]),b("div",Zqe,[W(Nt,{variant:"secondary","data-testid":"recovery-retry",onClick:c},{default:ae(()=>[He(I(v(o)("recovery.retry")),1)]),_:1}),W(Nt,{variant:"ghost","data-testid":"recovery-dismiss",onClick:d[2]||(d[2]=f=>n("dismiss"))},{default:ae(()=>[He(I(v(o)("recovery.dismiss")),1)]),_:1})])])]))}}),Gqe=vt(Kqe,[["__scopeId","data-v-68311778"]]),Yqe="/logo.png",Xqe=["aria-label"],Jqe={class:"gload-box"},Qqe={class:"gload-text"},eUe={key:0,class:"gload-issue"},tUe={class:"gload-issue-detail"},nUe=Je({__name:"GlobalLoading",props:{issue:{}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",{class:"gload",role:"status","aria-label":v(t)("app.connecting")},[b("div",Jqe,[o[0]||(o[0]=b("img",{class:"gload-logo",src:Yqe,alt:"Pythinker",width:"120",height:"120"},null,-1)),W(Zo,{size:"md",label:v(t)("app.connecting")},null,8,["label"]),b("div",Qqe,I(v(t)("app.connecting")),1),e.issue?(g(),S("div",eUe,[b("div",null,I(v(t)("app.connectRetrying")),1),b("div",tUe,I(e.issue),1)])):Y("",!0)])],8,Xqe))}}),oUe=vt(nUe,[["__scopeId","data-v-2468172e"]]),sUe={class:"kap-root"},iUe={class:"kap-head"},lUe={class:"kap-count"},rUe={class:"kap-head-actions"},aUe={class:"kap-filters"},cUe=["value"],uUe={class:"kap-check"},dUe={class:"kap-check"},fUe={class:"kap-view-toggle",role:"group"},pUe={key:0,class:"kap-empty"},hUe=["onClick"],mUe={class:"kap-ts"},gUe={class:"kap-label"},vUe={key:0,class:"kap-detail"},yUe={class:"kap-detail-actions"},wUe=["onClick"],kUe={key:1,class:"kap-agg"},bUe={class:"mono"},_Ue={class:"mono"},xUe={class:"num"},SUe={class:"num"},CUe={key:0},MUe={class:"mono"},AUe={class:"num"},TUe={class:"num"},EUe={key:0},IUe=Je({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=V("all"),s=V(""),i=V(""),l=V(!1),r=V("timeline"),a=B(()=>(i9.value,[...yge()])),c=B(()=>{const E=new Set;for(const T of a.value)T.sessionId&&E.add(T.sessionId);return[...E].sort()});function u(E){return E.kind==="rest:error"||E.code!==void 0&&E.code!==0||E.eventType==="error"||E.eventType==="parse-error"}const d=B(()=>{const E=s.value.trim().toLowerCase();return a.value.filter(T=>!(o.value!=="all"&&T.source!==o.value||i.value&&T.sessionId!==i.value||l.value&&!u(T)||E&&!`${T.label} ${T.kind} ${T.eventType??""} ${T.sessionId??""} ${T.requestId??""}`.toLowerCase().includes(E)))}),f=B(()=>{const E=new Map;for(const T of d.value){if(T.kind!=="ws:in"&&T.kind!=="ws:out")continue;const $=T.kind==="ws:in"?"←":"→",C=`${$} ${T.eventType??"?"} @ ${T.sessionId??"-"}`,j=E.get(C)??{key:C,sessionId:T.sessionId??"-",eventType:T.eventType??"?",dir:$,count:0};j.count++,T.seq!==void 0&&(j.lastSeq=T.seq),E.set(C,j)}return[...E.values()].sort((T,$)=>$.count-T.count)}),p=B(()=>{const E=new Map;for(const T of d.value){if(T.source!=="rest"||T.kind==="rest:request")continue;const $=`${T.method??"?"} ${T.path??"?"}`,C=E.get($)??{count:0,errors:0,totalMs:0,timed:0};C.count++,u(T)&&C.errors++,T.durationMs!==void 0&&(C.totalMs+=T.durationMs,C.timed++),E.set($,C)}return[...E.entries()].map(([T,$])=>({key:T,count:$.count,errors:$.errors,avgMs:$.timed>0?Math.round($.totalMs/$.timed):0})).sort((T,$)=>$.count-T.count)}),h=V(null),m=V(!0),k=V(null),x=V(null);Ke(()=>d.value.length,async()=>{if(!m.value||r.value!=="timeline")return;await yt();const E=k.value;E&&(E.scrollTop=E.scrollHeight)});function y(E){h.value=h.value===E?null:E}function w(E){const T=new Date(E),$=(C,j=2)=>String(C).padStart(j,"0");return`${$(T.getHours())}:${$(T.getMinutes())}:${$(T.getSeconds())}.${$(T.getMilliseconds(),3)}`}function _(E){return JSON.stringify(E,null,2)}async function A(E){await fs(_(E))&&(x.value=E.id,setTimeout(()=>{x.value===E.id&&(x.value=null)},1500))}function P(){EN(d.value)}function z(E){return u(E)||E.source==="client"?"b-err":E.source==="rest"?"b-rest":E.kind==="ws:lifecycle"?"b-life":E.kind==="ws:out"?"b-out":"b-in"}function L(E){return E.source==="rest"?"REST":E.source==="client"?"APP":"WS"}return(E,T)=>(g(),S("section",sUe,[b("header",iUe,[T[11]||(T[11]=b("strong",null,"KAP debug",-1)),b("span",lUe,I(d.value.length)+"/"+I(a.value.length),1),b("div",rUe,[b("button",{type:"button",class:Be({on:v(e2)}),onClick:T[0]||(T[0]=$=>e2.value=!v(e2))},I(v(e2)?"resume":"pause"),3),b("button",{type:"button",onClick:T[1]||(T[1]=$=>v(wge)())},"clear"),b("button",{type:"button",onClick:T[2]||(T[2]=$=>P())},"export jsonl"),W(Cn,{text:"Close window"},{default:ae(()=>[b("button",{type:"button",onClick:T[3]||(T[3]=$=>n("close"))},"✕")]),_:1})])]),b("div",aUe,[Jn(b("select",{"onUpdate:modelValue":T[4]||(T[4]=$=>o.value=$),"aria-label":"Source filter"},[...T[12]||(T[12]=[b("option",{value:"all"},"rest + ws + app",-1),b("option",{value:"rest"},"rest",-1),b("option",{value:"ws"},"ws",-1),b("option",{value:"client"},"app errors",-1)])],512),[[b8,o.value]]),Jn(b("select",{"onUpdate:modelValue":T[5]||(T[5]=$=>i.value=$),"aria-label":"Session filter"},[T[13]||(T[13]=b("option",{value:""},"all sessions",-1)),(g(!0),S(Ce,null,rt(c.value,$=>(g(),S("option",{key:$,value:$},I($),9,cUe))),128))],512),[[b8,i.value]]),Jn(b("input",{"onUpdate:modelValue":T[6]||(T[6]=$=>s.value=$),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[js,s.value]]),b("label",uUe,[Jn(b("input",{"onUpdate:modelValue":T[7]||(T[7]=$=>l.value=$),type:"checkbox"},null,512),[[n5,l.value]]),T[14]||(T[14]=He(" errors",-1))]),b("label",dUe,[Jn(b("input",{"onUpdate:modelValue":T[8]||(T[8]=$=>m.value=$),type:"checkbox"},null,512),[[n5,m.value]]),T[15]||(T[15]=He(" follow",-1))]),b("div",fUe,[b("button",{type:"button",class:Be({on:r.value==="timeline"}),onClick:T[9]||(T[9]=$=>r.value="timeline")},"timeline",2),b("button",{type:"button",class:Be({on:r.value==="aggregate"}),onClick:T[10]||(T[10]=$=>r.value="aggregate")},"aggregate",2)])]),r.value==="timeline"?(g(),S("div",{key:0,ref_key:"listRef",ref:k,class:"kap-list"},[d.value.length===0?(g(),S("div",pUe," No trace entries yet. REST calls and WS frames will appear here. ")):Y("",!0),(g(!0),S(Ce,null,rt(d.value,$=>(g(),S("div",{key:$.id,class:"kap-row-wrap"},[b("button",{type:"button",class:Be(["kap-row",{expanded:h.value===$.id}]),onClick:C=>y($.id)},[b("span",mUe,I(w($.ts)),1),b("span",{class:Be(["kap-badge",z($)])},I(L($)),3),b("span",gUe,I($.label),1)],10,hUe),h.value===$.id?(g(),S("div",vUe,[b("div",yUe,[b("button",{type:"button",onClick:C=>A($)},I(x.value===$.id?"copied ✓":"copy json"),9,wUe)]),b("pre",null,I(_($)),1)])):Y("",!0)]))),128))],512)):(g(),S("div",kUe,[T[20]||(T[20]=b("h4",null,"WS frames by session / type",-1)),b("table",null,[T[17]||(T[17]=b("thead",null,[b("tr",null,[b("th",null,"dir"),b("th",null,"type"),b("th",null,"session"),b("th",null,"count"),b("th",null,"last seq")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,rt(f.value,$=>(g(),S("tr",{key:$.key},[b("td",null,I($.dir),1),b("td",bUe,I($.eventType),1),b("td",_Ue,I($.sessionId),1),b("td",xUe,I($.count),1),b("td",SUe,I($.lastSeq??"—"),1)]))),128)),f.value.length===0?(g(),S("tr",CUe,[...T[16]||(T[16]=[b("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):Y("",!0)])]),T[21]||(T[21]=b("h4",null,"REST by endpoint",-1)),b("table",null,[T[19]||(T[19]=b("thead",null,[b("tr",null,[b("th",null,"endpoint"),b("th",null,"count"),b("th",null,"errors"),b("th",null,"avg ms")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,rt(p.value,$=>(g(),S("tr",{key:$.key},[b("td",MUe,I($.key),1),b("td",AUe,I($.count),1),b("td",{class:Be(["num",{err:$.errors>0}])},I($.errors),3),b("td",TUe,I($.avgMs),1)]))),128)),p.value.length===0?(g(),S("tr",EUe,[...T[18]||(T[18]=[b("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):Y("",!0)])])]))]))}}),LUe=vt(IUe,[["__scopeId","data-v-7bab00af"]]),$Ue=Je({__name:"DebugPanel",setup(e){const t=V(!1);let n=null,o=null,s=null;const i=["data-color-scheme","data-accent"];function l(u){const d=document.documentElement,f=u.documentElement;for(const p of i){const h=d.getAttribute(p);h!==null?f.setAttribute(p,h):f.removeAttribute(p)}}function r(u){const d=u.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const h of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(h.cloneNode(!0));l(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function c(){if(n&&!n.closed){n.focus();return}const u=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!u)return;n=u;const d=r(u),f=o5(LUe,{onClose:()=>u.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&l(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),u.addEventListener("pagehide",a),u.addEventListener("beforeunload",a)}return In(()=>{c()}),vo(()=>{n&&!n.closed&&n.close(),a()}),(u,d)=>(g(),ue(Cn,{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:ae(()=>[b("button",{class:"kap-fab",type:"button",onClick:c}," KAP ")]),_:1},8,["text"]))}}),NUe=vt($Ue,[["__scopeId","data-v-992ae84c"]]);function zUe({client:e}){const t=B(()=>e.appState.value==="first-run"||e.appState.value==="recovery"),n="/login",o=V(null);function s(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function i(l){typeof window>"u"||window.history.replaceState(window.history.state,"",l)}return Ke(t,l=>{if(!(typeof window>"u")){if(l){window.location.pathname!==n&&(o.value=s(),i(n));return}window.location.pathname===n&&(i(o.value??"/"),o.value=null)}},{immediate:!0}),{showAuthGate:t}}function BUe({running:e,showAuthGate:t}){const{t:n}=$t(),o=B(()=>{const s=e.value?`${af[0]} `:"";return t.value?`${s}${n("app.authPageTitle")} - Pythinker Code Web`:`${s}Pythinker Code Web`});sA(()=>{typeof document<"u"&&(document.title=o.value)})}function RUe(e,t,n){const o=new Map(e.attachments.map(a=>[a.attachmentId,a])),s=new Map(e.tasks.map(a=>[a.taskId,a])),i=e.items.find(a=>a.kind==="turn"),l=e.items.findLast(a=>a.kind==="turn"),r=e.items.flatMap(a=>a.kind==="turn"?PUe(a,o,s,{...n,startedAt:a.turnId===i?.turnId?t?.createdAt:void 0,endedAt:a.turnId===l?.turnId?t?.disposedAt:void 0}):[]);return M2(r,[],a=>n.getFileUrl(a),e.meta.activity==="turn")}function PUe(e,t,n,o){const s=[],i=HUe([e.startedAt,...e.steps.map(c=>c.startedAt),o.startedAt]),l=jd(e.endedAt)??jd(o.endedAt),r=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const c=[{type:"text",text:e.prompt}];for(const u of e.attachmentIds??[]){const d=jUe(t.get(u));d!==void 0&&c.push(d)}s.push({id:`${e.turnId}:input`,sessionId:o.sessionId,role:"user",content:c,createdAt:i,promptId:r,metadata:{origin:e.origin}})}for(const c of e.steps){const u=jd(c.startedAt)??i;for(const d of c.frames){if(d.kind==="text"){if(d.text.length===0||d.role==="user"&&d.taskId===void 0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:d.role,content:[{type:"text",text:d.text}],createdAt:u,promptId:r,metadata:d.taskId===void 0?void 0:{origin:{kind:"task",taskId:d.taskId},task:n.get(d.taskId),[L$]:FUe(d.taskId,d.text,n.get(d.taskId))}});continue}if(d.kind==="thinking"){if(d.text.length===0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:"assistant",content:[{type:"thinking",thinking:d.text,startedAt:u,durationMs:CM(u,jd(c.endedAt))}],createdAt:u,promptId:r});continue}d.kind==="tool"&&(s.push({id:`${d.frameId}:call`,sessionId:o.sessionId,role:"assistant",content:[{type:"toolUse",toolCallId:d.toolCallId,toolName:d.name,input:d.input??d.display??{},outputLines:d.state==="running"?OUe(d.output):void 0}],createdAt:u,promptId:r}),d.state!=="running"&&s.push({id:`${d.frameId}:result`,sessionId:o.sessionId,role:"tool",content:[{type:"toolResult",toolCallId:d.toolCallId,output:d.output??d.error??"",isError:d.state==="error"}],createdAt:jd(c.endedAt)??u,promptId:r}))}}const a=e.durationMs??CM(i,l);if(a!==void 0){const c=s.findLastIndex(u=>u.role==="assistant");c>=0&&(s[c]={...s[c],durationMs:a})}return s}function FUe(e,t,n){if($$(t).length>0)return;const[o="",...s]=t.split(` `),i=n?.state??"info";return{id:`task:${e}:${i}`,category:"task",type:`task.${i}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:o.trim(),severity:i==="completed"?"info":"warning",body:s.join(` -`).trim(),raw:t}}function lUe(e){if(e?.source===void 0)return;const t=e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId};if(e.mediaType.startsWith("image/"))return{type:"image",source:t};if(e.mediaType.startsWith("video/"))return{type:"video",source:t};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}function rUe(e){if(e==null)return;if(typeof e=="string")return e.split(` +`).trim(),raw:t}}function jUe(e){if(e?.source===void 0)return;const t=e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId};if(e.mediaType.startsWith("image/"))return{type:"image",source:t};if(e.mediaType.startsWith("video/"))return{type:"video",source:t};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}function OUe(e){if(e==null)return;if(typeof e=="string")return e.split(` `);if(!Array.isArray(e))return[JSON.stringify(e)];const t=[];for(const n of e){if(typeof n=="string"){t.push(...n.split(` `));continue}if(n===null||typeof n!="object")continue;const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` `)):o.type==="think"&&typeof o.think=="string"&&t.push(...o.think.split(` -`))}return t.length>0?t:void 0}function jd(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function aUe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const iB=V(typeof window>"u"?0:window.innerWidth);let s4=0,rp=!1;function og(){iB.value=window.innerWidth}function cUe(){rp||typeof window>"u"||(window.addEventListener("resize",og),rp=!0,og())}function uUe(){!rp||typeof window>"u"||(window.removeEventListener("resize",og),rp=!1)}function lB(e,t,n){return Math.max(t,e-n)}function sg(e,t,n){return Math.min(n,Math.max(t,e))}function rB(){return In(()=>{s4+=1,cUe()}),vo(()=>{s4=Math.max(0,s4-1),s4===0&&uUe()}),{viewportWidth:iB}}const dUe="pythinker-web.file-preview-width",Vc=320;function fUe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=rB(),i=z(()=>Math.max(0,s.value-t.value)),l=z(()=>lB(i.value,Vc,Vc));function r(F){return sg(Math.round(F),Vc,l.value)}function a(){return r(i.value/2)}const c=z(()=>a()),u=V(c.value),d=z(()=>sg(u.value,Vc,l.value)),f=V(null),p=z(()=>{const F=f.value;if(!F)return null;const Z=e.turns.value.find(fe=>fe.id===F.turnId);return Z?.role==="compaction"&&Z.text?Z.text:null}),h=z(()=>p.value!==null);function m(F){n.value="compaction",f.value=F}function k(){f.value=null,n.value==="compaction"&&(n.value=null)}const x=V(null),y=z(()=>{const F=x.value;if(!F)return{entry:void 0,version:0};const Z=e.auxiliaryTranscripts.getEntry(F.sessionId,F.subagentId);return{entry:Z,version:Z?.version.value??0}});function w(F){const Z=e.activeAppTasks.value.find(fe=>fe.agentId===F||fe.id===F||fe.backgroundTaskId===F||fe.parentToolCallId===F);return Z?.agentId??Z?.id??F}const _=z(()=>{const F=x.value;if(!F)return null;const Z=e.activeAppTasks.value.find(Ae=>Ae.agentId===F.subagentId||Ae.id===F.subagentId||Ae.backgroundTaskId===F.subagentId);if(Z)return vxe(Z);const fe=y.value.entry?.channel;if(!fe)return null;const ve=fe.agents.find(Ae=>Ae.agentId===F.subagentId),ge=fe.snapshot.items.findLast(Ae=>Ae.kind==="turn"),oe=fe.snapshot.meta.activity==="turn",de=fe.loading,ke=ge?.kind==="turn"&&ge.state==="failed",Se=ge?.kind==="turn"&&ge.state==="cancelled",me=fe.refreshError&&ge===void 0;return{id:F.subagentId,name:ve?.label??F.subagentId,subagentType:ve?.type==="sub"?"subagent":ve?.type,phase:oe?"working":Se?"cancelled":ke||me?"failed":de?"queued":"completed",status:oe||de?"running":Se?"cancelled":ke||me?"failed":"completed"}}),M=z(()=>{const F=x.value,Z=y.value.entry?.channel;if(!F||!Z)return[];const fe=Z.agents.find(ve=>ve.agentId===F.subagentId);return oUe(Z.snapshot,fe,{sessionId:F.sessionId,getFileUrl:ve=>e.getFileUrl(ve)})}),P=z(()=>y.value.entry?.channel.loading??!1),B=z(()=>y.value.entry?.channel.refreshError??!1),$=z(()=>y.value.entry?.channel.loadingOlder??!1),T=z(()=>y.value.entry?.channel.loadOlderError??!1),I=z(()=>y.value.entry?.channel.snapshot.hasMoreOlder??!1),N=z(()=>y.value.entry?.channel.snapshot.meta.activity==="turn"),C=z(()=>_.value!==null);function O(F){const Z=e.activeSessionId.value;if(!F||!Z)return;const fe=w(F),ve=x.value;ve&&ve.subagentId!==fe&&e.auxiliaryTranscripts.deactivate(ve.sessionId,ve.subagentId),x.value={sessionId:Z,subagentId:fe},n.value="agent",e.auxiliaryTranscripts.activate(Z,fe)}function H(){const F=x.value;F&&e.auxiliaryTranscripts.deactivate(F.sessionId,F.subagentId),x.value=null,n.value==="agent"&&(n.value=null)}Ze(n,(F,Z)=>{if(Z!=="agent"||F==="agent")return;const fe=x.value;fe&&e.auxiliaryTranscripts.deactivate(fe.sessionId,fe.subagentId)});function D(){y.value.entry?.channel.loadOlder().catch(()=>{})}const A=V(null),R=z(()=>{const F=A.value;if(!F)return null;const Z=BQ(e.turns.value,F);return Z?{id:F,title:ni(Z.name),path:jg(Z.arg),lines:Z.status==="error"?null:Fg(Z),output:Z.output}:null}),j=z(()=>R.value!==null);function q(F){n.value="toolDiff",A.value=F}function K(){A.value=null,n.value==="toolDiff"&&(n.value=null)}const U=V("list"),te=V(null);function J(){n.value="diff",U.value="list",te.value=null,e.loadGitStatus(e.activeSessionId.value)}function ee(){n.value==="diff"&&(n.value=null),U.value="list",te.value=null,e.clearFileDiff()}async function ie(F){U.value="detail",te.value=F,await e.loadFileDiff(F)}async function Q(F){!e.activeSessionId.value&&e.activeWorkspaceId.value?await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,F):await e.openSideChat(F),n.value="btw"}function he(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function xe(){n.value==="btw"&&(n.value=null)}const Ye=z(()=>e.sideChatVisible.value),st=z(()=>n.value!==null&&(n.value!=="compaction"||h.value)&&(n.value!=="agent"||C.value)&&(n.value!=="toolDiff"||j.value)&&(n.value!=="btw"||Ye.value)),X=V(!1);function se(){return n.value==="compaction"&&h.value?(k(),!0):n.value==="agent"&&C.value?(H(),!0):n.value==="toolDiff"&&j.value?(K(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(ee(),!0):n.value==="btw"?(he(),!0):!1}return Ze(e.activeSessionId,()=>{o(),k(),H(),K(),ee(),xe()}),{PREVIEW_WIDTH_KEY:dUe,PREVIEW_MIN:Vc,previewDefaultWidth:c,previewMax:l,previewWidth:u,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:h,openCompactionPanel:m,closeCompactionPanel:k,agentPanelMember:_,agentPanelTurns:M,agentPanelLoading:P,agentPanelLoadError:B,agentPanelLoadingMore:$,agentPanelLoadMoreError:T,agentPanelHasMore:I,agentPanelRunning:N,agentPanelVisible:C,openAgentPanel:O,closeAgentPanel:H,loadOlderAgentMessages:D,toolDiffTarget:R,toolDiffVisible:j,openToolDiff:q,closeToolDiff:K,detailDiffMode:U,detailDiffPath:te,openDiffDetail:J,closeDiffDetail:ee,selectDiffFile:ie,btwVisible:Ye,openSideChatTab:Q,closeSideChat:he,hideSideChatPanel:xe,sidePanelVisible:st,panelDragging:X,closeOpenSidePanel:se}}const pUe=dn.sidebarWidth,xM=dn.sidebarCollapsed,SM=270,e8=170,hUe=480,mUe=320;function gUe(e={}){const{viewportWidth:t}=rB(),n=V(SM),o=V(!1),s=V(!1),i=z(()=>{const u=mUe+(s8(e.previewOpen)?Vc:0);return Math.min(hUe,lB(t.value,e8,u))}),l=z(()=>sg(n.value,e8,i.value));function r(){try{o.value=ls(xM)==="true"}catch{o.value=!1}}function a(){try{Es(xM,String(o.value))}catch{}}function c(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:pUe,SIDEBAR_DEFAULT:SM,SIDEBAR_MIN:e8,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:l,loadSidebarCollapsed:r,toggleSidebarCollapse:c}}async function vUe(e){if(!e.fileId)return{url:e.url};try{const t=await St().getFileBlob(e.fileId),n=URL.createObjectURL(t);return{url:n,revoke:()=>URL.revokeObjectURL(n)}}catch{return{url:e.url}}}function yUe({client:e,detailTarget:t}){const{t:n}=Lt(),o=V(null),s=V(null),i=V(!1),l=V(null),r=V(null);let a=0;const c=z(()=>{const w=r.value;return w?e.getFileDownloadUrl(w):null}),u=z(()=>o.value!==null);function d(w){return w.length>1?w.replace(/\/+$/,""):w}function f(w){const _=[];for(const M of w.split(/[\\/]+/))if(!(!M||M===".")){if(M===".."){_.pop();continue}_.push(M)}return _.join("/")}function p(w){const _=w.trim();if(!_)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(_))return{error:n("filePreview.errors.unsupportedPath")};if(_.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const M=d(e.status.value.cwd);if(_.startsWith("/")){if(!M||_!==M&&!_.startsWith(`${M}/`))return{error:n("filePreview.errors.outsideWorkspace")};const B=_===M?"":_.slice(M.length+1);if(B.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const $=f(B);return $?{path:$}:{error:n("filePreview.errors.isDirectory")}}if(_.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const P=f(_);return P?{path:P}:{error:n("filePreview.errors.emptyPath")}}async function h(w){const _=++a;t.value="file",s.value=null,l.value=null,i.value=!0,o.value=w,r.value=null;const M=p(w.path);if("error"in M){i.value=!1,l.value=M.error;return}r.value=M.path;try{const P=await e.readFileContent(M.path);if(_!==a)return;P?s.value={...P,path:P.path||M.path}:l.value=n("filePreview.errors.loadFailed")}catch(P){if(_!==a)return;l.value=P instanceof Error?P.message:n("filePreview.errors.loadFailed")}finally{_===a&&(i.value=!1)}}function m(){a+=1,o.value=null,r.value=null,s.value=null,l.value=null,i.value=!1}function k(){m(),t.value==="file"&&(t.value=null)}Ze(t,(w,_)=>{_==="file"&&w!=="file"&&m()});function x(){const w=s.value?.path??o.value?.path;w&&e.openWorkspaceFile(w,o.value?.line)}function y(){const w=s.value?.path??o.value?.path;w&&e.revealWorkspaceFile(w)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:l,previewDownloadUrl:c,previewExternalActions:u,openFilePreview:h,closeFilePreview:k,openPreviewInEditor:x,revealPreviewFile:y}}const wUe=new Set(["agent","compaction","btw"]);function kUe(e){const t=V([]),n=V(null),o=V(!1),s=V(!1),i=new Map;let l=0;const r=z(()=>t.value.find(k=>k.id===n.value)??null);function a(k){const x=k.always?void 0:t.value.find(w=>w.type===k.type&&w.key===k.key);if(x)return x.title=k.title,x.payload=k.payload,n.value=x.id,o.value=!0,x;const y={...k,id:`panel-tab-${++l}`};return t.value=[...t.value,y],n.value=y.id,o.value=!0,y}function c(k){t.value.some(x=>x.id===k)&&(n.value=k,o.value=!0)}function u(k){const x=t.value.findIndex(w=>w.id===k);if(x<0)return null;const[y]=t.value.splice(x,1);if(t.value=[...t.value],n.value===k){const w=t.value[Math.min(x,t.value.length-1)];n.value=w?.id??null}return t.value.length===0&&(o.value=!1,s.value=!1),y??null}function d(){return o.value?(o.value=!1,s.value=!1,!0):!1}function f(){o.value=!o.value,o.value||(s.value=!1)}function p(){r.value!==null&&(s.value=!s.value,s.value&&(o.value=!0))}function h(k){const x=t.value.filter(w=>wUe.has(w.type)),y=Math.max(0,x.findIndex(w=>w.id===n.value));if(x.length===0){i.delete(k);return}i.set(k,{tabs:x.map(({id:w,..._})=>({..._})),activeIndex:y,visible:o.value})}function m(k){const x=i.get(k);t.value=x?.tabs.map(y=>({...y,id:`panel-tab-${++l}`}))??[],n.value=t.value[x?.activeIndex??0]?.id??null,o.value=x?.visible===!0&&t.value.length>0,s.value=!1}return Ze(e,(k,x)=>{h(x),m(k)}),{tabs:t,activeTabId:n,activeTab:r,visible:o,expanded:s,openTab:a,activateTab:c,closeTab:u,hidePanel:d,togglePanel:f,toggleExpanded:p}}const bUe={class:"server-auth-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"server-auth-title"},_Ue={class:"server-auth-card"},xUe={class:"server-auth-body"},SUe={class:"server-auth-foot"},CUe=Je({__name:"ServerAuthDialog",setup(e){const t=V(""),n=V(null),o=V(!1);In(()=>{yt(()=>n.value?.focus())});function s(){const l=t.value;!l||o.value||(o.value=!0,zN(l),window.location.reload())}function i(l){l.key==="Enter"&&(l.preventDefault(),s())}return(l,r)=>(g(),S("div",bUe,[b("div",_Ue,[r[1]||(r[1]=b("div",{class:"server-auth-head"},[b("h1",{id:"server-auth-title",class:"server-auth-title"},"Server token required"),b("p",{class:"server-auth-hint"},[Oe(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),b("code",null,"PYTHINKER_CODE_PASSWORD"),Oe("). ")])],-1)),b("div",xUe,[W(us,{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),b("div",SUe,[W(Nt,{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:ae(()=>[Oe(E(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])])])]))}}),MUe=vt(CUe,[["__scopeId","data-v-82dad292"]]),AUe={class:"app-shell"},TUe={key:2,class:"offline-strip",role:"status"},EUe=["aria-label","aria-hidden"],IUe={class:"pt-shell"},$Ue={class:"pt-body"},LUe=["aria-label"],NUe=["disabled"],zUe=["disabled"],BUe={class:"action-toast-stack"},RUe=Je({__name:"App",setup(e){ove();const t=V(!1);let n=null;const o=P1(),s=V([]),i=V(!1),l=V(null),r=V(null),a=V(null);let c=null;const u=z(()=>{const Fe=o.activeWorkspaceId.value;return Fe?[...o.sessionsForView.value,...s.value].filter(pe=>pe.workspaceId===Fe).toSorted((pe,Ne)=>new Date(Ne.updatedAt??0).getTime()-new Date(pe.updatedAt??0).getTime()).slice(0,6):[]});function d(Fe){return{id:Fe.id,title:Fe.title,time:new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,Math.floor((Date.now()-new Date(Fe.updatedAt).getTime())/864e5)),"day"),busy:!1,updatedAt:Fe.updatedAt,workspaceId:Fe.workspaceId,archived:!0}}async function f(){try{const Fe=[];let pe;for(;;){const Ne=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Fe.push(...Ne.items),!Ne.hasMore||Ne.items.length===0||(pe=Ne.items.at(-1)?.id,pe===void 0))break}s.value=Fe.map(d)}catch(Fe){console.warn("loadDoneSessions failed",Fe)}}const p=z(()=>{const Fe=new Map(o.workspaceGroups.value.flatMap(pe=>pe.sessions.map(Ne=>[Ne.id,Ne.updatedAt])));return o.sessionsForView.value.map(pe=>({id:pe.id,title:pe.title,workspaceId:pe.workspaceId??"",workspaceName:pe.workspaceName??"-",lastPrompt:pe.lastPrompt,updatedAt:pe.updatedAt??Fe.get(pe.id)??new Date(0).toISOString(),archived:!1}))});async function h(){const Fe=[];let pe;for(;;){const Sn=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Fe.push(...Sn.items),!Sn.hasMore||Sn.items.length===0||(pe=Sn.items.at(-1)?.id,pe===void 0))break}const Ne=o.workspacesView.value;return Fe.filter(Sn=>!Sn.parentSessionId).map(Sn=>{const ii=Ne.find(el=>el.id===Sn.workspaceId||el.root===Sn.cwd);return{id:Sn.id,title:Sn.title,workspaceId:ii?.id??Sn.workspaceId??Sn.cwd,workspaceName:ii?.name??Sn.cwd.split("/").filter(Boolean).at(-1)??"-",lastPrompt:Sn.lastPrompt,updatedAt:Sn.updatedAt,archived:!0}})}function m(){i.value=!0,o.loadAllSessions()}function k(Fe,pe){l.value={kind:Fe,ids:Array.isArray(pe)?pe:[pe]}}const x=z(()=>!o.dangerousBypassAuth.value&&t.value);qn("resolveImage",o.resolveImageUrl),qn("modelDisplay",Fe=>{if(Fe===void 0||Fe.length===0)return;const pe=o.models.value.find(Ne=>Ne.id===Fe)??o.models.value.find(Ne=>Ne.model===Fe);return pe?.displayName||pe?.model||(Fe.includes("/")?Fe.split("/").pop():Fe)}),qn("subagentEffort",Fe=>Fe!==void 0&&Fe.length>0&&Fe!=="off"&&Fe!=="on"?rf(Fe):void 0),qn("resolveDynamicWorkflowMembers",Fe=>o.dynamicWorkflowMembersByToolCallId.value.get(Fe)??[]),qn("mainModelBinding",()=>{const Fe=o.status.value.modelId;if(Fe)return{model:Fe,effort:o.thinking.value}}),qn("openAgentSettings",()=>{Ks("agent")});const{t:y}=Lt(),{confirm:w}=B1(),_=pr(),M=i6(),P=V(!1),B=V(!1),$=z(()=>{const Fe=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Fe)?.title??s.value.find(pe=>pe.id===Fe)?.title??""}),T=z(()=>{const Fe=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Fe)?.lastTurnReason}),I=z(()=>{const Fe=o.activeSessionId.value;if(Fe)return Bge(Fe)}),N=z(()=>s.value.some(Fe=>Fe.id===o.activeSessionId.value)),C=z(()=>o.visibleWorkspace.value?.sessionCount??0),O=z(()=>o.activity.value!=="idle"),{showAuthGate:H}=tUe({client:o});nUe({running:O,showAuthGate:H});const D=z(()=>{const Fe=o.models.value.find(pe=>pe.id===o.status.value.modelId);return v9(Fe,o.thinking.value)}),A=V(!1),R=z(()=>o.appState.value==="first-run"),j=z(()=>o.appState.value==="recovery"&&!A.value),q=z(()=>o.appState.value==="recovery"&&A.value);Ze(()=>o.appState.value,Fe=>{Fe!=="recovery"&&(A.value=!1)});function K(){A.value=!1}const U=V(!1);function te(){o.setOnboarded(!0),U.value=!1}function J(){U.value=!0}let ee=0;function ie(){const Fe=window.visualViewport,pe=document.documentElement.style;pe.setProperty("--app-height",`${Fe?.height??window.innerHeight}px`),pe.setProperty("--app-top",`${Fe?.offsetTop??0}px`)}function Q(){ee||(ee=requestAnimationFrame(()=>{ee=0,ie()}))}In(()=>{n=lve(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),hs(),ie(),window.visualViewport?.addEventListener("resize",Q),window.visualViewport?.addEventListener("scroll",Q),window.addEventListener("resize",Q),document.addEventListener("keydown",he,!0)}),En(()=>{Mn(),document.removeEventListener("keydown",he,!0),window.visualViewport?.removeEventListener("resize",Q),window.visualViewport?.removeEventListener("scroll",Q),window.removeEventListener("resize",Q),ee&&(cancelAnimationFrame(ee),ee=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function he(Fe){Fe.key!=="Escape"||Fe.isComposing||kl.value||de()&&(Fe.stopPropagation(),Fe.preventDefault())}const xe=V(null),Ye=V(null),st=z(()=>o.activeSessionId.value??`__draft__:${o.activeWorkspaceId.value??"none"}`),{tabs:X,activeTabId:se,activeTab:F,visible:Z,expanded:fe,openTab:ve,activateTab:ge,closeTab:oe,hidePanel:de,togglePanel:ke,toggleExpanded:Se}=kUe(st);function me(Fe){Ye.value=Fe,xe.value="turnDiff"}function Ae(){Ye.value=null,xe.value==="turnDiff"&&(xe.value=null)}const le=V(!1);Ze(o.activeSessionId,()=>{Ae(),le.value=!0,yt(()=>{le.value=!1})});const{previewTarget:be,previewFile:_e,previewLoading:Ke,previewError:Qe,previewDownloadUrl:mt,previewExternalActions:Tt,openFilePreview:qt,closeFilePreview:nn,openPreviewInEditor:Jt,revealPreviewFile:kn}=yUe({client:o,detailTarget:xe});oNe(()=>o.activeSessionId.value);function Dn(Fe){xe.value="editor",Kz({path:Fe,line:be.value?.line})}function xn(){xe.value==="editor"&&(xe.value=null),Q7()}Ze(xe,(Fe,pe)=>{pe==="editor"&&Fe!=="editor"&&Q7()});const Ln=V(null),Hn=V(null);let bn=0,Wn;async function Pn(Fe){if(Fe.kind!=="image"&&Fe.kind!=="video")return;const pe=++bn;Wn?.(),Wn=void 0,Ln.value=null,Hn.value=null;const Ne=await vUe(Fe);if(pe!==bn){Ne.revoke?.();return}Wn=Ne.revoke,Ln.value=Fe,Hn.value=Ne.url}function Mn(){bn+=1,Wn?.(),Wn=void 0,Ln.value=null,Hn.value=null}const Nn=z(()=>Z.value),{SIDEBAR_WIDTH_KEY:An,SIDEBAR_DEFAULT:Qn,SIDEBAR_MIN:Fn,sidebarMax:Qt,sessionColWidth:uo,sidebarCollapsed:Zn,sidebarDragging:Bo,sideWidth:Un,loadSidebarCollapsed:hs,toggleSidebarCollapse:Io}=gUe({previewOpen:Nn}),{PREVIEW_WIDTH_KEY:Bt,PREVIEW_MIN:Jo,previewDefaultWidth:$s,previewMax:ze,previewWidth:Ge,previewPanelWidth:ot,compactionPanelText:dt,compactionPanelVisible:Ct,openCompactionPanel:Ft,closeCompactionPanel:Ut,agentPanelMember:en,agentPanelTurns:tn,agentPanelLoading:eo,agentPanelLoadError:Ro,agentPanelLoadingMore:Ls,agentPanelLoadMoreError:Do,agentPanelHasMore:Ve,agentPanelRunning:it,openAgentPanel:Xe,closeAgentPanel:We,loadOlderAgentMessages:je,toolDiffTarget:kt,openToolDiff:It,closeToolDiff:cn,detailDiffMode:So,detailDiffPath:Qo,openDiffDetail:Po,closeDiffDetail:Xn,selectDiffFile:pn,btwVisible:Us,openSideChatTab:mi,closeSideChat:oi,hideSideChatPanel:ql,panelDragging:vl}=fUe({client:o,sideWidth:Un,detailTarget:xe,closeFilePreview:nn});function Zs(Fe){return Fe.split(/[\\/]/).filter(Boolean).at(-1)??Fe}function yo(Fe){ve({type:"file",key:Fe.path,title:Zs(Fe.path),icon:"file-text",payload:Fe})}function $o(Fe){ve({type:"editor",key:Fe,title:Zs(Fe),icon:"file-edit",payload:{path:Fe}})}function yl(Fe){ve({type:"compaction",key:Fe.turnId,title:y("panel.tabs.compaction"),icon:"thinking",payload:Fe})}function ms(Fe){const pe=o.activeAppTasks.value.find(Ne=>Ne.agentId===Fe||Ne.id===Fe||Ne.backgroundTaskId===Fe||Ne.parentToolCallId===Fe);ve({type:"agent",key:pe?.agentId??pe?.id??Fe,title:pe?.description||y("panel.tabs.agent"),icon:"robot",payload:{target:Fe}})}Ze(o.activeAppTasks,Fe=>{for(const pe of X.value){if(pe.type!=="agent")continue;const Ne=pe.payload?.target??pe.key,Sn=Fe.find(ii=>ii.agentId===Ne||ii.id===Ne||ii.backgroundTaskId===Ne||ii.parentToolCallId===Ne);Sn?.description&&(pe.title=Sn.description)}});function wl(Fe){It(Fe);const pe=kt.value;ve({type:"toolDiff",key:Fe,title:pe?.path?Zs(pe.path):pe?.title??y("panel.tabs.diff"),icon:"file-edit",payload:{id:Fe}})}function gi(){ve({type:"diff",key:"workspace",title:y("panel.tabs.diff"),icon:"git-fork"})}function si(Fe){const pe=X.value.find(Ne=>Ne.type==="turnDiff"&&Ne.key===Fe.turnId);if(pe?.id===se.value){$e(pe.id);return}ve({type:"turnDiff",key:Fe.turnId,title:y("panel.tabs.turnDiff"),icon:"git-fork",payload:Fe})}async function Ul(Fe){await mi(Fe),ve({type:"btw",key:"side-chat",title:y("sideChat.title"),icon:"message",payload:{prompt:Fe}})}function Ni(Fe){Fe.type==="file"?nn():Fe.type==="editor"?xn():Fe.type==="compaction"?Ut():Fe.type==="agent"?We():Fe.type==="toolDiff"?cn():Fe.type==="diff"?Xn():Fe.type==="turnDiff"?Ae():Fe.type==="btw"&&ql()}function Te(Fe){if(Fe===null){xe.value=null;return}Fe.type==="file"?qt(Fe.payload):Fe.type==="editor"?Dn(Fe.payload.path):Fe.type==="compaction"?Ft(Fe.payload):Fe.type==="agent"?Xe(Fe.payload.target):Fe.type==="toolDiff"?It(Fe.payload.id):Fe.type==="diff"?Po():Fe.type==="turnDiff"?me(Fe.payload):Fe.type==="btw"&&(xe.value="btw")}Ze(F,(Fe,pe)=>{pe&&pe.id!==Fe?.id&&Ni(pe),Te(Fe)},{flush:"post"});function $e(Fe){X.value.find(Ne=>Ne.id===Fe)?.type==="btw"&&oi(),oe(Fe)}function Mt(){se.value&&$e(se.value)}const rt=V(null),mn=V(null);function Kn(){let Fe=!1;const pe=Ne=>{Ne instanceof KeyboardEvent&&Ne.repeat||(Fe=!0)};return document.addEventListener("pointerdown",pe,!0),document.addEventListener("keydown",pe,!0),window.addEventListener("blur",pe),document.addEventListener("visibilitychange",pe),()=>{yt(()=>{document.removeEventListener("pointerdown",pe,!0),document.removeEventListener("keydown",pe,!0),window.removeEventListener("blur",pe),document.removeEventListener("visibilitychange",pe),!Fe&&document.hasFocus()&&mn.value?.focusInput()})}}const to=V(!1),Co=V(!1),no=V(!1),Vo=V(!1),Qi=V("general"),Os=z(()=>g0.value>0||to.value||Co.value||no.value||Vo.value||P.value||B.value||Ln.value!==null),Ea=z(()=>F.value?.title);function Wo(Fe){rt.value?.insertComposerQuote(Fe),M.value&&Z.value&&de()}const zi=V(null),gs=V(null),kl=z(()=>g0.value>0||to.value||Co.value||no.value||Vo.value||U.value||P.value||B.value||Ln.value!==null),es=V(!1),Hs=V(!1),vs=V(!1);async function bl(){es.value=!0,Hs.value=!1,to.value=!0;try{await o.refreshAllProviders()}catch{Hs.value=!0}finally{es.value=!1}}function Ks(Fe="general"){Qi.value=Fe,Vo.value=!0}function ne(){Ks("providers")}function we(){ne()}async function Ee(Fe){to.value=!1,await Be(Fe)}async function Be(Fe){await o.setModel(Fe)&&Fe!==o.defaultModel.value&&o.updateConfig({defaultModel:Fe})}async function et(Fe){await o.archiveSession(Fe),await f(),k("done",Fe)}async function pt(Fe){await o.restoreSession(Fe)&&(s.value=s.value.filter(pe=>pe.id!==Fe),k("open",Fe))}async function jt(Fe,pe){await o.renameSession(Fe,pe),s.value.some(Ne=>Ne.id===Fe)&&await f()}async function Zt(Fe,pe){const Ne=s.value.find(Sn=>Sn.id===Fe);if(!Ne){await o.setSessionEmoji(Fe,pe);return}await jt(Fe,UT(pe,Ne.title))}async function Vt(Fe,pe){const Ne=Fe.map(Sn=>Sn.id);for(const Sn of Ne)pe==="archive"?await o.archiveSession(Sn):await o.restoreSession(Sn);await f(),k(pe==="archive"?"done":"open",Ne)}async function Wt(){const Fe=l.value;if(Fe){l.value=null;for(const pe of Fe.ids)Fe.kind==="done"?await o.restoreSession(pe):await o.archiveSession(pe);await f()}}async function on(Fe){const pe=Fe??o.activeSessionId.value;if(!pe)return;r.value={state:"running",sessionId:pe};const Ne=await o.exportSession(pe);r.value=Ne?{state:"done",sessionId:pe}:null}async function Vn(Fe){const pe=o.workspacesView.value.find(Ne=>Ne.id===Fe)?.name??Fe;await w({title:y("sidebar.removeWorkspace"),message:y("workspace.removeWorkspaceConfirm",{name:pe}),variant:"danger",action:()=>o.deleteWorkspace(Fe)})}async function Ht(Fe){vs.value=!0;try{await o.updateConfig(Fe)&&await Promise.all([o.refreshRuntimeState(),o.refreshServerMeta()])}finally{vs.value=!1}}async function Tn(Fe){await o.undo(1),await yt(),rt.value?.loadComposerForEdit(Fe.text,Fe.attachments)}function zn(Fe){if(Fe==="/compact"||Fe.startsWith("/compact ")){o.compact(Fe.slice(8).trim()||void 0);return}if(Fe==="/dynamic_workflow"||Fe.startsWith("/dynamic_workflow ")){const pe=Fe.slice(17).trim();pe==="on"?o.setDynamicWorkflowMode(!0):pe==="off"?o.setDynamicWorkflowMode(!1):pe?(o.setDynamicWorkflowMode(!0),o.sendPrompt(pe)):o.toggleDynamicWorkflowMode();return}if(Fe==="/goal"||Fe.startsWith("/goal ")){const pe=Fe.slice(5).trim();pe==="pause"||pe==="resume"||pe==="cancel"?o.controlGoal(pe):pe?o.createGoal(pe):o.toggleGoalMode();return}if(Fe==="/btw"||Fe.startsWith("/btw ")){const pe=Fe.slice(4).trim();if(!pe&&F.value?.type==="btw")Mt();else{const Ne=Kn();Ul(pe||void 0).then(Ne,Ne)}return}switch(Fe){case"/new":case"/clear":Fr();break;case"/fork":o.forkSession();break;case"/export":on();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/status":no.value=!0;break;case"/login":we();break;default:{const pe=Fe.indexOf(" "),Ne=Zke((pe===-1?Fe:Fe.slice(0,pe)).slice(1)),Sn=pe===-1?void 0:Fe.slice(pe+1).trim()||void 0;if(!Ne)break;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,Ne,Sn):o.activateSkill(Ne,Sn);break}}}function Ns(Fe){o.unqueue(Fe)}function rs(Fe){o.unqueue(Fe)}function _l(Fe){o.reorderQueue(Fe.from,Fe.to)}function J0(Fe){o.steerQueued(Fe)}async function Q0(Fe){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Fe.text,Fe.attachments);return}if(!o.activeSessionId.value&&!pe){zi.value=Fe,Co.value=!0;return}o.sendPrompt(Fe.text,Fe.attachments)}async function qu(Fe){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Fe,[]);return}o.activeSessionId.value&&o.sendPrompt(Fe)}async function hr(Fe){if(gs.value=null,!await o.addWorkspaceByPath(Fe)){gs.value=y("workspace.addFailed");return}Co.value=!1;const Ne=zi.value;zi.value=null;const Sn=o.activeWorkspaceId.value;Ne&&Sn&&await o.startSessionAndSendPrompt(Sn,Ne.text,Ne.attachments)}function ts(){zi.value=null,gs.value=null,Co.value=!1}async function Pr(Fe){for(const pe of Fe)if(gs.value=null,!await o.addWorkspaceByPath(pe)){gs.value=y("workspace.addFailed"),Co.value=!0;return}}async function Uu(Fe,pe){const Ne=await o.generateSessionTitle(Fe);Ne===null&&(a.value=y("sidebar.genTitleUnavailable"),c!==null&&clearTimeout(c),c=setTimeout(()=>{a.value=null,c=null},5e3)),pe(Ne)}function ec(){yt(()=>{rt.value?.focusComposer()})}function Fr(){const Fe=o.activeWorkspaceId.value;Fe?o.openWorkspaceDraft(Fe):o.clearActiveSession(),ec()}function F1(Fe){o.openWorkspaceDraft(Fe),ec()}function j1(Fe){Fe&&window.open(Fe,"_blank","noopener")}return(Fe,pe)=>(g(),S("div",AUe,[W(oDe),x.value?(g(),ue(MUe,{key:0})):Y("",!0),j.value?(g(),ue(gqe,{key:1,onOpenProviders:pe[0]||(pe[0]=()=>{A.value=!0,ne()}),onDismiss:pe[1]||(pe[1]=Ne=>A.value=!0)})):Y("",!0),q.value?(g(),S("div",TUe,[b("span",null,E(v(y)("recovery.offlineNotice")),1),b("button",{type:"button","data-testid":"offline-strip-reconnect",onClick:pe[2]||(pe[2]=Ne=>A.value=!1)},E(v(y)("recovery.addProvider")),1)])):Y("",!0),j.value?Y("",!0):(g(),S("div",{key:3,class:Pe(["app",{mobile:v(M),"sidebar-collapsed":v(Zn)&&!v(M),"macos-desktop":v(Rg),"panel-expanded":v(fe)}]),style:Gt({"--preview-w":v(ot)+"px"})},[v(M)?(g(),ue(fDe,{key:1,workspace:v(o).visibleWorkspace.value,"session-title":$.value,running:O.value,branch:v(o).status.value.branch,"session-count":C.value,onOpenSwitcher:pe[23]||(pe[23]=Ne=>P.value=!0),onOpenSettings:pe[24]||(pe[24]=Ne=>B.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(g(),S(Ce,{key:0},[W(VY,{collapsed:v(Zn),dragging:v(Bo),"col-width":v(Un),"active-workspace":v(o).visibleWorkspace.value,"active-workspace-id":v(o).activeWorkspaceId.value,sessions:v(o).sessionsForView.value,"archived-sessions":s.value,"pinned-ids":v(o).pinnedSessionIds.value,"pinned-collapsed":v(o).pinnedCollapsed.value,groups:v(o).workspaceGroups.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"pending-by-session":v(o).pendingBySession.value,"unread-by-session":v(o).unreadBySession.value,"workspace-sort-mode":v(o).workspaceSortMode.value,workspaces:v(o).workspacesView.value,"tabs-enabled":v(o).config.value?.experimental?.sidebarTabs===!0,onSelect:pe[3]||(pe[3]=Ne=>v(o).selectSession(Ne)),onCreate:Fr,onCreateInWorkspace:pe[4]||(pe[4]=Ne=>F1(Ne)),onSelectWorkspace:pe[5]||(pe[5]=Ne=>v(o).openWorkspace(Ne)),onAddWorkspace:pe[6]||(pe[6]=Ne=>Co.value=!0),onAddWorkspacePaths:Pr,onRename:jt,onGenerateTitle:Uu,onArchive:pe[7]||(pe[7]=Ne=>et(Ne)),onRestore:pe[8]||(pe[8]=Ne=>pt(Ne)),onPin:pe[9]||(pe[9]=Ne=>v(o).togglePinnedSession(Ne)),onReorderPins:pe[10]||(pe[10]=Ne=>v(o).reorderPinnedSessions(Ne)),onTogglePinnedCollapsed:pe[11]||(pe[11]=Ne=>v(o).togglePinnedCollapsed()),onSetSessionEmoji:Zt,onLoadDoneSessions:f,onFork:pe[12]||(pe[12]=Ne=>v(o).forkSession(Ne)),onExport:pe[13]||(pe[13]=Ne=>on(Ne)),onRenameWorkspace:pe[14]||(pe[14]=(Ne,Sn)=>v(o).renameWorkspace(Ne,Sn)),onDeleteWorkspace:pe[15]||(pe[15]=Ne=>Vn(Ne)),onReorderWorkspaces:pe[16]||(pe[16]=Ne=>v(o).reorderWorkspaces(Ne)),onSetWorkspaceSortMode:pe[17]||(pe[17]=Ne=>v(o).setWorkspaceSortMode(Ne)),onLoadMoreSessions:pe[18]||(pe[18]=Ne=>void v(o).loadMoreSessions(Ne)),onLoadAllSessions:pe[19]||(pe[19]=Ne=>void v(o).loadAllSessions()),onOpenSettings:pe[20]||(pe[20]=Ne=>Ks()),onOpenSessionAdmin:m,onCollapse:v(Io)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","archived-sessions","pinned-ids","pinned-collapsed","groups","active-id","attention-by-session","pending-by-session","unread-by-session","workspace-sort-mode","workspaces","tabs-enabled","onCollapse"]),Jn(W(qk,{class:"side-handle","storage-key":v(An),"default-width":v(Qn),min:v(Fn),max:v(Qt),"onUpdate:width":pe[21]||(pe[21]=Ne=>uo.value=Ne),"onUpdate:dragging":pe[22]||(pe[22]=Ne=>Bo.value=Ne)},null,8,["storage-key","default-width","min","max"]),[[_i,!v(Zn)]])],64)),i.value?(g(),ue(jX,{key:2,"open-sessions":p.value,workspaces:v(o).workspacesView.value,"load-archived":h,"archive-session":et,"restore-session":pt,"run-batch":Vt,onOpen:pe[25]||(pe[25]=Ne=>{i.value=!1,v(o).selectSession(Ne)}),onRename:pe[26]||(pe[26]=(Ne,Sn)=>v(o).renameSession(Ne,Sn)),onFork:pe[27]||(pe[27]=Ne=>v(o).forkSession(Ne)),onExport:pe[28]||(pe[28]=Ne=>on(Ne)),onBack:pe[29]||(pe[29]=Ne=>i.value=!1)},null,8,["open-sessions","workspaces"])):(g(),ue(M$e,{key:3,ref_key:"conversationPaneRef",ref:rt,mobile:v(M),turns:v(o).turns.value,"session-id":v(o).activeSessionId.value,approvals:v(o).pendingApprovals.value,changes:v(o).changes.value,"git-info":v(o).gitInfo.value,tasks:v(o).tasks.value,todos:v(o).todos.value,goal:v(o).goal.value,"activation-badges":v(o).activationBadges.value,status:v(o).status.value,thinking:v(o).thinking.value,"plan-mode":v(o).planMode.value,"plan-armed":v(o).planArmed.value,"session-plans":v(o).sessionPlans.value,"reveal-saved-plan":v(o).revealSavedPlan,"overlay-open":Os.value,"goal-mode":v(o).goalMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,models:v(o).models.value,"starred-ids":v(o).starredModelIds.value,skills:v(o).skills.value,questions:v(o).questions.value,"pending-question-actions":v(o).pendingQuestionActions,"pending-approval-actions":v(o).pendingApprovalActions,running:O.value,"turn-active":v(o).turnActive.value,queued:v(o).queued.value,"search-files":v(o).searchFiles,"upload-image":v(o).uploadImage,working:v(o).working.value,starting:v(o).isStartingFirstPrompt.value,"fast-moon":v(o).fastMoon.value,"file-reload-key":v(o).activeSessionId.value,"session-loading":v(o).sessionLoading.value,compaction:v(o).compaction.value,"has-more-messages":v(o).hasMoreMessages.value,"loading-more":v(o).loadingMoreMessages.value,"loading-more-error":v(o).loadMoreMessagesError.value,"load-older-messages":v(o).loadOlderMessages,"workspace-name":v(o).visibleWorkspace.value?.name,"workspace-root":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,"git-diff-stats":v(o).gitDiffStats.value,workspaces:v(o).workspacesView.value,"active-workspace-id":v(o).activeWorkspaceId.value,"session-title":$.value,pr:v(o).activePullRequest.value,"panel-visible":v(Z),"panel-expanded":v(fe),"active-panel-type":v(F)?.type,"toggle-panel":v(ke),"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,"last-turn-reason":T.value,"turn-error-kind":I.value?.reason==="max_steps"?"max_steps":void 0,"turn-error-message":I.value?.message,"session-done":N.value,pinned:v(o).pinnedSessionIds.value.includes(v(o).activeSessionId.value??""),"recent-sessions":u.value,onOpenChanges:pe[30]||(pe[30]=Ne=>gi()),onSelectWorkspace:pe[31]||(pe[31]=Ne=>F1(Ne)),onAddWorkspace:pe[32]||(pe[32]=Ne=>Co.value=!0),onOpenPr:j1,onSubmit:pe[33]||(pe[33]=Ne=>Q0(Ne)),onSteer:pe[34]||(pe[34]=Ne=>v(o).steerPrompt(Ne.text,Ne.attachments)),onApproval:pe[35]||(pe[35]=(Ne,Sn)=>v(o).respondApproval(Ne,Sn)),onCancelTask:pe[36]||(pe[36]=Ne=>v(o).cancelTask(Ne)),onAnswer:pe[37]||(pe[37]=(Ne,Sn)=>v(o).respondQuestion(Ne,Sn)),onDismiss:pe[38]||(pe[38]=Ne=>v(o).dismissQuestion(Ne)),onCommand:zn,onInterrupt:pe[39]||(pe[39]=Ne=>v(o).abortCurrentPrompt()),onUnqueue:Ns,onEditQueued:rs,onReorderQueue:_l,onSteerQueued:J0,onSetPermission:pe[40]||(pe[40]=Ne=>v(o).setPermission(Ne)),onSetThinking:pe[41]||(pe[41]=Ne=>v(o).setThinking(Ne)),onTogglePlan:pe[42]||(pe[42]=Ne=>v(o).togglePlanMode()),onToggleWorkflow:pe[43]||(pe[43]=Ne=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[44]||(pe[44]=Ne=>v(o).toggleGoalMode()),onCreateGoal:pe[45]||(pe[45]=Ne=>v(o).createGoal(Ne)),onControlGoal:pe[46]||(pe[46]=Ne=>v(o).controlGoal(Ne)),onRefreshGitStatus:pe[47]||(pe[47]=Ne=>v(o).activeSessionId.value&&v(o).loadGitStatus(v(o).activeSessionId.value)),onRenameSession:pe[48]||(pe[48]=(Ne,Sn)=>v(o).renameSession(Ne,Sn)),onForkSession:pe[49]||(pe[49]=Ne=>v(o).forkSession(Ne)),onArchiveSession:pe[50]||(pe[50]=Ne=>et(Ne)),onRestoreSession:pe[51]||(pe[51]=Ne=>pt(Ne)),onSelectSession:pe[52]||(pe[52]=Ne=>v(o).selectSession(Ne)),onTogglePin:pe[53]||(pe[53]=Ne=>v(o).togglePinnedSession(Ne)),onOpenSessionAdmin:m,onExportSession:pe[54]||(pe[54]=Ne=>on(Ne)),onCompact:pe[55]||(pe[55]=Ne=>v(o).compact()),onPickModel:pe[56]||(pe[56]=Ne=>bl()),onSelectModel:pe[57]||(pe[57]=Ne=>Be(Ne)),onOpenFile:pe[58]||(pe[58]=Ne=>yo(Ne)),onOpenMedia:pe[59]||(pe[59]=Ne=>Pn(Ne)),onOpenCompaction:pe[60]||(pe[60]=Ne=>yl(Ne)),onOpenAgent:pe[61]||(pe[61]=Ne=>ms(Ne)),onDetachTask:pe[62]||(pe[62]=Ne=>v(o).detachTask(Ne)),onOpenToolDiff:pe[63]||(pe[63]=Ne=>wl(Ne)),onOpenTurnDiff:pe[64]||(pe[64]=Ne=>si(Ne)),onEditMessage:Tn,onContinueTurn:qu},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","plan-armed","session-plans","reveal-saved-plan","overlay-open","goal-mode","dynamic-workflow-mode","models","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","turn-active","queued","search-files","upload-image","working","starting","fast-moon","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr","panel-visible","panel-expanded","active-panel-type","toggle-panel","conversation-toc","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","session-done","pinned","recent-sessions"])),!v(M)&&v(Zn)?(g(),ue(Dt,{key:4,class:"sidebar-toggle-btn",size:"sm",label:v(Zn)?v(y)("sidebar.expandSidebar"):v(y)("sidebar.collapseSidebar"),onClick:v(Io)},{default:ae(()=>[W(Ie,{name:v(Zn)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):Y("",!0),!v(M)&&v(Zn)?(g(),ue(Dt,{key:5,class:"new-chat-btn",size:"sm",label:v(y)("sidebar.newChat"),onClick:Fr},{default:ae(()=>[W(Ie,{name:"chat-new"})]),_:1},8,["label"])):Y("",!0),!i.value&&(!v(M)||v(Z))?(g(),S("aside",{key:6,class:Pe(["global-preview",{open:v(Z),mobile:v(M),expanded:v(fe),"no-anim":v(vl)||le.value}]),role:"complementary","aria-label":v(y)("layout.detailPanelAria"),"aria-hidden":!v(Z)},[b("div",IUe,[v(Z)&&!v(M)&&!v(fe)?(g(),ue(qk,{key:0,class:"panel-resize","storage-key":v(Bt),"default-width":v($s),min:v(Jo),max:v(ze),reverse:"","aria-label":v(y)("layout.resizePreviewAria"),"onUpdate:width":pe[65]||(pe[65]=Ne=>Ge.value=Ne),"onUpdate:dragging":pe[66]||(pe[66]=Ne=>vl.value=Ne)},null,8,["storage-key","default-width","min","max","aria-label"])):Y("",!0),W(eBe,{tabs:v(X),"active-id":v(se),expanded:v(fe),mobile:v(M),"can-open-diff":v(o).status.value.isGitRepo&&v(o).activeSessionId.value!==null,"can-open-side-chat":!!v(o).activeWorkspaceId.value,onActivate:v(ge),onClose:$e,onToggleExpanded:v(Se),onHide:v(de),onOpenDiff:gi,onOpenSideChat:pe[67]||(pe[67]=Ne=>Ul())},null,8,["tabs","active-id","expanded","mobile","can-open-diff","can-open-side-chat","onActivate","onToggleExpanded","onHide"]),b("div",$Ue,[v(F)===null?(g(),S("div",{key:0,class:"panel-launcher",role:"group","aria-label":v(y)("panel.launcherAria")},[b("button",{type:"button",disabled:!v(o).status.value.isGitRepo||v(o).activeSessionId.value===null,onClick:gi},[W(Ie,{name:"git-fork"}),b("span",null,E(v(y)("panel.tabs.diff")),1)],8,NUe),b("button",{type:"button",disabled:!v(o).activeWorkspaceId.value,onClick:pe[68]||(pe[68]=Ne=>Ul())},[W(Ie,{name:"message"}),b("span",null,E(v(y)("sideChat.title")),1)],8,zUe)],8,LUe)):xe.value==="compaction"&&v(Ct)?(g(),ue(CNe,{key:1,text:v(dt)??"",subtitle:v(y)("conversation.summaryTitle"),onClose:Mt},null,8,["text","subtitle"])):xe.value==="agent"&&v(en)?(g(),ue(PNe,{key:2,member:v(en),turns:v(tn),running:v(it),loading:v(eo),"load-error":v(Ro),"has-more":v(Ve),"loading-more":v(Ls),"load-more-error":v(Do),onClose:Mt,onLoadOlderMessages:v(je),onOpenFile:pe[69]||(pe[69]=Ne=>yo(Ne)),onOpenMedia:pe[70]||(pe[70]=Ne=>Pn(Ne)),onOpenAgent:pe[71]||(pe[71]=Ne=>ms(Ne)),onOpenTurnDiff:pe[72]||(pe[72]=Ne=>si(Ne))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onLoadOlderMessages"])):xe.value==="btw"&&v(Us)?(g(),ue(vze,{key:3,ref_key:"sideChatPanelRef",ref:mn,turns:v(o).sideChatTurns.value,running:v(o).sideChatRunning.value,sending:v(o).sideChatSending.value,onSend:pe[73]||(pe[73]=Ne=>v(o).sendSideChatPrompt(Ne)),onClose:Mt},null,8,["turns","running","sending"])):xe.value==="diff"?(g(),ue(Wze,{key:4,mode:v(So),changes:v(o).changes.value,"git-info":v(o).gitInfo.value,"file-diff":v(o).fileDiff.value,"selected-diff-path":v(o).selectedDiffPath.value,"file-diff-loading":v(o).fileDiffLoading.value,closable:"",onOpen:v(pn),onBack:pe[74]||(pe[74]=Ne=>{So.value="list",Qo.value=null,v(o).clearFileDiff()}),onClose:Mt},null,8,["mode","changes","git-info","file-diff","selected-diff-path","file-diff-loading","onOpen"])):xe.value==="toolDiff"&&v(kt)?(g(),ue(VNe,{key:5,target:v(kt),onClose:Mt},null,8,["target"])):xe.value==="turnDiff"&&Ye.value?(g(),ue(lze,{key:6,changes:Ye.value.changes,cwd:v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,onOpenFile:pe[75]||(pe[75]=Ne=>yo(Ne)),onClose:Mt},null,8,["changes","cwd"])):xe.value==="editor"?(g(),ue(_Ne,{key:7,onClose:Mt})):xe.value==="file"?(g(),ue(WLe,{key:8,file:v(_e),loading:v(Ke),error:v(Qe),line:v(be)?.line,"download-url":v(mt),closable:"","external-actions":v(Tt),editable:v(o).fsWriteSupported.value&&v(o).activeSessionId.value!==null,"open-file":yo,onClose:Mt,onOpenExternal:v(Jt),onReveal:v(kn),onOpenEditor:pe[76]||(pe[76]=Ne=>$o(Ne))},null,8,["file","loading","error","line","download-url","external-actions","editable","onOpenExternal","onReveal"])):Y("",!0)]),pe[120]||(pe[120]=b("div",{class:"pfc-host"},null,-1))])],10,EUe)):Y("",!0),Ln.value&&Hn.value?(g(),ue(j$e,{key:7,media:Ln.value,src:Hn.value,onClose:Mn},null,8,["media","src"])):Y("",!0),W(L$e,{enabled:!Os.value,"panel-source":Ea.value,onAdd:Wo},null,8,["enabled","panel-source"]),to.value?(g(),ue(vBe,{key:8,models:v(o).models.value,current:v(o).status.value.modelId,"starred-ids":v(o).starredModelIds.value,loading:es.value,unavailable:Hs.value,onSelect:pe[77]||(pe[77]=Ne=>Ee(Ne)),onToggleStar:pe[78]||(pe[78]=Ne=>v(o).toggleStarModel(Ne)),onClose:pe[79]||(pe[79]=Ne=>to.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):Y("",!0),no.value?(g(),ue(MHe,{key:9,status:v(o).status.value,thinking:D.value,"plan-mode":v(o).planMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"cost-usd":v(o).sessionCost.value,onClose:pe[80]||(pe[80]=Ne=>no.value=!1)},null,8,["status","thinking","plan-mode","dynamic-workflow-mode","cost-usd"])):Y("",!0),Co.value?(g(),ue(uHe,{key:10,"browse-fs":v(o).browseFs,"get-fs-home":v(o).getFsHome,"default-path":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,error:gs.value,onAdd:pe[81]||(pe[81]=Ne=>hr(Ne)),onClose:ts},null,8,["browse-fs","get-fs-home","default-path","error"])):Y("",!0),W(qi,{name:"gload-fade"},{default:ae(()=>[v(o).initialized.value?Y("",!0):(g(),ue(Sqe,{key:0,issue:v(o).connectIssue.value},null,8,["issue"]))]),_:1}),R.value?(g(),ue(sqe,{key:11,onComplete:K})):U.value?(g(),ue(sB,{key:12,onComplete:te,onSkip:te})):Y("",!0),W(LHe,{warnings:v(o).warnings.value,onDismiss:v(o).dismissWarning},null,8,["warnings","onDismiss"]),W(KHe),b("div",BUe,[l.value?(g(),ue(Qm,{key:`${l.value.kind}:${l.value.ids.join(",")}`,duration:8e3,onDismiss:pe[82]||(pe[82]=Ne=>l.value=null)},{default:ae(()=>[b("span",null,E(v(y)(l.value.kind==="done"?"admin.actionArchived":"admin.actionRestored",{n:l.value.ids.length})),1),b("button",{type:"button",class:"session-action-undo",onClick:Wt},E(v(y)("sidebar.archiveToastUndo")),1)]),_:1})):Y("",!0),r.value?(g(),ue(Qm,{key:`${r.value.sessionId}:${r.value.state}`,duration:r.value.state==="running"?6e4:4e3,onDismiss:pe[83]||(pe[83]=Ne=>r.value=null)},{default:ae(()=>[Oe(E(v(y)(r.value.state==="running"?"admin.exporting":"admin.exported")),1)]),_:1},8,["duration"])):Y("",!0),a.value?(g(),ue(Qm,{key:a.value,duration:5e3,onDismiss:pe[84]||(pe[84]=Ne=>a.value=null)},{default:ae(()=>[Oe(E(a.value),1)]),_:1})):Y("",!0)]),v(_)?(g(),ue(eUe,{key:13})):Y("",!0),v(M)?(g(),ue(TDe,{key:14,modelValue:P.value,"onUpdate:modelValue":pe[85]||(pe[85]=Ne=>P.value=Ne),groups:v(o).workspaceGroups.value,"active-workspace-id":v(o).activeWorkspaceId.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"attention-by-workspace":v(o).attentionByWorkspace.value,onSelect:pe[86]||(pe[86]=Ne=>v(o).selectSession(Ne)),onCreate:Fr,onCreateInWorkspace:pe[87]||(pe[87]=Ne=>F1(Ne)),onAddWorkspace:pe[88]||(pe[88]=Ne=>Co.value=!0),onRename:pe[89]||(pe[89]=(Ne,Sn)=>v(o).renameSession(Ne,Sn)),onArchive:pe[90]||(pe[90]=Ne=>et(Ne)),onDeleteWorkspace:pe[91]||(pe[91]=Ne=>Vn(Ne)),onLoadMore:pe[92]||(pe[92]=Ne=>void v(o).loadMoreSessions(Ne))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):Y("",!0),v(M)?(g(),ue(FVe,{key:15,modelValue:B.value,"onUpdate:modelValue":pe[93]||(pe[93]=Ne=>B.value=Ne),status:v(o).status.value,thinking:v(o).thinking.value,models:v(o).models.value,"plan-mode":v(o).planMode.value,"goal-mode":v(o).goalMode.value,goal:v(o).goal.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"color-scheme":v(o).colorScheme.value,"ui-font-size":v(o).uiFontSize.value,"conversation-toc":v(o).conversationToc.value,"server-version":v(o).serverVersion.value,onPickModel:pe[94]||(pe[94]=Ne=>bl()),onSetThinking:pe[95]||(pe[95]=Ne=>v(o).setThinking(Ne)),onTogglePlan:pe[96]||(pe[96]=Ne=>v(o).togglePlanMode()),onToggleWorkflow:pe[97]||(pe[97]=Ne=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[98]||(pe[98]=Ne=>v(o).toggleGoalMode()),onControlGoal:pe[99]||(pe[99]=Ne=>v(o).controlGoal(Ne)),onSetPermission:pe[100]||(pe[100]=Ne=>v(o).setPermission(Ne)),onSetColorScheme:pe[101]||(pe[101]=Ne=>v(o).setColorScheme(Ne)),onSetUiFontSize:pe[102]||(pe[102]=Ne=>v(o).setUiFontSize(Ne)),onSetConversationToc:pe[103]||(pe[103]=Ne=>v(o).setConversationToc(Ne)),onLogin:pe[104]||(pe[104]=()=>{B.value=!1,we()})},null,8,["modelValue","status","thinking","models","plan-mode","goal-mode","goal","dynamic-workflow-mode","color-scheme","ui-font-size","conversation-toc","server-version"])):Y("",!0)],6)),Vo.value?(g(),ue(AOe,{key:4,"color-scheme":v(o).colorScheme.value,accent:v(o).accent.value,"ui-font-size":v(o).uiFontSize.value,"auth-ready":v(o).authReady.value,"account-model":v(o).defaultModel.value,notify:v(o).notifyOnComplete.value,"notify-question":v(o).notifyOnQuestion.value,"notify-approval":v(o).notifyOnApproval.value,"notify-permission":v(o).notifyPermission.value,sound:v(o).soundOnComplete.value,"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,config:v(o).config.value,models:v(o).models.value,"config-saving":vs.value,"server-version":v(o).serverVersion.value,backend:v(o).backend.value,"experimental-flag-states":v(o).experimentalFlagStates.value,"subagent-model-policy":v(o).subagentModelPolicy.value,"subagent-model-policy-saving":v(o).subagentModelPolicySaving.value,onSaveSubagentModelPolicy:pe[105]||(pe[105]=Ne=>void v(o).saveSubagentModelPolicy(Ne)),onClearSubagentModelPolicy:pe[106]||(pe[106]=Ne=>void v(o).clearSubagentModelPolicy()),"initial-tab":Qi.value,onSetColorScheme:pe[107]||(pe[107]=Ne=>v(o).setColorScheme(Ne)),onSetAccent:pe[108]||(pe[108]=Ne=>v(o).setAccent(Ne)),onSetUiFontSize:pe[109]||(pe[109]=Ne=>v(o).setUiFontSize(Ne)),onSetNotify:pe[110]||(pe[110]=Ne=>v(o).setNotifyOnComplete(Ne)),onSetNotifyQuestion:pe[111]||(pe[111]=Ne=>v(o).setNotifyOnQuestion(Ne)),onSetNotifyApproval:pe[112]||(pe[112]=Ne=>v(o).setNotifyOnApproval(Ne)),onSetSound:pe[113]||(pe[113]=Ne=>v(o).setSoundOnComplete(Ne)),onSetConversationToc:pe[114]||(pe[114]=Ne=>v(o).setConversationToc(Ne)),onSetTurnFolding:pe[115]||(pe[115]=Ne=>v(o).setTurnFolding(Ne)),onSetActivityRunFolding:pe[116]||(pe[116]=Ne=>v(o).setActivityRunFolding(Ne)),onUpdateConfig:pe[117]||(pe[117]=Ne=>Ht(Ne)),onOpenOnboarding:pe[118]||(pe[118]=()=>{Vo.value=!1,J()}),onClose:pe[119]||(pe[119]=Ne=>Vo.value=!1)},null,8,["color-scheme","accent","ui-font-size","auth-ready","account-model","notify","notify-question","notify-approval","notify-permission","sound","conversation-toc","turn-folding","activity-run-folding","config","models","config-saving","server-version","backend","experimental-flag-states","subagent-model-policy","subagent-model-policy-saving","initial-tab"])):Y("",!0),W(hHe)]))}}),PUe=vt(RUe,[["__scopeId","data-v-628646c9"]]);ige();n5(PUe).use(Mo).mount("#app");export{pR as $,L2 as A,oP as B,xs as C,NZe as D,$M as E,Ce as F,r2 as G,Oe as H,W as I,PR as J,sZe as K,Rl as L,Je as M,MF as N,aZe as O,cZe as P,fZe as Q,j4 as R,lu as S,hl as T,uZe as U,Sg as V,rZe as W,BZe as X,dZe as Y,TZe as Z,FUe as _,lA as a,cs as a$,Ts as a0,rg as a1,qUe as a2,fg as a3,PA as a4,vn as a5,Ru as a6,XUe as a7,FZe as a8,eZe as a9,dA as aA,hP as aB,fA as aC,In as aD,wP as aE,yP as aF,Bu as aG,vP as aH,En as aI,hg as aJ,DR as aK,g as aL,xF as aM,GUe as aN,qn as aO,KM as aP,KUe as aQ,V4 as aR,ds as aS,zl as aT,V as aU,_Ze as aV,DF as aW,at as aX,jn as aY,gg as aZ,iZe as a_,oZe as aa,nZe as ab,tZe as ac,SZe as ad,jZe as ae,fn as af,nF as ag,bp as ah,r1 as ai,wa as aj,ps as ak,xZe as al,il as am,v1 as an,$t as ao,mZe as ap,gZe as aq,io as ar,yt as as,rF as at,Pe as au,aR as av,Gt as aw,pP as ax,gP as ay,vo as az,ZUe as b,k2e as b$,$Ze as b0,$2 as b1,G4 as b2,EZe as b3,g1 as b4,LR as b5,OUe as b6,Uo as b7,GR as b8,IZe as b9,js as bA,_i as bB,oF as bC,MZe as bD,Ze as bE,tA as bF,JUe as bG,XR as bH,yZe as bI,ae as bJ,pZe as bK,Jn as bL,go as bM,CZe as bN,_t as bO,YUe as bP,ho as bQ,Cs as bR,qZe as bS,UZe as bT,V$ as bU,ZZe as bV,jde as bW,D$ as bX,n7 as bY,XZe as bZ,x2e as b_,jUe as ba,E as bb,i4 as bc,lZe as bd,so as be,DUe as bf,HUe as bg,s8 as bh,bZe as bi,zR as bj,v as bk,mf as bl,PZe as bm,zZe as bn,TF as bo,QUe as bp,wZe as bq,YR as br,RZe as bs,hZe as bt,l4 as bu,iA as bv,t5 as bw,PF as bx,QA as by,w8 as bz,AZe as c,Av as c0,Cv as c1,Mv as c2,QZe as c3,$5 as c4,Kc as c5,E5 as c6,g2e as c7,v2e as c8,eKe as c9,vt as cA,JZe as ca,DZe as cb,tKe as cc,Dp as cd,Di as ce,N2e as cf,L2e as cg,Lde as ch,WZe as ci,Tde as cj,Ede as ck,VZe as cl,Tv as cm,z2e as cn,Tx as co,ax as cp,Hde as cq,I5 as cr,T5 as cs,KZe as ct,YZe as cu,HZe as cv,GZe as cw,Ie as cx,OZe as cy,cze as cz,kZe as d,a1 as e,VUe as f,qi as g,$F as h,WUe as i,UUe as j,Dl as k,ff as l,Fs as m,pp as n,ka as o,LZe as p,z as q,n5 as r,ue as s,Y as t,S as u,b as v,DP as w,vZe as x,HP as y,VF as z}; +`))}return t.length>0?t:void 0}function jd(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function HUe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const fB=V(typeof window>"u"?0:window.innerWidth);let i4=0,cp=!1;function ig(){fB.value=window.innerWidth}function DUe(){cp||typeof window>"u"||(window.addEventListener("resize",ig),cp=!0,ig())}function VUe(){!cp||typeof window>"u"||(window.removeEventListener("resize",ig),cp=!1)}function pB(e,t,n){return Math.max(t,e-n)}function lg(e,t,n){return Math.min(n,Math.max(t,e))}function hB(){return In(()=>{i4+=1,DUe()}),vo(()=>{i4=Math.max(0,i4-1),i4===0&&VUe()}),{viewportWidth:fB}}const WUe="pythinker-web.file-preview-width",Vc=320;function qUe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=hB(),i=B(()=>Math.max(0,s.value-t.value)),l=B(()=>pB(i.value,Vc,Vc));function r(F){return lg(Math.round(F),Vc,l.value)}function a(){return r(i.value/2)}const c=B(()=>a()),u=V(c.value),d=B(()=>lg(u.value,Vc,l.value)),f=V(null),p=B(()=>{const F=f.value;if(!F)return null;const K=e.turns.value.find(he=>he.id===F.turnId);return K?.role==="compaction"&&K.text?K.text:null}),h=B(()=>p.value!==null);function m(F){n.value="compaction",f.value=F}function k(){f.value=null,n.value==="compaction"&&(n.value=null)}const x=V(null),y=B(()=>{const F=x.value;if(!F)return{entry:void 0,version:0};const K=e.auxiliaryTranscripts.getEntry(F.sessionId,F.subagentId);return{entry:K,version:K?.version.value??0}});function w(F){const K=e.activeAppTasks.value.find(he=>he.agentId===F||he.id===F||he.backgroundTaskId===F||he.parentToolCallId===F);return K?.agentId??K?.id??F}const _=B(()=>{const F=x.value;if(!F)return null;const K=e.activeAppTasks.value.find(et=>et.agentId===F.subagentId||et.id===F.subagentId||et.backgroundTaskId===F.subagentId);if(K)return Hxe(K);const he=y.value.entry?.channel;if(!he)return null;const ye=he.agents.find(et=>et.agentId===F.subagentId),ve=he.snapshot.items.findLast(et=>et.kind==="turn"),ie=he.snapshot.meta.activity==="turn",de=he.loading,be=ve?.kind==="turn"&&ve.state==="failed",Se=ve?.kind==="turn"&&ve.state==="cancelled",je=he.refreshError&&ve===void 0;return{id:F.subagentId,name:ye?.label??F.subagentId,subagentType:ye?.type==="sub"?"subagent":ye?.type,phase:ie?"working":Se?"cancelled":be||je?"failed":de?"queued":"completed",status:ie||de?"running":Se?"cancelled":be||je?"failed":"completed"}}),A=B(()=>{const F=x.value,K=y.value.entry?.channel;if(!F||!K)return[];const he=K.agents.find(ye=>ye.agentId===F.subagentId);return RUe(K.snapshot,he,{sessionId:F.sessionId,getFileUrl:ye=>e.getFileUrl(ye)})}),P=B(()=>y.value.entry?.channel.loading??!1),z=B(()=>y.value.entry?.channel.refreshError??!1),L=B(()=>y.value.entry?.channel.loadingOlder??!1),E=B(()=>y.value.entry?.channel.loadOlderError??!1),T=B(()=>y.value.entry?.channel.snapshot.hasMoreOlder??!1),$=B(()=>y.value.entry?.channel.snapshot.meta.activity==="turn"),C=B(()=>_.value!==null);function j(F){const K=e.activeSessionId.value;if(!F||!K)return;const he=w(F),ye=x.value;ye&&ye.subagentId!==he&&e.auxiliaryTranscripts.deactivate(ye.sessionId,ye.subagentId),x.value={sessionId:K,subagentId:he},n.value="agent",e.auxiliaryTranscripts.activate(K,he)}function H(){const F=x.value;F&&e.auxiliaryTranscripts.deactivate(F.sessionId,F.subagentId),x.value=null,n.value==="agent"&&(n.value=null)}Ke(n,(F,K)=>{if(K!=="agent"||F==="agent")return;const he=x.value;he&&e.auxiliaryTranscripts.deactivate(he.sessionId,he.subagentId)});function D(){y.value.entry?.channel.loadOlder().catch(()=>{})}const M=V(null),R=B(()=>{const F=M.value;if(!F)return null;const K=tee(e.turns.value,F);return K?{id:F,title:ni(K.name),path:Hg(K.arg),lines:K.status==="error"?null:Og(K),output:K.output}:null}),O=B(()=>R.value!==null);function U(F){n.value="toolDiff",M.value=F}function Z(){M.value=null,n.value==="toolDiff"&&(n.value=null)}const q=V("list"),te=V(null);function ee(){n.value="diff",q.value="list",te.value=null,e.loadGitStatus(e.activeSessionId.value)}function J(){n.value==="diff"&&(n.value=null),q.value="list",te.value=null,e.clearFileDiff()}async function se(F){q.value="detail",te.value=F,await e.loadFileDiff(F)}async function Q(F){!e.activeSessionId.value&&e.activeWorkspaceId.value?await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,F):await e.openSideChat(F),n.value="btw"}function me(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function xe(){n.value==="btw"&&(n.value=null)}const Ye=B(()=>e.sideChatVisible.value),at=B(()=>n.value!==null&&(n.value!=="compaction"||h.value)&&(n.value!=="agent"||C.value)&&(n.value!=="toolDiff"||O.value)&&(n.value!=="btw"||Ye.value)),X=V(!1);function oe(){return n.value==="compaction"&&h.value?(k(),!0):n.value==="agent"&&C.value?(H(),!0):n.value==="toolDiff"&&O.value?(Z(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(J(),!0):n.value==="btw"?(me(),!0):!1}return Ke(e.activeSessionId,()=>{o(),k(),H(),Z(),J(),xe()}),{PREVIEW_WIDTH_KEY:WUe,PREVIEW_MIN:Vc,previewDefaultWidth:c,previewMax:l,previewWidth:u,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:h,openCompactionPanel:m,closeCompactionPanel:k,agentPanelMember:_,agentPanelTurns:A,agentPanelLoading:P,agentPanelLoadError:z,agentPanelLoadingMore:L,agentPanelLoadMoreError:E,agentPanelHasMore:T,agentPanelRunning:$,agentPanelVisible:C,openAgentPanel:j,closeAgentPanel:H,loadOlderAgentMessages:D,toolDiffTarget:R,toolDiffVisible:O,openToolDiff:U,closeToolDiff:Z,detailDiffMode:q,detailDiffPath:te,openDiffDetail:ee,closeDiffDetail:J,selectDiffFile:se,btwVisible:Ye,openSideChatTab:Q,closeSideChat:me,hideSideChatPanel:xe,sidePanelVisible:at,panelDragging:X,closeOpenSidePanel:oe}}const UUe=dn.sidebarWidth,MM=dn.sidebarCollapsed,AM=270,n8=170,ZUe=480,KUe=320;function GUe(e={}){const{viewportWidth:t}=hB(),n=V(AM),o=V(!1),s=V(!1),i=B(()=>{const u=KUe+(l8(e.previewOpen)?Vc:0);return Math.min(ZUe,pB(t.value,n8,u))}),l=B(()=>lg(n.value,n8,i.value));function r(){try{o.value=ls(MM)==="true"}catch{o.value=!1}}function a(){try{Es(MM,String(o.value))}catch{}}function c(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:UUe,SIDEBAR_DEFAULT:AM,SIDEBAR_MIN:n8,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:l,loadSidebarCollapsed:r,toggleSidebarCollapse:c}}async function YUe(e){if(!e.fileId)return{url:e.url};try{const t=await Ct().getFileBlob(e.fileId),n=URL.createObjectURL(t);return{url:n,revoke:()=>URL.revokeObjectURL(n)}}catch{return{url:e.url}}}function XUe({client:e,detailTarget:t}){const{t:n}=$t(),o=V(null),s=V(null),i=V(!1),l=V(null),r=V(null);let a=0;const c=B(()=>{const w=r.value;return w?e.getFileDownloadUrl(w):null}),u=B(()=>o.value!==null);function d(w){return w.length>1?w.replace(/\/+$/,""):w}function f(w){const _=[];for(const A of w.split(/[\\/]+/))if(!(!A||A===".")){if(A===".."){_.pop();continue}_.push(A)}return _.join("/")}function p(w){const _=w.trim();if(!_)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(_))return{error:n("filePreview.errors.unsupportedPath")};if(_.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const A=d(e.status.value.cwd);if(_.startsWith("/")){if(!A||_!==A&&!_.startsWith(`${A}/`))return{error:n("filePreview.errors.outsideWorkspace")};const z=_===A?"":_.slice(A.length+1);if(z.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const L=f(z);return L?{path:L}:{error:n("filePreview.errors.isDirectory")}}if(_.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const P=f(_);return P?{path:P}:{error:n("filePreview.errors.emptyPath")}}async function h(w){const _=++a;t.value="file",s.value=null,l.value=null,i.value=!0,o.value=w,r.value=null;const A=p(w.path);if("error"in A){i.value=!1,l.value=A.error;return}r.value=A.path;try{const P=await e.readFileContent(A.path);if(_!==a)return;P?s.value={...P,path:P.path||A.path}:l.value=n("filePreview.errors.loadFailed")}catch(P){if(_!==a)return;l.value=P instanceof Error?P.message:n("filePreview.errors.loadFailed")}finally{_===a&&(i.value=!1)}}function m(){a+=1,o.value=null,r.value=null,s.value=null,l.value=null,i.value=!1}function k(){m(),t.value==="file"&&(t.value=null)}Ke(t,(w,_)=>{_==="file"&&w!=="file"&&m()});function x(){const w=s.value?.path??o.value?.path;w&&e.openWorkspaceFile(w,o.value?.line)}function y(){const w=s.value?.path??o.value?.path;w&&e.revealWorkspaceFile(w)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:l,previewDownloadUrl:c,previewExternalActions:u,openFilePreview:h,closeFilePreview:k,openPreviewInEditor:x,revealPreviewFile:y}}const JUe=new Set(["agent","compaction","btw"]);function QUe(e){const t=V([]),n=V(null),o=V(!1),s=V(!1),i=new Map;let l=0;const r=B(()=>t.value.find(k=>k.id===n.value)??null);function a(k){const x=k.always?void 0:t.value.find(w=>w.type===k.type&&w.key===k.key);if(x)return x.title=k.title,x.payload=k.payload,n.value=x.id,o.value=!0,x;const y={...k,id:`panel-tab-${++l}`};return t.value=[...t.value,y],n.value=y.id,o.value=!0,y}function c(k){t.value.some(x=>x.id===k)&&(n.value=k,o.value=!0)}function u(k){const x=t.value.findIndex(w=>w.id===k);if(x<0)return null;const[y]=t.value.splice(x,1);if(t.value=[...t.value],n.value===k){const w=t.value[Math.min(x,t.value.length-1)];n.value=w?.id??null}return t.value.length===0&&(o.value=!1,s.value=!1),y??null}function d(){return o.value?(o.value=!1,s.value=!1,!0):!1}function f(){o.value=!o.value,o.value||(s.value=!1)}function p(){r.value!==null&&(s.value=!s.value,s.value&&(o.value=!0))}function h(k){const x=t.value.filter(w=>JUe.has(w.type)),y=Math.max(0,x.findIndex(w=>w.id===n.value));if(x.length===0){i.delete(k);return}i.set(k,{tabs:x.map(({id:w,..._})=>({..._})),activeIndex:y,visible:o.value})}function m(k){const x=i.get(k);t.value=x?.tabs.map(y=>({...y,id:`panel-tab-${++l}`}))??[],n.value=t.value[x?.activeIndex??0]?.id??null,o.value=x?.visible===!0&&t.value.length>0,s.value=!1}return Ke(e,(k,x)=>{h(x),m(k)}),{tabs:t,activeTabId:n,activeTab:r,visible:o,expanded:s,openTab:a,activateTab:c,closeTab:u,hidePanel:d,togglePanel:f,toggleExpanded:p}}const eZe={class:"server-auth-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"server-auth-title"},tZe={class:"server-auth-card"},nZe={class:"server-auth-body"},oZe={class:"server-auth-foot"},sZe=Je({__name:"ServerAuthDialog",setup(e){const t=V(""),n=V(null),o=V(!1);In(()=>{yt(()=>n.value?.focus())});function s(){const l=t.value;!l||o.value||(o.value=!0,PN(l),window.location.reload())}function i(l){l.key==="Enter"&&(l.preventDefault(),s())}return(l,r)=>(g(),S("div",eZe,[b("div",tZe,[r[1]||(r[1]=b("div",{class:"server-auth-head"},[b("h1",{id:"server-auth-title",class:"server-auth-title"},"Server token required"),b("p",{class:"server-auth-hint"},[He(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),b("code",null,"PYTHINKER_CODE_PASSWORD"),He("). ")])],-1)),b("div",nZe,[W(us,{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),b("div",oZe,[W(Nt,{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:ae(()=>[He(I(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])])])]))}}),iZe=vt(sZe,[["__scopeId","data-v-82dad292"]]),lZe={class:"app-shell"},rZe={key:2,class:"offline-strip",role:"status"},aZe=["aria-label","aria-hidden"],cZe={class:"pt-shell"},uZe={class:"pt-body"},dZe=["aria-label"],fZe=["disabled"],pZe=["disabled"],hZe={class:"action-toast-stack"},mZe=Je({__name:"App",setup(e){xve();const t=V(!1);let n=null;const o=R1(),s=V([]),i=V(!1),l=V(null),r=V(null),a=V(null);let c=null;const u=B(()=>{const Re=o.activeWorkspaceId.value;return Re?[...o.sessionsForView.value,...s.value].filter(pe=>pe.workspaceId===Re).toSorted((pe,Le)=>new Date(Le.updatedAt??0).getTime()-new Date(pe.updatedAt??0).getTime()).slice(0,6):[]});function d(Re){return{id:Re.id,title:Re.title,time:new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,Math.floor((Date.now()-new Date(Re.updatedAt).getTime())/864e5)),"day"),busy:!1,updatedAt:Re.updatedAt,workspaceId:Re.workspaceId,archived:!0}}async function f(){try{const Re=[];let pe;for(;;){const Le=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Re.push(...Le.items),!Le.hasMore||Le.items.length===0||(pe=Le.items.at(-1)?.id,pe===void 0))break}s.value=Re.map(d)}catch(Re){console.warn("loadDoneSessions failed",Re)}}const p=B(()=>{const Re=new Map(o.workspaceGroups.value.flatMap(pe=>pe.sessions.map(Le=>[Le.id,Le.updatedAt])));return o.sessionsForView.value.map(pe=>({id:pe.id,title:pe.title,workspaceId:pe.workspaceId??"",workspaceName:pe.workspaceName??"-",lastPrompt:pe.lastPrompt,updatedAt:pe.updatedAt??Re.get(pe.id)??new Date(0).toISOString(),archived:!1}))});async function h(){const Re=[];let pe;for(;;){const Sn=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Re.push(...Sn.items),!Sn.hasMore||Sn.items.length===0||(pe=Sn.items.at(-1)?.id,pe===void 0))break}const Le=o.workspacesView.value;return Re.filter(Sn=>!Sn.parentSessionId).map(Sn=>{const ii=Le.find(el=>el.id===Sn.workspaceId||el.root===Sn.cwd);return{id:Sn.id,title:Sn.title,workspaceId:ii?.id??Sn.workspaceId??Sn.cwd,workspaceName:ii?.name??Sn.cwd.split("/").filter(Boolean).at(-1)??"-",lastPrompt:Sn.lastPrompt,updatedAt:Sn.updatedAt,archived:!0}})}function m(){i.value=!0,o.loadAllSessions()}function k(Re,pe){l.value={kind:Re,ids:Array.isArray(pe)?pe:[pe]}}const x=B(()=>!o.dangerousBypassAuth.value&&t.value);qn("resolveImage",o.resolveImageUrl),qn("modelDisplay",Re=>{if(Re===void 0||Re.length===0)return;const pe=o.models.value.find(Le=>Le.id===Re)??o.models.value.find(Le=>Le.model===Re);return pe?.displayName||pe?.model||(Re.includes("/")?Re.split("/").pop():Re)}),qn("subagentEffort",Re=>Re!==void 0&&Re.length>0&&Re!=="off"&&Re!=="on"?rf(Re):void 0),qn("resolveDynamicWorkflowMembers",Re=>o.dynamicWorkflowMembersByToolCallId.value.get(Re)??[]),qn("mainModelBinding",()=>{const Re=o.status.value.modelId;if(Re)return{model:Re,effort:o.thinking.value}}),qn("openAgentSettings",()=>{Ks("agent")});const{t:y}=$t(),{confirm:w}=z1(),_=pr(),A=r6(),P=V(!1),z=V(!1),L=B(()=>{const Re=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Re)?.title??s.value.find(pe=>pe.id===Re)?.title??""}),E=B(()=>{const Re=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Re)?.lastTurnReason}),T=B(()=>{const Re=o.activeSessionId.value;if(Re)return tve(Re)}),$=B(()=>s.value.some(Re=>Re.id===o.activeSessionId.value)),C=B(()=>o.visibleWorkspace.value?.sessionCount??0),j=B(()=>o.activity.value!=="idle"),{showAuthGate:H}=zUe({client:o});BUe({running:j,showAuthGate:H});const D=B(()=>{const Re=o.models.value.find(pe=>pe.id===o.status.value.modelId);return w9(Re,o.thinking.value)}),M=V(!1),R=B(()=>o.appState.value==="first-run"),O=B(()=>o.appState.value==="recovery"&&!M.value),U=B(()=>o.appState.value==="recovery"&&M.value);Ke(()=>o.appState.value,Re=>{Re!=="recovery"&&(M.value=!1)});function Z(){M.value=!1}const q=V(!1);function te(){o.setOnboarded(!0),q.value=!1}function ee(){q.value=!0}let J=0;function se(){const Re=window.visualViewport,pe=document.documentElement.style;pe.setProperty("--app-height",`${Re?.height??window.innerHeight}px`),pe.setProperty("--app-top",`${Re?.offsetTop??0}px`)}function Q(){J||(J=requestAnimationFrame(()=>{J=0,se()}))}In(()=>{n=Mve(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),hs(),se(),window.visualViewport?.addEventListener("resize",Q),window.visualViewport?.addEventListener("scroll",Q),window.addEventListener("resize",Q),document.addEventListener("keydown",me,!0)}),En(()=>{Mn(),document.removeEventListener("keydown",me,!0),window.visualViewport?.removeEventListener("resize",Q),window.visualViewport?.removeEventListener("scroll",Q),window.removeEventListener("resize",Q),J&&(cancelAnimationFrame(J),J=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function me(Re){Re.key!=="Escape"||Re.isComposing||kl.value||de()&&(Re.stopPropagation(),Re.preventDefault())}const xe=V(null),Ye=V(null),at=B(()=>o.activeSessionId.value??`__draft__:${o.activeWorkspaceId.value??"none"}`),{tabs:X,activeTabId:oe,activeTab:F,visible:K,expanded:he,openTab:ye,activateTab:ve,closeTab:ie,hidePanel:de,togglePanel:be,toggleExpanded:Se}=QUe(at);function je(Re){Ye.value=Re,xe.value="turnDiff"}function et(){Ye.value=null,xe.value==="turnDiff"&&(xe.value=null)}const le=V(!1);Ke(o.activeSessionId,()=>{et(),le.value=!0,yt(()=>{le.value=!1})});const{previewTarget:fe,previewFile:ge,previewLoading:Oe,previewError:Fe,previewDownloadUrl:pt,previewExternalActions:kt,openFilePreview:qt,closeFilePreview:nn,openPreviewInEditor:Jt,revealPreviewFile:kn}=XUe({client:o,detailTarget:xe});RNe(()=>o.activeSessionId.value);function Dn(Re){xe.value="editor",tB({path:Re,line:fe.value?.line})}function xn(){xe.value==="editor"&&(xe.value=null),tg()}Ke(xe,(Re,pe)=>{pe==="editor"&&Re!=="editor"&&tg()});const $n=V(null),Hn=V(null);let bn=0,Wn;async function Pn(Re){if(Re.kind!=="image"&&Re.kind!=="video")return;const pe=++bn;Wn?.(),Wn=void 0,$n.value=null,Hn.value=null;const Le=await YUe(Re);if(pe!==bn){Le.revoke?.();return}Wn=Le.revoke,$n.value=Re,Hn.value=Le.url}function Mn(){bn+=1,Wn?.(),Wn=void 0,$n.value=null,Hn.value=null}const Nn=B(()=>K.value),{SIDEBAR_WIDTH_KEY:An,SIDEBAR_DEFAULT:Qn,SIDEBAR_MIN:Fn,sidebarMax:Qt,sessionColWidth:uo,sidebarCollapsed:Zn,sidebarDragging:Bo,sideWidth:Un,loadSidebarCollapsed:hs,toggleSidebarCollapse:Io}=GUe({previewOpen:Nn}),{PREVIEW_WIDTH_KEY:Rt,PREVIEW_MIN:Jo,previewDefaultWidth:Ls,previewMax:$e,previewWidth:Ge,previewPanelWidth:ot,compactionPanelText:dt,compactionPanelVisible:Mt,openCompactionPanel:Ft,closeCompactionPanel:Ut,agentPanelMember:en,agentPanelTurns:tn,agentPanelLoading:eo,agentPanelLoadError:Ro,agentPanelLoadingMore:$s,agentPanelLoadMoreError:Do,agentPanelHasMore:We,agentPanelRunning:st,openAgentPanel:Xe,closeAgentPanel:qe,loadOlderAgentMessages:Pe,toolDiffTarget:bt,openToolDiff:Lt,closeToolDiff:cn,detailDiffMode:So,detailDiffPath:Qo,openDiffDetail:Po,closeDiffDetail:Xn,selectDiffFile:pn,btwVisible:Us,openSideChatTab:mi,closeSideChat:oi,hideSideChatPanel:ql,panelDragging:vl}=qUe({client:o,sideWidth:Un,detailTarget:xe,closeFilePreview:nn});function Zs(Re){return Re.split(/[\\/]/).filter(Boolean).at(-1)??Re}function yo(Re){ye({type:"file",key:Re.path,title:Zs(Re.path),icon:"file-text",payload:Re})}function Lo(Re){ye({type:"editor",key:Re,title:Zs(Re),icon:"file-edit",payload:{path:Re}})}function yl(Re){ye({type:"compaction",key:Re.turnId,title:y("panel.tabs.compaction"),icon:"thinking",payload:Re})}function ms(Re){const pe=o.activeAppTasks.value.find(Le=>Le.agentId===Re||Le.id===Re||Le.backgroundTaskId===Re||Le.parentToolCallId===Re);ye({type:"agent",key:pe?.agentId??pe?.id??Re,title:pe?.description||y("panel.tabs.agent"),icon:"robot",payload:{target:Re}})}Ke(o.activeAppTasks,Re=>{for(const pe of X.value){if(pe.type!=="agent")continue;const Le=pe.payload?.target??pe.key,Sn=Re.find(ii=>ii.agentId===Le||ii.id===Le||ii.backgroundTaskId===Le||ii.parentToolCallId===Le);Sn?.description&&(pe.title=Sn.description)}});function wl(Re){Lt(Re);const pe=bt.value;ye({type:"toolDiff",key:Re,title:pe?.path?Zs(pe.path):pe?.title??y("panel.tabs.diff"),icon:"file-edit",payload:{id:Re}})}function gi(){ye({type:"diff",key:"workspace",title:y("panel.tabs.diff"),icon:"git-fork"})}function si(Re){const pe=X.value.find(Le=>Le.type==="turnDiff"&&Le.key===Re.turnId);if(pe?.id===oe.value){Ie(pe.id);return}ye({type:"turnDiff",key:Re.turnId,title:y("panel.tabs.turnDiff"),icon:"git-fork",payload:Re})}async function Ul(Re){await mi(Re),ye({type:"btw",key:"side-chat",title:y("sideChat.title"),icon:"message",payload:{prompt:Re}})}function Ni(Re){Re.type==="file"?nn():Re.type==="editor"?xn():Re.type==="compaction"?Ut():Re.type==="agent"?qe():Re.type==="toolDiff"?cn():Re.type==="diff"?Xn():Re.type==="turnDiff"?et():Re.type==="btw"&&ql()}function Ae(Re){if(Re===null){xe.value=null;return}Re.type==="file"?qt(Re.payload):Re.type==="editor"?Dn(Re.payload.path):Re.type==="compaction"?Ft(Re.payload):Re.type==="agent"?Xe(Re.payload.target):Re.type==="toolDiff"?Lt(Re.payload.id):Re.type==="diff"?Po():Re.type==="turnDiff"?je(Re.payload):Re.type==="btw"&&(xe.value="btw")}Ke(F,(Re,pe)=>{pe&&pe.id!==Re?.id&&Ni(pe),Ae(Re)},{flush:"post"});function Ie(Re){X.value.find(Le=>Le.id===Re)?.type==="btw"&&oi(),ie(Re)}function At(){oe.value&&Ie(oe.value)}const lt=V(null),mn=V(null);function Kn(){let Re=!1;const pe=Le=>{Le instanceof KeyboardEvent&&Le.repeat||(Re=!0)};return document.addEventListener("pointerdown",pe,!0),document.addEventListener("keydown",pe,!0),window.addEventListener("blur",pe),document.addEventListener("visibilitychange",pe),()=>{yt(()=>{document.removeEventListener("pointerdown",pe,!0),document.removeEventListener("keydown",pe,!0),window.removeEventListener("blur",pe),document.removeEventListener("visibilitychange",pe),!Re&&document.hasFocus()&&mn.value?.focusInput()})}}const to=V(!1),Co=V(!1),no=V(!1),Vo=V(!1),Qi=V("general"),Os=B(()=>m0.value>0||to.value||Co.value||no.value||Vo.value||P.value||z.value||$n.value!==null),Ta=B(()=>F.value?.title);function Wo(Re){lt.value?.insertComposerQuote(Re),A.value&&K.value&&de()}const zi=V(null),gs=V(null),kl=B(()=>m0.value>0||to.value||Co.value||no.value||Vo.value||q.value||P.value||z.value||$n.value!==null),es=V(!1),Hs=V(!1),vs=V(!1);async function bl(){es.value=!0,Hs.value=!1,to.value=!0;try{await o.refreshAllProviders()}catch{Hs.value=!0}finally{es.value=!1}}function Ks(Re="general"){Qi.value=Re,Vo.value=!0}function ne(){Ks("providers")}function ke(){ne()}async function Te(Re){to.value=!1,await Ne(Re)}async function Ne(Re){await o.setModel(Re)&&Re!==o.defaultModel.value&&o.updateConfig({defaultModel:Re})}async function Qe(Re){await o.archiveSession(Re),await f(),k("done",Re)}async function ht(Re){await o.restoreSession(Re)&&(s.value=s.value.filter(pe=>pe.id!==Re),k("open",Re))}async function jt(Re,pe){await o.renameSession(Re,pe),s.value.some(Le=>Le.id===Re)&&await f()}async function Zt(Re,pe){const Le=s.value.find(Sn=>Sn.id===Re);if(!Le){await o.setSessionEmoji(Re,pe);return}await jt(Re,GT(pe,Le.title))}async function Vt(Re,pe){const Le=Re.map(Sn=>Sn.id);for(const Sn of Le)pe==="archive"?await o.archiveSession(Sn):await o.restoreSession(Sn);await f(),k(pe==="archive"?"done":"open",Le)}async function Wt(){const Re=l.value;if(Re){l.value=null;for(const pe of Re.ids)Re.kind==="done"?await o.restoreSession(pe):await o.archiveSession(pe);await f()}}async function on(Re){const pe=Re??o.activeSessionId.value;if(!pe)return;r.value={state:"running",sessionId:pe};const Le=await o.exportSession(pe);r.value=Le?{state:"done",sessionId:pe}:null}async function Vn(Re){const pe=o.workspacesView.value.find(Le=>Le.id===Re)?.name??Re;await w({title:y("sidebar.removeWorkspace"),message:y("workspace.removeWorkspaceConfirm",{name:pe}),variant:"danger",action:()=>o.deleteWorkspace(Re)})}async function Ht(Re){vs.value=!0;try{await o.updateConfig(Re)&&await Promise.all([o.refreshRuntimeState(),o.refreshServerMeta()])}finally{vs.value=!1}}async function Tn(Re){await o.undo(1),await yt(),lt.value?.loadComposerForEdit(Re.text,Re.attachments)}function zn(Re){if(Re==="/compact"||Re.startsWith("/compact ")){o.compact(Re.slice(8).trim()||void 0);return}if(Re==="/dynamic_workflow"||Re.startsWith("/dynamic_workflow ")){const pe=Re.slice(17).trim();pe==="on"?o.setDynamicWorkflowMode(!0):pe==="off"?o.setDynamicWorkflowMode(!1):pe?(o.setDynamicWorkflowMode(!0),o.sendPrompt(pe)):o.toggleDynamicWorkflowMode();return}if(Re==="/goal"||Re.startsWith("/goal ")){const pe=Re.slice(5).trim();pe==="pause"||pe==="resume"||pe==="cancel"?o.controlGoal(pe):pe?o.createGoal(pe):o.toggleGoalMode();return}if(Re==="/btw"||Re.startsWith("/btw ")){const pe=Re.slice(4).trim();if(!pe&&F.value?.type==="btw")At();else{const Le=Kn();Ul(pe||void 0).then(Le,Le)}return}switch(Re){case"/new":case"/clear":jr();break;case"/fork":o.forkSession();break;case"/export":on();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/status":no.value=!0;break;case"/login":ke();break;default:{const pe=Re.indexOf(" "),Le=pbe((pe===-1?Re:Re.slice(0,pe)).slice(1)),Sn=pe===-1?void 0:Re.slice(pe+1).trim()||void 0;if(!Le)break;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,Le,Sn):o.activateSkill(Le,Sn);break}}}function Ns(Re){o.unqueue(Re)}function rs(Re){o.unqueue(Re)}function _l(Re){o.reorderQueue(Re.from,Re.to)}function X0(Re){o.steerQueued(Re)}async function J0(Re){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Re.text,Re.attachments);return}if(!o.activeSessionId.value&&!pe){zi.value=Re,Co.value=!0;return}o.sendPrompt(Re.text,Re.attachments)}async function qu(Re){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Re,[]);return}o.activeSessionId.value&&o.sendPrompt(Re)}async function hr(Re){if(gs.value=null,!await o.addWorkspaceByPath(Re)){gs.value=y("workspace.addFailed");return}Co.value=!1;const Le=zi.value;zi.value=null;const Sn=o.activeWorkspaceId.value;Le&&Sn&&await o.startSessionAndSendPrompt(Sn,Le.text,Le.attachments)}function ts(){zi.value=null,gs.value=null,Co.value=!1}async function Fr(Re){for(const pe of Re)if(gs.value=null,!await o.addWorkspaceByPath(pe)){gs.value=y("workspace.addFailed"),Co.value=!0;return}}async function Uu(Re,pe){const Le=await o.generateSessionTitle(Re);Le===null&&(a.value=y("sidebar.genTitleUnavailable"),c!==null&&clearTimeout(c),c=setTimeout(()=>{a.value=null,c=null},5e3)),pe(Le)}function Q0(){yt(()=>{lt.value?.focusComposer()})}function jr(){const Re=o.activeWorkspaceId.value;Re?o.openWorkspaceDraft(Re):o.clearActiveSession(),Q0()}function P1(Re){o.openWorkspaceDraft(Re),Q0()}function F1(Re){Re&&window.open(Re,"_blank","noopener")}return(Re,pe)=>(g(),S("div",lZe,[W(RDe),x.value?(g(),ue(iZe,{key:0})):Y("",!0),O.value?(g(),ue(Gqe,{key:1,onOpenProviders:pe[0]||(pe[0]=()=>{M.value=!0,ne()}),onDismiss:pe[1]||(pe[1]=Le=>M.value=!0)})):Y("",!0),U.value?(g(),S("div",rZe,[b("span",null,I(v(y)("recovery.offlineNotice")),1),b("button",{type:"button","data-testid":"offline-strip-reconnect",onClick:pe[2]||(pe[2]=Le=>M.value=!1)},I(v(y)("recovery.addProvider")),1)])):Y("",!0),O.value?Y("",!0):(g(),S("div",{key:3,class:Be(["app",{mobile:v(A),"sidebar-collapsed":v(Zn)&&!v(A),"macos-desktop":v(Fg),"panel-expanded":v(he)}]),style:Gt({"--preview-w":v(ot)+"px"})},[v(A)?(g(),ue(qDe,{key:1,workspace:v(o).visibleWorkspace.value,"session-title":L.value,running:j.value,branch:v(o).status.value.branch,"session-count":C.value,onOpenSwitcher:pe[23]||(pe[23]=Le=>P.value=!0),onOpenSettings:pe[24]||(pe[24]=Le=>z.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(g(),S(Ce,{key:0},[W(cX,{collapsed:v(Zn),dragging:v(Bo),"col-width":v(Un),"active-workspace":v(o).visibleWorkspace.value,"active-workspace-id":v(o).activeWorkspaceId.value,sessions:v(o).sessionsForView.value,"archived-sessions":s.value,"pinned-ids":v(o).pinnedSessionIds.value,"pinned-collapsed":v(o).pinnedCollapsed.value,groups:v(o).workspaceGroups.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"pending-by-session":v(o).pendingBySession.value,"unread-by-session":v(o).unreadBySession.value,"workspace-sort-mode":v(o).workspaceSortMode.value,workspaces:v(o).workspacesView.value,"tabs-enabled":v(o).config.value?.experimental?.sidebarTabs===!0,onSelect:pe[3]||(pe[3]=Le=>v(o).selectSession(Le)),onCreate:jr,onCreateInWorkspace:pe[4]||(pe[4]=Le=>P1(Le)),onSelectWorkspace:pe[5]||(pe[5]=Le=>v(o).openWorkspace(Le)),onAddWorkspace:pe[6]||(pe[6]=Le=>Co.value=!0),onAddWorkspacePaths:Fr,onRename:jt,onGenerateTitle:Uu,onArchive:pe[7]||(pe[7]=Le=>Qe(Le)),onRestore:pe[8]||(pe[8]=Le=>ht(Le)),onPin:pe[9]||(pe[9]=Le=>v(o).togglePinnedSession(Le)),onReorderPins:pe[10]||(pe[10]=Le=>v(o).reorderPinnedSessions(Le)),onTogglePinnedCollapsed:pe[11]||(pe[11]=Le=>v(o).togglePinnedCollapsed()),onSetSessionEmoji:Zt,onLoadDoneSessions:f,onFork:pe[12]||(pe[12]=Le=>v(o).forkSession(Le)),onExport:pe[13]||(pe[13]=Le=>on(Le)),onRenameWorkspace:pe[14]||(pe[14]=(Le,Sn)=>v(o).renameWorkspace(Le,Sn)),onDeleteWorkspace:pe[15]||(pe[15]=Le=>Vn(Le)),onReorderWorkspaces:pe[16]||(pe[16]=Le=>v(o).reorderWorkspaces(Le)),onSetWorkspaceSortMode:pe[17]||(pe[17]=Le=>v(o).setWorkspaceSortMode(Le)),onLoadMoreSessions:pe[18]||(pe[18]=Le=>void v(o).loadMoreSessions(Le)),onLoadAllSessions:pe[19]||(pe[19]=Le=>void v(o).loadAllSessions()),onOpenSettings:pe[20]||(pe[20]=Le=>Ks()),onOpenSessionAdmin:m,onCollapse:v(Io)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","archived-sessions","pinned-ids","pinned-collapsed","groups","active-id","attention-by-session","pending-by-session","unread-by-session","workspace-sort-mode","workspaces","tabs-enabled","onCollapse"]),Jn(W(Zk,{class:"side-handle","storage-key":v(An),"default-width":v(Qn),min:v(Fn),max:v(Qt),"onUpdate:width":pe[21]||(pe[21]=Le=>uo.value=Le),"onUpdate:dragging":pe[22]||(pe[22]=Le=>Bo.value=Le)},null,8,["storage-key","default-width","min","max"]),[[_i,!v(Zn)]])],64)),i.value?(g(),ue(iJ,{key:2,"open-sessions":p.value,workspaces:v(o).workspacesView.value,"load-archived":h,"archive-session":Qe,"restore-session":ht,"run-batch":Vt,onOpen:pe[25]||(pe[25]=Le=>{i.value=!1,v(o).selectSession(Le)}),onRename:pe[26]||(pe[26]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onFork:pe[27]||(pe[27]=Le=>v(o).forkSession(Le)),onExport:pe[28]||(pe[28]=Le=>on(Le)),onBack:pe[29]||(pe[29]=Le=>i.value=!1)},null,8,["open-sessions","workspaces"])):(g(),ue(i$e,{key:3,ref_key:"conversationPaneRef",ref:lt,mobile:v(A),turns:v(o).turns.value,"session-id":v(o).activeSessionId.value,approvals:v(o).pendingApprovals.value,changes:v(o).changes.value,"git-info":v(o).gitInfo.value,tasks:v(o).tasks.value,todos:v(o).todos.value,goal:v(o).goal.value,"activation-badges":v(o).activationBadges.value,status:v(o).status.value,thinking:v(o).thinking.value,"plan-mode":v(o).planMode.value,"plan-armed":v(o).planArmed.value,"session-plans":v(o).sessionPlans.value,"reveal-saved-plan":v(o).revealSavedPlan,"overlay-open":Os.value,"goal-mode":v(o).goalMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,models:v(o).models.value,"starred-ids":v(o).starredModelIds.value,skills:v(o).skills.value,questions:v(o).questions.value,"pending-question-actions":v(o).pendingQuestionActions,"pending-approval-actions":v(o).pendingApprovalActions,running:j.value,"turn-active":v(o).turnActive.value,queued:v(o).queued.value,"search-files":v(o).searchFiles,"upload-image":v(o).uploadImage,working:v(o).working.value,starting:v(o).isStartingFirstPrompt.value,"fast-moon":v(o).fastMoon.value,"file-reload-key":v(o).activeSessionId.value,"session-loading":v(o).sessionLoading.value,compaction:v(o).compaction.value,"has-more-messages":v(o).hasMoreMessages.value,"loading-more":v(o).loadingMoreMessages.value,"loading-more-error":v(o).loadMoreMessagesError.value,"load-older-messages":v(o).loadOlderMessages,"workspace-name":v(o).visibleWorkspace.value?.name,"workspace-root":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,"git-diff-stats":v(o).gitDiffStats.value,workspaces:v(o).workspacesView.value,"active-workspace-id":v(o).activeWorkspaceId.value,"session-title":L.value,pr:v(o).activePullRequest.value,"panel-visible":v(K),"panel-expanded":v(he),"active-panel-type":v(F)?.type,"toggle-panel":v(be),"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,"last-turn-reason":E.value,"turn-error-kind":T.value?.reason==="max_steps"?"max_steps":void 0,"turn-error-message":T.value?.message,"session-done":$.value,pinned:v(o).pinnedSessionIds.value.includes(v(o).activeSessionId.value??""),"recent-sessions":u.value,onOpenChanges:pe[30]||(pe[30]=Le=>gi()),onSelectWorkspace:pe[31]||(pe[31]=Le=>P1(Le)),onAddWorkspace:pe[32]||(pe[32]=Le=>Co.value=!0),onOpenPr:F1,onSubmit:pe[33]||(pe[33]=Le=>J0(Le)),onSteer:pe[34]||(pe[34]=Le=>v(o).steerPrompt(Le.text,Le.attachments)),onApproval:pe[35]||(pe[35]=(Le,Sn)=>v(o).respondApproval(Le,Sn)),onCancelTask:pe[36]||(pe[36]=Le=>v(o).cancelTask(Le)),onAnswer:pe[37]||(pe[37]=(Le,Sn)=>v(o).respondQuestion(Le,Sn)),onDismiss:pe[38]||(pe[38]=Le=>v(o).dismissQuestion(Le)),onCommand:zn,onInterrupt:pe[39]||(pe[39]=Le=>v(o).abortCurrentPrompt()),onUnqueue:Ns,onEditQueued:rs,onReorderQueue:_l,onSteerQueued:X0,onSetPermission:pe[40]||(pe[40]=Le=>v(o).setPermission(Le)),onSetThinking:pe[41]||(pe[41]=Le=>v(o).setThinking(Le)),onTogglePlan:pe[42]||(pe[42]=Le=>v(o).togglePlanMode()),onToggleWorkflow:pe[43]||(pe[43]=Le=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[44]||(pe[44]=Le=>v(o).toggleGoalMode()),onCreateGoal:pe[45]||(pe[45]=Le=>v(o).createGoal(Le)),onControlGoal:pe[46]||(pe[46]=Le=>v(o).controlGoal(Le)),onRefreshGitStatus:pe[47]||(pe[47]=Le=>v(o).activeSessionId.value&&v(o).loadGitStatus(v(o).activeSessionId.value)),onRenameSession:pe[48]||(pe[48]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onForkSession:pe[49]||(pe[49]=Le=>v(o).forkSession(Le)),onArchiveSession:pe[50]||(pe[50]=Le=>Qe(Le)),onRestoreSession:pe[51]||(pe[51]=Le=>ht(Le)),onSelectSession:pe[52]||(pe[52]=Le=>v(o).selectSession(Le)),onTogglePin:pe[53]||(pe[53]=Le=>v(o).togglePinnedSession(Le)),onOpenSessionAdmin:m,onExportSession:pe[54]||(pe[54]=Le=>on(Le)),onCompact:pe[55]||(pe[55]=Le=>v(o).compact()),onPickModel:pe[56]||(pe[56]=Le=>bl()),onSelectModel:pe[57]||(pe[57]=Le=>Ne(Le)),onOpenFile:pe[58]||(pe[58]=Le=>yo(Le)),onOpenMedia:pe[59]||(pe[59]=Le=>Pn(Le)),onOpenCompaction:pe[60]||(pe[60]=Le=>yl(Le)),onOpenAgent:pe[61]||(pe[61]=Le=>ms(Le)),onDetachTask:pe[62]||(pe[62]=Le=>v(o).detachTask(Le)),onOpenToolDiff:pe[63]||(pe[63]=Le=>wl(Le)),onOpenTurnDiff:pe[64]||(pe[64]=Le=>si(Le)),onEditMessage:Tn,onContinueTurn:qu},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","plan-armed","session-plans","reveal-saved-plan","overlay-open","goal-mode","dynamic-workflow-mode","models","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","turn-active","queued","search-files","upload-image","working","starting","fast-moon","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr","panel-visible","panel-expanded","active-panel-type","toggle-panel","conversation-toc","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","session-done","pinned","recent-sessions"])),!v(A)&&v(Zn)?(g(),ue(Dt,{key:4,class:"sidebar-toggle-btn",size:"sm",label:v(Zn)?v(y)("sidebar.expandSidebar"):v(y)("sidebar.collapseSidebar"),onClick:v(Io)},{default:ae(()=>[W(Ee,{name:v(Zn)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):Y("",!0),!v(A)&&v(Zn)?(g(),ue(Dt,{key:5,class:"new-chat-btn",size:"sm",label:v(y)("sidebar.newChat"),onClick:jr},{default:ae(()=>[W(Ee,{name:"chat-new"})]),_:1},8,["label"])):Y("",!0),!i.value&&(!v(A)||v(K))?(g(),S("aside",{key:6,class:Be(["global-preview",{open:v(K),mobile:v(A),expanded:v(he),"no-anim":v(vl)||le.value}]),role:"complementary","aria-label":v(y)("layout.detailPanelAria"),"aria-hidden":!v(K)},[b("div",cZe,[v(K)&&!v(A)&&!v(he)?(g(),ue(Zk,{key:0,class:"panel-resize","storage-key":v(Rt),"default-width":v(Ls),min:v(Jo),max:v($e),reverse:"","aria-label":v(y)("layout.resizePreviewAria"),"onUpdate:width":pe[65]||(pe[65]=Le=>Ge.value=Le),"onUpdate:dragging":pe[66]||(pe[66]=Le=>vl.value=Le)},null,8,["storage-key","default-width","min","max","aria-label"])):Y("",!0),W(NBe,{tabs:v(X),"active-id":v(oe),expanded:v(he),mobile:v(A),"can-open-diff":v(o).status.value.isGitRepo&&v(o).activeSessionId.value!==null,"can-open-side-chat":!!v(o).activeWorkspaceId.value,onActivate:v(ve),onClose:Ie,onToggleExpanded:v(Se),onHide:v(de),onOpenDiff:gi,onOpenSideChat:pe[67]||(pe[67]=Le=>Ul())},null,8,["tabs","active-id","expanded","mobile","can-open-diff","can-open-side-chat","onActivate","onToggleExpanded","onHide"]),b("div",uZe,[v(F)===null?(g(),S("div",{key:0,class:"panel-launcher",role:"group","aria-label":v(y)("panel.launcherAria")},[b("button",{type:"button",disabled:!v(o).status.value.isGitRepo||v(o).activeSessionId.value===null,onClick:gi},[W(Ee,{name:"git-fork"}),b("span",null,I(v(y)("panel.tabs.diff")),1)],8,fZe),b("button",{type:"button",disabled:!v(o).activeWorkspaceId.value,onClick:pe[68]||(pe[68]=Le=>Ul())},[W(Ee,{name:"message"}),b("span",null,I(v(y)("sideChat.title")),1)],8,pZe)],8,dZe)):xe.value==="compaction"&&v(Mt)?(g(),ue(sze,{key:1,text:v(dt)??"",subtitle:v(y)("conversation.summaryTitle"),onClose:At},null,8,["text","subtitle"])):xe.value==="agent"&&v(en)?(g(),ue(gze,{key:2,member:v(en),turns:v(tn),running:v(st),loading:v(eo),"load-error":v(Ro),"has-more":v(We),"loading-more":v($s),"load-more-error":v(Do),onClose:At,onLoadOlderMessages:v(Pe),onOpenFile:pe[69]||(pe[69]=Le=>yo(Le)),onOpenMedia:pe[70]||(pe[70]=Le=>Pn(Le)),onOpenAgent:pe[71]||(pe[71]=Le=>ms(Le)),onOpenTurnDiff:pe[72]||(pe[72]=Le=>si(Le))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onLoadOlderMessages"])):xe.value==="btw"&&v(Us)?(g(),ue(Yze,{key:3,ref_key:"sideChatPanelRef",ref:mn,turns:v(o).sideChatTurns.value,running:v(o).sideChatRunning.value,sending:v(o).sideChatSending.value,onSend:pe[73]||(pe[73]=Le=>v(o).sendSideChatPrompt(Le)),onClose:At},null,8,["turns","running","sending"])):xe.value==="diff"?(g(),ue(xBe,{key:4,mode:v(So),changes:v(o).changes.value,"git-info":v(o).gitInfo.value,"file-diff":v(o).fileDiff.value,"selected-diff-path":v(o).selectedDiffPath.value,"file-diff-loading":v(o).fileDiffLoading.value,closable:"",onOpen:v(pn),onBack:pe[74]||(pe[74]=Le=>{So.value="list",Qo.value=null,v(o).clearFileDiff()}),onClose:At},null,8,["mode","changes","git-info","file-diff","selected-diff-path","file-diff-loading","onOpen"])):xe.value==="toolDiff"&&v(bt)?(g(),ue(_ze,{key:5,target:v(bt),onClose:At},null,8,["target"])):xe.value==="turnDiff"&&Ye.value?(g(),ue(jze,{key:6,changes:Ye.value.changes,cwd:v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,onOpenFile:pe[75]||(pe[75]=Le=>yo(Le)),onClose:At},null,8,["changes","cwd"])):xe.value==="editor"?(g(),ue(tze,{key:7,onClose:At})):xe.value==="file"?(g(),ue(xNe,{key:8,file:v(ge),loading:v(Oe),error:v(Fe),line:v(fe)?.line,"download-url":v(pt),closable:"","external-actions":v(kt),editable:v(o).fsWriteSupported.value&&v(o).activeSessionId.value!==null,"open-file":yo,onClose:At,onOpenExternal:v(Jt),onReveal:v(kn),onOpenEditor:pe[76]||(pe[76]=Le=>Lo(Le))},null,8,["file","loading","error","line","download-url","external-actions","editable","onOpenExternal","onReveal"])):Y("",!0)]),pe[120]||(pe[120]=b("div",{class:"pfc-host"},null,-1))])],10,aZe)):Y("",!0),$n.value&&Hn.value?(g(),ue(y$e,{key:7,media:$n.value,src:Hn.value,onClose:Mn},null,8,["media","src"])):Y("",!0),W(d$e,{enabled:!Os.value,"panel-source":Ta.value,onAdd:Wo},null,8,["enabled","panel-source"]),to.value?(g(),ue(YBe,{key:8,models:v(o).models.value,current:v(o).status.value.modelId,"starred-ids":v(o).starredModelIds.value,loading:es.value,unavailable:Hs.value,onSelect:pe[77]||(pe[77]=Le=>Te(Le)),onToggleStar:pe[78]||(pe[78]=Le=>v(o).toggleStarModel(Le)),onClose:pe[79]||(pe[79]=Le=>to.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):Y("",!0),no.value?(g(),ue(iDe,{key:9,status:v(o).status.value,thinking:D.value,"plan-mode":v(o).planMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"cost-usd":v(o).sessionCost.value,onClose:pe[80]||(pe[80]=Le=>no.value=!1)},null,8,["status","thinking","plan-mode","dynamic-workflow-mode","cost-usd"])):Y("",!0),Co.value?(g(),ue(VHe,{key:10,"browse-fs":v(o).browseFs,"get-fs-home":v(o).getFsHome,"default-path":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,error:gs.value,onAdd:pe[81]||(pe[81]=Le=>hr(Le)),onClose:ts},null,8,["browse-fs","get-fs-home","default-path","error"])):Y("",!0),W(qi,{name:"gload-fade"},{default:ae(()=>[v(o).initialized.value?Y("",!0):(g(),ue(oUe,{key:0,issue:v(o).connectIssue.value},null,8,["issue"]))]),_:1}),R.value?(g(),ue(Pqe,{key:11,onComplete:Z})):q.value?(g(),ue(dB,{key:12,onComplete:te,onSkip:te})):Y("",!0),W(dDe,{warnings:v(o).warnings.value,onDismiss:v(o).dismissWarning},null,8,["warnings","onDismiss"]),W(ADe),b("div",hZe,[l.value?(g(),ue(t8,{key:`${l.value.kind}:${l.value.ids.join(",")}`,duration:8e3,onDismiss:pe[82]||(pe[82]=Le=>l.value=null)},{default:ae(()=>[b("span",null,I(v(y)(l.value.kind==="done"?"admin.actionArchived":"admin.actionRestored",{n:l.value.ids.length})),1),b("button",{type:"button",class:"session-action-undo",onClick:Wt},I(v(y)("sidebar.archiveToastUndo")),1)]),_:1})):Y("",!0),r.value?(g(),ue(t8,{key:`${r.value.sessionId}:${r.value.state}`,duration:r.value.state==="running"?6e4:4e3,onDismiss:pe[83]||(pe[83]=Le=>r.value=null)},{default:ae(()=>[He(I(v(y)(r.value.state==="running"?"admin.exporting":"admin.exported")),1)]),_:1},8,["duration"])):Y("",!0),a.value?(g(),ue(t8,{key:a.value,duration:5e3,onDismiss:pe[84]||(pe[84]=Le=>a.value=null)},{default:ae(()=>[He(I(a.value),1)]),_:1})):Y("",!0)]),v(_)?(g(),ue(NUe,{key:13})):Y("",!0),v(A)?(g(),ue(rVe,{key:14,modelValue:P.value,"onUpdate:modelValue":pe[85]||(pe[85]=Le=>P.value=Le),groups:v(o).workspaceGroups.value,"active-workspace-id":v(o).activeWorkspaceId.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"attention-by-workspace":v(o).attentionByWorkspace.value,onSelect:pe[86]||(pe[86]=Le=>v(o).selectSession(Le)),onCreate:jr,onCreateInWorkspace:pe[87]||(pe[87]=Le=>P1(Le)),onAddWorkspace:pe[88]||(pe[88]=Le=>Co.value=!0),onRename:pe[89]||(pe[89]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onArchive:pe[90]||(pe[90]=Le=>Qe(Le)),onDeleteWorkspace:pe[91]||(pe[91]=Le=>Vn(Le)),onLoadMore:pe[92]||(pe[92]=Le=>void v(o).loadMoreSessions(Le))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):Y("",!0),v(A)?(g(),ue(vWe,{key:15,modelValue:z.value,"onUpdate:modelValue":pe[93]||(pe[93]=Le=>z.value=Le),status:v(o).status.value,thinking:v(o).thinking.value,models:v(o).models.value,"plan-mode":v(o).planMode.value,"goal-mode":v(o).goalMode.value,goal:v(o).goal.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"color-scheme":v(o).colorScheme.value,"ui-font-size":v(o).uiFontSize.value,"conversation-toc":v(o).conversationToc.value,"server-version":v(o).serverVersion.value,onPickModel:pe[94]||(pe[94]=Le=>bl()),onSetThinking:pe[95]||(pe[95]=Le=>v(o).setThinking(Le)),onTogglePlan:pe[96]||(pe[96]=Le=>v(o).togglePlanMode()),onToggleWorkflow:pe[97]||(pe[97]=Le=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[98]||(pe[98]=Le=>v(o).toggleGoalMode()),onControlGoal:pe[99]||(pe[99]=Le=>v(o).controlGoal(Le)),onSetPermission:pe[100]||(pe[100]=Le=>v(o).setPermission(Le)),onSetColorScheme:pe[101]||(pe[101]=Le=>v(o).setColorScheme(Le)),onSetUiFontSize:pe[102]||(pe[102]=Le=>v(o).setUiFontSize(Le)),onSetConversationToc:pe[103]||(pe[103]=Le=>v(o).setConversationToc(Le)),onLogin:pe[104]||(pe[104]=()=>{z.value=!1,ke()})},null,8,["modelValue","status","thinking","models","plan-mode","goal-mode","goal","dynamic-workflow-mode","color-scheme","ui-font-size","conversation-toc","server-version"])):Y("",!0)],6)),Vo.value?(g(),ue(lHe,{key:4,"color-scheme":v(o).colorScheme.value,accent:v(o).accent.value,"ui-font-size":v(o).uiFontSize.value,"auth-ready":v(o).authReady.value,"account-model":v(o).defaultModel.value,notify:v(o).notifyOnComplete.value,"notify-question":v(o).notifyOnQuestion.value,"notify-approval":v(o).notifyOnApproval.value,"notify-permission":v(o).notifyPermission.value,sound:v(o).soundOnComplete.value,"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,config:v(o).config.value,models:v(o).models.value,"config-saving":vs.value,"server-version":v(o).serverVersion.value,backend:v(o).backend.value,"experimental-flag-states":v(o).experimentalFlagStates.value,"subagent-model-policy":v(o).subagentModelPolicy.value,"subagent-model-policy-saving":v(o).subagentModelPolicySaving.value,onSaveSubagentModelPolicy:pe[105]||(pe[105]=Le=>void v(o).saveSubagentModelPolicy(Le)),onClearSubagentModelPolicy:pe[106]||(pe[106]=Le=>void v(o).clearSubagentModelPolicy()),"initial-tab":Qi.value,onSetColorScheme:pe[107]||(pe[107]=Le=>v(o).setColorScheme(Le)),onSetAccent:pe[108]||(pe[108]=Le=>v(o).setAccent(Le)),onSetUiFontSize:pe[109]||(pe[109]=Le=>v(o).setUiFontSize(Le)),onSetNotify:pe[110]||(pe[110]=Le=>v(o).setNotifyOnComplete(Le)),onSetNotifyQuestion:pe[111]||(pe[111]=Le=>v(o).setNotifyOnQuestion(Le)),onSetNotifyApproval:pe[112]||(pe[112]=Le=>v(o).setNotifyOnApproval(Le)),onSetSound:pe[113]||(pe[113]=Le=>v(o).setSoundOnComplete(Le)),onSetConversationToc:pe[114]||(pe[114]=Le=>v(o).setConversationToc(Le)),onSetTurnFolding:pe[115]||(pe[115]=Le=>v(o).setTurnFolding(Le)),onSetActivityRunFolding:pe[116]||(pe[116]=Le=>v(o).setActivityRunFolding(Le)),onUpdateConfig:pe[117]||(pe[117]=Le=>Ht(Le)),onOpenOnboarding:pe[118]||(pe[118]=()=>{Vo.value=!1,ee()}),onClose:pe[119]||(pe[119]=Le=>Vo.value=!1)},null,8,["color-scheme","accent","ui-font-size","auth-ready","account-model","notify","notify-question","notify-approval","notify-permission","sound","conversation-toc","turn-folding","activity-run-folding","config","models","config-saving","server-version","backend","experimental-flag-states","subagent-model-policy","subagent-model-policy-saving","initial-tab"])):Y("",!0),W(ZHe)]))}}),gZe=vt(mZe,[["__scopeId","data-v-628646c9"]]);Cge();o5(gZe).use(Mo).mount("#app");export{kR as $,$2 as A,uP as B,xs as C,fKe as D,zM as E,Ce as F,L0 as G,He as H,W as I,WR as J,PZe as K,Rl as L,Je as M,NF as N,HZe as O,DZe as P,qZe as Q,O4 as R,lu as S,hl as T,VZe as U,Mg as V,OZe as W,hKe as X,WZe as Y,rKe as Z,vZe as _,cA as a,cs as a$,Ts as a0,cg as a1,SZe as a2,hg as a3,OA as a4,vn as a5,Ru as a6,IZe as a7,vKe as a8,NZe as a9,hA as aA,bP as aB,mA as aC,In as aD,MP as aE,CP as aF,pf as aG,SP as aH,En as aI,gg as aJ,GR as aK,g as aL,IF as aM,TZe as aN,qn as aO,XM as aP,AZe as aQ,W4 as aR,ds as aS,zl as aT,V as aU,tKe as aV,GF as aW,rt as aX,jn as aY,yg as aZ,FZe as a_,RZe as aa,BZe as ab,zZe as ac,oKe as ad,yKe as ae,fn as af,cF as ag,xp as ah,l1 as ai,ya as aj,ps as ak,nKe as al,il as am,g1 as an,It as ao,KZe as ap,GZe as aq,io as ar,yt as as,hF as at,Be as au,mR as av,Gt as aw,kP as ax,xP as ay,vo as az,MZe as b,O2e as b$,uKe as b0,L2 as b1,Y4 as b2,aKe as b3,m1 as b4,jR as b5,wZe as b6,Uo as b7,nP as b8,cKe as b9,js as bA,_i as bB,uF as bC,iKe as bD,Ke as bE,sA as bF,LZe as bG,sP as bH,XZe as bI,ae as bJ,UZe as bK,Jn as bL,go as bM,sKe as bN,xt as bO,EZe as bP,ho as bQ,Cs as bR,SKe as bS,CKe as bT,UL as bU,MKe as bV,i2e as bW,qL as bX,s7 as bY,IKe as bZ,V2e as b_,yZe as ba,I as bb,l4 as bc,jZe as bd,so as be,bZe as bf,kZe as bg,l8 as bh,eKe as bi,HR as bj,v as bk,vf as bl,gKe as bm,pKe as bn,BF as bo,$Ze as bp,JZe as bq,oP as br,mKe as bs,ZZe as bt,r4 as bu,aA as bv,n5 as bw,WF as bx,nT as by,b8 as bz,lKe as c,Ev as c0,Av as c1,Tv as c2,$Ke as c3,$5 as c4,Kc as c5,I5 as c6,R2e as c7,P2e as c8,NKe as c9,vt as cA,LKe as ca,bKe as cb,zKe as cc,Wp as cd,Di as ce,Q2e as cf,J2e as cg,Jde as ch,xKe as ci,Kde as cj,Gde as ck,_Ke as cl,Iv as cm,efe as cn,Ix as co,ux as cp,r2e as cq,L5 as cr,E5 as cs,AKe as ct,EKe as cu,kKe as cv,TKe as cw,Ee as cx,wKe as cy,Dze as cz,QZe as d,r1 as e,_Ze as f,qi as g,FF as h,xZe as i,CZe as j,Dl as k,hf as l,Fs as m,mp as n,wa as o,dKe as p,B as q,o5 as r,ue as s,Y as t,S as u,b as v,GP as w,YZe as x,KP as y,YF as z}; diff --git a/apps/pythinker-code/dist-web/assets/index-CfszvQ96.js b/apps/pythinker-code/dist-web/assets/index-C_5a8vkb.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-CfszvQ96.js rename to apps/pythinker-code/dist-web/assets/index-C_5a8vkb.js index 58cc59e3b..6aa14fc75 100644 --- a/apps/pythinker-code/dist-web/assets/index-CfszvQ96.js +++ b/apps/pythinker-code/dist-web/assets/index-C_5a8vkb.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-DXfck5VN.js","assets/ruby-C0TQ7zu5.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-BWmVpMyf.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-5Bft2YPA.js","assets/r-Cf5RLm7j.js","assets/just-Cwhn7H3k.js","assets/perl-B9cMNwum.js","assets/latex-D5pSuvFb.js","assets/tex-D96PA37w.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-D1_yUvq7.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/org-DM6o9KBp.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-Csjmro_R.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-B1yitclQ.js","assets/scala-CqE71os6.js","assets/csharp-DSvCPggb.js","assets/dart-bE4Kk8sk.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/rst-bs7f0vWN.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Cjom0U5J.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/ts-tags-D351s5mN.js","assets/twig-27uCiNez.js","assets/typst-BUadGCkm.js","assets/bat-CickPsom.js","assets/bibtex-CHM0blh-.js","assets/jsonc-Des-eS-w.js","assets/log-2UxHyX5q.js","assets/powershell-BmBUJMz7.js","assets/swift-C2oV4EkX.js","assets/verilog-nZwndyjY.js","assets/system-verilog-0hqHdDBg.js","assets/vue-BqiEGhQt.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]); -import{bR as c}from"./index-vF2s5p7P.js";var Dt=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Wi=Object.getOwnPropertyNames,zi=Object.prototype.hasOwnProperty,qi=(e,t)=>{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new vt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Gt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Uo=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Cr(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Sn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Or(e,t,n,r,i,o,s,a){const l=t.content.length;let u=!1,p=-1;if(s){const h=Fo(e,t,n,r,i,o);i=h.stack,r=h.linePos,n=h.isFirstLine,p=h.anchorPosition}const d=Date.now();for(;!u;){if(a!==0&&Date.now()-d>a)return new Sn(i,!0);f()}return new Sn(i,!1);function f(){const h=jo(e,t,n,r,i,p);if(!h){o.produce(i,l),u=!0;return}const m=h.captureIndices,E=h.matchedRuleId,b=m&&m.length>0?m[0].end>r:!1;if(E===$o){const g=i.getRule(e);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ce(e,t,n,i,o,g.endCaptures,m),o.produce(i,m[0].end);const _=i;if(i=i.parent,p=_.getAnchorPos(),!b&&_.getEnterPos()===r){i=_,o.produce(i,l),u=!0;return}}else{const g=e.getRule(E);o.produce(i,m[0].start);const _=i,w=g.getName(t.content,m),A=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(E,r,p,m[0].end===l,null,A,A),g instanceof Mt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.endHasBackReferences&&(i=i.withEndRule(k.getEndWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(g instanceof et){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.whileHasBackReferences&&(i=i.withEndRule(k.getWhileWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(Ce(e,t,n,i,o,g.captures,m),o.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,l),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function Fo(e,t,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(e);u instanceof et&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=zo(l.rule,e,l.stack.endRule,n,r===s),d=u.findNextMatchSync(t,r,p);if(d){if(d.ruleId!==Ir){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Ce(e,t,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function jo(e,t,n,r,i,o){const s=Ho(e,t,n,r,i,o),a=e.getInjections();if(a.length===0)return s;const l=Wo(a,e,t,n,r,i,o);if(!l)return s;if(!s)return l;const u=s.captureIndices[0].start,p=l.captureIndices[0].start;return p=a)&&(a=w,l=_.captureIndices,u=_.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function xr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function zo(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ce(e,t,n,r,i,o,s){if(o.length===0)return;const a=t.content,l=Math.min(o.length,s.length),u=[],p=s[0].end;for(let d=0;dp)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),f.retokenizeCapturedWithRuleId){const E=f.getName(a,s),b=r.contentNameScopesList.pushAttributed(E,e),g=f.getContentName(a,s),_=b.pushAttributed(g,e),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,_),A=e.createOnigString(a.substring(0,h.end));Or(e,A,n&&h.start===0,h.start,w,i,!1,0),Lr(A);continue}const m=f.getName(a,s);if(m!==null){const b=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new qo(b,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var qo=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Xo(e,t,n,r,i,o,s,a){return new Qo(e,t,n,r,i,o,s,a)}function Ln(e,t,n,r,i){const o=Ye(t,tt),s=Tr.getCompiledRuleId(n,r,i.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function tt(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var Qo=class{constructor(e,t,n,r,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Bo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Rn(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Ye(l,tt);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)Ln(t,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&Ln(t,l,a,this,a)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Rn(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Tr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Bt.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=le.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Ae.createRootAndLookUpScopeName(f,d,this):h=Ae.createRoot("unknown",d),t=new Bt(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+` `;const o=this.createOnigString(e),s=o.content.length,a=new Yo(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Or(this,o,i,0,t,a,!0,r);return Lr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Rn(e,t){return e=mo(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ae=class K{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=wt.push(i,o.scopeNames),r=new K(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new K(null,new wt(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new wt(null,t),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(n,i,s);return new K(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return K.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),le.set(t,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return K._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=K._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(t.tokenAttributes,i,s);return new K(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Bt=class ie{constructor(t,n,r,i,o,s,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new ie(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:ie._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ae.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ie._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,s,a){return new ie(this,t,n,r,i,o,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ie(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ae.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new ie(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ae.fromExtension(r,n.contentNameScopesList))}},Jo=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ye(n,tt).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ye(n,tt).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Yo=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=le.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=le.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Ut=Bt.NULL;function Ie(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function ee(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Dr(e){return Array.isArray(e)?e:[e]}async function nn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Ve(e){return!e||["plaintext","txt","text","plain"].includes(e)}function rn(e){return e==="ansi"||Ve(e)}function $e(e){return e==="none"}function on(e){return $e(e)}const ts=/(\r?\n)/g;function Me(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(ts);let r=0;const i=[];for(let o=0;o!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?In.light:In.dark),n||(n=t.type==="light"?Tn.light:Tn.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function s(a){if(o.has(a))return o.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?s(a):(o.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!u)return a;const p={...a,settings:{...a.settings}};if(l){const d=s(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,p.settings.foreground=d}if(u){const d=s(a.settings.background);t.colorReplacements[d]=a.settings.background,p.settings.background=d}return p});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=s(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,Pn,{enumerable:!1,writable:!1,value:!0}),t}async function Nr(e){return[...new Set((await Promise.all(e.filter(t=>!rn(t)).map(async t=>await nn(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Vr(e){return(await Promise.all(e.map(async t=>on(t)?null:lt(await nn(t))))).filter(t=>!!t)}function $r(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var ns=class extends es{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=lt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Je.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=$r(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(s=>n.map(([a])=>a).includes(s)):!1).filter(i=>!n.includes(i));throw new S(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},rs=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let ve=0;function ut(e){ve+=1,e.warnings!==!1&&ve>=10&&ve%10===0&&console.warn(`[Shiki] ${ve} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new S("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(lt),i=new ns(new rs(e.engine,n),r,n,e.langAlias);let o;function s(_){return $r(_,e.langAlias)}function a(_){b();const w=i.getGrammar(typeof _=="string"?_:_.name);if(!w)throw new S(`Language \`${_}\` not found, you may need to load it first`);return w}function l(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=i.getTheme(_);if(!w)throw new S(`Theme \`${_}\` not found, you may need to load it first`);return w}function u(_){b();const w=l(_);return o!==_&&(i.setTheme(w),o=_),{theme:w,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function f(..._){b(),i.loadLanguages(_.flat(1))}async function h(..._){return f(await Nr(_))}function m(..._){b();for(const w of _.flat(1))i.loadTheme(w)}async function E(..._){return b(),m(await Vr(_))}function b(){if(t)throw new S("Shiki instance has been disposed")}function g(){t||(t=!0,i.dispose(),ve-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:s,loadLanguage:h,loadLanguageSync:f,loadTheme:E,loadThemeSync:m,dispose:g,[Symbol.dispose]:g}}const is=ut;async function sn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Vr(e.themes||[]),Nr(e.langs||[]),e.engine]);return ut({...e,themes:t,langs:n,engine:r})}const os=sn,Mr=new WeakMap;function ct(e,t){Mr.set(e,t)}function Te(e){return Mr.get(e)}var dt=class Gr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Gr(Object.fromEntries(Dr(n).map(r=>[r,Ut])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return ss(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ss(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function as(e,t){if(!(e instanceof dt))throw new S("Invalid grammar state");return e.getInternalStack(t)}const ls=/,/,us=/ /;function Br(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Ve(e.resolveLangAlias(n.lang||"text"))||$e(r))return Me(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Fr(t,s,i,o,n)}function Ur(...e){if(e.length===2)return Te(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(Ve(i)||$e(o))throw new S("Plain language does not have grammar state");if(i==="ansi")throw new S("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new dt(an(n,l,s,a,r).stateStack,l.name,s.name)}function Fr(e,t,n,r,i){const o=an(e,t,n,r,i),s=new dt(o.stateStack,t.name,n.name);return ct(o.tokens,s),o.tokens}function an(e,t,n,r,i){const o=Ie(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=i,u=Me(e);let p=i.grammarState?as(i.grammarState,n.name)??Ut:i.grammarContextCode!=null?an(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ut,d=[];const f=[];for(let h=0,m=u.length;h0&&E.length>=s){d=[],f.push([{content:E,offset:b,color:"",fontStyle:0}]);continue}let g,_,w;l&&l!=="tokenType"&&(g=t.tokenizeLine(E,p,a),_=g.tokens,w=0);const A=t.tokenizeLine2(E,p,a),k=A.tokens.length/2;for(let I=0;Iyt.trim());break;case"object":pe=Q.scope;break;default:continue}En.push({settings:Q,selectors:pe.map(yt=>yt.split(us))})}q.explanation=[];let bn=0;for(;M+bn({scopeName:t}))}function ds(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)On(e[r],n[i])&&(r-=1),i-=1;return r===-1}function hs(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(ps(s,t,n)){r.push(o);break}return r}function ln(e,t,n,r=Br){const i=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=i.map(u=>{const p=r(e,t,{...n,theme:u.theme});return{tokens:p,state:Te(p),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),s=fs(...o.map(u=>u.tokens)),a=s[0].map((u,p)=>u.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),s.forEach((m,E)=>{const{content:b,explanation:g,offset:_,...w}=m[p][f];h.variants[i[E].color]=w}),h})),l=o[0].state?new dt(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return l&&ct(a,l),a}function fs(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;rl[r]),o=t.map(()=>[]);t.forEach((l,u)=>l.push(o[u]));const s=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u4&&n.slice(0,4)==="data"&&bs.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Dn,Cs);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Dn.test(o)){let s=o.replace(Es,vs);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=un}return new i(r,t)}function vs(e){return"-"+e.toLowerCase()}function Cs(e){return e.charAt(1).toUpperCase()}const As=jr([Hr,_s,qr,Xr,Kr],"html"),Qr=jr([Hr,ys,qr,Xr,Kr],"svg"),Nn={}.hasOwnProperty;function ks(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Nn.call(i,e)){const l=String(i[e]);s=Nn.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ss=/["&'<>`]/g,Ls=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rs=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Is=/[|\\{}()[\]^$+*?.]/g,Vn=new WeakMap;function Ts(e,t){if(e=e.replace(t.subset?Ps(t.subset):Ss,r),t.subset||t.escapeOnly)return e;return e.replace(Ls,n).replace(Rs,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Ps(e){let t=Vn.get(e);return t||(t=Os(e),Vn.set(e,t)),t}function Os(e){const t=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Ms=["cent","copy","divide","gt","lt","not","para","times"],Jr={}.hasOwnProperty,Wt={};let je;for(je in At)Jr.call(At,je)&&(Wt[At[je]]=je);const Gs=/[^\dA-Za-z]/;function Bs(e,t,n,r){const i=String.fromCharCode(e);if(Jr.call(Wt,i)){const o=Wt[i],s="&"+o;return n&&$s.includes(o)&&!Ms.includes(o)&&(!r||t&&t!==61&&Gs.test(String.fromCharCode(t)))?s:s+";"}return""}function Us(e,t,n){let r=Ds(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Bs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Vs(e,t,n.omitOptionalSemicolons);o.length|^->||--!>|"],Hs=["<",">"];function Ws(e,t,n,r){return r.settings.bogusComments?"":"";function i(o){return ye(o,Object.assign({},r.settings.characterReferences,{subset:Hs}))}}function zs(e,t,n,r){return""}function $n(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qs(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Xs(e){return e.join(" ").trim()}const Ks=/[ \t\n\f\r]/g;function cn(e){return typeof e=="object"?e.type==="text"?Mn(e.value):!1:Mn(e)}function Mn(e){return e.replace(Ks,"")===""}const x=Zr(1),Yr=Zr(-1),Qs=[];function Zr(e){return t;function t(n,r,i){const o=n?n.children:Qs;let s=(r||0)+e,a=o[s];if(!i)for(;a&&cn(a);)s+=e,a=o[s];return a}}const Js={}.hasOwnProperty;function ei(e){return t;function t(n,r,i){return Js.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const dn=ei({body:Zs,caption:kt,colgroup:kt,dd:ra,dt:na,head:kt,html:Ys,li:ta,optgroup:ia,option:oa,p:ea,rp:Gn,rt:Gn,tbody:aa,td:Bn,tfoot:la,th:Bn,thead:sa,tr:ua});function kt(e,t,n){const r=x(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&cn(r.value.charAt(0)))}function Ys(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function Zs(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function ea(e,t,n){const r=x(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ta(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="li"}function na(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ra(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Gn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ia(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function oa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function sa(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function aa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function la(e,t,n){return!x(n,t)}function ua(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Bn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ca=ei({body:ha,colgroup:fa,head:pa,html:da,tbody:ma});function da(e){const t=x(e,-1);return!t||t.type!=="comment"}function pa(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function ha(e){const t=x(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&cn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function fa(e,t,n){const r=Yr(n,t),i=x(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ma(e,t,n){const r=Yr(n,t),i=x(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const He={name:[[` \f\r &/=>`.split(""),` diff --git a/apps/pythinker-code/dist-web/assets/index-DmWWUMKQ.css b/apps/pythinker-code/dist-web/assets/index-CgbqiNuj.css similarity index 98% rename from apps/pythinker-code/dist-web/assets/index-DmWWUMKQ.css rename to apps/pythinker-code/dist-web/assets/index-CgbqiNuj.css index 6e1ec270d..edf72ecc4 100644 --- a/apps/pythinker-code/dist-web/assets/index-DmWWUMKQ.css +++ b/apps/pythinker-code/dist-web/assets/index-CgbqiNuj.css @@ -1 +1 @@ -.ui-icon-button[data-v-4b23513f]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:1px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-4b23513f]:hover:not(:disabled){background:color-mix(in srgb,var(--color-text) 8%,transparent);color:var(--color-text)}.ui-icon-button[data-v-4b23513f]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-4b23513f]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-4b23513f]{width:26px;height:26px;border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-4b23513f]{width:32px;height:32px}.ui-icon-button--lg[data-v-4b23513f]{width:44px;height:44px}.ui-icon-button[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-4b23513f] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-dialog__overlay[data-v-13d3b5a2]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111773;animation:pythinker-dialog-overlay-in-13d3b5a2 var(--duration-base) var(--ease-out)}@keyframes pythinker-dialog-overlay-in-13d3b5a2{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-13d3b5a2]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-13d3b5a2]{width:min(440px,100%)}.ui-dialog--md-wide[data-v-13d3b5a2]{width:min(512px,100%)}.ui-dialog--lg[data-v-13d3b5a2]{width:min(640px,100%)}.ui-dialog--xl[data-v-13d3b5a2]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-13d3b5a2]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--flush .ui-dialog__body[data-v-13d3b5a2]{padding:0}.ui-dialog__head[data-v-13d3b5a2]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-13d3b5a2]{flex:1;min-width:0}.ui-dialog__title[data-v-13d3b5a2]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-13d3b5a2]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-13d3b5a2]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-13d3b5a2]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-13d3b5a2]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.sd-head[data-v-addb1371]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.sd-search-icon[data-v-addb1371]{flex:none;color:var(--color-text-muted)}.sd-input[data-v-addb1371]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-lg);color:var(--color-text);background:none;border:none;outline:none;padding:var(--space-1) 0}.sd-input[data-v-addb1371]::placeholder{color:var(--color-text-muted)}.sd-list[data-v-addb1371]{height:420px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.sd-row[data-v-addb1371]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-addb1371]:hover,.sd-row.on[data-v-addb1371]{background:var(--color-surface-sunken)}.sd-row.active .sd-title[data-v-addb1371]{color:var(--color-accent-hover)}.sd-row-ws[data-v-addb1371]{flex-direction:row;align-items:center;gap:var(--space-2)}.sd-ws-name[data-v-addb1371]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-ws-path[data-v-addb1371]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:var(--text-xs);color:var(--color-text-faint)}.sd-section[data-v-addb1371]{display:flex;align-items:baseline;gap:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.sd-section-count[data-v-addb1371]{font-weight:var(--weight-regular)}.sd-section[data-v-addb1371]:first-child{padding-top:var(--space-1)}.sd-section[data-v-addb1371]:not(:first-child){margin-top:var(--space-1);border-top:1px solid var(--color-line)}.sd-meta[data-v-addb1371]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-folder[data-v-addb1371]{flex:none;color:var(--color-text-muted)}.sd-ws[data-v-addb1371]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-time[data-v-addb1371]{flex:none;font-family:var(--font-mono);color:var(--color-text-faint)}.sd-title[data-v-addb1371]{min-width:0;font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-snippet[data-v-addb1371]{min-width:0;font-size:var(--text-sm);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-addb1371] mark,.sd-snippet[data-v-addb1371] mark,.sd-ws-name[data-v-addb1371] mark,.sd-ws-path[data-v-addb1371] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-addb1371]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.sd-hint[data-v-addb1371]{font-size:var(--text-xs);color:var(--color-text-muted)}.ui-spinner[data-v-9e3e449a]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--sm[data-v-9e3e449a]{width:14px;height:14px}.ui-spinner--md[data-v-9e3e449a]{width:18px;height:18px}.ui-spinner--lg[data-v-9e3e449a]{width:28px;height:28px}.ui-spinner__svg[data-v-9e3e449a]{width:100%;height:100%;animation:ui-spinner-rotate-9e3e449a .8s linear infinite}.ui-spinner__ring[data-v-9e3e449a]{fill:none}@keyframes ui-spinner-rotate-9e3e449a{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ui-spinner__svg[data-v-9e3e449a]{animation-duration:1.6s}}.ui-badge[data-v-07bffc39]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:1px solid transparent}.ui-badge--md[data-v-07bffc39]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-07bffc39]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-07bffc39]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-07bffc39]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-07bffc39]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-07bffc39]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-07bffc39]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-07bffc39]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-07bffc39]{background:var(--color-text);color:var(--color-bg)}.ui-menu[data-v-3595ccdb]{min-width:180px;padding:var(--menu-pad);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column}.ui-menu-item[data-v-b6921d06]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:6px 10px;border:none;border-radius:var(--radius-menu-item);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-b6921d06]:hover:not(:disabled){background:var(--color-surface-sunken)}.ui-menu-item[data-v-b6921d06]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-b6921d06]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-b6921d06]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.ui-menu-item.is-danger[data-v-b6921d06]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-b6921d06]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-b6921d06] svg{width:14px;height:14px;flex:none}.ui-menu-item--lg[data-v-b6921d06]{min-height:44px;padding:12px 14px;font-size:var(--text-base)}.ui-menu-sep[data-v-b6921d06]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-2e7663df]{display:contents}.ui-tip__bubble[data-v-2e7663df]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-2e7663df]{opacity:1}.ui-input[data-v-609588ac]{width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-609588ac]{height:38px}.ui-input--sm[data-v-609588ac]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-609588ac]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-609588ac]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-609588ac]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-609588ac]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-609588ac]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-609588ac]{border-color:var(--color-danger)}.ui-input.has-error[data-v-609588ac]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.popover[data-v-051cf21c]{position:fixed;z-index:200;box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow-y:auto;padding:2px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);box-shadow:0 8px 24px color-mix(in srgb,var(--ink) 18%,transparent)}.emoji-picker[data-v-b79cd42c]{width:min(320px,calc(100vw - 40px));max-height:min(440px,calc(100vh - 48px));padding:var(--space-3);overflow-y:auto;background:var(--color-surface-raised)}.emoji-actions[data-v-b79cd42c]{display:flex;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-2)}.emoji-actions button[data-v-b79cd42c]{border:0;background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);cursor:pointer}.emoji-actions button[data-v-b79cd42c]:hover{color:var(--color-text)}.emoji-group h3[data-v-b79cd42c]{margin:var(--space-3) 0 var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.emoji-grid[data-v-b79cd42c]{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:var(--space-1)}.emoji[data-v-b79cd42c]{display:grid;place-items:center;min-width:32px;min-height:32px;border:0;border-radius:var(--radius-sm);background:transparent;font-size:var(--text-lg);cursor:pointer}.emoji[data-v-b79cd42c]:hover{background:var(--color-hover)}.emoji[data-v-b79cd42c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.emoji-empty[data-v-b79cd42c]{padding:var(--space-5) 0;color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.se[data-v-813f72fa]{display:block;margin:0;padding:8px var(--space-2);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-813f72fa]:hover{background:var(--sb-hover, var(--color-surface-sunken));color:var(--color-text)}.se.on[data-v-813f72fa]{background:var(--color-selected);color:var(--color-text)}.row[data-v-813f72fa]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-813f72fa]{display:flex;align-items:center;flex:1;min-width:0}.session-emoji[data-v-813f72fa]{flex:none;margin-right:var(--space-1);font-size:var(--text-base);line-height:1}.lead[data-v-813f72fa]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-813f72fa]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.t[data-v-813f72fa]{color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts[data-v-813f72fa]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-813f72fa]{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:flex-end;min-width:26px}.act .kebab[data-v-813f72fa]{position:absolute;right:0;top:50%;transform:translateY(-50%);visibility:hidden}.se:hover .act .kebab[data-v-813f72fa],.act:has(.kebab.open) .kebab[data-v-813f72fa]{visibility:visible}.se:hover .act .ts[data-v-813f72fa],.act:has(.kebab.open) .ts[data-v-813f72fa]{visibility:hidden}.kebab.open[data-v-813f72fa]{color:var(--color-text);background:var(--sb-hover, var(--color-surface-sunken))}.menu[data-v-813f72fa]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-time[data-v-813f72fa]{padding:var(--space-1) var(--space-2);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);cursor:default;user-select:text}.rename-wrap[data-v-813f72fa]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-813f72fa]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none}.rename-wrap.generating .rename-input[data-v-813f72fa]{visibility:hidden}.gen-title-btn[data-v-813f72fa]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-813f72fa]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-813f72fa]{margin:0;border-radius:var(--radius-sm);padding:8px calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px))}.sessions .se .rename-wrap[data-v-813f72fa]{border-radius:var(--radius-sm)}.sessions .se .rename-input[data-v-813f72fa]{font-family:var(--sans)}.sessions .se .kebab[data-v-813f72fa]{border-radius:var(--radius-sm)}.group.dragging[data-v-4e9d3a01]{opacity:.45}.group-sessions[data-v-4e9d3a01]{display:grid;grid-template-rows:minmax(0,1fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-4e9d3a01]{grid-template-rows:minmax(0,0fr)}.group-sessions-inner[data-v-4e9d3a01]{min-height:0;overflow:hidden}.gh[data-v-4e9d3a01]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-4e9d3a01]:active{cursor:grabbing}.gh[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.gh-top[data-v-4e9d3a01]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-4e9d3a01]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-4e9d3a01]{font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-4e9d3a01]{position:absolute;right:0;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;background:var(--color-sidebar-bg);opacity:0;pointer-events:none}.gh-actions[data-v-4e9d3a01]:after{content:"";position:absolute;inset:0;z-index:0;border-radius:var(--radius-sm);background:transparent}.gh:hover .gh-actions[data-v-4e9d3a01]:after{background:var(--sb-hover, var(--color-surface-sunken))}.gh-actions[data-v-4e9d3a01]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-4e9d3a01],.gh:focus-within .gh-actions[data-v-4e9d3a01],.gh-actions.open[data-v-4e9d3a01]{opacity:1;pointer-events:auto}.gh-more.open[data-v-4e9d3a01]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-4e9d3a01]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.show-more[data-v-4e9d3a01]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.show-more[data-v-4e9d3a01]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-lead[data-v-4e9d3a01]{width:var(--sb-gutter);flex:none}.show-more-label[data-v-4e9d3a01]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-4e9d3a01]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-4e9d3a01]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-4e9d3a01]{color:var(--faint)}.gh-add[data-v-4e9d3a01]:hover{color:var(--dim)}.error-boundary[data-v-3d80705c]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6)}.error-boundary.fullscreen[data-v-3d80705c]{position:fixed;inset:0;z-index:var(--z-modal);background:var(--color-bg)}.error-boundary-close[data-v-3d80705c]{position:absolute;top:var(--space-4);right:var(--space-4)}.error-boundary-icon[data-v-3d80705c]{color:var(--color-warning)}.error-boundary-title[data-v-3d80705c]{margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.ui-button[data-v-738fde35]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:1px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-738fde35]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-738fde35]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-738fde35]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-738fde35]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-738fde35]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-738fde35]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-738fde35]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-738fde35] svg{flex:none}.ui-button__content[data-v-738fde35] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-738fde35]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-738fde35]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-738fde35]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-738fde35]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ui-button--ghost[data-v-738fde35]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-738fde35]:not(:disabled):hover{background:var(--color-surface-sunken);color:var(--color-text)}.ui-button--danger[data-v-738fde35]{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-738fde35]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-738fde35]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-738fde35]:not(:disabled):hover{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-738fde35]{opacity:.7}.ui-button .ui-button__spinner[data-v-738fde35]{flex:none;color:inherit}.ui-button__spinner[data-v-738fde35] .ui-spinner__track{opacity:.35}.error-boundary[data-v-1b27e696]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6)}.error-boundary.fullscreen[data-v-1b27e696]{position:fixed;inset:0;z-index:var(--z-modal);background:var(--color-bg)}.error-boundary-close[data-v-1b27e696]{position:absolute;top:var(--space-4);right:var(--space-4)}.error-boundary-icon[data-v-1b27e696]{color:var(--color-warning)}.error-boundary-title[data-v-1b27e696]{margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.ui-kbd[data-v-e5cfdeb4]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-e5cfdeb4]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:1px solid var(--color-line);border-bottom-width:2px;border-radius:var(--radius-xs);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:11px;line-height:1}.pinned[data-v-6c2ea92b]{flex:none;min-width:0;padding:var(--space-3) var(--sb-inset) 0}.pinned-label[data-v-6c2ea92b]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);padding:0 var(--space-2) var(--space-1);color:var(--faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;user-select:none}.pinned-title[data-v-6c2ea92b]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pinned-toggle[data-v-6c2ea92b]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.pinned-label:hover .pinned-toggle[data-v-6c2ea92b],.pinned-label:focus-within .pinned-toggle[data-v-6c2ea92b],.pinned-toggle--on[data-v-6c2ea92b]{opacity:1}.pinned-toggle[data-v-6c2ea92b]:hover{color:var(--dim)}.pinned-toggle[data-v-6c2ea92b] svg{width:13px;height:13px}.pinned-rows[data-v-6c2ea92b]{max-height:40vh;overflow-y:auto;padding:0 var(--sb-inset);scrollbar-gutter:stable}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar{width:var(--space-1)}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar-track{background:transparent}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full)}.pinned-rows[data-v-6c2ea92b]:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.pinned-rows-wrap[data-v-6c2ea92b]{position:relative;margin:0 calc(var(--sb-inset) * -1);--pinned-seam-down: linear-gradient(to bottom, color-mix(in srgb, var(--color-text) 3%, transparent), transparent);--pinned-seam-up: linear-gradient(to top, color-mix(in srgb, var(--color-text) 3%, transparent), transparent)}.pinned-seam[data-v-6c2ea92b]{position:absolute;left:0;right:0;height:var(--space-3);pointer-events:none;opacity:0;z-index:var(--z-raised);transition:opacity var(--duration-base) var(--ease-out)}.pinned-seam--top[data-v-6c2ea92b]{top:0;border-top:var(--p-hairline) solid var(--line);background:var(--pinned-seam-down)}.pinned-seam--bottom[data-v-6c2ea92b]{bottom:0;border-bottom:var(--p-hairline) solid var(--line);background:var(--pinned-seam-up)}.pinned-rows-wrap.scrolled .pinned-seam--top[data-v-6c2ea92b],.pinned-rows-wrap.more-below .pinned-seam--bottom[data-v-6c2ea92b]{opacity:1}.pinned-resize[data-v-6c2ea92b]{height:var(--space-1);position:relative;background:transparent;cursor:row-resize;touch-action:none;margin:calc(var(--space-05) * -1) calc(var(--sb-inset) * -1);z-index:var(--z-dropdown)}.pinned-resize-bar[data-v-6c2ea92b]{position:absolute;top:50%;left:0;right:0;height:var(--space-05);translate:0 -50%;background:transparent;transition:background var(--duration-fast) var(--ease-out)}.pinned-resize:hover .pinned-resize-bar[data-v-6c2ea92b]{background:var(--color-selected)}.pinned-resize.dragging .pinned-resize-bar[data-v-6c2ea92b]{background:var(--color-line-strong)}.pinned-resize[data-v-6c2ea92b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.pin-row.dragging[data-v-6c2ea92b]{opacity:.45}.release-notes[data-v-71f2d526]{min-width:0;overflow-wrap:anywhere;color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-prose)}.release-notes[data-v-71f2d526]>:first-child{margin-top:0}.release-notes[data-v-71f2d526]>:last-child{margin-bottom:0}.release-notes__empty[data-v-71f2d526]{margin:0;color:var(--color-text-muted)}.release-notes__heading[data-v-71f2d526]{margin:var(--space-5) 0 var(--space-2);color:var(--color-text-strong);font-size:var(--text-sm);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.release-notes__paragraph[data-v-71f2d526]{margin:0 0 var(--space-3)}.release-notes__list[data-v-71f2d526]{margin:0 0 var(--space-3);padding:0;list-style:none}.release-notes__list li[data-v-71f2d526]{position:relative;margin:0 0 var(--space-2);padding-inline-start:var(--space-4)}.release-notes__list li[data-v-71f2d526]:last-child{margin-bottom:0}.release-notes__list li[data-v-71f2d526]:before{content:"";position:absolute;inset-block-start:.6em;inset-inline-start:var(--space-1);width:4px;height:4px;border-radius:var(--radius-full);background:var(--color-text-faint)}.release-notes__provenance[data-v-71f2d526]{margin:var(--space-5) 0 0;padding-top:var(--space-3);border-top:1px solid var(--color-line);color:var(--color-text-muted);font-size:var(--text-xs)}.release-notes__provenance a[data-v-71f2d526]{color:var(--color-text-muted);font-family:var(--font-mono);text-decoration-color:var(--color-line-strong);text-underline-offset:2px}.release-notes__provenance a[data-v-71f2d526]:hover,.release-notes__provenance a[data-v-71f2d526]:focus-visible{color:var(--color-text)}.side[data-v-1918075b]{position:relative;isolation:isolate;display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover)}.side[data-v-1918075b]:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-color:var(--color-sidebar-glass);background-image:var(--color-sidebar-wash);-webkit-backdrop-filter:var(--p-sidebar-backdrop);backdrop-filter:var(--p-sidebar-backdrop)}.side.no-anim[data-v-1918075b]{transition:none}.side.collapsed[data-v-1918075b]{visibility:hidden}.col[data-v-1918075b]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:1px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-1918075b]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-1918075b]{padding-top:36px;-webkit-app-region:drag}.side.macos-desktop .ch-collapse[data-v-1918075b],.side.macos-desktop .ch-actions[data-v-1918075b]{-webkit-app-region:no-drag}.ch-logo[data-v-1918075b]{width:min(220px,100%);height:auto;object-fit:contain;object-position:left center;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-1918075b]:hover{transform:scale(1.08)}.ch-brand[data-v-1918075b]{display:flex;align-items:center;min-width:0;flex:1;user-select:none;touch-action:none}.ch-actions[data-v-1918075b]{display:flex;align-items:center;gap:var(--space-2);flex:none}.sidebar-update-trigger[data-v-1918075b]{width:32px;height:32px;border:none;border-radius:var(--radius-full);background:transparent}.sidebar-update-trigger[data-v-1918075b] svg{width:32px;height:32px}.ch-actions .sidebar-update-trigger[data-v-1918075b]:hover:not(:disabled){background:transparent}.sidebar-update-trigger[data-v-1918075b]:focus-visible{box-shadow:var(--p-focus-ring-strong)}.sidebar-update-notes[data-v-1918075b]{position:fixed;z-index:var(--z-tooltip);box-sizing:border-box;width:min(440px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 32px));overflow:hidden;border:1px solid var(--color-line-strong);border-radius:var(--radius-xl);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-menu);font-family:var(--font-ui)}.sidebar-update-notes__header[data-v-1918075b]{display:flex;flex-direction:column;gap:var(--space-1);padding:var(--space-6) var(--space-6) var(--space-5)}.sidebar-update-notes__header strong[data-v-1918075b]{color:var(--color-text-strong);font-size:var(--text-lg)}.sidebar-update-notes__header span[data-v-1918075b]{color:var(--color-text-muted);font-size:var(--text-sm)}.sidebar-update-notes__divider[data-v-1918075b]{height:1px;margin-inline:var(--space-6);background:var(--color-line)}.sidebar-update-notes.is-scrollable[data-v-1918075b]:after{content:"";position:absolute;inset-inline:1px;inset-block-end:1px;height:var(--space-6);border-end-start-radius:var(--radius-xl);border-end-end-radius:var(--radius-xl);background:linear-gradient(to bottom,transparent,var(--color-surface-raised));pointer-events:none}.sidebar-update-notes__body[data-v-1918075b]{min-width:0;max-height:min(500px,calc(100vh - 150px));overflow-x:clip;overflow-y:auto;padding:var(--space-5) var(--space-6) var(--space-6);overscroll-behavior:contain}.sidebar-update-notes__body[data-v-1918075b]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px;border-radius:var(--radius-md)}.btn-wrap[data-v-1918075b]{display:flex;align-items:center;gap:8px;padding:0 var(--sb-inset)}.btn-new-chat[data-v-1918075b]{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-new-chat[data-v-1918075b]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-1918075b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-1918075b]{flex:none}.btn-new-chat span[data-v-1918075b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-tabs[data-v-1918075b]{display:flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--sb-inset) var(--space-2)}.status-tabs>button[data-v-1918075b]:not(.status-view-switcher){min-height:28px;padding:0 var(--space-3);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-xs);cursor:pointer}.status-tabs>button.active[data-v-1918075b]{background:var(--color-selected);color:var(--color-text)}.status-view-switcher[data-v-1918075b]{margin-left:auto}.search-wrap[data-v-1918075b]{padding:0 var(--sb-inset);position:relative;z-index:1;background:var(--color-sidebar-glass);-webkit-backdrop-filter:var(--p-sidebar-backdrop);backdrop-filter:var(--p-sidebar-backdrop);border-bottom:1px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.search-wrap--scrolled[data-v-1918075b]{border-bottom-color:var(--line);box-shadow:var(--shadow-sm)}.search[data-v-1918075b]{display:flex;align-items:center;gap:12px;width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-1918075b]:hover{background:var(--sb-hover)}.search[data-v-1918075b]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-1918075b]{flex:none}.search-input[data-v-1918075b]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions[data-v-1918075b]{flex:1;overflow-y:auto;padding:var(--space-3) var(--sb-inset);min-height:0}.sessions[data-v-1918075b]::-webkit-scrollbar{width:4px}.sessions[data-v-1918075b]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-1918075b]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:var(--radius-full)}.sessions[data-v-1918075b]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-1918075b]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--sb-inset);border-top:1px solid var(--line)}.side-footer-account[data-v-1918075b]{flex:1 1 auto;min-width:0}.btn-settings-label[data-v-1918075b]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-settings[data-v-1918075b]{display:flex;align-items:center;gap:12px;width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-settings[data-v-1918075b]:hover{background:var(--sb-hover)}.btn-settings[data-v-1918075b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-settings svg[data-v-1918075b]{flex:none}.btn-settings span[data-v-1918075b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-label[data-v-1918075b]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-regular);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-1918075b]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-toggle[data-v-1918075b]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.side-section-label:hover .side-section-toggle[data-v-1918075b],.side-section-label:focus-within .side-section-toggle[data-v-1918075b]{opacity:1}.side-section-toggle[data-v-1918075b]:hover{color:var(--dim)}.side-section-toggle svg[data-v-1918075b]{width:13px;height:13px}.side-section-actions[data-v-1918075b]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-1918075b]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-1918075b]{box-shadow:inset 0 -2px 0 var(--color-accent)}.empty[data-v-1918075b]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-1918075b],.gh-menu[data-v-1918075b],.section-menu[data-v-1918075b]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.section-menu-check[data-v-1918075b]{display:inline-flex;flex:none;width:14px}.section-menu-label[data-v-1918075b]{padding:var(--space-2) var(--space-3) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ws-dir[data-v-1918075b]{display:block;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);cursor:pointer;position:relative;user-select:none}.ws-dir[data-v-1918075b]:hover{background:var(--sb-hover, var(--color-hover))}.ws-dir.on[data-v-1918075b]{background:var(--color-selected)}.ws-dir+.ws-dir[data-v-1918075b]{margin-top:var(--space-05)}.ws-dir-row[data-v-1918075b]{display:flex;align-items:center;gap:var(--sb-gap);min-width:0;position:relative}.ws-dir-icon[data-v-1918075b]{flex:none;color:var(--color-text-muted)}.ws-dir-name[data-v-1918075b]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-rename[data-v-1918075b]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-sm);padding:2px 5px;outline:none}.ws-dir-sub[data-v-1918075b]{margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-act[data-v-1918075b]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.ws-dir:hover .ws-dir-act[data-v-1918075b],.ws-dir:focus-within .ws-dir-act[data-v-1918075b],.ws-dir-act.open[data-v-1918075b]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh[data-v-1918075b]{display:flex;align-items:center;gap:var(--sb-gap);padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);user-select:none;position:relative;cursor:pointer}.done-gh[data-v-1918075b]:hover{background:var(--sb-hover, var(--color-hover))}.done-gh-folder[data-v-1918075b]{flex:none;color:var(--color-text-muted)}.done-gh-name[data-v-1918075b]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.done-gh-count[data-v-1918075b]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.done-gh-more[data-v-1918075b]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh:hover .done-gh-more[data-v-1918075b],.done-gh:focus-within .done-gh-more[data-v-1918075b],.done-gh-more.open[data-v-1918075b]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh:hover .done-gh-count[data-v-1918075b],.done-gh:focus-within .done-gh-count[data-v-1918075b]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh-sessions[data-v-1918075b]{padding-bottom:var(--space-1)}.folder-drop-overlay[data-v-1918075b]{position:absolute;inset:0;z-index:var(--z-dropdown);display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-1918075b]{opacity:1;visibility:visible}.folder-drop-card[data-v-1918075b]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:1px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-1918075b]{flex:none}.folder-drop-card span[data-v-1918075b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-check[data-v-7344a446]{display:inline-flex;align-items:center;gap:var(--space-2);cursor:pointer}.ui-check.is-disabled[data-v-7344a446]{opacity:.5;cursor:not-allowed}.ui-check__input[data-v-7344a446]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ui-check__box[data-v-7344a446]{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none;border:1.5px solid var(--color-line-strong);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-on-accent);transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out)}.ui-check.is-on .ui-check__box[data-v-7344a446]{background:var(--color-accent);border-color:var(--color-accent)}.ui-check__input:focus-visible+.ui-check__box[data-v-7344a446]{box-shadow:var(--p-focus-ring)}.ui-check__box svg[data-v-7344a446]{width:12px;height:12px}.ui-check__label[data-v-7344a446]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text)}.ui-empty[data-v-9dd6e8c0]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-9dd6e8c0]{color:var(--color-text-faint)}.ui-empty__icon[data-v-9dd6e8c0] svg{width:48px;height:48px}.ui-empty__title[data-v-9dd6e8c0]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-9dd6e8c0]{font-size:var(--text-sm);color:var(--color-text-muted)}.filter-select[data-v-760e80df]{position:relative;min-width:0}.filter-select__trigger[data-v-760e80df]{min-height:32px;display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.filter-select__trigger[data-v-760e80df]:hover{background:var(--color-hover)}.filter-select__trigger[data-v-760e80df]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.filter-select__label[data-v-760e80df]{color:var(--color-text-muted)}.filter-select__value[data-v-760e80df]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filter-select__menu[data-v-760e80df]{position:absolute;top:calc(100% + var(--space-1));right:0;z-index:var(--z-dropdown)}.filter-select__check[data-v-760e80df]{width:16px;flex:none}.sa-dot[data-v-760e80df]{flex:none;width:8px;height:8px;border-radius:var(--radius-full)}.sa-dot--open[data-v-760e80df]{background:var(--color-success)}.sa-dot--done[data-v-760e80df]{background:var(--color-done)}.multi-select[data-v-887f9b9a]{position:relative;min-width:0}.multi-select__trigger[data-v-887f9b9a]{min-height:32px;max-width:320px;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.multi-select__trigger[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__trigger[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__placeholder[data-v-887f9b9a]{padding:0 var(--space-1);color:var(--color-text-muted)}.multi-select__tag[data-v-887f9b9a]{min-width:0;display:inline-flex;align-items:center;gap:var(--space-1);padding:2px 6px;border-radius:var(--radius-full);background:var(--color-surface-sunken)}.multi-select__tag>span[data-v-887f9b9a]:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__remove[data-v-887f9b9a]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:var(--radius-full)}.multi-select__remove[data-v-887f9b9a]{padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.multi-select__remove[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__more[data-v-887f9b9a]{color:var(--color-text-muted)}.multi-select__menu[data-v-887f9b9a]{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:var(--z-dropdown);width:min(320px,calc(100vw - var(--space-4)))}.multi-select__search[data-v-887f9b9a]{padding:var(--space-1)}.multi-select__separator[data-v-887f9b9a]{height:1px;margin:var(--space-1) 0;background:var(--color-line)}.multi-select__options[data-v-887f9b9a]{max-height:240px;overflow:auto}.multi-select__option[data-v-887f9b9a]{min-height:32px;display:flex;align-items:center;gap:var(--space-2);padding:6px 10px;border-radius:var(--radius-sm);color:var(--color-text);font-size:var(--text-base);cursor:pointer}.multi-select__option[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__option.active[data-v-887f9b9a]{background:var(--color-selected)}.multi-select__name[data-v-887f9b9a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__empty[data-v-887f9b9a]{padding:var(--space-3);color:var(--color-text-muted);text-align:center}.session-admin[data-v-264fe89e]{grid-column:3 / -1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text)}.session-admin__header[data-v-264fe89e]{min-height:var(--panel-head-h);display:flex;align-items:flex-start;gap:var(--space-3);padding:var(--space-4);border-bottom:.5px solid var(--color-line)}.session-admin__header h1[data-v-264fe89e]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium)}.session-admin__header p[data-v-264fe89e]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__body[data-v-264fe89e]{width:min(100%,var(--p-table-max));min-height:0;margin:0 auto;padding:var(--space-5);overflow:auto}.session-admin__filters[data-v-264fe89e]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-4)}.session-admin__query[data-v-264fe89e]{width:min(260px,100%)}.session-admin__batch[data-v-264fe89e]{min-height:44px;display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-bottom:0;border-radius:var(--radius-md) var(--radius-md) 0 0;background:var(--color-surface);font-size:var(--text-sm)}.session-admin__table-wrap[data-v-264fe89e]{min-width:0;overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.session-admin__batch+.session-admin__table-wrap[data-v-264fe89e]{border-radius:0 0 var(--radius-md) var(--radius-md)}.session-admin__table[data-v-264fe89e]{width:100%;border-collapse:collapse;font-size:var(--text-sm)}.session-admin__table th[data-v-264fe89e],.session-admin__table td[data-v-264fe89e]{padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line);text-align:left;vertical-align:middle}.session-admin__table th[data-v-264fe89e]{background:var(--color-surface);color:var(--color-text-muted);font-weight:var(--weight-medium);white-space:nowrap}.session-admin__table tbody tr[data-v-264fe89e]:hover{background:var(--color-hover)}.session-admin__table tbody tr:last-child td[data-v-264fe89e]{border-bottom:0}.session-admin__check[data-v-264fe89e]{width:32px}.session-admin__back-icon[data-v-264fe89e]{transform:rotate(180deg)}.session-admin__status[data-v-264fe89e]{display:inline-flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__status.done[data-v-264fe89e]{color:var(--color-success)}.session-admin__title[data-v-264fe89e],.session-admin__prompt[data-v-264fe89e]{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-admin__title-button[data-v-264fe89e]{max-width:100%;overflow:hidden;border:0;background:transparent;color:inherit;font:inherit;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.session-admin__title-button[data-v-264fe89e]:hover{text-decoration:underline;text-underline-offset:3px}.session-admin__title-button[data-v-264fe89e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.session-admin__rename[data-v-264fe89e]{width:100%;min-width:140px;border:1px solid var(--color-accent);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text);font:inherit}.session-admin__actions[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__updated[data-v-264fe89e]{white-space:nowrap;color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-xs)}.session-admin__state[data-v-264fe89e]{min-height:220px;display:grid;place-items:center}.session-admin__sr-only[data-v-264fe89e]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.session-admin__pager[data-v-264fe89e]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding-top:var(--space-3);color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__pager>div[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-2)}@media(max-width:640px){.session-admin[data-v-264fe89e]{grid-column:1}.session-admin__body[data-v-264fe89e],.session-admin__header[data-v-264fe89e]{padding:var(--space-3)}}.rh[data-v-9d88ed75]{width:4px;flex:none;cursor:col-resize;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-9d88ed75]{position:absolute;inset:0;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-9d88ed75],.rh.dragging .rh-bar[data-v-9d88ed75]{background:var(--color-accent)}.rh[data-v-9d88ed75]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.kw-dot[data-v-0c65e524]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-0c65e524]{background:var(--color-success)}.kw-dot--error[data-v-0c65e524]{background:var(--color-danger)}.kw-dot--suspended[data-v-0c65e524]{background:var(--color-warning)}.kw-dot--running[data-v-0c65e524]{background:var(--color-accent);animation:kw-dot-pulse-0c65e524 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-0c65e524{0%{box-shadow:0 0 color-mix(in srgb,var(--color-accent) 40%,transparent)}to{box-shadow:0 0 0 6px transparent}}.box[data-v-bf82d9cd]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.box.err[data-v-bf82d9cd]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.box.stacked[data-v-bf82d9cd]{border:none;border-radius:0}.box.stacked .bh[data-v-bf82d9cd]{border-radius:0}.box.stack-middle[data-v-bf82d9cd],.box.stack-last[data-v-bf82d9cd]{border-top:1px solid var(--color-line)}.bh[data-v-bf82d9cd]{display:flex;align-items:center;gap:8px;min-height:30px;padding:0 11px;cursor:pointer;font:var(--text-sm) var(--font-mono);color:var(--color-text);--emph: var(--color-text-muted)}.box.open .bh[data-v-bf82d9cd],.bh[data-v-bf82d9cd]:hover{background:var(--color-surface-sunken);--emph: var(--color-text)}.box.run .bh[data-v-bf82d9cd]{--emph: var(--color-text-strong)}.box.err .bh[data-v-bf82d9cd]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.box.err .bh[data-v-bf82d9cd]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.gl[data-v-bf82d9cd]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.bh-text[data-v-bf82d9cd]{display:flex;align-items:baseline;gap:inherit;flex:1;min-width:0;overflow:hidden}.a[data-v-bf82d9cd]{color:var(--emph);font-weight:var(--weight-medium);flex:none;transition:color var(--duration-slow) var(--ease-out)}.p[data-v-bf82d9cd]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-bf82d9cd]{margin-left:auto;color:var(--color-text-muted);font-size:var(--text-xs);display:flex;align-items:center;gap:6px;flex:0 1 auto;min-width:0}.tm[data-v-bf82d9cd]{color:var(--color-text-faint);flex:none;white-space:nowrap}.chip[data-v-bf82d9cd-s]{color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status[data-v-bf82d9cd]{display:inline-flex;align-items:center;flex:none}.status.ok[data-v-bf82d9cd]{color:var(--color-success)}.status.error[data-v-bf82d9cd]{color:var(--color-danger)}.bb[data-v-bf82d9cd]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.bb.open[data-v-bf82d9cd]{grid-template-rows:minmax(0,1fr)}.bb-pad[data-v-bf82d9cd]{min-height:0;overflow:hidden;padding:var(--space-2) var(--space-3) var(--space-3);background:var(--color-surface-sunken);border-top:1px solid var(--color-line);color:var(--color-text);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.box.mob[data-v-bf82d9cd]{margin:0}.detach[data-v-4049750a]{position:relative;flex:none;margin-right:var(--space-1)}.detach.touch[data-v-4049750a]:after{content:"";position:absolute;inset:-9px}.at-open[data-v-4049750a]{flex:none;background:none;border:1px solid var(--color-line);border-radius:var(--radius-xs);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);padding:1px 7px;cursor:pointer}.at-open[data-v-4049750a]:hover{color:var(--color-text);background:var(--color-surface-sunken)}.at-type[data-v-4049750a]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-bottom:6px}.at-task[data-v-4049750a]{color:var(--color-text);white-space:pre-wrap;word-break:break-word}.at-task+.bb-code[data-v-4049750a]{margin-top:10px}.bb-code[data-v-4049750a]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md)}.chip[data-v-53896919]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.au-dismissed[data-v-53896919]{color:var(--color-text-muted);font:italic var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-list[data-v-53896919]{display:flex;flex-direction:column;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-block[data-v-53896919]{padding:4px 0}.au-block+.au-block[data-v-53896919]{margin-top:4px;padding-top:10px;border-top:1px dashed var(--color-line)}.au-q[data-v-53896919]{display:flex;align-items:baseline;gap:8px;margin-bottom:6px}.au-hdr[data-v-53896919]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:0 6px;flex:none}.au-qtext[data-v-53896919]{color:var(--color-text);font-weight:var(--weight-medium)}.au-opts[data-v-53896919]{display:flex;flex-direction:column;gap:4px}.au-opt[data-v-53896919]{display:flex;align-items:center;gap:8px;padding:5px 10px;border:1px solid var(--color-line);border-radius:var(--radius-md);color:var(--color-text-faint)}.au-opt.sel[data-v-53896919]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.au-glyph[data-v-53896919]{font:var(--text-base) var(--font-mono);color:var(--color-text-faint);width:14px;text-align:center;flex:none}.au-opt.sel .au-glyph[data-v-53896919]{color:var(--color-accent-hover)}.au-label[data-v-53896919]{color:inherit}.au-desc[data-v-53896919]{color:var(--color-text-faint);font-size:var(--text-xs);margin-left:2px}.au-opt.sel .au-desc[data-v-53896919]{color:var(--color-text-muted)}.au-raw[data-v-53896919]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.tool-output-block[data-v-262bbea0]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised)}.tool-output-block.scroll[data-v-262bbea0]{max-height:calc(var(--tool-output-visible-lines) * 1lh);overflow-y:auto;scrollbar-gutter:stable}.bb-empty[data-v-262bbea0]{color:var(--color-text-muted);font-style:italic}.tl-detach[data-v-8e5a48b5]{position:relative;flex:none}.tl-detach.touch[data-v-8e5a48b5]:after{content:"";position:absolute;inset:-9px}.bash-command[data-v-8e5a48b5]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);white-space:pre-wrap}.diff-lines[data-v-f456050c]{padding:4px 0 12px;font-size:var(--ui-font-size);line-height:1.5;-webkit-overflow-scrolling:touch;width:max-content;min-width:100%}.dl[data-v-f456050c]{display:flex;align-items:flex-start;min-height:18px;white-space:pre;width:100%}.dl-gutter[data-v-f456050c]{flex:none;width:40px;padding:0 6px;text-align:right;color:var(--faint, #aeb4bc);background:var(--panel, #fafbfc);user-select:none;border-right:1px solid var(--line2, #eef1f4);font-variant-numeric:tabular-nums}.dl-gutter.new[data-v-f456050c]{border-right:1px solid var(--line, #e7eaee)}.dl-sign[data-v-f456050c]{flex:none;width:16px;text-align:center;color:var(--muted);user-select:none}.dl-text[data-v-f456050c]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.dl-add[data-v-f456050c]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.dl-add .dl-sign[data-v-f456050c]{color:var(--color-success)}.dl-del[data-v-f456050c]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.dl-del .dl-sign[data-v-f456050c]{color:var(--color-danger)}.dl-hunk[data-v-f456050c]{background:var(--panel2, #f3f5f8)}.dl-hunk .hunk-text[data-v-f456050c]{flex:1;padding:1px 12px;color:var(--muted, #8b929b);font-style:normal}@media(max-width:640px){.diff-lines[data-v-f456050c]{overflow-x:auto;font-size:var(--ui-font-size)}}.tl-name[data-v-c08833f8]{color:var(--emph, var(--color-text));font-weight:var(--weight-medium);flex:none;transition:color var(--duration-slow) var(--ease-out)}.tl-ficon[data-v-c08833f8]{display:inline-flex;align-items:center;align-self:center;flex:none}.tl-ficon[data-v-c08833f8] svg{display:block}.tl-file[data-v-c08833f8]{color:var(--emph, var(--color-text));line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer;transition:color var(--duration-slow) var(--ease-out)}.tl-file[data-v-c08833f8]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-c08833f8]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-c08833f8]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-c08833f8]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-add[data-v-c08833f8]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-del[data-v-c08833f8]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.diffbar[data-v-c08833f8]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-c08833f8]{background:var(--color-success)}.seg-del[data-v-c08833f8]{background:var(--color-danger)}.diff-wrap[data-v-c08833f8]{margin-top:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);overflow-x:auto}.bb-summary[data-v-26ca25c1]{color:var(--color-text);border-bottom:1px dashed var(--color-line);padding-bottom:6px;margin-bottom:6px;word-break:break-all}.chip[data-v-26ca25c1]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.file-list[data-v-6193bdd4]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-6193bdd4]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-6193bdd4]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-6193bdd4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill[data-v-98645e74]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-pill.pill-active[data-v-98645e74]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-98645e74]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-98645e74]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-budget[data-v-98645e74]{color:var(--color-text-muted)}.match-list[data-v-2e67b1f9]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-2e67b1f9]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-2e67b1f9]{cursor:pointer}.match-row.link[data-v-2e67b1f9]:hover{background:var(--color-hover)}.match-row[data-v-2e67b1f9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-2e67b1f9]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-2e67b1f9]{color:var(--color-accent)}.mtext[data-v-2e67b1f9]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-tool[data-v-25ffa7b7]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-25ffa7b7]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-25ffa7b7]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-video-button[data-v-25ffa7b7]{position:relative;display:block}.media-video-tile[data-v-25ffa7b7]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-25ffa7b7]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-image[data-v-25ffa7b7]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-audio[data-v-25ffa7b7]{max-width:100%;border-radius:var(--radius-md)}.dynamic-workflow-card[data-v-f99407e1]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.dynamic-workflow-card.err[data-v-f99407e1]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.head[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:0 11px;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.head[data-v-f99407e1]:hover,.dynamic-workflow-card.open>.head[data-v-f99407e1]{background:var(--color-surface-sunken);color:var(--color-text)}.dynamic-workflow-card.err>.head[data-v-f99407e1]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.dynamic-workflow-card.err>.head[data-v-f99407e1]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.head[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-f99407e1]{color:var(--color-text-faint);flex:none}.title[data-v-f99407e1]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-f99407e1]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-f99407e1]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-f99407e1]{margin-left:auto;display:flex;align-items:center;gap:var(--space-2);flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-f99407e1]{display:inline-flex;align-items:center;gap:5px;flex:none;padding:1px 7px;border-radius:var(--radius-full);border:1px solid var(--color-line)}.status-ok[data-v-f99407e1]{color:var(--color-success)}.status-error[data-v-f99407e1]{color:var(--color-danger)}.status-running[data-v-f99407e1]{color:var(--color-accent)}.status-txt[data-v-f99407e1]{font-size:var(--text-xs)}.chip[data-v-f99407e1]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-f99407e1]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-f99407e1]{margin-left:2px;color:var(--color-text-faint);flex:none}.body[data-v-f99407e1]{border-top:1px solid var(--color-line);background:var(--color-surface-sunken)}.overview[data-v-f99407e1]{padding:9px 11px 8px;border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.routing[data-v-f99407e1]{display:flex;flex-wrap:wrap;gap:6px 14px;margin-bottom:6px}.routing-seg[data-v-f99407e1]{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0}.routing-key[data-v-f99407e1]{font:var(--text-xs) var(--font-mono);letter-spacing:.06em;color:var(--color-text-faint)}.routing-val[data-v-f99407e1]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.routing-breakdown[data-v-f99407e1]{display:inline-flex;flex-wrap:wrap;gap:var(--space-1) var(--space-2)}.routing-bd[data-v-f99407e1]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.override-chip[data-v-f99407e1]{padding:1px 8px;border-radius:var(--radius-full);border:1px solid var(--color-warning-bd);background:var(--color-warning-soft);color:var(--color-warning);font:var(--text-xs) var(--font-ui);cursor:pointer}.override-chip[data-v-f99407e1]:hover{filter:brightness(.97)}.override-chip[data-v-f99407e1]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--color-accent-soft)}.provenance[data-v-f99407e1]{display:flex;flex-wrap:wrap;gap:2px 14px;margin-bottom:6px}.prov-line[data-v-f99407e1]{font-size:var(--text-xs);color:var(--color-text-muted)}.notice[data-v-f99407e1]{margin-bottom:6px;padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-warning-soft);border:1px solid var(--color-warning-bd);color:var(--color-warning);font-size:var(--text-xs)}.overview-line[data-v-f99407e1]{display:flex;align-items:baseline;gap:var(--space-2)}.lbl[data-v-f99407e1]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-f99407e1]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:8px 0 4px;gap:2px}.seg>span[data-v-f99407e1]{height:100%;border-radius:var(--radius-full);min-width:3px}.seg.cells>.cell[data-v-f99407e1]{flex:1}.s-ok[data-v-f99407e1]{background:var(--color-success)}.s-run[data-v-f99407e1]{background:var(--color-accent)}.s-warn[data-v-f99407e1]{background:var(--color-warning)}.s-fail[data-v-f99407e1]{background:var(--color-danger)}.s-queue[data-v-f99407e1]{background:var(--color-line)}.legend[data-v-f99407e1]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-f99407e1]{display:inline-flex;align-items:center;gap:5px;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.lg-dot[data-v-f99407e1]{width:6px;height:6px;border-radius:var(--radius-full)}.group[data-v-f99407e1]{border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.group[data-v-f99407e1]:last-child{border-bottom:none}.group-head[data-v-f99407e1]{display:flex;align-items:center;gap:6px;width:100%;min-height:26px;padding:0 11px;border:none;background:transparent;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);text-align:left;cursor:pointer;user-select:none}.group-head[data-v-f99407e1]:hover{color:var(--color-text)}.group-head[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.group-title[data-v-f99407e1]{font-weight:var(--weight-medium)}.group-failed .group-title[data-v-f99407e1]{color:var(--color-danger)}.group-suspended .group-title[data-v-f99407e1]{color:var(--color-warning)}.group-count[data-v-f99407e1]{font-family:var(--font-mono);color:var(--color-text-faint)}.group-toggle[data-v-f99407e1]{margin-left:auto;color:var(--color-text-faint)}.member[data-v-f99407e1]{position:relative;border-top:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.member-saved[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);cursor:pointer}.member-saved[data-v-f99407e1]:hover{background:var(--color-hover);color:var(--color-text-muted)}.member-saved[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-saved-car[data-v-f99407e1]{color:var(--color-text-faint)}.member-head[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:4px 11px;border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-f99407e1]:hover,.member.open .member-head[data-v-f99407e1]{background:color-mix(in srgb,var(--color-surface) 55%,var(--bg))}.member-head[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.row-dot[data-v-f99407e1]{flex:none}.row-dot.pulse[data-v-f99407e1]{animation:dw-pulse-f99407e1 1.6s ease-in-out infinite}@keyframes dw-pulse-f99407e1{0%,to{opacity:1}50%{opacity:.45}}.member-main[data-v-f99407e1]{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}.member-line[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.member-meta[data-v-f99407e1]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1) var(--space-2);min-width:0}.mname[data-v-f99407e1]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-f99407e1]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mmeta[data-v-f99407e1]{font:var(--text-xs) var(--font-mono);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mprov[data-v-f99407e1]{font-size:var(--text-xs);color:var(--color-text-faint);padding:0 6px;border-radius:var(--radius-full);border:1px solid var(--color-line)}.mprov[data-source=policy-force][data-v-f99407e1]{color:var(--color-warning);border-color:var(--color-warning-bd)}.mearlier[data-v-f99407e1]{font-size:var(--text-xs);color:var(--color-warning)}.melapsed[data-v-f99407e1],.mphase[data-v-f99407e1]{flex:none;font:var(--text-xs) var(--font-mono);color:var(--color-text-faint)}.phase-completed .mphase[data-v-f99407e1]{color:var(--color-success)}.phase-failed .mphase[data-v-f99407e1]{color:var(--color-danger)}.phase-working .mphase[data-v-f99407e1]{color:var(--color-accent)}.phase-suspended .mphase[data-v-f99407e1]{color:var(--color-warning)}.mcar[data-v-f99407e1]{margin-left:4px;color:var(--color-text-faint);flex:none}.member-body[data-v-f99407e1]{padding:4px 11px 10px 31px;color:var(--color-text-muted);font-size:var(--text-xs);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-f99407e1]{padding:6px 11px 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-f99407e1]{padding:9px 11px 10px;color:var(--color-text);font:var(--text-xs)/1.6 var(--font-mono);white-space:pre-wrap;word-break:break-word}.plan-review[data-v-9b531bda]{color:var(--color-text-muted)}.plan-md[data-v-9b531bda]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-path[data-v-9b531bda]{display:grid;gap:var(--space-1);width:100%;margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text-muted);text-align:left}.plan-path-value[data-v-9b531bda]{color:var(--color-accent);word-break:break-all}.plan-path[data-v-9b531bda] .ui-button{justify-self:start}.plan-option[data-v-9b531bda]{display:grid;gap:var(--space-1);margin-top:var(--space-2)}.plan-option[data-v-9b531bda]>:first-child{color:var(--color-text-muted)}.tl-ficon[data-v-db7c0c4a]{display:inline-flex;align-items:center;align-self:center;flex:none}.tl-ficon[data-v-db7c0c4a] svg{display:block}.tl-name[data-v-db7c0c4a]{color:var(--emph, var(--color-text));font-weight:var(--weight-medium);flex:none;transition:color var(--duration-slow) var(--ease-out)}.tl-file[data-v-db7c0c4a]{color:var(--emph, var(--color-text));line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer;transition:color var(--duration-slow) var(--ease-out)}.tl-file[data-v-db7c0c4a]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-db7c0c4a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-db7c0c4a]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-db7c0c4a]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.path-link[data-v-db7c0c4a]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-db7c0c4a]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-db7c0c4a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.read-line[data-v-db7c0c4a]{display:flex;font-size:var(--text-xs)}.read-no[data-v-db7c0c4a]{flex:none;min-width:4ch;padding-right:var(--space-2);text-align:right;color:var(--color-text-faint);font-variant-numeric:tabular-nums;user-select:none}.read-text[data-v-db7c0c4a]{min-width:0;white-space:pre-wrap;word-break:break-word}.todo-bar[data-v-7bba88f4]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-7bba88f4]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-7bba88f4]{display:grid;gap:var(--space-2)}.todo-row[data-v-7bba88f4]{display:flex;align-items:center;gap:var(--space-2)}.todo-status[data-v-7bba88f4]{display:inline-flex;color:var(--color-text-muted)}.todo-row[data-status=done][data-v-7bba88f4]{color:var(--color-text-muted);text-decoration:line-through}.todo-row[data-status=done] .todo-status[data-v-7bba88f4]{color:var(--color-success)}.todo-row[data-status=in_progress] .todo-status[data-v-7bba88f4]{color:var(--color-accent)}.wf-glance[data-v-333157a5]{margin-bottom:var(--space-1)}.wf-main[data-v-333157a5]{color:var(--color-text);font-size:var(--text-sm);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-sub[data-v-333157a5]{color:var(--color-text-muted);font-size:var(--text-xs);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-status.success[data-v-333157a5]{color:var(--color-success)}.wf-status.danger[data-v-333157a5]{color:var(--color-danger)}.wf-status.warning[data-v-333157a5]{color:var(--color-warning)}.tb[data-v-547f82f4]{overflow:visible}.on .tb-bulb[data-v-547f82f4]{transform-box:fill-box;transform-origin:50% 84%;animation:tb-swell-547f82f4 1.85s cubic-bezier(.4,0,.2,1) infinite}.on .tb-filament[data-v-547f82f4]{stroke-dasharray:12;stroke-dashoffset:12;animation:tb-draw-547f82f4 1.85s cubic-bezier(.4,0,.2,1) infinite}.on .tb-base[data-v-547f82f4]{transform-box:fill-box;transform-origin:center;animation:tb-breathe-547f82f4 1.85s cubic-bezier(.4,0,.2,1) infinite}@keyframes tb-swell-547f82f4{0%,14%,to{transform:translateY(0) scale(1);opacity:.82}38%{transform:translateY(-.7px) scale(1.055,1.09);opacity:1}58%{transform:translateY(-.2px) scale(1.015,1.025);opacity:.94}76%{transform:translateY(0) scale(1);opacity:.84}}@keyframes tb-breathe-547f82f4{0%,18%,to{transform:scaleX(.96);opacity:.78}42%{transform:scaleX(1.08);opacity:1}68%{transform:scaleX(1);opacity:.9}}@keyframes tb-draw-547f82f4{0%,12%{stroke-dashoffset:12;opacity:.18}40%{stroke-dashoffset:0;opacity:1}68%{stroke-dashoffset:0;opacity:.92}90%,to{stroke-dashoffset:-12;opacity:.16}}@media(prefers-reduced-motion:reduce){.on .tb-bulb[data-v-547f82f4],.on .tb-filament[data-v-547f82f4],.on .tb-base[data-v-547f82f4]{animation:none;opacity:.9}.on .tb-filament[data-v-547f82f4]{stroke-dashoffset:0}}.think[data-v-41ebc35f]{margin:0}.think-head[data-v-41ebc35f]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.think-head[data-v-41ebc35f]:hover{color:var(--color-text)}.think-head.is-static[data-v-41ebc35f],.think-head.is-static[data-v-41ebc35f]:hover{cursor:default;color:var(--color-text-faint)}.think-head[data-v-41ebc35f]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.think-bulb[data-v-41ebc35f]{flex:none}.think-title[data-v-41ebc35f]{font-weight:var(--weight-medium)}.think-time[data-v-41ebc35f]{color:var(--color-text-faint);font-weight:400;flex:none}.think-car[data-v-41ebc35f]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.think.open .think-car[data-v-41ebc35f]{transform:rotate(90deg)}.think-body[data-v-41ebc35f]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.think-body.instant[data-v-41ebc35f]{transition:none}.think-body.open[data-v-41ebc35f]{grid-template-rows:minmax(0,1fr)}.think-body-inner[data-v-41ebc35f]{min-height:0;overflow:hidden}.think-text[data-v-41ebc35f]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;padding:var(--space-1) 0 var(--space-2)}.mob .think-text[data-v-41ebc35f]{color:var(--color-text-faint);line-height:var(--leading-normal)}.think.streaming .think-title[data-v-41ebc35f]{animation:think-breathe-41ebc35f 1.6s var(--ease-in-out) infinite}@keyframes think-breathe-41ebc35f{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.think.streaming .think-title[data-v-41ebc35f]{animation:none}}.activity-run[data-v-9e5d8a24]{display:flex;flex-direction:column;animation:pythinker-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-9e5d8a24]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-9e5d8a24]:hover{color:var(--color-text)}.ar-head[data-v-9e5d8a24]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-9e5d8a24]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-9e5d8a24]{color:var(--color-success)}.ar-glyph.err[data-v-9e5d8a24]{color:var(--color-danger)}.ar-glyph.run[data-v-9e5d8a24]{color:var(--color-text-muted);animation:ar-breathe-9e5d8a24 1.6s var(--ease-in-out) infinite}.ar-glyph.run.bulb[data-v-9e5d8a24]{animation:none}@keyframes ar-breathe-9e5d8a24{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-9e5d8a24]{animation:none}}.ar-sum[data-v-9e5d8a24]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-car[data-v-9e5d8a24]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-9e5d8a24]{transform:rotate(90deg)}.ar-body[data-v-9e5d8a24]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-9e5d8a24]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-9e5d8a24]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.ar-sep[data-v-9e5d8a24],.ar-faint[data-v-9e5d8a24]{color:var(--color-text-faint)}.ar-danger[data-v-9e5d8a24]{color:var(--color-danger)}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: hsl(var(--ms-muted));--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid var(--code-bg);color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-a7e90764]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-a7e90764]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-a7e90764]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-a7e90764]{animation-name:text-node-stream-update-fade-a-a7e90764}.text-node-stream-delta--b[data-v-a7e90764]{animation-name:text-node-stream-update-fade-b-a7e90764}@keyframes text-node-stream-update-fade-a-a7e90764{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-a7e90764{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-a7e90764]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-72200115]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-72200115]{transition:none}.code-editor-layer[data-v-72200115]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-72200115]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-72200115]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-72200115]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-72200115]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-72200115]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-72200115]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-72200115]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-72200115]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:transparent;color:var(--vscode-editor-foreground, inherit);backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-72200115] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-72200115]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-72200115]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-72200115]{background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-72200115]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-72200115]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-72200115]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-72200115]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-72200115],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-72200115]{animation:none}@keyframes code-skeleton-shimmer-72200115{0%{background-position:100% 0}to{background-position:0 0}}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-72200115] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-72200115] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-72200115] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-72200115] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-72200115] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-72200115] .markstream-inline-fold-proxy:hover,[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-0aff75e3]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-0aff75e3]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-0aff75e3]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-0aff75e3]{background:transparent}.mermaid-mode-btn[data-v-0aff75e3]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-0aff75e3]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-0aff75e3]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-0aff75e3]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-0aff75e3]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-0aff75e3]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-0aff75e3]:active{transform:scale(.98)}.mermaid-source-panel[data-v-0aff75e3]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-0aff75e3]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-0aff75e3]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-0aff75e3]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-0aff75e3]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-0aff75e3]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-0aff75e3] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-0aff75e3] svg{width:100%;height:auto;display:block}.fullscreen[data-v-0aff75e3]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-0aff75e3],.mermaid-dialog-leave-to[data-v-0aff75e3]{opacity:0}.mermaid-dialog-enter-active[data-v-0aff75e3],.mermaid-dialog-leave-active[data-v-0aff75e3]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-to .dialog-panel[data-v-0aff75e3]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-from .dialog-panel[data-v-0aff75e3]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-active .dialog-panel[data-v-0aff75e3]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-1b44ea19]{font:400 15px/1.6 var(--font-ui);color:var(--color-text);word-break:break-word}.md[data-v-1b44ea19] .markdown-renderer{font:400 15px/1.6 var(--font-ui);color:var(--color-text)}.md[data-v-1b44ea19] .markstream-vue,.md[data-v-1b44ea19] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-surface-sunken);--inline-code-fg: var(--color-fg);--inline-code-border: transparent}.md[data-v-1b44ea19] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-1b44ea19] .md-file-link:hover{color:var(--color-accent)}.md[data-v-1b44ea19] .markdown-renderer p,.md[data-v-1b44ea19] .markdown-renderer li,.md[data-v-1b44ea19] .markdown-renderer blockquote,.md[data-v-1b44ea19] .markdown-renderer td,.md[data-v-1b44ea19] .markdown-renderer th{font-size:var(--content-font-size)}.md[data-v-1b44ea19] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-1b44ea19] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-1b44ea19] h1,.md[data-v-1b44ea19] h2,.md[data-v-1b44ea19] h3,.md[data-v-1b44ea19] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em;line-height:var(--leading-tight)}.md[data-v-1b44ea19] h1{font-size:max(var(--text-xl),calc(var(--content-font-size) + 3px));border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-1b44ea19] h2{font-size:max(var(--text-lg),calc(var(--content-font-size) + 2px))}.md[data-v-1b44ea19] h3{font-size:max(var(--text-lg),calc(var(--content-font-size) + 1px))}.md[data-v-1b44ea19] h4{font-size:max(var(--text-base),calc(var(--content-font-size) + 1px));color:var(--color-text-muted)}.md[data-v-1b44ea19] p{margin:.8rem 0}.md[data-v-1b44ea19] .node-slot+.node-slot{margin-top:.8rem}.md[data-v-1b44ea19] ul,.md[data-v-1b44ea19] ol{padding-left:1.4em;margin:.6em 0}.md[data-v-1b44ea19] li{margin:.3em 0}.md[data-v-1b44ea19] :not(pre)>code,.md[data-v-1b44ea19] .inline-code{font:.9em var(--font-mono);background:var(--color-surface-sunken);color:var(--color-fg);padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-1b44ea19] strong code,.md[data-v-1b44ea19] strong .inline-code,.md[data-v-1b44ea19] b code,.md[data-v-1b44ea19] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-1b44ea19] .code-block-container{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-1b44ea19] .code-block-header{background:var(--color-surface);border-bottom:1px solid var(--color-line);padding:4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-1b44ea19] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-1b44ea19] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-1b44ea19] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-1b44ea19] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-1b44ea19] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-1b44ea19] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-1b44ea19] .code-block-header .code-header-title{font-size:var(--text-sm);font-weight:var(--weight-medium)}.md[data-v-1b44ea19] .code-block-header .code-action-btn:hover *{color:var(--color-text)}.md[data-v-1b44ea19] .code-block-container.md-code-wrap pre{white-space:pre-wrap!important;overflow-wrap:anywhere}.md[data-v-1b44ea19] .code-block-header .md-code-nums-toggle[aria-pressed=true],.md[data-v-1b44ea19] .code-block-header .md-code-wrap-toggle[aria-pressed=true]{background:var(--color-selected);color:var(--color-text)}.md[data-v-1b44ea19] .code-block-header .md-code-nums-toggle[aria-pressed=true] *,.md[data-v-1b44ea19] .code-block-header .md-code-wrap-toggle[aria-pressed=true] *{background:transparent;color:var(--color-text)}.md[data-v-1b44ea19] .code-block-header .md-code-nums-toggle[aria-pressed=true]:hover,.md[data-v-1b44ea19] .code-block-header .md-code-wrap-toggle[aria-pressed=true]:hover{background:var(--color-selected-hover)}.md[data-v-1b44ea19] .code-block-shell-content,.md[data-v-1b44ea19] .markstream-pre{background:var(--color-surface-sunken)}.md[data-v-1b44ea19] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-1b44ea19] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-1b44ea19] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-1b44ea19] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-1b44ea19] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-1b44ea19] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-1b44ea19] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-1b44ea19] .markstream-pre,.md[data-v-1b44ea19] .code-pre-fallback,.md[data-v-1b44ea19] .code-block-shell-content pre:not(.shiki),.md[data-v-1b44ea19] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-1b44ea19] a{color:var(--color-accent);text-decoration:none}.md[data-v-1b44ea19] a:hover{text-decoration:underline}.md[data-v-1b44ea19] a.mention-pill{color:var(--color-text-muted);text-decoration:none}.md[data-v-1b44ea19] a.mention-folder:hover{text-decoration:none}.md[data-v-1b44ea19] .math-inline{vertical-align:baseline}.md-frontmatter[data-v-1b44ea19]{margin:0 0 var(--space-2);padding:var(--space-3) var(--space-4);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow-x:auto;color:var(--color-text-muted);font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-1b44ea19] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-1b44ea19] blockquote{margin:.5em 0;padding:4px 12px;border-left:1px solid var(--color-line);color:var(--color-text-muted)}.md[data-v-1b44ea19] hr{border:none;border-top:1px solid var(--color-line);margin:.8em 0}.md[data-v-1b44ea19] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-1b44ea19] table:not(.table-node) th,.md[data-v-1b44ea19] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-1b44ea19] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-1b44ea19] .table-node-wrapper{--table-cell-cap: var(--p-table-cell-max);--md-table-fade-bg: linear-gradient( to right, transparent, color-mix(in srgb, var(--color-bg) 65%, transparent) 55%, var(--color-bg) );width:100%;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative}.md[data-v-1b44ea19] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-1b44ea19] .table-node th,.md[data-v-1b44ea19] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-1b44ea19] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-1b44ea19] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;background:var(--md-table-fade-bg);pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-1b44ea19] .md-table-fade.md-table-toggle--show{display:block}.md[data-v-1b44ea19] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-1b44ea19] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-1b44ea19] .md-table-toggle.md-table-toggle--show{display:inline-flex}.md[data-v-1b44ea19] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-1b44ea19] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-1b44ea19] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-1b44ea19] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-1b44ea19] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-1b44ea19] .md-table-toggle svg{display:block}.md[data-v-1b44ea19] .table-node tbody tr:hover{background-color:transparent!important}.diff-wrap[data-v-1b44ea19]{--diff-sign-col: 14px;--diff-pad-x: 14px;margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-1b44ea19]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-1b44ea19]{margin-right:auto}.diff-copy[data-v-1b44ea19]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-1b44ea19]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-1b44ea19]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-1b44ea19]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-1b44ea19]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-1b44ea19]{display:block;width:100%;padding:0 var(--diff-pad-x)}.diff-sign[data-v-1b44ea19]{display:inline-block;width:var(--diff-sign-col);text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-1b44ea19]{color:var(--color-text)}.diff-add[data-v-1b44ea19]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-1b44ea19]{color:var(--color-success)}.diff-del[data-v-1b44ea19]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-1b44ea19]{color:var(--color-danger)}.diff-hunk[data-v-1b44ea19]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-1b44ea19]{color:var(--color-text-muted)}.diff-bar[data-v-1b44ea19] .ui-icon-button[aria-pressed=true]{background:var(--color-selected);color:var(--color-text)}.diff-bar[data-v-1b44ea19] .ui-icon-button[aria-pressed=true]:hover{background:var(--color-selected-hover)}.diff-bar[data-v-1b44ea19] .ui-icon-button svg{width:var(--p-ic-sm);height:var(--p-ic-sm)}.diff-wrap.md-code-wrap .diff-pre[data-v-1b44ea19]{white-space:pre-wrap;overflow-wrap:anywhere}.diff-wrap.md-code-wrap .diff-pre code[data-v-1b44ea19]{width:auto}.diff-wrap.md-code-wrap:not(.md-code-nums) .diff-line[data-v-1b44ea19]{padding-left:calc(var(--diff-pad-x) + var(--diff-sign-col))}.diff-wrap.md-code-wrap:not(.md-code-nums) .diff-sign[data-v-1b44ea19]{margin-left:calc(-1 * var(--diff-sign-col))}.diff-wrap.md-code-nums .diff-pre[data-v-1b44ea19]{counter-reset:md-diff-line;position:relative;isolation:isolate}.diff-wrap.md-code-nums .diff-pre[data-v-1b44ea19]:after{content:"";position:absolute;left:0;top:0;bottom:0;width:calc(var(--diff-pad-x) + var(--md-nums-gutter, 4ch));background:var(--color-selected);border-right:var(--p-hairline) solid var(--color-line);pointer-events:none;user-select:none;z-index:1}.diff-wrap.md-code-nums .diff-line[data-v-1b44ea19]{padding-left:calc(var(--diff-pad-x) + var(--md-nums-gutter, 4ch) + var(--diff-sign-col))}.diff-wrap.md-code-nums .diff-line[data-v-1b44ea19]:not(.diff-hunk){counter-increment:md-diff-line}.diff-wrap.md-code-nums .diff-line[data-v-1b44ea19]:not(.diff-hunk):before{content:counter(md-diff-line);display:inline-block;position:relative;z-index:2;width:calc(var(--md-nums-gutter, 4ch) - 1ch);overflow:visible;margin-left:calc(-1 * (var(--md-nums-gutter, 4ch) + var(--diff-sign-col)));margin-right:1ch;text-align:right;color:var(--color-text-faint);user-select:none}.md .diff-wrap[data-v-1b44ea19] ::selection{background:var(--color-code-selection);color:var(--color-code-selection-text)}.md[data-v-1b44ea19],.md .markdown-renderer[data-v-1b44ea19]{font-family:var(--sans)}.md .code-block-container[data-v-1b44ea19],.md .diff-wrap[data-v-1b44ea19]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-1b44ea19],.md .inline-code[data-v-1b44ea19]{border-radius:var(--radius-sm)}.activity-notice[data-v-5e7a6420]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.msg-time[data-v-6761370d]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;white-space:nowrap}.msg-time[data-v-6761370d]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.cn[data-v-d3807b0f]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-bubble[data-v-d3807b0f]{box-sizing:border-box;max-width:100%;padding:8px 14px;background:var(--color-accent-soft);border:1px solid var(--color-accent-bd);border-radius:var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-xl);box-shadow:var(--shadow-xs);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-title[data-v-d3807b0f]{font-weight:var(--weight-medium)}.cn-meta[data-v-d3807b0f]{display:flex;align-items:center;gap:6px;margin-top:4px;padding:0 4px;color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}.cn-meta-ico[data-v-d3807b0f]{flex:none;color:var(--color-text-faint)}.cn-meta-item[data-v-d3807b0f]{white-space:nowrap}.cn-status[data-v-d3807b0f]{display:inline-flex;align-items:center}.cn-status.ok[data-v-d3807b0f]{color:var(--color-success)}.cn-status.error[data-v-d3807b0f]{color:var(--color-danger)}.ntf-list[data-v-6e055dc6]{display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-3);margin:var(--space-2) 0}.ntn[data-v-6e055dc6]{margin-left:auto;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.ntn-head[data-v-6e055dc6]{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal);overflow-wrap:anywhere}.ntn-ico[data-v-6e055dc6]{flex:none}.ntn.ok .ntn-ico[data-v-6e055dc6]{color:var(--color-success)}.ntn.err .ntn-ico[data-v-6e055dc6]{color:var(--color-danger)}.ntn.warn .ntn-ico[data-v-6e055dc6]{color:var(--color-warning)}.ntn-bubble[data-v-6e055dc6]{box-sizing:border-box;max-width:100%;padding:var(--space-2) var(--space-3);background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.ntn-line+.ntn-line[data-v-6e055dc6]{margin-top:var(--space-1)}.ntn-out[data-v-6e055dc6]{display:flex;align-items:center;gap:var(--space-2);background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-1) var(--space-2);box-shadow:var(--shadow-xs);white-space:normal}.ntn-out-ic[data-v-6e055dc6]{color:var(--color-text-faint);flex:none}.ntn-out-path[data-v-6e055dc6]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.ntn-out-size[data-v-6e055dc6]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.ntn-preview-cap[data-v-6e055dc6]{font-size:var(--text-xs);color:var(--color-text-faint);margin-bottom:var(--space-05)}.ntn-preview-text[data-v-6e055dc6]{margin:0;font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:8;overflow:hidden}.ntn-meta[data-v-6e055dc6]{margin-top:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}.ntn-raw[data-v-6e055dc6]{max-width:100%}.ntn-raw summary[data-v-6e055dc6]{list-style:none;display:flex;align-items:center;gap:var(--space-1);cursor:pointer;font-size:var(--text-xs);color:var(--color-text-faint);user-select:none}.ntn-raw summary[data-v-6e055dc6]::-webkit-details-marker{display:none}.ntn-raw summary[data-v-6e055dc6]:hover{color:var(--color-text)}.ntn-raw-car[data-v-6e055dc6]{transition:transform var(--duration-base) var(--ease-out)}.ntn-raw[open] .ntn-raw-car[data-v-6e055dc6]{transform:rotate(90deg)}.ntn-raw-in[data-v-6e055dc6]{margin-top:var(--space-1);display:flex;flex-direction:column;gap:var(--space-2)}.ntn-raw-fields[data-v-6e055dc6]{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--space-1) var(--space-3)}.ntn-raw-fields .k[data-v-6e055dc6]{color:var(--color-text-faint);font-size:var(--text-xs)}.ntn-raw-fields .v[data-v-6e055dc6]{color:var(--color-text-muted);font-size:var(--text-xs);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ntn-raw-pre[data-v-6e055dc6]{margin:0;padding:var(--space-2) var(--space-3);background:var(--color-surface-raised);border-radius:var(--radius-sm);box-shadow:var(--shadow-xs);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);white-space:pre;overflow:auto;max-width:100%;max-height:13lh}@media(max-width:640px){.ntn[data-v-6e055dc6]{max-width:92%}}.att-chip[data-v-e59edff1]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px 5px;background:var(--color-bg);border:1px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-e59edff1]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-e59edff1]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-e59edff1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-e59edff1]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-e59edff1] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-e59edff1]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-e59edff1]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-e59edff1]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-e59edff1]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-e59edff1]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-e59edff1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-tip[data-v-e59edff1]{position:fixed;z-index:var(--z-toast);display:flex;flex-direction:column;gap:var(--space-2);width:min(300px,calc(100vw - 16px));padding:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-lg)}.att-tip[data-v-e59edff1]:before,.att-tip[data-v-e59edff1]:after{content:"";position:absolute;right:0;left:0;height:var(--space-2)}.att-tip[data-v-e59edff1]:before{bottom:100%}.att-tip[data-v-e59edff1]:after{top:100%}.att-tip-caret[data-v-e59edff1]{position:absolute;left:var(--tip-caret-x, 50%);width:12px;height:6px;background:var(--color-line-strong);transform:translate(-50%)}.att-tip[data-side=top] .att-tip-caret[data-v-e59edff1]{top:100%;clip-path:polygon(0 0,100% 0,50% 100%)}.att-tip[data-side=bottom] .att-tip-caret[data-v-e59edff1]{bottom:100%;clip-path:polygon(50% 0,0 100%,100% 100%)}.att-tip-preview[data-v-e59edff1]{display:grid;min-height:116px;place-items:center;overflow:hidden;border-radius:var(--radius-md);background-color:var(--color-surface-sunken);background-image:linear-gradient(45deg,var(--color-line) 25%,transparent 25%),linear-gradient(-45deg,var(--color-line) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--color-line) 75%),linear-gradient(-45deg,transparent 75%,var(--color-line) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px}.att-tip-preview[data-v-e59edff1] .att-tip-media{display:block;max-width:100%;max-height:220px;object-fit:contain}.att-tip-placeholder[data-v-e59edff1]{display:grid;gap:var(--space-2);place-items:center;color:var(--color-text-muted);font-size:var(--text-sm)}.att-tip-meta[data-v-e59edff1]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-sm)}.att-tip-meta strong[data-v-e59edff1]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att-tip-meta>span[data-v-e59edff1]{color:var(--color-text-muted);white-space:nowrap}.att-tip-error[data-v-e59edff1]{padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-danger-soft);color:var(--color-danger);font-size:var(--text-xs)}.att-tip-foot[data-v-e59edff1]{display:flex;align-items:center;gap:var(--space-2)}.att-tip-state[data-v-e59edff1]{display:inline-flex;flex:1;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.att-tip-state.danger[data-v-e59edff1]{color:var(--color-danger)}.att-tip-open[data-v-e59edff1]{display:inline-flex;align-items:center;gap:var(--space-1);min-height:30px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:var(--color-hover);color:var(--color-text);font:var(--text-xs) var(--font-ui);cursor:pointer}.att-tip-open[data-v-e59edff1]:hover{background:var(--color-selected)}.att-tip-open[data-v-e59edff1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.turn-fold[data-v-331ba726]{display:flex;flex-direction:column}.tf-head[data-v-331ba726]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-331ba726]:hover{color:var(--color-text)}.tf-head[data-v-331ba726]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-331ba726]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-331ba726]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-331ba726]{transform:rotate(90deg)}.tf-body[data-v-331ba726]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-331ba726]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-331ba726]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-331ba726],.tf-body-inner[data-v-331ba726]>.think,.tf-body-inner[data-v-331ba726]>.tool-group,.tf-body-inner[data-v-331ba726]>.agent-card,.tf-body-inner[data-v-331ba726]>.agent-group,.tf-body-inner[data-v-331ba726]>.box,.tf-body-inner[data-v-331ba726]>.dynamic-workflow-card,.tf-body-inner[data-v-331ba726]>.activity-run,.tf-body-inner[data-v-331ba726]>.media-tool{margin-top:var(--chat-block-gap)}.tf-body-inner .msg[data-v-331ba726]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-331ba726] p{margin:0}.tf-body-inner .msg[data-v-331ba726] p+p{margin-top:var(--space-2)}.ui-card[data-v-d2cab471]{background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-d2cab471]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-d2cab471]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:1px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-d2cab471]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-d2cab471]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:1px solid var(--color-line);background:var(--color-surface)}.turn-files[data-v-11486090]{margin-top:var(--chat-block-gap)}.turn-files[data-v-11486090] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-11486090] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-11486090] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-11486090]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-11486090]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-11486090]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-11486090],.tf-del[data-v-11486090]{font:var(--text-xs) var(--font-mono);flex:none}.tf-add[data-v-11486090]{color:var(--color-success)}.tf-del[data-v-11486090]{color:var(--color-danger)}.tf-list[data-v-11486090]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-11486090]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-11486090]{display:flex;align-items:center;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left;cursor:pointer}.tf-file[data-v-11486090]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-ficon[data-v-11486090]{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);line-height:0;margin-right:2px}.tf-ficon[data-v-11486090] svg{display:block}.tf-file[data-v-11486090]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}span.tf-file[data-v-11486090]{cursor:default}span.tf-file[data-v-11486090]:hover{text-decoration:none}.tf-dir[data-v-11486090]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-11486090]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-11486090]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-11486090]:not(:disabled):active{transform:none}.tf-more-car[data-v-11486090]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-11486090]{transform:rotate(180deg)}.diffbar[data-v-11486090]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-11486090]{background:var(--color-success)}.seg-del[data-v-11486090]{background:var(--color-danger)}.mascot-apng[data-v-c03cab60]{display:inline-block;flex:none;image-rendering:pixelated}.working-indicator[data-v-934cc635]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.wi-mascot[data-v-934cc635]{flex:none;width:40px}.chat-empty[data-v-9f61c8f4]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-9f61c8f4]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-9f61c8f4]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-9f61c8f4]{font-size:var(--ui-font-size-sm)}.chat[data-v-9f61c8f4]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-9f61c8f4]{align-self:stretch}.open-unsupported[data-v-9f61c8f4]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:1px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:2}.chat>.u-turn[data-v-9f61c8f4],.chat>.a-msg[data-v-9f61c8f4],.chat>.compact-divider[data-v-9f61c8f4],.chat>.cron-notice[data-v-9f61c8f4],.chat>.sending-placeholder[data-v-9f61c8f4],.chat[data-v-9f61c8f4]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-9f61c8f4]{margin-top:10px}.chat>.u-turn[data-v-9f61c8f4]:first-child,.chat>.a-msg[data-v-9f61c8f4]:first-child,.chat>.compact-divider[data-v-9f61c8f4]:first-child,.chat>.cron-notice[data-v-9f61c8f4]:first-child,.chat>.sending-placeholder[data-v-9f61c8f4]:first-child,.chat[data-v-9f61c8f4]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-9f61c8f4]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-9f61c8f4]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-9f61c8f4]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:2px;margin-right:4px}.u-meta .u-edit[data-v-9f61c8f4]{min-height:22px;box-sizing:border-box}.u-text[data-v-9f61c8f4]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-9f61c8f4]{position:relative;display:flex;flex-direction:column}.u-text-wrap.is-clamped[data-v-9f61c8f4]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-9f61c8f4]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-9f61c8f4]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font:var(--ui-font-size-sm)/1 var(--font-ui);cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-9f61c8f4]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-9f61c8f4]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-9f61c8f4]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-9f61c8f4]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-9f61c8f4]{transform:rotate(180deg)}.u-edit[data-v-9f61c8f4]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-9f61c8f4]{display:block;flex:none}.u-edit[data-v-9f61c8f4]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-copy[data-v-9f61c8f4]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-9f61c8f4]{display:block;flex:none}.u-copy[data-v-9f61c8f4]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-9f61c8f4]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-9f61c8f4]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-9f61c8f4]{margin-top:8px}.compact-divider[data-v-9f61c8f4]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-9f61c8f4]:first-child{margin-top:0}.cd-line[data-v-9f61c8f4]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-9f61c8f4]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-9f61c8f4]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-9f61c8f4]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-9f61c8f4]{text-decoration:underline}.a-msg[data-v-9f61c8f4]{align-self:flex-start;max-width:94%;width:94%}.turn-failed[data-v-9f61c8f4]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--chat-turn-gap);padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-9f61c8f4]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger);flex:none}.tf-main[data-v-9f61c8f4]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-9f61c8f4]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-9f61c8f4]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.a-msg-ft[data-v-9f61c8f4]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-duration[data-v-9f61c8f4]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-9f61c8f4]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-9f61c8f4]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-9f61c8f4]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-9f61c8f4]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-9f61c8f4]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-9f61c8f4]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:500}.a-msg .msg[data-v-9f61c8f4] p{margin:0}.a-msg .msg[data-v-9f61c8f4] p+p{margin-top:8px}.a-msg>.msg[data-v-9f61c8f4],.a-msg[data-v-9f61c8f4]>.think,.a-msg[data-v-9f61c8f4]>.tool-group,.a-msg[data-v-9f61c8f4]>.agent-card,.a-msg[data-v-9f61c8f4]>.agent-group,.a-msg[data-v-9f61c8f4]>.box,.a-msg[data-v-9f61c8f4]>.dynamic-workflow-card,.a-msg[data-v-9f61c8f4]>.media-tool{margin-top:var(--chat-block-gap)}.a-msg[data-v-9f61c8f4]>.turn-fold{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-9f61c8f4]:first-child,.a-msg[data-v-9f61c8f4]>.think:first-child,.a-msg[data-v-9f61c8f4]>.tool-group:first-child,.a-msg[data-v-9f61c8f4]>.agent-card:first-child,.a-msg[data-v-9f61c8f4]>.agent-group:first-child,.a-msg[data-v-9f61c8f4]>.box:first-child,.a-msg[data-v-9f61c8f4]>.dynamic-workflow-card:first-child,.a-msg[data-v-9f61c8f4]>.media-tool:first-child{margin-top:0}.a-msg[data-v-9f61c8f4]>.turn-fold:first-child{margin-top:0}.a-msg[data-v-9f61c8f4] code{font:.9em var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-9f61c8f4] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-9f61c8f4] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}.a-msg .msg[data-v-9f61c8f4] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}}.u-atts[data-v-9f61c8f4]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-9f61c8f4]{align-self:flex-start;padding:10px 0}.skill-act[data-v-9f61c8f4]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-9f61c8f4]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-9f61c8f4]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-9f61c8f4]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap-args[data-v-9f61c8f4]{margin-top:var(--space-1)}@media(max-width:640px){.chat[data-v-9f61c8f4]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-9f61c8f4]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-9f61c8f4]{width:100%;max-width:100%}.u-bub .u-text[data-v-9f61c8f4],.a-msg .msg[data-v-9f61c8f4]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-9f61c8f4] .md,.a-msg[data-v-9f61c8f4] .markdown-renderer,.a-msg[data-v-9f61c8f4] .code-block-container,.a-msg[data-v-9f61c8f4] .diff-wrap,.a-msg[data-v-9f61c8f4] pre{max-width:100%}.a-msg[data-v-9f61c8f4] .code-block-container pre,.a-msg[data-v-9f61c8f4] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-9f61c8f4] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-9f61c8f4]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-9f61c8f4]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-9f61c8f4]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-9f61c8f4],.chat-loading-text[data-v-9f61c8f4]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-9f61c8f4],.cd-btn[data-v-9f61c8f4]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-9f61c8f4]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px}.top-sentinel-loading[data-v-9f61c8f4]{opacity:.8}.top-sentinel-btn[data-v-9f61c8f4]{appearance:none;border:1px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-9f61c8f4]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-9f61c8f4]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-9f61c8f4]{background:transparent}.chat[data-v-9f61c8f4]{gap:0;padding:22px 20px 26px}.a-msg[data-v-9f61c8f4]{max-width:100%;width:100%}.chat>.q-stack[data-v-9f61c8f4]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-9f61c8f4]:first-child{margin-top:0}.q-stack[data-v-9f61c8f4]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-9f61c8f4]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-9f61c8f4]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-9f61c8f4]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-turn[data-v-9f61c8f4]{position:relative;flex-direction:row;align-items:center;justify-content:flex-end;gap:var(--space-2)}.q-bub[data-v-9f61c8f4]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-user-bubble-bg);padding:8px 8px 8px 6px;transition:background var(--duration-fast) var(--ease-out)}.q-bub[data-v-9f61c8f4]:hover{background:var(--color-hover)}.q-send[data-v-9f61c8f4]{flex:none;width:var(--space-6);height:var(--space-6);display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-accent);color:var(--color-text-on-accent);box-shadow:var(--shadow-xs);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.q-send[data-v-9f61c8f4]:hover{background:var(--color-accent-hover)}.q-send[data-v-9f61c8f4]:active{transform:scale(.92)}.q-send[data-v-9f61c8f4]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.q-send[data-v-9f61c8f4] svg{display:block;flex:none}.q-grip[data-v-9f61c8f4]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-9f61c8f4]:hover{opacity:1}.q-grip[data-v-9f61c8f4]:active{cursor:grabbing}.q-body[data-v-9f61c8f4]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-9f61c8f4]{opacity:1}.q-body[data-v-9f61c8f4]:disabled{cursor:default}.q-text[data-v-9f61c8f4]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-9f61c8f4]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-9f61c8f4]{display:flex;gap:4px;flex:none}.q-img[data-v-9f61c8f4]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:1px solid var(--color-line)}.q-file[data-v-9f61c8f4]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:1px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-rm[data-v-9f61c8f4]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-9f61c8f4],.q-bub:focus-within .q-rm[data-v-9f61c8f4],.q-rm[data-v-9f61c8f4]:focus-visible{opacity:1}.q-rm[data-v-9f61c8f4]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-9f61c8f4]{opacity:.45}.q-turn.drop-before[data-v-9f61c8f4]:before,.q-turn.drop-after[data-v-9f61c8f4]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-9f61c8f4]:before{top:-5px}.q-turn.drop-after[data-v-9f61c8f4]:after{bottom:-5px}.chat-header[data-v-25d0d989]{flex:none;display:flex;align-items:center;gap:14px;height:48px;padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0}.chat-header.macos-desktop[data-v-25d0d989]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-25d0d989],.chat-header.macos-desktop input[data-v-25d0d989]{-webkit-app-region:no-drag}.ch-id[data-v-25d0d989]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-25d0d989]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-25d0d989]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-25d0d989]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-25d0d989]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.ch-git[data-v-25d0d989]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-25d0d989]{color:var(--color-text)}.ch-branch[data-v-25d0d989]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-25d0d989]{color:var(--muted);font-style:italic}.ch-pill[data-v-25d0d989]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:1px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-25d0d989]{border-color:var(--line)}.ch-diff-pill[data-v-25d0d989]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line))}.ch-ahead[data-v-25d0d989]{color:var(--color-warning);flex:none}.ch-behind[data-v-25d0d989]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-25d0d989]{color:var(--color-success);flex:none}.ch-del[data-v-25d0d989]{color:var(--color-danger);flex:none}.ch-spacer[data-v-25d0d989]{flex:1;min-width:0}.ch-act-more.open[data-v-25d0d989]{background:var(--color-surface-sunken);color:var(--color-text)}.ch-pr[data-v-25d0d989]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-25d0d989]{flex:none}.ch-pr.pr-open[data-v-25d0d989]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-25d0d989]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-25d0d989]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-25d0d989],.ch-pr.pr-unknown[data-v-25d0d989]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ch-pr[data-v-25d0d989]:hover{border-color:var(--color-line-strong)}.ch-done-pill[data-v-25d0d989]{cursor:default}.ch-done-pill[data-v-25d0d989]:hover{border-color:var(--color-done-bd)}.ch-menu[data-v-25d0d989]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}@media(max-width:980px){.ch-act-label[data-v-25d0d989]{display:none}}@media(max-width:640px){.chat-header[data-v-25d0d989]{display:none}}.slash-menu[data-menu-frame][data-v-9f177a8d]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-menu.is-sheet[data-menu-frame][data-v-9f177a8d]{position:static;padding:0;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;border-radius:0;box-shadow:none;z-index:auto}.slash-scroll[data-v-9f177a8d]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-9f177a8d]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-9f177a8d]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-9f177a8d]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-9f177a8d]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-9f177a8d]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row)}.slash-item+.slash-item[data-v-9f177a8d]{margin-top:var(--menu-rows-seam)}.slash-item[data-v-9f177a8d]:hover{background:var(--color-hover)}.slash-item.active[data-v-9f177a8d]{background:var(--color-selected)}.slash-name[data-v-9f177a8d]{flex:none;max-width:60%;color:var(--color-text);font-weight:var(--weight-medium);min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-9f177a8d]{font-weight:var(--weight-semibold)}.slash-desc[data-v-9f177a8d]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-9f177a8d]{font-weight:var(--weight-semibold)}.slash-empty[data-v-9f177a8d]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-9f177a8d]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}@media(max-width:520px){.slash-item[data-v-9f177a8d]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-9f177a8d]{max-width:none}}.mention-menu[data-menu-frame][data-v-0ac2fbc1]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-menu.is-sheet[data-menu-frame][data-v-0ac2fbc1]{position:static;padding:0;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;border-radius:0;box-shadow:none;z-index:auto}.mention-scroll[data-v-0ac2fbc1]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-0ac2fbc1]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-0ac2fbc1]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-0ac2fbc1]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-0ac2fbc1]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-0ac2fbc1]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.dim[data-v-0ac2fbc1]{color:var(--color-text-muted)}.mention-spin[data-v-0ac2fbc1]{position:absolute;top:var(--space-2);right:var(--space-3);color:var(--color-text-muted);z-index:var(--z-raised)}.mention-item[data-v-0ac2fbc1]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);border-radius:var(--radius-menu-row);transition:opacity var(--duration-slow) var(--ease-out)}.mention-item+.mention-item[data-v-0ac2fbc1]{margin-top:var(--menu-rows-seam)}.mention-item[data-v-0ac2fbc1]:hover{background:var(--color-hover)}.mention-item.active[data-v-0ac2fbc1]{background:var(--color-selected)}.mention-item:hover .mention-icon[data-v-0ac2fbc1],.mention-item.active .mention-icon[data-v-0ac2fbc1],.mention-item:hover .mention-name[data-v-0ac2fbc1],.mention-item.active .mention-name[data-v-0ac2fbc1]{color:var(--color-text-strong)}.mention-item.stale[data-v-0ac2fbc1]{opacity:var(--opacity-stale)}@media(hover:none){.mention-item[data-v-0ac2fbc1]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-icon[data-v-0ac2fbc1]{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-faint);flex-shrink:0}.mention-icon[data-v-0ac2fbc1] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-name[data-v-0ac2fbc1]{color:var(--color-text);font-weight:var(--weight-medium);flex-shrink:0}.mention-name .mention-hit[data-v-0ac2fbc1]{color:var(--color-text-strong);font-weight:var(--weight-semibold)}.mention-meta[data-v-0ac2fbc1]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mention-meta .mention-hit[data-v-0ac2fbc1]{color:var(--color-text)}.ctx-ring[data-v-97f3cf66]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-97f3cf66]{stroke:var(--line)}.ctx-ring-fill[data-v-97f3cf66]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-seg[data-v-bffb3dae]{display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__item[data-v-bffb3dae]{border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg--md .ui-seg__item[data-v-bffb3dae]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-bffb3dae]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-bffb3dae]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-bffb3dae]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-bffb3dae]{background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-xs)}.ui-seg__item[data-v-bffb3dae]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.activity-spin[data-v-c12d8332]{--spinner-frame: 1.15em;display:inline-block;position:relative;width:var(--spinner-frame);height:var(--spinner-frame);font-size:var(--ui-font-size);line-height:1;user-select:none;vertical-align:-.1em}.activity-frame[data-v-c12d8332]{position:absolute;inset:0;display:block;text-align:center;opacity:0;animation-name:activity-frame-c12d8332;animation-duration:.64s;animation-timing-function:steps(1,end);animation-iteration-count:infinite;animation-delay:var(--spinner-frame-delay)}.activity-spin--fast .activity-frame[data-v-c12d8332]{animation-duration:.32s;animation-delay:var(--spinner-frame-fast-delay)}@keyframes activity-frame-c12d8332{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.activity-frame[data-v-c12d8332]{animation:none}.activity-frame[data-v-c12d8332]:first-child{opacity:1}}.menu-row[data-v-261bf74a]{width:100%;height:calc(var(--ui-font-size) + 13px);display:flex;align-items:center;gap:8px;box-sizing:border-box;padding:0 8px;border:0;border-radius:var(--r-md);background:none;color:var(--ink);font-family:inherit;font-size:calc(var(--ui-font-size) - 1px);font-weight:400;line-height:1;text-align:left;cursor:pointer}.menu-row[data-v-261bf74a]:hover{background:var(--hover)}.menu-row.active[data-v-261bf74a],.menu-row.selected[data-v-261bf74a]{background:color-mix(in srgb,var(--soft) 45%,var(--panel))}.menu-row[data-v-261bf74a]:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.menu-row.disabled[data-v-261bf74a],.menu-row[data-v-261bf74a]:disabled{opacity:.5;pointer-events:none}.leading[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 14px;width:14px;height:14px}.leading[data-v-261bf74a] svg{display:block;width:14px;height:14px}.label[data-v-261bf74a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.count[data-v-261bf74a]{flex:none;color:var(--muted)}.trailing[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:none;margin-left:auto}.switch-toggle[data-v-169237c7]{position:relative;width:28px;height:16px;padding:0;border:0;border-radius:999px;background:none;cursor:pointer}.track[data-v-169237c7],.thumb[data-v-169237c7]{position:absolute;display:block}.track[data-v-169237c7]{inset:0;border-radius:999px;background:var(--line);transition:background-color .15s ease}.switch-toggle[aria-checked=true] .track[data-v-169237c7]{background:var(--blue)}.thumb[data-v-169237c7]{top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--panel);transition:transform .15s ease}.switch-toggle[aria-checked=true] .thumb[data-v-169237c7]{transform:translate(12px)}.switch-toggle[data-v-169237c7]:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.switch-toggle[data-v-169237c7]:disabled{opacity:.5;cursor:not-allowed}.capability-control[data-v-ff3a96c4]{display:flex;align-items:center;flex:none;min-width:0}.capability-trigger[data-v-ff3a96c4]{display:inline-flex;align-items:center;gap:5px;flex:none;min-width:30px;height:30px;padding:2px 7px;border:0;border-radius:var(--r-sm);background:none;color:var(--muted);font:inherit;font-size:var(--ui-font-size);line-height:1;cursor:pointer;white-space:nowrap}.capability-trigger[data-v-ff3a96c4]:hover,.capability-trigger.open[data-v-ff3a96c4]{background:var(--soft);color:var(--ink)}.capability-trigger svg[data-v-ff3a96c4]{width:16px;height:16px;flex:none}.capability-panel[data-v-ff3a96c4]{width:280px;max-height:288px;overflow:hidden}.capability-viewport[data-v-ff3a96c4]{max-height:288px;overflow:hidden}.capability-track[data-v-ff3a96c4]{display:flex;align-items:flex-start;width:200%;transform:translate(0);transition:transform .15s ease}.capability-track.is-drilled[data-v-ff3a96c4]{transform:translate(-50%)}.capability-view[data-v-ff3a96c4]{flex:0 0 50%;min-width:0;max-height:288px;overflow-y:auto}.capability-group-title[data-v-ff3a96c4]{padding:6px 8px 2px;color:var(--ink);font-size:var(--ui-font-size-xs);font-weight:600}.capability-caption[data-v-ff3a96c4]{margin:0;padding:2px 8px 6px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.35}.capability-loading[data-v-ff3a96c4]{display:flex;align-items:center;min-height:27px;padding:0 8px 6px;color:var(--muted)}.capability-loading[data-v-ff3a96c4] .activity-spin{font-size:var(--ui-font-size-sm)}.chevron[data-v-ff3a96c4],.back-chevron[data-v-ff3a96c4]{display:block;width:14px;height:14px;color:var(--muted)}.capability-back[data-v-ff3a96c4]{margin-bottom:2px}@media(max-width:640px){.capability-trigger-label[data-v-ff3a96c4]{display:none}.capability-trigger[data-v-ff3a96c4]{padding:2px 6px}}.sheet-root[data-v-92ecd88c]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-92ecd88c]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-92ecd88c]{position:relative;background:var(--color-surface-raised);border:1px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-92ecd88c]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-92ecd88c]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-92ecd88c]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-92ecd88c]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-92ecd88c]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-92ecd88c],.sheet-leave-active[data-v-92ecd88c]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-92ecd88c],.sheet-leave-active .sheet-panel[data-v-92ecd88c]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-92ecd88c],.sheet-leave-to[data-v-92ecd88c]{opacity:0}.sheet-enter-from .sheet-panel[data-v-92ecd88c],.sheet-leave-to .sheet-panel[data-v-92ecd88c]{transform:translateY(102%)}.ui-toast[data-v-44bc260b]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-44bc260b]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-44bc260b]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-44bc260b]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-44bc260b]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-44bc260b]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-44bc260b]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-44bc260b]{flex:1;min-width:0}.ui-toast__title[data-v-44bc260b]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-44bc260b]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-44bc260b]{color:var(--color-danger)}.ui-toast__close[data-v-44bc260b]{flex:none;margin:-3px -4px 0 0}.composer[data-v-203386fd]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer-warning-toast[data-v-203386fd]{position:fixed;right:var(--space-4);bottom:var(--space-4);z-index:var(--z-toast);max-width:calc(100vw - 2 * var(--space-4))}.composer-warning-enter-active[data-v-203386fd],.composer-warning-leave-active[data-v-203386fd]{transition:opacity .15s ease,transform .15s ease}.composer-warning-enter-from[data-v-203386fd],.composer-warning-leave-to[data-v-203386fd]{opacity:0;transform:translateY(6px)}.composer.drag-over[data-v-203386fd]{background:var(--color-accent-soft)}.drop-overlay[data-v-203386fd]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-203386fd]{opacity:1;visibility:visible}.drop-card[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-203386fd]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);--composer-valve-floor: 4em;--composer-valve-expand-margin: 3.4em;--thinking-dropdown-width: 320px;--thinking-dropdown-viewport-gutter: var(--space-6);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-203386fd]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-203386fd]:focus-within:after{opacity:1}.quote-strip[data-v-203386fd]{display:flex;flex-wrap:wrap;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0}.quote-chip[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-1);max-width:100%;min-width:0;padding:var(--space-1) var(--space-1) var(--space-1) var(--space-2);border:.5px solid var(--color-line);border-left:2px solid var(--color-accent);border-radius:var(--radius-md);background:var(--color-surface-raised)}.quote-copy[data-v-203386fd]{display:grid;min-width:0;max-width:min(420px,70vw)}.quote-source[data-v-203386fd],.quote-comment[data-v-203386fd]{color:var(--color-text-muted);font-size:var(--text-xs)}.quote-text[data-v-203386fd]{overflow:hidden;color:var(--color-text);font-size:var(--text-sm);text-overflow:ellipsis;white-space:nowrap}.att-strip[data-v-203386fd]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-203386fd]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-203386fd]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-203386fd]{padding-bottom:var(--space-6)}.att-more[data-v-203386fd]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-203386fd]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-203386fd]{gap:var(--space-2)}.att-scroll-content .att-chip[data-v-203386fd]{corner-shape:superellipse(1.5)}.att-scroll-content .att-tile[data-v-203386fd]{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-203386fd]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-203386fd]{display:none}.cin-wrap[data-v-203386fd]{position:relative;padding:14px 16px 8px}.input-row[data-v-203386fd]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-203386fd]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-203386fd]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-203386fd]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-203386fd]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-203386fd]::-webkit-scrollbar{display:none}.ph[data-v-203386fd]::placeholder{color:var(--muted)}.ph[data-v-203386fd]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-203386fd]{min-height:70vh;max-height:70vh}.compact-chip.gone[data-v-203386fd],.model-pill.model-gone[data-v-203386fd]{display:none}.compact-chip[data-v-203386fd]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-203386fd]:hover{background:var(--color-hover)}.composer-attach[data-v-203386fd]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-203386fd]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-203386fd]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-203386fd]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-203386fd]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-203386fd]{background:var(--color-menu-scrollbar-hover)}.msheet-search[data-v-203386fd]{padding:0 var(--space-4) var(--space-2)}.msheet-add[data-v-203386fd]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);padding:0 var(--menu-row-hug);font-family:var(--font-ui)}.am-row[data-v-203386fd]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:none;border-radius:var(--radius-menu-row);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-203386fd]:hover{background:var(--color-hover)}.am-row[data-v-203386fd]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-203386fd]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-203386fd],.am-row:focus-visible .am-icon[data-v-203386fd]{color:var(--color-text)}.am-icon[data-v-203386fd]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-203386fd]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-203386fd]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-203386fd]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-203386fd]:active{transform:scale(.92)}.send[data-v-203386fd]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-203386fd]:disabled:active{transform:none}.send.is-starting[data-v-203386fd]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting .ui-spinner[data-v-203386fd]{color:var(--color-send-icon)}.send.is-starting .ui-spinner__track[data-v-203386fd]{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-203386fd]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-203386fd]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-203386fd]:active{transform:scale(.92)}.stop .stop-square[data-v-203386fd]{display:block;width:10px;height:10px;border-radius:var(--radius-xs);background:currentColor}.toolbar[data-v-203386fd]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-203386fd]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-203386fd],.toolbar-right[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-203386fd]{flex:none;overflow:hidden;padding-right:var(--space-2)}.toolbar-right[data-v-203386fd]{flex:1 1 auto;justify-content:flex-end}.perm-pill[data-v-203386fd],.workflow-chip[data-v-203386fd],.model-pill[data-v-203386fd],.thinking-pill[data-v-203386fd]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-203386fd]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-203386fd]:after,.workflow-chip[data-v-203386fd]:after,.model-pill[data-v-203386fd]:after,.thinking-pill[data-v-203386fd]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-203386fd]:hover:after,.workflow-chip[data-v-203386fd]:hover:after,.model-pill[data-v-203386fd]:hover:after,.thinking-pill[data-v-203386fd]:hover:after{opacity:1}.perm-pill.open[data-v-203386fd],.model-pill.open[data-v-203386fd],.thinking-pill.open[data-v-203386fd]{background:var(--color-accent-soft)}.workflow-chip[data-v-203386fd]{cursor:default}.perm-pill.perm-manual[data-v-203386fd]{color:var(--dim)}.perm-pill.perm-yolo[data-v-203386fd]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-203386fd]{color:var(--color-danger)}.perm-pill-icon[data-v-203386fd]{flex:none}.labels-collapsed .perm-pill[data-v-203386fd]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.labels-collapsed .perm-pill-label[data-v-203386fd]{display:none}.labels-collapsed .workflow-chip[data-v-203386fd]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.labels-collapsed .workflow-label[data-v-203386fd]{display:none}.labels-collapsed .thinking-pill[data-v-203386fd]{width:var(--composer-control-size);padding:0;justify-content:center}.labels-collapsed .thinking-pill-label[data-v-203386fd],.labels-collapsed .thinking-pill .cv[data-v-203386fd]{display:none}.ctx-group[data-v-203386fd]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-203386fd]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-203386fd]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-203386fd]:active{transform:scale(.97)}.model-pill[data-v-203386fd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-203386fd]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.thinking-pill[data-v-203386fd]{flex:none;padding:0 var(--space-2);color:var(--color-accent);font-size:var(--ui-font-size-sm);transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.thinking-pill[data-v-203386fd]:active:not(:disabled){transform:scale(.97)}.thinking-pill[data-v-203386fd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.thinking-pill[data-v-203386fd]:disabled{color:var(--muted);cursor:default}.thinking-pill[data-v-203386fd]:disabled:hover:after{opacity:0}.model-pill .cv[data-v-203386fd],.thinking-pill .cv[data-v-203386fd]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-203386fd],.model-pill.open .cv[data-v-203386fd],.thinking-pill:hover .cv[data-v-203386fd],.thinking-pill.open .cv[data-v-203386fd]{color:var(--dim)}.model-pill.open .cv[data-v-203386fd],.thinking-pill.open .cv[data-v-203386fd]{transform:rotate(180deg)}.model-pill.icon-only[data-v-203386fd]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.composer-dropdown[data-v-203386fd]{position:absolute;bottom:calc(100% + var(--space-1));right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right;overflow-y:auto;overscroll-behavior:contain}.thinking-dropdown[data-v-203386fd]{width:var(--thinking-dropdown-width);min-width:0;max-width:calc(100vw - var(--thinking-dropdown-viewport-gutter));padding:var(--space-3);gap:var(--space-3);overflow:hidden}.thinking-dropdown-title[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text);font-size:var(--ui-font-size);font-weight:var(--weight-semibold)}.thinking-dropdown .ui-seg[data-v-203386fd]{width:100%}.thinking-cache-note[data-v-203386fd]{color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.model-dropdown.flip-down[data-v-203386fd]{top:calc(100% + var(--space-1));bottom:auto;transform-origin:top right}.composer-menu-pop-enter-active[data-v-203386fd]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-203386fd]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-203386fd],.composer-menu-pop-leave-to[data-v-203386fd]{opacity:0;transform:scale(.97) translateY(2px)}.model-dropdown.flip-down.composer-menu-pop-enter-from[data-v-203386fd],.model-dropdown.flip-down.composer-menu-pop-leave-to[data-v-203386fd]{transform:scale(.97) translateY(-2px)}.md-list[data-v-203386fd]{display:flex;flex-direction:column;gap:1px}.md-section[data-v-203386fd]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-203386fd]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-203386fd]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-203386fd]{color:var(--color-text-strong)}.md-row[data-v-203386fd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-203386fd]:disabled{cursor:default;opacity:.58}.md-row[data-v-203386fd]:disabled:hover{background:none}.md-row.is-current[data-v-203386fd]{background:var(--color-selected)}.md-note[data-v-203386fd]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-203386fd]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-203386fd]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-203386fd]{color:var(--dim)}.md-check[data-v-203386fd]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-203386fd]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-203386fd]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-203386fd]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-203386fd]{height:1px;background:var(--line);margin:3px 0}.perm-dropdown[data-v-203386fd]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-203386fd]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-203386fd]:hover,.pd-row.is-current[data-v-203386fd]{background:var(--color-hover)}.pd-icon[data-v-203386fd]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-203386fd]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-203386fd]{display:contents}.pd-name[data-v-203386fd]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-203386fd]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-203386fd]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-203386fd],.workflow-x[data-v-203386fd]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-203386fd]:before,.workflow-x[data-v-203386fd]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-203386fd]:before,.workflow-x[data-v-203386fd]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-203386fd]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-203386fd]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-203386fd]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-203386fd]{gap:6px;min-width:0}.send[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-203386fd]{display:none}.send[data-v-203386fd]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop .stop-square[data-v-203386fd]{width:12px;height:12px}.perm-pill[data-v-203386fd],.wm-pill[data-v-203386fd]{display:none}.model-dropdown[data-v-203386fd]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.thinking-dropdown[data-v-203386fd]{max-width:calc(100vw - var(--thinking-dropdown-viewport-gutter))}.ph[data-v-203386fd]{font-size:16px}.model-pill[data-v-203386fd],.thinking-pill[data-v-203386fd],.attach-btn[data-v-203386fd]{font-size:var(--ui-font-size)}.toolbar[data-v-203386fd]{gap:6px;min-width:0}.toolbar-left[data-v-203386fd],.toolbar-right[data-v-203386fd]{min-width:0}.model-pill[data-v-203386fd]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-203386fd]{max-width:min(40vw,170px)}.md-row[data-v-203386fd],.md-section[data-v-203386fd],.pd-name[data-v-203386fd]{font-size:var(--ui-font-size)}.pd-desc[data-v-203386fd]{font-size:var(--text-xs)}}.att-lightbox[data-v-203386fd]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;align-items:center;justify-content:center;padding:24px;background:#14171c9e}.att-lightbox-card[data-v-203386fd]{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:min(960px,calc(100vw - 48px));max-height:calc(100vh - 48px)}.att-lightbox-media[data-v-203386fd]{max-width:100%;max-height:calc(100vh - 96px);border-radius:6px;background:var(--bg);box-shadow:var(--shadow-xl);object-fit:contain}.att-lightbox-name[data-v-203386fd]{max-width:100%;color:var(--surface-light);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att-lightbox-close[data-v-203386fd]{position:absolute;top:-14px;right:-14px;width:28px;height:28px;border:1px solid rgba(255,255,255,.45);border-radius:50%;background:#14171cd1;color:var(--surface-light);cursor:pointer}.appr[data-v-f7485122]{margin:var(--space-2) 0}.appr.ui-card[data-v-f7485122]{border-color:var(--color-warning-bd)}.appr[data-v-f7485122] .ui-card__head{background:var(--color-warning-soft);border-bottom-color:var(--color-warning-bd)}.appr.minimized[data-v-f7485122] .ui-card__body{display:none}.appr.minimized[data-v-f7485122] .ui-card__head{border-bottom:none}.ah[data-v-f7485122]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui);flex-wrap:nowrap}.ah-ic[data-v-f7485122]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-warning);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.akind[data-v-f7485122]{color:var(--color-warning);font-size:var(--text-base);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apath[data-v-f7485122]{color:var(--color-text);font:var(--text-sm) var(--font-mono);flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ah-path[data-v-f7485122]{margin-bottom:var(--space-2);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aw[data-v-f7485122],.minimized .amin[data-v-f7485122]{margin-left:auto}.diff[data-v-f7485122]{border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);overflow:hidden;font:var(--text-sm)/1.85 var(--font-mono);max-height:240px;overflow-y:auto}.diff.expanded[data-v-f7485122]{max-height:none}.dl[data-v-f7485122]{display:flex;padding:0 var(--space-3)}.dg[data-v-f7485122]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none}.dc[data-v-f7485122]{white-space:pre;font:inherit}.del[data-v-f7485122]{background:var(--color-danger-soft)}.del .dc[data-v-f7485122]{color:var(--color-danger)}.add[data-v-f7485122]{background:var(--color-success-soft)}.add .dc[data-v-f7485122]{color:var(--color-success)}.shell-cmd[data-v-f7485122]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-f7485122]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-f7485122]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-f7485122]{margin-top:var(--space-2);padding:var(--space-1) var(--space-3);border:1px solid var(--color-danger-bd);border-radius:var(--radius-sm);color:var(--color-danger);font:var(--text-sm) var(--font-ui);background:var(--color-danger-soft)}.body-file[data-v-f7485122]{border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.file-bar[data-v-f7485122]{padding:var(--space-1) var(--space-3);background:var(--color-surface);border-bottom:1px solid var(--color-line);font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.file-lang[data-v-f7485122]{letter-spacing:.04em}.file-content[data-v-f7485122]{padding:var(--space-2) 0;font:var(--text-sm)/1.7 var(--font-mono);background:var(--color-surface-sunken);max-height:240px;overflow-y:auto}.body-file.expanded .file-content[data-v-f7485122]{max-height:none}.file-line[data-v-f7485122]{display:flex;padding:0 var(--space-3)}.file-ln[data-v-f7485122]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none;flex:none}.file-text[data-v-f7485122]{white-space:pre;font:inherit}.body-chip[data-v-f7485122]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.chip-label[data-v-f7485122]{background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-f7485122]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-f7485122]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.todo-item[data-v-f7485122]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-f7485122]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-f7485122]{color:var(--color-text)}.todo-done[data-v-f7485122]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-f7485122]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word}.body-plan[data-v-f7485122]{max-height:50vh;overflow-y:auto}.body-plan.expanded[data-v-f7485122]{max-height:none}.feedback-wrap[data-v-f7485122]{margin-top:var(--space-3)}.feedback-ta[data-v-f7485122]{width:100%;box-sizing:border-box;font:var(--text-sm) var(--font-ui);padding:var(--space-2) var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-sm);resize:none;outline:none;color:var(--color-text);background:var(--color-surface-raised)}.feedback-ta[data-v-f7485122]:focus-visible{border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.feedback-hint[data-v-f7485122]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.abtn[data-v-f7485122],.plan-actions[data-v-f7485122]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}.plan-actions[data-v-f7485122]{flex-wrap:wrap}.k[data-v-f7485122]{opacity:.75}@media(max-width:640px){.diff[data-v-f7485122],.file-content[data-v-f7485122]{overflow-x:auto;-webkit-overflow-scrolling:touch}.file-content[data-v-f7485122]{max-height:50vh}.abtn[data-v-f7485122],.plan-actions[data-v-f7485122]{flex-direction:column}.kbtn[data-v-f7485122]{width:100%;min-height:46px}}.goal-panel[data-v-81a928ba]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-81a928ba]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-81a928ba]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-2883948d]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-2883948d]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-2883948d],.plan-review-feedback[data-v-2883948d]{color:var(--color-text-muted)}.plan-review-label[data-v-2883948d]{flex:none}.plan-path-only[data-v-2883948d]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-2883948d]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-2883948d]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-2883948d]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-2883948d]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-ce0bd159]{margin:var(--space-2) 0}.qcard.ui-card[data-v-ce0bd159]{border-color:var(--color-accent-bd)}.qcard[data-v-ce0bd159] .ui-card__head{background:var(--color-accent-soft);border-bottom-color:var(--color-accent-bd)}.qcard.minimized[data-v-ce0bd159] .ui-card__body{display:none}.qcard.minimized[data-v-ce0bd159] .ui-card__head{border-bottom:none}.qh[data-v-ce0bd159]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.qh-ic[data-v-ce0bd159]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-accent);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.qtitle[data-v-ce0bd159]{color:var(--color-accent-hover);font-size:var(--text-base);font-weight:var(--weight-semibold)}.qstep[data-v-ce0bd159]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);margin-left:var(--space-1)}.qmin[data-v-ce0bd159]{margin-left:auto}.qmin-peek[data-v-ce0bd159]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.qbody[data-v-ce0bd159]{color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qsteps[data-v-ce0bd159]{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);font-family:var(--font-ui)}.qstep-dot[data-v-ce0bd159]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:var(--radius-full);border:1px solid var(--color-line);background:var(--color-surface);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);cursor:pointer;padding:0;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.qstep-dot[data-v-ce0bd159]:hover:not(.active){background:var(--color-surface-sunken)}.qstep-dot.active[data-v-ce0bd159]{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-text-on-accent);font-weight:var(--weight-medium)}.qstep-dot.answered[data-v-ce0bd159]:not(.active){border-color:var(--color-accent);color:var(--color-accent)}.qheader-chip[data-v-ce0bd159]{margin-bottom:var(--space-2)}.qtext[data-v-ce0bd159]{font-size:var(--text-base);color:var(--color-text);font-weight:var(--weight-medium);margin-bottom:var(--space-2);line-height:var(--leading-normal)}.qmdbody[data-v-ce0bd159]{margin-bottom:var(--space-2)}.qopts[data-v-ce0bd159]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2)}.qopt[data-v-ce0bd159]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-ce0bd159]:hover{background:var(--color-surface-sunken)}.qopt.selected[data-v-ce0bd159]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.qopt-key[data-v-ce0bd159]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);font-weight:var(--weight-medium);width:12px;flex:none;text-align:center}.qopt-glyph[data-v-ce0bd159]{color:var(--color-accent-hover);font-size:var(--text-base);flex:none}.qopt-text[data-v-ce0bd159]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-text-other[data-v-ce0bd159]{flex:0 1 auto}.qopt-label[data-v-ce0bd159]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-ce0bd159]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui);font-weight:var(--weight-medium)}.chk[data-v-ce0bd159],.rad[data-v-ce0bd159]{font:var(--text-base) var(--font-mono)}.other-input[data-v-ce0bd159]{flex:1 1 8ch;min-width:8ch;font:var(--text-base) var(--font-ui);border:none;border-bottom:1px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-ce0bd159]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-ce0bd159]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}@media(max-width:640px){.qh[data-v-ce0bd159]{flex-wrap:wrap;row-gap:var(--space-1)}.qtext[data-v-ce0bd159]{font-size:var(--text-lg)}.qstep-dot[data-v-ce0bd159]{width:28px;height:28px;font:var(--text-xs) var(--font-ui)}.qopt[data-v-ce0bd159]{min-height:44px;padding:var(--space-3);font-size:var(--text-base);border-radius:var(--radius-md)}.qopt-desc[data-v-ce0bd159]{font-size:var(--text-xs)}.other-input[data-v-ce0bd159]{flex-basis:100%;min-height:28px}.qfoot[data-v-ce0bd159]{flex-direction:column}.qfoot-btn[data-v-ce0bd159]{width:100%;min-height:46px}.qfoot-main[data-v-ce0bd159]{order:-1}}.status-glyph[data-v-f870866a]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f870866a]{color:var(--color-accent)}.status-glyph.s-done[data-v-f870866a]{color:var(--color-success)}.status-glyph.s-fail[data-v-f870866a]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f870866a]{color:var(--color-text-faint)}.sg-empty[data-v-5945b343]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-5945b343]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-5945b343]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-5945b343]{cursor:pointer}.sg-card.openable[data-v-5945b343]:hover{background:var(--color-selected-hover)}.sg-card[data-v-5945b343]:not(.openable){cursor:not-allowed}.sg-open[data-v-5945b343]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-5945b343]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-5945b343]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-5945b343]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-5945b343]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-5945b343]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-5945b343]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-5945b343]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-5945b343]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-5945b343]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-5945b343]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-5945b343]{display:flex;align-items:center}.sg-state[data-v-5945b343]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-5945b343]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-5945b343]{color:var(--color-danger)}.sg-time[data-v-5945b343]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-5945b343]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-5945b343],.sg-cancel[data-v-5945b343]:focus-visible{opacity:1}.sg-cancel[data-v-5945b343]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-5945b343]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.taskspane[data-v-f4589f0b]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-f4589f0b]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-f4589f0b]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-f4589f0b]{color:var(--color-danger)}.tp-main[data-v-f4589f0b]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-f4589f0b]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-f4589f0b]:hover{background:var(--color-hover)}.tp-row[data-v-f4589f0b]:not(.expandable){cursor:not-allowed}.tp-open[data-v-f4589f0b]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-f4589f0b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-f4589f0b]{flex:none;color:var(--muted)}.tp-name[data-v-f4589f0b]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-f4589f0b]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-f4589f0b]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-f4589f0b]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-f4589f0b]{color:var(--color-text-muted)}.tp-fail[data-v-f4589f0b]{color:var(--color-danger)}.tp-time[data-v-f4589f0b]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-f4589f0b]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-f4589f0b]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-f4589f0b]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-f4589f0b]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-f4589f0b]{min-height:var(--touch-target-min)}}.tp-empty[data-v-f4589f0b]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-f4589f0b]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-f4589f0b]{font-size:var(--ui-font-size-sm)}}.todo-card[data-v-4e4d0054]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-4e4d0054]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-4e4d0054]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-4e4d0054]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-4e4d0054]{color:var(--color-text-muted)}.tc-glyph[data-v-4e4d0054]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-4e4d0054]{color:var(--color-success)}.tc-glyph.g-pending[data-v-4e4d0054]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-4e4d0054]{color:var(--color-text)}.tc-empty[data-v-4e4d0054]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-4e4d0054]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-4e4d0054]{font-size:var(--text-lg)}.tc-row[data-v-4e4d0054]{padding:var(--space-2) var(--space-3)}}.ui-pill[data-v-0fb1a50d]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-0fb1a50d]{cursor:pointer}button.ui-pill[data-v-0fb1a50d]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-0fb1a50d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-0fb1a50d]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-0fb1a50d]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-0fb1a50d] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.filter-control[data-v-658870b5]{display:inline-flex;min-width:0}.fc-chevron[data-v-658870b5]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-658870b5]{transform:rotate(180deg)}.fc-menu[data-v-658870b5]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-658870b5] .ui-menu{min-width:0}.fc-label[data-v-658870b5]{flex:1;white-space:nowrap}.filter-control[data-v-658870b5] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu[data-v-658870b5] .ui-icon[data-icon=circle-check]{transform:scale(.91)}.fc-check[data-v-658870b5]{color:var(--color-accent)}.wp-head-tab[data-v-408c4b07]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-408c4b07] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-408c4b07]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-408c4b07]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-408c4b07]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .fc-trigger{min-height:var(--touch-target-min)}}.chat-dock[data-v-e4431eaa]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-e4431eaa]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-e4431eaa]{margin-left:auto;margin-right:auto}.chat-dock.align-mobile[data-v-e4431eaa]{max-width:none}.chat-dock[data-v-e4431eaa]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-e4431eaa]>*{position:relative;z-index:1}.dock-work-panel[data-v-e4431eaa]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-head[data-v-e4431eaa]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-body[data-v-e4431eaa]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-plan .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-head[data-v-e4431eaa]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-plan .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-body[data-v-e4431eaa]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-e4431eaa],.dock-work-panel.panel-bash[data-v-e4431eaa]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-head[data-v-e4431eaa]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-e4431eaa]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-e4431eaa]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-e4431eaa]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body .taskspane[data-v-e4431eaa]{border:none;background:transparent;padding:0}.dock-workbar[data-v-e4431eaa]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar .ui-pill[data-v-e4431eaa]{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar .ui-pill svg[data-v-e4431eaa]{width:1.5em;height:1.5em;color:inherit}.dock-workbar .ui-pill[data-v-e4431eaa]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar .ui-pill[data-v-e4431eaa]:hover:not(:disabled):after,.dock-workbar .ui-pill.is-active[data-v-e4431eaa]:after{opacity:1}.chat-dock.pills-compact .dock-workbar .ui-pill[data-v-e4431eaa]{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar .ui-pill>span[data-v-e4431eaa]{display:none}.dock-workbar .dw-count[data-v-e4431eaa]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-e4431eaa]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-e4431eaa]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-e4431eaa]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-e4431eaa]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-e4431eaa]{color:var(--color-danger)}.dock-approval[data-v-e4431eaa]{margin-top:8px}.chat-dock.has-approval[data-v-e4431eaa]{display:flex;flex-direction:column;max-height:calc(var(--app-height, 100dvh) - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-e4431eaa]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-e4431eaa]{min-height:0}@media(max-width:640px){.chat-dock[data-v-e4431eaa]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-e4431eaa]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}}.chat-dock:not(.align-mobile) .composer[data-v-e4431eaa]{padding-bottom:14px}.dock-panel-enter-active[data-v-e4431eaa]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-e4431eaa]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-e4431eaa],.dock-panel-leave-to[data-v-e4431eaa]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.conversation-toc[data-v-8a1c40d2]{--toc-preview-max-width: 360px;position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);left:var(--space-4);display:flex;flex-direction:column;justify-content:center}.toc-scroll[data-v-8a1c40d2]{position:relative;z-index:1;display:flex;flex-direction:column;gap:0;width:calc(var(--space-8) + var(--space-05));padding:0;max-height:min(50dvh,max(0px,calc(100dvh - var(--chat-dock-height, 0px) - var(--chat-dock-height, 0px) - var(--space-8))));overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-8a1c40d2]::-webkit-scrollbar{display:none}.toc-row[data-v-8a1c40d2]{position:relative;display:flex;align-items:center;width:calc(var(--space-8) + var(--space-05));min-height:calc(var(--space-2) + var(--space-05));padding:0;border:none;background:transparent;cursor:pointer}.toc-row[data-v-8a1c40d2]:focus-visible{outline:none}.toc-row:focus-visible .toc-marker[data-v-8a1c40d2]{box-shadow:var(--p-focus-ring)}.toc-marker[data-v-8a1c40d2]{flex:none;width:calc(var(--space-3) + var(--space-05));height:var(--space-05);border-radius:var(--radius-full);background:var(--color-text-faint);transition:width var(--duration-base) var(--ease-out),height var(--duration-base) var(--ease-out),background var(--duration-fast) var(--ease-out)}.toc-row.active .toc-marker[data-v-8a1c40d2]{background:var(--color-text-strong)}.toc-row:has(+.toc-row+.toc-row.previewing) .toc-marker[data-v-8a1c40d2],.toc-row.previewing+.toc-row+.toc-row .toc-marker[data-v-8a1c40d2]{width:var(--space-4)}.toc-row:has(+.toc-row.previewing) .toc-marker[data-v-8a1c40d2],.toc-row.previewing+.toc-row .toc-marker[data-v-8a1c40d2]{width:calc(var(--space-5) + var(--space-05))}.toc-row.previewing .toc-marker[data-v-8a1c40d2],.toc-row:focus .toc-marker[data-v-8a1c40d2]{width:calc(var(--space-8) + var(--space-05));height:calc(var(--space-05) * 1.5);background:var(--color-text-strong)}.toc-preview[data-v-8a1c40d2]{position:absolute;z-index:var(--z-dropdown);left:calc(var(--space-8) + var(--space-4));transform:translateY(calc(0px - var(--space-1)));display:flex;flex-direction:column;gap:var(--space-4);width:min(var(--toc-preview-max-width),calc(100cqw - var(--space-4) - var(--space-8) - var(--space-4) - var(--space-4)));padding:var(--space-4);overflow:hidden;border:1px solid var(--color-line-strong);border-radius:var(--radius-xl);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-menu);font-family:var(--font-ui);text-align:left;cursor:pointer}.toc-preview[data-v-8a1c40d2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong),var(--shadow-menu)}.toc-preview__prompt[data-v-8a1c40d2],.toc-preview__response[data-v-8a1c40d2]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:normal}.toc-preview__prompt[data-v-8a1c40d2]{-webkit-line-clamp:2;color:var(--color-text-strong);font-size:max(var(--text-lg),var(--content-font-size));font-weight:var(--weight-semibold);line-height:var(--leading-tight)}.toc-preview__response[data-v-8a1c40d2]{-webkit-line-clamp:3;color:var(--color-text-muted);font-size:var(--content-font-size);line-height:var(--leading-relaxed)}@media(prefers-reduced-motion:reduce){.toc-marker[data-v-8a1c40d2]{transition:none}}.conversation-toc.toc-clipped[data-v-8a1c40d2]{visibility:hidden;pointer-events:none}.tsearch[data-v-d7187e08]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-d7187e08]{top:var(--space-3)}.tsearch[data-v-d7187e08]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-d7187e08]:focus-within:after{opacity:1}.tsearch-main[data-v-d7187e08]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-d7187e08]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-d7187e08]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-d7187e08]:focus-visible{outline:none}.tsearch-input[data-v-d7187e08]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-d7187e08]{display:inline-flex;flex:none}.tsearch-sep[data-v-d7187e08]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-d7187e08]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-d7187e08]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-d7187e08]{grid-template-rows:1fr}.tsearch-foot[data-v-d7187e08]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-d7187e08]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-d7187e08]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-d7187e08]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-d7187e08]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.pythinker-logo[data-v-58c4fde0]{display:block;object-fit:contain;flex:none}.size-sm[data-v-58c4fde0]{height:28px;width:auto}.size-md[data-v-58c4fde0]{height:44px;width:auto}.size-lg[data-v-58c4fde0]{height:64px;width:auto}.size-xl[data-v-58c4fde0]{height:96px;width:auto}.size-hero[data-v-58c4fde0]{height:clamp(128px,15vw,172px);width:auto}.pythinker-logo.interactive[data-v-58c4fde0]{cursor:pointer;user-select:none;-webkit-user-select:none;transition:transform .18s ease}.pythinker-logo.interactive[data-v-58c4fde0]:hover{transform:scale(1.06)}@media(prefers-reduced-motion:reduce){.pythinker-logo.interactive[data-v-58c4fde0]:hover{transform:none}}.recent[data-v-cd5a729d]{flex:none;display:flex;flex-direction:column;margin:var(--space-4) var(--dock-inline-right, 16px) 0 var(--dock-inline-left, 16px)}.recent-caption[data-v-cd5a729d]{margin:0;padding:0 var(--space-2) var(--space-1);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;user-select:none}.recent-row[data-v-cd5a729d]{display:flex;width:100%;min-width:0;align-items:center;gap:var(--space-2);padding:6px var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.recent-row[data-v-cd5a729d]:hover{background:var(--color-hover)}.recent-row[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-ico[data-v-cd5a729d]{display:inline-flex;flex:none}.recent-ico--open[data-v-cd5a729d]{color:var(--color-success)}.recent-ico--done[data-v-cd5a729d]{color:var(--color-done)}.recent-title[data-v-cd5a729d]{flex:1;min-width:0;overflow:hidden;color:var(--color-text);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);text-overflow:ellipsis;white-space:nowrap}.recent-time[data-v-cd5a729d]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.recent-foot[data-v-cd5a729d]{display:flex;justify-content:center;margin-top:var(--space-2)}.recent-more[data-v-cd5a729d]{display:inline-flex;height:26px;align-items:center;gap:var(--space-1);padding:0 var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.recent-more[data-v-cd5a729d]:hover{background:var(--color-hover);color:var(--color-text)}.recent-more[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-more svg[data-v-cd5a729d]{color:var(--color-text-faint)}.con[data-v-0a30b1ee]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.empty-panel-btn[data-v-0a30b1ee]{position:absolute;top:10px;right:16px;z-index:var(--z-sticky)}.panes[data-v-0a30b1ee]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes.is-following[data-v-0a30b1ee],.panes.history-prepending[data-v-0a30b1ee]{overflow-anchor:none}.chat-layout[data-v-0a30b1ee]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-0a30b1ee]{flex:1;min-height:0;position:relative}.content-wrap[data-v-0a30b1ee]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-0a30b1ee]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-0a30b1ee]{margin-left:0;margin-right:auto}@container (max-width: 952px){.con.toc-enabled:not(.mobile) .content-wrap.align-center[data-v-0a30b1ee]{padding-left:calc(var(--space-8) + var(--space-8) + var(--space-8))}}.content-wrap.align-mobile[data-v-0a30b1ee]{max-width:none}@media(max-width:640px){.con.mobile[data-v-0a30b1ee]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-0a30b1ee]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-0a30b1ee]{width:100%;min-width:0}}.empty-spacer[data-v-0a30b1ee]{flex:1}.empty-hint[data-v-0a30b1ee]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui)}.empty-hint-title[data-v-0a30b1ee]{display:inline-flex;align-items:center;gap:12px;font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-0a30b1ee]{gap:9px;color:var(--dim);font-weight:400}.empty-hint-text[data-v-0a30b1ee]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-add-workspace[data-v-0a30b1ee]{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--dim);font-family:var(--mono);font-size:var(--ui-font-size-sm);cursor:pointer}.empty-add-workspace[data-v-0a30b1ee]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.empty-add-workspace[data-v-0a30b1ee]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.empty-add-workspace svg[data-v-0a30b1ee]{flex:none}.ws-pick[data-v-0a30b1ee]{position:relative;font-family:var(--font-ui)}.ws-pick-btn[data-v-0a30b1ee]{display:inline-flex;align-items:center;gap:7px;width:max-content;max-width:min(100%,calc(100vw - var(--space-8)));padding:5px 10px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--dim);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer}.ws-pick-btn[data-v-0a30b1ee]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.ws-pick-name[data-v-0a30b1ee]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-chev[data-v-0a30b1ee]{flex:none;color:var(--muted);transition:transform .15s}.ws-pick-chev.open[data-v-0a30b1ee]{transform:rotate(180deg)}.ws-pick-backdrop[data-v-0a30b1ee]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-pick-menu[data-v-0a30b1ee]{position:absolute;display:grid;grid-template-columns:minmax(0,1fr);left:50%;transform:translate(-50%);top:calc(100% + 6px);z-index:var(--z-dropdown);width:max-content;min-width:min(180px,calc(100cqw - var(--space-8)));max-width:calc(100cqw - var(--space-8));max-height:50vh;overflow:hidden auto;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:4px}.ws-pick-item[data-v-0a30b1ee]{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-family:var(--font-ui)}.ws-pick-item[data-v-0a30b1ee]:hover{background:var(--panel2)}.ws-pick-item.on[data-v-0a30b1ee]{background:var(--color-accent-soft)}.ws-pick-item-name[data-v-0a30b1ee]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ws-pick-item.on .ws-pick-item-name[data-v-0a30b1ee]{color:var(--color-accent-hover)}.ws-pick-item-path[data-v-0a30b1ee]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:475;color:var(--muted)}.ws-pick-item.ws-pick-more[data-v-0a30b1ee]{flex-direction:row;align-items:center;justify-content:flex-start;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-item.ws-pick-more[data-v-0a30b1ee]:hover{color:var(--color-text)}.ws-pick-item.ws-pick-more span[data-v-0a30b1ee],.ws-pick-action span[data-v-0a30b1ee]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-divider[data-v-0a30b1ee]{height:1px;margin:4px 6px;background:var(--line)}.ws-pick-action[data-v-0a30b1ee]{display:flex;align-items:center;gap:7px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:7px 10px;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-action[data-v-0a30b1ee]:hover{background:var(--panel2);color:var(--color-text)}.ws-pick-action svg[data-v-0a30b1ee]{flex:none}.chat-scroll[data-v-0a30b1ee]{display:flex;flex-direction:column}.mobile .panes[data-v-0a30b1ee]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-0a30b1ee]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--ui-font-size-sm);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-base)}.newmsg-pill[data-v-0a30b1ee]:hover{background:var(--panel2)}.pill-chevron[data-v-0a30b1ee]{width:12px;height:12px}.pill-enter-active[data-v-0a30b1ee],.pill-leave-active[data-v-0a30b1ee]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-0a30b1ee],.pill-leave-to[data-v-0a30b1ee]{opacity:0;transform:translate(-50%) translateY(8px)}.abort-toast[data-v-0a30b1ee]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.abort-toast-text[data-v-0a30b1ee]{display:flex;align-items:center;gap:8px}.abort-toast-enter-active[data-v-0a30b1ee],.abort-toast-leave-active[data-v-0a30b1ee]{transition:opacity .15s ease,transform .15s ease}.abort-toast-enter-from[data-v-0a30b1ee],.abort-toast-leave-to[data-v-0a30b1ee]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-0a30b1ee]{background:var(--bg)}.newmsg-pill[data-v-0a30b1ee]{font-family:var(--sans)}.sab[data-v-d37e8069]{position:fixed;z-index:var(--z-toast);display:flex;flex-direction:column;gap:var(--space-1);padding:var(--space-1);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-lg)}.sab-action[data-v-d37e8069]{display:flex;align-items:center;gap:var(--space-2);min-height:34px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:var(--text-sm) var(--font-ui);cursor:pointer}.sab-action[data-v-d37e8069]:hover,.sab-action[data-v-d37e8069]:focus-visible{background:var(--color-hover);outline:none}.sab-comment[data-v-d37e8069]{display:flex;align-items:center;gap:var(--space-1)}.sab-comment input[data-v-d37e8069]{flex:1;min-width:0;height:32px;padding:0 var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-bg);color:var(--color-text);font:var(--text-sm) var(--font-ui);outline:none}.sab-comment input[data-v-d37e8069]:focus-visible{box-shadow:var(--p-focus-ring)}.sab-comment button[data-v-d37e8069]{height:32px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:var(--color-accent);color:var(--color-text-on-accent);font:var(--text-sm) var(--font-ui);cursor:pointer}.sab-comment button[data-v-d37e8069]:disabled{opacity:.45;cursor:default}.media-lightbox[data-v-a5036dce]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-a5036dce]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-a5036dce]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl);touch-action:none}.media-lightbox-media[data-v-a5036dce]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain;transform-origin:center;user-select:none}.media-lightbox-close[data-v-a5036dce]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-a5036dce]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-a5036dce]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-preview-caption[data-v-a5036dce]{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.ui-panel-header[data-v-47211810]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 6px 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface)}.ui-panel-header__main[data-v-47211810]{flex:1 1 auto;display:flex;align-items:center;gap:var(--space-2);min-width:0}.ui-panel-header__title[data-v-47211810]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--weight-semibold) var(--text-xs) var(--font-mono);letter-spacing:.04em;color:var(--color-text)}.ui-panel-header__sub[data-v-47211810]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-47211810]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-47211810]{align-items:flex-start;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px}.ui-panel-header.wrap .ui-panel-header__main[data-v-47211810]{flex-wrap:wrap;gap:4px 6px;min-height:calc(var(--panel-head-h, 48px) - 6px);align-content:center}.ui-panel-header.wrap .ui-panel-header__close[data-v-47211810]{margin-top:calc((var(--panel-head-h, 48px) - 6px - 26px) / 2)}.file-preview[data-v-97c52e24]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-97c52e24],.fp-loading[data-v-97c52e24]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-97c52e24]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-97c52e24]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-97c52e24]{display:none}}.fp-lines[data-v-97c52e24],.fp-size[data-v-97c52e24]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-97c52e24]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-97c52e24]{flex:1;min-width:0;height:26px;border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-97c52e24]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-check[data-v-97c52e24]{color:var(--color-success)}.fp-body[data-v-97c52e24]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));--fp-token-keyword: color-mix(in srgb, var(--color-accent) 68%, var(--color-danger));--fp-token-string: var(--color-success);--fp-token-literal: var(--color-accent-hover);--fp-token-tag: var(--color-warning);flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-97c52e24]{padding:16px 20px}.fp-code[data-v-97c52e24]{background:var(--bg)}.fp-line-table[data-v-97c52e24]{display:table;width:100%;border-collapse:collapse;font-size:var(--ui-font-size);line-height:1.6}.fp-line-row[data-v-97c52e24]{display:table-row}.fp-line-row.hit .fp-line-text[data-v-97c52e24],.fp-table tr.hit td[data-v-97c52e24]{background:var(--fp-search-hit-bg)}.fp-line-row.active .fp-line-text[data-v-97c52e24],.fp-table tr.active td[data-v-97c52e24]{background:var(--fp-search-active-bg)}.fp-line-row.target .fp-gutter[data-v-97c52e24],.fp-line-row.target .fp-line-text[data-v-97c52e24],.fp-table tr.target th[data-v-97c52e24],.fp-table tr.target td[data-v-97c52e24]{background:var(--color-accent-soft)}.fp-gutter[data-v-97c52e24]{display:table-cell;width:44px;padding:0 10px 0 12px;text-align:right;color:var(--faint);user-select:none;font-size:var(--text-base);white-space:nowrap;border-right:1px solid var(--line2);vertical-align:top}.fp-line-text[data-v-97c52e24]{display:table-cell;padding:0 12px;color:var(--color-text);white-space:pre;vertical-align:top}.fp-line-text[data-v-97c52e24] .tok-key,.fp-line-text[data-v-97c52e24] .tok-keyword{color:var(--fp-token-keyword);font-weight:500}.fp-line-text[data-v-97c52e24] .tok-string{color:var(--fp-token-string)}.fp-line-text[data-v-97c52e24] .tok-number,.fp-line-text[data-v-97c52e24] .tok-literal{color:var(--fp-token-literal)}.fp-line-text[data-v-97c52e24] .tok-comment{color:var(--muted);font-style:italic}.fp-line-text[data-v-97c52e24] .tok-tag{color:var(--fp-token-tag);font-weight:500}.fp-line-text[data-v-97c52e24] .tok-attr{color:var(--fp-token-literal)}.fp-html-frame[data-v-97c52e24],.fp-pdf-frame[data-v-97c52e24]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-97c52e24]{background:var(--panel2)}.fp-table-wrap[data-v-97c52e24]{background:var(--bg)}.fp-table[data-v-97c52e24]{border-collapse:collapse;min-width:100%;font:12px/1.5 var(--mono)}.fp-table th[data-v-97c52e24]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:1px solid var(--line2);user-select:none}.fp-table td[data-v-97c52e24]{padding:2px 10px;border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-97c52e24]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-97c52e24]{max-width:100%;max-height:100%;object-fit:contain;border:1px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-97c52e24]{max-width:none;max-height:none}.fp-binary-wrap[data-v-97c52e24]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-97c52e24]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-97c52e24]{color:var(--faint);flex:none}.fp-error[data-v-97c52e24]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-97c52e24{to{transform:rotate(360deg)}}.spinner[data-v-97c52e24]{display:inline-block;width:14px;height:14px;border:1.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-97c52e24 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-97c52e24]{display:none}.fp-markdown[data-v-97c52e24]{padding:14px 16px}.fp-body.fp-code[data-v-97c52e24]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-97c52e24],.fp-loading[data-v-97c52e24]{font-family:var(--sans)}.fp-binary-card[data-v-97c52e24]{border:1px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-97c52e24]{font-family:var(--sans)}.fp-image[data-v-97c52e24]{border-radius:var(--radius-md)}.seg-btn[data-v-97c52e24]{font-family:var(--sans)}.ui-banner[data-v-566a0ac8]{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.ui-banner__icon[data-v-566a0ac8]{display:inline-flex;flex:none}.ui-banner__icon svg[data-v-566a0ac8]{width:18px;height:18px}.ui-banner--info[data-v-566a0ac8]{background:var(--color-accent-soft);border-color:var(--color-accent-bd)}.ui-banner--warning[data-v-566a0ac8]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ui-banner--danger[data-v-566a0ac8]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ui-banner--info .ui-banner__icon[data-v-566a0ac8]{color:var(--color-accent)}.ui-banner--warning .ui-banner__icon[data-v-566a0ac8]{color:var(--color-warning)}.ui-banner--danger .ui-banner__icon[data-v-566a0ac8]{color:var(--color-danger)}.monaco-pane[data-v-cb5f64f3]{position:relative;flex:1;min-height:0}.monaco-pane__host[data-v-cb5f64f3]{position:absolute;inset:0}.monaco-pane__boot[data-v-cb5f64f3]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.editor-panel[data-v-579cb4a1]{display:flex;flex-direction:column;height:100%;min-height:0}.ed-path[data-v-579cb4a1]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.ed-dirty[data-v-579cb4a1]{flex:none;width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-warning)}.ed-saved[data-v-579cb4a1]{flex:none;font:var(--text-xs) var(--font-ui);color:var(--color-success)}.ed-saving[data-v-579cb4a1]{display:inline-flex;align-items:center}.editor-panel__conflict[data-v-579cb4a1]{margin:var(--space-2) var(--space-3) 0}.editor-panel__conflict-actions[data-v-579cb4a1]{display:inline-flex;gap:var(--space-2);margin-left:var(--space-3)}.editor-panel__save-error[data-v-579cb4a1]{margin:var(--space-2) var(--space-3) 0;font:var(--text-xs) var(--font-ui);color:var(--color-danger)}.editor-panel__empty[data-v-579cb4a1]{flex:1;display:flex;align-items:center;justify-content:center;padding:var(--space-4)}.tp[data-v-e1ad626c]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-e1ad626c]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:425;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-9ea90d44]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-meta[data-v-9ea90d44]{flex:none;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-3) var(--space-2);user-select:none}.agent-meta[data-v-9ea90d44]:after{content:"";flex:1;height:var(--p-hairline);background:var(--color-line)}.agent-meta-text[data-v-9ea90d44]{font:var(--text-xs)/1 var(--font-ui);color:var(--color-text-muted);white-space:nowrap;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.agent-prompt[data-v-9ea90d44]{flex:none;display:flex;flex-direction:column;padding:0 var(--space-3) var(--space-2)}.agent-prompt-bubble[data-v-9ea90d44]{display:flex;flex-direction:column;align-self:flex-end;max-width:78%;padding:10px 12px;background:var(--color-user-bubble-bg);border-radius:var(--radius-lg)}.agent-prompt-wrap[data-v-9ea90d44]{position:relative;display:flex;flex-direction:column}.agent-prompt-text[data-v-9ea90d44]{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--content-font-size);line-height:var(--leading-normal);color:var(--color-text)}.agent-prompt-text.is-command[data-v-9ea90d44]{font-family:var(--font-mono)}.agent-prompt-wrap.is-clamped>.agent-prompt-text[data-v-9ea90d44]{max-height:6lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 2.5lh),transparent calc(100% - .5lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 2.5lh),transparent calc(100% - .5lh))}.agent-prompt-toggle[data-v-9ea90d44]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-1);padding:var(--space-1) var(--space-3);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:1;cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.agent-prompt-toggle[data-v-9ea90d44]:hover{box-shadow:var(--shadow-md)}.agent-prompt-toggle[data-v-9ea90d44]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.agent-prompt-wrap.is-clamped .agent-prompt-toggle[data-v-9ea90d44]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.agent-prompt-toggle-car[data-v-9ea90d44]{transition:transform var(--duration-base) var(--ease-out)}.agent-prompt-toggle-car.open[data-v-9ea90d44]{transform:rotate(180deg)}.agent-transcript[data-v-9ea90d44]{position:relative;flex:1;min-height:0;overflow-y:auto}.agent-transcript-inner[data-v-9ea90d44]{display:flex;flex-direction:column;min-height:100%;width:100%;max-width:var(--p-content-max);margin-inline:auto}.agent-transcript[data-v-9ea90d44] .think-body,.agent-transcript[data-v-9ea90d44] .ar-body,.agent-transcript[data-v-9ea90d44] .tf-body,.agent-transcript[data-v-9ea90d44] .bb,.agent-transcript[data-v-9ea90d44] .tl-body{transition:none}.agent-error[data-v-9ea90d44]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.agent-fallback[data-v-9ea90d44]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.fallback-lines[data-v-9ea90d44]{margin:0;color:var(--color-text-muted);font:var(--text-sm)/var(--leading-relaxed) var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere}.agent-jump-btn[data-v-9ea90d44]{position:sticky;left:50%;bottom:var(--space-3);transform:translate(-50%);z-index:var(--z-sticky);display:inline-flex;align-items:center;gap:6px;padding:6px var(--space-3);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-ui-strong);line-height:1.5;white-space:nowrap;cursor:pointer;user-select:none}.agent-jump-btn[data-v-9ea90d44]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.agent-jump-car[data-v-9ea90d44]{width:12px;height:12px}.agent-jump-enter-active[data-v-9ea90d44],.agent-jump-leave-active[data-v-9ea90d44]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.agent-jump-enter-from[data-v-9ea90d44],.agent-jump-leave-to[data-v-9ea90d44]{opacity:0;transform:translate(-50%,6px)}.tdp[data-v-8b9af3ab]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.tdp-body[data-v-8b9af3ab]{flex:1;min-height:0;overflow:auto;font-family:var(--mono)}.tdp-output[data-v-8b9af3ab]{padding:8px 12px;color:var(--dim);font-size:var(--text-base);line-height:1.7;white-space:pre-wrap;word-break:break-word}.tdp-empty[data-v-8b9af3ab]{padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center}.hl-code[data-v-4b6e3ce1]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-4b6e3ce1]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-code.responsive-wrap[data-v-4b6e3ce1]{--hl-sticky-bg: var(--color-bg);--hl-gutter-width: calc( var(--gutter-ch, 4ch) + var(--space-2) + var(--space-2) + var(--p-hairline) )}.hl-body[data-v-4b6e3ce1]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-4b6e3ce1]{padding-left:var(--space-3)}.hl-row[data-v-4b6e3ce1]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-4b6e3ce1]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-4b6e3ce1]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-4b6e3ce1]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-code.responsive-wrap .hl-gutter[data-v-4b6e3ce1]{position:sticky;left:0;z-index:var(--z-raised);background:var(--hl-sticky-bg)}.hl-code.responsive-wrap .hl-gutter.new.offset[data-v-4b6e3ce1]{left:var(--hl-gutter-width)}.hl-code.responsive-wrap .hl-sign[data-v-4b6e3ce1]{position:sticky;left:0;z-index:var(--z-raised);background:var(--hl-sticky-bg)}.hl-code.responsive-wrap.one-gutter .hl-sign[data-v-4b6e3ce1]{left:var(--hl-gutter-width)}.hl-code.responsive-wrap.two-gutters .hl-sign[data-v-4b6e3ce1]{left:calc(var(--hl-gutter-width) + var(--hl-gutter-width))}.hl-gutter+.hl-text[data-v-4b6e3ce1]{padding-left:var(--space-2)}.row-add[data-v-4b6e3ce1]{--hl-sticky-bg: color-mix(in srgb, var(--color-success) 18%, var(--color-bg));background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-4b6e3ce1]{color:var(--color-success)}.row-del[data-v-4b6e3ce1]{--hl-sticky-bg: color-mix(in srgb, var(--color-danger) 18%, var(--color-bg));background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-4b6e3ce1]{color:var(--color-danger)}.row-hunk[data-v-4b6e3ce1]{--hl-sticky-bg: var(--color-surface-sunken);background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-4b6e3ce1]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-4b6e3ce1]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-4b6e3ce1]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}@container (max-width: 560px){.hl-code.responsive-wrap .hl-body[data-v-4b6e3ce1],.hl-code.responsive-wrap .hl-row[data-v-4b6e3ce1]{width:100%;min-width:0}.hl-code.responsive-wrap .hl-text[data-v-4b6e3ce1]{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}}.turn-diff-panel[data-v-67a3cc7e]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-surface)}.tdp-body[data-v-67a3cc7e]{min-height:0;overflow:auto;padding:var(--space-3);display:flex;flex-direction:column;gap:var(--space-3)}.tdp-file[data-v-67a3cc7e]{min-width:0;border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;background:var(--color-surface-raised)}.tdp-file-head[data-v-67a3cc7e]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line)}.tdp-path[data-v-67a3cc7e]{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.tdp-diff[data-v-67a3cc7e]{overflow:auto;background:var(--color-surface)}.tdp-unavailable[data-v-67a3cc7e]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.tdp-unavailable p[data-v-67a3cc7e]{margin:0}.ui-thinking-indicator[data-v-ed8aef9e]{display:inline-flex;align-items:center;justify-content:center;flex:none;line-height:1;color:var(--color-accent);font-family:var(--font-mono);user-select:none;position:relative}.ui-thinking-indicator--sm[data-v-ed8aef9e]{width:14px;height:14px;font-size:14px}.ui-thinking-indicator--md[data-v-ed8aef9e]{width:18px;height:18px;font-size:18px}.ui-thinking-indicator--lg[data-v-ed8aef9e]{width:24px;height:24px;font-size:24px}.ui-thinking-indicator__frame[data-v-ed8aef9e]{position:absolute;inset:0;display:grid;place-items:center;opacity:0;animation:ui-thinking-indicator-frame-ed8aef9e .64s steps(1,end) infinite;animation-delay:var(--thinking-frame-delay)}.ui-thinking-indicator--fast .ui-thinking-indicator__frame[data-v-ed8aef9e]{animation-duration:.32s;animation-delay:var(--thinking-frame-fast-delay)}@keyframes ui-thinking-indicator-frame-ed8aef9e{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.ui-thinking-indicator__frame[data-v-ed8aef9e]{animation:none}.ui-thinking-indicator__frame[data-v-ed8aef9e]:first-child{opacity:1}}.sc[data-v-130e8cd2]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-130e8cd2]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-130e8cd2]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-130e8cd2]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:1px solid var(--line);background:var(--panel)}.sc-input[data-v-130e8cd2]{flex:1;min-width:0;resize:none;border:1px solid var(--line);border-radius:var(--r-sm, 8px);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-130e8cd2]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-130e8cd2]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm, 8px);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-130e8cd2]:disabled{opacity:.4;cursor:default}.sc-send[data-v-130e8cd2]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-130e8cd2]{flex:none;padding:8px 12px 12px}.sc-body[data-v-130e8cd2] .sending-placeholder,.sc-body[data-v-130e8cd2] .sending-line{display:none}.changes-pane[data-v-811473b6]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-811473b6],.dv-change-count[data-v-811473b6]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-811473b6]{flex:1}.ch-head[data-v-811473b6]{display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden}.br-label[data-v-811473b6]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px))}.br-name[data-v-811473b6]{color:var(--color-accent);font-weight:500;font-size:var(--ui-font-size)}.sync-info[data-v-811473b6]{display:flex;align-items:center;gap:4px}.ahead[data-v-811473b6]{color:var(--color-accent);font-size:var(--text-base)}.behind[data-v-811473b6]{color:var(--color-warning);font-size:var(--text-base)}.empty-head[data-v-811473b6]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-811473b6]{flex:1;overflow-y:auto;padding:4px 0}.ch-row[data-v-811473b6]{display:flex;align-items:center;gap:10px;padding:6px 16px;cursor:pointer;font-size:var(--ui-font-size);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:inherit;color:inherit}.ch-row[data-v-811473b6]:hover{background:var(--panel2, #f5f6f8)}.ch-row[data-v-811473b6]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-811473b6]{padding:4px 0}.tree-list[data-v-811473b6]{list-style:none;margin:0;padding:0}.tree-row[data-v-811473b6]{display:flex;align-items:center;gap:8px;width:100%;padding:5px 16px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--ui-font-size);color:inherit;cursor:pointer}.tree-row[data-v-811473b6]:hover{background:var(--panel2, #f5f6f8)}.tree-row[data-v-811473b6]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-811473b6]{color:var(--color-text);font-weight:500}.tree-file[data-v-811473b6]{color:var(--color-text)}.tree-icon[data-v-811473b6]{flex:none;color:var(--muted)}.tree-name[data-v-811473b6]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-811473b6]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-811473b6]{background:color-mix(in srgb,var(--color-accent) 12%,var(--bg));color:var(--color-accent)}.badge.added[data-v-811473b6]{background:color-mix(in srgb,var(--color-success) 10%,var(--bg));color:var(--color-success)}.badge.deleted[data-v-811473b6]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger)}.badge.renamed[data-v-811473b6]{background:color-mix(in srgb,var(--color-warning) 12%,var(--bg));color:var(--color-warning)}.badge.untracked[data-v-811473b6]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.badge.conflicted[data-v-811473b6]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-811473b6]{background:var(--color-surface-sunken);color:var(--faint, #c0c5cc)}.badge.clean[data-v-811473b6]{background:transparent;color:var(--faint, #c0c5cc)}.badge.unknown[data-v-811473b6]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.fpath[data-v-811473b6]{color:var(--color-text);font-size:var(--ui-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.empty-state[data-v-811473b6]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center;user-select:none}.diff-loading[data-v-811473b6]{flex-direction:row;gap:var(--space-2)}.diff-head[data-v-811473b6]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-811473b6]{flex:1;min-width:0;min-height:0;overflow:auto;container-type:inline-size}.diff-content-enter-active[data-v-811473b6],.diff-content-leave-active[data-v-811473b6]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-811473b6],.diff-content-leave-to[data-v-811473b6]{opacity:0}@media(max-width:640px){.ch-head[data-v-811473b6]{padding:10px 14px}.ch-list[data-v-811473b6]{padding:2px 0 12px}.ch-row[data-v-811473b6]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--ui-font-size-sm)}.ch-row[data-v-811473b6]:active{background:var(--panel2, #f5f6f8)}.badge[data-v-811473b6]{width:18px;height:18px}.fpath[data-v-811473b6]{font-size:var(--ui-font-size-sm)}.tree-row[data-v-811473b6]{min-height:40px;padding:8px 14px}.diff-head[data-v-811473b6]{padding:8px 12px;gap:10px}.diff-path[data-v-811473b6]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-811473b6],.br-label[data-v-811473b6],.empty-head[data-v-811473b6]{font-family:var(--sans)}.ch-row[data-v-811473b6],.ct-row[data-v-811473b6]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-811473b6],.changed-tree .badge[data-v-811473b6]{border-radius:var(--radius-sm)}.change-count[data-v-811473b6]{font-family:var(--sans);border-radius:999px}.panel-tab-bar[data-v-da364eda]{position:relative;display:flex;align-items:center;min-width:0;height:44px;border-bottom:1px solid var(--color-line);background:var(--color-bg);user-select:none}.ptb-tabs[data-v-da364eda]{display:flex;flex:1;min-width:0;height:100%;overflow-x:auto;scrollbar-width:none}.ptb-tabs[data-v-da364eda]::-webkit-scrollbar{display:none}.ptb-tab[data-v-da364eda]{display:flex;align-items:center;flex:0 1 180px;min-width:82px;max-width:220px;border-right:1px solid var(--color-line);color:var(--color-text-muted)}.ptb-tab.on[data-v-da364eda]{background:var(--color-surface-raised);color:var(--color-text);box-shadow:inset 0 -2px 0 var(--color-accent)}.ptb-tab-main[data-v-da364eda]{display:flex;align-items:center;gap:var(--space-2);flex:1;min-width:0;height:100%;padding:0 var(--space-2) 0 var(--space-3);border:0;background:transparent;color:inherit;font:var(--text-sm) var(--font-ui);cursor:pointer}.ptb-tab-main[data-v-da364eda]:focus-visible,.ptb-x[data-v-da364eda]:focus-visible{outline:none;box-shadow:inset var(--p-focus-ring)}.ptb-t[data-v-da364eda]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ptb-x[data-v-da364eda]{position:relative;display:grid;place-items:center;flex:none;width:28px;height:28px;margin-right:var(--space-1);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);cursor:pointer}.ptb-x[data-v-da364eda]:hover{color:var(--color-text);background:var(--color-hover)}.ptb-tail[data-v-da364eda]{position:relative;display:flex;align-items:center;gap:var(--space-1);flex:none;padding-inline:var(--space-2)}.panel-add-menu[data-v-da364eda]{position:absolute;top:calc(100% + var(--space-1));right:var(--space-2);z-index:var(--z-dropdown);display:flex;flex-direction:column;width:190px;padding:var(--space-1);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-md)}.panel-add-menu button[data-v-da364eda]{display:flex;align-items:center;gap:var(--space-2);min-height:34px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:var(--text-sm) var(--font-ui);cursor:pointer}.panel-add-menu button[data-v-da364eda]:hover:not(:disabled),.panel-add-menu button[data-v-da364eda]:focus-visible{background:var(--color-hover);outline:none}.panel-add-menu button[data-v-da364eda]:disabled{color:var(--color-text-faint);cursor:default}@media(pointer:coarse){.ptb-tab-main[data-v-da364eda]:after,.ptb-x[data-v-da364eda]:after{content:"";position:absolute;inset:calc((var(--touch-target-min) - 28px) / -2)}.ptb-tab-main[data-v-da364eda],.ptb-x[data-v-da364eda]{position:relative}}.mp[data-v-466b8fec]{display:flex;flex-direction:column;gap:var(--space-2);min-height:0}.mp--sheet[data-v-466b8fec]{height:auto;padding:0 var(--space-4)}.search-wrap[data-v-466b8fec]{padding-bottom:var(--space-1)}.tab-strip[data-v-466b8fec]{display:flex;gap:var(--space-1);overflow-x:auto}.model-list[data-v-466b8fec]{display:flex;flex-direction:column;padding:var(--space-1) 0}.model-row[data-v-466b8fec]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-2);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.model-row[data-v-466b8fec]:hover,.model-row.is-selected[data-v-466b8fec]{background:var(--color-surface-sunken)}.model-row.is-current[data-v-466b8fec]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.check[data-v-466b8fec]{width:14px;height:14px;color:var(--color-accent);flex:none;display:flex;align-items:center;justify-content:center}.model-main[data-v-466b8fec]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-466b8fec]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-id[data-v-466b8fec]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-provider[data-v-466b8fec]{flex:none;max-width:110px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-ctx[data-v-466b8fec]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.caps[data-v-466b8fec]{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}.state-row[data-v-466b8fec]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-466b8fec]{color:var(--color-warning)}.empty[data-v-466b8fec]{padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-466b8fec]{padding-top:var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:1px solid var(--color-line)}@media(max-width:640px){.mp--sheet .model-list[data-v-466b8fec]{max-height:58vh;overflow-y:auto}.model-provider[data-v-466b8fec],.caps[data-v-466b8fec]{display:none}}.ui-switch[data-v-d7337ade]{position:relative;width:36px;height:20px;flex:none;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-d7337ade]{background:var(--color-accent)}.ui-switch[data-v-d7337ade]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-d7337ade]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-d7337ade]{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--surface-light);box-shadow:var(--shadow-xs);transition:transform var(--duration-base) var(--ease-out)}.ui-switch.is-on .ui-switch__thumb[data-v-d7337ade]{background:var(--color-text-on-accent);transform:translate(16px)}.ui-select[data-v-77d887db]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background-color:var(--color-surface-raised);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right var(--space-3) center;background-size:16px 16px;box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);padding-right:calc(var(--space-3) + 16px + var(--space-2));cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-select--md[data-v-77d887db]{height:38px}.ui-select--sm[data-v-77d887db]{height:32px;font-size:var(--text-sm)}.ui-select[data-v-77d887db]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-select[data-v-77d887db]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select[data-v-77d887db]:disabled{opacity:.5;cursor:not-allowed}.ui-select.has-error[data-v-77d887db]{border-color:var(--color-danger)}.ui-select.has-error[data-v-77d887db]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}html[data-color-scheme=dark] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}@media(prefers-color-scheme:dark){html[data-color-scheme=system] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}}.ui-skeleton[data-v-f4989189]{display:block;border-radius:var(--radius-sm);background:var(--color-surface-sunken);animation:ui-skeleton-breathe-f4989189 1.2s var(--ease-in-out) infinite}.ui-skeleton.is-circle[data-v-f4989189]{border-radius:var(--radius-full)}@keyframes ui-skeleton-breathe-f4989189{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.ui-skeleton[data-v-f4989189]{animation:none;opacity:.6}}.ui-field[data-v-bd93f701]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-bd93f701]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-danger)}.provider-form[data-v-66e70e30]{display:flex;flex-direction:column;gap:var(--space-4)}.provider-form__fields[data-v-66e70e30]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}.provider-form__key[data-v-66e70e30]{position:relative}.provider-form__key[data-v-66e70e30] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.provider-form__eye[data-v-66e70e30]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.provider-form__models-head[data-v-66e70e30]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}.provider-form__models[data-v-66e70e30]{overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.provider-form__model[data-v-66e70e30]{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(120px,.7fr) minmax(160px,1fr) 32px;gap:var(--space-2);align-items:center;padding:var(--space-2);border-top:1px solid var(--color-line)}.provider-form__model--head[data-v-66e70e30]{border-top:0;background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.provider-form__error[data-v-66e70e30]{color:var(--color-danger);font-size:var(--text-sm)}.provider-form__row-error[data-v-66e70e30]{color:var(--color-danger);font-size:var(--text-xs);padding:0 var(--space-2) var(--space-2)}.provider-form__model.has-error[data-v-66e70e30]{background:var(--color-danger-soft, transparent)}.provider-form__actions[data-v-66e70e30]{display:flex;justify-content:flex-end;gap:var(--space-2)}@media(max-width:640px){.provider-form__fields[data-v-66e70e30]{grid-template-columns:1fr}}.add-provider-flow[data-v-01edc4ef]{display:flex;flex-direction:column;gap:var(--space-4)}.add-provider-flow__section[data-v-01edc4ef],.add-provider-flow__form[data-v-01edc4ef]{display:flex;flex-direction:column;gap:var(--space-3)}.add-provider-flow__state[data-v-01edc4ef]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-muted)}.add-provider-flow__catalog[data-v-01edc4ef]{max-height:320px;overflow-y:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.add-provider-flow__entry[data-v-01edc4ef]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:36px;padding:var(--space-2) var(--space-3);border:0;border-top:1px solid var(--color-line);background:transparent;color:var(--color-text);text-align:left;cursor:pointer}.add-provider-flow__entry[data-v-01edc4ef]:first-child{border-top:0}.add-provider-flow__entry[data-v-01edc4ef]:hover:not(:disabled){background:var(--color-hover)}.add-provider-flow__entry[data-v-01edc4ef]:disabled{opacity:.55;cursor:not-allowed}.add-provider-flow__entry>span[data-v-01edc4ef]:last-child{color:var(--color-text-faint);font-size:var(--text-xs)}.add-provider-flow__name[data-v-01edc4ef]{font-weight:var(--weight-medium)}.add-provider-flow__grow[data-v-01edc4ef]{flex:1}.add-provider-flow__empty[data-v-01edc4ef]{padding:var(--space-4);color:var(--color-text-muted);text-align:center}.add-provider-flow__back[data-v-01edc4ef]{align-self:flex-start;display:inline-flex;align-items:center;gap:var(--space-1);padding:0;border:0;background:transparent;color:var(--color-text-muted);cursor:pointer}.add-provider-flow__back-icon[data-v-01edc4ef]{transform:rotate(180deg)}.add-provider-flow__key[data-v-01edc4ef]{position:relative}.add-provider-flow__key[data-v-01edc4ef] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.add-provider-flow__eye[data-v-01edc4ef]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.add-provider-flow__note[data-v-01edc4ef]{margin:0;color:var(--color-text-muted);font-size:var(--text-sm)}.add-provider-flow__warning[data-v-01edc4ef]{color:var(--color-warning);font-size:var(--text-sm)}.add-provider-flow__error[data-v-01edc4ef]{color:var(--color-danger);font-size:var(--text-sm)}.add-provider-flow__actions[data-v-01edc4ef]{display:flex;justify-content:flex-end;gap:var(--space-2)}.providers-panel[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) 0}.providers-panel__heading[data-v-66a5ed6a]{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-3)}.providers-panel__heading h3[data-v-66a5ed6a]{margin:0;color:var(--color-text);font-size:var(--text-xl);font-weight:var(--weight-medium)}.providers-panel__heading p[data-v-66a5ed6a]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.providers-pane-label[data-v-66a5ed6a]{padding:0 var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase}.providers-panel__split[data-v-66a5ed6a]{display:grid;grid-template-columns:minmax(170px,216px) minmax(0,1fr);gap:var(--space-5);align-items:start}.providers-panel__list[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-1)}.providers-panel__list .providers-pane-label[data-v-66a5ed6a]:not(:first-child){margin-top:var(--space-3)}.providers-panel__row[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:44px;padding:var(--space-1-5) var(--space-2);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.providers-panel__row[data-v-66a5ed6a]:hover{background:var(--color-hover)}.providers-panel__row[data-v-66a5ed6a]:focus-visible{outline:none;box-shadow:inset var(--p-focus-ring)}.providers-panel__row.is-selected[data-v-66a5ed6a]{background:var(--color-selected)}.providers-panel__row-name[data-v-66a5ed6a]{overflow:hidden;flex:1;font-size:var(--text-base);font-weight:var(--weight-medium);text-overflow:ellipsis;white-space:nowrap}.providers-panel__row-dot[data-v-66a5ed6a]{width:7px;height:7px;flex:none;border-radius:var(--radius-full);background:var(--color-text-faint)}.providers-panel__row-dot.is-ok[data-v-66a5ed6a]{background:var(--color-success)}.providers-panel__row-dot.is-error[data-v-66a5ed6a]{background:var(--color-danger)}.providers-panel__tile[data-v-66a5ed6a]{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-md);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:1}.providers-panel__tile.is-ok[data-v-66a5ed6a]{color:var(--color-success)}.providers-panel__tile.is-error[data-v-66a5ed6a]{color:var(--color-danger)}.providers-panel__add-icon[data-v-66a5ed6a]{display:grid;place-items:center;width:26px;height:26px;flex:none;border:1px dashed var(--color-line-strong);border-radius:var(--radius-md);color:var(--color-text-muted)}.providers-panel__row--add .providers-panel__row-name[data-v-66a5ed6a]{color:var(--color-text-muted);font-weight:var(--weight-regular)}.providers-panel__row--add:hover .providers-panel__row-name[data-v-66a5ed6a],.providers-panel__row--add.is-selected .providers-panel__row-name[data-v-66a5ed6a]{color:var(--color-text)}.providers-panel__row--add.is-selected .providers-panel__add-icon[data-v-66a5ed6a]{border-style:solid;border-color:var(--color-accent-bd);color:var(--color-accent)}.providers-panel__row--skeleton[data-v-66a5ed6a]{gap:var(--space-2)}.providers-panel__detail[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-4);min-width:0;padding-top:var(--space-1)}.providers-detail__head[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-3)}.providers-detail__tile[data-v-66a5ed6a]{display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-lg);font-weight:var(--weight-medium);line-height:1}.providers-detail__identity[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-1);min-width:0}.providers-detail__name-row[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-2)}.providers-detail__name-row h4[data-v-66a5ed6a]{margin:0;overflow:hidden;color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-medium);text-overflow:ellipsis;white-space:nowrap}.providers-detail__meta[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-1-5);overflow:hidden;margin:0;color:var(--color-text-muted);font-size:var(--text-xs);white-space:nowrap}.providers-detail__meta .mono[data-v-66a5ed6a]{overflow:hidden;font-family:var(--font-mono);text-overflow:ellipsis}.providers-detail__sec[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-2)}.providers-detail__sec-head[data-v-66a5ed6a]{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-3)}.providers-detail__count[data-v-66a5ed6a]{color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.providers-detail__empty[data-v-66a5ed6a]{margin:0;color:var(--color-text-faint);font-size:var(--text-sm)}.providers-model-card[data-v-66a5ed6a]{overflow:hidden;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-bg)}.providers-model-row[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-3);min-height:42px;padding:var(--space-1-5) var(--space-4)}.providers-model-row+.providers-model-row[data-v-66a5ed6a]{border-top:1px solid var(--color-line)}.providers-model-row code[data-v-66a5ed6a]{overflow:hidden;font-family:var(--font-mono);font-size:var(--text-sm);text-overflow:ellipsis;white-space:nowrap}.providers-model-name[data-v-66a5ed6a]{overflow:hidden;color:var(--color-text-faint);font-size:var(--text-xs);text-overflow:ellipsis;white-space:nowrap}.providers-model-grow[data-v-66a5ed6a]{flex:1}.providers-detail__foot[data-v-66a5ed6a]{display:flex;justify-content:flex-start;padding-top:var(--space-2);border-top:1px solid var(--color-line)}@media(max-width:640px){.providers-panel__split[data-v-66a5ed6a]{grid-template-columns:1fr;gap:var(--space-4)}.providers-panel__detail[data-v-66a5ed6a]{padding-top:0}}.sm-picker[data-v-5b749db7]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-5b749db7]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.sm-picker__trigger[data-v-5b749db7]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-5b749db7]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__trigger[data-v-5b749db7]:disabled{cursor:not-allowed;opacity:.6}.sm-picker__value[data-v-5b749db7]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value>span[data-v-5b749db7]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-5b749db7]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-5b749db7]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-fast) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-5b749db7]{transform:rotate(180deg)}.sm-picker__menu[data-v-5b749db7]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-5b749db7]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-5b749db7]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-5b749db7]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-5b749db7]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-5b749db7]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__divider[data-v-5b749db7]{height:1px;margin:var(--space-1) var(--space-2);background:var(--color-line)}.sm-picker__option[data-v-5b749db7]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option[data-v-5b749db7]:hover,.sm-picker__option.is-active[data-v-5b749db7]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-5b749db7]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-5b749db7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-5b749db7]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-5b749db7]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-5b749db7]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-c89555a1]{display:flex;flex-direction:row;min-height:0;height:100%}.settings-tabs[data-v-c89555a1]{display:flex;flex-direction:column;flex:none;width:148px;padding:var(--space-2);gap:2px;overflow-y:auto}.tab[data-v-c89555a1]{text-align:left;display:flex;align-items:center;gap:var(--space-2);padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab .ui-icon[data-v-c89555a1]{flex:none;color:var(--color-text-faint)}.tab.on .ui-icon[data-v-c89555a1]{color:var(--color-accent)}.tab[data-v-c89555a1]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.tab.on[data-v-c89555a1]{background:var(--color-accent-soft);color:var(--color-accent);font-weight:var(--weight-medium)}.tab[data-v-c89555a1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-c89555a1]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) var(--space-5) var(--space-5) var(--space-6);flex:1;min-width:0}.panel[data-v-c89555a1]{display:block}.sec[data-v-c89555a1]{padding:var(--space-4) 0;border-bottom:1px solid var(--color-line)}.sec[data-v-c89555a1]:last-child{border-bottom:none}.sec-head[data-v-c89555a1]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-c89555a1]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-muted)}.sec-head .sec-title[data-v-c89555a1]{margin-bottom:0}.saving[data-v-c89555a1]{flex:none;font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.row[data-v-c89555a1]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.rlabel[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);display:flex;flex-direction:column;gap:var(--space-1)}.rvalue[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-c89555a1]{font-family:var(--font-mono);font-size:var(--text-xs)}.value-wrap[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-1);max-width:60%;min-width:0;flex:none}.value-wrap .rvalue[data-v-c89555a1]{max-width:100%}.hint[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.flag-chip[data-v-c89555a1]{display:inline-block;width:fit-content;margin-top:var(--space-1);padding:1px var(--space-2);border-radius:var(--radius-full);border:1px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.flag-chip--warn[data-v-c89555a1]{color:var(--color-warning);border-color:var(--color-warning-bd);background:var(--color-warning-soft)}.desktop-update-card[data-v-c89555a1]{--desktop-update-icon-size: 42px;--desktop-update-select-min-width: 180px;--desktop-update-select-max-width: 220px;overflow:hidden;border:1px solid var(--color-line);border-radius:var(--radius-xl);background:var(--color-surface-raised)}.desktop-update-row[data-v-c89555a1]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);padding:var(--space-4)}.desktop-update-row+.desktop-update-row[data-v-c89555a1],.desktop-update-detail[data-v-c89555a1]{border-top:1px solid var(--color-line)}.desktop-update-row .rlabel[data-v-c89555a1]{min-width:0;flex:1}.desktop-update-summary-copy[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-3);min-width:0}.desktop-update-icon[data-v-c89555a1]{display:inline-flex;align-items:center;justify-content:center;width:var(--desktop-update-icon-size);height:var(--desktop-update-icon-size);flex:none;border-radius:var(--radius-lg);background:var(--color-success-soft);color:var(--color-success)}.desktop-update-title[data-v-c89555a1]{font-size:var(--text-lg);font-weight:var(--weight-semibold)}.desktop-update-select[data-v-c89555a1]{min-width:var(--desktop-update-select-min-width);max-width:var(--desktop-update-select-max-width)}.desktop-update-detail[data-v-c89555a1]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.desktop-update-progress[data-v-c89555a1]{display:flex;flex-direction:column;gap:var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.desktop-update-progress progress[data-v-c89555a1]{width:100%;height:7px;overflow:hidden;border:0;border-radius:var(--radius-full);background:var(--color-surface-sunken);accent-color:var(--color-accent)}.desktop-update-progress progress[data-v-c89555a1]::-webkit-progress-bar{border-radius:var(--radius-full);background:var(--color-surface-sunken)}.desktop-update-progress progress[data-v-c89555a1]::-webkit-progress-value{border-radius:var(--radius-full);background:var(--color-accent)}.desktop-update-actions[data-v-c89555a1]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--space-2)}.select-wrap[data-v-c89555a1]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text-muted);padding:var(--space-1) 0}.actions[data-v-c89555a1]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}@media(max-width:640px){.sd[data-v-c89555a1]{flex-direction:column}.settings-tabs[data-v-c89555a1]{flex-direction:row;width:auto;padding:var(--space-2) var(--space-3);gap:var(--space-1);overflow-x:auto}.tab[data-v-c89555a1]{white-space:nowrap;flex:none}.row[data-v-c89555a1]{align-items:flex-start;flex-direction:column}.select-wrap[data-v-c89555a1]{width:100%;max-width:none}.desktop-update-row[data-v-c89555a1]{align-items:flex-start;flex-direction:column}.desktop-update-summary-copy[data-v-c89555a1]{width:100%}.desktop-update-select[data-v-c89555a1]{max-width:none}}.setting-card[data-v-c89555a1]{border:1px solid var(--color-line);border-radius:var(--radius-xl);overflow:hidden;background:var(--color-bg)}.panel-head[data-v-c89555a1]{margin-bottom:var(--space-4)}.panel-kicker[data-v-c89555a1]{font-size:var(--text-xs);letter-spacing:.05em;text-transform:uppercase;color:var(--color-text-faint);margin-bottom:var(--space-1)}.panel-title[data-v-c89555a1]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-2xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;color:var(--color-text)}.panel-desc[data-v-c89555a1]{margin:0;font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-c89555a1]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:1px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-sm);background:var(--color-surface-raised);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-c89555a1]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-c89555a1]{width:15px;height:15px;flex:none}.archive-search input[data-v-c89555a1]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-c89555a1]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-c89555a1]{margin-bottom:0}.archive-workspace[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-sm);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-c89555a1]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-c89555a1]{font-family:var(--font-mono);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-c89555a1]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-regular);font-size:var(--text-xs);flex:none}.archive-row[data-v-c89555a1]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:1px solid var(--color-line)}.archive-row[data-v-c89555a1]:first-child{border-top:none}.archive-row[data-v-c89555a1]:hover{background:var(--color-surface-sunken)}.archive-meta[data-v-c89555a1]{min-width:0}.archive-name[data-v-c89555a1]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-c89555a1]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-mono)}.archive-draining[data-v-c89555a1]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-sm)}.archive-empty[data-v-c89555a1]{padding:var(--space-6) var(--space-4);border:1px solid var(--color-line);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-sm);text-align:center;background:var(--color-bg)}@media(max-width:640px){.archive-toolbar[data-v-c89555a1]{flex-direction:column;align-items:stretch}.archive-search[data-v-c89555a1]{min-width:0}}[data-v-c89555a1] .ui-dialog{width:min(980px,96vw)}[data-v-c89555a1] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.routing-modes[data-v-c89555a1]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:6px 0 10px}.routing-mode[data-v-c89555a1]{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border:1px solid var(--color-line);border-radius:var(--radius-md);cursor:pointer}.routing-mode.on[data-v-c89555a1]{border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.routing-mode input[data-v-c89555a1]{position:absolute;opacity:0;width:0;height:0}.routing-mode[data-v-c89555a1]:has(input:focus-visible){outline:none;box-shadow:var(--p-focus-ring)}.routing-mode-title[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.pool-list[data-v-c89555a1]{display:flex;flex-direction:column;gap:4px;min-width:0}.pool-item[data-v-c89555a1]{display:flex;align-items:center;gap:8px;font-family:var(--font-ui);font-size:var(--text-sm)}.pool-name[data-v-c89555a1]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pool-default[data-v-c89555a1]{padding:1px 8px;border-radius:var(--radius-full);border:1px solid var(--color-line);background:transparent;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);cursor:pointer}.pool-default.on[data-v-c89555a1]{border-color:var(--color-accent-bd);color:var(--color-text)}.pool-default[data-v-c89555a1]:disabled{opacity:.5;cursor:default}.routing-effective[data-v-c89555a1]{flex-wrap:wrap;gap:4px 16px}.aw[data-v-09b74e91]{margin-left:calc(-1 * var(--space-5));margin-right:calc(-1 * var(--space-5));margin-bottom:calc(-1 * var(--space-4))}.crumbbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.crumbs[data-v-09b74e91]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-09b74e91]{color:var(--color-text-muted)}.crumb[data-v-09b74e91]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-09b74e91]:hover{color:var(--color-accent);background:var(--color-surface-sunken)}.crumb.last[data-v-09b74e91]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.filter-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-09b74e91]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-09b74e91]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-09b74e91]{color:var(--color-text)}.filterbar.has-error[data-v-09b74e91]{border-bottom-color:var(--color-danger)}.filterbar.has-error .filter-icon[data-v-09b74e91]{color:var(--color-danger)}.folder-list[data-v-09b74e91]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-09b74e91],.fl-empty[data-v-09b74e91]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.fl-note[data-v-09b74e91]{padding:var(--space-2) var(--space-4);font-size:var(--text-sm);color:var(--color-text-muted)}.fl-error[data-v-09b74e91]{color:var(--color-danger)}.folder-row[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-1) var(--space-4);border-radius:var(--radius-md)}.folder-row[data-v-09b74e91]:hover{background:var(--color-surface-sunken)}.dir-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-row:hover .dir-icon[data-v-09b74e91]{color:var(--color-accent)}.folder-name[data-v-09b74e91]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.degraded-hint[data-v-09b74e91]{padding:var(--space-6) var(--space-5);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.add-error[data-v-09b74e91]{margin:0 14px 8px;padding:6px 10px;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:#b3261e;background:#b3261e14;border:1px solid rgba(179,38,30,.25);border-radius:3px}.actions[data-v-09b74e91]{display:flex;justify-content:flex-end;gap:var(--space-3);padding:var(--space-4) var(--space-5)}.footer-hint[data-v-09b74e91]{padding:var(--space-2) var(--space-5);font-size:var(--text-xs);color:var(--color-text-muted);border-top:1px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-09b74e91]{min-height:44px}.crumbbar[data-v-09b74e91]{align-items:flex-start}.actions[data-v-09b74e91]{flex-wrap:wrap}}.confirm-dialog__message[data-v-074405fe]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-7992546c]{margin:0;padding:0}.row[data-v-7992546c]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-7992546c]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-7992546c]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-7992546c],.row dd.workflow-on[data-v-7992546c]{color:var(--color-accent)}.ctx-text[data-v-7992546c]{flex:none}.bar[data-v-7992546c]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-7992546c]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-7992546c]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-7992546c]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-7992546c]{width:auto}.row dd[data-v-7992546c]{max-width:100%;flex-wrap:wrap}}.toasts[data-v-6d8f28b8]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-6d8f28b8],.toast-leave-active[data-v-6d8f28b8]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-6d8f28b8],.toast-leave-to[data-v-6d8f28b8]{opacity:0;transform:translate(16px)}.toast-move[data-v-6d8f28b8]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-6d8f28b8]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-6d8f28b8]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-6d8f28b8]:hover{text-decoration:underline}.details[data-v-6d8f28b8]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:1px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-6d8f28b8]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-6d8f28b8]{color:var(--color-text-muted)}.detail-row dd[data-v-6d8f28b8]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-6d8f28b8]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-6d8f28b8]{grid-template-columns:1fr;gap:2px}}.update-dialog__head[data-v-13aac9b0]{display:flex;align-items:center;gap:var(--space-3);flex:1;min-width:0}.update-dialog__brand[data-v-13aac9b0]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-sunken);overflow:hidden}.update-dialog__titles[data-v-13aac9b0]{display:flex;flex-direction:column;gap:2px;min-width:0}.update-dialog__title[data-v-13aac9b0]{font-family:var(--font-ui);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.update-dialog__date[data-v-13aac9b0]{display:flex;align-items:center;gap:var(--space-1-5);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);color:var(--color-text-muted)}.update-dialog__message[data-v-13aac9b0]{margin:0;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);color:var(--color-text-muted)}.update-dialog__progress[data-v-13aac9b0]{display:flex;flex-direction:column;gap:var(--space-3)}.update-dialog__progress-row[data-v-13aac9b0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);min-width:0}.update-dialog__progress-label[data-v-13aac9b0]{font-family:var(--font-ui);font-size:var(--ui-font-size-sm);color:var(--color-text)}.update-dialog__progress-meta[data-v-13aac9b0]{min-width:0;font-family:var(--font-mono);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);text-align:right;white-space:nowrap}.update-dialog__foot-spacer[data-v-13aac9b0]{flex:1}.update-dialog__progress progress[data-v-13aac9b0]{width:100%;height:6px;border:0;border-radius:var(--radius-full);background:var(--color-surface-sunken);accent-color:var(--color-accent)}.update-dialog__progress progress[data-v-13aac9b0]::-webkit-progress-bar{border-radius:var(--radius-full);background:var(--color-surface-sunken)}.update-dialog__progress progress[data-v-13aac9b0]::-webkit-progress-value{border-radius:var(--radius-full);background:var(--color-accent)}.update-dialog__progress progress[data-v-13aac9b0]::-moz-progress-bar{border-radius:var(--radius-full);background:var(--color-accent)}@media(max-width:420px){.update-dialog__progress-row[data-v-13aac9b0]{align-items:flex-start;flex-direction:column;gap:var(--space-1-5)}.update-dialog__progress-meta[data-v-13aac9b0]{font-size:var(--ui-font-size-xs);text-align:left}}.ui-action-toast-host[data-v-9efa207b]{pointer-events:none}.ui-action-toast[data-v-9efa207b]{display:flex;align-items:center;gap:var(--space-3);min-width:260px;max-width:min(420px,calc(100vw - 32px));padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);box-shadow:var(--shadow-lg);color:var(--color-text);pointer-events:auto}.ui-action-toast__body[data-v-9efa207b]{flex:1;min-width:0;font-size:var(--text-sm)}.ui-action-toast__close[data-v-9efa207b]{flex:none}@media(max-width:640px){.ui-action-toast[data-v-9efa207b]{max-width:none;width:100%}}.window-controls[data-v-768f9703]{flex:none;height:32px;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 14px;background:var(--color-bg);border-bottom:.5px solid var(--color-line);-webkit-app-region:drag}.wc[data-v-768f9703]{width:14px;height:14px;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-app-region:no-drag;color:transparent}.wc-close[data-v-768f9703]{background:#ff5f57}.wc-min[data-v-768f9703]{background:#febc2e}.wc-max[data-v-768f9703]{background:#28c840}.window-controls:hover .wc[data-v-768f9703]{color:#0000008c}.wc[data-v-768f9703]:focus-visible{outline:2px solid var(--blue);outline-offset:2px;color:#0000008c}.topbar[data-v-27a83eb2]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:1px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-27a83eb2]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-27a83eb2]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-27a83eb2]{color:var(--color-text)}.tb-path .sl[data-v-27a83eb2]{color:var(--color-text-faint)}.tb-path .se[data-v-27a83eb2]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-27a83eb2]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-27a83eb2]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-27a83eb2]{background:var(--color-success)}.topbar .tb-path[data-v-27a83eb2]{font-family:var(--sans)}.newrow[data-v-4c7bceaf]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-4c7bceaf]:hover,.newrow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-4c7bceaf]:hover{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-4c7bceaf]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-4c7bceaf]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-4c7bceaf]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-4c7bceaf]{padding-top:2px}.mgh[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-4c7bceaf]:hover,.mgh[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-4c7bceaf]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-4c7bceaf]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-4c7bceaf]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-4c7bceaf]{margin:-10px -12px -10px 0}.mgh-add[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.mgh-more[data-v-4c7bceaf]{margin:-10px -8px}.mgh-more[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.srow[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-4c7bceaf]:hover,.srow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-4c7bceaf]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-4c7bceaf]{flex:1;min-width:0}.srow .m .t[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-4c7bceaf]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-4c7bceaf]{position:relative}.srow .m .t.run[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-4c7bceaf 1.4s ease-in-out infinite}@keyframes mRunPulse-4c7bceaf{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-4c7bceaf]{position:relative}.srow .m .t.aborted[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-4c7bceaf]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--surface-light);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.kmenu[data-v-4c7bceaf]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-4c7bceaf]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more[data-v-4c7bceaf]{display:flex;align-items:center;width:100%;min-height:44px;padding:var(--space-1) var(--m-pad) var(--space-1) var(--m-indent);background:none;border:none;color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-4c7bceaf]:active{color:var(--color-accent-hover);background:var(--color-surface-sunken)}.newrow[data-v-4c7bceaf]{font-family:var(--sans)}.mlist .srow[data-v-4c7bceaf]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-4c7bceaf]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-bcda0873]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-bcda0873]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-bcda0873]:hover:not(.read-only){background:var(--color-surface-sunken)}.srow[data-v-bcda0873]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-bcda0873]{cursor:default}.srow-main[data-v-bcda0873]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-bcda0873]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-bcda0873]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-bcda0873]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-bcda0873]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-bcda0873]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-bcda0873]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-bcda0873]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-bcda0873]{background:var(--color-accent)}.toggle[data-v-bcda0873]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:1px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-bcda0873]:after{left:21px}.srow.pref[data-v-bcda0873]{cursor:default}.goal-actions[data-v-bcda0873]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1)}.srow.acct.in .srow-label[data-v-bcda0873]{color:var(--color-accent-hover);font-weight:500}.ctx-meter[data-v-bcda0873]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-bcda0873]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-bcda0873]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-bcda0873],.cache-note[data-v-bcda0873]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-bcda0873]{flex:1 1 auto}.srow-sub[data-v-bcda0873]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-bcda0873]{flex-wrap:wrap}.srow.pref .srow-main[data-v-bcda0873]{flex:1 0 100%}.srow-val[data-v-bcda0873],.chev[data-v-bcda0873],.toggle[data-v-bcda0873],.ctx-meter[data-v-bcda0873],.goal-actions[data-v-bcda0873]{margin-top:2px}}.srow[data-v-bcda0873],.srow-sub[data-v-bcda0873],.srow-val[data-v-bcda0873],.cache-note[data-v-bcda0873]{font-family:var(--sans)}.arch-subhead[data-v-bcda0873]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-bcda0873]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-bcda0873]{font-size:20px}.arch-count[data-v-bcda0873]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-bcda0873]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-bcda0873]{flex:1;min-width:160px}.arch-row[data-v-bcda0873]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:1px solid var(--color-line)}.arch-row[data-v-bcda0873]:first-of-type{border-top:none}.arch-meta[data-v-bcda0873]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-bcda0873]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-bcda0873]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-bcda0873]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.wizard.is-embedded[data-v-2c24b7cb]{position:static;inset:auto;z-index:auto;width:100%;overflow:visible;background:transparent}.wizard.is-embedded .rail-inner[data-v-2c24b7cb]{width:100%;margin:0;padding:0}.wizard[data-v-2c24b7cb]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;overflow-y:auto;background:var(--color-bg);color:var(--color-text);font-family:var(--font-ui)}.wiz-rail[data-v-2c24b7cb]{display:flex;flex:1;min-width:0;flex-direction:column}.rail-inner[data-v-2c24b7cb]{display:flex;flex-direction:column;width:min(460px,100%);margin:auto;padding:max(var(--space-8),8vh) var(--space-6)}.eyebrow-pill[data-v-2c24b7cb]{align-self:flex-start;padding:var(--space-1) var(--space-3);border:var(--p-hairline) solid var(--color-line-strong);border-radius:var(--radius-full);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.04em}.brand-mark[data-v-2c24b7cb]{margin-top:var(--space-8)}.wiz-title[data-v-2c24b7cb]{margin:var(--space-5) 0 0;font-size:var(--text-2xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;line-height:var(--leading-tight)}.wiz-sub[data-v-2c24b7cb]{max-width:400px;margin:var(--space-2) 0 0;color:var(--color-text-muted);font-size:var(--text-base);line-height:var(--leading-normal)}.pref-group[data-v-2c24b7cb]{margin-top:var(--space-6)}.pref-label[data-v-2c24b7cb]{margin-bottom:var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase}.theme-cards[data-v-2c24b7cb]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-2);width:100%}.accent-cards[data-v-2c24b7cb]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-2);width:100%}.opt-card[data-v-2c24b7cb]{display:flex;align-items:center;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-2c24b7cb]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-2c24b7cb]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-2c24b7cb]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-2c24b7cb]{color:var(--color-text);font-size:var(--text-sm);font-weight:var(--weight-medium)}.theme-card[data-v-2c24b7cb]{flex-direction:column;gap:var(--space-2);padding:var(--space-2)}.theme-preview[data-v-2c24b7cb]{display:flex;width:100%;aspect-ratio:16 / 10;overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md)}.theme-preview--light[data-v-2c24b7cb]{background:var(--surface-light)}.theme-preview--dark[data-v-2c24b7cb]{background:var(--surface-dark)}.theme-half[data-v-2c24b7cb]{display:flex;flex:1;min-width:0}.theme-half--light[data-v-2c24b7cb]{background:var(--surface-light)}.theme-half--dark[data-v-2c24b7cb]{background:var(--surface-dark)}.theme-side[data-v-2c24b7cb]{width:30%;flex:none;background:color-mix(in srgb,currentColor 7%,transparent)}.theme-preview--dark .theme-side[data-v-2c24b7cb],.theme-half--dark .theme-side[data-v-2c24b7cb]{background:color-mix(in srgb,var(--surface-light) 8%,transparent)}.theme-lines[data-v-2c24b7cb]{display:flex;flex:1;flex-direction:column;gap:6px;padding:14% 12%}.theme-lines span[data-v-2c24b7cb]{height:6px;border-radius:var(--radius-full);background:color-mix(in srgb,currentColor 16%,transparent)}.theme-preview--dark .theme-lines span[data-v-2c24b7cb],.theme-half--dark .theme-lines span[data-v-2c24b7cb]{background:color-mix(in srgb,var(--surface-light) 22%,transparent)}.theme-lines span[data-v-2c24b7cb]:nth-child(1){width:62%}.theme-lines span[data-v-2c24b7cb]:nth-child(2){width:88%}.theme-lines span[data-v-2c24b7cb]:nth-child(3){width:44%}.accent-card[data-v-2c24b7cb]{gap:var(--space-3);padding:var(--space-3) var(--space-4)}.opt-radio[data-v-2c24b7cb]{display:inline-flex;width:16px;height:16px;flex:none;align-items:center;justify-content:center;border:var(--p-hairline) solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-surface-raised)}.opt-radio[data-v-2c24b7cb]:after{width:7px;height:7px;border-radius:var(--radius-full);background:transparent;content:""}.opt-radio.on[data-v-2c24b7cb]{border-color:var(--color-accent)}.opt-radio.on[data-v-2c24b7cb]:after{background:var(--color-accent)}.accent-swatch[data-v-2c24b7cb]{width:12px;height:12px;flex:none;border-radius:var(--radius-full)}.accent-swatch--blue[data-v-2c24b7cb]{background:var(--accent-primary)}.accent-swatch--mono[data-v-2c24b7cb]{background:var(--color-text)}.wiz-actions[data-v-2c24b7cb]{display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-8)}.wiz-action[data-v-2c24b7cb]{width:100%}.wiz-actions .wiz-action[data-v-2c24b7cb]:first-child{height:48px}.wiz-actions[data-v-2c24b7cb] .ui-button{font-size:var(--text-base)}.wiz-actions[data-v-2c24b7cb] .ui-button__content{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);width:100%}.wiz-hint[data-v-2c24b7cb]{margin:var(--space-3) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-normal)}.wiz-hero[data-v-2c24b7cb]{position:relative;display:flex;flex:none;align-items:center;justify-content:center;width:min(44vw,560px);margin:max(var(--space-6),3vh);overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);background:var(--color-surface)}.hero-ambient[data-v-2c24b7cb]{position:absolute;inset:0;z-index:0}.orb[data-v-2c24b7cb]{position:absolute;border-radius:var(--radius-full);filter:blur(72px)}.orb-a[data-v-2c24b7cb]{width:46%;aspect-ratio:1;left:-12%;top:-14%;background:color-mix(in srgb,var(--accent-primary) 42%,transparent)}.orb-b[data-v-2c24b7cb]{width:40%;aspect-ratio:1;right:-10%;bottom:6%;background:color-mix(in srgb,var(--color-success) 30%,transparent)}.orb-c[data-v-2c24b7cb]{width:34%;aspect-ratio:1;left:24%;bottom:-16%;background:color-mix(in srgb,var(--color-warning) 26%,transparent)}.hero-inner[data-v-2c24b7cb]{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;width:100%;padding:var(--space-8) var(--space-6);text-align:center}.hero-inner>.pythinker-logo[data-v-2c24b7cb]{animation:hero-float-2c24b7cb 6s var(--ease-out) infinite alternate}@keyframes hero-float-2c24b7cb{0%{transform:translateY(-4px)}to{transform:translateY(4px)}}.hero-tagline[data-v-2c24b7cb]{margin:var(--space-5) 0 0;font-size:var(--text-xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;line-height:var(--leading-tight);color:var(--color-text)}.hero-sub[data-v-2c24b7cb]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-normal)}.frost-stage[data-v-2c24b7cb]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4);width:100%;max-width:380px;margin-top:var(--space-6)}.frost-card[data-v-2c24b7cb]{display:flex;flex-direction:column;margin:0;overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-lg);background:color-mix(in srgb,var(--color-surface) 58%,transparent);-webkit-backdrop-filter:saturate(160%) blur(20px);backdrop-filter:saturate(160%) blur(20px);box-shadow:var(--shadow-menu);transition:transform var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.frost-card[data-v-2c24b7cb]:hover{transform:translateY(-3px);border-color:var(--color-line-strong)}.mock-bar[data-v-2c24b7cb]{display:flex;align-items:center;height:var(--space-5);padding:0 var(--space-2);border-bottom:var(--p-hairline) solid var(--color-line);background:color-mix(in srgb,var(--color-text) 3%,transparent)}.mac-dots[data-v-2c24b7cb]{display:inline-flex;gap:5px}.mac-dots i[data-v-2c24b7cb]{width:9px;height:9px;border-radius:var(--radius-full)}.dot-r[data-v-2c24b7cb]{background:var(--color-danger)}.dot-y[data-v-2c24b7cb]{background:var(--color-warning)}.dot-g[data-v-2c24b7cb]{background:var(--color-success)}.win-controls[data-v-2c24b7cb]{display:inline-flex;gap:var(--space-2);margin-left:auto;color:var(--color-text-faint)}.c-min[data-v-2c24b7cb],.c-max[data-v-2c24b7cb],.c-x[data-v-2c24b7cb]{position:relative;width:9px;height:9px}.c-min[data-v-2c24b7cb]:after{position:absolute;left:0;right:0;bottom:1px;height:1.5px;background:currentColor;content:""}.c-max[data-v-2c24b7cb]:after{box-sizing:border-box;position:absolute;inset:1px;border:1.5px solid currentColor;border-radius:var(--radius-sm);content:""}.c-x[data-v-2c24b7cb]:before,.c-x[data-v-2c24b7cb]:after{position:absolute;top:50%;left:50%;width:11px;height:1.5px;background:currentColor;content:""}.c-x[data-v-2c24b7cb]:before{transform:translate(-50%,-50%) rotate(45deg)}.c-x[data-v-2c24b7cb]:after{transform:translate(-50%,-50%) rotate(-45deg)}.mock-body[data-v-2c24b7cb]{display:flex;width:100%;aspect-ratio:16 / 10}.mock-side[data-v-2c24b7cb]{display:flex;flex-direction:column;gap:var(--space-1-5);width:30%;flex:none;padding:var(--space-2) var(--space-1-5);border-right:var(--p-hairline) solid var(--color-line)}.mock-side i[data-v-2c24b7cb]{height:5px;border-radius:var(--radius-full);background:color-mix(in srgb,var(--color-text) 12%,transparent)}.mock-main[data-v-2c24b7cb]{display:flex;flex:1;flex-direction:column;justify-content:center;gap:var(--space-2);padding:var(--space-2) var(--space-3)}.mock-main i[data-v-2c24b7cb]{height:6px;border-radius:var(--radius-full);background:color-mix(in srgb,var(--color-text) 16%,transparent)}.mock-main .w-88[data-v-2c24b7cb]{width:88%}.mock-main .w-74[data-v-2c24b7cb]{width:74%}.mock-main .w-62[data-v-2c24b7cb]{width:62%}.mock-main .w-52[data-v-2c24b7cb]{width:52%}.mock-main .w-45[data-v-2c24b7cb]{width:45%}.frost-card figcaption[data-v-2c24b7cb]{padding:var(--space-1-5) 0 var(--space-2);border-top:var(--p-hairline) solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}@media(max-width:960px){.wiz-hero[data-v-2c24b7cb]{display:none}.rail-inner[data-v-2c24b7cb]{margin:0 auto}}@media(max-width:640px){.theme-cards[data-v-2c24b7cb],.accent-cards[data-v-2c24b7cb]{grid-template-columns:1fr}.rail-inner[data-v-2c24b7cb]{padding:var(--space-6) var(--space-5)}}@media(prefers-reduced-motion:reduce){.opt-card[data-v-2c24b7cb],.frost-card[data-v-2c24b7cb]{transition:none}.frost-card[data-v-2c24b7cb]:hover{transform:none}.hero-inner>.pythinker-logo[data-v-2c24b7cb]{animation:none}}.codex-signin__denied[data-v-3bd16f58]{margin:0;color:var(--color-text-muted);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.codex-signin[data-v-3bd16f58]{display:flex;flex-direction:column;gap:var(--space-3)}.codex-signin__status[data-v-3bd16f58],.codex-signin__ok[data-v-3bd16f58]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-sm)}.codex-signin__ok[data-v-3bd16f58]{color:var(--ok)}.codex-signin__hint[data-v-3bd16f58]{color:var(--color-text-muted);font-size:var(--text-sm)}.codex-signin__paste[data-v-3bd16f58]{display:flex;flex-direction:column;gap:var(--space-2)}.codex-signin__error[data-v-3bd16f58]{color:var(--color-danger);font-size:var(--text-sm)}.codex-signin__actions[data-v-3bd16f58]{display:flex;gap:var(--space-2)}.first-run[data-v-23e77d0d]{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--bg);color:var(--color-text);overflow-y:auto}.first-run__panel[data-v-23e77d0d]{width:min(560px,100%);display:flex;flex-direction:column;gap:22px}.first-run__steps[data-v-23e77d0d]{display:flex;align-items:center;gap:14px;list-style:none;margin:0;padding:0}.first-run__step[data-v-23e77d0d]{display:flex;align-items:center;gap:7px;font-size:var(--ui-font-size-sm);color:var(--faint)}.first-run__step.is-current[data-v-23e77d0d]{color:var(--color-text)}.first-run__step.is-done[data-v-23e77d0d]{color:var(--ok)}.first-run__dot[data-v-23e77d0d]{display:grid;place-items:center;width:18px;height:18px;flex:none;border-radius:var(--radius-full);border:1.5px solid currentColor;font-size:10px;font-weight:var(--weight-medium)}.first-run__step.is-current .first-run__dot[data-v-23e77d0d]{background:var(--blue);border-color:var(--blue);color:#fff}.first-run__step.is-done .first-run__dot[data-v-23e77d0d]{background:var(--ok);border-color:var(--ok);color:#fff}.first-run__body[data-v-23e77d0d]{display:flex;flex-direction:column;gap:14px;align-items:flex-start}.first-run__body h1[data-v-23e77d0d]{margin:0;font-size:24px;font-weight:500;line-height:1.2}.first-run__mark[data-v-23e77d0d]{margin-bottom:4px}.first-run__sub[data-v-23e77d0d]{margin:0;color:var(--dim);font-size:var(--ui-font-size);line-height:1.55}.first-run__options[data-v-23e77d0d]{display:flex;flex-direction:column;gap:8px;width:100%}.first-run__option[data-v-23e77d0d]{display:flex;align-items:center;gap:12px;width:100%;padding:13px 15px;text-align:left;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--bg);cursor:pointer}.first-run__option[data-v-23e77d0d]:hover{background:var(--hover)}.first-run__option.is-primary[data-v-23e77d0d]{border-color:var(--bd);background:var(--bluebg)}.first-run__option-main[data-v-23e77d0d]{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.first-run__option-name[data-v-23e77d0d]{font-size:var(--ui-font-size);font-weight:var(--weight-medium)}.first-run__option-desc[data-v-23e77d0d]{font-size:var(--ui-font-size-sm);color:var(--muted)}.first-run__badge[data-v-23e77d0d]{flex:none;padding:2px 8px;border-radius:var(--radius-full);background:var(--blue);color:#fff;font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium)}.first-run__route[data-v-23e77d0d]{width:100%;display:flex;flex-direction:column;gap:12px}.first-run__models[data-v-23e77d0d]{list-style:none;margin:0;padding:0;width:100%;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden}.first-run__models li+li .first-run__model[data-v-23e77d0d]{border-top:1px solid var(--line2)}.first-run__model[data-v-23e77d0d]{display:flex;align-items:center;gap:11px;width:100%;padding:10px 14px;background:var(--bg);cursor:pointer;font-family:var(--mono);font-size:var(--ui-font-size-sm);text-align:left}.first-run__model[data-v-23e77d0d]:hover{background:var(--hover)}.first-run__model.is-selected[data-v-23e77d0d]{background:var(--bluebg)}.first-run__radio[data-v-23e77d0d]{width:14px;height:14px;flex:none;border-radius:var(--radius-full);border:1.5px solid var(--line)}.first-run__model.is-selected .first-run__radio[data-v-23e77d0d]{border-color:var(--blue);border-width:4.5px}.first-run__model-id[data-v-23e77d0d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.first-run__model-ctx[data-v-23e77d0d]{margin-left:auto;flex:none;font-family:var(--sans);font-size:var(--ui-font-size-xs);color:var(--muted)}.first-run__empty[data-v-23e77d0d]{margin:0;color:var(--warn);font-size:var(--ui-font-size)}.first-run__ready[data-v-23e77d0d]{display:flex;align-items:center;gap:8px;margin:0;color:var(--ok);font-size:var(--ui-font-size-sm)}.first-run__actions[data-v-23e77d0d]{display:flex;align-items:center;gap:8px;width:100%;margin-top:6px}.first-run__skip-hint[data-v-23e77d0d]{margin:0;color:var(--muted);font-size:var(--ui-font-size-sm)}.first-run__spacer[data-v-23e77d0d]{flex:1}.recovery[data-v-68311778]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--bg);color:var(--color-text);box-sizing:border-box}.recovery__inner[data-v-68311778]{width:min(460px,100%);display:flex;flex-direction:column;align-items:flex-start;gap:18px}.recovery__mark[data-v-68311778]{display:grid;place-items:center;width:44px;height:44px;border-radius:var(--r-sm);background:var(--panel);color:var(--warn)}.recovery__copy[data-v-68311778]{display:flex;flex-direction:column;gap:8px}.recovery__copy h1[data-v-68311778]{margin:0;font-size:26px;line-height:1.15;font-weight:500;color:var(--color-text)}.recovery__copy p[data-v-68311778]{margin:0;font-size:var(--ui-font-size-lg);line-height:1.55;color:var(--dim)}.recovery__options[data-v-68311778]{display:flex;flex-direction:column;gap:8px;width:100%}.recovery__option[data-v-68311778]{display:flex;flex-direction:column;gap:2px;width:100%;padding:12px 14px;text-align:left;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--bg);cursor:pointer}.recovery__option[data-v-68311778]:hover{background:var(--hover)}.recovery__option.is-primary[data-v-68311778]{border-color:var(--bd);background:var(--bluebg)}.recovery__option-name[data-v-68311778]{font-size:var(--ui-font-size);font-weight:var(--weight-medium)}.recovery__option-desc[data-v-68311778]{font-size:var(--ui-font-size-sm);color:var(--muted)}.recovery__actions[data-v-68311778]{display:flex;gap:8px}.gload[data-v-2468172e]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-2468172e]{width:120px;height:120px;object-fit:contain;animation:gload-pop-2468172e .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-xl);color:var(--muted);letter-spacing:.04em}.gload-issue[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(480px,80vw);font-family:var(--sans);font-size:var(--text-base);color:var(--muted);text-align:center}.gload-issue-detail[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);opacity:.8;word-break:break-word}@keyframes gload-pop-2468172e{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-2468172e]{animation:none}}.gload-text[data-v-2468172e]{font-family:var(--sans)}.kap-root[data-v-7bab00af]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-7bab00af]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--panel)}.kap-count[data-v-7bab00af]{color:var(--muted)}.kap-head-actions[data-v-7bab00af]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-7bab00af],.kap-view-toggle button[data-v-7bab00af]{padding:3px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-7bab00af]:hover,.kap-view-toggle button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-7bab00af],.kap-view-toggle button.on[data-v-7bab00af]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-7bab00af]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:1px solid var(--line)}.kap-filters select[data-v-7bab00af],.kap-filters input[type=text][data-v-7bab00af]{padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-7bab00af]{flex:1;min-width:120px}.kap-check[data-v-7bab00af]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-7bab00af]{display:flex;gap:0}.kap-view-toggle button[data-v-7bab00af]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-7bab00af]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-7bab00af]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-7bab00af]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:1px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-7bab00af]:hover{background:var(--panel2)}.kap-row.expanded[data-v-7bab00af]{background:var(--color-accent-soft)}.kap-ts[data-v-7bab00af]{flex:none;color:var(--muted)}.kap-badge[data-v-7bab00af]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-7bab00af]{background:var(--panel2);color:var(--muted)}.b-err[data-v-7bab00af]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-7bab00af]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-7bab00af]{border-bottom:1px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-7bab00af]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-7bab00af]{padding:2px 8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-detail pre[data-v-7bab00af]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-7bab00af]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-7bab00af]{width:100%;border-collapse:collapse}.kap-agg th[data-v-7bab00af],.kap-agg td[data-v-7bab00af]{padding:3px 6px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-7bab00af]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-7bab00af]{text-align:right}.kap-agg .err[data-v-7bab00af]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-7bab00af]{word-break:break-all}.kap-fab[data-v-992ae84c]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-992ae84c]:hover{opacity:1;color:var(--color-accent)}.server-auth-overlay[data-v-82dad292]{position:fixed;inset:0;z-index:var(--z-max);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 70%,transparent)}.server-auth-card[data-v-82dad292]{width:480px;max-width:calc(100vw - 48px);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);overflow:hidden;color:var(--color-text);font-family:var(--font-ui)}.server-auth-head[data-v-82dad292]{display:flex;flex-direction:column;padding:20px 22px 14px}.server-auth-title[data-v-82dad292]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium);letter-spacing:-.01em;color:var(--color-text)}.server-auth-hint[data-v-82dad292]{margin:4px 0 0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-82dad292]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.server-auth-body[data-v-82dad292]{padding:4px 22px 18px}.server-auth-foot[data-v-82dad292]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.gload-fade-leave-active[data-v-628646c9]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-628646c9]{opacity:0}.app-shell[data-v-628646c9]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.offline-strip[data-v-628646c9]{display:flex;align-items:center;justify-content:center;gap:12px;flex:none;padding:7px 16px;background:var(--panel);border-bottom:1px solid var(--line);color:var(--dim);font-size:var(--ui-font-size-sm)}.offline-strip button[data-v-628646c9]{color:var(--blue);font-weight:var(--weight-medium);cursor:pointer}.app[data-v-628646c9]{--preview-w: 460px;flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-628646c9]>*{min-height:0;min-width:0}.app>.side[data-v-628646c9]{grid-column:1}.side-handle[data-v-628646c9]{grid-column:2}.app:not(.mobile)>.con[data-v-628646c9]{grid-column:3}.app>.global-preview[data-v-628646c9]{grid-column:4}.app.panel-expanded[data-v-628646c9]{grid-template-columns:auto 0 0 minmax(0,1fr)}.app.panel-expanded>.con[data-v-628646c9]{display:none}.sidebar-toggle-btn[data-v-628646c9]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-628646c9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-628646c9]{left:var(--macos-titlebar-controls-start);animation:none}@keyframes sidebar-toggle-btn-in-628646c9{0%{opacity:0}}.new-chat-btn[data-v-628646c9]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-628646c9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-628646c9]{left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm))}.app.mobile[data-v-628646c9]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-628646c9]{min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden;transition:width .28s cubic-bezier(.4,0,.2,1)}.global-preview.open[data-v-628646c9]{width:var(--preview-w)}.global-preview.expanded[data-v-628646c9]{width:auto}.global-preview.no-anim[data-v-628646c9]{transition:none}.global-preview:not(.mobile):not(.expanded) .pt-shell[data-v-628646c9]{width:var(--preview-w);border-left:1px solid var(--line)}.pt-shell[data-v-628646c9]{position:relative;display:flex;flex-direction:column;min-width:0;height:100%;box-sizing:border-box;background:var(--bg)}.pt-body[data-v-628646c9]{flex:1;min-height:0;min-width:0;overflow:hidden}.pt-body[data-v-628646c9]>*{width:100%;height:100%;box-sizing:border-box}.panel-resize[data-v-628646c9]{position:absolute;left:0;top:0;bottom:0;z-index:var(--z-dropdown)}.pfc-host[data-v-628646c9]{flex:none;min-width:0;background:var(--bg)}.pfc-host[data-v-628646c9]:empty{display:none}.panel-launcher[data-v-628646c9]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;gap:var(--space-3);padding:var(--space-6)}.panel-launcher button[data-v-628646c9]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);min-height:104px;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);font:var(--text-sm) var(--font-ui);cursor:pointer}.panel-launcher button[data-v-628646c9]:hover:not(:disabled){border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.panel-launcher button[data-v-628646c9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.panel-launcher button[data-v-628646c9]:disabled{color:var(--color-text-faint);cursor:default}.app.panel-expanded.sidebar-collapsed .panel-tab-bar[data-v-628646c9]{padding-left:var(--header-collapsed-clearance, 78px)}.app.panel-expanded.sidebar-collapsed.macos-desktop .panel-tab-bar[data-v-628646c9]{padding-left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm) + var(--icon-button-sm) + var(--space-5))}.global-preview.mobile[data-v-628646c9]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:2px solid var(--color-text)}.global-preview.mobile .pt-shell[data-v-628646c9]{width:100%}.action-toast-stack[data-v-628646c9]{position:fixed;right:var(--space-4);bottom:var(--space-4);z-index:var(--z-toast);display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-2);pointer-events:none}.session-action-undo[data-v-628646c9]{margin-top:var(--space-2);padding:0;border:0;background:transparent;color:var(--color-accent);font:inherit;font-size:var(--text-sm);cursor:pointer}.session-action-undo[data-v-628646c9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(max-width:640px){.action-toast-stack[data-v-628646c9]{right:var(--space-3);bottom:max(var(--space-3),var(--safe-bottom));left:var(--space-3);align-items:stretch}}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2) }.app.macos-desktop{--macos-titlebar-controls-fallback-x: 76px;--macos-titlebar-controls-start: calc(env(titlebar-area-x, var(--macos-titlebar-controls-fallback-x)) + var(--space-2)) }.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm) + var(--icon-button-sm) + var(--space-5))}.app.sidebar-collapsed .session-admin .sa-head{padding-left:78px}.app.sidebar-collapsed.windows-desktop .session-admin .sa-head{padding-left:var(--space-6)}.app.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm) + var(--icon-button-sm) + var(--space-5))}.app.fullscreen.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:78px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .global-preview .ui-panel-header{-webkit-app-region:no-drag}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);--ink: var(--color-text);--fg: var(--color-text);--color-fg: var(--color-text);--border: var(--color-line);--surface-light: #ffffff;--surface-dark: #0d1117;--accent-primary: #1783ff;color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }}html[data-accent=mono]{--accent-primary: #171717;--color-accent: #171717;--color-accent-hover: #383838;--color-accent-soft: #f1f1f2;--color-accent-bd: #d4d4d8;--p-selection: rgba(23, 23, 23, .2);--blue: #171717;--blue2: #383838;--soft: #f1f1f2;--bd: #d4d4d8;--bluebg: #f4f4f5;--blueln: #e4e4e7;--logo: #171717 }html[data-color-scheme=dark][data-accent=mono]{--accent-primary: #e8eaed;--color-accent: #e8eaed;--color-accent-hover: #c9cdd4;--color-accent-soft: #21262d;--color-accent-bd: #444c56;--color-text-on-accent: var(--color-bg);--p-selection: rgba(232, 234, 237, .2);--blue: #e8eaed;--blue2: #c9cdd4;--soft: #21262d;--bd: #444c56;--bluebg: #21262d;--blueln: #30363d;--logo: #e8eaed }@media(prefers-color-scheme:dark){html[data-color-scheme=system][data-accent=mono]{--accent-primary: #e8eaed;--color-accent: #e8eaed;--color-accent-hover: #c9cdd4;--color-accent-soft: #21262d;--color-accent-bd: #444c56;--color-text-on-accent: var(--color-bg);--p-selection: rgba(232, 234, 237, .2);--blue: #e8eaed;--blue2: #c9cdd4;--soft: #21262d;--bd: #444c56;--bluebg: #21262d;--blueln: #30363d;--logo: #e8eaed }}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient(var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #e9eaf2;--color-sidebar-glass: rgba(250, 250, 253, .5);--color-sidebar-wash: linear-gradient(172deg, rgba(213, 222, 240, .92), rgba(226, 224, 242, .85) 55%, rgba(233, 220, 240, .9));--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: var(--radius-sm);--menu-pad: 3.5px;--radius-menu-item: calc(var(--radius-lg) - var(--menu-pad) - var(--p-hairline));--radius-select-option: calc(var(--radius-md) - var(--space-1) - var(--p-hairline));--radius-dropdown-row: calc(var(--radius-lg) - var(--space-1) - var(--p-hairline));--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: var(--space-05);--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-lg) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-sidebar-backdrop: saturate(150%) blur(20px);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--duration-tooltip: .15s;--duration-spin: .7s;--duration-flash: 1.2s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--color-code-selection: rgba(23, 131, 255, .346);--color-code-selection-text: currentcolor;--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--p-scroll-seam-h: 18px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--resize-handle-step: 16px;--resize-handle-step-lg: 48px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 296px;--p-media-thumb-size: 64px;--p-mention-tip-w: 320px;--p-mention-tip-vmargin: var(--space-3);--p-mention-tip-spinner-lift: -.1em;--opacity-stale: .55;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px }:root,html[data-font-scale=medium]{--base-font: 14px }html[data-font-scale=small]{--base-font: 12px }html[data-font-scale=large]{--base-font: 16px }html[data-font-scale=xlarge]{--base-font: 18px }.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #2c343a;--color-sidebar-glass: rgba(40, 46, 52, .78);--color-sidebar-wash: linear-gradient(to bottom, rgba(47, 56, 61, .88), rgba(39, 45, 52, .82));--p-sidebar-backdrop: saturate(80%) blur(28px);--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-code-selection: rgba(26, 136, 255, .27);--color-code-selection-text: currentcolor;--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #2c343a;--color-sidebar-glass: rgba(40, 46, 52, .78);--color-sidebar-wash: linear-gradient(to bottom, rgba(47, 56, 61, .88), rgba(39, 45, 52, .82));--p-sidebar-backdrop: saturate(80%) blur(28px);--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-code-selection: rgba(26, 136, 255, .27);--color-code-selection-text: currentcolor;--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }}:root{--color-sidebar-tint: rgba(255, 255, 255, .4) }html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25) }}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531 }html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }}::highlight(pythinker-transcript-search){background-color:var(--color-search-match)}::highlight(pythinker-transcript-search-current){background-color:var(--color-search-match-current)}.mention-pill{display:inline-flex;align-items:baseline;gap:var(--space-05);color:var(--color-text-muted);font-weight:var(--weight-ui-strong);white-space:nowrap;text-decoration:none;vertical-align:baseline;padding-inline:var(--space-05);transition:color var(--duration-fast) var(--ease-out)}.mention-pill:hover{color:var(--color-text)}.mention-pill:hover .mention-pill-icon{color:inherit}.mention-pill.mention-file,.mention-pill.mention-skill{cursor:pointer}.mention-pill.mention-file:hover,.mention-pill.mention-skill:hover{text-decoration:underline}.mention-pill:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-sm)}.ProseMirror .mention-pill,.ProseMirror .mention-pill:hover{cursor:text;text-decoration:none}a.mention-folder{cursor:default}.mention-pill.mention-skill.mention-inert,.mention-pill.mention-skill.mention-inert:hover{cursor:default;text-decoration:none}.mention-pill-name{max-width:24em;min-width:0;overflow:hidden;text-overflow:ellipsis}.mention-pill-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--muted);align-self:center;flex-shrink:0}.mention-pill-icon svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block;stroke:currentColor;stroke-width:var(--p-hairline)}.mention-pill.pill-in-selection{background:var(--p-selection);border-radius:var(--radius-sm)}.mention-tip{position:fixed;z-index:var(--z-tooltip);max-width:min(var(--p-mention-tip-w),calc(100vw - 2 * var(--p-mention-tip-vmargin)));padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:round(calc(var(--text-xs) * 1.5),1px);overflow-wrap:anywhere;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.mention-tip:not(.positioned){pointer-events:none}.mention-tip.positioned{opacity:1}.mention-tip-path{display:flex;align-items:flex-start;gap:var(--space-2)}.mention-tip-path-text{min-width:0}.mention-tip-sep{color:color-mix(in srgb,currentColor 45%,transparent)}.mention-tip-base{font-weight:var(--weight-semibold)}.mention-tip-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2)}.mention-tip-name{font-weight:var(--weight-semibold);overflow-wrap:anywhere}.mention-tip-open,.mention-tip-copy{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-05);border:none;border-radius:var(--radius-xs);background:transparent;color:color-mix(in srgb,currentColor 65%,transparent);cursor:pointer;transition:color var(--duration-fast) var(--ease-out),background-color var(--duration-fast) var(--ease-out)}.mention-tip-open:hover,.mention-tip-copy:hover{color:var(--color-bg);background:color-mix(in srgb,var(--color-bg) 14%,transparent)}.mention-tip-open:focus-visible,.mention-tip-copy:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mention-tip-open svg,.mention-tip-copy svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-tip-copy{margin-top:calc(0px - var(--space-05));margin-right:calc(var(--space-05) - var(--space-2))}.mention-tip-desc{margin-top:var(--space-05);color:color-mix(in srgb,currentColor 78%,transparent);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.mention-tip-spinner{display:inline-block;width:calc(var(--space-2) + var(--space-05));height:calc(var(--space-2) + var(--space-05));margin-left:var(--space-1);vertical-align:var(--p-mention-tip-spinner-lift);border-radius:50%;border:var(--p-ring-stroke) solid color-mix(in srgb,currentColor 30%,transparent);border-top-color:currentColor;animation:mention-tip-spin var(--duration-spin) linear infinite}@keyframes mention-tip-spin{to{transform:rotate(360deg)}}.mention-pill.mention-missing,.mention-pill.mention-missing:hover{color:color-mix(in srgb,var(--color-text-muted) 55%,transparent);text-decoration:line-through}.mention-pill.mention-missing .mention-pill-icon{color:inherit}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px) }.ui-shimmer{background:linear-gradient(90deg,var(--color-text-faint) 0%,var(--color-text-faint) 40%,var(--color-text) 50%,var(--color-text-faint) 60%,var(--color-text-faint) 100%);background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:ui-shimmer 2.2s linear infinite}@keyframes ui-shimmer{0%{background-position:0% 0}to{background-position:100% 0}}@media(prefers-reduced-motion:reduce){.ui-shimmer{animation:none;background:none;color:var(--color-text-muted)}}.ui-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:pythinker-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes pythinker-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes pythinker-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes pythinker-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ch-eyes{animation:pythinker-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:pythinker-eye-blink 11s ease-in-out infinite}@keyframes pythinker-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes pythinker-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:pythinker-eye-blink-once .24s ease-in-out}@keyframes pythinker-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s }#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} +.ui-icon-button[data-v-4b23513f]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:1px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-4b23513f]:hover:not(:disabled){background:color-mix(in srgb,var(--color-text) 8%,transparent);color:var(--color-text)}.ui-icon-button[data-v-4b23513f]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-4b23513f]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-4b23513f]{width:26px;height:26px;border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-4b23513f]{width:32px;height:32px}.ui-icon-button--lg[data-v-4b23513f]{width:44px;height:44px}.ui-icon-button[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-4b23513f] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-dialog__overlay[data-v-13d3b5a2]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111773;animation:pythinker-dialog-overlay-in-13d3b5a2 var(--duration-base) var(--ease-out)}@keyframes pythinker-dialog-overlay-in-13d3b5a2{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-13d3b5a2]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-13d3b5a2]{width:min(440px,100%)}.ui-dialog--md-wide[data-v-13d3b5a2]{width:min(512px,100%)}.ui-dialog--lg[data-v-13d3b5a2]{width:min(640px,100%)}.ui-dialog--xl[data-v-13d3b5a2]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-13d3b5a2]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--flush .ui-dialog__body[data-v-13d3b5a2]{padding:0}.ui-dialog__head[data-v-13d3b5a2]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-13d3b5a2]{flex:1;min-width:0}.ui-dialog__title[data-v-13d3b5a2]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-13d3b5a2]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-13d3b5a2]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-13d3b5a2]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-13d3b5a2]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.sd-head[data-v-addb1371]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.sd-search-icon[data-v-addb1371]{flex:none;color:var(--color-text-muted)}.sd-input[data-v-addb1371]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-lg);color:var(--color-text);background:none;border:none;outline:none;padding:var(--space-1) 0}.sd-input[data-v-addb1371]::placeholder{color:var(--color-text-muted)}.sd-list[data-v-addb1371]{height:420px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.sd-row[data-v-addb1371]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-addb1371]:hover,.sd-row.on[data-v-addb1371]{background:var(--color-surface-sunken)}.sd-row.active .sd-title[data-v-addb1371]{color:var(--color-accent-hover)}.sd-row-ws[data-v-addb1371]{flex-direction:row;align-items:center;gap:var(--space-2)}.sd-ws-name[data-v-addb1371]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-ws-path[data-v-addb1371]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:var(--text-xs);color:var(--color-text-faint)}.sd-section[data-v-addb1371]{display:flex;align-items:baseline;gap:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.sd-section-count[data-v-addb1371]{font-weight:var(--weight-regular)}.sd-section[data-v-addb1371]:first-child{padding-top:var(--space-1)}.sd-section[data-v-addb1371]:not(:first-child){margin-top:var(--space-1);border-top:1px solid var(--color-line)}.sd-meta[data-v-addb1371]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-folder[data-v-addb1371]{flex:none;color:var(--color-text-muted)}.sd-ws[data-v-addb1371]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-time[data-v-addb1371]{flex:none;font-family:var(--font-mono);color:var(--color-text-faint)}.sd-title[data-v-addb1371]{min-width:0;font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-snippet[data-v-addb1371]{min-width:0;font-size:var(--text-sm);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-addb1371] mark,.sd-snippet[data-v-addb1371] mark,.sd-ws-name[data-v-addb1371] mark,.sd-ws-path[data-v-addb1371] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-addb1371]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.sd-hint[data-v-addb1371]{font-size:var(--text-xs);color:var(--color-text-muted)}.ui-spinner[data-v-9e3e449a]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--sm[data-v-9e3e449a]{width:14px;height:14px}.ui-spinner--md[data-v-9e3e449a]{width:18px;height:18px}.ui-spinner--lg[data-v-9e3e449a]{width:28px;height:28px}.ui-spinner__svg[data-v-9e3e449a]{width:100%;height:100%;animation:ui-spinner-rotate-9e3e449a .8s linear infinite}.ui-spinner__ring[data-v-9e3e449a]{fill:none}@keyframes ui-spinner-rotate-9e3e449a{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ui-spinner__svg[data-v-9e3e449a]{animation-duration:1.6s}}.ui-badge[data-v-07bffc39]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:1px solid transparent}.ui-badge--md[data-v-07bffc39]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-07bffc39]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-07bffc39]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-07bffc39]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-07bffc39]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-07bffc39]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-07bffc39]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-07bffc39]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-07bffc39]{background:var(--color-text);color:var(--color-bg)}.ui-menu[data-v-3595ccdb]{min-width:180px;padding:var(--menu-pad);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column}.ui-menu-item[data-v-b6921d06]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:6px 10px;border:none;border-radius:var(--radius-menu-item);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-b6921d06]:hover:not(:disabled){background:var(--color-surface-sunken)}.ui-menu-item[data-v-b6921d06]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-b6921d06]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-b6921d06]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.ui-menu-item.is-danger[data-v-b6921d06]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-b6921d06]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-b6921d06] svg{width:14px;height:14px;flex:none}.ui-menu-item--lg[data-v-b6921d06]{min-height:44px;padding:12px 14px;font-size:var(--text-base)}.ui-menu-sep[data-v-b6921d06]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-2e7663df]{display:contents}.ui-tip__bubble[data-v-2e7663df]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-2e7663df]{opacity:1}.ui-input[data-v-609588ac]{width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-609588ac]{height:38px}.ui-input--sm[data-v-609588ac]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-609588ac]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-609588ac]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-609588ac]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-609588ac]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-609588ac]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-609588ac]{border-color:var(--color-danger)}.ui-input.has-error[data-v-609588ac]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.popover[data-v-051cf21c]{position:fixed;z-index:200;box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow-y:auto;padding:2px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);box-shadow:0 8px 24px color-mix(in srgb,var(--ink) 18%,transparent)}.emoji-picker[data-v-b79cd42c]{width:min(320px,calc(100vw - 40px));max-height:min(440px,calc(100vh - 48px));padding:var(--space-3);overflow-y:auto;background:var(--color-surface-raised)}.emoji-actions[data-v-b79cd42c]{display:flex;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-2)}.emoji-actions button[data-v-b79cd42c]{border:0;background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);cursor:pointer}.emoji-actions button[data-v-b79cd42c]:hover{color:var(--color-text)}.emoji-group h3[data-v-b79cd42c]{margin:var(--space-3) 0 var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.emoji-grid[data-v-b79cd42c]{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:var(--space-1)}.emoji[data-v-b79cd42c]{display:grid;place-items:center;min-width:32px;min-height:32px;border:0;border-radius:var(--radius-sm);background:transparent;font-size:var(--text-lg);cursor:pointer}.emoji[data-v-b79cd42c]:hover{background:var(--color-hover)}.emoji[data-v-b79cd42c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.emoji-empty[data-v-b79cd42c]{padding:var(--space-5) 0;color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.se[data-v-813f72fa]{display:block;margin:0;padding:8px var(--space-2);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-813f72fa]:hover{background:var(--sb-hover, var(--color-surface-sunken));color:var(--color-text)}.se.on[data-v-813f72fa]{background:var(--color-selected);color:var(--color-text)}.row[data-v-813f72fa]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-813f72fa]{display:flex;align-items:center;flex:1;min-width:0}.session-emoji[data-v-813f72fa]{flex:none;margin-right:var(--space-1);font-size:var(--text-base);line-height:1}.lead[data-v-813f72fa]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-813f72fa]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.t[data-v-813f72fa]{color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts[data-v-813f72fa]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-813f72fa]{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:flex-end;min-width:26px}.act .kebab[data-v-813f72fa]{position:absolute;right:0;top:50%;transform:translateY(-50%);visibility:hidden}.se:hover .act .kebab[data-v-813f72fa],.act:has(.kebab.open) .kebab[data-v-813f72fa]{visibility:visible}.se:hover .act .ts[data-v-813f72fa],.act:has(.kebab.open) .ts[data-v-813f72fa]{visibility:hidden}.kebab.open[data-v-813f72fa]{color:var(--color-text);background:var(--sb-hover, var(--color-surface-sunken))}.menu[data-v-813f72fa]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-time[data-v-813f72fa]{padding:var(--space-1) var(--space-2);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);cursor:default;user-select:text}.rename-wrap[data-v-813f72fa]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-813f72fa]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none}.rename-wrap.generating .rename-input[data-v-813f72fa]{visibility:hidden}.gen-title-btn[data-v-813f72fa]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-813f72fa]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-813f72fa]{margin:0;border-radius:var(--radius-sm);padding:8px calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px))}.sessions .se .rename-wrap[data-v-813f72fa]{border-radius:var(--radius-sm)}.sessions .se .rename-input[data-v-813f72fa]{font-family:var(--sans)}.sessions .se .kebab[data-v-813f72fa]{border-radius:var(--radius-sm)}.group.dragging[data-v-4e9d3a01]{opacity:.45}.group-sessions[data-v-4e9d3a01]{display:grid;grid-template-rows:minmax(0,1fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-4e9d3a01]{grid-template-rows:minmax(0,0fr)}.group-sessions-inner[data-v-4e9d3a01]{min-height:0;overflow:hidden}.gh[data-v-4e9d3a01]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-4e9d3a01]:active{cursor:grabbing}.gh[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.gh-top[data-v-4e9d3a01]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-4e9d3a01]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-4e9d3a01]{font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-4e9d3a01]{position:absolute;right:0;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;background:var(--color-sidebar-bg);opacity:0;pointer-events:none}.gh-actions[data-v-4e9d3a01]:after{content:"";position:absolute;inset:0;z-index:0;border-radius:var(--radius-sm);background:transparent}.gh:hover .gh-actions[data-v-4e9d3a01]:after{background:var(--sb-hover, var(--color-surface-sunken))}.gh-actions[data-v-4e9d3a01]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-4e9d3a01],.gh:focus-within .gh-actions[data-v-4e9d3a01],.gh-actions.open[data-v-4e9d3a01]{opacity:1;pointer-events:auto}.gh-more.open[data-v-4e9d3a01]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-4e9d3a01]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.show-more[data-v-4e9d3a01]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.show-more[data-v-4e9d3a01]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-lead[data-v-4e9d3a01]{width:var(--sb-gutter);flex:none}.show-more-label[data-v-4e9d3a01]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-4e9d3a01]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-4e9d3a01]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-4e9d3a01]{color:var(--faint)}.gh-add[data-v-4e9d3a01]:hover{color:var(--dim)}.error-boundary[data-v-3d80705c]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6)}.error-boundary.fullscreen[data-v-3d80705c]{position:fixed;inset:0;z-index:var(--z-modal);background:var(--color-bg)}.error-boundary-close[data-v-3d80705c]{position:absolute;top:var(--space-4);right:var(--space-4)}.error-boundary-icon[data-v-3d80705c]{color:var(--color-warning)}.error-boundary-title[data-v-3d80705c]{margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.ui-button[data-v-738fde35]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:1px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-738fde35]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-738fde35]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-738fde35]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-738fde35]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-738fde35]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-738fde35]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-738fde35]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-738fde35] svg{flex:none}.ui-button__content[data-v-738fde35] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-738fde35]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-738fde35]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-738fde35]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-738fde35]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ui-button--ghost[data-v-738fde35]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-738fde35]:not(:disabled):hover{background:var(--color-surface-sunken);color:var(--color-text)}.ui-button--danger[data-v-738fde35]{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-738fde35]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-738fde35]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-738fde35]:not(:disabled):hover{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-738fde35]{opacity:.7}.ui-button .ui-button__spinner[data-v-738fde35]{flex:none;color:inherit}.ui-button__spinner[data-v-738fde35] .ui-spinner__track{opacity:.35}.error-boundary[data-v-1b27e696]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6)}.error-boundary.fullscreen[data-v-1b27e696]{position:fixed;inset:0;z-index:var(--z-modal);background:var(--color-bg)}.error-boundary-close[data-v-1b27e696]{position:absolute;top:var(--space-4);right:var(--space-4)}.error-boundary-icon[data-v-1b27e696]{color:var(--color-warning)}.error-boundary-title[data-v-1b27e696]{margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.ui-kbd[data-v-e5cfdeb4]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-e5cfdeb4]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:1px solid var(--color-line);border-bottom-width:2px;border-radius:var(--radius-xs);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:11px;line-height:1}.pinned[data-v-6c2ea92b]{flex:none;min-width:0;padding:var(--space-3) var(--sb-inset) 0}.pinned-label[data-v-6c2ea92b]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);padding:0 var(--space-2) var(--space-1);color:var(--faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;user-select:none}.pinned-title[data-v-6c2ea92b]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pinned-toggle[data-v-6c2ea92b]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.pinned-label:hover .pinned-toggle[data-v-6c2ea92b],.pinned-label:focus-within .pinned-toggle[data-v-6c2ea92b],.pinned-toggle--on[data-v-6c2ea92b]{opacity:1}.pinned-toggle[data-v-6c2ea92b]:hover{color:var(--dim)}.pinned-toggle[data-v-6c2ea92b] svg{width:13px;height:13px}.pinned-rows[data-v-6c2ea92b]{max-height:40vh;overflow-y:auto;padding:0 var(--sb-inset);scrollbar-gutter:stable}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar{width:var(--space-1)}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar-track{background:transparent}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full)}.pinned-rows[data-v-6c2ea92b]:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.pinned-rows[data-v-6c2ea92b]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.pinned-rows-wrap[data-v-6c2ea92b]{position:relative;margin:0 calc(var(--sb-inset) * -1);--pinned-seam-down: linear-gradient(to bottom, color-mix(in srgb, var(--color-text) 3%, transparent), transparent);--pinned-seam-up: linear-gradient(to top, color-mix(in srgb, var(--color-text) 3%, transparent), transparent)}.pinned-seam[data-v-6c2ea92b]{position:absolute;left:0;right:0;height:var(--space-3);pointer-events:none;opacity:0;z-index:var(--z-raised);transition:opacity var(--duration-base) var(--ease-out)}.pinned-seam--top[data-v-6c2ea92b]{top:0;border-top:var(--p-hairline) solid var(--line);background:var(--pinned-seam-down)}.pinned-seam--bottom[data-v-6c2ea92b]{bottom:0;border-bottom:var(--p-hairline) solid var(--line);background:var(--pinned-seam-up)}.pinned-rows-wrap.scrolled .pinned-seam--top[data-v-6c2ea92b],.pinned-rows-wrap.more-below .pinned-seam--bottom[data-v-6c2ea92b]{opacity:1}.pinned-resize[data-v-6c2ea92b]{height:var(--space-1);position:relative;background:transparent;cursor:row-resize;touch-action:none;margin:calc(var(--space-05) * -1) calc(var(--sb-inset) * -1);z-index:var(--z-dropdown)}.pinned-resize-bar[data-v-6c2ea92b]{position:absolute;top:50%;left:0;right:0;height:var(--space-05);translate:0 -50%;background:transparent;transition:background var(--duration-fast) var(--ease-out)}.pinned-resize:hover .pinned-resize-bar[data-v-6c2ea92b]{background:var(--color-selected)}.pinned-resize.dragging .pinned-resize-bar[data-v-6c2ea92b]{background:var(--color-line-strong)}.pinned-resize[data-v-6c2ea92b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.pin-row.dragging[data-v-6c2ea92b]{opacity:.45}.release-notes[data-v-71f2d526]{min-width:0;overflow-wrap:anywhere;color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-prose)}.release-notes[data-v-71f2d526]>:first-child{margin-top:0}.release-notes[data-v-71f2d526]>:last-child{margin-bottom:0}.release-notes__empty[data-v-71f2d526]{margin:0;color:var(--color-text-muted)}.release-notes__heading[data-v-71f2d526]{margin:var(--space-5) 0 var(--space-2);color:var(--color-text-strong);font-size:var(--text-sm);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.release-notes__paragraph[data-v-71f2d526]{margin:0 0 var(--space-3)}.release-notes__list[data-v-71f2d526]{margin:0 0 var(--space-3);padding:0;list-style:none}.release-notes__list li[data-v-71f2d526]{position:relative;margin:0 0 var(--space-2);padding-inline-start:var(--space-4)}.release-notes__list li[data-v-71f2d526]:last-child{margin-bottom:0}.release-notes__list li[data-v-71f2d526]:before{content:"";position:absolute;inset-block-start:.6em;inset-inline-start:var(--space-1);width:4px;height:4px;border-radius:var(--radius-full);background:var(--color-text-faint)}.release-notes__provenance[data-v-71f2d526]{margin:var(--space-5) 0 0;padding-top:var(--space-3);border-top:1px solid var(--color-line);color:var(--color-text-muted);font-size:var(--text-xs)}.release-notes__provenance a[data-v-71f2d526]{color:var(--color-text-muted);font-family:var(--font-mono);text-decoration-color:var(--color-line-strong);text-underline-offset:2px}.release-notes__provenance a[data-v-71f2d526]:hover,.release-notes__provenance a[data-v-71f2d526]:focus-visible{color:var(--color-text)}.side[data-v-1918075b]{position:relative;isolation:isolate;display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover)}.side[data-v-1918075b]:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-color:var(--color-sidebar-glass);background-image:var(--color-sidebar-wash);-webkit-backdrop-filter:var(--p-sidebar-backdrop);backdrop-filter:var(--p-sidebar-backdrop)}.side.no-anim[data-v-1918075b]{transition:none}.side.collapsed[data-v-1918075b]{visibility:hidden}.col[data-v-1918075b]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:1px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-1918075b]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-1918075b]{padding-top:36px;-webkit-app-region:drag}.side.macos-desktop .ch-collapse[data-v-1918075b],.side.macos-desktop .ch-actions[data-v-1918075b]{-webkit-app-region:no-drag}.ch-logo[data-v-1918075b]{width:min(220px,100%);height:auto;object-fit:contain;object-position:left center;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-1918075b]:hover{transform:scale(1.08)}.ch-brand[data-v-1918075b]{display:flex;align-items:center;min-width:0;flex:1;user-select:none;touch-action:none}.ch-actions[data-v-1918075b]{display:flex;align-items:center;gap:var(--space-2);flex:none}.sidebar-update-trigger[data-v-1918075b]{width:32px;height:32px;border:none;border-radius:var(--radius-full);background:transparent}.sidebar-update-trigger[data-v-1918075b] svg{width:32px;height:32px}.ch-actions .sidebar-update-trigger[data-v-1918075b]:hover:not(:disabled){background:transparent}.sidebar-update-trigger[data-v-1918075b]:focus-visible{box-shadow:var(--p-focus-ring-strong)}.sidebar-update-notes[data-v-1918075b]{position:fixed;z-index:var(--z-tooltip);box-sizing:border-box;width:min(440px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 32px));overflow:hidden;border:1px solid var(--color-line-strong);border-radius:var(--radius-xl);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-menu);font-family:var(--font-ui)}.sidebar-update-notes__header[data-v-1918075b]{display:flex;flex-direction:column;gap:var(--space-1);padding:var(--space-6) var(--space-6) var(--space-5)}.sidebar-update-notes__header strong[data-v-1918075b]{color:var(--color-text-strong);font-size:var(--text-lg)}.sidebar-update-notes__header span[data-v-1918075b]{color:var(--color-text-muted);font-size:var(--text-sm)}.sidebar-update-notes__divider[data-v-1918075b]{height:1px;margin-inline:var(--space-6);background:var(--color-line)}.sidebar-update-notes.is-scrollable[data-v-1918075b]:after{content:"";position:absolute;inset-inline:1px;inset-block-end:1px;height:var(--space-6);border-end-start-radius:var(--radius-xl);border-end-end-radius:var(--radius-xl);background:linear-gradient(to bottom,transparent,var(--color-surface-raised));pointer-events:none}.sidebar-update-notes__body[data-v-1918075b]{min-width:0;max-height:min(500px,calc(100vh - 150px));overflow-x:clip;overflow-y:auto;padding:var(--space-5) var(--space-6) var(--space-6);overscroll-behavior:contain}.sidebar-update-notes__body[data-v-1918075b]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px;border-radius:var(--radius-md)}.btn-wrap[data-v-1918075b]{display:flex;align-items:center;gap:8px;padding:0 var(--sb-inset)}.btn-new-chat[data-v-1918075b]{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-new-chat[data-v-1918075b]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-1918075b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-1918075b]{flex:none}.btn-new-chat span[data-v-1918075b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-tabs[data-v-1918075b]{display:flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--sb-inset) var(--space-2)}.status-tabs>button[data-v-1918075b]:not(.status-view-switcher){min-height:28px;padding:0 var(--space-3);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-xs);cursor:pointer}.status-tabs>button.active[data-v-1918075b]{background:var(--color-selected);color:var(--color-text)}.status-view-switcher[data-v-1918075b]{margin-left:auto}.search-wrap[data-v-1918075b]{padding:0 var(--sb-inset);position:relative;z-index:1;background:var(--color-sidebar-glass);-webkit-backdrop-filter:var(--p-sidebar-backdrop);backdrop-filter:var(--p-sidebar-backdrop);border-bottom:1px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.search-wrap--scrolled[data-v-1918075b]{border-bottom-color:var(--line);box-shadow:var(--shadow-sm)}.search[data-v-1918075b]{display:flex;align-items:center;gap:12px;width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-1918075b]:hover{background:var(--sb-hover)}.search[data-v-1918075b]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-1918075b]{flex:none}.search-input[data-v-1918075b]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions[data-v-1918075b]{flex:1;overflow-y:auto;padding:var(--space-3) var(--sb-inset);min-height:0}.sessions[data-v-1918075b]::-webkit-scrollbar{width:4px}.sessions[data-v-1918075b]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-1918075b]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:var(--radius-full)}.sessions[data-v-1918075b]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-1918075b]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--sb-inset);border-top:1px solid var(--line)}.side-footer-account[data-v-1918075b]{flex:1 1 auto;min-width:0}.btn-settings-label[data-v-1918075b]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-settings[data-v-1918075b]{display:flex;align-items:center;gap:12px;width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-settings[data-v-1918075b]:hover{background:var(--sb-hover)}.btn-settings[data-v-1918075b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-settings svg[data-v-1918075b]{flex:none}.btn-settings span[data-v-1918075b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-label[data-v-1918075b]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-regular);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-1918075b]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-toggle[data-v-1918075b]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.side-section-label:hover .side-section-toggle[data-v-1918075b],.side-section-label:focus-within .side-section-toggle[data-v-1918075b]{opacity:1}.side-section-toggle[data-v-1918075b]:hover{color:var(--dim)}.side-section-toggle svg[data-v-1918075b]{width:13px;height:13px}.side-section-actions[data-v-1918075b]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-1918075b]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-1918075b]{box-shadow:inset 0 -2px 0 var(--color-accent)}.empty[data-v-1918075b]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-1918075b],.gh-menu[data-v-1918075b],.section-menu[data-v-1918075b]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.section-menu-check[data-v-1918075b]{display:inline-flex;flex:none;width:14px}.section-menu-label[data-v-1918075b]{padding:var(--space-2) var(--space-3) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ws-dir[data-v-1918075b]{display:block;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);cursor:pointer;position:relative;user-select:none}.ws-dir[data-v-1918075b]:hover{background:var(--sb-hover, var(--color-hover))}.ws-dir.on[data-v-1918075b]{background:var(--color-selected)}.ws-dir+.ws-dir[data-v-1918075b]{margin-top:var(--space-05)}.ws-dir-row[data-v-1918075b]{display:flex;align-items:center;gap:var(--sb-gap);min-width:0;position:relative}.ws-dir-icon[data-v-1918075b]{flex:none;color:var(--color-text-muted)}.ws-dir-name[data-v-1918075b]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-rename[data-v-1918075b]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-sm);padding:2px 5px;outline:none}.ws-dir-sub[data-v-1918075b]{margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-act[data-v-1918075b]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.ws-dir:hover .ws-dir-act[data-v-1918075b],.ws-dir:focus-within .ws-dir-act[data-v-1918075b],.ws-dir-act.open[data-v-1918075b]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh[data-v-1918075b]{display:flex;align-items:center;gap:var(--sb-gap);padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);user-select:none;position:relative;cursor:pointer}.done-gh[data-v-1918075b]:hover{background:var(--sb-hover, var(--color-hover))}.done-gh-folder[data-v-1918075b]{flex:none;color:var(--color-text-muted)}.done-gh-name[data-v-1918075b]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.done-gh-count[data-v-1918075b]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.done-gh-more[data-v-1918075b]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh:hover .done-gh-more[data-v-1918075b],.done-gh:focus-within .done-gh-more[data-v-1918075b],.done-gh-more.open[data-v-1918075b]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh:hover .done-gh-count[data-v-1918075b],.done-gh:focus-within .done-gh-count[data-v-1918075b]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh-sessions[data-v-1918075b]{padding-bottom:var(--space-1)}.folder-drop-overlay[data-v-1918075b]{position:absolute;inset:0;z-index:var(--z-dropdown);display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-1918075b]{opacity:1;visibility:visible}.folder-drop-card[data-v-1918075b]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:1px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-1918075b]{flex:none}.folder-drop-card span[data-v-1918075b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-check[data-v-7344a446]{display:inline-flex;align-items:center;gap:var(--space-2);cursor:pointer}.ui-check.is-disabled[data-v-7344a446]{opacity:.5;cursor:not-allowed}.ui-check__input[data-v-7344a446]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ui-check__box[data-v-7344a446]{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none;border:1.5px solid var(--color-line-strong);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-on-accent);transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out)}.ui-check.is-on .ui-check__box[data-v-7344a446]{background:var(--color-accent);border-color:var(--color-accent)}.ui-check__input:focus-visible+.ui-check__box[data-v-7344a446]{box-shadow:var(--p-focus-ring)}.ui-check__box svg[data-v-7344a446]{width:12px;height:12px}.ui-check__label[data-v-7344a446]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text)}.ui-empty[data-v-9dd6e8c0]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-9dd6e8c0]{color:var(--color-text-faint)}.ui-empty__icon[data-v-9dd6e8c0] svg{width:48px;height:48px}.ui-empty__title[data-v-9dd6e8c0]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-9dd6e8c0]{font-size:var(--text-sm);color:var(--color-text-muted)}.filter-select[data-v-760e80df]{position:relative;min-width:0}.filter-select__trigger[data-v-760e80df]{min-height:32px;display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.filter-select__trigger[data-v-760e80df]:hover{background:var(--color-hover)}.filter-select__trigger[data-v-760e80df]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.filter-select__label[data-v-760e80df]{color:var(--color-text-muted)}.filter-select__value[data-v-760e80df]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filter-select__menu[data-v-760e80df]{position:absolute;top:calc(100% + var(--space-1));right:0;z-index:var(--z-dropdown)}.filter-select__check[data-v-760e80df]{width:16px;flex:none}.sa-dot[data-v-760e80df]{flex:none;width:8px;height:8px;border-radius:var(--radius-full)}.sa-dot--open[data-v-760e80df]{background:var(--color-success)}.sa-dot--done[data-v-760e80df]{background:var(--color-done)}.multi-select[data-v-887f9b9a]{position:relative;min-width:0}.multi-select__trigger[data-v-887f9b9a]{min-height:32px;max-width:320px;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.multi-select__trigger[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__trigger[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__placeholder[data-v-887f9b9a]{padding:0 var(--space-1);color:var(--color-text-muted)}.multi-select__tag[data-v-887f9b9a]{min-width:0;display:inline-flex;align-items:center;gap:var(--space-1);padding:2px 6px;border-radius:var(--radius-full);background:var(--color-surface-sunken)}.multi-select__tag>span[data-v-887f9b9a]:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__remove[data-v-887f9b9a]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:var(--radius-full)}.multi-select__remove[data-v-887f9b9a]{padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.multi-select__remove[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__more[data-v-887f9b9a]{color:var(--color-text-muted)}.multi-select__menu[data-v-887f9b9a]{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:var(--z-dropdown);width:min(320px,calc(100vw - var(--space-4)))}.multi-select__search[data-v-887f9b9a]{padding:var(--space-1)}.multi-select__separator[data-v-887f9b9a]{height:1px;margin:var(--space-1) 0;background:var(--color-line)}.multi-select__options[data-v-887f9b9a]{max-height:240px;overflow:auto}.multi-select__option[data-v-887f9b9a]{min-height:32px;display:flex;align-items:center;gap:var(--space-2);padding:6px 10px;border-radius:var(--radius-sm);color:var(--color-text);font-size:var(--text-base);cursor:pointer}.multi-select__option[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__option.active[data-v-887f9b9a]{background:var(--color-selected)}.multi-select__name[data-v-887f9b9a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__empty[data-v-887f9b9a]{padding:var(--space-3);color:var(--color-text-muted);text-align:center}.session-admin[data-v-264fe89e]{grid-column:3 / -1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text)}.session-admin__header[data-v-264fe89e]{min-height:var(--panel-head-h);display:flex;align-items:flex-start;gap:var(--space-3);padding:var(--space-4);border-bottom:.5px solid var(--color-line)}.session-admin__header h1[data-v-264fe89e]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium)}.session-admin__header p[data-v-264fe89e]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__body[data-v-264fe89e]{width:min(100%,var(--p-table-max));min-height:0;margin:0 auto;padding:var(--space-5);overflow:auto}.session-admin__filters[data-v-264fe89e]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-4)}.session-admin__query[data-v-264fe89e]{width:min(260px,100%)}.session-admin__batch[data-v-264fe89e]{min-height:44px;display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-bottom:0;border-radius:var(--radius-md) var(--radius-md) 0 0;background:var(--color-surface);font-size:var(--text-sm)}.session-admin__table-wrap[data-v-264fe89e]{min-width:0;overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.session-admin__batch+.session-admin__table-wrap[data-v-264fe89e]{border-radius:0 0 var(--radius-md) var(--radius-md)}.session-admin__table[data-v-264fe89e]{width:100%;border-collapse:collapse;font-size:var(--text-sm)}.session-admin__table th[data-v-264fe89e],.session-admin__table td[data-v-264fe89e]{padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line);text-align:left;vertical-align:middle}.session-admin__table th[data-v-264fe89e]{background:var(--color-surface);color:var(--color-text-muted);font-weight:var(--weight-medium);white-space:nowrap}.session-admin__table tbody tr[data-v-264fe89e]:hover{background:var(--color-hover)}.session-admin__table tbody tr:last-child td[data-v-264fe89e]{border-bottom:0}.session-admin__check[data-v-264fe89e]{width:32px}.session-admin__back-icon[data-v-264fe89e]{transform:rotate(180deg)}.session-admin__status[data-v-264fe89e]{display:inline-flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__status.done[data-v-264fe89e]{color:var(--color-success)}.session-admin__title[data-v-264fe89e],.session-admin__prompt[data-v-264fe89e]{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-admin__title-button[data-v-264fe89e]{max-width:100%;overflow:hidden;border:0;background:transparent;color:inherit;font:inherit;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.session-admin__title-button[data-v-264fe89e]:hover{text-decoration:underline;text-underline-offset:3px}.session-admin__title-button[data-v-264fe89e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.session-admin__rename[data-v-264fe89e]{width:100%;min-width:140px;border:1px solid var(--color-accent);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text);font:inherit}.session-admin__actions[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__updated[data-v-264fe89e]{white-space:nowrap;color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-xs)}.session-admin__state[data-v-264fe89e]{min-height:220px;display:grid;place-items:center}.session-admin__sr-only[data-v-264fe89e]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.session-admin__pager[data-v-264fe89e]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding-top:var(--space-3);color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__pager>div[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-2)}@media(max-width:640px){.session-admin[data-v-264fe89e]{grid-column:1}.session-admin__body[data-v-264fe89e],.session-admin__header[data-v-264fe89e]{padding:var(--space-3)}}.rh[data-v-9d88ed75]{width:4px;flex:none;cursor:col-resize;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-9d88ed75]{position:absolute;inset:0;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-9d88ed75],.rh.dragging .rh-bar[data-v-9d88ed75]{background:var(--color-accent)}.rh[data-v-9d88ed75]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.kw-dot[data-v-0c65e524]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-0c65e524]{background:var(--color-success)}.kw-dot--error[data-v-0c65e524]{background:var(--color-danger)}.kw-dot--suspended[data-v-0c65e524]{background:var(--color-warning)}.kw-dot--running[data-v-0c65e524]{background:var(--color-accent);animation:kw-dot-pulse-0c65e524 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-0c65e524{0%{box-shadow:0 0 color-mix(in srgb,var(--color-accent) 40%,transparent)}to{box-shadow:0 0 0 6px transparent}}.box[data-v-bf82d9cd]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.box.err[data-v-bf82d9cd]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.box.stacked[data-v-bf82d9cd]{border:none;border-radius:0}.box.stacked .bh[data-v-bf82d9cd]{border-radius:0}.box.stack-middle[data-v-bf82d9cd],.box.stack-last[data-v-bf82d9cd]{border-top:1px solid var(--color-line)}.bh[data-v-bf82d9cd]{display:flex;align-items:center;gap:8px;min-height:30px;padding:0 11px;cursor:pointer;font:var(--text-sm) var(--font-mono);color:var(--color-text);--emph: var(--color-text-muted)}.box.open .bh[data-v-bf82d9cd],.bh[data-v-bf82d9cd]:hover{background:var(--color-surface-sunken);--emph: var(--color-text)}.box.run .bh[data-v-bf82d9cd]{--emph: var(--color-text-strong)}.box.err .bh[data-v-bf82d9cd]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.box.err .bh[data-v-bf82d9cd]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.gl[data-v-bf82d9cd]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.bh-text[data-v-bf82d9cd]{display:flex;align-items:baseline;gap:inherit;flex:1;min-width:0;overflow:hidden}.a[data-v-bf82d9cd]{color:var(--emph);font-weight:var(--weight-medium);flex:none;transition:color var(--duration-slow) var(--ease-out)}.p[data-v-bf82d9cd]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-bf82d9cd]{margin-left:auto;color:var(--color-text-muted);font-size:var(--text-xs);display:flex;align-items:center;gap:6px;flex:0 1 auto;min-width:0}.tm[data-v-bf82d9cd]{color:var(--color-text-faint);flex:none;white-space:nowrap}.chip[data-v-bf82d9cd-s]{color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status[data-v-bf82d9cd]{display:inline-flex;align-items:center;flex:none}.status.ok[data-v-bf82d9cd]{color:var(--color-success)}.status.error[data-v-bf82d9cd]{color:var(--color-danger)}.bb[data-v-bf82d9cd]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.bb.open[data-v-bf82d9cd]{grid-template-rows:minmax(0,1fr)}.bb-pad[data-v-bf82d9cd]{min-height:0;overflow:hidden;padding:var(--space-2) var(--space-3) var(--space-3);background:var(--color-surface-sunken);border-top:1px solid var(--color-line);color:var(--color-text);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.box.mob[data-v-bf82d9cd]{margin:0}.detach[data-v-4049750a]{position:relative;flex:none;margin-right:var(--space-1)}.detach.touch[data-v-4049750a]:after{content:"";position:absolute;inset:-9px}.at-open[data-v-4049750a]{flex:none;background:none;border:1px solid var(--color-line);border-radius:var(--radius-xs);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);padding:1px 7px;cursor:pointer}.at-open[data-v-4049750a]:hover{color:var(--color-text);background:var(--color-surface-sunken)}.at-type[data-v-4049750a]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-bottom:6px}.at-task[data-v-4049750a]{color:var(--color-text);white-space:pre-wrap;word-break:break-word}.at-task+.bb-code[data-v-4049750a]{margin-top:10px}.bb-code[data-v-4049750a]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md)}.chip[data-v-53896919]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.au-dismissed[data-v-53896919]{color:var(--color-text-muted);font:italic var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-list[data-v-53896919]{display:flex;flex-direction:column;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-block[data-v-53896919]{padding:4px 0}.au-block+.au-block[data-v-53896919]{margin-top:4px;padding-top:10px;border-top:1px dashed var(--color-line)}.au-q[data-v-53896919]{display:flex;align-items:baseline;gap:8px;margin-bottom:6px}.au-hdr[data-v-53896919]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:0 6px;flex:none}.au-qtext[data-v-53896919]{color:var(--color-text);font-weight:var(--weight-medium)}.au-opts[data-v-53896919]{display:flex;flex-direction:column;gap:4px}.au-opt[data-v-53896919]{display:flex;align-items:center;gap:8px;padding:5px 10px;border:1px solid var(--color-line);border-radius:var(--radius-md);color:var(--color-text-faint)}.au-opt.sel[data-v-53896919]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.au-glyph[data-v-53896919]{font:var(--text-base) var(--font-mono);color:var(--color-text-faint);width:14px;text-align:center;flex:none}.au-opt.sel .au-glyph[data-v-53896919]{color:var(--color-accent-hover)}.au-label[data-v-53896919]{color:inherit}.au-desc[data-v-53896919]{color:var(--color-text-faint);font-size:var(--text-xs);margin-left:2px}.au-opt.sel .au-desc[data-v-53896919]{color:var(--color-text-muted)}.au-raw[data-v-53896919]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.tool-output-block[data-v-262bbea0]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised)}.tool-output-block.scroll[data-v-262bbea0]{max-height:calc(var(--tool-output-visible-lines) * 1lh);overflow-y:auto;scrollbar-gutter:stable}.bb-empty[data-v-262bbea0]{color:var(--color-text-muted);font-style:italic}.tl-detach[data-v-8e5a48b5]{position:relative;flex:none}.tl-detach.touch[data-v-8e5a48b5]:after{content:"";position:absolute;inset:-9px}.bash-command[data-v-8e5a48b5]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);white-space:pre-wrap}.diff-lines[data-v-f456050c]{padding:4px 0 12px;font-size:var(--ui-font-size);line-height:1.5;-webkit-overflow-scrolling:touch;width:max-content;min-width:100%}.dl[data-v-f456050c]{display:flex;align-items:flex-start;min-height:18px;white-space:pre;width:100%}.dl-gutter[data-v-f456050c]{flex:none;width:40px;padding:0 6px;text-align:right;color:var(--faint, #aeb4bc);background:var(--panel, #fafbfc);user-select:none;border-right:1px solid var(--line2, #eef1f4);font-variant-numeric:tabular-nums}.dl-gutter.new[data-v-f456050c]{border-right:1px solid var(--line, #e7eaee)}.dl-sign[data-v-f456050c]{flex:none;width:16px;text-align:center;color:var(--muted);user-select:none}.dl-text[data-v-f456050c]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.dl-add[data-v-f456050c]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.dl-add .dl-sign[data-v-f456050c]{color:var(--color-success)}.dl-del[data-v-f456050c]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.dl-del .dl-sign[data-v-f456050c]{color:var(--color-danger)}.dl-hunk[data-v-f456050c]{background:var(--panel2, #f3f5f8)}.dl-hunk .hunk-text[data-v-f456050c]{flex:1;padding:1px 12px;color:var(--muted, #8b929b);font-style:normal}@media(max-width:640px){.diff-lines[data-v-f456050c]{overflow-x:auto;font-size:var(--ui-font-size)}}.tl-name[data-v-c08833f8]{color:var(--emph, var(--color-text));font-weight:var(--weight-medium);flex:none;transition:color var(--duration-slow) var(--ease-out)}.tl-ficon[data-v-c08833f8]{display:inline-flex;align-items:center;align-self:center;flex:none}.tl-ficon[data-v-c08833f8] svg{display:block}.tl-file[data-v-c08833f8]{color:var(--emph, var(--color-text));line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer;transition:color var(--duration-slow) var(--ease-out)}.tl-file[data-v-c08833f8]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-c08833f8]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-c08833f8]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-c08833f8]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-add[data-v-c08833f8]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-del[data-v-c08833f8]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.diffbar[data-v-c08833f8]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-c08833f8]{background:var(--color-success)}.seg-del[data-v-c08833f8]{background:var(--color-danger)}.diff-wrap[data-v-c08833f8]{margin-top:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);overflow-x:auto}.bb-summary[data-v-26ca25c1]{color:var(--color-text);border-bottom:1px dashed var(--color-line);padding-bottom:6px;margin-bottom:6px;word-break:break-all}.chip[data-v-26ca25c1]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.file-list[data-v-6193bdd4]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-6193bdd4]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-6193bdd4]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-6193bdd4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill[data-v-98645e74]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-pill.pill-active[data-v-98645e74]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-98645e74]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-98645e74]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-budget[data-v-98645e74]{color:var(--color-text-muted)}.match-list[data-v-2e67b1f9]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-2e67b1f9]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-2e67b1f9]{cursor:pointer}.match-row.link[data-v-2e67b1f9]:hover{background:var(--color-hover)}.match-row[data-v-2e67b1f9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-2e67b1f9]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-2e67b1f9]{color:var(--color-accent)}.mtext[data-v-2e67b1f9]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-tool[data-v-25ffa7b7]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-25ffa7b7]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-25ffa7b7]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-video-button[data-v-25ffa7b7]{position:relative;display:block}.media-video-tile[data-v-25ffa7b7]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-25ffa7b7]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-image[data-v-25ffa7b7]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-audio[data-v-25ffa7b7]{max-width:100%;border-radius:var(--radius-md)}.dynamic-workflow-card[data-v-f99407e1]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.dynamic-workflow-card.err[data-v-f99407e1]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.head[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:0 11px;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.head[data-v-f99407e1]:hover,.dynamic-workflow-card.open>.head[data-v-f99407e1]{background:var(--color-surface-sunken);color:var(--color-text)}.dynamic-workflow-card.err>.head[data-v-f99407e1]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.dynamic-workflow-card.err>.head[data-v-f99407e1]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.head[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-f99407e1]{color:var(--color-text-faint);flex:none}.title[data-v-f99407e1]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-f99407e1]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-f99407e1]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-f99407e1]{margin-left:auto;display:flex;align-items:center;gap:var(--space-2);flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-f99407e1]{display:inline-flex;align-items:center;gap:5px;flex:none;padding:1px 7px;border-radius:var(--radius-full);border:1px solid var(--color-line)}.status-ok[data-v-f99407e1]{color:var(--color-success)}.status-error[data-v-f99407e1]{color:var(--color-danger)}.status-running[data-v-f99407e1]{color:var(--color-accent)}.status-txt[data-v-f99407e1]{font-size:var(--text-xs)}.chip[data-v-f99407e1]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-f99407e1]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-f99407e1]{margin-left:2px;color:var(--color-text-faint);flex:none}.body[data-v-f99407e1]{border-top:1px solid var(--color-line);background:var(--color-surface-sunken)}.overview[data-v-f99407e1]{padding:9px 11px 8px;border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.routing[data-v-f99407e1]{display:flex;flex-wrap:wrap;gap:6px 14px;margin-bottom:6px}.routing-seg[data-v-f99407e1]{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0}.routing-key[data-v-f99407e1]{font:var(--text-xs) var(--font-mono);letter-spacing:.06em;color:var(--color-text-faint)}.routing-val[data-v-f99407e1]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.routing-breakdown[data-v-f99407e1]{display:inline-flex;flex-wrap:wrap;gap:var(--space-1) var(--space-2)}.routing-bd[data-v-f99407e1]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.override-chip[data-v-f99407e1]{padding:1px 8px;border-radius:var(--radius-full);border:1px solid var(--color-warning-bd);background:var(--color-warning-soft);color:var(--color-warning);font:var(--text-xs) var(--font-ui);cursor:pointer}.override-chip[data-v-f99407e1]:hover{filter:brightness(.97)}.override-chip[data-v-f99407e1]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--color-accent-soft)}.provenance[data-v-f99407e1]{display:flex;flex-wrap:wrap;gap:2px 14px;margin-bottom:6px}.prov-line[data-v-f99407e1]{font-size:var(--text-xs);color:var(--color-text-muted)}.notice[data-v-f99407e1]{margin-bottom:6px;padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-warning-soft);border:1px solid var(--color-warning-bd);color:var(--color-warning);font-size:var(--text-xs)}.overview-line[data-v-f99407e1]{display:flex;align-items:baseline;gap:var(--space-2)}.lbl[data-v-f99407e1]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-f99407e1]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:8px 0 4px;gap:2px}.seg>span[data-v-f99407e1]{height:100%;border-radius:var(--radius-full);min-width:3px}.seg.cells>.cell[data-v-f99407e1]{flex:1}.s-ok[data-v-f99407e1]{background:var(--color-success)}.s-run[data-v-f99407e1]{background:var(--color-accent)}.s-warn[data-v-f99407e1]{background:var(--color-warning)}.s-fail[data-v-f99407e1]{background:var(--color-danger)}.s-queue[data-v-f99407e1]{background:var(--color-line)}.legend[data-v-f99407e1]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-f99407e1]{display:inline-flex;align-items:center;gap:5px;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.lg-dot[data-v-f99407e1]{width:6px;height:6px;border-radius:var(--radius-full)}.group[data-v-f99407e1]{border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.group[data-v-f99407e1]:last-child{border-bottom:none}.group-head[data-v-f99407e1]{display:flex;align-items:center;gap:6px;width:100%;min-height:26px;padding:0 11px;border:none;background:transparent;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);text-align:left;cursor:pointer;user-select:none}.group-head[data-v-f99407e1]:hover{color:var(--color-text)}.group-head[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.group-title[data-v-f99407e1]{font-weight:var(--weight-medium)}.group-failed .group-title[data-v-f99407e1]{color:var(--color-danger)}.group-suspended .group-title[data-v-f99407e1]{color:var(--color-warning)}.group-count[data-v-f99407e1]{font-family:var(--font-mono);color:var(--color-text-faint)}.group-toggle[data-v-f99407e1]{margin-left:auto;color:var(--color-text-faint)}.member[data-v-f99407e1]{position:relative;border-top:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.member-saved[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);cursor:pointer}.member-saved[data-v-f99407e1]:hover{background:var(--color-hover);color:var(--color-text-muted)}.member-saved[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-saved-car[data-v-f99407e1]{color:var(--color-text-faint)}.member-head[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:4px 11px;border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-f99407e1]:hover,.member.open .member-head[data-v-f99407e1]{background:color-mix(in srgb,var(--color-surface) 55%,var(--bg))}.member-head[data-v-f99407e1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.row-dot[data-v-f99407e1]{flex:none}.row-dot.pulse[data-v-f99407e1]{animation:dw-pulse-f99407e1 1.6s ease-in-out infinite}@keyframes dw-pulse-f99407e1{0%,to{opacity:1}50%{opacity:.45}}.member-main[data-v-f99407e1]{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}.member-line[data-v-f99407e1]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.member-meta[data-v-f99407e1]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1) var(--space-2);min-width:0}.mname[data-v-f99407e1]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-f99407e1]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mmeta[data-v-f99407e1]{font:var(--text-xs) var(--font-mono);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mprov[data-v-f99407e1]{font-size:var(--text-xs);color:var(--color-text-faint);padding:0 6px;border-radius:var(--radius-full);border:1px solid var(--color-line)}.mprov[data-source=policy-force][data-v-f99407e1]{color:var(--color-warning);border-color:var(--color-warning-bd)}.mearlier[data-v-f99407e1]{font-size:var(--text-xs);color:var(--color-warning)}.melapsed[data-v-f99407e1],.mphase[data-v-f99407e1]{flex:none;font:var(--text-xs) var(--font-mono);color:var(--color-text-faint)}.phase-completed .mphase[data-v-f99407e1]{color:var(--color-success)}.phase-failed .mphase[data-v-f99407e1]{color:var(--color-danger)}.phase-working .mphase[data-v-f99407e1]{color:var(--color-accent)}.phase-suspended .mphase[data-v-f99407e1]{color:var(--color-warning)}.mcar[data-v-f99407e1]{margin-left:4px;color:var(--color-text-faint);flex:none}.member-body[data-v-f99407e1]{padding:4px 11px 10px 31px;color:var(--color-text-muted);font-size:var(--text-xs);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-f99407e1]{padding:6px 11px 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-f99407e1]{padding:9px 11px 10px;color:var(--color-text);font:var(--text-xs)/1.6 var(--font-mono);white-space:pre-wrap;word-break:break-word}.plan-review[data-v-9b531bda]{color:var(--color-text-muted)}.plan-md[data-v-9b531bda]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-path[data-v-9b531bda]{display:grid;gap:var(--space-1);width:100%;margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text-muted);text-align:left}.plan-path-value[data-v-9b531bda]{color:var(--color-accent);word-break:break-all}.plan-path[data-v-9b531bda] .ui-button{justify-self:start}.plan-option[data-v-9b531bda]{display:grid;gap:var(--space-1);margin-top:var(--space-2)}.plan-option[data-v-9b531bda]>:first-child{color:var(--color-text-muted)}.tl-ficon[data-v-db7c0c4a]{display:inline-flex;align-items:center;align-self:center;flex:none}.tl-ficon[data-v-db7c0c4a] svg{display:block}.tl-name[data-v-db7c0c4a]{color:var(--emph, var(--color-text));font-weight:var(--weight-medium);flex:none;transition:color var(--duration-slow) var(--ease-out)}.tl-file[data-v-db7c0c4a]{color:var(--emph, var(--color-text));line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer;transition:color var(--duration-slow) var(--ease-out)}.tl-file[data-v-db7c0c4a]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-db7c0c4a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-db7c0c4a]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-db7c0c4a]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.path-link[data-v-db7c0c4a]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-db7c0c4a]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-db7c0c4a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.read-line[data-v-db7c0c4a]{display:flex;font-size:var(--text-xs)}.read-no[data-v-db7c0c4a]{flex:none;min-width:4ch;padding-right:var(--space-2);text-align:right;color:var(--color-text-faint);font-variant-numeric:tabular-nums;user-select:none}.read-text[data-v-db7c0c4a]{min-width:0;white-space:pre-wrap;word-break:break-word}.todo-bar[data-v-7bba88f4]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-7bba88f4]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-7bba88f4]{display:grid;gap:var(--space-2)}.todo-row[data-v-7bba88f4]{display:flex;align-items:center;gap:var(--space-2)}.todo-status[data-v-7bba88f4]{display:inline-flex;color:var(--color-text-muted)}.todo-row[data-status=done][data-v-7bba88f4]{color:var(--color-text-muted);text-decoration:line-through}.todo-row[data-status=done] .todo-status[data-v-7bba88f4]{color:var(--color-success)}.todo-row[data-status=in_progress] .todo-status[data-v-7bba88f4]{color:var(--color-accent)}.wf-glance[data-v-333157a5]{margin-bottom:var(--space-1)}.wf-main[data-v-333157a5]{color:var(--color-text);font-size:var(--text-sm);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-sub[data-v-333157a5]{color:var(--color-text-muted);font-size:var(--text-xs);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-status.success[data-v-333157a5]{color:var(--color-success)}.wf-status.danger[data-v-333157a5]{color:var(--color-danger)}.wf-status.warning[data-v-333157a5]{color:var(--color-warning)}.tb[data-v-547f82f4]{overflow:visible}.on .tb-bulb[data-v-547f82f4]{transform-box:fill-box;transform-origin:50% 84%;animation:tb-swell-547f82f4 1.85s cubic-bezier(.4,0,.2,1) infinite}.on .tb-filament[data-v-547f82f4]{stroke-dasharray:12;stroke-dashoffset:12;animation:tb-draw-547f82f4 1.85s cubic-bezier(.4,0,.2,1) infinite}.on .tb-base[data-v-547f82f4]{transform-box:fill-box;transform-origin:center;animation:tb-breathe-547f82f4 1.85s cubic-bezier(.4,0,.2,1) infinite}@keyframes tb-swell-547f82f4{0%,14%,to{transform:translateY(0) scale(1);opacity:.82}38%{transform:translateY(-.7px) scale(1.055,1.09);opacity:1}58%{transform:translateY(-.2px) scale(1.015,1.025);opacity:.94}76%{transform:translateY(0) scale(1);opacity:.84}}@keyframes tb-breathe-547f82f4{0%,18%,to{transform:scaleX(.96);opacity:.78}42%{transform:scaleX(1.08);opacity:1}68%{transform:scaleX(1);opacity:.9}}@keyframes tb-draw-547f82f4{0%,12%{stroke-dashoffset:12;opacity:.18}40%{stroke-dashoffset:0;opacity:1}68%{stroke-dashoffset:0;opacity:.92}90%,to{stroke-dashoffset:-12;opacity:.16}}@media(prefers-reduced-motion:reduce){.on .tb-bulb[data-v-547f82f4],.on .tb-filament[data-v-547f82f4],.on .tb-base[data-v-547f82f4]{animation:none;opacity:.9}.on .tb-filament[data-v-547f82f4]{stroke-dashoffset:0}}.think[data-v-41ebc35f]{margin:0}.think-head[data-v-41ebc35f]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.think-head[data-v-41ebc35f]:hover{color:var(--color-text)}.think-head.is-static[data-v-41ebc35f],.think-head.is-static[data-v-41ebc35f]:hover{cursor:default;color:var(--color-text-faint)}.think-head[data-v-41ebc35f]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.think-bulb[data-v-41ebc35f]{flex:none}.think-title[data-v-41ebc35f]{font-weight:var(--weight-medium)}.think-time[data-v-41ebc35f]{color:var(--color-text-faint);font-weight:400;flex:none}.think-car[data-v-41ebc35f]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.think.open .think-car[data-v-41ebc35f]{transform:rotate(90deg)}.think-body[data-v-41ebc35f]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.think-body.instant[data-v-41ebc35f]{transition:none}.think-body.open[data-v-41ebc35f]{grid-template-rows:minmax(0,1fr)}.think-body-inner[data-v-41ebc35f]{min-height:0;overflow:hidden}.think-text[data-v-41ebc35f]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;padding:var(--space-1) 0 var(--space-2)}.mob .think-text[data-v-41ebc35f]{color:var(--color-text-faint);line-height:var(--leading-normal)}.think.streaming .think-title[data-v-41ebc35f]{animation:think-breathe-41ebc35f 1.6s var(--ease-in-out) infinite}@keyframes think-breathe-41ebc35f{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.think.streaming .think-title[data-v-41ebc35f]{animation:none}}.activity-run[data-v-9e5d8a24]{display:flex;flex-direction:column;animation:pythinker-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-9e5d8a24]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-9e5d8a24]:hover{color:var(--color-text)}.ar-head[data-v-9e5d8a24]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-9e5d8a24]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-9e5d8a24]{color:var(--color-success)}.ar-glyph.err[data-v-9e5d8a24]{color:var(--color-danger)}.ar-glyph.run[data-v-9e5d8a24]{color:var(--color-text-muted);animation:ar-breathe-9e5d8a24 1.6s var(--ease-in-out) infinite}.ar-glyph.run.bulb[data-v-9e5d8a24]{animation:none}@keyframes ar-breathe-9e5d8a24{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-9e5d8a24]{animation:none}}.ar-sum[data-v-9e5d8a24]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-car[data-v-9e5d8a24]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-9e5d8a24]{transform:rotate(90deg)}.ar-body[data-v-9e5d8a24]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-9e5d8a24]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-9e5d8a24]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.ar-sep[data-v-9e5d8a24],.ar-faint[data-v-9e5d8a24]{color:var(--color-text-faint)}.ar-danger[data-v-9e5d8a24]{color:var(--color-danger)}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: hsl(var(--ms-muted));--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid var(--code-bg);color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-a7e90764]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-a7e90764]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-a7e90764]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-a7e90764]{animation-name:text-node-stream-update-fade-a-a7e90764}.text-node-stream-delta--b[data-v-a7e90764]{animation-name:text-node-stream-update-fade-b-a7e90764}@keyframes text-node-stream-update-fade-a-a7e90764{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-a7e90764{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-a7e90764]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-72200115]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-72200115]{transition:none}.code-editor-layer[data-v-72200115]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-72200115]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-72200115]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-72200115]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-72200115]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-72200115]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-72200115]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-72200115]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-72200115]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:transparent;color:var(--vscode-editor-foreground, inherit);backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-72200115] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-72200115]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-72200115]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-72200115]{background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-72200115]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-72200115]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-72200115]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-72200115]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-72200115],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-72200115]{animation:none}@keyframes code-skeleton-shimmer-72200115{0%{background-position:100% 0}to{background-position:0 0}}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-72200115] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-72200115] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-72200115] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-72200115] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-72200115] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-72200115] .markstream-inline-fold-proxy:hover,[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-0aff75e3]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-0aff75e3]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-0aff75e3]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-0aff75e3]{background:transparent}.mermaid-mode-btn[data-v-0aff75e3]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-0aff75e3]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-0aff75e3]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-0aff75e3]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-0aff75e3]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-0aff75e3]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-0aff75e3]:active{transform:scale(.98)}.mermaid-source-panel[data-v-0aff75e3]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-0aff75e3]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-0aff75e3]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-0aff75e3]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-0aff75e3]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-0aff75e3]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-0aff75e3] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-0aff75e3] svg{width:100%;height:auto;display:block}.fullscreen[data-v-0aff75e3]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-0aff75e3],.mermaid-dialog-leave-to[data-v-0aff75e3]{opacity:0}.mermaid-dialog-enter-active[data-v-0aff75e3],.mermaid-dialog-leave-active[data-v-0aff75e3]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-to .dialog-panel[data-v-0aff75e3]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-from .dialog-panel[data-v-0aff75e3]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-active .dialog-panel[data-v-0aff75e3]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-1b44ea19]{font:400 15px/1.6 var(--font-ui);color:var(--color-text);word-break:break-word}.md[data-v-1b44ea19] .markdown-renderer{font:400 15px/1.6 var(--font-ui);color:var(--color-text)}.md[data-v-1b44ea19] .markstream-vue,.md[data-v-1b44ea19] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-surface-sunken);--inline-code-fg: var(--color-fg);--inline-code-border: transparent}.md[data-v-1b44ea19] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-1b44ea19] .md-file-link:hover{color:var(--color-accent)}.md[data-v-1b44ea19] .markdown-renderer p,.md[data-v-1b44ea19] .markdown-renderer li,.md[data-v-1b44ea19] .markdown-renderer blockquote,.md[data-v-1b44ea19] .markdown-renderer td,.md[data-v-1b44ea19] .markdown-renderer th{font-size:var(--content-font-size)}.md[data-v-1b44ea19] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-1b44ea19] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-1b44ea19] h1,.md[data-v-1b44ea19] h2,.md[data-v-1b44ea19] h3,.md[data-v-1b44ea19] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em;line-height:var(--leading-tight)}.md[data-v-1b44ea19] h1{font-size:max(var(--text-xl),calc(var(--content-font-size) + 3px));border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-1b44ea19] h2{font-size:max(var(--text-lg),calc(var(--content-font-size) + 2px))}.md[data-v-1b44ea19] h3{font-size:max(var(--text-lg),calc(var(--content-font-size) + 1px))}.md[data-v-1b44ea19] h4{font-size:max(var(--text-base),calc(var(--content-font-size) + 1px));color:var(--color-text-muted)}.md[data-v-1b44ea19] p{margin:.8rem 0}.md[data-v-1b44ea19] .node-slot+.node-slot{margin-top:.8rem}.md[data-v-1b44ea19] ul,.md[data-v-1b44ea19] ol{padding-left:1.4em;margin:.6em 0}.md[data-v-1b44ea19] li{margin:.3em 0}.md[data-v-1b44ea19] :not(pre)>code,.md[data-v-1b44ea19] .inline-code{font:.9em var(--font-mono);background:var(--color-surface-sunken);color:var(--color-fg);padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-1b44ea19] strong code,.md[data-v-1b44ea19] strong .inline-code,.md[data-v-1b44ea19] b code,.md[data-v-1b44ea19] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-1b44ea19] .code-block-container{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-1b44ea19] .code-block-header{background:var(--color-surface);border-bottom:1px solid var(--color-line);padding:4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-1b44ea19] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-1b44ea19] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-1b44ea19] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-1b44ea19] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-1b44ea19] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-1b44ea19] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-1b44ea19] .code-block-header .code-header-title{font-size:var(--text-sm);font-weight:var(--weight-medium)}.md[data-v-1b44ea19] .code-block-header .code-action-btn:hover *{color:var(--color-text)}.md[data-v-1b44ea19] .code-block-container.md-code-wrap pre{white-space:pre-wrap!important;overflow-wrap:anywhere}.md[data-v-1b44ea19] .code-block-header .md-code-nums-toggle[aria-pressed=true],.md[data-v-1b44ea19] .code-block-header .md-code-wrap-toggle[aria-pressed=true]{background:var(--color-selected);color:var(--color-text)}.md[data-v-1b44ea19] .code-block-header .md-code-nums-toggle[aria-pressed=true] *,.md[data-v-1b44ea19] .code-block-header .md-code-wrap-toggle[aria-pressed=true] *{background:transparent;color:var(--color-text)}.md[data-v-1b44ea19] .code-block-header .md-code-nums-toggle[aria-pressed=true]:hover,.md[data-v-1b44ea19] .code-block-header .md-code-wrap-toggle[aria-pressed=true]:hover{background:var(--color-selected-hover)}.md[data-v-1b44ea19] .code-block-shell-content,.md[data-v-1b44ea19] .markstream-pre{background:var(--color-surface-sunken)}.md[data-v-1b44ea19] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-1b44ea19] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-1b44ea19] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-1b44ea19] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-1b44ea19] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-1b44ea19] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-1b44ea19] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-1b44ea19] .markstream-pre,.md[data-v-1b44ea19] .code-pre-fallback,.md[data-v-1b44ea19] .code-block-shell-content pre:not(.shiki),.md[data-v-1b44ea19] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-1b44ea19] a{color:var(--color-accent);text-decoration:none}.md[data-v-1b44ea19] a:hover{text-decoration:underline}.md[data-v-1b44ea19] a.mention-pill{color:var(--color-text-muted);text-decoration:none}.md[data-v-1b44ea19] a.mention-folder:hover{text-decoration:none}.md[data-v-1b44ea19] .math-inline{vertical-align:baseline}.md-frontmatter[data-v-1b44ea19]{margin:0 0 var(--space-2);padding:var(--space-3) var(--space-4);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow-x:auto;color:var(--color-text-muted);font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-1b44ea19] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-1b44ea19] blockquote{margin:.5em 0;padding:4px 12px;border-left:1px solid var(--color-line);color:var(--color-text-muted)}.md[data-v-1b44ea19] hr{border:none;border-top:1px solid var(--color-line);margin:.8em 0}.md[data-v-1b44ea19] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-1b44ea19] table:not(.table-node) th,.md[data-v-1b44ea19] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-1b44ea19] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-1b44ea19] .table-node-wrapper{--table-cell-cap: var(--p-table-cell-max);--md-table-fade-bg: linear-gradient( to right, transparent, color-mix(in srgb, var(--color-bg) 65%, transparent) 55%, var(--color-bg) );width:100%;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative}.md[data-v-1b44ea19] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-1b44ea19] .table-node th,.md[data-v-1b44ea19] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-1b44ea19] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-1b44ea19] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;background:var(--md-table-fade-bg);pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-1b44ea19] .md-table-fade.md-table-toggle--show{display:block}.md[data-v-1b44ea19] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-1b44ea19] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-1b44ea19] .md-table-toggle.md-table-toggle--show{display:inline-flex}.md[data-v-1b44ea19] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-1b44ea19] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-1b44ea19] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-1b44ea19] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-1b44ea19] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-1b44ea19] .md-table-toggle svg{display:block}.md[data-v-1b44ea19] .table-node tbody tr:hover{background-color:transparent!important}.diff-wrap[data-v-1b44ea19]{--diff-sign-col: 14px;--diff-pad-x: 14px;margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-1b44ea19]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-1b44ea19]{margin-right:auto}.diff-copy[data-v-1b44ea19]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-1b44ea19]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-1b44ea19]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-1b44ea19]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-1b44ea19]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-1b44ea19]{display:block;width:100%;padding:0 var(--diff-pad-x)}.diff-sign[data-v-1b44ea19]{display:inline-block;width:var(--diff-sign-col);text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-1b44ea19]{color:var(--color-text)}.diff-add[data-v-1b44ea19]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-1b44ea19]{color:var(--color-success)}.diff-del[data-v-1b44ea19]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-1b44ea19]{color:var(--color-danger)}.diff-hunk[data-v-1b44ea19]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-1b44ea19]{color:var(--color-text-muted)}.diff-bar[data-v-1b44ea19] .ui-icon-button[aria-pressed=true]{background:var(--color-selected);color:var(--color-text)}.diff-bar[data-v-1b44ea19] .ui-icon-button[aria-pressed=true]:hover{background:var(--color-selected-hover)}.diff-bar[data-v-1b44ea19] .ui-icon-button svg{width:var(--p-ic-sm);height:var(--p-ic-sm)}.diff-wrap.md-code-wrap .diff-pre[data-v-1b44ea19]{white-space:pre-wrap;overflow-wrap:anywhere}.diff-wrap.md-code-wrap .diff-pre code[data-v-1b44ea19]{width:auto}.diff-wrap.md-code-wrap:not(.md-code-nums) .diff-line[data-v-1b44ea19]{padding-left:calc(var(--diff-pad-x) + var(--diff-sign-col))}.diff-wrap.md-code-wrap:not(.md-code-nums) .diff-sign[data-v-1b44ea19]{margin-left:calc(-1 * var(--diff-sign-col))}.diff-wrap.md-code-nums .diff-pre[data-v-1b44ea19]{counter-reset:md-diff-line;position:relative;isolation:isolate}.diff-wrap.md-code-nums .diff-pre[data-v-1b44ea19]:after{content:"";position:absolute;left:0;top:0;bottom:0;width:calc(var(--diff-pad-x) + var(--md-nums-gutter, 4ch));background:var(--color-selected);border-right:var(--p-hairline) solid var(--color-line);pointer-events:none;user-select:none;z-index:1}.diff-wrap.md-code-nums .diff-line[data-v-1b44ea19]{padding-left:calc(var(--diff-pad-x) + var(--md-nums-gutter, 4ch) + var(--diff-sign-col))}.diff-wrap.md-code-nums .diff-line[data-v-1b44ea19]:not(.diff-hunk){counter-increment:md-diff-line}.diff-wrap.md-code-nums .diff-line[data-v-1b44ea19]:not(.diff-hunk):before{content:counter(md-diff-line);display:inline-block;position:relative;z-index:2;width:calc(var(--md-nums-gutter, 4ch) - 1ch);overflow:visible;margin-left:calc(-1 * (var(--md-nums-gutter, 4ch) + var(--diff-sign-col)));margin-right:1ch;text-align:right;color:var(--color-text-faint);user-select:none}.md .diff-wrap[data-v-1b44ea19] ::selection{background:var(--color-code-selection);color:var(--color-code-selection-text)}.md[data-v-1b44ea19],.md .markdown-renderer[data-v-1b44ea19]{font-family:var(--sans)}.md .code-block-container[data-v-1b44ea19],.md .diff-wrap[data-v-1b44ea19]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-1b44ea19],.md .inline-code[data-v-1b44ea19]{border-radius:var(--radius-sm)}.activity-notice[data-v-5e7a6420]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.msg-time[data-v-6761370d]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;white-space:nowrap}.msg-time[data-v-6761370d]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.cn[data-v-d3807b0f]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-bubble[data-v-d3807b0f]{box-sizing:border-box;max-width:100%;padding:8px 14px;background:var(--color-accent-soft);border:1px solid var(--color-accent-bd);border-radius:var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-xl);box-shadow:var(--shadow-xs);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-title[data-v-d3807b0f]{font-weight:var(--weight-medium)}.cn-meta[data-v-d3807b0f]{display:flex;align-items:center;gap:6px;margin-top:4px;padding:0 4px;color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}.cn-meta-ico[data-v-d3807b0f]{flex:none;color:var(--color-text-faint)}.cn-meta-item[data-v-d3807b0f]{white-space:nowrap}.cn-status[data-v-d3807b0f]{display:inline-flex;align-items:center}.cn-status.ok[data-v-d3807b0f]{color:var(--color-success)}.cn-status.error[data-v-d3807b0f]{color:var(--color-danger)}.ntf-list[data-v-6e055dc6]{display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-3);margin:var(--space-2) 0}.ntn[data-v-6e055dc6]{margin-left:auto;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.ntn-head[data-v-6e055dc6]{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal);overflow-wrap:anywhere}.ntn-ico[data-v-6e055dc6]{flex:none}.ntn.ok .ntn-ico[data-v-6e055dc6]{color:var(--color-success)}.ntn.err .ntn-ico[data-v-6e055dc6]{color:var(--color-danger)}.ntn.warn .ntn-ico[data-v-6e055dc6]{color:var(--color-warning)}.ntn-bubble[data-v-6e055dc6]{box-sizing:border-box;max-width:100%;padding:var(--space-2) var(--space-3);background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.ntn-line+.ntn-line[data-v-6e055dc6]{margin-top:var(--space-1)}.ntn-out[data-v-6e055dc6]{display:flex;align-items:center;gap:var(--space-2);background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-1) var(--space-2);box-shadow:var(--shadow-xs);white-space:normal}.ntn-out-ic[data-v-6e055dc6]{color:var(--color-text-faint);flex:none}.ntn-out-path[data-v-6e055dc6]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.ntn-out-size[data-v-6e055dc6]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.ntn-preview-cap[data-v-6e055dc6]{font-size:var(--text-xs);color:var(--color-text-faint);margin-bottom:var(--space-05)}.ntn-preview-text[data-v-6e055dc6]{margin:0;font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:8;overflow:hidden}.ntn-meta[data-v-6e055dc6]{margin-top:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}.ntn-raw[data-v-6e055dc6]{max-width:100%}.ntn-raw summary[data-v-6e055dc6]{list-style:none;display:flex;align-items:center;gap:var(--space-1);cursor:pointer;font-size:var(--text-xs);color:var(--color-text-faint);user-select:none}.ntn-raw summary[data-v-6e055dc6]::-webkit-details-marker{display:none}.ntn-raw summary[data-v-6e055dc6]:hover{color:var(--color-text)}.ntn-raw-car[data-v-6e055dc6]{transition:transform var(--duration-base) var(--ease-out)}.ntn-raw[open] .ntn-raw-car[data-v-6e055dc6]{transform:rotate(90deg)}.ntn-raw-in[data-v-6e055dc6]{margin-top:var(--space-1);display:flex;flex-direction:column;gap:var(--space-2)}.ntn-raw-fields[data-v-6e055dc6]{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--space-1) var(--space-3)}.ntn-raw-fields .k[data-v-6e055dc6]{color:var(--color-text-faint);font-size:var(--text-xs)}.ntn-raw-fields .v[data-v-6e055dc6]{color:var(--color-text-muted);font-size:var(--text-xs);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ntn-raw-pre[data-v-6e055dc6]{margin:0;padding:var(--space-2) var(--space-3);background:var(--color-surface-raised);border-radius:var(--radius-sm);box-shadow:var(--shadow-xs);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);white-space:pre;overflow:auto;max-width:100%;max-height:13lh}@media(max-width:640px){.ntn[data-v-6e055dc6]{max-width:92%}}.att-chip[data-v-e59edff1]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px 5px;background:var(--color-bg);border:1px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-e59edff1]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-e59edff1]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-e59edff1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-e59edff1]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-e59edff1] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-e59edff1]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-e59edff1]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-e59edff1]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-e59edff1]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-e59edff1]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-e59edff1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-tip[data-v-e59edff1]{position:fixed;z-index:var(--z-toast);display:flex;flex-direction:column;gap:var(--space-2);width:min(300px,calc(100vw - 16px));padding:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-lg)}.att-tip[data-v-e59edff1]:before,.att-tip[data-v-e59edff1]:after{content:"";position:absolute;right:0;left:0;height:var(--space-2)}.att-tip[data-v-e59edff1]:before{bottom:100%}.att-tip[data-v-e59edff1]:after{top:100%}.att-tip-caret[data-v-e59edff1]{position:absolute;left:var(--tip-caret-x, 50%);width:12px;height:6px;background:var(--color-line-strong);transform:translate(-50%)}.att-tip[data-side=top] .att-tip-caret[data-v-e59edff1]{top:100%;clip-path:polygon(0 0,100% 0,50% 100%)}.att-tip[data-side=bottom] .att-tip-caret[data-v-e59edff1]{bottom:100%;clip-path:polygon(50% 0,0 100%,100% 100%)}.att-tip-preview[data-v-e59edff1]{display:grid;min-height:116px;place-items:center;overflow:hidden;border-radius:var(--radius-md);background-color:var(--color-surface-sunken);background-image:linear-gradient(45deg,var(--color-line) 25%,transparent 25%),linear-gradient(-45deg,var(--color-line) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--color-line) 75%),linear-gradient(-45deg,transparent 75%,var(--color-line) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px}.att-tip-preview[data-v-e59edff1] .att-tip-media{display:block;max-width:100%;max-height:220px;object-fit:contain}.att-tip-placeholder[data-v-e59edff1]{display:grid;gap:var(--space-2);place-items:center;color:var(--color-text-muted);font-size:var(--text-sm)}.att-tip-meta[data-v-e59edff1]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-sm)}.att-tip-meta strong[data-v-e59edff1]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att-tip-meta>span[data-v-e59edff1]{color:var(--color-text-muted);white-space:nowrap}.att-tip-error[data-v-e59edff1]{padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-danger-soft);color:var(--color-danger);font-size:var(--text-xs)}.att-tip-foot[data-v-e59edff1]{display:flex;align-items:center;gap:var(--space-2)}.att-tip-state[data-v-e59edff1]{display:inline-flex;flex:1;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.att-tip-state.danger[data-v-e59edff1]{color:var(--color-danger)}.att-tip-open[data-v-e59edff1]{display:inline-flex;align-items:center;gap:var(--space-1);min-height:30px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:var(--color-hover);color:var(--color-text);font:var(--text-xs) var(--font-ui);cursor:pointer}.att-tip-open[data-v-e59edff1]:hover{background:var(--color-selected)}.att-tip-open[data-v-e59edff1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.turn-fold[data-v-331ba726]{display:flex;flex-direction:column}.tf-head[data-v-331ba726]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-331ba726]:hover{color:var(--color-text)}.tf-head[data-v-331ba726]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-331ba726]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-331ba726]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-331ba726]{transform:rotate(90deg)}.tf-body[data-v-331ba726]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-331ba726]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-331ba726]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-331ba726],.tf-body-inner[data-v-331ba726]>.think,.tf-body-inner[data-v-331ba726]>.tool-group,.tf-body-inner[data-v-331ba726]>.agent-card,.tf-body-inner[data-v-331ba726]>.agent-group,.tf-body-inner[data-v-331ba726]>.box,.tf-body-inner[data-v-331ba726]>.dynamic-workflow-card,.tf-body-inner[data-v-331ba726]>.activity-run,.tf-body-inner[data-v-331ba726]>.media-tool{margin-top:var(--chat-block-gap)}.tf-body-inner .msg[data-v-331ba726]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-331ba726] p{margin:0}.tf-body-inner .msg[data-v-331ba726] p+p{margin-top:var(--space-2)}.ui-card[data-v-d2cab471]{background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-d2cab471]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-d2cab471]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:1px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-d2cab471]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-d2cab471]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:1px solid var(--color-line);background:var(--color-surface)}.turn-files[data-v-11486090]{margin-top:var(--chat-block-gap)}.turn-files[data-v-11486090] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-11486090] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-11486090] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-11486090]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-11486090]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-11486090]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-11486090],.tf-del[data-v-11486090]{font:var(--text-xs) var(--font-mono);flex:none}.tf-add[data-v-11486090]{color:var(--color-success)}.tf-del[data-v-11486090]{color:var(--color-danger)}.tf-list[data-v-11486090]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-11486090]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-11486090]{display:flex;align-items:center;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left;cursor:pointer}.tf-file[data-v-11486090]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-ficon[data-v-11486090]{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);line-height:0;margin-right:2px}.tf-ficon[data-v-11486090] svg{display:block}.tf-file[data-v-11486090]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}span.tf-file[data-v-11486090]{cursor:default}span.tf-file[data-v-11486090]:hover{text-decoration:none}.tf-dir[data-v-11486090]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-11486090]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-11486090]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-11486090]:not(:disabled):active{transform:none}.tf-more-car[data-v-11486090]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-11486090]{transform:rotate(180deg)}.diffbar[data-v-11486090]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-11486090]{background:var(--color-success)}.seg-del[data-v-11486090]{background:var(--color-danger)}.mascot-apng[data-v-c03cab60]{display:inline-block;flex:none;image-rendering:pixelated}.working-indicator[data-v-934cc635]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.wi-mascot[data-v-934cc635]{flex:none;width:40px}.chat-empty[data-v-bb073357]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-bb073357]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-bb073357]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-bb073357]{font-size:var(--ui-font-size-sm)}.chat[data-v-bb073357]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-bb073357]{align-self:stretch}.open-unsupported[data-v-bb073357]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:1px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:2}.chat>.u-turn[data-v-bb073357],.chat>.a-msg[data-v-bb073357],.chat>.compact-divider[data-v-bb073357],.chat>.cron-notice[data-v-bb073357],.chat>.sending-placeholder[data-v-bb073357],.chat[data-v-bb073357]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-bb073357]{margin-top:10px}.chat>.u-turn[data-v-bb073357]:first-child,.chat>.a-msg[data-v-bb073357]:first-child,.chat>.compact-divider[data-v-bb073357]:first-child,.chat>.cron-notice[data-v-bb073357]:first-child,.chat>.sending-placeholder[data-v-bb073357]:first-child,.chat[data-v-bb073357]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-bb073357]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-bb073357]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-bb073357]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:2px;margin-right:4px}.u-meta .u-edit[data-v-bb073357]{min-height:22px;box-sizing:border-box}.u-text[data-v-bb073357]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-bb073357]{position:relative;display:flex;flex-direction:column}.u-text-wrap.is-clamped[data-v-bb073357]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-bb073357]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-bb073357]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font:var(--ui-font-size-sm)/1 var(--font-ui);cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-bb073357]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-bb073357]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-bb073357]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-bb073357]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-bb073357]{transform:rotate(180deg)}.u-edit[data-v-bb073357]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-bb073357]{display:block;flex:none}.u-edit[data-v-bb073357]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-copy[data-v-bb073357]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-bb073357]{display:block;flex:none}.u-copy[data-v-bb073357]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-bb073357]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-bb073357]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-bb073357]{margin-top:8px}.compact-divider[data-v-bb073357]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-bb073357]:first-child{margin-top:0}.cd-line[data-v-bb073357]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-bb073357]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-bb073357]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-bb073357]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-bb073357]{text-decoration:underline}.a-msg[data-v-bb073357]{align-self:flex-start;max-width:94%;width:94%}.turn-failed[data-v-bb073357]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--chat-turn-gap);padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-bb073357]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger);flex:none}.tf-main[data-v-bb073357]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-bb073357]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-bb073357]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.a-msg-ft[data-v-bb073357]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-duration[data-v-bb073357]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-bb073357]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-bb073357]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-bb073357]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-bb073357]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-bb073357]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-bb073357]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:500}.a-msg .msg[data-v-bb073357] p{margin:0}.a-msg .msg[data-v-bb073357] p+p{margin-top:8px}.a-msg>.msg[data-v-bb073357],.a-msg[data-v-bb073357]>.think,.a-msg[data-v-bb073357]>.tool-group,.a-msg[data-v-bb073357]>.agent-card,.a-msg[data-v-bb073357]>.agent-group,.a-msg[data-v-bb073357]>.box,.a-msg[data-v-bb073357]>.dynamic-workflow-card,.a-msg[data-v-bb073357]>.media-tool{margin-top:var(--chat-block-gap)}.a-msg[data-v-bb073357]>.turn-fold{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-bb073357]:first-child,.a-msg[data-v-bb073357]>.think:first-child,.a-msg[data-v-bb073357]>.tool-group:first-child,.a-msg[data-v-bb073357]>.agent-card:first-child,.a-msg[data-v-bb073357]>.agent-group:first-child,.a-msg[data-v-bb073357]>.box:first-child,.a-msg[data-v-bb073357]>.dynamic-workflow-card:first-child,.a-msg[data-v-bb073357]>.media-tool:first-child{margin-top:0}.a-msg[data-v-bb073357]>.turn-fold:first-child{margin-top:0}.a-msg[data-v-bb073357] code{font:.9em var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-bb073357] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-bb073357] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}.a-msg .msg[data-v-bb073357] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}}.u-atts[data-v-bb073357]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-bb073357]{align-self:flex-start;padding:10px 0}.skill-act[data-v-bb073357]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-bb073357]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-bb073357]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-bb073357]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap-args[data-v-bb073357]{margin-top:var(--space-1)}@media(max-width:640px){.chat[data-v-bb073357]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-bb073357]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-bb073357]{width:100%;max-width:100%}.u-bub .u-text[data-v-bb073357],.a-msg .msg[data-v-bb073357]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-bb073357] .md,.a-msg[data-v-bb073357] .markdown-renderer,.a-msg[data-v-bb073357] .code-block-container,.a-msg[data-v-bb073357] .diff-wrap,.a-msg[data-v-bb073357] pre{max-width:100%}.a-msg[data-v-bb073357] .code-block-container pre,.a-msg[data-v-bb073357] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-bb073357] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-bb073357]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-bb073357]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-bb073357]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-bb073357],.chat-loading-text[data-v-bb073357]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-bb073357],.cd-btn[data-v-bb073357]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-bb073357]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px}.top-sentinel-loading[data-v-bb073357]{opacity:.8}.top-sentinel-btn[data-v-bb073357]{appearance:none;border:1px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-bb073357]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-bb073357]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-bb073357]{background:transparent}.chat[data-v-bb073357]{gap:0;padding:22px 20px 26px}.a-msg[data-v-bb073357]{max-width:100%;width:100%}.chat>.q-stack[data-v-bb073357]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-bb073357]:first-child{margin-top:0}.q-stack[data-v-bb073357]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-bb073357]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-bb073357]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-bb073357]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-turn[data-v-bb073357]{position:relative;flex-direction:row;align-items:center;justify-content:flex-end;gap:var(--space-2)}.q-bub[data-v-bb073357]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-user-bubble-bg);padding:8px 8px 8px 6px;transition:background var(--duration-fast) var(--ease-out)}.q-bub[data-v-bb073357]:hover{background:var(--color-hover)}.q-send[data-v-bb073357]{flex:none;width:var(--space-6);height:var(--space-6);display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-accent);color:var(--color-text-on-accent);box-shadow:var(--shadow-xs);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.q-send[data-v-bb073357]:hover{background:var(--color-accent-hover)}.q-send[data-v-bb073357]:active{transform:scale(.92)}.q-send[data-v-bb073357]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.q-send[data-v-bb073357] svg{display:block;flex:none}.q-grip[data-v-bb073357]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-bb073357]:hover{opacity:1}.q-grip[data-v-bb073357]:active{cursor:grabbing}.q-body[data-v-bb073357]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-bb073357]{opacity:1}.q-body[data-v-bb073357]:disabled{cursor:default}.q-text[data-v-bb073357]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-bb073357]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-bb073357]{display:flex;gap:4px;flex:none}.q-img[data-v-bb073357]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:1px solid var(--color-line)}.q-file[data-v-bb073357]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:1px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-rm[data-v-bb073357]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-bb073357],.q-bub:focus-within .q-rm[data-v-bb073357],.q-rm[data-v-bb073357]:focus-visible{opacity:1}.q-rm[data-v-bb073357]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-bb073357]{opacity:.45}.q-turn.drop-before[data-v-bb073357]:before,.q-turn.drop-after[data-v-bb073357]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-bb073357]:before{top:-5px}.q-turn.drop-after[data-v-bb073357]:after{bottom:-5px}.chat-header[data-v-25d0d989]{flex:none;display:flex;align-items:center;gap:14px;height:48px;padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0}.chat-header.macos-desktop[data-v-25d0d989]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-25d0d989],.chat-header.macos-desktop input[data-v-25d0d989]{-webkit-app-region:no-drag}.ch-id[data-v-25d0d989]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-25d0d989]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-25d0d989]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-25d0d989]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-25d0d989]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.ch-git[data-v-25d0d989]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-25d0d989]{color:var(--color-text)}.ch-branch[data-v-25d0d989]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-25d0d989]{color:var(--muted);font-style:italic}.ch-pill[data-v-25d0d989]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:1px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-25d0d989]{border-color:var(--line)}.ch-diff-pill[data-v-25d0d989]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line))}.ch-ahead[data-v-25d0d989]{color:var(--color-warning);flex:none}.ch-behind[data-v-25d0d989]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-25d0d989]{color:var(--color-success);flex:none}.ch-del[data-v-25d0d989]{color:var(--color-danger);flex:none}.ch-spacer[data-v-25d0d989]{flex:1;min-width:0}.ch-act-more.open[data-v-25d0d989]{background:var(--color-surface-sunken);color:var(--color-text)}.ch-pr[data-v-25d0d989]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-25d0d989]{flex:none}.ch-pr.pr-open[data-v-25d0d989]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-25d0d989]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-25d0d989]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-25d0d989],.ch-pr.pr-unknown[data-v-25d0d989]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ch-pr[data-v-25d0d989]:hover{border-color:var(--color-line-strong)}.ch-done-pill[data-v-25d0d989]{cursor:default}.ch-done-pill[data-v-25d0d989]:hover{border-color:var(--color-done-bd)}.ch-menu[data-v-25d0d989]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}@media(max-width:980px){.ch-act-label[data-v-25d0d989]{display:none}}@media(max-width:640px){.chat-header[data-v-25d0d989]{display:none}}.slash-menu[data-menu-frame][data-v-9f177a8d]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-menu.is-sheet[data-menu-frame][data-v-9f177a8d]{position:static;padding:0;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;border-radius:0;box-shadow:none;z-index:auto}.slash-scroll[data-v-9f177a8d]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-9f177a8d]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-9f177a8d]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-9f177a8d]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-9f177a8d]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-9f177a8d]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row)}.slash-item+.slash-item[data-v-9f177a8d]{margin-top:var(--menu-rows-seam)}.slash-item[data-v-9f177a8d]:hover{background:var(--color-hover)}.slash-item.active[data-v-9f177a8d]{background:var(--color-selected)}.slash-name[data-v-9f177a8d]{flex:none;max-width:60%;color:var(--color-text);font-weight:var(--weight-medium);min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-9f177a8d]{font-weight:var(--weight-semibold)}.slash-desc[data-v-9f177a8d]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-9f177a8d]{font-weight:var(--weight-semibold)}.slash-empty[data-v-9f177a8d]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-9f177a8d]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}@media(max-width:520px){.slash-item[data-v-9f177a8d]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-9f177a8d]{max-width:none}}.mention-menu[data-menu-frame][data-v-0ac2fbc1]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-menu.is-sheet[data-menu-frame][data-v-0ac2fbc1]{position:static;padding:0;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;border-radius:0;box-shadow:none;z-index:auto}.mention-scroll[data-v-0ac2fbc1]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-0ac2fbc1]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-0ac2fbc1]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-0ac2fbc1]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-0ac2fbc1]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-0ac2fbc1]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.dim[data-v-0ac2fbc1]{color:var(--color-text-muted)}.mention-spin[data-v-0ac2fbc1]{position:absolute;top:var(--space-2);right:var(--space-3);color:var(--color-text-muted);z-index:var(--z-raised)}.mention-item[data-v-0ac2fbc1]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);border-radius:var(--radius-menu-row);transition:opacity var(--duration-slow) var(--ease-out)}.mention-item+.mention-item[data-v-0ac2fbc1]{margin-top:var(--menu-rows-seam)}.mention-item[data-v-0ac2fbc1]:hover{background:var(--color-hover)}.mention-item.active[data-v-0ac2fbc1]{background:var(--color-selected)}.mention-item:hover .mention-icon[data-v-0ac2fbc1],.mention-item.active .mention-icon[data-v-0ac2fbc1],.mention-item:hover .mention-name[data-v-0ac2fbc1],.mention-item.active .mention-name[data-v-0ac2fbc1]{color:var(--color-text-strong)}.mention-item.stale[data-v-0ac2fbc1]{opacity:var(--opacity-stale)}@media(hover:none){.mention-item[data-v-0ac2fbc1]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-icon[data-v-0ac2fbc1]{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-faint);flex-shrink:0}.mention-icon[data-v-0ac2fbc1] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-name[data-v-0ac2fbc1]{color:var(--color-text);font-weight:var(--weight-medium);flex-shrink:0}.mention-name .mention-hit[data-v-0ac2fbc1]{color:var(--color-text-strong);font-weight:var(--weight-semibold)}.mention-meta[data-v-0ac2fbc1]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mention-meta .mention-hit[data-v-0ac2fbc1]{color:var(--color-text)}.ctx-ring[data-v-97f3cf66]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-97f3cf66]{stroke:var(--line)}.ctx-ring-fill[data-v-97f3cf66]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-seg[data-v-bffb3dae]{display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__item[data-v-bffb3dae]{border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg--md .ui-seg__item[data-v-bffb3dae]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-bffb3dae]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-bffb3dae]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-bffb3dae]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-bffb3dae]{background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-xs)}.ui-seg__item[data-v-bffb3dae]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.activity-spin[data-v-c12d8332]{--spinner-frame: 1.15em;display:inline-block;position:relative;width:var(--spinner-frame);height:var(--spinner-frame);font-size:var(--ui-font-size);line-height:1;user-select:none;vertical-align:-.1em}.activity-frame[data-v-c12d8332]{position:absolute;inset:0;display:block;text-align:center;opacity:0;animation-name:activity-frame-c12d8332;animation-duration:.64s;animation-timing-function:steps(1,end);animation-iteration-count:infinite;animation-delay:var(--spinner-frame-delay)}.activity-spin--fast .activity-frame[data-v-c12d8332]{animation-duration:.32s;animation-delay:var(--spinner-frame-fast-delay)}@keyframes activity-frame-c12d8332{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.activity-frame[data-v-c12d8332]{animation:none}.activity-frame[data-v-c12d8332]:first-child{opacity:1}}.menu-row[data-v-261bf74a]{width:100%;height:calc(var(--ui-font-size) + 13px);display:flex;align-items:center;gap:8px;box-sizing:border-box;padding:0 8px;border:0;border-radius:var(--r-md);background:none;color:var(--ink);font-family:inherit;font-size:calc(var(--ui-font-size) - 1px);font-weight:400;line-height:1;text-align:left;cursor:pointer}.menu-row[data-v-261bf74a]:hover{background:var(--hover)}.menu-row.active[data-v-261bf74a],.menu-row.selected[data-v-261bf74a]{background:color-mix(in srgb,var(--soft) 45%,var(--panel))}.menu-row[data-v-261bf74a]:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.menu-row.disabled[data-v-261bf74a],.menu-row[data-v-261bf74a]:disabled{opacity:.5;pointer-events:none}.leading[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 14px;width:14px;height:14px}.leading[data-v-261bf74a] svg{display:block;width:14px;height:14px}.label[data-v-261bf74a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.count[data-v-261bf74a]{flex:none;color:var(--muted)}.trailing[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:none;margin-left:auto}.switch-toggle[data-v-169237c7]{position:relative;width:28px;height:16px;padding:0;border:0;border-radius:999px;background:none;cursor:pointer}.track[data-v-169237c7],.thumb[data-v-169237c7]{position:absolute;display:block}.track[data-v-169237c7]{inset:0;border-radius:999px;background:var(--line);transition:background-color .15s ease}.switch-toggle[aria-checked=true] .track[data-v-169237c7]{background:var(--blue)}.thumb[data-v-169237c7]{top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--panel);transition:transform .15s ease}.switch-toggle[aria-checked=true] .thumb[data-v-169237c7]{transform:translate(12px)}.switch-toggle[data-v-169237c7]:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.switch-toggle[data-v-169237c7]:disabled{opacity:.5;cursor:not-allowed}.capability-control[data-v-ff3a96c4]{display:flex;align-items:center;flex:none;min-width:0}.capability-trigger[data-v-ff3a96c4]{display:inline-flex;align-items:center;gap:5px;flex:none;min-width:30px;height:30px;padding:2px 7px;border:0;border-radius:var(--r-sm);background:none;color:var(--muted);font:inherit;font-size:var(--ui-font-size);line-height:1;cursor:pointer;white-space:nowrap}.capability-trigger[data-v-ff3a96c4]:hover,.capability-trigger.open[data-v-ff3a96c4]{background:var(--soft);color:var(--ink)}.capability-trigger svg[data-v-ff3a96c4]{width:16px;height:16px;flex:none}.capability-panel[data-v-ff3a96c4]{width:280px;max-height:288px;overflow:hidden}.capability-viewport[data-v-ff3a96c4]{max-height:288px;overflow:hidden}.capability-track[data-v-ff3a96c4]{display:flex;align-items:flex-start;width:200%;transform:translate(0);transition:transform .15s ease}.capability-track.is-drilled[data-v-ff3a96c4]{transform:translate(-50%)}.capability-view[data-v-ff3a96c4]{flex:0 0 50%;min-width:0;max-height:288px;overflow-y:auto}.capability-group-title[data-v-ff3a96c4]{padding:6px 8px 2px;color:var(--ink);font-size:var(--ui-font-size-xs);font-weight:600}.capability-caption[data-v-ff3a96c4]{margin:0;padding:2px 8px 6px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.35}.capability-loading[data-v-ff3a96c4]{display:flex;align-items:center;min-height:27px;padding:0 8px 6px;color:var(--muted)}.capability-loading[data-v-ff3a96c4] .activity-spin{font-size:var(--ui-font-size-sm)}.chevron[data-v-ff3a96c4],.back-chevron[data-v-ff3a96c4]{display:block;width:14px;height:14px;color:var(--muted)}.capability-back[data-v-ff3a96c4]{margin-bottom:2px}@media(max-width:640px){.capability-trigger-label[data-v-ff3a96c4]{display:none}.capability-trigger[data-v-ff3a96c4]{padding:2px 6px}}.sheet-root[data-v-92ecd88c]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-92ecd88c]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-92ecd88c]{position:relative;background:var(--color-surface-raised);border:1px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-92ecd88c]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-92ecd88c]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-92ecd88c]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-92ecd88c]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-92ecd88c]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-92ecd88c],.sheet-leave-active[data-v-92ecd88c]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-92ecd88c],.sheet-leave-active .sheet-panel[data-v-92ecd88c]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-92ecd88c],.sheet-leave-to[data-v-92ecd88c]{opacity:0}.sheet-enter-from .sheet-panel[data-v-92ecd88c],.sheet-leave-to .sheet-panel[data-v-92ecd88c]{transform:translateY(102%)}.ui-toast[data-v-44bc260b]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-44bc260b]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-44bc260b]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-44bc260b]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-44bc260b]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-44bc260b]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-44bc260b]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-44bc260b]{flex:1;min-width:0}.ui-toast__title[data-v-44bc260b]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-44bc260b]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-44bc260b]{color:var(--color-danger)}.ui-toast__close[data-v-44bc260b]{flex:none;margin:-3px -4px 0 0}.composer[data-v-203386fd]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer-warning-toast[data-v-203386fd]{position:fixed;right:var(--space-4);bottom:var(--space-4);z-index:var(--z-toast);max-width:calc(100vw - 2 * var(--space-4))}.composer-warning-enter-active[data-v-203386fd],.composer-warning-leave-active[data-v-203386fd]{transition:opacity .15s ease,transform .15s ease}.composer-warning-enter-from[data-v-203386fd],.composer-warning-leave-to[data-v-203386fd]{opacity:0;transform:translateY(6px)}.composer.drag-over[data-v-203386fd]{background:var(--color-accent-soft)}.drop-overlay[data-v-203386fd]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-203386fd]{opacity:1;visibility:visible}.drop-card[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-203386fd]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);--composer-valve-floor: 4em;--composer-valve-expand-margin: 3.4em;--thinking-dropdown-width: 320px;--thinking-dropdown-viewport-gutter: var(--space-6);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-203386fd]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-203386fd]:focus-within:after{opacity:1}.quote-strip[data-v-203386fd]{display:flex;flex-wrap:wrap;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0}.quote-chip[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-1);max-width:100%;min-width:0;padding:var(--space-1) var(--space-1) var(--space-1) var(--space-2);border:.5px solid var(--color-line);border-left:2px solid var(--color-accent);border-radius:var(--radius-md);background:var(--color-surface-raised)}.quote-copy[data-v-203386fd]{display:grid;min-width:0;max-width:min(420px,70vw)}.quote-source[data-v-203386fd],.quote-comment[data-v-203386fd]{color:var(--color-text-muted);font-size:var(--text-xs)}.quote-text[data-v-203386fd]{overflow:hidden;color:var(--color-text);font-size:var(--text-sm);text-overflow:ellipsis;white-space:nowrap}.att-strip[data-v-203386fd]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-203386fd]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-203386fd]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-203386fd]{padding-bottom:var(--space-6)}.att-more[data-v-203386fd]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-203386fd]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-203386fd]{gap:var(--space-2)}.att-scroll-content .att-chip[data-v-203386fd]{corner-shape:superellipse(1.5)}.att-scroll-content .att-tile[data-v-203386fd]{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-203386fd]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-203386fd]{display:none}.cin-wrap[data-v-203386fd]{position:relative;padding:14px 16px 8px}.input-row[data-v-203386fd]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-203386fd]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-203386fd]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-203386fd]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-203386fd]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-203386fd]::-webkit-scrollbar{display:none}.ph[data-v-203386fd]::placeholder{color:var(--muted)}.ph[data-v-203386fd]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-203386fd]{min-height:70vh;max-height:70vh}.compact-chip.gone[data-v-203386fd],.model-pill.model-gone[data-v-203386fd]{display:none}.compact-chip[data-v-203386fd]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-203386fd]:hover{background:var(--color-hover)}.composer-attach[data-v-203386fd]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-203386fd]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-203386fd]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-203386fd]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-203386fd]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-203386fd]{background:var(--color-menu-scrollbar-hover)}.msheet-search[data-v-203386fd]{padding:0 var(--space-4) var(--space-2)}.msheet-add[data-v-203386fd]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);padding:0 var(--menu-row-hug);font-family:var(--font-ui)}.am-row[data-v-203386fd]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:none;border-radius:var(--radius-menu-row);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-203386fd]:hover{background:var(--color-hover)}.am-row[data-v-203386fd]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-203386fd]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-203386fd],.am-row:focus-visible .am-icon[data-v-203386fd]{color:var(--color-text)}.am-icon[data-v-203386fd]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-203386fd]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-203386fd]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-203386fd]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-203386fd]:active{transform:scale(.92)}.send[data-v-203386fd]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-203386fd]:disabled:active{transform:none}.send.is-starting[data-v-203386fd]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting .ui-spinner[data-v-203386fd]{color:var(--color-send-icon)}.send.is-starting .ui-spinner__track[data-v-203386fd]{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-203386fd]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-203386fd]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-203386fd]:active{transform:scale(.92)}.stop .stop-square[data-v-203386fd]{display:block;width:10px;height:10px;border-radius:var(--radius-xs);background:currentColor}.toolbar[data-v-203386fd]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-203386fd]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-203386fd],.toolbar-right[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-203386fd]{flex:none;overflow:hidden;padding-right:var(--space-2)}.toolbar-right[data-v-203386fd]{flex:1 1 auto;justify-content:flex-end}.perm-pill[data-v-203386fd],.workflow-chip[data-v-203386fd],.model-pill[data-v-203386fd],.thinking-pill[data-v-203386fd]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-203386fd]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-203386fd]:after,.workflow-chip[data-v-203386fd]:after,.model-pill[data-v-203386fd]:after,.thinking-pill[data-v-203386fd]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-203386fd]:hover:after,.workflow-chip[data-v-203386fd]:hover:after,.model-pill[data-v-203386fd]:hover:after,.thinking-pill[data-v-203386fd]:hover:after{opacity:1}.perm-pill.open[data-v-203386fd],.model-pill.open[data-v-203386fd],.thinking-pill.open[data-v-203386fd]{background:var(--color-accent-soft)}.workflow-chip[data-v-203386fd]{cursor:default}.perm-pill.perm-manual[data-v-203386fd]{color:var(--dim)}.perm-pill.perm-yolo[data-v-203386fd]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-203386fd]{color:var(--color-danger)}.perm-pill-icon[data-v-203386fd]{flex:none}.labels-collapsed .perm-pill[data-v-203386fd]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.labels-collapsed .perm-pill-label[data-v-203386fd]{display:none}.labels-collapsed .workflow-chip[data-v-203386fd]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.labels-collapsed .workflow-label[data-v-203386fd]{display:none}.labels-collapsed .thinking-pill[data-v-203386fd]{width:var(--composer-control-size);padding:0;justify-content:center}.labels-collapsed .thinking-pill-label[data-v-203386fd],.labels-collapsed .thinking-pill .cv[data-v-203386fd]{display:none}.ctx-group[data-v-203386fd]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-203386fd]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-203386fd]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-203386fd]:active{transform:scale(.97)}.model-pill[data-v-203386fd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-203386fd]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.thinking-pill[data-v-203386fd]{flex:none;padding:0 var(--space-2);color:var(--color-accent);font-size:var(--ui-font-size-sm);transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.thinking-pill[data-v-203386fd]:active:not(:disabled){transform:scale(.97)}.thinking-pill[data-v-203386fd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.thinking-pill[data-v-203386fd]:disabled{color:var(--muted);cursor:default}.thinking-pill[data-v-203386fd]:disabled:hover:after{opacity:0}.model-pill .cv[data-v-203386fd],.thinking-pill .cv[data-v-203386fd]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-203386fd],.model-pill.open .cv[data-v-203386fd],.thinking-pill:hover .cv[data-v-203386fd],.thinking-pill.open .cv[data-v-203386fd]{color:var(--dim)}.model-pill.open .cv[data-v-203386fd],.thinking-pill.open .cv[data-v-203386fd]{transform:rotate(180deg)}.model-pill.icon-only[data-v-203386fd]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.composer-dropdown[data-v-203386fd]{position:absolute;bottom:calc(100% + var(--space-1));right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right;overflow-y:auto;overscroll-behavior:contain}.thinking-dropdown[data-v-203386fd]{width:var(--thinking-dropdown-width);min-width:0;max-width:calc(100vw - var(--thinking-dropdown-viewport-gutter));padding:var(--space-3);gap:var(--space-3);overflow:hidden}.thinking-dropdown-title[data-v-203386fd]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text);font-size:var(--ui-font-size);font-weight:var(--weight-semibold)}.thinking-dropdown .ui-seg[data-v-203386fd]{width:100%}.thinking-cache-note[data-v-203386fd]{color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.model-dropdown.flip-down[data-v-203386fd]{top:calc(100% + var(--space-1));bottom:auto;transform-origin:top right}.composer-menu-pop-enter-active[data-v-203386fd]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-203386fd]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-203386fd],.composer-menu-pop-leave-to[data-v-203386fd]{opacity:0;transform:scale(.97) translateY(2px)}.model-dropdown.flip-down.composer-menu-pop-enter-from[data-v-203386fd],.model-dropdown.flip-down.composer-menu-pop-leave-to[data-v-203386fd]{transform:scale(.97) translateY(-2px)}.md-list[data-v-203386fd]{display:flex;flex-direction:column;gap:1px}.md-section[data-v-203386fd]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-203386fd]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-203386fd]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-203386fd]{color:var(--color-text-strong)}.md-row[data-v-203386fd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-203386fd]:disabled{cursor:default;opacity:.58}.md-row[data-v-203386fd]:disabled:hover{background:none}.md-row.is-current[data-v-203386fd]{background:var(--color-selected)}.md-note[data-v-203386fd]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-203386fd]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-203386fd]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-203386fd]{color:var(--dim)}.md-check[data-v-203386fd]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-203386fd]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-203386fd]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-203386fd]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-203386fd]{height:1px;background:var(--line);margin:3px 0}.perm-dropdown[data-v-203386fd]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-203386fd]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-203386fd]:hover,.pd-row.is-current[data-v-203386fd]{background:var(--color-hover)}.pd-icon[data-v-203386fd]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-203386fd]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-203386fd]{display:contents}.pd-name[data-v-203386fd]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-203386fd]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-203386fd]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-203386fd],.workflow-x[data-v-203386fd]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-203386fd]:before,.workflow-x[data-v-203386fd]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-203386fd]:before,.workflow-x[data-v-203386fd]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-203386fd]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-203386fd]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-203386fd]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-203386fd]{gap:6px;min-width:0}.send[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-203386fd]{display:none}.send[data-v-203386fd]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-203386fd]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop .stop-square[data-v-203386fd]{width:12px;height:12px}.perm-pill[data-v-203386fd],.wm-pill[data-v-203386fd]{display:none}.model-dropdown[data-v-203386fd]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.thinking-dropdown[data-v-203386fd]{max-width:calc(100vw - var(--thinking-dropdown-viewport-gutter))}.ph[data-v-203386fd]{font-size:16px}.model-pill[data-v-203386fd],.thinking-pill[data-v-203386fd],.attach-btn[data-v-203386fd]{font-size:var(--ui-font-size)}.toolbar[data-v-203386fd]{gap:6px;min-width:0}.toolbar-left[data-v-203386fd],.toolbar-right[data-v-203386fd]{min-width:0}.model-pill[data-v-203386fd]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-203386fd]{max-width:min(40vw,170px)}.md-row[data-v-203386fd],.md-section[data-v-203386fd],.pd-name[data-v-203386fd]{font-size:var(--ui-font-size)}.pd-desc[data-v-203386fd]{font-size:var(--text-xs)}}.att-lightbox[data-v-203386fd]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;align-items:center;justify-content:center;padding:24px;background:#14171c9e}.att-lightbox-card[data-v-203386fd]{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:min(960px,calc(100vw - 48px));max-height:calc(100vh - 48px)}.att-lightbox-media[data-v-203386fd]{max-width:100%;max-height:calc(100vh - 96px);border-radius:6px;background:var(--bg);box-shadow:var(--shadow-xl);object-fit:contain}.att-lightbox-name[data-v-203386fd]{max-width:100%;color:var(--surface-light);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att-lightbox-close[data-v-203386fd]{position:absolute;top:-14px;right:-14px;width:28px;height:28px;border:1px solid rgba(255,255,255,.45);border-radius:50%;background:#14171cd1;color:var(--surface-light);cursor:pointer}.appr[data-v-f7485122]{margin:var(--space-2) 0}.appr.ui-card[data-v-f7485122]{border-color:var(--color-warning-bd)}.appr[data-v-f7485122] .ui-card__head{background:var(--color-warning-soft);border-bottom-color:var(--color-warning-bd)}.appr.minimized[data-v-f7485122] .ui-card__body{display:none}.appr.minimized[data-v-f7485122] .ui-card__head{border-bottom:none}.ah[data-v-f7485122]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui);flex-wrap:nowrap}.ah-ic[data-v-f7485122]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-warning);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.akind[data-v-f7485122]{color:var(--color-warning);font-size:var(--text-base);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apath[data-v-f7485122]{color:var(--color-text);font:var(--text-sm) var(--font-mono);flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ah-path[data-v-f7485122]{margin-bottom:var(--space-2);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aw[data-v-f7485122],.minimized .amin[data-v-f7485122]{margin-left:auto}.diff[data-v-f7485122]{border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);overflow:hidden;font:var(--text-sm)/1.85 var(--font-mono);max-height:240px;overflow-y:auto}.diff.expanded[data-v-f7485122]{max-height:none}.dl[data-v-f7485122]{display:flex;padding:0 var(--space-3)}.dg[data-v-f7485122]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none}.dc[data-v-f7485122]{white-space:pre;font:inherit}.del[data-v-f7485122]{background:var(--color-danger-soft)}.del .dc[data-v-f7485122]{color:var(--color-danger)}.add[data-v-f7485122]{background:var(--color-success-soft)}.add .dc[data-v-f7485122]{color:var(--color-success)}.shell-cmd[data-v-f7485122]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-f7485122]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-f7485122]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-f7485122]{margin-top:var(--space-2);padding:var(--space-1) var(--space-3);border:1px solid var(--color-danger-bd);border-radius:var(--radius-sm);color:var(--color-danger);font:var(--text-sm) var(--font-ui);background:var(--color-danger-soft)}.body-file[data-v-f7485122]{border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.file-bar[data-v-f7485122]{padding:var(--space-1) var(--space-3);background:var(--color-surface);border-bottom:1px solid var(--color-line);font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.file-lang[data-v-f7485122]{letter-spacing:.04em}.file-content[data-v-f7485122]{padding:var(--space-2) 0;font:var(--text-sm)/1.7 var(--font-mono);background:var(--color-surface-sunken);max-height:240px;overflow-y:auto}.body-file.expanded .file-content[data-v-f7485122]{max-height:none}.file-line[data-v-f7485122]{display:flex;padding:0 var(--space-3)}.file-ln[data-v-f7485122]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none;flex:none}.file-text[data-v-f7485122]{white-space:pre;font:inherit}.body-chip[data-v-f7485122]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.chip-label[data-v-f7485122]{background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-f7485122]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-f7485122]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.todo-item[data-v-f7485122]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-f7485122]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-f7485122]{color:var(--color-text)}.todo-done[data-v-f7485122]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-f7485122]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word}.body-plan[data-v-f7485122]{max-height:50vh;overflow-y:auto}.body-plan.expanded[data-v-f7485122]{max-height:none}.feedback-wrap[data-v-f7485122]{margin-top:var(--space-3)}.feedback-ta[data-v-f7485122]{width:100%;box-sizing:border-box;font:var(--text-sm) var(--font-ui);padding:var(--space-2) var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-sm);resize:none;outline:none;color:var(--color-text);background:var(--color-surface-raised)}.feedback-ta[data-v-f7485122]:focus-visible{border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.feedback-hint[data-v-f7485122]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.abtn[data-v-f7485122],.plan-actions[data-v-f7485122]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}.plan-actions[data-v-f7485122]{flex-wrap:wrap}.k[data-v-f7485122]{opacity:.75}@media(max-width:640px){.diff[data-v-f7485122],.file-content[data-v-f7485122]{overflow-x:auto;-webkit-overflow-scrolling:touch}.file-content[data-v-f7485122]{max-height:50vh}.abtn[data-v-f7485122],.plan-actions[data-v-f7485122]{flex-direction:column}.kbtn[data-v-f7485122]{width:100%;min-height:46px}}.goal-panel[data-v-81a928ba]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-81a928ba]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-81a928ba]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-2883948d]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-2883948d]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-2883948d],.plan-review-feedback[data-v-2883948d]{color:var(--color-text-muted)}.plan-review-label[data-v-2883948d]{flex:none}.plan-path-only[data-v-2883948d]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-2883948d]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-2883948d]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-2883948d]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-2883948d]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-ce0bd159]{margin:var(--space-2) 0}.qcard.ui-card[data-v-ce0bd159]{border-color:var(--color-accent-bd)}.qcard[data-v-ce0bd159] .ui-card__head{background:var(--color-accent-soft);border-bottom-color:var(--color-accent-bd)}.qcard.minimized[data-v-ce0bd159] .ui-card__body{display:none}.qcard.minimized[data-v-ce0bd159] .ui-card__head{border-bottom:none}.qh[data-v-ce0bd159]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.qh-ic[data-v-ce0bd159]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-accent);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.qtitle[data-v-ce0bd159]{color:var(--color-accent-hover);font-size:var(--text-base);font-weight:var(--weight-semibold)}.qstep[data-v-ce0bd159]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);margin-left:var(--space-1)}.qmin[data-v-ce0bd159]{margin-left:auto}.qmin-peek[data-v-ce0bd159]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.qbody[data-v-ce0bd159]{color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qsteps[data-v-ce0bd159]{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);font-family:var(--font-ui)}.qstep-dot[data-v-ce0bd159]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:var(--radius-full);border:1px solid var(--color-line);background:var(--color-surface);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);cursor:pointer;padding:0;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.qstep-dot[data-v-ce0bd159]:hover:not(.active){background:var(--color-surface-sunken)}.qstep-dot.active[data-v-ce0bd159]{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-text-on-accent);font-weight:var(--weight-medium)}.qstep-dot.answered[data-v-ce0bd159]:not(.active){border-color:var(--color-accent);color:var(--color-accent)}.qheader-chip[data-v-ce0bd159]{margin-bottom:var(--space-2)}.qtext[data-v-ce0bd159]{font-size:var(--text-base);color:var(--color-text);font-weight:var(--weight-medium);margin-bottom:var(--space-2);line-height:var(--leading-normal)}.qmdbody[data-v-ce0bd159]{margin-bottom:var(--space-2)}.qopts[data-v-ce0bd159]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2)}.qopt[data-v-ce0bd159]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-ce0bd159]:hover{background:var(--color-surface-sunken)}.qopt.selected[data-v-ce0bd159]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.qopt-key[data-v-ce0bd159]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);font-weight:var(--weight-medium);width:12px;flex:none;text-align:center}.qopt-glyph[data-v-ce0bd159]{color:var(--color-accent-hover);font-size:var(--text-base);flex:none}.qopt-text[data-v-ce0bd159]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-text-other[data-v-ce0bd159]{flex:0 1 auto}.qopt-label[data-v-ce0bd159]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-ce0bd159]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui);font-weight:var(--weight-medium)}.chk[data-v-ce0bd159],.rad[data-v-ce0bd159]{font:var(--text-base) var(--font-mono)}.other-input[data-v-ce0bd159]{flex:1 1 8ch;min-width:8ch;font:var(--text-base) var(--font-ui);border:none;border-bottom:1px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-ce0bd159]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-ce0bd159]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}@media(max-width:640px){.qh[data-v-ce0bd159]{flex-wrap:wrap;row-gap:var(--space-1)}.qtext[data-v-ce0bd159]{font-size:var(--text-lg)}.qstep-dot[data-v-ce0bd159]{width:28px;height:28px;font:var(--text-xs) var(--font-ui)}.qopt[data-v-ce0bd159]{min-height:44px;padding:var(--space-3);font-size:var(--text-base);border-radius:var(--radius-md)}.qopt-desc[data-v-ce0bd159]{font-size:var(--text-xs)}.other-input[data-v-ce0bd159]{flex-basis:100%;min-height:28px}.qfoot[data-v-ce0bd159]{flex-direction:column}.qfoot-btn[data-v-ce0bd159]{width:100%;min-height:46px}.qfoot-main[data-v-ce0bd159]{order:-1}}.status-glyph[data-v-f870866a]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f870866a]{color:var(--color-accent)}.status-glyph.s-done[data-v-f870866a]{color:var(--color-success)}.status-glyph.s-fail[data-v-f870866a]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f870866a]{color:var(--color-text-faint)}.sg-empty[data-v-5945b343]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-5945b343]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-5945b343]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-5945b343]{cursor:pointer}.sg-card.openable[data-v-5945b343]:hover{background:var(--color-selected-hover)}.sg-card[data-v-5945b343]:not(.openable){cursor:not-allowed}.sg-open[data-v-5945b343]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-5945b343]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-5945b343]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-5945b343]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-5945b343]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-5945b343]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-5945b343]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-5945b343]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-5945b343]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-5945b343]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-5945b343]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-5945b343]{display:flex;align-items:center}.sg-state[data-v-5945b343]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-5945b343]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-5945b343]{color:var(--color-danger)}.sg-time[data-v-5945b343]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-5945b343]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-5945b343],.sg-cancel[data-v-5945b343]:focus-visible{opacity:1}.sg-cancel[data-v-5945b343]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-5945b343]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.taskspane[data-v-f4589f0b]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-f4589f0b]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-f4589f0b]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-f4589f0b]{color:var(--color-danger)}.tp-main[data-v-f4589f0b]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-f4589f0b]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-f4589f0b]:hover{background:var(--color-hover)}.tp-row[data-v-f4589f0b]:not(.expandable){cursor:not-allowed}.tp-open[data-v-f4589f0b]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-f4589f0b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-f4589f0b]{flex:none;color:var(--muted)}.tp-name[data-v-f4589f0b]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-f4589f0b]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-f4589f0b]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-f4589f0b]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-f4589f0b]{color:var(--color-text-muted)}.tp-fail[data-v-f4589f0b]{color:var(--color-danger)}.tp-time[data-v-f4589f0b]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-f4589f0b]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-f4589f0b]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-f4589f0b]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-f4589f0b]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-f4589f0b]{min-height:var(--touch-target-min)}}.tp-empty[data-v-f4589f0b]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-f4589f0b]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-f4589f0b]{font-size:var(--ui-font-size-sm)}}.todo-card[data-v-4e4d0054]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-4e4d0054]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-4e4d0054]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-4e4d0054]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-4e4d0054]{color:var(--color-text-muted)}.tc-glyph[data-v-4e4d0054]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-4e4d0054]{color:var(--color-success)}.tc-glyph.g-pending[data-v-4e4d0054]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-4e4d0054]{color:var(--color-text)}.tc-empty[data-v-4e4d0054]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-4e4d0054]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-4e4d0054]{font-size:var(--text-lg)}.tc-row[data-v-4e4d0054]{padding:var(--space-2) var(--space-3)}}.ui-pill[data-v-0fb1a50d]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-0fb1a50d]{cursor:pointer}button.ui-pill[data-v-0fb1a50d]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-0fb1a50d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-0fb1a50d]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-0fb1a50d]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-0fb1a50d] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.filter-control[data-v-658870b5]{display:inline-flex;min-width:0}.fc-chevron[data-v-658870b5]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-658870b5]{transform:rotate(180deg)}.fc-menu[data-v-658870b5]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-658870b5] .ui-menu{min-width:0}.fc-label[data-v-658870b5]{flex:1;white-space:nowrap}.filter-control[data-v-658870b5] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu[data-v-658870b5] .ui-icon[data-icon=circle-check]{transform:scale(.91)}.fc-check[data-v-658870b5]{color:var(--color-accent)}.wp-head-tab[data-v-408c4b07]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-408c4b07] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-408c4b07]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-408c4b07]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-408c4b07]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .fc-trigger{min-height:var(--touch-target-min)}}.chat-dock[data-v-e4431eaa]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-e4431eaa]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-e4431eaa]{margin-left:auto;margin-right:auto}.chat-dock.align-mobile[data-v-e4431eaa]{max-width:none}.chat-dock[data-v-e4431eaa]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-e4431eaa]>*{position:relative;z-index:1}.dock-work-panel[data-v-e4431eaa]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-head[data-v-e4431eaa]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-body[data-v-e4431eaa]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-plan .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-head[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-head[data-v-e4431eaa]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-goal .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-plan .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-subagent .dock-work-body[data-v-e4431eaa],.dock-work-panel.panel-bash .dock-work-body[data-v-e4431eaa]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-e4431eaa],.dock-work-panel.panel-bash[data-v-e4431eaa]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-head[data-v-e4431eaa]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-e4431eaa]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-e4431eaa]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-e4431eaa]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body .taskspane[data-v-e4431eaa]{border:none;background:transparent;padding:0}.dock-workbar[data-v-e4431eaa]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar .ui-pill[data-v-e4431eaa]{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar .ui-pill svg[data-v-e4431eaa]{width:1.5em;height:1.5em;color:inherit}.dock-workbar .ui-pill[data-v-e4431eaa]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar .ui-pill[data-v-e4431eaa]:hover:not(:disabled):after,.dock-workbar .ui-pill.is-active[data-v-e4431eaa]:after{opacity:1}.chat-dock.pills-compact .dock-workbar .ui-pill[data-v-e4431eaa]{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar .ui-pill>span[data-v-e4431eaa]{display:none}.dock-workbar .dw-count[data-v-e4431eaa]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-e4431eaa]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-e4431eaa]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-e4431eaa]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-e4431eaa]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-e4431eaa]{color:var(--color-danger)}.dock-approval[data-v-e4431eaa]{margin-top:8px}.chat-dock.has-approval[data-v-e4431eaa]{display:flex;flex-direction:column;max-height:calc(var(--app-height, 100dvh) - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-e4431eaa]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-e4431eaa]{min-height:0}@media(max-width:640px){.chat-dock[data-v-e4431eaa]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-e4431eaa]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}}.chat-dock:not(.align-mobile) .composer[data-v-e4431eaa]{padding-bottom:14px}.dock-panel-enter-active[data-v-e4431eaa]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-e4431eaa]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-e4431eaa],.dock-panel-leave-to[data-v-e4431eaa]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.conversation-toc[data-v-8a1c40d2]{--toc-preview-max-width: 360px;position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);left:var(--space-4);display:flex;flex-direction:column;justify-content:center}.toc-scroll[data-v-8a1c40d2]{position:relative;z-index:1;display:flex;flex-direction:column;gap:0;width:calc(var(--space-8) + var(--space-05));padding:0;max-height:min(50dvh,max(0px,calc(100dvh - var(--chat-dock-height, 0px) - var(--chat-dock-height, 0px) - var(--space-8))));overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-8a1c40d2]::-webkit-scrollbar{display:none}.toc-row[data-v-8a1c40d2]{position:relative;display:flex;align-items:center;width:calc(var(--space-8) + var(--space-05));min-height:calc(var(--space-2) + var(--space-05));padding:0;border:none;background:transparent;cursor:pointer}.toc-row[data-v-8a1c40d2]:focus-visible{outline:none}.toc-row:focus-visible .toc-marker[data-v-8a1c40d2]{box-shadow:var(--p-focus-ring)}.toc-marker[data-v-8a1c40d2]{flex:none;width:calc(var(--space-3) + var(--space-05));height:var(--space-05);border-radius:var(--radius-full);background:var(--color-text-faint);transition:width var(--duration-base) var(--ease-out),height var(--duration-base) var(--ease-out),background var(--duration-fast) var(--ease-out)}.toc-row.active .toc-marker[data-v-8a1c40d2]{background:var(--color-text-strong)}.toc-row:has(+.toc-row+.toc-row.previewing) .toc-marker[data-v-8a1c40d2],.toc-row.previewing+.toc-row+.toc-row .toc-marker[data-v-8a1c40d2]{width:var(--space-4)}.toc-row:has(+.toc-row.previewing) .toc-marker[data-v-8a1c40d2],.toc-row.previewing+.toc-row .toc-marker[data-v-8a1c40d2]{width:calc(var(--space-5) + var(--space-05))}.toc-row.previewing .toc-marker[data-v-8a1c40d2],.toc-row:focus .toc-marker[data-v-8a1c40d2]{width:calc(var(--space-8) + var(--space-05));height:calc(var(--space-05) * 1.5);background:var(--color-text-strong)}.toc-preview[data-v-8a1c40d2]{position:absolute;z-index:var(--z-dropdown);left:calc(var(--space-8) + var(--space-4));transform:translateY(calc(0px - var(--space-1)));display:flex;flex-direction:column;gap:var(--space-4);width:min(var(--toc-preview-max-width),calc(100cqw - var(--space-4) - var(--space-8) - var(--space-4) - var(--space-4)));padding:var(--space-4);overflow:hidden;border:1px solid var(--color-line-strong);border-radius:var(--radius-xl);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-menu);font-family:var(--font-ui);text-align:left;cursor:pointer}.toc-preview[data-v-8a1c40d2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong),var(--shadow-menu)}.toc-preview__prompt[data-v-8a1c40d2],.toc-preview__response[data-v-8a1c40d2]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:normal}.toc-preview__prompt[data-v-8a1c40d2]{-webkit-line-clamp:2;color:var(--color-text-strong);font-size:max(var(--text-lg),var(--content-font-size));font-weight:var(--weight-semibold);line-height:var(--leading-tight)}.toc-preview__response[data-v-8a1c40d2]{-webkit-line-clamp:3;color:var(--color-text-muted);font-size:var(--content-font-size);line-height:var(--leading-relaxed)}@media(prefers-reduced-motion:reduce){.toc-marker[data-v-8a1c40d2]{transition:none}}.conversation-toc.toc-clipped[data-v-8a1c40d2]{visibility:hidden;pointer-events:none}.tsearch[data-v-d7187e08]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-d7187e08]{top:var(--space-3)}.tsearch[data-v-d7187e08]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-d7187e08]:focus-within:after{opacity:1}.tsearch-main[data-v-d7187e08]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-d7187e08]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-d7187e08]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-d7187e08]:focus-visible{outline:none}.tsearch-input[data-v-d7187e08]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-d7187e08]{display:inline-flex;flex:none}.tsearch-sep[data-v-d7187e08]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-d7187e08]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-d7187e08]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-d7187e08]{grid-template-rows:1fr}.tsearch-foot[data-v-d7187e08]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-d7187e08]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-d7187e08]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-d7187e08]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-d7187e08]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.pythinker-logo[data-v-58c4fde0]{display:block;object-fit:contain;flex:none}.size-sm[data-v-58c4fde0]{height:28px;width:auto}.size-md[data-v-58c4fde0]{height:44px;width:auto}.size-lg[data-v-58c4fde0]{height:64px;width:auto}.size-xl[data-v-58c4fde0]{height:96px;width:auto}.size-hero[data-v-58c4fde0]{height:clamp(128px,15vw,172px);width:auto}.pythinker-logo.interactive[data-v-58c4fde0]{cursor:pointer;user-select:none;-webkit-user-select:none;transition:transform .18s ease}.pythinker-logo.interactive[data-v-58c4fde0]:hover{transform:scale(1.06)}@media(prefers-reduced-motion:reduce){.pythinker-logo.interactive[data-v-58c4fde0]:hover{transform:none}}.recent[data-v-cd5a729d]{flex:none;display:flex;flex-direction:column;margin:var(--space-4) var(--dock-inline-right, 16px) 0 var(--dock-inline-left, 16px)}.recent-caption[data-v-cd5a729d]{margin:0;padding:0 var(--space-2) var(--space-1);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;user-select:none}.recent-row[data-v-cd5a729d]{display:flex;width:100%;min-width:0;align-items:center;gap:var(--space-2);padding:6px var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.recent-row[data-v-cd5a729d]:hover{background:var(--color-hover)}.recent-row[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-ico[data-v-cd5a729d]{display:inline-flex;flex:none}.recent-ico--open[data-v-cd5a729d]{color:var(--color-success)}.recent-ico--done[data-v-cd5a729d]{color:var(--color-done)}.recent-title[data-v-cd5a729d]{flex:1;min-width:0;overflow:hidden;color:var(--color-text);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);text-overflow:ellipsis;white-space:nowrap}.recent-time[data-v-cd5a729d]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.recent-foot[data-v-cd5a729d]{display:flex;justify-content:center;margin-top:var(--space-2)}.recent-more[data-v-cd5a729d]{display:inline-flex;height:26px;align-items:center;gap:var(--space-1);padding:0 var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.recent-more[data-v-cd5a729d]:hover{background:var(--color-hover);color:var(--color-text)}.recent-more[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-more svg[data-v-cd5a729d]{color:var(--color-text-faint)}.con[data-v-0a30b1ee]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.empty-panel-btn[data-v-0a30b1ee]{position:absolute;top:10px;right:16px;z-index:var(--z-sticky)}.panes[data-v-0a30b1ee]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes.is-following[data-v-0a30b1ee],.panes.history-prepending[data-v-0a30b1ee]{overflow-anchor:none}.chat-layout[data-v-0a30b1ee]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-0a30b1ee]{flex:1;min-height:0;position:relative}.content-wrap[data-v-0a30b1ee]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-0a30b1ee]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-0a30b1ee]{margin-left:0;margin-right:auto}@container (max-width: 952px){.con.toc-enabled:not(.mobile) .content-wrap.align-center[data-v-0a30b1ee]{padding-left:calc(var(--space-8) + var(--space-8) + var(--space-8))}}.content-wrap.align-mobile[data-v-0a30b1ee]{max-width:none}@media(max-width:640px){.con.mobile[data-v-0a30b1ee]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-0a30b1ee]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-0a30b1ee]{width:100%;min-width:0}}.empty-spacer[data-v-0a30b1ee]{flex:1}.empty-hint[data-v-0a30b1ee]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui)}.empty-hint-title[data-v-0a30b1ee]{display:inline-flex;align-items:center;gap:12px;font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-0a30b1ee]{gap:9px;color:var(--dim);font-weight:400}.empty-hint-text[data-v-0a30b1ee]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-add-workspace[data-v-0a30b1ee]{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--dim);font-family:var(--mono);font-size:var(--ui-font-size-sm);cursor:pointer}.empty-add-workspace[data-v-0a30b1ee]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.empty-add-workspace[data-v-0a30b1ee]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.empty-add-workspace svg[data-v-0a30b1ee]{flex:none}.ws-pick[data-v-0a30b1ee]{position:relative;font-family:var(--font-ui)}.ws-pick-btn[data-v-0a30b1ee]{display:inline-flex;align-items:center;gap:7px;width:max-content;max-width:min(100%,calc(100vw - var(--space-8)));padding:5px 10px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--dim);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer}.ws-pick-btn[data-v-0a30b1ee]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.ws-pick-name[data-v-0a30b1ee]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-chev[data-v-0a30b1ee]{flex:none;color:var(--muted);transition:transform .15s}.ws-pick-chev.open[data-v-0a30b1ee]{transform:rotate(180deg)}.ws-pick-backdrop[data-v-0a30b1ee]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-pick-menu[data-v-0a30b1ee]{position:absolute;display:grid;grid-template-columns:minmax(0,1fr);left:50%;transform:translate(-50%);top:calc(100% + 6px);z-index:var(--z-dropdown);width:max-content;min-width:min(180px,calc(100cqw - var(--space-8)));max-width:calc(100cqw - var(--space-8));max-height:50vh;overflow:hidden auto;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:4px}.ws-pick-item[data-v-0a30b1ee]{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-family:var(--font-ui)}.ws-pick-item[data-v-0a30b1ee]:hover{background:var(--panel2)}.ws-pick-item.on[data-v-0a30b1ee]{background:var(--color-accent-soft)}.ws-pick-item-name[data-v-0a30b1ee]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ws-pick-item.on .ws-pick-item-name[data-v-0a30b1ee]{color:var(--color-accent-hover)}.ws-pick-item-path[data-v-0a30b1ee]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:475;color:var(--muted)}.ws-pick-item.ws-pick-more[data-v-0a30b1ee]{flex-direction:row;align-items:center;justify-content:flex-start;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-item.ws-pick-more[data-v-0a30b1ee]:hover{color:var(--color-text)}.ws-pick-item.ws-pick-more span[data-v-0a30b1ee],.ws-pick-action span[data-v-0a30b1ee]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-divider[data-v-0a30b1ee]{height:1px;margin:4px 6px;background:var(--line)}.ws-pick-action[data-v-0a30b1ee]{display:flex;align-items:center;gap:7px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:7px 10px;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-action[data-v-0a30b1ee]:hover{background:var(--panel2);color:var(--color-text)}.ws-pick-action svg[data-v-0a30b1ee]{flex:none}.chat-scroll[data-v-0a30b1ee]{display:flex;flex-direction:column}.mobile .panes[data-v-0a30b1ee]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-0a30b1ee]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--ui-font-size-sm);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-base)}.newmsg-pill[data-v-0a30b1ee]:hover{background:var(--panel2)}.pill-chevron[data-v-0a30b1ee]{width:12px;height:12px}.pill-enter-active[data-v-0a30b1ee],.pill-leave-active[data-v-0a30b1ee]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-0a30b1ee],.pill-leave-to[data-v-0a30b1ee]{opacity:0;transform:translate(-50%) translateY(8px)}.abort-toast[data-v-0a30b1ee]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.abort-toast-text[data-v-0a30b1ee]{display:flex;align-items:center;gap:8px}.abort-toast-enter-active[data-v-0a30b1ee],.abort-toast-leave-active[data-v-0a30b1ee]{transition:opacity .15s ease,transform .15s ease}.abort-toast-enter-from[data-v-0a30b1ee],.abort-toast-leave-to[data-v-0a30b1ee]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-0a30b1ee]{background:var(--bg)}.newmsg-pill[data-v-0a30b1ee]{font-family:var(--sans)}.sab[data-v-d37e8069]{position:fixed;z-index:var(--z-toast);display:flex;flex-direction:column;gap:var(--space-1);padding:var(--space-1);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-lg)}.sab-action[data-v-d37e8069]{display:flex;align-items:center;gap:var(--space-2);min-height:34px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:var(--text-sm) var(--font-ui);cursor:pointer}.sab-action[data-v-d37e8069]:hover,.sab-action[data-v-d37e8069]:focus-visible{background:var(--color-hover);outline:none}.sab-comment[data-v-d37e8069]{display:flex;align-items:center;gap:var(--space-1)}.sab-comment input[data-v-d37e8069]{flex:1;min-width:0;height:32px;padding:0 var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-bg);color:var(--color-text);font:var(--text-sm) var(--font-ui);outline:none}.sab-comment input[data-v-d37e8069]:focus-visible{box-shadow:var(--p-focus-ring)}.sab-comment button[data-v-d37e8069]{height:32px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:var(--color-accent);color:var(--color-text-on-accent);font:var(--text-sm) var(--font-ui);cursor:pointer}.sab-comment button[data-v-d37e8069]:disabled{opacity:.45;cursor:default}.media-lightbox[data-v-a5036dce]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-a5036dce]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-a5036dce]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl);touch-action:none}.media-lightbox-media[data-v-a5036dce]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain;transform-origin:center;user-select:none}.media-lightbox-close[data-v-a5036dce]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-a5036dce]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-a5036dce]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-preview-caption[data-v-a5036dce]{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.ui-panel-header[data-v-47211810]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 6px 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface)}.ui-panel-header__main[data-v-47211810]{flex:1 1 auto;display:flex;align-items:center;gap:var(--space-2);min-width:0}.ui-panel-header__title[data-v-47211810]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--weight-semibold) var(--text-xs) var(--font-mono);letter-spacing:.04em;color:var(--color-text)}.ui-panel-header__sub[data-v-47211810]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-47211810]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-47211810]{align-items:flex-start;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px}.ui-panel-header.wrap .ui-panel-header__main[data-v-47211810]{flex-wrap:wrap;gap:4px 6px;min-height:calc(var(--panel-head-h, 48px) - 6px);align-content:center}.ui-panel-header.wrap .ui-panel-header__close[data-v-47211810]{margin-top:calc((var(--panel-head-h, 48px) - 6px - 26px) / 2)}.file-preview[data-v-97c52e24]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-97c52e24],.fp-loading[data-v-97c52e24]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-97c52e24]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-97c52e24]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-97c52e24]{display:none}}.fp-lines[data-v-97c52e24],.fp-size[data-v-97c52e24]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-97c52e24]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-97c52e24]{flex:1;min-width:0;height:26px;border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-97c52e24]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-check[data-v-97c52e24]{color:var(--color-success)}.fp-body[data-v-97c52e24]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));--fp-token-keyword: color-mix(in srgb, var(--color-accent) 68%, var(--color-danger));--fp-token-string: var(--color-success);--fp-token-literal: var(--color-accent-hover);--fp-token-tag: var(--color-warning);flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-97c52e24]{padding:16px 20px}.fp-code[data-v-97c52e24]{background:var(--bg)}.fp-line-table[data-v-97c52e24]{display:table;width:100%;border-collapse:collapse;font-size:var(--ui-font-size);line-height:1.6}.fp-line-row[data-v-97c52e24]{display:table-row}.fp-line-row.hit .fp-line-text[data-v-97c52e24],.fp-table tr.hit td[data-v-97c52e24]{background:var(--fp-search-hit-bg)}.fp-line-row.active .fp-line-text[data-v-97c52e24],.fp-table tr.active td[data-v-97c52e24]{background:var(--fp-search-active-bg)}.fp-line-row.target .fp-gutter[data-v-97c52e24],.fp-line-row.target .fp-line-text[data-v-97c52e24],.fp-table tr.target th[data-v-97c52e24],.fp-table tr.target td[data-v-97c52e24]{background:var(--color-accent-soft)}.fp-gutter[data-v-97c52e24]{display:table-cell;width:44px;padding:0 10px 0 12px;text-align:right;color:var(--faint);user-select:none;font-size:var(--text-base);white-space:nowrap;border-right:1px solid var(--line2);vertical-align:top}.fp-line-text[data-v-97c52e24]{display:table-cell;padding:0 12px;color:var(--color-text);white-space:pre;vertical-align:top}.fp-line-text[data-v-97c52e24] .tok-key,.fp-line-text[data-v-97c52e24] .tok-keyword{color:var(--fp-token-keyword);font-weight:500}.fp-line-text[data-v-97c52e24] .tok-string{color:var(--fp-token-string)}.fp-line-text[data-v-97c52e24] .tok-number,.fp-line-text[data-v-97c52e24] .tok-literal{color:var(--fp-token-literal)}.fp-line-text[data-v-97c52e24] .tok-comment{color:var(--muted);font-style:italic}.fp-line-text[data-v-97c52e24] .tok-tag{color:var(--fp-token-tag);font-weight:500}.fp-line-text[data-v-97c52e24] .tok-attr{color:var(--fp-token-literal)}.fp-html-frame[data-v-97c52e24],.fp-pdf-frame[data-v-97c52e24]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-97c52e24]{background:var(--panel2)}.fp-table-wrap[data-v-97c52e24]{background:var(--bg)}.fp-table[data-v-97c52e24]{border-collapse:collapse;min-width:100%;font:12px/1.5 var(--mono)}.fp-table th[data-v-97c52e24]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:1px solid var(--line2);user-select:none}.fp-table td[data-v-97c52e24]{padding:2px 10px;border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-97c52e24]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-97c52e24]{max-width:100%;max-height:100%;object-fit:contain;border:1px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-97c52e24]{max-width:none;max-height:none}.fp-binary-wrap[data-v-97c52e24]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-97c52e24]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-97c52e24]{color:var(--faint);flex:none}.fp-error[data-v-97c52e24]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-97c52e24{to{transform:rotate(360deg)}}.spinner[data-v-97c52e24]{display:inline-block;width:14px;height:14px;border:1.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-97c52e24 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-97c52e24]{display:none}.fp-markdown[data-v-97c52e24]{padding:14px 16px}.fp-body.fp-code[data-v-97c52e24]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-97c52e24],.fp-loading[data-v-97c52e24]{font-family:var(--sans)}.fp-binary-card[data-v-97c52e24]{border:1px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-97c52e24]{font-family:var(--sans)}.fp-image[data-v-97c52e24]{border-radius:var(--radius-md)}.seg-btn[data-v-97c52e24]{font-family:var(--sans)}.ui-banner[data-v-566a0ac8]{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.ui-banner__icon[data-v-566a0ac8]{display:inline-flex;flex:none}.ui-banner__icon svg[data-v-566a0ac8]{width:18px;height:18px}.ui-banner--info[data-v-566a0ac8]{background:var(--color-accent-soft);border-color:var(--color-accent-bd)}.ui-banner--warning[data-v-566a0ac8]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ui-banner--danger[data-v-566a0ac8]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ui-banner--info .ui-banner__icon[data-v-566a0ac8]{color:var(--color-accent)}.ui-banner--warning .ui-banner__icon[data-v-566a0ac8]{color:var(--color-warning)}.ui-banner--danger .ui-banner__icon[data-v-566a0ac8]{color:var(--color-danger)}.monaco-pane[data-v-cb5f64f3]{position:relative;flex:1;min-height:0}.monaco-pane__host[data-v-cb5f64f3]{position:absolute;inset:0}.monaco-pane__boot[data-v-cb5f64f3]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.editor-panel[data-v-579cb4a1]{display:flex;flex-direction:column;height:100%;min-height:0}.ed-path[data-v-579cb4a1]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.ed-dirty[data-v-579cb4a1]{flex:none;width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-warning)}.ed-saved[data-v-579cb4a1]{flex:none;font:var(--text-xs) var(--font-ui);color:var(--color-success)}.ed-saving[data-v-579cb4a1]{display:inline-flex;align-items:center}.editor-panel__conflict[data-v-579cb4a1]{margin:var(--space-2) var(--space-3) 0}.editor-panel__conflict-actions[data-v-579cb4a1]{display:inline-flex;gap:var(--space-2);margin-left:var(--space-3)}.editor-panel__save-error[data-v-579cb4a1]{margin:var(--space-2) var(--space-3) 0;font:var(--text-xs) var(--font-ui);color:var(--color-danger)}.editor-panel__empty[data-v-579cb4a1]{flex:1;display:flex;align-items:center;justify-content:center;padding:var(--space-4)}.tp[data-v-e1ad626c]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-e1ad626c]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:425;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-9ea90d44]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-meta[data-v-9ea90d44]{flex:none;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-3) var(--space-2);user-select:none}.agent-meta[data-v-9ea90d44]:after{content:"";flex:1;height:var(--p-hairline);background:var(--color-line)}.agent-meta-text[data-v-9ea90d44]{font:var(--text-xs)/1 var(--font-ui);color:var(--color-text-muted);white-space:nowrap;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.agent-prompt[data-v-9ea90d44]{flex:none;display:flex;flex-direction:column;padding:0 var(--space-3) var(--space-2)}.agent-prompt-bubble[data-v-9ea90d44]{display:flex;flex-direction:column;align-self:flex-end;max-width:78%;padding:10px 12px;background:var(--color-user-bubble-bg);border-radius:var(--radius-lg)}.agent-prompt-wrap[data-v-9ea90d44]{position:relative;display:flex;flex-direction:column}.agent-prompt-text[data-v-9ea90d44]{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--content-font-size);line-height:var(--leading-normal);color:var(--color-text)}.agent-prompt-text.is-command[data-v-9ea90d44]{font-family:var(--font-mono)}.agent-prompt-wrap.is-clamped>.agent-prompt-text[data-v-9ea90d44]{max-height:6lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 2.5lh),transparent calc(100% - .5lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 2.5lh),transparent calc(100% - .5lh))}.agent-prompt-toggle[data-v-9ea90d44]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-1);padding:var(--space-1) var(--space-3);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:1;cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.agent-prompt-toggle[data-v-9ea90d44]:hover{box-shadow:var(--shadow-md)}.agent-prompt-toggle[data-v-9ea90d44]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.agent-prompt-wrap.is-clamped .agent-prompt-toggle[data-v-9ea90d44]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.agent-prompt-toggle-car[data-v-9ea90d44]{transition:transform var(--duration-base) var(--ease-out)}.agent-prompt-toggle-car.open[data-v-9ea90d44]{transform:rotate(180deg)}.agent-transcript[data-v-9ea90d44]{position:relative;flex:1;min-height:0;overflow-y:auto}.agent-transcript-inner[data-v-9ea90d44]{display:flex;flex-direction:column;min-height:100%;width:100%;max-width:var(--p-content-max);margin-inline:auto}.agent-transcript[data-v-9ea90d44] .think-body,.agent-transcript[data-v-9ea90d44] .ar-body,.agent-transcript[data-v-9ea90d44] .tf-body,.agent-transcript[data-v-9ea90d44] .bb,.agent-transcript[data-v-9ea90d44] .tl-body{transition:none}.agent-error[data-v-9ea90d44]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.agent-fallback[data-v-9ea90d44]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.fallback-lines[data-v-9ea90d44]{margin:0;color:var(--color-text-muted);font:var(--text-sm)/var(--leading-relaxed) var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere}.agent-jump-btn[data-v-9ea90d44]{position:sticky;left:50%;bottom:var(--space-3);transform:translate(-50%);z-index:var(--z-sticky);display:inline-flex;align-items:center;gap:6px;padding:6px var(--space-3);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-ui-strong);line-height:1.5;white-space:nowrap;cursor:pointer;user-select:none}.agent-jump-btn[data-v-9ea90d44]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.agent-jump-car[data-v-9ea90d44]{width:12px;height:12px}.agent-jump-enter-active[data-v-9ea90d44],.agent-jump-leave-active[data-v-9ea90d44]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.agent-jump-enter-from[data-v-9ea90d44],.agent-jump-leave-to[data-v-9ea90d44]{opacity:0;transform:translate(-50%,6px)}.tdp[data-v-8b9af3ab]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.tdp-body[data-v-8b9af3ab]{flex:1;min-height:0;overflow:auto;font-family:var(--mono)}.tdp-output[data-v-8b9af3ab]{padding:8px 12px;color:var(--dim);font-size:var(--text-base);line-height:1.7;white-space:pre-wrap;word-break:break-word}.tdp-empty[data-v-8b9af3ab]{padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center}.hl-code[data-v-4b6e3ce1]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-4b6e3ce1]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-code.responsive-wrap[data-v-4b6e3ce1]{--hl-sticky-bg: var(--color-bg);--hl-gutter-width: calc( var(--gutter-ch, 4ch) + var(--space-2) + var(--space-2) + var(--p-hairline) )}.hl-body[data-v-4b6e3ce1]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-4b6e3ce1]{padding-left:var(--space-3)}.hl-row[data-v-4b6e3ce1]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-4b6e3ce1]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-4b6e3ce1]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-4b6e3ce1]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-code.responsive-wrap .hl-gutter[data-v-4b6e3ce1]{position:sticky;left:0;z-index:var(--z-raised);background:var(--hl-sticky-bg)}.hl-code.responsive-wrap .hl-gutter.new.offset[data-v-4b6e3ce1]{left:var(--hl-gutter-width)}.hl-code.responsive-wrap .hl-sign[data-v-4b6e3ce1]{position:sticky;left:0;z-index:var(--z-raised);background:var(--hl-sticky-bg)}.hl-code.responsive-wrap.one-gutter .hl-sign[data-v-4b6e3ce1]{left:var(--hl-gutter-width)}.hl-code.responsive-wrap.two-gutters .hl-sign[data-v-4b6e3ce1]{left:calc(var(--hl-gutter-width) + var(--hl-gutter-width))}.hl-gutter+.hl-text[data-v-4b6e3ce1]{padding-left:var(--space-2)}.row-add[data-v-4b6e3ce1]{--hl-sticky-bg: color-mix(in srgb, var(--color-success) 18%, var(--color-bg));background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-4b6e3ce1]{color:var(--color-success)}.row-del[data-v-4b6e3ce1]{--hl-sticky-bg: color-mix(in srgb, var(--color-danger) 18%, var(--color-bg));background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-4b6e3ce1]{color:var(--color-danger)}.row-hunk[data-v-4b6e3ce1]{--hl-sticky-bg: var(--color-surface-sunken);background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-4b6e3ce1]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-4b6e3ce1]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-4b6e3ce1]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}@container (max-width: 560px){.hl-code.responsive-wrap .hl-body[data-v-4b6e3ce1],.hl-code.responsive-wrap .hl-row[data-v-4b6e3ce1]{width:100%;min-width:0}.hl-code.responsive-wrap .hl-text[data-v-4b6e3ce1]{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}}.turn-diff-panel[data-v-67a3cc7e]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-surface)}.tdp-body[data-v-67a3cc7e]{min-height:0;overflow:auto;padding:var(--space-3);display:flex;flex-direction:column;gap:var(--space-3)}.tdp-file[data-v-67a3cc7e]{min-width:0;border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;background:var(--color-surface-raised)}.tdp-file-head[data-v-67a3cc7e]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line)}.tdp-path[data-v-67a3cc7e]{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.tdp-diff[data-v-67a3cc7e]{overflow:auto;background:var(--color-surface)}.tdp-unavailable[data-v-67a3cc7e]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.tdp-unavailable p[data-v-67a3cc7e]{margin:0}.ui-thinking-indicator[data-v-ed8aef9e]{display:inline-flex;align-items:center;justify-content:center;flex:none;line-height:1;color:var(--color-accent);font-family:var(--font-mono);user-select:none;position:relative}.ui-thinking-indicator--sm[data-v-ed8aef9e]{width:14px;height:14px;font-size:14px}.ui-thinking-indicator--md[data-v-ed8aef9e]{width:18px;height:18px;font-size:18px}.ui-thinking-indicator--lg[data-v-ed8aef9e]{width:24px;height:24px;font-size:24px}.ui-thinking-indicator__frame[data-v-ed8aef9e]{position:absolute;inset:0;display:grid;place-items:center;opacity:0;animation:ui-thinking-indicator-frame-ed8aef9e .64s steps(1,end) infinite;animation-delay:var(--thinking-frame-delay)}.ui-thinking-indicator--fast .ui-thinking-indicator__frame[data-v-ed8aef9e]{animation-duration:.32s;animation-delay:var(--thinking-frame-fast-delay)}@keyframes ui-thinking-indicator-frame-ed8aef9e{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.ui-thinking-indicator__frame[data-v-ed8aef9e]{animation:none}.ui-thinking-indicator__frame[data-v-ed8aef9e]:first-child{opacity:1}}.sc[data-v-130e8cd2]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-130e8cd2]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-130e8cd2]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-130e8cd2]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:1px solid var(--line);background:var(--panel)}.sc-input[data-v-130e8cd2]{flex:1;min-width:0;resize:none;border:1px solid var(--line);border-radius:var(--r-sm, 8px);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-130e8cd2]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-130e8cd2]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm, 8px);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-130e8cd2]:disabled{opacity:.4;cursor:default}.sc-send[data-v-130e8cd2]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-130e8cd2]{flex:none;padding:8px 12px 12px}.sc-body[data-v-130e8cd2] .sending-placeholder,.sc-body[data-v-130e8cd2] .sending-line{display:none}.changes-pane[data-v-811473b6]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-811473b6],.dv-change-count[data-v-811473b6]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-811473b6]{flex:1}.ch-head[data-v-811473b6]{display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden}.br-label[data-v-811473b6]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px))}.br-name[data-v-811473b6]{color:var(--color-accent);font-weight:500;font-size:var(--ui-font-size)}.sync-info[data-v-811473b6]{display:flex;align-items:center;gap:4px}.ahead[data-v-811473b6]{color:var(--color-accent);font-size:var(--text-base)}.behind[data-v-811473b6]{color:var(--color-warning);font-size:var(--text-base)}.empty-head[data-v-811473b6]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-811473b6]{flex:1;overflow-y:auto;padding:4px 0}.ch-row[data-v-811473b6]{display:flex;align-items:center;gap:10px;padding:6px 16px;cursor:pointer;font-size:var(--ui-font-size);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:inherit;color:inherit}.ch-row[data-v-811473b6]:hover{background:var(--panel2, #f5f6f8)}.ch-row[data-v-811473b6]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-811473b6]{padding:4px 0}.tree-list[data-v-811473b6]{list-style:none;margin:0;padding:0}.tree-row[data-v-811473b6]{display:flex;align-items:center;gap:8px;width:100%;padding:5px 16px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--ui-font-size);color:inherit;cursor:pointer}.tree-row[data-v-811473b6]:hover{background:var(--panel2, #f5f6f8)}.tree-row[data-v-811473b6]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-811473b6]{color:var(--color-text);font-weight:500}.tree-file[data-v-811473b6]{color:var(--color-text)}.tree-icon[data-v-811473b6]{flex:none;color:var(--muted)}.tree-name[data-v-811473b6]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-811473b6]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-811473b6]{background:color-mix(in srgb,var(--color-accent) 12%,var(--bg));color:var(--color-accent)}.badge.added[data-v-811473b6]{background:color-mix(in srgb,var(--color-success) 10%,var(--bg));color:var(--color-success)}.badge.deleted[data-v-811473b6]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger)}.badge.renamed[data-v-811473b6]{background:color-mix(in srgb,var(--color-warning) 12%,var(--bg));color:var(--color-warning)}.badge.untracked[data-v-811473b6]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.badge.conflicted[data-v-811473b6]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-811473b6]{background:var(--color-surface-sunken);color:var(--faint, #c0c5cc)}.badge.clean[data-v-811473b6]{background:transparent;color:var(--faint, #c0c5cc)}.badge.unknown[data-v-811473b6]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.fpath[data-v-811473b6]{color:var(--color-text);font-size:var(--ui-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.empty-state[data-v-811473b6]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center;user-select:none}.diff-loading[data-v-811473b6]{flex-direction:row;gap:var(--space-2)}.diff-head[data-v-811473b6]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-811473b6]{flex:1;min-width:0;min-height:0;overflow:auto;container-type:inline-size}.diff-content-enter-active[data-v-811473b6],.diff-content-leave-active[data-v-811473b6]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-811473b6],.diff-content-leave-to[data-v-811473b6]{opacity:0}@media(max-width:640px){.ch-head[data-v-811473b6]{padding:10px 14px}.ch-list[data-v-811473b6]{padding:2px 0 12px}.ch-row[data-v-811473b6]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--ui-font-size-sm)}.ch-row[data-v-811473b6]:active{background:var(--panel2, #f5f6f8)}.badge[data-v-811473b6]{width:18px;height:18px}.fpath[data-v-811473b6]{font-size:var(--ui-font-size-sm)}.tree-row[data-v-811473b6]{min-height:40px;padding:8px 14px}.diff-head[data-v-811473b6]{padding:8px 12px;gap:10px}.diff-path[data-v-811473b6]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-811473b6],.br-label[data-v-811473b6],.empty-head[data-v-811473b6]{font-family:var(--sans)}.ch-row[data-v-811473b6],.ct-row[data-v-811473b6]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-811473b6],.changed-tree .badge[data-v-811473b6]{border-radius:var(--radius-sm)}.change-count[data-v-811473b6]{font-family:var(--sans);border-radius:999px}.panel-tab-bar[data-v-da364eda]{position:relative;display:flex;align-items:center;min-width:0;height:44px;border-bottom:1px solid var(--color-line);background:var(--color-bg);user-select:none}.ptb-tabs[data-v-da364eda]{display:flex;flex:1;min-width:0;height:100%;overflow-x:auto;scrollbar-width:none}.ptb-tabs[data-v-da364eda]::-webkit-scrollbar{display:none}.ptb-tab[data-v-da364eda]{display:flex;align-items:center;flex:0 1 180px;min-width:82px;max-width:220px;border-right:1px solid var(--color-line);color:var(--color-text-muted)}.ptb-tab.on[data-v-da364eda]{background:var(--color-surface-raised);color:var(--color-text);box-shadow:inset 0 -2px 0 var(--color-accent)}.ptb-tab-main[data-v-da364eda]{display:flex;align-items:center;gap:var(--space-2);flex:1;min-width:0;height:100%;padding:0 var(--space-2) 0 var(--space-3);border:0;background:transparent;color:inherit;font:var(--text-sm) var(--font-ui);cursor:pointer}.ptb-tab-main[data-v-da364eda]:focus-visible,.ptb-x[data-v-da364eda]:focus-visible{outline:none;box-shadow:inset var(--p-focus-ring)}.ptb-t[data-v-da364eda]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ptb-x[data-v-da364eda]{position:relative;display:grid;place-items:center;flex:none;width:28px;height:28px;margin-right:var(--space-1);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);cursor:pointer}.ptb-x[data-v-da364eda]:hover{color:var(--color-text);background:var(--color-hover)}.ptb-tail[data-v-da364eda]{position:relative;display:flex;align-items:center;gap:var(--space-1);flex:none;padding-inline:var(--space-2)}.panel-add-menu[data-v-da364eda]{position:absolute;top:calc(100% + var(--space-1));right:var(--space-2);z-index:var(--z-dropdown);display:flex;flex-direction:column;width:190px;padding:var(--space-1);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-md)}.panel-add-menu button[data-v-da364eda]{display:flex;align-items:center;gap:var(--space-2);min-height:34px;padding:0 var(--space-2);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:var(--text-sm) var(--font-ui);cursor:pointer}.panel-add-menu button[data-v-da364eda]:hover:not(:disabled),.panel-add-menu button[data-v-da364eda]:focus-visible{background:var(--color-hover);outline:none}.panel-add-menu button[data-v-da364eda]:disabled{color:var(--color-text-faint);cursor:default}@media(pointer:coarse){.ptb-tab-main[data-v-da364eda]:after,.ptb-x[data-v-da364eda]:after{content:"";position:absolute;inset:calc((var(--touch-target-min) - 28px) / -2)}.ptb-tab-main[data-v-da364eda],.ptb-x[data-v-da364eda]{position:relative}}.mp[data-v-466b8fec]{display:flex;flex-direction:column;gap:var(--space-2);min-height:0}.mp--sheet[data-v-466b8fec]{height:auto;padding:0 var(--space-4)}.search-wrap[data-v-466b8fec]{padding-bottom:var(--space-1)}.tab-strip[data-v-466b8fec]{display:flex;gap:var(--space-1);overflow-x:auto}.model-list[data-v-466b8fec]{display:flex;flex-direction:column;padding:var(--space-1) 0}.model-row[data-v-466b8fec]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-2);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.model-row[data-v-466b8fec]:hover,.model-row.is-selected[data-v-466b8fec]{background:var(--color-surface-sunken)}.model-row.is-current[data-v-466b8fec]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.check[data-v-466b8fec]{width:14px;height:14px;color:var(--color-accent);flex:none;display:flex;align-items:center;justify-content:center}.model-main[data-v-466b8fec]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-466b8fec]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-id[data-v-466b8fec]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-provider[data-v-466b8fec]{flex:none;max-width:110px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-ctx[data-v-466b8fec]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.caps[data-v-466b8fec]{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}.state-row[data-v-466b8fec]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-466b8fec]{color:var(--color-warning)}.empty[data-v-466b8fec]{padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-466b8fec]{padding-top:var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:1px solid var(--color-line)}@media(max-width:640px){.mp--sheet .model-list[data-v-466b8fec]{max-height:58vh;overflow-y:auto}.model-provider[data-v-466b8fec],.caps[data-v-466b8fec]{display:none}}.ui-switch[data-v-d7337ade]{position:relative;width:36px;height:20px;flex:none;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-d7337ade]{background:var(--color-accent)}.ui-switch[data-v-d7337ade]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-d7337ade]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-d7337ade]{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--surface-light);box-shadow:var(--shadow-xs);transition:transform var(--duration-base) var(--ease-out)}.ui-switch.is-on .ui-switch__thumb[data-v-d7337ade]{background:var(--color-text-on-accent);transform:translate(16px)}.ui-select[data-v-77d887db]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background-color:var(--color-surface-raised);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right var(--space-3) center;background-size:16px 16px;box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);padding-right:calc(var(--space-3) + 16px + var(--space-2));cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-select--md[data-v-77d887db]{height:38px}.ui-select--sm[data-v-77d887db]{height:32px;font-size:var(--text-sm)}.ui-select[data-v-77d887db]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-select[data-v-77d887db]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select[data-v-77d887db]:disabled{opacity:.5;cursor:not-allowed}.ui-select.has-error[data-v-77d887db]{border-color:var(--color-danger)}.ui-select.has-error[data-v-77d887db]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}html[data-color-scheme=dark] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}@media(prefers-color-scheme:dark){html[data-color-scheme=system] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}}.ui-skeleton[data-v-f4989189]{display:block;border-radius:var(--radius-sm);background:var(--color-surface-sunken);animation:ui-skeleton-breathe-f4989189 1.2s var(--ease-in-out) infinite}.ui-skeleton.is-circle[data-v-f4989189]{border-radius:var(--radius-full)}@keyframes ui-skeleton-breathe-f4989189{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.ui-skeleton[data-v-f4989189]{animation:none;opacity:.6}}.ui-field[data-v-bd93f701]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-bd93f701]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-danger)}.provider-form[data-v-66e70e30]{display:flex;flex-direction:column;gap:var(--space-4)}.provider-form__fields[data-v-66e70e30]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}.provider-form__key[data-v-66e70e30]{position:relative}.provider-form__key[data-v-66e70e30] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.provider-form__eye[data-v-66e70e30]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.provider-form__models-head[data-v-66e70e30]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}.provider-form__models[data-v-66e70e30]{overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.provider-form__model[data-v-66e70e30]{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(120px,.7fr) minmax(160px,1fr) 32px;gap:var(--space-2);align-items:center;padding:var(--space-2);border-top:1px solid var(--color-line)}.provider-form__model--head[data-v-66e70e30]{border-top:0;background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.provider-form__error[data-v-66e70e30]{color:var(--color-danger);font-size:var(--text-sm)}.provider-form__row-error[data-v-66e70e30]{color:var(--color-danger);font-size:var(--text-xs);padding:0 var(--space-2) var(--space-2)}.provider-form__model.has-error[data-v-66e70e30]{background:var(--color-danger-soft, transparent)}.provider-form__actions[data-v-66e70e30]{display:flex;justify-content:flex-end;gap:var(--space-2)}@media(max-width:640px){.provider-form__fields[data-v-66e70e30]{grid-template-columns:1fr}}.add-provider-flow[data-v-01edc4ef]{display:flex;flex-direction:column;gap:var(--space-4)}.add-provider-flow__section[data-v-01edc4ef],.add-provider-flow__form[data-v-01edc4ef]{display:flex;flex-direction:column;gap:var(--space-3)}.add-provider-flow__state[data-v-01edc4ef]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-muted)}.add-provider-flow__catalog[data-v-01edc4ef]{max-height:320px;overflow-y:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.add-provider-flow__entry[data-v-01edc4ef]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:36px;padding:var(--space-2) var(--space-3);border:0;border-top:1px solid var(--color-line);background:transparent;color:var(--color-text);text-align:left;cursor:pointer}.add-provider-flow__entry[data-v-01edc4ef]:first-child{border-top:0}.add-provider-flow__entry[data-v-01edc4ef]:hover:not(:disabled){background:var(--color-hover)}.add-provider-flow__entry[data-v-01edc4ef]:disabled{opacity:.55;cursor:not-allowed}.add-provider-flow__entry>span[data-v-01edc4ef]:last-child{color:var(--color-text-faint);font-size:var(--text-xs)}.add-provider-flow__name[data-v-01edc4ef]{font-weight:var(--weight-medium)}.add-provider-flow__grow[data-v-01edc4ef]{flex:1}.add-provider-flow__empty[data-v-01edc4ef]{padding:var(--space-4);color:var(--color-text-muted);text-align:center}.add-provider-flow__back[data-v-01edc4ef]{align-self:flex-start;display:inline-flex;align-items:center;gap:var(--space-1);padding:0;border:0;background:transparent;color:var(--color-text-muted);cursor:pointer}.add-provider-flow__back-icon[data-v-01edc4ef]{transform:rotate(180deg)}.add-provider-flow__key[data-v-01edc4ef]{position:relative}.add-provider-flow__key[data-v-01edc4ef] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.add-provider-flow__eye[data-v-01edc4ef]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.add-provider-flow__note[data-v-01edc4ef]{margin:0;color:var(--color-text-muted);font-size:var(--text-sm)}.add-provider-flow__warning[data-v-01edc4ef]{color:var(--color-warning);font-size:var(--text-sm)}.add-provider-flow__error[data-v-01edc4ef]{color:var(--color-danger);font-size:var(--text-sm)}.add-provider-flow__actions[data-v-01edc4ef]{display:flex;justify-content:flex-end;gap:var(--space-2)}.providers-panel[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) 0}.providers-panel__heading[data-v-66a5ed6a]{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-3)}.providers-panel__heading h3[data-v-66a5ed6a]{margin:0;color:var(--color-text);font-size:var(--text-xl);font-weight:var(--weight-medium)}.providers-panel__heading p[data-v-66a5ed6a]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.providers-pane-label[data-v-66a5ed6a]{padding:0 var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase}.providers-panel__split[data-v-66a5ed6a]{display:grid;grid-template-columns:minmax(170px,216px) minmax(0,1fr);gap:var(--space-5);align-items:start}.providers-panel__list[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-1)}.providers-panel__list .providers-pane-label[data-v-66a5ed6a]:not(:first-child){margin-top:var(--space-3)}.providers-panel__row[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:44px;padding:var(--space-1-5) var(--space-2);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.providers-panel__row[data-v-66a5ed6a]:hover{background:var(--color-hover)}.providers-panel__row[data-v-66a5ed6a]:focus-visible{outline:none;box-shadow:inset var(--p-focus-ring)}.providers-panel__row.is-selected[data-v-66a5ed6a]{background:var(--color-selected)}.providers-panel__row-name[data-v-66a5ed6a]{overflow:hidden;flex:1;font-size:var(--text-base);font-weight:var(--weight-medium);text-overflow:ellipsis;white-space:nowrap}.providers-panel__row-dot[data-v-66a5ed6a]{width:7px;height:7px;flex:none;border-radius:var(--radius-full);background:var(--color-text-faint)}.providers-panel__row-dot.is-ok[data-v-66a5ed6a]{background:var(--color-success)}.providers-panel__row-dot.is-error[data-v-66a5ed6a]{background:var(--color-danger)}.providers-panel__tile[data-v-66a5ed6a]{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-md);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:1}.providers-panel__tile.is-ok[data-v-66a5ed6a]{color:var(--color-success)}.providers-panel__tile.is-error[data-v-66a5ed6a]{color:var(--color-danger)}.providers-panel__add-icon[data-v-66a5ed6a]{display:grid;place-items:center;width:26px;height:26px;flex:none;border:1px dashed var(--color-line-strong);border-radius:var(--radius-md);color:var(--color-text-muted)}.providers-panel__row--add .providers-panel__row-name[data-v-66a5ed6a]{color:var(--color-text-muted);font-weight:var(--weight-regular)}.providers-panel__row--add:hover .providers-panel__row-name[data-v-66a5ed6a],.providers-panel__row--add.is-selected .providers-panel__row-name[data-v-66a5ed6a]{color:var(--color-text)}.providers-panel__row--add.is-selected .providers-panel__add-icon[data-v-66a5ed6a]{border-style:solid;border-color:var(--color-accent-bd);color:var(--color-accent)}.providers-panel__row--skeleton[data-v-66a5ed6a]{gap:var(--space-2)}.providers-panel__detail[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-4);min-width:0;padding-top:var(--space-1)}.providers-detail__head[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-3)}.providers-detail__tile[data-v-66a5ed6a]{display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-lg);font-weight:var(--weight-medium);line-height:1}.providers-detail__identity[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-1);min-width:0}.providers-detail__name-row[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-2)}.providers-detail__name-row h4[data-v-66a5ed6a]{margin:0;overflow:hidden;color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-medium);text-overflow:ellipsis;white-space:nowrap}.providers-detail__meta[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-1-5);overflow:hidden;margin:0;color:var(--color-text-muted);font-size:var(--text-xs);white-space:nowrap}.providers-detail__meta .mono[data-v-66a5ed6a]{overflow:hidden;font-family:var(--font-mono);text-overflow:ellipsis}.providers-detail__sec[data-v-66a5ed6a]{display:flex;flex-direction:column;gap:var(--space-2)}.providers-detail__sec-head[data-v-66a5ed6a]{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-3)}.providers-detail__count[data-v-66a5ed6a]{color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.providers-detail__empty[data-v-66a5ed6a]{margin:0;color:var(--color-text-faint);font-size:var(--text-sm)}.providers-model-card[data-v-66a5ed6a]{overflow:hidden;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-bg)}.providers-model-row[data-v-66a5ed6a]{display:flex;align-items:center;gap:var(--space-3);min-height:42px;padding:var(--space-1-5) var(--space-4)}.providers-model-row+.providers-model-row[data-v-66a5ed6a]{border-top:1px solid var(--color-line)}.providers-model-row code[data-v-66a5ed6a]{overflow:hidden;font-family:var(--font-mono);font-size:var(--text-sm);text-overflow:ellipsis;white-space:nowrap}.providers-model-name[data-v-66a5ed6a]{overflow:hidden;color:var(--color-text-faint);font-size:var(--text-xs);text-overflow:ellipsis;white-space:nowrap}.providers-model-grow[data-v-66a5ed6a]{flex:1}.providers-detail__foot[data-v-66a5ed6a]{display:flex;justify-content:flex-start;padding-top:var(--space-2);border-top:1px solid var(--color-line)}@media(max-width:640px){.providers-panel__split[data-v-66a5ed6a]{grid-template-columns:1fr;gap:var(--space-4)}.providers-panel__detail[data-v-66a5ed6a]{padding-top:0}}.sm-picker[data-v-5b749db7]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-5b749db7]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.sm-picker__trigger[data-v-5b749db7]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-5b749db7]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__trigger[data-v-5b749db7]:disabled{cursor:not-allowed;opacity:.6}.sm-picker__value[data-v-5b749db7]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value>span[data-v-5b749db7]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-5b749db7]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-5b749db7]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-fast) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-5b749db7]{transform:rotate(180deg)}.sm-picker__menu[data-v-5b749db7]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-5b749db7]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-5b749db7]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-5b749db7]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-5b749db7]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-5b749db7]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__divider[data-v-5b749db7]{height:1px;margin:var(--space-1) var(--space-2);background:var(--color-line)}.sm-picker__option[data-v-5b749db7]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option[data-v-5b749db7]:hover,.sm-picker__option.is-active[data-v-5b749db7]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-5b749db7]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-5b749db7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-5b749db7]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-5b749db7]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-5b749db7]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-c89555a1]{display:flex;flex-direction:row;min-height:0;height:100%}.settings-tabs[data-v-c89555a1]{display:flex;flex-direction:column;flex:none;width:148px;padding:var(--space-2);gap:2px;overflow-y:auto}.tab[data-v-c89555a1]{text-align:left;display:flex;align-items:center;gap:var(--space-2);padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab .ui-icon[data-v-c89555a1]{flex:none;color:var(--color-text-faint)}.tab.on .ui-icon[data-v-c89555a1]{color:var(--color-accent)}.tab[data-v-c89555a1]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.tab.on[data-v-c89555a1]{background:var(--color-accent-soft);color:var(--color-accent);font-weight:var(--weight-medium)}.tab[data-v-c89555a1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-c89555a1]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) var(--space-5) var(--space-5) var(--space-6);flex:1;min-width:0}.panel[data-v-c89555a1]{display:block}.sec[data-v-c89555a1]{padding:var(--space-4) 0;border-bottom:1px solid var(--color-line)}.sec[data-v-c89555a1]:last-child{border-bottom:none}.sec-head[data-v-c89555a1]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-c89555a1]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-muted)}.sec-head .sec-title[data-v-c89555a1]{margin-bottom:0}.saving[data-v-c89555a1]{flex:none;font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.row[data-v-c89555a1]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.rlabel[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);display:flex;flex-direction:column;gap:var(--space-1)}.rvalue[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-c89555a1]{font-family:var(--font-mono);font-size:var(--text-xs)}.value-wrap[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-1);max-width:60%;min-width:0;flex:none}.value-wrap .rvalue[data-v-c89555a1]{max-width:100%}.hint[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.flag-chip[data-v-c89555a1]{display:inline-block;width:fit-content;margin-top:var(--space-1);padding:1px var(--space-2);border-radius:var(--radius-full);border:1px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.flag-chip--warn[data-v-c89555a1]{color:var(--color-warning);border-color:var(--color-warning-bd);background:var(--color-warning-soft)}.desktop-update-card[data-v-c89555a1]{--desktop-update-icon-size: 42px;--desktop-update-select-min-width: 180px;--desktop-update-select-max-width: 220px;overflow:hidden;border:1px solid var(--color-line);border-radius:var(--radius-xl);background:var(--color-surface-raised)}.desktop-update-row[data-v-c89555a1]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);padding:var(--space-4)}.desktop-update-row+.desktop-update-row[data-v-c89555a1],.desktop-update-detail[data-v-c89555a1]{border-top:1px solid var(--color-line)}.desktop-update-row .rlabel[data-v-c89555a1]{min-width:0;flex:1}.desktop-update-summary-copy[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-3);min-width:0}.desktop-update-icon[data-v-c89555a1]{display:inline-flex;align-items:center;justify-content:center;width:var(--desktop-update-icon-size);height:var(--desktop-update-icon-size);flex:none;border-radius:var(--radius-lg);background:var(--color-success-soft);color:var(--color-success)}.desktop-update-title[data-v-c89555a1]{font-size:var(--text-lg);font-weight:var(--weight-semibold)}.desktop-update-select[data-v-c89555a1]{min-width:var(--desktop-update-select-min-width);max-width:var(--desktop-update-select-max-width)}.desktop-update-detail[data-v-c89555a1]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.desktop-update-progress[data-v-c89555a1]{display:flex;flex-direction:column;gap:var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.desktop-update-progress progress[data-v-c89555a1]{width:100%;height:7px;overflow:hidden;border:0;border-radius:var(--radius-full);background:var(--color-surface-sunken);accent-color:var(--color-accent)}.desktop-update-progress progress[data-v-c89555a1]::-webkit-progress-bar{border-radius:var(--radius-full);background:var(--color-surface-sunken)}.desktop-update-progress progress[data-v-c89555a1]::-webkit-progress-value{border-radius:var(--radius-full);background:var(--color-accent)}.desktop-update-actions[data-v-c89555a1]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--space-2)}.select-wrap[data-v-c89555a1]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text-muted);padding:var(--space-1) 0}.actions[data-v-c89555a1]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}@media(max-width:640px){.sd[data-v-c89555a1]{flex-direction:column}.settings-tabs[data-v-c89555a1]{flex-direction:row;width:auto;padding:var(--space-2) var(--space-3);gap:var(--space-1);overflow-x:auto}.tab[data-v-c89555a1]{white-space:nowrap;flex:none}.row[data-v-c89555a1]{align-items:flex-start;flex-direction:column}.select-wrap[data-v-c89555a1]{width:100%;max-width:none}.desktop-update-row[data-v-c89555a1]{align-items:flex-start;flex-direction:column}.desktop-update-summary-copy[data-v-c89555a1]{width:100%}.desktop-update-select[data-v-c89555a1]{max-width:none}}.setting-card[data-v-c89555a1]{border:1px solid var(--color-line);border-radius:var(--radius-xl);overflow:hidden;background:var(--color-bg)}.panel-head[data-v-c89555a1]{margin-bottom:var(--space-4)}.panel-kicker[data-v-c89555a1]{font-size:var(--text-xs);letter-spacing:.05em;text-transform:uppercase;color:var(--color-text-faint);margin-bottom:var(--space-1)}.panel-title[data-v-c89555a1]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-2xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;color:var(--color-text)}.panel-desc[data-v-c89555a1]{margin:0;font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-c89555a1]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:1px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-sm);background:var(--color-surface-raised);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-c89555a1]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-c89555a1]{width:15px;height:15px;flex:none}.archive-search input[data-v-c89555a1]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-c89555a1]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-c89555a1]{margin-bottom:0}.archive-workspace[data-v-c89555a1]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-sm);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-c89555a1]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-c89555a1]{font-family:var(--font-mono);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-c89555a1]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-regular);font-size:var(--text-xs);flex:none}.archive-row[data-v-c89555a1]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:1px solid var(--color-line)}.archive-row[data-v-c89555a1]:first-child{border-top:none}.archive-row[data-v-c89555a1]:hover{background:var(--color-surface-sunken)}.archive-meta[data-v-c89555a1]{min-width:0}.archive-name[data-v-c89555a1]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-c89555a1]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-mono)}.archive-draining[data-v-c89555a1]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-sm)}.archive-empty[data-v-c89555a1]{padding:var(--space-6) var(--space-4);border:1px solid var(--color-line);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-sm);text-align:center;background:var(--color-bg)}@media(max-width:640px){.archive-toolbar[data-v-c89555a1]{flex-direction:column;align-items:stretch}.archive-search[data-v-c89555a1]{min-width:0}}[data-v-c89555a1] .ui-dialog{width:min(980px,96vw)}[data-v-c89555a1] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.routing-modes[data-v-c89555a1]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:6px 0 10px}.routing-mode[data-v-c89555a1]{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border:1px solid var(--color-line);border-radius:var(--radius-md);cursor:pointer}.routing-mode.on[data-v-c89555a1]{border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.routing-mode input[data-v-c89555a1]{position:absolute;opacity:0;width:0;height:0}.routing-mode[data-v-c89555a1]:has(input:focus-visible){outline:none;box-shadow:var(--p-focus-ring)}.routing-mode-title[data-v-c89555a1]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.pool-list[data-v-c89555a1]{display:flex;flex-direction:column;gap:4px;min-width:0}.pool-item[data-v-c89555a1]{display:flex;align-items:center;gap:8px;font-family:var(--font-ui);font-size:var(--text-sm)}.pool-name[data-v-c89555a1]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pool-default[data-v-c89555a1]{padding:1px 8px;border-radius:var(--radius-full);border:1px solid var(--color-line);background:transparent;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);cursor:pointer}.pool-default.on[data-v-c89555a1]{border-color:var(--color-accent-bd);color:var(--color-text)}.pool-default[data-v-c89555a1]:disabled{opacity:.5;cursor:default}.routing-effective[data-v-c89555a1]{flex-wrap:wrap;gap:4px 16px}.aw[data-v-09b74e91]{margin-left:calc(-1 * var(--space-5));margin-right:calc(-1 * var(--space-5));margin-bottom:calc(-1 * var(--space-4))}.crumbbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.crumbs[data-v-09b74e91]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-09b74e91]{color:var(--color-text-muted)}.crumb[data-v-09b74e91]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-09b74e91]:hover{color:var(--color-accent);background:var(--color-surface-sunken)}.crumb.last[data-v-09b74e91]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.filter-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-09b74e91]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-09b74e91]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-09b74e91]{color:var(--color-text)}.filterbar.has-error[data-v-09b74e91]{border-bottom-color:var(--color-danger)}.filterbar.has-error .filter-icon[data-v-09b74e91]{color:var(--color-danger)}.folder-list[data-v-09b74e91]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-09b74e91],.fl-empty[data-v-09b74e91]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.fl-note[data-v-09b74e91]{padding:var(--space-2) var(--space-4);font-size:var(--text-sm);color:var(--color-text-muted)}.fl-error[data-v-09b74e91]{color:var(--color-danger)}.folder-row[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-1) var(--space-4);border-radius:var(--radius-md)}.folder-row[data-v-09b74e91]:hover{background:var(--color-surface-sunken)}.dir-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-row:hover .dir-icon[data-v-09b74e91]{color:var(--color-accent)}.folder-name[data-v-09b74e91]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.degraded-hint[data-v-09b74e91]{padding:var(--space-6) var(--space-5);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.add-error[data-v-09b74e91]{margin:0 14px 8px;padding:6px 10px;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:#b3261e;background:#b3261e14;border:1px solid rgba(179,38,30,.25);border-radius:3px}.actions[data-v-09b74e91]{display:flex;justify-content:flex-end;gap:var(--space-3);padding:var(--space-4) var(--space-5)}.footer-hint[data-v-09b74e91]{padding:var(--space-2) var(--space-5);font-size:var(--text-xs);color:var(--color-text-muted);border-top:1px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-09b74e91]{min-height:44px}.crumbbar[data-v-09b74e91]{align-items:flex-start}.actions[data-v-09b74e91]{flex-wrap:wrap}}.confirm-dialog__message[data-v-074405fe]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-7992546c]{margin:0;padding:0}.row[data-v-7992546c]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-7992546c]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-7992546c]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-7992546c],.row dd.workflow-on[data-v-7992546c]{color:var(--color-accent)}.ctx-text[data-v-7992546c]{flex:none}.bar[data-v-7992546c]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-7992546c]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-7992546c]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-7992546c]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-7992546c]{width:auto}.row dd[data-v-7992546c]{max-width:100%;flex-wrap:wrap}}.toasts[data-v-6d8f28b8]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-6d8f28b8],.toast-leave-active[data-v-6d8f28b8]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-6d8f28b8],.toast-leave-to[data-v-6d8f28b8]{opacity:0;transform:translate(16px)}.toast-move[data-v-6d8f28b8]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-6d8f28b8]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-6d8f28b8]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-6d8f28b8]:hover{text-decoration:underline}.details[data-v-6d8f28b8]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:1px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-6d8f28b8]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-6d8f28b8]{color:var(--color-text-muted)}.detail-row dd[data-v-6d8f28b8]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-6d8f28b8]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-6d8f28b8]{grid-template-columns:1fr;gap:2px}}.update-dialog__head[data-v-13aac9b0]{display:flex;align-items:center;gap:var(--space-3);flex:1;min-width:0}.update-dialog__brand[data-v-13aac9b0]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-sunken);overflow:hidden}.update-dialog__titles[data-v-13aac9b0]{display:flex;flex-direction:column;gap:2px;min-width:0}.update-dialog__title[data-v-13aac9b0]{font-family:var(--font-ui);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.update-dialog__date[data-v-13aac9b0]{display:flex;align-items:center;gap:var(--space-1-5);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);color:var(--color-text-muted)}.update-dialog__message[data-v-13aac9b0]{margin:0;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);color:var(--color-text-muted)}.update-dialog__progress[data-v-13aac9b0]{display:flex;flex-direction:column;gap:var(--space-3)}.update-dialog__progress-row[data-v-13aac9b0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);min-width:0}.update-dialog__progress-label[data-v-13aac9b0]{font-family:var(--font-ui);font-size:var(--ui-font-size-sm);color:var(--color-text)}.update-dialog__progress-meta[data-v-13aac9b0]{min-width:0;font-family:var(--font-mono);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);text-align:right;white-space:nowrap}.update-dialog__foot-spacer[data-v-13aac9b0]{flex:1}.update-dialog__progress progress[data-v-13aac9b0]{width:100%;height:6px;border:0;border-radius:var(--radius-full);background:var(--color-surface-sunken);accent-color:var(--color-accent)}.update-dialog__progress progress[data-v-13aac9b0]::-webkit-progress-bar{border-radius:var(--radius-full);background:var(--color-surface-sunken)}.update-dialog__progress progress[data-v-13aac9b0]::-webkit-progress-value{border-radius:var(--radius-full);background:var(--color-accent)}.update-dialog__progress progress[data-v-13aac9b0]::-moz-progress-bar{border-radius:var(--radius-full);background:var(--color-accent)}@media(max-width:420px){.update-dialog__progress-row[data-v-13aac9b0]{align-items:flex-start;flex-direction:column;gap:var(--space-1-5)}.update-dialog__progress-meta[data-v-13aac9b0]{font-size:var(--ui-font-size-xs);text-align:left}}.ui-action-toast-host[data-v-9efa207b]{pointer-events:none}.ui-action-toast[data-v-9efa207b]{display:flex;align-items:center;gap:var(--space-3);min-width:260px;max-width:min(420px,calc(100vw - 32px));padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);box-shadow:var(--shadow-lg);color:var(--color-text);pointer-events:auto}.ui-action-toast__body[data-v-9efa207b]{flex:1;min-width:0;font-size:var(--text-sm)}.ui-action-toast__close[data-v-9efa207b]{flex:none}@media(max-width:640px){.ui-action-toast[data-v-9efa207b]{max-width:none;width:100%}}.window-controls[data-v-768f9703]{flex:none;height:32px;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 14px;background:var(--color-bg);border-bottom:.5px solid var(--color-line);-webkit-app-region:drag}.wc[data-v-768f9703]{width:14px;height:14px;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-app-region:no-drag;color:transparent}.wc-close[data-v-768f9703]{background:#ff5f57}.wc-min[data-v-768f9703]{background:#febc2e}.wc-max[data-v-768f9703]{background:#28c840}.window-controls:hover .wc[data-v-768f9703]{color:#0000008c}.wc[data-v-768f9703]:focus-visible{outline:2px solid var(--blue);outline-offset:2px;color:#0000008c}.topbar[data-v-27a83eb2]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:1px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-27a83eb2]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-27a83eb2]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-27a83eb2]{color:var(--color-text)}.tb-path .sl[data-v-27a83eb2]{color:var(--color-text-faint)}.tb-path .se[data-v-27a83eb2]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-27a83eb2]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-27a83eb2]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-27a83eb2]{background:var(--color-success)}.topbar .tb-path[data-v-27a83eb2]{font-family:var(--sans)}.newrow[data-v-4c7bceaf]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-4c7bceaf]:hover,.newrow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-4c7bceaf]:hover{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-4c7bceaf]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-4c7bceaf]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-4c7bceaf]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-4c7bceaf]{padding-top:2px}.mgh[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-4c7bceaf]:hover,.mgh[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-4c7bceaf]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-4c7bceaf]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-4c7bceaf]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-4c7bceaf]{margin:-10px -12px -10px 0}.mgh-add[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.mgh-more[data-v-4c7bceaf]{margin:-10px -8px}.mgh-more[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.srow[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-4c7bceaf]:hover,.srow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-4c7bceaf]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-4c7bceaf]{flex:1;min-width:0}.srow .m .t[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-4c7bceaf]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-4c7bceaf]{position:relative}.srow .m .t.run[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-4c7bceaf 1.4s ease-in-out infinite}@keyframes mRunPulse-4c7bceaf{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-4c7bceaf]{position:relative}.srow .m .t.aborted[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-4c7bceaf]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--surface-light);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.kmenu[data-v-4c7bceaf]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-4c7bceaf]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more[data-v-4c7bceaf]{display:flex;align-items:center;width:100%;min-height:44px;padding:var(--space-1) var(--m-pad) var(--space-1) var(--m-indent);background:none;border:none;color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-4c7bceaf]:active{color:var(--color-accent-hover);background:var(--color-surface-sunken)}.newrow[data-v-4c7bceaf]{font-family:var(--sans)}.mlist .srow[data-v-4c7bceaf]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-4c7bceaf]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-bcda0873]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-bcda0873]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-bcda0873]:hover:not(.read-only){background:var(--color-surface-sunken)}.srow[data-v-bcda0873]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-bcda0873]{cursor:default}.srow-main[data-v-bcda0873]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-bcda0873]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-bcda0873]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-bcda0873]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-bcda0873]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-bcda0873]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-bcda0873]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-bcda0873]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-bcda0873]{background:var(--color-accent)}.toggle[data-v-bcda0873]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:1px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-bcda0873]:after{left:21px}.srow.pref[data-v-bcda0873]{cursor:default}.goal-actions[data-v-bcda0873]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1)}.srow.acct.in .srow-label[data-v-bcda0873]{color:var(--color-accent-hover);font-weight:500}.ctx-meter[data-v-bcda0873]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-bcda0873]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-bcda0873]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-bcda0873],.cache-note[data-v-bcda0873]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-bcda0873]{flex:1 1 auto}.srow-sub[data-v-bcda0873]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-bcda0873]{flex-wrap:wrap}.srow.pref .srow-main[data-v-bcda0873]{flex:1 0 100%}.srow-val[data-v-bcda0873],.chev[data-v-bcda0873],.toggle[data-v-bcda0873],.ctx-meter[data-v-bcda0873],.goal-actions[data-v-bcda0873]{margin-top:2px}}.srow[data-v-bcda0873],.srow-sub[data-v-bcda0873],.srow-val[data-v-bcda0873],.cache-note[data-v-bcda0873]{font-family:var(--sans)}.arch-subhead[data-v-bcda0873]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-bcda0873]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-bcda0873]{font-size:20px}.arch-count[data-v-bcda0873]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-bcda0873]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-bcda0873]{flex:1;min-width:160px}.arch-row[data-v-bcda0873]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:1px solid var(--color-line)}.arch-row[data-v-bcda0873]:first-of-type{border-top:none}.arch-meta[data-v-bcda0873]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-bcda0873]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-bcda0873]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-bcda0873]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.wizard.is-embedded[data-v-2c24b7cb]{position:static;inset:auto;z-index:auto;width:100%;overflow:visible;background:transparent}.wizard.is-embedded .rail-inner[data-v-2c24b7cb]{width:100%;margin:0;padding:0}.wizard[data-v-2c24b7cb]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;overflow-y:auto;background:var(--color-bg);color:var(--color-text);font-family:var(--font-ui)}.wiz-rail[data-v-2c24b7cb]{display:flex;flex:1;min-width:0;flex-direction:column}.rail-inner[data-v-2c24b7cb]{display:flex;flex-direction:column;width:min(460px,100%);margin:auto;padding:max(var(--space-8),8vh) var(--space-6)}.eyebrow-pill[data-v-2c24b7cb]{align-self:flex-start;padding:var(--space-1) var(--space-3);border:var(--p-hairline) solid var(--color-line-strong);border-radius:var(--radius-full);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.04em}.brand-mark[data-v-2c24b7cb]{margin-top:var(--space-8)}.wiz-title[data-v-2c24b7cb]{margin:var(--space-5) 0 0;font-size:var(--text-2xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;line-height:var(--leading-tight)}.wiz-sub[data-v-2c24b7cb]{max-width:400px;margin:var(--space-2) 0 0;color:var(--color-text-muted);font-size:var(--text-base);line-height:var(--leading-normal)}.pref-group[data-v-2c24b7cb]{margin-top:var(--space-6)}.pref-label[data-v-2c24b7cb]{margin-bottom:var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase}.theme-cards[data-v-2c24b7cb]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-2);width:100%}.accent-cards[data-v-2c24b7cb]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-2);width:100%}.opt-card[data-v-2c24b7cb]{display:flex;align-items:center;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-2c24b7cb]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-2c24b7cb]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-2c24b7cb]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-2c24b7cb]{color:var(--color-text);font-size:var(--text-sm);font-weight:var(--weight-medium)}.theme-card[data-v-2c24b7cb]{flex-direction:column;gap:var(--space-2);padding:var(--space-2)}.theme-preview[data-v-2c24b7cb]{display:flex;width:100%;aspect-ratio:16 / 10;overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md)}.theme-preview--light[data-v-2c24b7cb]{background:var(--surface-light)}.theme-preview--dark[data-v-2c24b7cb]{background:var(--surface-dark)}.theme-half[data-v-2c24b7cb]{display:flex;flex:1;min-width:0}.theme-half--light[data-v-2c24b7cb]{background:var(--surface-light)}.theme-half--dark[data-v-2c24b7cb]{background:var(--surface-dark)}.theme-side[data-v-2c24b7cb]{width:30%;flex:none;background:color-mix(in srgb,currentColor 7%,transparent)}.theme-preview--dark .theme-side[data-v-2c24b7cb],.theme-half--dark .theme-side[data-v-2c24b7cb]{background:color-mix(in srgb,var(--surface-light) 8%,transparent)}.theme-lines[data-v-2c24b7cb]{display:flex;flex:1;flex-direction:column;gap:6px;padding:14% 12%}.theme-lines span[data-v-2c24b7cb]{height:6px;border-radius:var(--radius-full);background:color-mix(in srgb,currentColor 16%,transparent)}.theme-preview--dark .theme-lines span[data-v-2c24b7cb],.theme-half--dark .theme-lines span[data-v-2c24b7cb]{background:color-mix(in srgb,var(--surface-light) 22%,transparent)}.theme-lines span[data-v-2c24b7cb]:nth-child(1){width:62%}.theme-lines span[data-v-2c24b7cb]:nth-child(2){width:88%}.theme-lines span[data-v-2c24b7cb]:nth-child(3){width:44%}.accent-card[data-v-2c24b7cb]{gap:var(--space-3);padding:var(--space-3) var(--space-4)}.opt-radio[data-v-2c24b7cb]{display:inline-flex;width:16px;height:16px;flex:none;align-items:center;justify-content:center;border:var(--p-hairline) solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-surface-raised)}.opt-radio[data-v-2c24b7cb]:after{width:7px;height:7px;border-radius:var(--radius-full);background:transparent;content:""}.opt-radio.on[data-v-2c24b7cb]{border-color:var(--color-accent)}.opt-radio.on[data-v-2c24b7cb]:after{background:var(--color-accent)}.accent-swatch[data-v-2c24b7cb]{width:12px;height:12px;flex:none;border-radius:var(--radius-full)}.accent-swatch--blue[data-v-2c24b7cb]{background:var(--accent-primary)}.accent-swatch--mono[data-v-2c24b7cb]{background:var(--color-text)}.wiz-actions[data-v-2c24b7cb]{display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-8)}.wiz-action[data-v-2c24b7cb]{width:100%}.wiz-actions .wiz-action[data-v-2c24b7cb]:first-child{height:48px}.wiz-actions[data-v-2c24b7cb] .ui-button{font-size:var(--text-base)}.wiz-actions[data-v-2c24b7cb] .ui-button__content{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);width:100%}.wiz-hint[data-v-2c24b7cb]{margin:var(--space-3) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-normal)}.wiz-hero[data-v-2c24b7cb]{position:relative;display:flex;flex:none;align-items:center;justify-content:center;width:min(44vw,560px);margin:max(var(--space-6),3vh);overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);background:var(--color-surface)}.hero-ambient[data-v-2c24b7cb]{position:absolute;inset:0;z-index:0}.orb[data-v-2c24b7cb]{position:absolute;border-radius:var(--radius-full);filter:blur(72px)}.orb-a[data-v-2c24b7cb]{width:46%;aspect-ratio:1;left:-12%;top:-14%;background:color-mix(in srgb,var(--accent-primary) 42%,transparent)}.orb-b[data-v-2c24b7cb]{width:40%;aspect-ratio:1;right:-10%;bottom:6%;background:color-mix(in srgb,var(--color-success) 30%,transparent)}.orb-c[data-v-2c24b7cb]{width:34%;aspect-ratio:1;left:24%;bottom:-16%;background:color-mix(in srgb,var(--color-warning) 26%,transparent)}.hero-inner[data-v-2c24b7cb]{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;width:100%;padding:var(--space-8) var(--space-6);text-align:center}.hero-inner>.pythinker-logo[data-v-2c24b7cb]{animation:hero-float-2c24b7cb 6s var(--ease-out) infinite alternate}@keyframes hero-float-2c24b7cb{0%{transform:translateY(-4px)}to{transform:translateY(4px)}}.hero-tagline[data-v-2c24b7cb]{margin:var(--space-5) 0 0;font-size:var(--text-xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;line-height:var(--leading-tight);color:var(--color-text)}.hero-sub[data-v-2c24b7cb]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-normal)}.frost-stage[data-v-2c24b7cb]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4);width:100%;max-width:380px;margin-top:var(--space-6)}.frost-card[data-v-2c24b7cb]{display:flex;flex-direction:column;margin:0;overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-lg);background:color-mix(in srgb,var(--color-surface) 58%,transparent);-webkit-backdrop-filter:saturate(160%) blur(20px);backdrop-filter:saturate(160%) blur(20px);box-shadow:var(--shadow-menu);transition:transform var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.frost-card[data-v-2c24b7cb]:hover{transform:translateY(-3px);border-color:var(--color-line-strong)}.mock-bar[data-v-2c24b7cb]{display:flex;align-items:center;height:var(--space-5);padding:0 var(--space-2);border-bottom:var(--p-hairline) solid var(--color-line);background:color-mix(in srgb,var(--color-text) 3%,transparent)}.mac-dots[data-v-2c24b7cb]{display:inline-flex;gap:5px}.mac-dots i[data-v-2c24b7cb]{width:9px;height:9px;border-radius:var(--radius-full)}.dot-r[data-v-2c24b7cb]{background:var(--color-danger)}.dot-y[data-v-2c24b7cb]{background:var(--color-warning)}.dot-g[data-v-2c24b7cb]{background:var(--color-success)}.win-controls[data-v-2c24b7cb]{display:inline-flex;gap:var(--space-2);margin-left:auto;color:var(--color-text-faint)}.c-min[data-v-2c24b7cb],.c-max[data-v-2c24b7cb],.c-x[data-v-2c24b7cb]{position:relative;width:9px;height:9px}.c-min[data-v-2c24b7cb]:after{position:absolute;left:0;right:0;bottom:1px;height:1.5px;background:currentColor;content:""}.c-max[data-v-2c24b7cb]:after{box-sizing:border-box;position:absolute;inset:1px;border:1.5px solid currentColor;border-radius:var(--radius-sm);content:""}.c-x[data-v-2c24b7cb]:before,.c-x[data-v-2c24b7cb]:after{position:absolute;top:50%;left:50%;width:11px;height:1.5px;background:currentColor;content:""}.c-x[data-v-2c24b7cb]:before{transform:translate(-50%,-50%) rotate(45deg)}.c-x[data-v-2c24b7cb]:after{transform:translate(-50%,-50%) rotate(-45deg)}.mock-body[data-v-2c24b7cb]{display:flex;width:100%;aspect-ratio:16 / 10}.mock-side[data-v-2c24b7cb]{display:flex;flex-direction:column;gap:var(--space-1-5);width:30%;flex:none;padding:var(--space-2) var(--space-1-5);border-right:var(--p-hairline) solid var(--color-line)}.mock-side i[data-v-2c24b7cb]{height:5px;border-radius:var(--radius-full);background:color-mix(in srgb,var(--color-text) 12%,transparent)}.mock-main[data-v-2c24b7cb]{display:flex;flex:1;flex-direction:column;justify-content:center;gap:var(--space-2);padding:var(--space-2) var(--space-3)}.mock-main i[data-v-2c24b7cb]{height:6px;border-radius:var(--radius-full);background:color-mix(in srgb,var(--color-text) 16%,transparent)}.mock-main .w-88[data-v-2c24b7cb]{width:88%}.mock-main .w-74[data-v-2c24b7cb]{width:74%}.mock-main .w-62[data-v-2c24b7cb]{width:62%}.mock-main .w-52[data-v-2c24b7cb]{width:52%}.mock-main .w-45[data-v-2c24b7cb]{width:45%}.frost-card figcaption[data-v-2c24b7cb]{padding:var(--space-1-5) 0 var(--space-2);border-top:var(--p-hairline) solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}@media(max-width:960px){.wiz-hero[data-v-2c24b7cb]{display:none}.rail-inner[data-v-2c24b7cb]{margin:0 auto}}@media(max-width:640px){.theme-cards[data-v-2c24b7cb],.accent-cards[data-v-2c24b7cb]{grid-template-columns:1fr}.rail-inner[data-v-2c24b7cb]{padding:var(--space-6) var(--space-5)}}@media(prefers-reduced-motion:reduce){.opt-card[data-v-2c24b7cb],.frost-card[data-v-2c24b7cb]{transition:none}.frost-card[data-v-2c24b7cb]:hover{transform:none}.hero-inner>.pythinker-logo[data-v-2c24b7cb]{animation:none}}.codex-signin__denied[data-v-3bd16f58]{margin:0;color:var(--color-text-muted);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.codex-signin[data-v-3bd16f58]{display:flex;flex-direction:column;gap:var(--space-3)}.codex-signin__status[data-v-3bd16f58],.codex-signin__ok[data-v-3bd16f58]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-sm)}.codex-signin__ok[data-v-3bd16f58]{color:var(--ok)}.codex-signin__hint[data-v-3bd16f58]{color:var(--color-text-muted);font-size:var(--text-sm)}.codex-signin__paste[data-v-3bd16f58]{display:flex;flex-direction:column;gap:var(--space-2)}.codex-signin__error[data-v-3bd16f58]{color:var(--color-danger);font-size:var(--text-sm)}.codex-signin__actions[data-v-3bd16f58]{display:flex;gap:var(--space-2)}.first-run[data-v-23e77d0d]{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--bg);color:var(--color-text);overflow-y:auto}.first-run__panel[data-v-23e77d0d]{width:min(560px,100%);display:flex;flex-direction:column;gap:22px}.first-run__steps[data-v-23e77d0d]{display:flex;align-items:center;gap:14px;list-style:none;margin:0;padding:0}.first-run__step[data-v-23e77d0d]{display:flex;align-items:center;gap:7px;font-size:var(--ui-font-size-sm);color:var(--faint)}.first-run__step.is-current[data-v-23e77d0d]{color:var(--color-text)}.first-run__step.is-done[data-v-23e77d0d]{color:var(--ok)}.first-run__dot[data-v-23e77d0d]{display:grid;place-items:center;width:18px;height:18px;flex:none;border-radius:var(--radius-full);border:1.5px solid currentColor;font-size:10px;font-weight:var(--weight-medium)}.first-run__step.is-current .first-run__dot[data-v-23e77d0d]{background:var(--blue);border-color:var(--blue);color:#fff}.first-run__step.is-done .first-run__dot[data-v-23e77d0d]{background:var(--ok);border-color:var(--ok);color:#fff}.first-run__body[data-v-23e77d0d]{display:flex;flex-direction:column;gap:14px;align-items:flex-start}.first-run__body h1[data-v-23e77d0d]{margin:0;font-size:24px;font-weight:500;line-height:1.2}.first-run__mark[data-v-23e77d0d]{margin-bottom:4px}.first-run__sub[data-v-23e77d0d]{margin:0;color:var(--dim);font-size:var(--ui-font-size);line-height:1.55}.first-run__options[data-v-23e77d0d]{display:flex;flex-direction:column;gap:8px;width:100%}.first-run__option[data-v-23e77d0d]{display:flex;align-items:center;gap:12px;width:100%;padding:13px 15px;text-align:left;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--bg);cursor:pointer}.first-run__option[data-v-23e77d0d]:hover{background:var(--hover)}.first-run__option.is-primary[data-v-23e77d0d]{border-color:var(--bd);background:var(--bluebg)}.first-run__option-main[data-v-23e77d0d]{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.first-run__option-name[data-v-23e77d0d]{font-size:var(--ui-font-size);font-weight:var(--weight-medium)}.first-run__option-desc[data-v-23e77d0d]{font-size:var(--ui-font-size-sm);color:var(--muted)}.first-run__badge[data-v-23e77d0d]{flex:none;padding:2px 8px;border-radius:var(--radius-full);background:var(--blue);color:#fff;font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium)}.first-run__route[data-v-23e77d0d]{width:100%;display:flex;flex-direction:column;gap:12px}.first-run__models[data-v-23e77d0d]{list-style:none;margin:0;padding:0;width:100%;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden}.first-run__models li+li .first-run__model[data-v-23e77d0d]{border-top:1px solid var(--line2)}.first-run__model[data-v-23e77d0d]{display:flex;align-items:center;gap:11px;width:100%;padding:10px 14px;background:var(--bg);cursor:pointer;font-family:var(--mono);font-size:var(--ui-font-size-sm);text-align:left}.first-run__model[data-v-23e77d0d]:hover{background:var(--hover)}.first-run__model.is-selected[data-v-23e77d0d]{background:var(--bluebg)}.first-run__radio[data-v-23e77d0d]{width:14px;height:14px;flex:none;border-radius:var(--radius-full);border:1.5px solid var(--line)}.first-run__model.is-selected .first-run__radio[data-v-23e77d0d]{border-color:var(--blue);border-width:4.5px}.first-run__model-id[data-v-23e77d0d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.first-run__model-ctx[data-v-23e77d0d]{margin-left:auto;flex:none;font-family:var(--sans);font-size:var(--ui-font-size-xs);color:var(--muted)}.first-run__empty[data-v-23e77d0d]{margin:0;color:var(--warn);font-size:var(--ui-font-size)}.first-run__ready[data-v-23e77d0d]{display:flex;align-items:center;gap:8px;margin:0;color:var(--ok);font-size:var(--ui-font-size-sm)}.first-run__actions[data-v-23e77d0d]{display:flex;align-items:center;gap:8px;width:100%;margin-top:6px}.first-run__skip-hint[data-v-23e77d0d]{margin:0;color:var(--muted);font-size:var(--ui-font-size-sm)}.first-run__spacer[data-v-23e77d0d]{flex:1}.recovery[data-v-68311778]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--bg);color:var(--color-text);box-sizing:border-box}.recovery__inner[data-v-68311778]{width:min(460px,100%);display:flex;flex-direction:column;align-items:flex-start;gap:18px}.recovery__mark[data-v-68311778]{display:grid;place-items:center;width:44px;height:44px;border-radius:var(--r-sm);background:var(--panel);color:var(--warn)}.recovery__copy[data-v-68311778]{display:flex;flex-direction:column;gap:8px}.recovery__copy h1[data-v-68311778]{margin:0;font-size:26px;line-height:1.15;font-weight:500;color:var(--color-text)}.recovery__copy p[data-v-68311778]{margin:0;font-size:var(--ui-font-size-lg);line-height:1.55;color:var(--dim)}.recovery__options[data-v-68311778]{display:flex;flex-direction:column;gap:8px;width:100%}.recovery__option[data-v-68311778]{display:flex;flex-direction:column;gap:2px;width:100%;padding:12px 14px;text-align:left;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--bg);cursor:pointer}.recovery__option[data-v-68311778]:hover{background:var(--hover)}.recovery__option.is-primary[data-v-68311778]{border-color:var(--bd);background:var(--bluebg)}.recovery__option-name[data-v-68311778]{font-size:var(--ui-font-size);font-weight:var(--weight-medium)}.recovery__option-desc[data-v-68311778]{font-size:var(--ui-font-size-sm);color:var(--muted)}.recovery__actions[data-v-68311778]{display:flex;gap:8px}.gload[data-v-2468172e]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-2468172e]{width:120px;height:120px;object-fit:contain;animation:gload-pop-2468172e .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-xl);color:var(--muted);letter-spacing:.04em}.gload-issue[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(480px,80vw);font-family:var(--sans);font-size:var(--text-base);color:var(--muted);text-align:center}.gload-issue-detail[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);opacity:.8;word-break:break-word}@keyframes gload-pop-2468172e{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-2468172e]{animation:none}}.gload-text[data-v-2468172e]{font-family:var(--sans)}.kap-root[data-v-7bab00af]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-7bab00af]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--panel)}.kap-count[data-v-7bab00af]{color:var(--muted)}.kap-head-actions[data-v-7bab00af]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-7bab00af],.kap-view-toggle button[data-v-7bab00af]{padding:3px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-7bab00af]:hover,.kap-view-toggle button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-7bab00af],.kap-view-toggle button.on[data-v-7bab00af]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-7bab00af]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:1px solid var(--line)}.kap-filters select[data-v-7bab00af],.kap-filters input[type=text][data-v-7bab00af]{padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-7bab00af]{flex:1;min-width:120px}.kap-check[data-v-7bab00af]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-7bab00af]{display:flex;gap:0}.kap-view-toggle button[data-v-7bab00af]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-7bab00af]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-7bab00af]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-7bab00af]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:1px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-7bab00af]:hover{background:var(--panel2)}.kap-row.expanded[data-v-7bab00af]{background:var(--color-accent-soft)}.kap-ts[data-v-7bab00af]{flex:none;color:var(--muted)}.kap-badge[data-v-7bab00af]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-7bab00af]{background:var(--panel2);color:var(--muted)}.b-err[data-v-7bab00af]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-7bab00af]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-7bab00af]{border-bottom:1px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-7bab00af]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-7bab00af]{padding:2px 8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-detail pre[data-v-7bab00af]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-7bab00af]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-7bab00af]{width:100%;border-collapse:collapse}.kap-agg th[data-v-7bab00af],.kap-agg td[data-v-7bab00af]{padding:3px 6px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-7bab00af]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-7bab00af]{text-align:right}.kap-agg .err[data-v-7bab00af]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-7bab00af]{word-break:break-all}.kap-fab[data-v-992ae84c]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-992ae84c]:hover{opacity:1;color:var(--color-accent)}.server-auth-overlay[data-v-82dad292]{position:fixed;inset:0;z-index:var(--z-max);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 70%,transparent)}.server-auth-card[data-v-82dad292]{width:480px;max-width:calc(100vw - 48px);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);overflow:hidden;color:var(--color-text);font-family:var(--font-ui)}.server-auth-head[data-v-82dad292]{display:flex;flex-direction:column;padding:20px 22px 14px}.server-auth-title[data-v-82dad292]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium);letter-spacing:-.01em;color:var(--color-text)}.server-auth-hint[data-v-82dad292]{margin:4px 0 0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-82dad292]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.server-auth-body[data-v-82dad292]{padding:4px 22px 18px}.server-auth-foot[data-v-82dad292]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.gload-fade-leave-active[data-v-628646c9]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-628646c9]{opacity:0}.app-shell[data-v-628646c9]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.offline-strip[data-v-628646c9]{display:flex;align-items:center;justify-content:center;gap:12px;flex:none;padding:7px 16px;background:var(--panel);border-bottom:1px solid var(--line);color:var(--dim);font-size:var(--ui-font-size-sm)}.offline-strip button[data-v-628646c9]{color:var(--blue);font-weight:var(--weight-medium);cursor:pointer}.app[data-v-628646c9]{--preview-w: 460px;flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-628646c9]>*{min-height:0;min-width:0}.app>.side[data-v-628646c9]{grid-column:1}.side-handle[data-v-628646c9]{grid-column:2}.app:not(.mobile)>.con[data-v-628646c9]{grid-column:3}.app>.global-preview[data-v-628646c9]{grid-column:4}.app.panel-expanded[data-v-628646c9]{grid-template-columns:auto 0 0 minmax(0,1fr)}.app.panel-expanded>.con[data-v-628646c9]{display:none}.sidebar-toggle-btn[data-v-628646c9]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-628646c9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-628646c9]{left:var(--macos-titlebar-controls-start);animation:none}@keyframes sidebar-toggle-btn-in-628646c9{0%{opacity:0}}.new-chat-btn[data-v-628646c9]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-628646c9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-628646c9]{left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm))}.app.mobile[data-v-628646c9]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-628646c9]{min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden;transition:width .28s cubic-bezier(.4,0,.2,1)}.global-preview.open[data-v-628646c9]{width:var(--preview-w)}.global-preview.expanded[data-v-628646c9]{width:auto}.global-preview.no-anim[data-v-628646c9]{transition:none}.global-preview:not(.mobile):not(.expanded) .pt-shell[data-v-628646c9]{width:var(--preview-w);border-left:1px solid var(--line)}.pt-shell[data-v-628646c9]{position:relative;display:flex;flex-direction:column;min-width:0;height:100%;box-sizing:border-box;background:var(--bg)}.pt-body[data-v-628646c9]{flex:1;min-height:0;min-width:0;overflow:hidden}.pt-body[data-v-628646c9]>*{width:100%;height:100%;box-sizing:border-box}.panel-resize[data-v-628646c9]{position:absolute;left:0;top:0;bottom:0;z-index:var(--z-dropdown)}.pfc-host[data-v-628646c9]{flex:none;min-width:0;background:var(--bg)}.pfc-host[data-v-628646c9]:empty{display:none}.panel-launcher[data-v-628646c9]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;gap:var(--space-3);padding:var(--space-6)}.panel-launcher button[data-v-628646c9]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);min-height:104px;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);font:var(--text-sm) var(--font-ui);cursor:pointer}.panel-launcher button[data-v-628646c9]:hover:not(:disabled){border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.panel-launcher button[data-v-628646c9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.panel-launcher button[data-v-628646c9]:disabled{color:var(--color-text-faint);cursor:default}.app.panel-expanded.sidebar-collapsed .panel-tab-bar[data-v-628646c9]{padding-left:var(--header-collapsed-clearance, 78px)}.app.panel-expanded.sidebar-collapsed.macos-desktop .panel-tab-bar[data-v-628646c9]{padding-left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm) + var(--icon-button-sm) + var(--space-5))}.global-preview.mobile[data-v-628646c9]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:2px solid var(--color-text)}.global-preview.mobile .pt-shell[data-v-628646c9]{width:100%}.action-toast-stack[data-v-628646c9]{position:fixed;right:var(--space-4);bottom:var(--space-4);z-index:var(--z-toast);display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-2);pointer-events:none}.session-action-undo[data-v-628646c9]{margin-top:var(--space-2);padding:0;border:0;background:transparent;color:var(--color-accent);font:inherit;font-size:var(--text-sm);cursor:pointer}.session-action-undo[data-v-628646c9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(max-width:640px){.action-toast-stack[data-v-628646c9]{right:var(--space-3);bottom:max(var(--space-3),var(--safe-bottom));left:var(--space-3);align-items:stretch}}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2) }.app.macos-desktop{--macos-titlebar-controls-fallback-x: 76px;--macos-titlebar-controls-start: calc(env(titlebar-area-x, var(--macos-titlebar-controls-fallback-x)) + var(--space-2)) }.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm) + var(--icon-button-sm) + var(--space-5))}.app.sidebar-collapsed .session-admin .sa-head{padding-left:78px}.app.sidebar-collapsed.windows-desktop .session-admin .sa-head{padding-left:var(--space-6)}.app.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:calc(var(--macos-titlebar-controls-start) + var(--icon-button-sm) + var(--icon-button-sm) + var(--space-5))}.app.fullscreen.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:78px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .global-preview .ui-panel-header{-webkit-app-region:no-drag}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);--ink: var(--color-text);--fg: var(--color-text);--color-fg: var(--color-text);--border: var(--color-line);--surface-light: #ffffff;--surface-dark: #0d1117;--accent-primary: #1783ff;color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }}html[data-accent=mono]{--accent-primary: #171717;--color-accent: #171717;--color-accent-hover: #383838;--color-accent-soft: #f1f1f2;--color-accent-bd: #d4d4d8;--p-selection: rgba(23, 23, 23, .2);--blue: #171717;--blue2: #383838;--soft: #f1f1f2;--bd: #d4d4d8;--bluebg: #f4f4f5;--blueln: #e4e4e7;--logo: #171717 }html[data-color-scheme=dark][data-accent=mono]{--accent-primary: #e8eaed;--color-accent: #e8eaed;--color-accent-hover: #c9cdd4;--color-accent-soft: #21262d;--color-accent-bd: #444c56;--color-text-on-accent: var(--color-bg);--p-selection: rgba(232, 234, 237, .2);--blue: #e8eaed;--blue2: #c9cdd4;--soft: #21262d;--bd: #444c56;--bluebg: #21262d;--blueln: #30363d;--logo: #e8eaed }@media(prefers-color-scheme:dark){html[data-color-scheme=system][data-accent=mono]{--accent-primary: #e8eaed;--color-accent: #e8eaed;--color-accent-hover: #c9cdd4;--color-accent-soft: #21262d;--color-accent-bd: #444c56;--color-text-on-accent: var(--color-bg);--p-selection: rgba(232, 234, 237, .2);--blue: #e8eaed;--blue2: #c9cdd4;--soft: #21262d;--bd: #444c56;--bluebg: #21262d;--blueln: #30363d;--logo: #e8eaed }}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient(var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #e9eaf2;--color-sidebar-glass: rgba(250, 250, 253, .5);--color-sidebar-wash: linear-gradient(172deg, rgba(213, 222, 240, .92), rgba(226, 224, 242, .85) 55%, rgba(233, 220, 240, .9));--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: var(--radius-sm);--menu-pad: 3.5px;--radius-menu-item: calc(var(--radius-lg) - var(--menu-pad) - var(--p-hairline));--radius-select-option: calc(var(--radius-md) - var(--space-1) - var(--p-hairline));--radius-dropdown-row: calc(var(--radius-lg) - var(--space-1) - var(--p-hairline));--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: var(--space-05);--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-lg) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-sidebar-backdrop: saturate(150%) blur(20px);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--duration-tooltip: .15s;--duration-spin: .7s;--duration-flash: 1.2s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--color-code-selection: rgba(23, 131, 255, .346);--color-code-selection-text: currentcolor;--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--p-scroll-seam-h: 18px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--resize-handle-step: 16px;--resize-handle-step-lg: 48px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 296px;--p-media-thumb-size: 64px;--p-mention-tip-w: 320px;--p-mention-tip-vmargin: var(--space-3);--p-mention-tip-spinner-lift: -.1em;--opacity-stale: .55;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px }:root,html[data-font-scale=medium]{--base-font: 14px }html[data-font-scale=small]{--base-font: 12px }html[data-font-scale=large]{--base-font: 16px }html[data-font-scale=xlarge]{--base-font: 18px }.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #2c343a;--color-sidebar-glass: rgba(40, 46, 52, .78);--color-sidebar-wash: linear-gradient(to bottom, rgba(47, 56, 61, .88), rgba(39, 45, 52, .82));--p-sidebar-backdrop: saturate(80%) blur(28px);--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-code-selection: rgba(26, 136, 255, .27);--color-code-selection-text: currentcolor;--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #2c343a;--color-sidebar-glass: rgba(40, 46, 52, .78);--color-sidebar-wash: linear-gradient(to bottom, rgba(47, 56, 61, .88), rgba(39, 45, 52, .82));--p-sidebar-backdrop: saturate(80%) blur(28px);--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-code-selection: rgba(26, 136, 255, .27);--color-code-selection-text: currentcolor;--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }}:root{--color-sidebar-tint: rgba(255, 255, 255, .4) }html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25) }}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531 }html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }}::highlight(pythinker-transcript-search){background-color:var(--color-search-match)}::highlight(pythinker-transcript-search-current){background-color:var(--color-search-match-current)}.mention-pill{display:inline-flex;align-items:baseline;gap:var(--space-05);color:var(--color-text-muted);font-weight:var(--weight-ui-strong);white-space:nowrap;text-decoration:none;vertical-align:baseline;padding-inline:var(--space-05);transition:color var(--duration-fast) var(--ease-out)}.mention-pill:hover{color:var(--color-text)}.mention-pill:hover .mention-pill-icon{color:inherit}.mention-pill.mention-file,.mention-pill.mention-skill{cursor:pointer}.mention-pill.mention-file:hover,.mention-pill.mention-skill:hover{text-decoration:underline}.mention-pill:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-sm)}.ProseMirror .mention-pill,.ProseMirror .mention-pill:hover{cursor:text;text-decoration:none}a.mention-folder{cursor:default}.mention-pill.mention-skill.mention-inert,.mention-pill.mention-skill.mention-inert:hover{cursor:default;text-decoration:none}.mention-pill-name{max-width:24em;min-width:0;overflow:hidden;text-overflow:ellipsis}.mention-pill-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--muted);align-self:center;flex-shrink:0}.mention-pill-icon svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block;stroke:currentColor;stroke-width:var(--p-hairline)}.mention-pill.pill-in-selection{background:var(--p-selection);border-radius:var(--radius-sm)}.mention-tip{position:fixed;z-index:var(--z-tooltip);max-width:min(var(--p-mention-tip-w),calc(100vw - 2 * var(--p-mention-tip-vmargin)));padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:round(calc(var(--text-xs) * 1.5),1px);overflow-wrap:anywhere;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.mention-tip:not(.positioned){pointer-events:none}.mention-tip.positioned{opacity:1}.mention-tip-path{display:flex;align-items:flex-start;gap:var(--space-2)}.mention-tip-path-text{min-width:0}.mention-tip-sep{color:color-mix(in srgb,currentColor 45%,transparent)}.mention-tip-base{font-weight:var(--weight-semibold)}.mention-tip-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2)}.mention-tip-name{font-weight:var(--weight-semibold);overflow-wrap:anywhere}.mention-tip-open,.mention-tip-copy{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-05);border:none;border-radius:var(--radius-xs);background:transparent;color:color-mix(in srgb,currentColor 65%,transparent);cursor:pointer;transition:color var(--duration-fast) var(--ease-out),background-color var(--duration-fast) var(--ease-out)}.mention-tip-open:hover,.mention-tip-copy:hover{color:var(--color-bg);background:color-mix(in srgb,var(--color-bg) 14%,transparent)}.mention-tip-open:focus-visible,.mention-tip-copy:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mention-tip-open svg,.mention-tip-copy svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-tip-copy{margin-top:calc(0px - var(--space-05));margin-right:calc(var(--space-05) - var(--space-2))}.mention-tip-desc{margin-top:var(--space-05);color:color-mix(in srgb,currentColor 78%,transparent);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.mention-tip-spinner{display:inline-block;width:calc(var(--space-2) + var(--space-05));height:calc(var(--space-2) + var(--space-05));margin-left:var(--space-1);vertical-align:var(--p-mention-tip-spinner-lift);border-radius:50%;border:var(--p-ring-stroke) solid color-mix(in srgb,currentColor 30%,transparent);border-top-color:currentColor;animation:mention-tip-spin var(--duration-spin) linear infinite}@keyframes mention-tip-spin{to{transform:rotate(360deg)}}.mention-pill.mention-missing,.mention-pill.mention-missing:hover{color:color-mix(in srgb,var(--color-text-muted) 55%,transparent);text-decoration:line-through}.mention-pill.mention-missing .mention-pill-icon{color:inherit}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px) }.ui-shimmer{background:linear-gradient(90deg,var(--color-text-faint) 0%,var(--color-text-faint) 40%,var(--color-text) 50%,var(--color-text-faint) 60%,var(--color-text-faint) 100%);background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:ui-shimmer 2.2s linear infinite}@keyframes ui-shimmer{0%{background-position:0% 0}to{background-position:100% 0}}@media(prefers-reduced-motion:reduce){.ui-shimmer{animation:none;background:none;color:var(--color-text-muted)}}.ui-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:pythinker-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes pythinker-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes pythinker-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes pythinker-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ch-eyes{animation:pythinker-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:pythinker-eye-blink 11s ease-in-out infinite}@keyframes pythinker-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes pythinker-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:pythinker-eye-blink-once .24s ease-in-out}@keyframes pythinker-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s }#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} diff --git a/apps/pythinker-code/dist-web/assets/index10-CG-shKcB.js b/apps/pythinker-code/dist-web/assets/index10-DRKt26_3.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index10-CG-shKcB.js rename to apps/pythinker-code/dist-web/assets/index10-DRKt26_3.js index 80c666da6..9b1661dad 100644 --- a/apps/pythinker-code/dist-web/assets/index10-CG-shKcB.js +++ b/apps/pythinker-code/dist-web/assets/index10-DRKt26_3.js @@ -1,2 +1,2 @@ -import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-vF2s5p7P.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`
        Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}
        `)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(` +import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-BZ9wqq8Z.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`
        Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}
        `)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(` `)},null,8,C1),e[21]||(e[21]=t("span",{class:"infographic-label font-medium font-mono truncate"},"Infographic",-1))])),n.$slots["header-center"]?(r(),u("div",k1,[ge(n.$slots,"header-center",{},void 0,!0)])):l.showModeToggle?(r(),u("div",x1,[t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"":"is-active",Ee.value?"opacity-50 cursor-not-allowed":""]]),disabled:Ee.value,onClick:e[0]||(e[0]=()=>He("preview")),onMouseenter:e[1]||(e[1]=o=>h(o,s(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>h(o,s(a)("common.preview")||"Preview")),onMouseleave:v,onBlur:v},[t("div",b1,[e[22]||(e[22]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,X(s(a)("common.preview")||"Preview"),1)])],42,y1),t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>He("source")),onMouseenter:e[4]||(e[4]=o=>h(o,s(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>h(o,s(a)("common.source")||"Source")),onMouseleave:v,onBlur:v},[t("div",M1,[e[23]||(e[23]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),t("span",null,X(s(a)("common.source")||"Source"),1)])],34)])):F("",!0),n.$slots["header-right"]?(r(),u("div",B1,[ge(n.$slots,"header-right",{},void 0,!0)])):(r(),u("div",F1,[l.showCollapseButton?(r(),u("button",{key:0,class:b(se),"aria-pressed":c.value,onClick:e[6]||(e[6]=o=>c.value=!c.value),onMouseenter:e[7]||(e[7]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onMouseleave:v,onBlur:v},[(r(),u("svg",{style:Ce({rotate:c.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[24]||(e[24]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,T1)):F("",!0),l.showCopyButton?(r(),u("button",{key:1,class:b(se),onClick:_e,onMouseenter:e[9]||(e[9]=o=>Te(o)),onFocus:e[10]||(e[10]=o=>Te(o)),onMouseleave:v,onBlur:v},[H.value?(r(),u("svg",$1,[...e[26]||(e[26]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(r(),u("svg",H1,[...e[25]||(e[25]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):F("",!0),l.showExportButton?(r(),u("button",{key:2,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Ie,onMouseenter:e[11]||(e[11]=o=>h(o,s(a)("common.export")||"Export")),onFocus:e[12]||(e[12]=o=>h(o,s(a)("common.export")||"Export")),onMouseleave:v,onBlur:v},[...e[27]||(e[27]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,j1)):F("",!0),l.showFullscreenButton?(r(),u("button",{key:3,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Oe,onMouseenter:e[13]||(e[13]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onFocus:e[14]||(e[14]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onMouseleave:v,onBlur:v},[j.value?(r(),u("svg",E1,[...e[29]||(e[29]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(r(),u("svg",P1,[...e[28]||(e[28]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,L1)):F("",!0)]))])):F("",!0),t1(t("div",null,[k.value?(r(),u("div",z1,[t("pre",S1,X(z.value),1)])):(r(),u("div",Z1,[l.showZoomControls?(r(),u("div",V1,[t("div",D1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e,onMouseenter:e[15]||(e[15]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onMouseleave:v,onBlur:v},[...e[30]||(e[30]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je,onMouseenter:e[17]||(e[17]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onMouseleave:v,onBlur:v},[...e[31]||(e[31]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le,onMouseenter:e[19]||(e[19]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onMouseleave:v,onBlur:v},X(Math.round(100*M.value))+"% ",33)])])):F("",!0),t("div",{class:"infographic-preview relative transition-all overflow-hidden block",style:Ce({height:ce.value}),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},[L.value||S.value?F("",!0):(r(),u("pre",N1,X(z.value),1)),t("div",{class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":_.value}]),style:Ce(ze.value)},[t("div",{ref_key:"infographicContainer",ref:p,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],36)]))],512),[[l1,!c.value]]),(r(),a1(c1,{to:"body"},[t("div",{class:b(["markstream-vue",{dark:l.isDark}])},[i1(u1,{name:"infographic-dialog",appear:""},{default:r1(()=>[j.value?(r(),u("div",{key:0,class:"infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:s1(ve,["self"])},[t("div",Y1,[t("div",_1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e},[...e[32]||(e[32]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je},[...e[33]||(e[33]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le},X(Math.round(100*M.value))+"% ",1),t("button",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",onClick:ve},[...e[34]||(e[34]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),t("div",{ref_key:"modalContent",ref:D,class:b(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!_.value,"cursor-grabbing":_.value}]),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},null,34)])])):F("",!0)]),_:1})],2)]))],10,p1))}}),[["__scopeId","data-v-de34ec4b"]]);ke.install=R=>{R.component(ke.__name,ke)};export{ke as default}; diff --git a/apps/pythinker-code/dist-web/assets/index11-H71ylPuM.js b/apps/pythinker-code/dist-web/assets/index11-BtnGHbJw.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index11-H71ylPuM.js rename to apps/pythinker-code/dist-web/assets/index11-BtnGHbJw.js index a1e40af52..252a96062 100644 --- a/apps/pythinker-code/dist-web/assets/index11-H71ylPuM.js +++ b/apps/pythinker-code/dist-web/assets/index11-BtnGHbJw.js @@ -1,4 +1,4 @@ -import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as f,bl as Wn,af as Xn,bY as Vn,bE as I,az as Un,c8 as wn,aD as Zn,as as Y,aI as Kn,aL as M,u as C,aY as Rt,v as u,bk as w,bb as Ke,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-vF2s5p7P.js";import{i as At}from"./safeRaf-DGuzXxDK.js";function vl(d,m){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,m-12),m))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function fl(d){const m=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(m)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(m)}function ml(d){if(!d.includes(";"))return d;const m=d.indexOf(":");if(m===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,m))return d;const y=d.slice(0,m+1),z=d.slice(m+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||fl($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function Lt(d){if(_t(d)!=="sequencediagram")return d;const m=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;zm in d?hl(d,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[m]=y,Tn=(d,m)=>{for(var y in m||(m={}))wl.call(m,y)&&Mn(d,y,m[y]);if(bn)for(var y of bn(m))yl.call(m,y)&&Mn(d,y,m[y]);return d},T=(d,m,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,m)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Al=["aria-label","disabled"],Ll={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:m}){var y,z;const a=d,$=m,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=f(!1),P=f(typeof window>"u"),ee=Nn(),Ht=In(),Le=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Le.value,dompurifyConfig:Le.value==="strict"?Q:void 0,flowchart:Le.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var X;for(const J of W)(X=J.parentNode)==null||X.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ge(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Je=f(!1),V=f(!1),Qe=f(),Z=f(),v=f(),se=f(),et=f(null),En=qn(),je=f(null),xe=f(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,tt=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,tt+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++tt;yield Y(),t===tt&&((function(n=Nt.value){n&&Qe.value&&te?.reportHeight(n,Qe.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,tt+=1,te?.markSettled(e))}const Yt=f(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Le.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% +import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as f,bl as Wn,af as Xn,bY as Vn,bE as I,az as Un,c8 as wn,aD as Zn,as as Y,aI as Kn,aL as M,u as C,aY as Rt,v as u,bk as w,bb as Ke,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-BZ9wqq8Z.js";import{i as At}from"./safeRaf-DGuzXxDK.js";function vl(d,m){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,m-12),m))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function fl(d){const m=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(m)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(m)}function ml(d){if(!d.includes(";"))return d;const m=d.indexOf(":");if(m===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,m))return d;const y=d.slice(0,m+1),z=d.slice(m+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||fl($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function Lt(d){if(_t(d)!=="sequencediagram")return d;const m=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;zm in d?hl(d,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[m]=y,Tn=(d,m)=>{for(var y in m||(m={}))wl.call(m,y)&&Mn(d,y,m[y]);if(bn)for(var y of bn(m))yl.call(m,y)&&Mn(d,y,m[y]);return d},T=(d,m,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,m)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Al=["aria-label","disabled"],Ll={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:m}){var y,z;const a=d,$=m,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=f(!1),P=f(typeof window>"u"),ee=Nn(),Ht=In(),Le=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Le.value,dompurifyConfig:Le.value==="strict"?Q:void 0,flowchart:Le.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var X;for(const J of W)(X=J.parentNode)==null||X.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ge(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Je=f(!1),V=f(!1),Qe=f(),Z=f(),v=f(),se=f(),et=f(null),En=qn(),je=f(null),xe=f(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,tt=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,tt+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++tt;yield Y(),t===tt&&((function(n=Nt.value){n&&Qe.value&&te?.reportHeight(n,Qe.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,tt+=1,te?.markSettled(e))}const Yt=f(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Le.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% `;return n.trim().startsWith("%%{")?n:r+n}function qt(){var e;return(function(t){const n=(function(){var r;const o=Z.value?getComputedStyle(Z.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=zt(o))!=null?r:360})(),l=un();return ol(t,n,l)})((e=zt(a.estimatedPreviewHeightPx))!=null?e:al(D.value))}function Wt(){return`${qt()}px`}const _e=f(null);function kt(){var e;return!!((e=v.value)!=null&&e.querySelector("svg"))}function Xt(){return a.loading!==!1&&(kt()||!!_e.value)}const B=f(1),_=f(0),H=f(0),nt=f(!1),lt=f({x:0,y:0}),x=f(!0),rt=f(!1),re=f(!1),de=f(null);let xt="",bt=!1,ve="";const ot=f(0),Mt=f(!1),$n=F(()=>{var e;return Math.max(0,(e=a.renderDebounceMs)!=null?e:300)}),Pn=F(()=>{var e;return Math.max(0,(e=a.contentStableDelayMs)!=null?e:500)}),He=F(()=>{var e;return Math.max(120,(e=a.previewPollDelayMs)!=null?e:800)}),Dn=F(()=>{var e;return Math.max(He.value,(e=a.previewPollMaxDelayMs)!=null?e:4e3)}),Vt=F(()=>{var e;return Math.max(1,Math.trunc((e=a.previewPollMaxAttempts)!=null?e:12))}),fe=F(()=>a.loading!==!1);let Ne=null,Ie=null,Oe=null,Se=null,Ye=0;const Ut=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Zt=(z=globalThis.cancelIdleCallback)!=null?z:e=>clearTimeout(e);function b(e=ke){return!ue&&e===ke}function A(){return b()&&xe.value&&!V.value}function Tt(){Oe!=null&&(globalThis.clearTimeout(Oe),Oe=null),Se!=null&&(Zt(Se),Se=null)}function qe(){ue||Oe==null&&Se==null&&(Oe=globalThis.setTimeout(()=>{Oe=null,A()&&(Se=Ut(()=>{Se=null,A()&&gn()},{timeout:500}))},$n.value))}function We(){Ie!=null&&(globalThis.clearTimeout(Ie),Ie=null)}function Kt(e=600){if(typeof globalThis>"u"||ue)return;const t=Math.max(0,e);We(),Ie=globalThis.setTimeout(()=>{if(Ie=null,!ue){if(a.loading||re.value||!A())return void Kt(Math.min(1200,Math.max(300,1.2*t)));qe()}},t)}const q=f(Wt()),at=f(q.value);let $e=null;const O=f(!1),K=f(!1),me=f({}),he=f(0);let U=null,Pe=null;const N=f(!1),Rn=F(()=>{var e,t;return!(V.value||x.value||P.value&&!re.value&&!de.value&&(O.value||N.value&&((t=(e=v.value)==null?void 0:e.textContent)!=null&&t.trim())))}),Me=f({zoom:1,translateX:0,translateY:0,containerHeight:q.value}),Gt=F(()=>a.enableWheelZoom?{wheel:Fn}:{}),G=F(()=>{var e,t,n,l;return{worker:(e=a.workerTimeoutMs)!=null?e:1400,parse:(t=a.parseTimeoutMs)!=null?t:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}});let De=null,it=null,Re=!1,Te=He.value,ne=null,ut=0,Ct=!0,st=0;function Ce(e,t){const n=t?.timeoutMs,l=t?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,c=null;return new Promise((h,i)=>{const s=()=>{r!=null&&clearTimeout(r),c&&l&&l.removeEventListener("abort",c)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,s(),i(new Error("Operation timed out")))},n)),l&&(c=()=>{o||(o=!0,s(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",c)),e().then(p=>{o||(o=!0,s(),h(p))}).catch(p=>{o||(o=!0,s(),i(p))})})}function Jt(e){if(typeof document>"u"||!v.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(e,D.value,v.value)===!0)return N.value=!0,void L();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),we(v.value),v.value.appendChild(t);const l=v.value?getComputedStyle(v.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";q.value=l||"360px",at.value=q.value,N.value=!0,L()}function Qt(e){const t=typeof e=="string"?e:typeof e?.message=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function en(e){return e?.name==="AbortError"}function Bt(e){return!Qt(e)&&!en(e)}typeof window<"u"&&I([()=>Qe.value,ee],([e,t])=>{var n;if((n=je.value)==null||n.destroy(),je.value=null,!t||xe.value)return void(xe.value=!0);if(!e)return void(xe.value=!1);const l=En(e,{rootMargin:Ht?.value.heavyBlockMargin,allowIdle:!1});je.value=l,xe.value=l.isVisible.value,l.whenVisible.then(()=>{xe.value=!0})},{immediate:!0}),Un(()=>{var e;ue=!0,ke+=1,he.value+=1,(e=je.value)==null||e.destroy(),je.value=null,It(),Tt()});const ct=F(()=>a.showTooltips!==!1);function tn(e){return!e||e.disabled}function R(e,t,n="top"){if(!ct.value||tn(e.currentTarget))return;const l=e,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;xn(e.currentTarget,t,n,!1,r,a.isDark)}function S(){ct.value&&wn()}function nn(e){if(!ct.value||tn(e.currentTarget))return;const t=Je.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;xn(e.currentTarget,t,"top",!1,l,a.isDark)}function ln(e,t){const n={theme:t==="dark"?"dark":"default"};Le.value==="strict"&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%% `;return e.trimStart().startsWith("%%{")?e:l+e}function dt(){return Ct&&!x.value&&!O.value&&!N.value}function rn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Et(e){if(_t(e)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(rn(o))break;r.pop()}else r.pop()}return r.some(rn)?r.join(` `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const n=t[t.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;t.pop()}else t.pop()}return t.join(` diff --git a/apps/pythinker-code/dist-web/assets/index5-ClJqsKuw.js b/apps/pythinker-code/dist-web/assets/index5-DRYrcfDq.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/index5-ClJqsKuw.js rename to apps/pythinker-code/dist-web/assets/index5-DRYrcfDq.js index 34aeaa801..eaa15b58c 100644 --- a/apps/pythinker-code/dist-web/assets/index5-ClJqsKuw.js +++ b/apps/pythinker-code/dist-web/assets/index5-DRYrcfDq.js @@ -1 +1 @@ -import c from"./CodeBlockNode-DhHNvLD-.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-vF2s5p7P.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; +import c from"./CodeBlockNode-D4cpL5UZ.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-BZ9wqq8Z.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; diff --git a/apps/pythinker-code/dist-web/assets/index6-8mtDOSly.js b/apps/pythinker-code/dist-web/assets/index6-rJ6wldFa.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/index6-8mtDOSly.js rename to apps/pythinker-code/dist-web/assets/index6-rJ6wldFa.js index eb6655470..19676d649 100644 --- a/apps/pythinker-code/dist-web/assets/index6-8mtDOSly.js +++ b/apps/pythinker-code/dist-web/assets/index6-rJ6wldFa.js @@ -1 +1 @@ -import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-vF2s5p7P.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; +import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-BZ9wqq8Z.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; diff --git a/apps/pythinker-code/dist-web/assets/index7-DpSd4JVP.js b/apps/pythinker-code/dist-web/assets/index7-BEZwnfMu.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/index7-DpSd4JVP.js rename to apps/pythinker-code/dist-web/assets/index7-BEZwnfMu.js index 8cd05153e..330fb8bfb 100644 --- a/apps/pythinker-code/dist-web/assets/index7-DpSd4JVP.js +++ b/apps/pythinker-code/dist-web/assets/index7-BEZwnfMu.js @@ -1 +1 @@ -import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-vF2s5p7P.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; +import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-BZ9wqq8Z.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; diff --git a/apps/pythinker-code/dist-web/assets/index8-CdLvqqXT.js b/apps/pythinker-code/dist-web/assets/index8-Cir0nNuz.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index8-CdLvqqXT.js rename to apps/pythinker-code/dist-web/assets/index8-Cir0nNuz.js index 091357dcf..f602b7c65 100644 --- a/apps/pythinker-code/dist-web/assets/index8-CdLvqqXT.js +++ b/apps/pythinker-code/dist-web/assets/index8-Cir0nNuz.js @@ -1 +1 @@ -import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-vF2s5p7P.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; +import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-BZ9wqq8Z.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; diff --git a/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-DdCBBDr8.js b/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-Cn4b9A5u.js similarity index 68% rename from apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-DdCBBDr8.js rename to apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-Cn4b9A5u.js index 10e2b3e55..5bcf3542e 100644 --- a/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-DdCBBDr8.js +++ b/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-Cn4b9A5u.js @@ -1,2 +1,2 @@ -import{_ as e,l as s,G as n,d as i}from"./mermaid.core-BgUXBQ9g.js";import{p}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},d={version:"11.17.0"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,o)=>{s.debug(`rendering info diagram +import{_ as e,l as s,G as n,d as i}from"./mermaid.core-BusHtpbx.js";import{p}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},d={version:"11.17.0"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,o)=>{s.debug(`rendering info diagram `+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},w={parser:g,db:m,renderer:l};export{w as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-C9GF3Hkk.js b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-C9GF3Hkk.js rename to apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js index 80847eb37..8133ffc96 100644 --- a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-C9GF3Hkk.js +++ b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js @@ -1,4 +1,4 @@ -import{_ as l,c as lt,a2 as ct,G as ut,am as dt,r as yt,k as ft,p as et,a as pt,b as gt,g as kt,s as mt,q as wt,d as _t}from"./mermaid.core-BgUXBQ9g.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[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],D={trace:l(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:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,W,N,Y,F={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: +import{_ as l,c as lt,a2 as ct,G as ut,am as dt,r as yt,k as ft,p as et,a as pt,b as gt,g as kt,s as mt,q as wt,d as _t}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[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],D={trace:l(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:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,W,N,Y,F={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: `+b.showPosition()+` Expecting `+U.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:U})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:i.push(M),f.push(b.yytext),r.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[N[1]][1],F.$=f[f.length-V],F._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},H&&(F._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(F,[w,$,I,S.yy,N[1],f,r].concat(C)),typeof Y<"u")return Y;V&&(i=i.slice(0,-1*V*2),f=f.slice(0,-1*V),r=r.slice(0,-1*V)),i.push(this.productions_[N[1]][0]),f.push(F.$),r.push(F._$),tt=v[i[i.length-2]][i[i.length-1]],i.push(tt);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(e,s){return this.yy=s||this.yy||{},this._input=e,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:l(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var s=e.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),e},"input"),unput:l(function(e){var s=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var h=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===h.length?this.yylloc.first_column:0)+h[h.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:l(function(){return this._more=!0,this},"more"),reject:l(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),s=new Array(e.length+1).join("-");return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/javascript-CcXtvgWG.js b/apps/pythinker-code/dist-web/assets/javascript-C1Bl1QAn.js similarity index 85% rename from apps/pythinker-code/dist-web/assets/javascript-CcXtvgWG.js rename to apps/pythinker-code/dist-web/assets/javascript-C1Bl1QAn.js index 9e26d1f41..b3e38eca0 100644 --- a/apps/pythinker-code/dist-web/assets/javascript-CcXtvgWG.js +++ b/apps/pythinker-code/dist-web/assets/javascript-C1Bl1QAn.js @@ -1 +1 @@ -import{conf as t,language as e}from"./typescript-0SwtrmOf.js";import"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const n=t,a={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{n as conf,a as language}; +import{conf as t,language as e}from"./typescript-DeFWR0Bj.js";import"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const n=t,a={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{n as conf,a as language}; diff --git a/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-DmhIyY3b.js b/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-Bznj053h.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-DmhIyY3b.js rename to apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-Bznj053h.js index 808202660..93a6823f4 100644 --- a/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-DmhIyY3b.js +++ b/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-Bznj053h.js @@ -1,4 +1,4 @@ -import{g as gt}from"./chunk-5VM5RSS4-wCYaCTKB.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-F27PBJKO-A5JDBOgE.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,j as X,d as $t,r as Mt}from"./mermaid.core-BgUXBQ9g.js";import{d as it}from"./arc-Bm7BOhts.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.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)+`: +import{g as gt}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-F27PBJKO-CGsciVEq.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,j as X,d as $t,r as Mt}from"./mermaid.core-BusHtpbx.js";import{d as it}from"./arc-B8osaoVd.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.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)+`: `+_.showPosition()+` 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). `+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()+` diff --git a/apps/pythinker-code/dist-web/assets/jsonMode-BhgzQeiy.js b/apps/pythinker-code/dist-web/assets/jsonMode-B4lkE7Oy.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/jsonMode-BhgzQeiy.js rename to apps/pythinker-code/dist-web/assets/jsonMode-B4lkE7Oy.js index d4f8c92ca..58f0aacca 100644 --- a/apps/pythinker-code/dist-web/assets/jsonMode-BhgzQeiy.js +++ b/apps/pythinker-code/dist-web/assets/jsonMode-B4lkE7Oy.js @@ -1,4 +1,4 @@ -import{c as P,l as _,e as B}from"./editor.main-BVyazG_A.js";import{f as Q,g as y,C as J,H as Y,b as G,d as X,F as Z,S as $,e as K}from"./lspLanguageFeatures-jno-S5XZ.js";import{a as Ie,D as Ne,h as Ee,R as Le,c as Ue,i as De,j as Be,t as Re,k as Fe}from"./lspLanguageFeatures-jno-S5XZ.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const x=120*1e3;class C{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=P({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL("/assets/json.worker-MyEhrfQg.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let t;return this._getClient().then(n=>{t=n}).then(n=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(n=>t)}}function ee(e,i=!1){const t=e.length;let n=0,o="",p=0,l=16,u=0,g=0,w=0,v=0,c=0;function O(s,m){let a=0,r=0;for(;a=48&&f<=57)r=r*16+f-48;else if(f>=65&&f<=70)r=r*16+f-65+10;else if(f>=97&&f<=102)r=r*16+f-97+10;else break;n++,a++}return a=t){s+=e.substring(m,n),c=2;break}const a=e.charCodeAt(n);if(a===34){s+=e.substring(m,n),n++;break}if(a===92){if(s+=e.substring(m,n),n++,n>=t){c=2;break}switch(e.charCodeAt(n++)){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=` +import{c as P,l as _,e as B}from"./editor.main-yCrGDkyO.js";import{f as Q,g as y,C as J,H as Y,b as G,d as X,F as Z,S as $,e as K}from"./lspLanguageFeatures-Dzr62Jjp.js";import{a as Ie,D as Ne,h as Ee,R as Le,c as Ue,i as De,j as Be,t as Re,k as Fe}from"./lspLanguageFeatures-Dzr62Jjp.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const x=120*1e3;class C{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=P({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL("/assets/json.worker-MyEhrfQg.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let t;return this._getClient().then(n=>{t=n}).then(n=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(n=>t)}}function ee(e,i=!1){const t=e.length;let n=0,o="",p=0,l=16,u=0,g=0,w=0,v=0,c=0;function O(s,m){let a=0,r=0;for(;a=48&&f<=57)r=r*16+f-48;else if(f>=65&&f<=70)r=r*16+f-65+10;else if(f>=97&&f<=102)r=r*16+f-97+10;else break;n++,a++}return a=t){s+=e.substring(m,n),c=2;break}const a=e.charCodeAt(n);if(a===34){s+=e.substring(m,n),n++;break}if(a===92){if(s+=e.substring(m,n),n++,n>=t){c=2;break}switch(e.charCodeAt(n++)){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=` `;break;case 114:s+="\r";break;case 116:s+=" ";break;case 117:const f=O(4);f>=0?s+=String.fromCharCode(f):c=4;break;default:c=5}m=n;continue}if(a>=0&&a<=31)if(I(a)){s+=e.substring(m,n),c=2;break}else c=6;n++}return s}function D(){if(o="",c=0,p=n,g=u,v=w,n>=t)return p=t,l=17;let s=e.charCodeAt(n);if(L(s)){do n++,o+=String.fromCharCode(s),s=e.charCodeAt(n);while(L(s));return l=15}if(I(s))return n++,o+=String.fromCharCode(s),s===13&&e.charCodeAt(n)===10&&(n++,o+=` `),u++,w=n,l=14;switch(s){case 123:return n++,l=1;case 125:return n++,l=2;case 91:return n++,l=3;case 93:return n++,l=4;case 58:return n++,l=6;case 44:return n++,l=5;case 34:return n++,o=q(),l=10;case 47:const m=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&s<=15);return s}return{setPosition:U,getPosition:()=>n,scan:i?z:D,getToken:()=>l,getTokenValue:()=>o,getTokenOffset:()=>p,getTokenLength:()=>n-p,getTokenStartLine:()=>g,getTokenStartCharacter:()=>p-v,getTokenError:()=>c}}function L(e){return e===32||e===9}function I(e){return e===10||e===13}function T(e){return e>=48&&e<=57}var R;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(R||(R={}));new Array(20).fill(0).map((e,i)=>" ".repeat(i));const A=200;new Array(A).fill(0).map((e,i)=>` `+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>"\r"+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>`\r diff --git a/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-DXzagyyt.js b/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-gEE7iVwG.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-DXzagyyt.js rename to apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-gEE7iVwG.js index b6d27fd89..3bd5059e4 100644 --- a/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-DXzagyyt.js +++ b/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-gEE7iVwG.js @@ -1,4 +1,4 @@ -import{_ as o,l as te,c as H,G as fe,ag as ye,ah as be,ai as me,ae as Ee,E as K,i as j,Z as _e,$ as ke,ab as Se,ac as ce,ad as le}from"./mermaid.core-BgUXBQ9g.js";import{g as Ne}from"./chunk-5VM5RSS4-wCYaCTKB.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],E=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],_=[6,7,11],F=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"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:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];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:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(_,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(_,[2,19]),e(_,[2,21],{15:30,24:F}),e(_,[2,22]),e(_,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(_,[2,16],{15:37,24:F}),e(_,[2,17]),e(_,[2,18]),e(_,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(_,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.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(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var k,P,x,q,G={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((k===null||typeof k>"u")&&(k=ae()),x=U[P]&&U[P][k]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: +import{_ as o,l as te,c as H,G as fe,ag as ye,ah as be,ai as me,ae as Ee,E as K,i as j,Z as _e,$ as ke,ab as Se,ac as ce,ad as le}from"./mermaid.core-BusHtpbx.js";import{g as Ne}from"./chunk-5VM5RSS4-BX7DTcSO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],E=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],_=[6,7,11],F=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"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:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];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:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(_,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(_,[2,19]),e(_,[2,21],{15:30,24:F}),e(_,[2,22]),e(_,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(_,[2,16],{15:37,24:F}),e(_,[2,17]),e(_,[2,18]),e(_,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(_,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.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(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var k,P,x,q,G={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((k===null||typeof k>"u")&&(k=ae()),x=U[P]&&U[P][k]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: `+b.showPosition()+` Expecting `+X.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Q="Parse error on line "+(W+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:Z,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+k);switch(x[0]){case 1:r.push(k),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),k=null,se=b.yyleng,c=b.yytext,W=b.yylineno,Z=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],G.$=u[u.length-C],G._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(G._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),q=this.performAction.apply(G,[c,se,W,R.yy,x[1],u,t].concat(ge)),typeof q<"u")return q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(G.$),t.push(G._$),oe=U[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(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:o(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:o(function(i){var n=i.length,r=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 a=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[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: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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(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:o(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:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/layout-BKltItOX.js b/apps/pythinker-code/dist-web/assets/layout-CRsCkvth.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/layout-BKltItOX.js rename to apps/pythinker-code/dist-web/assets/layout-CRsCkvth.js index 734adc94c..6229894a8 100644 --- a/apps/pythinker-code/dist-web/assets/layout-BKltItOX.js +++ b/apps/pythinker-code/dist-web/assets/layout-CRsCkvth.js @@ -1 +1 @@ -import{bn as B,bo as y,bp as ye,bq as V,br as U,bs as Ue,bt as oe,bu as We,bv as In,bw as qe,bx as _n,by as kn,bz as jn,bA as ue,bB as An,bC as Mn,bD as xe,bE as Oe,bF as fe,bG as de,bH as G,bI as Xe,bJ as He,bK as Rn,bL as T,bM as Sn,bN as $n,bO as Fn,bP as Ee,bQ as Bn,bR as Ke,bS as N,bT as Gn,bU as Dn,bV as Yn,bW as S,bX as ze,bY as Je,bZ as Vn,b_ as se,b$ as Ze,c0 as Un,c1 as Qe,c2 as Wn,c3 as qn,a7 as x,c4 as c,c5 as Xn,c6 as m,c7 as M,c8 as P,c9 as W}from"./mermaid.core-BgUXBQ9g.js";var Hn=/\s/;function Kn(e){for(var n=e.length;n--&&Hn.test(e.charAt(n)););return n}var zn=/^\s+/;function Jn(e){return e&&e.slice(0,Kn(e)+1).replace(zn,"")}var Te=NaN,Zn=/^[-+]0x[0-9a-f]+$/i,Qn=/^0b[01]+$/i,er=/^0o[0-7]+$/i,nr=parseInt;function rr(e){if(typeof e=="number")return e;if(B(e))return Te;if(y(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=y(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Jn(e);var r=Qn.test(e);return r||er.test(e)?nr(e.slice(2),r?2:8):Zn.test(e)?Te:+e}var Pe=1/0,tr=17976931348623157e292;function $(e){if(!e)return e===0?e:0;if(e=rr(e),e===Pe||e===-Pe){var n=e<0?-1:1;return n*tr}return e===e?e:0}function ir(e){var n=$(e),r=n%1;return n===n?r?n-r:n:0}var Le=Object.create,ar=(function(){function e(){}return function(n){if(!y(n))return{};if(Le)return Le(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function or(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&k(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),n=Object(n);++t2?n[2]:void 0;for(i&&k(n[0],n[1],i)&&(t=1);++r-1?i[o?n[a]:a]:void 0}}var Mt=Math.max;function Rt(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:ir(r);return i<0&&(i=Mt(t+i,0)),Dn(e,N(n),i)}var le=At(Rt);function ln(e,n){var r=-1,t=U(e)?Array(e.length):[];return Yn(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function g(e,n){var r=T(e)?S:ln;return r(e,N(n))}function St(e,n){return e==null?e:Ke(e,ze(n),H)}function $t(e,n){return e&&Je(e,ze(n))}function Ft(e,n){return e>n}var Bt=Object.prototype,Gt=Bt.hasOwnProperty;function Dt(e,n){return e!=null&&Gt.call(e,n)}function hn(e,n){return e!=null&&Vn(e,n,Dt)}function vn(e,n){return en||o&&a&&f&&!u&&!d||t&&a&&f||!r&&f||!i)return 1;if(!t&&!o&&!d&&e=u)return f;var d=r[t];return f*(d=="desc"?-1:1)}}return e.index-n.index}function Xt(e,n,r){n.length?n=S(n,function(o){return T(o)?function(a){return Qe(a,o.length===1?o[0]:o)}:o}):n=[se];var t=-1;n=S(n,de(N));var i=ln(e,function(o,a,u){var f=S(n,function(d){return d(o)});return{criteria:f,index:++t,value:o}});return Ut(i,function(o,a){return qt(o,a,r)})}function Ht(e,n){return Vt(e,n,function(r,t){return Wn(e,t)})}var Y=pr(function(e,n){return e==null?{}:Ht(e,n)}),Kt=Math.ceil,zt=Math.max;function Jt(e,n,r,t){for(var i=-1,o=zt(Kt((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function Zt(e){return function(n,r,t){return t&&typeof t!="number"&&k(n,r,t)&&(r=t=void 0),n=$(n),r===void 0?(r=n,n=0):r=$(r),t=t===void 0?n1&&k(e,n[0],n[1])?n=[]:r>2&&k(n[0],n[1],n[2])&&(n=[n[0]]),Xt(e,qe(n),[])}),Qt=0;function pe(e){var n=++Qt;return qn(e)+n}function ei(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t0;--u)if(a=n[u].dequeue(),a){t=t.concat(J(e,n,r,a,!0));break}}}return t}function J(e,n,r,t,i){var o=i?[]:void 0;return c(e.inEdges(t.v),function(a){var u=e.edge(a),f=e.node(a.v);i&&o.push({v:a.v,w:a.w}),f.out-=u,ae(n,r,f)}),c(e.outEdges(t.v),function(a){var u=e.edge(a),f=a.w,d=e.node(f);d.in-=u,ae(n,r,d)}),e.removeNode(t.v),o}function ui(e,n){var r=new x,t=0,i=0;c(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(e.edges(),function(u){var f=r.edge(u.v,u.w)||0,d=n(u),s=f+d;r.setEdge(u.v,u.w,s),i=Math.max(i,r.node(u.v).out+=d),t=Math.max(t,r.node(u.w).in+=d)});var o=L(i+t+3).map(function(){return new ri}),a=t+1;return c(r.nodes(),function(u){ae(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function ae(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function fi(e){var n=e.graph().acyclicer==="greedy"?ai(e,r(e)):di(e);c(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,pe("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function di(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,c(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return c(e.nodes(),i),n}function si(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function I(e,n,r,t){var i;do i=pe(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function ci(e){var n=new x().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function pn(e){var n=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Re(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var f,d;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),f=u*i/o,d=u):(i<0&&(a=-a),f=a,d=a*o/i),{x:r+f,y:t+d}}function z(e){var n=g(L(bn(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function li(e){var n=j(g(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);hn(t,"rank")&&(t.rank-=n)})}function hi(e){var n=j(g(e.nodes(),function(o){return e.node(o).rank})),r=[];c(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;c(r,function(o,a){m(o)&&a%i!==0?--t:t&&c(o,function(u){e.node(u).rank+=t})})}function Se(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),I(e,"border",i,n)}function bn(e){return O(g(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function vi(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function pi(e,n){return n()}function bi(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;oa.lim&&(u=a,f=!0);var d=M(n.edges(),function(s){return f===Be(e,e.node(s.v),u)&&f!==Be(e,e.node(s.w),u)});return ve(d,function(s){return A(n,s)})}function Pn(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ge(e),we(e,n),ki(e,n)}function ki(e,n){var r=le(e.nodes(),function(i){return!n.node(i).parent}),t=Ii(e,r);t=t.slice(1),c(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function ji(e,n,r){return e.hasEdge(n,r)}function Be(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Ai(e){switch(e.graph().ranker){case"network-simplex":Ge(e);break;case"tight-tree":Ri(e);break;case"longest-path":Mi(e);break;default:Ge(e)}}var Mi=be;function Ri(e){be(e),gn(e)}function Ge(e){E(e)}function Si(e){var n=I(e,"root",{},"_root"),r=$i(e),t=O(P(r))-1,i=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(a){e.edge(a).minlen*=i});var o=Fi(e)+1;c(e.children(),function(a){Ln(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Ln(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var f=Se(e,"_bt"),d=Se(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,c(u,function(l){Ln(e,n,r,t,i,o,l);var h=e.node(l),p=h.borderTop?h.borderTop:l,v=h.borderBottom?h.borderBottom:l,w=h.borderTop?t:2*t,_=p!==v?1:i-o[a]+1;e.setEdge(f,p,{weight:w,minlen:_,nestingEdge:!0}),e.setEdge(v,d,{weight:w,minlen:_,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+o[a]})}function $i(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&c(o,function(a){r(a,i+1)}),n[t]=i}return c(e.children(),function(t){r(t,1)}),n}function Fi(e){return W(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Bi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Gi(e,n,r){var t={},i;c(r,function(o){for(var a=e.parent(o),u,f;a;){if(u=e.parent(a),u?(f=t[u],t[u]=a):(f=i,i=a),f&&f!==a){n.setEdge(f,a);return}a=u}})}function Di(e,n,r){var t=Yi(e),i=new x({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return c(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),c(e[r](o),function(f){var d=f.v===o?f.w:f.v,s=i.edge(d,o),l=m(s)?0:s.weight;i.setEdge(d,o,{weight:e.edge(f).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Yi(e){for(var n;e.hasNode(n=pe("_root")););return n}function Vi(e,n){for(var r=0,t=1;t0;)s%2&&(l+=u[s+1]),s=s-1>>1,u[s]+=d.weight;f+=d.weight*l})),f}function Wi(e){var n={},r=M(e.nodes(),function(u){return!e.children(u).length}),t=O(g(r,function(u){return e.node(u).rank})),i=g(L(t+1),function(){return[]});function o(u){if(!hn(n,u)){n[u]=!0;var f=e.node(u);i[f.rank].push(u),c(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return c(a,o),i}function qi(e,n){return g(n,function(r){var t=e.inEdges(r);if(t.length){var i=W(t,function(o,a){var u=e.edge(a),f=e.node(a.v);return{sum:o.sum+u.weight*f.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xi(e,n){var r={};c(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),c(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=M(r,function(i){return!i.indegree});return Hi(t)}function Hi(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Ki(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return g(M(n,function(o){return!o.merged}),function(o){return Y(o,["vs","i","barycenter","weight"])})}function Ki(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function zi(e,n){var r=vi(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),t=r.lhs,i=R(r.rhs,function(s){return-s.i}),o=[],a=0,u=0,f=0;t.sort(Ji(!!n)),f=De(o,i,f),c(t,function(s){f+=s.vs.length,o.push(s.vs),a+=s.barycenter*s.weight,u+=s.weight,f=De(o,i,f)});var d={vs:C(o)};return u&&(d.barycenter=a/u,d.weight=u),d}function De(e,n,r){for(var t;n.length&&(t=D(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ji(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function Nn(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,f={};a&&(i=M(i,function(v){return v!==a&&v!==u}));var d=qi(e,i);c(d,function(v){if(e.children(v.v).length){var w=Nn(e,v.v,r,t);f[v.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&Qi(v,w)}});var s=Xi(d,r);Zi(s,f);var l=zi(s,t);if(a&&(l.vs=C([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+p.order)/(l.weight+2),l.weight+=2}return l}function Zi(e,n){c(e,function(r){r.vs=C(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Qi(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function ea(e){var n=bn(e),r=Ye(e,L(1,n+1),"inEdges"),t=Ye(e,L(n-1,-1,-1),"outEdges"),i=Wi(e);Ve(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,f=0;f<4;++u,++f){na(u%2?r:t,u%4>=2),i=z(e);var d=Vi(e,i);da||u>n[f].lim));for(d=f,f=t;(f=e.parent(f))!==d;)o.push(f);return{path:i.concat(o.reverse()),lca:d}}function ia(e){var n={},r=0;function t(i){var o=r;c(e.children(i),t),n[i]={low:o,lim:r++}}return c(e.children(),t),n}function aa(e,n){var r={};function t(i,o){var a=0,u=0,f=i.length,d=D(o);return c(o,function(s,l){var h=ua(e,s),p=h?e.node(h).order:f;(h||s===d)&&(c(o.slice(u,l+1),function(v){c(e.predecessors(v),function(w){var _=e.node(w),me=_.order;(med)&&Cn(r,h,s)})})}function i(o,a){var u=-1,f,d=0;return c(a,function(s,l){if(e.node(s).dummy==="border"){var h=e.predecessors(s);h.length&&(f=e.node(h[0]).order,t(a,d,l,u,f),d=l,u=f)}t(a,d,a.length,f,o.length)}),a}return W(n,i),r}function ua(e,n){if(e.node(n).dummy)return le(e.predecessors(n),function(r){return e.node(r).dummy})}function Cn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function fa(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function da(e,n,r,t){var i={},o={},a={};return c(n,function(u){c(u,function(f,d){i[f]=f,o[f]=f,a[f]=d})}),c(n,function(u){var f=-1;c(u,function(d){var s=t(d);if(s.length){s=R(s,function(w){return a[w]});for(var l=(s.length-1)/2,h=Math.floor(l),p=Math.ceil(l);h<=p;++h){var v=s[h];o[d]===d&&f{var t=r(" buildLayoutGraph",()=>_a(e));r(" runLayout",()=>ya(t,r)),r(" updateInputGraph",()=>xa(e,t))})}function ya(e,n){n(" makeSpaceForEdgeLabels",()=>ka(e)),n(" removeSelfEdges",()=>Ga(e)),n(" acyclic",()=>fi(e)),n(" nestingGraph.run",()=>Si(e)),n(" rank",()=>Ai(pn(e))),n(" injectEdgeLabelProxies",()=>ja(e)),n(" removeEmptyRanks",()=>hi(e)),n(" nestingGraph.cleanup",()=>Bi(e)),n(" normalizeRanks",()=>li(e)),n(" assignRankMinMax",()=>Aa(e)),n(" removeEdgeLabelProxies",()=>Ma(e)),n(" normalize.run",()=>xi(e)),n(" parentDummyChains",()=>ra(e)),n(" addBorderSegments",()=>bi(e)),n(" order",()=>ea(e)),n(" insertSelfEdges",()=>Da(e)),n(" adjustCoordinateSystem",()=>wi(e)),n(" position",()=>ga(e)),n(" positionSelfEdges",()=>Ya(e)),n(" removeBorderNodes",()=>Ba(e)),n(" normalize.undo",()=>Ei(e)),n(" fixupEdgeLabelCoords",()=>$a(e)),n(" undoCoordinateSystem",()=>gi(e)),n(" translateGraph",()=>Ra(e)),n(" assignNodeIntersects",()=>Sa(e)),n(" reversePoints",()=>Fa(e)),n(" acyclic.undo",()=>si(e))}function xa(e,n){c(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),c(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Oa=["nodesep","edgesep","ranksep","marginx","marginy"],Ea={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ta=["acyclicer","ranker","rankdir","align"],Pa=["width","height"],La={width:0,height:0},Na=["minlen","weight","width","height","labeloffset"],Ca={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ia=["labelpos"];function _a(e){var n=new x({multigraph:!0,compound:!0}),r=ne(e.graph());return n.setGraph(ie({},Ea,ee(r,Oa),Y(r,Ta))),c(e.nodes(),function(t){var i=ne(e.node(t));n.setNode(t,_t(ee(i,Pa),La)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var i=ne(e.edge(t));n.setEdge(t,ie({},Ca,ee(i,Na),Y(i,Ia)))}),n}function ka(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function ja(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};I(e,"edge-proxy",o,"_ep")}})}function Aa(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=O(n,t.maxRank))}),e.graph().maxRank=n}function Ma(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Ra(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function f(d){var s=d.x,l=d.y,h=d.width,p=d.height;n=Math.min(n,s-h/2),r=Math.max(r,s+h/2),t=Math.min(t,l-p/2),i=Math.max(i,l+p/2)}c(e.nodes(),function(d){f(e.node(d))}),c(e.edges(),function(d){var s=e.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&f(s)}),n-=a,t-=u,c(e.nodes(),function(d){var s=e.node(d);s.x-=n,s.y-=t}),c(e.edges(),function(d){var s=e.edge(d);c(s.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Sa(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(Re(t,o)),r.points.push(Re(i,a))})}function $a(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Fa(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ba(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(D(r.borderLeft)),a=e.node(D(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Ga(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Da(e){var n=z(e);c(n,function(r){var t=0;c(r,function(i,o){var a=e.node(i);a.order=o+t,c(a.selfEdges,function(u){I(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Ya(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function ee(e,n){return K(Y(e,n),Number)}function ne(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Ua as l}; +import{bn as B,bo as y,bp as ye,bq as V,br as U,bs as Ue,bt as oe,bu as We,bv as In,bw as qe,bx as _n,by as kn,bz as jn,bA as ue,bB as An,bC as Mn,bD as xe,bE as Oe,bF as fe,bG as de,bH as G,bI as Xe,bJ as He,bK as Rn,bL as T,bM as Sn,bN as $n,bO as Fn,bP as Ee,bQ as Bn,bR as Ke,bS as N,bT as Gn,bU as Dn,bV as Yn,bW as S,bX as ze,bY as Je,bZ as Vn,b_ as se,b$ as Ze,c0 as Un,c1 as Qe,c2 as Wn,c3 as qn,a7 as x,c4 as c,c5 as Xn,c6 as m,c7 as M,c8 as P,c9 as W}from"./mermaid.core-BusHtpbx.js";var Hn=/\s/;function Kn(e){for(var n=e.length;n--&&Hn.test(e.charAt(n)););return n}var zn=/^\s+/;function Jn(e){return e&&e.slice(0,Kn(e)+1).replace(zn,"")}var Te=NaN,Zn=/^[-+]0x[0-9a-f]+$/i,Qn=/^0b[01]+$/i,er=/^0o[0-7]+$/i,nr=parseInt;function rr(e){if(typeof e=="number")return e;if(B(e))return Te;if(y(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=y(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Jn(e);var r=Qn.test(e);return r||er.test(e)?nr(e.slice(2),r?2:8):Zn.test(e)?Te:+e}var Pe=1/0,tr=17976931348623157e292;function $(e){if(!e)return e===0?e:0;if(e=rr(e),e===Pe||e===-Pe){var n=e<0?-1:1;return n*tr}return e===e?e:0}function ir(e){var n=$(e),r=n%1;return n===n?r?n-r:n:0}var Le=Object.create,ar=(function(){function e(){}return function(n){if(!y(n))return{};if(Le)return Le(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function or(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&k(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),n=Object(n);++t2?n[2]:void 0;for(i&&k(n[0],n[1],i)&&(t=1);++r-1?i[o?n[a]:a]:void 0}}var Mt=Math.max;function Rt(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:ir(r);return i<0&&(i=Mt(t+i,0)),Dn(e,N(n),i)}var le=At(Rt);function ln(e,n){var r=-1,t=U(e)?Array(e.length):[];return Yn(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function g(e,n){var r=T(e)?S:ln;return r(e,N(n))}function St(e,n){return e==null?e:Ke(e,ze(n),H)}function $t(e,n){return e&&Je(e,ze(n))}function Ft(e,n){return e>n}var Bt=Object.prototype,Gt=Bt.hasOwnProperty;function Dt(e,n){return e!=null&&Gt.call(e,n)}function hn(e,n){return e!=null&&Vn(e,n,Dt)}function vn(e,n){return en||o&&a&&f&&!u&&!d||t&&a&&f||!r&&f||!i)return 1;if(!t&&!o&&!d&&e=u)return f;var d=r[t];return f*(d=="desc"?-1:1)}}return e.index-n.index}function Xt(e,n,r){n.length?n=S(n,function(o){return T(o)?function(a){return Qe(a,o.length===1?o[0]:o)}:o}):n=[se];var t=-1;n=S(n,de(N));var i=ln(e,function(o,a,u){var f=S(n,function(d){return d(o)});return{criteria:f,index:++t,value:o}});return Ut(i,function(o,a){return qt(o,a,r)})}function Ht(e,n){return Vt(e,n,function(r,t){return Wn(e,t)})}var Y=pr(function(e,n){return e==null?{}:Ht(e,n)}),Kt=Math.ceil,zt=Math.max;function Jt(e,n,r,t){for(var i=-1,o=zt(Kt((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function Zt(e){return function(n,r,t){return t&&typeof t!="number"&&k(n,r,t)&&(r=t=void 0),n=$(n),r===void 0?(r=n,n=0):r=$(r),t=t===void 0?n1&&k(e,n[0],n[1])?n=[]:r>2&&k(n[0],n[1],n[2])&&(n=[n[0]]),Xt(e,qe(n),[])}),Qt=0;function pe(e){var n=++Qt;return qn(e)+n}function ei(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t0;--u)if(a=n[u].dequeue(),a){t=t.concat(J(e,n,r,a,!0));break}}}return t}function J(e,n,r,t,i){var o=i?[]:void 0;return c(e.inEdges(t.v),function(a){var u=e.edge(a),f=e.node(a.v);i&&o.push({v:a.v,w:a.w}),f.out-=u,ae(n,r,f)}),c(e.outEdges(t.v),function(a){var u=e.edge(a),f=a.w,d=e.node(f);d.in-=u,ae(n,r,d)}),e.removeNode(t.v),o}function ui(e,n){var r=new x,t=0,i=0;c(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(e.edges(),function(u){var f=r.edge(u.v,u.w)||0,d=n(u),s=f+d;r.setEdge(u.v,u.w,s),i=Math.max(i,r.node(u.v).out+=d),t=Math.max(t,r.node(u.w).in+=d)});var o=L(i+t+3).map(function(){return new ri}),a=t+1;return c(r.nodes(),function(u){ae(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function ae(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function fi(e){var n=e.graph().acyclicer==="greedy"?ai(e,r(e)):di(e);c(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,pe("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function di(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,c(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return c(e.nodes(),i),n}function si(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function I(e,n,r,t){var i;do i=pe(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function ci(e){var n=new x().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function pn(e){var n=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Re(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var f,d;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),f=u*i/o,d=u):(i<0&&(a=-a),f=a,d=a*o/i),{x:r+f,y:t+d}}function z(e){var n=g(L(bn(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function li(e){var n=j(g(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);hn(t,"rank")&&(t.rank-=n)})}function hi(e){var n=j(g(e.nodes(),function(o){return e.node(o).rank})),r=[];c(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;c(r,function(o,a){m(o)&&a%i!==0?--t:t&&c(o,function(u){e.node(u).rank+=t})})}function Se(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),I(e,"border",i,n)}function bn(e){return O(g(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function vi(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function pi(e,n){return n()}function bi(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;oa.lim&&(u=a,f=!0);var d=M(n.edges(),function(s){return f===Be(e,e.node(s.v),u)&&f!==Be(e,e.node(s.w),u)});return ve(d,function(s){return A(n,s)})}function Pn(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ge(e),we(e,n),ki(e,n)}function ki(e,n){var r=le(e.nodes(),function(i){return!n.node(i).parent}),t=Ii(e,r);t=t.slice(1),c(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function ji(e,n,r){return e.hasEdge(n,r)}function Be(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Ai(e){switch(e.graph().ranker){case"network-simplex":Ge(e);break;case"tight-tree":Ri(e);break;case"longest-path":Mi(e);break;default:Ge(e)}}var Mi=be;function Ri(e){be(e),gn(e)}function Ge(e){E(e)}function Si(e){var n=I(e,"root",{},"_root"),r=$i(e),t=O(P(r))-1,i=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(a){e.edge(a).minlen*=i});var o=Fi(e)+1;c(e.children(),function(a){Ln(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Ln(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var f=Se(e,"_bt"),d=Se(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,c(u,function(l){Ln(e,n,r,t,i,o,l);var h=e.node(l),p=h.borderTop?h.borderTop:l,v=h.borderBottom?h.borderBottom:l,w=h.borderTop?t:2*t,_=p!==v?1:i-o[a]+1;e.setEdge(f,p,{weight:w,minlen:_,nestingEdge:!0}),e.setEdge(v,d,{weight:w,minlen:_,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+o[a]})}function $i(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&c(o,function(a){r(a,i+1)}),n[t]=i}return c(e.children(),function(t){r(t,1)}),n}function Fi(e){return W(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Bi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Gi(e,n,r){var t={},i;c(r,function(o){for(var a=e.parent(o),u,f;a;){if(u=e.parent(a),u?(f=t[u],t[u]=a):(f=i,i=a),f&&f!==a){n.setEdge(f,a);return}a=u}})}function Di(e,n,r){var t=Yi(e),i=new x({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return c(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),c(e[r](o),function(f){var d=f.v===o?f.w:f.v,s=i.edge(d,o),l=m(s)?0:s.weight;i.setEdge(d,o,{weight:e.edge(f).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Yi(e){for(var n;e.hasNode(n=pe("_root")););return n}function Vi(e,n){for(var r=0,t=1;t0;)s%2&&(l+=u[s+1]),s=s-1>>1,u[s]+=d.weight;f+=d.weight*l})),f}function Wi(e){var n={},r=M(e.nodes(),function(u){return!e.children(u).length}),t=O(g(r,function(u){return e.node(u).rank})),i=g(L(t+1),function(){return[]});function o(u){if(!hn(n,u)){n[u]=!0;var f=e.node(u);i[f.rank].push(u),c(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return c(a,o),i}function qi(e,n){return g(n,function(r){var t=e.inEdges(r);if(t.length){var i=W(t,function(o,a){var u=e.edge(a),f=e.node(a.v);return{sum:o.sum+u.weight*f.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xi(e,n){var r={};c(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),c(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=M(r,function(i){return!i.indegree});return Hi(t)}function Hi(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Ki(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return g(M(n,function(o){return!o.merged}),function(o){return Y(o,["vs","i","barycenter","weight"])})}function Ki(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function zi(e,n){var r=vi(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),t=r.lhs,i=R(r.rhs,function(s){return-s.i}),o=[],a=0,u=0,f=0;t.sort(Ji(!!n)),f=De(o,i,f),c(t,function(s){f+=s.vs.length,o.push(s.vs),a+=s.barycenter*s.weight,u+=s.weight,f=De(o,i,f)});var d={vs:C(o)};return u&&(d.barycenter=a/u,d.weight=u),d}function De(e,n,r){for(var t;n.length&&(t=D(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ji(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function Nn(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,f={};a&&(i=M(i,function(v){return v!==a&&v!==u}));var d=qi(e,i);c(d,function(v){if(e.children(v.v).length){var w=Nn(e,v.v,r,t);f[v.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&Qi(v,w)}});var s=Xi(d,r);Zi(s,f);var l=zi(s,t);if(a&&(l.vs=C([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+p.order)/(l.weight+2),l.weight+=2}return l}function Zi(e,n){c(e,function(r){r.vs=C(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Qi(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function ea(e){var n=bn(e),r=Ye(e,L(1,n+1),"inEdges"),t=Ye(e,L(n-1,-1,-1),"outEdges"),i=Wi(e);Ve(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,f=0;f<4;++u,++f){na(u%2?r:t,u%4>=2),i=z(e);var d=Vi(e,i);da||u>n[f].lim));for(d=f,f=t;(f=e.parent(f))!==d;)o.push(f);return{path:i.concat(o.reverse()),lca:d}}function ia(e){var n={},r=0;function t(i){var o=r;c(e.children(i),t),n[i]={low:o,lim:r++}}return c(e.children(),t),n}function aa(e,n){var r={};function t(i,o){var a=0,u=0,f=i.length,d=D(o);return c(o,function(s,l){var h=ua(e,s),p=h?e.node(h).order:f;(h||s===d)&&(c(o.slice(u,l+1),function(v){c(e.predecessors(v),function(w){var _=e.node(w),me=_.order;(med)&&Cn(r,h,s)})})}function i(o,a){var u=-1,f,d=0;return c(a,function(s,l){if(e.node(s).dummy==="border"){var h=e.predecessors(s);h.length&&(f=e.node(h[0]).order,t(a,d,l,u,f),d=l,u=f)}t(a,d,a.length,f,o.length)}),a}return W(n,i),r}function ua(e,n){if(e.node(n).dummy)return le(e.predecessors(n),function(r){return e.node(r).dummy})}function Cn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function fa(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function da(e,n,r,t){var i={},o={},a={};return c(n,function(u){c(u,function(f,d){i[f]=f,o[f]=f,a[f]=d})}),c(n,function(u){var f=-1;c(u,function(d){var s=t(d);if(s.length){s=R(s,function(w){return a[w]});for(var l=(s.length-1)/2,h=Math.floor(l),p=Math.ceil(l);h<=p;++h){var v=s[h];o[d]===d&&f{var t=r(" buildLayoutGraph",()=>_a(e));r(" runLayout",()=>ya(t,r)),r(" updateInputGraph",()=>xa(e,t))})}function ya(e,n){n(" makeSpaceForEdgeLabels",()=>ka(e)),n(" removeSelfEdges",()=>Ga(e)),n(" acyclic",()=>fi(e)),n(" nestingGraph.run",()=>Si(e)),n(" rank",()=>Ai(pn(e))),n(" injectEdgeLabelProxies",()=>ja(e)),n(" removeEmptyRanks",()=>hi(e)),n(" nestingGraph.cleanup",()=>Bi(e)),n(" normalizeRanks",()=>li(e)),n(" assignRankMinMax",()=>Aa(e)),n(" removeEdgeLabelProxies",()=>Ma(e)),n(" normalize.run",()=>xi(e)),n(" parentDummyChains",()=>ra(e)),n(" addBorderSegments",()=>bi(e)),n(" order",()=>ea(e)),n(" insertSelfEdges",()=>Da(e)),n(" adjustCoordinateSystem",()=>wi(e)),n(" position",()=>ga(e)),n(" positionSelfEdges",()=>Ya(e)),n(" removeBorderNodes",()=>Ba(e)),n(" normalize.undo",()=>Ei(e)),n(" fixupEdgeLabelCoords",()=>$a(e)),n(" undoCoordinateSystem",()=>gi(e)),n(" translateGraph",()=>Ra(e)),n(" assignNodeIntersects",()=>Sa(e)),n(" reversePoints",()=>Fa(e)),n(" acyclic.undo",()=>si(e))}function xa(e,n){c(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),c(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Oa=["nodesep","edgesep","ranksep","marginx","marginy"],Ea={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ta=["acyclicer","ranker","rankdir","align"],Pa=["width","height"],La={width:0,height:0},Na=["minlen","weight","width","height","labeloffset"],Ca={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ia=["labelpos"];function _a(e){var n=new x({multigraph:!0,compound:!0}),r=ne(e.graph());return n.setGraph(ie({},Ea,ee(r,Oa),Y(r,Ta))),c(e.nodes(),function(t){var i=ne(e.node(t));n.setNode(t,_t(ee(i,Pa),La)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var i=ne(e.edge(t));n.setEdge(t,ie({},Ca,ee(i,Na),Y(i,Ia)))}),n}function ka(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function ja(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};I(e,"edge-proxy",o,"_ep")}})}function Aa(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=O(n,t.maxRank))}),e.graph().maxRank=n}function Ma(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Ra(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function f(d){var s=d.x,l=d.y,h=d.width,p=d.height;n=Math.min(n,s-h/2),r=Math.max(r,s+h/2),t=Math.min(t,l-p/2),i=Math.max(i,l+p/2)}c(e.nodes(),function(d){f(e.node(d))}),c(e.edges(),function(d){var s=e.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&f(s)}),n-=a,t-=u,c(e.nodes(),function(d){var s=e.node(d);s.x-=n,s.y-=t}),c(e.edges(),function(d){var s=e.edge(d);c(s.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Sa(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(Re(t,o)),r.points.push(Re(i,a))})}function $a(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Fa(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ba(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(D(r.borderLeft)),a=e.node(D(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Ga(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Da(e){var n=z(e);c(n,function(r){var t=0;c(r,function(i,o){var a=e.node(i);a.order=o+t,c(a.selfEdges,function(u){I(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Ya(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function ee(e,n){return K(Y(e,n),Number)}function ne(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Ua as l}; diff --git a/apps/pythinker-code/dist-web/assets/linear-DehXFnHz.js b/apps/pythinker-code/dist-web/assets/linear-Be-oTS5b.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/linear-DehXFnHz.js rename to apps/pythinker-code/dist-web/assets/linear-Be-oTS5b.js index 7ca26541c..d15b0383a 100644 --- a/apps/pythinker-code/dist-web/assets/linear-DehXFnHz.js +++ b/apps/pythinker-code/dist-web/assets/linear-Be-oTS5b.js @@ -1 +1 @@ -import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-BgUXBQ9g.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; +import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-BusHtpbx.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; diff --git a/apps/pythinker-code/dist-web/assets/liquid-D7rm-Mjg.js b/apps/pythinker-code/dist-web/assets/liquid-OhilcA0U.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/liquid-D7rm-Mjg.js rename to apps/pythinker-code/dist-web/assets/liquid-OhilcA0U.js index c66c3555f..61f7112e1 100644 --- a/apps/pythinker-code/dist-web/assets/liquid-D7rm-Mjg.js +++ b/apps/pythinker-code/dist-web/assets/liquid-OhilcA0U.js @@ -1 +1 @@ -import{l as e}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},l={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{r as conf,l as language}; +import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},l={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{r as conf,l as language}; diff --git a/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-jno-S5XZ.js b/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-Dzr62Jjp.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/lspLanguageFeatures-jno-S5XZ.js rename to apps/pythinker-code/dist-web/assets/lspLanguageFeatures-Dzr62Jjp.js index 04b5cf415..e3acdc454 100644 --- a/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-jno-S5XZ.js +++ b/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-Dzr62Jjp.js @@ -1,4 +1,4 @@ -import{R as Ge,l as x,e as w,U as Je,M as R}from"./editor.main-BVyazG_A.js";var T;(function(e){function n(i){return typeof i=="string"}e.is=n})(T||(T={}));var O;(function(e){function n(i){return typeof i=="string"}e.is=n})(O||(O={}));var K;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(K||(K={}));var j;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(j||(j={}));var _;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=j.MAX_VALUE),t===Number.MAX_VALUE&&(t=j.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&o.uinteger(t.line)&&o.uinteger(t.character)}e.is=i})(_||(_={}));var h;(function(e){function n(r,t,a,u){if(o.uinteger(r)&&o.uinteger(t)&&o.uinteger(a)&&o.uinteger(u))return{start:_.create(r,t),end:_.create(a,u)};if(_.is(r)&&_.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${a}, ${u}]`)}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&_.is(t.start)&&_.is(t.end)}e.is=i})(h||(h={}));var N;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(o.string(t.uri)||o.undefined(t.uri))}e.is=i})(N||(N={}));var ee;(function(e){function n(r,t,a,u){return{targetUri:r,targetRange:t,targetSelectionRange:a,originSelectionRange:u}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.targetRange)&&o.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||o.undefined(t.originSelectionRange))}e.is=i})(ee||(ee={}));var S;(function(e){function n(r,t,a,u){return{red:r,green:t,blue:a,alpha:u}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.numberRange(t.red,0,1)&&o.numberRange(t.green,0,1)&&o.numberRange(t.blue,0,1)&&o.numberRange(t.alpha,0,1)}e.is=i})(S||(S={}));var te;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&h.is(t.range)&&S.is(t.color)}e.is=i})(te||(te={}));var ne;(function(e){function n(r,t,a){return{label:r,textEdit:t,additionalTextEdits:a}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.undefined(t.textEdit)||L.is(t))&&(o.undefined(t.additionalTextEdits)||o.typedArray(t.additionalTextEdits,L.is))}e.is=i})(ne||(ne={}));var M;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(M||(M={}));var re;(function(e){function n(r,t,a,u,s,f){const l={startLine:r,endLine:t};return o.defined(a)&&(l.startCharacter=a),o.defined(u)&&(l.endCharacter=u),o.defined(s)&&(l.kind=s),o.defined(f)&&(l.collapsedText=f),l}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.uinteger(t.startLine)&&o.uinteger(t.startLine)&&(o.undefined(t.startCharacter)||o.uinteger(t.startCharacter))&&(o.undefined(t.endCharacter)||o.uinteger(t.endCharacter))&&(o.undefined(t.kind)||o.string(t.kind))}e.is=i})(re||(re={}));var H;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&N.is(t.location)&&o.string(t.message)}e.is=i})(H||(H={}));var A;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(A||(A={}));var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||(ie={}));var ae;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&o.string(r.href)}e.is=n})(ae||(ae={}));var P;(function(e){function n(r,t,a,u,s,f){let l={range:r,message:t};return o.defined(a)&&(l.severity=a),o.defined(u)&&(l.code=u),o.defined(s)&&(l.source=s),o.defined(f)&&(l.relatedInformation=f),l}e.create=n;function i(r){var t;let a=r;return o.defined(a)&&h.is(a.range)&&o.string(a.message)&&(o.number(a.severity)||o.undefined(a.severity))&&(o.integer(a.code)||o.string(a.code)||o.undefined(a.code))&&(o.undefined(a.codeDescription)||o.string((t=a.codeDescription)===null||t===void 0?void 0:t.href))&&(o.string(a.source)||o.undefined(a.source))&&(o.undefined(a.relatedInformation)||o.typedArray(a.relatedInformation,H.is))}e.is=i})(P||(P={}));var E;(function(e){function n(r,t,...a){let u={title:r,command:t};return o.defined(a)&&a.length>0&&(u.arguments=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.title)&&o.string(t.command)}e.is=i})(E||(E={}));var L;(function(e){function n(a,u){return{range:a,newText:u}}e.replace=n;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const u=a;return o.objectLiteral(u)&&o.string(u.newText)&&h.is(u.range)}e.is=t})(L||(L={}));var W;(function(e){function n(r,t,a){const u={label:r};return t!==void 0&&(u.needsConfirmation=t),a!==void 0&&(u.description=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(o.string(t.description)||t.description===void 0)}e.is=i})(W||(W={}));var I;(function(e){function n(i){const r=i;return o.string(r)}e.is=n})(I||(I={}));var oe;(function(e){function n(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=n;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function t(a){const u=a;return L.is(u)&&(W.is(u.annotationId)||I.is(u.annotationId))}e.is=t})(oe||(oe={}));var X;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,a){let u={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&o.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(r,t,a,u){let s={kind:"rename",oldUri:r,newUri:t};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&o.string(t.oldUri)&&o.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(z||(z={}));var B;(function(e){function n(r,t,a){let u={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&o.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||o.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||o.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(B||(B={}));var q;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>o.string(t.kind)?$.is(t)||z.is(t)||B.is(t):X.is(t)))}e.is=n})(q||(q={}));var ue;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)}e.is=i})(ue||(ue={}));var se;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.integer(t.version)}e.is=i})(se||(se={}));var Q;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&(t.version===null||o.integer(t.version))}e.is=i})(Q||(Q={}));var ce;(function(e){function n(r,t,a,u){return{uri:r,languageId:t,version:a,text:u}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.string(t.languageId)&&o.integer(t.version)&&o.string(t.text)}e.is=i})(ce||(ce={}));var G;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(G||(G={}));var F;(function(e){function n(i){const r=i;return o.objectLiteral(i)&&G.is(r.kind)&&o.string(r.value)}e.is=n})(F||(F={}));var p;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(p||(p={}));var J;(function(e){e.PlainText=1,e.Snippet=2})(J||(J={}));var de;(function(e){e.Deprecated=1})(de||(de={}));var fe;(function(e){function n(r,t,a){return{newText:r,insert:t,replace:a}}e.create=n;function i(r){const t=r;return t&&o.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(fe||(fe={}));var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||(le={}));var ge;(function(e){function n(i){const r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=n})(ge||(ge={}));var he;(function(e){function n(i){return{label:i}}e.create=n})(he||(he={}));var pe;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(pe||(pe={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return o.string(t)||o.objectLiteral(t)&&o.string(t.language)&&o.string(t.value)}e.is=i})(y||(y={}));var me;(function(e){function n(i){let r=i;return!!r&&o.objectLiteral(r)&&(F.is(r.contents)||y.is(r.contents)||o.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(me||(me={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var be;(function(e){function n(i,r,...t){let a={label:i};return o.defined(r)&&(a.documentation=r),o.defined(t)?a.parameters=t:a.parameters=[],a}e.create=n})(be||(be={}));var D;(function(e){e.Text=1,e.Read=2,e.Write=3})(D||(D={}));var _e;(function(e){function n(i,r){let t={range:i};return o.number(r)&&(t.kind=r),t}e.create=n})(_e||(_e={}));var m;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(m||(m={}));var xe;(function(e){e.Deprecated=1})(xe||(xe={}));var we;(function(e){function n(i,r,t,a,u){let s={name:i,kind:r,location:{uri:a,range:t}};return u&&(s.containerName=u),s}e.create=n})(we||(we={}));var ke;(function(e){function n(i,r,t,a){return a!==void 0?{name:i,kind:r,location:{uri:t,range:a}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(ke||(ke={}));var Ae;(function(e){function n(r,t,a,u,s,f){let l={name:r,detail:t,kind:a,range:u,selectionRange:s};return f!==void 0&&(l.children=f),l}e.create=n;function i(r){let t=r;return t&&o.string(t.name)&&o.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||o.string(t.detail))&&(t.deprecated===void 0||o.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Ae||(Ae={}));var Ee;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Ee||(Ee={}));var V;(function(e){e.Invoked=1,e.Automatic=2})(V||(V={}));var Le;(function(e){function n(r,t,a){let u={diagnostics:r};return t!=null&&(u.only=t),a!=null&&(u.triggerKind=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.typedArray(t.diagnostics,P.is)&&(t.only===void 0||o.typedArray(t.only,o.string))&&(t.triggerKind===void 0||t.triggerKind===V.Invoked||t.triggerKind===V.Automatic)}e.is=i})(Le||(Le={}));var Ie;(function(e){function n(r,t,a){let u={title:r},s=!0;return typeof t=="string"?(s=!1,u.kind=t):E.is(t)?u.command=t:u.edit=t,s&&a!==void 0&&(u.kind=a),u}e.create=n;function i(r){let t=r;return t&&o.string(t.title)&&(t.diagnostics===void 0||o.typedArray(t.diagnostics,P.is))&&(t.kind===void 0||o.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||E.is(t.command))&&(t.isPreferred===void 0||o.boolean(t.isPreferred))&&(t.edit===void 0||q.is(t.edit))}e.is=i})(Ie||(Ie={}));var Re;(function(e){function n(r,t){let a={range:r};return o.defined(t)&&(a.data=t),a}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.command)||E.is(t.command))}e.is=i})(Re||(Re={}));var Me;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.uinteger(t.tabSize)&&o.boolean(t.insertSpaces)}e.is=i})(Me||(Me={}));var De;(function(e){function n(r,t,a){return{range:r,target:t,data:a}}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.target)||o.string(t.target))}e.is=i})(De||(De={}));var Fe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Fe||(Fe={}));var Ce;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Ce||(Ce={}));var je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(je||(je={}));var Ne;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ne||(Ne={}));var Pe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.string(t.text)}e.is=i})(Pe||(Pe={}));var ye;(function(e){function n(r,t,a){return{range:r,variableName:t,caseSensitiveLookup:a}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.boolean(t.caseSensitiveLookup)&&(o.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var Ve;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(o.string(t.expression)||t.expression===void 0)}e.is=i})(Ve||(Ve={}));var Ue;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return o.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ue||(Ue={}));var Y;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(Y||(Y={}));var Z;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.location===void 0||N.is(t.location))&&(t.command===void 0||E.is(t.command))}e.is=i})(Z||(Z={}));var Oe;(function(e){function n(r,t,a){const u={position:r,label:t};return a!==void 0&&(u.kind=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&_.is(t.position)&&(o.string(t.label)||o.typedArray(t.label,Z.is))&&(t.kind===void 0||Y.is(t.kind))&&t.textEdits===void 0||o.typedArray(t.textEdits,L.is)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.paddingLeft===void 0||o.boolean(t.paddingLeft))&&(t.paddingRight===void 0||o.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var He;(function(e){function n(i,r,t,a){return{insertText:i,filterText:r,range:t,command:a}}e.create=n})(He||(He={}));var We;(function(e){function n(i){return{items:i}}e.create=n})(We||(We={}));var Xe;(function(e){e.Invoked=0,e.Automatic=1})(Xe||(Xe={}));var $e;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})($e||($e={}));var ze;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(ze||(ze={}));var Be;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&O.is(r.uri)&&o.string(r.name)}e.is=n})(Be||(Be={}));var qe;(function(e){function n(a,u,s,f){return new nt(a,u,s,f)}e.create=n;function i(a){let u=a;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}e.is=i;function r(a,u){let s=a.getText(),f=t(u,(d,g)=>{let b=d.range.start.line-g.range.start.line;return b===0?d.range.start.character-g.range.start.character:b}),l=s.length;for(let d=f.length-1;d>=0;d--){let g=f[d],b=a.offsetAt(g.range.start),c=a.offsetAt(g.range.end);if(c<=l)s=s.substring(0,b)+g.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}e.applyEdits=r;function t(a,u){if(a.length<=1)return a;const s=a.length/2|0,f=a.slice(0,s),l=a.slice(s);t(f,u),t(l,u);let d=0,g=0,b=0;for(;d0&&(u.arguments=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.title)&&o.string(t.command)}e.is=i})(E||(E={}));var L;(function(e){function n(a,u){return{range:a,newText:u}}e.replace=n;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const u=a;return o.objectLiteral(u)&&o.string(u.newText)&&h.is(u.range)}e.is=t})(L||(L={}));var W;(function(e){function n(r,t,a){const u={label:r};return t!==void 0&&(u.needsConfirmation=t),a!==void 0&&(u.description=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(o.string(t.description)||t.description===void 0)}e.is=i})(W||(W={}));var I;(function(e){function n(i){const r=i;return o.string(r)}e.is=n})(I||(I={}));var oe;(function(e){function n(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=n;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function t(a){const u=a;return L.is(u)&&(W.is(u.annotationId)||I.is(u.annotationId))}e.is=t})(oe||(oe={}));var X;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,a){let u={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&o.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(r,t,a,u){let s={kind:"rename",oldUri:r,newUri:t};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&o.string(t.oldUri)&&o.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(z||(z={}));var B;(function(e){function n(r,t,a){let u={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&o.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||o.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||o.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(B||(B={}));var q;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>o.string(t.kind)?$.is(t)||z.is(t)||B.is(t):X.is(t)))}e.is=n})(q||(q={}));var ue;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)}e.is=i})(ue||(ue={}));var se;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.integer(t.version)}e.is=i})(se||(se={}));var Q;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&(t.version===null||o.integer(t.version))}e.is=i})(Q||(Q={}));var ce;(function(e){function n(r,t,a,u){return{uri:r,languageId:t,version:a,text:u}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.string(t.languageId)&&o.integer(t.version)&&o.string(t.text)}e.is=i})(ce||(ce={}));var G;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(G||(G={}));var F;(function(e){function n(i){const r=i;return o.objectLiteral(i)&&G.is(r.kind)&&o.string(r.value)}e.is=n})(F||(F={}));var p;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(p||(p={}));var J;(function(e){e.PlainText=1,e.Snippet=2})(J||(J={}));var de;(function(e){e.Deprecated=1})(de||(de={}));var fe;(function(e){function n(r,t,a){return{newText:r,insert:t,replace:a}}e.create=n;function i(r){const t=r;return t&&o.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(fe||(fe={}));var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||(le={}));var ge;(function(e){function n(i){const r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=n})(ge||(ge={}));var he;(function(e){function n(i){return{label:i}}e.create=n})(he||(he={}));var pe;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(pe||(pe={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return o.string(t)||o.objectLiteral(t)&&o.string(t.language)&&o.string(t.value)}e.is=i})(y||(y={}));var me;(function(e){function n(i){let r=i;return!!r&&o.objectLiteral(r)&&(F.is(r.contents)||y.is(r.contents)||o.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(me||(me={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var be;(function(e){function n(i,r,...t){let a={label:i};return o.defined(r)&&(a.documentation=r),o.defined(t)?a.parameters=t:a.parameters=[],a}e.create=n})(be||(be={}));var D;(function(e){e.Text=1,e.Read=2,e.Write=3})(D||(D={}));var _e;(function(e){function n(i,r){let t={range:i};return o.number(r)&&(t.kind=r),t}e.create=n})(_e||(_e={}));var m;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(m||(m={}));var xe;(function(e){e.Deprecated=1})(xe||(xe={}));var we;(function(e){function n(i,r,t,a,u){let s={name:i,kind:r,location:{uri:a,range:t}};return u&&(s.containerName=u),s}e.create=n})(we||(we={}));var ke;(function(e){function n(i,r,t,a){return a!==void 0?{name:i,kind:r,location:{uri:t,range:a}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(ke||(ke={}));var Ae;(function(e){function n(r,t,a,u,s,f){let l={name:r,detail:t,kind:a,range:u,selectionRange:s};return f!==void 0&&(l.children=f),l}e.create=n;function i(r){let t=r;return t&&o.string(t.name)&&o.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||o.string(t.detail))&&(t.deprecated===void 0||o.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Ae||(Ae={}));var Ee;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Ee||(Ee={}));var V;(function(e){e.Invoked=1,e.Automatic=2})(V||(V={}));var Le;(function(e){function n(r,t,a){let u={diagnostics:r};return t!=null&&(u.only=t),a!=null&&(u.triggerKind=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.typedArray(t.diagnostics,P.is)&&(t.only===void 0||o.typedArray(t.only,o.string))&&(t.triggerKind===void 0||t.triggerKind===V.Invoked||t.triggerKind===V.Automatic)}e.is=i})(Le||(Le={}));var Ie;(function(e){function n(r,t,a){let u={title:r},s=!0;return typeof t=="string"?(s=!1,u.kind=t):E.is(t)?u.command=t:u.edit=t,s&&a!==void 0&&(u.kind=a),u}e.create=n;function i(r){let t=r;return t&&o.string(t.title)&&(t.diagnostics===void 0||o.typedArray(t.diagnostics,P.is))&&(t.kind===void 0||o.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||E.is(t.command))&&(t.isPreferred===void 0||o.boolean(t.isPreferred))&&(t.edit===void 0||q.is(t.edit))}e.is=i})(Ie||(Ie={}));var Re;(function(e){function n(r,t){let a={range:r};return o.defined(t)&&(a.data=t),a}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.command)||E.is(t.command))}e.is=i})(Re||(Re={}));var Me;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.uinteger(t.tabSize)&&o.boolean(t.insertSpaces)}e.is=i})(Me||(Me={}));var De;(function(e){function n(r,t,a){return{range:r,target:t,data:a}}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.target)||o.string(t.target))}e.is=i})(De||(De={}));var Fe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Fe||(Fe={}));var Ce;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Ce||(Ce={}));var je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(je||(je={}));var Ne;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ne||(Ne={}));var Pe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.string(t.text)}e.is=i})(Pe||(Pe={}));var ye;(function(e){function n(r,t,a){return{range:r,variableName:t,caseSensitiveLookup:a}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.boolean(t.caseSensitiveLookup)&&(o.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var Ve;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(o.string(t.expression)||t.expression===void 0)}e.is=i})(Ve||(Ve={}));var Ue;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return o.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ue||(Ue={}));var Y;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(Y||(Y={}));var Z;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.location===void 0||N.is(t.location))&&(t.command===void 0||E.is(t.command))}e.is=i})(Z||(Z={}));var Oe;(function(e){function n(r,t,a){const u={position:r,label:t};return a!==void 0&&(u.kind=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&_.is(t.position)&&(o.string(t.label)||o.typedArray(t.label,Z.is))&&(t.kind===void 0||Y.is(t.kind))&&t.textEdits===void 0||o.typedArray(t.textEdits,L.is)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.paddingLeft===void 0||o.boolean(t.paddingLeft))&&(t.paddingRight===void 0||o.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var He;(function(e){function n(i,r,t,a){return{insertText:i,filterText:r,range:t,command:a}}e.create=n})(He||(He={}));var We;(function(e){function n(i){return{items:i}}e.create=n})(We||(We={}));var Xe;(function(e){e.Invoked=0,e.Automatic=1})(Xe||(Xe={}));var $e;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})($e||($e={}));var ze;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(ze||(ze={}));var Be;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&O.is(r.uri)&&o.string(r.name)}e.is=n})(Be||(Be={}));var qe;(function(e){function n(a,u,s,f){return new nt(a,u,s,f)}e.create=n;function i(a){let u=a;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}e.is=i;function r(a,u){let s=a.getText(),f=t(u,(d,g)=>{let b=d.range.start.line-g.range.start.line;return b===0?d.range.start.character-g.range.start.character:b}),l=s.length;for(let d=f.length-1;d>=0;d--){let g=f[d],b=a.offsetAt(g.range.start),c=a.offsetAt(g.range.end);if(c<=l)s=s.substring(0,b)+g.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}e.applyEdits=r;function t(a,u){if(a.length<=1)return a;const s=a.length/2|0,f=a.slice(0,s),l=a.slice(s);t(f,u),t(l,u);let d=0,g=0,b=0;for(;d0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets}positionAt(n){n=Math.max(Math.min(n,this._content.length),0);let i=this.getLineOffsets(),r=0,t=i.length;if(t===0)return _.create(0,n);for(;rn?t=u:r=u+1}let a=r-1;return _.create(a,n-i[a])}offsetAt(n){let i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;let r=i[n.line],t=n.line+1"u"}e.undefined=r;function t(c){return c===!0||c===!1}e.boolean=t;function a(c){return n.call(c)==="[object String]"}e.string=a;function u(c){return n.call(c)==="[object Number]"}e.number=u;function s(c,U,tt){return n.call(c)==="[object Number]"&&U<=c&&c<=tt}e.numberRange=s;function f(c){return n.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}e.integer=f;function l(c){return n.call(c)==="[object Number]"&&0<=c&&c<=2147483647}e.uinteger=l;function d(c){return n.call(c)==="[object Function]"}e.func=d;function g(c){return c!==null&&typeof c=="object"}e.objectLiteral=g;function b(c,U){return Array.isArray(c)&&c.every(U)}e.typedArray=b})(o||(o={}));class pt{constructor(n,i,r){this._languageId=n,this._worker=i,this._disposables=[],this._listener=Object.create(null);const t=u=>{let s=u.getLanguageId();if(s!==this._languageId)return;let f;this._listener[u.uri.toString()]=u.onDidChangeContent(()=>{window.clearTimeout(f),f=window.setTimeout(()=>this._doValidate(u.uri,s),500)}),this._doValidate(u.uri,s)},a=u=>{w.setModelMarkers(u,this._languageId,[]);let s=u.uri.toString(),f=this._listener[s];f&&(f.dispose(),delete this._listener[s])};this._disposables.push(w.onDidCreateModel(t)),this._disposables.push(w.onWillDisposeModel(a)),this._disposables.push(w.onDidChangeModelLanguage(u=>{a(u.model),t(u.model)})),this._disposables.push(r(u=>{w.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(a(s),t(s))})})),this._disposables.push({dispose:()=>{w.getModels().forEach(a);for(let u in this._listener)this._listener[u].dispose()}}),w.getModels().forEach(t)}dispose(){this._disposables.forEach(n=>n&&n.dispose()),this._disposables.length=0}_doValidate(n,i){this._worker(n).then(r=>r.doValidation(n.toString())).then(r=>{const t=r.map(u=>it(n,u));let a=w.getModel(n);a&&a.getLanguageId()===i&&w.setModelMarkers(a,i,t)}).then(void 0,r=>{console.error(r)})}}function rt(e){switch(e){case A.Error:return R.Error;case A.Warning:return R.Warning;case A.Information:return R.Info;case A.Hint:return R.Hint;default:return R.Info}}function it(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:rt(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}class mt{constructor(n,i){this._worker=n,this._triggerCharacters=i}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doComplete(a.toString(),k(i))).then(u=>{if(!u)return;const s=n.getWordUntilPosition(i),f=new Ge(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=u.items.map(d=>{const g={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:ut(d.command),range:f,kind:ot(d.kind)};return d.textEdit&&(at(d.textEdit)?g.range={insert:v(d.textEdit.insert),replace:v(d.textEdit.replace)}:g.range=v(d.textEdit.range),g.insertText=d.textEdit.newText),d.additionalTextEdits&&(g.additionalTextEdits=d.additionalTextEdits.map(C)),d.insertTextFormat===J.Snippet&&(g.insertTextRules=x.CompletionItemInsertTextRule.InsertAsSnippet),g});return{isIncomplete:u.isIncomplete,suggestions:l}})}}function k(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function Ye(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function v(e){if(e)return new Ge(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function at(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function ot(e){const n=x.CompletionItemKind;switch(e){case p.Text:return n.Text;case p.Method:return n.Method;case p.Function:return n.Function;case p.Constructor:return n.Constructor;case p.Field:return n.Field;case p.Variable:return n.Variable;case p.Class:return n.Class;case p.Interface:return n.Interface;case p.Module:return n.Module;case p.Property:return n.Property;case p.Unit:return n.Unit;case p.Value:return n.Value;case p.Enum:return n.Enum;case p.Keyword:return n.Keyword;case p.Snippet:return n.Snippet;case p.Color:return n.Color;case p.File:return n.File;case p.Reference:return n.Reference}return n.Property}function C(e){if(e)return{range:v(e.range),text:e.newText}}function ut(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}class vt{constructor(n){this._worker=n}provideHover(n,i,r){let t=n.uri;return this._worker(t).then(a=>a.doHover(t.toString(),k(i))).then(a=>{if(a)return{range:v(a.range),contents:ct(a.contents)}})}}function st(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Qe(e){return typeof e=="string"?{value:e}:st(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function ct(e){if(e)return Array.isArray(e)?e.map(Qe):[Qe(e)]}class bt{constructor(n){this._worker=n}provideDocumentHighlights(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDocumentHighlights(t.toString(),k(i))).then(a=>{if(a)return a.map(u=>({range:v(u.range),kind:dt(u.kind)}))})}}function dt(e){switch(e){case D.Read:return x.DocumentHighlightKind.Read;case D.Write:return x.DocumentHighlightKind.Write;case D.Text:return x.DocumentHighlightKind.Text}return x.DocumentHighlightKind.Text}class _t{constructor(n){this._worker=n}provideDefinition(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDefinition(t.toString(),k(i))).then(a=>{if(a)return[Ze(a)]})}}function Ze(e){return{uri:Je.parse(e.uri),range:v(e.range)}}class xt{constructor(n){this._worker=n}provideReferences(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.findReferences(a.toString(),k(i))).then(u=>{if(u)return u.map(Ze)})}}class wt{constructor(n){this._worker=n}provideRenameEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doRename(a.toString(),k(i),r)).then(u=>ft(u))}}function ft(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=Je.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:v(t.range),text:t.newText}})}return{edits:n}}class kt{constructor(n){this._worker=n}provideDocumentSymbols(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentSymbols(r.toString())).then(t=>{if(t)return t.map(a=>lt(a)?Te(a):{name:a.name,detail:"",containerName:a.containerName,kind:Ke(a.kind),range:v(a.location.range),selectionRange:v(a.location.range),tags:[]})})}}function lt(e){return"children"in e}function Te(e){return{name:e.name,detail:e.detail??"",kind:Ke(e.kind),range:v(e.range),selectionRange:v(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(n=>Te(n))}}function Ke(e){let n=x.SymbolKind;switch(e){case m.File:return n.File;case m.Module:return n.Module;case m.Namespace:return n.Namespace;case m.Package:return n.Package;case m.Class:return n.Class;case m.Method:return n.Method;case m.Property:return n.Property;case m.Field:return n.Field;case m.Constructor:return n.Constructor;case m.Enum:return n.Enum;case m.Interface:return n.Interface;case m.Function:return n.Function;case m.Variable:return n.Variable;case m.Constant:return n.Constant;case m.String:return n.String;case m.Number:return n.Number;case m.Boolean:return n.Boolean;case m.Array:return n.Array}return n.Function}class At{constructor(n){this._worker=n}provideLinks(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentLinks(r.toString())).then(t=>{if(t)return{links:t.map(a=>({range:v(a.range),url:a.target}))}})}}class Et{constructor(n){this._worker=n}provideDocumentFormattingEdits(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.format(t.toString(),null,et(i)).then(u=>{if(!(!u||u.length===0))return u.map(C)}))}}class Lt{constructor(n){this._worker=n,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.format(a.toString(),Ye(i),et(r)).then(s=>{if(!(!s||s.length===0))return s.map(C)}))}}function et(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}class It{constructor(n){this._worker=n}provideDocumentColors(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentColors(r.toString())).then(t=>{if(t)return t.map(a=>({color:a.color,range:v(a.range)}))})}provideColorPresentations(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getColorPresentations(t.toString(),i.color,Ye(i.range))).then(a=>{if(a)return a.map(u=>{let s={label:u.label};return u.textEdit&&(s.textEdit=C(u.textEdit)),u.additionalTextEdits&&(s.additionalTextEdits=u.additionalTextEdits.map(C)),s})})}}class Rt{constructor(n){this._worker=n}provideFoldingRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getFoldingRanges(t.toString(),i)).then(a=>{if(a)return a.map(u=>{const s={start:u.startLine+1,end:u.endLine+1};return typeof u.kind<"u"&&(s.kind=gt(u.kind)),s})})}}function gt(e){switch(e){case M.Comment:return x.FoldingRangeKind.Comment;case M.Imports:return x.FoldingRangeKind.Imports;case M.Region:return x.FoldingRangeKind.Region}}class Mt{constructor(n){this._worker=n}provideSelectionRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getSelectionRanges(t.toString(),i.map(k))).then(a=>{if(a)return a.map(u=>{const s=[];for(;u;)s.push({range:v(u.range)}),u=u.parent;return s})})}}export{mt as C,bt as D,Rt as F,vt as H,xt as R,Mt as S,_t as a,kt as b,wt as c,It as d,pt as e,Et as f,Lt as g,At as h,k as i,Ye as j,C as k,v as t}; diff --git a/apps/pythinker-code/dist-web/assets/mdx-CvYmjfax.js b/apps/pythinker-code/dist-web/assets/mdx-BNW26XnD.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/mdx-CvYmjfax.js rename to apps/pythinker-code/dist-web/assets/mdx-BNW26XnD.js index e87d69b60..f746cefc6 100644 --- a/apps/pythinker-code/dist-web/assets/mdx-CvYmjfax.js +++ b/apps/pythinker-code/dist-web/assets/mdx-BNW26XnD.js @@ -1 +1 @@ -import{l as e}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const r={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(n,t)=>({beforeText:new RegExp(`^${t}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${t+1}. `}}))]},d={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};export{r as conf,d as language}; +import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const r={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(n,t)=>({beforeText:new RegExp(`^${t}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${t+1}. `}}))]},d={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};export{r as conf,d as language}; diff --git a/apps/pythinker-code/dist-web/assets/mermaid.core-BgUXBQ9g.js b/apps/pythinker-code/dist-web/assets/mermaid.core-BusHtpbx.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/mermaid.core-BgUXBQ9g.js rename to apps/pythinker-code/dist-web/assets/mermaid.core-BusHtpbx.js index b69433403..e611c8098 100644 --- a/apps/pythinker-code/dist-web/assets/mermaid.core-BgUXBQ9g.js +++ b/apps/pythinker-code/dist-web/assets/mermaid.core-BusHtpbx.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-DFU8VSYq.js","assets/index-vF2s5p7P.js","assets/index-DmWWUMKQ.css","assets/purify.es-5AjVNlXF.js","assets/dagre-3AP2YEHR-DkuX21S_.js","assets/layout-BKltItOX.js","assets/swimlanes-XN3QIQJK-BzHQBVgg.js","assets/cose-bilkent-JH36ORCC-D7cfmkHX.js","assets/cytoscape.esm-CNiYdHpY.js","assets/c4Diagram-UCG6FXSJ-B9GHaMKc.js","assets/chunk-F27PBJKO-A5JDBOgE.js","assets/flowDiagram-A5DVABFB-DWLybnX0.js","assets/chunk-5VM5RSS4-wCYaCTKB.js","assets/chunk-XXDRQBXY-GqpBYspR.js","assets/chunk-POPQ4Y6H-CyRmuplC.js","assets/channel-CeJKBXng.js","assets/swimlanesDiagram-VK2B7HYN-DwZGbRdg.js","assets/erDiagram-SSCWMZ5O-Bukenpe0.js","assets/gitGraphDiagram-WWUBYQGX-JhPLgbup.js","assets/chunk-2Q5K7J3B-DDI19Bs6.js","assets/chunk-JWPE2WC7-BVyXOrT5.js","assets/cynefin-OW5HDTMX-DnoOlDkN.js","assets/ganttDiagram-EL5Y4UJY-C2aeZeAI.js","assets/linear-DehXFnHz.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-RXCK75RN-DdCBBDr8.js","assets/pieDiagram-E7YTZNPT-CJ0uXwph.js","assets/arc-Bm7BOhts.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-DbtbJAe8.js","assets/xychartDiagram-S5SC5T6Z-Do2Nsb25.js","assets/requirementDiagram-EFPCY7ZU-CmPbgctE.js","assets/sequenceDiagram-WJ2MYXX4-CBJOzdkc.js","assets/classDiagram-DTDB5LWJ-C3txtkaA.js","assets/chunk-LCL6LL3I-DoVNud6N.js","assets/classDiagram-v2-JRS7N3AN-C3txtkaA.js","assets/stateDiagram-HBIQ2CUA-CAMMINP1.js","assets/chunk-G27WJ6UU-x-A8PhoW.js","assets/stateDiagram-v2-4QOOHH4V-D31cKkvj.js","assets/journeyDiagram-EYS64GPL-DmhIyY3b.js","assets/timeline-definition-24CTP7MA-CAzR7eP2.js","assets/mindmap-definition-FBJOCRG2-D8dmS5cm.js","assets/kanban-definition-3QL26DDD-DXzagyyt.js","assets/sankeyDiagram-P5KCCOFB-X9Hobb6t.js","assets/diagram-Z3DM3KII-BX-mpA_H.js","assets/diagram-UQ7AKVKN-DsxzrkIm.js","assets/blockDiagram-NRAW4CY4-DIC9lfxd.js","assets/diagram-S7CK7UJ4-BCkTP5l5.js","assets/architectureDiagram-5GKGNRK7-D6LvpbBE.js","assets/diagram-VSXAHHWV-DS02PJbw.js","assets/ishikawaDiagram-5VMMS53U-C9GF3Hkk.js","assets/vennDiagram-4TSXK5OY-N3z1lGGo.js","assets/diagram-VX7I27RA-DpeqeF5i.js","assets/wardleyDiagram-VM6X3IG4-D4zA5eJ2.js","assets/cynefinDiagram-5FMLGOSQ-DF9zxtn7.js","assets/railroadDiagram-O6MQD6OU-DtMi5zNi.js","assets/chunk-SVP7TREG-C35ZI9k-.js","assets/ebnfDiagram-PWID7BFC-Az6pcQU0.js","assets/abnfDiagram-VCTEODGH-pTXCrzR-.js","assets/pegDiagram-XKGWAZYB-wf7jamBk.js"])))=>i.map(i=>d[i]); -import{bR as _t}from"./index-vF2s5p7P.js";import{p as Hr}from"./purify.es-5AjVNlXF.js";var cd=Object.defineProperty,g=(e,t)=>cd(e,"name",{value:t,configurable:!0}),Qy=(e,t)=>{for(var r in t)cd(e,r,{get:t[r],enumerable:!0})};function an(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ps={exports:{}},Jy=ps.exports,Dl;function tm(){return Dl||(Dl=1,(function(e,t){(function(r,i){e.exports=i()})(Jy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",u="quarter",f="year",y="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var O=["th","st","nd","rd"],v=E%100;return"["+E+(O[(v-20)%10]||O[v]||O[0])+"]"}},S=function(E,O,v){var R=String(E);return!R||R.length>=O?E:""+Array(O+1-R.length).join(v)+E},T={s:S,z:function(E){var O=-E.utcOffset(),v=Math.abs(O),R=Math.floor(v/60),$=v%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S($,2,"0")},m:function E(O,v){if(O.date()1)return E(Z[0])}else{var ut=O.name;L[ut]=O,$=ut}return!R&&$&&(_=$),$||!R&&_},z=function(E,O){if(B(E))return E.clone();var v=typeof O=="object"?O:{};return v.date=E,v.args=arguments,new et(v)},I=T;I.l=X,I.i=B,I.w=function(E,O){return z(E,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var et=(function(){function E(v){this.$L=X(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[M]=!0}var O=E.prototype;return O.parse=function(v){this.$d=(function(R){var $=R.date,J=R.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Z=$.match(x);if(Z){var ut=Z[2]-1||0,Ct=(Z[7]||"0").substring(0,3);return J?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)}}return new Date($)})(v),this.init()},O.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},O.$utils=function(){return I},O.isValid=function(){return this.$d.toString()!==m},O.isSame=function(v,R){var $=z(v);return this.startOf(R)<=$&&$<=this.endOf(R)},O.isAfter=function(v,R){return z(v){},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},nn=g(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Pe.fatal&&(P.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Pe.error&&(P.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Pe.warn&&(P.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Pe.info&&(P.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Pe.debug&&(P.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Pe.trace&&(P.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=g(e=>`%c${rm().format("ss.SSS")} : ${e} : `,"format");const ys={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return ys.hue2rgb(o,s,e+1/3)*255;case"g":return ys.hue2rgb(o,s,e)*255;case"b":return ys.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},sm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},bt={channel:ys,lang:im,unit:sm},Ze={};for(let e=0;e<=255;e++)Ze[e]=bt.unit.dec2hex(e);const Xt={ALL:0,RGB:1,HSL:2};let om=class{constructor(){this.type=Xt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Xt.ALL}is(t){return this.type===t}};class am{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new om}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=bt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=bt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=bt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=bt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=bt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=bt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const eo=new am({r:0,g:0,b:0,a:0},"transparent"),qr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(qr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return eo.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(s*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return bt.channel.clamp.h(parseFloat(r)*.9);case"rad":return bt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return bt.channel.clamp.h(parseFloat(r)*360)}}return bt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(cr.re);if(!r)return;const[,i,s,o,a,n]=r;return eo.set({h:cr._hue2deg(i),s:bt.channel.clamp.s(parseFloat(s)),l:bt.channel.clamp.l(parseFloat(o)),a:a?bt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%, ${s})`:`hsl(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%)`}},Li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Li.colors[e];if(t)return qr.parse(t)},stringify:e=>{const t=qr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},xi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(xi.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return eo.set({r:bt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:bt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:bt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?bt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)}, ${bt.lang.round(s)})`:`rgb(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)})`}},Fe={format:{keyword:Li,hex:qr,rgb:xi,rgba:xi,hsl:cr,hsla:cr},parse:e=>{if(typeof e!="string")return e;const t=qr.parse(e)||xi.parse(e)||cr.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xt.HSL)||e.data.r===void 0?cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?xi.stringify(e):qr.stringify(e)},dd=(e,t)=>{const r=Fe.parse(e);for(const i in t)r[i]=bt.channel.clamp[i](t[i]);return Fe.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return dd(e,{a:t});const s=eo.set({r:bt.channel.clamp.r(e),g:bt.channel.clamp.g(t),b:bt.channel.clamp.b(r),a:bt.channel.clamp.a(i)});return Fe.stringify(s)},nm=e=>{const{r:t,g:r,b:i}=Fe.parse(e),s=.2126*bt.channel.toLinear(t)+.7152*bt.channel.toLinear(r)+.0722*bt.channel.toLinear(i);return bt.lang.round(s)},lm=e=>nm(e)>=.5,xe=e=>!lm(e),ud=(e,t,r)=>{const i=Fe.parse(e),s=i[t],o=bt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Fe.stringify(i)},q=(e,t)=>ud(e,"l",t),N=(e,t)=>ud(e,"l",-t),b=(e,t)=>{const r=Fe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return dd(e,i)},hm=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Fe.parse(e),{r:n,g:l,b:c,a:h}=Fe.parse(t),d=r/100,u=d*2-1,f=a-h,m=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,x=1-m,C=i*m+n*x,k=s*m+l*x,S=o*m+c*x,T=a*d+h*(1-d);return tr(C,k,S,T)},F=(e,t=100)=>{const r=Fe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,hm(r,e,t)};var ma=g((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ma(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=ma(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Yt=ma,Ae="#ffffff",Ee="#f2f2f2",mt=g((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),cm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},dm=g(e=>{const t=new cm;return t.calculate(e),t},"getThemeVariables"),um=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=tr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=q(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=q(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=q(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},fm=g(e=>{const t=new um;return t.calculate(e),t},"getThemeVariables"),gm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=tr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},pm=g(e=>{const t=new gm;return t.calculate(e),t},"getThemeVariables"),ym=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=q("#cde498",10),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=N(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},mm=g(e=>{const t=new ym;return t.calculate(e),t},"getThemeVariables"),xm=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Cm=g(e=>{const t=new xm;return t.calculate(e),t},"getThemeVariables"),bm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||b(e,{h:30}),this.cScale4=this.cScale4||b(e,{h:60}),this.cScale5=this.cScale5||b(e,{h:90}),this.cScale6=this.cScale6||b(e,{h:120}),this.cScale7=this.cScale7||b(e,{h:150}),this.cScale8=this.cScale8||b(e,{h:210,l:150}),this.cScale9=this.cScale9||b(e,{h:270}),this.cScale10=this.cScale10||b(e,{h:300}),this.cScale11=this.cScale11||b(e,{h:330}),this.darkMode)for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},km=g(e=>{const t=new bm;return t.calculate(e),t},"getThemeVariables"),wm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Sm=g(e=>{const t=new wm;return t.calculate(e),t},"getThemeVariables"),Tm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},_m=g(e=>{const t=new Tm;return t.calculate(e),t},"getThemeVariables"),vm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Bm=g(e=>{const t=new vm;return t.calculate(e),t},"getThemeVariables"),Lm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Fm=g(e=>{const t=new Lm;return t.calculate(e),t},"getThemeVariables"),Mm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Am=g(e=>{const t=new Mm;return t.calculate(e),t},"getThemeVariables"),We={base:{getThemeVariables:dm},dark:{getThemeVariables:fm},default:{getThemeVariables:pm},forest:{getThemeVariables:mm},neutral:{getThemeVariables:Cm},neo:{getThemeVariables:km},"neo-dark":{getThemeVariables:Sm},redux:{getThemeVariables:_m},"redux-dark":{getThemeVariables:Bm},"redux-color":{getThemeVariables:Fm},"redux-dark-color":{getThemeVariables:Am}},jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},fd={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:We.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},eventmodeling:{...jt.eventmodeling},treeView:{...jt.treeView,useWidth:void 0},radar:{...jt.radar},railroad:{...jt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...jt.ishikawa},sankey:{...jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...jt.venn},cynefin:{...jt.cynefin}},gd=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...gd(e[i],"")]:[...r,t+i],[]),"keyify"),Em=new Set(gd(fd,"")),pd=fd,$m={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Om=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(P.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ls=g(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ls(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Em.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=$m[t];i?Om(e[t],i):(P.debug("sanitizing object",t),Ls(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=yd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),yd=g(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),re=Yt({},Yr),Fs,gr=[],Fi=Yt({},Yr),Ui=g((e,t)=>{let r=Yt({},e),i={};for(const s of t)Cd(s),i=Yt(i,s);if(r=Yt(r,i),i.theme&&i.theme in We){const s=Yt({},Fs),o=Yt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in We&&(r.themeVariables=We[r.theme].getThemeVariables(o))}return Fi=r,Nm(Fi),Fi},"updateCurrentConfig"),Dm=g(e=>(re=Yt({},Yr),re=Yt(re,e),e.theme&&We[e.theme]&&(re.themeVariables=We[e.theme].getThemeVariables(e.themeVariables)),Ui(re,gr),re),"setSiteConfig"),Pm=g(e=>{Fs=Yt({},e)},"saveConfigFromInitialize"),Im=g(e=>(re=Yt(re,e),Ui(re,gr),re),"updateSiteConfig"),md=g(()=>Yt({},re),"getSiteConfig"),xd=g(e=>(Ui(Fi,[e]),Rt()),"setConfig"),Rt=g(()=>Yt({},Fi),"getConfig"),Cd=g(e=>{e&&(["secure",...re.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Cd(e[t])}))},"sanitize"),Rm=g(e=>{Ls(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gr.push(e),Ui(re,gr)},"addDirective"),Ms=g((e=re)=>{gr=[],Ui(e,gr)},"reset"),qm={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Pl={},bd=g(e=>{Pl[e]||(P.warn(qm[e]),Pl[e]=!0)},"issueWarning"),Nm=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&bd("LAZY_LOAD_DEPRECATED")},"checkConfig"),O5=g(()=>{let e={};Fs&&(e=Yt(e,Fs));for(const t of gr)e=Yt(e,t);return e},"getUserDefinedConfig"),Kt=g(e=>(e.flowchart?.htmlLabels!=null&&bd("FLOWCHART_HTML_LABELS_DEPRECATED"),$e(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),kd=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wm=/\s*%%.*\n/gm,wd=class extends Error{static{g(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},pr={},ln=g(function(e,t){e=e.replace(kd,"").replace(Mi,"").replace(Wm,` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-CSVjY38-.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css","assets/purify.es-5AjVNlXF.js","assets/dagre-3AP2YEHR-DNRBAAmc.js","assets/layout-CRsCkvth.js","assets/swimlanes-XN3QIQJK-D3OEEV8W.js","assets/cose-bilkent-JH36ORCC-Du_KHUbL.js","assets/cytoscape.esm-CNiYdHpY.js","assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js","assets/chunk-F27PBJKO-CGsciVEq.js","assets/flowDiagram-A5DVABFB-D6_Z_lfU.js","assets/chunk-5VM5RSS4-BX7DTcSO.js","assets/chunk-XXDRQBXY-DaNzL58C.js","assets/chunk-POPQ4Y6H-BpzExJjb.js","assets/channel-DZ2XEbLN.js","assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js","assets/erDiagram-SSCWMZ5O-DzkblHwz.js","assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js","assets/chunk-2Q5K7J3B-CPFb-YMA.js","assets/chunk-JWPE2WC7-D9ICAwD_.js","assets/cynefin-OW5HDTMX-BlED4Rd3.js","assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js","assets/linear-Be-oTS5b.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-RXCK75RN-Cn4b9A5u.js","assets/pieDiagram-E7YTZNPT-CSu4VKw9.js","assets/arc-B8osaoVd.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js","assets/xychartDiagram-S5SC5T6Z-Dqif0X1Z.js","assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js","assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js","assets/classDiagram-DTDB5LWJ-D8QxhnwF.js","assets/chunk-LCL6LL3I-Bvdjn-Qn.js","assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js","assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js","assets/chunk-G27WJ6UU-CIn6rVI9.js","assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js","assets/journeyDiagram-EYS64GPL-Bznj053h.js","assets/timeline-definition-24CTP7MA-S237vnu4.js","assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js","assets/kanban-definition-3QL26DDD-gEE7iVwG.js","assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js","assets/diagram-Z3DM3KII-DnTJZ40O.js","assets/diagram-UQ7AKVKN-DqI3S6m6.js","assets/blockDiagram-NRAW4CY4-BNGA-QWb.js","assets/diagram-S7CK7UJ4-95PLVM0c.js","assets/architectureDiagram-5GKGNRK7-BvF0UgoH.js","assets/diagram-VSXAHHWV-Cps0EaEU.js","assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js","assets/vennDiagram-4TSXK5OY-BElDUyH9.js","assets/diagram-VX7I27RA-TJJN2czJ.js","assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js","assets/cynefinDiagram-5FMLGOSQ-BfZ2WMeD.js","assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js","assets/chunk-SVP7TREG-D3M7Gbkt.js","assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js","assets/abnfDiagram-VCTEODGH-DEfrkFuI.js","assets/pegDiagram-XKGWAZYB-COpW3oto.js"])))=>i.map(i=>d[i]); +import{bR as _t}from"./index-BZ9wqq8Z.js";import{p as Hr}from"./purify.es-5AjVNlXF.js";var cd=Object.defineProperty,g=(e,t)=>cd(e,"name",{value:t,configurable:!0}),Qy=(e,t)=>{for(var r in t)cd(e,r,{get:t[r],enumerable:!0})};function an(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ps={exports:{}},Jy=ps.exports,Dl;function tm(){return Dl||(Dl=1,(function(e,t){(function(r,i){e.exports=i()})(Jy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",u="quarter",f="year",y="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var O=["th","st","nd","rd"],v=E%100;return"["+E+(O[(v-20)%10]||O[v]||O[0])+"]"}},S=function(E,O,v){var R=String(E);return!R||R.length>=O?E:""+Array(O+1-R.length).join(v)+E},T={s:S,z:function(E){var O=-E.utcOffset(),v=Math.abs(O),R=Math.floor(v/60),$=v%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S($,2,"0")},m:function E(O,v){if(O.date()1)return E(Z[0])}else{var ut=O.name;L[ut]=O,$=ut}return!R&&$&&(_=$),$||!R&&_},z=function(E,O){if(B(E))return E.clone();var v=typeof O=="object"?O:{};return v.date=E,v.args=arguments,new et(v)},I=T;I.l=X,I.i=B,I.w=function(E,O){return z(E,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var et=(function(){function E(v){this.$L=X(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[M]=!0}var O=E.prototype;return O.parse=function(v){this.$d=(function(R){var $=R.date,J=R.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Z=$.match(x);if(Z){var ut=Z[2]-1||0,Ct=(Z[7]||"0").substring(0,3);return J?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)}}return new Date($)})(v),this.init()},O.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},O.$utils=function(){return I},O.isValid=function(){return this.$d.toString()!==m},O.isSame=function(v,R){var $=z(v);return this.startOf(R)<=$&&$<=this.endOf(R)},O.isAfter=function(v,R){return z(v){},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},nn=g(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Pe.fatal&&(P.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Pe.error&&(P.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Pe.warn&&(P.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Pe.info&&(P.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Pe.debug&&(P.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Pe.trace&&(P.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=g(e=>`%c${rm().format("ss.SSS")} : ${e} : `,"format");const ys={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return ys.hue2rgb(o,s,e+1/3)*255;case"g":return ys.hue2rgb(o,s,e)*255;case"b":return ys.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},sm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},bt={channel:ys,lang:im,unit:sm},Ze={};for(let e=0;e<=255;e++)Ze[e]=bt.unit.dec2hex(e);const Xt={ALL:0,RGB:1,HSL:2};let om=class{constructor(){this.type=Xt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Xt.ALL}is(t){return this.type===t}};class am{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new om}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=bt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=bt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=bt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=bt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=bt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=bt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const eo=new am({r:0,g:0,b:0,a:0},"transparent"),qr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(qr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return eo.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(s*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return bt.channel.clamp.h(parseFloat(r)*.9);case"rad":return bt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return bt.channel.clamp.h(parseFloat(r)*360)}}return bt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(cr.re);if(!r)return;const[,i,s,o,a,n]=r;return eo.set({h:cr._hue2deg(i),s:bt.channel.clamp.s(parseFloat(s)),l:bt.channel.clamp.l(parseFloat(o)),a:a?bt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%, ${s})`:`hsl(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%)`}},Li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Li.colors[e];if(t)return qr.parse(t)},stringify:e=>{const t=qr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},xi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(xi.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return eo.set({r:bt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:bt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:bt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?bt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)}, ${bt.lang.round(s)})`:`rgb(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)})`}},Fe={format:{keyword:Li,hex:qr,rgb:xi,rgba:xi,hsl:cr,hsla:cr},parse:e=>{if(typeof e!="string")return e;const t=qr.parse(e)||xi.parse(e)||cr.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xt.HSL)||e.data.r===void 0?cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?xi.stringify(e):qr.stringify(e)},dd=(e,t)=>{const r=Fe.parse(e);for(const i in t)r[i]=bt.channel.clamp[i](t[i]);return Fe.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return dd(e,{a:t});const s=eo.set({r:bt.channel.clamp.r(e),g:bt.channel.clamp.g(t),b:bt.channel.clamp.b(r),a:bt.channel.clamp.a(i)});return Fe.stringify(s)},nm=e=>{const{r:t,g:r,b:i}=Fe.parse(e),s=.2126*bt.channel.toLinear(t)+.7152*bt.channel.toLinear(r)+.0722*bt.channel.toLinear(i);return bt.lang.round(s)},lm=e=>nm(e)>=.5,xe=e=>!lm(e),ud=(e,t,r)=>{const i=Fe.parse(e),s=i[t],o=bt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Fe.stringify(i)},q=(e,t)=>ud(e,"l",t),N=(e,t)=>ud(e,"l",-t),b=(e,t)=>{const r=Fe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return dd(e,i)},hm=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Fe.parse(e),{r:n,g:l,b:c,a:h}=Fe.parse(t),d=r/100,u=d*2-1,f=a-h,m=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,x=1-m,C=i*m+n*x,k=s*m+l*x,S=o*m+c*x,T=a*d+h*(1-d);return tr(C,k,S,T)},F=(e,t=100)=>{const r=Fe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,hm(r,e,t)};var ma=g((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ma(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=ma(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Yt=ma,Ae="#ffffff",Ee="#f2f2f2",mt=g((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),cm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},dm=g(e=>{const t=new cm;return t.calculate(e),t},"getThemeVariables"),um=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=tr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=q(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=q(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=q(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},fm=g(e=>{const t=new um;return t.calculate(e),t},"getThemeVariables"),gm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=tr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},pm=g(e=>{const t=new gm;return t.calculate(e),t},"getThemeVariables"),ym=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=q("#cde498",10),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=N(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},mm=g(e=>{const t=new ym;return t.calculate(e),t},"getThemeVariables"),xm=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Cm=g(e=>{const t=new xm;return t.calculate(e),t},"getThemeVariables"),bm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||b(e,{h:30}),this.cScale4=this.cScale4||b(e,{h:60}),this.cScale5=this.cScale5||b(e,{h:90}),this.cScale6=this.cScale6||b(e,{h:120}),this.cScale7=this.cScale7||b(e,{h:150}),this.cScale8=this.cScale8||b(e,{h:210,l:150}),this.cScale9=this.cScale9||b(e,{h:270}),this.cScale10=this.cScale10||b(e,{h:300}),this.cScale11=this.cScale11||b(e,{h:330}),this.darkMode)for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},km=g(e=>{const t=new bm;return t.calculate(e),t},"getThemeVariables"),wm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Sm=g(e=>{const t=new wm;return t.calculate(e),t},"getThemeVariables"),Tm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},_m=g(e=>{const t=new Tm;return t.calculate(e),t},"getThemeVariables"),vm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Bm=g(e=>{const t=new vm;return t.calculate(e),t},"getThemeVariables"),Lm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Fm=g(e=>{const t=new Lm;return t.calculate(e),t},"getThemeVariables"),Mm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Am=g(e=>{const t=new Mm;return t.calculate(e),t},"getThemeVariables"),We={base:{getThemeVariables:dm},dark:{getThemeVariables:fm},default:{getThemeVariables:pm},forest:{getThemeVariables:mm},neutral:{getThemeVariables:Cm},neo:{getThemeVariables:km},"neo-dark":{getThemeVariables:Sm},redux:{getThemeVariables:_m},"redux-dark":{getThemeVariables:Bm},"redux-color":{getThemeVariables:Fm},"redux-dark-color":{getThemeVariables:Am}},jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},fd={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:We.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},eventmodeling:{...jt.eventmodeling},treeView:{...jt.treeView,useWidth:void 0},radar:{...jt.radar},railroad:{...jt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...jt.ishikawa},sankey:{...jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...jt.venn},cynefin:{...jt.cynefin}},gd=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...gd(e[i],"")]:[...r,t+i],[]),"keyify"),Em=new Set(gd(fd,"")),pd=fd,$m={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Om=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(P.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ls=g(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ls(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Em.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=$m[t];i?Om(e[t],i):(P.debug("sanitizing object",t),Ls(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=yd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),yd=g(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),re=Yt({},Yr),Fs,gr=[],Fi=Yt({},Yr),Ui=g((e,t)=>{let r=Yt({},e),i={};for(const s of t)Cd(s),i=Yt(i,s);if(r=Yt(r,i),i.theme&&i.theme in We){const s=Yt({},Fs),o=Yt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in We&&(r.themeVariables=We[r.theme].getThemeVariables(o))}return Fi=r,Nm(Fi),Fi},"updateCurrentConfig"),Dm=g(e=>(re=Yt({},Yr),re=Yt(re,e),e.theme&&We[e.theme]&&(re.themeVariables=We[e.theme].getThemeVariables(e.themeVariables)),Ui(re,gr),re),"setSiteConfig"),Pm=g(e=>{Fs=Yt({},e)},"saveConfigFromInitialize"),Im=g(e=>(re=Yt(re,e),Ui(re,gr),re),"updateSiteConfig"),md=g(()=>Yt({},re),"getSiteConfig"),xd=g(e=>(Ui(Fi,[e]),Rt()),"setConfig"),Rt=g(()=>Yt({},Fi),"getConfig"),Cd=g(e=>{e&&(["secure",...re.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Cd(e[t])}))},"sanitize"),Rm=g(e=>{Ls(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gr.push(e),Ui(re,gr)},"addDirective"),Ms=g((e=re)=>{gr=[],Ui(e,gr)},"reset"),qm={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Pl={},bd=g(e=>{Pl[e]||(P.warn(qm[e]),Pl[e]=!0)},"issueWarning"),Nm=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&bd("LAZY_LOAD_DEPRECATED")},"checkConfig"),O5=g(()=>{let e={};Fs&&(e=Yt(e,Fs));for(const t of gr)e=Yt(e,t);return e},"getUserDefinedConfig"),Kt=g(e=>(e.flowchart?.htmlLabels!=null&&bd("FLOWCHART_HTML_LABELS_DEPRECATED"),$e(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),kd=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wm=/\s*%%.*\n/gm,wd=class extends Error{static{g(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},pr={},ln=g(function(e,t){e=e.replace(kd,"").replace(Mi,"").replace(Wm,` `);for(const[r,{detector:i}]of Object.entries(pr))if(i(e,t))return r;throw new wd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),xa=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Sd(t,r,i)},"registerLazyLoadedDiagrams"),Sd=g((e,t,r)=>{pr[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),pr[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),zm=g(e=>pr[e].loader,"getDiagramLoader"),Gi=//gi,Hm=g(e=>e?vd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ym=(()=>{let e=!1;return()=>{e||(Td(),e=!0)}})();function Td(){const e="data-temp-href-target";Hr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Hr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(Td,"setupDompurifyHooks");var _d=g(e=>(Ym(),Hr.sanitize(e)),"removeScript"),Il=g((e,t)=>{if(Kt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=_d(e):r!=="loose"&&(e=vd(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=Xm(e))}return e},"sanitizeMore"),le=g((e,t)=>e&&(t.dompurifyConfig?e=Hr.sanitize(Il(e,t),t.dompurifyConfig).toString():e=Hr.sanitize(Il(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),jm=g((e,t)=>typeof e=="string"?le(e,t):e.flat().map(r=>le(r,t)),"sanitizeTextOrArray"),Um=g(e=>Gi.test(e),"hasBreaks"),Gm=g(e=>e.split(Gi),"splitBreaks"),Xm=g(e=>e.replace(/#br#/g,"
        "),"placeholderToBreak"),vd=g(e=>e.replace(Gi,"#br#"),"breakToPlaceholder"),Vm=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Zm=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Km=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Rl=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),Qm=g((e,t)=>{const r=Ca(e,"~"),i=Ca(t,"~");return r===1&&i===1},"shouldCombineSets"),Jm=g(e=>{const t=Ca(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ql=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ba=/\$\$(.*?)\$\$/g,Di=g(e=>(e.match(ba)?.length??0)>0,"hasKatex"),D5=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Bd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),t0=g(async(e,t)=>{if(!Di(e))return e;if(!(ql()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ba,"MathML is unsupported in this environment.");{const{default:r}=await _t(async()=>{const{default:s}=await import("./katex-HP8lGamR.js");return{default:s}},[]),i=t.forceLegacyMathML||!ql()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Gi).map(s=>Di(s)?`
        ${s}
        `:`
        ${s}
        `).join("").replace(ba,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Bd=g(async(e,t)=>le(await t0(e,t),t),"renderKatexSanitized"),Xi={getRows:Hm,sanitizeText:le,sanitizeTextOrArray:jm,hasBreaks:Um,splitBreaks:Gm,lineBreakRegex:Gi,removeScript:_d,getUrl:Vm,evaluate:$e,getMax:Zm,getMin:Km},e0=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),r0=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ld=g(function(e,t,r,i){const s=r0(t,r,i);e0(e,s)},"configureSvgSize"),i0=g(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;P.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;P.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,P.info(`Calculated bounds: ${n}x${l}`),Ld(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ms={};function ka(e){return[...e.cssRules].map(t=>t.cssText).join(` `)}g(ka,"cssStyleSheetToString");var s0=g((e,t,r,i)=>{let s="";return e in ms&&ms[e]?s=ms[e]({...r,svgId:i}):P.warn(`No theme found for ${e}`),`& { font-family: ${r.fontFamily}; @@ -265,7 +265,7 @@ ${s.join(` L0,20`)},"requirement_arrow"),jw=g((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Uw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Gw=g((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),Xw={extension:vw,composition:Bw,aggregation:Lw,dependency:Fw,lollipop:Mw,point:Aw,circle:Ew,cross:$w,barb:Ow,barbNeo:Dw,only_one:Pw,zero_or_one:Iw,one_or_more:Rw,zero_or_more:qw,only_one_neo:Nw,zero_or_one_neo:Ww,one_or_more_neo:zw,zero_or_more_neo:Hw,requirement_arrow:Yw,requirement_contains:Uw,requirement_arrow_neo:jw,requirement_contains_neo:Gw},rp=_w,ip=typeof global=="object"&&global&&global.Object===Object&&global,Vw=typeof self=="object"&&self&&self.Object===Object&&self,Ue=ip||Vw||Function("return this")(),Me=Ue.Symbol,sp=Object.prototype,Zw=sp.hasOwnProperty,Kw=sp.toString,mi=Me?Me.toStringTag:void 0;function Qw(e){var t=Zw.call(e,mi),r=e[mi];try{e[mi]=void 0;var i=!0}catch{}var s=Kw.call(e);return i&&(t?e[mi]=r:delete e[mi]),s}var Jw=Object.prototype,tS=Jw.toString;function eS(e){return tS.call(e)}var rS="[object Null]",iS="[object Undefined]",sc=Me?Me.toStringTag:void 0;function Qr(e){return e==null?e===void 0?iS:rS:sc&&sc in Object(e)?Qw(e):eS(e)}function Cr(e){return e!=null&&typeof e=="object"}var sS="[object Symbol]";function el(e){return typeof e=="symbol"||Cr(e)&&Qr(e)==sS}function op(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r0){if(++t>=SS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function vi(e){return function(){return e}}var lc=(function(){try{var e=_r(Object,"defineProperty");return e({},"",{}),e}catch{}})(),BS=lc?function(e,t){return lc(e,"toString",{configurable:!0,enumerable:!1,value:vi(t),writable:!0})}:yo,LS=vS(BS);function FS(e,t){for(var r=-1,i=e==null?0:e.length;++r-1}var DS=9007199254740991,PS=/^(?:0|[1-9]\d*)$/;function np(e,t){var r=typeof e;return t=t??DS,!!t&&(r=="number"||r!="symbol"&&PS.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=qS}function mo(e){return e!=null&&il(e.length)&&!Ks(e)}var NS=Object.prototype;function hp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||NS;return e===r}function WS(e,t){for(var r=-1,i=Array(e);++r-1}function GT(e,t){var r=this.__data__,i=Co(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tn))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,f=r&$_?new zi:void 0;for(o.set(e,t),o.set(t,e);++d=Ev){var c=Av(e);if(c)return nl(c);a=!1,s=xp,l=new zi}else l=n;t:for(;++i1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=nr,this._children[t]={},this._children[nr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ar(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ar(ve(this._in[t]),r),delete this._in[t],delete this._preds[t],ar(ve(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ir(r))r=nr;else{r+="";for(var i=r;!Ir(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==nr)return r}}children(t){if(Ir(t)&&(t=nr),this._isCompound){var r=this._children[t];if(r)return ve(r)}else{if(t===nr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return ve(r)}successors(t){var r=this._sucs[t];if(r)return ve(r)}neighbors(t){var r=this.predecessors(t);if(r)return Ov(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ar(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),ar(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&ar(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return Ks(t)||(t=vi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return jo(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return Fv(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,Ir(i)||(i=""+i);var n=Bi(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!Ir(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=Pv(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Mc(this._preds[r],t),Mc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Ac(this._preds[r],t),Ac(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=jo(i);return r?us(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=jo(i);return r?us(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}wo.prototype._nodeCount=0;wo.prototype._edgeCount=0;function Mc(e,t){e[t]?e[t]++:e[t]=1}function Ac(e,t){--e[t]||delete e[t]}function Bi(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Fc+o+Fc+(Ir(i)?Dv:i)}function Pv(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function Uo(e,t){return Bi(e,t.v,t.w,t.name)}function Sp(e,{edgePathsClass:t="edges edgePath"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}g(Sp,"createLayoutElementGroups");async function Tp(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}g(Tp,"measureGroupLabel");async function _p(e,t,r){const i=await Jn(e,t,r),s=i.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,i}g(_p,"insertMeasuredNode");async function vp(e,t){const r=new wo({multigraph:!0,compound:!0}),i=[...t.edges],s=vt(),o=Sp(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Tp(n,h),r.setNode(h.id,{...h});else{if(c){const d=await _p(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&Kg(h)&&await tl(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(u=>u.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await _t(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-X5ZJPWSS-DFU8VSYq.js");return{captureNodeSizes:d}},__vite__mapDeps([0,1,2,3]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}g(vp,"createGraphWithElements");var Ft=new Map,ur=new Map,Bp=new Map,Iv=g(()=>{ur.clear(),Bp.clear(),Ft.clear()},"clear"),Hi=g((e,t)=>{const r=ur.get(t)||[];return P.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Rv=g((e,t)=>{const r=ur.get(t)||[];return P.info("Descendants of ",t," is ",r),P.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Hi(e.v,t)||Hi(e.w,t)||r.includes(e.w):(P.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Lp=g((e,t,r,i)=>{P.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),P.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Lp(o,t,r,i);else{const a=t.node(o);P.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(P.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(P.debug("Setting parent",o,e),r.setParent(o,e)):(P.info("In copy ",e,"root",i,"data",t.node(e),i),P.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);P.debug("Copying Edges",n),n.forEach(l=>{P.info("Edge",l);const c=t.edge(l.v,l.w,l.name);P.info("Edge data",c,i);try{Rv(l,i)?(P.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),P.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):P.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){P.error(h)}})}P.debug("Removing node",o),t.removeNode(o)})},"copy"),Fp=g((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)Bp.set(s,e),i=[...i,...Fp(s,t)];return i},"extractDescendants"),qv=g((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Js=g((e,t,r)=>{const i=t.children(e);if(P.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=Js(o,t,r),n=qv(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Ec=g(e=>!Ft.has(e)||!Ft.get(e).externalConnections?e:Ft.has(e)?Ft.get(e).id:e,"getAnchorId"),rM=g((e,t)=>{if(!e||t>10){P.debug("Opting out, no graph ");return}else P.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(P.debug("Cluster identified",r," Replacement id in edges: ",Js(r,e,r)),ur.set(r,Fp(r,e)),Ft.set(r,{id:Js(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),s=e.edges();i.length>0?(P.debug("Cluster identified",r,ur),s.forEach(o=>{const a=Hi(o.v,r),n=Hi(o.w,r);a^n&&(P.debug("Edge: ",o," leaves cluster ",r),P.debug("Descendants of XXX ",r,": ",ur.get(r)),Ft.get(r).externalConnections=!0)})):P.debug("Not a cluster ",r,ur)});for(let r of Ft.keys()){const i=Ft.get(r).id,s=e.parent(i);s!==r&&Ft.has(s)&&!Ft.get(s).externalConnections&&(Ft.get(r).id=s);const o=e.edges().some(a=>a.v===r);if(i&&Ft.get(r)?.externalConnections&&o&&Ep(e,i,r)){const a=Nv(e,r,e.parent(i));a&&(Ft.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let s=r.v,o=r.w;if(P.debug("Fix XXX",Ft,"ids:",r.v,r.w,"Translating: ",Ft.get(r.v)," --- ",Ft.get(r.w)),Ft.get(r.v)||Ft.get(r.w)){if(P.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),s=Ec(r.v),o=Ec(r.w),e.removeEdge(r.v,r.w,r.name),s!==r.v){const a=e.parent(s);Ft.get(a).externalConnections=!0,i.fromCluster=r.v}if(o!==r.w){const a=e.parent(o);Ft.get(a).externalConnections=!0,i.toCluster=r.w}P.debug("Fix Replacing with XXX",s,o,r.name),e.setEdge(s,o,i,r.name)}}),Mp(e,0),P.trace(Ft)},"adjustClustersAndEdges"),Mp=g((e,t)=>{if(t>10){P.error("Bailing out");return}let r=e.nodes(),i=!1;for(const s of r){const o=e.children(s);i=i||o.length>0}if(!i){P.debug("Done, no node has children",e.nodes());return}P.debug("Nodes = ",r,t);for(const s of r)if(P.debug("Extracting node",s,Ft,Ft.has(s)&&!Ft.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!Ft.has(s))P.debug("Not a cluster",s,t);else if(!Ft.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){P.debug("Cluster without external connections, without a parent and with children",s,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Ft.get(s)?.clusterData?.dir&&(a=Ft.get(s).clusterData.dir,P.debug("Fixing dir",Ft.get(s).clusterData.dir,a));const n=new wo({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Lp(s,e,n,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:Ft.get(s).clusterData,label:Ft.get(s).label,graph:n})}else P.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!Ft.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),P.debug(Ft);r=e.nodes(),P.debug("New list of nodes",r);for(const s of r){const o=e.node(s);P.debug(" Now next level",s,o),o?.clusterNode&&Mp(o.graph,t+1)}},"extractor"),Ap=g((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=Ap(e,s);r=[...r,...o]}),r},"sorter"),iM=g(e=>Ap(e,e.children()),"sortNodesByHierarchy"),Ep=g((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ft.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Nv=g((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Hi(s,r))continue;const o=Js(s,e,t);if(o&&!Ep(e,o,t))return o}return null},"findSafeAnchorNode");function $p({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??dl;return g(async function(l,c,h,d){const u=c.select("g");rp(u,l.markers,l.type,l.diagramId),cl();const f={element:u,helpers:h,options:d};f.preparedLayout=await e?.(l,f);const y=await a(l,f),m=await r(l,f),x={...f,measure:y};i?await i(l,x,m):await ul(l,x,o),await s?.(l,x,m)},"render")}g($p,"createCommonLayoutRenderer");function cl(){sw(),xw(),uw(),Iv()}g(cl,"clearLayoutRenderState");async function dl(e,{element:t}){return await vp(t,e)}g(dl,"defaultMeasureLayout");async function ul(e,t,r={}){const{measure:i}=t,{groups:s}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await Op(s,a,t,r);const o=Pp(e.nodes);for(const a of e.edges)Ip(a,r)||await Rp(s,a,o,e,r,t)}g(ul,"paintLayoutData");async function Op(e,t,r,i){t.clusterNode?Jh(t):Dp(t,r,i)?await Zg(e.clusters,t):Jh(t)}g(Op,"paintLayoutNode");function Dp(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}g(Dp,"shouldPaintAsCluster");function Pp(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}g(Pp,"buildNodeLookup");function Ip(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}g(Ip,"shouldSkipPaintEdge");async function Rp(e,t,r,i,s,o){const a=Jg(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Qa(t.start,t,r,o,s),Qa(t.end,t,r,o,s),i.diagramId,qp(t,s));Kg(t)&&(Gr.has(t.id)||await tl(e.edgeLabels,t),Np(t,a))}g(Rp,"paintLayoutEdge");function Qa(e,t,r,i,s){return s.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}g(Qa,"getRenderedNode");function qp(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}g(qp,"shouldSkipIntersect");function Np(e,t){const r=t?.updatedPath??t?.originalPath,i=Rt(),{subGraphTitleTotalMargin:s}=go({flowchart:i.flowchart??{}});if(e.label){const o=Gr.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e?.startLabelLeft){const o=Nt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Nt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Nt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Nt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}g(Np,"positionRenderedEdgeLabel");function Wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}g(Wp,"getDefaultExportFromCjs");var Gt={},fs={},Ve={},$c;function Jr(){if($c)return Ve;$c=1;function e(a){return typeof a>"u"||a===null}g(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}g(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}g(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Gw=g((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),Xw={extension:vw,composition:Bw,aggregation:Lw,dependency:Fw,lollipop:Mw,point:Aw,circle:Ew,cross:$w,barb:Ow,barbNeo:Dw,only_one:Pw,zero_or_one:Iw,one_or_more:Rw,zero_or_more:qw,only_one_neo:Nw,zero_or_one_neo:Ww,one_or_more_neo:zw,zero_or_more_neo:Hw,requirement_arrow:Yw,requirement_contains:Uw,requirement_arrow_neo:jw,requirement_contains_neo:Gw},rp=_w,ip=typeof global=="object"&&global&&global.Object===Object&&global,Vw=typeof self=="object"&&self&&self.Object===Object&&self,Ue=ip||Vw||Function("return this")(),Me=Ue.Symbol,sp=Object.prototype,Zw=sp.hasOwnProperty,Kw=sp.toString,mi=Me?Me.toStringTag:void 0;function Qw(e){var t=Zw.call(e,mi),r=e[mi];try{e[mi]=void 0;var i=!0}catch{}var s=Kw.call(e);return i&&(t?e[mi]=r:delete e[mi]),s}var Jw=Object.prototype,tS=Jw.toString;function eS(e){return tS.call(e)}var rS="[object Null]",iS="[object Undefined]",sc=Me?Me.toStringTag:void 0;function Qr(e){return e==null?e===void 0?iS:rS:sc&&sc in Object(e)?Qw(e):eS(e)}function Cr(e){return e!=null&&typeof e=="object"}var sS="[object Symbol]";function el(e){return typeof e=="symbol"||Cr(e)&&Qr(e)==sS}function op(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r0){if(++t>=SS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function vi(e){return function(){return e}}var lc=(function(){try{var e=_r(Object,"defineProperty");return e({},"",{}),e}catch{}})(),BS=lc?function(e,t){return lc(e,"toString",{configurable:!0,enumerable:!1,value:vi(t),writable:!0})}:yo,LS=vS(BS);function FS(e,t){for(var r=-1,i=e==null?0:e.length;++r-1}var DS=9007199254740991,PS=/^(?:0|[1-9]\d*)$/;function np(e,t){var r=typeof e;return t=t??DS,!!t&&(r=="number"||r!="symbol"&&PS.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=qS}function mo(e){return e!=null&&il(e.length)&&!Ks(e)}var NS=Object.prototype;function hp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||NS;return e===r}function WS(e,t){for(var r=-1,i=Array(e);++r-1}function GT(e,t){var r=this.__data__,i=Co(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tn))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,f=r&$_?new zi:void 0;for(o.set(e,t),o.set(t,e);++d=Ev){var c=Av(e);if(c)return nl(c);a=!1,s=xp,l=new zi}else l=n;t:for(;++i1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=nr,this._children[t]={},this._children[nr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ar(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ar(ve(this._in[t]),r),delete this._in[t],delete this._preds[t],ar(ve(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ir(r))r=nr;else{r+="";for(var i=r;!Ir(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==nr)return r}}children(t){if(Ir(t)&&(t=nr),this._isCompound){var r=this._children[t];if(r)return ve(r)}else{if(t===nr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return ve(r)}successors(t){var r=this._sucs[t];if(r)return ve(r)}neighbors(t){var r=this.predecessors(t);if(r)return Ov(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ar(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),ar(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&ar(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return Ks(t)||(t=vi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return jo(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return Fv(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,Ir(i)||(i=""+i);var n=Bi(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!Ir(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=Pv(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Mc(this._preds[r],t),Mc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Ac(this._preds[r],t),Ac(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=jo(i);return r?us(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=jo(i);return r?us(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}wo.prototype._nodeCount=0;wo.prototype._edgeCount=0;function Mc(e,t){e[t]?e[t]++:e[t]=1}function Ac(e,t){--e[t]||delete e[t]}function Bi(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Fc+o+Fc+(Ir(i)?Dv:i)}function Pv(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function Uo(e,t){return Bi(e,t.v,t.w,t.name)}function Sp(e,{edgePathsClass:t="edges edgePath"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}g(Sp,"createLayoutElementGroups");async function Tp(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}g(Tp,"measureGroupLabel");async function _p(e,t,r){const i=await Jn(e,t,r),s=i.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,i}g(_p,"insertMeasuredNode");async function vp(e,t){const r=new wo({multigraph:!0,compound:!0}),i=[...t.edges],s=vt(),o=Sp(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Tp(n,h),r.setNode(h.id,{...h});else{if(c){const d=await _p(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&Kg(h)&&await tl(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(u=>u.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await _t(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-X5ZJPWSS-CSVjY38-.js");return{captureNodeSizes:d}},__vite__mapDeps([0,1,2,3]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}g(vp,"createGraphWithElements");var Ft=new Map,ur=new Map,Bp=new Map,Iv=g(()=>{ur.clear(),Bp.clear(),Ft.clear()},"clear"),Hi=g((e,t)=>{const r=ur.get(t)||[];return P.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Rv=g((e,t)=>{const r=ur.get(t)||[];return P.info("Descendants of ",t," is ",r),P.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Hi(e.v,t)||Hi(e.w,t)||r.includes(e.w):(P.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Lp=g((e,t,r,i)=>{P.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),P.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Lp(o,t,r,i);else{const a=t.node(o);P.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(P.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(P.debug("Setting parent",o,e),r.setParent(o,e)):(P.info("In copy ",e,"root",i,"data",t.node(e),i),P.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);P.debug("Copying Edges",n),n.forEach(l=>{P.info("Edge",l);const c=t.edge(l.v,l.w,l.name);P.info("Edge data",c,i);try{Rv(l,i)?(P.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),P.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):P.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){P.error(h)}})}P.debug("Removing node",o),t.removeNode(o)})},"copy"),Fp=g((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)Bp.set(s,e),i=[...i,...Fp(s,t)];return i},"extractDescendants"),qv=g((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Js=g((e,t,r)=>{const i=t.children(e);if(P.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=Js(o,t,r),n=qv(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Ec=g(e=>!Ft.has(e)||!Ft.get(e).externalConnections?e:Ft.has(e)?Ft.get(e).id:e,"getAnchorId"),rM=g((e,t)=>{if(!e||t>10){P.debug("Opting out, no graph ");return}else P.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(P.debug("Cluster identified",r," Replacement id in edges: ",Js(r,e,r)),ur.set(r,Fp(r,e)),Ft.set(r,{id:Js(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),s=e.edges();i.length>0?(P.debug("Cluster identified",r,ur),s.forEach(o=>{const a=Hi(o.v,r),n=Hi(o.w,r);a^n&&(P.debug("Edge: ",o," leaves cluster ",r),P.debug("Descendants of XXX ",r,": ",ur.get(r)),Ft.get(r).externalConnections=!0)})):P.debug("Not a cluster ",r,ur)});for(let r of Ft.keys()){const i=Ft.get(r).id,s=e.parent(i);s!==r&&Ft.has(s)&&!Ft.get(s).externalConnections&&(Ft.get(r).id=s);const o=e.edges().some(a=>a.v===r);if(i&&Ft.get(r)?.externalConnections&&o&&Ep(e,i,r)){const a=Nv(e,r,e.parent(i));a&&(Ft.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let s=r.v,o=r.w;if(P.debug("Fix XXX",Ft,"ids:",r.v,r.w,"Translating: ",Ft.get(r.v)," --- ",Ft.get(r.w)),Ft.get(r.v)||Ft.get(r.w)){if(P.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),s=Ec(r.v),o=Ec(r.w),e.removeEdge(r.v,r.w,r.name),s!==r.v){const a=e.parent(s);Ft.get(a).externalConnections=!0,i.fromCluster=r.v}if(o!==r.w){const a=e.parent(o);Ft.get(a).externalConnections=!0,i.toCluster=r.w}P.debug("Fix Replacing with XXX",s,o,r.name),e.setEdge(s,o,i,r.name)}}),Mp(e,0),P.trace(Ft)},"adjustClustersAndEdges"),Mp=g((e,t)=>{if(t>10){P.error("Bailing out");return}let r=e.nodes(),i=!1;for(const s of r){const o=e.children(s);i=i||o.length>0}if(!i){P.debug("Done, no node has children",e.nodes());return}P.debug("Nodes = ",r,t);for(const s of r)if(P.debug("Extracting node",s,Ft,Ft.has(s)&&!Ft.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!Ft.has(s))P.debug("Not a cluster",s,t);else if(!Ft.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){P.debug("Cluster without external connections, without a parent and with children",s,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Ft.get(s)?.clusterData?.dir&&(a=Ft.get(s).clusterData.dir,P.debug("Fixing dir",Ft.get(s).clusterData.dir,a));const n=new wo({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Lp(s,e,n,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:Ft.get(s).clusterData,label:Ft.get(s).label,graph:n})}else P.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!Ft.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),P.debug(Ft);r=e.nodes(),P.debug("New list of nodes",r);for(const s of r){const o=e.node(s);P.debug(" Now next level",s,o),o?.clusterNode&&Mp(o.graph,t+1)}},"extractor"),Ap=g((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=Ap(e,s);r=[...r,...o]}),r},"sorter"),iM=g(e=>Ap(e,e.children()),"sortNodesByHierarchy"),Ep=g((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ft.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Nv=g((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Hi(s,r))continue;const o=Js(s,e,t);if(o&&!Ep(e,o,t))return o}return null},"findSafeAnchorNode");function $p({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??dl;return g(async function(l,c,h,d){const u=c.select("g");rp(u,l.markers,l.type,l.diagramId),cl();const f={element:u,helpers:h,options:d};f.preparedLayout=await e?.(l,f);const y=await a(l,f),m=await r(l,f),x={...f,measure:y};i?await i(l,x,m):await ul(l,x,o),await s?.(l,x,m)},"render")}g($p,"createCommonLayoutRenderer");function cl(){sw(),xw(),uw(),Iv()}g(cl,"clearLayoutRenderState");async function dl(e,{element:t}){return await vp(t,e)}g(dl,"defaultMeasureLayout");async function ul(e,t,r={}){const{measure:i}=t,{groups:s}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await Op(s,a,t,r);const o=Pp(e.nodes);for(const a of e.edges)Ip(a,r)||await Rp(s,a,o,e,r,t)}g(ul,"paintLayoutData");async function Op(e,t,r,i){t.clusterNode?Jh(t):Dp(t,r,i)?await Zg(e.clusters,t):Jh(t)}g(Op,"paintLayoutNode");function Dp(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}g(Dp,"shouldPaintAsCluster");function Pp(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}g(Pp,"buildNodeLookup");function Ip(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}g(Ip,"shouldSkipPaintEdge");async function Rp(e,t,r,i,s,o){const a=Jg(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Qa(t.start,t,r,o,s),Qa(t.end,t,r,o,s),i.diagramId,qp(t,s));Kg(t)&&(Gr.has(t.id)||await tl(e.edgeLabels,t),Np(t,a))}g(Rp,"paintLayoutEdge");function Qa(e,t,r,i,s){return s.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}g(Qa,"getRenderedNode");function qp(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}g(qp,"shouldSkipIntersect");function Np(e,t){const r=t?.updatedPath??t?.originalPath,i=Rt(),{subGraphTitleTotalMargin:s}=go({flowchart:i.flowchart??{}});if(e.label){const o=Gr.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e?.startLabelLeft){const o=Nt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Nt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Nt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Nt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}g(Np,"positionRenderedEdgeLabel");function Wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}g(Wp,"getDefaultExportFromCjs");var Gt={},fs={},Ve={},$c;function Jr(){if($c)return Ve;$c=1;function e(a){return typeof a>"u"||a===null}g(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}g(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}g(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;cd&&(c=" ... ",o=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}g(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}g(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const u=Math.min(s.line+o.linesAfter,l.length).toString().length,f=o.maxLength-(o.indent+u+3);for(let m=1;m<=o.linesBefore&&!(h-m<0);m++){const x=t(s.buffer,n[h-m],l[h-m],s.position-(n[h]-n[h-m]),f);d=e.repeat(" ",o.indent)+r((s.line-m+1).toString(),u)+" | "+x.str+` `+d}const y=t(s.buffer,n[h],l[h],s.position,f);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),u)+" | "+y.str+` @@ -296,8 +296,8 @@ ${s.join(` `+w.slice(U,Q),U=Q+1),V=lt;return ot+=` `,w.length-U>D&&V>U?ot+=w.slice(U,V)+` `+w.slice(V+1):ot+=w.slice(U),ot.slice(1)}g(ue,"foldLine");function ai(w){let D="",K=0;for(let j=0;j=65536?j+=2:j++){K=Ot(w,j);const U=E[K];!U&&ht(K)?(D+=w[j],K>=65536&&(D+=w[j+1])):D+=U||$(K)}return D}g(ai,"escapeString");function Fr(w,D,K){let j="";const U=w.tag;for(let Q=0,V=K.length;Q"u"&&Y(w,D,null,!1,!1))&&(j!==""&&(j+=","+(w.condenseFlow?"":" ")),j+=w.dump)}w.tag=U,w.dump="["+j+"]"}g(Fr,"writeFlowSequence");function Mr(w,D,K,j){let U="";const Q=w.tag;for(let V=0,lt=K.length;V"u"&&Y(w,D+1,null,!0,!0,!1,!0))&&((!j||U!=="")&&(U+=xt(w,D)),w.dump&&n===w.dump.charCodeAt(0)?U+="-":U+="- ",U+=w.dump)}w.tag=Q,w.dump=U||"[]"}g(Mr,"writeBlockSequence");function ni(w,D,K){let j="";const U=w.tag,Q=Object.keys(K);for(let V=0,lt=Q.length;V1024&&(ot+="? "),ot+=w.dump+(w.condenseFlow?'"':"")+":"+(w.condenseFlow?"":" "),Y(w,D,gt,!1,!1)&&(ot+=w.dump,j+=ot))}w.tag=U,w.dump="{"+j+"}"}g(ni,"writeFlowMapping");function p(w,D,K,j){let U="";const Q=w.tag,V=Object.keys(K);if(w.sortKeys===!0)V.sort();else if(typeof w.sortKeys=="function")V.sort(w.sortKeys);else if(w.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let lt=0,ot=V.length;lt1024;Dt&&(w.dump&&n===w.dump.charCodeAt(0)?ft+="?":ft+="? "),ft+=w.dump,Dt&&(ft+=xt(w,D)),Y(w,D+1,Lt,!0,Dt)&&(w.dump&&n===w.dump.charCodeAt(0)?ft+=":":ft+=": ",ft+=w.dump,U+=ft)}w.tag=Q,w.dump=U||"{}"}g(p,"writeBlockMapping");function A(w,D,K){const j=K?w.explicitTypes:w.implicitTypes;for(let U=0,Q=j.length;U tag resolver accepts not "'+lt+'" style');w.dump=ot}return!0}}return!1}g(A,"detectType");function Y(w,D,K,j,U,Q,V){w.tag=null,w.dump=K,A(w,K,!1)||A(w,K,!0);const lt=i.call(w.dump),ot=j;j&&(j=w.flowLevel<0||w.flowLevel>D);const ft=lt==="[object Object]"||lt==="[object Array]";let gt,Lt;if(ft&&(gt=w.duplicates.indexOf(K),Lt=gt!==-1),(w.tag!==null&&w.tag!=="?"||Lt||w.indent!==2&&D>0)&&(U=!1),Lt&&w.usedDuplicates[gt])w.dump="*ref_"+gt;else{if(ft&&Lt&&!w.usedDuplicates[gt]&&(w.usedDuplicates[gt]=!0),lt==="[object Object]")j&&Object.keys(w.dump).length!==0?(p(w,D,w.dump,U),Lt&&(w.dump="&ref_"+gt+w.dump)):(ni(w,D,w.dump),Lt&&(w.dump="&ref_"+gt+" "+w.dump));else if(lt==="[object Array]")j&&w.dump.length!==0?(w.noArrayIndent&&!V&&D>0?Mr(w,D-1,w.dump,U):Mr(w,D,w.dump,U),Lt&&(w.dump="&ref_"+gt+w.dump)):(Fr(w,D,w.dump),Lt&&(w.dump="&ref_"+gt+" "+w.dump));else if(lt==="[object String]")w.tag!=="?"&&si(w,w.dump,D,Q,ot);else{if(lt==="[object Undefined]")return!1;if(w.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+lt)}if(w.tag!==null&&w.tag!=="?"){let Dt=encodeURI(w.tag[0]==="!"?w.tag.slice(1):w.tag).replace(/!/g,"%21");w.tag[0]==="!"?Dt="!"+Dt:Dt.slice(0,18)==="tag:yaml.org,2002:"?Dt="!!"+Dt.slice(18):Dt="!<"+Dt+">",w.dump=Dt+" "+w.dump}}return!0}g(Y,"writeNode");function G(w,D){const K=[],j=[];W(w,K,j);const U=j.length;for(let Q=0;Q{for(const t of e)Yi[t.name]=t},"registerLayoutLoaders"),Uv=g(()=>{Up([{name:"dagre",loader:g(async()=>await _t(()=>import("./dagre-3AP2YEHR-DkuX21S_.js"),__vite__mapDeps([4,5,1,2,3])),"loader")},{name:"swimlane",loader:g(async()=>await _t(()=>import("./swimlanes-XN3QIQJK-BzHQBVgg.js"),__vite__mapDeps([6,1,2,3])),"loader")},{name:"cose-bilkent",loader:g(async()=>await _t(()=>import("./cose-bilkent-JH36ORCC-D7cfmkHX.js"),__vite__mapDeps([7,8,1,2,3])),"loader")}])},"registerDefaultLayoutLoaders");Uv();var yM=g(async(e,t)=>{if(!(e.layoutAlgorithm in Yi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Yi[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,jv,{algorithm:r.algorithm})},"render"),mM=g((e="",{fallback:t="dagre"}={})=>{if(e in Yi)return e;if(t in Yi)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ml="comm",Gp="rule",Xp="decl",Gv="@media",Xv="@import",Vv="@supports",Zv="@namespace",Ja="@keyframes",Vp="@layer",Kv="@scope",Qv=Math.abs,Oi=String.fromCharCode;function Zp(e){return e.trim()}function tn(e,t,r){return e.replace(t,r)}function zr(e,t){return e.charCodeAt(t)|0}function Xr(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function Kp(e){return e.length}function gs(e,t){return t.push(e),e}var To=1,Vr=1,Qp=0,he=0,Wt=0,ei="";function Al(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:To,column:Vr,length:a,return:"",siblings:n}}function Jv(){return Wt}function tB(){return Wt=he>0?zr(ei,--he):0,Vr--,Wt===10&&(Vr=1,To--),Wt}function me(){return Wt=he2||ji(Wt)>3?"":" "}function sB(e,t){for(;--t&&me()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return _o(e,vs()+(t<6&&Je()==32&&me()==32))}function en(e){for(;me();)switch(Wt){case e:return he;case 34:case 39:e!==34&&e!==39&&en(Wt);break;case 40:e===41&&en(e);break;case 92:me();break}return he}function oB(e,t){for(;me()&&e+Wt!==57;)if(e+Wt===84&&Je()===47)break;return"/*"+_o(t,he-1)+"*"+Oi(e===47?e:me())}function aB(e){for(;!ji(Je());)me();return _o(e,he)}function nB(e){return rB(Bs("",null,null,null,[""],e=eB(e),0,[0],e))}function Bs(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,u=0,f=0,y=0,m=1,x=1,C=1,k=0,S=0,T="",_=s,L=o,M=i,B=T;x;)switch(y=S,S=me()){case 40:y!=108&&zr(B,d-1)==58?(k++,B+="("):B+=pa(S);break;case 41:k--,B+=")";break;case 34:case 39:case 91:B+=pa(S);break;case 9:case 10:case 13:case 32:if(k>0){B+=Oi(S);break}B+=iB(y);break;case 92:B+=sB(vs()-1,7);continue;case 47:switch(Je()){case 42:case 47:gs(lB(oB(me(),vs()),t,r,l),l),(ji(y||1)==5||ji(Je()||1)==5)&&_e(B)&&Xr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=_e(B)*C;case 125*m:case 59:case 0:if(k>0&&S){B+=Oi(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(B=tn(B,/\f/g,"")),f>0&&(_e(B)-d||m===0)&&gs(f>32?od(B+";",i,r,d-1,l):od(tn(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(gs(M=sd(B,t,r,c,h,s,n,T,_=[],L=[],d,o),o),S===123)if(h===0)Bs(B,t,M,M,_,o,d,n,L);else{switch(u){case 99:if(zr(B,3)===110)break;case 108:if(zr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Bs(e,M,M,i&&gs(sd(e,M,M,0,0,s,n,T,s,_=[],d,L),L),s,L,d,n,i?_:L):Bs(B,M,M,M,[""],L,0,n,L)}}c=h=f=0,m=C=1,T=B="",d=a;break;case 58:d=1+_e(B),f=y;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&tB()==125)continue}switch(B+=Oi(S),S*m){case 38:C=h>0?1:(B+="\f",-1);break;case 44:if(k>0)break;n[c++]=(_e(B)-1)*C,C=1;break;case 64:Je()===45&&(B+=pa(me())),u=Je(),h=d=_e(T=B+=aB(vs())),S++;break;case 45:y===45&&_e(B)==2&&(m=0)}}return o}function sd(e,t,r,i,s,o,a,n,l,c,h,d){for(var u=s-1,f=s===0?o:[""],y=Kp(f),m=0,x=0,C=0;m0?f[k]+" "+S:tn(S,/&\f/g,f[k])))&&(l[C++]=T);return Al(e,t,r,s===0?Gp:n,l,c,h,d)}function lB(e,t,r,i){return Al(e,t,r,Ml,Oi(Jv()),Xr(e,2,-2),0,i)}function od(e,t,r,i,s){return Al(e,t,r,Xp,Xr(e,0,i),Xr(e,i+1,-1),i,s)}function rn(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),uB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./c4Diagram-UCG6FXSJ-B9GHaMKc.js");return{diagram:t}},__vite__mapDeps([9,10,1,2,3]));return{id:Jp,diagram:e}},"loader"),fB={id:Jp,detector:dB,loader:uB},gB=fB,ty="flowchart",pB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),yB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-DWLybnX0.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ty,diagram:e}},"loader"),mB={id:ty,detector:pB,loader:yB},xB=mB,ey="flowchart-v2",CB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),bB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-DWLybnX0.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ey,diagram:e}},"loader"),kB={id:ey,detector:CB,loader:bB},wB=kB,ry="swimlane",SB=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),TB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VK2B7HYN-DwZGbRdg.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,3,15,1,2]));return{id:ry,diagram:e}},"loader"),_B={id:ry,detector:SB,loader:TB},vB=_B,iy="er",BB=g(e=>/^\s*erDiagram/.test(e),"detector"),LB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./erDiagram-SSCWMZ5O-Bukenpe0.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,1,2,3]));return{id:iy,diagram:e}},"loader"),FB={id:iy,detector:BB,loader:LB},MB=FB,sy="gitGraph",AB=g(e=>/^\s*gitGraph/.test(e),"detector"),EB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-JhPLgbup.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,1,2,3]));return{id:sy,diagram:e}},"loader"),$B={id:sy,detector:AB,loader:EB},OB=$B,oy="gantt",DB=g(e=>/^\s*gantt/.test(e),"detector"),PB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-C2aeZeAI.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,1,2,3]));return{id:oy,diagram:e}},"loader"),IB={id:oy,detector:DB,loader:PB},RB=IB,ay="info",qB=g(e=>/^\s*info/.test(e),"detector"),NB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./infoDiagram-RXCK75RN-DdCBBDr8.js");return{diagram:t}},__vite__mapDeps([26,21,1,2,3]));return{id:ay,diagram:e}},"loader"),WB={id:ay,detector:qB,loader:NB},ny="pie",zB=g(e=>/^\s*pie/.test(e),"detector"),HB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-CJ0uXwph.js");return{diagram:t}},__vite__mapDeps([27,20,21,1,2,28,29,24,3]));return{id:ny,diagram:e}},"loader"),YB={id:ny,detector:zB,loader:HB},ly="quadrantChart",jB=g(e=>/^\s*quadrantChart/.test(e),"detector"),UB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-DbtbJAe8.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,1,2,3]));return{id:ly,diagram:e}},"loader"),GB={id:ly,detector:jB,loader:UB},XB=GB,hy="xychart",VB=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),ZB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-Do2Nsb25.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,1,2,3]));return{id:hy,diagram:e}},"loader"),KB={id:hy,detector:VB,loader:ZB},QB=KB,cy="requirement",JB=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),tL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./requirementDiagram-EFPCY7ZU-CmPbgctE.js");return{diagram:t}},__vite__mapDeps([32,13,14,1,2,3]));return{id:cy,diagram:e}},"loader"),eL={id:cy,detector:JB,loader:tL},rL=eL,dy="sequence",iL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),sL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-CBJOzdkc.js");return{diagram:t}},__vite__mapDeps([33,19,10,1,2,3]));return{id:dy,diagram:e}},"loader"),oL={id:dy,detector:iL,loader:sL},aL=oL,uy="class",nL=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),lL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-DTDB5LWJ-C3txtkaA.js");return{diagram:t}},__vite__mapDeps([34,35,12,13,14,10,3,1,2]));return{id:uy,diagram:e}},"loader"),hL={id:uy,detector:nL,loader:lL},cL=hL,fy="classDiagram",dL=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),uL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-v2-JRS7N3AN-C3txtkaA.js");return{diagram:t}},__vite__mapDeps([36,35,12,13,14,10,3,1,2]));return{id:fy,diagram:e}},"loader"),fL={id:fy,detector:dL,loader:uL},gL=fL,gy="state",pL=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),yL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-HBIQ2CUA-CAMMINP1.js");return{diagram:t}},__vite__mapDeps([37,38,13,14,10,3,5,1,2]));return{id:gy,diagram:e}},"loader"),mL={id:gy,detector:pL,loader:yL},xL=mL,py="stateDiagram",CL=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),bL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4QOOHH4V-D31cKkvj.js");return{diagram:t}},__vite__mapDeps([39,38,13,14,10,3,1,2]));return{id:py,diagram:e}},"loader"),kL={id:py,detector:CL,loader:bL},wL=kL,yy="journey",SL=g(e=>/^\s*journey/.test(e),"detector"),TL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./journeyDiagram-EYS64GPL-DmhIyY3b.js");return{diagram:t}},__vite__mapDeps([40,12,10,28,1,2,3]));return{id:yy,diagram:e}},"loader"),_L={id:yy,detector:SL,loader:TL},vL=_L,BL=g((e,t,r)=>{P.debug(`rendering svg for syntax error -`);const i=Xb(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ld(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),my={draw:BL},LL=my,FL={db:{},renderer:my,parser:{parse:g(()=>{},"parse")}},ML=FL,xy="flowchart-elk",AL=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),EL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-DWLybnX0.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:xy,diagram:e}},"loader"),$L={id:xy,detector:AL,loader:EL},OL=$L,Cy="timeline",DL=g(e=>/^\s*timeline/.test(e),"detector"),PL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-CAzR7eP2.js");return{diagram:t}},__vite__mapDeps([41,28,1,2,3]));return{id:Cy,diagram:e}},"loader"),IL={id:Cy,detector:DL,loader:PL},RL=IL,by="mindmap",qL=g(e=>/^\s*mindmap/.test(e),"detector"),NL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./mindmap-definition-FBJOCRG2-D8dmS5cm.js");return{diagram:t}},__vite__mapDeps([42,13,14,1,2,3]));return{id:by,diagram:e}},"loader"),WL={id:by,detector:qL,loader:NL},zL=WL,ky="kanban",HL=g(e=>/^\s*kanban/.test(e),"detector"),YL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./kanban-definition-3QL26DDD-DXzagyyt.js");return{diagram:t}},__vite__mapDeps([43,12,1,2,3]));return{id:ky,diagram:e}},"loader"),jL={id:ky,detector:HL,loader:YL},UL=jL,wy="sankey",GL=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),XL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-X9Hobb6t.js");return{diagram:t}},__vite__mapDeps([44,29,24,1,2,3]));return{id:wy,diagram:e}},"loader"),VL={id:wy,detector:GL,loader:XL},ZL=VL,Sy="packet",KL=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),QL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-BX-mpA_H.js");return{diagram:t}},__vite__mapDeps([45,20,21,1,2,3]));return{id:Sy,diagram:e}},"loader"),JL={id:Sy,detector:KL,loader:QL},Ty="radar",tF=g(e=>/^\s*radar-beta/.test(e),"detector"),eF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-DsxzrkIm.js");return{diagram:t}},__vite__mapDeps([46,20,21,1,2,3]));return{id:Ty,diagram:e}},"loader"),rF={id:Ty,detector:tF,loader:eF},_y="block",iF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),sF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./blockDiagram-NRAW4CY4-DIC9lfxd.js");return{diagram:t}},__vite__mapDeps([47,12,15,1,2,3]));return{id:_y,diagram:e}},"loader"),oF={id:_y,detector:iF,loader:sF},aF=oF,vy="treeView",nF=g(e=>/^\s*treeView-beta/.test(e),"detector"),lF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-BCkTP5l5.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,1,2,3]));return{id:vy,diagram:e}},"loader"),hF={id:vy,detector:nF,loader:lF},cF=hF,By="architecture",dF=g(e=>/^\s*architecture/.test(e),"detector"),uF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-D6LvpbBE.js");return{diagram:t}},__vite__mapDeps([49,20,21,1,2,8,3]));return{id:By,diagram:e}},"loader"),fF={id:By,detector:dF,loader:uF},gF=fF,Ly="eventmodeling",pF=g(e=>/^\s*eventmodeling/.test(e),"detector"),yF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-DS02PJbw.js");return{diagram:t}},__vite__mapDeps([50,20,21,1,2,3]));return{id:Ly,diagram:e}},"loader"),mF={id:Ly,detector:pF,loader:yF},xF=mF,Fy="ishikawa",CF=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),bF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-C9GF3Hkk.js");return{diagram:t}},__vite__mapDeps([51,1,2,3]));return{id:Fy,diagram:e}},"loader"),kF={id:Fy,detector:CF,loader:bF},My="venn",wF=g(e=>/^\s*venn-beta/.test(e),"detector"),SF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-N3z1lGGo.js");return{diagram:t}},__vite__mapDeps([52,1,2,3]));return{id:My,diagram:e}},"loader"),TF={id:My,detector:wF,loader:SF},_F=TF,Ay="treemap",vF=g(e=>/^\s*treemap/.test(e),"detector"),BF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-DpeqeF5i.js");return{diagram:t}},__vite__mapDeps([53,20,14,21,1,2,25,29,24,3]));return{id:Ay,diagram:e}},"loader"),LF={id:Ay,detector:vF,loader:BF},Ey="wardley",FF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),MF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-D4zA5eJ2.js");return{diagram:t}},__vite__mapDeps([54,20,21,1,2,3]));return{id:Ey,diagram:e}},"loader"),AF={id:Ey,detector:FF,loader:MF},EF=AF,$y="cynefin",$F=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),OF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-DF9zxtn7.js");return{diagram:t}},__vite__mapDeps([55,20,21,1,2,3]));return{id:$y,diagram:e}},"loader"),DF={id:$y,detector:$F,loader:OF},Oy="railroad",PF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),IF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-DtMi5zNi.js");return{diagram:t}},__vite__mapDeps([56,57,20,21,1,2,3]));return{id:Oy,diagram:e}},"loader"),RF={id:Oy,detector:PF,loader:IF},Dy="railroadEbnf",qF=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),NF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-Az6pcQU0.js");return{diagram:t}},__vite__mapDeps([58,57,20,21,1,2,3]));return{id:Dy,diagram:e}},"loader"),WF={id:Dy,detector:qF,loader:NF},Py="railroadAbnf",zF=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),HF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-pTXCrzR-.js");return{diagram:t}},__vite__mapDeps([59,57,20,21,1,2,3]));return{id:Py,diagram:e}},"loader"),YF={id:Py,detector:zF,loader:HF},Iy="railroadPeg",jF=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),UF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-wf7jamBk.js");return{diagram:t}},__vite__mapDeps([60,57,20,21,1,2,3]));return{id:Iy,diagram:e}},"loader"),GF={id:Iy,detector:jF,loader:UF},ad=!1,vo=g(()=>{ad||(ad=!0,Es("error",ML,e=>e.toLowerCase().trim()==="error"),Es("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xa(OL,zL,gF),xa(gB,UL,gL,cL,MB,RB,WB,YB,rL,aL,vB,wB,xB,RL,OB,wL,xL,vL,XB,ZL,JL,QB,aF,xF,cF,rF,kF,LF,RF,WF,YF,GF,_F,EF,DF))},"addDiagrams"),XF=g(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(pr).map(async([r,{detector:i,loader:s}])=>{if(s)try{wa(r)}catch{try{const{diagram:o,id:a}=await s();Es(a,o,i)}catch(o){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete pr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),VF="graphics-document document";function Ry(e,t){e.attr("role",VF),t!==""&&e.attr("aria-roledescription",t)}g(Ry,"setA11yDiagramInfo");function qy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(qy,"addSVGa11yTitleDescription");var sn=class Ny{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static{g(this,"Diagram")}static async fromText(t,r={}){const i=Rt(),s=ln(t,i);t=yk(t)+` +`:""}return g(tt,"dump2"),ga.dump=tt,ga}g(Yp,"requireDumper");var id;function jp(){if(id)return Gt;id=1;const e=Hp(),t=Yp();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return g(r,"renamed"),Gt.Type=Qt(),Gt.Schema=fl(),Gt.FAILSAFE_SCHEMA=ml(),Gt.JSON_SCHEMA=wl(),Gt.CORE_SCHEMA=Sl(),Gt.DEFAULT_SCHEMA=So(),Gt.load=e.load,Gt.loadAll=e.loadAll,Gt.dump=t.dump,Gt.YAMLException=ti(),Gt.types={binary:vl(),float:kl(),map:yl(),null:xl(),pairs:Ll(),set:Fl(),timestamp:Tl(),bool:Cl(),int:bl(),merge:_l(),omap:Bl(),seq:pl(),str:gl()},Gt.safeLoad=r("safeLoad","load"),Gt.safeLoadAll=r("safeLoadAll","loadAll"),Gt.safeDump=r("safeDump","dump"),Gt}g(jp,"requireJsYaml");var Wv=jp(),zv=Wp(Wv),{Type:sM,Schema:oM,FAILSAFE_SCHEMA:aM,JSON_SCHEMA:Hv,CORE_SCHEMA:nM,DEFAULT_SCHEMA:lM,load:Yv,loadAll:hM,dump:cM,YAMLException:dM,types:uM,safeLoad:fM,safeLoadAll:gM,safeDump:pM}=zv,jv={common:Xi,getConfig:Rt,insertCluster:Zg,insertEdge:Jg,insertEdgeLabel:tl,insertMarkers:rp,insertNode:Jn,interpolateToCurve:Mn,labelHelper:ct,log:P,positionEdgeLabel:Cw},Yi={},Up=g(e=>{for(const t of e)Yi[t.name]=t},"registerLayoutLoaders"),Uv=g(()=>{Up([{name:"dagre",loader:g(async()=>await _t(()=>import("./dagre-3AP2YEHR-DNRBAAmc.js"),__vite__mapDeps([4,5,1,2,3])),"loader")},{name:"swimlane",loader:g(async()=>await _t(()=>import("./swimlanes-XN3QIQJK-D3OEEV8W.js"),__vite__mapDeps([6,1,2,3])),"loader")},{name:"cose-bilkent",loader:g(async()=>await _t(()=>import("./cose-bilkent-JH36ORCC-Du_KHUbL.js"),__vite__mapDeps([7,8,1,2,3])),"loader")}])},"registerDefaultLayoutLoaders");Uv();var yM=g(async(e,t)=>{if(!(e.layoutAlgorithm in Yi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Yi[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,jv,{algorithm:r.algorithm})},"render"),mM=g((e="",{fallback:t="dagre"}={})=>{if(e in Yi)return e;if(t in Yi)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ml="comm",Gp="rule",Xp="decl",Gv="@media",Xv="@import",Vv="@supports",Zv="@namespace",Ja="@keyframes",Vp="@layer",Kv="@scope",Qv=Math.abs,Oi=String.fromCharCode;function Zp(e){return e.trim()}function tn(e,t,r){return e.replace(t,r)}function zr(e,t){return e.charCodeAt(t)|0}function Xr(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function Kp(e){return e.length}function gs(e,t){return t.push(e),e}var To=1,Vr=1,Qp=0,he=0,Wt=0,ei="";function Al(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:To,column:Vr,length:a,return:"",siblings:n}}function Jv(){return Wt}function tB(){return Wt=he>0?zr(ei,--he):0,Vr--,Wt===10&&(Vr=1,To--),Wt}function me(){return Wt=he2||ji(Wt)>3?"":" "}function sB(e,t){for(;--t&&me()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return _o(e,vs()+(t<6&&Je()==32&&me()==32))}function en(e){for(;me();)switch(Wt){case e:return he;case 34:case 39:e!==34&&e!==39&&en(Wt);break;case 40:e===41&&en(e);break;case 92:me();break}return he}function oB(e,t){for(;me()&&e+Wt!==57;)if(e+Wt===84&&Je()===47)break;return"/*"+_o(t,he-1)+"*"+Oi(e===47?e:me())}function aB(e){for(;!ji(Je());)me();return _o(e,he)}function nB(e){return rB(Bs("",null,null,null,[""],e=eB(e),0,[0],e))}function Bs(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,u=0,f=0,y=0,m=1,x=1,C=1,k=0,S=0,T="",_=s,L=o,M=i,B=T;x;)switch(y=S,S=me()){case 40:y!=108&&zr(B,d-1)==58?(k++,B+="("):B+=pa(S);break;case 41:k--,B+=")";break;case 34:case 39:case 91:B+=pa(S);break;case 9:case 10:case 13:case 32:if(k>0){B+=Oi(S);break}B+=iB(y);break;case 92:B+=sB(vs()-1,7);continue;case 47:switch(Je()){case 42:case 47:gs(lB(oB(me(),vs()),t,r,l),l),(ji(y||1)==5||ji(Je()||1)==5)&&_e(B)&&Xr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=_e(B)*C;case 125*m:case 59:case 0:if(k>0&&S){B+=Oi(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(B=tn(B,/\f/g,"")),f>0&&(_e(B)-d||m===0)&&gs(f>32?od(B+";",i,r,d-1,l):od(tn(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(gs(M=sd(B,t,r,c,h,s,n,T,_=[],L=[],d,o),o),S===123)if(h===0)Bs(B,t,M,M,_,o,d,n,L);else{switch(u){case 99:if(zr(B,3)===110)break;case 108:if(zr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Bs(e,M,M,i&&gs(sd(e,M,M,0,0,s,n,T,s,_=[],d,L),L),s,L,d,n,i?_:L):Bs(B,M,M,M,[""],L,0,n,L)}}c=h=f=0,m=C=1,T=B="",d=a;break;case 58:d=1+_e(B),f=y;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&tB()==125)continue}switch(B+=Oi(S),S*m){case 38:C=h>0?1:(B+="\f",-1);break;case 44:if(k>0)break;n[c++]=(_e(B)-1)*C,C=1;break;case 64:Je()===45&&(B+=pa(me())),u=Je(),h=d=_e(T=B+=aB(vs())),S++;break;case 45:y===45&&_e(B)==2&&(m=0)}}return o}function sd(e,t,r,i,s,o,a,n,l,c,h,d){for(var u=s-1,f=s===0?o:[""],y=Kp(f),m=0,x=0,C=0;m0?f[k]+" "+S:tn(S,/&\f/g,f[k])))&&(l[C++]=T);return Al(e,t,r,s===0?Gp:n,l,c,h,d)}function lB(e,t,r,i){return Al(e,t,r,Ml,Oi(Jv()),Xr(e,2,-2),0,i)}function od(e,t,r,i,s){return Al(e,t,r,Xp,Xr(e,0,i),Xr(e,i+1,-1),i,s)}function rn(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),uB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./c4Diagram-UCG6FXSJ-BZuC3xtH.js");return{diagram:t}},__vite__mapDeps([9,10,1,2,3]));return{id:Jp,diagram:e}},"loader"),fB={id:Jp,detector:dB,loader:uB},gB=fB,ty="flowchart",pB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),yB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-D6_Z_lfU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ty,diagram:e}},"loader"),mB={id:ty,detector:pB,loader:yB},xB=mB,ey="flowchart-v2",CB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),bB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-D6_Z_lfU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ey,diagram:e}},"loader"),kB={id:ey,detector:CB,loader:bB},wB=kB,ry="swimlane",SB=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),TB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VK2B7HYN-DsX8zbP8.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,3,15,1,2]));return{id:ry,diagram:e}},"loader"),_B={id:ry,detector:SB,loader:TB},vB=_B,iy="er",BB=g(e=>/^\s*erDiagram/.test(e),"detector"),LB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./erDiagram-SSCWMZ5O-DzkblHwz.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,1,2,3]));return{id:iy,diagram:e}},"loader"),FB={id:iy,detector:BB,loader:LB},MB=FB,sy="gitGraph",AB=g(e=>/^\s*gitGraph/.test(e),"detector"),EB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-t2_RmnTi.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,1,2,3]));return{id:sy,diagram:e}},"loader"),$B={id:sy,detector:AB,loader:EB},OB=$B,oy="gantt",DB=g(e=>/^\s*gantt/.test(e),"detector"),PB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-DcpRnqwp.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,1,2,3]));return{id:oy,diagram:e}},"loader"),IB={id:oy,detector:DB,loader:PB},RB=IB,ay="info",qB=g(e=>/^\s*info/.test(e),"detector"),NB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./infoDiagram-RXCK75RN-Cn4b9A5u.js");return{diagram:t}},__vite__mapDeps([26,21,1,2,3]));return{id:ay,diagram:e}},"loader"),WB={id:ay,detector:qB,loader:NB},ny="pie",zB=g(e=>/^\s*pie/.test(e),"detector"),HB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-CSu4VKw9.js");return{diagram:t}},__vite__mapDeps([27,20,21,1,2,28,29,24,3]));return{id:ny,diagram:e}},"loader"),YB={id:ny,detector:zB,loader:HB},ly="quadrantChart",jB=g(e=>/^\s*quadrantChart/.test(e),"detector"),UB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-DwlY00_z.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,1,2,3]));return{id:ly,diagram:e}},"loader"),GB={id:ly,detector:jB,loader:UB},XB=GB,hy="xychart",VB=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),ZB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-Dqif0X1Z.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,1,2,3]));return{id:hy,diagram:e}},"loader"),KB={id:hy,detector:VB,loader:ZB},QB=KB,cy="requirement",JB=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),tL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./requirementDiagram-EFPCY7ZU-CGyZBZTB.js");return{diagram:t}},__vite__mapDeps([32,13,14,1,2,3]));return{id:cy,diagram:e}},"loader"),eL={id:cy,detector:JB,loader:tL},rL=eL,dy="sequence",iL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),sL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-DTAyNeme.js");return{diagram:t}},__vite__mapDeps([33,19,10,1,2,3]));return{id:dy,diagram:e}},"loader"),oL={id:dy,detector:iL,loader:sL},aL=oL,uy="class",nL=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),lL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-DTDB5LWJ-D8QxhnwF.js");return{diagram:t}},__vite__mapDeps([34,35,12,13,14,10,3,1,2]));return{id:uy,diagram:e}},"loader"),hL={id:uy,detector:nL,loader:lL},cL=hL,fy="classDiagram",dL=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),uL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-v2-JRS7N3AN-D8QxhnwF.js");return{diagram:t}},__vite__mapDeps([36,35,12,13,14,10,3,1,2]));return{id:fy,diagram:e}},"loader"),fL={id:fy,detector:dL,loader:uL},gL=fL,gy="state",pL=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),yL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-HBIQ2CUA-C3_d9P6D.js");return{diagram:t}},__vite__mapDeps([37,38,13,14,10,3,5,1,2]));return{id:gy,diagram:e}},"loader"),mL={id:gy,detector:pL,loader:yL},xL=mL,py="stateDiagram",CL=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),bL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4QOOHH4V-BoO7sp2R.js");return{diagram:t}},__vite__mapDeps([39,38,13,14,10,3,1,2]));return{id:py,diagram:e}},"loader"),kL={id:py,detector:CL,loader:bL},wL=kL,yy="journey",SL=g(e=>/^\s*journey/.test(e),"detector"),TL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./journeyDiagram-EYS64GPL-Bznj053h.js");return{diagram:t}},__vite__mapDeps([40,12,10,28,1,2,3]));return{id:yy,diagram:e}},"loader"),_L={id:yy,detector:SL,loader:TL},vL=_L,BL=g((e,t,r)=>{P.debug(`rendering svg for syntax error +`);const i=Xb(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ld(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),my={draw:BL},LL=my,FL={db:{},renderer:my,parser:{parse:g(()=>{},"parse")}},ML=FL,xy="flowchart-elk",AL=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),EL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-D6_Z_lfU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:xy,diagram:e}},"loader"),$L={id:xy,detector:AL,loader:EL},OL=$L,Cy="timeline",DL=g(e=>/^\s*timeline/.test(e),"detector"),PL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-S237vnu4.js");return{diagram:t}},__vite__mapDeps([41,28,1,2,3]));return{id:Cy,diagram:e}},"loader"),IL={id:Cy,detector:DL,loader:PL},RL=IL,by="mindmap",qL=g(e=>/^\s*mindmap/.test(e),"detector"),NL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./mindmap-definition-FBJOCRG2-OFTg7WuH.js");return{diagram:t}},__vite__mapDeps([42,13,14,1,2,3]));return{id:by,diagram:e}},"loader"),WL={id:by,detector:qL,loader:NL},zL=WL,ky="kanban",HL=g(e=>/^\s*kanban/.test(e),"detector"),YL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./kanban-definition-3QL26DDD-gEE7iVwG.js");return{diagram:t}},__vite__mapDeps([43,12,1,2,3]));return{id:ky,diagram:e}},"loader"),jL={id:ky,detector:HL,loader:YL},UL=jL,wy="sankey",GL=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),XL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-Djxn8nYX.js");return{diagram:t}},__vite__mapDeps([44,29,24,1,2,3]));return{id:wy,diagram:e}},"loader"),VL={id:wy,detector:GL,loader:XL},ZL=VL,Sy="packet",KL=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),QL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-DnTJZ40O.js");return{diagram:t}},__vite__mapDeps([45,20,21,1,2,3]));return{id:Sy,diagram:e}},"loader"),JL={id:Sy,detector:KL,loader:QL},Ty="radar",tF=g(e=>/^\s*radar-beta/.test(e),"detector"),eF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-DqI3S6m6.js");return{diagram:t}},__vite__mapDeps([46,20,21,1,2,3]));return{id:Ty,diagram:e}},"loader"),rF={id:Ty,detector:tF,loader:eF},_y="block",iF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),sF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./blockDiagram-NRAW4CY4-BNGA-QWb.js");return{diagram:t}},__vite__mapDeps([47,12,15,1,2,3]));return{id:_y,diagram:e}},"loader"),oF={id:_y,detector:iF,loader:sF},aF=oF,vy="treeView",nF=g(e=>/^\s*treeView-beta/.test(e),"detector"),lF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-95PLVM0c.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,1,2,3]));return{id:vy,diagram:e}},"loader"),hF={id:vy,detector:nF,loader:lF},cF=hF,By="architecture",dF=g(e=>/^\s*architecture/.test(e),"detector"),uF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-BvF0UgoH.js");return{diagram:t}},__vite__mapDeps([49,20,21,1,2,8,3]));return{id:By,diagram:e}},"loader"),fF={id:By,detector:dF,loader:uF},gF=fF,Ly="eventmodeling",pF=g(e=>/^\s*eventmodeling/.test(e),"detector"),yF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-Cps0EaEU.js");return{diagram:t}},__vite__mapDeps([50,20,21,1,2,3]));return{id:Ly,diagram:e}},"loader"),mF={id:Ly,detector:pF,loader:yF},xF=mF,Fy="ishikawa",CF=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),bF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-CZhPeyom.js");return{diagram:t}},__vite__mapDeps([51,1,2,3]));return{id:Fy,diagram:e}},"loader"),kF={id:Fy,detector:CF,loader:bF},My="venn",wF=g(e=>/^\s*venn-beta/.test(e),"detector"),SF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-BElDUyH9.js");return{diagram:t}},__vite__mapDeps([52,1,2,3]));return{id:My,diagram:e}},"loader"),TF={id:My,detector:wF,loader:SF},_F=TF,Ay="treemap",vF=g(e=>/^\s*treemap/.test(e),"detector"),BF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-TJJN2czJ.js");return{diagram:t}},__vite__mapDeps([53,20,14,21,1,2,25,29,24,3]));return{id:Ay,diagram:e}},"loader"),LF={id:Ay,detector:vF,loader:BF},Ey="wardley",FF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),MF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-C5SVPYNO.js");return{diagram:t}},__vite__mapDeps([54,20,21,1,2,3]));return{id:Ey,diagram:e}},"loader"),AF={id:Ey,detector:FF,loader:MF},EF=AF,$y="cynefin",$F=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),OF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-BfZ2WMeD.js");return{diagram:t}},__vite__mapDeps([55,20,21,1,2,3]));return{id:$y,diagram:e}},"loader"),DF={id:$y,detector:$F,loader:OF},Oy="railroad",PF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),IF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-E1VZdf0g.js");return{diagram:t}},__vite__mapDeps([56,57,20,21,1,2,3]));return{id:Oy,diagram:e}},"loader"),RF={id:Oy,detector:PF,loader:IF},Dy="railroadEbnf",qF=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),NF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-CG3VCHMu.js");return{diagram:t}},__vite__mapDeps([58,57,20,21,1,2,3]));return{id:Dy,diagram:e}},"loader"),WF={id:Dy,detector:qF,loader:NF},Py="railroadAbnf",zF=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),HF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-DEfrkFuI.js");return{diagram:t}},__vite__mapDeps([59,57,20,21,1,2,3]));return{id:Py,diagram:e}},"loader"),YF={id:Py,detector:zF,loader:HF},Iy="railroadPeg",jF=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),UF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-COpW3oto.js");return{diagram:t}},__vite__mapDeps([60,57,20,21,1,2,3]));return{id:Iy,diagram:e}},"loader"),GF={id:Iy,detector:jF,loader:UF},ad=!1,vo=g(()=>{ad||(ad=!0,Es("error",ML,e=>e.toLowerCase().trim()==="error"),Es("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xa(OL,zL,gF),xa(gB,UL,gL,cL,MB,RB,WB,YB,rL,aL,vB,wB,xB,RL,OB,wL,xL,vL,XB,ZL,JL,QB,aF,xF,cF,rF,kF,LF,RF,WF,YF,GF,_F,EF,DF))},"addDiagrams"),XF=g(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(pr).map(async([r,{detector:i,loader:s}])=>{if(s)try{wa(r)}catch{try{const{diagram:o,id:a}=await s();Es(a,o,i)}catch(o){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete pr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),VF="graphics-document document";function Ry(e,t){e.attr("role",VF),t!==""&&e.attr("aria-roledescription",t)}g(Ry,"setA11yDiagramInfo");function qy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(qy,"addSVGa11yTitleDescription");var sn=class Ny{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static{g(this,"Diagram")}static async fromText(t,r={}){const i=Rt(),s=ln(t,i);t=yk(t)+` `;try{wa(s)}catch{const c=zm(s);if(!c)throw new wd(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();Es(h,d)}const{db:o,parser:a,renderer:n,init:l}=wa(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new Ny(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},nd=[],ZF=g(()=>{nd.forEach(e=>{e()}),nd=[]},"attachFunctions"),KF=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Wy(e){const t=e.match(kd);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(` `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(` `):t[2];let s=Yv(i,{schema:Hv})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}g(Wy,"extractFrontMatter");var QF=g(e=>e.replace(/\r\n?/g,` diff --git a/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-D8dmS5cm.js b/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-D8dmS5cm.js rename to apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js index 70e6a3ac3..b092aeb62 100644 --- a/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-D8dmS5cm.js +++ b/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js @@ -1,4 +1,4 @@ -import{g as oe}from"./chunk-XXDRQBXY-GqpBYspR.js";import{s as ae}from"./chunk-POPQ4Y6H-CyRmuplC.js";import{_ as l,l as C,x as ce,y as le,A as he,E as G,c as B,i as F,b3 as de,ab as ge,ac as ue,ad as pe}from"./mermaid.core-BgUXBQ9g.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},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,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,z,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: +import{g as oe}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as ae}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as l,l as C,x as ce,y as le,A as he,E as G,c as B,i as F,b3 as de,ab as ge,ac as ue,ad as pe}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},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,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,z,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: `+y.showPosition()+` Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(M+1)+": Unexpected "+(b==Q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:W,expected:V})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(S[0]){case 1:o.push(b),p.push(y.yytext),r.push(y.yylloc),o.push(S[1]),b=null,K=y.yyleng,u=y.yytext,M=y.yylineno,W=y.yylloc;break;case 2:if(x=this.productions_[S[1]][1],O.$=p[p.length-x],O._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},se&&(O._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),z=this.performAction.apply(O,[u,K,M,L.yy,S[1],p,r].concat(ie)),typeof z<"u")return z;x&&(o=o.slice(0,-1*x*2),p=p.slice(0,-1*x),r=r.slice(0,-1*x)),o.push(this.productions_[S[1]][0]),p.push(O.$),r.push(O._$),ee=$[o[o.length-2]][o[o.length-1]],o.push(ee);break;case 3:return!0}}return!0},"parse")},te=(function(){var D={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||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:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(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:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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),o.length-1&&(this.yylineno-=o.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:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(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:l(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:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-wf7jamBk.js b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-COpW3oto.js similarity index 87% rename from apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-wf7jamBk.js rename to apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-COpW3oto.js index e2db44dcf..d6b26f522 100644 --- a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-wf7jamBk.js +++ b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-COpW3oto.js @@ -1 +1 @@ -import{g as l,r as m,d as a}from"./chunk-SVP7TREG-C35ZI9k-.js";import{p}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{_ as t,l as o}from"./mermaid.core-BgUXBQ9g.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; +import{g as l,r as m,d as a}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as t,l as o}from"./mermaid.core-BusHtpbx.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CJ0uXwph.js b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CSu4VKw9.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CJ0uXwph.js rename to apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CSu4VKw9.js index fb69b019c..661d1c6f9 100644 --- a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CJ0uXwph.js +++ b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CSu4VKw9.js @@ -1,4 +1,4 @@ -import{p as at}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{S as T,K as P,b2 as rt,g as nt,s as it,a as ot,b as st,q as lt,p as ct,_ as g,l as B,c as ut,D as dt,G as gt,a2 as pt,d as ht,r as ft,E as mt}from"./mermaid.core-BgUXBQ9g.js";import{p as vt}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import{d as X}from"./arc-Bm7BOhts.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function St(t,n){return nt?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(P),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),z=Math.min(P,Math.max(-P,l.apply(this,arguments)-D)),k,L=Math.min(Math.abs(z)/s,p.apply(this,arguments)),u=L*(z<0?-1:1),A;for(r=0;r0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(z-s*u)/$:0;r0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:L};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},F=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{F=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);F.has(t)||(F.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>F,"getSections"),kt=g(t=>{V=t},"setShowData"),Et=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:Et},zt=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);B.debug(n),zt(n,Z)},"parse")},Rt=g(t=>` +import{p as at}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{S as T,K as P,b2 as rt,g as nt,s as it,a as ot,b as st,q as lt,p as ct,_ as g,l as B,c as ut,D as dt,G as gt,a2 as pt,d as ht,r as ft,E as mt}from"./mermaid.core-BusHtpbx.js";import{p as vt}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import{d as X}from"./arc-B8osaoVd.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function St(t,n){return nt?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(P),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),z=Math.min(P,Math.max(-P,l.apply(this,arguments)-D)),k,L=Math.min(Math.abs(z)/s,p.apply(this,arguments)),u=L*(z<0?-1:1),A;for(r=0;r0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(z-s*u)/$:0;r0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:L};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},F=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{F=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);F.has(t)||(F.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>F,"getSections"),kt=g(t=>{V=t},"setShowData"),Et=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:Et},zt=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);B.debug(n),zt(n,Z)},"parse")},Rt=g(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/python-D5-SFkaZ.js b/apps/pythinker-code/dist-web/assets/python-BeBGma8p.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/python-D5-SFkaZ.js rename to apps/pythinker-code/dist-web/assets/python-BeBGma8p.js index 5b03be820..55ce29852 100644 --- a/apps/pythinker-code/dist-web/assets/python-D5-SFkaZ.js +++ b/apps/pythinker-code/dist-web/assets/python-BeBGma8p.js @@ -1 +1 @@ -import{l as e}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const i={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{i as conf,r as language}; +import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const i={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{i as conf,r as language}; diff --git a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DbtbJAe8.js b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DbtbJAe8.js rename to apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js index 5b8ecb813..7bd14f5ec 100644 --- a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DbtbJAe8.js +++ b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js @@ -1,4 +1,4 @@ -import{s as Se,g as _e,q as ee,p as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,j as vt,d as Pe,r as ve,E as z,i as Ce,X as Le}from"./mermaid.core-BgUXBQ9g.js";import{l as te}from"./linear-DehXFnHz.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Xt=[1,73],Ht=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: +import{s as Se,g as _e,q as ee,p as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,j as vt,d as Pe,r as ve,E as z,i as Ce,X as Le}from"./mermaid.core-BusHtpbx.js";import{l as te}from"./linear-Be-oTS5b.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Xt=[1,73],Ht=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: `+D.showPosition()+` Expecting `+yt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Pt="Parse error on line "+(gt+1)+": Unexpected "+(B==Zt?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Pt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:kt,expected:yt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:u.push(B),A.push(D.yytext),e.push(D.yylloc),u.push(W[1]),B=null,Kt=D.yyleng,n=D.yytext,gt=D.yylineno,kt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=A[A.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},me&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(rt,[n,Kt,gt,j.yy,W[1],A,e].concat(qe)),typeof Ft<"u")return Ft;M&&(u=u.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),u.push(this.productions_[W[1]][0]),A.push(rt.$),e.push(rt._$),$t=ht[u[u.length-2]][u[u.length-1]],u.push($t);break;case 3:return!0}}return!0},"parse")},ye=(function(){var Y={EOF:1,parseError:r(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:r(function(s,l){return this.yy=l||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:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.match(/(?:\r\n?|\n).*/g);return l?(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:r(function(s){var l=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),u.length-1&&(this.yylineno-=u.length-1);var A=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(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:r(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:r(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-DtMi5zNi.js b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js similarity index 84% rename from apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-DtMi5zNi.js rename to apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js index 464d23ae5..7ee2388d9 100644 --- a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-DtMi5zNi.js +++ b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js @@ -1 +1 @@ -import{g as s,r as l,d as t}from"./chunk-SVP7TREG-C35ZI9k-.js";import{p as m}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{_ as n,l as i}from"./mermaid.core-BgUXBQ9g.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; +import{g as s,r as l,d as t}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p as m}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as n,l as i}from"./mermaid.core-BusHtpbx.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/razor-C8sRtc2W.js b/apps/pythinker-code/dist-web/assets/razor-L05JTUrE.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/razor-C8sRtc2W.js rename to apps/pythinker-code/dist-web/assets/razor-L05JTUrE.js index de91e5f85..e6044a49a 100644 --- a/apps/pythinker-code/dist-web/assets/razor-C8sRtc2W.js +++ b/apps/pythinker-code/dist-web/assets/razor-L05JTUrE.js @@ -1 +1 @@ -import{l as t}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const e=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{i as conf,n as language}; +import{l as t}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const e=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{i as conf,n as language}; diff --git a/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CmPbgctE.js b/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CmPbgctE.js rename to apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js index 2c1b568ed..578d9d36d 100644 --- a/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CmPbgctE.js +++ b/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js @@ -1,4 +1,4 @@ -import{g as ze}from"./chunk-XXDRQBXY-GqpBYspR.js";import{s as Ge}from"./chunk-POPQ4Y6H-CyRmuplC.js";import{_ as u,A as Ye,b as Xe,a as Je,s as Ze,g as et,p as tt,q as st,c as Te,l as Ne,r as it,v as rt,x as nt,y as at,z as lt}from"./mermaid.core-BgUXBQ9g.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var qe=(function(){var e=u(function($,r,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=r);return n},"o"),f=[1,3],h=[1,4],o=[1,5],i=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(r,n,l,s,m,t,me){var a=t.length-1;switch(m){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:f,9:h,11:o,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:f,9:h,11:o,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:f,9:h,11:o,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:u(function(r){var n=this,l=[0],s=[],m=[null],t=[],me=this.table,a="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){l.length=l.length-2*I,m.length=m.length-I,t.length=t.length-I}u(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=n.symbols_[I]||I),I}u(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=l[l.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: +import{g as ze}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as Ge}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as u,A as Ye,b as Xe,a as Je,s as Ze,g as et,p as tt,q as st,c as Te,l as Ne,r as it,v as rt,x as nt,y as at,z as lt}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var qe=(function(){var e=u(function($,r,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=r);return n},"o"),f=[1,3],h=[1,4],o=[1,5],i=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(r,n,l,s,m,t,me){var a=t.length-1;switch(m){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:f,9:h,11:o,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:f,9:h,11:o,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:f,9:h,11:o,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:u(function(r){var n=this,l=[0],s=[],m=[null],t=[],me=this.table,a="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){l.length=l.length-2*I,m.length=m.length-I,t.length=t.length-I}u(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=n.symbols_[I]||I),I}u(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=l[l.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: `+y.showPosition()+` Expecting `+ye.join(", ")+", got '"+(this.terminals_[b]||b)+"'":ke="Parse error on line "+(Re+1)+": Unexpected "+(b==$e?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(ke,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:be,expected:ye})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+b);switch(N[0]){case 1:l.push(b),m.push(y.yytext),t.push(y.yylloc),l.push(N[1]),b=null,Fe=y.yyleng,a=y.yytext,Re=y.yylineno,be=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=m[m.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Ie=this.performAction.apply(J,[a,Fe,Re,z.yy,N[1],m,t].concat(Ke)),typeof Ie<"u")return Ie;F&&(l=l.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[N[1]][0]),m.push(J.$),t.push(J._$),Ue=me[l[l.length-2]][l[l.length-1]],l.push(Ue);break;case 3:return!0}}return!0},"parse")},Qe=(function(){var $={EOF:1,parseError:u(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:u(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:u(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:u(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 s=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 m=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===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(r){this.unput(this.match.slice(r))},"less"),pastInput:u(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:u(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:u(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-X9Hobb6t.js b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-X9Hobb6t.js rename to apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js index 3b2652bd9..d2874123d 100644 --- a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-X9Hobb6t.js +++ b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js @@ -1,4 +1,4 @@ -import{p as kt,q as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b7 as St,j as G,ae as wt,r as Lt,k as Et}from"./mermaid.core-BgUXBQ9g.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function jt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function Dt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=jt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;rc.length)-1)),$(f);for(let c=0;c0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function j(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function D({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;d.push(j);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function D(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(D,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=D()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: +import{p as kt,q as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b7 as St,j as G,ae as wt,r as Lt,k as Et}from"./mermaid.core-BusHtpbx.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function jt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function Dt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=jt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;rc.length)-1)),$(f);for(let c=0;c0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function j(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function D({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;d.push(j);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function D(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(D,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=D()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: `+S.showPosition()+` Expecting `+p.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:j,expected:p})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),d.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,j=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:d[d.length-(e||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(e||1)].first_column,last_column:d[d.length-1].last_column},R&&(f._$.range=[d[d.length-(e||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,d].concat($)),typeof n<"u")return n;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),d=d.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),d.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:y(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:y(function(o,a){return this.yy=a||this.yy||{},this._input=o,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:y(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:y(function(o){var a=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var m=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),h.length-1&&(this.yylineno-=h.length-1);var _=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:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(o){this.unput(this.match.slice(o))},"less"),pastInput:y(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CBJOzdkc.js b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CBJOzdkc.js rename to apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js index dc1c7b87e..49f1c8285 100644 --- a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CBJOzdkc.js +++ b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js @@ -1,4 +1,4 @@ -import{I as tr}from"./chunk-2Q5K7J3B-DDI19Bs6.js";import{_ as x,Y as er,c as $,j as Vt,l as at,o as Ce,d as rr,e as ar,k as N,b as ke,s as sr,p as ir,a as nr,g as or,q as cr,Z as lr,$ as hr,r as dr,i as Yt,z as Z,a0 as Q,a1 as Pt,a2 as Me,a3 as Tr,A as Kt,a4 as pr,a5 as Be}from"./mermaid.core-BgUXBQ9g.js";import{a as Er,g as ae,b as dt,d as ur,c as se,e as ie}from"./chunk-F27PBJKO-A5JDBOgE.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: +import{I as tr}from"./chunk-2Q5K7J3B-CPFb-YMA.js";import{_ as x,Y as er,c as $,j as Vt,l as at,o as Ce,d as rr,e as ar,k as N,b as ke,s as sr,p as ir,a as nr,g as or,q as cr,Z as lr,$ as hr,r as dr,i as Yt,z as Z,a0 as Q,a1 as Pt,a2 as Me,a3 as Tr,A as Kt,a4 as pr,a5 as Be}from"./mermaid.core-BusHtpbx.js";import{a as Er,g as ae,b as dt,d as ur,c as se,e as ie}from"./chunk-F27PBJKO-CGsciVEq.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: `+J.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":$t="Parse error on line "+(Ct+1)+": Unexpected "+(rt==we?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError($t,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Zt,expected:Bt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+rt);switch(ct[0]){case 1:P.push(rt),z.push(J.yytext),c.push(J.yylloc),P.push(ct[1]),rt=null,Se=J.yyleng,h=J.yytext,Ct=J.yylineno,Zt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Lt.$=z[z.length-Tt],Lt._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},$e&&(Lt._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),Qt=this.performAction.apply(Lt,[h,Se,Ct,gt.yy,ct[1],z,c].concat(Qe)),typeof Qt<"u")return Qt;Tt&&(P=P.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),P.push(this.productions_[ct[1]][0]),z.push(Lt.$),c.push(Lt._$),Pe=wt[P[P.length-2]][P[P.length-1]],P.push(Pe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var ut={EOF:1,parseError:x(function(v,P){if(this.yy.parser)this.yy.parser.parseError(v,P);else throw new Error(v)},"parseError"),setInput:x(function(S,v){return this.yy=v||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:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var v=S.match(/(?:\r\n?|\n).*/g);return v?(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:x(function(S){var v=S.length,P=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;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),P.length-1&&(this.yylineno-=P.length-1);var z=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:P?(P.length===y.length?this.yylloc.first_column:0)+y[y.length-P.length].length-P[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(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:x(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:x(function(){var S=this.pastInput(),v=new Array(S.length+1).join("-");return S+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-DFU8VSYq.js b/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CSVjY38-.js similarity index 86% rename from apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-DFU8VSYq.js rename to apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CSVjY38-.js index 282a1ae23..10314710a 100644 --- a/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-DFU8VSYq.js +++ b/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CSVjY38-.js @@ -1 +1 @@ -import{_ as o}from"./mermaid.core-BgUXBQ9g.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; +import{_ as o}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-CAMMINP1.js b/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-CAMMINP1.js rename to apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js index 77b467b58..a23a87b8b 100644 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-CAMMINP1.js +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js @@ -1 +1 @@ -import{s as R,a as W,S as N}from"./chunk-G27WJ6UU-x-A8PhoW.js";import{_ as f,c as t,j as H,l as S,d as P,a7 as _,k as z,a8 as U,a9 as C,a4 as F,z as O}from"./mermaid.core-BgUXBQ9g.js";import{l as J}from"./layout-BKltItOX.js";import"./chunk-XXDRQBXY-GqpBYspR.js";import"./chunk-POPQ4Y6H-CyRmuplC.js";import"./chunk-F27PBJKO-A5JDBOgE.js";import"./purify.es-5AjVNlXF.js";import"./index-vF2s5p7P.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
        ");p=p.replace(/\n/g,"
        ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(C),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=F(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=O.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram}; +import{s as R,a as W,S as N}from"./chunk-G27WJ6UU-CIn6rVI9.js";import{_ as f,c as t,j as H,l as S,d as P,a7 as _,k as z,a8 as U,a9 as C,a4 as F,z as O}from"./mermaid.core-BusHtpbx.js";import{l as J}from"./layout-CRsCkvth.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
        ");p=p.replace(/\n/g,"
        ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(C),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=F(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=O.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js new file mode 100644 index 000000000..4c6515aa6 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js @@ -0,0 +1 @@ +import{s as r,b as e,a,S as s}from"./chunk-G27WJ6UU-CIn6rVI9.js";import{_ as i}from"./mermaid.core-BusHtpbx.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-D31cKkvj.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-D31cKkvj.js deleted file mode 100644 index 5c08c2d2b..000000000 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-D31cKkvj.js +++ /dev/null @@ -1 +0,0 @@ -import{s as r,b as e,a,S as s}from"./chunk-G27WJ6UU-x-A8PhoW.js";import{_ as i}from"./mermaid.core-BgUXBQ9g.js";import"./chunk-XXDRQBXY-GqpBYspR.js";import"./chunk-POPQ4Y6H-CyRmuplC.js";import"./chunk-F27PBJKO-A5JDBOgE.js";import"./purify.es-5AjVNlXF.js";import"./index-vF2s5p7P.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-BzHQBVgg.js b/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-D3OEEV8W.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-BzHQBVgg.js rename to apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-D3OEEV8W.js index fef8508d5..35dbf42d7 100644 --- a/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-BzHQBVgg.js +++ b/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-D3OEEV8W.js @@ -1 +1 @@ -import{ap as Cr,l as In,_ as d,aA as To}from"./mermaid.core-BgUXBQ9g.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var Ao=5,Xe=1e-5,Ye=1e-6;function Ue(t){const e=[];for(let n=0;n=1-Ye||C<=Ye||C>=1-Ye?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:C}}d(Bo,"segmentIntersection");function Sn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(Sn,"isHorizontalSeg");function ko(t){const e=[];for(let n=0;n=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Fo,"getArcSweepFlag");var vr=.001;function _o(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&To[e.arrowTypeStart];if(o){const r=t[0],a=t[1],l=Math.atan2(a.y-r.y,a.x-r.x);n[0].x=r.x+o*Math.cos(l),n[0].y=r.y+o*Math.sin(l)}const s=e.arrowTypeEnd&&To[e.arrowTypeEnd];if(s){const r=t.length,a=t[r-2],l=t[r-1],f=Math.atan2(l.y-a.y,l.x-a.x);n[r-1].x=l.x-s*Math.cos(f),n[r-1].y=l.y-s*Math.sin(f)}return n}d(_o,"applyMarkerOffsets");function Do(t,e,n,o,s){const r=t.point.x,a=t.point.y,l={x:r-e*t.r,y:a-n*t.r},f={x:r+e*t.r,y:a+n*t.r},i=[`L${Ae(l)}`];return s==="arc"?i.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${Ae(f)}`):i.push(`M${Ae(f)}`),i}d(Do,"emitJump");function Cn(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=n.x-e.x,l=n.y-e.y,f=Math.hypot(s,r),i=Math.hypot(a,l);if(f0){const E=Cn(s[i-1],s[i],s[i+1]??s[i],Ao);E&&(c=E.cutLen)}let y=x,v=null;r&&iE.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-c,y-E.d);for(let E=0;ET){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r=2?o:null}catch{return null}}d(Go,"decodeDataPoints");function $o(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const i of e)s.set(i.id,i);const r=[],a=new Map;for(const i of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(i.id):i.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;a.set(i.id,x);const h=Go(x.getAttribute("data-points"))??i.points;r.push({...i,points:h})}const l=ko(r);if(l.length===0)return;const f=new Map;for(const i of l){const g=f.get(i.jumpEdgeId)??[];g.push(i),f.set(i.jumpEdgeId,g)}for(const i of r){const g=f.get(i.id);if(!g||g.length===0)continue;const C=s.get(i.id)?.curve;if(C!==void 0&&!Yo(C))continue;const h=a.get(i.id);if(!h)continue;if(C===void 0){const E=h.getAttribute("d")??"";if(!Xo(E))continue}const p=h.getAttribute("style")??"",c=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=c?Number.parseFloat(c[1]):null,v=c?Number.parseFloat(c[2]):null,M=Ho(i,g,n);if(h.setAttribute("d",M),y!==null&&v!==null&&typeof h.getTotalLength=="function"){const E=h.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,I=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");h.setAttribute("style",I)}}}d($o,"applyLineJumpsToSvg");function zo(t,{measure:e}){const n=t.config?.swimlane?.lineHops;if(n===!1)return;const o=n==="gap"?"gap":"arc",s=t.edges.filter(r=>Array.isArray(r.points)&&r.points.length>=2).map(r=>({id:r.id,points:r.points,curve:r.curve,arrowTypeStart:r.arrowTypeStart,arrowTypeEnd:r.arrowTypeEnd}));$o(e.groups.edgePaths,s,{enabled:!0,jumpRadius:6,jumpStyle:o})}d(zo,"applySwimlaneLineJumps");var yn="__swimlane_default__",Lr=21,wo=20;function vn(t){return Math.max(t.padding??wo,wo)}d(vn,"topLaneHorizontalPadding");function Vo(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const a=n-s/2,l=Math.min(r,n+s/2),f=Math.min(Lr,Math.max(0,l-a)),i=a+f;if(i<=a){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:a,bottom:i}}d(Vo,"assignTopLaneTitleRect");function jo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===yn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:yn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=yn}d(jo,"prepareLayoutForSwimlanes");function Uo(t){const e=new Map;for(const f of t.nodes??[])e.set(f.id,f);const n=[];for(const f of t.edges??[]){const i=typeof f.start=="string"?f.start:void 0,g=typeof f.end=="string"?f.end:void 0;!i||!g||f.labelNodeId||n.push({id:f.id,src:i,dst:g,ref:f})}const o=t.nodes??[],s=o.filter(f=>f.isGroup),r=o.filter(f=>!f.isGroup);return{nodes:[...[...s].reverse(),...r].map(f=>f.id),edges:n,layout:t,nodeById:e}}d(Uo,"toGraphView");function Wo(t,e,n,o){const{layout:s}=t,r=t.nodeById,a=o?.layerGap??100,l=o?.nodeGap??40;let f=0;for(const C of e.layers){let h=0;for(const p of C){const c=r.get(p);if(!c){h++;continue}c.layer=f,c.order=h;const y=n.x[p]??h*l,v=n.y[p]??f*a;c.x=y,c.y=v,h++}f++}const i=s.nodes??[],g=new Map,x=[];for(const C of i){if(!C?.isGroup)continue;C.parentId||x.push(C);const h=i.filter(M=>M.parentId===C.id);let p=1/0,c=-1/0,y=1/0,v=-1/0;for(const M of h){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,I=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),c=Math.max(c,E+m/2),y=Math.min(y,T-I/2),v=Math.max(v,T+I/2))}if(p===1/0||y===1/0)C.x=C.x??0,C.y=C.y??0,C.width=C.width??0,C.height=C.height??0;else{const M=C.padding??20,E=C.parentId?M:2*vn(C),T=M,m=Math.max(0,c-p)+E,I=Math.max(0,v-y)+T,w=(p+c)/2,R=(y+v)/2;C.x=w,C.y=R,C.width=m,C.height=I,g.set(C.id,{minX:p,maxX:c,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let C=1/0,h=-1/0,p=0;for(const c of x){const y=c.padding??20;y>p&&(p=y);const v=g.get(c.id);v&&(C=Math.min(C,v.minY),h=Math.max(h,v.maxY))}if(C!==1/0&&h!==-1/0){const c=Math.max(0,h-C),v=Math.max(p,36),M=c+2*v,E=(C+h)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=C;const T=[...x].sort((k,O)=>{const F=k.x??0,H=O.x??0;return F-H}),m=[],I=[],w=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const F=Math.max(0,O.maxX-O.minX)+2*vn(k),H=(O.minX+O.maxX)/2;m.push(k.id),I.push(H),w.push(F)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],w[0]);else{const O=[];for(let j=0;j0&&s>0?{cx:e,cy:n,rect:we(e,n,o,s)}:void 0}d(eo,"measuredNodeRect");function no(t){if(t.isGroup)return;const e=eo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(no,"nodeBoundsInfoFor");function oe(t,e,n=_t){return Math.abs(t.x-e.x)n}d(Tt,"isHorizontalSegment");function At(t,e,n=_t){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(At,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=_t){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=_t){const n=[];for(let o=0;o0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function oo(t,e=_t){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&At(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:At(n,o,e)&&Tt(o,s,e)&&At(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(oo,"classifyThreeSegmentRoute");function on(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),a=Math.min(t.y,e.y),l=Math.max(t.y,e.y);return r>n.left-o&&sn.top-o&&ae.left+n&&t.xe.top+n&&t.y=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(qo,"rectContainsRect");function We(t,e){return t.lefte.left&&t.tope.top}d(We,"rectsOverlap");function Ln(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Ln,"inflateRect");function we(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(we,"rectFromCenterSize");function qt(t){return eo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function ro(t,e,n,o,s,r=_t){const a=e==="left"||e==="right",l=o==="left"||o==="right";if(a&&l){if(e==="right"&&o==="left"&&t.xn.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!a&&!l){if(e===o){if(ft(t,n,r))return;const C=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:C},{x:n.x,y:C},n]}if(!(e==="bottom"&&o==="top"&&t.yn.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(a&&!l){const g=e==="right"&&n.x>t.x||e==="left"&&n.xn.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const f=e==="bottom"&&n.y>t.y||e==="top"&&n.yn.x;return f&&i?[t,{x:t.x,y:n.y},n]:void 0}d(ro,"buildOrthogonalPortPath");function io(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(io,"buildSameSideTrackPath");function sn(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=no(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(sn,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=no(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function Jo(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,a=o.width??0,l=o.height??0;n.push({nodeId:o.id,...we(s,r,a,l)})}return n}d(Jo,"collectLayoutNodeRects");function co(t,e,n=_t){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),a=e.get(s);if(!(!r||!a))return{srcId:o,dstId:s,srcInfo:r,dstInfo:a,collinearX:Math.abs(r.cx-a.cx)p||Cv)return!1;const M=Math.abs(c-g.a.x)s:r&&l&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(Zo,"sameAxisSegmentsOverlap");function Ke(t,e,n,o,{epsilon:s=_t,skipDegenerateOther:r=!1}={}){for(const a of n){if(a===o||a.isLayoutOnly)continue;const l=a.points;if(!(!l||l.length<2))for(let f=0;fC+s&&pc+s&&xo+_t&&t=2?e[e.length-2]:void 0,f=(a?ft(a,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(f)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ts(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Tr=.5,Ro=4;function lo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length=0&&s=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const a=es(t[s],t[r],e);return n?[a,...t.slice(s)]:[...t.slice(0,s+1),a]}d(Tn,"clipEndpoint");function ns(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Tn(s,o.srcRect,!0)),o.dstRect&&(s=Tn(s,o.dstRect,!1)),s=ae(qe(s)),s=fo(s,o.srcRect,o.dstRect),o.edge.points=ae(qe(s))}}d(ns,"clipEdgeEndpointsToNodeBoundaries");function An(t,e,n,o=!1){if(ht(t,e,nt)){if(e.yn.bottom+nt)return e;if(o){if(t.xn.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.xn.right+nt)return e;if(o){if(t.yn.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(An,"snapEndpointToBoundary");function Je(t,e,n){const o=t[e];for(let s=e+n;s>=0&&so.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(os,"intersectRanges");function Rn(t,e){return e==="left"||e==="right"?Ze(t.top,t.bottom):Ze(t.left,t.right)}d(Rn,"clearanceRangeForSide");function Qe(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)0?os(r):void 0}d(ss,"straightClearanceRange");function Nn(t,e,n,o,s){const r=ss(t,e,n,o,s);if(!r)return;const a=s?t.y:t.x,l=Math.min(r.hi,Math.max(r.lo,a));if(!(Math.abs(l-a)({...l}));for(let l=e;l>=0&&l=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)o.bottom+nt;case"left":return ht(e,n,nt)&&n.xo.right+nt}}d(Bn,"leavesOutward");function kn(t,e,n){if(t.length<3)return t;if(n){const r=Pn(t[0],t[1],e);return r&&Bn(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Pn(t[o-1],t[o],e);return s&&Bn(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(kn,"collapseOwnBorderStub");function cs(t,e,n){let o=t;if(e){const r=Je(o,0,1);if(r){const a=An(r,o[0],e);a!==o[0]&&(o=[a,...o.slice(1)])}o=kn(o,e,!0)}if(n){const r=o.length-1,a=Je(o,r,-1);if(a){const l=An(a,o[r],n,!0);l!==o[r]&&(o=[...o.slice(0,r),l])}o=kn(o,n,!1)}const s=fo(o,e,n);return s!==o||o.length===2?s:(e&&(o=On(o,e,!0)),n&&(o=On(o,n,!1)),o)}d(cs,"snapAndCollapseEndpoints");function Fn(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=cs(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const a=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=a}}d(Fn,"prepareEdgeEndpointsForRenderer");function uo(t){return new Map(t.map(e=>[e.id,e]))}d(uo,"buildNodeMap");function as(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(as,"resolveTopLevelGroupId");function _n(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(_n,"groupDepth");function ho(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const a=r.x,l=r.y;if(typeof a!="number"||typeof l!="number")continue;const f=r.width??0,i=r.height??0;e=Math.min(e,a-f/2),n=Math.max(n,a+f/2),o=Math.min(o,l-i/2),s=Math.max(s,l+i/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(ho,"boundsForChildren");function ls(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(ls,"applyGroupBounds");function fs(t){const e=uo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>_n(s,e)-_n(o,e));for(const o of n){const s=t.filter(a=>a.parentId===o.id),r=ho(s);r&&ls(o,r)}}d(fs,"recomputeNestedGroupBounds");function tn(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(f=>!f.isGroup);let r=1/0,a=-1/0;for(const f of s){const i=f[e];typeof i=="number"&&(r=Math.min(r,i),a=Math.max(a,i))}if(!Number.isFinite(r)||!Number.isFinite(a))return!1;const l=d(f=>r+a-f,"mirror");for(const f of n){const i=f[e];typeof i=="number"&&(f[e]=l(i));const g=f.groupTitleRect;g&&(f.groupTitleRect=e==="x"?{...g,left:l(g.right),right:l(g.left)}:{...g,top:l(g.bottom),bottom:l(g.top)})}for(const f of o)for(const i of f.points??[])i[e]=l(i[e]);return!0}d(tn,"mirrorAxis");function ds(t){return(t.nodes??[]).some(n=>!n.isGroup)?tn(t,"y"):!0}d(ds,"applyBtDirectionTransform");function us(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,a=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-a)*C+l,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-a)*C+l,mt=j-r;G.x=dt,G.y=mt}fs(n);const h=n.filter(P=>P.isGroup&&!P.parentId);if(h.length===0)return e==="RL"&&tn(t,"x"),!0;const p=uo(n),c=new Map;for(const P of n){if(P.isGroup)continue;const G=as(P,p);if(!G)continue;const j=c.get(G)??[];j.push(P),c.set(G,j)}let y=0;for(const P of h){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of h){const G=c.get(P.id)??[],j=ho(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),I=T+2*m,w=l+I,O=(M+E)/2-I/2-l,F=O+w/2,H=Math.max(y,l);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;PC.cy?v.bottom:v.top,H=C.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:F},T={x:H,y:l.y},m={x:l.x,y:l.y}}else{const F=h.cx>C.cx?v.right:v.left,H=C.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:F,y:H},T={x:l.x,y:H},m={x:l.x,y:l.y}}const I=oe(E,T,se),w=oe(T,m,se);if(I&&w||!I&&wt(E,T,o,[g],1)||!w&&wt(T,m,o,[x],1))continue;const R=!I&&Ke(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!w&&Ke(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){I?y=[T,m]:w?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(hs,"portSwapToLShape");function gs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values());for(const l of t){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<4)continue;const i=pt(f,.001);if(i.length<4)continue;const g=i.length-1,x=i[g],C=i[g-1],h=i[g-2],p=x.x-C.x,c=x.y-C.y,y=Math.hypot(p,c);if(y>=10||y<.001)continue;const v=C.x-h.x,M=C.y-h.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(C,x,.001),m=At(C,x,.001),I=Tt(h,C,.001),w=At(h,C,.001);if(!(T&&w||m&&I))continue;const R=l.end,k=l.start,O=R?e.get(R):void 0;if(!O)continue;const F=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(w){const W=M<0;G={x:F,y:h.y},j={x:F,y:W?P.bottom:P.top}}else{const W=v>0;G={x:h.x,y:H},j={x:W?P.right:P.left,y:H}}if(wt(G,j,r,R?[R]:[],-2)||wt(G,j,a,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&so(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W{for(const at of t){if(at===l||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt=0){const W=i[g-3],et=[k,R].filter(at=>!!at);if(wt(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...i.slice(0,g-2),G,j];l.points=Pt;const Q=l.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(gs,"collapseShortTerminalStub");var Z=.001,Ft=8,it=Re,xn=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function ps(t,e){const s=d((h,p)=>{const c=h.x??0,y=h.y??0,v=p.x-c,M=p.y-y;let E=(h.width??0)/2,T=(h.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:c+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:c+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((h,p)=>{const c=pt(h.points??[]);if(c.length<2)return;const y=p?h.start:h.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?c[0]:c[c.length-1],T=p?c[1]:c[c.length-2],m=s(v,E);let I=E;if(xn(T,m)&&(I=T),ft(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,I.y),max:Math.max(m.y,I.y),boundary:m,railEnd:I,rect:M};if(ht(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,I.x),max:Math.max(m.x,I.x),boundary:m,railEnd:I,rect:M}},"terminalLaneFor"),a=d((h,p)=>Math.max(0,Math.min(h.max,p.max)-Math.max(h.min,p.min)),"projectedOverlapLength"),l=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:h.orientation==="H"?(Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1)&&ft(h.boundary,p.boundary,1):(Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1)&&ht(h.boundary,p.boundary,1),"sameTerminalFace"),f=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:a(h,p)>=Ft&&Math.abs(h.coord-p.coord)<.5,"exactTerminalLaneConflict"),i=d((h,p)=>{if(h.nodeId!==p.nodeId||h.orientation!==p.orientation||h.orientation!=="H"||h.atStart===p.atStart)return!1;const c=a(h,p);if(c2*y?!1:l(h,p)&&Math.abs(h.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((h,p)=>{const c=pt(h.edge.points??[]);if(c.length<2)return;const y=h.orientation==="V"?{x:h.boundary.x+p,y:h.boundary.y}:{x:h.boundary.x,y:h.boundary.y+p},v=h.orientation==="V"?{x:h.railEnd.x+p,y:h.railEnd.y}:{x:h.railEnd.x,y:h.railEnd.y+p};if(!d(()=>Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1?ht(y,h.boundary,Z)&&y.x>=h.rect.left+1&&y.x<=h.rect.right-1:Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1?ft(y,h.boundary,Z)&&y.y>=h.rect.top+1&&y.y<=h.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(h.atStart){const I=c.length>1&&oe(c[1],h.railEnd,Z),w=c.slice(I?2:1),R=w[0];return R&&!xn(R,v)?void 0:[y,v,...w]}const E=c.length>1&&oe(c[c.length-2],h.railEnd,Z),T=c.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!xn(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(h=>{const p=h.edge,c=pt(p.points??[]);if(c.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,I=E.x??0,w=E.y??0,[R,k]=c;return ht(R,k,Z)&&Math.abs(m-w)<1&&Math.abs(T-I)>1||ft(R,k,Z)&&Math.abs(T-I)<1&&Math.abs(m-w)>1},"laneIsStraightCollinearConnector"),C=[-7,7,-14,14,-21,21];for(let h=0;h<8;h++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let c=!1;for(let y=0;y{const R=x(I),k=x(w);return R!==k?Number(R)-Number(k):+!w.atStart-+!I.atStart});for(const I of m){for(const w of C){const R=g(I,w);if(!R)continue;const k=r({...I.edge,points:R},I.atStart);if(!(!k||p.some(O=>O.edge!==I.edge&&(f(k,O)||T&&i(k,O))))){I.edge.points=R,c=!0;break}}if(c)break}}if(!c)return}}d(ps,"separateSharedRenderedTerminalLanes");function ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((l,f)=>{const i=l.start,g=l.end,x=it(f);if(x.length!==f.length-1)return!1;const C=[i,g].filter(h=>!!h);for(const h of x)if(wt(h.a,h.b,o,C,-2)||wt(h.a,h.b,s,[],-2))return!1;for(const h of t){if(h===l||h.isLayoutOnly)continue;const p=h.points;if(!(!p||p.length<2)){for(const c of x)for(const y of it(pt(p)))if(ce(c,y,.5)>=Ft||le(c.a,c.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),a=d((l,f)=>{if(f+4>=l.length)return;const i=l[f],g=l[f+1],x=l[f+2],C=l[f+3],h=l[f+4],p=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&ft(i,C,Z)&&ft(i,h,Z)&&ft(g,x,Z)&&(g.x-i.x)*(C.x-x.x)<0,c=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&ht(i,C,Z)&&ht(i,h,Z)&&ht(g,x,Z)&&(g.y-i.y)*(C.y-x.y)<0;if(p||c)return pt([...l.slice(0,f+1),h,...l.slice(f+5)]);if(f+5>=l.length)return;const y=l[f+5],v=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&At(h,y)&&ft(i,h,Z)&&ft(i,y,Z)&&ft(x,C,Z)&&(x.x-g.x)*(h.x-C.x)<0,M=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&Tt(h,y)&&ht(i,h,Z)&&ht(i,y,Z)&&ht(x,C,Z)&&(x.y-g.y)*(h.y-C.y)<0;if(!(!v&&!M))return pt([...l.slice(0,f+1),y,...l.slice(f+6)])},"withoutDogleg");for(let l=0;l<8;l++){let f=!1;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(let x=0;x<=g.length-5;x++){const C=a(g,x);if(!(!C||!r(i,C))){i.points=C,f=!0;break}}if(f)break}if(!f)return}}d(ms,"collapseRedundantRectangularDoglegs");function Dn(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(p=>!p.isLayoutOnly),f=d((p,c,y)=>pt(p===c?y??[]:p.points??[]),"pointsFor"),i=d((p,c)=>{let y=0;for(let v=0;v{const c=it(p);if(c.length!==3)return;const y=c[1];if(!(c[0].horizontal===y.horizontal||c[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return c.horizontal?zt(c.a.x,c.b.x,M.left,M.right)>=Ft&&c.a.y>=M.top-2&&c.a.y<=M.bottom+2:zt(c.a.y,c.b.y,M.top,M.bottom)>=Ft&&c.a.x>=M.left-2&&c.a.x<=M.right+2})},"blockingRectsFor"),C=d((p,c,y)=>{const v=p.map(E=>({...E}));if(c.horizontal)v[c.index].y=y,v[c.index+1].y=y;else if(c.vertical)v[c.index].x=y,v[c.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),h=d((p,c,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(c);if(M.length!==c.length-1)return!1;for(const E of M)if(wt(E.a,E.b,r,v,-2)||wt(E.a,E.b,a,[],-2))return!1;for(const E of l)if(E!==p){for(const T of M)for(const m of it(f(E)))if(ce(T,m,.5)>=Ft)return!1}return i(p,c)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const c=i();let y=!1;for(const v of l){const M=f(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(I=>I.rect.top))-20,Math.max(...T.map(I=>I.rect.bottom))+20]:[Math.min(...T.map(I=>I.rect.left))-20,Math.max(...T.map(I=>I.rect.right))+20];for(const I of m){const w=C(M,E.segment,I);if(!(!w||!h(v,w,c))){v.points=w,y=!0;break}}if(y)break}if(!y)return}}d(Dn,"liftObstacleHuggingSameSideRails");function Hn(t,e){const o=d(f=>{const i=f.groupTitleRect;if(!(!i||typeof i.left!="number"||typeof i.right!="number"||typeof i.top!="number"||typeof i.bottom!="number"||!Number.isFinite(i.left)||!Number.isFinite(i.right)||!Number.isFinite(i.top)||!Number.isFinite(i.bottom)||i.right<=i.left||i.bottom<=i.top))return{left:i.left,right:i.right,top:i.top,bottom:i.bottom}},"validTitleRect"),s=d(f=>{if(!f.isGroup||f.parentId)return;const i=f.direction,g=typeof i=="string"?i.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(f),C=f.y,h=f.height;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(c<=0||p{if(!f.horizontal)return!1;const g=f.a.y;return g<=i.top+Z||g>=i.bottom-Z?!1:zt(f.a.x,f.b.x,i.left,i.right)>=Ft},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(f=>!!f);if(a.length===0)return;let l=0;for(const f of t){if(f.isLayoutOnly)continue;const i=pt(f.points??[]);for(const g of it(i))for(const x of a)r(g,x.rect)&&(l=Math.max(l,x.rect.bottom-g.a.y+4))}if(!(l<=Z))for(const f of a){const i=f.node.y,g=f.node.height;typeof i!="number"||typeof g!="number"||!Number.isFinite(i)||!Number.isFinite(g)||g<=0||(f.node.y=i-l/2,f.node.height=g+l,f.node.groupTitleRect={...f.rect,top:f.rect.top-l,bottom:f.rect.bottom-l})}}d(Hn,"liftTopLaneTitleBandsAboveRails");function Xn(t,e){const o=d(i=>{const g=i.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(i=>{if(!i.isGroup||i.parentId||i.direction!=="LR")return;const x=o(i),C=i.x,h=i.width;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(p<=0||c{if(!i.vertical)return!1;const x=i.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(i.a.y,i.b.y,g.top,g.bottom)>=Ft},"verticalSegmentIntersectsTitle"),a=d((i,g)=>{if(!i.horizontal)return!1;const x=i.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(i.a.x,i.b.x,g.left,g.right)>=Ft},"horizontalSegmentIntersectsTitle"),l=[...e.values()].map(s).filter(i=>!!i);if(l.length===0)return;let f=0;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(const x of it(g))for(const C of l)if(r(x,C.rect))f=Math.max(f,C.rect.right-x.a.x+4);else if(a(x,C.rect)){const h=Math.min(x.a.x,x.b.x);f=Math.max(f,C.rect.right-h+4)}}if(!(f<=Z))for(const i of l){const g=i.node.x,x=i.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(i.node.x=g-f/2,i.node.width=x+f,i.node.groupTitleRect={...i.rect,left:i.rect.left-f,right:i.rect.right-f})}}d(Xn,"shiftLeftLaneTitleBandsLeftOfRails");function ys(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,c=new Map)=>pt(c.get(p)??p.points??[]),"replacementPointsFor"),a=d((p=new Map)=>{let c=0;for(let y=0;ys.reduce((c,y)=>c+Qt(r(y,p)),0),"totalBends"),f=d(p=>{const c=r(p);if(c.length<4)return;const y=c[c.length-2],v=c[c.length-1];if(!(!Tt(y,v,Z)&&!At(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),i=d((p,c)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:c.tailStart.y};else if(At(v,M,Z))E={x:c.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,c.tailStart,c.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(c))if(wt(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,c,y)=>{for(const v of s)if(v!==p){for(const M of it(c))for(const E of it(r(v,y)))if(ce(M,E,.5)>=Ft)return!0}return!1},"pathHasSharedTrack"),C=d((p,c,y)=>!g(p,c)&&!x(p,c,y),"candidateIsSafe"),h=d(()=>{const p=new Map;for(const c of s){const y=c.end;if(!y||!e.has(y)||r(c).length<4)continue;const M=p.get(y)??[];M.push(c),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const c=a();if(c===0)return;const y=l();let v,M=c,E=y;for(const T of h().values())for(let m=0;m=c||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(ys,"swapDestinationTerminalTailsToReduceCrossings");function xs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(T=>!T.isLayoutOnly),f=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),i=d((T=new Map)=>{let m=0;for(let I=0;Il.reduce((m,I)=>m+Qt(f(I,T)),0),"totalBends"),x=d(T=>{const m=T.start,I=T.end,w=m?e.get(m):void 0,R=I?e.get(I):void 0,k=w?qt(w):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),C=d((T,m,I)=>{if(I.index<=0||I.index+1>=m.length-1)return;const w=x(T);if(w){if(I.vertical){const R=I.a.x,k=Math.min(w.src.left,w.dst.left),O=Math.max(w.src.right,w.dst.right),F=RO+Z?"right":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"vertical",side:F,coord:R,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const R=I.a.y,k=Math.min(w.src.top,w.dst.top),O=Math.max(w.src.bottom,w.dst.bottom),F=RO+Z?"bottom":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"horizontal",side:F,coord:R,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),h=d(()=>{const T=[];for(const m of l){const I=f(m);for(const w of it(I)){const R=C(m,I,w);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=Ft,"railsInteract"),c=d(T=>{const m=[],I=new Set;for(const w of T){if(I.has(w))continue;const R=[w],k=[];for(I.add(w);R.length>0;){const O=R.pop();k.push(O);for(const F of T)!I.has(F)&&p(O,F)&&(I.add(F),R.push(F))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const I of T)m.some(w=>Math.abs(w-I.coord){const m=T.map(R=>R.coord),I=y(T),w=[];if(T.length<=6){const R=new Array(I.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((F,H)=>Math.abs(F-m[H])>=Z)&&w.push([...k]);return}for(const[F,H]of I.entries())R[F]||(R[F]=!0,k.push(H),O(),k.pop(),R[F]=!1)},"visit");return O(),w}for(let R=0;R{const I=new Map;for(const[R,k]of T.entries()){const O=m[R],F=I.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(F[k.segmentIndex].x=O,F[k.segmentIndex+1].x=O):(F[k.segmentIndex].y=O,F[k.segmentIndex+1].y=O),I.set(k.edge,F)}const w=new Map;for(const[R,k]of I){const O=ae(pt(k));if(it(O).length!==O.length-1)return;w.set(R,O)}return w},"replacementsForAssignment"),E=d(T=>{for(const[m,I]of T){const w=[m.start,m.end].filter(R=>!!R);for(const R of it(I))if(wt(R.a,R.b,r,w,-2)||wt(R.a,R.b,a,[],-2))return!1}for(let m=0;m=Ft)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=i();if(m===0)return;let I,w=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of c(h()))for(const F of v(O)){const H=M(O,F);if(!H||!E(H))continue;const P=i(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(F[mt]-dt.coord),0);P>w||P===w&&(G>R||G===R&&j>=k)||(I=H,w=P,R=G,k=j)}if(!I)return;for(const[O,F]of I)O.points=F}}d(xs,"reassignCrossingExternalRailChannels");function bs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(h=>!h.isLayoutOnly),a=d((h,p,c)=>pt(h===p?c??[]:h.points??[]),"pointsFor"),l=d(h=>it(h).reduce((p,c)=>{const y=c.a.x-c.b.x,v=c.a.y-c.b.y;return p+Math.hypot(y,v)},0),"pathLength"),f=d((h,p)=>{let c=0;for(let y=0;y{if(h.horizontal){const c=h.a.y;return(Math.abs(c-p.top)<1||Math.abs(c-p.bottom)<1)&&zt(h.a.x,h.b.x,p.left,p.right)>=Ft}if(h.vertical){const c=h.a.x;return(Math.abs(c-p.left)<1||Math.abs(c-p.right)<1)&&zt(h.a.y,h.b.y,p.top,p.bottom)>=Ft}return!1},"segmentRunsAlongRectBorder"),g=d(h=>{const p=[h.start,h.end].filter(y=>!!y),c=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&c.push(M)}return c},"endpointRectsFor"),x=d((h,p)=>{if(p+3>=h.length)return[];const c=h[p],y=h[p+1],v=h[p+2],M=h[p+3],E=Tt(c,y,Z)&&At(y,v,Z)&&Tt(v,M,Z),T=At(c,y,Z)&&Tt(y,v,Z)&&At(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-c.x)!==Math.sign(M.x-v.x):Math.sign(y.y-c.y)!==Math.sign(M.y-v.y)))return[];const I=ft(c,M,Z)||ht(c,M,Z)?[]:[{x:c.x,y:M.y},{x:M.x,y:c.y}],w=I.length===0?[[...h.slice(0,p+1),...h.slice(p+3)]]:I.map(k=>[...h.slice(0,p+1),k,...h.slice(p+3)]),R=new Set;return w.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(F=>oe(F,M,Z)))return!1;const O=k.map(F=>`${F.x.toFixed(3)},${F.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),C=d((h,p,c)=>{const y=[h.start,h.end].filter(M=>!!M),v=g(h);for(const M of it(p))if(wt(M.a,M.b,o,y,-2)||wt(M.a,M.b,s,[],-2)||v.some(E=>i(M,E)))return!1;for(const M of r)if(M!==h){for(const E of it(p))for(const T of it(a(M)))if(ce(E,T,.5)>=Ft)return!1}return f(h,p)<=c},"candidateIsSafe");for(let h=0;h<8;h++){const p=f();let c,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=a(T),I=Qt(m,Z),w=l(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),F=l(k);if(!(Ov||P===v&&(O>M||O===M&&F>=E)||(c=T,y=k,v=P,M=O,E=F)}}if(!c||!y)return;c.points=y}}d(bs,"shortcutRedundantOrthogonalJogs");function Ms(t,e){const a=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const _=N.x??0,D=N.y??0,V=qt(N);V&&a.push({id:String(N.id??""),cx:_,cy:D,rect:V})}if(a.length===0)return;const l=new Map(a.map(N=>[N.id,N])),f=a.map(N=>({id:N.id,rect:N.rect})),i=["top","bottom","left","right"],g={top:Math.min(...a.map(N=>N.rect.top))-20,bottom:Math.max(...a.map(N=>N.rect.bottom))+20,left:Math.min(...a.map(N=>N.rect.left))-20,right:Math.max(...a.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),C=new Map(x.map((N,_)=>[N,_])),h=d(N=>{const _=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+_*20*V);return D},"outwardTracksForSide"),p=d((N,_=new Map)=>pt(_.get(N)??N.points??[]),"replacementPointsFor"),c=d((N,_)=>{let D=0;for(const V of N)for(const u of _)le(V.a,V.b,u.a,u.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,_)=>c(it(N),it(_)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let _=0;const D=[],V=new Set,u=[],b=d(S=>{V.has(S)||(V.add(S),u.push(S))},"addEdge");for(let S=0;S0&&(_+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return u.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),{count:_,pairs:D,edgeSet:V,edges:u}},"crossingSnapshot"),M=d((N,_)=>{const D=new Set(_.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let u=0;for(let b=0;b{const _=new Map;for(const u of N.pairs){const b=_.get(u.first)??new Set;b.add(u.second),_.set(u.first,b);const S=_.get(u.second)??new Set;S.add(u.first),_.set(u.second,S)}const D=[],V=new Set;for(const u of N.edges){if(V.has(u))continue;const b=[u],S=[];for(V.add(u);b.length>0;){const L=b.pop();S.push(L);for(const A of _.get(L)??[])V.has(A)||(V.add(A),b.push(A))}S.sort((L,A)=>(C.get(L)??0)-(C.get(A)??0)),S.length>1&&D.push(S)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(_=>!!_),"endpointIdsFor"),m=d(N=>{const _=[];for(const D of E(N)){const V=new Set(D),u=new Set(D.flatMap(S=>T(S))),b=[...D];for(const S of x)V.has(S)||T(S).some(L=>u.has(L))&&b.push(S);b.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),_.push(b)}return _},"pairSearchGroups"),I=d((N,_,D)=>M(N,new Map([[_,D]])),"crossingCountWithSingleReplacement"),w=d(N=>{const _=new Map;for(const D of N.pairs)_.set(D.first,(_.get(D.first)??0)+D.count),_.set(D.second,(_.get(D.second)??0)+D.count);return _},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((_,D,V)=>{const u=N[V];return _+Math.abs(D.x-u.x)+Math.abs(D.y-u.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((_,D)=>_+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((_,D)=>_+R(p(D,N)),0),"totalLength"),F=d((N,_,D=new Map)=>{const V=it(_);for(const u of x)if(u!==N){for(const b of V)for(const S of it(p(u,D)))if(ce(b,S,.5)>=Ft)return!0}return!1},"pathHasSegmentConflict"),H=d((N,_)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(_))if(wt(V.a,V.b,f,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,_)=>{const D=ae(pt(_));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,_,D)=>{switch(_){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,_,D,V)=>{const u=D==="left"||D==="top"?-1:1,b=[j(_,D,V),g[D]];for(const S of b)for(let L=0;L<=2;L++)P(N,io(_,D,V,S+u*20*L))},"addSameSideCandidates"),dt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:b,y:_.y},{x:b,y:S},{x:V.x,y:S},V])},"addHorizontalToVerticalCandidates"),mt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:_.x,y:b},{x:S,y:b},{x:S,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,_,D,V,u)=>{const b=[...h("top"),...h("bottom")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:S,y:_.y},{x:S,y:A},{x:L,y:A},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,_,D,V,u)=>{const b=[...h("left"),...h("right")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:_.x,y:S},{x:A,y:S},{x:A,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const _=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(u=>`${u.x.toFixed(3)},${u.y.toFixed(3)}`).join("|");return _.has(V)||D.length<2?!1:(_.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,_,D,V)=>{const u=[],b=ro(N,_,D,V,20,Z);b&&P(u,b),_===V&&J(u,N,_,D);const S=G(_),L=G(V);return S&&!L?dt(u,N,_,D,V):!S&&L?mt(u,N,_,D,V):S?kt(u,N,_,D,V):Pt(u,N,_,D,V),Q(u)},"buildCandidatesForSides"),et=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="top"||S==="bottom"?h(S):b;for(const B of u){P(N,[_,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of A)P(N,[_,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="left"||S==="right"?h(S):u;for(const B of b){P(N,[_,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of A)P(N,[_,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const _=N.start,D=N.end,V=D?l.get(D):void 0;if(!_||!V)return[];const u=pt(N.points??[]);if(u.length<4)return[];const b=u[0],S=u[1],L=[];return At(b,S,Z)?et(L,b,S,V):Tt(b,S,Z)&&at(L,b,S,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const _=N.start,D=N.end,V=_?l.get(_):void 0,u=D?l.get(D):void 0;if(!V||!u)return[];const b=[];for(const S of i){const L=Ie(V,S);for(const A of i)b.push(...W(L,S,Ie(u,A),A))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,_,D)=>{const V=new Set;for(const u of x){if(u===N)continue;const b=D.get(u)??it(p(u));_.some(S=>b.some(L=>ce(S,L,.5)>=Ft))&&V.add(u)}return V},"sharedTrackConflictsFor"),jt=d((N,_,D,V)=>{const u=new Set;return xt(N).map(S=>ae(pt(S))).filter(S=>{if(H(N,S))return!1;const L=S.map(A=>`${A.x.toFixed(3)},${A.y.toFixed(3)}`).join("|");return u.has(L)||S.length<2?!1:(u.add(L),!0)}).map(S=>{const L=it(S);let A=0;for(const B of x)B!==N&&(A+=c(L,D.get(B)??it(p(B))));return{candidate:S,candidateSegments:L,crossings:_.count-(V.get(N)??0)+A,bends:Qt(S,Z),totalBends:Qt(S),length:R(S)}}).filter(({crossings:S})=>S<=_.count).sort((S,L)=>S.crossings-L.crossings||S.bends-L.bends||S.length-L.length).slice(0,48).map(S=>({path:S.candidate,segments:S.candidateSegments,sharedTrackConflicts:Vt(N,S.candidateSegments,D),totalBends:S.totalBends,length:S.length}))},"pairCandidatesFor"),Ut=d((N,_,D,V,u,b)=>{let S=0;for(const A of N.pairs)(A.first===_||A.second===_||A.first===V||A.second===V)&&(S+=A.count);let L=c(D.segments,u.segments);for(const A of x){if(A===_||A===V)continue;const B=b.get(A)??it(p(A));L+=c(D.segments,B)+c(u.segments,B)}return N.count-S+L},"pairCrossingCount"),te=d((N,_)=>{for(const D of N.sharedTrackConflicts)if(D!==_)return!1;return!0},"conflictsOnlyWith"),Se=d((N,_)=>N.segments.some(D=>_.segments.some(V=>ce(D,V,.5)>=Ft)),"candidatesShareTrack"),de=d((N,_,D,V)=>te(_,D.edge)&&te(V,N.edge)&&!Se(_,V),"pairCandidatesAreCompatible"),Ce=d((N,_,D,V,u)=>{const b=Ut(N.current,_.edge,D,V.edge,u,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[_.edge,D.path],[V.edge,u.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(_.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+u.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(_.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+u.length}},"scorePairReplacement"),an=d((N,_)=>N.crossings<_.crossings||N.crossings===_.crossings&&(N.bends<_.bends||N.bends===_.bends&&N.length<_.length),"pairScoreIsBetter"),ln=d((N,_,D,V)=>{let u=V;for(const b of _.candidates)for(const S of D.candidates){if(!de(_,b,D,S))continue;const L=Ce(N,_,b,D,S);L&&an(L,u)&&(u=L)}return u},"bestScoreForOptionPair"),fn=d(N=>{const _=k(),D=O(),V=vt(),u=w(N),b=new Map(x.map(q=>[q,Qt(p(q))])),S=new Map(x.map(q=>[q,R(p(q))])),L=new Map,A=m(N);for(const q of A)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,u);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:_,length:D};const U={current:N,currentBends:_,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:S,baseSegments:V};for(const q of A){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const _=v(),D=_.count;if(D===0)return;let V,u,b=D,S=Number.POSITIVE_INFINITY;for(const A of _.edges){const B=Qt(p(A),Z);for(const U of xt(A)){const q=H(A,U),z=!q&&F(A,U),Y=I(_,A,U),ot=Qt(U,Z);q||z||!(Yb||Y===b&&ot>=S||(V=A,u=U,b=Y,S=ot)}}if(V&&u){V.points=u;continue}const L=fn(_);if(!L)return;for(const[A,B]of L)A.points=B}}d(Ms,"resolveRenderedOrthogonalCrossings");var pe=.001,Rr=8;function Is(t,e){const{nodeInfoById:n,realNodeRects:o}=sn(e),s=["top","bottom","left","right"],r=20,a={top:Math.min(...o.map(c=>c.rect.top))-r,bottom:Math.max(...o.map(c=>c.rect.bottom))+r,left:Math.min(...o.map(c=>c.rect.left))-r,right:Math.max(...o.map(c=>c.rect.right))+r},l=d((c,y,v,M)=>{const E=[],T=ro(c,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(io(c,y,v,a[y])),E},"buildOrthogonalPathCandidates"),f=d((c,y)=>{for(let v=0;v{let M=0;const E=Re(c,pe),T=y.start,m=y.end;for(const I of t){if(I===y||I.isLayoutOnly)continue;const w=I.start,R=I.end;if(!v&&T&&m&&(w===T||w===m||R===T||R===m))continue;const k=I.points;if(!(!k||k.length<2))for(const O of E)for(const F of Re(k,pe)){if(ao(O.a,O.b,F.a,F.b,pe,pe)){M++;continue}ce(O,F,pe)>=Rr&&M++}}return M},"pathConflictCount"),g=4,x=d((c,y)=>{const v=Math.abs(c.y-y.rect.top),M=Math.abs(c.y-y.rect.bottom),E=Math.abs(c.x-y.rect.left),T=Math.abs(c.x-y.rect.right);let m="top",I=v;return M{const M=C.get(c)??[];M.push({side:y,edgeId:v}),C.set(c,M)},"addFaceClaim");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points??[];if(y.length<1)continue;const v=c.id??"",M=c.start,E=c.end;if(M){const T=n.get(M);T&&h(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&h(E,x(y[y.length-1],T),v)}}const p=d((c,y,v)=>C.get(c)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v0){const mt=i(J,c,!0);if(mt>O||mt===O&&dt>=F)continue;O=mt,F=dt,k=J;continue}i(J,c)>R||dtG.edgeId!==I));const P=C.get(E);P&&C.set(E,P.filter(G=>G.edgeId!==I)),h(M,x(k[0],T),I),h(E,x(k[k.length-1],m),I)}}}d(Is,"simplifyDetouredEdges");var Kt=.001,No=10,$e=7;function Yn(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const a=r.x-s.x,l=r.y-s.y;if(!(Math.abs(a)+Math.abs(l)r&&We(t,Ss(r)))}d(Gn,"labelOverlapsOwnMarker");function Ve(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const c=p.points;if(!(!c||c.length<2))for(let y=0;y{const y=Ln(c,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&We(y,M))return!0;return!1},"labelOverlapsForeignNode"),i=d((p,c)=>{const y=Ln(c,r);for(const v of n)if(v.edgeId!==p&&on(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,c,y)=>f(p,y)||i(c,y),"labelOverlapsAnything"),x=[],C=d(p=>{for(const{id:c,rect:y}of s)if(qo(y,p))return c},"findContainingLane"),h=d((p,c)=>x.some(y=>y.labelId!==p&&We(c,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const c=p.labelNodeId;if(!c)continue;const y=e.get(c);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx0?m:T,w=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===w,gt=et.orientation===w;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],F=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=we(Q.midX,Q.midY,M,E),et=C(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+a,xt=at.rect.right-M/2-a,vt=at.rect.top+E/2+a,Vt=at.rect.bottom-E/2-a;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=we(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+l;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt{const W=R(Q);for(const et of W)for(const at of F){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!Gn(xt.rect,v)&&!h(c,xt.rect)&&!g(c,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!Gn(vt.rect,v)&&!h(c,vt.rect)&&!f(c,vt.rect)&&(et||!i(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(I)??(I.lengthet.labelId===c);W>=0?x[W]={labelId:c,rect:Q}:x.push({labelId:c,rect:Q})}}}d(Ve,"anchorLabelsToPolyline");var bn=1e-6,Nr=8,Oo=Nr/2,Or=3;function $n(t,e){return t{const g=$n(l,f);let x=0;const C=d(h=>{if(!h)return;const p=s.get(h);if(!p)return;const c=i==="x"?p.w/2:p.h/2;c>x&&(x=c)},"consider");C(a.labelNodeId);for(const h of t){if(h===a||h.isLayoutOnly)continue;const p=h.start,c=h.end;!p||!c||$n(p,c)===g&&C(h.labelNodeId)}return x>0?x+Or:0},"labelClearanceFor");for(const a of t){if(a.isLayoutOnly)continue;const l=a.points;if(!oo(l,bn))continue;const f=co(a,n,bn);if(!f)continue;const{srcId:i,dstId:g,srcInfo:x,dstInfo:C,collinearX:h,collinearY:p}=f;if(h===p)continue;let c,y;if(h){const m=C.cy>x.cy;c={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:C.cx,y:m?C.rect.top:C.rect.bottom}}else{const m=C.cx>x.cx;c={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?C.rect.left:C.rect.right,y:C.cy}}if(wt(c,y,o,[i,g],1))continue;const M=r(a,i,g,h?"x":"y"),E=M>Oo?M:Oo,T=[0,E,-E];for(const m of T){const I={...c},w={...y};if(h){if(I.x+=m,w.x+=m,I.x<=x.rect.left||I.x>=x.rect.right||w.x<=C.rect.left||w.x>=C.rect.right)continue}else if(I.y+=m,w.y+=m,I.y<=x.rect.top||I.y>=x.rect.bottom||w.y<=C.rect.top||w.y>=C.rect.bottom)continue;if(!wt(I,w,o,[i,g],1)&&!Ke(I,w,t,a,{epsilon:bn})){a.points=[I,w];break}}}}d(Cs,"straightenCollinearSiblingDetours");function zn(t,e){const{realNodeRects:f,labelNodeRects:i}=me(e.values()),g=d((m,I)=>Re(I,.001).map(w=>({...w,edge:m,interior:w.index>=1&&w.index<=I.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const I of t){if(I.isLayoutOnly)continue;const w=I.points;!w||w.length<2||m.push(...g(I,pt(w)))}return m},"allSegments"),C=d((m,I)=>m.horizontal&&I.horizontal?zt(m.a.x,m.b.x,I.a.x,I.b.x)>=8&&Math.abs(m.a.y-I.a.y)<7:m.vertical&&I.vertical?zt(m.a.y,m.b.y,I.a.y,I.b.y)>=8&&Math.abs(m.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),h=d((m,I)=>{const w=m.start,R=m.end,k=g(m,I);if(k.length!==I.length-1)return!1;const O=[w,R].filter(H=>!!H),F=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(wt(H.a,H.b,f,O,-2)||wt(H.a,H.b,i,F,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(C(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,I)=>{const w=pt(m.edge.points??[]);if(w.length<4||m.index>=w.length-1)return;const R=w.map(k=>({...k}));if(m.horizontal)R[m.index].y+=I,R[m.index+1].y+=I;else if(m.vertical)R[m.index].x+=I,R[m.index+1].x+=I;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),c=d((m,I)=>({x:m.x??(I.left+I.right)/2,y:m.y??(I.top+I.bottom)/2}),"nodeCenter"),y=d(m=>{const I=m.edge,w=pt(I.points??[]);if(w.length!==4||m.index!==1)return;const R=I.start?e.get(I.start):void 0,k=I.end?e.get(I.end):void 0,O=R?qt(R):void 0,F=k?qt(k):void 0,H=w.slice(m.index+2);if(!(!R||!k||!O||!F||H.length===0))return{sourceCenter:c(R,O),targetCenter:c(k,F),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,I,w,R,k,O)=>{const F=R.y>=w.y,H=F?k.bottom:k.top,P=H+(F?20:-20);if(F&&m.b.y<=P+.001||!F&&m.b.y>=P-.001)return;const G=m.a.x+I;return pt([{x:w.x,y:H},{x:w.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,I,w,R,k,O)=>{const F=R.x>=w.x,H=F?k.right:k.left,P=H+(F?20:-20);if(F&&m.b.x<=P+.001||!F&&m.b.x>=P-.001)return;const G=m.a.y+I;return pt([{x:H,y:w.y},{x:P,y:w.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,I)=>{const w=y(m);if(w){if(m.vertical)return v(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail);if(m.horizontal)return M(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const I=x();let w=!1;for(let R=0;RP.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&h(P.edge,j)){P.edge.points=j,w=!0;break}const J=E(P,G);if(J&&h(P.edge,J)){P.edge.points=J,w=!0;break}}if(w)break}}if(!w)return}}d(zn,"nudgeSharedInteriorSubpaths");function vs(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=o.x-n.x,l=o.y-n.y,f=s*l-r*a;if(Math.abs(f)<1e-10)return!1;const i=n.x-t.x,g=n.y-t.y,x=(i*l-g*a)/f,C=(i*r-g*s)/f,h=.01;return x>h&&x<1-h&&C>h&&C<1-h}d(vs,"segmentsIntersect");function Ls(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=Jo(e),r=[];for(const l of n){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<2)continue;const i=l.start,g=l.end,x=l.labelNodeId,C=l.id??`${i}->${g}`;for(const h of s)if(!(h.nodeId===i||h.nodeId===g)&&!(x&&h.nodeId===x)){for(let p=0;p0){const l=o.filter(i=>i.type==="edge-node-overlap").length,f=o.filter(i=>i.type==="edge-edge-crossing").length;In.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${l} edge-node overlap(s), ${f} edge crossing(s)`);for(const i of o)In.warn(`[SWIMLANE_VALIDATE] ${i.type}: ${i.detail}`)}return o}d(Ls,"validateSwimlanesLayout");function Es(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(l=>!l.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!us(t,e)||e==="BT"&&s.length>0&&!ds(t))return;for(const l of o){if(l.isLayoutOnly)continue;const f=l.points;!f||f.length<2||(l.points=ae(qe(f)))}Is(o,n),Cs(o,n),hs(o,n);const r=new Map;for(const l of n)r.set(String(l.id),l);Ve(o,r),ns(o,r),gs(o,r),zn(o,r),ps(o,r),ms(o,r),Dn(o,r),ys(o,r);const a=d(()=>{Ms(o,r),xs(o,r),bs(o,r),Ve(o,r),Fn(o,r),Dn(o,r),Ve(o,r),Fn(o,r)},"finalizeRenderedEdges");a(),zn(o,r),a(),Hn(o,r),Xn(o,r),Hn(o,r),Xn(o,r)}d(Es,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const a=`${r.id}:${r.src}->${r.dst}`;n.has(a)||(n.add(a),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function go(t,e){return t.edges.filter(n=>n.dst===e)}d(go,"incoming");function Ts(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ts,"buildSuccessorMap");function po(t){const e=Ts(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(po,"buildSortedSuccessorMap");function mo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(mo,"buildInDegreeMap");function yo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(yo,"sortedZeroInDegreeNodes");function rn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(rn,"buildPredecessorSuccessorMaps");function xo(t,e,n,o){let s=0;for(const a of t.nodes)o?.skipGroups&&t.nodeById.get(a)?.isGroup||(s=Math.max(s,n[a]??0));const r=Array.from({length:s+1},()=>[]);for(const a of e)o?.skipGroups&&t.nodeById.get(a)?.isGroup||r[Math.max(0,n[a]??0)].push(a);return r}d(xo,"buildLayersFromRanks");function Pe(t){const e=mo(t),n=yo(e),o=[],s=po(t);for(;n.length;){const r=n.shift();o.push(r);for(const a of s.get(r)??[])if(e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0){let l=0;for(;l{if(s-o<=1)return 0;const r=o+s>>1;let a=n(o,r)+n(r,s),l=o,f=r,i=o;for(;l=s||lx.dst===C.dst?x.id.localeCompare(C.id):x.dst.localeCompare(C.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const C=x.dst;o[C]===0?r(C):o[C]===1&&s.push(x)}o[g]=2},"dfs"),a=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of a)o[g]===0&&r(g);const l=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),f=e.edges.map(g=>l.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:f,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(As,"removeCycles_DFS");function ws(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const l=n(r)??r;return e.set(o,l),l},"resolve");for(const o of t.nodes)n(o);return e}d(ws,"buildTopLaneMap");function fe(t){const e=ws(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function cn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(cn,"buildTopLaneOrder");function Mo(t,e){const n=cn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const a of e)!o.has(a)||s.has(a)||(s.add(a),r.push(a));for(const a of n)s.has(a)||r.push(a);return r}d(Mo,"resolveTopLaneOrder");var Pr={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Po={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Rs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=rn(n);for(const m of r.values())m.sort((I,w)=>I.localeCompare(w));const a=Pe(n)??[...n.nodes].sort((m,I)=>m.localeCompare(I)),l=new Map;for(const[m,I]of a.entries())l.set(I,m);const f=new Map,i=new Map;for(const m of n.nodes)i.set(m,[]);for(const m of a){const I=(r.get(m)??[]).filter(w=>f.has(w));if(I.length>0){const w=Ns(m,I,{laneOf:o,rankHint:s,topoIndex:l});f.set(m,w),i.get(w).push(m)}else f.has(m)||f.set(m,null)}for(const m of n.nodes)f.has(m)||f.set(m,null);const g=new Set;for(const m of n.nodes)(f.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,I)=>{const w=l.get(m)??0,R=l.get(I)??0;return w===R?m.localeCompare(I):w-R}),C=Os(n),h=new Map;for(const[m,I]of C.entries())h.set(m,[...I].sort((w,R)=>w.localeCompare(R)));const p=Ps(h),c=Bs(h),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of c)for(const I of m.nodes){const w=y.get(I);w?w.push(m.id):y.set(I,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const I of i.get(m)??[])T(I);M.push(m)}},"walk");for(const m of x)T(m);for(const m of a)T(m);return{parent:f,children:i,roots:x,componentOf:p,blocks:c,nodeBlocks:y,adjacency:h,preorder:v,postorder:M,topologicalOrder:a}}d(Rs,"buildDrivingTree");function Ns(t,e,n){const o=n.laneOf(t);return[...e].sort((r,a)=>{const l=n.laneOf(r),f=n.laneOf(a),i=l!=null&&l===o,g=f!=null&&f===o;if(i!==g)return i?-1:1;const x=n.rankHint?.[r],C=n.rankHint?.[a];if(x!=null&&C!=null&&x!==C)return C-x;const h=n.topoIndex.get(r)??0,p=n.topoIndex.get(a)??0;return h!==p?h-p:r.localeCompare(a)})[0]}d(Ns,"chooseParent");function Os(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(Os,"buildAdjacency");function Ps(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const a of t.get(r)??[])e.has(a)||s.push(a)}}n++}return e}d(Ps,"assignComponents");function Bs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const a=d((l,f)=>{e.set(l,++r),n.set(l,r);for(const i of t.get(l)??[])i!==f&&(e.has(i)?(e.get(i)??0)<(e.get(l)??0)&&(o.push([l,i]),n.set(l,Math.min(n.get(l)??r,e.get(i)??r))):(o.push([l,i]),a(i,l),n.set(l,Math.min(n.get(l)??r,n.get(i)??r)),(n.get(i)??0)>=(e.get(l)??0)&&s.push(ks(l,i,o,s.length))))},"visit");for(const l of t.keys())e.has(l)||a(l,null);return s}d(Bs,"computeBlocks");function ks(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const a=n.pop();if(s.push(a),r.add(a[0]),r.add(a[1]),a[0]===t&&a[1]===e||a[0]===e&&a[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(ks,"popBlock");function Fs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,a=new Array(r).fill(-1),l=new Array(r).fill(0),f=[],i=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(a[T]=-1,l[T]=0,i.has(M)||(i.add(M),f.push(M)))}for(;f.length>0;){const M=f.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(i.has(m))continue;const I=s.get(m);I!=null&&(a[I]=E,l[I]=l[E]+1,i.add(m),f.push(m))}}for(const M of o){if(i.has(M))continue;const E=s.get(M);E!=null&&(a[E]=-1,l[E]=0,i.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M{if(M===-1||E===-1)return-1;l[M]>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const I=x[m][M],w=x[m][E];I===-1||w===-1||I!==w&&(M=I,E=w)}return x[0][M]},"lcaIndex"),h=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],I=e[T];if(m==null||I==null||(m>I&&([E,T]=[T,E],[m,I]=[I,m]),m==null||I==null||m===I))continue;const w=s.get(E),R=s.get(T);if(w==null||R==null)continue;const k=C(w,R);if(k===-1)continue;const O=h[k];for(let F=m;F{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:h[E],m=T?new Map(T):new Map,I=n.children.get(M)??[];for(const w of I){const R=v(w),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let F=R.get(k)??0;const H=e[w];H!=null&&H>k&&(F+=1),O.set(w,F)}c(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Fs,"computeSubtreeCrossCounts");function _s(t,e,n){const o=new Map,s=d(r=>{let a=n[r]??0;const l=[...e.get(r)??[]];l.sort(Io(n));for(const f of l){s(f);const i=o.get(f);i!=null&&(a=Math.min(a,i))}o.set(r,a)},"annotate");for(const r of t)s(r);return o}d(_s,"annotateMinimumLayers");function Io(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Io,"compareByRankThenId");function Ds(t,e,n,o){let s=0;for(const f of e){const i=n[f]??0;i>s&&(s=i)}const r=Array.from({length:s+1},()=>[]),a=new Set,l=d(f=>{if(a.has(f))return;a.add(f);const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f);for(const g of o(f))l(g)},"emit");for(const f of t)l(f);for(const f of e)if(!a.has(f)){const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f),a.add(f)}return r}d(Ds,"emitNodesInTreeOrder");function Hs(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d(Hs,"deduplicateLayers");function Xs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const a=e[s]??0,l=[],f=[],i=n.get(s);for(const g of r){const x=o.get(g)??a;x>a?l.push({child:g,min:x}):f.push(g)}return l.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),f.sort((g,x)=>{const C=i?.get(g)??0,h=i?.get(x)??0;if(C!==h)return C-h;const p=o.get(g)??a,c=o.get(x)??a;return p!==c?p-c:g.localeCompare(x)}),[...l.map(g=>g.child),...f]}}d(Xs,"createChildOrderer");function nn(t,e,n){const o=Rs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const a=Fs(t,e,o),l=[...r].sort(Io(e)),f=_s(l,s,e),i=Xs(s,e,a,f);let g=Ds(l,t.nodes,e,i);return g=Hs(g),g}d(nn,"buildMultitreeLayerOrder");function Ys(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),a=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&a.push(r.get(l.dst));return bo(a)}d(Ys,"countCrossingsBetweenAdjacent");function Vn(t,e,n){const o=[];for(const r of e){const a=n[r.src],l=n[r.dst];if(a==null||l==null||a===l)continue;let f=r.src,i=r.dst,g=a,x=l;a>l&&(f=r.dst,i=r.src,g=l,x=a);for(let C=g;C(n[C]??0)-(n[x]??0));for(const x of g){const C=n[x]??0;if(C===0)continue;let h=0;for(const v of o.get(x)??[])h=Math.max(h,(n[v]??0)+1);if(h>=C)continue;const p=C;n[x]=h;const c=nn(t,n,s),y=Vn(c,t.edges,n);y(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const a=t.edges.filter(c=>c.src===s);if(a.length===0)continue;let l=!1,f=0;for(const c of a){const y=n(c.dst);y==null||y===r?l=!0:f++}if(f===0||l)continue;let i=0,g=!1;for(const c of t.edges){if(c.dst!==s)continue;const y=n(c.src);y&&(y===r?g=!0:i++)}if(i>0||!g)continue;const x=e[s]??0,C=x+f;let h=0;for(const c of t.edges)c.dst===s&&(h=Math.max(h,(e[c.src]??0)+1));const p=Math.max(x,h,C);p!==x&&(e[s]=p)}}d($s,"adjustCrossLaneSources");function zs(t,e){const n=ye(t),o=Pe(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let a=Object.create(null);for(const f of o){const i=go(n,f),g=e?.ignoreCrossLaneEdges?i.filter(x=>{const C=r(x.src),h=r(f);return!C||!h?!0:C===h}):i;if(g.length===0)a[f]=0;else if(s&&g.length===1){const x=g[0].src,C=r(x),h=r(f);C!==h?a[f]=a[x]??0:a[f]=(a[x]??0)+1}else{let x=-1/0;for(const C of g)x=Math.max(x,(a[C.src]??0)+1);a[f]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(a=Gs(n,a)),e?.ignoreCrossLaneEdges&&$s(n,a),{layers:nn(n,a,r),rankOf:a,dummy:new Set}}d(zs,"assignLayers_LongestPath");function Vs(t,e){const n=ye(t),s={...zs(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:a,succs:l}=rn(n,p=>{if(e?.ignoreCrossLaneEdges){const c=r(p.src),y=r(p.dst);if(c&&y&&c!==y)return!1}return!0}),f=Pe(n)??[...n.nodes],i=[...f].reverse(),g=d((p,c)=>{let y=0;for(const E of a.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=l.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,c)),Math.min(Math.max(c,y),v)},"clampFeasible"),x=en.GRAVITY_ITERATIONS,C=d(p=>{let c=!1;for(const y of p){const v=a.get(y)??[],M=l.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((w,R)=>w+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((w,R)=>w+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),I=g(y,m);I!==s[y]&&(s[y]=I,c=!0)}return c},"relaxOrder");for(let p=0;p0){const y=Math.min(...c.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:xo(n,f,s),rankOf:s,dummy:new Set}}d(Vs,"assignLayers_Gravity");function js(t){const e=mo(t),n=po(t);let o=yo(e);const s=[];for(;o.length>0;){const r=[];for(const a of o){s.push(a);for(const l of n.get(a)??[])e.set(l,(e.get(l)??0)-1),(e.get(l)??0)===0&&r.push(l)}o=r.sort((a,l)=>a.localeCompare(l))}return s.length===t.nodes.length?s:null}d(js,"topoSortByGenerationIfAcyclic");function Us(t,e){const n=ye(t),o=e?.direction==="LR"?js(n)??[...n.nodes].sort():Pe(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),a=Object.create(null),l=new Map,f=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const C=go(n,g);let h=0;if(C.length>0)for(const v of C){const M=v.src,E=a[M]??0;h=Math.max(h,E+f(M,g))}const p=r(g),c=l.get(p)??0,y=Math.max(h,c);a[g]=y,l.set(p,y+1)}return{layers:xo(n,o,a,{skipGroups:!0}),rankOf:a,dummy:new Set}}d(Us,"assignLayers_LaneAwareCompact");function Ws(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(h=>[...h]),r=new Set(t.dummy?[...t.dummy]:[]);let a=0;const l=new Map(n.nodeById),f=d(h=>{const p=`placeholder-${a++}`,c={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(p,c),r.add(p);s.length<=h;)s.push([]);return s[h].push(p),o[p]=h,p},"addDummyAt"),i=[...n.edges].sort((h,p)=>h.id===p.id?h.src===p.src?h.dst.localeCompare(p.dst):h.src.localeCompare(p.src):h.id.localeCompare(p.id)),g=[];for(const h of i){const p=o[h.src]??0,c=o[h.dst]??0;if(c-p<=1){g.push(h);continue}let y=h.src;for(let M=p+1,E=0;M!n.nodes.includes(h))],edges:g,layout:n.layout,nodeById:l};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:C}}d(Ws,"makeProperLayering");function jn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(jn,"median");function Un(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Un,"barycenter");function Ks(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Ks,"neighborPositionsFor");function qs(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(qs,"currentOrderTieBreak");function Wn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),a=Ne(e),l=[];for(const i of n)o.has(i.src)&&s.has(i.dst)&&l.push({u:r.get(i.src),v:a.get(i.dst)});l.sort((i,g)=>i.u===g.u?i.v-g.v:i.u-g.u);const f=l.map(i=>i.v);return bo(f)}d(Wn,"countCrossingsBetweenAdjacent");function je(t,e,n){return[...t].sort((o,s)=>{const r=jn(e.get(o)??[]),a=jn(e.get(s)??[]);return r===a?qs(o,s,n):isFinite(r)?isFinite(a)?r-a:-1:1})}d(je,"sortByHeuristic");function Kn(t,e,n,o,s,r){const a=Ne(t),l=Ne(e),f=Ks(e,a,n,o);if(!s||!r||r.length===0)return je(e,f,l);const i=new Map;for(const C of e){const h=s(C),p=i.get(h)??[];p.push(C),i.set(h,p)}const g=[];for(const C of r){const h=i.get(C);if(!h||h.length===0)continue;const p=je(h,f,l);g.push(...p)}const x=i.get(null);if(x&&x.length>0){const C=je(x,f,l);for(const h of C){const p=Un(f.get(h)??[]);let c=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Un(f.get(v)??[]);if(pa.has(c.src)&&l.has(c.dst)),g=f?n.filter(c=>l.has(c.src)&&f.has(c.dst)):void 0,x=d(c=>{let y=Wn(t,c,i);return g&&o&&(y+=Wn(c,o,g)),y},"crossingScore"),C=s?new Map:null;if(s&&C)for(const c of e)C.set(c,s(c));let h=!0,p=x(r);for(;h;){h=!1;for(let c=0;c+1[...l]),s=e.edges,r=fe(e),a=Mo(e,n?.laneOrder);for(let l=0;l<3;l++){for(let f=1;f=0;f--)o[f]=Kn(o[f+1],o[f],s,"up",r,a),o[f]=qn(o[f+1],o[f],s,o[f-1],r)}return{layers:o}}d(Js,"orderLayers");function Zs(t,e,n){const o=n?.layerGap??Po.DEFAULT_LAYER_GAP,s=n?.nodeGap??Po.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,a=n?.direction??"TB",l=a==="LR"||a==="RL",f=t.layers,i=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),C=d(O=>x(O)?.width??0,"getWidth"),h=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),c=Mo(e,n?.laneOrder),y=f.map(O=>O.reduce((F,H)=>Math.max(F,h(H)),0)),v=[];if(l)for(let O=0;O+1Math.max(mt,C(kt)),0),H=f[O+1].reduce((mt,kt)=>Math.max(mt,C(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(F+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of f)for(const F of O)M.add(p(F));const E=M.has(null),T=c.filter(O=>M.has(O)),m=[...E?[null]:[],...T],I=Object.create(null);for(const O of T)I[O]=0;E&&(I.null=0);for(const O of f){const F=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(F[G]||=[]).push(P)}for(const[P,G]of Object.entries(F)){const j=G.reduce((J,dt)=>J+C(dt),0)+s*Math.max(0,G.length-1);I[P]=Math.max(I[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+C(j),0)+s*Math.max(0,H.length-1);I.null=Math.max(I.null??0,P)}}const w=new Map;{const O=m.map(P=>(P===null?I.null:I[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;PC(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];i[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const F=O.ref.id;k.has(F)||k.set(F,[]),k.get(F).push(O)}for(const[,O]of k){if(O.length===0)continue;const F=O[0].ref,H=F.start,P=F.end;if(H==null||P==null)continue;const G=Math.round(((i[H]??0)+(i[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(i[J]=G)}}return{x:i,y:g}}d(Zs,"assignCoordinates");var Qs=8;function tr(t){let e=2166136261;for(let n=0;n>>0}d(tr,"hashString");function er(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(er,"mulberry32");function nr(t,e){const n=[...t],o=er(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(nr,"deterministicShuffle");function or(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(or,"sourceDistance");function Jn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:a}of e){const l=n.get(s),f=n.get(r);l==null||f==null||(o+=a*Math.abs(l-f))}return o}d(Jn,"laneArrangementCost");function sr(t){const e=cn(t);if(e.length<2)return[];const n=new Map(e.map((r,a)=>[r,a])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const a=typeof r.start=="string"?r.start:void 0,l=typeof r.end=="string"?r.end:void 0;if(!a||!l||!t.nodeById.has(a)||!t.nodeById.has(l))continue;const f=o(a),i=o(l);if(!f||!i||f===i)continue;const g=n.get(f),x=n.get(i);if(g==null||x==null)continue;const[C,h]=g<=x?[f,i]:[i,f],p=`${C}\0${h}`,c=s.get(p);c?c.weight++:s.set(p,{a:C,b:h,weight:1})}return[...s.values()]}d(sr,"buildWeightedLaneEdges");function Zn(t,e,n){const o=[...t];let s=Jn(o,e),r=!0,a=0;const l=Math.max(1,o.length);for(;r&&as.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:a})=>`${s}:${r}:${a}`).join("|");return tr(`${t.join("|")}#${o}#${n}`)}d(ir,"seedForRestart");function cr(t,e={}){const n=cn(t);if(n.length<2)return n;const o=sr(t);if(o.length===0)return n;const s=new Map(n.map((l,f)=>[l,f]));let r=Zn(n,o,s);const a=Math.max(0,e.restarts??Qs);for(let l=0;lct&&f*3>=l?a>0?"bottom":"top":l>ct?r>0?"right":"left":n}d(Qn,"chooseOrthogonalSide");function to(t,e){return Math.abs(t.to-e.from)u.isGroup&&!u.parentId);for(const u of i){const b={id:u.id},S=d(L=>{a.set(L.id,b),n.filter(A=>A.parentId===L.id).forEach(S)},"assignLane");S(u)}const g=n.filter(u=>!u.isGroup&&!u.isEdgeLabel).map(u=>{const b=u.width??10,S=u.height??10,L=u.x??0,A=u.y??0,B=Br;return{nodeId:u.id,minX:L-b/2-B,maxX:L+b/2+B,minY:A-S/2-B,maxY:A+S/2+B,visualXHalfExtent:f?S/2+B:b/2+B}}),x=d((u,b,S,L)=>{let A=l.find(B=>B.orientation===u&&Math.abs(B.coord-b)<1);return A||(A={id:`pipe-${u}-${b.toFixed(0)}`,orientation:u,coord:b,spanMin:S,spanMax:L,tracks:[]},l.push(A)),A.spanMin=Math.min(A.spanMin,S),A.spanMax=Math.max(A.spanMax,L),A},"getOrAddPipe"),C=d((u,b)=>{const S=u.width??10,L=u.height??10,A=u.x??0,B=u.y??0;switch(b){case"top":return{x:A,y:B-L/2};case"bottom":return{x:A,y:B+L/2};case"left":return{x:A-S/2,y:B};case"right":return{x:A+S/2,y:B}}},"portForSide"),h=d((u,b,S)=>C(u,Qn(u,b,S?"bottom":"top")),"getOrthogonalPort"),p=[],c=[],y=new Set,v=1e3,M=d((u,b,S)=>{if(p.length===0)return 0;const L=Math.abs(b.y-S.y)z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(A){const U=b.x,q=Math.min(b.y,S.y)-ct,z=Math.max(b.y,S.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===u||Y.orientation!=="horizontal"||Y.pipe.coordz||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((u,b)=>{if(!u.start||!u.end)return{idx:b,crossLane:0,dx:0,dy:0};const S=r.get(u.start),L=r.get(u.end),A=a.get(u.start),B=a.get(u.end),U=A&&B&&A.id!==B.id?1:0,q=S&&L?Math.abs((L.x??0)-(S.x??0)):0,z=S&&L?Math.abs((L.y??0)-(S.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((u,b)=>{if(u.crossLane!==b.crossLane)return b.crossLane-u.crossLane;const S=u.dx+u.dy,L=b.dx+b.dy;return Math.abs(S-L)>1?S-L:u.idx-b.idx}).map(u=>u.idx),T=d((u,b,S,L)=>{const A=Math.min(u.x,b.x),B=Math.max(u.x,b.x),U=Math.min(u.y,b.y),q=Math.max(u.y,b.y);return!!g.find(Y=>S&&Y.nodeId===S||L&&Y.nodeId===L?!1:Math.abs(u.x-b.x)>ct?Y.minYu.y&&Y.maxX>A&&Y.minXu.x&&Y.maxY>U&&Y.minYQn(u,b,"bottom"),"determineSide"),R=new Map;for(const[u,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const A=(L.x??0)-(S.x??0),B=(L.y??0)-(S.y??0);R.set(u,{edgeIdx:u,srcId:b.start,dstId:b.end,srcSide:w(S,{x:L.x??0,y:L.y??0}),dstSide:w(L,{x:S.x??0,y:S.y??0}),absDx:Math.abs(A),absDy:Math.abs(B),dxSign:Math.sign(A),dySign:Math.sign(B)})}const k=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.absDx===0?1/0:u.absDy/u.absDx:u.absDy===0?1/0:u.absDx/u.absDy,"preferenceStrength"),O=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.dxSign>=0?"right":"left":u.dySign>=0?"bottom":"top","secondarySide"),F=new Map;for(const u of R.values()){const b=`${u.srcId}:${u.srcSide}`;F.has(b)||F.set(b,[]),F.get(b).push(u)}const H=new Map,P=d((u,b)=>`${u}:${b}`,"loadKey");for(const u of R.values())H.set(P(u.srcId,u.srcSide),(H.get(P(u.srcId,u.srcSide))??0)+1),H.set(P(u.dstId,u.dstSide),(H.get(P(u.dstId,u.dstSide))??0)+1);for(const u of F.values())if(!(u.length<2)){u.sort((b,S)=>{const L=k(b),A=k(S);return Math.abs(L-A)>1e-9?A-L:b.edgeIdx-S.edgeIdx});for(let b=1;b=A||(H.set(P(S.srcId,S.srcSide),A-1),H.set(P(S.srcId,L),B+1),S.srcSide=L)}}const G=d(u=>{const b=u?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const u of R.values())j.has(u.dstId)||j.set(u.dstId,new Set),j.get(u.dstId).add(u.dstSide);for(const u of R.values()){if(!G(r.get(u.srcId)))continue;const b=j.get(u.srcId);if(!b?.has(u.srcSide))continue;const S=O(u);if(b.has(S)||(H.get(P(u.srcId,S))??0)>0)continue;const L=H.get(P(u.srcId,u.srcSide))??0;H.set(P(u.srcId,u.srcSide),Math.max(0,L-1)),H.set(P(u.srcId,S),1),u.srcSide=S}for(const u of R.values()){const{edgeIdx:b,srcId:S,dstId:L,srcSide:A,dstSide:B}=u,U=r.get(S),q=r.get(L),z=`${S}:${A}:src`,Y=A==="top"||A==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[u,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const S=u.split(":"),L=S.slice(0,-2).join(":"),A=S[S.length-2],B=S[S.length-1],U=r.get(L);if(!U)continue;const z=A==="left"||A==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,dn=`${Dt.edgeIdx}:${B}`;J.set(dn,Jt)}}const mt=d(u=>!!s[u]?.labelNodeId,"edgeHasLabelNode"),kt=d((u,b)=>u?(m.get(`${u}:${b}:src`)??[]).some(({edgeIdx:S})=>mt(S))||(m.get(`${u}:${b}:dst`)??[]).some(({edgeIdx:S})=>mt(S)):!1,"faceHasLabelNode"),Pt=d((u,b,S)=>b==="top"||b==="bottom"?{x:u.x+S,y:u.y}:{x:u.x,y:u.y+S},"applyPortOffset"),Q=d((u,b,S)=>{const L=R.get(u),A={x:S.x??0,y:S.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??w(b,A),q=L?.dstSide??w(S,B);let z=L?C(b,L.srcSide):h(b,A,!0),Y=L?C(S,L.dstSide):h(S,B,!1);const ot=J.get(`${u}:src`),rt=J.get(`${u}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const u of E){const b=s[u];if(c[u]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const{pSrcPort:A,pDstPort:B,srcSide:U,dstSide:q}=Q(u,S,L),z={...A},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=A.y>(S.y??0);z.y=X?A.y+ne:A.y-ne}else{const X=A.x>(S.x??0);z.x=X?A.x+ne:A.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.xK.minY&&X.y{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(A,S,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,A.y+ne):Math.max(X.maxY+2,A.y-ne);yt=[{x:A.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(A,S,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,A.x+ne):Math.max(X.maxX+2,A.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:A.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,S,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,S,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)1||bt>1,Nt=I.get(b.start??"")??0,ut=I.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(A,B,b.start,b.end)){b.points=[{...A},{...z},{...Y},{...B}],y.add(u);const Mt=K?"horizontal":"vertical",$t=K?A.y:A.x,It=K?Math.min(A.x,B.x):Math.min(A.y,B.y),St=K?Math.max(A.x,B.x):Math.max(A.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${u}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:u,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const dn=x("vertical",z.x,z.y,z.y);z.x=dn.coord;const hr=x("vertical",Y.x,Y.y,Y.y);Y.x=hr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX$&&X.minYlt&&(ue=Math.min(ue,X.minX-ze),he=Math.max(he,X.maxX+ze),ve=Math.min(ve,X.minY-ze),Le=Math.max(Le,X.maxY+ze))}for(const X of g){if(X.maxXhe||X.maxYLe)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const gr=l.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),pr=l.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),Be=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),ke=Be(z.x,z.y),So=Be(Y.x,Y.y),Fe=new Map,un=new Map,hn=new Map,_e=new Set,xe=[];Fe.set(ke,0),hn.set(ke,"n"),xe.push({key:ke,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),_e.add(ke);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),gn={x:Y.x,y:z.y},mr=ge(z,gn),yr=ge(gn,Y),xr=mr||yr,pn={x:z.x,y:Y.y},br=ge(z,pn),Mr=ge(pn,Y);if(xr?br||Mr||(Math.abs(z.x-Y.x)0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(_e.delete(X.key),X.key===So){let ut=So,Yt=Y;for(Ht=[Yt];un.has(ut);){const ee=un.get(ut);Ht.unshift(ee),Yt=ee,ut=Be(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=pr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=gr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&EtZt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minYK&&Zt.maxX>Yt&&Zt.minX$&&Zt.maxY>Bt&&Zt.minY10&&mn<-5||Ee<-10&&mn>5)&&(St=Math.abs(mn)*100),(Wt>10&&De<-5||Wt<-10&&De>5)&&(St+=Math.abs(De)*50);let Co=0;const vo=hn.get(X.key)??"n",Lo=Math.abs(De)>ct?"h":"v";vo!=="n"&&vo!==Lo&&(Co=50);const Ir=$t+It+St+Co,He=(Fe.get(X.key)??1/0)+Ir,Eo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(He<(Fe.get(Mt)??1/0))if(un.set(Mt,X.pt),Fe.set(Mt,He),hn.set(Mt,Lo),!_e.has(Mt))xe.push({key:Mt,f:He+Eo,pt:ut}),_e.add(Mt);else{const Zt=xe.findIndex(Sr=>Sr.key===Mt);Zt!==-1&&(xe[Zt].f=He+Eo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=KIt.minXGt&&It.minYOt);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minXMath.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)It.minX,Wt=Math.min(X.y,$.y)It.minY;return St&&Wt});let Mt=Ot;if(f&&Ot.length>0){const It=Ot.filter(St=>St.minXBt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;Xu.from{const A=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,u)),B=!S.segments.some(U=>(U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex)&&W(U,b));return A&&B?(u.trackIndex=L.index,b.trackIndex=S.index,S.segments=[...S.segments.filter(U=>U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(u=>{const b=u.tracks.length;return u.tracks[b]={index:b,coord:u.coord,segments:[]},b},"createNewTrack"),gt=d((u,b)=>{const S=u.pipe.tracks[u.trackIndex];S.segments=S.segments.filter(A=>A.edgeIndex!==u.edgeIndex||A.segmentIndex!==u.segmentIndex),u.trackIndex=b,u.pipe.tracks[b].segments.push({edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to})},"moveSegmentToTrack"),xt=d((u,b)=>{const S=c[u.edgeIndex];for(const L of S){const A=p[L];A.pipe===u.pipe&>(A,b)}},"moveSegmentChainToTrack"),vt=d(u=>{const b=c[u.edgeIndex],S=b.indexOf(p.indexOf(u)),L=[];return S>0&&L.push(p[b[S-1]]),S{if(u.orientation===b.orientation)return!1;const S=u.orientation==="horizontal"?u:b,L=u.orientation==="horizontal"?b:u;return L.pipe.coord>S.from&&L.pipe.coordL.from&&S.pipe.coord{for(const S of u.tracks)if(!S.segments.some(A=>(A.edgeIndex!==b.edgeIndex||A.segmentIndex!==b.segmentIndex)&&W(A,b)))return S.index;return-1},"findAvailableTrack"),Ut=d((u,b)=>{if(u.trackIndex===b.trackIndex)return W(u,b);const S=vt(u),L=vt(b);return S.some(A=>L.some(B=>Vt(A,B)))},"segmentsConflict"),te=d((u,b,S)=>{if(et(u,b,u.pipe.tracks[u.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(u.pipe,b);S(b,L!==-1?L:at(u.pipe))},"resolveTrackConflict"),Se=d(u=>{let b=0;for(let S=0;S{if(de.has(u))return de.get(u);const b=c[u];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(u,q),q}const L=p[b[0]].pipe.coord;let A=L;for(let q=1;qMath.abs(ot-L)?Y:ot;break}}const B=Math.abs(A-L),U={dest:A,deviation:B,base:L,delta:A-L};return de.set(u,U),U},"getDestInfo"),an=d(()=>{let u=0;const b=new Map;for(const[L,A]of s.entries())c[L].length!==0&&A.start&&(b.has(A.start)||b.set(A.start,[]),b.get(A.start).push(L));const S=d(L=>{const A=s[L];if(!A.start||!A.end)return 0;const B=r.get(A.start),U=r.get(A.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=S(B),ot=S(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=c[B].length,st=c[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=c[B][0],yt=c[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const A=L.map(B=>p[c[B][0]]);u+=Se(A)}return u},"fixSourceHandleCrossings"),ln=d(()=>{let u=0;const b=new Map;for(const[S,L]of s.entries())c[S].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(S));for(const S of b.values()){S.sort((A,B)=>{const U=d(Y=>{const ot=c[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(A),z=U(B);return Math.abs(q-z)>.1?q-z:A-B});const L=S.map(A=>p[c[A][c[A].length-1]]);u+=Se(L)}return u},"fixTargetHandleCrossings"),fn=d(()=>{let u=0;for(const b of l){const S=[];for(const L of b.tracks)for(const A of L.segments){const B=c[A.edgeIndex].find(U=>p[U].segmentIndex===A.segmentIndex);B!==void 0&&S.push(p[B])}S.sort((L,A)=>L.edgeIndex-A.edgeIndex||L.segmentIndex-A.segmentIndex);for(let L=0;L{L.segments.forEach(A=>{b.push({edgeIndex:A.edgeIndex,segmentIndex:A.segmentIndex,trackIndex:L.index,from:A.from,to:A.to})})}),b.sort((L,A)=>L.from-A.from);const S=[];if(b.length>0){let L=[b[0]],A=b[0].to;for(let B=1;BA.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...A].filter(tt=>(B.get(tt)??0)<-1),q=[...A].filter(tt=>(B.get(tt)??0)>1),z=[...A].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?u.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,u.coord-ot*Mn);if(z.length===0&&A.size>0){const tt=[...A].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,u.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,u.coord+yt*Rt*Mn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,u.coord+st*Mn)}}for(const[u,b]of s.entries()){const S=c[u]??[];if(S.length===0)continue;const L=[],A=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(u,A,B),z=S.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rtct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:to(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,to(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rtct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const u of s){const b=u.__originalEdge;b&&u.points&&(b.points=u.points)}t.edges=(t.edges??[]).filter(u=>!u.isLayoutOnly);const V=d((u,b)=>{const S=b.x??0,L=b.y??0,A=b.width??0,B=b.height??0;if(A<=0||B<=0)return u;const U=S-A/2,q=S+A/2,z=L-B/2,Y=L+B/2;if(u.xq||u.yY)return u;const ot=u.x-U,rt=q-u.x,st=u.y-z,tt=Y-u.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:u.y}:yt===rt?{x:q,y:u.y}:yt===st?{x:u.x,y:z}:{x:u.x,y:Y}},"nodeBoundaryClamp");for(const u of t.edges){const b=u.points;if(!b||b.length<2)continue;const S=u.start,L=u.end,A=S?r.get(S):void 0,B=L?r.get(L):void 0;A&&(b[0]=V(b[0],A)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(lr,"routeEdgesOrthogonal");function fr(t){return t.direction??"TB"}d(fr,"getSwimlaneDirection");function dr(t){const e=Uo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,a=t.config.swimlane?.automaticLaneOrdering??!1,l=fr(t),{ordered:f,coordinates:i}=ar(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:a,direction:l});Wo(e,f,i,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;lr(t,l);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Es(t,l),Ls(t),l}d(dr,"runSwimlaneLayoutCore");function ur(t){jo(t);const e=Ko(t);t.nodes=e.nodes,t.edges=e.edges}d(ur,"prepareSwimlaneLayout");var Hr=Cr({prepareLayout:ur,runLayoutCore:dr,afterPaint:zo});export{Hr as render}; +import{ap as Cr,l as In,_ as d,aA as To}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Ao=5,Xe=1e-5,Ye=1e-6;function Ue(t){const e=[];for(let n=0;n=1-Ye||C<=Ye||C>=1-Ye?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:C}}d(Bo,"segmentIntersection");function Sn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(Sn,"isHorizontalSeg");function ko(t){const e=[];for(let n=0;n=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Fo,"getArcSweepFlag");var vr=.001;function _o(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&To[e.arrowTypeStart];if(o){const r=t[0],a=t[1],l=Math.atan2(a.y-r.y,a.x-r.x);n[0].x=r.x+o*Math.cos(l),n[0].y=r.y+o*Math.sin(l)}const s=e.arrowTypeEnd&&To[e.arrowTypeEnd];if(s){const r=t.length,a=t[r-2],l=t[r-1],f=Math.atan2(l.y-a.y,l.x-a.x);n[r-1].x=l.x-s*Math.cos(f),n[r-1].y=l.y-s*Math.sin(f)}return n}d(_o,"applyMarkerOffsets");function Do(t,e,n,o,s){const r=t.point.x,a=t.point.y,l={x:r-e*t.r,y:a-n*t.r},f={x:r+e*t.r,y:a+n*t.r},i=[`L${Ae(l)}`];return s==="arc"?i.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${Ae(f)}`):i.push(`M${Ae(f)}`),i}d(Do,"emitJump");function Cn(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=n.x-e.x,l=n.y-e.y,f=Math.hypot(s,r),i=Math.hypot(a,l);if(f0){const E=Cn(s[i-1],s[i],s[i+1]??s[i],Ao);E&&(c=E.cutLen)}let y=x,v=null;r&&iE.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-c,y-E.d);for(let E=0;ET){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r=2?o:null}catch{return null}}d(Go,"decodeDataPoints");function $o(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const i of e)s.set(i.id,i);const r=[],a=new Map;for(const i of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(i.id):i.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;a.set(i.id,x);const h=Go(x.getAttribute("data-points"))??i.points;r.push({...i,points:h})}const l=ko(r);if(l.length===0)return;const f=new Map;for(const i of l){const g=f.get(i.jumpEdgeId)??[];g.push(i),f.set(i.jumpEdgeId,g)}for(const i of r){const g=f.get(i.id);if(!g||g.length===0)continue;const C=s.get(i.id)?.curve;if(C!==void 0&&!Yo(C))continue;const h=a.get(i.id);if(!h)continue;if(C===void 0){const E=h.getAttribute("d")??"";if(!Xo(E))continue}const p=h.getAttribute("style")??"",c=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=c?Number.parseFloat(c[1]):null,v=c?Number.parseFloat(c[2]):null,M=Ho(i,g,n);if(h.setAttribute("d",M),y!==null&&v!==null&&typeof h.getTotalLength=="function"){const E=h.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,I=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");h.setAttribute("style",I)}}}d($o,"applyLineJumpsToSvg");function zo(t,{measure:e}){const n=t.config?.swimlane?.lineHops;if(n===!1)return;const o=n==="gap"?"gap":"arc",s=t.edges.filter(r=>Array.isArray(r.points)&&r.points.length>=2).map(r=>({id:r.id,points:r.points,curve:r.curve,arrowTypeStart:r.arrowTypeStart,arrowTypeEnd:r.arrowTypeEnd}));$o(e.groups.edgePaths,s,{enabled:!0,jumpRadius:6,jumpStyle:o})}d(zo,"applySwimlaneLineJumps");var yn="__swimlane_default__",Lr=21,wo=20;function vn(t){return Math.max(t.padding??wo,wo)}d(vn,"topLaneHorizontalPadding");function Vo(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const a=n-s/2,l=Math.min(r,n+s/2),f=Math.min(Lr,Math.max(0,l-a)),i=a+f;if(i<=a){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:a,bottom:i}}d(Vo,"assignTopLaneTitleRect");function jo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===yn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:yn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=yn}d(jo,"prepareLayoutForSwimlanes");function Uo(t){const e=new Map;for(const f of t.nodes??[])e.set(f.id,f);const n=[];for(const f of t.edges??[]){const i=typeof f.start=="string"?f.start:void 0,g=typeof f.end=="string"?f.end:void 0;!i||!g||f.labelNodeId||n.push({id:f.id,src:i,dst:g,ref:f})}const o=t.nodes??[],s=o.filter(f=>f.isGroup),r=o.filter(f=>!f.isGroup);return{nodes:[...[...s].reverse(),...r].map(f=>f.id),edges:n,layout:t,nodeById:e}}d(Uo,"toGraphView");function Wo(t,e,n,o){const{layout:s}=t,r=t.nodeById,a=o?.layerGap??100,l=o?.nodeGap??40;let f=0;for(const C of e.layers){let h=0;for(const p of C){const c=r.get(p);if(!c){h++;continue}c.layer=f,c.order=h;const y=n.x[p]??h*l,v=n.y[p]??f*a;c.x=y,c.y=v,h++}f++}const i=s.nodes??[],g=new Map,x=[];for(const C of i){if(!C?.isGroup)continue;C.parentId||x.push(C);const h=i.filter(M=>M.parentId===C.id);let p=1/0,c=-1/0,y=1/0,v=-1/0;for(const M of h){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,I=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),c=Math.max(c,E+m/2),y=Math.min(y,T-I/2),v=Math.max(v,T+I/2))}if(p===1/0||y===1/0)C.x=C.x??0,C.y=C.y??0,C.width=C.width??0,C.height=C.height??0;else{const M=C.padding??20,E=C.parentId?M:2*vn(C),T=M,m=Math.max(0,c-p)+E,I=Math.max(0,v-y)+T,w=(p+c)/2,R=(y+v)/2;C.x=w,C.y=R,C.width=m,C.height=I,g.set(C.id,{minX:p,maxX:c,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let C=1/0,h=-1/0,p=0;for(const c of x){const y=c.padding??20;y>p&&(p=y);const v=g.get(c.id);v&&(C=Math.min(C,v.minY),h=Math.max(h,v.maxY))}if(C!==1/0&&h!==-1/0){const c=Math.max(0,h-C),v=Math.max(p,36),M=c+2*v,E=(C+h)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=C;const T=[...x].sort((k,O)=>{const F=k.x??0,H=O.x??0;return F-H}),m=[],I=[],w=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const F=Math.max(0,O.maxX-O.minX)+2*vn(k),H=(O.minX+O.maxX)/2;m.push(k.id),I.push(H),w.push(F)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],w[0]);else{const O=[];for(let j=0;j0&&s>0?{cx:e,cy:n,rect:we(e,n,o,s)}:void 0}d(eo,"measuredNodeRect");function no(t){if(t.isGroup)return;const e=eo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(no,"nodeBoundsInfoFor");function oe(t,e,n=_t){return Math.abs(t.x-e.x)n}d(Tt,"isHorizontalSegment");function At(t,e,n=_t){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(At,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=_t){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=_t){const n=[];for(let o=0;o0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function oo(t,e=_t){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&At(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:At(n,o,e)&&Tt(o,s,e)&&At(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(oo,"classifyThreeSegmentRoute");function on(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),a=Math.min(t.y,e.y),l=Math.max(t.y,e.y);return r>n.left-o&&sn.top-o&&ae.left+n&&t.xe.top+n&&t.y=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(qo,"rectContainsRect");function We(t,e){return t.lefte.left&&t.tope.top}d(We,"rectsOverlap");function Ln(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Ln,"inflateRect");function we(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(we,"rectFromCenterSize");function qt(t){return eo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function ro(t,e,n,o,s,r=_t){const a=e==="left"||e==="right",l=o==="left"||o==="right";if(a&&l){if(e==="right"&&o==="left"&&t.xn.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!a&&!l){if(e===o){if(ft(t,n,r))return;const C=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:C},{x:n.x,y:C},n]}if(!(e==="bottom"&&o==="top"&&t.yn.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(a&&!l){const g=e==="right"&&n.x>t.x||e==="left"&&n.xn.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const f=e==="bottom"&&n.y>t.y||e==="top"&&n.yn.x;return f&&i?[t,{x:t.x,y:n.y},n]:void 0}d(ro,"buildOrthogonalPortPath");function io(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(io,"buildSameSideTrackPath");function sn(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=no(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(sn,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=no(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function Jo(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,a=o.width??0,l=o.height??0;n.push({nodeId:o.id,...we(s,r,a,l)})}return n}d(Jo,"collectLayoutNodeRects");function co(t,e,n=_t){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),a=e.get(s);if(!(!r||!a))return{srcId:o,dstId:s,srcInfo:r,dstInfo:a,collinearX:Math.abs(r.cx-a.cx)p||Cv)return!1;const M=Math.abs(c-g.a.x)s:r&&l&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(Zo,"sameAxisSegmentsOverlap");function Ke(t,e,n,o,{epsilon:s=_t,skipDegenerateOther:r=!1}={}){for(const a of n){if(a===o||a.isLayoutOnly)continue;const l=a.points;if(!(!l||l.length<2))for(let f=0;fC+s&&pc+s&&xo+_t&&t=2?e[e.length-2]:void 0,f=(a?ft(a,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(f)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ts(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Tr=.5,Ro=4;function lo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length=0&&s=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const a=es(t[s],t[r],e);return n?[a,...t.slice(s)]:[...t.slice(0,s+1),a]}d(Tn,"clipEndpoint");function ns(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Tn(s,o.srcRect,!0)),o.dstRect&&(s=Tn(s,o.dstRect,!1)),s=ae(qe(s)),s=fo(s,o.srcRect,o.dstRect),o.edge.points=ae(qe(s))}}d(ns,"clipEdgeEndpointsToNodeBoundaries");function An(t,e,n,o=!1){if(ht(t,e,nt)){if(e.yn.bottom+nt)return e;if(o){if(t.xn.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.xn.right+nt)return e;if(o){if(t.yn.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(An,"snapEndpointToBoundary");function Je(t,e,n){const o=t[e];for(let s=e+n;s>=0&&so.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(os,"intersectRanges");function Rn(t,e){return e==="left"||e==="right"?Ze(t.top,t.bottom):Ze(t.left,t.right)}d(Rn,"clearanceRangeForSide");function Qe(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)0?os(r):void 0}d(ss,"straightClearanceRange");function Nn(t,e,n,o,s){const r=ss(t,e,n,o,s);if(!r)return;const a=s?t.y:t.x,l=Math.min(r.hi,Math.max(r.lo,a));if(!(Math.abs(l-a)({...l}));for(let l=e;l>=0&&l=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)o.bottom+nt;case"left":return ht(e,n,nt)&&n.xo.right+nt}}d(Bn,"leavesOutward");function kn(t,e,n){if(t.length<3)return t;if(n){const r=Pn(t[0],t[1],e);return r&&Bn(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Pn(t[o-1],t[o],e);return s&&Bn(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(kn,"collapseOwnBorderStub");function cs(t,e,n){let o=t;if(e){const r=Je(o,0,1);if(r){const a=An(r,o[0],e);a!==o[0]&&(o=[a,...o.slice(1)])}o=kn(o,e,!0)}if(n){const r=o.length-1,a=Je(o,r,-1);if(a){const l=An(a,o[r],n,!0);l!==o[r]&&(o=[...o.slice(0,r),l])}o=kn(o,n,!1)}const s=fo(o,e,n);return s!==o||o.length===2?s:(e&&(o=On(o,e,!0)),n&&(o=On(o,n,!1)),o)}d(cs,"snapAndCollapseEndpoints");function Fn(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=cs(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const a=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=a}}d(Fn,"prepareEdgeEndpointsForRenderer");function uo(t){return new Map(t.map(e=>[e.id,e]))}d(uo,"buildNodeMap");function as(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(as,"resolveTopLevelGroupId");function _n(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(_n,"groupDepth");function ho(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const a=r.x,l=r.y;if(typeof a!="number"||typeof l!="number")continue;const f=r.width??0,i=r.height??0;e=Math.min(e,a-f/2),n=Math.max(n,a+f/2),o=Math.min(o,l-i/2),s=Math.max(s,l+i/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(ho,"boundsForChildren");function ls(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(ls,"applyGroupBounds");function fs(t){const e=uo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>_n(s,e)-_n(o,e));for(const o of n){const s=t.filter(a=>a.parentId===o.id),r=ho(s);r&&ls(o,r)}}d(fs,"recomputeNestedGroupBounds");function tn(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(f=>!f.isGroup);let r=1/0,a=-1/0;for(const f of s){const i=f[e];typeof i=="number"&&(r=Math.min(r,i),a=Math.max(a,i))}if(!Number.isFinite(r)||!Number.isFinite(a))return!1;const l=d(f=>r+a-f,"mirror");for(const f of n){const i=f[e];typeof i=="number"&&(f[e]=l(i));const g=f.groupTitleRect;g&&(f.groupTitleRect=e==="x"?{...g,left:l(g.right),right:l(g.left)}:{...g,top:l(g.bottom),bottom:l(g.top)})}for(const f of o)for(const i of f.points??[])i[e]=l(i[e]);return!0}d(tn,"mirrorAxis");function ds(t){return(t.nodes??[]).some(n=>!n.isGroup)?tn(t,"y"):!0}d(ds,"applyBtDirectionTransform");function us(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,a=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-a)*C+l,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-a)*C+l,mt=j-r;G.x=dt,G.y=mt}fs(n);const h=n.filter(P=>P.isGroup&&!P.parentId);if(h.length===0)return e==="RL"&&tn(t,"x"),!0;const p=uo(n),c=new Map;for(const P of n){if(P.isGroup)continue;const G=as(P,p);if(!G)continue;const j=c.get(G)??[];j.push(P),c.set(G,j)}let y=0;for(const P of h){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of h){const G=c.get(P.id)??[],j=ho(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),I=T+2*m,w=l+I,O=(M+E)/2-I/2-l,F=O+w/2,H=Math.max(y,l);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;PC.cy?v.bottom:v.top,H=C.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:F},T={x:H,y:l.y},m={x:l.x,y:l.y}}else{const F=h.cx>C.cx?v.right:v.left,H=C.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:F,y:H},T={x:l.x,y:H},m={x:l.x,y:l.y}}const I=oe(E,T,se),w=oe(T,m,se);if(I&&w||!I&&wt(E,T,o,[g],1)||!w&&wt(T,m,o,[x],1))continue;const R=!I&&Ke(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!w&&Ke(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){I?y=[T,m]:w?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(hs,"portSwapToLShape");function gs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values());for(const l of t){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<4)continue;const i=pt(f,.001);if(i.length<4)continue;const g=i.length-1,x=i[g],C=i[g-1],h=i[g-2],p=x.x-C.x,c=x.y-C.y,y=Math.hypot(p,c);if(y>=10||y<.001)continue;const v=C.x-h.x,M=C.y-h.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(C,x,.001),m=At(C,x,.001),I=Tt(h,C,.001),w=At(h,C,.001);if(!(T&&w||m&&I))continue;const R=l.end,k=l.start,O=R?e.get(R):void 0;if(!O)continue;const F=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(w){const W=M<0;G={x:F,y:h.y},j={x:F,y:W?P.bottom:P.top}}else{const W=v>0;G={x:h.x,y:H},j={x:W?P.right:P.left,y:H}}if(wt(G,j,r,R?[R]:[],-2)||wt(G,j,a,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&so(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W{for(const at of t){if(at===l||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt=0){const W=i[g-3],et=[k,R].filter(at=>!!at);if(wt(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...i.slice(0,g-2),G,j];l.points=Pt;const Q=l.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(gs,"collapseShortTerminalStub");var Z=.001,Ft=8,it=Re,xn=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function ps(t,e){const s=d((h,p)=>{const c=h.x??0,y=h.y??0,v=p.x-c,M=p.y-y;let E=(h.width??0)/2,T=(h.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:c+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:c+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((h,p)=>{const c=pt(h.points??[]);if(c.length<2)return;const y=p?h.start:h.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?c[0]:c[c.length-1],T=p?c[1]:c[c.length-2],m=s(v,E);let I=E;if(xn(T,m)&&(I=T),ft(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,I.y),max:Math.max(m.y,I.y),boundary:m,railEnd:I,rect:M};if(ht(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,I.x),max:Math.max(m.x,I.x),boundary:m,railEnd:I,rect:M}},"terminalLaneFor"),a=d((h,p)=>Math.max(0,Math.min(h.max,p.max)-Math.max(h.min,p.min)),"projectedOverlapLength"),l=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:h.orientation==="H"?(Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1)&&ft(h.boundary,p.boundary,1):(Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1)&&ht(h.boundary,p.boundary,1),"sameTerminalFace"),f=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:a(h,p)>=Ft&&Math.abs(h.coord-p.coord)<.5,"exactTerminalLaneConflict"),i=d((h,p)=>{if(h.nodeId!==p.nodeId||h.orientation!==p.orientation||h.orientation!=="H"||h.atStart===p.atStart)return!1;const c=a(h,p);if(c2*y?!1:l(h,p)&&Math.abs(h.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((h,p)=>{const c=pt(h.edge.points??[]);if(c.length<2)return;const y=h.orientation==="V"?{x:h.boundary.x+p,y:h.boundary.y}:{x:h.boundary.x,y:h.boundary.y+p},v=h.orientation==="V"?{x:h.railEnd.x+p,y:h.railEnd.y}:{x:h.railEnd.x,y:h.railEnd.y+p};if(!d(()=>Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1?ht(y,h.boundary,Z)&&y.x>=h.rect.left+1&&y.x<=h.rect.right-1:Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1?ft(y,h.boundary,Z)&&y.y>=h.rect.top+1&&y.y<=h.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(h.atStart){const I=c.length>1&&oe(c[1],h.railEnd,Z),w=c.slice(I?2:1),R=w[0];return R&&!xn(R,v)?void 0:[y,v,...w]}const E=c.length>1&&oe(c[c.length-2],h.railEnd,Z),T=c.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!xn(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(h=>{const p=h.edge,c=pt(p.points??[]);if(c.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,I=E.x??0,w=E.y??0,[R,k]=c;return ht(R,k,Z)&&Math.abs(m-w)<1&&Math.abs(T-I)>1||ft(R,k,Z)&&Math.abs(T-I)<1&&Math.abs(m-w)>1},"laneIsStraightCollinearConnector"),C=[-7,7,-14,14,-21,21];for(let h=0;h<8;h++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let c=!1;for(let y=0;y{const R=x(I),k=x(w);return R!==k?Number(R)-Number(k):+!w.atStart-+!I.atStart});for(const I of m){for(const w of C){const R=g(I,w);if(!R)continue;const k=r({...I.edge,points:R},I.atStart);if(!(!k||p.some(O=>O.edge!==I.edge&&(f(k,O)||T&&i(k,O))))){I.edge.points=R,c=!0;break}}if(c)break}}if(!c)return}}d(ps,"separateSharedRenderedTerminalLanes");function ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((l,f)=>{const i=l.start,g=l.end,x=it(f);if(x.length!==f.length-1)return!1;const C=[i,g].filter(h=>!!h);for(const h of x)if(wt(h.a,h.b,o,C,-2)||wt(h.a,h.b,s,[],-2))return!1;for(const h of t){if(h===l||h.isLayoutOnly)continue;const p=h.points;if(!(!p||p.length<2)){for(const c of x)for(const y of it(pt(p)))if(ce(c,y,.5)>=Ft||le(c.a,c.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),a=d((l,f)=>{if(f+4>=l.length)return;const i=l[f],g=l[f+1],x=l[f+2],C=l[f+3],h=l[f+4],p=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&ft(i,C,Z)&&ft(i,h,Z)&&ft(g,x,Z)&&(g.x-i.x)*(C.x-x.x)<0,c=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&ht(i,C,Z)&&ht(i,h,Z)&&ht(g,x,Z)&&(g.y-i.y)*(C.y-x.y)<0;if(p||c)return pt([...l.slice(0,f+1),h,...l.slice(f+5)]);if(f+5>=l.length)return;const y=l[f+5],v=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&At(h,y)&&ft(i,h,Z)&&ft(i,y,Z)&&ft(x,C,Z)&&(x.x-g.x)*(h.x-C.x)<0,M=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&Tt(h,y)&&ht(i,h,Z)&&ht(i,y,Z)&&ht(x,C,Z)&&(x.y-g.y)*(h.y-C.y)<0;if(!(!v&&!M))return pt([...l.slice(0,f+1),y,...l.slice(f+6)])},"withoutDogleg");for(let l=0;l<8;l++){let f=!1;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(let x=0;x<=g.length-5;x++){const C=a(g,x);if(!(!C||!r(i,C))){i.points=C,f=!0;break}}if(f)break}if(!f)return}}d(ms,"collapseRedundantRectangularDoglegs");function Dn(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(p=>!p.isLayoutOnly),f=d((p,c,y)=>pt(p===c?y??[]:p.points??[]),"pointsFor"),i=d((p,c)=>{let y=0;for(let v=0;v{const c=it(p);if(c.length!==3)return;const y=c[1];if(!(c[0].horizontal===y.horizontal||c[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return c.horizontal?zt(c.a.x,c.b.x,M.left,M.right)>=Ft&&c.a.y>=M.top-2&&c.a.y<=M.bottom+2:zt(c.a.y,c.b.y,M.top,M.bottom)>=Ft&&c.a.x>=M.left-2&&c.a.x<=M.right+2})},"blockingRectsFor"),C=d((p,c,y)=>{const v=p.map(E=>({...E}));if(c.horizontal)v[c.index].y=y,v[c.index+1].y=y;else if(c.vertical)v[c.index].x=y,v[c.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),h=d((p,c,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(c);if(M.length!==c.length-1)return!1;for(const E of M)if(wt(E.a,E.b,r,v,-2)||wt(E.a,E.b,a,[],-2))return!1;for(const E of l)if(E!==p){for(const T of M)for(const m of it(f(E)))if(ce(T,m,.5)>=Ft)return!1}return i(p,c)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const c=i();let y=!1;for(const v of l){const M=f(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(I=>I.rect.top))-20,Math.max(...T.map(I=>I.rect.bottom))+20]:[Math.min(...T.map(I=>I.rect.left))-20,Math.max(...T.map(I=>I.rect.right))+20];for(const I of m){const w=C(M,E.segment,I);if(!(!w||!h(v,w,c))){v.points=w,y=!0;break}}if(y)break}if(!y)return}}d(Dn,"liftObstacleHuggingSameSideRails");function Hn(t,e){const o=d(f=>{const i=f.groupTitleRect;if(!(!i||typeof i.left!="number"||typeof i.right!="number"||typeof i.top!="number"||typeof i.bottom!="number"||!Number.isFinite(i.left)||!Number.isFinite(i.right)||!Number.isFinite(i.top)||!Number.isFinite(i.bottom)||i.right<=i.left||i.bottom<=i.top))return{left:i.left,right:i.right,top:i.top,bottom:i.bottom}},"validTitleRect"),s=d(f=>{if(!f.isGroup||f.parentId)return;const i=f.direction,g=typeof i=="string"?i.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(f),C=f.y,h=f.height;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(c<=0||p{if(!f.horizontal)return!1;const g=f.a.y;return g<=i.top+Z||g>=i.bottom-Z?!1:zt(f.a.x,f.b.x,i.left,i.right)>=Ft},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(f=>!!f);if(a.length===0)return;let l=0;for(const f of t){if(f.isLayoutOnly)continue;const i=pt(f.points??[]);for(const g of it(i))for(const x of a)r(g,x.rect)&&(l=Math.max(l,x.rect.bottom-g.a.y+4))}if(!(l<=Z))for(const f of a){const i=f.node.y,g=f.node.height;typeof i!="number"||typeof g!="number"||!Number.isFinite(i)||!Number.isFinite(g)||g<=0||(f.node.y=i-l/2,f.node.height=g+l,f.node.groupTitleRect={...f.rect,top:f.rect.top-l,bottom:f.rect.bottom-l})}}d(Hn,"liftTopLaneTitleBandsAboveRails");function Xn(t,e){const o=d(i=>{const g=i.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(i=>{if(!i.isGroup||i.parentId||i.direction!=="LR")return;const x=o(i),C=i.x,h=i.width;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(p<=0||c{if(!i.vertical)return!1;const x=i.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(i.a.y,i.b.y,g.top,g.bottom)>=Ft},"verticalSegmentIntersectsTitle"),a=d((i,g)=>{if(!i.horizontal)return!1;const x=i.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(i.a.x,i.b.x,g.left,g.right)>=Ft},"horizontalSegmentIntersectsTitle"),l=[...e.values()].map(s).filter(i=>!!i);if(l.length===0)return;let f=0;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(const x of it(g))for(const C of l)if(r(x,C.rect))f=Math.max(f,C.rect.right-x.a.x+4);else if(a(x,C.rect)){const h=Math.min(x.a.x,x.b.x);f=Math.max(f,C.rect.right-h+4)}}if(!(f<=Z))for(const i of l){const g=i.node.x,x=i.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(i.node.x=g-f/2,i.node.width=x+f,i.node.groupTitleRect={...i.rect,left:i.rect.left-f,right:i.rect.right-f})}}d(Xn,"shiftLeftLaneTitleBandsLeftOfRails");function ys(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,c=new Map)=>pt(c.get(p)??p.points??[]),"replacementPointsFor"),a=d((p=new Map)=>{let c=0;for(let y=0;ys.reduce((c,y)=>c+Qt(r(y,p)),0),"totalBends"),f=d(p=>{const c=r(p);if(c.length<4)return;const y=c[c.length-2],v=c[c.length-1];if(!(!Tt(y,v,Z)&&!At(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),i=d((p,c)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:c.tailStart.y};else if(At(v,M,Z))E={x:c.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,c.tailStart,c.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(c))if(wt(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,c,y)=>{for(const v of s)if(v!==p){for(const M of it(c))for(const E of it(r(v,y)))if(ce(M,E,.5)>=Ft)return!0}return!1},"pathHasSharedTrack"),C=d((p,c,y)=>!g(p,c)&&!x(p,c,y),"candidateIsSafe"),h=d(()=>{const p=new Map;for(const c of s){const y=c.end;if(!y||!e.has(y)||r(c).length<4)continue;const M=p.get(y)??[];M.push(c),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const c=a();if(c===0)return;const y=l();let v,M=c,E=y;for(const T of h().values())for(let m=0;m=c||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(ys,"swapDestinationTerminalTailsToReduceCrossings");function xs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(T=>!T.isLayoutOnly),f=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),i=d((T=new Map)=>{let m=0;for(let I=0;Il.reduce((m,I)=>m+Qt(f(I,T)),0),"totalBends"),x=d(T=>{const m=T.start,I=T.end,w=m?e.get(m):void 0,R=I?e.get(I):void 0,k=w?qt(w):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),C=d((T,m,I)=>{if(I.index<=0||I.index+1>=m.length-1)return;const w=x(T);if(w){if(I.vertical){const R=I.a.x,k=Math.min(w.src.left,w.dst.left),O=Math.max(w.src.right,w.dst.right),F=RO+Z?"right":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"vertical",side:F,coord:R,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const R=I.a.y,k=Math.min(w.src.top,w.dst.top),O=Math.max(w.src.bottom,w.dst.bottom),F=RO+Z?"bottom":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"horizontal",side:F,coord:R,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),h=d(()=>{const T=[];for(const m of l){const I=f(m);for(const w of it(I)){const R=C(m,I,w);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=Ft,"railsInteract"),c=d(T=>{const m=[],I=new Set;for(const w of T){if(I.has(w))continue;const R=[w],k=[];for(I.add(w);R.length>0;){const O=R.pop();k.push(O);for(const F of T)!I.has(F)&&p(O,F)&&(I.add(F),R.push(F))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const I of T)m.some(w=>Math.abs(w-I.coord){const m=T.map(R=>R.coord),I=y(T),w=[];if(T.length<=6){const R=new Array(I.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((F,H)=>Math.abs(F-m[H])>=Z)&&w.push([...k]);return}for(const[F,H]of I.entries())R[F]||(R[F]=!0,k.push(H),O(),k.pop(),R[F]=!1)},"visit");return O(),w}for(let R=0;R{const I=new Map;for(const[R,k]of T.entries()){const O=m[R],F=I.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(F[k.segmentIndex].x=O,F[k.segmentIndex+1].x=O):(F[k.segmentIndex].y=O,F[k.segmentIndex+1].y=O),I.set(k.edge,F)}const w=new Map;for(const[R,k]of I){const O=ae(pt(k));if(it(O).length!==O.length-1)return;w.set(R,O)}return w},"replacementsForAssignment"),E=d(T=>{for(const[m,I]of T){const w=[m.start,m.end].filter(R=>!!R);for(const R of it(I))if(wt(R.a,R.b,r,w,-2)||wt(R.a,R.b,a,[],-2))return!1}for(let m=0;m=Ft)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=i();if(m===0)return;let I,w=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of c(h()))for(const F of v(O)){const H=M(O,F);if(!H||!E(H))continue;const P=i(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(F[mt]-dt.coord),0);P>w||P===w&&(G>R||G===R&&j>=k)||(I=H,w=P,R=G,k=j)}if(!I)return;for(const[O,F]of I)O.points=F}}d(xs,"reassignCrossingExternalRailChannels");function bs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(h=>!h.isLayoutOnly),a=d((h,p,c)=>pt(h===p?c??[]:h.points??[]),"pointsFor"),l=d(h=>it(h).reduce((p,c)=>{const y=c.a.x-c.b.x,v=c.a.y-c.b.y;return p+Math.hypot(y,v)},0),"pathLength"),f=d((h,p)=>{let c=0;for(let y=0;y{if(h.horizontal){const c=h.a.y;return(Math.abs(c-p.top)<1||Math.abs(c-p.bottom)<1)&&zt(h.a.x,h.b.x,p.left,p.right)>=Ft}if(h.vertical){const c=h.a.x;return(Math.abs(c-p.left)<1||Math.abs(c-p.right)<1)&&zt(h.a.y,h.b.y,p.top,p.bottom)>=Ft}return!1},"segmentRunsAlongRectBorder"),g=d(h=>{const p=[h.start,h.end].filter(y=>!!y),c=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&c.push(M)}return c},"endpointRectsFor"),x=d((h,p)=>{if(p+3>=h.length)return[];const c=h[p],y=h[p+1],v=h[p+2],M=h[p+3],E=Tt(c,y,Z)&&At(y,v,Z)&&Tt(v,M,Z),T=At(c,y,Z)&&Tt(y,v,Z)&&At(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-c.x)!==Math.sign(M.x-v.x):Math.sign(y.y-c.y)!==Math.sign(M.y-v.y)))return[];const I=ft(c,M,Z)||ht(c,M,Z)?[]:[{x:c.x,y:M.y},{x:M.x,y:c.y}],w=I.length===0?[[...h.slice(0,p+1),...h.slice(p+3)]]:I.map(k=>[...h.slice(0,p+1),k,...h.slice(p+3)]),R=new Set;return w.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(F=>oe(F,M,Z)))return!1;const O=k.map(F=>`${F.x.toFixed(3)},${F.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),C=d((h,p,c)=>{const y=[h.start,h.end].filter(M=>!!M),v=g(h);for(const M of it(p))if(wt(M.a,M.b,o,y,-2)||wt(M.a,M.b,s,[],-2)||v.some(E=>i(M,E)))return!1;for(const M of r)if(M!==h){for(const E of it(p))for(const T of it(a(M)))if(ce(E,T,.5)>=Ft)return!1}return f(h,p)<=c},"candidateIsSafe");for(let h=0;h<8;h++){const p=f();let c,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=a(T),I=Qt(m,Z),w=l(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),F=l(k);if(!(Ov||P===v&&(O>M||O===M&&F>=E)||(c=T,y=k,v=P,M=O,E=F)}}if(!c||!y)return;c.points=y}}d(bs,"shortcutRedundantOrthogonalJogs");function Ms(t,e){const a=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const _=N.x??0,D=N.y??0,V=qt(N);V&&a.push({id:String(N.id??""),cx:_,cy:D,rect:V})}if(a.length===0)return;const l=new Map(a.map(N=>[N.id,N])),f=a.map(N=>({id:N.id,rect:N.rect})),i=["top","bottom","left","right"],g={top:Math.min(...a.map(N=>N.rect.top))-20,bottom:Math.max(...a.map(N=>N.rect.bottom))+20,left:Math.min(...a.map(N=>N.rect.left))-20,right:Math.max(...a.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),C=new Map(x.map((N,_)=>[N,_])),h=d(N=>{const _=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+_*20*V);return D},"outwardTracksForSide"),p=d((N,_=new Map)=>pt(_.get(N)??N.points??[]),"replacementPointsFor"),c=d((N,_)=>{let D=0;for(const V of N)for(const u of _)le(V.a,V.b,u.a,u.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,_)=>c(it(N),it(_)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let _=0;const D=[],V=new Set,u=[],b=d(S=>{V.has(S)||(V.add(S),u.push(S))},"addEdge");for(let S=0;S0&&(_+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return u.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),{count:_,pairs:D,edgeSet:V,edges:u}},"crossingSnapshot"),M=d((N,_)=>{const D=new Set(_.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let u=0;for(let b=0;b{const _=new Map;for(const u of N.pairs){const b=_.get(u.first)??new Set;b.add(u.second),_.set(u.first,b);const S=_.get(u.second)??new Set;S.add(u.first),_.set(u.second,S)}const D=[],V=new Set;for(const u of N.edges){if(V.has(u))continue;const b=[u],S=[];for(V.add(u);b.length>0;){const L=b.pop();S.push(L);for(const A of _.get(L)??[])V.has(A)||(V.add(A),b.push(A))}S.sort((L,A)=>(C.get(L)??0)-(C.get(A)??0)),S.length>1&&D.push(S)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(_=>!!_),"endpointIdsFor"),m=d(N=>{const _=[];for(const D of E(N)){const V=new Set(D),u=new Set(D.flatMap(S=>T(S))),b=[...D];for(const S of x)V.has(S)||T(S).some(L=>u.has(L))&&b.push(S);b.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),_.push(b)}return _},"pairSearchGroups"),I=d((N,_,D)=>M(N,new Map([[_,D]])),"crossingCountWithSingleReplacement"),w=d(N=>{const _=new Map;for(const D of N.pairs)_.set(D.first,(_.get(D.first)??0)+D.count),_.set(D.second,(_.get(D.second)??0)+D.count);return _},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((_,D,V)=>{const u=N[V];return _+Math.abs(D.x-u.x)+Math.abs(D.y-u.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((_,D)=>_+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((_,D)=>_+R(p(D,N)),0),"totalLength"),F=d((N,_,D=new Map)=>{const V=it(_);for(const u of x)if(u!==N){for(const b of V)for(const S of it(p(u,D)))if(ce(b,S,.5)>=Ft)return!0}return!1},"pathHasSegmentConflict"),H=d((N,_)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(_))if(wt(V.a,V.b,f,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,_)=>{const D=ae(pt(_));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,_,D)=>{switch(_){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,_,D,V)=>{const u=D==="left"||D==="top"?-1:1,b=[j(_,D,V),g[D]];for(const S of b)for(let L=0;L<=2;L++)P(N,io(_,D,V,S+u*20*L))},"addSameSideCandidates"),dt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:b,y:_.y},{x:b,y:S},{x:V.x,y:S},V])},"addHorizontalToVerticalCandidates"),mt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:_.x,y:b},{x:S,y:b},{x:S,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,_,D,V,u)=>{const b=[...h("top"),...h("bottom")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:S,y:_.y},{x:S,y:A},{x:L,y:A},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,_,D,V,u)=>{const b=[...h("left"),...h("right")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:_.x,y:S},{x:A,y:S},{x:A,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const _=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(u=>`${u.x.toFixed(3)},${u.y.toFixed(3)}`).join("|");return _.has(V)||D.length<2?!1:(_.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,_,D,V)=>{const u=[],b=ro(N,_,D,V,20,Z);b&&P(u,b),_===V&&J(u,N,_,D);const S=G(_),L=G(V);return S&&!L?dt(u,N,_,D,V):!S&&L?mt(u,N,_,D,V):S?kt(u,N,_,D,V):Pt(u,N,_,D,V),Q(u)},"buildCandidatesForSides"),et=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="top"||S==="bottom"?h(S):b;for(const B of u){P(N,[_,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of A)P(N,[_,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="left"||S==="right"?h(S):u;for(const B of b){P(N,[_,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of A)P(N,[_,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const _=N.start,D=N.end,V=D?l.get(D):void 0;if(!_||!V)return[];const u=pt(N.points??[]);if(u.length<4)return[];const b=u[0],S=u[1],L=[];return At(b,S,Z)?et(L,b,S,V):Tt(b,S,Z)&&at(L,b,S,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const _=N.start,D=N.end,V=_?l.get(_):void 0,u=D?l.get(D):void 0;if(!V||!u)return[];const b=[];for(const S of i){const L=Ie(V,S);for(const A of i)b.push(...W(L,S,Ie(u,A),A))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,_,D)=>{const V=new Set;for(const u of x){if(u===N)continue;const b=D.get(u)??it(p(u));_.some(S=>b.some(L=>ce(S,L,.5)>=Ft))&&V.add(u)}return V},"sharedTrackConflictsFor"),jt=d((N,_,D,V)=>{const u=new Set;return xt(N).map(S=>ae(pt(S))).filter(S=>{if(H(N,S))return!1;const L=S.map(A=>`${A.x.toFixed(3)},${A.y.toFixed(3)}`).join("|");return u.has(L)||S.length<2?!1:(u.add(L),!0)}).map(S=>{const L=it(S);let A=0;for(const B of x)B!==N&&(A+=c(L,D.get(B)??it(p(B))));return{candidate:S,candidateSegments:L,crossings:_.count-(V.get(N)??0)+A,bends:Qt(S,Z),totalBends:Qt(S),length:R(S)}}).filter(({crossings:S})=>S<=_.count).sort((S,L)=>S.crossings-L.crossings||S.bends-L.bends||S.length-L.length).slice(0,48).map(S=>({path:S.candidate,segments:S.candidateSegments,sharedTrackConflicts:Vt(N,S.candidateSegments,D),totalBends:S.totalBends,length:S.length}))},"pairCandidatesFor"),Ut=d((N,_,D,V,u,b)=>{let S=0;for(const A of N.pairs)(A.first===_||A.second===_||A.first===V||A.second===V)&&(S+=A.count);let L=c(D.segments,u.segments);for(const A of x){if(A===_||A===V)continue;const B=b.get(A)??it(p(A));L+=c(D.segments,B)+c(u.segments,B)}return N.count-S+L},"pairCrossingCount"),te=d((N,_)=>{for(const D of N.sharedTrackConflicts)if(D!==_)return!1;return!0},"conflictsOnlyWith"),Se=d((N,_)=>N.segments.some(D=>_.segments.some(V=>ce(D,V,.5)>=Ft)),"candidatesShareTrack"),de=d((N,_,D,V)=>te(_,D.edge)&&te(V,N.edge)&&!Se(_,V),"pairCandidatesAreCompatible"),Ce=d((N,_,D,V,u)=>{const b=Ut(N.current,_.edge,D,V.edge,u,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[_.edge,D.path],[V.edge,u.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(_.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+u.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(_.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+u.length}},"scorePairReplacement"),an=d((N,_)=>N.crossings<_.crossings||N.crossings===_.crossings&&(N.bends<_.bends||N.bends===_.bends&&N.length<_.length),"pairScoreIsBetter"),ln=d((N,_,D,V)=>{let u=V;for(const b of _.candidates)for(const S of D.candidates){if(!de(_,b,D,S))continue;const L=Ce(N,_,b,D,S);L&&an(L,u)&&(u=L)}return u},"bestScoreForOptionPair"),fn=d(N=>{const _=k(),D=O(),V=vt(),u=w(N),b=new Map(x.map(q=>[q,Qt(p(q))])),S=new Map(x.map(q=>[q,R(p(q))])),L=new Map,A=m(N);for(const q of A)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,u);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:_,length:D};const U={current:N,currentBends:_,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:S,baseSegments:V};for(const q of A){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const _=v(),D=_.count;if(D===0)return;let V,u,b=D,S=Number.POSITIVE_INFINITY;for(const A of _.edges){const B=Qt(p(A),Z);for(const U of xt(A)){const q=H(A,U),z=!q&&F(A,U),Y=I(_,A,U),ot=Qt(U,Z);q||z||!(Yb||Y===b&&ot>=S||(V=A,u=U,b=Y,S=ot)}}if(V&&u){V.points=u;continue}const L=fn(_);if(!L)return;for(const[A,B]of L)A.points=B}}d(Ms,"resolveRenderedOrthogonalCrossings");var pe=.001,Rr=8;function Is(t,e){const{nodeInfoById:n,realNodeRects:o}=sn(e),s=["top","bottom","left","right"],r=20,a={top:Math.min(...o.map(c=>c.rect.top))-r,bottom:Math.max(...o.map(c=>c.rect.bottom))+r,left:Math.min(...o.map(c=>c.rect.left))-r,right:Math.max(...o.map(c=>c.rect.right))+r},l=d((c,y,v,M)=>{const E=[],T=ro(c,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(io(c,y,v,a[y])),E},"buildOrthogonalPathCandidates"),f=d((c,y)=>{for(let v=0;v{let M=0;const E=Re(c,pe),T=y.start,m=y.end;for(const I of t){if(I===y||I.isLayoutOnly)continue;const w=I.start,R=I.end;if(!v&&T&&m&&(w===T||w===m||R===T||R===m))continue;const k=I.points;if(!(!k||k.length<2))for(const O of E)for(const F of Re(k,pe)){if(ao(O.a,O.b,F.a,F.b,pe,pe)){M++;continue}ce(O,F,pe)>=Rr&&M++}}return M},"pathConflictCount"),g=4,x=d((c,y)=>{const v=Math.abs(c.y-y.rect.top),M=Math.abs(c.y-y.rect.bottom),E=Math.abs(c.x-y.rect.left),T=Math.abs(c.x-y.rect.right);let m="top",I=v;return M{const M=C.get(c)??[];M.push({side:y,edgeId:v}),C.set(c,M)},"addFaceClaim");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points??[];if(y.length<1)continue;const v=c.id??"",M=c.start,E=c.end;if(M){const T=n.get(M);T&&h(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&h(E,x(y[y.length-1],T),v)}}const p=d((c,y,v)=>C.get(c)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v0){const mt=i(J,c,!0);if(mt>O||mt===O&&dt>=F)continue;O=mt,F=dt,k=J;continue}i(J,c)>R||dtG.edgeId!==I));const P=C.get(E);P&&C.set(E,P.filter(G=>G.edgeId!==I)),h(M,x(k[0],T),I),h(E,x(k[k.length-1],m),I)}}}d(Is,"simplifyDetouredEdges");var Kt=.001,No=10,$e=7;function Yn(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const a=r.x-s.x,l=r.y-s.y;if(!(Math.abs(a)+Math.abs(l)r&&We(t,Ss(r)))}d(Gn,"labelOverlapsOwnMarker");function Ve(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const c=p.points;if(!(!c||c.length<2))for(let y=0;y{const y=Ln(c,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&We(y,M))return!0;return!1},"labelOverlapsForeignNode"),i=d((p,c)=>{const y=Ln(c,r);for(const v of n)if(v.edgeId!==p&&on(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,c,y)=>f(p,y)||i(c,y),"labelOverlapsAnything"),x=[],C=d(p=>{for(const{id:c,rect:y}of s)if(qo(y,p))return c},"findContainingLane"),h=d((p,c)=>x.some(y=>y.labelId!==p&&We(c,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const c=p.labelNodeId;if(!c)continue;const y=e.get(c);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx0?m:T,w=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===w,gt=et.orientation===w;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],F=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=we(Q.midX,Q.midY,M,E),et=C(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+a,xt=at.rect.right-M/2-a,vt=at.rect.top+E/2+a,Vt=at.rect.bottom-E/2-a;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=we(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+l;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt{const W=R(Q);for(const et of W)for(const at of F){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!Gn(xt.rect,v)&&!h(c,xt.rect)&&!g(c,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!Gn(vt.rect,v)&&!h(c,vt.rect)&&!f(c,vt.rect)&&(et||!i(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(I)??(I.lengthet.labelId===c);W>=0?x[W]={labelId:c,rect:Q}:x.push({labelId:c,rect:Q})}}}d(Ve,"anchorLabelsToPolyline");var bn=1e-6,Nr=8,Oo=Nr/2,Or=3;function $n(t,e){return t{const g=$n(l,f);let x=0;const C=d(h=>{if(!h)return;const p=s.get(h);if(!p)return;const c=i==="x"?p.w/2:p.h/2;c>x&&(x=c)},"consider");C(a.labelNodeId);for(const h of t){if(h===a||h.isLayoutOnly)continue;const p=h.start,c=h.end;!p||!c||$n(p,c)===g&&C(h.labelNodeId)}return x>0?x+Or:0},"labelClearanceFor");for(const a of t){if(a.isLayoutOnly)continue;const l=a.points;if(!oo(l,bn))continue;const f=co(a,n,bn);if(!f)continue;const{srcId:i,dstId:g,srcInfo:x,dstInfo:C,collinearX:h,collinearY:p}=f;if(h===p)continue;let c,y;if(h){const m=C.cy>x.cy;c={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:C.cx,y:m?C.rect.top:C.rect.bottom}}else{const m=C.cx>x.cx;c={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?C.rect.left:C.rect.right,y:C.cy}}if(wt(c,y,o,[i,g],1))continue;const M=r(a,i,g,h?"x":"y"),E=M>Oo?M:Oo,T=[0,E,-E];for(const m of T){const I={...c},w={...y};if(h){if(I.x+=m,w.x+=m,I.x<=x.rect.left||I.x>=x.rect.right||w.x<=C.rect.left||w.x>=C.rect.right)continue}else if(I.y+=m,w.y+=m,I.y<=x.rect.top||I.y>=x.rect.bottom||w.y<=C.rect.top||w.y>=C.rect.bottom)continue;if(!wt(I,w,o,[i,g],1)&&!Ke(I,w,t,a,{epsilon:bn})){a.points=[I,w];break}}}}d(Cs,"straightenCollinearSiblingDetours");function zn(t,e){const{realNodeRects:f,labelNodeRects:i}=me(e.values()),g=d((m,I)=>Re(I,.001).map(w=>({...w,edge:m,interior:w.index>=1&&w.index<=I.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const I of t){if(I.isLayoutOnly)continue;const w=I.points;!w||w.length<2||m.push(...g(I,pt(w)))}return m},"allSegments"),C=d((m,I)=>m.horizontal&&I.horizontal?zt(m.a.x,m.b.x,I.a.x,I.b.x)>=8&&Math.abs(m.a.y-I.a.y)<7:m.vertical&&I.vertical?zt(m.a.y,m.b.y,I.a.y,I.b.y)>=8&&Math.abs(m.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),h=d((m,I)=>{const w=m.start,R=m.end,k=g(m,I);if(k.length!==I.length-1)return!1;const O=[w,R].filter(H=>!!H),F=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(wt(H.a,H.b,f,O,-2)||wt(H.a,H.b,i,F,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(C(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,I)=>{const w=pt(m.edge.points??[]);if(w.length<4||m.index>=w.length-1)return;const R=w.map(k=>({...k}));if(m.horizontal)R[m.index].y+=I,R[m.index+1].y+=I;else if(m.vertical)R[m.index].x+=I,R[m.index+1].x+=I;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),c=d((m,I)=>({x:m.x??(I.left+I.right)/2,y:m.y??(I.top+I.bottom)/2}),"nodeCenter"),y=d(m=>{const I=m.edge,w=pt(I.points??[]);if(w.length!==4||m.index!==1)return;const R=I.start?e.get(I.start):void 0,k=I.end?e.get(I.end):void 0,O=R?qt(R):void 0,F=k?qt(k):void 0,H=w.slice(m.index+2);if(!(!R||!k||!O||!F||H.length===0))return{sourceCenter:c(R,O),targetCenter:c(k,F),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,I,w,R,k,O)=>{const F=R.y>=w.y,H=F?k.bottom:k.top,P=H+(F?20:-20);if(F&&m.b.y<=P+.001||!F&&m.b.y>=P-.001)return;const G=m.a.x+I;return pt([{x:w.x,y:H},{x:w.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,I,w,R,k,O)=>{const F=R.x>=w.x,H=F?k.right:k.left,P=H+(F?20:-20);if(F&&m.b.x<=P+.001||!F&&m.b.x>=P-.001)return;const G=m.a.y+I;return pt([{x:H,y:w.y},{x:P,y:w.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,I)=>{const w=y(m);if(w){if(m.vertical)return v(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail);if(m.horizontal)return M(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const I=x();let w=!1;for(let R=0;RP.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&h(P.edge,j)){P.edge.points=j,w=!0;break}const J=E(P,G);if(J&&h(P.edge,J)){P.edge.points=J,w=!0;break}}if(w)break}}if(!w)return}}d(zn,"nudgeSharedInteriorSubpaths");function vs(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=o.x-n.x,l=o.y-n.y,f=s*l-r*a;if(Math.abs(f)<1e-10)return!1;const i=n.x-t.x,g=n.y-t.y,x=(i*l-g*a)/f,C=(i*r-g*s)/f,h=.01;return x>h&&x<1-h&&C>h&&C<1-h}d(vs,"segmentsIntersect");function Ls(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=Jo(e),r=[];for(const l of n){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<2)continue;const i=l.start,g=l.end,x=l.labelNodeId,C=l.id??`${i}->${g}`;for(const h of s)if(!(h.nodeId===i||h.nodeId===g)&&!(x&&h.nodeId===x)){for(let p=0;p0){const l=o.filter(i=>i.type==="edge-node-overlap").length,f=o.filter(i=>i.type==="edge-edge-crossing").length;In.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${l} edge-node overlap(s), ${f} edge crossing(s)`);for(const i of o)In.warn(`[SWIMLANE_VALIDATE] ${i.type}: ${i.detail}`)}return o}d(Ls,"validateSwimlanesLayout");function Es(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(l=>!l.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!us(t,e)||e==="BT"&&s.length>0&&!ds(t))return;for(const l of o){if(l.isLayoutOnly)continue;const f=l.points;!f||f.length<2||(l.points=ae(qe(f)))}Is(o,n),Cs(o,n),hs(o,n);const r=new Map;for(const l of n)r.set(String(l.id),l);Ve(o,r),ns(o,r),gs(o,r),zn(o,r),ps(o,r),ms(o,r),Dn(o,r),ys(o,r);const a=d(()=>{Ms(o,r),xs(o,r),bs(o,r),Ve(o,r),Fn(o,r),Dn(o,r),Ve(o,r),Fn(o,r)},"finalizeRenderedEdges");a(),zn(o,r),a(),Hn(o,r),Xn(o,r),Hn(o,r),Xn(o,r)}d(Es,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const a=`${r.id}:${r.src}->${r.dst}`;n.has(a)||(n.add(a),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function go(t,e){return t.edges.filter(n=>n.dst===e)}d(go,"incoming");function Ts(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ts,"buildSuccessorMap");function po(t){const e=Ts(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(po,"buildSortedSuccessorMap");function mo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(mo,"buildInDegreeMap");function yo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(yo,"sortedZeroInDegreeNodes");function rn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(rn,"buildPredecessorSuccessorMaps");function xo(t,e,n,o){let s=0;for(const a of t.nodes)o?.skipGroups&&t.nodeById.get(a)?.isGroup||(s=Math.max(s,n[a]??0));const r=Array.from({length:s+1},()=>[]);for(const a of e)o?.skipGroups&&t.nodeById.get(a)?.isGroup||r[Math.max(0,n[a]??0)].push(a);return r}d(xo,"buildLayersFromRanks");function Pe(t){const e=mo(t),n=yo(e),o=[],s=po(t);for(;n.length;){const r=n.shift();o.push(r);for(const a of s.get(r)??[])if(e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0){let l=0;for(;l{if(s-o<=1)return 0;const r=o+s>>1;let a=n(o,r)+n(r,s),l=o,f=r,i=o;for(;l=s||lx.dst===C.dst?x.id.localeCompare(C.id):x.dst.localeCompare(C.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const C=x.dst;o[C]===0?r(C):o[C]===1&&s.push(x)}o[g]=2},"dfs"),a=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of a)o[g]===0&&r(g);const l=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),f=e.edges.map(g=>l.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:f,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(As,"removeCycles_DFS");function ws(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const l=n(r)??r;return e.set(o,l),l},"resolve");for(const o of t.nodes)n(o);return e}d(ws,"buildTopLaneMap");function fe(t){const e=ws(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function cn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(cn,"buildTopLaneOrder");function Mo(t,e){const n=cn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const a of e)!o.has(a)||s.has(a)||(s.add(a),r.push(a));for(const a of n)s.has(a)||r.push(a);return r}d(Mo,"resolveTopLaneOrder");var Pr={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Po={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Rs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=rn(n);for(const m of r.values())m.sort((I,w)=>I.localeCompare(w));const a=Pe(n)??[...n.nodes].sort((m,I)=>m.localeCompare(I)),l=new Map;for(const[m,I]of a.entries())l.set(I,m);const f=new Map,i=new Map;for(const m of n.nodes)i.set(m,[]);for(const m of a){const I=(r.get(m)??[]).filter(w=>f.has(w));if(I.length>0){const w=Ns(m,I,{laneOf:o,rankHint:s,topoIndex:l});f.set(m,w),i.get(w).push(m)}else f.has(m)||f.set(m,null)}for(const m of n.nodes)f.has(m)||f.set(m,null);const g=new Set;for(const m of n.nodes)(f.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,I)=>{const w=l.get(m)??0,R=l.get(I)??0;return w===R?m.localeCompare(I):w-R}),C=Os(n),h=new Map;for(const[m,I]of C.entries())h.set(m,[...I].sort((w,R)=>w.localeCompare(R)));const p=Ps(h),c=Bs(h),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of c)for(const I of m.nodes){const w=y.get(I);w?w.push(m.id):y.set(I,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const I of i.get(m)??[])T(I);M.push(m)}},"walk");for(const m of x)T(m);for(const m of a)T(m);return{parent:f,children:i,roots:x,componentOf:p,blocks:c,nodeBlocks:y,adjacency:h,preorder:v,postorder:M,topologicalOrder:a}}d(Rs,"buildDrivingTree");function Ns(t,e,n){const o=n.laneOf(t);return[...e].sort((r,a)=>{const l=n.laneOf(r),f=n.laneOf(a),i=l!=null&&l===o,g=f!=null&&f===o;if(i!==g)return i?-1:1;const x=n.rankHint?.[r],C=n.rankHint?.[a];if(x!=null&&C!=null&&x!==C)return C-x;const h=n.topoIndex.get(r)??0,p=n.topoIndex.get(a)??0;return h!==p?h-p:r.localeCompare(a)})[0]}d(Ns,"chooseParent");function Os(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(Os,"buildAdjacency");function Ps(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const a of t.get(r)??[])e.has(a)||s.push(a)}}n++}return e}d(Ps,"assignComponents");function Bs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const a=d((l,f)=>{e.set(l,++r),n.set(l,r);for(const i of t.get(l)??[])i!==f&&(e.has(i)?(e.get(i)??0)<(e.get(l)??0)&&(o.push([l,i]),n.set(l,Math.min(n.get(l)??r,e.get(i)??r))):(o.push([l,i]),a(i,l),n.set(l,Math.min(n.get(l)??r,n.get(i)??r)),(n.get(i)??0)>=(e.get(l)??0)&&s.push(ks(l,i,o,s.length))))},"visit");for(const l of t.keys())e.has(l)||a(l,null);return s}d(Bs,"computeBlocks");function ks(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const a=n.pop();if(s.push(a),r.add(a[0]),r.add(a[1]),a[0]===t&&a[1]===e||a[0]===e&&a[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(ks,"popBlock");function Fs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,a=new Array(r).fill(-1),l=new Array(r).fill(0),f=[],i=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(a[T]=-1,l[T]=0,i.has(M)||(i.add(M),f.push(M)))}for(;f.length>0;){const M=f.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(i.has(m))continue;const I=s.get(m);I!=null&&(a[I]=E,l[I]=l[E]+1,i.add(m),f.push(m))}}for(const M of o){if(i.has(M))continue;const E=s.get(M);E!=null&&(a[E]=-1,l[E]=0,i.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M{if(M===-1||E===-1)return-1;l[M]>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const I=x[m][M],w=x[m][E];I===-1||w===-1||I!==w&&(M=I,E=w)}return x[0][M]},"lcaIndex"),h=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],I=e[T];if(m==null||I==null||(m>I&&([E,T]=[T,E],[m,I]=[I,m]),m==null||I==null||m===I))continue;const w=s.get(E),R=s.get(T);if(w==null||R==null)continue;const k=C(w,R);if(k===-1)continue;const O=h[k];for(let F=m;F{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:h[E],m=T?new Map(T):new Map,I=n.children.get(M)??[];for(const w of I){const R=v(w),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let F=R.get(k)??0;const H=e[w];H!=null&&H>k&&(F+=1),O.set(w,F)}c(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Fs,"computeSubtreeCrossCounts");function _s(t,e,n){const o=new Map,s=d(r=>{let a=n[r]??0;const l=[...e.get(r)??[]];l.sort(Io(n));for(const f of l){s(f);const i=o.get(f);i!=null&&(a=Math.min(a,i))}o.set(r,a)},"annotate");for(const r of t)s(r);return o}d(_s,"annotateMinimumLayers");function Io(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Io,"compareByRankThenId");function Ds(t,e,n,o){let s=0;for(const f of e){const i=n[f]??0;i>s&&(s=i)}const r=Array.from({length:s+1},()=>[]),a=new Set,l=d(f=>{if(a.has(f))return;a.add(f);const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f);for(const g of o(f))l(g)},"emit");for(const f of t)l(f);for(const f of e)if(!a.has(f)){const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f),a.add(f)}return r}d(Ds,"emitNodesInTreeOrder");function Hs(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d(Hs,"deduplicateLayers");function Xs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const a=e[s]??0,l=[],f=[],i=n.get(s);for(const g of r){const x=o.get(g)??a;x>a?l.push({child:g,min:x}):f.push(g)}return l.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),f.sort((g,x)=>{const C=i?.get(g)??0,h=i?.get(x)??0;if(C!==h)return C-h;const p=o.get(g)??a,c=o.get(x)??a;return p!==c?p-c:g.localeCompare(x)}),[...l.map(g=>g.child),...f]}}d(Xs,"createChildOrderer");function nn(t,e,n){const o=Rs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const a=Fs(t,e,o),l=[...r].sort(Io(e)),f=_s(l,s,e),i=Xs(s,e,a,f);let g=Ds(l,t.nodes,e,i);return g=Hs(g),g}d(nn,"buildMultitreeLayerOrder");function Ys(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),a=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&a.push(r.get(l.dst));return bo(a)}d(Ys,"countCrossingsBetweenAdjacent");function Vn(t,e,n){const o=[];for(const r of e){const a=n[r.src],l=n[r.dst];if(a==null||l==null||a===l)continue;let f=r.src,i=r.dst,g=a,x=l;a>l&&(f=r.dst,i=r.src,g=l,x=a);for(let C=g;C(n[C]??0)-(n[x]??0));for(const x of g){const C=n[x]??0;if(C===0)continue;let h=0;for(const v of o.get(x)??[])h=Math.max(h,(n[v]??0)+1);if(h>=C)continue;const p=C;n[x]=h;const c=nn(t,n,s),y=Vn(c,t.edges,n);y(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const a=t.edges.filter(c=>c.src===s);if(a.length===0)continue;let l=!1,f=0;for(const c of a){const y=n(c.dst);y==null||y===r?l=!0:f++}if(f===0||l)continue;let i=0,g=!1;for(const c of t.edges){if(c.dst!==s)continue;const y=n(c.src);y&&(y===r?g=!0:i++)}if(i>0||!g)continue;const x=e[s]??0,C=x+f;let h=0;for(const c of t.edges)c.dst===s&&(h=Math.max(h,(e[c.src]??0)+1));const p=Math.max(x,h,C);p!==x&&(e[s]=p)}}d($s,"adjustCrossLaneSources");function zs(t,e){const n=ye(t),o=Pe(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let a=Object.create(null);for(const f of o){const i=go(n,f),g=e?.ignoreCrossLaneEdges?i.filter(x=>{const C=r(x.src),h=r(f);return!C||!h?!0:C===h}):i;if(g.length===0)a[f]=0;else if(s&&g.length===1){const x=g[0].src,C=r(x),h=r(f);C!==h?a[f]=a[x]??0:a[f]=(a[x]??0)+1}else{let x=-1/0;for(const C of g)x=Math.max(x,(a[C.src]??0)+1);a[f]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(a=Gs(n,a)),e?.ignoreCrossLaneEdges&&$s(n,a),{layers:nn(n,a,r),rankOf:a,dummy:new Set}}d(zs,"assignLayers_LongestPath");function Vs(t,e){const n=ye(t),s={...zs(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:a,succs:l}=rn(n,p=>{if(e?.ignoreCrossLaneEdges){const c=r(p.src),y=r(p.dst);if(c&&y&&c!==y)return!1}return!0}),f=Pe(n)??[...n.nodes],i=[...f].reverse(),g=d((p,c)=>{let y=0;for(const E of a.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=l.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,c)),Math.min(Math.max(c,y),v)},"clampFeasible"),x=en.GRAVITY_ITERATIONS,C=d(p=>{let c=!1;for(const y of p){const v=a.get(y)??[],M=l.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((w,R)=>w+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((w,R)=>w+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),I=g(y,m);I!==s[y]&&(s[y]=I,c=!0)}return c},"relaxOrder");for(let p=0;p0){const y=Math.min(...c.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:xo(n,f,s),rankOf:s,dummy:new Set}}d(Vs,"assignLayers_Gravity");function js(t){const e=mo(t),n=po(t);let o=yo(e);const s=[];for(;o.length>0;){const r=[];for(const a of o){s.push(a);for(const l of n.get(a)??[])e.set(l,(e.get(l)??0)-1),(e.get(l)??0)===0&&r.push(l)}o=r.sort((a,l)=>a.localeCompare(l))}return s.length===t.nodes.length?s:null}d(js,"topoSortByGenerationIfAcyclic");function Us(t,e){const n=ye(t),o=e?.direction==="LR"?js(n)??[...n.nodes].sort():Pe(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),a=Object.create(null),l=new Map,f=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const C=go(n,g);let h=0;if(C.length>0)for(const v of C){const M=v.src,E=a[M]??0;h=Math.max(h,E+f(M,g))}const p=r(g),c=l.get(p)??0,y=Math.max(h,c);a[g]=y,l.set(p,y+1)}return{layers:xo(n,o,a,{skipGroups:!0}),rankOf:a,dummy:new Set}}d(Us,"assignLayers_LaneAwareCompact");function Ws(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(h=>[...h]),r=new Set(t.dummy?[...t.dummy]:[]);let a=0;const l=new Map(n.nodeById),f=d(h=>{const p=`placeholder-${a++}`,c={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(p,c),r.add(p);s.length<=h;)s.push([]);return s[h].push(p),o[p]=h,p},"addDummyAt"),i=[...n.edges].sort((h,p)=>h.id===p.id?h.src===p.src?h.dst.localeCompare(p.dst):h.src.localeCompare(p.src):h.id.localeCompare(p.id)),g=[];for(const h of i){const p=o[h.src]??0,c=o[h.dst]??0;if(c-p<=1){g.push(h);continue}let y=h.src;for(let M=p+1,E=0;M!n.nodes.includes(h))],edges:g,layout:n.layout,nodeById:l};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:C}}d(Ws,"makeProperLayering");function jn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(jn,"median");function Un(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Un,"barycenter");function Ks(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Ks,"neighborPositionsFor");function qs(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(qs,"currentOrderTieBreak");function Wn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),a=Ne(e),l=[];for(const i of n)o.has(i.src)&&s.has(i.dst)&&l.push({u:r.get(i.src),v:a.get(i.dst)});l.sort((i,g)=>i.u===g.u?i.v-g.v:i.u-g.u);const f=l.map(i=>i.v);return bo(f)}d(Wn,"countCrossingsBetweenAdjacent");function je(t,e,n){return[...t].sort((o,s)=>{const r=jn(e.get(o)??[]),a=jn(e.get(s)??[]);return r===a?qs(o,s,n):isFinite(r)?isFinite(a)?r-a:-1:1})}d(je,"sortByHeuristic");function Kn(t,e,n,o,s,r){const a=Ne(t),l=Ne(e),f=Ks(e,a,n,o);if(!s||!r||r.length===0)return je(e,f,l);const i=new Map;for(const C of e){const h=s(C),p=i.get(h)??[];p.push(C),i.set(h,p)}const g=[];for(const C of r){const h=i.get(C);if(!h||h.length===0)continue;const p=je(h,f,l);g.push(...p)}const x=i.get(null);if(x&&x.length>0){const C=je(x,f,l);for(const h of C){const p=Un(f.get(h)??[]);let c=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Un(f.get(v)??[]);if(pa.has(c.src)&&l.has(c.dst)),g=f?n.filter(c=>l.has(c.src)&&f.has(c.dst)):void 0,x=d(c=>{let y=Wn(t,c,i);return g&&o&&(y+=Wn(c,o,g)),y},"crossingScore"),C=s?new Map:null;if(s&&C)for(const c of e)C.set(c,s(c));let h=!0,p=x(r);for(;h;){h=!1;for(let c=0;c+1[...l]),s=e.edges,r=fe(e),a=Mo(e,n?.laneOrder);for(let l=0;l<3;l++){for(let f=1;f=0;f--)o[f]=Kn(o[f+1],o[f],s,"up",r,a),o[f]=qn(o[f+1],o[f],s,o[f-1],r)}return{layers:o}}d(Js,"orderLayers");function Zs(t,e,n){const o=n?.layerGap??Po.DEFAULT_LAYER_GAP,s=n?.nodeGap??Po.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,a=n?.direction??"TB",l=a==="LR"||a==="RL",f=t.layers,i=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),C=d(O=>x(O)?.width??0,"getWidth"),h=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),c=Mo(e,n?.laneOrder),y=f.map(O=>O.reduce((F,H)=>Math.max(F,h(H)),0)),v=[];if(l)for(let O=0;O+1Math.max(mt,C(kt)),0),H=f[O+1].reduce((mt,kt)=>Math.max(mt,C(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(F+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of f)for(const F of O)M.add(p(F));const E=M.has(null),T=c.filter(O=>M.has(O)),m=[...E?[null]:[],...T],I=Object.create(null);for(const O of T)I[O]=0;E&&(I.null=0);for(const O of f){const F=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(F[G]||=[]).push(P)}for(const[P,G]of Object.entries(F)){const j=G.reduce((J,dt)=>J+C(dt),0)+s*Math.max(0,G.length-1);I[P]=Math.max(I[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+C(j),0)+s*Math.max(0,H.length-1);I.null=Math.max(I.null??0,P)}}const w=new Map;{const O=m.map(P=>(P===null?I.null:I[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;PC(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];i[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const F=O.ref.id;k.has(F)||k.set(F,[]),k.get(F).push(O)}for(const[,O]of k){if(O.length===0)continue;const F=O[0].ref,H=F.start,P=F.end;if(H==null||P==null)continue;const G=Math.round(((i[H]??0)+(i[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(i[J]=G)}}return{x:i,y:g}}d(Zs,"assignCoordinates");var Qs=8;function tr(t){let e=2166136261;for(let n=0;n>>0}d(tr,"hashString");function er(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(er,"mulberry32");function nr(t,e){const n=[...t],o=er(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(nr,"deterministicShuffle");function or(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(or,"sourceDistance");function Jn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:a}of e){const l=n.get(s),f=n.get(r);l==null||f==null||(o+=a*Math.abs(l-f))}return o}d(Jn,"laneArrangementCost");function sr(t){const e=cn(t);if(e.length<2)return[];const n=new Map(e.map((r,a)=>[r,a])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const a=typeof r.start=="string"?r.start:void 0,l=typeof r.end=="string"?r.end:void 0;if(!a||!l||!t.nodeById.has(a)||!t.nodeById.has(l))continue;const f=o(a),i=o(l);if(!f||!i||f===i)continue;const g=n.get(f),x=n.get(i);if(g==null||x==null)continue;const[C,h]=g<=x?[f,i]:[i,f],p=`${C}\0${h}`,c=s.get(p);c?c.weight++:s.set(p,{a:C,b:h,weight:1})}return[...s.values()]}d(sr,"buildWeightedLaneEdges");function Zn(t,e,n){const o=[...t];let s=Jn(o,e),r=!0,a=0;const l=Math.max(1,o.length);for(;r&&as.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:a})=>`${s}:${r}:${a}`).join("|");return tr(`${t.join("|")}#${o}#${n}`)}d(ir,"seedForRestart");function cr(t,e={}){const n=cn(t);if(n.length<2)return n;const o=sr(t);if(o.length===0)return n;const s=new Map(n.map((l,f)=>[l,f]));let r=Zn(n,o,s);const a=Math.max(0,e.restarts??Qs);for(let l=0;lct&&f*3>=l?a>0?"bottom":"top":l>ct?r>0?"right":"left":n}d(Qn,"chooseOrthogonalSide");function to(t,e){return Math.abs(t.to-e.from)u.isGroup&&!u.parentId);for(const u of i){const b={id:u.id},S=d(L=>{a.set(L.id,b),n.filter(A=>A.parentId===L.id).forEach(S)},"assignLane");S(u)}const g=n.filter(u=>!u.isGroup&&!u.isEdgeLabel).map(u=>{const b=u.width??10,S=u.height??10,L=u.x??0,A=u.y??0,B=Br;return{nodeId:u.id,minX:L-b/2-B,maxX:L+b/2+B,minY:A-S/2-B,maxY:A+S/2+B,visualXHalfExtent:f?S/2+B:b/2+B}}),x=d((u,b,S,L)=>{let A=l.find(B=>B.orientation===u&&Math.abs(B.coord-b)<1);return A||(A={id:`pipe-${u}-${b.toFixed(0)}`,orientation:u,coord:b,spanMin:S,spanMax:L,tracks:[]},l.push(A)),A.spanMin=Math.min(A.spanMin,S),A.spanMax=Math.max(A.spanMax,L),A},"getOrAddPipe"),C=d((u,b)=>{const S=u.width??10,L=u.height??10,A=u.x??0,B=u.y??0;switch(b){case"top":return{x:A,y:B-L/2};case"bottom":return{x:A,y:B+L/2};case"left":return{x:A-S/2,y:B};case"right":return{x:A+S/2,y:B}}},"portForSide"),h=d((u,b,S)=>C(u,Qn(u,b,S?"bottom":"top")),"getOrthogonalPort"),p=[],c=[],y=new Set,v=1e3,M=d((u,b,S)=>{if(p.length===0)return 0;const L=Math.abs(b.y-S.y)z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(A){const U=b.x,q=Math.min(b.y,S.y)-ct,z=Math.max(b.y,S.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===u||Y.orientation!=="horizontal"||Y.pipe.coordz||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((u,b)=>{if(!u.start||!u.end)return{idx:b,crossLane:0,dx:0,dy:0};const S=r.get(u.start),L=r.get(u.end),A=a.get(u.start),B=a.get(u.end),U=A&&B&&A.id!==B.id?1:0,q=S&&L?Math.abs((L.x??0)-(S.x??0)):0,z=S&&L?Math.abs((L.y??0)-(S.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((u,b)=>{if(u.crossLane!==b.crossLane)return b.crossLane-u.crossLane;const S=u.dx+u.dy,L=b.dx+b.dy;return Math.abs(S-L)>1?S-L:u.idx-b.idx}).map(u=>u.idx),T=d((u,b,S,L)=>{const A=Math.min(u.x,b.x),B=Math.max(u.x,b.x),U=Math.min(u.y,b.y),q=Math.max(u.y,b.y);return!!g.find(Y=>S&&Y.nodeId===S||L&&Y.nodeId===L?!1:Math.abs(u.x-b.x)>ct?Y.minYu.y&&Y.maxX>A&&Y.minXu.x&&Y.maxY>U&&Y.minYQn(u,b,"bottom"),"determineSide"),R=new Map;for(const[u,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const A=(L.x??0)-(S.x??0),B=(L.y??0)-(S.y??0);R.set(u,{edgeIdx:u,srcId:b.start,dstId:b.end,srcSide:w(S,{x:L.x??0,y:L.y??0}),dstSide:w(L,{x:S.x??0,y:S.y??0}),absDx:Math.abs(A),absDy:Math.abs(B),dxSign:Math.sign(A),dySign:Math.sign(B)})}const k=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.absDx===0?1/0:u.absDy/u.absDx:u.absDy===0?1/0:u.absDx/u.absDy,"preferenceStrength"),O=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.dxSign>=0?"right":"left":u.dySign>=0?"bottom":"top","secondarySide"),F=new Map;for(const u of R.values()){const b=`${u.srcId}:${u.srcSide}`;F.has(b)||F.set(b,[]),F.get(b).push(u)}const H=new Map,P=d((u,b)=>`${u}:${b}`,"loadKey");for(const u of R.values())H.set(P(u.srcId,u.srcSide),(H.get(P(u.srcId,u.srcSide))??0)+1),H.set(P(u.dstId,u.dstSide),(H.get(P(u.dstId,u.dstSide))??0)+1);for(const u of F.values())if(!(u.length<2)){u.sort((b,S)=>{const L=k(b),A=k(S);return Math.abs(L-A)>1e-9?A-L:b.edgeIdx-S.edgeIdx});for(let b=1;b=A||(H.set(P(S.srcId,S.srcSide),A-1),H.set(P(S.srcId,L),B+1),S.srcSide=L)}}const G=d(u=>{const b=u?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const u of R.values())j.has(u.dstId)||j.set(u.dstId,new Set),j.get(u.dstId).add(u.dstSide);for(const u of R.values()){if(!G(r.get(u.srcId)))continue;const b=j.get(u.srcId);if(!b?.has(u.srcSide))continue;const S=O(u);if(b.has(S)||(H.get(P(u.srcId,S))??0)>0)continue;const L=H.get(P(u.srcId,u.srcSide))??0;H.set(P(u.srcId,u.srcSide),Math.max(0,L-1)),H.set(P(u.srcId,S),1),u.srcSide=S}for(const u of R.values()){const{edgeIdx:b,srcId:S,dstId:L,srcSide:A,dstSide:B}=u,U=r.get(S),q=r.get(L),z=`${S}:${A}:src`,Y=A==="top"||A==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[u,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const S=u.split(":"),L=S.slice(0,-2).join(":"),A=S[S.length-2],B=S[S.length-1],U=r.get(L);if(!U)continue;const z=A==="left"||A==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,dn=`${Dt.edgeIdx}:${B}`;J.set(dn,Jt)}}const mt=d(u=>!!s[u]?.labelNodeId,"edgeHasLabelNode"),kt=d((u,b)=>u?(m.get(`${u}:${b}:src`)??[]).some(({edgeIdx:S})=>mt(S))||(m.get(`${u}:${b}:dst`)??[]).some(({edgeIdx:S})=>mt(S)):!1,"faceHasLabelNode"),Pt=d((u,b,S)=>b==="top"||b==="bottom"?{x:u.x+S,y:u.y}:{x:u.x,y:u.y+S},"applyPortOffset"),Q=d((u,b,S)=>{const L=R.get(u),A={x:S.x??0,y:S.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??w(b,A),q=L?.dstSide??w(S,B);let z=L?C(b,L.srcSide):h(b,A,!0),Y=L?C(S,L.dstSide):h(S,B,!1);const ot=J.get(`${u}:src`),rt=J.get(`${u}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const u of E){const b=s[u];if(c[u]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const{pSrcPort:A,pDstPort:B,srcSide:U,dstSide:q}=Q(u,S,L),z={...A},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=A.y>(S.y??0);z.y=X?A.y+ne:A.y-ne}else{const X=A.x>(S.x??0);z.x=X?A.x+ne:A.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.xK.minY&&X.y{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(A,S,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,A.y+ne):Math.max(X.maxY+2,A.y-ne);yt=[{x:A.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(A,S,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,A.x+ne):Math.max(X.maxX+2,A.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:A.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,S,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,S,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)1||bt>1,Nt=I.get(b.start??"")??0,ut=I.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(A,B,b.start,b.end)){b.points=[{...A},{...z},{...Y},{...B}],y.add(u);const Mt=K?"horizontal":"vertical",$t=K?A.y:A.x,It=K?Math.min(A.x,B.x):Math.min(A.y,B.y),St=K?Math.max(A.x,B.x):Math.max(A.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${u}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:u,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const dn=x("vertical",z.x,z.y,z.y);z.x=dn.coord;const hr=x("vertical",Y.x,Y.y,Y.y);Y.x=hr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX$&&X.minYlt&&(ue=Math.min(ue,X.minX-ze),he=Math.max(he,X.maxX+ze),ve=Math.min(ve,X.minY-ze),Le=Math.max(Le,X.maxY+ze))}for(const X of g){if(X.maxXhe||X.maxYLe)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const gr=l.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),pr=l.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),Be=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),ke=Be(z.x,z.y),So=Be(Y.x,Y.y),Fe=new Map,un=new Map,hn=new Map,_e=new Set,xe=[];Fe.set(ke,0),hn.set(ke,"n"),xe.push({key:ke,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),_e.add(ke);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),gn={x:Y.x,y:z.y},mr=ge(z,gn),yr=ge(gn,Y),xr=mr||yr,pn={x:z.x,y:Y.y},br=ge(z,pn),Mr=ge(pn,Y);if(xr?br||Mr||(Math.abs(z.x-Y.x)0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(_e.delete(X.key),X.key===So){let ut=So,Yt=Y;for(Ht=[Yt];un.has(ut);){const ee=un.get(ut);Ht.unshift(ee),Yt=ee,ut=Be(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=pr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=gr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&EtZt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minYK&&Zt.maxX>Yt&&Zt.minX$&&Zt.maxY>Bt&&Zt.minY10&&mn<-5||Ee<-10&&mn>5)&&(St=Math.abs(mn)*100),(Wt>10&&De<-5||Wt<-10&&De>5)&&(St+=Math.abs(De)*50);let Co=0;const vo=hn.get(X.key)??"n",Lo=Math.abs(De)>ct?"h":"v";vo!=="n"&&vo!==Lo&&(Co=50);const Ir=$t+It+St+Co,He=(Fe.get(X.key)??1/0)+Ir,Eo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(He<(Fe.get(Mt)??1/0))if(un.set(Mt,X.pt),Fe.set(Mt,He),hn.set(Mt,Lo),!_e.has(Mt))xe.push({key:Mt,f:He+Eo,pt:ut}),_e.add(Mt);else{const Zt=xe.findIndex(Sr=>Sr.key===Mt);Zt!==-1&&(xe[Zt].f=He+Eo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=KIt.minXGt&&It.minYOt);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minXMath.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)It.minX,Wt=Math.min(X.y,$.y)It.minY;return St&&Wt});let Mt=Ot;if(f&&Ot.length>0){const It=Ot.filter(St=>St.minXBt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;Xu.from{const A=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,u)),B=!S.segments.some(U=>(U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex)&&W(U,b));return A&&B?(u.trackIndex=L.index,b.trackIndex=S.index,S.segments=[...S.segments.filter(U=>U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(u=>{const b=u.tracks.length;return u.tracks[b]={index:b,coord:u.coord,segments:[]},b},"createNewTrack"),gt=d((u,b)=>{const S=u.pipe.tracks[u.trackIndex];S.segments=S.segments.filter(A=>A.edgeIndex!==u.edgeIndex||A.segmentIndex!==u.segmentIndex),u.trackIndex=b,u.pipe.tracks[b].segments.push({edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to})},"moveSegmentToTrack"),xt=d((u,b)=>{const S=c[u.edgeIndex];for(const L of S){const A=p[L];A.pipe===u.pipe&>(A,b)}},"moveSegmentChainToTrack"),vt=d(u=>{const b=c[u.edgeIndex],S=b.indexOf(p.indexOf(u)),L=[];return S>0&&L.push(p[b[S-1]]),S{if(u.orientation===b.orientation)return!1;const S=u.orientation==="horizontal"?u:b,L=u.orientation==="horizontal"?b:u;return L.pipe.coord>S.from&&L.pipe.coordL.from&&S.pipe.coord{for(const S of u.tracks)if(!S.segments.some(A=>(A.edgeIndex!==b.edgeIndex||A.segmentIndex!==b.segmentIndex)&&W(A,b)))return S.index;return-1},"findAvailableTrack"),Ut=d((u,b)=>{if(u.trackIndex===b.trackIndex)return W(u,b);const S=vt(u),L=vt(b);return S.some(A=>L.some(B=>Vt(A,B)))},"segmentsConflict"),te=d((u,b,S)=>{if(et(u,b,u.pipe.tracks[u.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(u.pipe,b);S(b,L!==-1?L:at(u.pipe))},"resolveTrackConflict"),Se=d(u=>{let b=0;for(let S=0;S{if(de.has(u))return de.get(u);const b=c[u];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(u,q),q}const L=p[b[0]].pipe.coord;let A=L;for(let q=1;qMath.abs(ot-L)?Y:ot;break}}const B=Math.abs(A-L),U={dest:A,deviation:B,base:L,delta:A-L};return de.set(u,U),U},"getDestInfo"),an=d(()=>{let u=0;const b=new Map;for(const[L,A]of s.entries())c[L].length!==0&&A.start&&(b.has(A.start)||b.set(A.start,[]),b.get(A.start).push(L));const S=d(L=>{const A=s[L];if(!A.start||!A.end)return 0;const B=r.get(A.start),U=r.get(A.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=S(B),ot=S(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=c[B].length,st=c[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=c[B][0],yt=c[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const A=L.map(B=>p[c[B][0]]);u+=Se(A)}return u},"fixSourceHandleCrossings"),ln=d(()=>{let u=0;const b=new Map;for(const[S,L]of s.entries())c[S].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(S));for(const S of b.values()){S.sort((A,B)=>{const U=d(Y=>{const ot=c[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(A),z=U(B);return Math.abs(q-z)>.1?q-z:A-B});const L=S.map(A=>p[c[A][c[A].length-1]]);u+=Se(L)}return u},"fixTargetHandleCrossings"),fn=d(()=>{let u=0;for(const b of l){const S=[];for(const L of b.tracks)for(const A of L.segments){const B=c[A.edgeIndex].find(U=>p[U].segmentIndex===A.segmentIndex);B!==void 0&&S.push(p[B])}S.sort((L,A)=>L.edgeIndex-A.edgeIndex||L.segmentIndex-A.segmentIndex);for(let L=0;L{L.segments.forEach(A=>{b.push({edgeIndex:A.edgeIndex,segmentIndex:A.segmentIndex,trackIndex:L.index,from:A.from,to:A.to})})}),b.sort((L,A)=>L.from-A.from);const S=[];if(b.length>0){let L=[b[0]],A=b[0].to;for(let B=1;BA.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...A].filter(tt=>(B.get(tt)??0)<-1),q=[...A].filter(tt=>(B.get(tt)??0)>1),z=[...A].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?u.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,u.coord-ot*Mn);if(z.length===0&&A.size>0){const tt=[...A].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,u.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,u.coord+yt*Rt*Mn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,u.coord+st*Mn)}}for(const[u,b]of s.entries()){const S=c[u]??[];if(S.length===0)continue;const L=[],A=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(u,A,B),z=S.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rtct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:to(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,to(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rtct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const u of s){const b=u.__originalEdge;b&&u.points&&(b.points=u.points)}t.edges=(t.edges??[]).filter(u=>!u.isLayoutOnly);const V=d((u,b)=>{const S=b.x??0,L=b.y??0,A=b.width??0,B=b.height??0;if(A<=0||B<=0)return u;const U=S-A/2,q=S+A/2,z=L-B/2,Y=L+B/2;if(u.xq||u.yY)return u;const ot=u.x-U,rt=q-u.x,st=u.y-z,tt=Y-u.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:u.y}:yt===rt?{x:q,y:u.y}:yt===st?{x:u.x,y:z}:{x:u.x,y:Y}},"nodeBoundaryClamp");for(const u of t.edges){const b=u.points;if(!b||b.length<2)continue;const S=u.start,L=u.end,A=S?r.get(S):void 0,B=L?r.get(L):void 0;A&&(b[0]=V(b[0],A)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(lr,"routeEdgesOrthogonal");function fr(t){return t.direction??"TB"}d(fr,"getSwimlaneDirection");function dr(t){const e=Uo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,a=t.config.swimlane?.automaticLaneOrdering??!1,l=fr(t),{ordered:f,coordinates:i}=ar(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:a,direction:l});Wo(e,f,i,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;lr(t,l);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Es(t,l),Ls(t),l}d(dr,"runSwimlaneLayoutCore");function ur(t){jo(t);const e=Ko(t);t.nodes=e.nodes,t.edges=e.edges}d(ur,"prepareSwimlaneLayout");var Hr=Cr({prepareLayout:ur,runLayoutCore:dr,afterPaint:zo});export{Hr as render}; diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js new file mode 100644 index 000000000..eb1a00f94 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js @@ -0,0 +1,8 @@ +import{c as r,s as e}from"./flowDiagram-A5DVABFB-D6_Z_lfU.js";import{_ as a}from"./mermaid.core-BusHtpbx.js";import"./chunk-5VM5RSS4-BX7DTcSO.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./channel-DZ2XEbLN.js";import"./index-BZ9wqq8Z.js";var o=a(t=>`${e(t)} + .swimlane.cluster rect { + stroke: ${t.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DwZGbRdg.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DwZGbRdg.js deleted file mode 100644 index ea2bb8613..000000000 --- a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DwZGbRdg.js +++ /dev/null @@ -1,8 +0,0 @@ -import{c as r,s as e}from"./flowDiagram-A5DVABFB-DWLybnX0.js";import{_ as a}from"./mermaid.core-BgUXBQ9g.js";import"./chunk-5VM5RSS4-wCYaCTKB.js";import"./chunk-XXDRQBXY-GqpBYspR.js";import"./chunk-POPQ4Y6H-CyRmuplC.js";import"./chunk-F27PBJKO-A5JDBOgE.js";import"./purify.es-5AjVNlXF.js";import"./channel-CeJKBXng.js";import"./index-vF2s5p7P.js";var o=a(t=>`${e(t)} - .swimlane.cluster rect { - stroke: ${t.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CAzR7eP2.js b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-S237vnu4.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CAzR7eP2.js rename to apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-S237vnu4.js index 66cf2c6bb..635802d72 100644 --- a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CAzR7eP2.js +++ b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-S237vnu4.js @@ -1,4 +1,4 @@ -import{_ as o,A as pt,ab as Rt,ac as Ct,ad as Wt,c as gt,l as E,G as Pt,a2 as Bt,ae as ft,j as U,v as Vt,af as Ft,r as zt}from"./mermaid.core-BgUXBQ9g.js";import{d as ot}from"./arc-Bm7BOhts.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: +import{_ as o,A as pt,ab as Rt,ac as Ct,ad as Wt,c as gt,l as E,G as Pt,a2 as Bt,ae as ft,j as U,v as Vt,af as Ft,r as zt}from"./mermaid.core-BusHtpbx.js";import{d as ot}from"./arc-B8osaoVd.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: `+w.showPosition()+` Expecting `+Z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:Z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,R=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],C.$=x[x.length-B],C._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},K&&(C._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(C,[v,R,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(C.$),u.push(C._$),X=S[l[l.length-2]][l[l.length-1]],l.push(X);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||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:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(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:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=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 x=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===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(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:o(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:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/tsMode-COGDJ9qu.js b/apps/pythinker-code/dist-web/assets/tsMode-BZYSYhKr.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/tsMode-COGDJ9qu.js rename to apps/pythinker-code/dist-web/assets/tsMode-BZYSYhKr.js index a7b7c6945..d1cec454f 100644 --- a/apps/pythinker-code/dist-web/assets/tsMode-COGDJ9qu.js +++ b/apps/pythinker-code/dist-web/assets/tsMode-BZYSYhKr.js @@ -1,4 +1,4 @@ -import{c as M,e as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-BjWGAzqc.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;ie.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class W extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,` +import{c as M,e as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-BjWGAzqc.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;ie.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class W extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,` `),code:t.code.toString(),tags:u,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(i=>{let l=e;if(i.file&&(l=this._libFiles.getOrCreateModel(i.file.fileName)),!l)return;const p=i.start||0,n=i.length||1,{lineNumber:r,column:u}=l.getPositionAt(p),{lineNumber:d,column:g}=l.getPositionAt(p+n);o.push({resource:l.uri,startLineNumber:r,startColumn:u,endLineNumber:d,endColumn:g,message:A(i.messageText,` `)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return v.Error;case 3:return v.Info;case 0:return v.Warning;case 2:return v.Hint}return v.Info}}class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,i){const l=e.getWordUntilPosition(t),p=new O(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),n=e.uri,r=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const d=await u.getCompletionsAtPosition(n.toString(),r);return!d||e.isDisposed()?void 0:{suggestions:d.entries.map(b=>{let h=p;if(b.replacementSpan){const x=e.getPositionAt(b.replacementSpan.start),D=e.getPositionAt(b.replacementSpan.start+b.replacementSpan.length);h=new O(x.lineNumber,x.column,D.lineNumber,D.column)}const k=[];return b.kindModifiers!==void 0&&b.kindModifiers.indexOf("deprecated")!==-1&&k.push(f.CompletionItemTag.Deprecated),{uri:n,position:t,offset:r,range:h,label:b.name,insertText:b.name,sortText:b.sortText,kind:C.convertKind(b.kind),tags:k}})}}async resolveCompletionItem(e,t){const o=e,i=o.uri,l=o.position,p=o.offset,r=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),p,o.label);return r?{uri:i,position:l,label:r.name,kind:C.convertKind(r.kind),detail:_(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case a.primitiveType:case a.keyword:return f.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return f.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return f.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return f.CompletionItemKind.Function;case a.enum:return f.CompletionItemKind.Enum;case a.module:return f.CompletionItemKind.Module;case a.class:return f.CompletionItemKind.Class;case a.interface:return f.CompletionItemKind.Interface;case a.warning:return f.CompletionItemKind.File}return f.CompletionItemKind.Property}static createDocumentationString(e){let t=_(e.documentation);if(e.tags)for(const o of e.tags)t+=` diff --git a/apps/pythinker-code/dist-web/assets/typescript-0SwtrmOf.js b/apps/pythinker-code/dist-web/assets/typescript-DeFWR0Bj.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/typescript-0SwtrmOf.js rename to apps/pythinker-code/dist-web/assets/typescript-DeFWR0Bj.js index 40d38f43e..bb63710f3 100644 --- a/apps/pythinker-code/dist-web/assets/typescript-0SwtrmOf.js +++ b/apps/pythinker-code/dist-web/assets/typescript-DeFWR0Bj.js @@ -1 +1 @@ -import{l as e}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},i={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{r as conf,i as language}; +import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},i={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{r as conf,i as language}; diff --git a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-N3z1lGGo.js b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BElDUyH9.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-N3z1lGGo.js rename to apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BElDUyH9.js index 240a88966..10d602ed2 100644 --- a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-N3z1lGGo.js +++ b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BElDUyH9.js @@ -1,4 +1,4 @@ -import{b1 as Wt,s as Kt,g as Ht,q as Yt,p as Xt,a as Zt,b as Jt,_ as w,A as wt,G as Qt,j as ot,am as $t,ab as te,ac as ee,ad as ne,d as se,r as ie,D as oe,E as re}from"./mermaid.core-BgUXBQ9g.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Tt(e);for(let u=0;ua.angle-u.angle);let f=e[e.length-1];for(let u=0;up.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;uMath.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u=0&&(n=a),Math.abs(f)ct(n))}function $(t,n){let s=0;for(let e=0;ev.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx=1)break;for(let d=1;dl+o*i*f||u>=T)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,T=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a{const y={};for(let h=0;hxt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;ul===f?0:lo.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;hy.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;bt[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=jt(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function jt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in T)return T[x];var d=T[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(j=>D.has(j)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let E=!1;O.selectAll(".venn-area path").each(function(k){const j=this.getAttribute("d");k.sets.length==1&&j&&!b&&(E=!0,R[k.sets[0]]=Me(j))});function A(k){return j=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-j)+Z.x*j,y:Y.y*(1-j)+Z.y*j,radius:Y.radius*(1-j)+Z.radius*j}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;E&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(j=>I[j])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(E?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const F=K(G.exit()).remove();typeof G.transition=="function"&&F.selectAll("path").attrTween("d",A);const X=F.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:F}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const T=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${T+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` +import{b1 as Wt,s as Kt,g as Ht,q as Yt,p as Xt,a as Zt,b as Jt,_ as w,A as wt,G as Qt,j as ot,am as $t,ab as te,ac as ee,ad as ne,d as se,r as ie,D as oe,E as re}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Tt(e);for(let u=0;ua.angle-u.angle);let f=e[e.length-1];for(let u=0;up.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;uMath.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u=0&&(n=a),Math.abs(f)ct(n))}function $(t,n){let s=0;for(let e=0;ev.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx=1)break;for(let d=1;dl+o*i*f||u>=T)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,T=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a{const y={};for(let h=0;hxt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;ul===f?0:lo.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;hy.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;bt[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=jt(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function jt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in T)return T[x];var d=T[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(j=>D.has(j)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let E=!1;O.selectAll(".venn-area path").each(function(k){const j=this.getAttribute("d");k.sets.length==1&&j&&!b&&(E=!0,R[k.sets[0]]=Me(j))});function A(k){return j=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-j)+Z.x*j,y:Y.y*(1-j)+Z.y*j,radius:Y.radius*(1-j)+Z.radius*j}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;E&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(j=>I[j])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(E?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const F=K(G.exit()).remove();typeof G.transition=="function"&&F.selectAll("path").attrTween("d",A);const X=F.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:F}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const T=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${T+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` M`,t,n),e.push(` m`,-s,0),e.push(` a`,s,s,0,1,0,s*2,0),e.push(` diff --git a/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-CudDDIjA.js b/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-B0BJU7Oe.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-CudDDIjA.js rename to apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-B0BJU7Oe.js index 18d925d08..8cdea1adf 100644 --- a/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-CudDDIjA.js +++ b/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-B0BJU7Oe.js @@ -1,4 +1,4 @@ -import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-vF2s5p7P.js";/** +import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-BZ9wqq8Z.js";/** * vue v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-D4zA5eJ2.js b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-D4zA5eJ2.js rename to apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js index 99ff2952d..11a28d56c 100644 --- a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-D4zA5eJ2.js +++ b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js @@ -1,4 +1,4 @@ -import{p as St}from"./chunk-JWPE2WC7-BVyXOrT5.js";import{s as Mt,g as Nt,q as zt,p as Lt,a as Tt,b as At,_ as u,X as Xt,A as Et,D as U,l as K,G as Yt,d as It,r as Bt,c as j}from"./mermaid.core-BgUXBQ9g.js";import{p as Ft}from"./cynefin-OW5HDTMX-DnoOlDkN.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map +import{p as St}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{s as Mt,g as Nt,q as zt,p as Lt,a as Tt,b as At,_ as u,X as Xt,A as Et,D as U,l as K,G as Yt,d as It,r as Bt,c as j}from"./mermaid.core-BusHtpbx.js";import{p as Ft}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map `+e);const a=Ht(),d=qt(),w=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),F=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=Yt(n);E.selectAll("*").remove(),It(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${n}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const z=u(t=>a.padding+t/100*Y,"projectX"),L=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const ut=g.axes.xLabel??"Evolution",wt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(ut),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(wt);const B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(B.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===B.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/B.length;B.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}B.forEach((i,p)=>{const l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h{const y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(o.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),_=new Map;g.pipelines.forEach(t=>{_.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||_.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,m=f/h,P=-l/h,N=i+m*y,O=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);const mt=v.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=z(t.targetX),i=L(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,m=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);mt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(o.length>1)for(let i=0;i{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),o=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(h.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(H=>{const W=H.node(),Pt=W.getComputedTextLength();m=Math.max(m,Pt);const Ct=W.getBBox();P=Math.max(P,Ct.height)});const N=m+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,bt=S-a.padding-N,$t=a.padding,vt=b-a.padding-O;s=Math.max(X,Math.min(s,bt)),o=Math.max($t,Math.min(o,vt)),y.forEach((H,W)=>{H.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const o=z(s.x),i=L(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=` M ${o} ${i-l/2} L ${o+p-f} ${i-l/2} diff --git a/apps/pythinker-code/dist-web/assets/xml-Co1-HPio.js b/apps/pythinker-code/dist-web/assets/xml-BDPhTprf.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/xml-Co1-HPio.js rename to apps/pythinker-code/dist-web/assets/xml-BDPhTprf.js index b8fea0a5e..36c7cf33c 100644 --- a/apps/pythinker-code/dist-web/assets/xml-Co1-HPio.js +++ b/apps/pythinker-code/dist-web/assets/xml-BDPhTprf.js @@ -1 +1 @@ -import{l as e}from"./editor.main-BVyazG_A.js";import"./index-vF2s5p7P.js";import"./purify.es-5AjVNlXF.js";const i={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/ Pythinker Code Web - - + +
        diff --git a/apps/pythinker-web/src/api/daemon/client.ts b/apps/pythinker-web/src/api/daemon/client.ts index c482c6931..cf4cbed95 100644 --- a/apps/pythinker-web/src/api/daemon/client.ts +++ b/apps/pythinker-web/src/api/daemon/client.ts @@ -38,6 +38,7 @@ import type { AppTranscriptPage, AppTranscriptPageRequest, AppTask, + AppTaskListOptions, AppTaskStatus, AppTerminal, AppWorkspace, @@ -1036,13 +1037,17 @@ export class DaemonPythinkerWebApi implements PythinkerWebApi { // Tasks // ------------------------------------------------------------------------- - async listTasks(sessionId: string, status?: AppTaskStatus): Promise { - const query: Record = { - status: status, + async listTasks(sessionId: string, input?: AppTaskListOptions): Promise { + const query: Record = { + status: input?.status, + with_output: input?.withOutput, + output_bytes: input?.outputBytes, + output_status: input?.outputStatus, }; const data = await this.http.get<{ items: WireTask[] }>( `/sessions/${encodeURIComponent(sessionId)}/tasks`, query, + { signal: input?.signal }, ); return data.items.map(toAppTask); } @@ -1050,7 +1055,7 @@ export class DaemonPythinkerWebApi implements PythinkerWebApi { async getTask( sessionId: string, taskId: string, - input?: { withOutput?: boolean; outputBytes?: number }, + input?: { withOutput?: boolean; outputBytes?: number; signal?: AbortSignal }, ): Promise { const query: Record = { with_output: input?.withOutput, @@ -1059,6 +1064,7 @@ export class DaemonPythinkerWebApi implements PythinkerWebApi { const data = await this.http.get( `/sessions/${encodeURIComponent(sessionId)}/tasks/${encodeURIComponent(taskId)}`, query, + { signal: input?.signal }, ); return toAppTask(data); } diff --git a/apps/pythinker-web/src/api/daemon/eventReducer.ts b/apps/pythinker-web/src/api/daemon/eventReducer.ts index 0da9efc2d..d95a9a8fe 100644 --- a/apps/pythinker-web/src/api/daemon/eventReducer.ts +++ b/apps/pythinker-web/src/api/daemon/eventReducer.ts @@ -266,6 +266,63 @@ function settleOpenThinking(content: AppMessageContent[], nowMs: number, beforeI } } +export function patchAssistantDeltaMessage( + message: AppMessage, + event: Extract, +): AppMessage { + const content = [...message.content]; + const index = event.contentIndex; + const created = content.length <= index; + while (content.length <= index) { + content.push({ type: 'text', text: '' }); + } + const existing = content[index]!; + let patched: AppMessageContent; + if (event.delta.text !== undefined) { + if (existing.type === 'text' && !created) { + patched = { type: 'text', text: existing.text + event.delta.text }; + } else { + settleOpenThinking(content, Date.now(), index); + patched = { type: 'text', text: event.delta.text }; + } + } else if (event.delta.thinking !== undefined) { + if (existing.type === 'thinking') { + patched = { + type: 'thinking', + thinking: existing.thinking + event.delta.thinking, + signature: existing.signature, + startedAt: existing.startedAt, + durationMs: existing.durationMs, + }; + } else { + settleOpenThinking(content, Date.now(), index); + patched = { + type: 'thinking', + thinking: event.delta.thinking, + startedAt: new Date().toISOString(), + }; + } + } else { + patched = existing; + } + content[index] = patched; + return { ...message, content }; +} + +export function patchAssistantDeltaInPlace( + messages: AppMessage[], + event: Extract, +): boolean { + const tailIndex = messages.length - 1; + const index = + messages[tailIndex]?.id === event.messageId + ? tailIndex + : messages.findIndex((message) => message.id === event.messageId); + if (index === -1) return false; + messages[index] = patchAssistantDeltaMessage(messages[index]!, event); + return true; +} + /** Agent error code → semantic title key under `warnings.agentError`. Codes * come from the protocol error domain (agent-core-v2 `ProtocolErrors`); * anything unmapped falls back to the generic `title`. */ @@ -591,50 +648,13 @@ export function reduceAppEvent( case 'assistantDelta': { const sid = event.sessionId; const msgs = next.messagesBySession[sid] ?? []; - next.messagesBySession[sid] = msgs.map((m) => { - if (m.id !== event.messageId) return m; - const content = [...m.content]; - const idx = event.contentIndex; - // Track whether the slot pre-existed: the placeholder loop below pads - // text slots, so a padded slot must be treated as a NEW part (settle - // the thinking parts before it), not a continuation — the `c` flag - // in assistantDelta marks it. - const created = content.length <= idx; - // Ensure the slot exists - while (content.length <= idx) { - content.push({ type: 'text', text: '' }); - } - const existing = content[idx]!; - let patched: AppMessageContent; - if (event.delta.text !== undefined) { - if (existing.type === 'text' && !created) { - patched = { type: 'text', text: existing.text + event.delta.text }; - } else { - // A fresh text part ends any thinking part before it. - settleOpenThinking(content, Date.now(), idx); - patched = { type: 'text', text: event.delta.text }; - } - } else if (event.delta.thinking !== undefined) { - if (existing.type === 'thinking') { - patched = { - type: 'thinking', - thinking: existing.thinking + event.delta.thinking, - signature: existing.signature, - startedAt: existing.startedAt, - durationMs: existing.durationMs, - }; - } else { - // The thinking stream opens here — stamp its start so the live - // timer has an anchor — and settle every thinking part before it. - settleOpenThinking(content, Date.now(), idx); - patched = { type: 'thinking', thinking: event.delta.thinking, startedAt: new Date().toISOString() }; - } - } else { - patched = existing; - } - content[idx] = patched; - return { ...m, content }; - }); + const index = msgs.findIndex((message) => message.id === event.messageId); + if (index !== -1) { + next.messagesBySession[sid] = msgs.with( + index, + patchAssistantDeltaMessage(msgs[index]!, event), + ); + } break; } diff --git a/apps/pythinker-web/src/api/daemon/http.ts b/apps/pythinker-web/src/api/daemon/http.ts index 0b0843d04..c07bb779c 100644 --- a/apps/pythinker-web/src/api/daemon/http.ts +++ b/apps/pythinker-web/src/api/daemon/http.ts @@ -27,12 +27,23 @@ export interface DaemonHttpClientIdentity { readonly clientUiMode: string; } -/** AbortSignal.timeout with a fallback for older environments (jsdom). */ -function timeoutSignal(timeoutMs = REQUEST_TIMEOUT_MS): AbortSignal | undefined { +/** AbortSignal.timeout with caller cancellation and an older-environment fallback. */ +function requestSignal( + callerSignal?: AbortSignal, + timeoutMs = REQUEST_TIMEOUT_MS, +): AbortSignal | undefined { + let timeout: AbortSignal | undefined; try { - return AbortSignal.timeout(timeoutMs); + timeout = AbortSignal.timeout(timeoutMs); } catch { - return undefined; + timeout = undefined; + } + if (callerSignal === undefined) return timeout; + if (timeout === undefined) return callerSignal; + try { + return AbortSignal.any([callerSignal, timeout]); + } catch { + return callerSignal; } } @@ -96,8 +107,12 @@ export class DaemonHttpClient { private readonly apiVersion: 'v1' | 'v2' = 'v1', ) {} - async get(path: string, query?: Record): Promise { - return this.request('GET', path, undefined, query); + async get( + path: string, + query?: Record, + options?: { signal?: AbortSignal }, + ): Promise { + return this.request('GET', path, undefined, query, [], undefined, false, options?.signal); } /** Authenticated raw-binary GET (no envelope). Used for file downloads that @@ -113,7 +128,7 @@ export class DaemonHttpClient { traceRestRequest({ method: 'GET', path, url, requestId }); let response: Response; try { - response = await fetch(url, { method: 'GET', headers, signal: timeoutSignal() }); + response = await fetch(url, { method: 'GET', headers, signal: requestSignal() }); } catch (err) { traceRestFailure({ method: 'GET', @@ -215,7 +230,7 @@ export class DaemonHttpClient { method, headers, body: JSON.stringify(body), - signal: timeoutSignal(EXPORT_TIMEOUT_MS), + signal: requestSignal(undefined, EXPORT_TIMEOUT_MS), }); } catch (error) { traceRestFailure({ @@ -358,7 +373,7 @@ export class DaemonHttpClient { traceRestRequest({ method: 'POST', path, url, requestId, body: describeFormData(formData) }); let response: Response; try { - response = await fetch(url, { method: 'POST', headers, body: formData, signal: timeoutSignal() }); + response = await fetch(url, { method: 'POST', headers, body: formData, signal: requestSignal() }); } catch (error) { traceRestFailure({ method: 'POST', path, requestId, phase: 'fetch', durationMs: Date.now() - startedAt, error: error }); throw new DaemonNetworkError({ @@ -442,6 +457,7 @@ export class DaemonHttpClient { allowCodes?: number[], extraHeaders?: Record, withHeaders?: false, + signal?: AbortSignal, ): Promise; private async request( method: string, @@ -451,6 +467,7 @@ export class DaemonHttpClient { allowCodes: number[], extraHeaders: Record | undefined, withHeaders: true, + signal?: AbortSignal, ): Promise<{ data: T; code: number; headers: Headers }>; private async request( method: string, @@ -460,6 +477,7 @@ export class DaemonHttpClient { allowCodes: number[] = [], extraHeaders?: Record, withHeaders?: boolean, + signal?: AbortSignal, ): Promise { // Build URL, appending query string (omit undefined values) let url = buildRestUrl(this.origin, path, this.apiVersion); @@ -495,7 +513,7 @@ export class DaemonHttpClient { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined, - signal: timeoutSignal(), + signal: requestSignal(signal), }); } catch (error) { traceRestFailure({ method, path, requestId, phase: 'fetch', durationMs: Date.now() - startedAt, error: error }); diff --git a/apps/pythinker-web/src/api/types.ts b/apps/pythinker-web/src/api/types.ts index c46bcadf5..adf85d46d 100644 --- a/apps/pythinker-web/src/api/types.ts +++ b/apps/pythinker-web/src/api/types.ts @@ -397,6 +397,14 @@ export interface AppTask { backgroundTaskId?: string; } +export interface AppTaskListOptions { + status?: AppTaskStatus; + withOutput?: boolean; + outputBytes?: number; + outputStatus?: 'running' | 'all'; + signal?: AbortSignal; +} + // --------------------------------------------------------------------------- // Goal // --------------------------------------------------------------------------- @@ -1076,8 +1084,8 @@ export interface PythinkerWebApi { listPlugins(): Promise; setPluginEnabled(pluginId: string, enabled: boolean): Promise<{ id: string; enabled: boolean }>; listSubagents(workDir: string): Promise; - listTasks(sessionId: string, status?: AppTaskStatus): Promise; - getTask(sessionId: string, taskId: string, input?: { withOutput?: boolean; outputBytes?: number }): Promise; + listTasks(sessionId: string, input?: AppTaskListOptions): Promise; + getTask(sessionId: string, taskId: string, input?: { withOutput?: boolean; outputBytes?: number; signal?: AbortSignal }): Promise; cancelTask(sessionId: string, taskId: string): Promise<{ cancelled: true }>; /** Release a running foreground task so it keeps running in the background. */ detachTask(sessionId: string, taskId: string): Promise<{ detached: boolean; status: AppTaskStatus }>; diff --git a/apps/pythinker-web/src/components/chat/ChatPane.vue b/apps/pythinker-web/src/components/chat/ChatPane.vue index f96d0f479..c08099e2a 100644 --- a/apps/pythinker-web/src/components/chat/ChatPane.vue +++ b/apps/pythinker-web/src/components/chat/ChatPane.vue @@ -243,13 +243,39 @@ interface AssistantTurnModel { changes: TurnFileChange[]; } +const assistantTurnModelCache = new WeakMap< + ChatTurn, + { + activityRunFolding: boolean; + turnFolding: boolean; + model: AssistantTurnModel; + } +>(); + +function assistantTurnModel(turn: ChatTurn): AssistantTurnModel { + const cached = assistantTurnModelCache.get(turn); + if ( + cached?.activityRunFolding === props.activityRunFolding && + cached.turnFolding === props.turnFolding + ) { + return cached.model; + } + const all = assistantRenderBlocks(turn, props.activityRunFolding); + const { folded, visible } = foldRenderBlocks(all, props.turnFolding); + const model = { all, folded, visible, changes: turnFileChanges(turn) }; + assistantTurnModelCache.set(turn, { + activityRunFolding: props.activityRunFolding, + turnFolding: props.turnFolding, + model, + }); + return model; +} + const assistantTurnModels = computed(() => { const models = new Map(); for (const turn of props.turns) { if (turn.role !== 'assistant') continue; - const all = assistantRenderBlocks(turn, props.activityRunFolding); - const { folded, visible } = foldRenderBlocks(all, props.turnFolding); - models.set(turn.id, { all, folded, visible, changes: turnFileChanges(turn) }); + models.set(turn.id, assistantTurnModel(turn)); } return models; }); diff --git a/apps/pythinker-web/src/composables/client/useTaskPoller.ts b/apps/pythinker-web/src/composables/client/useTaskPoller.ts index 675530658..0227f5469 100644 --- a/apps/pythinker-web/src/composables/client/useTaskPoller.ts +++ b/apps/pythinker-web/src/composables/client/useTaskPoller.ts @@ -1,7 +1,3 @@ -// apps/pythinker-web/src/composables/client/useTaskPoller.ts -// Background task output polling and the 1-second task clock used to keep -// running-task elapsed timers live in the UI. - import { computed, ref, watch, type ComputedRef, type Ref } from 'vue'; import { getPythinkerWebApi } from '../../api'; import type { AppTask } from '../../api/types'; @@ -13,217 +9,224 @@ const TASK_OUTPUT_POLL_BYTES = 4096; const TASK_OUTPUT_FINAL_BYTES = 32 * 1024; export interface UseTaskPoller { - /** 1-second clock that ticks while an active app task is running. */ taskClock: Readonly>; - /** One-off load of the task list for a session, plus terminal-output backfill. */ loadTasksForSession: (sessionId: string) => Promise; + dispose: () => void; +} + +function sameArray(left: unknown[], right: unknown[]): boolean { + return left.length === right.length && left.every((value, index) => Object.is(value, right[index])); +} + +function sameRecord(left: object, right: object): boolean { + const leftRecord = left as Record; + const rightRecord = right as Record; + const keys = new Set([...Object.keys(leftRecord), ...Object.keys(rightRecord)]); + for (const key of keys) { + const leftValue = leftRecord[key]; + const rightValue = rightRecord[key]; + if (key === 'outputLines' && Array.isArray(leftValue) && Array.isArray(rightValue)) { + if (!sameArray(leftValue, rightValue)) return false; + } else if (key === 'routing' && leftValue && rightValue) { + if (!sameRecord(leftValue as object, rightValue as object)) return false; + } else if (!Object.is(leftValue, rightValue)) { + return false; + } + } + return true; +} + +function stabilizeTasks(next: AppTask[], existing: AppTask[]): AppTask[] { + const existingById = new Map(existing.map((task) => [task.id, task] as const)); + const stable = next.map((task) => { + const previous = existingById.get(task.id); + return previous && sameRecord(task, previous) ? previous : task; + }); + return stable.length === existing.length && stable.every((task, index) => task === existing[index]) + ? existing + : stable; +} + +function mergeRestTasks(taskList: AppTask[], existing: AppTask[]): AppTask[] { + const existingById = new Map(existing.map((task) => [task.id, task] as const)); + return taskList.map((fresh) => { + const old = existingById.get(fresh.id); + return { + ...fresh, + outputLines: old?.outputLines, + text: old?.text, + outputPreview: fresh.outputPreview ?? old?.outputPreview, + outputBytes: fresh.outputBytes ?? old?.outputBytes, + }; + }); +} + +function isTerminal(task: AppTask): boolean { + return task.status !== 'running'; } export function useTaskPoller( rawState: ExtendedState, activeAppTasks: ComputedRef, ): UseTaskPoller { - let taskOutputPollTimer: ReturnType | null = null; - let lastPolledSessionId: string | undefined; + let pollTimer: ReturnType | null = null; + let finalRefreshTimer: ReturnType | null = null; + let taskClockTimer: ReturnType | null = null; + let pollController: AbortController | null = null; + let loadController: AbortController | null = null; + let polledSessionId: string | undefined; + let outputSessionId: string | undefined; const fetchedTerminalTaskOutputIds = new Set(); + const taskClock = ref(0); - async function loadTasksForSession(sessionId: string): Promise { - try { - const api = getPythinkerWebApi(); - const taskList = await api.listTasks(sessionId); - rawState.tasksBySession = { - ...rawState.tasksBySession, - // Keep WS-delivered dynamic_workflow subagents that REST /tasks omits (see keepLiveSubagents). - [sessionId]: keepLiveSubagents(taskList, rawState.tasksBySession[sessionId] ?? []), - }; - // Completed tasks may have real terminal output that never streamed over - // WS. Fetch it once now so the rows are expandable when the session opens. - await fetchTerminalTaskOutputs(sessionId, taskList); - } catch { - // Tasks are side data; old/stale sessions may fail without blocking messages. - } + function selectOutputSession(sessionId: string | undefined): void { + if (outputSessionId === sessionId) return; + outputSessionId = sessionId; + fetchedTerminalTaskOutputIds.clear(); } - /** - * Fetch the final output snapshot for terminal tasks that lack real streamed - * outputLines. Called once after loading the task list so already-completed - * tasks are clickable immediately. - */ - async function fetchTerminalTaskOutputs( - sessionId: string, - taskList?: AppTask[], - ): Promise { - if (rawState.activeSessionId !== sessionId) return; - - const tasks = taskList ?? rawState.tasksBySession[sessionId] ?? []; - const api = getPythinkerWebApi(); - const outputByTaskId = new Map(); + function applyTaskList(sessionId: string, taskList: AppTask[]): void { + const existing = rawState.tasksBySession[sessionId] ?? []; + const merged = keepLiveSubagents(mergeRestTasks(taskList, existing), existing); + const stable = stabilizeTasks(merged, existing); + if (stable === existing) return; + rawState.tasksBySession = { ...rawState.tasksBySession, [sessionId]: stable }; + } - await Promise.all( - tasks.map(async (task) => { - const isTerminal = - task.status === 'completed' || task.status === 'failed' || task.status === 'cancelled'; - if (!isTerminal) return; - if (fetchedTerminalTaskOutputIds.has(task.id)) return; - if ((task.outputLines?.length ?? 0) > 0) return; + function markTerminalOutputsFetched(taskList: AppTask[]): void { + for (const task of taskList) { + if (isTerminal(task)) fetchedTerminalTaskOutputIds.add(task.id); + } + } - try { - const withOutput = await api.getTask(sessionId, task.id, { - withOutput: true, - outputBytes: TASK_OUTPUT_FINAL_BYTES, - }); - if (withOutput.outputPreview !== undefined) { - outputByTaskId.set(task.id, { - preview: withOutput.outputPreview, - bytes: withOutput.outputBytes, - }); - } - // Only a definitive response marks the task as fetched — a transient - // failure must leave it eligible for a later backfill. - fetchedTerminalTaskOutputIds.add(task.id); - } catch { - // Task may have finished between listTasks and getTask; ignore. - } - }), + function needsTerminalOutput(taskList: AppTask[]): boolean { + return taskList.some( + (task) => isTerminal(task) && !fetchedTerminalTaskOutputIds.has(task.id), ); - - if (outputByTaskId.size === 0) return; - - const existing = rawState.tasksBySession[sessionId] ?? []; - rawState.tasksBySession = { - ...rawState.tasksBySession, - [sessionId]: existing.map((t) => { - // Output was fetched by REST task id; a background subagent row folded - // into its WS agent-id row (keepLiveSubagents) is matched via - // backgroundTaskId, otherwise its final output would be dropped here - // and never refetched (the REST id is already marked as fetched). - const polled = - outputByTaskId.get(t.id) ?? - (t.backgroundTaskId !== undefined - ? outputByTaskId.get(t.backgroundTaskId) - : undefined); - if (!polled) return t; - return { ...t, outputPreview: polled.preview, outputBytes: polled.bytes }; - }), - }; } - /** - * Poll background task output for a session. Mirrors the TUI's 1-second refresh: - * refresh the task list, then fetch tail output for running tasks and a final - * snapshot for terminal tasks that haven't received output yet. - */ - async function pollTaskOutputForSession(sessionId: string): Promise { + async function loadTasksForSession(sessionId: string): Promise { if (rawState.activeSessionId !== sessionId) return; - - const api = getPythinkerWebApi(); - let taskList: AppTask[]; + selectOutputSession(sessionId); + loadController?.abort(); + const controller = new AbortController(); + loadController = controller; try { - taskList = await api.listTasks(sessionId); + const taskList = await getPythinkerWebApi().listTasks(sessionId, { + withOutput: true, + outputBytes: TASK_OUTPUT_FINAL_BYTES, + outputStatus: 'all', + signal: controller.signal, + }); + if (controller.signal.aborted || rawState.activeSessionId !== sessionId) return; + markTerminalOutputsFetched(taskList); + applyTaskList(sessionId, taskList); } catch { return; + } finally { + if (loadController === controller) loadController = null; } + } - const outputByTaskId = new Map(); - - await Promise.all( - taskList.map(async (task) => { - const isRunning = task.status === 'running'; - const isTerminal = - task.status === 'completed' || task.status === 'failed' || task.status === 'cancelled'; - if (!isRunning && !isTerminal) return; - - // Running tasks: poll tail continuously. Terminal tasks: fetch a final - // snapshot once if we have not already received real streamed output. - // outputPreview may be a placeholder (`$ `) or a partial tail, - // so we intentionally do not skip terminal tasks just because outputPreview - // is present. - if (isTerminal) { - if (fetchedTerminalTaskOutputIds.has(task.id)) return; - if ((task.outputLines?.length ?? 0) > 0) return; - } + async function pollTaskOutputForSession( + sessionId: string, + signal: AbortSignal, + ): Promise { + try { + const api = getPythinkerWebApi(); + let taskList = await api.listTasks(sessionId, { + withOutput: true, + outputBytes: TASK_OUTPUT_POLL_BYTES, + outputStatus: 'running', + signal, + }); + if (signal.aborted || rawState.activeSessionId !== sessionId) return; - try { - const withOutput = await api.getTask(sessionId, task.id, { - withOutput: true, - outputBytes: isRunning ? TASK_OUTPUT_POLL_BYTES : TASK_OUTPUT_FINAL_BYTES, - }); - if (withOutput.outputPreview !== undefined) { - outputByTaskId.set(task.id, { - preview: withOutput.outputPreview, - bytes: withOutput.outputBytes, - }); - } - // Mark as fetched only on a definitive response; a transient failure - // stays eligible for the next poll. - if (isTerminal) { - fetchedTerminalTaskOutputIds.add(task.id); - } - } catch { - // Task may have finished between listTasks and getTask; ignore. - } - }), - ); + if (needsTerminalOutput(taskList)) { + taskList = await api.listTasks(sessionId, { + withOutput: true, + outputBytes: TASK_OUTPUT_FINAL_BYTES, + outputStatus: 'all', + signal, + }); + if (signal.aborted || rawState.activeSessionId !== sessionId) return; + markTerminalOutputsFetched(taskList); + } - const existing = rawState.tasksBySession[sessionId] ?? []; - const existingById = new Map(existing.map((t) => [t.id, t] as const)); + applyTaskList(sessionId, taskList); + } catch { + return; + } + } - const refreshed: AppTask[] = taskList.map((fresh) => { - const old = existingById.get(fresh.id); - const polled = outputByTaskId.get(fresh.id); - return { - ...fresh, - // Preserve any WS-driven outputLines / streamed text (future taskProgress events). - outputLines: old?.outputLines, - text: old?.text, - outputPreview: polled?.preview ?? old?.outputPreview, - outputBytes: polled?.bytes ?? old?.outputBytes, - }; - }); + function hasRunningTask(sessionId: string): boolean { + return (rawState.tasksBySession[sessionId] ?? []).some((task) => task.status === 'running'); + } - rawState.tasksBySession = { - ...rawState.tasksBySession, - // Keep WS-delivered dynamic_workflow subagents that REST /tasks omits (see keepLiveSubagents). - [sessionId]: keepLiveSubagents(refreshed, existing), - }; + function schedulePoll(sessionId: string, delayMs: number): void { + if (pollTimer !== null) clearTimeout(pollTimer); + pollTimer = setTimeout(() => { + pollTimer = null; + void runPoll(sessionId); + }, delayMs); } - function startTaskOutputPolling(sessionId: string): void { - if (taskOutputPollTimer !== null && lastPolledSessionId === sessionId) { + async function runPoll(sessionId: string): Promise { + if ( + polledSessionId !== sessionId || + rawState.activeSessionId !== sessionId || + !hasRunningTask(sessionId) + ) { return; } - stopTaskOutputPolling(); - lastPolledSessionId = sessionId; - void pollTaskOutputForSession(sessionId); - taskOutputPollTimer = setInterval(() => { - if (typeof document !== 'undefined' && document.visibilityState === 'hidden') { - return; - } - if (rawState.activeSessionId === sessionId) { - void pollTaskOutputForSession(sessionId); - } else { - stopTaskOutputPolling(); - } - }, TASK_OUTPUT_POLL_INTERVAL_MS); + if (typeof document !== 'undefined' && document.visibilityState === 'hidden') { + // Idle while hidden; `visibilitychange` below resumes with an immediate poll. + return; + } + + const controller = new AbortController(); + pollController = controller; + await pollTaskOutputForSession(sessionId, controller.signal); + if (pollController === controller) pollController = null; + if ( + !controller.signal.aborted && + polledSessionId === sessionId && + rawState.activeSessionId === sessionId && + hasRunningTask(sessionId) + ) { + schedulePoll(sessionId, TASK_OUTPUT_POLL_INTERVAL_MS); + } + } + + function onVisibilityChange(): void { + if (document.visibilityState !== 'visible' || polledSessionId === undefined) return; + if (pollTimer !== null || pollController !== null) return; + void runPoll(polledSessionId); + } + if (typeof document !== 'undefined') { + document.addEventListener('visibilitychange', onVisibilityChange); } function stopTaskOutputPolling(): void { - if (taskOutputPollTimer !== null) { - clearInterval(taskOutputPollTimer); - taskOutputPollTimer = null; + if (pollTimer !== null) { + clearTimeout(pollTimer); + pollTimer = null; } - lastPolledSessionId = undefined; - fetchedTerminalTaskOutputIds.clear(); + pollController?.abort(); + pollController = null; + polledSessionId = undefined; } - // A 1-second clock that only ticks while a task is running, so a running task's - // elapsed-time label keeps counting up. UI task mappers read Date.now() once per - // evaluation; without this the `tasks` computed only re-ran when tasksBySession - // changed, freezing the timer at whatever it read on the first render. - const taskClock = ref(0); - let taskClockTimer: ReturnType | null = null; - watch( - () => activeAppTasks.value.some((tk) => tk.status === 'running'), + function startTaskOutputPolling(sessionId: string): void { + if (polledSessionId === sessionId) return; + stopTaskOutputPolling(); + selectOutputSession(sessionId); + polledSessionId = sessionId; + void runPoll(sessionId); + } + + const stopTaskClockWatch = watch( + () => activeAppTasks.value.some((task) => task.status === 'running'), (hasRunning) => { if (hasRunning && taskClockTimer === null) { taskClockTimer = setInterval(() => { @@ -237,39 +240,62 @@ export function useTaskPoller( { immediate: true }, ); - // Start/stop task output polling based on whether the active session has - // running background tasks. This mirrors the TUI's 1-second refresh. - watch( - () => { - const sid = rawState.activeSessionId; - if (!sid) return { sid: undefined as string | undefined, hasRunning: false }; - const tasks = rawState.tasksBySession[sid] ?? []; - return { sid, hasRunning: tasks.some((t) => t.status === 'running') }; - }, - ({ sid, hasRunning }, _prev, onCleanup) => { - let cleanupTimer: ReturnType | undefined; - if (hasRunning && sid !== undefined) { - startTaskOutputPolling(sid); - } else if (sid !== undefined) { - // All tasks finished — wait a beat to catch final output, then stop. - cleanupTimer = setTimeout(() => { - const tasks = rawState.tasksBySession[sid] ?? []; - if (!tasks.some((t) => t.status === 'running')) { - stopTaskOutputPolling(); - } - }, 1500); - } else { - stopTaskOutputPolling(); + const stopPollingWatch = watch( + [ + () => rawState.activeSessionId, + () => { + const sessionId = rawState.activeSessionId; + return sessionId === undefined ? false : hasRunningTask(sessionId); + }, + ], + ([sessionId, hasRunning], [previousSessionId, previousHasRunning]) => { + if (finalRefreshTimer !== null) { + clearTimeout(finalRefreshTimer); + finalRefreshTimer = null; } - onCleanup(() => { - if (cleanupTimer !== undefined) clearTimeout(cleanupTimer); - }); + if (sessionId !== previousSessionId) { + loadController?.abort(); + loadController = null; + selectOutputSession(sessionId); + } + if (sessionId !== undefined && hasRunning) { + startTaskOutputPolling(sessionId); + return; + } + + stopTaskOutputPolling(); + if (sessionId === undefined || !previousHasRunning) return; + const tasks = rawState.tasksBySession[sessionId] ?? []; + if (!needsTerminalOutput(tasks)) return; + finalRefreshTimer = setTimeout(() => { + finalRefreshTimer = null; + if (rawState.activeSessionId === sessionId && !hasRunningTask(sessionId)) { + void loadTasksForSession(sessionId); + } + }, 1500); }, - { deep: true, immediate: true }, + { immediate: true }, ); + function dispose(): void { + if (typeof document !== 'undefined') { + document.removeEventListener('visibilitychange', onVisibilityChange); + } + stopTaskClockWatch(); + stopPollingWatch(); + stopTaskOutputPolling(); + loadController?.abort(); + loadController = null; + if (finalRefreshTimer !== null) clearTimeout(finalRefreshTimer); + finalRefreshTimer = null; + if (taskClockTimer !== null) clearInterval(taskClockTimer); + taskClockTimer = null; + fetchedTerminalTaskOutputIds.clear(); + } + return { taskClock: computed(() => taskClock.value), loadTasksForSession, + dispose, }; } diff --git a/apps/pythinker-web/src/composables/messagesToTurns.ts b/apps/pythinker-web/src/composables/messagesToTurns.ts index dfe085e50..250013c51 100644 --- a/apps/pythinker-web/src/composables/messagesToTurns.ts +++ b/apps/pythinker-web/src/composables/messagesToTurns.ts @@ -396,6 +396,8 @@ interface Group { foldedSigs: ContentSig[]; } +const EMPTY_PLAN_REVIEW_BY_TOOL_CALL_ID: Record = {}; + // --------------------------------------------------------------------------- // messagesToTurns // --------------------------------------------------------------------------- @@ -591,7 +593,8 @@ export function messagesToTurns( sessionActive = true, /** Preserved `plan_review` displays keyed by toolCallId — used to link the * ExitPlanMode tool card back to the plan file after the approval resolves. */ - planReviewByToolCallId: Record = {}, + planReviewByToolCallId: Record = + EMPTY_PLAN_REVIEW_BY_TOOL_CALL_ID, ): ChatTurn[] { const turns: ChatTurn[] = []; let no = 1; @@ -995,3 +998,125 @@ export function messagesToTurns( flushGroup(true); return turns; } + +function isProjectionBoundary(msg: AppMessage): boolean { + if (isCompactionSummaryMessage(msg)) return true; + if (msg.role !== 'user') return false; + const kind = (msg.metadata?.['origin'] as { kind?: string } | undefined)?.kind; + return kind !== 'task' && kind !== 'background_task' && kind !== 'task_notification'; +} + +function lastProjectionBoundary(messages: AppMessage[]): number { + for (let index = messages.length - 1; index >= 0; index -= 1) { + if (isProjectionBoundary(messages[index]!)) return index; + } + return 0; +} + +interface TurnProjectionCache { + messages: AppMessage[]; + messageCount: number; + lastMessage: AppMessage | undefined; + approvals: AppApprovalRequest[]; + getFileUrl: ((fileId: string) => string) | undefined; + sessionActive: boolean; + planReviewByToolCallId: Record; + boundaryIndex: number; + prefixTurns: ChatTurn[]; + tailTurns: ChatTurn[]; + turns: ChatTurn[]; +} + +export function createMessagesToTurnsProjector(): typeof messagesToTurns { + let cache: TurnProjectionCache | undefined; + + return ( + messages, + approvals, + getFileUrl, + sessionActive = true, + planReviewByToolCallId = EMPTY_PLAN_REVIEW_BY_TOOL_CALL_ID, + ): ChatTurn[] => { + const lastMessage = messages.at(-1); + const dependenciesUnchanged = + cache !== undefined && + (cache.approvals === approvals || + (cache.approvals.length === 0 && approvals.length === 0)) && + cache.getFileUrl === getFileUrl && + cache.sessionActive === sessionActive && + cache.planReviewByToolCallId === planReviewByToolCallId; + + if ( + cache !== undefined && + dependenciesUnchanged && + cache.messages === messages && + cache.messageCount === messages.length + ) { + if (cache.lastMessage === lastMessage) return cache.turns; + if ( + lastMessage?.role === 'assistant' && + !isCompactionSummaryMessage(lastMessage) && + cache.lastMessage?.role === 'assistant' && + cache.lastMessage.id === lastMessage.id + ) { + const projectedTail = messagesToTurns( + messages.slice(cache.boundaryIndex), + approvals, + getFileUrl, + sessionActive, + planReviewByToolCallId, + ); + const numberOffset = cache.prefixTurns.filter((turn) => turn.role !== 'compaction').length; + const numberedTail = projectedTail.map((turn) => ({ ...turn, no: turn.no + numberOffset })); + const cachedTailTurns = cache.tailTurns; + const shapeUnchanged = + numberedTail.length === cachedTailTurns.length && + numberedTail.every( + (turn, index) => + turn.id === cachedTailTurns[index]?.id && turn.role === cachedTailTurns[index]?.role, + ); + if (shapeUnchanged) { + for (let index = 0; index < numberedTail.length - 1; index += 1) { + numberedTail[index] = cachedTailTurns[index]!; + } + const turns = [...cache.prefixTurns, ...numberedTail]; + cache = { ...cache, lastMessage, tailTurns: numberedTail, turns }; + return turns; + } + } + } + + const turns = messagesToTurns( + messages, + approvals, + getFileUrl, + sessionActive, + planReviewByToolCallId, + ); + const boundaryIndex = lastProjectionBoundary(messages); + const prefixTurnCount = + boundaryIndex === 0 + ? 0 + : messagesToTurns( + messages.slice(0, boundaryIndex), + approvals, + getFileUrl, + false, + planReviewByToolCallId, + ).length; + cache = { + messages, + messageCount: messages.length, + lastMessage, + approvals, + getFileUrl, + sessionActive, + planReviewByToolCallId, + boundaryIndex, + prefixTurns: turns.slice(0, prefixTurnCount), + tailTurns: turns.slice(prefixTurnCount), + turns, + }; + return turns; + }; +} diff --git a/apps/pythinker-web/src/composables/usePageTitle.ts b/apps/pythinker-web/src/composables/usePageTitle.ts index b510cd8f9..28ca3ac99 100644 --- a/apps/pythinker-web/src/composables/usePageTitle.ts +++ b/apps/pythinker-web/src/composables/usePageTitle.ts @@ -3,12 +3,9 @@ // intentionally excluded so the tab title stays stable. // Prefix the shared Braille mark when the agent is running. -import { computed, onScopeDispose, ref, watch, watchEffect, type Ref } from 'vue'; +import { computed, watchEffect, type Ref } from 'vue'; import { useI18n } from 'vue-i18n'; -import { - BRAILLE_SPINNER_FRAMES, - BRAILLE_SPINNER_FRAME_MS, -} from '../lib/brailleSpinner'; +import { BRAILLE_SPINNER_FRAMES } from '../lib/brailleSpinner'; export interface UsePageTitleOptions { running: Ref; @@ -17,29 +14,8 @@ export interface UsePageTitleOptions { export function usePageTitle({ running, showAuthGate }: UsePageTitleOptions): void { const { t } = useI18n(); - const runningIndicator = ref(BRAILLE_SPINNER_FRAMES[0]); - let frameIndex = 0; - let timer: ReturnType | undefined; - - function stopSpinner(): void { - if (timer !== undefined) clearInterval(timer); - timer = undefined; - } - - watch(running, (isRunning) => { - stopSpinner(); - frameIndex = 0; - runningIndicator.value = BRAILLE_SPINNER_FRAMES[0]; - if (!isRunning) return; - timer = setInterval(() => { - frameIndex = (frameIndex + 1) % BRAILLE_SPINNER_FRAMES.length; - runningIndicator.value = BRAILLE_SPINNER_FRAMES[frameIndex] ?? BRAILLE_SPINNER_FRAMES[0]; - }, BRAILLE_SPINNER_FRAME_MS); - }, { immediate: true }); - onScopeDispose(stopSpinner); - const pageTitle = computed(() => { - const prefix = running.value ? `${runningIndicator.value} ` : ''; + const prefix = running.value ? `${BRAILLE_SPINNER_FRAMES[0]} ` : ''; if (showAuthGate.value) return `${prefix}${t('app.authPageTitle')} - Pythinker Code Web`; return `${prefix}Pythinker Code Web`; }); diff --git a/apps/pythinker-web/src/composables/usePythinkerWebClient.ts b/apps/pythinker-web/src/composables/usePythinkerWebClient.ts index cd752b4a0..e060cc2d4 100644 --- a/apps/pythinker-web/src/composables/usePythinkerWebClient.ts +++ b/apps/pythinker-web/src/composables/usePythinkerWebClient.ts @@ -80,10 +80,16 @@ import type { PythinkerEventMeta, ThinkingLevel, } from '../api/types'; -import { createInitialState, reduceAppEvent, type CompactionStatus, type PythinkerClientState } from '../api/daemon/eventReducer'; +import { + createInitialState, + patchAssistantDeltaInPlace, + reduceAppEvent, + type CompactionStatus, + type PythinkerClientState, +} from '../api/daemon/eventReducer'; import { isPlaceholderSessionUsage, toAppEvent } from '../api/daemon/mappers'; -import { messagesToTurns } from './messagesToTurns'; +import { createMessagesToTurnsProjector } from './messagesToTurns'; import { latestTodos } from './latestTodos'; import { buildDynamicWorkflowGroups, countDynamicWorkflowMembers, dynamicWorkflowMembersByToolCall } from './dynamicWorkflowGroups'; import type { DynamicWorkflowGroup, DynamicWorkflowMember } from './dynamicWorkflowGroups'; @@ -469,7 +475,25 @@ function seedPermissionFromDaemonDefault(): void { // injected into the workspace/model modules (via deps) so no module assigns // rawState.sessions directly. // --------------------------------------------------------------------------- +function sameArrayEntries(left: readonly T[], right: readonly T[]): boolean { + return ( + left === right || + (left.length === right.length && left.every((value, index) => value === right[index])) + ); +} + +function sameRecordEntries(left: Record, right: Record): boolean { + if (left === right) return true; + const leftKeys = Object.keys(left); + const rightKeys = Object.keys(right); + return ( + leftKeys.length === rightKeys.length && + leftKeys.every((key) => left[key] === right[key]) + ); +} + function setSessions(next: AppSession[]): void { + if (sameArrayEntries(rawState.sessions, next)) return; rawState.sessions = next; } /** Replace one session in place (matched by id); no-op if it isn't loaded. */ @@ -572,6 +596,7 @@ function setActiveSessionId(id: string | undefined): void { // --------------------------------------------------------------------------- /** Replace the whole messages map (e.g. from the reducer snapshot). */ function setMessagesBySession(next: Record): void { + if (sameRecordEntries(rawState.messagesBySession, next)) return; rawState.messagesBySession = next; } /** Set one session's message list. */ @@ -875,6 +900,18 @@ function nextOptimisticMsgId(): string { // Helper: mutate rawState by applying a reducer on a snapshot then re-assigning fields function applyEvent(event: ReturnType, sessionId: string, seq: number): void { + if (event.type === 'assistantDelta') { + const messages = rawState.messagesBySession[event.sessionId] ?? []; + if (messages.at(-1)?.id === event.messageId) { + patchAssistantDeltaInPlace(messages, event); + const previousSeq = rawState.lastSeqBySession[sessionId] ?? 0; + if (seq > 0 && seq > previousSeq) { + rawState.lastSeqBySession = { ...rawState.lastSeqBySession, [sessionId]: seq }; + } + return; + } + } + const snapshot: PythinkerClientState = { sessions: rawState.sessions, activeSessionId: rawState.activeSessionId, @@ -896,17 +933,36 @@ function applyEvent(event: ReturnType, sessionId: string, seq setSessions(next.sessions); setActiveSessionId(next.activeSessionId); setMessagesBySession(next.messagesBySession); - rawState.approvalsBySession = next.approvalsBySession; - rawState.planReviewByToolCallId = next.planReviewByToolCallId; - rawState.questionsBySession = next.questionsBySession; - rawState.tasksBySession = next.tasksBySession; - rawState.goalBySession = next.goalBySession; - rawState.goalVersionBySession = next.goalVersionBySession; - rawState.lastSeqBySession = next.lastSeqBySession; - rawState.turnActiveBySession = next.turnActiveBySession; - rawState.compactionBySession = next.compactionBySession; - rawState.config = next.config ?? null; - rawState.warnings = next.warnings; + if (!sameRecordEntries(rawState.approvalsBySession, next.approvalsBySession)) { + rawState.approvalsBySession = next.approvalsBySession; + } + if (!sameRecordEntries(rawState.planReviewByToolCallId, next.planReviewByToolCallId)) { + rawState.planReviewByToolCallId = next.planReviewByToolCallId; + } + if (!sameRecordEntries(rawState.questionsBySession, next.questionsBySession)) { + rawState.questionsBySession = next.questionsBySession; + } + if (!sameRecordEntries(rawState.tasksBySession, next.tasksBySession)) { + rawState.tasksBySession = next.tasksBySession; + } + if (!sameRecordEntries(rawState.goalBySession, next.goalBySession)) { + rawState.goalBySession = next.goalBySession; + } + if (!sameRecordEntries(rawState.goalVersionBySession, next.goalVersionBySession)) { + rawState.goalVersionBySession = next.goalVersionBySession; + } + if (!sameRecordEntries(rawState.lastSeqBySession, next.lastSeqBySession)) { + rawState.lastSeqBySession = next.lastSeqBySession; + } + if (!sameRecordEntries(rawState.turnActiveBySession, next.turnActiveBySession)) { + rawState.turnActiveBySession = next.turnActiveBySession; + } + if (!sameRecordEntries(rawState.compactionBySession, next.compactionBySession)) { + rawState.compactionBySession = next.compactionBySession; + } + const nextConfig = next.config ?? null; + if (rawState.config !== nextConfig) rawState.config = nextConfig; + if (!sameArrayEntries(rawState.warnings, next.warnings)) rawState.warnings = next.warnings; if (event.type === 'configChanged') { rawState.defaultModel = event.config.defaultModel ?? null; @@ -2150,16 +2206,55 @@ const activeAppTasks = computed(() => { const taskPoller = useTaskPoller(rawState, activeAppTasks); +if (import.meta.hot) { + import.meta.hot.dispose(() => taskPoller.dispose()); +} + +const projectMessagesToTurns = createMessagesToTurnsProjector(); +const transcriptFileUrl = (fileId: string): string => getPythinkerWebApi().getFileUrl(fileId); +const emptyApprovals: AppApprovalRequest[] = []; +const emptyMessages: AppMessage[] = []; +const emptyHiddenIds: string[] = []; + +// Memoized side-chat filter: keeps the filtered array's identity stable across +// tail-only delta patches so the turns projector can take its incremental path. +let visibleMessagesCache: + | { source: AppMessage[]; length: number; hiddenIds: string[]; last: AppMessage | undefined; result: AppMessage[] } + | undefined; +function visibleMessages(sessionMessages: AppMessage[], hiddenIds: string[]): AppMessage[] { + if (hiddenIds.length === 0) return sessionMessages; + const last = sessionMessages.at(-1); + const cache = visibleMessagesCache; + if ( + cache !== undefined && + cache.source === sessionMessages && + cache.length === sessionMessages.length && + cache.hiddenIds === hiddenIds + ) { + if (cache.last === last) return cache.result; + const tail = cache.result.at(-1); + if (last !== undefined && tail !== undefined && cache.last?.id === last.id && tail.id === last.id) { + cache.result[cache.result.length - 1] = last; + cache.last = last; + return cache.result; + } + } + const result = sessionMessages.filter((message) => !hiddenIds.includes(message.id)); + visibleMessagesCache = { source: sessionMessages, length: sessionMessages.length, hiddenIds, last, result }; + return result; +} + const turns = computed(() => { const sid = rawState.activeSessionId; if (!sid) return []; - const hiddenIds = new Set(rawState.sideChatUserMessageIdsBySession[sid] ?? []); - const messages = (rawState.messagesBySession[sid] ?? []).filter((m) => !hiddenIds.has(m.id)); - const approvals = rawState.approvalsBySession[sid] ?? []; - return messagesToTurns( + const hiddenMessageIds = rawState.sideChatUserMessageIdsBySession[sid] ?? emptyHiddenIds; + const sessionMessages = rawState.messagesBySession[sid] ?? emptyMessages; + const messages = visibleMessages(sessionMessages, hiddenMessageIds); + const approvals = rawState.approvalsBySession[sid] ?? emptyApprovals; + return projectMessagesToTurns( messages, approvals, - (fileId) => getPythinkerWebApi().getFileUrl(fileId), + transcriptFileUrl, turnActive.value, rawState.planReviewByToolCallId, ); diff --git a/apps/pythinker-web/src/icons/pythinker/folder-open.svg b/apps/pythinker-web/src/icons/pythinker/folder-open.svg index cc2151f97..11c437c3d 100644 --- a/apps/pythinker-web/src/icons/pythinker/folder-open.svg +++ b/apps/pythinker-web/src/icons/pythinker/folder-open.svg @@ -1,27 +1,4 @@ - - + @@ -35,16 +12,16 @@ - - + + - + - + diff --git a/apps/pythinker-web/src/icons/pythinker/search.svg b/apps/pythinker-web/src/icons/pythinker/search.svg index 3dad480cf..f8138752a 100644 --- a/apps/pythinker-web/src/icons/pythinker/search.svg +++ b/apps/pythinker-web/src/icons/pythinker/search.svg @@ -1,57 +1,12 @@ - - + - - diff --git a/apps/pythinker-web/src/icons/pythinker/setting.svg b/apps/pythinker-web/src/icons/pythinker/setting.svg index db5dad06c..de9d93ed3 100644 --- a/apps/pythinker-web/src/icons/pythinker/setting.svg +++ b/apps/pythinker-web/src/icons/pythinker/setting.svg @@ -1,23 +1,5 @@ - - - - + + diff --git a/apps/pythinker-web/src/lib/icons.test.ts b/apps/pythinker-web/src/lib/icons.test.ts index 4fb798728..a856054b8 100644 --- a/apps/pythinker-web/src/lib/icons.test.ts +++ b/apps/pythinker-web/src/lib/icons.test.ts @@ -8,14 +8,13 @@ import { ICONS, SIZE_PX, getIcon, iconSvg } from './icons'; const ANIMATED_NAMES = [ 'terminal', 'cute-bot', - 'search', - 'folder', - 'settings', 'loading-spinner', 'update-button', 'update-available', ] as const; +const STATIC_IDLE_NAMES = ['search', 'folder', 'settings'] as const; + describe('ICONS registry', () => { it('is non-empty', () => { expect(Object.keys(ICONS).length).toBeGreaterThan(0); @@ -120,6 +119,17 @@ describe('animated registry icons', () => { }); }); +describe('idle sidebar icons', () => { + it.each(STATIC_IDLE_NAMES)('%s is static artwork without an animation stylesheet', (name) => { + const target = getIcon(name); + expect(target.animated).toBeUndefined(); + expect(target.component).toBeDefined(); + expect(target.svg).not.toContain(' { it('returns the entry for a known name', () => { expect(getIcon('plus')).toBe(ICONS.plus); diff --git a/apps/pythinker-web/src/lib/icons.ts b/apps/pythinker-web/src/lib/icons.ts index 4cc99f08d..8ef92be72 100644 --- a/apps/pythinker-web/src/lib/icons.ts +++ b/apps/pythinker-web/src/lib/icons.ts @@ -30,7 +30,10 @@ import { fileIconSvg } from './fileIcons'; // Components (Pythinker collection) ---------------------------------------------- import PythinkerAddConversation from '~icons/pythinker/add-conversation'; import PythinkerFolder from '~icons/pythinker/folder'; +import PythinkerFolderOpen from '~icons/pythinker/folder-open'; import PythinkerMore from '~icons/pythinker/more'; +import PythinkerSearch from '~icons/pythinker/search'; +import PythinkerSetting from '~icons/pythinker/setting'; import PythinkerThinking from '~icons/pythinker/thinking'; // Components (Tabler) --------------------------------------------------------- @@ -347,7 +350,7 @@ export const ICONS: Record = { close: entry(RiCloseLine, RawCloseLine), check: entry(RiCheckLine, RawCheckLine), archive: entry(RiArchiveLine, RawArchiveLine), - search: animatedEntry(RawPythinkerSearch), + search: entry(PythinkerSearch, RawPythinkerSearch), copy: entry(RiFileCopyLine, RawFileCopyLine), link: entry(RiLinksLine, RawLinksLine), 'external-link': entry(RiExternalLinkLine, RawExternalLinkLine), @@ -355,7 +358,7 @@ export const ICONS: Record = { undo: entry(RiArrowGoBackLine, RawArrowGoBackLine), send: entry(RiArrowUpLine, RawArrowUpLine), image: entry(RiImageLine, RawImageLine), - settings: animatedEntry(RawPythinkerSetting), + settings: entry(PythinkerSetting, RawPythinkerSetting), sliders: entry(RiEqualizerLine, RawEqualizerLine), 'cute-bot': animatedEntry(RawPythinkerCuteBot), microscope: entry(RiMicroscopeLine, RawMicroscopeLine), @@ -385,7 +388,7 @@ export const ICONS: Record = { list: entry(RiListUnordered, RawListUnordered), sort: entry(RiSortDesc, RawSortDesc), grip: entry(RiDraggable, RawDraggable), - folder: animatedEntry(RawPythinkerFolderOpen), + folder: entry(PythinkerFolderOpen, RawPythinkerFolderOpen), 'folder-closed': entry(PythinkerFolder, RawPythinkerFolder), 'folder-plus': entry(RiFolderAddLine, RawFolderAddLine), 'folder-solid': entry(RiFolderFill, RawFolderFill), diff --git a/apps/pythinker-web/test/event-reducer.test.ts b/apps/pythinker-web/test/event-reducer.test.ts index aaf9576e1..123380752 100644 --- a/apps/pythinker-web/test/event-reducer.test.ts +++ b/apps/pythinker-web/test/event-reducer.test.ts @@ -1,5 +1,9 @@ import { describe, expect, it } from 'vitest'; -import { createInitialState, reduceAppEvent } from '../src/api/daemon/eventReducer'; +import { + createInitialState, + patchAssistantDeltaInPlace, + reduceAppEvent, +} from '../src/api/daemon/eventReducer'; import type { AppMessage, AppSession, AppTask } from '../src/api/types'; import { i18n } from '../src/i18n'; @@ -705,6 +709,34 @@ describe('reduceAppEvent sessions reference stability', () => { }); }); +describe('assistant delta reference stability', () => { + it('patches only the target message slot', () => { + const user = makeMessage('s1', '2026-01-01T00:00:00.000Z'); + const assistant: AppMessage = { + id: 'msg_a', + sessionId: 's1', + role: 'assistant', + content: [{ type: 'text', text: 'hel' }], + createdAt: '2026-01-01T00:00:01.000Z', + }; + const messages = [user, assistant]; + + expect( + patchAssistantDeltaInPlace(messages, { + type: 'assistantDelta', + sessionId: 's1', + messageId: 'msg_a', + contentIndex: 0, + delta: { text: 'lo' }, + }), + ).toBe(true); + + expect(messages[0]).toBe(user); + expect(messages[1]).not.toBe(assistant); + expect(messages[1]?.content).toEqual([{ type: 'text', text: 'hello' }]); + }); +}); + describe('reduceAppEvent messageCreated cron origin', () => { it('appends a cron-origin user message instead of reconciling it into an optimistic echo', () => { const sid = 's-cron'; diff --git a/apps/pythinker-web/test/http-cancellation.test.ts b/apps/pythinker-web/test/http-cancellation.test.ts new file mode 100644 index 000000000..7f7c62938 --- /dev/null +++ b/apps/pythinker-web/test/http-cancellation.test.ts @@ -0,0 +1,40 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { DaemonHttpClient } from '../src/api/daemon/http'; + +describe('DaemonHttpClient request cancellation', () => { + afterEach(() => { + vi.unstubAllGlobals(); + }); + + it('combines caller cancellation with the request timeout signal', async () => { + let requestSignal: AbortSignal | undefined; + vi.stubGlobal( + 'fetch', + vi.fn((_url: string, init?: RequestInit) => { + requestSignal = init?.signal ?? undefined; + return new Promise((_resolve, reject) => { + requestSignal?.addEventListener( + 'abort', + () => reject(new DOMException('Aborted', 'AbortError')), + { once: true }, + ); + }); + }), + ); + const controller = new AbortController(); + const client = new DaemonHttpClient('http://127.0.0.1:58627'); + const request = client.get('/test', undefined, { signal: controller.signal }); + const rejection = expect(request).rejects.toMatchObject({ + name: 'DaemonNetworkError', + cause: expect.objectContaining({ name: 'AbortError' }), + }); + + await vi.waitFor(() => { + expect(requestSignal).toBeDefined(); + }); + controller.abort(); + + await rejection; + expect(requestSignal?.aborted).toBe(true); + }); +}); diff --git a/apps/pythinker-web/test/task-poller.test.ts b/apps/pythinker-web/test/task-poller.test.ts index 67dbaa549..dcff8793b 100644 --- a/apps/pythinker-web/test/task-poller.test.ts +++ b/apps/pythinker-web/test/task-poller.test.ts @@ -5,8 +5,8 @@ // Wiring: the composable is real; daemon requests are stubbed. // Run: pnpm --filter @pymodel/pythinker-web exec vitest run test/task-poller.test.ts -import { computed } from 'vue'; -import { beforeEach, describe, expect, it, vi } from 'vitest'; +import { computed, nextTick, reactive } from 'vue'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import type { AppTask } from '../src/api/types'; import { createInitialState } from '../src/api/daemon/eventReducer'; import { useTaskPoller } from '../src/composables/client/useTaskPoller'; @@ -22,11 +22,11 @@ vi.mock('../src/api', () => ({ })); function createState(tasks: AppTask[]): ExtendedState { - return { + return reactive({ ...createInitialState(), activeSessionId: 'sess_1', tasksBySession: { sess_1: tasks }, - } as unknown as ExtendedState; + }) as unknown as ExtendedState; } function subagent(id: string, overrides: Partial = {}): AppTask { @@ -67,21 +67,24 @@ describe('useTaskPoller terminal-output backfill', () => { vi.clearAllMocks(); }); + afterEach(() => { + vi.useRealTimers(); + }); + it('attaches output fetched under the REST id to the folded agent-id row', async () => { const state = createState([liveRow()]); - apiMock.listTasks.mockResolvedValue([restRow()]); - apiMock.getTask.mockResolvedValue( + apiMock.listTasks.mockResolvedValue([ restRow({ outputPreview: 'final result', outputBytes: 2048 }), - ); + ]); const poller = useTaskPoller(state, computed(() => [])); await poller.loadTasksForSession('sess_1'); - expect(apiMock.getTask).toHaveBeenCalledWith( + expect(apiMock.listTasks).toHaveBeenCalledWith( 'sess_1', - 'task-9', expect.objectContaining({ withOutput: true }), ); + expect(apiMock.getTask).not.toHaveBeenCalled(); const rows = state.tasksBySession['sess_1'] ?? []; expect(rows.map((t) => t.id)).toEqual(['agent-1']); expect(rows[0]?.status).toBe('completed'); @@ -89,33 +92,133 @@ describe('useTaskPoller terminal-output backfill', () => { expect(rows[0]?.outputBytes).toBe(2048); }); - it('fetches terminal output only once for a task', async () => { + it('loads every terminal output through one bounded list request', async () => { const state = createState([liveRow()]); - apiMock.listTasks.mockResolvedValue([restRow()]); - apiMock.getTask.mockResolvedValue( + apiMock.listTasks.mockResolvedValue([ restRow({ outputPreview: 'final result', outputBytes: 2048 }), - ); + restRow({ id: 'task-10', outputPreview: 'second result', outputBytes: 1024 }), + ]); const poller = useTaskPoller(state, computed(() => [])); await poller.loadTasksForSession('sess_1'); - await poller.loadTasksForSession('sess_1'); - expect(apiMock.getTask).toHaveBeenCalledTimes(1); + expect(apiMock.listTasks).toHaveBeenCalledTimes(1); + expect(apiMock.getTask).not.toHaveBeenCalled(); }); - it('retries the backfill on a later load after a transient getTask failure', async () => { + it('retries the load after a transient list failure', async () => { const state = createState([liveRow()]); - apiMock.listTasks.mockResolvedValue([restRow()]); - apiMock.getTask + apiMock.listTasks .mockRejectedValueOnce(new Error('network blip')) - .mockResolvedValue(restRow({ outputPreview: 'final result', outputBytes: 2048 })); + .mockResolvedValue([restRow({ outputPreview: 'final result', outputBytes: 2048 })]); const poller = useTaskPoller(state, computed(() => [])); await poller.loadTasksForSession('sess_1'); expect(state.tasksBySession['sess_1']?.[0]?.outputPreview).toBeUndefined(); await poller.loadTasksForSession('sess_1'); - expect(apiMock.getTask).toHaveBeenCalledTimes(2); + expect(apiMock.listTasks).toHaveBeenCalledTimes(2); expect(state.tasksBySession['sess_1']?.[0]?.outputPreview).toBe('final result'); }); + + it('uses one request for a polling cycle regardless of running-task count', async () => { + vi.useFakeTimers(); + const running = Array.from({ length: 22 }, (_, index) => + subagent(`task-${index}`, { outputPreview: `tail ${index}` }), + ); + const state = createState(running); + apiMock.listTasks.mockResolvedValue(running.map((task) => ({ ...task }))); + + useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + await nextTick(); + await Promise.resolve(); + + expect(apiMock.listTasks).toHaveBeenCalledTimes(1); + expect(apiMock.getTask).not.toHaveBeenCalled(); + }); + + it('does not overlap a slow poll with later timer ticks', async () => { + vi.useFakeTimers(); + const running = [subagent('task-1')]; + const state = createState(running); + let resolvePoll!: (tasks: AppTask[]) => void; + apiMock.listTasks.mockReturnValue( + new Promise((resolve) => { + resolvePoll = resolve; + }), + ); + + useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + await nextTick(); + await vi.advanceTimersByTimeAsync(5_000); + + expect(apiMock.listTasks).toHaveBeenCalledTimes(1); + resolvePoll(running); + await Promise.resolve(); + }); + + it('aborts the active poll when the session changes', async () => { + vi.useFakeTimers(); + const state = createState([subagent('task-1')]); + let requestSignal: AbortSignal | undefined; + apiMock.listTasks.mockImplementation( + (_sessionId: string, input?: { signal?: AbortSignal }) => { + requestSignal = input?.signal; + return new Promise(() => {}); + }, + ); + + useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + await nextTick(); + state.activeSessionId = 'sess_2'; + await nextTick(); + + expect(requestSignal).toBeDefined(); + expect(requestSignal?.aborted).toBe(true); + }); + + it('does not let a stale session load cancel the active session load', async () => { + const state = createState([]); + state.tasksBySession['sess_2'] = []; + let resolveActive!: (tasks: AppTask[]) => void; + let activeSignal: AbortSignal | undefined; + apiMock.listTasks.mockImplementation( + (sessionId: string, input?: { signal?: AbortSignal }) => { + if (sessionId === 'sess_2') { + activeSignal = input?.signal; + return new Promise((resolve) => { + resolveActive = resolve; + }); + } + return Promise.resolve([]); + }, + ); + + const poller = useTaskPoller(state, computed(() => [])); + state.activeSessionId = 'sess_2'; + await nextTick(); + const activeLoad = poller.loadTasksForSession('sess_2'); + await poller.loadTasksForSession('sess_1'); + + expect(apiMock.listTasks).toHaveBeenCalledTimes(1); + expect(activeSignal?.aborted).toBe(false); + + resolveActive([subagent('task-2', { sessionId: 'sess_2', status: 'completed' })]); + await activeLoad; + expect(state.tasksBySession['sess_2']?.map((task) => task.id)).toEqual(['task-2']); + }); + + it('keeps the task-array reference when a poll returns equal data', async () => { + vi.useFakeTimers(); + const running = [subagent('task-1', { outputPreview: 'same output' })]; + const state = createState(running); + const initial = state.tasksBySession['sess_1']; + apiMock.listTasks.mockResolvedValue(running.map((task) => ({ ...task }))); + + useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + await nextTick(); + for (let index = 0; index < 5; index += 1) await Promise.resolve(); + + expect(state.tasksBySession['sess_1']).toBe(initial); + }); }); diff --git a/apps/pythinker-web/test/thinking-indicator.test.ts b/apps/pythinker-web/test/thinking-indicator.test.ts index ac37bba47..86798510d 100644 --- a/apps/pythinker-web/test/thinking-indicator.test.ts +++ b/apps/pythinker-web/test/thinking-indicator.test.ts @@ -17,7 +17,7 @@ describe('thinking indicator', () => { expect(wrapper.attributes('role')).toBe('status'); }); - it('uses the same mark in the running page title', async () => { + it('keeps one stable mark in the running page title without a timer', async () => { vi.useFakeTimers(); const running = ref(false); const showAuthGate = ref(false); @@ -37,9 +37,10 @@ describe('thinking indicator', () => { await nextTick(); expect(document.title).toBe('⣷ Pythinker Code Web'); + expect(vi.getTimerCount()).toBe(0); vi.advanceTimersByTime(BRAILLE_SPINNER_FRAME_MS); await nextTick(); - expect(document.title).toBe('⣯ Pythinker Code Web'); + expect(document.title).toBe('⣷ Pythinker Code Web'); wrapper.unmount(); vi.useRealTimers(); }); diff --git a/apps/pythinker-web/test/turn-logic.test.ts b/apps/pythinker-web/test/turn-logic.test.ts index 27833566c..6837c51a2 100644 --- a/apps/pythinker-web/test/turn-logic.test.ts +++ b/apps/pythinker-web/test/turn-logic.test.ts @@ -1,7 +1,10 @@ import { describe, expect, it } from 'vitest'; import type { AppMessage, AppMessageContent } from '../src/api/types'; import { latestTodos } from '../src/composables/latestTodos'; -import { messagesToTurns } from '../src/composables/messagesToTurns'; +import { + createMessagesToTurnsProjector, + messagesToTurns, +} from '../src/composables/messagesToTurns'; import { isPlayableMediaUrl } from '../src/composables/useFilePreview'; import { parseTaskNotifications, @@ -1013,6 +1016,84 @@ describe('messagesToTurns cron', () => { }); }); +describe('createMessagesToTurnsProjector', () => { + it('rebuilds only the live assistant turn for an in-place tail update', () => { + let historicalContentReads = 0; + const historical = message('a1', 'assistant', [{ type: 'text', text: 'first answer' }]); + const historicalContent = historical.content; + Object.defineProperty(historical, 'content', { + configurable: true, + get: () => { + historicalContentReads += 1; + return historicalContent; + }, + }); + const messages = [ + message('u1', 'user', [{ type: 'text', text: 'first question' }]), + historical, + message('u2', 'user', [{ type: 'text', text: 'second question' }]), + message('a2', 'assistant', [{ type: 'text', text: 'live' }]), + ]; + const project = createMessagesToTurnsProjector(); + const first = project(messages, []); + historicalContentReads = 0; + + messages[3] = message('a2', 'assistant', [{ type: 'text', text: 'live update' }]); + const second = project(messages, []); + + expect(second.map((turn) => turn.text)).toEqual([ + 'first question', + 'first answer', + 'second question', + 'live update', + ]); + expect(second.slice(0, -1)).toEqual(first.slice(0, -1)); + for (let index = 0; index < first.length - 1; index += 1) { + expect(second[index]).toBe(first[index]); + } + expect(second.at(-1)).not.toBe(first.at(-1)); + expect(historicalContentReads).toBe(0); + }); + + it('falls back safely for prepend and non-tail replacement', () => { + const project = createMessagesToTurnsProjector(); + const initialMessages = [ + message('u1', 'user', [{ type: 'text', text: 'one' }]), + message('a1', 'assistant', [{ type: 'text', text: 'answer one' }]), + message('u2', 'user', [{ type: 'text', text: 'two' }]), + message('a2', 'assistant', [{ type: 'text', text: 'answer two' }]), + ]; + project(initialMessages, []); + + const prepended = [ + message('u0', 'user', [{ type: 'text', text: 'zero' }]), + message('a0', 'assistant', [{ type: 'text', text: 'answer zero' }]), + ...initialMessages, + ]; + expect(project(prepended, []).map((turn) => turn.text)).toEqual([ + 'zero', + 'answer zero', + 'one', + 'answer one', + 'two', + 'answer two', + ]); + + const replaced = prepended.with( + 1, + message('a0', 'assistant', [{ type: 'text', text: 'corrected zero' }]), + ); + expect(project(replaced, []).map((turn) => turn.text)).toEqual([ + 'zero', + 'corrected zero', + 'one', + 'answer one', + 'two', + 'answer two', + ]); + }); +}); + describe('isPlayableMediaUrl', () => { // Gates the file-preview media source: a playable url feeds a native // src; a non-playable one falls through to the no-preview card. diff --git a/packages/agent-gateway/src/protocol/rest-task.ts b/packages/agent-gateway/src/protocol/rest-task.ts index 459475383..48c6dc0f2 100644 --- a/packages/agent-gateway/src/protocol/rest-task.ts +++ b/packages/agent-gateway/src/protocol/rest-task.ts @@ -2,8 +2,16 @@ import { z } from 'zod'; import { taskSchema, taskStatusSchema } from './task'; +const queryBooleanSchema = z.union([ + z.boolean(), + z.enum(['true', 'false']).transform((value) => value === 'true'), +]); + export const listTasksQuerySchema = z.object({ status: taskStatusSchema.optional(), + with_output: queryBooleanSchema.optional(), + output_bytes: z.coerce.number().int().nonnegative().max(32 * 1024).optional(), + output_status: z.enum(['running', 'all']).optional(), }); export type ListTasksQuery = z.infer; @@ -13,7 +21,7 @@ export const listTasksResponseSchema = z.object({ export type ListTasksResponse = z.infer; export const getTaskQuerySchema = z.object({ - with_output: z.coerce.boolean().optional(), + with_output: queryBooleanSchema.optional(), output_bytes: z.coerce.number().int().nonnegative().optional(), }); export type GetTaskQuery = z.infer; diff --git a/packages/agent-gateway/src/routes/tasks.ts b/packages/agent-gateway/src/routes/tasks.ts index ca5e8045a..2b984c261 100644 --- a/packages/agent-gateway/src/routes/tasks.ts +++ b/packages/agent-gateway/src/routes/tasks.ts @@ -14,6 +14,7 @@ import { getTaskResponseSchema, listTasksQuerySchema, listTasksResponseSchema, + type ListTasksQuery, } from '../protocol/rest-task'; import type { SubagentRoutingWire, Task, TaskKind, TaskStatus } from '../protocol/task'; import { z } from 'zod'; @@ -79,12 +80,25 @@ export function registerTasksRoutes(app: TasksRouteHost, core: Scope): void { return; } - const all = (resolved.tasks?.list(false) ?? []).map((info) => - toWireTask(session_id, info), + const query = req.query as ListTasksQuery; + const infos = (resolved.tasks?.list(false) ?? []).filter( + (info) => query.status === undefined || mapStatus(info.status) === query.status, + ); + const items = await Promise.all( + infos.map(async (info) => { + const output = + query.with_output === true && + resolved.tasks !== undefined && + (query.output_status !== 'running' || mapStatus(info.status) === 'running') + ? await readTaskOutput( + resolved.tasks, + info.taskId, + query.output_bytes ?? DEFAULT_TASK_OUTPUT_PREVIEW_BYTES, + ) + : undefined; + return toWireTask(session_id, info, output); + }), ); - const query = req.query as { status?: TaskStatus }; - const items = - query.status !== undefined ? all.filter((t) => t.status === query.status) : all; reply.send(okEnvelope({ items }, req.id)); }, ); @@ -120,17 +134,14 @@ export function registerTasksRoutes(app: TasksRouteHost, core: Scope): void { } const query = req.query as { with_output?: boolean; output_bytes?: number }; - let output: { preview: string; bytes: number } | undefined; - if (query.with_output === true && resolved.tasks !== undefined) { - const tailBytes = query.output_bytes ?? DEFAULT_TASK_OUTPUT_PREVIEW_BYTES; - try { - const preview = await resolved.tasks.readOutput(task_id, tailBytes); - if (preview.length > 0) { - output = { preview, bytes: Buffer.byteLength(preview, 'utf-8') }; - } - } catch { - } - } + const output = + query.with_output === true && resolved.tasks !== undefined + ? await readTaskOutput( + resolved.tasks, + task_id, + query.output_bytes ?? DEFAULT_TASK_OUTPUT_PREVIEW_BYTES, + ) + : undefined; reply.send(okEnvelope(toWireTask(session_id, found, output), req.id)); }, @@ -270,6 +281,20 @@ function isTerminalStatus(status: TaskStatus): boolean { return TERMINAL_WIRE_STATUSES.has(status); } +async function readTaskOutput( + tasks: IAgentTaskService, + taskId: string, + tailBytes: number, +): Promise<{ preview: string; bytes: number } | undefined> { + try { + const output = await tasks.getOutputSnapshot(taskId, tailBytes); + if (output.preview.length === 0) return undefined; + return { preview: output.preview, bytes: output.previewBytes }; + } catch { + return undefined; + } +} + function toWireTask( sessionId: string, info: AgentTaskInfo, diff --git a/packages/agent-gateway/test/tasks.test.ts b/packages/agent-gateway/test/tasks.test.ts index 1fde6b3ea..0d97d7e68 100644 --- a/packages/agent-gateway/test/tasks.test.ts +++ b/packages/agent-gateway/test/tasks.test.ts @@ -336,6 +336,84 @@ describe('server-v2 /api/v1/sessions/{sid}/tasks', () => { expect(plain.body.data.output_bytes).toBeUndefined(); }); + it('includes bounded output for every task in one list response', async () => { + const id = await createSession(); + const tasks = await mainAgentTasks(id); + const firstId = tasks.registerTask(fakeTask('process', 'first output')); + const secondId = tasks.registerTask(fakeTask('process', 'second output')); + await flush(); + + const listed = await getJson( + `/api/v1/sessions/${id}/tasks?with_output=true&output_bytes=6`, + ); + expect(listed.body.code).toBe(0); + const byId = new Map(listed.body.data.items.map((task) => [task.id, task])); + expect(byId.get(firstId)?.output_preview).toBe('output'); + expect(byId.get(firstId)?.output_bytes).toBe(6); + expect(byId.get(secondId)?.output_preview).toBe('output'); + expect(byId.get(secondId)?.output_bytes).toBe(6); + }); + + it('does not include output when with_output is false', async () => { + const id = await createSession(); + const tasks = await mainAgentTasks(id); + const taskId = tasks.registerTask(fakeTask('process', 'private output')); + await flush(); + + const listed = await getJson( + `/api/v1/sessions/${id}/tasks?with_output=false`, + ); + expect(listed.body.code).toBe(0); + expect(listed.body.data.items[0]?.output_preview).toBeUndefined(); + + const task = await getJson( + `/api/v1/sessions/${id}/tasks/${taskId}?with_output=false`, + ); + expect(task.body.code).toBe(0); + expect(task.body.data.output_preview).toBeUndefined(); + }); + + it('limits list output by UTF-8 bytes', async () => { + const id = await createSession(); + const tasks = await mainAgentTasks(id); + const taskId = tasks.registerTask(fakeTask('process', '界'.repeat(10))); + await flush(); + + const listed = await getJson( + `/api/v1/sessions/${id}/tasks?with_output=true&output_bytes=6`, + ); + expect(listed.body.code).toBe(0); + const task = listed.body.data.items.find((item) => item.id === taskId); + expect(task?.output_preview).toBe('界界'); + expect(task?.output_bytes).toBe(6); + }); + + it('limits periodic list output to running tasks', async () => { + const id = await createSession(); + const tasks = await mainAgentTasks(id); + const runningId = tasks.registerTask(fakeTask('process', 'running output')); + const terminalId = tasks.registerTask(fakeTask('process', 'terminal output')); + await tasks.stop(terminalId); + await flush(); + + const listed = await getJson( + `/api/v1/sessions/${id}/tasks?with_output=true&output_bytes=32&output_status=running`, + ); + expect(listed.body.code).toBe(0); + const byId = new Map(listed.body.data.items.map((task) => [task.id, task])); + expect(byId.get(runningId)?.output_preview).toBe('running output'); + expect(byId.get(terminalId)?.output_preview).toBeUndefined(); + }); + + it('rejects list output limits above 32 KiB', async () => { + const id = await createSession(); + const response = await getJson( + `/api/v1/sessions/${id}/tasks?with_output=true&output_bytes=${32 * 1024 + 1}`, + ); + + expect(response.body.code).toBe(40001); + }); + it('cancels a running task and reports 40904 on a second cancel', async () => { const id = await createSession(); const tasks = await mainAgentTasks(id); From 05b548d878cb51c62797554383b7c70858a4bdaa Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 28 Aug 2026 22:20:52 -0400 Subject: [PATCH 2/4] fix(web): serialize task refresh requests --- .../dist-web/.web-bundle-manifest.json | 2 +- ...-D4cpL5UZ.js => CodeBlockNode-D5JTfsXt.js} | 4 +- ...Jc-Ocy.js => DesignSystemView-DvGbj-YG.js} | 2 +- ...ooltip-aicK0c3c.js => Tooltip-BMItlE4H.js} | 2 +- ...uI.js => abnfDiagram-VCTEODGH--reuoLL3.js} | 2 +- .../{arc-B8osaoVd.js => arc-CPa230_j.js} | 2 +- ... architectureDiagram-5GKGNRK7-inn9CBk7.js} | 2 +- ...b.js => blockDiagram-NRAW4CY4-SpTDtKeh.js} | 2 +- ...3xtH.js => c4Diagram-UCG6FXSJ-QbPQAL-O.js} | 2 +- .../dist-web/assets/channel-BpqL3HJE.js | 1 + .../dist-web/assets/channel-DZ2XEbLN.js | 1 - ...CPFb-YMA.js => chunk-2Q5K7J3B-ZQItsBh7.js} | 2 +- ...BX7DTcSO.js => chunk-5VM5RSS4-Ny2gwX65.js} | 2 +- ...CGsciVEq.js => chunk-F27PBJKO-pJCmv4XH.js} | 2 +- ...CIn6rVI9.js => chunk-G27WJ6UU-CPa57YXh.js} | 2 +- ...D9ICAwD_.js => chunk-JWPE2WC7-C_cClkrQ.js} | 2 +- ...Bvdjn-Qn.js => chunk-LCL6LL3I-JwRtGJJ3.js} | 2 +- ...BpzExJjb.js => chunk-POPQ4Y6H-BFcN0waq.js} | 2 +- ...D3M7Gbkt.js => chunk-SVP7TREG-CWyh6gIW.js} | 2 +- ...DaNzL58C.js => chunk-XXDRQBXY-HOEikrp0.js} | 2 +- .../assets/classDiagram-DTDB5LWJ-BKsHmBx6.js | 1 + .../assets/classDiagram-DTDB5LWJ-D8QxhnwF.js | 1 - .../classDiagram-v2-JRS7N3AN-BKsHmBx6.js | 1 + .../classDiagram-v2-JRS7N3AN-D8QxhnwF.js | 1 - ...L.js => cose-bilkent-JH36ORCC-CaAJcdLC.js} | 2 +- ...ssMode-BYOYZWAb.js => cssMode-CyvYPRSF.js} | 2 +- ...ED4Rd3.js => cynefin-OW5HDTMX-D3VomulX.js} | 2 +- ...js => cynefinDiagram-5FMLGOSQ-D3Bm7jhm.js} | 2 +- ...DNRBAAmc.js => dagre-3AP2YEHR-CVrHKexT.js} | 2 +- ...PLVM0c.js => diagram-S7CK7UJ4-XBWXrjhn.js} | 2 +- ...I3S6m6.js => diagram-UQ7AKVKN-VTf2WASr.js} | 2 +- ...s0EaEU.js => diagram-VSXAHHWV-ddvmuFzh.js} | 2 +- ...JN2czJ.js => diagram-VX7I27RA-DI4JODbF.js} | 2 +- ...TJZ40O.js => diagram-Z3DM3KII-CBgIPUY9.js} | 2 +- ...Mu.js => ebnfDiagram-PWID7BFC-DFLgXYEm.js} | 2 +- ...in-yCrGDkyO.js => editor.main-28ipUIqH.js} | 6 +- ...lHwz.js => erDiagram-SSCWMZ5O-C3PUpvmO.js} | 2 +- ...fU.js => flowDiagram-A5DVABFB-SicbxN4x.js} | 2 +- ...r2-CG8OSn8H.js => freemarker2-CEwDtIx2.js} | 2 +- ...p.js => ganttDiagram-EL5Y4UJY-B_T2-DEq.js} | 2 +- ...s => gitGraphDiagram-WWUBYQGX-Cd9HyqpC.js} | 2 +- ...ars-vt5-G9kY.js => handlebars-CsegWH10.js} | 2 +- .../{html-BwCzbm6J.js => html-CRf6vG9C.js} | 2 +- ...lMode-BtW7hgTd.js => htmlMode-8aWXPjFP.js} | 2 +- .../{index-BZ9wqq8Z.js => index-Ct7MGS7v.js} | 356 +++++++++--------- .../{index-BM4AkXWz.js => index-DUbYfe-Q.js} | 4 +- .../{index-0QXixtol.js => index-D_x7p5rd.js} | 2 +- .../{index-C_5a8vkb.js => index-RD9RRwLM.js} | 2 +- ...ndex10-DRKt26_3.js => index10-C3bfH63E.js} | 2 +- ...ndex11-BtnGHbJw.js => index11-DJqeKSQb.js} | 2 +- ...{index5-DRYrcfDq.js => index5-BBtmbjGn.js} | 2 +- ...{index6-rJ6wldFa.js => index6-BYfcWmNm.js} | 2 +- ...{index7-BEZwnfMu.js => index7-BEEN1sEQ.js} | 2 +- ...{index8-Cir0nNuz.js => index8-C1u-nZQS.js} | 2 +- ...5u.js => infoDiagram-RXCK75RN-CCm7qy3M.js} | 2 +- ...s => ishikawaDiagram-5VMMS53U-n_fK3Ljm.js} | 2 +- ...ipt-C1Bl1QAn.js => javascript-BwGz2yH9.js} | 2 +- ...js => journeyDiagram-EYS64GPL-e0ZGdUvr.js} | 2 +- ...nMode-B4lkE7Oy.js => jsonMode-BXAq7Usw.js} | 2 +- ...=> kanban-definition-3QL26DDD-C__sss0o.js} | 2 +- ...{layout-CRsCkvth.js => layout-TrTUIUgx.js} | 2 +- ...{linear-Be-oTS5b.js => linear-Dzo12Me2.js} | 2 +- ...{liquid-OhilcA0U.js => liquid-DaGOgzgc.js} | 2 +- ...Jjp.js => lspLanguageFeatures-CjNYtcpt.js} | 2 +- .../{mdx-BNW26XnD.js => mdx-DmjCAV2z.js} | 2 +- ...e-BusHtpbx.js => mermaid.core-CwGP16Dm.js} | 10 +- ...> mindmap-definition-FBJOCRG2-CZjuUsix.js} | 2 +- ...oto.js => pegDiagram-XKGWAZYB-WlReJ65k.js} | 2 +- ...Kw9.js => pieDiagram-E7YTZNPT-DR6Erb3T.js} | 2 +- ...{python-BeBGma8p.js => python-In1HHoJC.js} | 2 +- ...s => quadrantDiagram-AXDQQJYC-BqYig9Zo.js} | 2 +- ...s => railroadDiagram-O6MQD6OU-Bm_RO43s.js} | 2 +- .../{razor-L05JTUrE.js => razor-VEmNVnW2.js} | 2 +- ...> requirementDiagram-EFPCY7ZU-CpeOGSGj.js} | 2 +- ....js => sankeyDiagram-P5KCCOFB-CgeqPevU.js} | 2 +- ...s => sequenceDiagram-WJ2MYXX4-Bztsclzi.js} | 2 +- ...8-.js => sizeCapture-X5ZJPWSS-CqWuzQOK.js} | 2 +- ...D.js => stateDiagram-HBIQ2CUA-BqDrFizO.js} | 2 +- .../stateDiagram-v2-4QOOHH4V-Acd38TZq.js | 1 + .../stateDiagram-v2-4QOOHH4V-BoO7sp2R.js | 1 - ...EV8W.js => swimlanes-XN3QIQJK-WLKrEsDC.js} | 2 +- .../swimlanesDiagram-VK2B7HYN-BUZY9pzv.js | 8 + .../swimlanesDiagram-VK2B7HYN-DsX8zbP8.js | 8 - ... timeline-definition-24CTP7MA-CC8ieJMY.js} | 2 +- ...{tsMode-BZYSYhKr.js => tsMode-CYFtUCqN.js} | 2 +- ...ipt-DeFWR0Bj.js => typescript-vzwxO8Um.js} | 2 +- ...H9.js => vennDiagram-4TSXK5OY-BY_8Roc7.js} | 2 +- ...js => vue.runtime.esm-bundler-C60WDxyU.js} | 2 +- ...js => wardleyDiagram-VM6X3IG4-BiZ0eogf.js} | 2 +- .../{xml-BDPhTprf.js => xml-CV6_LXH0.js} | 2 +- ...js => xychartDiagram-S5SC5T6Z-CxT0FOrZ.js} | 2 +- .../{yaml-B6mJwErH.js => yaml-0Pg85F2J.js} | 2 +- apps/pythinker-code/dist-web/index.html | 2 +- apps/pythinker-web/src/api/daemon/http.ts | 17 +- .../src/composables/client/useTaskPoller.ts | 78 ++-- .../test/http-cancellation.test.ts | 44 ++- apps/pythinker-web/test/task-poller.test.ts | 74 +++- packages/agent-gateway/test/tasks.test.ts | 8 +- 98 files changed, 471 insertions(+), 310 deletions(-) rename apps/pythinker-code/dist-web/assets/{CodeBlockNode-D4cpL5UZ.js => CodeBlockNode-D5JTfsXt.js} (99%) rename apps/pythinker-code/dist-web/assets/{DesignSystemView-DhJc-Ocy.js => DesignSystemView-DvGbj-YG.js} (99%) rename apps/pythinker-code/dist-web/assets/{Tooltip-aicK0c3c.js => Tooltip-BMItlE4H.js} (98%) rename apps/pythinker-code/dist-web/assets/{abnfDiagram-VCTEODGH-DEfrkFuI.js => abnfDiagram-VCTEODGH--reuoLL3.js} (86%) rename apps/pythinker-code/dist-web/assets/{arc-B8osaoVd.js => arc-CPa230_j.js} (98%) rename apps/pythinker-code/dist-web/assets/{architectureDiagram-5GKGNRK7-BvF0UgoH.js => architectureDiagram-5GKGNRK7-inn9CBk7.js} (99%) rename apps/pythinker-code/dist-web/assets/{blockDiagram-NRAW4CY4-BNGA-QWb.js => blockDiagram-NRAW4CY4-SpTDtKeh.js} (99%) rename apps/pythinker-code/dist-web/assets/{c4Diagram-UCG6FXSJ-BZuC3xtH.js => c4Diagram-UCG6FXSJ-QbPQAL-O.js} (99%) create mode 100644 apps/pythinker-code/dist-web/assets/channel-BpqL3HJE.js delete mode 100644 apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js rename apps/pythinker-code/dist-web/assets/{chunk-2Q5K7J3B-CPFb-YMA.js => chunk-2Q5K7J3B-ZQItsBh7.js} (67%) rename apps/pythinker-code/dist-web/assets/{chunk-5VM5RSS4-BX7DTcSO.js => chunk-5VM5RSS4-Ny2gwX65.js} (83%) rename apps/pythinker-code/dist-web/assets/{chunk-F27PBJKO-CGsciVEq.js => chunk-F27PBJKO-pJCmv4XH.js} (96%) rename apps/pythinker-code/dist-web/assets/{chunk-G27WJ6UU-CIn6rVI9.js => chunk-G27WJ6UU-CPa57YXh.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-JWPE2WC7-D9ICAwD_.js => chunk-JWPE2WC7-C_cClkrQ.js} (71%) rename apps/pythinker-code/dist-web/assets/{chunk-LCL6LL3I-Bvdjn-Qn.js => chunk-LCL6LL3I-JwRtGJJ3.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-POPQ4Y6H-BpzExJjb.js => chunk-POPQ4Y6H-BFcN0waq.js} (87%) rename apps/pythinker-code/dist-web/assets/{chunk-SVP7TREG-D3M7Gbkt.js => chunk-SVP7TREG-CWyh6gIW.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-XXDRQBXY-DaNzL58C.js => chunk-XXDRQBXY-HOEikrp0.js} (72%) create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-BKsHmBx6.js delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-BKsHmBx6.js delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js rename apps/pythinker-code/dist-web/assets/{cose-bilkent-JH36ORCC-Du_KHUbL.js => cose-bilkent-JH36ORCC-CaAJcdLC.js} (99%) rename apps/pythinker-code/dist-web/assets/{cssMode-BYOYZWAb.js => cssMode-CyvYPRSF.js} (93%) rename apps/pythinker-code/dist-web/assets/{cynefin-OW5HDTMX-BlED4Rd3.js => cynefin-OW5HDTMX-D3VomulX.js} (99%) rename apps/pythinker-code/dist-web/assets/{cynefinDiagram-5FMLGOSQ-BfZ2WMeD.js => cynefinDiagram-5FMLGOSQ-D3Bm7jhm.js} (98%) rename apps/pythinker-code/dist-web/assets/{dagre-3AP2YEHR-DNRBAAmc.js => dagre-3AP2YEHR-CVrHKexT.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-S7CK7UJ4-95PLVM0c.js => diagram-S7CK7UJ4-XBWXrjhn.js} (96%) rename apps/pythinker-code/dist-web/assets/{diagram-UQ7AKVKN-DqI3S6m6.js => diagram-UQ7AKVKN-VTf2WASr.js} (95%) rename apps/pythinker-code/dist-web/assets/{diagram-VSXAHHWV-Cps0EaEU.js => diagram-VSXAHHWV-ddvmuFzh.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-VX7I27RA-TJJN2czJ.js => diagram-VX7I27RA-DI4JODbF.js} (97%) rename apps/pythinker-code/dist-web/assets/{diagram-Z3DM3KII-DnTJZ40O.js => diagram-Z3DM3KII-CBgIPUY9.js} (95%) rename apps/pythinker-code/dist-web/assets/{ebnfDiagram-PWID7BFC-CG3VCHMu.js => ebnfDiagram-PWID7BFC-DFLgXYEm.js} (87%) rename apps/pythinker-code/dist-web/assets/{editor.main-yCrGDkyO.js => editor.main-28ipUIqH.js} (99%) rename apps/pythinker-code/dist-web/assets/{erDiagram-SSCWMZ5O-DzkblHwz.js => erDiagram-SSCWMZ5O-C3PUpvmO.js} (99%) rename apps/pythinker-code/dist-web/assets/{flowDiagram-A5DVABFB-D6_Z_lfU.js => flowDiagram-A5DVABFB-SicbxN4x.js} (99%) rename apps/pythinker-code/dist-web/assets/{freemarker2-CG8OSn8H.js => freemarker2-CEwDtIx2.js} (99%) rename apps/pythinker-code/dist-web/assets/{ganttDiagram-EL5Y4UJY-DcpRnqwp.js => ganttDiagram-EL5Y4UJY-B_T2-DEq.js} (99%) rename apps/pythinker-code/dist-web/assets/{gitGraphDiagram-WWUBYQGX-t2_RmnTi.js => gitGraphDiagram-WWUBYQGX-Cd9HyqpC.js} (99%) rename apps/pythinker-code/dist-web/assets/{handlebars-vt5-G9kY.js => handlebars-CsegWH10.js} (97%) rename apps/pythinker-code/dist-web/assets/{html-BwCzbm6J.js => html-CRf6vG9C.js} (97%) rename apps/pythinker-code/dist-web/assets/{htmlMode-BtW7hgTd.js => htmlMode-8aWXPjFP.js} (94%) rename apps/pythinker-code/dist-web/assets/{index-BZ9wqq8Z.js => index-Ct7MGS7v.js} (80%) rename apps/pythinker-code/dist-web/assets/{index-BM4AkXWz.js => index-DUbYfe-Q.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-0QXixtol.js => index-D_x7p5rd.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-C_5a8vkb.js => index-RD9RRwLM.js} (99%) rename apps/pythinker-code/dist-web/assets/{index10-DRKt26_3.js => index10-C3bfH63E.js} (99%) rename apps/pythinker-code/dist-web/assets/{index11-BtnGHbJw.js => index11-DJqeKSQb.js} (99%) rename apps/pythinker-code/dist-web/assets/{index5-DRYrcfDq.js => index5-BBtmbjGn.js} (95%) rename apps/pythinker-code/dist-web/assets/{index6-rJ6wldFa.js => index6-BYfcWmNm.js} (98%) rename apps/pythinker-code/dist-web/assets/{index7-BEZwnfMu.js => index7-BEEN1sEQ.js} (98%) rename apps/pythinker-code/dist-web/assets/{index8-Cir0nNuz.js => index8-C1u-nZQS.js} (99%) rename apps/pythinker-code/dist-web/assets/{infoDiagram-RXCK75RN-Cn4b9A5u.js => infoDiagram-RXCK75RN-CCm7qy3M.js} (68%) rename apps/pythinker-code/dist-web/assets/{ishikawaDiagram-5VMMS53U-CZhPeyom.js => ishikawaDiagram-5VMMS53U-n_fK3Ljm.js} (99%) rename apps/pythinker-code/dist-web/assets/{javascript-C1Bl1QAn.js => javascript-BwGz2yH9.js} (85%) rename apps/pythinker-code/dist-web/assets/{journeyDiagram-EYS64GPL-Bznj053h.js => journeyDiagram-EYS64GPL-e0ZGdUvr.js} (98%) rename apps/pythinker-code/dist-web/assets/{jsonMode-B4lkE7Oy.js => jsonMode-BXAq7Usw.js} (98%) rename apps/pythinker-code/dist-web/assets/{kanban-definition-3QL26DDD-gEE7iVwG.js => kanban-definition-3QL26DDD-C__sss0o.js} (99%) rename apps/pythinker-code/dist-web/assets/{layout-CRsCkvth.js => layout-TrTUIUgx.js} (99%) rename apps/pythinker-code/dist-web/assets/{linear-Be-oTS5b.js => linear-Dzo12Me2.js} (98%) rename apps/pythinker-code/dist-web/assets/{liquid-OhilcA0U.js => liquid-DaGOgzgc.js} (96%) rename apps/pythinker-code/dist-web/assets/{lspLanguageFeatures-Dzr62Jjp.js => lspLanguageFeatures-CjNYtcpt.js} (99%) rename apps/pythinker-code/dist-web/assets/{mdx-BNW26XnD.js => mdx-DmjCAV2z.js} (97%) rename apps/pythinker-code/dist-web/assets/{mermaid.core-BusHtpbx.js => mermaid.core-CwGP16Dm.js} (99%) rename apps/pythinker-code/dist-web/assets/{mindmap-definition-FBJOCRG2-OFTg7WuH.js => mindmap-definition-FBJOCRG2-CZjuUsix.js} (98%) rename apps/pythinker-code/dist-web/assets/{pegDiagram-XKGWAZYB-COpW3oto.js => pegDiagram-XKGWAZYB-WlReJ65k.js} (87%) rename apps/pythinker-code/dist-web/assets/{pieDiagram-E7YTZNPT-CSu4VKw9.js => pieDiagram-E7YTZNPT-DR6Erb3T.js} (94%) rename apps/pythinker-code/dist-web/assets/{python-BeBGma8p.js => python-In1HHoJC.js} (96%) rename apps/pythinker-code/dist-web/assets/{quadrantDiagram-AXDQQJYC-DwlY00_z.js => quadrantDiagram-AXDQQJYC-BqYig9Zo.js} (99%) rename apps/pythinker-code/dist-web/assets/{railroadDiagram-O6MQD6OU-E1VZdf0g.js => railroadDiagram-O6MQD6OU-Bm_RO43s.js} (84%) rename apps/pythinker-code/dist-web/assets/{razor-L05JTUrE.js => razor-VEmNVnW2.js} (98%) rename apps/pythinker-code/dist-web/assets/{requirementDiagram-EFPCY7ZU-CGyZBZTB.js => requirementDiagram-EFPCY7ZU-CpeOGSGj.js} (99%) rename apps/pythinker-code/dist-web/assets/{sankeyDiagram-P5KCCOFB-Djxn8nYX.js => sankeyDiagram-P5KCCOFB-CgeqPevU.js} (99%) rename apps/pythinker-code/dist-web/assets/{sequenceDiagram-WJ2MYXX4-DTAyNeme.js => sequenceDiagram-WJ2MYXX4-Bztsclzi.js} (99%) rename apps/pythinker-code/dist-web/assets/{sizeCapture-X5ZJPWSS-CSVjY38-.js => sizeCapture-X5ZJPWSS-CqWuzQOK.js} (86%) rename apps/pythinker-code/dist-web/assets/{stateDiagram-HBIQ2CUA-C3_d9P6D.js => stateDiagram-HBIQ2CUA-BqDrFizO.js} (96%) create mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-Acd38TZq.js delete mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js rename apps/pythinker-code/dist-web/assets/{swimlanes-XN3QIQJK-D3OEEV8W.js => swimlanes-XN3QIQJK-WLKrEsDC.js} (99%) create mode 100644 apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-BUZY9pzv.js delete mode 100644 apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js rename apps/pythinker-code/dist-web/assets/{timeline-definition-24CTP7MA-S237vnu4.js => timeline-definition-24CTP7MA-CC8ieJMY.js} (99%) rename apps/pythinker-code/dist-web/assets/{tsMode-BZYSYhKr.js => tsMode-CYFtUCqN.js} (99%) rename apps/pythinker-code/dist-web/assets/{typescript-DeFWR0Bj.js => typescript-vzwxO8Um.js} (97%) rename apps/pythinker-code/dist-web/assets/{vennDiagram-4TSXK5OY-BElDUyH9.js => vennDiagram-4TSXK5OY-BY_8Roc7.js} (99%) rename apps/pythinker-code/dist-web/assets/{vue.runtime.esm-bundler-B0BJU7Oe.js => vue.runtime.esm-bundler-C60WDxyU.js} (98%) rename apps/pythinker-code/dist-web/assets/{wardleyDiagram-VM6X3IG4-C5SVPYNO.js => wardleyDiagram-VM6X3IG4-BiZ0eogf.js} (99%) rename apps/pythinker-code/dist-web/assets/{xml-BDPhTprf.js => xml-CV6_LXH0.js} (93%) rename apps/pythinker-code/dist-web/assets/{xychartDiagram-S5SC5T6Z-Dqif0X1Z.js => xychartDiagram-S5SC5T6Z-CxT0FOrZ.js} (99%) rename apps/pythinker-code/dist-web/assets/{yaml-B6mJwErH.js => yaml-0Pg85F2J.js} (96%) diff --git a/apps/pythinker-code/dist-web/.web-bundle-manifest.json b/apps/pythinker-code/dist-web/.web-bundle-manifest.json index 9f0b048c9..8d0995f88 100644 --- a/apps/pythinker-code/dist-web/.web-bundle-manifest.json +++ b/apps/pythinker-code/dist-web/.web-bundle-manifest.json @@ -1,4 +1,4 @@ { - "sourceHash": "7e59e303ddd02bd7221b2aa34dba5cde5bee20d5ce98977ee534a636c1b82b73", + "sourceHash": "efa226b4193e02e57d14981d94ea394b7f3163560863445b3e6d14867aba11a1", "sourceFileCount": 411 } diff --git a/apps/pythinker-code/dist-web/assets/CodeBlockNode-D4cpL5UZ.js b/apps/pythinker-code/dist-web/assets/CodeBlockNode-D5JTfsXt.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/CodeBlockNode-D4cpL5UZ.js rename to apps/pythinker-code/dist-web/assets/CodeBlockNode-D5JTfsXt.js index 5f72bc37b..80a2614d8 100644 --- a/apps/pythinker-code/dist-web/assets/CodeBlockNode-D4cpL5UZ.js +++ b/apps/pythinker-code/dist-web/assets/CodeBlockNode-D5JTfsXt.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BM4AkXWz.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-BZ9wqq8Z.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-BM4AkXWz.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DUbYfe-Q.js","assets/index-Ct7MGS7v.js","assets/index-CgbqiNuj.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-Ct7MGS7v.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-DUbYfe-Q.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-DhJc-Ocy.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-DvGbj-YG.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/DesignSystemView-DhJc-Ocy.js rename to apps/pythinker-code/dist-web/assets/DesignSystemView-DvGbj-YG.js index 3e29948d8..6d93c5dfd 100644 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-DhJc-Ocy.js +++ b/apps/pythinker-code/dist-web/assets/DesignSystemView-DvGbj-YG.js @@ -1,4 +1,4 @@ -import{M as x,aD as k,aI as C,aL as d,u as s,v as t,G as e,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as S,cz as b,cA as B}from"./index-BZ9wqq8Z.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},da={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},sa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ea={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},ca={class:"stage p col",style:{"align-items":"center",background:"#fff"}},va={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(wa,{emit:w}){const y=w;function p(){y("close")}let v=null;function h(c){c.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const c=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;c.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;v=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>v.observe(i)),c.length&&c[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),v&&(v.disconnect(),v=null)}),(c,a)=>(d(),s("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=e('
        ',1)),t("main",A,[t("div",M,[a[44]||(a[44]=e('
        ● Design System · v1.0

        Pythinker Web Design System

        This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

        Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
        i
        This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
        01

        Design Principles

        Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

        • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
        • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
        • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
        • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
        • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
        • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
        • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
        Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
        i
        Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
        ',2)),t("section",H,[a[7]||(a[7]=e(`
        02

        Design Tokens

        Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

        i
        Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

        Color

        Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

        i
        The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
        bg
        #ffffff / #121212
        surface
        #fafbfc / #1f1f1f
        surface-sunken
        #f3f5f8 / #121212
        selected
        #eceff3 / #2d333b
        fg
        #14171c / #e8eaed
        fg-muted
        #6b7280 / #9aa0a8
        line
        #e7eaee / #2d333b
        accent (KMBlue)
        #1783ff / #58a6ff
        accent-soft
        #e8f3ff / rgba(88,166,255,.14)
        TokenLightDarkUsage
        --color-bg#ffffff#121212Page background
        --color-surface#fafbfc#1f1f1fPanel / sidebar / card head
        --color-surface-raised#ffffff#292929Raised card / dialog / input
        --color-text#14171c#e8eaedBody text / headings
        --color-text-muted#6b7280#9aa0a8Secondary text / placeholder
        --color-line#e7eaee#2d333bDivider / card border
        --color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
        --color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
        --color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
        --color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
        --color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
        --color-accent#1783ff#58a6ffPrimary action / link / focus
        --color-success#0e7a38#3fb950Success / pass
        --color-warning#a9610a#d29922Warning / pending
        --color-danger#c0392b#f85149Danger / error / abort

        Surface usage

        The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

        TokenLightDarkUsage
        --p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
        --p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
        --p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
        --p-bg#ffffff#121212Page background

        Focus ring

        All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

        TokenValueUsage
        --p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
        --p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

        Text selection

        The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

        Disabled state

        All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

        Font families

        Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

        --font-ui · UI & body (Inter first)

        Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

        --font-ui
        --font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
        +import{M as x,aD as k,aI as C,aL as d,u as s,v as t,G as e,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as S,cz as b,cA as B}from"./index-Ct7MGS7v.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},da={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},sa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ea={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},ca={class:"stage p col",style:{"align-items":"center",background:"#fff"}},va={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(wa,{emit:w}){const y=w;function p(){y("close")}let v=null;function h(c){c.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const c=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;c.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;v=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>v.observe(i)),c.length&&c[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),v&&(v.disconnect(),v=null)}),(c,a)=>(d(),s("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=e('',1)),t("main",A,[t("div",M,[a[44]||(a[44]=e('
        ● Design System · v1.0

        Pythinker Web Design System

        This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

        Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
        i
        This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
        01

        Design Principles

        Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

        • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
        • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
        • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
        • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
        • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
        • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
        • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
        Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
        i
        Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
        ',2)),t("section",H,[a[7]||(a[7]=e(`
        02

        Design Tokens

        Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

        i
        Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

        Color

        Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

        i
        The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
        bg
        #ffffff / #121212
        surface
        #fafbfc / #1f1f1f
        surface-sunken
        #f3f5f8 / #121212
        selected
        #eceff3 / #2d333b
        fg
        #14171c / #e8eaed
        fg-muted
        #6b7280 / #9aa0a8
        line
        #e7eaee / #2d333b
        accent (KMBlue)
        #1783ff / #58a6ff
        accent-soft
        #e8f3ff / rgba(88,166,255,.14)
        TokenLightDarkUsage
        --color-bg#ffffff#121212Page background
        --color-surface#fafbfc#1f1f1fPanel / sidebar / card head
        --color-surface-raised#ffffff#292929Raised card / dialog / input
        --color-text#14171c#e8eaedBody text / headings
        --color-text-muted#6b7280#9aa0a8Secondary text / placeholder
        --color-line#e7eaee#2d333bDivider / card border
        --color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
        --color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
        --color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
        --color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
        --color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
        --color-accent#1783ff#58a6ffPrimary action / link / focus
        --color-success#0e7a38#3fb950Success / pass
        --color-warning#a9610a#d29922Warning / pending
        --color-danger#c0392b#f85149Danger / error / abort

        Surface usage

        The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

        TokenLightDarkUsage
        --p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
        --p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
        --p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
        --p-bg#ffffff#121212Page background

        Focus ring

        All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

        TokenValueUsage
        --p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
        --p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

        Text selection

        The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

        Disabled state

        All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

        Font families

        Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

        --font-ui · UI & body (Inter first)

        Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

        --font-ui
        --font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
               "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
               -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Ubuntu, sans-serif,
        diff --git a/apps/pythinker-code/dist-web/assets/Tooltip-aicK0c3c.js b/apps/pythinker-code/dist-web/assets/Tooltip-BMItlE4H.js
        similarity index 98%
        rename from apps/pythinker-code/dist-web/assets/Tooltip-aicK0c3c.js
        rename to apps/pythinker-code/dist-web/assets/Tooltip-BMItlE4H.js
        index 5f4851cb5..2e41f2065 100644
        --- a/apps/pythinker-code/dist-web/assets/Tooltip-aicK0c3c.js
        +++ b/apps/pythinker-code/dist-web/assets/Tooltip-BMItlE4H.js
        @@ -1 +1 @@
        -import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-BZ9wqq8Z.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
        +import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-Ct7MGS7v.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
        diff --git a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DEfrkFuI.js b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH--reuoLL3.js
        similarity index 86%
        rename from apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DEfrkFuI.js
        rename to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH--reuoLL3.js
        index 934245c92..d040fd088 100644
        --- a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DEfrkFuI.js
        +++ b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH--reuoLL3.js
        @@ -1 +1 @@
        -import{g as p,r as u,d as a}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p as f}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as n,l as o}from"./mermaid.core-BusHtpbx.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
        +import{g as p,r as u,d as a}from"./chunk-SVP7TREG-CWyh6gIW.js";import{p as f}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{_ as n,l as o}from"./mermaid.core-CwGP16Dm.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
        diff --git a/apps/pythinker-code/dist-web/assets/arc-B8osaoVd.js b/apps/pythinker-code/dist-web/assets/arc-CPa230_j.js
        similarity index 98%
        rename from apps/pythinker-code/dist-web/assets/arc-B8osaoVd.js
        rename to apps/pythinker-code/dist-web/assets/arc-CPa230_j.js
        index 3434adc9a..0e5229e24 100644
        --- a/apps/pythinker-code/dist-web/assets/arc-B8osaoVd.js
        +++ b/apps/pythinker-code/dist-web/assets/arc-CPa230_j.js
        @@ -1 +1 @@
        -import{H as ln,I as un,J as y,K as tn,L as Q,M as I,N as _,O as an,P as rn,Q as j,R as o,S as K,T as sn,V as on,W as fn}from"./mermaid.core-BusHtpbx.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,L,u){var D=q-l,i=O-h,n=L-v,d=u-R,a=d*D-n*i;if(!(a*ar*r+N*N&&(H=w,J=p),{cx:H,cy:J,x01:-n,y01:-d,x11:H*(v/T-1),y11:J*(v/T-1)}}function hn(){var l=cn,h=yn,q=K(0),O=null,v=gn,R=dn,L=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,M=an(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(M>tn-y)u.moveTo(s*Q(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*Q(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=M,E=M,H=L.apply(this,arguments)/2,J=H>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(an(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(J>y){var N=sn(J/a*I(H)),z=sn(J/s*I(H));(P-=N*2)>y?(N*=t?1:-1,A+=N,T-=N):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var V=s*Q(m),W=s*I(m),B=a*Q(T),C=a*I(T);if(w>y){var F=s*Q(g),G=s*I(g),X=a*Q(A),Y=a*I(A),S;if(My?x>y?(e=U(X,Y,V,W,s,x,t),r=U(F,G,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=U(B,C,F,G,a,-p,t),r=U(V,W,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+N*N&&(H=w,J=p),{cx:H,cy:J,x01:-n,y01:-d,x11:H*(v/T-1),y11:J*(v/T-1)}}function hn(){var l=cn,h=yn,q=K(0),O=null,v=gn,R=dn,L=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,M=an(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(M>tn-y)u.moveTo(s*Q(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*Q(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=M,E=M,H=L.apply(this,arguments)/2,J=H>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(an(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(J>y){var N=sn(J/a*I(H)),z=sn(J/s*I(H));(P-=N*2)>y?(N*=t?1:-1,A+=N,T-=N):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var V=s*Q(m),W=s*I(m),B=a*Q(T),C=a*I(T);if(w>y){var F=s*Q(g),G=s*I(g),X=a*Q(A),Y=a*I(A),S;if(My?x>y?(e=U(X,Y,V,W,s,x,t),r=U(F,G,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=U(B,C,F,G,a,-p,t),r=U(V,W,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=r}),(function(M,P,N){var v=N(0);function h(){}for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,P,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,L=0;L-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(G,1);var R=g.source.owner.getEdges().indexOf(g);if(R==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(R,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,L=this.getNodes(),R=L.length,C=0;CT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,R,C,G,V,Y=this.nodes,$=Y.length,A=0;A<$;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),R=_.getRight(),C=_.getTop(),G=_.getBottom(),l>L&&(l=L),TC&&(g=C),dL&&(l=L),TC&&(g=C),d=this.nodes.length){var $=0;T.forEach(function(A){A.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},M.exports=s}),(function(M,P,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,u){if(f==null&&r==null&&u==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{u=f,r=i,f=e;var t=r.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,u);if(f.isInterGraph=!0,f.source=r,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof v){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,u=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*i[0],s=i[1]/u;i[0]t)return i[0]=f,i[1]=o,i[2]=u,i[3]=Y,!1;if(ru)return i[0]=s,i[1]=r,i[2]=G,i[3]=t,!1;if(fu?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>u?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-m===y?u>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=G,i[3]=C,E=!0):m===y&&(u>f?(i[2]=R,i[3]=C,E=!0):(i[2]=$,i[3]=Y,E=!0)),n&&E)return!1;if(f>u?r>t?(I=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=g,W=r+d*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-d*y,i[0]=S,i[1]=W;break}if(!E)switch(D){case 1:Q=C,x=u+-_/y,i[2]=x,i[3]=Q;break;case 2:x=$,Q=t+A*y,i[2]=x,i[3]=Q;break;case 3:Q=Y,x=u+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-A*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,u=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,L=void 0,R=void 0,C=void 0,G=void 0,V=void 0,Y=void 0,$=void 0;return L=s-u,C=r-t,V=t*u-r*s,R=T-c,G=o-l,Y=l*c-o*T,$=L*G-R*C,$===0?null:(g=(C*Y-G*V)/$,d=(R*V-L*Y)/$,new v(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,P,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,P,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,P,N){var v=(function(){function r(u,t){for(var s=0;s"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,P,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(C[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var V=G.getEdges(),g=0;g-1&&C.splice(_,1)}d=new Set,R=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(Y,1);var $=R.getNeighborsList();$.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},M.exports=s}),(function(M,P,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,P,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,P,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var R=0;Rr}}]),i})();M.exports=e}),(function(M,P,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var wt=function zt(bt){if(bt.length==0)return 0;for(var $t=[],St=0;St0;)wt.push(0);return wt})(this.n),i=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.m),f=!0,r=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,wt){return Tt&&wt})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Ct*e[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,P,N){var v=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var P={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var u in f)r[u]=f[u];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),u=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,R=i(551).Layout,C=i(551).Integer,G=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,$=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var D=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new $,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var S;for(S=0;Sm&&(m=Math.floor(D.y)),I=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var D=0;D1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),B--,X--}E!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%B){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},A.maxDiagonalInTree=function(n){for(var E=C.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[S]=[]),E[S]=E[S].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;By?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,D=m.labelMarginLeft,S=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,D,S)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),D;return IS&&(S=B.getWidth())});var W=I/y,x=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return D.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,Q=0,z=0;z0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var D=n.rowWidth[I];if(D+n.horizontalPadding+E<=n.width)return!0;var S=0;n.rowHeight[I]0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+S)/(D+E+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,S=0;SD&&(D=m[S].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(I0)for(var rt=D;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,k=0;k{var f=i(551).FDLayoutNode,r=i(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?L[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,zt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw zt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(b,U){m[U]=[b.position.x,b.position.y],y[U]=[d[g.get(b.nodeId)],L[g.get(b.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),Mt=void 0;dt.size>0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).x,U[et].forEach(function(pt){m[b]=[Mt,L[g.get(pt)]],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},K=0;K0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).y,q[et].forEach(function(pt){m[b]=[d[g.get(pt)],Mt],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:d[g.get(b.nodeId)],y:L[g.get(b.nodeId)]},K=b.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(b,U){d[U]+=mt.x}),L.forEach(function(b,U){L[U]+=mt.y}),l.fixedNodeConstraint.forEach(function(b){d[g.get(b.nodeId)]=b.position.x,L[g.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Ot=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=$(Z).x,Z.forEach(function(at){S.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=L[g.get(K.values().next().value)]:q=$(Z).y,Z.forEach(function(at){S.has(at)||(L[g.get(at)]=q)})},Ft=0;Ft{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(45);return h})()})})(he)),he.exports}var yr=se.exports,Oe;function mr(){return Oe||(Oe=1,(function(w,F){(function(P,N){w.exports=N(pr())})(yr,function(M){return(()=>{var P={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(R){T=!0,g=R}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var D=0;D1){L=g[0],R=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,R=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=C.next()).done);d=!0){var V=G.value,Y=f(V,2),$=Y[0],A=Y[1],_=o.cy.getElementById($);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){L=!0,R=x}finally{try{!d&&C.return&&C.return()}finally{if(L)throw R}}var I=t.x-(l+c)/2,D=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+D})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=B)});var S=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,R=void 0,C=void 0,G=void 0,V=t.descendants().not(":parent"),Y=V.length,$=0;$L&&(l=L),TC&&(g=C),d{var f=i(548),r=i(140).CoSELayout,u=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var R=d.cy,C=d.eles,G=C.nodes(),V=C.edges(),Y=void 0,$=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,$=L.xCoords,A=L.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(R,C),m=function W(x,Q,z,X){for(var rt=Q.length,B=0;B0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,B=0;B0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new r,S=D.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(G),D,d),y(D,S,V),I(D,d),D.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(L,R){for(var C=0;C0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(A=t.connectComponents(G,C.eles,I),A.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&A.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var D=G.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var B=X.length-1;B>=0;B--)A.splice(X[B],1),Y.splice(X[B],1),_.splice(X[B],1)}}A.forEach(function(vt,it){C.eles=vt,$.push(l(C,Y[it])),t.relocateComponent(_[it],$[it],C)})}else A.forEach(function(vt,it){t.relocateComponent(_[it],Y[it],C)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(C.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(C.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else $[it][Dt.id()]&&Et.nodes.push({x:$[it][Dt.id()].getLeft(),y:$[it][Dt.id()].getTop(),width:$[it][Dt.id()].getWidth(),height:$[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else $[it][mt.id()]&&$[it][Ot.id()]&&Et.edges.push({startX:$[it][mt.id()].getCenterX(),startY:$[it][mt.id()].getCenterY(),endX:$[it][Ot.id()].getCenterX(),endY:$[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys($[vt]).forEach(function(it){var ut=$[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=C.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?($.push(l(C,Y[0])),t.relocateComponent(_[0],$[0],C)):t.relocateComponent(_[0],Y[0],C)}var J=function(it,ut){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return $.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),C.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(G,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(R,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,u=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,L=new Map,R=new Map,C=[],G=[],V=[],Y=[],$=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,D=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=C[nt],lt=0;ltdt&&(dt=$[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?C[U].push(R.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=R.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(b){it=!0,ut=b}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){S=E{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(579);return h})()})})(se)),se.exports}var Er=mr();const Tr=qe(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(w=>`${w},${w/2} 0,${w} 0,0`,"L"),R:ct(w=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:ct(w=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:ct(w=>`${w/2},0 ${w},${w} 0,${w}`,"B")},oe={L:ct((w,F)=>w-F+2,"L"),R:ct((w,F)=>w-2,"R"),T:ct((w,F)=>w-F+2,"T"),B:ct((w,F)=>w-2,"B")},Nr=ct(function(w){return Wt(w)?w==="L"?"R":"L":w==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(w){const F=w;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Wt=ct(function(w){const F=w;return F==="L"||F==="R"},"isArchitectureDirectionX"),qt=ct(function(w){const F=w;return F==="T"||F==="B"},"isArchitectureDirectionY"),Te=ct(function(w,F){const M=Wt(w)&&qt(F),P=qt(w)&&Wt(F);return M||P},"isArchitectureDirectionXY"),Lr=ct(function(w){const F=w[0],M=w[1],P=Wt(F)&&qt(M),N=qt(F)&&Wt(M);return P||N},"isArchitecturePairXY"),wr=ct(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(w,F){const M=`${w}${F}`;return wr(M)?M:void 0},"getArchitectureDirectionPair"),Cr=ct(function([w,F],M){const P=M[0],N=M[1];return Wt(P)?qt(N)?[w+(P==="L"?-1:1),F+(N==="T"?1:-1)]:[w+(P==="L"?-1:1),F]:Wt(N)?[w+(N==="L"?1:-1),F+(P==="T"?1:-1)]:[w,F+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=ct(function(w){return w==="LT"||w==="TL"?[1,1]:w==="BL"||w==="LB"?[1,-1]:w==="BR"||w==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=ct(function(w,F){return Te(w,F)?"bend":Wt(w)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=ct(function(w){return w.type==="service"},"isArchitectureService"),Or=ct(function(w){return w.type==="junction"},"isArchitectureJunction"),be=ct((w,F)=>{const[M,P]=[w,F].sort();return`${JSON.stringify(M)}-${JSON.stringify(P)}`},"architectureGroupAlignmentKey"),Ge=ct(w=>w.data(),"edgeData"),ie=ct(w=>w.data(),"nodeData"),xr=or.architecture,Pe=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ir()}addService({id:w,icon:F,in:M,title:P,iconText:N}){if(this.registeredIds.has(w))throw new Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(M)==="node")throw new Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:F,iconText:N,title:P,edges:[],in:M})}getServices(){return[...this.nodes.values()].filter(Dr)}addJunction({id:w,in:F}){if(this.registeredIds.has(w))throw new Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(F!==void 0){if(w===F)throw new Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(F))throw new Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(F)==="node")throw new Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:F})}getJunctions(){return[...this.nodes.values()].filter(Or)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:F,in:M,title:P}){if(this.registeredIds.has(w))throw new Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(M)==="node")throw new Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:F,title:P,in:M})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:F,lhsDir:M,rhsDir:P,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(P))throw new Error(`Invalid direction given for right hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(P)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw new Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(F)&&!this.groups.has(F))throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes.get(w).in,f=this.nodes.get(F).in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:w,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:F,rhsDir:P,rhsInto:v,rhsGroup:a,title:e};this.edges.push(r);const u=this.nodes.get(w),t=this.nodes.get(F);u&&t&&(u.edges.push(this.edges[this.edges.length-1]),t.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw new Error(`An align directive requires at least two members; got ${w.members.length}`);const F=new Set;w.members.forEach(M=>{if(this.registeredIds.get(M)!=="node")throw new Error(`align ${w.direction} references [${M}], which is not a service or junction`);if(F.has(M))throw new Error(`align ${w.direction} lists [${M}] more than once`);F.add(M)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const w=new Map,F=new Map;for(const[h,a]of this.nodes.entries()){const e=new Map;for(const i of a.edges){const f=this.getNode(i.lhsId)?.in,r=this.getNode(i.rhsId)?.in;if(f&&r&&f!==r){const u=Ar(i.lhsDir,i.rhsDir);u!=="bend"&&w.set(be(f,r),u)}if(i.lhsId===h){const u=pe(i.lhsDir,i.rhsDir);u&&e.set(u,i.rhsId)}else{const u=pe(i.rhsDir,i.lhsDir);u&&e.set(u,i.lhsId)}}F.set(h,e)}const M=new Set,P=new Set(F.keys()),N=ct(h=>{const a=new Map([[h,[0,0]]]),e=[h];for(;e.length>0;){const i=e.shift();if(i){M.add(i),P.delete(i);const f=F.get(i);if(!f)throw new Error(`BFS error: adjacency list for id ${i} not found. Please report this as a bug.`);const r=a.get(i);if(!r)throw new Error(`BFS error: position for id ${i} not found in spatial map. Please report this as a bug.`);const[u,t]=r;f.forEach((s,o)=>{M.has(s)||(a.set(s,Cr([u,t],o)),e.push(s))})}}return a},"BFS"),v=[];for(;P.size>0;){const h=P.values().next().value;v.push(N(h))}this.dataStructures={adjList:F,spatialMaps:v,groupAlignments:w}}return this.dataStructures}setElementForId(w,F){this.elements.set(w,F)}getElementById(w){return this.elements.get(w)}getConfig(){return ar({...xr,...nr().architecture})}getConfigField(w){return this.getConfig()[w]}},Ir=ct((w,F)=>{Ze(w,F),w.groups.map(M=>F.addGroup(M)),w.services.map(M=>F.addService({...M,type:"service"})),w.junctions.map(M=>F.addJunction({...M,type:"junction"})),w.edges.map(M=>F.addEdge(M)),w.alignments?.map(M=>F.addLayoutHint({direction:M.direction,members:[...M.members]}))},"populateDb"),Ue={parser:{yy:void 0},parse:ct(async w=>{const F=await gr("architecture",w);Se.debug(F);const M=Ue.parser?.yy;if(!(M instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ir(F,M)},"parse")},Rr=ct(w=>`
        +import{p as Ze}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{b4 as qe,_ as ct,G as Qe,ae as Je,l as Se,b as Ke,a as je,p as _e,q as tr,g as er,s as rr,r as ir,D as ar,A as nr,E as or,c as me,b5 as Ee,aj as ve,i as sr,j as hr,t as lr,ak as fr,b6 as cr}from"./mermaid.core-CwGP16Dm.js";import{p as gr}from"./cynefin-OW5HDTMX-D3VomulX.js";import{c as Fe}from"./cytoscape.esm-CNiYdHpY.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var se={exports:{}},he={exports:{}},le={exports:{}},ur=le.exports,Ae;function dr(){return Ae||(Ae=1,(function(w,F){(function(P,N){w.exports=N()})(ur,function(){return(function(M){var P={};function N(v){if(P[v])return P[v].exports;var h=P[v]={i:v,l:!1,exports:{}};return M[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=M,N.c=P,N.i=function(v){return v},N.d=function(v,h,a){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(M,P,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,M.exports=v}),(function(M,P,N){var v=N(2),h=N(8),a=N(9);function e(f,r,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(v.prototype);for(var i in v)e[i]=v[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var u=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(u.getOwner()==r)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},M.exports=e}),(function(M,P,N){function v(h){this.vGraphObject=h}M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(13),e=N(0),i=N(16),f=N(5);function r(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(v.prototype);for(var u in v)r[u]=v[u];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=r}),(function(M,P,N){var v=N(0);function h(){}for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,P,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,L=0;L-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(G,1);var R=g.source.owner.getEdges().indexOf(g);if(R==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(R,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,L=this.getNodes(),R=L.length,C=0;CT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,R,C,G,V,Y=this.nodes,$=Y.length,A=0;A<$;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),R=_.getRight(),C=_.getTop(),G=_.getBottom(),l>L&&(l=L),TC&&(g=C),dL&&(l=L),TC&&(g=C),d=this.nodes.length){var $=0;T.forEach(function(A){A.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},M.exports=s}),(function(M,P,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,u){if(f==null&&r==null&&u==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{u=f,r=i,f=e;var t=r.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,u);if(f.isInterGraph=!0,f.source=r,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof v){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,u=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*i[0],s=i[1]/u;i[0]t)return i[0]=f,i[1]=o,i[2]=u,i[3]=Y,!1;if(ru)return i[0]=s,i[1]=r,i[2]=G,i[3]=t,!1;if(fu?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>u?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-m===y?u>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=G,i[3]=C,E=!0):m===y&&(u>f?(i[2]=R,i[3]=C,E=!0):(i[2]=$,i[3]=Y,E=!0)),n&&E)return!1;if(f>u?r>t?(I=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=g,W=r+d*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-d*y,i[0]=S,i[1]=W;break}if(!E)switch(D){case 1:Q=C,x=u+-_/y,i[2]=x,i[3]=Q;break;case 2:x=$,Q=t+A*y,i[2]=x,i[3]=Q;break;case 3:Q=Y,x=u+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-A*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,u=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,L=void 0,R=void 0,C=void 0,G=void 0,V=void 0,Y=void 0,$=void 0;return L=s-u,C=r-t,V=t*u-r*s,R=T-c,G=o-l,Y=l*c-o*T,$=L*G-R*C,$===0?null:(g=(C*Y-G*V)/$,d=(R*V-L*Y)/$,new v(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,P,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,P,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,P,N){var v=(function(){function r(u,t){for(var s=0;s"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,P,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(C[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var V=G.getEdges(),g=0;g-1&&C.splice(_,1)}d=new Set,R=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(Y,1);var $=R.getNeighborsList();$.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},M.exports=s}),(function(M,P,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,P,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,P,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var R=0;Rr}}]),i})();M.exports=e}),(function(M,P,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var wt=function zt(bt){if(bt.length==0)return 0;for(var $t=[],St=0;St0;)wt.push(0);return wt})(this.n),i=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.m),f=!0,r=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,wt){return Tt&&wt})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Ct*e[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,P,N){var v=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var P={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var u in f)r[u]=f[u];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),u=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,R=i(551).Layout,C=i(551).Integer,G=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,$=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var D=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new $,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var S;for(S=0;Sm&&(m=Math.floor(D.y)),I=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var D=0;D1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),B--,X--}E!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%B){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},A.maxDiagonalInTree=function(n){for(var E=C.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[S]=[]),E[S]=E[S].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;By?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,D=m.labelMarginLeft,S=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,D,S)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),D;return IS&&(S=B.getWidth())});var W=I/y,x=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return D.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,Q=0,z=0;z0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var D=n.rowWidth[I];if(D+n.horizontalPadding+E<=n.width)return!0;var S=0;n.rowHeight[I]0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+S)/(D+E+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,S=0;SD&&(D=m[S].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(I0)for(var rt=D;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,k=0;k{var f=i(551).FDLayoutNode,r=i(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?L[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,zt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw zt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(b,U){m[U]=[b.position.x,b.position.y],y[U]=[d[g.get(b.nodeId)],L[g.get(b.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),Mt=void 0;dt.size>0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).x,U[et].forEach(function(pt){m[b]=[Mt,L[g.get(pt)]],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},K=0;K0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).y,q[et].forEach(function(pt){m[b]=[d[g.get(pt)],Mt],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:d[g.get(b.nodeId)],y:L[g.get(b.nodeId)]},K=b.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(b,U){d[U]+=mt.x}),L.forEach(function(b,U){L[U]+=mt.y}),l.fixedNodeConstraint.forEach(function(b){d[g.get(b.nodeId)]=b.position.x,L[g.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Ot=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=$(Z).x,Z.forEach(function(at){S.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=L[g.get(K.values().next().value)]:q=$(Z).y,Z.forEach(function(at){S.has(at)||(L[g.get(at)]=q)})},Ft=0;Ft{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(45);return h})()})})(he)),he.exports}var yr=se.exports,Oe;function mr(){return Oe||(Oe=1,(function(w,F){(function(P,N){w.exports=N(pr())})(yr,function(M){return(()=>{var P={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(R){T=!0,g=R}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var D=0;D1){L=g[0],R=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,R=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=C.next()).done);d=!0){var V=G.value,Y=f(V,2),$=Y[0],A=Y[1],_=o.cy.getElementById($);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){L=!0,R=x}finally{try{!d&&C.return&&C.return()}finally{if(L)throw R}}var I=t.x-(l+c)/2,D=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+D})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=B)});var S=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,R=void 0,C=void 0,G=void 0,V=t.descendants().not(":parent"),Y=V.length,$=0;$L&&(l=L),TC&&(g=C),d{var f=i(548),r=i(140).CoSELayout,u=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var R=d.cy,C=d.eles,G=C.nodes(),V=C.edges(),Y=void 0,$=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,$=L.xCoords,A=L.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(R,C),m=function W(x,Q,z,X){for(var rt=Q.length,B=0;B0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,B=0;B0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new r,S=D.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(G),D,d),y(D,S,V),I(D,d),D.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(L,R){for(var C=0;C0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(A=t.connectComponents(G,C.eles,I),A.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&A.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var D=G.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var B=X.length-1;B>=0;B--)A.splice(X[B],1),Y.splice(X[B],1),_.splice(X[B],1)}}A.forEach(function(vt,it){C.eles=vt,$.push(l(C,Y[it])),t.relocateComponent(_[it],$[it],C)})}else A.forEach(function(vt,it){t.relocateComponent(_[it],Y[it],C)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(C.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(C.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else $[it][Dt.id()]&&Et.nodes.push({x:$[it][Dt.id()].getLeft(),y:$[it][Dt.id()].getTop(),width:$[it][Dt.id()].getWidth(),height:$[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else $[it][mt.id()]&&$[it][Ot.id()]&&Et.edges.push({startX:$[it][mt.id()].getCenterX(),startY:$[it][mt.id()].getCenterY(),endX:$[it][Ot.id()].getCenterX(),endY:$[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys($[vt]).forEach(function(it){var ut=$[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=C.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?($.push(l(C,Y[0])),t.relocateComponent(_[0],$[0],C)):t.relocateComponent(_[0],Y[0],C)}var J=function(it,ut){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return $.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),C.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(G,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(R,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,u=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,L=new Map,R=new Map,C=[],G=[],V=[],Y=[],$=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,D=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=C[nt],lt=0;ltdt&&(dt=$[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?C[U].push(R.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=R.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(b){it=!0,ut=b}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){S=E{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(579);return h})()})})(se)),se.exports}var Er=mr();const Tr=qe(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(w=>`${w},${w/2} 0,${w} 0,0`,"L"),R:ct(w=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:ct(w=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:ct(w=>`${w/2},0 ${w},${w} 0,${w}`,"B")},oe={L:ct((w,F)=>w-F+2,"L"),R:ct((w,F)=>w-2,"R"),T:ct((w,F)=>w-F+2,"T"),B:ct((w,F)=>w-2,"B")},Nr=ct(function(w){return Wt(w)?w==="L"?"R":"L":w==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(w){const F=w;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Wt=ct(function(w){const F=w;return F==="L"||F==="R"},"isArchitectureDirectionX"),qt=ct(function(w){const F=w;return F==="T"||F==="B"},"isArchitectureDirectionY"),Te=ct(function(w,F){const M=Wt(w)&&qt(F),P=qt(w)&&Wt(F);return M||P},"isArchitectureDirectionXY"),Lr=ct(function(w){const F=w[0],M=w[1],P=Wt(F)&&qt(M),N=qt(F)&&Wt(M);return P||N},"isArchitecturePairXY"),wr=ct(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(w,F){const M=`${w}${F}`;return wr(M)?M:void 0},"getArchitectureDirectionPair"),Cr=ct(function([w,F],M){const P=M[0],N=M[1];return Wt(P)?qt(N)?[w+(P==="L"?-1:1),F+(N==="T"?1:-1)]:[w+(P==="L"?-1:1),F]:Wt(N)?[w+(N==="L"?1:-1),F+(P==="T"?1:-1)]:[w,F+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=ct(function(w){return w==="LT"||w==="TL"?[1,1]:w==="BL"||w==="LB"?[1,-1]:w==="BR"||w==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=ct(function(w,F){return Te(w,F)?"bend":Wt(w)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=ct(function(w){return w.type==="service"},"isArchitectureService"),Or=ct(function(w){return w.type==="junction"},"isArchitectureJunction"),be=ct((w,F)=>{const[M,P]=[w,F].sort();return`${JSON.stringify(M)}-${JSON.stringify(P)}`},"architectureGroupAlignmentKey"),Ge=ct(w=>w.data(),"edgeData"),ie=ct(w=>w.data(),"nodeData"),xr=or.architecture,Pe=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ir()}addService({id:w,icon:F,in:M,title:P,iconText:N}){if(this.registeredIds.has(w))throw new Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(M)==="node")throw new Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:F,iconText:N,title:P,edges:[],in:M})}getServices(){return[...this.nodes.values()].filter(Dr)}addJunction({id:w,in:F}){if(this.registeredIds.has(w))throw new Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(F!==void 0){if(w===F)throw new Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(F))throw new Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(F)==="node")throw new Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:F})}getJunctions(){return[...this.nodes.values()].filter(Or)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:F,in:M,title:P}){if(this.registeredIds.has(w))throw new Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(M)==="node")throw new Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:F,title:P,in:M})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:F,lhsDir:M,rhsDir:P,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(P))throw new Error(`Invalid direction given for right hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(P)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw new Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(F)&&!this.groups.has(F))throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes.get(w).in,f=this.nodes.get(F).in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:w,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:F,rhsDir:P,rhsInto:v,rhsGroup:a,title:e};this.edges.push(r);const u=this.nodes.get(w),t=this.nodes.get(F);u&&t&&(u.edges.push(this.edges[this.edges.length-1]),t.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw new Error(`An align directive requires at least two members; got ${w.members.length}`);const F=new Set;w.members.forEach(M=>{if(this.registeredIds.get(M)!=="node")throw new Error(`align ${w.direction} references [${M}], which is not a service or junction`);if(F.has(M))throw new Error(`align ${w.direction} lists [${M}] more than once`);F.add(M)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const w=new Map,F=new Map;for(const[h,a]of this.nodes.entries()){const e=new Map;for(const i of a.edges){const f=this.getNode(i.lhsId)?.in,r=this.getNode(i.rhsId)?.in;if(f&&r&&f!==r){const u=Ar(i.lhsDir,i.rhsDir);u!=="bend"&&w.set(be(f,r),u)}if(i.lhsId===h){const u=pe(i.lhsDir,i.rhsDir);u&&e.set(u,i.rhsId)}else{const u=pe(i.rhsDir,i.lhsDir);u&&e.set(u,i.lhsId)}}F.set(h,e)}const M=new Set,P=new Set(F.keys()),N=ct(h=>{const a=new Map([[h,[0,0]]]),e=[h];for(;e.length>0;){const i=e.shift();if(i){M.add(i),P.delete(i);const f=F.get(i);if(!f)throw new Error(`BFS error: adjacency list for id ${i} not found. Please report this as a bug.`);const r=a.get(i);if(!r)throw new Error(`BFS error: position for id ${i} not found in spatial map. Please report this as a bug.`);const[u,t]=r;f.forEach((s,o)=>{M.has(s)||(a.set(s,Cr([u,t],o)),e.push(s))})}}return a},"BFS"),v=[];for(;P.size>0;){const h=P.values().next().value;v.push(N(h))}this.dataStructures={adjList:F,spatialMaps:v,groupAlignments:w}}return this.dataStructures}setElementForId(w,F){this.elements.set(w,F)}getElementById(w){return this.elements.get(w)}getConfig(){return ar({...xr,...nr().architecture})}getConfigField(w){return this.getConfig()[w]}},Ir=ct((w,F)=>{Ze(w,F),w.groups.map(M=>F.addGroup(M)),w.services.map(M=>F.addService({...M,type:"service"})),w.junctions.map(M=>F.addJunction({...M,type:"junction"})),w.edges.map(M=>F.addEdge(M)),w.alignments?.map(M=>F.addLayoutHint({direction:M.direction,members:[...M.members]}))},"populateDb"),Ue={parser:{yy:void 0},parse:ct(async w=>{const F=await gr("architecture",w);Se.debug(F);const M=Ue.parser?.yy;if(!(M instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ir(F,M)},"parse")},Rr=ct(w=>`
           .edge {
             stroke-width: ${w.archEdgeWidth};
             stroke: ${w.archEdgeColor};
        diff --git a/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-BNGA-QWb.js b/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-SpTDtKeh.js
        similarity index 99%
        rename from apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-BNGA-QWb.js
        rename to apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-SpTDtKeh.js
        index 34ce69ae8..e1d91f5bf 100644
        --- a/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-BNGA-QWb.js
        +++ b/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-SpTDtKeh.js
        @@ -1,4 +1,4 @@
        -import{g as Pe}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{aC as Fe,aD as xe,aE as Me,aF as Ke,aG as Ye,aH as We,aI as Ve,aJ as Ue,aK as He,aL as Xe,aM as je,aN as Ge,aO as qe,aP as Je,aQ as Ze,aR as Qe,aS as $e,aT as et,aU as tt,aV as st,aW as rt,aX as it,aY as at,aZ as nt,a_ as ot,_ as u,A as Y,j as X,a$ as ct,d as lt,l as y,r as ut,u as gt,c as Le,a7 as ht,ay as dt,ax as pt,az as ft,k as bt,b0 as St,ah as me,ai as xt}from"./mermaid.core-BusHtpbx.js";import{c as Lt}from"./channel-DZ2XEbLN.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";function mt(e){return Array.isArray(e)}function yt(e){if(Fe(e))return e;const a=xe(e);if(!wt(e))return{};if(mt(e)){const r=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(r.index=e.index,r.input=e.input),r}if(Me(e)){const r=e,l=r.constructor;return new l(r.buffer,r.byteOffset,r.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const r=e,l=r.buffer,d=r.byteOffset,s=r.byteLength,h=new ArrayBuffer(s),x=new Uint8Array(l,d,s);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const r=e.constructor,l=new r(e.valueOf());return a==="[object String]"?_t(l,e):se(l,e),l}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const r=e,l=new RegExp(r.source,r.flags);return l.lastIndex=r.lastIndex,l}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const r=e,l=new Map;return r.forEach((d,s)=>{l.set(s,d)}),l}if(a==="[object Set]"){const r=e,l=new Set;return r.forEach(d=>{l.add(d)}),l}if(a==="[object Arguments]"){const r=e,l={};return se(l,r),l.length=r.length,l[Symbol.iterator]=r[Symbol.iterator],l}const o={};return kt(o,e),se(o,e),Et(o,e),o}function wt(e){switch(xe(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case je:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Et(e,a){const o=Object.getOwnPropertySymbols(a);for(let r=0;r=o)&&(e[r]=a[r])}function kt(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,g,i,c){for(i=i||{},c=v.length;c--;i[v[c]]=g);return i},"o"),a=[1,15],o=[1,7],r=[1,13],l=[1,14],d=[1,19],s=[1,16],h=[1,17],x=[1,18],m=[8,30],S=[8,10,21,28,29,30,31,39,43,46],f=[1,23],L=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],_={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(g,i,c,p,E,t,M){var n=t.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",t[n-1]),p.setHierarchy(t[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",t[n]),typeof t[n].length=="number"?this.$=t[n]:this.$=[t[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",t[n-1]),this.$=[t[n-1]].concat(t[n]);break;case 14:p.getLogger().debug("Rule: link: ",t[n],g),this.$={edgeTypeStr:t[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",t[n-3],t[n-1],t[n]),this.$={edgeTypeStr:t[n],label:t[n-1]};break;case 18:const P=parseInt(t[n]),W=p.generateId();this.$={id:W,type:"space",label:"",width:P,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",t[n-2],t[n-1],t[n]," typestr: ",t[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(t[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(t[n-1].edgeTypeStr),Z=p.edgeStrToThickness(t[n-1].edgeTypeStr),D=p.edgeStrToPattern(t[n-1].edgeTypeStr);this.$=[{id:t[n-2].id,label:t[n-2].label,type:t[n-2].type,directions:t[n-2].directions},{id:t[n-2].id+"-"+t[n].id,start:t[n-2].id,end:t[n].id,label:t[n-1].label,type:"edge",thickness:Z,pattern:D,directions:t[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[n-1],t[n]),this.$={id:t[n-1].id,label:t[n-1].label,type:p.typeStr2Type(t[n-1].typeStr),directions:t[n-1].directions,widthInColumns:parseInt(t[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",t[n]),this.$={id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",t[n]),this.$={type:"column-setting",columns:t[n]==="auto"?-1:parseInt(t[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",t[n-2],t[n-1]),p.generateId(),this.$={...t[n-2],type:"composite",children:t[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",t[n-2],t[n-1],t[n]);const A=p.generateId();this.$={id:A,type:"composite",label:"",children:t[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",t[n]),this.$={id:t[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[n-1],t[n]),this.$={id:t[n-1],label:t[n].label,typeStr:t[n].typeStr,directions:t[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",t[n]),this.$=[t[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",t[n-1],t[n]),this.$=[t[n-1]].concat(t[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",t[n-2],t[n-1],t[n]),this.$={typeStr:t[n-2]+t[n],label:t[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[n-3],t[n-2]," #3:",t[n-1],t[n]),this.$={typeStr:t[n-3]+t[n],label:t[n-2],directions:t[n-1]};break;case 35:case 36:this.$={type:"classDef",id:t[n-1].trim(),css:t[n].trim()};break;case 37:this.$={type:"applyClass",id:t[n-1].trim(),styleClass:t[n].trim()};break;case 38:this.$={type:"applyStyles",id:t[n-1].trim(),stylesStr:t[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{8:[1,20]},e(m,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:r,29:l,31:d,39:s,43:h,46:x}),e(S,[2,16],{14:22,15:f,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(w,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:d},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(m,[2,13]),{26:35,31:d},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:L,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(S,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(g,i){if(i.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=i,c}},"parseError"),parse:u(function(g){var i=this,c=[0],p=[],E=[null],t=[],M=this.table,n="",P=0,W=0,J=2,V=1,Z=t.slice.call(arguments,1),D=Object.create(this.lexer),A={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(A.yy[Q]=this.yy[Q]);D.setInput(g,A.yy),A.yy.lexer=D,A.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;t.push($);var Be=D.options&&D.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(I){c.length=c.length-2*I,E.length=E.length-I,t.length=t.length-I}u(Re,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,F={},U,B,pe,H;;){if(R=c[c.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=M[R]&&M[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";H=[];for(U in M[R])this.terminals_[U]&&U>J&&H.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(P+1)+`:
        +import{g as Pe}from"./chunk-5VM5RSS4-Ny2gwX65.js";import{aC as Fe,aD as xe,aE as Me,aF as Ke,aG as Ye,aH as We,aI as Ve,aJ as Ue,aK as He,aL as Xe,aM as je,aN as Ge,aO as qe,aP as Je,aQ as Ze,aR as Qe,aS as $e,aT as et,aU as tt,aV as st,aW as rt,aX as it,aY as at,aZ as nt,a_ as ot,_ as u,A as Y,j as X,a$ as ct,d as lt,l as y,r as ut,u as gt,c as Le,a7 as ht,ay as dt,ax as pt,az as ft,k as bt,b0 as St,ah as me,ai as xt}from"./mermaid.core-CwGP16Dm.js";import{c as Lt}from"./channel-BpqL3HJE.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";function mt(e){return Array.isArray(e)}function yt(e){if(Fe(e))return e;const a=xe(e);if(!wt(e))return{};if(mt(e)){const r=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(r.index=e.index,r.input=e.input),r}if(Me(e)){const r=e,l=r.constructor;return new l(r.buffer,r.byteOffset,r.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const r=e,l=r.buffer,d=r.byteOffset,s=r.byteLength,h=new ArrayBuffer(s),x=new Uint8Array(l,d,s);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const r=e.constructor,l=new r(e.valueOf());return a==="[object String]"?_t(l,e):se(l,e),l}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const r=e,l=new RegExp(r.source,r.flags);return l.lastIndex=r.lastIndex,l}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const r=e,l=new Map;return r.forEach((d,s)=>{l.set(s,d)}),l}if(a==="[object Set]"){const r=e,l=new Set;return r.forEach(d=>{l.add(d)}),l}if(a==="[object Arguments]"){const r=e,l={};return se(l,r),l.length=r.length,l[Symbol.iterator]=r[Symbol.iterator],l}const o={};return kt(o,e),se(o,e),Et(o,e),o}function wt(e){switch(xe(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case je:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Et(e,a){const o=Object.getOwnPropertySymbols(a);for(let r=0;r=o)&&(e[r]=a[r])}function kt(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,g,i,c){for(i=i||{},c=v.length;c--;i[v[c]]=g);return i},"o"),a=[1,15],o=[1,7],r=[1,13],l=[1,14],d=[1,19],s=[1,16],h=[1,17],x=[1,18],m=[8,30],S=[8,10,21,28,29,30,31,39,43,46],f=[1,23],L=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],_={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(g,i,c,p,E,t,M){var n=t.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",t[n-1]),p.setHierarchy(t[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",t[n]),typeof t[n].length=="number"?this.$=t[n]:this.$=[t[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",t[n-1]),this.$=[t[n-1]].concat(t[n]);break;case 14:p.getLogger().debug("Rule: link: ",t[n],g),this.$={edgeTypeStr:t[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",t[n-3],t[n-1],t[n]),this.$={edgeTypeStr:t[n],label:t[n-1]};break;case 18:const P=parseInt(t[n]),W=p.generateId();this.$={id:W,type:"space",label:"",width:P,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",t[n-2],t[n-1],t[n]," typestr: ",t[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(t[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(t[n-1].edgeTypeStr),Z=p.edgeStrToThickness(t[n-1].edgeTypeStr),D=p.edgeStrToPattern(t[n-1].edgeTypeStr);this.$=[{id:t[n-2].id,label:t[n-2].label,type:t[n-2].type,directions:t[n-2].directions},{id:t[n-2].id+"-"+t[n].id,start:t[n-2].id,end:t[n].id,label:t[n-1].label,type:"edge",thickness:Z,pattern:D,directions:t[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[n-1],t[n]),this.$={id:t[n-1].id,label:t[n-1].label,type:p.typeStr2Type(t[n-1].typeStr),directions:t[n-1].directions,widthInColumns:parseInt(t[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",t[n]),this.$={id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",t[n]),this.$={type:"column-setting",columns:t[n]==="auto"?-1:parseInt(t[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",t[n-2],t[n-1]),p.generateId(),this.$={...t[n-2],type:"composite",children:t[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",t[n-2],t[n-1],t[n]);const A=p.generateId();this.$={id:A,type:"composite",label:"",children:t[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",t[n]),this.$={id:t[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[n-1],t[n]),this.$={id:t[n-1],label:t[n].label,typeStr:t[n].typeStr,directions:t[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",t[n]),this.$=[t[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",t[n-1],t[n]),this.$=[t[n-1]].concat(t[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",t[n-2],t[n-1],t[n]),this.$={typeStr:t[n-2]+t[n],label:t[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[n-3],t[n-2]," #3:",t[n-1],t[n]),this.$={typeStr:t[n-3]+t[n],label:t[n-2],directions:t[n-1]};break;case 35:case 36:this.$={type:"classDef",id:t[n-1].trim(),css:t[n].trim()};break;case 37:this.$={type:"applyClass",id:t[n-1].trim(),styleClass:t[n].trim()};break;case 38:this.$={type:"applyStyles",id:t[n-1].trim(),stylesStr:t[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{8:[1,20]},e(m,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:r,29:l,31:d,39:s,43:h,46:x}),e(S,[2,16],{14:22,15:f,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(w,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:d},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(m,[2,13]),{26:35,31:d},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:L,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(S,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(g,i){if(i.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=i,c}},"parseError"),parse:u(function(g){var i=this,c=[0],p=[],E=[null],t=[],M=this.table,n="",P=0,W=0,J=2,V=1,Z=t.slice.call(arguments,1),D=Object.create(this.lexer),A={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(A.yy[Q]=this.yy[Q]);D.setInput(g,A.yy),A.yy.lexer=D,A.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;t.push($);var Be=D.options&&D.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(I){c.length=c.length-2*I,E.length=E.length-I,t.length=t.length-I}u(Re,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,F={},U,B,pe,H;;){if(R=c[c.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=M[R]&&M[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";H=[];for(U in M[R])this.terminals_[U]&&U>J&&H.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(P+1)+`:
         `+D.showPosition()+`
         Expecting `+H.join(", ")+", got '"+(this.terminals_[N]||N)+"'":te="Parse error on line "+(P+1)+": Unexpected "+(N==V?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(te,{text:D.match,token:this.terminals_[N]||N,line:D.yylineno,loc:$,expected:H})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+N);switch(C[0]){case 1:c.push(N),E.push(D.yytext),t.push(D.yylloc),c.push(C[1]),N=null,W=D.yyleng,n=D.yytext,P=D.yylineno,$=D.yylloc;break;case 2:if(B=this.productions_[C[1]][1],F.$=E[E.length-B],F._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},Be&&(F._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),ee=this.performAction.apply(F,[n,W,P,A.yy,C[1],E,t].concat(Z)),typeof ee<"u")return ee;B&&(c=c.slice(0,-1*B*2),E=E.slice(0,-1*B),t=t.slice(0,-1*B)),c.push(this.productions_[C[1]][0]),E.push(F.$),t.push(F._$),pe=M[c[c.length-2]][c[c.length-1]],c.push(pe);break;case 3:return!0}}return!0},"parse")},T=(function(){var v={EOF:1,parseError:u(function(i,c){if(this.yy.parser)this.yy.parser.parseError(i,c);else throw new Error(i)},"parseError"),setInput:u(function(g,i){return this.yy=i||this.yy||{},this._input=g,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:u(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var i=g.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:u(function(g){var i=g.length,c=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var p=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),c.length-1&&(this.yylineno-=c.length-1);var E=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:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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).
         `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(g){this.unput(this.match.slice(g))},"less"),pastInput:u(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var g=this.pastInput(),i=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
        diff --git a/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js b/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-QbPQAL-O.js
        similarity index 99%
        rename from apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js
        rename to apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-QbPQAL-O.js
        index 85010360d..f2c73d687 100644
        --- a/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js
        +++ b/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-QbPQAL-O.js
        @@ -1,4 +1,4 @@
        -import{d as Ne}from"./chunk-F27PBJKO-CGsciVEq.js";import{s as Ae,g as Le,a as Ie,b as Me,_ as d,c as Ct,l as ce,d as Be,e as Ve,f as Ot,h as Ye,i as ye,j as Kt,w as Fe,k as Jt,m as ue}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Yt=(function(){var t=d(function(yt,m,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=m);return x},"o"),e=[1,24],r=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],kt=[14,42],jt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],k=[1,83],T=[1,84],C=[1,85],R=[12,14,42],re=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,wt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(kt,[2,14]),t(jt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Rt,[2,19]),t(Rt,[2,20]),{25:[1,78]},{27:[1,79]},t(Rt,[2,23]),{35:80,75:81,76:S,77:k,79:T,80:C},{35:86,75:81,76:S,77:k,79:T,80:C},{35:87,75:81,76:S,77:k,79:T,80:C},{35:88,75:81,76:S,77:k,79:T,80:C},{35:89,75:81,76:S,77:k,79:T,80:C},{35:90,75:81,76:S,77:k,79:T,80:C},{35:91,75:81,76:S,77:k,79:T,80:C},{35:92,75:81,76:S,77:k,79:T,80:C},{35:93,75:81,76:S,77:k,79:T,80:C},{35:94,75:81,76:S,77:k,79:T,80:C},{35:95,75:81,76:S,77:k,79:T,80:C},{35:96,75:81,76:S,77:k,79:T,80:C},{35:97,75:81,76:S,77:k,79:T,80:C},{35:98,75:81,76:S,77:k,79:T,80:C},{35:99,75:81,76:S,77:k,79:T,80:C},{35:100,75:81,76:S,77:k,79:T,80:C},{35:101,75:81,76:S,77:k,79:T,80:C},{35:102,75:81,76:S,77:k,79:T,80:C},{35:103,75:81,76:S,77:k,79:T,80:C},{35:104,75:81,76:S,77:k,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:k,79:T,80:C},{35:106,75:81,76:S,77:k,79:T,80:C},{35:107,75:81,76:S,77:k,79:T,80:C},{35:108,75:81,76:S,77:k,79:T,80:C},{35:109,75:81,76:S,77:k,79:T,80:C},{35:110,75:81,76:S,77:k,79:T,80:C},{35:111,75:81,76:S,77:k,79:T,80:C},{35:112,75:81,76:S,77:k,79:T,80:C},{35:113,75:81,76:S,77:k,79:T,80:C},{35:114,75:81,76:S,77:k,79:T,80:C},{35:115,75:81,76:S,77:k,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:k,79:T,80:C},{35:120,75:81,76:S,77:k,79:T,80:C},{35:121,75:81,76:S,77:k,79:T,80:C},{35:122,75:81,76:S,77:k,79:T,80:C},{35:123,75:81,76:S,77:k,79:T,80:C},{35:124,75:81,76:S,77:k,79:T,80:C},{35:125,75:81,76:S,77:k,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(jt,[2,17],{21:22,19:130,22:e,23:r,24:a,26:u,28:i}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:a,26:u,28:i,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Rt,[2,21]),t(Rt,[2,22]),t(R,[2,39]),t(re,[2,71],{75:81,35:132,76:S,77:k,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(jt,[2,18]),t(kt,[2,38]),t(re,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(zt,[2,25]),t(zt,[2,26],{12:[1,138]}),t(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],wt=this.table,p="",xt=0,ae=0,we=2,ie=1,Oe=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(vt.yy[Xt]=this.yy[Xt]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var qt=A.yylloc;o.push(qt);var Pe=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(De,"popStack");function oe(){var B;return B=_.pop()||A.lex()||ie,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(oe,"lex");for(var M,Et,V,Ht,Tt={},Mt,j,le,Bt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=oe()),V=wt[Et]&&wt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Qt="";Bt=[];for(Mt in wt[Et])this.terminals_[Mt]&&Mt>we&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Qt="Parse error on line "+(xt+1)+`:
        +import{d as Ne}from"./chunk-F27PBJKO-pJCmv4XH.js";import{s as Ae,g as Le,a as Ie,b as Me,_ as d,c as Ct,l as ce,d as Be,e as Ve,f as Ot,h as Ye,i as ye,j as Kt,w as Fe,k as Jt,m as ue}from"./mermaid.core-CwGP16Dm.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var Yt=(function(){var t=d(function(yt,m,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=m);return x},"o"),e=[1,24],r=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],kt=[14,42],jt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],k=[1,83],T=[1,84],C=[1,85],R=[12,14,42],re=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,wt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(kt,[2,14]),t(jt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Rt,[2,19]),t(Rt,[2,20]),{25:[1,78]},{27:[1,79]},t(Rt,[2,23]),{35:80,75:81,76:S,77:k,79:T,80:C},{35:86,75:81,76:S,77:k,79:T,80:C},{35:87,75:81,76:S,77:k,79:T,80:C},{35:88,75:81,76:S,77:k,79:T,80:C},{35:89,75:81,76:S,77:k,79:T,80:C},{35:90,75:81,76:S,77:k,79:T,80:C},{35:91,75:81,76:S,77:k,79:T,80:C},{35:92,75:81,76:S,77:k,79:T,80:C},{35:93,75:81,76:S,77:k,79:T,80:C},{35:94,75:81,76:S,77:k,79:T,80:C},{35:95,75:81,76:S,77:k,79:T,80:C},{35:96,75:81,76:S,77:k,79:T,80:C},{35:97,75:81,76:S,77:k,79:T,80:C},{35:98,75:81,76:S,77:k,79:T,80:C},{35:99,75:81,76:S,77:k,79:T,80:C},{35:100,75:81,76:S,77:k,79:T,80:C},{35:101,75:81,76:S,77:k,79:T,80:C},{35:102,75:81,76:S,77:k,79:T,80:C},{35:103,75:81,76:S,77:k,79:T,80:C},{35:104,75:81,76:S,77:k,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:k,79:T,80:C},{35:106,75:81,76:S,77:k,79:T,80:C},{35:107,75:81,76:S,77:k,79:T,80:C},{35:108,75:81,76:S,77:k,79:T,80:C},{35:109,75:81,76:S,77:k,79:T,80:C},{35:110,75:81,76:S,77:k,79:T,80:C},{35:111,75:81,76:S,77:k,79:T,80:C},{35:112,75:81,76:S,77:k,79:T,80:C},{35:113,75:81,76:S,77:k,79:T,80:C},{35:114,75:81,76:S,77:k,79:T,80:C},{35:115,75:81,76:S,77:k,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:k,79:T,80:C},{35:120,75:81,76:S,77:k,79:T,80:C},{35:121,75:81,76:S,77:k,79:T,80:C},{35:122,75:81,76:S,77:k,79:T,80:C},{35:123,75:81,76:S,77:k,79:T,80:C},{35:124,75:81,76:S,77:k,79:T,80:C},{35:125,75:81,76:S,77:k,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(jt,[2,17],{21:22,19:130,22:e,23:r,24:a,26:u,28:i}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:a,26:u,28:i,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Rt,[2,21]),t(Rt,[2,22]),t(R,[2,39]),t(re,[2,71],{75:81,35:132,76:S,77:k,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(jt,[2,18]),t(kt,[2,38]),t(re,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(zt,[2,25]),t(zt,[2,26],{12:[1,138]}),t(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],wt=this.table,p="",xt=0,ae=0,we=2,ie=1,Oe=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(vt.yy[Xt]=this.yy[Xt]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var qt=A.yylloc;o.push(qt);var Pe=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(De,"popStack");function oe(){var B;return B=_.pop()||A.lex()||ie,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(oe,"lex");for(var M,Et,V,Ht,Tt={},Mt,j,le,Bt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=oe()),V=wt[Et]&&wt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Qt="";Bt=[];for(Mt in wt[Et])this.terminals_[Mt]&&Mt>we&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Qt="Parse error on line "+(xt+1)+`:
         `+A.showPosition()+`
         Expecting `+Bt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Qt="Parse error on line "+(xt+1)+": Unexpected "+(M==ie?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Qt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:qt,expected:Bt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Et+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,ae=A.yyleng,p=A.yytext,xt=A.yylineno,qt=A.yylloc;break;case 2:if(j=this.productions_[V[1]][1],Tt.$=D[D.length-j],Tt._$={first_line:o[o.length-(j||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(j||1)].first_column,last_column:o[o.length-1].last_column},Pe&&(Tt._$.range=[o[o.length-(j||1)].range[0],o[o.length-1].range[1]]),Ht=this.performAction.apply(Tt,[p,ae,xt,vt.yy,V[1],D,o].concat(Oe)),typeof Ht<"u")return Ht;j&&(E=E.slice(0,-1*j*2),D=D.slice(0,-1*j),o=o.slice(0,-1*j)),E.push(this.productions_[V[1]][0]),D.push(Tt.$),o.push(Tt._$),le=wt[E[E.length-2]][E[E.length-1]],E.push(le);break;case 3:return!0}}return!0},"parse")},Re=(function(){var yt={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(m,x){return this.yy=x||this.yy||{},this._input=m,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:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var x=m.length,E=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=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),E.length-1&&(this.yylineno-=E.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:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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).
         `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
        diff --git a/apps/pythinker-code/dist-web/assets/channel-BpqL3HJE.js b/apps/pythinker-code/dist-web/assets/channel-BpqL3HJE.js
        new file mode 100644
        index 000000000..b71eb5aa0
        --- /dev/null
        +++ b/apps/pythinker-code/dist-web/assets/channel-BpqL3HJE.js
        @@ -0,0 +1 @@
        +import{U as a,C as n}from"./mermaid.core-CwGP16Dm.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
        diff --git a/apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js b/apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js
        deleted file mode 100644
        index 0dd861988..000000000
        --- a/apps/pythinker-code/dist-web/assets/channel-DZ2XEbLN.js
        +++ /dev/null
        @@ -1 +0,0 @@
        -import{U as a,C as n}from"./mermaid.core-BusHtpbx.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-CPFb-YMA.js b/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-ZQItsBh7.js
        similarity index 67%
        rename from apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-CPFb-YMA.js
        rename to apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-ZQItsBh7.js
        index 535b24d4d..a18eaf3f4 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-CPFb-YMA.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-ZQItsBh7.js
        @@ -1 +1 @@
        -import{_ as i}from"./mermaid.core-BusHtpbx.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
        +import{_ as i}from"./mermaid.core-CwGP16Dm.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-BX7DTcSO.js b/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-Ny2gwX65.js
        similarity index 83%
        rename from apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-BX7DTcSO.js
        rename to apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-Ny2gwX65.js
        index b4a4251ce..4eb808fe2 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-BX7DTcSO.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-Ny2gwX65.js
        @@ -1,4 +1,4 @@
        -import{_ as e}from"./mermaid.core-BusHtpbx.js";var l=e(()=>`
        +import{_ as e}from"./mermaid.core-CwGP16Dm.js";var l=e(()=>`
           /* Font Awesome icon styling - consolidated */
           .label-icon {
             display: inline-block;
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-CGsciVEq.js b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-pJCmv4XH.js
        similarity index 96%
        rename from apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-CGsciVEq.js
        rename to apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-pJCmv4XH.js
        index 6ad492677..b74f2ed03 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-CGsciVEq.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-pJCmv4XH.js
        @@ -1 +1 @@
        -import{_ as i,j as l,n as d,o}from"./mermaid.core-BusHtpbx.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,h as b,g as c,x as d,m as e,w as f,f as g,y as h};
        +import{_ as i,j as l,n as d,o}from"./mermaid.core-CwGP16Dm.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,h as b,g as c,x as d,m as e,w as f,f as g,y as h};
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CIn6rVI9.js b/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CPa57YXh.js
        similarity index 99%
        rename from apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CIn6rVI9.js
        rename to apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CPa57YXh.js
        index 4be647c24..c6c4025ab 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CIn6rVI9.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CPa57YXh.js
        @@ -1,4 +1,4 @@
        -import{g as te}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as ee}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as f,l as _,c as $,y as se,z as ie,a as re,b as ae,g as ne,s as oe,p as le,q as ce,aa as he,k as j,r as ue,j as bt}from"./mermaid.core-BusHtpbx.js";import{f as de}from"./chunk-F27PBJKO-CGsciVEq.js";import{p as fe}from"./purify.es-5AjVNlXF.js";var vt=(function(){var t=f(function(V,a,u,r){for(u=u||{},r=V.length;r--;u[V[r]]=a);return u},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],x=[1,20],k=[1,21],d=[1,22],L=[1,23],R=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],I=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,u,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:N,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:N,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,u){if(u.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=u,r}},"parseError"),parse:f(function(a){var u=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(w){r.length=r.length-2*w,E.length=E.length-w,i.length=i.length-w}f(Zt,"popStack");function Lt(){var w;return w=g.pop()||b.lex()||Q,typeof w!="number"&&(w instanceof Array&&(g=w,w=g.pop()),w=u.symbols_[w]||w),w}f(Lt,"lex");for(var A,W,O,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?O=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),O=B[W]&&B[W][A]),typeof O>"u"||!O.length||!O[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`:
        +import{g as te}from"./chunk-XXDRQBXY-HOEikrp0.js";import{s as ee}from"./chunk-POPQ4Y6H-BFcN0waq.js";import{_ as f,l as _,c as $,y as se,z as ie,a as re,b as ae,g as ne,s as oe,p as le,q as ce,aa as he,k as j,r as ue,j as bt}from"./mermaid.core-CwGP16Dm.js";import{f as de}from"./chunk-F27PBJKO-pJCmv4XH.js";import{p as fe}from"./purify.es-5AjVNlXF.js";var vt=(function(){var t=f(function(V,a,u,r){for(u=u||{},r=V.length;r--;u[V[r]]=a);return u},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],x=[1,20],k=[1,21],d=[1,22],L=[1,23],R=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],I=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,u,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:N,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:N,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,u){if(u.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=u,r}},"parseError"),parse:f(function(a){var u=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(w){r.length=r.length-2*w,E.length=E.length-w,i.length=i.length-w}f(Zt,"popStack");function Lt(){var w;return w=g.pop()||b.lex()||Q,typeof w!="number"&&(w instanceof Array&&(g=w,w=g.pop()),w=u.symbols_[w]||w),w}f(Lt,"lex");for(var A,W,O,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?O=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),O=B[W]&&B[W][A]),typeof O>"u"||!O.length||!O[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`:
         `+b.showPosition()+`
         Expecting `+dt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(Y+1)+": Unexpected "+(A==Q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:Et,expected:dt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(O[0]){case 1:r.push(A),E.push(b.yytext),i.push(b.yylloc),r.push(O[1]),A=null,K=b.yyleng,l=b.yytext,Y=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[O[1]][1],X.$=E[E.length-G],X._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},Qt&&(X._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(X,[l,K,Y,U.yy,O[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[O[1]][0]),E.push(X.$),i.push(X._$),It=B[r[r.length-2]][r[r.length-1]],r.push(It);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(u,r){if(this.yy.parser)this.yy.parser.parseError(u,r);else throw new Error(u)},"parseError"),setInput:f(function(a,u){return this.yy=u||this.yy||{},this._input=a,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:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var u=a.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var u=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var g=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),r.length-1&&(this.yylineno-=r.length-1);var E=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:r?(r.length===g.length?this.yylloc.first_column:0)+g[g.length-r.length].length-r[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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).
         `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),u=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-D9ICAwD_.js b/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-C_cClkrQ.js
        similarity index 71%
        rename from apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-D9ICAwD_.js
        rename to apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-C_cClkrQ.js
        index 156bac4e9..85ec3deaa 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-D9ICAwD_.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-C_cClkrQ.js
        @@ -1 +1 @@
        -import{_ as i}from"./mermaid.core-BusHtpbx.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
        +import{_ as i}from"./mermaid.core-CwGP16Dm.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-Bvdjn-Qn.js b/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-JwRtGJJ3.js
        similarity index 99%
        rename from apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-Bvdjn-Qn.js
        rename to apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-JwRtGJJ3.js
        index 260e0bb3c..ce682198e 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-Bvdjn-Qn.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-JwRtGJJ3.js
        @@ -1,4 +1,4 @@
        -import{g as tt}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{g as st}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as it}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as f,l as Ie,c as F,x as at,y as nt,z as Oe,j as de,b as rt,a as ut,s as lt,g as ct,p as ot,q as ht,k as I,r as dt,t as pt,i as At,a6 as G}from"./mermaid.core-BusHtpbx.js";import{f as ft}from"./chunk-F27PBJKO-CGsciVEq.js";import{p as gt}from"./purify.es-5AjVNlXF.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
        +import{g as tt}from"./chunk-5VM5RSS4-Ny2gwX65.js";import{g as st}from"./chunk-XXDRQBXY-HOEikrp0.js";import{s as it}from"./chunk-POPQ4Y6H-BFcN0waq.js";import{_ as f,l as Ie,c as F,x as at,y as nt,z as Oe,j as de,b as rt,a as ut,s as lt,g as ct,p as ot,q as ht,k as I,r as dt,t as pt,i as At,a6 as G}from"./mermaid.core-CwGP16Dm.js";import{f as ft}from"./chunk-F27PBJKO-pJCmv4XH.js";import{p as gt}from"./purify.es-5AjVNlXF.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
         `+D.showPosition()+`
         Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,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:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var l=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),p.length-1&&(this.yylineno-=p.length-1);var C=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:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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).
         `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BpzExJjb.js b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BFcN0waq.js
        similarity index 87%
        rename from apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BpzExJjb.js
        rename to apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BFcN0waq.js
        index ae8fee14f..b7a195d24 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BpzExJjb.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BFcN0waq.js
        @@ -1 +1 @@
        -import{_ as a,d as w,l as x}from"./mermaid.core-BusHtpbx.js";var B=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=d(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),d=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{B as s};
        +import{_ as a,d as w,l as x}from"./mermaid.core-CwGP16Dm.js";var B=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=d(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),d=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{B as s};
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D3M7Gbkt.js b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-CWyh6gIW.js
        similarity index 99%
        rename from apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D3M7Gbkt.js
        rename to apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-CWyh6gIW.js
        index da54fa640..bc4adda76 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D3M7Gbkt.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-CWyh6gIW.js
        @@ -1,4 +1,4 @@
        -import{_ as p,l as w,G as L,A as E,r as X,X as I,d as G,i as H,c as q}from"./mermaid.core-BusHtpbx.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,q()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),X(),w.debug("[Railroad] Database cleared")},"clear"),_=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),W=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,`
        +import{_ as p,l as w,G as L,A as E,r as X,X as I,d as G,i as H,c as q}from"./mermaid.core-CwGP16Dm.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,q()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),X(),w.debug("[Railroad] Database cleared")},"clear"),_=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),W=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,`
         `),w.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ee=p(()=>N,"getAccDescription"),te=_,re=W,ie={clear:U,setTitle:_,getTitle:W,addRule:j,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},g={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),B=p(e=>e?Object.keys(e).every(i=>i==="railroad"||oe.has(i)):!1,"isRailroadStyleOptions"),le=p(e=>e?"railroad"in e&&e.railroad?e.railroad:B(e)?e:{}:{},"extractRailroadOverrides"),se=p(e=>{if(!e||B(e))return{};const{railroad:i,svgId:a,theme:r,look:t,...n}=e;return n},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ne.test(a)?a:i},"sanitizeColorValue"),Y=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ae.test(a)?a:i},"sanitizeFontFamilyValue"),S=p((e,i)=>{const a=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(a)&&a>=0?a:i},"sanitizeNumberValue"),de=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ce=p(e=>{const i=Y(e.fontFamily,g.fontFamily),a=de(e.fontSize)??g.fontSize;return{...g,fontFamily:i,fontSize:a,terminalFill:m(e.secondBkg??e.secondaryColor,g.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,g.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,g.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,g.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,g.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,g.nonTerminalTextColor),lineColor:m(e.lineColor,g.lineColor),markerFill:m(e.lineColor,g.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,g.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,g.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,g.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,g.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,g.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,g.ruleNameColor)}},"buildThemeDefaults"),M=p(e=>{const i=E(),a={...I(),...i.themeVariables??{},...se(e)},r=ce(a),t={...i.railroad??{},...le(e)};return{compactMode:t.compactMode??r.compactMode,padding:S(t.padding,r.padding),verticalSeparation:S(t.verticalSeparation,r.verticalSeparation),horizontalSeparation:S(t.horizontalSeparation,r.horizontalSeparation),arcRadius:S(t.arcRadius,r.arcRadius),fontSize:S(t.fontSize,r.fontSize),fontFamily:Y(t.fontFamily,r.fontFamily),terminalFill:m(t.terminalFill,r.terminalFill),terminalStroke:m(t.terminalStroke,r.terminalStroke),terminalTextColor:m(t.terminalTextColor,r.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:m(t.lineColor,r.lineColor),strokeWidth:S(t.strokeWidth,r.strokeWidth),markerFill:m(t.markerFill,r.markerFill),commentFill:m(t.commentFill,r.commentFill),commentStroke:m(t.commentStroke,r.commentStroke),commentTextColor:m(t.commentTextColor,r.commentTextColor),specialFill:m(t.specialFill,r.specialFill),specialStroke:m(t.specialStroke,r.specialStroke),ruleNameColor:m(t.ruleNameColor,r.ruleNameColor),showMarkers:t.showMarkers??r.showMarkers,markerRadius:S(t.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),ue=p(e=>{const{fontFamily:i,fontSize:a,terminalFill:r,terminalStroke:t,terminalTextColor:n,nonTerminalFill:h,nonTerminalStroke:s,nonTerminalTextColor:o,lineColor:u,strokeWidth:c,markerFill:d,commentFill:x,commentStroke:l,commentTextColor:f,specialFill:y,specialStroke:v,ruleNameColor:C}=M(e);return`
           .railroad-diagram {
             font-family: ${i};
        diff --git a/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-DaNzL58C.js b/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-HOEikrp0.js
        similarity index 72%
        rename from apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-DaNzL58C.js
        rename to apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-HOEikrp0.js
        index dd311c2a4..89ad84110 100644
        --- a/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-DaNzL58C.js
        +++ b/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-HOEikrp0.js
        @@ -1 +1 @@
        -import{_ as a,j as o}from"./mermaid.core-BusHtpbx.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
        +import{_ as a,j as o}from"./mermaid.core-CwGP16Dm.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
        diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-BKsHmBx6.js b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-BKsHmBx6.js
        new file mode 100644
        index 000000000..2c0133c66
        --- /dev/null
        +++ b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-BKsHmBx6.js
        @@ -0,0 +1 @@
        +import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-JwRtGJJ3.js";import{_ as i}from"./mermaid.core-CwGP16Dm.js";import"./chunk-5VM5RSS4-Ny2gwX65.js";import"./chunk-XXDRQBXY-HOEikrp0.js";import"./chunk-POPQ4Y6H-BFcN0waq.js";import"./chunk-F27PBJKO-pJCmv4XH.js";import"./purify.es-5AjVNlXF.js";import"./index-Ct7MGS7v.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
        diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js
        deleted file mode 100644
        index fc8faceda..000000000
        --- a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-D8QxhnwF.js
        +++ /dev/null
        @@ -1 +0,0 @@
        -import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-Bvdjn-Qn.js";import{_ as i}from"./mermaid.core-BusHtpbx.js";import"./chunk-5VM5RSS4-BX7DTcSO.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
        diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-BKsHmBx6.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-BKsHmBx6.js
        new file mode 100644
        index 000000000..2c0133c66
        --- /dev/null
        +++ b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-BKsHmBx6.js
        @@ -0,0 +1 @@
        +import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-JwRtGJJ3.js";import{_ as i}from"./mermaid.core-CwGP16Dm.js";import"./chunk-5VM5RSS4-Ny2gwX65.js";import"./chunk-XXDRQBXY-HOEikrp0.js";import"./chunk-POPQ4Y6H-BFcN0waq.js";import"./chunk-F27PBJKO-pJCmv4XH.js";import"./purify.es-5AjVNlXF.js";import"./index-Ct7MGS7v.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
        diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js
        deleted file mode 100644
        index fc8faceda..000000000
        --- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js
        +++ /dev/null
        @@ -1 +0,0 @@
        -import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-Bvdjn-Qn.js";import{_ as i}from"./mermaid.core-BusHtpbx.js";import"./chunk-5VM5RSS4-BX7DTcSO.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
        diff --git a/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-Du_KHUbL.js b/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-CaAJcdLC.js
        similarity index 99%
        rename from apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-Du_KHUbL.js
        rename to apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-CaAJcdLC.js
        index 6eb0a4bfe..d2580c130 100644
        --- a/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-Du_KHUbL.js
        +++ b/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-CaAJcdLC.js
        @@ -1 +1 @@
        -import{b4 as lt,_ as V,l as $,j as gt}from"./mermaid.core-BusHtpbx.js";import{c as tt}from"./cytoscape.esm-CNiYdHpY.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,q;function ft(){return q||(q=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
        +import{b4 as lt,_ as V,l as $,j as gt}from"./mermaid.core-CwGP16Dm.js";import{c as tt}from"./cytoscape.esm-CNiYdHpY.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,q;function ft(){return q||(q=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
        diff --git a/apps/pythinker-code/dist-web/assets/cssMode-BYOYZWAb.js b/apps/pythinker-code/dist-web/assets/cssMode-CyvYPRSF.js
        similarity index 93%
        rename from apps/pythinker-code/dist-web/assets/cssMode-BYOYZWAb.js
        rename to apps/pythinker-code/dist-web/assets/cssMode-CyvYPRSF.js
        index 11b4698c5..ee040757a 100644
        --- a/apps/pythinker-code/dist-web/assets/cssMode-BYOYZWAb.js
        +++ b/apps/pythinker-code/dist-web/assets/cssMode-CyvYPRSF.js
        @@ -1 +1 @@
        -import{c as h,l as s}from"./editor.main-yCrGDkyO.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-Dzr62Jjp.js";import{h as y,i as U,j as T,t as x,k as j}from"./lspLanguageFeatures-Dzr62Jjp.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const A=120*1e3;class C{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>A&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-uch7pA5g.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new C(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,C as WorkerManager,U as fromPosition,T as fromRange,L as setupMode,x as toRange,j as toTextEdit};
        +import{c as h,l as s}from"./editor.main-28ipUIqH.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-CjNYtcpt.js";import{h as y,i as U,j as T,t as x,k as j}from"./lspLanguageFeatures-CjNYtcpt.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const A=120*1e3;class C{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>A&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-uch7pA5g.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new C(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,C as WorkerManager,U as fromPosition,T as fromRange,L as setupMode,x as toRange,j as toTextEdit};
        diff --git a/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BlED4Rd3.js b/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-D3VomulX.js
        similarity index 99%
        rename from apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BlED4Rd3.js
        rename to apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-D3VomulX.js
        index 87e14bb0c..800a78d6f 100644
        --- a/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BlED4Rd3.js
        +++ b/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-D3VomulX.js
        @@ -1,4 +1,4 @@
        -import{bR as et}from"./index-BZ9wqq8Z.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[`
        +import{bR as et}from"./index-Ct7MGS7v.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[`
         `,`\r
         `,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;for(;f({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
        +import{p as xt}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{s as gt,g as $t,q as bt,p as wt,a as Ct,b as vt,_ as s,l as Y,G as Dt,d as kt,r as At,D as U,A as Q,E as Tt,X as ot}from"./mermaid.core-CwGP16Dm.js";import{p as Bt}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
         	.cynefinDomain {
         		stroke: none;
         	}
        diff --git a/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DNRBAAmc.js b/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-CVrHKexT.js
        similarity index 98%
        rename from apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DNRBAAmc.js
        rename to apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-CVrHKexT.js
        index cf870605e..95f604004 100644
        --- a/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-DNRBAAmc.js
        +++ b/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-CVrHKexT.js
        @@ -1,4 +1,4 @@
        -import{_ as m,an as x,c as k,a7 as O,l as p,ao as A,ap as Y,aq as b,ar as _,as as z,at as H,au as D,av as J,aw as T,ax as X,ai as R,ag as F,ay as q,az as W}from"./mermaid.core-BusHtpbx.js";import{l as j}from"./layout-CRsCkvth.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var C=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),U=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],u=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&u.add(i),o!==d&&u.add(o)}),u.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,u=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=C(Math.max(d,t.width*.35),36,l),i=C(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+u;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-u;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const u=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:u,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:u,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(u=>{const c=t.edge(u);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:u.v,end:u.w})}else a.push({edge:c,start:u.v,end:u.w})}),d.forEach(u=>{if(u.length!==3){u.forEach(h=>a.push(h));return}u.sort((h,E)=>h.edge.selfLoop.order-E.edge.selfLoop.order);const[c,l,s]=u,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){u.forEach(h=>a.push(h));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,u,i.start,f),w=V(o,L,e,n.width??0),y=Z(o,w,L,e,n),g={...l.edge,...i,id:i.id,points:w,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const u=e.graph().rankdir;p.trace("Dir in recursive render - dir:",u);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=_(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=U(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const h=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
        +import{_ as m,an as x,c as k,a7 as O,l as p,ao as A,ap as Y,aq as b,ar as _,as as z,at as H,au as D,av as J,aw as T,ax as X,ai as R,ag as F,ay as q,az as W}from"./mermaid.core-CwGP16Dm.js";import{l as j}from"./layout-TrTUIUgx.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var C=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),U=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],u=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&u.add(i),o!==d&&u.add(o)}),u.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,u=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=C(Math.max(d,t.width*.35),36,l),i=C(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+u;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-u;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const u=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:u,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:u,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(u=>{const c=t.edge(u);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:u.v,end:u.w})}else a.push({edge:c,start:u.v,end:u.w})}),d.forEach(u=>{if(u.length!==3){u.forEach(h=>a.push(h));return}u.sort((h,E)=>h.edge.selfLoop.order-E.edge.selfLoop.order);const[c,l,s]=u,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){u.forEach(h=>a.push(h));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,u,i.start,f),w=V(o,L,e,n.width??0),y=Z(o,w,L,e,n),g={...l.edge,...i,id:i.id,points:w,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const u=e.graph().rankdir;p.trace("Dir in recursive render - dir:",u);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=_(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=U(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const h=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
          Node.id = `,y,`
          data=`,h.height,`
         Parent cluster`,a.height),e.setNode(a.id,h),e.parent(y)||(p.trace("Setting parent",y,a.id),e.setParent(y,a.id,h))}if(p.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),g?.clusterNode){p.info("Cluster identified XBX",y,g.width,e.node(y));const{ranksep:h,nodesep:E}=e.graph();g.graph.setGraph({...g.graph.graph(),ranksep:h+25,nodesep:E});const S=await oe({element:i,graph:g.graph,diagramType:r,id:d,parentCluster:e.node(y),siteConfig:f}),N=S.elem;z(g,N),g.diff=S.diff||0,p.info("New compound node after recursive render XAX",y,"width",g.width,"height",g.height),H(N,g)}else e.children(y).length>0?(p.trace("Cluster - the non recursive path XBX",y,g.id,g,g.width,"Graph:",e),p.trace(D(g.id,e)),b.set(g.id,{id:D(g.id,e),node:g})):(p.trace("Node - the non recursive path XAX",y,i,e.node(y),u),await J(i,e.node(y),{config:f,dir:u}))})),await m(async()=>{const y=e.edges().map(async function(g){const h=e.edge(g.v,g.w,g.name);if(p.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),p.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),p.info("Fix",b,"ids:",g.v,g.w,"Translating: ",b.get(g.v),b.get(g.w)),n&&h.selfLoop){if(h.selfLoop.order!==1)return;const E={...h.originalEdge,...h,id:h.selfLoop.id,startLabelLeft:h.originalEdge?.startLabelLeft??h.startLabelLeft,startLabelRight:h.originalEdge?.startLabelRight??h.startLabelRight,endLabelLeft:h.originalEdge?.endLabelLeft??h.endLabelLeft,endLabelRight:h.originalEdge?.endLabelRight??h.endLabelRight};await X(s,E),h.width=E.width,h.height=E.height,h.labelStyle=E.labelStyle;return}await X(s,h)});await Promise.all(y)},"processEdges")();const{subGraphTitleTotalMargin:w}=T(f);return{elem:o,graph:e,groups:{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o},diagramType:r,id:d,mergeSelfLoops:n,subGraphTitleTotalMargin:w}},"measureDagreGraph"),M=m(t=>{p.info("############################################# XXX"),p.info("###                Layout                 ### XXX"),p.info("############################################# XXX"),j(t)},"runDagreGraphLayout"),$=m((t,e,r)=>{const d=t.node(e);if(!d)return;const a={...d};return d?.clusterNode?a.y=(d.y??0)+r:t.children(e).length>0?a.height=(d.height??0)+r:a.y=(d.y??0)+r/2,a},"normalizeDagreNode"),v=m((t,e)=>{K.forEach(r=>{e[r]!==void 0&&(t[r]=e[r])})},"applyDagreNodeLayout"),ee=m((t,e,r,d)=>({...t,start:t.start??e,end:t.end??r,points:(t.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+d:a.y}))}),"normalizeDagreEdge"),te=m((t,e)=>{const{graph:r,mergeSelfLoops:d,subGraphTitleTotalMargin:a=0}=e,f=new Map(t.nodes.map(c=>[c.id,c]));x(r).forEach(c=>{const l=$(r,c,a);if(!l)return;v(r.node(c),l);const s=f.get(c);s&&v(s,l)});const u=a/2;return t.edges=B(r,u,{mergeSelfLoops:d}).map(({edge:c,start:l,end:s})=>ee(c,l,s,u)),t},"applyDagreLayoutResult"),re=m(async({elem:t,graph:e,groups:{clusters:r,edgePaths:d},diagramType:a,id:f,mergeSelfLoops:u,subGraphTitleTotalMargin:c})=>{let l=0;await Promise.all(x(e).map(async function(o){const n=e.node(o);if(p.info("Position XBX => "+o+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=c,p.info("A tainted cluster node XBX1",o,n.id,n.width,n.height,n.x,n.y,e.parent(o)),b.get(n.id).node=n,R(n);else if(e.children(o).length>0){p.info("A pure cluster node XBX1",o,n.id,n.x,n.y,n.width,n.height,e.parent(o)),n.height+=c,e.node(n.parentId);const L=n?.padding/2||0,w=n?.labelBBox?.height||0,y=w-L||0;p.debug("OffsetY",y,"labelHeight",w,"halfPadding",L),await F(r,n),b.get(n.id).node=n}else{const L=e.node(n.parentId);n.y+=c/2,p.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",L,L?.offsetY,n),R(n)}}));const s=c/2;return B(e,s,{mergeSelfLoops:u}).forEach(function({edge:o,start:n,end:L}){p.info("Edge "+n+" -> "+L+": "+JSON.stringify(o),o),o.points.forEach(h=>h.y+=s);const w=e.node(n),y=e.node(L),g=q(d,o,b,a,w,y,f);W(o,g)}),e.nodes().forEach(function(o){const n=e.node(o);p.info(o,n.type,n.diff),n.isGroup&&(l=n.diff)}),p.warn("Returning from recursive render XAX",t,l),{elem:t,diff:l}},"paintDagreLayoutCore"),oe=m(async t=>{const e=await I(t);return M(e.graph),await re(e)},"renderDagreSubgraph"),G=m(t=>{const e=new O({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(r=>{e.setNode(r.id,{...r}),r.parentId&&e.setParent(r.id,r.parentId)}),p.debug("Edges:",t.edges),t.edges.forEach(r=>{if(r.start===r.end){const d=r.start,a=d+"---"+d+"---1",f=d+"---"+d+"---2",u=e.node(d);e.setNode(a,{domId:a,id:a,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(a,u.parentId),e.setNode(f,{domId:f,id:f,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,u.parentId);const c=structuredClone(r),l=structuredClone(r),s=structuredClone(r),i=structuredClone(r);l.originalEdge=c,l.selfLoop={id:c.id,order:0},s.originalEdge=c,s.selfLoop={id:c.id,order:1},i.originalEdge=c,i.selfLoop={id:c.id,order:2},l.label="",l.arrowTypeEnd="none",l.endLabelLeft="",l.endLabelRight="",l.startLabelLeft="",l.id=d+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=d+"-cyclic-special-mid",i.label="",i.startLabelRight="",i.startLabelLeft="",i.arrowTypeStart="none",u.isGroup&&(l.fromCluster=d,i.toCluster=d),i.id=d+"-cyclic-special-2",i.arrowTypeStart="none",e.setEdge(d,a,l,d+"-cyclic-special-0"),e.setEdge(a,f,s,d+"-cyclic-special-1"),e.setEdge(f,d,i,d+"-cyclic-special-2")}else e.setEdge(r.start,r.end,{...r},r.id)}),A(e),{graph:e}},"prepareLayoutForDagre"),ae=m(async(t,{element:e,preparedLayout:r})=>{const d=r??G(t),a=k(),f=await I({element:e,graph:d.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:a});return d.measuredLayout=f,f},"measureDagreLayout"),ne=m((t,e)=>{const r=e.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return M(r.graph),te(t,r),r},"runDagreLayoutCore"),se=m((t,{measure:e})=>x(e.graph).map(r=>e.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ie=m((t,e,{measure:r})=>t?r.graph.node(t):void 0,"getDagreEdgeNode"),fe=Y({prepareLayout:G,measureLayout:ae,runLayoutCore:ne,paintOptions:{clusterDb:b,getNodes:se,getEdgeNode:ie,skipNode:m((t,{measure:e})=>!e.graph.hasNode(t.id),"skipNode"),isCluster:m((t,{measure:e})=>e.graph.hasNode(t.id)&&(e.graph.children(t.id)??[]).length>0,"isCluster")}});export{te as applyDagreLayoutResult,B as getEdgesToRender,ae as measureDagreLayout,G as prepareLayoutForDagre,fe as render,ne as runDagreLayoutCore};
        diff --git a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-95PLVM0c.js b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-XBWXrjhn.js
        similarity index 96%
        rename from apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-95PLVM0c.js
        rename to apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-XBWXrjhn.js
        index 865805901..f402f059b 100644
        --- a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-95PLVM0c.js
        +++ b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-XBWXrjhn.js
        @@ -1,4 +1,4 @@
        -import{I as X}from"./chunk-2Q5K7J3B-CPFb-YMA.js";import{p as z}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as N,l as A,G as Z,d as j,A as E,r as U,i as J,aj as K,E as Q,ak as ee}from"./mermaid.core-BusHtpbx.js";import{p as te}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var D=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,k=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/,re="    ";function _(n){return n.some(t=>D.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=L.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
        +import{I as X}from"./chunk-2Q5K7J3B-ZQItsBh7.js";import{p as z}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as N,l as A,G as Z,d as j,A as E,r as U,i as J,aj as K,E as Q,ak as ee}from"./mermaid.core-CwGP16Dm.js";import{p as te}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var D=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,k=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/,re="    ";function _(n){return n.some(t=>D.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=L.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
         `),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),U()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>N(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:q,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:O},I=de,he=g(n=>{z(n,I);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function C(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(C,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await K(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),$=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;$(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;$(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
         `+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=Z(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),j(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ie={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ce=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=N(Ie,n);return`
        diff --git a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DqI3S6m6.js b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-VTf2WASr.js
        similarity index 95%
        rename from apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DqI3S6m6.js
        rename to apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-VTf2WASr.js
        index c588b6165..2c38e53b9 100644
        --- a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-DqI3S6m6.js
        +++ b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-VTf2WASr.js
        @@ -1,4 +1,4 @@
        -import{p as I}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{s as _,g as E,q as D,p as F,a as G,b as P,_ as c,G as z,r as B,D as w,A as C,E as W,l as b,X as V,d as H}from"./mermaid.core-BusHtpbx.js";import{p as X}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:x},m=structuredClone(A),j=W.radar,U=c(()=>w({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;rw({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;rge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let l;K(i)?(g.debug("source frame",i.sourceFrames),l=n.frames.filter(d=>i.sourceFrames.some(c=>c.$refText===d.name)),l.forEach(d=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:d})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
        "};let c=`${P(a,t.textMaxWidth,l)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as re}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{q as oe,p as se,s as le,g as de,a as ce,b as me,_ as o,l as g,c as D,j as ue,B as xe,r as fe,D as ge,A as M,E as he,i as y,w as P,al as pe}from"./mermaid.core-CwGP16Dm.js";import{p as be,i as ve}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let l;K(i)?(g.debug("source frame",i.sourceFrames),l=n.frames.filter(d=>i.sourceFrames.some(c=>c.$refText===d.name)),l.forEach(d=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:d})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
        "};let c=`${P(a,t.textMaxWidth,l)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," "),r+="
        ")}const m=r!==void 0;m&&(c+=`

        ${r}`);const x={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,l=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,d={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,l,r),m=c+d.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+d.width,a.maxHeight=Math.max(a.maxHeight,d.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:d,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[T]:V,[S]:J},Be={[$]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:de,setAccDescription:le,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=D(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,l=a.targetBox.swimlane.y+n.swimlanePadding,d=ne(r,l),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${d} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),d?(x=r,u=l+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=l);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),l=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",d=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",l).attr("stroke",d),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var De=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:l}=D(),d=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(d,m.maxR,c,r)),m.boxes.forEach(te(d,c)),m.relations.forEach(ie(d,c,x,r)),d.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,d,l?.padding??30,l?.useMaxWidth)},"draw"),Te={draw:De},$e=o(e=>"","getStyles"),Ne=$e,Ue={parser:Ee,db:F,renderer:Te,styles:Ne};export{Ue as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-TJJN2czJ.js b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DI4JODbF.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-TJJN2czJ.js rename to apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DI4JODbF.js index 54ed61d48..e25d942d1 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-TJJN2czJ.js +++ b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DI4JODbF.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as w,X as ge,A as te,D as Q,G as ye,d as Se,l as ee,bd as B,j as Y,b as ve,a as xe,p as be,q as we,g as Ce,s as Te,E as Le,be as $e,r as Ae}from"./mermaid.core-BusHtpbx.js";import{s as Fe}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{p as Ne}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function Ee(e){for(var a=this,n=Re(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Re(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function We(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ge(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function qe(){return ae(this).eachBefore(Ye)}function Xe(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ye(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:Ee,ancestors:We,descendants:He,leaves:Ie,links:Oe,copy:qe,[Symbol.iterator]:Ge};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*R,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,E=10,q=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*E:960,x=o.nodeHeight?o.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),R=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?q+E:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?E:0).paddingRight(t=>t.children&&t.children.length>0?E:0).paddingBottom(t=>t.children&&t.children.length>0?E:0).round(!0)(R),he=ne.descendants().filter(t=>t.children&&t.children.length>0),W=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),W.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,j=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);j.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` +import{p as me}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{_ as w,X as ge,A as te,D as Q,G as ye,d as Se,l as ee,bd as B,j as Y,b as ve,a as xe,p as be,q as we,g as Ce,s as Te,E as Le,be as $e,r as Ae}from"./mermaid.core-CwGP16Dm.js";import{s as Fe}from"./chunk-POPQ4Y6H-BFcN0waq.js";import{p as Ne}from"./cynefin-OW5HDTMX-D3VomulX.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function Ee(e){for(var a=this,n=Re(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Re(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function We(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ge(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function qe(){return ae(this).eachBefore(Ye)}function Xe(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ye(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:Ee,ancestors:We,descendants:He,leaves:Ie,links:Oe,copy:qe,[Symbol.iterator]:Ge};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*R,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,E=10,q=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*E:960,x=o.nodeHeight?o.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),R=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?q+E:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?E:0).paddingRight(t=>t.children&&t.children.length>0?E:0).paddingBottom(t=>t.children&&t.children.length>0?E:0).round(!0)(R),he=ne.descendants().filter(t=>t.children&&t.children.length>0),W=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),W.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,j=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);j.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DnTJZ40O.js b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-CBgIPUY9.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DnTJZ40O.js rename to apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-CBgIPUY9.js index 0795f33c4..98c61ce85 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DnTJZ40O.js +++ b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-CBgIPUY9.js @@ -1,4 +1,4 @@ -import{p as $}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as b,D as u,G as B,d as C,l as m,b as S,a as D,p as T,q as E,g as P,s as z,A,E as F,r as W}from"./mermaid.core-BusHtpbx.js";import{p as _}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=P,this.setAccDescription=z}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{$(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},G=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())I(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:G},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` +import{p as $}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{_ as b,D as u,G as B,d as C,l as m,b as S,a as D,p as T,q as E,g as P,s as z,A,E as F,r as W}from"./mermaid.core-CwGP16Dm.js";import{p as _}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=P,this.setAccDescription=z}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{$(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},G=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())I(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:G},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DFLgXYEm.js similarity index 87% rename from apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js rename to apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DFLgXYEm.js index 48e7258e1..9fb0198ff 100644 --- a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js +++ b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DFLgXYEm.js @@ -1 +1 @@ -import{g as l,r as m,d as n}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as t,l as o}from"./mermaid.core-BusHtpbx.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; +import{g as l,r as m,d as n}from"./chunk-SVP7TREG-CWyh6gIW.js";import{p}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{_ as t,l as o}from"./mermaid.core-CwGP16Dm.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/editor.main-yCrGDkyO.js b/apps/pythinker-code/dist-web/assets/editor.main-28ipUIqH.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/editor.main-yCrGDkyO.js rename to apps/pythinker-code/dist-web/assets/editor.main-28ipUIqH.js index d51c1e950..e172caf2b 100644 --- a/apps/pythinker-code/dist-web/assets/editor.main-yCrGDkyO.js +++ b/apps/pythinker-code/dist-web/assets/editor.main-28ipUIqH.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-BYOYZWAb.js","assets/lspLanguageFeatures-Dzr62Jjp.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css","assets/purify.es-5AjVNlXF.js","assets/htmlMode-BtW7hgTd.js","assets/jsonMode-B4lkE7Oy.js","assets/tsMode-BZYSYhKr.js","assets/freemarker2-CG8OSn8H.js","assets/handlebars-vt5-G9kY.js","assets/html-BwCzbm6J.js","assets/javascript-C1Bl1QAn.js","assets/typescript-DeFWR0Bj.js","assets/liquid-OhilcA0U.js","assets/mdx-BNW26XnD.js","assets/python-BeBGma8p.js","assets/razor-L05JTUrE.js","assets/xml-BDPhTprf.js","assets/yaml-B6mJwErH.js"])))=>i.map(i=>d[i]); -import{bR as we}from"./index-BZ9wqq8Z.js";import{p as Gf}from"./purify.es-5AjVNlXF.js";function pV(){return globalThis._VSCODE_NLS_MESSAGES}function AA(){return globalThis._VSCODE_NLS_LANGUAGE}const TX=AA()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function g0(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),TX&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return g0(typeof o=="number"?mV(o,e):e,t)}function mV(o,e){const t=pV()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function H(o,e,...t){let i;typeof o=="number"?i=mV(o,e):i=e;const n=g0(i,t);return{value:n,original:e===i?n:g0(e,t)}}function RX(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const wt=window;class OA{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new OA}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function _V(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function PE(o){return OA.INSTANCE.getZoomFactor(o)}const Xm=navigator.userAgent,Ks=Xm.indexOf("Firefox")>=0,rL=Xm.indexOf("AppleWebKit")>=0,sw=Xm.indexOf("Chrome")>=0,vg=!sw&&Xm.indexOf("Safari")>=0,bV=!sw&&!vg&&rL;Xm.indexOf("Electron/")>=0;const L3=Xm.indexOf("Android")>=0;let _D=!1;if(typeof wt.matchMedia=="function"){const o=wt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=wt.matchMedia("(display-mode: fullscreen)");_D=o.matches,_V(wt,o,({matches:t})=>{_D&&e.matches||(_D=t)})}function FA(){return globalThis.MonacoEnvironment}class MX{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?dm.isErrorNoTelemetry(e)?new dm(e.message+` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-CyvYPRSF.js","assets/lspLanguageFeatures-CjNYtcpt.js","assets/index-Ct7MGS7v.js","assets/index-CgbqiNuj.css","assets/purify.es-5AjVNlXF.js","assets/htmlMode-8aWXPjFP.js","assets/jsonMode-BXAq7Usw.js","assets/tsMode-CYFtUCqN.js","assets/freemarker2-CEwDtIx2.js","assets/handlebars-CsegWH10.js","assets/html-CRf6vG9C.js","assets/javascript-BwGz2yH9.js","assets/typescript-vzwxO8Um.js","assets/liquid-DaGOgzgc.js","assets/mdx-DmjCAV2z.js","assets/python-In1HHoJC.js","assets/razor-VEmNVnW2.js","assets/xml-CV6_LXH0.js","assets/yaml-0Pg85F2J.js"])))=>i.map(i=>d[i]); +import{bR as we}from"./index-Ct7MGS7v.js";import{p as Gf}from"./purify.es-5AjVNlXF.js";function pV(){return globalThis._VSCODE_NLS_MESSAGES}function AA(){return globalThis._VSCODE_NLS_LANGUAGE}const TX=AA()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function g0(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),TX&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return g0(typeof o=="number"?mV(o,e):e,t)}function mV(o,e){const t=pV()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function H(o,e,...t){let i;typeof o=="number"?i=mV(o,e):i=e;const n=g0(i,t);return{value:n,original:e===i?n:g0(e,t)}}function RX(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const wt=window;class OA{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new OA}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function _V(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function PE(o){return OA.INSTANCE.getZoomFactor(o)}const Xm=navigator.userAgent,Ks=Xm.indexOf("Firefox")>=0,rL=Xm.indexOf("AppleWebKit")>=0,sw=Xm.indexOf("Chrome")>=0,vg=!sw&&Xm.indexOf("Safari")>=0,bV=!sw&&!vg&&rL;Xm.indexOf("Electron/")>=0;const L3=Xm.indexOf("Android")>=0;let _D=!1;if(typeof wt.matchMedia=="function"){const o=wt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=wt.matchMedia("(display-mode: fullscreen)");_D=o.matches,_V(wt,o,({matches:t})=>{_D&&e.matches||(_D=t)})}function FA(){return globalThis.MonacoEnvironment}class MX{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?dm.isErrorNoTelemetry(e)?new dm(e.message+` `+e.stack):new Error(e.message+` @@ -900,7 +900,7 @@ ${e.toString()}`}}class Xx{constructor(e=new f_,t=!1,i,n=dMe){this._services=e,t `:`\r `}};mA=ql([Ti(0,Pe)],mA);class SMe{publicLog2(){}}class eL{static{this.SCHEME="inmemory"}constructor(){const e=_e.from({scheme:eL.SCHEME,authority:"model",path:"/"});this.workspace={id:Sq,folders:[new F_e({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===eL.SCHEME?this.workspace.folders[0]:null}}function tL(o,e,t){if(!e||!(o instanceof Jx))return;const i=[];Object.keys(e).forEach(n=>{tbe(n)&&i.push([`editor.${n}`,e[n]]),t&&ibe(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let _A=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:aF.convert(e),n=new Map;for(const a of i){if(!(a instanceof fh))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=n.get(l);c||(c=[],n.set(l,c)),c.push(gi.replaceMove(L.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),r+=1,s+=l.length;return{ariaSummary:Lg(k2.bulkEditServiceSummary,s,r),isApplied:s>0}}};_A=ql([Ti(0,ei)],_A);class yMe{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Lr(e)}}let bA=class extends BTe{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};bA=ql([Ti(0,Ul),Ti(1,et)],bA);class xMe{constructor(){this._neverEmitter=new P,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class LMe extends $x{constructor(){super()}}class kMe extends pMe{constructor(){super(new Yee)}}let CA=class extends UP{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};CA=ql([Ti(0,ts),Ti(1,bi),Ti(2,ud),Ti(3,st),Ti(4,Er),Ti(5,Ie)],CA);const DMe={esmModuleLocation:void 0,label:"editorWorkerService"};let vA=class extends TP{constructor(e,t,i,n,s){super(DMe,e,t,i,n,s)}};vA=ql([Ti(0,ei),Ti(1,Xk),Ti(2,Mt),Ti(3,ti),Ti(4,he)],vA);class IMe{async playSignal(e,t){}}$e(Mt,kMe,0);$e(Pe,Jx,0);$e(Xk,pA,0);$e(SZ,mA,0);$e(sd,eL,0);$e(Zg,yMe,0);$e(ts,SMe,0);$e(Xw,vMe,0);$e(bF,CMe,0);$e(bi,Qx,0);$e($l,Fu,0);$e(_i,LMe,0);$e(er,NNe,0);$e(ei,ZP,0);$e(MO,GP,0);$e(Ie,uA,0);$e(ej,bMe,0);$e(id,p3,0);$e(ps,vme,0);$e(eo,vA,0);$e(Ow,_A,0);$e(PZ,xMe,0);$e(fs,gA,0);$e(kn,cA,0);$e(Mr,Iwe,0);$e(Pt,fA,0);$e(st,Ym,0);$e(Jn,lA,0);$e(ud,bA,0);$e(gd,KP,0);$e(Co,hA,0);$e(Jo,CA,0);$e(Er,AT,0);$e(dd,IMe,0);$e(S4,mMe,0);$e(Iz,ete,0);$e(g5,$0e,0);var Ne;(function(o){const e=new f_;for(const[l,c]of _7())e.set(l,c);const t=new Xx(e,!0);e.set(fe,t);function i(l){n||r({});const c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof hl?t.invokeFunction(d=>d.get(l)):c}o.get=i;let n=!1;const s=new P;function r(l){if(n)return t;n=!0;for(const[d,h]of _7())e.get(d)||e.set(d,h);for(const d in l)if(l.hasOwnProperty(d)){const h=We(d);e.get(h)instanceof hl&&e.set(h,l[d])}const c=Fbe();for(const d of c)try{t.createInstance(d)}catch(h){Ee(h)}return s.fire(),t}o.initialize=r;function a(l){if(n)return l();const c=new z,d=c.add(s.event(()=>{d.dispose(),c.add(l())}));return c}o.withServices=a})(Ne||(Ne={}));var EMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},j6=function(o,e){return function(t,i){e(t,i,o)}},d0;let wA=class{static{d0=this}static{this._ttpTokenizer=Vl("tokenizeToString",{createHTML(e){return e}})}constructor(e,t){this._configurationService=e,this._languageService=t}async renderCodeBlock(e,t,i){const n=Ha(i.context)?i.context:void 0;let s;e?s=this._languageService.getLanguageIdByLanguageName(e):n&&(s=n.getModel()?.getLanguageId()),s||(s=qo);const r=await nue(this._languageService,t,s),a=d0._ttpTokenizer?d0._ttpTokenizer.createHTML(r)??r:r,l=document.createElement("span");l.innerHTML=a;const c=l.querySelector(".monaco-tokenized-source");return mi(c)?(gn(c,this.getFontInfo(n)),l):document.createElement("span")}getFontInfo(e){return e?e.getOption(59):Mne({fontFamily:this._configurationService.getValue("editor").fontFamily},1)}};wA=d0=EMe([j6(0,Pe),j6(1,_i)],wA);var m3=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},It=function(o,e){return function(t,i){e(t,i,o)}};let NMe=0,q6=!1;function TMe(o){if(!o){if(q6)return;q6=!0}pee(o||wt.document.body)}let iL=class extends Pg{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f){const p={...t};p.ariaLabel=p.ariaLabel||x2.editorViewAccessibleLabel,super(e,p,{},i,n,s,r,c,d,h,u,g),l instanceof Ym?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,TMe(p.ariaContainerElement),Uue((_,b)=>i.createInstance(Tm,_,{instantHover:b},{})),Rfe(a),f.setDefaultCodeBlockRenderer(i.createInstance(wA))}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++NMe,s=q.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),A.None;const t=e.id,i=e.label,n=q.and(q.equals("editorId",this.getId()),q.deserialize(e.precondition)),s=e.keybindings,r=q.and(n,q.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(g,...f)=>Promise.resolve(e.run(this,...f)),d=new z,h=this.getId()+":"+t;if(d.add(Ye.registerCommand(h,c)),a){const g={command:{id:h,title:i},when:n,group:a,order:l};d.add(un.appendMenuItem(M.EditorContext,g))}if(Array.isArray(s))for(const g of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,g,c,r));const u=new x$(h,i,i,void 0,n,(...g)=>Promise.resolve(e.run(this,...g)),this._contextKeyService);return this._actions.set(t,u),d.add(ue(()=>{this._actions.delete(t)})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof Wx)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};iL=m3([It(2,fe),It(3,et),It(4,Pt),It(5,Ie),It(6,Ms),It(7,st),It(8,ci),It(9,bi),It(10,kn),It(11,ti),It(12,he),It(13,aa)],iL);let SA=class extends iL{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f,p,_,b){const C={...t};tL(h,C,!1);const w=c.registerEditorContainer(e);typeof C.theme=="string"&&c.setTheme(C.theme),typeof C.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!C.autoDetectHighContrast);const v=C.model;delete C.model,super(e,C,i,n,s,r,a,l,c,d,u,p,_,b),this._configurationService=h,this._standaloneThemeService=c,this._register(w);let S;if(typeof v>"u"){const x=f.getLanguageIdByMimeType(C.language)||C.language||qo;S=DY(g,f,C.value||"",x,void 0),this._ownsModel=!0}else S=v,this._ownsModel=!1;if(this._attachModel(S),S){const x={oldModelUrl:null,newModelUrl:S.uri};this._onDidChangeModel.fire(x)}}dispose(){super.dispose()}updateOptions(e){tL(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};SA=m3([It(2,fe),It(3,et),It(4,Pt),It(5,Ie),It(6,Ms),It(7,st),It(8,er),It(9,bi),It(10,Pe),It(11,kn),It(12,ei),It(13,_i),It(14,ti),It(15,he),It(16,aa)],SA);let yA=class extends Pl{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g={...t};tL(l,g,!0);const f=r.registerEditorContainer(e);typeof g.theme=="string"&&r.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!g.autoDetectHighContrast),super(e,g,{},n,i,s,u,d),this._configurationService=l,this._standaloneThemeService=r,this._register(f)}dispose(){super.dispose()}updateOptions(e){tL(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(iL,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};yA=m3([It(2,fe),It(3,Ie),It(4,et),It(5,er),It(6,bi),It(7,Pe),It(8,Jo),It(9,id),It(10,Co),It(11,dd)],yA);function DY(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` `);let r=t;return s!==-1&&(r=t.substring(0,s)),K6(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return K6(o,t,e.createById(i),n)}function K6(o,e,t,i){return o.createModel(e,t,i)}E("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},m(142,"The background color of the diff editor's header"));E("multiDiffEditor.background",ki,m(143,"The background color of the multi file diff editor"));E("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},m(144,"The border color of the multi file diff editor"));var RMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},G6=function(o,e){return function(t,i){e(t,i,o)}};class MMe{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let xA=class extends A{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=De(this,void 0),this._collapsed=$(this,l=>this._viewModel.read(l)?.collapsed.read(l)),this._editorContentHeight=De(this,500),this.contentHeight=$(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=De(this,0),this._modifiedWidth=De(this,0),this._originalContentWidth=De(this,0),this._originalWidth=De(this,0),this.maxScroll=$(this,l=>{const c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),d=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>d?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:d,width:this._originalWidth.read(l)}}),this._elements=Qe("div.multiDiffEntry",[Qe("div.header@header",[Qe("div.header-content",[Qe("div.collapse-button@collapseButton"),Qe("div.file-path",[Qe("div.title.modified.show-file-icons@primaryPath",[]),Qe("div.status.deleted@status",["R"]),Qe("div.title.original.show-file-icons@secondaryPath",[])]),Qe("div.actions@actions")])]),Qe("div.editorParent",[Qe("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(Pl,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode,fixedOverflowWidgets:!0},{})),this.isModifedFocused=Jt(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Jt(this.editor.getOriginalEditor()).isFocused,this.isFocused=$(this,l=>this.isModifedFocused.read(l)||this.isOriginalFocused.read(l)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new z),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const r=new Wy(this._elements.collapseButton,{});this._register(xe(l=>{r.element.className="",r.icon=this._collapsed.read(l)?G.chevronRight:G.chevronDown})),this._register(r.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register(xe(l=>{this._elements.editor.style.display=this._collapsed.read(l)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(l=>{const c=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(c,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(l=>{const c=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(c,void 0)})),this._register(this.editor.onDidContentSizeChange(l=>{tb(c=>{this._editorContentHeight.set(l.contentHeight,c),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),c),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),c)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(l=>{if(this._isSettingScrollTop||!l.scrollTopChanged||!this._data)return;const c=l.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(c)})),this._register(xe(l=>{const c=this._viewModel.read(l)?.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));const a=this._register(this._instantiationService.createChild(new f_([Ie,this._contextKeyService])));this._register(a.createInstance(pv,this._elements.actions,M.MultiDiffEditorFileToolbar,{actionRunner:this._register(new lq(()=>this._viewModel.get()?.modifiedUri??this._viewModel.get()?.originalUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>l.startsWith("navigation")},actionViewItemProvider:(l,c)=>oF(a,l,c)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function t(n){return{...n,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){tb(n=>{this._viewModel.set(void 0,n),this.editor.setDiffModel(null,n),this._dataStore.clear()});return}const i=e.viewModel.documentDiffItem;if(tb(n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let s=!1,r=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",s=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",r=!0),this._elements.status.classList.toggle("renamed",s),this._elements.status.classList.toggle("deleted",r),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,this._resourceLabel2?.setUri(s?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))}),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{this.editor.updateOptions(t(i.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,n=>{n||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(const[n,s]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(n,s)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=e.length-this._headerHeight,r=Math.max(0,Math.min(n.start-e.start,s));this._elements.header.style.transform=`translateY(${r}px)`,tb(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",r>0||i>0),this._elements.header.classList.toggle("collapsed",r===s)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};xA=RMe([G6(3,fe),G6(4,Ie)],xA);class PMe{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(this._unused.size===0)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find(n=>this._itemData.get(n).getId()===e.getId())??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var AMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z6=function(o,e){return function(t,i){e(t,i,o)}};let LA=class extends A{constructor(e,t,i,n,s,r){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=r,this._scrollableElements=Qe("div.scrollContent",[Qe("div@content",{style:{overflow:"hidden"}}),Qe("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new u_({forceIntegerValues:!1,scheduleAtNextAnimationFrame:c=>Zs(pe(this._element),c),smoothScrollDuration:100})),this._scrollableElement=this._register(new KL(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Qe("div.monaco-component.multiDiffEditor",{},[Qe("div",{},[this._scrollableElement.getDomNode()]),Qe("div.placeholder@placeholder",{},[Qe("div")])]),this._sizeObserver=this._register(new zj(this._element,void 0)),this._objectPool=this._register(new PMe(c=>{const d=this._instantiationService.createInstance(xA,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return d.setData(c),d})),this.scrollTop=dt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=dt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=$(this,c=>{const d=this._viewModel.read(c);if(!d)return{items:[],getItem:f=>{throw new Ce}};const h=d.items.read(c),u=new Map;return{items:h.map(f=>{const p=c.store.add(new FMe(f,this._objectPool,this.scrollLeft,b=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+b})})),_=this._lastDocStates?.[p.getKey()];return _&&Et(b=>{p.setViewState(_,b)}),u.set(f,p),p}),getItem:f=>u.get(f)}}),this._viewItems=this._viewItemsInfo.map(this,c=>c.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(c,d)=>c.reduce((h,u)=>h+u.contentHeight.read(d)+this._spaceBetweenPx,0)),this.activeControl=$(this,c=>{const d=this._viewModel.read(c)?.activeDiffItem.read(c);return d?this._viewItemsInfo.read(c).getItem(d).template.read(c)?.editor:void 0}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new f_([Ie,this._contextKeyService]))),this._contextKeyService.createKey(N.inMultiDiffEditor.key,!0),this._lastDocStates={},this._register(Xn((c,d)=>{const h=this._viewModel.read(c);if(h&&h.contextKeys)for(const[u,g]of Object.entries(h.contextKeys)){const f=this._contextKeyService.createKey(u,void 0);f.set(g),d.add(ue(()=>f.reset()))}}));const a=this._parentContextKeyService.createKey(N.multiDiffEditorAllCollapsed.key,!1);this._register(xe(c=>{const d=this._viewModel.read(c);if(d){const h=d.items.read(c).every(u=>u.collapsed.read(c));a.set(h)}})),this._register(xe(c=>{const d=this._dimension.read(c);this._sizeObserver.observe(d)}));const l=$(c=>{if(this._viewItems.read(c).length>0)return;const h=this._viewModel.read(c);return!h||h.isLoading.read(c)?m(145,"Loading..."):m(146,"No Changed Files")});this._register(xe(c=>{const d=l.read(c);this._elements.placeholder.innerText=d??"",this._elements.placeholder.classList.toggle("visible",!!d)})),this._scrollableElements.content.style.position="relative",this._register(xe(c=>{const d=this._sizeObserver.height.read(c);this._scrollableElements.root.style.height=`${d}px`;const h=this._totalHeight.read(c);this._scrollableElements.content.style.height=`${h}px`;const u=this._sizeObserver.width.read(c);let g=u;const f=this._viewItems.read(c),p=JO(f,Bn(_=>_.maxScroll.read(c).maxScroll,uo));if(p){const _=p.maxScroll.read(c);g=u+_.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:d,scrollHeight:h,scrollWidth:g})})),e.replaceChildren(this._elements.root),this._register(ue(()=>{e.replaceChildren()})),this._register(xe(c=>{const d=this._viewModel.read(c);if(d&&!d.isLoading.read(c)){if(d.items.read(c).length===0||d.activeDiffItem.read(c))return;this.goToNextChange()}})),this._register(this._register(xe(c=>{tb(d=>{this.render(c)})})))}reveal(e,t){const i=this._viewItems.get(),n=i.findIndex(c=>c.viewModel.originalUri?.toString()===e.original?.toString()&&c.viewModel.modifiedUri?.toString()===e.modified?.toString());if(n===-1)throw new Ce("Resource not found in diff editor");const s=i[n];this._viewModel.get().activeDiffItem.setCache(s.viewModel,void 0);let r=0;for(let c=0;cl.viewModel===i):-1;if(n===-1){this._goToFile(0,"first");return}const s=t[n];s.viewModel.collapsed.get()&&s.viewModel.collapsed.set(!1,void 0);const r=s.template.get()?.editor;if(r?.getDiffComputationResult()?.changes2?.length){const l=r.getModifiedEditor().getPosition()?.lineNumber||1,c=r.getDiffComputationResult().changes2;if(e==="next"?c.some(h=>h.modified.startLineNumber>l):c.some(h=>h.modified.endLineNumberExclusive<=l)){r.goToDiff(e);return}}const a=(n+(e==="next"?1:-1)+t.length)%t.length;this._goToFile(a,e==="next"?"first":"last")}_goToFile(e,t){const i=this._viewItems.get()[e];i.viewModel.collapsed.get()&&i.viewModel.collapsed.set(!1,void 0),this.reveal({original:i.viewModel.originalUri,modified:i.viewModel.modifiedUri});const n=i.template.get()?.editor;if(n?.getDiffComputationResult()?.changes2?.length)if(t==="first")n.revealFirstDiff();else{const s=n.getDiffComputationResult().changes2.at(-1),r=n.getModifiedEditor();r.setPosition({lineNumber:s.modified.startLineNumber,column:1}),r.revealLineInCenter(s.modified.startLineNumber)}n?.focus()}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const r=this._sizeObserver.height.read(e),a=ge.ofStartAndLength(t,r),l=this._sizeObserver.width.read(e);for(const c of this._viewItems.read(e)){const d=c.contentHeight.read(e),h=Math.min(d,r),u=ge.ofStartAndLength(n,h),g=ge.ofStartAndLength(s,d);if(g.isBefore(a))i-=d-h,c.hide();else if(g.isAfter(a))c.hide();else{const f=Math.max(0,Math.min(a.start-g.start,d-h));i-=f;const p=ge.ofStartAndLength(t+i,r);c.render(u,f,l,p)}n+=h+this._spaceBetweenPx,s+=d+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};LA=AMe([Z6(4,Ie),Z6(5,fe)],LA);function OMe(o,e){const t=o.getModel(),i=o.createDecorationsCollection([{range:e,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===t&&i.clear()},350)}class FMe extends A{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register(gO(this,void 0)),this.contentHeight=$(this,s=>this._templateRef.read(s)?.object.contentHeight?.read(s)??this.viewModel.lastTemplateData.read(s).contentHeight),this.maxScroll=$(this,s=>this._templateRef.read(s)?.object.maxScroll.read(s)??{maxScroll:0,scrollWidth:0}),this.template=$(this,s=>this._templateRef.read(s)?.object),this._isHidden=De(this,!1),this._isFocused=$(this,s=>this.template.read(s)?.isFocused.read(s)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(xe(s=>{const r=this._scrollLeft.read(s);this._templateRef.read(s)?.object.setScrollLeft(r)})),this._register(xe(s=>{const r=this._templateRef.read(s);!r||!this._isHidden.read(s)||r.object.isFocused.read(s)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(ae.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const s=this._templateRef.get();s&&n&&s.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&Et(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();if(!s){s=this._objectPool.getUnusedObj(new MMe(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(s,void 0);const r=this.viewModel.lastTemplateData.get().selections;r&&s.object.editor.setSelections(r)}s.object.render(e,i,t,n)}}var WMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},BMe=function(o,e){return function(t,i){e(t,i,o)}};let kA=class extends A{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=De(this,void 0),this._viewModel=De(this,void 0),this._widgetImpl=$(this,n=>n.store.add(this._instantiationService.createInstance(ac(LA),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))),this._register(fm(this._widgetImpl))}};kA=WMe([BMe(2,fe)],kA);function HMe(o,e,t){return Ne.initialize(t||{}).createInstance(SA,o,e)}function VMe(o){return Ne.get(et).onCodeEditorAdd(t=>{o(t)})}function zMe(o){return Ne.get(et).onDiffEditorAdd(t=>{o(t)})}function UMe(){return Ne.get(et).listCodeEditors()}function $Me(){return Ne.get(et).listDiffEditors()}function jMe(o,e,t){return Ne.initialize(t||{}).createInstance(yA,o,e)}function qMe(o,e){const t=Ne.initialize(e||{});return new kA(o,{},t)}function KMe(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Ye.registerCommand(o.id,o.run)}function GMe(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=q.deserialize(o.precondition),t=(n,...s)=>Ki.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new z;if(i.add(Ye.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(un.appendMenuItem(M.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=Ne.get(st);if(!(n instanceof Ym))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=q.and(e,q.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function ZMe(o){return IY([o])}function IY(o){const e=Ne.get(st);return e instanceof Ym?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:q.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),A.None)}function YMe(o,e,t){const i=Ne.get(_i),n=i.getLanguageIdByMimeType(e)||e;return DY(Ne.get(ei),i,o,n,t)}function XMe(o,e){const t=Ne.get(_i),i=t.getLanguageIdByMimeType(e)||e||qo;o.setLanguage(t.createById(i))}function QMe(o,e,t){o&&Ne.get($l).changeOne(e,o.uri,t)}function JMe(o){Ne.get($l).changeAll(o,[])}function e2e(o){return Ne.get($l).read(o)}function t2e(o){return Ne.get($l).onMarkerChanged(o)}function i2e(o){return Ne.get(ei).getModel(o)}function n2e(){return Ne.get(ei).getModels()}function s2e(o){return Ne.get(ei).onModelAdded(o)}function o2e(o){return Ne.get(ei).onModelRemoved(o)}function r2e(o){return Ne.get(ei).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function a2e(o){return uTe(Ne.get(ei),o)}function l2e(o,e){const t=Ne.get(_i),i=Ne.get(er);return a3.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function c2e(o,e,t){const i=Ne.get(_i);return Ne.get(er).registerEditorContainer(wt.document.body),a3.colorize(i,o,e,t)}function d2e(o,e,t=4){return Ne.get(er).registerEditorContainer(wt.document.body),a3.colorizeModelLine(o,e,t)}function h2e(o){const e=ui.get(o);return e||{getInitialState:()=>Im,tokenize:(t,i,n)=>w4(o,n)}}function u2e(o,e){ui.getOrCreate(e);const t=h2e(e),i=bo(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r{if(!i)return null;const s=t.options?.selection;let r;return s&&typeof s.endLineNumber=="number"&&typeof s.endColumn=="number"?r=s:s&&(r={lineNumber:s.startLineNumber,column:s.startColumn}),await o.openCodeEditor(i,t.resource,r)?i:null})}function C2e(){return{create:HMe,getEditors:UMe,getDiffEditors:$Me,onDidCreateEditor:VMe,onDidCreateDiffEditor:zMe,createDiffEditor:jMe,addCommand:KMe,addEditorAction:GMe,addKeybindingRule:ZMe,addKeybindingRules:IY,createModel:YMe,setModelLanguage:XMe,setModelMarkers:QMe,getModelMarkers:e2e,removeAllMarkers:JMe,onDidChangeMarkers:t2e,getModels:n2e,getModel:i2e,onDidCreateModel:s2e,onWillDisposeModel:o2e,onDidChangeModelLanguage:r2e,createWebWorker:a2e,colorizeElement:l2e,colorize:c2e,colorizeModelLine:d2e,tokenize:u2e,defineTheme:g2e,setTheme:f2e,remeasureFonts:p2e,registerCommand:m2e,registerLinkOpener:_2e,registerEditorOpener:b2e,AccessibilitySupport:O2,ContentWidgetPositionPreference:z2,CursorChangeReason:U2,DefaultEndOfLine:$2,EditorAutoIndentStrategy:q2,EditorOption:K2,EndOfLinePreference:G2,EndOfLineSequence:Z2,MinimapPosition:aP,MinimapSectionHeaderStyle:lP,MouseTargetType:cP,OverlayWidgetPositionPreference:uP,OverviewRulerLane:gP,GlyphMarginLane:Y2,RenderLineNumbersType:mP,RenderMinimap:_P,ScrollbarVisibility:CP,ScrollType:bP,TextEditorCursorBlinkingStyle:kP,TextEditorCursorStyle:DP,TrackedRangeStickiness:IP,WrappingIndent:EP,InjectedTextCursorStops:J2,PositionAffinity:pP,ShowLightbulbIconMode:wP,TextDirection:LP,ConfigurationChangedEvent:oU,BareFontInfo:Ig,FontInfo:U0,TextModelResolvedOptions:PS,FindMatch:MC,ApplyUpdateResult:Db,EditorZoom:hr,createMultiFileDiffEditor:qMe,EditorType:xw,EditorOptions:rs}}function v2e(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function vS(o,e){return typeof o=="boolean"?o:e}function Y6(o,e){return typeof o=="string"?o:e}function w2e(o){const e={};for(const t of o)e[t]=!0;return e}function X6(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=w2e(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function DA(o,e,t){e=e.replace(/@@/g,"");let i=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,a){n=!0;let l="";if(typeof o[a]=="string")l=o[a];else if(o[a]&&o[a]instanceof RegExp)l=o[a].source;else throw o[a]===void 0?zt(o,"language definition does not contain attribute '"+a+"', used at: "+e):zt(o,"attribute reference '"+a+"' must be a string, used at: "+e);return Au(l)?"":"(?:"+l+")"}),i++;while(n&&i<5);e=e.replace(/\x01/g,"@");const s=(o.ignoreCase?"i":"")+(o.unicode?"u":"");if(t&&e.match(/\$[sS](\d\d?)/g)){let a=null,l=null;return c=>(l&&a===c||(a=c,l=new RegExp(_Te(o,e,c),s)),l)}return new RegExp(e,s)}function S2e(o,e,t,i){if(i<0)return o;if(i=100){i=i-100;const n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw zt(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw zt(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!bTe(o,Vd(o,n,"",[],""))))throw zt(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=DA(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=IA(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function EY(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={languageId:o,includeLF:vS(e.includeLF,!1),noThrow:!1,maxStack:100,start:typeof e.start=="string"?e.start:null,ignoreCase:vS(e.ignoreCase,!1),unicode:vS(e.unicode,!1),tokenPostfix:Y6(e.tokenPostfix,"."+o),defaultToken:Y6(e.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const c of l){let d=c.include;if(d){if(typeof d!="string")throw zt(t,"an 'include' attribute must be a string at: "+r);if(d[0]==="@"&&(d=d.substr(1)),!e.tokenizer[d])throw zt(t,"include target '"+d+"' is not defined at: "+r);n(r+"."+d,a,e.tokenizer[d])}else{const h=new x2e(r);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(h.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")h.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const u=c[1];u.next=c[2],h.setAction(i,u)}else throw zt(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else h.setAction(i,c[1]);else{if(!c.regex)throw zt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);c.name&&typeof c.name=="string"&&(h.name=c.name),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=vS(c.matchOnlyAtLineStart,!1)),h.setRegex(i,c.regex),h.setAction(i,c.action)}a.push(h)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw zt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw zt(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw zt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:jc(t,a.open),close:jc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function L2e(o){mm.registerLanguage(o)}function k2e(){let o=[];return o=o.concat(mm.getLanguages()),o}function D2e(o){return Ne.get(_i).languageIdCodec.encodeLanguageId(o)}function I2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function E2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function N2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ne.get(ti).register(o,e,100)}class T2e{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return iw.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new JL(n.tokens,n.endState)}}class iw{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:g{const i=await Promise.resolve(e.create());return i?R2e(i)?TY(o,i):new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe)):null});return ui.registerFactory(o,t)}function A2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return NY(e)?_3(o,{create:()=>e}):ui.register(o,TY(o,e))}function O2e(o,e){const t=i=>new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe));return NY(e)?_3(o,{create:()=>e}):ui.register(o,t(e))}function F2e(o,e){return Ne.get(he).referenceProvider.register(o,e)}function W2e(o,e){return Ne.get(he).renameProvider.register(o,e)}function B2e(o,e){return Ne.get(he).newSymbolNamesProvider.register(o,e)}function H2e(o,e){return Ne.get(he).signatureHelpProvider.register(o,e)}function V2e(o,e){return Ne.get(he).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new L(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function z2e(o,e){return Ne.get(he).documentSymbolProvider.register(o,e)}function U2e(o,e){return Ne.get(he).documentHighlightProvider.register(o,e)}function $2e(o,e){return Ne.get(he).linkedEditingRangeProvider.register(o,e)}function j2e(o,e){return Ne.get(he).definitionProvider.register(o,e)}function q2e(o,e){return Ne.get(he).implementationProvider.register(o,e)}function K2e(o,e){return Ne.get(he).typeDefinitionProvider.register(o,e)}function G2e(o,e){return Ne.get(he).codeLensProvider.register(o,e)}function Z2e(o,e,t){return Ne.get(he).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const c=Ne.get($l).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function Y2e(o,e){return Ne.get(he).documentFormattingEditProvider.register(o,e)}function X2e(o,e){return Ne.get(he).documentRangeFormattingEditProvider.register(o,e)}function Q2e(o,e){return Ne.get(he).onTypeFormattingEditProvider.register(o,e)}function J2e(o,e){return Ne.get(he).linkProvider.register(o,e)}function ePe(o,e){return Ne.get(he).completionProvider.register(o,e)}function tPe(o,e){return Ne.get(he).colorProvider.register(o,e)}function iPe(o,e){return Ne.get(he).foldingRangeProvider.register(o,e)}function nPe(o,e){return Ne.get(he).declarationProvider.register(o,e)}function sPe(o,e){return Ne.get(he).selectionRangeProvider.register(o,e)}function oPe(o,e){return Ne.get(he).documentSemanticTokensProvider.register(o,e)}function rPe(o,e){return Ne.get(he).documentRangeSemanticTokensProvider.register(o,e)}function aPe(o,e){return Ne.get(he).inlineCompletionsProvider.register(o,e)}function lPe(o,e){return Ne.get(he).inlayHintsProvider.register(o,e)}function cPe(){return{register:L2e,getLanguages:k2e,onLanguage:I2e,onLanguageEncountered:E2e,getEncodedLanguageId:D2e,setLanguageConfiguration:N2e,setColorMap:P2e,registerTokensProviderFactory:_3,setTokensProvider:A2e,setMonarchTokensProvider:O2e,registerReferenceProvider:F2e,registerRenameProvider:W2e,registerNewSymbolNameProvider:B2e,registerCompletionItemProvider:ePe,registerSignatureHelpProvider:H2e,registerHoverProvider:V2e,registerDocumentSymbolProvider:z2e,registerDocumentHighlightProvider:U2e,registerLinkedEditingRangeProvider:$2e,registerDefinitionProvider:j2e,registerImplementationProvider:q2e,registerTypeDefinitionProvider:K2e,registerCodeLensProvider:G2e,registerCodeActionProvider:Z2e,registerDocumentFormattingEditProvider:Y2e,registerDocumentRangeFormattingEditProvider:X2e,registerOnTypeFormattingEditProvider:Q2e,registerLinkProvider:J2e,registerColorProvider:tPe,registerFoldingRangeProvider:iPe,registerDeclarationProvider:nPe,registerSelectionRangeProvider:sPe,registerDocumentSemanticTokensProvider:oPe,registerDocumentRangeSemanticTokensProvider:rPe,registerInlineCompletionsProvider:aPe,registerInlayHintsProvider:lPe,DocumentHighlightKind:j2,CompletionItemKind:B2,CompletionItemTag:H2,CompletionItemInsertTextRule:W2,SymbolKind:yP,SymbolTag:xP,IndentAction:Q2,CompletionTriggerKind:V2,SignatureHelpTriggerKind:SP,InlayHintKind:eP,InlineCompletionTriggerKind:nP,CodeActionTriggerType:F2,NewSymbolNameTag:dP,NewSymbolNameTriggerKind:hP,PartialAcceptTriggerKind:fP,HoverVerbosityAction:X2,InlineCompletionEndOfLifeReasonKind:tP,InlineCompletionHintStyle:iP,FoldingRangeKind:df,SelectedSuggestionInfo:c$,EditDeltaInfo:ov}}rs.wrappingIndent.defaultValue=0;rs.glyphMargin.defaultValue=!1;rs.autoIndent.defaultValue=3;rs.overviewRulerLanes.defaultValue=2;Vm.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const As=sY();As.editor=C2e();As.languages=cPe();const RY=As.CancellationTokenSource,Ph=As.Emitter,MY=As.KeyCode,PY=As.KeyMod,_d=As.Position,x_=As.Range,AY=As.Selection,OY=As.SelectionDirection,Zr=As.MarkerSeverity,nL=As.MarkerTag,hD=As.Uri,FY=As.Token,Dl=As.editor,de=As.languages,dPe=FA(),rm=globalThis;(dPe?.globalAPI||typeof rm.define=="function"&&rm.define.amd)&&(rm.monaco=As);typeof rm.require<"u"&&typeof rm.require.config=="function"&&rm.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const hPe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:RY,Emitter:Ph,KeyCode:MY,KeyMod:PY,MarkerSeverity:Zr,MarkerTag:nL,Position:_d,Range:x_,Selection:AY,SelectionDirection:OY,Token:FY,Uri:hD,editor:Dl,languages:de},Symbol.toStringTag,{value:"Module"}));let b3=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const C3={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},v3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},WY=new b3("css",C3,v3),BY=new b3("scss",C3,v3),HY=new b3("less",C3,v3);function w3(){return we(()=>import("./cssMode-BYOYZWAb.js"),__vite__mapDeps([0,1,2,3,4]))}de.onLanguage("less",()=>{w3().then(o=>o.setupMode(HY))});de.onLanguage("scss",()=>{w3().then(o=>o.setupMode(BY))});de.onLanguage("css",()=>{w3().then(o=>o.setupMode(WY))});const VY=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:WY,lessDefaults:HY,scssDefaults:BY},Symbol.toStringTag,{value:"Module"}));let uPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const gPe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},uD={format:gPe,suggest:{},data:{useDefaultDataProvider:!0}};function gD(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===bC,documentFormattingEdits:o===bC,documentRangeFormattingEdits:o===bC}}const bC="html",Q6="handlebars",J6="razor",zY=fD(bC,uD,gD(bC)),fPe=zY.defaults,UY=fD(Q6,uD,gD(Q6)),pPe=UY.defaults,$Y=fD(J6,uD,gD(J6)),mPe=$Y.defaults;function _Pe(){return we(()=>import("./htmlMode-BtW7hgTd.js"),__vite__mapDeps([5,1,2,3,4]))}function fD(o,e=uD,t=gD(o)){const i=new uPe(o,e,t);let n;const s=de.onLanguage(o,async()=>{n=(await _Pe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const jY=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:pPe,handlebarLanguageService:UY,htmlDefaults:fPe,htmlLanguageService:zY,razorDefaults:mPe,razorLanguageService:$Y,registerHTMLLanguageService:fD},Symbol.toStringTag,{value:"Module"}));let bPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const CPe={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},vPe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},qY=new bPe("json",CPe,vPe),wPe=()=>KY().then(o=>o.getWorker());function KY(){return we(()=>import("./jsonMode-B4lkE7Oy.js"),__vite__mapDeps([6,1,2,3,4]))}de.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});de.onLanguage("json",()=>{KY().then(o=>o.setupMode(qY))});const GY=Object.freeze(Object.defineProperty({__proto__:null,getWorker:wPe,jsonDefaults:qY},Symbol.toStringTag,{value:"Module"})),SPe="5.9.3";var ZY=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(ZY||{}),YY=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(YY||{}),XY=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(XY||{}),QY=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(QY||{}),JY=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JY||{});class eX{constructor(e,t,i,n,s){this._onDidChange=new Ph,this._onDidExtraLibsChange=new Ph,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const yPe=SPe,tX={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},iX=new eX({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),nX=new eX({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),xPe=()=>pD().then(o=>o.getTypeScriptWorker()),LPe=()=>pD().then(o=>o.getJavaScriptWorker());function pD(){return we(()=>import("./tsMode-BZYSYhKr.js"),__vite__mapDeps([7,2,3,4]))}de.onLanguage("typescript",()=>pD().then(o=>o.setupTypeScript(iX)));de.onLanguage("javascript",()=>pD().then(o=>o.setupJavaScript(nX)));const sX=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:YY,ModuleKind:ZY,ModuleResolutionKind:JY,NewLineKind:XY,ScriptTarget:QY,getJavaScriptWorker:LPe,getTypeScriptWorker:xPe,javascriptDefaults:nX,typescriptDefaults:iX,typescriptVersion:yPe},Symbol.toStringTag,{value:"Module"})),oX={},NE={};class S3{static getOrCreate(e){return NE[e]||(NE[e]=new S3(e)),NE[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,oX[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function ye(o){const e=o.id;oX[e]=o,de.register(o);const t=S3.getOrCreate(e);de.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),de.onLanguageEncountered(e,async()=>{const i=await t.load();de.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>we(()=>import("./abap-DLDM7-KI.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>we(()=>import("./apex-DNDY2TF8.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>we(()=>import("./azcli-Y6nb8tq_.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>we(()=>import("./bat-BwHxbl9M.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>we(()=>import("./bicep-CFznDFnq.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>we(()=>import("./cameligo-Bf6VGUru.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>we(()=>import("./clojure-Dnu-v4kV.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>we(()=>import("./coffee-Bd8akH9Z.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>we(()=>import("./csharp-Co3qMtFm.js"),[])});ye({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>we(()=>import("./csp-D-4FJmMZ.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>we(()=>import("./css-DdJfP1eB.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>we(()=>import("./cypher-cTPe9QuQ.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>we(()=>import("./dart-BOtBlQCF.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>we(()=>import("./dockerfile-BG73LgW2.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>we(()=>import("./ecl-BEgZUVRK.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>we(()=>import("./elixir-BkW5O-1t.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>we(()=>import("./flow9-BeJ5waoc.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>we(()=>import("./fsharp-PahG7c26.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>we(()=>import("./freemarker2-CG8OSn8H.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>we(()=>import("./go-acbASCJo.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>we(()=>import("./graphql-BxJiqAUM.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>we(()=>import("./handlebars-vt5-G9kY.js"),__vite__mapDeps([9,2,3,4]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>we(()=>import("./hcl-DtV1sZF8.js"),[])});ye({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>we(()=>import("./html-BwCzbm6J.js"),__vite__mapDeps([10,2,3,4]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>we(()=>import("./ini-Kd9XrMLS.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>we(()=>import("./java-CXBNlu9o.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>we(()=>import("./javascript-C1Bl1QAn.js"),__vite__mapDeps([11,12,2,3,4]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>we(()=>import("./julia-cl7-CwDS.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>we(()=>import("./kotlin-s7OhZKlX.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>we(()=>import("./less-9HpZscsL.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>we(()=>import("./lexon-OrD6JF1K.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>we(()=>import("./lua-Cyyb5UIc.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>we(()=>import("./liquid-OhilcA0U.js"),__vite__mapDeps([13,2,3,4]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>we(()=>import("./m3-B8OfTtLu.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>we(()=>import("./markdown-BFxVWTOG.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>we(()=>import("./mdx-BNW26XnD.js"),__vite__mapDeps([14,2,3,4]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>we(()=>import("./mips-CiqrrVzr.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>we(()=>import("./msdax-DmeGPVcC.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>we(()=>import("./mysql-C_tMU-Nz.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>we(()=>import("./objective-c-BDtDVThU.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>we(()=>import("./pascal-vHIfCaH5.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>we(()=>import("./pascaligo-DtZ0uQbO.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>we(()=>import("./perl-Ub6l9XKa.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>we(()=>import("./pgsql-BlNEE0v7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>we(()=>import("./php-BBUBE1dy.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>we(()=>import("./pla-DSh2-awV.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>we(()=>import("./postiats-CocnycG-.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>we(()=>import("./powerquery-tScXyioY.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>we(()=>import("./powershell-COWaemsV.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>we(()=>import("./protobuf-Brw8urJB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>we(()=>import("./pug-8SOpv6rk.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>we(()=>import("./python-BeBGma8p.js"),__vite__mapDeps([15,2,3,4]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>we(()=>import("./qsharp-Bw9ernYp.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>we(()=>import("./r-j7ic8hl3.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>we(()=>import("./razor-L05JTUrE.js"),__vite__mapDeps([16,2,3,4]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>we(()=>import("./redis-Bu5POkcn.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>we(()=>import("./redshift-Bs9aos_-.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>we(()=>import("./restructuredtext-CqXO7rUv.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>we(()=>import("./ruby-zBfavPgS.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>we(()=>import("./rust-BzKRNQWT.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>we(()=>import("./sb-BBc9UKZt.js"),[])});ye({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>we(()=>import("./scala-D9hQfWCl.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>we(()=>import("./scheme-BPhDTwHR.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>we(()=>import("./scss-CBJaRo0y.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>we(()=>import("./shell-DiJ1NA_G.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>we(()=>import("./solidity-Db0IVjzk.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>we(()=>import("./sophia-CnS9iZB_.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>we(()=>import("./sparql-CJmd_6j2.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>we(()=>import("./sql-ClhHkBeG.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>we(()=>import("./st-CHwy0fLd.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>we(()=>import("./swift-Bqt4WxQ4.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>we(()=>import("./tcl-Dm6ycUr_.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>we(()=>import("./twig-Csy3S7wG.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>we(()=>import("./typescript-DeFWR0Bj.js"),__vite__mapDeps([12,2,3,4]))});ye({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>we(()=>import("./typespec-Btyra-wh.js"),[])});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>we(()=>import("./vb-Db0cS2oM.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>we(()=>import("./wgsl-DumH7NcR.js"),[])});ye({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\we(()=>import("./xml-BDPhTprf.js"),__vite__mapDeps([17,2,3,4]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>we(()=>import("./yaml-B6mJwErH.js"),__vite__mapDeps([18,2,3,4]))});var kPe=Object.defineProperty,DPe=(o,e,t)=>e in o?kPe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ve=(o,e,t)=>DPe(o,typeof e!="symbol"?e+"":e,t),wS,eV,SS,TE,yS;function IPe(o){return o.method!==void 0}var tV;(function(o){function e(t){return t}o.create=e})(tV||(tV={}));var Kr;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(Kr||(Kr={}));var y3=class{constructor(){ve(this,"listeners",new Set),ve(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},EPe=class{constructor(o){ve(this,"_value"),ve(this,"eventEmitter"),this._value=o,this.eventEmitter=new y3}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function NPe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function RE(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var TPe=class{constructor(){ve(this,"_state","none"),ve(this,"promise"),ve(this,"resolve",()=>{}),ve(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},rX=(wS=class{constructor(){ve(this,"_unprocessedMessages",[]),ve(this,"_messageListener"),ve(this,"id",wS.id++),ve(this,"_state",new EPe({state:"open"})),ve(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new RPe(this,o??new MPe)}},ve(wS,"id",0),wS),RPe=class{constructor(o,e){ve(this,"baseStream"),ve(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},MPe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},PPe=class aX{constructor(e){ve(this,"connect"),this.connect=e}mapContext(e){return new aX(t=>this.connect(t?APe(t,e):void 0))}};function APe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var OPe=class lX{constructor(e,t,i){ve(this,"_stream"),ve(this,"_listener"),ve(this,"_logger"),ve(this,"_unprocessedResponses",new Map),ve(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{IPe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new PPe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new lX(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:Kr.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Kr.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},am;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(am||(am={}));const cX=Symbol("OptionalMethodNotFound");var dX=class{contextualize(o){return new FPe(this,o)}},FPe=class extends dX{constructor(o,e){super(),ve(this,"underylingTypedChannel"),ve(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},EA=class hX extends dX{constructor(e,t={}){super(),ve(this,"channelCtor"),ve(this,"_requestSender"),ve(this,"_handler",new Map),ve(this,"_unknownNotificationHandler",new Set),ve(this,"_timeout"),ve(this,"sendExceptionDetails",!1),ve(this,"_logger"),ve(this,"listeningDeferred",new TPe),ve(this,"onListening",this.listeningDeferred.promise),ve(this,"_requestDidErrorEventEmitter",new y3),ve(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=NPe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new hX(OPe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Kr.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Kr.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:Kr.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Kr.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nV?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Kr.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return RE(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return RE(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return RE(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);iV(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===Kr.methodNotFound)return cX;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nV(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:jc(t,a.open),close:jc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function L2e(o){mm.registerLanguage(o)}function k2e(){let o=[];return o=o.concat(mm.getLanguages()),o}function D2e(o){return Ne.get(_i).languageIdCodec.encodeLanguageId(o)}function I2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function E2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function N2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ne.get(ti).register(o,e,100)}class T2e{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return iw.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new JL(n.tokens,n.endState)}}class iw{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:g{const i=await Promise.resolve(e.create());return i?R2e(i)?TY(o,i):new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe)):null});return ui.registerFactory(o,t)}function A2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return NY(e)?_3(o,{create:()=>e}):ui.register(o,TY(o,e))}function O2e(o,e){const t=i=>new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe));return NY(e)?_3(o,{create:()=>e}):ui.register(o,t(e))}function F2e(o,e){return Ne.get(he).referenceProvider.register(o,e)}function W2e(o,e){return Ne.get(he).renameProvider.register(o,e)}function B2e(o,e){return Ne.get(he).newSymbolNamesProvider.register(o,e)}function H2e(o,e){return Ne.get(he).signatureHelpProvider.register(o,e)}function V2e(o,e){return Ne.get(he).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new L(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function z2e(o,e){return Ne.get(he).documentSymbolProvider.register(o,e)}function U2e(o,e){return Ne.get(he).documentHighlightProvider.register(o,e)}function $2e(o,e){return Ne.get(he).linkedEditingRangeProvider.register(o,e)}function j2e(o,e){return Ne.get(he).definitionProvider.register(o,e)}function q2e(o,e){return Ne.get(he).implementationProvider.register(o,e)}function K2e(o,e){return Ne.get(he).typeDefinitionProvider.register(o,e)}function G2e(o,e){return Ne.get(he).codeLensProvider.register(o,e)}function Z2e(o,e,t){return Ne.get(he).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const c=Ne.get($l).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function Y2e(o,e){return Ne.get(he).documentFormattingEditProvider.register(o,e)}function X2e(o,e){return Ne.get(he).documentRangeFormattingEditProvider.register(o,e)}function Q2e(o,e){return Ne.get(he).onTypeFormattingEditProvider.register(o,e)}function J2e(o,e){return Ne.get(he).linkProvider.register(o,e)}function ePe(o,e){return Ne.get(he).completionProvider.register(o,e)}function tPe(o,e){return Ne.get(he).colorProvider.register(o,e)}function iPe(o,e){return Ne.get(he).foldingRangeProvider.register(o,e)}function nPe(o,e){return Ne.get(he).declarationProvider.register(o,e)}function sPe(o,e){return Ne.get(he).selectionRangeProvider.register(o,e)}function oPe(o,e){return Ne.get(he).documentSemanticTokensProvider.register(o,e)}function rPe(o,e){return Ne.get(he).documentRangeSemanticTokensProvider.register(o,e)}function aPe(o,e){return Ne.get(he).inlineCompletionsProvider.register(o,e)}function lPe(o,e){return Ne.get(he).inlayHintsProvider.register(o,e)}function cPe(){return{register:L2e,getLanguages:k2e,onLanguage:I2e,onLanguageEncountered:E2e,getEncodedLanguageId:D2e,setLanguageConfiguration:N2e,setColorMap:P2e,registerTokensProviderFactory:_3,setTokensProvider:A2e,setMonarchTokensProvider:O2e,registerReferenceProvider:F2e,registerRenameProvider:W2e,registerNewSymbolNameProvider:B2e,registerCompletionItemProvider:ePe,registerSignatureHelpProvider:H2e,registerHoverProvider:V2e,registerDocumentSymbolProvider:z2e,registerDocumentHighlightProvider:U2e,registerLinkedEditingRangeProvider:$2e,registerDefinitionProvider:j2e,registerImplementationProvider:q2e,registerTypeDefinitionProvider:K2e,registerCodeLensProvider:G2e,registerCodeActionProvider:Z2e,registerDocumentFormattingEditProvider:Y2e,registerDocumentRangeFormattingEditProvider:X2e,registerOnTypeFormattingEditProvider:Q2e,registerLinkProvider:J2e,registerColorProvider:tPe,registerFoldingRangeProvider:iPe,registerDeclarationProvider:nPe,registerSelectionRangeProvider:sPe,registerDocumentSemanticTokensProvider:oPe,registerDocumentRangeSemanticTokensProvider:rPe,registerInlineCompletionsProvider:aPe,registerInlayHintsProvider:lPe,DocumentHighlightKind:j2,CompletionItemKind:B2,CompletionItemTag:H2,CompletionItemInsertTextRule:W2,SymbolKind:yP,SymbolTag:xP,IndentAction:Q2,CompletionTriggerKind:V2,SignatureHelpTriggerKind:SP,InlayHintKind:eP,InlineCompletionTriggerKind:nP,CodeActionTriggerType:F2,NewSymbolNameTag:dP,NewSymbolNameTriggerKind:hP,PartialAcceptTriggerKind:fP,HoverVerbosityAction:X2,InlineCompletionEndOfLifeReasonKind:tP,InlineCompletionHintStyle:iP,FoldingRangeKind:df,SelectedSuggestionInfo:c$,EditDeltaInfo:ov}}rs.wrappingIndent.defaultValue=0;rs.glyphMargin.defaultValue=!1;rs.autoIndent.defaultValue=3;rs.overviewRulerLanes.defaultValue=2;Vm.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const As=sY();As.editor=C2e();As.languages=cPe();const RY=As.CancellationTokenSource,Ph=As.Emitter,MY=As.KeyCode,PY=As.KeyMod,_d=As.Position,x_=As.Range,AY=As.Selection,OY=As.SelectionDirection,Zr=As.MarkerSeverity,nL=As.MarkerTag,hD=As.Uri,FY=As.Token,Dl=As.editor,de=As.languages,dPe=FA(),rm=globalThis;(dPe?.globalAPI||typeof rm.define=="function"&&rm.define.amd)&&(rm.monaco=As);typeof rm.require<"u"&&typeof rm.require.config=="function"&&rm.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const hPe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:RY,Emitter:Ph,KeyCode:MY,KeyMod:PY,MarkerSeverity:Zr,MarkerTag:nL,Position:_d,Range:x_,Selection:AY,SelectionDirection:OY,Token:FY,Uri:hD,editor:Dl,languages:de},Symbol.toStringTag,{value:"Module"}));let b3=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const C3={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},v3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},WY=new b3("css",C3,v3),BY=new b3("scss",C3,v3),HY=new b3("less",C3,v3);function w3(){return we(()=>import("./cssMode-CyvYPRSF.js"),__vite__mapDeps([0,1,2,3,4]))}de.onLanguage("less",()=>{w3().then(o=>o.setupMode(HY))});de.onLanguage("scss",()=>{w3().then(o=>o.setupMode(BY))});de.onLanguage("css",()=>{w3().then(o=>o.setupMode(WY))});const VY=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:WY,lessDefaults:HY,scssDefaults:BY},Symbol.toStringTag,{value:"Module"}));let uPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const gPe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},uD={format:gPe,suggest:{},data:{useDefaultDataProvider:!0}};function gD(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===bC,documentFormattingEdits:o===bC,documentRangeFormattingEdits:o===bC}}const bC="html",Q6="handlebars",J6="razor",zY=fD(bC,uD,gD(bC)),fPe=zY.defaults,UY=fD(Q6,uD,gD(Q6)),pPe=UY.defaults,$Y=fD(J6,uD,gD(J6)),mPe=$Y.defaults;function _Pe(){return we(()=>import("./htmlMode-8aWXPjFP.js"),__vite__mapDeps([5,1,2,3,4]))}function fD(o,e=uD,t=gD(o)){const i=new uPe(o,e,t);let n;const s=de.onLanguage(o,async()=>{n=(await _Pe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const jY=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:pPe,handlebarLanguageService:UY,htmlDefaults:fPe,htmlLanguageService:zY,razorDefaults:mPe,razorLanguageService:$Y,registerHTMLLanguageService:fD},Symbol.toStringTag,{value:"Module"}));let bPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const CPe={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},vPe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},qY=new bPe("json",CPe,vPe),wPe=()=>KY().then(o=>o.getWorker());function KY(){return we(()=>import("./jsonMode-BXAq7Usw.js"),__vite__mapDeps([6,1,2,3,4]))}de.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});de.onLanguage("json",()=>{KY().then(o=>o.setupMode(qY))});const GY=Object.freeze(Object.defineProperty({__proto__:null,getWorker:wPe,jsonDefaults:qY},Symbol.toStringTag,{value:"Module"})),SPe="5.9.3";var ZY=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(ZY||{}),YY=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(YY||{}),XY=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(XY||{}),QY=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(QY||{}),JY=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JY||{});class eX{constructor(e,t,i,n,s){this._onDidChange=new Ph,this._onDidExtraLibsChange=new Ph,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const yPe=SPe,tX={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},iX=new eX({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),nX=new eX({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),xPe=()=>pD().then(o=>o.getTypeScriptWorker()),LPe=()=>pD().then(o=>o.getJavaScriptWorker());function pD(){return we(()=>import("./tsMode-CYFtUCqN.js"),__vite__mapDeps([7,2,3,4]))}de.onLanguage("typescript",()=>pD().then(o=>o.setupTypeScript(iX)));de.onLanguage("javascript",()=>pD().then(o=>o.setupJavaScript(nX)));const sX=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:YY,ModuleKind:ZY,ModuleResolutionKind:JY,NewLineKind:XY,ScriptTarget:QY,getJavaScriptWorker:LPe,getTypeScriptWorker:xPe,javascriptDefaults:nX,typescriptDefaults:iX,typescriptVersion:yPe},Symbol.toStringTag,{value:"Module"})),oX={},NE={};class S3{static getOrCreate(e){return NE[e]||(NE[e]=new S3(e)),NE[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,oX[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function ye(o){const e=o.id;oX[e]=o,de.register(o);const t=S3.getOrCreate(e);de.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),de.onLanguageEncountered(e,async()=>{const i=await t.load();de.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>we(()=>import("./abap-DLDM7-KI.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>we(()=>import("./apex-DNDY2TF8.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>we(()=>import("./azcli-Y6nb8tq_.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>we(()=>import("./bat-BwHxbl9M.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>we(()=>import("./bicep-CFznDFnq.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>we(()=>import("./cameligo-Bf6VGUru.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>we(()=>import("./clojure-Dnu-v4kV.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>we(()=>import("./coffee-Bd8akH9Z.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>we(()=>import("./csharp-Co3qMtFm.js"),[])});ye({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>we(()=>import("./csp-D-4FJmMZ.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>we(()=>import("./css-DdJfP1eB.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>we(()=>import("./cypher-cTPe9QuQ.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>we(()=>import("./dart-BOtBlQCF.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>we(()=>import("./dockerfile-BG73LgW2.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>we(()=>import("./ecl-BEgZUVRK.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>we(()=>import("./elixir-BkW5O-1t.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>we(()=>import("./flow9-BeJ5waoc.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>we(()=>import("./fsharp-PahG7c26.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>we(()=>import("./freemarker2-CEwDtIx2.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>we(()=>import("./freemarker2-CEwDtIx2.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>we(()=>import("./freemarker2-CEwDtIx2.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>we(()=>import("./freemarker2-CEwDtIx2.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>we(()=>import("./freemarker2-CEwDtIx2.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>we(()=>import("./freemarker2-CEwDtIx2.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>we(()=>import("./freemarker2-CEwDtIx2.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>we(()=>import("./go-acbASCJo.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>we(()=>import("./graphql-BxJiqAUM.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>we(()=>import("./handlebars-CsegWH10.js"),__vite__mapDeps([9,2,3,4]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>we(()=>import("./hcl-DtV1sZF8.js"),[])});ye({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>we(()=>import("./html-CRf6vG9C.js"),__vite__mapDeps([10,2,3,4]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>we(()=>import("./ini-Kd9XrMLS.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>we(()=>import("./java-CXBNlu9o.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>we(()=>import("./javascript-BwGz2yH9.js"),__vite__mapDeps([11,12,2,3,4]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>we(()=>import("./julia-cl7-CwDS.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>we(()=>import("./kotlin-s7OhZKlX.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>we(()=>import("./less-9HpZscsL.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>we(()=>import("./lexon-OrD6JF1K.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>we(()=>import("./lua-Cyyb5UIc.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>we(()=>import("./liquid-DaGOgzgc.js"),__vite__mapDeps([13,2,3,4]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>we(()=>import("./m3-B8OfTtLu.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>we(()=>import("./markdown-BFxVWTOG.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>we(()=>import("./mdx-DmjCAV2z.js"),__vite__mapDeps([14,2,3,4]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>we(()=>import("./mips-CiqrrVzr.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>we(()=>import("./msdax-DmeGPVcC.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>we(()=>import("./mysql-C_tMU-Nz.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>we(()=>import("./objective-c-BDtDVThU.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>we(()=>import("./pascal-vHIfCaH5.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>we(()=>import("./pascaligo-DtZ0uQbO.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>we(()=>import("./perl-Ub6l9XKa.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>we(()=>import("./pgsql-BlNEE0v7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>we(()=>import("./php-BBUBE1dy.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>we(()=>import("./pla-DSh2-awV.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>we(()=>import("./postiats-CocnycG-.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>we(()=>import("./powerquery-tScXyioY.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>we(()=>import("./powershell-COWaemsV.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>we(()=>import("./protobuf-Brw8urJB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>we(()=>import("./pug-8SOpv6rk.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>we(()=>import("./python-In1HHoJC.js"),__vite__mapDeps([15,2,3,4]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>we(()=>import("./qsharp-Bw9ernYp.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>we(()=>import("./r-j7ic8hl3.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>we(()=>import("./razor-VEmNVnW2.js"),__vite__mapDeps([16,2,3,4]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>we(()=>import("./redis-Bu5POkcn.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>we(()=>import("./redshift-Bs9aos_-.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>we(()=>import("./restructuredtext-CqXO7rUv.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>we(()=>import("./ruby-zBfavPgS.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>we(()=>import("./rust-BzKRNQWT.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>we(()=>import("./sb-BBc9UKZt.js"),[])});ye({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>we(()=>import("./scala-D9hQfWCl.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>we(()=>import("./scheme-BPhDTwHR.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>we(()=>import("./scss-CBJaRo0y.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>we(()=>import("./shell-DiJ1NA_G.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>we(()=>import("./solidity-Db0IVjzk.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>we(()=>import("./sophia-CnS9iZB_.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>we(()=>import("./sparql-CJmd_6j2.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>we(()=>import("./sql-ClhHkBeG.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>we(()=>import("./st-CHwy0fLd.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>we(()=>import("./swift-Bqt4WxQ4.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>we(()=>import("./tcl-Dm6ycUr_.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>we(()=>import("./twig-Csy3S7wG.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>we(()=>import("./typescript-vzwxO8Um.js"),__vite__mapDeps([12,2,3,4]))});ye({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>we(()=>import("./typespec-Btyra-wh.js"),[])});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>we(()=>import("./vb-Db0cS2oM.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>we(()=>import("./wgsl-DumH7NcR.js"),[])});ye({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\we(()=>import("./xml-CV6_LXH0.js"),__vite__mapDeps([17,2,3,4]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>we(()=>import("./yaml-0Pg85F2J.js"),__vite__mapDeps([18,2,3,4]))});var kPe=Object.defineProperty,DPe=(o,e,t)=>e in o?kPe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ve=(o,e,t)=>DPe(o,typeof e!="symbol"?e+"":e,t),wS,eV,SS,TE,yS;function IPe(o){return o.method!==void 0}var tV;(function(o){function e(t){return t}o.create=e})(tV||(tV={}));var Kr;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(Kr||(Kr={}));var y3=class{constructor(){ve(this,"listeners",new Set),ve(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},EPe=class{constructor(o){ve(this,"_value"),ve(this,"eventEmitter"),this._value=o,this.eventEmitter=new y3}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function NPe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function RE(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var TPe=class{constructor(){ve(this,"_state","none"),ve(this,"promise"),ve(this,"resolve",()=>{}),ve(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},rX=(wS=class{constructor(){ve(this,"_unprocessedMessages",[]),ve(this,"_messageListener"),ve(this,"id",wS.id++),ve(this,"_state",new EPe({state:"open"})),ve(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new RPe(this,o??new MPe)}},ve(wS,"id",0),wS),RPe=class{constructor(o,e){ve(this,"baseStream"),ve(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},MPe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},PPe=class aX{constructor(e){ve(this,"connect"),this.connect=e}mapContext(e){return new aX(t=>this.connect(t?APe(t,e):void 0))}};function APe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var OPe=class lX{constructor(e,t,i){ve(this,"_stream"),ve(this,"_listener"),ve(this,"_logger"),ve(this,"_unprocessedResponses",new Map),ve(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{IPe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new PPe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new lX(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:Kr.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Kr.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},am;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(am||(am={}));const cX=Symbol("OptionalMethodNotFound");var dX=class{contextualize(o){return new FPe(this,o)}},FPe=class extends dX{constructor(o,e){super(),ve(this,"underylingTypedChannel"),ve(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},EA=class hX extends dX{constructor(e,t={}){super(),ve(this,"channelCtor"),ve(this,"_requestSender"),ve(this,"_handler",new Map),ve(this,"_unknownNotificationHandler",new Set),ve(this,"_timeout"),ve(this,"sendExceptionDetails",!1),ve(this,"_logger"),ve(this,"listeningDeferred",new TPe),ve(this,"onListening",this.listeningDeferred.promise),ve(this,"_requestDidErrorEventEmitter",new y3),ve(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=NPe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new hX(OPe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Kr.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Kr.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:Kr.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Kr.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nV?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Kr.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return RE(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return RE(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return RE(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);iV(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===Kr.methodNotFound)return cX;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nV(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+` ${JSON.stringify(s,null,2)}`);return r.value}}async notify(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error;const n=e.paramsSerializer.serializeToJson(t);iV(n),this._requestSender.sendNotification({method:e.method,params:n},i)}};function iV(o){if(o!==null&&Array.isArray(o)&&typeof o!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var nV=class uX extends Error{constructor(e,t,i=Kr.genericApplicationError){super(e),ve(this,"data"),ve(this,"code"),this.data=t,this.code=i,Object.setPrototypeOf(this,uX.prototype)}},WPe=class NA{constructor(e,t,i,n,s=!1){ve(this,"method"),ve(this,"paramsSerializer"),ve(this,"resultSerializer"),ve(this,"errorSerializer"),ve(this,"isOptional"),ve(this,"kind","request"),this.method=e,this.paramsSerializer=t,this.resultSerializer=i,this.errorSerializer=n,this.isOptional=s}withMethod(e){return new NA(e,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new NA(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},BPe=class gX{constructor(e,t){ve(this,"method"),ve(this,"paramsSerializer"),ve(this,"kind","notification"),this.method=e,this.paramsSerializer=t}withMethod(e){return new gX(e,this.paramsSerializer)}};function Oe(o){return new WPe((o||{}).method,am.sAny(),am.sAny(),am.sAny())}function yi(o){return new BPe((o||{}).method,am.sAny())}const HPe=Symbol();var sV=(eV=HPe,SS=class{constructor(o){ve(this,"error"),ve(this,eV),this.error=o}},ve(SS,"factory",o=>new SS(o)),SS);function VPe(o){const e=oV(o.server),t=oV(o.client);return new zPe(o.tags||[],e,t)}function oV(o){const e={};for(const[t,i]of Object.entries(o)){const n=i.method?i.method:t;e[t]=i.withMethod(n)}return e}var zPe=class fX{constructor(e=[],t,i){ve(this,"tags"),ve(this,"server"),ve(this,"client"),this.tags=e,this.server=t,this.client=i}_onlyDesignTime(){return new Error("This property is not meant to be accessed at runtime")}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,i,n){const s=this.buildCounterpart(e,i),r=this.registerHandlers(e,t,n,s);return{counterpart:s,dispose:()=>r.dispose()}}buildCounterpart(e,t){const i={};for(const[n,s]of Object.entries(t)){let r;s.kind==="request"?s.isOptional?r=async(a,l)=>{a===void 0&&(a={});try{return await e.request(s,a,l)}catch(c){if(c&&c.code===Kr.methodNotFound)return cX;throw c}}:r=(a,l)=>(a===void 0&&(a={}),e.request(s,a,l)):r=(a,l)=>(a===void 0&&(a={}),e.notify(s,a,l)),i[n]=r}return i}registerHandlers(e,t,i,n){const s=[];for(const[r,a]of Object.entries(t))if(a.kind==="request"){let l=i[r];if(!l)continue;const c=this.createRequestHandler(n,l);s.push(e.registerRequestHandler(a,c))}else{const l=i[r];l&&s.push(e.registerNotificationHandler(a,(c,d)=>{l(c,{context:d,counterpart:n})}))}return{dispose:()=>s.forEach(r=>r.dispose())}}createRequestHandler(e,t){return async(i,n,s)=>{const r=await t(i,{context:s,counterpart:e,newErr:sV.factory,requestId:n});return r instanceof sV?r.error:{ok:r}}}static getServerFromStream(e,t,i,n){const s=EA.fromTransport(t,i),{server:r}=e.getServer(s,n);return s.startListen(),{channel:s,server:r}}static registerServerToStream(e,t,i,n){const s=EA.fromTransport(t,i),{client:r}=e.registerServer(s,n);return s.startListen(),{channel:s,client:r}}getServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.client,this.server,t);return{server:i,dispose:n}}registerServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.server,this.client,t);return{client:i,dispose:n}}withContext(){return new fX(this.tags,this.server,this.client)}};let lm=(function(o){return o.Comment="comment",o.Imports="imports",o.Region="region",o})({}),Pi=(function(o){return o[o.File=1]="File",o[o.Module=2]="Module",o[o.Namespace=3]="Namespace",o[o.Package=4]="Package",o[o.Class=5]="Class",o[o.Method=6]="Method",o[o.Property=7]="Property",o[o.Field=8]="Field",o[o.Constructor=9]="Constructor",o[o.Enum=10]="Enum",o[o.Interface=11]="Interface",o[o.Function=12]="Function",o[o.Variable=13]="Variable",o[o.Constant=14]="Constant",o[o.String=15]="String",o[o.Number=16]="Number",o[o.Boolean=17]="Boolean",o[o.Array=18]="Array",o[o.Object=19]="Object",o[o.Key=20]="Key",o[o.Null=21]="Null",o[o.EnumMember=22]="EnumMember",o[o.Struct=23]="Struct",o[o.Event=24]="Event",o[o.Operator=25]="Operator",o[o.TypeParameter=26]="TypeParameter",o})({}),pX=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),rV=(function(o){return o[o.Type=1]="Type",o[o.Parameter=2]="Parameter",o})({}),UPe=(function(o){return o[o.None=0]="None",o[o.Full=1]="Full",o[o.Incremental=2]="Incremental",o})({}),Bi=(function(o){return o[o.Text=1]="Text",o[o.Method=2]="Method",o[o.Function=3]="Function",o[o.Constructor=4]="Constructor",o[o.Field=5]="Field",o[o.Variable=6]="Variable",o[o.Class=7]="Class",o[o.Interface=8]="Interface",o[o.Module=9]="Module",o[o.Property=10]="Property",o[o.Unit=11]="Unit",o[o.Value=12]="Value",o[o.Enum=13]="Enum",o[o.Keyword=14]="Keyword",o[o.Snippet=15]="Snippet",o[o.Color=16]="Color",o[o.File=17]="File",o[o.Reference=18]="Reference",o[o.Folder=19]="Folder",o[o.EnumMember=20]="EnumMember",o[o.Constant=21]="Constant",o[o.Struct=22]="Struct",o[o.Event=23]="Event",o[o.Operator=24]="Operator",o[o.TypeParameter=25]="TypeParameter",o})({}),$Pe=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),jPe=(function(o){return o[o.PlainText=1]="PlainText",o[o.Snippet=2]="Snippet",o})({}),ME=(function(o){return o[o.Text=1]="Text",o[o.Read=2]="Read",o[o.Write=3]="Write",o})({}),sc=(function(o){return o.Empty="",o.QuickFix="quickfix",o.Refactor="refactor",o.RefactorExtract="refactor.extract",o.RefactorInline="refactor.inline",o.RefactorRewrite="refactor.rewrite",o.Source="source",o.SourceOrganizeImports="source.organizeImports",o.SourceFixAll="source.fixAll",o})({}),sL=(function(o){return o.PlainText="plaintext",o.Markdown="markdown",o})({}),Pc=(function(o){return o[o.Error=1]="Error",o[o.Warning=2]="Warning",o[o.Information=3]="Information",o[o.Hint=4]="Hint",o})({}),aV=(function(o){return o[o.Unnecessary=1]="Unnecessary",o[o.Deprecated=2]="Deprecated",o})({}),h0=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",o})({}),u0=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange",o})({}),TA=(function(o){return o[o.Invoked=1]="Invoked",o[o.Automatic=2]="Automatic",o})({}),qPe=(function(o){return o.Relative="relative",o})({});var rt=class{constructor(o){this.method=o}};const qe={textDocumentImplementation:new rt("textDocument/implementation"),textDocumentTypeDefinition:new rt("textDocument/typeDefinition"),textDocumentDocumentColor:new rt("textDocument/documentColor"),textDocumentColorPresentation:new rt("textDocument/colorPresentation"),textDocumentFoldingRange:new rt("textDocument/foldingRange"),textDocumentDeclaration:new rt("textDocument/declaration"),textDocumentSelectionRange:new rt("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new rt("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new rt("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new rt("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new rt("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new rt("workspace/willCreateFiles"),workspaceWillRenameFiles:new rt("workspace/willRenameFiles"),workspaceWillDeleteFiles:new rt("workspace/willDeleteFiles"),textDocumentMoniker:new rt("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new rt("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new rt("textDocument/inlineValue"),textDocumentInlayHint:new rt("textDocument/inlayHint"),textDocumentDiagnostic:new rt("textDocument/diagnostic"),textDocumentInlineCompletion:new rt("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new rt("textDocument/willSaveWaitUntil"),textDocumentCompletion:new rt("textDocument/completion"),textDocumentHover:new rt("textDocument/hover"),textDocumentSignatureHelp:new rt("textDocument/signatureHelp"),textDocumentDefinition:new rt("textDocument/definition"),textDocumentReferences:new rt("textDocument/references"),textDocumentDocumentHighlight:new rt("textDocument/documentHighlight"),textDocumentDocumentSymbol:new rt("textDocument/documentSymbol"),textDocumentCodeAction:new rt("textDocument/codeAction"),workspaceSymbol:new rt("workspace/symbol"),textDocumentCodeLens:new rt("textDocument/codeLens"),textDocumentDocumentLink:new rt("textDocument/documentLink"),textDocumentFormatting:new rt("textDocument/formatting"),textDocumentRangeFormatting:new rt("textDocument/rangeFormatting"),textDocumentRangesFormatting:new rt("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new rt("textDocument/onTypeFormatting"),textDocumentRename:new rt("textDocument/rename"),workspaceExecuteCommand:new rt("workspace/executeCommand"),workspaceDidCreateFiles:new rt("workspace/didCreateFiles"),workspaceDidRenameFiles:new rt("workspace/didRenameFiles"),workspaceDidDeleteFiles:new rt("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new rt("workspace/didChangeConfiguration"),textDocumentDidOpen:new rt("textDocument/didOpen"),textDocumentDidChange:new rt("textDocument/didChange"),textDocumentDidClose:new rt("textDocument/didClose"),textDocumentDidSave:new rt("textDocument/didSave"),textDocumentWillSave:new rt("textDocument/willSave"),workspaceDidChangeWatchedFiles:new rt("workspace/didChangeWatchedFiles")},nw=VPe({server:{textDocumentImplementation:Oe({method:"textDocument/implementation"}),textDocumentTypeDefinition:Oe({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:Oe({method:"textDocument/documentColor"}),textDocumentColorPresentation:Oe({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:Oe({method:"textDocument/foldingRange"}),textDocumentDeclaration:Oe({method:"textDocument/declaration"}),textDocumentSelectionRange:Oe({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:Oe({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:Oe({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:Oe({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:Oe({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:Oe({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:Oe({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:Oe({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:Oe({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:Oe({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:Oe({method:"workspace/willDeleteFiles"}),textDocumentMoniker:Oe({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:Oe({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:Oe({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:Oe({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:Oe({method:"textDocument/inlineValue"}),textDocumentInlayHint:Oe({method:"textDocument/inlayHint"}),inlayHintResolve:Oe({method:"inlayHint/resolve"}),textDocumentDiagnostic:Oe({method:"textDocument/diagnostic"}),workspaceDiagnostic:Oe({method:"workspace/diagnostic"}),textDocumentInlineCompletion:Oe({method:"textDocument/inlineCompletion"}),initialize:Oe({method:"initialize"}),shutdown:Oe({method:"shutdown"}),textDocumentWillSaveWaitUntil:Oe({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:Oe({method:"textDocument/completion"}),completionItemResolve:Oe({method:"completionItem/resolve"}),textDocumentHover:Oe({method:"textDocument/hover"}),textDocumentSignatureHelp:Oe({method:"textDocument/signatureHelp"}),textDocumentDefinition:Oe({method:"textDocument/definition"}),textDocumentReferences:Oe({method:"textDocument/references"}),textDocumentDocumentHighlight:Oe({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:Oe({method:"textDocument/documentSymbol"}),textDocumentCodeAction:Oe({method:"textDocument/codeAction"}),codeActionResolve:Oe({method:"codeAction/resolve"}),workspaceSymbol:Oe({method:"workspace/symbol"}),workspaceSymbolResolve:Oe({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:Oe({method:"textDocument/codeLens"}),codeLensResolve:Oe({method:"codeLens/resolve"}),textDocumentDocumentLink:Oe({method:"textDocument/documentLink"}),documentLinkResolve:Oe({method:"documentLink/resolve"}),textDocumentFormatting:Oe({method:"textDocument/formatting"}),textDocumentRangeFormatting:Oe({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:Oe({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:Oe({method:"textDocument/onTypeFormatting"}),textDocumentRename:Oe({method:"textDocument/rename"}),textDocumentPrepareRename:Oe({method:"textDocument/prepareRename"}),workspaceExecuteCommand:Oe({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:yi({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:yi({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:yi({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:yi({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:yi({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:yi({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:yi({method:"notebookDocument/didChange"}),notebookDocumentDidSave:yi({method:"notebookDocument/didSave"}),notebookDocumentDidClose:yi({method:"notebookDocument/didClose"}),initialized:yi({method:"initialized"}),exit:yi({method:"exit"}),workspaceDidChangeConfiguration:yi({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:yi({method:"textDocument/didOpen"}),textDocumentDidChange:yi({method:"textDocument/didChange"}),textDocumentDidClose:yi({method:"textDocument/didClose"}),textDocumentDidSave:yi({method:"textDocument/didSave"}),textDocumentWillSave:yi({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:yi({method:"workspace/didChangeWatchedFiles"}),setTrace:yi({method:"$/setTrace"}),cancelRequest:yi({method:"$/cancelRequest"}),progress:yi({method:"$/progress"})},client:{workspaceWorkspaceFolders:Oe({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:Oe({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:Oe({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:Oe({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:Oe({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:Oe({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:Oe({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:Oe({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:Oe({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:Oe({method:"client/registerCapability"}).optional(),clientUnregisterCapability:Oe({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:Oe({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:Oe({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:Oe({method:"workspace/applyEdit"}).optional(),windowShowMessage:yi({method:"window/showMessage"}),windowLogMessage:yi({method:"window/logMessage"}),telemetryEvent:yi({method:"telemetry/event"}),textDocumentPublishDiagnostics:yi({method:"textDocument/publishDiagnostics"}),logTrace:yi({method:"$/logTrace"}),cancelRequest:yi({method:"$/cancelRequest"}),progress:yi({method:"$/progress"})}});function Cg(o,e){if(o.textModel!==e)throw new Error(`Expected text model to be ${e}, but got ${o.textModel}`);return o}var Wi=(TE=class{constructor(){ve(this,"_store",new x3)}dispose(){this._store.dispose()}_register(o){if(o===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(o)}},ve(TE,"None",Object.freeze({dispose(){}})),TE),x3=(yS=class{constructor(){ve(this,"_toDispose",new Set),ve(this,"_isDisposed",!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const o of this._toDispose)o.dispose()}finally{this._toDispose.clear()}}add(o){if(!o)return o;if(o===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?yS.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(o),o}},ve(yS,"DISABLE_DISPOSED_WARNING",!1),yS);const mX=new Map([[sc.Empty,""],[sc.QuickFix,"quickfix"],[sc.Refactor,"refactor"],[sc.RefactorExtract,"refactor.extract"],[sc.RefactorInline,"refactor.inline"],[sc.RefactorRewrite,"refactor.rewrite"],[sc.Source,"source"],[sc.SourceOrganizeImports,"source.organizeImports"],[sc.SourceFixAll,"source.fixAll"]]);function KPe(o){if(o)return mX.get(o)??o}const GPe=new Map([[de.CodeActionTriggerType.Invoke,TA.Invoked],[de.CodeActionTriggerType.Auto,TA.Automatic]]);function ZPe(o){return GPe.get(o)??TA.Invoked}const _X=new Map([[Bi.Text,de.CompletionItemKind.Text],[Bi.Method,de.CompletionItemKind.Method],[Bi.Function,de.CompletionItemKind.Function],[Bi.Constructor,de.CompletionItemKind.Constructor],[Bi.Field,de.CompletionItemKind.Field],[Bi.Variable,de.CompletionItemKind.Variable],[Bi.Class,de.CompletionItemKind.Class],[Bi.Interface,de.CompletionItemKind.Interface],[Bi.Module,de.CompletionItemKind.Module],[Bi.Property,de.CompletionItemKind.Property],[Bi.Unit,de.CompletionItemKind.Unit],[Bi.Value,de.CompletionItemKind.Value],[Bi.Enum,de.CompletionItemKind.Enum],[Bi.Keyword,de.CompletionItemKind.Keyword],[Bi.Snippet,de.CompletionItemKind.Snippet],[Bi.Color,de.CompletionItemKind.Color],[Bi.File,de.CompletionItemKind.File],[Bi.Reference,de.CompletionItemKind.Reference],[Bi.Folder,de.CompletionItemKind.Folder],[Bi.EnumMember,de.CompletionItemKind.EnumMember],[Bi.Constant,de.CompletionItemKind.Constant],[Bi.Struct,de.CompletionItemKind.Struct],[Bi.Event,de.CompletionItemKind.Event],[Bi.Operator,de.CompletionItemKind.Operator],[Bi.TypeParameter,de.CompletionItemKind.TypeParameter]]);function YPe(o){return o?_X.get(o)??de.CompletionItemKind.Text:de.CompletionItemKind.Text}const bX=new Map([[$Pe.Deprecated,de.CompletionItemTag.Deprecated]]);function XPe(o){return bX.get(o)}const QPe=new Map([[de.CompletionTriggerKind.Invoke,h0.Invoked],[de.CompletionTriggerKind.TriggerCharacter,h0.TriggerCharacter],[de.CompletionTriggerKind.TriggerForIncompleteCompletions,h0.TriggerForIncompleteCompletions]]);function JPe(o){return QPe.get(o)??h0.Invoked}const eAe=new Map([[jPe.Snippet,de.CompletionItemInsertTextRule.InsertAsSnippet]]);function tAe(o){if(o)return eAe.get(o)}const CX=new Map([[Pi.File,de.SymbolKind.File],[Pi.Module,de.SymbolKind.Module],[Pi.Namespace,de.SymbolKind.Namespace],[Pi.Package,de.SymbolKind.Package],[Pi.Class,de.SymbolKind.Class],[Pi.Method,de.SymbolKind.Method],[Pi.Property,de.SymbolKind.Property],[Pi.Field,de.SymbolKind.Field],[Pi.Constructor,de.SymbolKind.Constructor],[Pi.Enum,de.SymbolKind.Enum],[Pi.Interface,de.SymbolKind.Interface],[Pi.Function,de.SymbolKind.Function],[Pi.Variable,de.SymbolKind.Variable],[Pi.Constant,de.SymbolKind.Constant],[Pi.String,de.SymbolKind.String],[Pi.Number,de.SymbolKind.Number],[Pi.Boolean,de.SymbolKind.Boolean],[Pi.Array,de.SymbolKind.Array],[Pi.Object,de.SymbolKind.Object],[Pi.Key,de.SymbolKind.Key],[Pi.Null,de.SymbolKind.Null],[Pi.EnumMember,de.SymbolKind.EnumMember],[Pi.Struct,de.SymbolKind.Struct],[Pi.Event,de.SymbolKind.Event],[Pi.Operator,de.SymbolKind.Operator],[Pi.TypeParameter,de.SymbolKind.TypeParameter]]);function vX(o){return CX.get(o)??de.SymbolKind.File}const iAe=new Map([[pX.Deprecated,de.SymbolTag.Deprecated]]);function wX(o){return iAe.get(o)}const nAe=new Map([[ME.Text,de.DocumentHighlightKind.Text],[ME.Read,de.DocumentHighlightKind.Read],[ME.Write,de.DocumentHighlightKind.Write]]);function sAe(o){return o?nAe.get(o)??de.DocumentHighlightKind.Text:de.DocumentHighlightKind.Text}const oAe=new Map([[lm.Comment,de.FoldingRangeKind.Comment],[lm.Imports,de.FoldingRangeKind.Imports],[lm.Region,de.FoldingRangeKind.Region]]);function rAe(o){if(o)return oAe.get(o)}const aAe=new Map([[Zr.Error,Pc.Error],[Zr.Warning,Pc.Warning],[Zr.Info,Pc.Information],[Zr.Hint,Pc.Hint]]);function lAe(o){return aAe.get(o)??Pc.Error}const cAe=new Map([[Pc.Error,Zr.Error],[Pc.Warning,Zr.Warning],[Pc.Information,Zr.Info],[Pc.Hint,Zr.Hint]]);function dAe(o){return o?cAe.get(o)??Zr.Error:Zr.Error}const SX=new Map([[aV.Unnecessary,nL.Unnecessary],[aV.Deprecated,nL.Deprecated]]);function hAe(o){return SX.get(o)}const uAe=new Map([[de.SignatureHelpTriggerKind.Invoke,u0.Invoked],[de.SignatureHelpTriggerKind.TriggerCharacter,u0.TriggerCharacter],[de.SignatureHelpTriggerKind.ContentChange,u0.ContentChange]]);function gAe(o){return uAe.get(o)??u0.Invoked}function cm(o){if(o)return{id:o.command,title:o.title,arguments:o.arguments}}const fAe=new Map([[rV.Type,de.InlayHintKind.Type],[rV.Parameter,de.InlayHintKind.Parameter]]);function pAe(o){return o?fAe.get(o)??de.InlayHintKind.Type:de.InlayHintKind.Type}function Ah(o,e){if("targetUri"in o){const t=e.bridge.translateBackRange({uri:o.targetUri},o.targetRange);return{uri:t.textModel.uri,range:t.range,originSelectionRange:o.originSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.originSelectionRange).range:void 0,targetSelectionRange:o.targetSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.targetSelectionRange).range:void 0}}else{const t=e.bridge.translateBackRange({uri:o.uri},o.range);return{uri:t.textModel.uri,range:t.range}}}function In(o){return!o||o.length===0?{language:"*"}:o.map(e=>"notebook"in e?typeof e.notebook=="string"?{notebookType:e.notebook,language:e.language}:{notebookType:e.notebook.notebookType,language:e.language,pattern:e.notebook.pattern,scheme:e.notebook.scheme}:{language:e.language,pattern:e.pattern,scheme:e.scheme})}function mAe(o,e){if(!e)return!0;const t=o.getLanguageId();if(o.uri.toString(!0),!e||e.length===0)return!0;for(const i of e)if(!(i.language&&i.language!=="*"&&i.language!==t))return!0;return!1}function RA(o){const e={severity:dAe(o.severity),startLineNumber:o.range.start.line+1,startColumn:o.range.start.character+1,endLineNumber:o.range.end.line+1,endColumn:o.range.end.character+1,message:o.message,source:o.source,code:typeof o.code=="string"?o.code:o.code?.toString()};return o.tags&&(e.tags=o.tags.map(t=>hAe(t)).filter(t=>t!==void 0)),o.relatedInformation&&(e.relatedInformation=o.relatedInformation.map(t=>({resource:hD.parse(t.location.uri),startLineNumber:t.location.range.start.line+1,startColumn:t.location.range.start.character+1,endLineNumber:t.location.range.end.line+1,endColumn:t.location.range.end.character+1,message:t.message}))),e}var _Ae=class extends Wi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(_X.keys())},completionItem:{tagSupport:{valueSet:Array.from(bX.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(qe.textDocumentCompletion,!0,e=>de.registerCompletionItemProvider(In(e.documentSelector),new bAe(this._connection,e))))}},bAe=class{constructor(o,e){ve(this,"resolveCompletionItem"),this._client=o,this._capabilities=e,e.resolveProvider&&(this.resolveCompletionItem=async(t,i)=>(yX(t,await this._client.server.completionItemResolve(t._lspItem),this._client.bridge,t._translated,t._model),t))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(o,e,t,i){const n=this._client.bridge.translate(o,e),s=await this._client.server.textDocumentCompletion({textDocument:n.textDocument,position:n.position,context:t.triggerCharacter?{triggerKind:JPe(t.triggerKind),triggerCharacter:t.triggerCharacter}:void 0});return s?{suggestions:(Array.isArray(s)?s:s.items).map(r=>({...CAe(r,this._client.bridge,n,o,e),_lspItem:r,_translated:n,_model:o}))}:{suggestions:[]}}};function CAe(o,e,t,i,n){let s=o.insertText||o.label,r;o.textEdit&&("range"in o.textEdit?(s=o.textEdit.newText,r=Cg(e.translateBackRange(t.textDocument,o.textEdit.range),i).range):(s=o.textEdit.newText,r={insert:Cg(e.translateBackRange(t.textDocument,o.textEdit.insert),i).range,replace:Cg(e.translateBackRange(t.textDocument,o.textEdit.replace),i).range})),r||(r=x_.fromPositions(n,n));const a={label:o.label,kind:YPe(o.kind),insertText:s,sortText:o.sortText,filterText:o.filterText,preselect:o.preselect,commitCharacters:o.commitCharacters,range:r};return yX(a,o,e,t,i),a}function yX(o,e,t,i,n){e.detail!==void 0&&(o.detail=e.detail),e.documentation!==void 0&&(o.documentation=vAe(e.documentation)),e.insertTextFormat!==void 0&&(o.insertTextRules=tAe(e.insertTextFormat)),e.tags&&e.tags.length>0&&(o.tags=e.tags.map(XPe).filter(s=>s!==void 0)),e.additionalTextEdits&&e.additionalTextEdits.length>0&&(o.additionalTextEdits=e.additionalTextEdits.map(s=>({range:Cg(t.translateBackRange(i.textDocument,s.range),n).range,text:s.newText}))),e.command&&(o.command=cm(e.command))}function vAe(o){if(o)return typeof o=="string"?o:{value:o.value,isTrusted:!0}}var wAe=class extends Wi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[sL.Markdown,sL.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(qe.textDocumentHover,!0,e=>de.registerHoverProvider(In(e.documentSelector),new SAe(this._connection,e))))}},SAe=class{constructor(o,e){this._client=o,this._capabilities=e}async provideHover(o,e,t){const i=this._client.bridge.translate(o,e),n=await this._client.server.textDocumentHover({textDocument:i.textDocument,position:i.position});return!n||!n.contents?null:{contents:yAe(n.contents),range:n.range?this._client.bridge.translateBackRange(i.textDocument,n.range).range:void 0}}};function yAe(o){return Array.isArray(o)?o.map(e=>lV(e)):[lV(o)]}function lV(o){return typeof o=="string"?{value:o,isTrusted:!0}:"kind"in o?{value:o.value,isTrusted:!0}:{value:`\`\`\`${o.language} ${o.value} diff --git a/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DzkblHwz.js b/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-C3PUpvmO.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DzkblHwz.js rename to apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-C3PUpvmO.js index 429ef5216..c52c49afa 100644 --- a/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DzkblHwz.js +++ b/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-C3PUpvmO.js @@ -1,4 +1,4 @@ -import{g as zt}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as Ut}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as p,b as Kt,a as Zt,s as jt,g as qt,p as Wt,q as Ht,c as $,l as M,k as Qt,r as Xt,t as Jt,u as $t,v as te,x as ee,y as se,j as ie,z as re}from"./mermaid.core-BusHtpbx.js";import{c as ne}from"./channel-DZ2XEbLN.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Tt=(function(){var e=p(function(V,n,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=n);return o},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],u=[2,2],r=[1,7],c=[1,9],b=[1,10],k=[1,11],f=[1,12],S=[1,30],d=[1,23],g=[1,24],x=[1,25],B=[1,26],Y=[1,27],m=[1,19],A=[1,28],U=[1,29],N=[1,20],I=[1,18],R=[1,21],v=[1,22],Ot=[2,6],l=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],K=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],D=[1,46],L=[1,47],Z=[1,57],j=[43,51,53,54,55,74,75],q=[1,70],W=[1,68],w=[1,65],H=[1,69],Q=[1,71],tt=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],et=[1,78],st=[1,77],it=[1,76],xt=[69,70,71,72,73],Nt=[1,91],Ct=[6,9,45,50],P=[6,9,12,44,45,50,51,52],rt=[1,101],nt=[1,100],at=[1,99],X=[18,61],At=[1,110],It=[1,109],Rt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(n,o,h,i,y,t,J){var s=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:this.$=t[s-1].concat(t[s]);break;case 4:this.$=t[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[s-4]),i.addEntity(t[s-2]),i.addRelationship(t[s-4],t[s],t[s-2],t[s-3]),this.$=[t[s-4],t[s-2]];break;case 8:i.addEntity(t[s-8]),i.addEntity(t[s-4]),i.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),i.setClass([t[s-8]],t[s-6]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-8],t[s-4]];break;case 9:i.addEntity(t[s-6]),i.addEntity(t[s-2]),i.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),i.setClass([t[s-6]],t[s-4]),this.$=[t[s-6],t[s-2]];break;case 10:i.addEntity(t[s-6]),i.addEntity(t[s-4]),i.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-6],t[s-4]];break;case 11:i.addEntity(t[s-3]),i.addAttributes(t[s-3],t[s-1]),this.$=[t[s-3]];break;case 12:i.addEntity(t[s-5]),i.addAttributes(t[s-5],t[s-1]),i.setClass([t[s-5]],t[s-3]),this.$=[t[s-5]];break;case 13:i.addEntity(t[s-2]),this.$=[t[s-2]];break;case 14:i.addEntity(t[s-4]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-4]];break;case 15:i.addEntity(t[s]),this.$=[t[s]];break;case 16:i.addEntity(t[s-2]),i.setClass([t[s-2]],t[s]),this.$=[t[s-2]];break;case 17:i.addEntity(t[s-6],t[s-4]),i.addAttributes(t[s-6],t[s-1]),this.$=[t[s-6]];break;case 18:i.addEntity(t[s-8],t[s-6]),i.addAttributes(t[s-8],t[s-1]),i.setClass([t[s-8]],t[s-3]),this.$=[t[s-8]];break;case 19:i.addEntity(t[s-5],t[s-3]),this.$=[t[s-5]];break;case 20:i.addEntity(t[s-7],t[s-5]),i.setClass([t[s-7]],t[s-2]),this.$=[t[s-7]];break;case 21:i.addEntity(t[s-3],t[s-1]);break;case 22:i.addEntity(t[s-5],t[s-3]),i.setClass([t[s-5]],t[s]);break;case 23:case 24:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[s]:(i.setDirection(t[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[s-2].id},t[s-1],{text:t[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-1],text:t[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-4],text:t[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[s];break;case 35:this.$=t[s-1]+" "+t[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[s-3],i.addClass(t[s-2],t[s-1]);break;case 41:case 42:case 63:case 72:this.$=[t[s]];break;case 43:case 44:this.$=t[s-2].concat([t[s]]);break;case 45:this.$=t[s-2],i.setClass(t[s-1],t[s]);break;case 46:this.$=t[s-3],i.addCssStyles(t[s-2],t[s-1]);break;case 47:this.$=[t[s]];break;case 48:t[s-2].push(t[s]),this.$=t[s-2];break;case 50:this.$=t[s-1]+t[s];break;case 58:case 84:case 85:this.$=t[s].replace(/"/g,"");break;case 64:t[s].push(t[s-1]),this.$=t[s];break;case 65:this.$={type:t[s-1],name:t[s]};break;case 66:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 67:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 68:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 69:case 71:case 74:this.$=t[s];break;case 70:this.$=t[s-1]+t[s];break;case 73:t[s-2].push(t[s]),this.$=t[s-2];break;case 75:this.$=t[s].replace(/"/g,"");break;case 76:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,u,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},e(a,Ot,{1:[2,1]}),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e(l,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(l,[2,26]),e(l,[2,27]),e(l,[2,28]),e(l,[2,29]),e(l,[2,30]),e(l,u,{5:44}),e(K,[2,58]),e(K,[2,59]),e(K,[2,60]),e(K,[2,61]),e(K,[2,62]),e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),e(l,[2,39]),{15:45,43:D,44:L},{15:48,43:D,44:L},{15:49,43:D,44:L},{10:50,43:m,51:N,53:I,54:R,55:v},{10:51,43:m,51:N,53:I,54:R,55:v},{15:52,43:D,44:L},{17:53,18:[1,54],56:55,57:56,61:Z},{10:58,43:m,51:N,53:I,54:R,55:v},{68:59,74:[1,60],75:[1,61]},e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},{12:q,42:64,44:W,45:w,48:66,49:67,51:H,52:Q},e(tt,[2,41]),e(tt,[2,42]),{15:72,43:D,44:L,45:w},{12:q,42:73,44:W,45:w,48:66,49:67,51:H,52:Q},{6:et,9:st,19:[1,75],35:74,50:it},{12:[1,79],14:[1,80]},e(l,[2,16],{67:35,11:81,16:[1,82],45:w,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},e(l,[2,13]),{17:84,18:[2,63],56:55,57:56,61:Z},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},e(xt,[2,82]),e(xt,[2,83]),e(l,[2,31]),e(l,Ot),{6:et,9:st,35:90,45:Nt,50:it},{43:[1,92],44:[1,93]},e(Ct,[2,47],{49:94,12:q,44:W,51:H,52:Q}),e(P,[2,49]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(l,[2,45],{45:w}),{6:et,9:st,35:95,45:Nt,50:it},e(l,[2,32]),{10:97,36:96,43:m,51:N,53:I,54:R,55:v},e(l,[2,51]),e(l,[2,52]),e(l,[2,53]),{13:98,43:rt,53:nt,76:at},{15:102,43:D,44:L},{10:103,43:m,51:N,53:I,54:R,55:v},{17:104,18:[1,105],56:55,57:56,61:Z},e(l,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:At,66:It}),e([18,61,65,66],[2,71]),{61:[2,70]},e(l,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(l,[2,40]),{12:q,44:W,48:113,49:67,51:H,52:Q},e(tt,[2,43]),e(tt,[2,44]),e(P,[2,50]),e(l,[2,46]),{10:115,20:[1,114],43:m,51:N,53:I,54:R,55:v},e(Rt,[2,34]),e(l,[2,7]),e(l,[2,84]),e(l,[2,85]),e(l,[2,86]),{12:[1,116],45:w},{12:[1,118],14:[1,117]},{18:[1,119]},e(l,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:It}),e(X,[2,67]),e(yt,[2,72]),e(X,[2,75]),e(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:Z},{15:124,43:D,44:L},e(Ct,[2,48],{49:94,12:q,44:W,51:H,52:Q}),{6:et,9:st,35:125,50:it},e(Rt,[2,35]),{13:126,43:rt,53:nt,76:at},{15:127,43:D,44:L},{13:128,43:rt,53:nt,76:at},e(l,[2,12]),e(X,[2,68]),{63:129,65:At},{18:[1,130]},e(l,[2,19]),e(l,[2,22],{16:[1,131],45:w}),e(l,[2,33]),e(l,[2,10]),{12:[1,132],45:w},e(l,[2,9]),e(yt,[2,73]),e(l,[2,17]),{17:133,18:[1,134],56:55,57:56,61:Z},{13:135,43:rt,53:nt,76:at},{18:[1,136]},e(l,[2,20]),e(l,[2,8]),e(l,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(n,o){if(o.recoverable)this.trace(n);else{var h=new Error(n);throw h.hash=o,h}},"parseError"),parse:p(function(n){var o=this,h=[0],i=[],y=[null],t=[],J=this.table,s="",ct=0,vt=0,Gt=2,Dt=1,Ft=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(G.yy[kt]=this.yy[kt]);_.setInput(n,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var mt=_.yylloc;t.push(mt);var Yt=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(T){h.length=h.length-2*T,y.length=y.length-T,t.length=t.length-T}p(Pt,"popStack");function Lt(){var T;return T=i.pop()||_.lex()||Dt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}p(Lt,"lex");for(var E,F,O,Et,z={},lt,C,wt,ht;;){if(F=h[h.length-1],this.defaultActions[F]?O=this.defaultActions[F]:((E===null||typeof E>"u")&&(E=Lt()),O=J[F]&&J[F][E]),typeof O>"u"||!O.length||!O[0]){var St="";ht=[];for(lt in J[F])this.terminals_[lt]&<>Gt&&ht.push("'"+this.terminals_[lt]+"'");_.showPosition?St="Parse error on line "+(ct+1)+`: +import{g as zt}from"./chunk-XXDRQBXY-HOEikrp0.js";import{s as Ut}from"./chunk-POPQ4Y6H-BFcN0waq.js";import{_ as p,b as Kt,a as Zt,s as jt,g as qt,p as Wt,q as Ht,c as $,l as M,k as Qt,r as Xt,t as Jt,u as $t,v as te,x as ee,y as se,j as ie,z as re}from"./mermaid.core-CwGP16Dm.js";import{c as ne}from"./channel-BpqL3HJE.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var Tt=(function(){var e=p(function(V,n,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=n);return o},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],u=[2,2],r=[1,7],c=[1,9],b=[1,10],k=[1,11],f=[1,12],S=[1,30],d=[1,23],g=[1,24],x=[1,25],B=[1,26],Y=[1,27],m=[1,19],A=[1,28],U=[1,29],N=[1,20],I=[1,18],R=[1,21],v=[1,22],Ot=[2,6],l=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],K=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],D=[1,46],L=[1,47],Z=[1,57],j=[43,51,53,54,55,74,75],q=[1,70],W=[1,68],w=[1,65],H=[1,69],Q=[1,71],tt=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],et=[1,78],st=[1,77],it=[1,76],xt=[69,70,71,72,73],Nt=[1,91],Ct=[6,9,45,50],P=[6,9,12,44,45,50,51,52],rt=[1,101],nt=[1,100],at=[1,99],X=[18,61],At=[1,110],It=[1,109],Rt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(n,o,h,i,y,t,J){var s=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:this.$=t[s-1].concat(t[s]);break;case 4:this.$=t[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[s-4]),i.addEntity(t[s-2]),i.addRelationship(t[s-4],t[s],t[s-2],t[s-3]),this.$=[t[s-4],t[s-2]];break;case 8:i.addEntity(t[s-8]),i.addEntity(t[s-4]),i.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),i.setClass([t[s-8]],t[s-6]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-8],t[s-4]];break;case 9:i.addEntity(t[s-6]),i.addEntity(t[s-2]),i.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),i.setClass([t[s-6]],t[s-4]),this.$=[t[s-6],t[s-2]];break;case 10:i.addEntity(t[s-6]),i.addEntity(t[s-4]),i.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-6],t[s-4]];break;case 11:i.addEntity(t[s-3]),i.addAttributes(t[s-3],t[s-1]),this.$=[t[s-3]];break;case 12:i.addEntity(t[s-5]),i.addAttributes(t[s-5],t[s-1]),i.setClass([t[s-5]],t[s-3]),this.$=[t[s-5]];break;case 13:i.addEntity(t[s-2]),this.$=[t[s-2]];break;case 14:i.addEntity(t[s-4]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-4]];break;case 15:i.addEntity(t[s]),this.$=[t[s]];break;case 16:i.addEntity(t[s-2]),i.setClass([t[s-2]],t[s]),this.$=[t[s-2]];break;case 17:i.addEntity(t[s-6],t[s-4]),i.addAttributes(t[s-6],t[s-1]),this.$=[t[s-6]];break;case 18:i.addEntity(t[s-8],t[s-6]),i.addAttributes(t[s-8],t[s-1]),i.setClass([t[s-8]],t[s-3]),this.$=[t[s-8]];break;case 19:i.addEntity(t[s-5],t[s-3]),this.$=[t[s-5]];break;case 20:i.addEntity(t[s-7],t[s-5]),i.setClass([t[s-7]],t[s-2]),this.$=[t[s-7]];break;case 21:i.addEntity(t[s-3],t[s-1]);break;case 22:i.addEntity(t[s-5],t[s-3]),i.setClass([t[s-5]],t[s]);break;case 23:case 24:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[s]:(i.setDirection(t[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[s-2].id},t[s-1],{text:t[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-1],text:t[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-4],text:t[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[s];break;case 35:this.$=t[s-1]+" "+t[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[s-3],i.addClass(t[s-2],t[s-1]);break;case 41:case 42:case 63:case 72:this.$=[t[s]];break;case 43:case 44:this.$=t[s-2].concat([t[s]]);break;case 45:this.$=t[s-2],i.setClass(t[s-1],t[s]);break;case 46:this.$=t[s-3],i.addCssStyles(t[s-2],t[s-1]);break;case 47:this.$=[t[s]];break;case 48:t[s-2].push(t[s]),this.$=t[s-2];break;case 50:this.$=t[s-1]+t[s];break;case 58:case 84:case 85:this.$=t[s].replace(/"/g,"");break;case 64:t[s].push(t[s-1]),this.$=t[s];break;case 65:this.$={type:t[s-1],name:t[s]};break;case 66:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 67:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 68:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 69:case 71:case 74:this.$=t[s];break;case 70:this.$=t[s-1]+t[s];break;case 73:t[s-2].push(t[s]),this.$=t[s-2];break;case 75:this.$=t[s].replace(/"/g,"");break;case 76:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,u,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},e(a,Ot,{1:[2,1]}),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e(l,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(l,[2,26]),e(l,[2,27]),e(l,[2,28]),e(l,[2,29]),e(l,[2,30]),e(l,u,{5:44}),e(K,[2,58]),e(K,[2,59]),e(K,[2,60]),e(K,[2,61]),e(K,[2,62]),e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),e(l,[2,39]),{15:45,43:D,44:L},{15:48,43:D,44:L},{15:49,43:D,44:L},{10:50,43:m,51:N,53:I,54:R,55:v},{10:51,43:m,51:N,53:I,54:R,55:v},{15:52,43:D,44:L},{17:53,18:[1,54],56:55,57:56,61:Z},{10:58,43:m,51:N,53:I,54:R,55:v},{68:59,74:[1,60],75:[1,61]},e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},{12:q,42:64,44:W,45:w,48:66,49:67,51:H,52:Q},e(tt,[2,41]),e(tt,[2,42]),{15:72,43:D,44:L,45:w},{12:q,42:73,44:W,45:w,48:66,49:67,51:H,52:Q},{6:et,9:st,19:[1,75],35:74,50:it},{12:[1,79],14:[1,80]},e(l,[2,16],{67:35,11:81,16:[1,82],45:w,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},e(l,[2,13]),{17:84,18:[2,63],56:55,57:56,61:Z},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},e(xt,[2,82]),e(xt,[2,83]),e(l,[2,31]),e(l,Ot),{6:et,9:st,35:90,45:Nt,50:it},{43:[1,92],44:[1,93]},e(Ct,[2,47],{49:94,12:q,44:W,51:H,52:Q}),e(P,[2,49]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(l,[2,45],{45:w}),{6:et,9:st,35:95,45:Nt,50:it},e(l,[2,32]),{10:97,36:96,43:m,51:N,53:I,54:R,55:v},e(l,[2,51]),e(l,[2,52]),e(l,[2,53]),{13:98,43:rt,53:nt,76:at},{15:102,43:D,44:L},{10:103,43:m,51:N,53:I,54:R,55:v},{17:104,18:[1,105],56:55,57:56,61:Z},e(l,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:At,66:It}),e([18,61,65,66],[2,71]),{61:[2,70]},e(l,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(l,[2,40]),{12:q,44:W,48:113,49:67,51:H,52:Q},e(tt,[2,43]),e(tt,[2,44]),e(P,[2,50]),e(l,[2,46]),{10:115,20:[1,114],43:m,51:N,53:I,54:R,55:v},e(Rt,[2,34]),e(l,[2,7]),e(l,[2,84]),e(l,[2,85]),e(l,[2,86]),{12:[1,116],45:w},{12:[1,118],14:[1,117]},{18:[1,119]},e(l,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:It}),e(X,[2,67]),e(yt,[2,72]),e(X,[2,75]),e(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:Z},{15:124,43:D,44:L},e(Ct,[2,48],{49:94,12:q,44:W,51:H,52:Q}),{6:et,9:st,35:125,50:it},e(Rt,[2,35]),{13:126,43:rt,53:nt,76:at},{15:127,43:D,44:L},{13:128,43:rt,53:nt,76:at},e(l,[2,12]),e(X,[2,68]),{63:129,65:At},{18:[1,130]},e(l,[2,19]),e(l,[2,22],{16:[1,131],45:w}),e(l,[2,33]),e(l,[2,10]),{12:[1,132],45:w},e(l,[2,9]),e(yt,[2,73]),e(l,[2,17]),{17:133,18:[1,134],56:55,57:56,61:Z},{13:135,43:rt,53:nt,76:at},{18:[1,136]},e(l,[2,20]),e(l,[2,8]),e(l,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(n,o){if(o.recoverable)this.trace(n);else{var h=new Error(n);throw h.hash=o,h}},"parseError"),parse:p(function(n){var o=this,h=[0],i=[],y=[null],t=[],J=this.table,s="",ct=0,vt=0,Gt=2,Dt=1,Ft=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(G.yy[kt]=this.yy[kt]);_.setInput(n,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var mt=_.yylloc;t.push(mt);var Yt=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(T){h.length=h.length-2*T,y.length=y.length-T,t.length=t.length-T}p(Pt,"popStack");function Lt(){var T;return T=i.pop()||_.lex()||Dt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}p(Lt,"lex");for(var E,F,O,Et,z={},lt,C,wt,ht;;){if(F=h[h.length-1],this.defaultActions[F]?O=this.defaultActions[F]:((E===null||typeof E>"u")&&(E=Lt()),O=J[F]&&J[F][E]),typeof O>"u"||!O.length||!O[0]){var St="";ht=[];for(lt in J[F])this.terminals_[lt]&<>Gt&&ht.push("'"+this.terminals_[lt]+"'");_.showPosition?St="Parse error on line "+(ct+1)+`: `+_.showPosition()+` Expecting `+ht.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(ct+1)+": Unexpected "+(E==Dt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:_.match,token:this.terminals_[E]||E,line:_.yylineno,loc:mt,expected:ht})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+E);switch(O[0]){case 1:h.push(E),y.push(_.yytext),t.push(_.yylloc),h.push(O[1]),E=null,vt=_.yyleng,s=_.yytext,ct=_.yylineno,mt=_.yylloc;break;case 2:if(C=this.productions_[O[1]][1],z.$=y[y.length-C],z._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},Yt&&(z._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(z,[s,vt,ct,G.yy,O[1],y,t].concat(Ft)),typeof Et<"u")return Et;C&&(h=h.slice(0,-1*C*2),y=y.slice(0,-1*C),t=t.slice(0,-1*C)),h.push(this.productions_[O[1]][0]),y.push(z.$),t.push(z._$),wt=J[h[h.length-2]][h[h.length-1]],h.push(wt);break;case 3:return!0}}return!0},"parse")},Bt=(function(){var V={EOF:1,parseError:p(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw new Error(o)},"parseError"),setInput:p(function(n,o){return this.yy=o||this.yy||{},this._input=n,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:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var o=n.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var o=n.length,h=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=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),h.length-1&&(this.yylineno-=h.length-1);var y=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:h?(h.length===i.length?this.yylloc.first_column:0)+i[i.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),o=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-D6_Z_lfU.js b/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-SicbxN4x.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-D6_Z_lfU.js rename to apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-SicbxN4x.js index f36395ad4..2cd4460bb 100644 --- a/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-D6_Z_lfU.js +++ b/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-SicbxN4x.js @@ -1,4 +1,4 @@ -import{g as Ht}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{g as Xt}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as Qt}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as k,b3 as Zt,Y as Ot,l as J,c as Ae,x as Jt,y as $t,z as it,b as e1,s as t1,p as s1,a as i1,g as r1,q as a1,k as n1,Z as u1,$ as o1,ca as l1,t as tt,j as st,r as c1,b7 as h1,u as d1}from"./mermaid.core-BusHtpbx.js";import{f as p1}from"./chunk-F27PBJKO-CGsciVEq.js";import{p as f1}from"./purify.es-5AjVNlXF.js";import{c as g1}from"./channel-DZ2XEbLN.js";var b1="flowchart-",A1=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=e1,this.setAccDescription=t1,this.setDiagramTitle=s1,this.getAccTitle=i1,this.getAccDescription=r1,this.getDiagramTitle=a1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{k(this,"FlowDB")}sanitizeText(e){return n1.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,u,f,l={},b){if(!e||e.trim().length===0)return;let h;if(b!==void 0){let o;b.includes(` +import{g as Ht}from"./chunk-5VM5RSS4-Ny2gwX65.js";import{g as Xt}from"./chunk-XXDRQBXY-HOEikrp0.js";import{s as Qt}from"./chunk-POPQ4Y6H-BFcN0waq.js";import{_ as k,b3 as Zt,Y as Ot,l as J,c as Ae,x as Jt,y as $t,z as it,b as e1,s as t1,p as s1,a as i1,g as r1,q as a1,k as n1,Z as u1,$ as o1,ca as l1,t as tt,j as st,r as c1,b7 as h1,u as d1}from"./mermaid.core-CwGP16Dm.js";import{f as p1}from"./chunk-F27PBJKO-pJCmv4XH.js";import{p as f1}from"./purify.es-5AjVNlXF.js";import{c as g1}from"./channel-BpqL3HJE.js";var b1="flowchart-",A1=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=e1,this.setAccDescription=t1,this.setDiagramTitle=s1,this.getAccTitle=i1,this.getAccDescription=r1,this.getDiagramTitle=a1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{k(this,"FlowDB")}sanitizeText(e){return n1.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,u,f,l={},b){if(!e||e.trim().length===0)return;let h;if(b!==void 0){let o;b.includes(` `)?o=b+` `:o=`{ `+b+` diff --git a/apps/pythinker-code/dist-web/assets/freemarker2-CG8OSn8H.js b/apps/pythinker-code/dist-web/assets/freemarker2-CEwDtIx2.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/freemarker2-CG8OSn8H.js rename to apps/pythinker-code/dist-web/assets/freemarker2-CEwDtIx2.js index ef961c604..71419aa79 100644 --- a/apps/pythinker-code/dist-web/assets/freemarker2-CG8OSn8H.js +++ b/apps/pythinker-code/dist-web/assets/freemarker2-CEwDtIx2.js @@ -1,3 +1,3 @@ -import{l as c}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` +import{l as c}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(r,t),i=_(a,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const $={conf:l(r),language:_(r,k)},E={conf:l(a),language:_(a,k)},B={conf:l(r),language:_(r,p)},D={conf:l(a),language:_(a,p)},C={conf:g(),language:A(k)},v={conf:g(),language:A(p)};export{B as TagAngleInterpolationBracket,$ as TagAngleInterpolationDollar,v as TagAutoInterpolationBracket,C as TagAutoInterpolationDollar,D as TagBracketInterpolationBracket,E as TagBracketInterpolationDollar}; diff --git a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-B_T2-DEq.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js rename to apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-B_T2-DEq.js index b7c40aaa8..060778509 100644 --- a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js +++ b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-B_T2-DEq.js @@ -1,4 +1,4 @@ -import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,b4 as oe,g as Nn,s as Pn,q as Vn,p as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bm as it,l as Tt,k as Zn,o as Xn,r as Gn,z as jn}from"./mermaid.core-BusHtpbx.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-Be-oTS5b.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: +import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,b4 as oe,g as Nn,s as Pn,q as Vn,p as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bm as it,l as Tt,k as Zn,o as Xn,r as Gn,z as jn}from"./mermaid.core-CwGP16Dm.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-Dzo12Me2.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,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:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),b.length-1&&(this.yylineno-=b.length-1);var I=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:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-Cd9HyqpC.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js rename to apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-Cd9HyqpC.js index 3c604fe02..7c05d0212 100644 --- a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js +++ b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-Cd9HyqpC.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-CPFb-YMA.js";import{p as he}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,A as J,l as w,j as me,c as W,z as pe,B as be,r as we,k as B,D as ke,E as ve,F as Ce}from"./mermaid.core-BusHtpbx.js";import{p as Ee}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` +import{I as le}from"./chunk-2Q5K7J3B-ZQItsBh7.js";import{p as he}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,A as J,l as w,j as me,c as W,z as pe,B as be,r as we,k as B,D as ke,E as ve,F as Ce}from"./mermaid.core-CwGP16Dm.js";import{p as Ee}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` ${s-i/2-L/2},${x+R} ${s-i/2-L/2},${x-R} ${t.posWithOffset-i/2-L},${x-c-R} diff --git a/apps/pythinker-code/dist-web/assets/handlebars-vt5-G9kY.js b/apps/pythinker-code/dist-web/assets/handlebars-CsegWH10.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/handlebars-vt5-G9kY.js rename to apps/pythinker-code/dist-web/assets/handlebars-CsegWH10.js index fd221a9db..c31889ce1 100644 --- a/apps/pythinker-code/dist-web/assets/handlebars-vt5-G9kY.js +++ b/apps/pythinker-code/dist-web/assets/handlebars-CsegWH10.js @@ -1 +1 @@ -import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language}; +import{l as e}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language}; diff --git a/apps/pythinker-code/dist-web/assets/html-BwCzbm6J.js b/apps/pythinker-code/dist-web/assets/html-CRf6vG9C.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/html-BwCzbm6J.js rename to apps/pythinker-code/dist-web/assets/html-CRf6vG9C.js index fcf5e8b28..83330ea0e 100644 --- a/apps/pythinker-code/dist-web/assets/html-BwCzbm6J.js +++ b/apps/pythinker-code/dist-web/assets/html-CRf6vG9C.js @@ -1 +1 @@ -import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language}; +import{l as e}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language}; diff --git a/apps/pythinker-code/dist-web/assets/htmlMode-BtW7hgTd.js b/apps/pythinker-code/dist-web/assets/htmlMode-8aWXPjFP.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/htmlMode-BtW7hgTd.js rename to apps/pythinker-code/dist-web/assets/htmlMode-8aWXPjFP.js index 8b5c6e404..a252b1749 100644 --- a/apps/pythinker-code/dist-web/assets/htmlMode-BtW7hgTd.js +++ b/apps/pythinker-code/dist-web/assets/htmlMode-8aWXPjFP.js @@ -1 +1 @@ -import{c as D,l as t}from"./editor.main-yCrGDkyO.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-Dzr62Jjp.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-Dzr62Jjp.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-C8KWqYYR.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit}; +import{c as D,l as t}from"./editor.main-28ipUIqH.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-CjNYtcpt.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-CjNYtcpt.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-C8KWqYYR.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit}; diff --git a/apps/pythinker-code/dist-web/assets/index-BZ9wqq8Z.js b/apps/pythinker-code/dist-web/assets/index-Ct7MGS7v.js similarity index 80% rename from apps/pythinker-code/dist-web/assets/index-BZ9wqq8Z.js rename to apps/pythinker-code/dist-web/assets/index-Ct7MGS7v.js index 907f6844e..9dbd4a43b 100644 --- a/apps/pythinker-code/dist-web/assets/index-BZ9wqq8Z.js +++ b/apps/pythinker-code/dist-web/assets/index-Ct7MGS7v.js @@ -1,45 +1,45 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-DhJc-Ocy.js","assets/DesignSystemView-I872M2Sr.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-BusHtpbx.js","assets/purify.es-5AjVNlXF.js","assets/CodeBlockNode-D4cpL5UZ.js","assets/safeRaf-DGuzXxDK.js","assets/index5-DRYrcfDq.js","assets/index11-BtnGHbJw.js","assets/editor.main-yCrGDkyO.js","assets/editor-Ck3IbhyB.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-DvGbj-YG.js","assets/DesignSystemView-I872M2Sr.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-CwGP16Dm.js","assets/purify.es-5AjVNlXF.js","assets/CodeBlockNode-D5JTfsXt.js","assets/safeRaf-DGuzXxDK.js","assets/index5-BBtmbjGn.js","assets/index11-DJqeKSQb.js","assets/editor.main-28ipUIqH.js","assets/editor-Ck3IbhyB.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/** * @vue/shared v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function up(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Yn={},eu=[],Ol=()=>{},TM=()=>!1,ff=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),dp=e=>e.startsWith("onUpdate:"),xo=Object.assign,rg=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sR=Object.prototype.hasOwnProperty,fo=(e,t)=>sR.call(e,t),rn=Array.isArray,tu=e=>Bu(e)==="[object Map]",U0=e=>Bu(e)==="[object Set]",tw=e=>Bu(e)==="[object Date]",iR=e=>Bu(e)==="[object RegExp]",_n=e=>typeof e=="function",To=e=>typeof e=="string",dl=e=>typeof e=="symbol",po=e=>e!==null&&typeof e=="object",ag=e=>(po(e)||_n(e))&&_n(e.then)&&_n(e.catch),EM=Object.prototype.toString,Bu=e=>EM.call(e),lR=e=>Bu(e).slice(8,-1),fp=e=>Bu(e)==="[object Object]",pp=e=>To(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,T0=up(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hp=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},rR=/-\w/g,Fs=hp(e=>e.replace(rR,t=>t.slice(1).toUpperCase())),aR=/\B([A-Z])/g,Wi=hp(e=>e.replace(aR,"-$1").toLowerCase()),mp=hp(e=>e.charAt(0).toUpperCase()+e.slice(1)),l4=hp(e=>e?`on${mp(e)}`:""),Qs=(e,t)=>!Object.is(e,t),nu=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},gp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},j4=e=>{const t=To(e)?Number(e):NaN;return isNaN(t)?e:t};let nw;const vp=()=>nw||(nw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),cR="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",uR=up(cR);function Gt(e){if(rn(e)){const t={};for(let n=0;n{if(n){const o=n.split(fR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Be(e){let t="";if(To(e))t=e;else if(rn(e))for(let n=0;nma(n,t))}const $M=e=>!!(e&&e.__v_isRef===!0),I=e=>To(e)?e:e==null?"":rn(e)||po(e)&&(e.toString===EM||!_n(e.toString))?$M(e)?I(e.value):JSON.stringify(e,NM,2):String(e),NM=(e,t)=>$M(t)?NM(e,t.value):tu(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[sh(o,i)+" =>"]=s,n),{})}:U0(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sh(n))}:dl(t)?sh(t):po(t)&&!rn(t)&&!fp(t)?String(t):t,sh=(e,t="")=>{var n;return dl(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function wR(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** +**/function up(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Yn={},eu=[],Ol=()=>{},EM=()=>!1,ff=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),dp=e=>e.startsWith("onUpdate:"),xo=Object.assign,ag=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},iR=Object.prototype.hasOwnProperty,fo=(e,t)=>iR.call(e,t),rn=Array.isArray,tu=e=>Bu(e)==="[object Map]",U0=e=>Bu(e)==="[object Set]",nw=e=>Bu(e)==="[object Date]",lR=e=>Bu(e)==="[object RegExp]",_n=e=>typeof e=="function",To=e=>typeof e=="string",dl=e=>typeof e=="symbol",po=e=>e!==null&&typeof e=="object",cg=e=>(po(e)||_n(e))&&_n(e.then)&&_n(e.catch),IM=Object.prototype.toString,Bu=e=>IM.call(e),rR=e=>Bu(e).slice(8,-1),fp=e=>Bu(e)==="[object Object]",pp=e=>To(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,T0=up(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hp=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},aR=/-\w/g,Fs=hp(e=>e.replace(aR,t=>t.slice(1).toUpperCase())),cR=/\B([A-Z])/g,Wi=hp(e=>e.replace(cR,"-$1").toLowerCase()),mp=hp(e=>e.charAt(0).toUpperCase()+e.slice(1)),l4=hp(e=>e?`on${mp(e)}`:""),Qs=(e,t)=>!Object.is(e,t),nu=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},gp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},j4=e=>{const t=To(e)?Number(e):NaN;return isNaN(t)?e:t};let ow;const vp=()=>ow||(ow=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),uR="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",dR=up(uR);function Gt(e){if(rn(e)){const t={};for(let n=0;n{if(n){const o=n.split(pR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Be(e){let t="";if(To(e))t=e;else if(rn(e))for(let n=0;nma(n,t))}const NM=e=>!!(e&&e.__v_isRef===!0),E=e=>To(e)?e:e==null?"":rn(e)||po(e)&&(e.toString===IM||!_n(e.toString))?NM(e)?E(e.value):JSON.stringify(e,zM,2):String(e),zM=(e,t)=>NM(t)?zM(e,t.value):tu(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[sh(o,i)+" =>"]=s,n),{})}:U0(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sh(n))}:dl(t)?sh(t):po(t)&&!rn(t)&&!fp(t)?String(t):t,sh=(e,t="")=>{var n;return dl(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function kR(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** * @vue/reactivity v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Bs;class zM{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Bs&&(Bs.active?(this.parent=Bs,this.index=(Bs.scopes||(Bs.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(Bs===this)Bs=this.prevScope;else{let t=Bs;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(s2){let t=s2;for(s2=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;o2;){let t=o2;for(o2=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function PM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function FM(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),fg(o),bR(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function o8(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(jM(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function jM(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===A2)||(e.globalVersion=A2,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!o8(e))))return;e.flags|=2;const t=e.dep,n=No,o=rr;No=e,rr=!0;try{PM(e);const s=e.fn(e._value);(t.version===0||Qs(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{No=n,rr=o,FM(e),e.flags&=-3}}function fg(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)fg(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function bR(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function vZe(e,t){e.effect instanceof O4&&(e=e.effect.fn);const n=new O4(e);t&&xo(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function yZe(e){e.effect.stop()}let rr=!0;const OM=[];function ga(){OM.push(rr),rr=!1}function va(){const e=OM.pop();rr=e===void 0?!0:e}function ow(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=No;No=void 0;try{t()}finally{No=n}}}let A2=0;class _R{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class wp{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!No||!rr||No===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==No)n=this.activeLink=new _R(No,this),No.deps?(n.prevDep=No.depsTail,No.depsTail.nextDep=n,No.depsTail=n):No.deps=No.depsTail=n,HM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=No.depsTail,n.nextDep=void 0,No.depsTail.nextDep=n,No.depsTail=n,No.deps===n&&(No.deps=o)}return n}trigger(t){this.version++,A2++,this.notify(t)}notify(t){ug();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{dg()}}}function HM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)HM(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const H4=new WeakMap,E0=Symbol(""),s8=Symbol(""),T2=Symbol("");function ui(e,t,n){if(rr&&No){let o=H4.get(e);o||H4.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new wp),s.map=o,s.key=n),s.track()}}function la(e,t,n,o,s,i){const l=H4.get(e);if(!l){A2++;return}const r=a=>{a&&a.trigger()};if(ug(),t==="clear")l.forEach(r);else{const a=rn(e),c=a&&pp(n);if(a&&n==="length"){const u=Number(o);l.forEach((d,f)=>{(f==="length"||f===T2||!dl(f)&&f>=u)&&r(d)})}else switch((n!==void 0||l.has(void 0))&&r(l.get(n)),c&&r(l.get(T2)),t){case"add":a?c&&r(l.get("length")):(r(l.get(E0)),tu(e)&&r(l.get(s8)));break;case"delete":a||(r(l.get(E0)),tu(e)&&r(l.get(s8)));break;case"set":tu(e)&&r(l.get(E0));break}}dg()}function xR(e,t){const n=H4.get(e);return n&&n.get(t)}function wc(e){const t=so(e);return t===e?t:(ui(t,"iterate",T2),il(e)?t:t.map(cr))}function kp(e){return ui(e=so(e),"iterate",T2),e}function Ar(e,t){return ya(e)?ku(l1(e)?cr(t):t):cr(t)}const SR={__proto__:null,[Symbol.iterator](){return lh(this,Symbol.iterator,e=>Ar(this,e))},concat(...e){return wc(this).concat(...e.map(t=>rn(t)?wc(t):t))},entries(){return lh(this,"entries",e=>(e[1]=Ar(this,e[1]),e))},every(e,t){return Kr(this,"every",e,t,void 0,arguments)},filter(e,t){return Kr(this,"filter",e,t,n=>n.map(o=>Ar(this,o)),arguments)},find(e,t){return Kr(this,"find",e,t,n=>Ar(this,n),arguments)},findIndex(e,t){return Kr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Kr(this,"findLast",e,t,n=>Ar(this,n),arguments)},findLastIndex(e,t){return Kr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Kr(this,"forEach",e,t,void 0,arguments)},includes(...e){return rh(this,"includes",e)},indexOf(...e){return rh(this,"indexOf",e)},join(e){return wc(this).join(e)},lastIndexOf(...e){return rh(this,"lastIndexOf",e)},map(e,t){return Kr(this,"map",e,t,void 0,arguments)},pop(){return vd(this,"pop")},push(...e){return vd(this,"push",e)},reduce(e,...t){return sw(this,"reduce",e,t)},reduceRight(e,...t){return sw(this,"reduceRight",e,t)},shift(){return vd(this,"shift")},some(e,t){return Kr(this,"some",e,t,void 0,arguments)},splice(...e){return vd(this,"splice",e)},toReversed(){return wc(this).toReversed()},toSorted(e){return wc(this).toSorted(e)},toSpliced(...e){return wc(this).toSpliced(...e)},unshift(...e){return vd(this,"unshift",e)},values(){return lh(this,"values",e=>Ar(this,e))}};function lh(e,t,n){const o=kp(e),s=o[t]();return o!==e&&!il(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const CR=Array.prototype;function Kr(e,t,n,o,s,i){const l=kp(e),r=l!==e&&!il(e),a=l[t];if(a!==CR[t]){const d=a.apply(e,i);return r?cr(d):d}let c=n;l!==e&&(r?c=function(d,f){return n.call(this,Ar(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=a.call(l,c,o);return r&&s?s(u):u}function sw(e,t,n,o){const s=kp(e),i=s!==e&&!il(e);let l=n,r=!1;s!==e&&(i?(r=o.length===0,l=function(c,u,d){return r&&(r=!1,c=Ar(e,c)),n.call(this,c,Ar(e,u),d,e)}):n.length>3&&(l=function(c,u,d){return n.call(this,c,u,d,e)}));const a=s[t](l,...o);return r?Ar(e,a):a}function rh(e,t,n){const o=so(e);ui(o,"iterate",T2);const s=o[t](...n);return(s===-1||s===!1)&&xp(n[0])?(n[0]=so(n[0]),o[t](...n)):s}function vd(e,t,n=[]){ga(),ug();const o=so(e)[t].apply(e,n);return dg(),va(),o}const MR=up("__proto__,__v_isRef,__isVue"),DM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(dl));function AR(e){dl(e)||(e=String(e));const t=so(this);return ui(t,"has",e),t.hasOwnProperty(e)}class VM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?GM:KM:i?ZM:UM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const l=rn(t);if(!s){let a;if(l&&(a=SR[n]))return a;if(n==="hasOwnProperty")return AR}const r=Reflect.get(t,n,ps(t)?t:o);if((dl(n)?DM.has(n):MR(n))||(s||ui(t,"get",n),i))return r;if(ps(r)){const a=l&&pp(n)?r:r.value;return s&&po(a)?zl(a):a}return po(r)?s?zl(r):ds(r):r}}class WM extends VM{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const l=rn(t)&&pp(n);if(!this._isShallow){const c=ya(i);if(!il(o)&&!ya(o)&&(i=so(i),o=so(o)),!l&&ps(i)&&!ps(o))return c||(i.value=o),!0}const r=l?Number(n)e,o3=e=>Reflect.getPrototypeOf(e);function $R(e,t,n){return function(...o){const s=this.__v_raw,i=so(s),l=tu(i),r=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,c=s[e](...o),u=n?i8:t?ku:cr;return!t&&ui(i,"iterate",a?s8:E0),xo(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:r?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function s3(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function NR(e,t){const n={get(s){const i=this.__v_raw,l=so(i),r=so(s);e||(Qs(s,r)&&ui(l,"get",s),ui(l,"get",r));const{has:a}=o3(l),c=t?i8:e?ku:cr;if(a.call(l,s))return c(i.get(s));if(a.call(l,r))return c(i.get(r));i!==l&&i.get(s)},get size(){const s=this.__v_raw;return!e&&ui(so(s),"iterate",E0),s.size},has(s){const i=this.__v_raw,l=so(i),r=so(s);return e||(Qs(s,r)&&ui(l,"has",s),ui(l,"has",r)),s===r?i.has(s):i.has(s)||i.has(r)},forEach(s,i){const l=this,r=l.__v_raw,a=so(r),c=t?i8:e?ku:cr;return!e&&ui(a,"iterate",E0),r.forEach((u,d)=>s.call(i,c(u),c(d),l))}};return xo(n,e?{add:s3("add"),set:s3("set"),delete:s3("delete"),clear:s3("clear")}:{add(s){const i=so(this),l=o3(i),r=so(s),a=!t&&!il(s)&&!ya(s)?r:s;return l.has.call(i,a)||Qs(s,a)&&l.has.call(i,s)||Qs(r,a)&&l.has.call(i,r)||(i.add(a),la(i,"add",a,a)),this},set(s,i){!t&&!il(i)&&!ya(i)&&(i=so(i));const l=so(this),{has:r,get:a}=o3(l);let c=r.call(l,s);c||(s=so(s),c=r.call(l,s));const u=a.call(l,s);return l.set(s,i),c?Qs(i,u)&&la(l,"set",s,i):la(l,"add",s,i),this},delete(s){const i=so(this),{has:l,get:r}=o3(i);let a=l.call(i,s);a||(s=so(s),a=l.call(i,s)),r&&r.call(i,s);const c=i.delete(s);return a&&la(i,"delete",s,void 0),c},clear(){const s=so(this),i=s.size!==0,l=s.clear();return i&&la(s,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=$R(s,e,t)}),n}function bp(e,t){const n=NR(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(fo(n,s)&&s in o?n:o,s,i)}const zR={get:bp(!1,!1)},BR={get:bp(!1,!0)},RR={get:bp(!0,!1)},PR={get:bp(!0,!0)},UM=new WeakMap,ZM=new WeakMap,KM=new WeakMap,GM=new WeakMap;function FR(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return ya(e)?e:_p(e,!1,TR,zR,UM)}function jR(e){return _p(e,!1,IR,BR,ZM)}function zl(e){return _p(e,!0,ER,RR,KM)}function wZe(e){return _p(e,!0,LR,PR,GM)}function _p(e,t,n,o,s){if(!po(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const l=FR(lR(e));if(l===0)return e;const r=new Proxy(e,l===2?o:n);return s.set(e,r),r}function l1(e){return ya(e)?l1(e.__v_raw):!!(e&&e.__v_isReactive)}function ya(e){return!!(e&&e.__v_isReadonly)}function il(e){return!!(e&&e.__v_isShallow)}function xp(e){return e?!!e.__v_raw:!1}function so(e){const t=e&&e.__v_raw;return t?so(t):e}function It(e){return!fo(e,"__v_skip")&&Object.isExtensible(e)&&IM(e,"__v_skip",!0),e}const cr=e=>po(e)?ds(e):e,ku=e=>po(e)?zl(e):e;function ps(e){return e?e.__v_isRef===!0:!1}function V(e){return YM(e,!1)}function Uo(e){return YM(e,!0)}function YM(e,t){return ps(e)?e:new OR(e,t)}class OR{constructor(t,n){this.dep=new wp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:so(t),this._value=n?t:cr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||il(t)||ya(t);t=o?t:so(t),Qs(t,n)&&(this._rawValue=t,this._value=o?t:cr(t),this.dep.trigger())}}function HR(e){e.dep&&e.dep.trigger()}function v(e){return ps(e)?e.value:e}function l8(e){return _n(e)?e():v(e)}const DR={get:(e,t,n)=>t==="__v_raw"?e:v(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return ps(s)&&!ps(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function XM(e){return l1(e)?e:new Proxy(e,DR)}class VR{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new wp,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function WR(e){return new VR(e)}function kZe(e){const t=rn(e)?new Array(e.length):{};for(const n in e)t[n]=JM(e,n);return t}class qR{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=dl(n)?n:String(n),this._raw=so(t);let s=!0,i=t;if(!rn(t)||dl(this._key)||!pp(this._key))do s=!xp(i)||il(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=v(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ps(this._raw[this._key])){const n=this._object[this._key];if(ps(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return xR(this._raw,this._key)}}class UR{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function bZe(e,t,n){return ps(e)?e:_n(e)?new UR(e):po(e)&&arguments.length>1?JM(e,t,n):V(e)}function JM(e,t,n){return new qR(e,t,n)}class ZR{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new wp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=A2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&No!==this)return RM(this,!0),!0}get value(){const t=this.dep.track();return jM(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function KR(e,t,n=!1){let o,s;return _n(e)?o=e:(o=e.get,s=e.set),new ZR(o,s,n)}const _Ze={GET:"get",HAS:"has",ITERATE:"iterate"},xZe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},i3={},D4=new WeakMap;let Ka;function SZe(){return Ka}function GR(e,t=!1,n=Ka){if(n){let o=D4.get(n);o||D4.set(n,o=[]),o.push(e)}}function YR(e,t,n=Yn){const{immediate:o,deep:s,once:i,scheduler:l,augmentJob:r,call:a}=n,c=_=>s?_:il(_)||s===!1||s===0?ra(_,1):ra(_);let u,d,f,p,h=!1,m=!1;if(ps(e)?(d=()=>e.value,h=il(e)):l1(e)?(d=()=>c(e),h=!0):rn(e)?(m=!0,h=e.some(_=>l1(_)||il(_)),d=()=>e.map(_=>{if(ps(_))return _.value;if(l1(_))return c(_);if(_n(_))return a?a(_,2):_()})):_n(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){ga();try{f()}finally{va()}}const _=Ka;Ka=u;try{return a?a(e,3,[p]):e(p)}finally{Ka=_}}:d=Ol,t&&s){const _=d,A=s===!0?1/0:s;d=()=>ra(_(),A)}const k=cg(),x=()=>{u.stop(),k&&k.active&&rg(k.effects,u)};if(i&&t){const _=t;t=(...A)=>{_(...A),x()}}let y=m?new Array(e.length).fill(i3):i3;const w=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const A=u.run();if(s||h||(m?A.some((P,z)=>Qs(P,y[z])):Qs(A,y))){f&&f();const P=Ka;Ka=u;try{const z=[A,y===i3?void 0:m&&y[0]===i3?[]:y,p];y=A,a?a(t,3,z):t(...z)}finally{Ka=P}}}else u.run()};return r&&r(w),u=new O4(d),u.scheduler=l?()=>l(w,!1):w,p=_=>GR(_,!1,u),f=u.onStop=()=>{const _=D4.get(u);if(_){if(a)a(_,4);else for(const A of _)A();D4.delete(u)}},t?o?w(!0):y=u.run():l?l(w.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function ra(e,t=1/0,n){if(t<=0||!po(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ps(e))ra(e.value,t,n);else if(rn(e))for(let o=0;o{ra(o,t,n)});else if(fp(e)){for(const o in e)ra(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&ra(e[o],t,n)}return e}/** +**/let Bs;class BM{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Bs&&(Bs.active?(this.parent=Bs,this.index=(Bs.scopes||(Bs.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(Bs===this)Bs=this.prevScope;else{let t=Bs;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(s2){let t=s2;for(s2=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;o2;){let t=o2;for(o2=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function FM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function jM(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),pg(o),_R(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function s8(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(OM(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function OM(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===A2)||(e.globalVersion=A2,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!s8(e))))return;e.flags|=2;const t=e.dep,n=No,o=rr;No=e,rr=!0;try{FM(e);const s=e.fn(e._value);(t.version===0||Qs(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{No=n,rr=o,jM(e),e.flags&=-3}}function pg(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)pg(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function _R(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function vZe(e,t){e.effect instanceof O4&&(e=e.effect.fn);const n=new O4(e);t&&xo(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function yZe(e){e.effect.stop()}let rr=!0;const HM=[];function ga(){HM.push(rr),rr=!1}function va(){const e=HM.pop();rr=e===void 0?!0:e}function sw(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=No;No=void 0;try{t()}finally{No=n}}}let A2=0;class xR{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class wp{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!No||!rr||No===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==No)n=this.activeLink=new xR(No,this),No.deps?(n.prevDep=No.depsTail,No.depsTail.nextDep=n,No.depsTail=n):No.deps=No.depsTail=n,DM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=No.depsTail,n.nextDep=void 0,No.depsTail.nextDep=n,No.depsTail=n,No.deps===n&&(No.deps=o)}return n}trigger(t){this.version++,A2++,this.notify(t)}notify(t){dg();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{fg()}}}function DM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)DM(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const H4=new WeakMap,E0=Symbol(""),i8=Symbol(""),T2=Symbol("");function ui(e,t,n){if(rr&&No){let o=H4.get(e);o||H4.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new wp),s.map=o,s.key=n),s.track()}}function la(e,t,n,o,s,i){const l=H4.get(e);if(!l){A2++;return}const r=a=>{a&&a.trigger()};if(dg(),t==="clear")l.forEach(r);else{const a=rn(e),c=a&&pp(n);if(a&&n==="length"){const u=Number(o);l.forEach((d,f)=>{(f==="length"||f===T2||!dl(f)&&f>=u)&&r(d)})}else switch((n!==void 0||l.has(void 0))&&r(l.get(n)),c&&r(l.get(T2)),t){case"add":a?c&&r(l.get("length")):(r(l.get(E0)),tu(e)&&r(l.get(i8)));break;case"delete":a||(r(l.get(E0)),tu(e)&&r(l.get(i8)));break;case"set":tu(e)&&r(l.get(E0));break}}fg()}function SR(e,t){const n=H4.get(e);return n&&n.get(t)}function wc(e){const t=so(e);return t===e?t:(ui(t,"iterate",T2),il(e)?t:t.map(cr))}function kp(e){return ui(e=so(e),"iterate",T2),e}function Ar(e,t){return ya(e)?ku(l1(e)?cr(t):t):cr(t)}const CR={__proto__:null,[Symbol.iterator](){return lh(this,Symbol.iterator,e=>Ar(this,e))},concat(...e){return wc(this).concat(...e.map(t=>rn(t)?wc(t):t))},entries(){return lh(this,"entries",e=>(e[1]=Ar(this,e[1]),e))},every(e,t){return Kr(this,"every",e,t,void 0,arguments)},filter(e,t){return Kr(this,"filter",e,t,n=>n.map(o=>Ar(this,o)),arguments)},find(e,t){return Kr(this,"find",e,t,n=>Ar(this,n),arguments)},findIndex(e,t){return Kr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Kr(this,"findLast",e,t,n=>Ar(this,n),arguments)},findLastIndex(e,t){return Kr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Kr(this,"forEach",e,t,void 0,arguments)},includes(...e){return rh(this,"includes",e)},indexOf(...e){return rh(this,"indexOf",e)},join(e){return wc(this).join(e)},lastIndexOf(...e){return rh(this,"lastIndexOf",e)},map(e,t){return Kr(this,"map",e,t,void 0,arguments)},pop(){return vd(this,"pop")},push(...e){return vd(this,"push",e)},reduce(e,...t){return iw(this,"reduce",e,t)},reduceRight(e,...t){return iw(this,"reduceRight",e,t)},shift(){return vd(this,"shift")},some(e,t){return Kr(this,"some",e,t,void 0,arguments)},splice(...e){return vd(this,"splice",e)},toReversed(){return wc(this).toReversed()},toSorted(e){return wc(this).toSorted(e)},toSpliced(...e){return wc(this).toSpliced(...e)},unshift(...e){return vd(this,"unshift",e)},values(){return lh(this,"values",e=>Ar(this,e))}};function lh(e,t,n){const o=kp(e),s=o[t]();return o!==e&&!il(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const MR=Array.prototype;function Kr(e,t,n,o,s,i){const l=kp(e),r=l!==e&&!il(e),a=l[t];if(a!==MR[t]){const d=a.apply(e,i);return r?cr(d):d}let c=n;l!==e&&(r?c=function(d,f){return n.call(this,Ar(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=a.call(l,c,o);return r&&s?s(u):u}function iw(e,t,n,o){const s=kp(e),i=s!==e&&!il(e);let l=n,r=!1;s!==e&&(i?(r=o.length===0,l=function(c,u,d){return r&&(r=!1,c=Ar(e,c)),n.call(this,c,Ar(e,u),d,e)}):n.length>3&&(l=function(c,u,d){return n.call(this,c,u,d,e)}));const a=s[t](l,...o);return r?Ar(e,a):a}function rh(e,t,n){const o=so(e);ui(o,"iterate",T2);const s=o[t](...n);return(s===-1||s===!1)&&xp(n[0])?(n[0]=so(n[0]),o[t](...n)):s}function vd(e,t,n=[]){ga(),dg();const o=so(e)[t].apply(e,n);return fg(),va(),o}const AR=up("__proto__,__v_isRef,__isVue"),VM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(dl));function TR(e){dl(e)||(e=String(e));const t=so(this);return ui(t,"has",e),t.hasOwnProperty(e)}class WM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?YM:GM:i?KM:ZM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const l=rn(t);if(!s){let a;if(l&&(a=CR[n]))return a;if(n==="hasOwnProperty")return TR}const r=Reflect.get(t,n,ps(t)?t:o);if((dl(n)?VM.has(n):AR(n))||(s||ui(t,"get",n),i))return r;if(ps(r)){const a=l&&pp(n)?r:r.value;return s&&po(a)?zl(a):a}return po(r)?s?zl(r):ds(r):r}}class qM extends WM{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const l=rn(t)&&pp(n);if(!this._isShallow){const c=ya(i);if(!il(o)&&!ya(o)&&(i=so(i),o=so(o)),!l&&ps(i)&&!ps(o))return c||(i.value=o),!0}const r=l?Number(n)e,o3=e=>Reflect.getPrototypeOf(e);function NR(e,t,n){return function(...o){const s=this.__v_raw,i=so(s),l=tu(i),r=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,c=s[e](...o),u=n?l8:t?ku:cr;return!t&&ui(i,"iterate",a?i8:E0),xo(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:r?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function s3(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zR(e,t){const n={get(s){const i=this.__v_raw,l=so(i),r=so(s);e||(Qs(s,r)&&ui(l,"get",s),ui(l,"get",r));const{has:a}=o3(l),c=t?l8:e?ku:cr;if(a.call(l,s))return c(i.get(s));if(a.call(l,r))return c(i.get(r));i!==l&&i.get(s)},get size(){const s=this.__v_raw;return!e&&ui(so(s),"iterate",E0),s.size},has(s){const i=this.__v_raw,l=so(i),r=so(s);return e||(Qs(s,r)&&ui(l,"has",s),ui(l,"has",r)),s===r?i.has(s):i.has(s)||i.has(r)},forEach(s,i){const l=this,r=l.__v_raw,a=so(r),c=t?l8:e?ku:cr;return!e&&ui(a,"iterate",E0),r.forEach((u,d)=>s.call(i,c(u),c(d),l))}};return xo(n,e?{add:s3("add"),set:s3("set"),delete:s3("delete"),clear:s3("clear")}:{add(s){const i=so(this),l=o3(i),r=so(s),a=!t&&!il(s)&&!ya(s)?r:s;return l.has.call(i,a)||Qs(s,a)&&l.has.call(i,s)||Qs(r,a)&&l.has.call(i,r)||(i.add(a),la(i,"add",a,a)),this},set(s,i){!t&&!il(i)&&!ya(i)&&(i=so(i));const l=so(this),{has:r,get:a}=o3(l);let c=r.call(l,s);c||(s=so(s),c=r.call(l,s));const u=a.call(l,s);return l.set(s,i),c?Qs(i,u)&&la(l,"set",s,i):la(l,"add",s,i),this},delete(s){const i=so(this),{has:l,get:r}=o3(i);let a=l.call(i,s);a||(s=so(s),a=l.call(i,s)),r&&r.call(i,s);const c=i.delete(s);return a&&la(i,"delete",s,void 0),c},clear(){const s=so(this),i=s.size!==0,l=s.clear();return i&&la(s,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=NR(s,e,t)}),n}function bp(e,t){const n=zR(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(fo(n,s)&&s in o?n:o,s,i)}const BR={get:bp(!1,!1)},RR={get:bp(!1,!0)},PR={get:bp(!0,!1)},FR={get:bp(!0,!0)},ZM=new WeakMap,KM=new WeakMap,GM=new WeakMap,YM=new WeakMap;function jR(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return ya(e)?e:_p(e,!1,ER,BR,ZM)}function OR(e){return _p(e,!1,LR,RR,KM)}function zl(e){return _p(e,!0,IR,PR,GM)}function wZe(e){return _p(e,!0,$R,FR,YM)}function _p(e,t,n,o,s){if(!po(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const l=jR(rR(e));if(l===0)return e;const r=new Proxy(e,l===2?o:n);return s.set(e,r),r}function l1(e){return ya(e)?l1(e.__v_raw):!!(e&&e.__v_isReactive)}function ya(e){return!!(e&&e.__v_isReadonly)}function il(e){return!!(e&&e.__v_isShallow)}function xp(e){return e?!!e.__v_raw:!1}function so(e){const t=e&&e.__v_raw;return t?so(t):e}function It(e){return!fo(e,"__v_skip")&&Object.isExtensible(e)&&LM(e,"__v_skip",!0),e}const cr=e=>po(e)?ds(e):e,ku=e=>po(e)?zl(e):e;function ps(e){return e?e.__v_isRef===!0:!1}function V(e){return XM(e,!1)}function Uo(e){return XM(e,!0)}function XM(e,t){return ps(e)?e:new HR(e,t)}class HR{constructor(t,n){this.dep=new wp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:so(t),this._value=n?t:cr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||il(t)||ya(t);t=o?t:so(t),Qs(t,n)&&(this._rawValue=t,this._value=o?t:cr(t),this.dep.trigger())}}function DR(e){e.dep&&e.dep.trigger()}function v(e){return ps(e)?e.value:e}function r8(e){return _n(e)?e():v(e)}const VR={get:(e,t,n)=>t==="__v_raw"?e:v(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return ps(s)&&!ps(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function JM(e){return l1(e)?e:new Proxy(e,VR)}class WR{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new wp,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function qR(e){return new WR(e)}function kZe(e){const t=rn(e)?new Array(e.length):{};for(const n in e)t[n]=QM(e,n);return t}class UR{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=dl(n)?n:String(n),this._raw=so(t);let s=!0,i=t;if(!rn(t)||dl(this._key)||!pp(this._key))do s=!xp(i)||il(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=v(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ps(this._raw[this._key])){const n=this._object[this._key];if(ps(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return SR(this._raw,this._key)}}class ZR{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function bZe(e,t,n){return ps(e)?e:_n(e)?new ZR(e):po(e)&&arguments.length>1?QM(e,t,n):V(e)}function QM(e,t,n){return new UR(e,t,n)}class KR{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new wp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=A2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&No!==this)return PM(this,!0),!0}get value(){const t=this.dep.track();return OM(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function GR(e,t,n=!1){let o,s;return _n(e)?o=e:(o=e.get,s=e.set),new KR(o,s,n)}const _Ze={GET:"get",HAS:"has",ITERATE:"iterate"},xZe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},i3={},D4=new WeakMap;let Ka;function SZe(){return Ka}function YR(e,t=!1,n=Ka){if(n){let o=D4.get(n);o||D4.set(n,o=[]),o.push(e)}}function XR(e,t,n=Yn){const{immediate:o,deep:s,once:i,scheduler:l,augmentJob:r,call:a}=n,c=_=>s?_:il(_)||s===!1||s===0?ra(_,1):ra(_);let u,d,f,p,h=!1,m=!1;if(ps(e)?(d=()=>e.value,h=il(e)):l1(e)?(d=()=>c(e),h=!0):rn(e)?(m=!0,h=e.some(_=>l1(_)||il(_)),d=()=>e.map(_=>{if(ps(_))return _.value;if(l1(_))return c(_);if(_n(_))return a?a(_,2):_()})):_n(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){ga();try{f()}finally{va()}}const _=Ka;Ka=u;try{return a?a(e,3,[p]):e(p)}finally{Ka=_}}:d=Ol,t&&s){const _=d,A=s===!0?1/0:s;d=()=>ra(_(),A)}const k=ug(),x=()=>{u.stop(),k&&k.active&&ag(k.effects,u)};if(i&&t){const _=t;t=(...A)=>{_(...A),x()}}let y=m?new Array(e.length).fill(i3):i3;const w=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const A=u.run();if(s||h||(m?A.some((P,z)=>Qs(P,y[z])):Qs(A,y))){f&&f();const P=Ka;Ka=u;try{const z=[A,y===i3?void 0:m&&y[0]===i3?[]:y,p];y=A,a?a(t,3,z):t(...z)}finally{Ka=P}}}else u.run()};return r&&r(w),u=new O4(d),u.scheduler=l?()=>l(w,!1):w,p=_=>YR(_,!1,u),f=u.onStop=()=>{const _=D4.get(u);if(_){if(a)a(_,4);else for(const A of _)A();D4.delete(u)}},t?o?w(!0):y=u.run():l?l(w.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function ra(e,t=1/0,n){if(t<=0||!po(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ps(e))ra(e.value,t,n);else if(rn(e))for(let o=0;o{ra(o,t,n)});else if(fp(e)){for(const o in e)ra(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&ra(e[o],t,n)}return e}/** * @vue/runtime-core v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const QM=[];function XR(e){QM.push(e)}function JR(){QM.pop()}function CZe(e,t){}const MZe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},QR={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function hf(e,t,n,o){try{return o?e(...o):e()}catch(s){Ru(s,t,n)}}function Dl(e,t,n,o){if(_n(e)){const s=hf(e,t,n,o);return s&&ag(s)&&s.catch(i=>{Ru(i,t,n)}),s}if(rn(e)){const s=[];for(let i=0;i>>1,s=Ci[o],i=E2(s);i=E2(n)?Ci.push(e):Ci.splice(tP(t),0,e),e.flags|=1,tA()}}function tA(){V4||(V4=eA.then(nA))}function W4(e){rn(e)?ou.push(...e):Ga&&e.id===-1?Ga.splice(Bc+1,0,e):e.flags&1||(ou.push(e),e.flags|=1),tA()}function iw(e,t,n=Sr+1){for(;nE2(n)-E2(o));if(ou.length=0,Ga){Ga.push(...t);return}for(Ga=t,Bc=0;Bce.id==null?e.flags&2?-1:1/0:e.id;function nA(e){try{for(Sr=0;SrRc.emit(s,...i)),l3=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{oA(i,t)}),setTimeout(()=>{Rc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,l3=[])},3e3)):l3=[]}let ti=null,Sp=null;function I2(e){const t=ti;return ti=e,Sp=e&&e.type.__scopeId||null,t}function AZe(e){Sp=e}function TZe(){Sp=null}const EZe=e=>ae;function ae(e,t=ti,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&Y4(-1);const i=I2(t);let l;try{l=e(...s)}finally{I2(i),o._d&&Y4(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function Jn(e,t){if(ti===null)return e;const n=yf(ti),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&_n(t)?t.call(o&&o.proxy):t}}function IZe(){return!!(Ts()||I0)}const nP=Symbol.for("v-scx"),oP=()=>fn(nP);function sA(e,t){return mf(e,null,t)}function LZe(e,t){return mf(e,null,{flush:"post"})}function sP(e,t){return mf(e,null,{flush:"sync"})}function Ke(e,t,n){return mf(e,t,n)}function mf(e,t,n=Yn){const{immediate:o,deep:s,flush:i,once:l}=n,r=xo({},n),a=t&&o||!t&&i!=="post";let c;if(P0){if(i==="sync"){const p=oP();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Ol,p.resume=Ol,p.pause=Ol,p}}const u=ei;r.call=(p,h,m)=>Dl(p,u,h,m);let d=!1;i==="post"?r.scheduler=p=>{ks(p,u&&u.suspense)}:i!=="sync"&&(d=!0,r.scheduler=(p,h)=>{h?p():pg(p)}),r.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=YR(e,t,r);return P0&&(c?c.push(f):a&&f()),f}function iP(e,t,n){const o=this.proxy,s=To(e)?e.includes(".")?iA(o,e):()=>o[e]:e.bind(o,o);let i;_n(t)?i=t:(i=t.handler,n=t);const l=Pu(this),r=mf(s,i.bind(o),n);return l(),r}function iA(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,h0=e=>e&&(e.disabled||e.disabled===""),lP=e=>e&&(e.defer||e.defer===""),lw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,rw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,r8=(e,t)=>{const n=e&&e.to;return To(n)?t?t(n):null:n},rP={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,l,r,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:x}}=c,y=h0(t.props);let{dynamicChildren:w}=t;const _=(z,L,E)=>{z.shapeFlag&16&&u(z.children,L,E,s,i,l,r,a)},A=(z=t)=>{const L=h0(z.props),E=z.target=r8(z.props,h),T=a8(E,z,m,p);E&&(l!=="svg"&&lw(E)?l="svg":l!=="mathml"&&rw(E)&&(l="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(E),L||(_(z,E,T),Od(z,!1)))},P=z=>{const L=()=>{if(Wa.get(z)===L){if(Wa.delete(z),h0(z.props)){const E=x(z.el)||n;_(z,E,z.anchor),Od(z,!0)}A(z)}};Wa.set(z,L),ks(L,i)};if(e==null){const z=t.el=m(""),L=t.anchor=m("");if(p(z,n,o),p(L,n,o),lP(t.props)||i&&i.pendingBranch){P(t);return}y&&(_(t,n,L),Od(t,!0)),A()}else{t.el=e.el;const z=t.anchor=e.anchor,L=Wa.get(e);if(L){L.flags|=8,Wa.delete(e),P(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,T=t.targetAnchor=e.targetAnchor,$=h0(e.props),C=$?n:E,j=$?z:T;if(l==="svg"||lw(E)?l="svg":(l==="mathml"||rw(E))&&(l="mathml"),w?(f(e.dynamicChildren,w,C,s,i,l,r),Sg(e,t,!0)):a||d(e,t,C,j,s,i,l,r,!1),y)$?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):r3(t,n,z,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const H=t.target=r8(t.props,h);H&&r3(t,H,null,c,0)}else $&&r3(t,E,T,c,1);Od(t,y)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:l,children:r,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=i||!h0(f),h=Wa.get(e);if(h&&(h.flags|=8,Wa.delete(e)),d&&(s(c),s(u)),i&&s(a),!h&&l&16)for(let m=0;m{e.isMounted=!0}),vo(()=>{e.isUnmounting=!0}),e}const Ml=[Function,Array],cA={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ml,onEnter:Ml,onAfterEnter:Ml,onEnterCancelled:Ml,onBeforeLeave:Ml,onLeave:Ml,onAfterLeave:Ml,onLeaveCancelled:Ml,onBeforeAppear:Ml,onAppear:Ml,onAfterAppear:Ml,onAppearCancelled:Ml},uA=e=>{const t=e.subTree;return t.component?uA(t.component):t},cP={name:"BaseTransition",props:cA,setup(e,{slots:t}){const n=Ts(),o=aA();return()=>{const s=t.default&&hg(t.default(),!0),i=s&&s.length?dA(s):n.subTree?Y():void 0;if(!i)return;const l=so(e),{mode:r}=l;if(o.isLeaving)return ah(i);const a=aw(i);if(!a)return ah(i);let c=L2(a,l,o,n,d=>c=d);a.type!==xs&&m1(a,c);let u=n.subTree&&aw(n.subTree);if(u&&u.type!==xs&&!sr(u,a)&&uA(n).type!==xs){let d=L2(u,l,o,n);if(m1(u,d),r==="out-in"&&a.type!==xs)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},ah(i);r==="in-out"&&a.type!==xs?d.delayLeave=(f,p,h)=>{const m=fA(o,u);m[String(u.key)]=u,f[Nl]=()=>{p(),f[Nl]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function dA(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==xs){t=n;break}}return t}const uP=cP;function fA(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function L2(e,t,n,o,s){const{appear:i,mode:l,persisted:r=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:x,onAfterAppear:y,onAppearCancelled:w}=t,_=String(e.key),A=fA(n,e),P=(E,T)=>{E&&Dl(E,o,9,T)},z=(E,T)=>{const $=T[1];P(E,T),rn(E)?E.every(C=>C.length<=1)&&$():E.length<=1&&$()},L={mode:l,persisted:r,beforeEnter(E){let T=a;if(!n.isMounted)if(i)T=k||a;else return;E[Nl]&&E[Nl](!0);const $=A[_];$&&sr(e,$)&&$.el[Nl]&&$.el[Nl](),P(T,[E])},enter(E){if(A[_]===e)return;let T=c,$=u,C=d;if(!n.isMounted)if(i)T=x||c,$=y||u,C=w||d;else return;let j=!1;E[yd]=D=>{j||(j=!0,D?P(C,[E]):P($,[E]),L.delayedLeave&&L.delayedLeave(),E[yd]=void 0)};const H=E[yd].bind(null,!1);T?z(T,[E,H]):H()},leave(E,T){const $=String(e.key);if(E[yd]&&E[yd](!0),n.isUnmounting)return T();P(f,[E]);let C=!1;E[Nl]=H=>{C||(C=!0,T(),H?P(m,[E]):P(h,[E]),E[Nl]=void 0,A[$]===e&&delete A[$])};const j=E[Nl].bind(null,!1);A[$]=e,p?z(p,[E,j]):j()},clone(E){const T=L2(E,t,n,o,s);return s&&s(T),T}};return L}function ah(e){if(gf(e))return e=wa(e),e.children=null,e}function aw(e){if(!gf(e))return rA(e.type)&&e.children?dA(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_n(n.default))return n.default()}}function m1(e,t){e.shapeFlag&6&&e.component?(e.transition=t,m1(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hg(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function cw(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const U4=new WeakMap;function su(e,t,n,o,s=!1){if(rn(e)){e.forEach((m,k)=>su(m,t&&(rn(t)?t[k]:t),n,o,s));return}if(ha(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&su(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?yf(o.component):o.el,l=s?null:i,{i:r,r:a}=e,c=t&&t.r,u=r.refs===Yn?r.refs={}:r.refs,d=r.setupState,f=so(d),p=d===Yn?TM:m=>cw(u,m)?!1:fo(f,m),h=(m,k)=>!(k&&cw(u,k));if(c!=null&&c!==a){if(uw(t),To(c))u[c]=null,p(c)&&(d[c]=null);else if(ps(c)){const m=t;h(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(_n(a))hf(a,r,12,[l,u]);else{const m=To(a),k=ps(a);if(m||k){const x=()=>{if(e.f){const y=m?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(s)rn(y)&&rg(y,i);else if(rn(y))y.includes(i)||y.push(i);else if(m)u[a]=[i],p(a)&&(d[a]=u[a]);else{const w=[i];h(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else m?(u[a]=l,p(a)&&(d[a]=l)):k&&(h(a,e.k)&&(a.value=l),e.k&&(u[e.k]=l))};if(l){const y=()=>{x(),U4.delete(e)};y.id=-1,U4.set(e,y),ks(y,n)}else uw(e),x()}}}function uw(e){const t=U4.get(e);t&&(t.flags|=8,U4.delete(e))}let dw=!1;const kc=()=>{dw||(console.error("Hydration completed but contains mismatches."),dw=!0)},dP=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",fP=e=>e.namespaceURI.includes("MathML"),a3=e=>{if(e.nodeType===1){if(dP(e))return"svg";if(fP(e))return"mathml"}},Wc=e=>e.nodeType===8;function pP(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:l,remove:r,insert:a,createComment:c}}=e,u=(w,_)=>{if(!_.hasChildNodes()){n(null,w,_),q4(),_._vnode=w;return}d(_.firstChild,w,null,null,null),q4(),_._vnode=w},d=(w,_,A,P,z,L=!1)=>{L=L||!!_.dynamicChildren;const E=Wc(w)&&w.data==="[",T=()=>m(w,_,A,P,z,E),{type:$,ref:C,shapeFlag:j,patchFlag:H}=_;let D=w.nodeType;_.el=w,H===-2&&(L=!1,_.dynamicChildren=null);let M=null;switch($){case r1:D!==3?_.children===""?(a(_.el=s(""),l(w),w),M=w):M=T():(w.data!==_.children&&(kc(),w.data=_.children),M=i(w));break;case xs:y(w)?(M=i(w),x(_.el=w.content.firstChild,w,A)):D!==8||E?M=T():M=i(w);break;case lu:if(E&&(w=i(w),D=w.nodeType),D===1||D===3){M=w;const R=!_.children.length;for(let O=0;O<_.staticCount;O++)R&&(_.children+=M.nodeType===1?M.outerHTML:M.data),O===_.staticCount-1&&(_.anchor=M),M=i(M);return E?i(M):M}else T();break;case Ce:E?M=h(w,_,A,P,z,L):M=T();break;default:if(j&1)(D!==1||_.type.toLowerCase()!==w.tagName.toLowerCase())&&!y(w)?M=T():M=f(w,_,A,P,z,L);else if(j&6){_.slotScopeIds=z;const R=l(w);if(E?M=k(w):Wc(w)&&w.data==="teleport start"?M=k(w,w.data,"teleport end"):M=i(w),t(_,R,null,A,P,a3(R),L),ha(_)&&!_.type.__asyncResolved){let O;E?(O=W(Ce),O.anchor=M?M.previousSibling:R.lastChild):O=w.nodeType===3?He(""):W("div"),O.el=w,_.component.subTree=O}}else j&64?D!==8?M=T():M=_.type.hydrate(w,_,A,P,z,L,e,p):j&128&&(M=_.type.hydrate(w,_,A,P,a3(l(w)),z,L,e,d))}return C!=null&&su(C,null,P,_),M},f=(w,_,A,P,z,L)=>{L=L||!!_.dynamicChildren;const{type:E,props:T,patchFlag:$,shapeFlag:C,dirs:j,transition:H}=_,D=E==="input"||E==="option";if(D||$!==-1){j&&Cr(_,null,A,"created");let M=!1;if(y(w)){M=$A(null,H)&&A&&A.vnode.props&&A.vnode.props.appear;const O=w.content.firstChild;if(M){const U=O.getAttribute("class");U&&(O.$cls=U),H.beforeEnter(O)}x(O,w,A),_.el=w=O}if(C&16&&!(T&&(T.innerHTML||T.textContent))){let O=p(w.firstChild,_,w,A,P,z,L);for(O&&!c3(w,1)&&kc();O;){const U=O;O=O.nextSibling,r(U)}}else if(C&8){let O=_.children;O[0]===` +**/const eA=[];function JR(e){eA.push(e)}function QR(){eA.pop()}function CZe(e,t){}const MZe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},eP={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function hf(e,t,n,o){try{return o?e(...o):e()}catch(s){Ru(s,t,n)}}function Dl(e,t,n,o){if(_n(e)){const s=hf(e,t,n,o);return s&&cg(s)&&s.catch(i=>{Ru(i,t,n)}),s}if(rn(e)){const s=[];for(let i=0;i>>1,s=Ci[o],i=E2(s);i=E2(n)?Ci.push(e):Ci.splice(nP(t),0,e),e.flags|=1,nA()}}function nA(){V4||(V4=tA.then(oA))}function W4(e){rn(e)?ou.push(...e):Ga&&e.id===-1?Ga.splice(Bc+1,0,e):e.flags&1||(ou.push(e),e.flags|=1),nA()}function lw(e,t,n=Sr+1){for(;nE2(n)-E2(o));if(ou.length=0,Ga){Ga.push(...t);return}for(Ga=t,Bc=0;Bce.id==null?e.flags&2?-1:1/0:e.id;function oA(e){try{for(Sr=0;SrRc.emit(s,...i)),l3=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{sA(i,t)}),setTimeout(()=>{Rc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,l3=[])},3e3)):l3=[]}let ti=null,Sp=null;function I2(e){const t=ti;return ti=e,Sp=e&&e.type.__scopeId||null,t}function AZe(e){Sp=e}function TZe(){Sp=null}const EZe=e=>ae;function ae(e,t=ti,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&Y4(-1);const i=I2(t);let l;try{l=e(...s)}finally{I2(i),o._d&&Y4(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function Jn(e,t){if(ti===null)return e;const n=yf(ti),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&_n(t)?t.call(o&&o.proxy):t}}function IZe(){return!!(Ts()||I0)}const oP=Symbol.for("v-scx"),sP=()=>fn(oP);function iA(e,t){return mf(e,null,t)}function LZe(e,t){return mf(e,null,{flush:"post"})}function iP(e,t){return mf(e,null,{flush:"sync"})}function Ke(e,t,n){return mf(e,t,n)}function mf(e,t,n=Yn){const{immediate:o,deep:s,flush:i,once:l}=n,r=xo({},n),a=t&&o||!t&&i!=="post";let c;if(P0){if(i==="sync"){const p=sP();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Ol,p.resume=Ol,p.pause=Ol,p}}const u=ei;r.call=(p,h,m)=>Dl(p,u,h,m);let d=!1;i==="post"?r.scheduler=p=>{ks(p,u&&u.suspense)}:i!=="sync"&&(d=!0,r.scheduler=(p,h)=>{h?p():hg(p)}),r.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=XR(e,t,r);return P0&&(c?c.push(f):a&&f()),f}function lP(e,t,n){const o=this.proxy,s=To(e)?e.includes(".")?lA(o,e):()=>o[e]:e.bind(o,o);let i;_n(t)?i=t:(i=t.handler,n=t);const l=Pu(this),r=mf(s,i.bind(o),n);return l(),r}function lA(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,h0=e=>e&&(e.disabled||e.disabled===""),rP=e=>e&&(e.defer||e.defer===""),rw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,aw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,a8=(e,t)=>{const n=e&&e.to;return To(n)?t?t(n):null:n},aP={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,l,r,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:x}}=c,y=h0(t.props);let{dynamicChildren:w}=t;const _=(z,L,T)=>{z.shapeFlag&16&&u(z.children,L,T,s,i,l,r,a)},A=(z=t)=>{const L=h0(z.props),T=z.target=a8(z.props,h),I=c8(T,z,m,p);T&&(l!=="svg"&&rw(T)?l="svg":l!=="mathml"&&aw(T)&&(l="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(T),L||(_(z,T,I),Od(z,!1)))},P=z=>{const L=()=>{if(Wa.get(z)===L){if(Wa.delete(z),h0(z.props)){const T=x(z.el)||n;_(z,T,z.anchor),Od(z,!0)}A(z)}};Wa.set(z,L),ks(L,i)};if(e==null){const z=t.el=m(""),L=t.anchor=m("");if(p(z,n,o),p(L,n,o),rP(t.props)||i&&i.pendingBranch){P(t);return}y&&(_(t,n,L),Od(t,!0)),A()}else{t.el=e.el;const z=t.anchor=e.anchor,L=Wa.get(e);if(L){L.flags|=8,Wa.delete(e),P(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,I=t.targetAnchor=e.targetAnchor,N=h0(e.props),C=N?n:T,F=N?z:I;if(l==="svg"||rw(T)?l="svg":(l==="mathml"||aw(T))&&(l="mathml"),w?(f(e.dynamicChildren,w,C,s,i,l,r),Cg(e,t,!0)):a||d(e,t,C,F,s,i,l,r,!1),y)N?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):r3(t,n,z,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const H=t.target=a8(t.props,h);H&&r3(t,H,null,c,0)}else N&&r3(t,T,I,c,1);Od(t,y)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:l,children:r,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=i||!h0(f),h=Wa.get(e);if(h&&(h.flags|=8,Wa.delete(e)),d&&(s(c),s(u)),i&&s(a),!h&&l&16)for(let m=0;m{e.isMounted=!0}),vo(()=>{e.isUnmounting=!0}),e}const Ml=[Function,Array],uA={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ml,onEnter:Ml,onAfterEnter:Ml,onEnterCancelled:Ml,onBeforeLeave:Ml,onLeave:Ml,onAfterLeave:Ml,onLeaveCancelled:Ml,onBeforeAppear:Ml,onAppear:Ml,onAfterAppear:Ml,onAppearCancelled:Ml},dA=e=>{const t=e.subTree;return t.component?dA(t.component):t},uP={name:"BaseTransition",props:uA,setup(e,{slots:t}){const n=Ts(),o=cA();return()=>{const s=t.default&&mg(t.default(),!0),i=s&&s.length?fA(s):n.subTree?Y():void 0;if(!i)return;const l=so(e),{mode:r}=l;if(o.isLeaving)return ah(i);const a=cw(i);if(!a)return ah(i);let c=L2(a,l,o,n,d=>c=d);a.type!==xs&&m1(a,c);let u=n.subTree&&cw(n.subTree);if(u&&u.type!==xs&&!sr(u,a)&&dA(n).type!==xs){let d=L2(u,l,o,n);if(m1(u,d),r==="out-in"&&a.type!==xs)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},ah(i);r==="in-out"&&a.type!==xs?d.delayLeave=(f,p,h)=>{const m=pA(o,u);m[String(u.key)]=u,f[Nl]=()=>{p(),f[Nl]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function fA(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==xs){t=n;break}}return t}const dP=uP;function pA(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function L2(e,t,n,o,s){const{appear:i,mode:l,persisted:r=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:x,onAfterAppear:y,onAppearCancelled:w}=t,_=String(e.key),A=pA(n,e),P=(T,I)=>{T&&Dl(T,o,9,I)},z=(T,I)=>{const N=I[1];P(T,I),rn(T)?T.every(C=>C.length<=1)&&N():T.length<=1&&N()},L={mode:l,persisted:r,beforeEnter(T){let I=a;if(!n.isMounted)if(i)I=k||a;else return;T[Nl]&&T[Nl](!0);const N=A[_];N&&sr(e,N)&&N.el[Nl]&&N.el[Nl](),P(I,[T])},enter(T){if(A[_]===e)return;let I=c,N=u,C=d;if(!n.isMounted)if(i)I=x||c,N=y||u,C=w||d;else return;let F=!1;T[yd]=D=>{F||(F=!0,D?P(C,[T]):P(N,[T]),L.delayedLeave&&L.delayedLeave(),T[yd]=void 0)};const H=T[yd].bind(null,!1);I?z(I,[T,H]):H()},leave(T,I){const N=String(e.key);if(T[yd]&&T[yd](!0),n.isUnmounting)return I();P(f,[T]);let C=!1;T[Nl]=H=>{C||(C=!0,I(),H?P(m,[T]):P(h,[T]),T[Nl]=void 0,A[N]===e&&delete A[N])};const F=T[Nl].bind(null,!1);A[N]=e,p?z(p,[T,F]):F()},clone(T){const I=L2(T,t,n,o,s);return s&&s(I),I}};return L}function ah(e){if(gf(e))return e=wa(e),e.children=null,e}function cw(e){if(!gf(e))return aA(e.type)&&e.children?fA(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_n(n.default))return n.default()}}function m1(e,t){e.shapeFlag&6&&e.component?(e.transition=t,m1(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function mg(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function uw(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const U4=new WeakMap;function su(e,t,n,o,s=!1){if(rn(e)){e.forEach((m,k)=>su(m,t&&(rn(t)?t[k]:t),n,o,s));return}if(ha(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&su(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?yf(o.component):o.el,l=s?null:i,{i:r,r:a}=e,c=t&&t.r,u=r.refs===Yn?r.refs={}:r.refs,d=r.setupState,f=so(d),p=d===Yn?EM:m=>uw(u,m)?!1:fo(f,m),h=(m,k)=>!(k&&uw(u,k));if(c!=null&&c!==a){if(dw(t),To(c))u[c]=null,p(c)&&(d[c]=null);else if(ps(c)){const m=t;h(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(_n(a))hf(a,r,12,[l,u]);else{const m=To(a),k=ps(a);if(m||k){const x=()=>{if(e.f){const y=m?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(s)rn(y)&&ag(y,i);else if(rn(y))y.includes(i)||y.push(i);else if(m)u[a]=[i],p(a)&&(d[a]=u[a]);else{const w=[i];h(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else m?(u[a]=l,p(a)&&(d[a]=l)):k&&(h(a,e.k)&&(a.value=l),e.k&&(u[e.k]=l))};if(l){const y=()=>{x(),U4.delete(e)};y.id=-1,U4.set(e,y),ks(y,n)}else dw(e),x()}}}function dw(e){const t=U4.get(e);t&&(t.flags|=8,U4.delete(e))}let fw=!1;const kc=()=>{fw||(console.error("Hydration completed but contains mismatches."),fw=!0)},fP=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",pP=e=>e.namespaceURI.includes("MathML"),a3=e=>{if(e.nodeType===1){if(fP(e))return"svg";if(pP(e))return"mathml"}},Wc=e=>e.nodeType===8;function hP(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:l,remove:r,insert:a,createComment:c}}=e,u=(w,_)=>{if(!_.hasChildNodes()){n(null,w,_),q4(),_._vnode=w;return}d(_.firstChild,w,null,null,null),q4(),_._vnode=w},d=(w,_,A,P,z,L=!1)=>{L=L||!!_.dynamicChildren;const T=Wc(w)&&w.data==="[",I=()=>m(w,_,A,P,z,T),{type:N,ref:C,shapeFlag:F,patchFlag:H}=_;let D=w.nodeType;_.el=w,H===-2&&(L=!1,_.dynamicChildren=null);let M=null;switch(N){case r1:D!==3?_.children===""?(a(_.el=s(""),l(w),w),M=w):M=I():(w.data!==_.children&&(kc(),w.data=_.children),M=i(w));break;case xs:y(w)?(M=i(w),x(_.el=w.content.firstChild,w,A)):D!==8||T?M=I():M=i(w);break;case lu:if(T&&(w=i(w),D=w.nodeType),D===1||D===3){M=w;const R=!_.children.length;for(let O=0;O<_.staticCount;O++)R&&(_.children+=M.nodeType===1?M.outerHTML:M.data),O===_.staticCount-1&&(_.anchor=M),M=i(M);return T?i(M):M}else I();break;case Ce:T?M=h(w,_,A,P,z,L):M=I();break;default:if(F&1)(D!==1||_.type.toLowerCase()!==w.tagName.toLowerCase())&&!y(w)?M=I():M=f(w,_,A,P,z,L);else if(F&6){_.slotScopeIds=z;const R=l(w);if(T?M=k(w):Wc(w)&&w.data==="teleport start"?M=k(w,w.data,"teleport end"):M=i(w),t(_,R,null,A,P,a3(R),L),ha(_)&&!_.type.__asyncResolved){let O;T?(O=W(Ce),O.anchor=M?M.previousSibling:R.lastChild):O=w.nodeType===3?He(""):W("div"),O.el=w,_.component.subTree=O}}else F&64?D!==8?M=I():M=_.type.hydrate(w,_,A,P,z,L,e,p):F&128&&(M=_.type.hydrate(w,_,A,P,a3(l(w)),z,L,e,d))}return C!=null&&su(C,null,P,_),M},f=(w,_,A,P,z,L)=>{L=L||!!_.dynamicChildren;const{type:T,props:I,patchFlag:N,shapeFlag:C,dirs:F,transition:H}=_,D=T==="input"||T==="option";if(D||N!==-1){F&&Cr(_,null,A,"created");let M=!1;if(y(w)){M=NA(null,H)&&A&&A.vnode.props&&A.vnode.props.appear;const O=w.content.firstChild;if(M){const U=O.getAttribute("class");U&&(O.$cls=U),H.beforeEnter(O)}x(O,w,A),_.el=w=O}if(C&16&&!(I&&(I.innerHTML||I.textContent))){let O=p(w.firstChild,_,w,A,P,z,L);for(O&&!c3(w,1)&&kc();O;){const U=O;O=O.nextSibling,r(U)}}else if(C&8){let O=_.children;O[0]===` `&&(w.tagName==="PRE"||w.tagName==="TEXTAREA")&&(O=O.slice(1));const{textContent:U}=w;U!==O&&U!==O.replace(/\r\n|\r/g,` -`)&&(c3(w,0)||kc(),w.textContent=_.children)}if(T){if(D||!L||$&48){const O=w.tagName.includes("-");for(const U in T)(D&&(U.endsWith("value")||U==="indeterminate")||ff(U)&&!T0(U)||U[0]==="."||O&&!T0(U))&&o(w,U,null,T[U],void 0,A)}else if(T.onClick)o(w,"onClick",null,T.onClick,void 0,A);else if($&4&&l1(T.style))for(const O in T.style)T.style[O]}let R;(R=T&&T.onVnodeBeforeMount)&&ji(R,A,_),j&&Cr(_,null,A,"beforeMount"),((R=T&&T.onVnodeMounted)||j||M)&&RA(()=>{R&&ji(R,A,_),M&&H.enter(w),j&&Cr(_,null,A,"mounted")},P)}return w.nextSibling},p=(w,_,A,P,z,L,E)=>{E=E||!!_.dynamicChildren;const T=_.children,$=T.length;let C=!1;for(let j=0;j<$;j++){const H=E?T[j]:T[j]=Vi(T[j]),D=H.type===r1;w?(D&&!E&&j+1<$&&Vi(T[j+1]).type===r1&&(a(s(w.data.slice(H.children.length)),A,i(w)),w.data=H.children),w=d(w,H,P,z,L,E)):D&&!H.children?a(H.el=s(""),A):(C||(C=!0,c3(A,1)||kc()),n(null,H,A,null,P,z,a3(A),L))}return w},h=(w,_,A,P,z,L)=>{const{slotScopeIds:E}=_;E&&(z=z?z.concat(E):E);const T=l(w),$=p(i(w),_,T,A,P,z,L);return $&&Wc($)&&$.data==="]"?i(_.anchor=$):(kc(),a(_.anchor=c("]"),T,$),$)},m=(w,_,A,P,z,L)=>{if(c3(w.parentElement,1)||kc(),_.el=null,L){const $=k(w);for(;;){const C=i(w);if(C&&C!==$)r(C);else break}}const E=i(w),T=l(w);return r(w),n(null,_,T,E,A,P,a3(T),z),A&&(A.vnode.el=_.el,Ap(A,_.el)),E},k=(w,_="[",A="]")=>{let P=0;for(;w;)if(w=i(w),w&&Wc(w)&&(w.data===_&&P++,w.data===A)){if(P===0)return i(w);P--}return w},x=(w,_,A)=>{const P=_.parentNode;P&&P.replaceChild(w,_);let z=A;for(;z;)z.vnode.el===_&&(z.vnode.el=z.subTree.el=w),z=z.parent},y=w=>w.nodeType===1&&w.tagName==="TEMPLATE";return[u,d]}const fw="data-allow-mismatch",hP={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function c3(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(fw);)e=e.parentElement;const n=e&&e.getAttribute(fw);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(hP[t])}}const mP=vp().requestIdleCallback||(e=>setTimeout(e,1)),gP=vp().cancelIdleCallback||(e=>clearTimeout(e)),NZe=(e=1e4)=>t=>{const n=mP(t,{timeout:e});return()=>gP(n)};function vP(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:l}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(vP(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},BZe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},RZe=(e=[])=>(t,n)=>{To(e)&&(e=[e]);let o=!1;const s=l=>{o||(o=!0,i(),t(),l.target.dispatchEvent(new l.constructor(l.type,l)))},i=()=>{n(l=>{for(const r of e)l.removeEventListener(r,s)})};return n(l=>{for(const r of e)l.addEventListener(r,s,{once:!0})}),i};function yP(e,t){if(Wc(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(Wc(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const ha=e=>!!e.type.__asyncLoader;function Rl(e){_n(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:l,suspensible:r=!0,onError:a}=e;let c=null,u,d=0;const f=()=>(d++,c=null,p()),p=()=>{let h;return c||(h=c=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((k,x)=>{a(m,()=>k(f()),()=>x(m),d+1)});throw m}).then(m=>h!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return Je({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,k){let x=!1;(m.bu||(m.bu=[])).push(()=>x=!0);const y=()=>{x||k()},w=i?()=>{const _=i(y,A=>yP(h,A));_&&(m.bum||(m.bum=[])).push(_)}:y;u?w():p().then(()=>!m.isUnmounted&&w())},get __asyncResolved(){return u},setup(){const h=ei;if(mg(h),u)return()=>u3(u,h);const m=w=>{c=null,Ru(w,h,13,!o)};if(r&&h.suspense||P0)return p().then(w=>()=>u3(w,h)).catch(w=>(m(w),()=>o?W(o,{error:w}):null));const k=V(!1),x=V(),y=V(!!s);return s&&setTimeout(()=>{y.value=!1},s),l!=null&&setTimeout(()=>{if(!k.value&&!x.value){const w=new Error(`Async component timed out after ${l}ms.`);m(w),x.value=w}},l),p().then(()=>{k.value=!0,h.parent&&gf(h.parent.vnode)&&h.parent.update()}).catch(w=>{m(w),x.value=w}),()=>{if(k.value&&u)return u3(u,h);if(x.value&&o)return W(o,{error:x.value});if(n&&!y.value)return u3(n,h)}}})}function u3(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,l=W(e,o,s);return l.ref=n,l.ce=i,delete t.vnode.ce,l}const gf=e=>e.type.__isKeepAlive,wP={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ts(),o=n.ctx;if(!o.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const s=new Map,i=new Set;let l=null;const r=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(y,w,_,A,P)=>{const z=y.component;c(y,w,_,0,r),a(z.vnode,y,w,_,z,r,A,y.slotScopeIds,P),ks(()=>{z.isDeactivated=!1,z.a&&nu(z.a);const L=y.props&&y.props.onVnodeMounted;L&&ji(L,z.parent,y)},r)},o.deactivate=y=>{const w=y.component;K4(w.m),K4(w.a),c(y,f,null,1,r),ks(()=>{w.da&&nu(w.da);const _=y.props&&y.props.onVnodeUnmounted;_&&ji(_,w.parent,y),w.isDeactivated=!0},r)};function p(y){ch(y),u(y,n,r,!0)}function h(y){s.forEach((w,_)=>{const A=v8(ha(w)?w.type.__asyncResolved||{}:w.type);A&&!y(A)&&m(_)})}function m(y){const w=s.get(y);w&&(!l||!sr(w,l))?p(w):l&&ch(l),s.delete(y),i.delete(y)}Ke(()=>[e.include,e.exclude],([y,w])=>{y&&h(_=>Hd(y,_)),w&&h(_=>!Hd(w,_))},{flush:"post",deep:!0});let k=null;const x=()=>{k!=null&&(G4(n.subTree.type)?ks(()=>{s.set(k,d3(n.subTree))},n.subTree.suspense):s.set(k,d3(n.subTree)))};return In(x),gg(x),vo(()=>{s.forEach(y=>{const{subTree:w,suspense:_}=n,A=d3(w);if(y.type===A.type&&y.key===A.key){ch(A);const P=A.component.da;P&&ks(P,_);return}p(y)})}),()=>{if(k=null,!t.default)return l=null;const y=t.default(),w=y[0];if(y.length>1)return l=null,y;if(!g1(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return l=null,w;let _=d3(w);if(_.type===xs)return l=null,_;const A=_.type,P=v8(ha(_)?_.type.__asyncResolved||{}:A),{include:z,exclude:L,max:E}=e;if(z&&(!P||!Hd(z,P))||L&&P&&Hd(L,P))return _.shapeFlag&=-257,l=_,w;const T=_.key==null?A:_.key,$=s.get(T);return _.el&&(_=wa(_),w.shapeFlag&128&&(w.ssContent=_)),k=T,$?(_.el=$.el,_.component=$.component,_.transition&&m1(_,_.transition),_.shapeFlag|=512,i.delete(T),i.add(T)):(i.add(T),E&&i.size>parseInt(E,10)&&m(i.values().next().value)),_.shapeFlag|=256,l=_,G4(w.type)?w:_}}},PZe=wP;function Hd(e,t){return rn(e)?e.some(n=>Hd(n,t)):To(e)?e.split(",").includes(t):iR(e)?(e.lastIndex=0,e.test(t)):!1}function kP(e,t){pA(e,"a",t)}function bP(e,t){pA(e,"da",t)}function pA(e,t,n=ei){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Cp(t,o,n),n){let s=n.parent;for(;s&&s.parent;)gf(s.parent.vnode)&&_P(o,t,n,s),s=s.parent}}function _P(e,t,n,o){const s=Cp(t,e,o,!0);En(()=>{rg(o[t],s)},n)}function ch(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function d3(e){return e.shapeFlag&128?e.ssContent:e}function Cp(e,t,n=ei,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{ga();const r=Pu(n),a=Dl(t,n,e,l);return r(),va(),a});return o?s.unshift(i):s.push(i),i}}const Ma=e=>(t,n=ei)=>{(!P0||e==="sp")&&Cp(e,(...o)=>t(...o),n)},xP=Ma("bm"),In=Ma("m"),hA=Ma("bu"),gg=Ma("u"),vo=Ma("bum"),En=Ma("um"),SP=Ma("sp"),CP=Ma("rtg"),MP=Ma("rtc");function mA(e,t=ei){Cp("ec",e,t)}const vg="components",AP="directives";function yg(e,t){return wg(vg,e,!0,t)||e}const gA=Symbol.for("v-ndc");function cs(e){return To(e)?wg(vg,e,!1)||e:e||gA}function FZe(e){return wg(AP,e)}function wg(e,t,n=!0,o=!1){const s=ti||ei;if(s){const i=s.type;if(e===vg){const r=v8(i,!1);if(r&&(r===t||r===Fs(t)||r===mp(Fs(t))))return i}const l=pw(s[e]||i[e],t)||pw(s.appContext[e],t);return!l&&o?i:l}}function pw(e,t){return e&&(e[t]||e[Fs(t)]||e[mp(Fs(t))])}function rt(e,t,n,o){let s;const i=n&&n[o],l=rn(e);if(l||To(e)){const r=l&&l1(e);let a=!1,c=!1;r&&(a=!il(e),c=ya(e),e=kp(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(r,a,void 0,i&&i[a]));else{const r=Object.keys(e);s=new Array(r.length);for(let a=0,c=r.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function jn(e,t,n={},o,s){if(ti.ce||ti.parent&&ha(ti.parent)&&ti.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),ue(Ce,null,[W("slot",n,o&&o())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const l=i&&kg(i(n)),r=n.key||l&&l.key,a=ue(Ce,{key:(r&&!dl(r)?r:`_${t}`)+(!l&&o?"_fb":"")},l||(o?o():[]),l&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function kg(e){return e.some(t=>g1(t)?!(t.type===xs||t.type===Ce&&!kg(t.children)):!0)?e:null}function jZe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:l4(o)]=e[o];return n}const c8=e=>e?DA(e)?yf(e):c8(e.parent):null,i2=xo(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>c8(e.parent),$root:e=>c8(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>bg(e),$forceUpdate:e=>e.f||(e.f=()=>{pg(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>iP.bind(e)}),uh=(e,t)=>e!==Yn&&!e.__isScriptSetup&&fo(e,t),u8={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:l,type:r,appContext:a}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(uh(o,t))return l[t]=1,o[t];if(s!==Yn&&fo(s,t))return l[t]=2,s[t];if(fo(i,t))return l[t]=3,i[t];if(n!==Yn&&fo(n,t))return l[t]=4,n[t];d8&&(l[t]=0)}}const c=i2[t];let u,d;if(c)return t==="$attrs"&&ui(e.attrs,"get",""),c(e);if((u=r.__cssModules)&&(u=u[t]))return u;if(n!==Yn&&fo(n,t))return l[t]=4,n[t];if(d=a.config.globalProperties,fo(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return uh(s,t)?(s[t]=n,!0):o!==Yn&&fo(o,t)?(o[t]=n,!0):fo(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:l}},r){let a;return!!(n[r]||e!==Yn&&r[0]!=="$"&&fo(e,r)||uh(t,r)||fo(i,r)||fo(o,r)||fo(i2,r)||fo(s.config.globalProperties,r)||(a=l.__cssModules)&&a[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fo(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},TP=xo({},u8,{get(e,t){if(t!==Symbol.unscopables)return u8.get(e,t,e)},has(e,t){return t[0]!=="_"&&!uR(t)}});function OZe(){return null}function HZe(){return null}function DZe(e){}function VZe(e){}function WZe(){return null}function qZe(){}function UZe(e,t){return null}function ZZe(){return vA().slots}function vf(){return vA().attrs}function vA(e){const t=Ts();return t.setupContext||(t.setupContext=qA(t))}function N2(e){return rn(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function KZe(e,t){const n=N2(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?rn(s)||_n(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function GZe(e,t){return!e||!t?e||t:rn(e)&&rn(t)?e.concat(t):xo({},N2(e),N2(t))}function YZe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function XZe(e){const t=Ts(),n=P0;let o=e();B2(),n&&ru(!1);const s=()=>{Pu(t),n&&ru(!0)},i=()=>{Ts()!==t&&t.scope.off(),B2(),n&&ru(!1)};return ag(o)&&(o=o.catch(l=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),l})),[o,()=>{s(),Promise.resolve().then(i)}]}let d8=!0;function EP(e){const t=bg(e),n=e.proxy,o=e.ctx;d8=!1,t.beforeCreate&&hw(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:r,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:k,beforeDestroy:x,beforeUnmount:y,destroyed:w,unmounted:_,render:A,renderTracked:P,renderTriggered:z,errorCaptured:L,serverPrefetch:E,expose:T,inheritAttrs:$,components:C,directives:j,filters:H}=t;if(c&&IP(c,o,null),l)for(const R in l){const O=l[R];_n(O)&&(o[R]=O.bind(n))}if(s){const R=s.call(n,n);po(R)&&(e.data=ds(R))}if(d8=!0,i)for(const R in i){const O=i[R],U=_n(O)?O.bind(n,n):_n(O.get)?O.get.bind(n,n):Ol,Z=!_n(O)&&_n(O.set)?O.set.bind(n):Ol,q=B({get:U,set:Z});Object.defineProperty(o,R,{enumerable:!0,configurable:!0,get:()=>q.value,set:te=>q.value=te})}if(r)for(const R in r)yA(r[R],o,n,R);if(a){const R=_n(a)?a.call(n):a;Reflect.ownKeys(R).forEach(O=>{qn(O,R[O])})}u&&hw(u,e,"c");function M(R,O){rn(O)?O.forEach(U=>R(U.bind(n))):O&&R(O.bind(n))}if(M(xP,d),M(In,f),M(hA,p),M(gg,h),M(kP,m),M(bP,k),M(mA,L),M(MP,P),M(CP,z),M(vo,y),M(En,_),M(SP,E),rn(T))if(T.length){const R=e.exposed||(e.exposed={});T.forEach(O=>{Object.defineProperty(R,O,{get:()=>n[O],set:U=>n[O]=U,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===Ol&&(e.render=A),$!=null&&(e.inheritAttrs=$),C&&(e.components=C),j&&(e.directives=j),E&&mg(e)}function IP(e,t,n=Ol){rn(e)&&(e=f8(e));for(const o in e){const s=e[o];let i;po(s)?"default"in s?i=fn(s.from||o,s.default,!0):i=fn(s.from||o):i=fn(s),ps(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function hw(e,t,n){Dl(rn(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function yA(e,t,n,o){let s=o.includes(".")?iA(n,o):()=>n[o];if(To(e)){const i=t[e];_n(i)&&Ke(s,i)}else if(_n(e))Ke(s,e.bind(n));else if(po(e))if(rn(e))e.forEach(i=>yA(i,t,n,o));else{const i=_n(e.handler)?e.handler.bind(n):t[e.handler];_n(i)&&Ke(s,i,e)}}function bg(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let a;return r?a=r:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(c=>Z4(a,c,l,!0)),Z4(a,t,l)),po(t)&&i.set(t,a),a}function Z4(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&Z4(e,i,n,!0),s&&s.forEach(l=>Z4(e,l,n,!0));for(const l in t)if(!(o&&l==="expose")){const r=LP[l]||n&&n[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const LP={data:mw,props:gw,emits:gw,methods:Dd,computed:Dd,beforeCreate:ki,created:ki,beforeMount:ki,mounted:ki,beforeUpdate:ki,updated:ki,beforeDestroy:ki,beforeUnmount:ki,destroyed:ki,unmounted:ki,activated:ki,deactivated:ki,errorCaptured:ki,serverPrefetch:ki,components:Dd,directives:Dd,watch:NP,provide:mw,inject:$P};function mw(e,t){return t?e?function(){return xo(_n(e)?e.call(this,this):e,_n(t)?t.call(this,this):t)}:t:e}function $P(e,t){return Dd(f8(e),f8(t))}function f8(e){if(rn(e)){const t={};for(let n=0;n{let u,d=Yn,f;return sP(()=>{const p=e[s];Qs(u,p)&&(u=p,c())}),{get(){return a(),n.get?n.get(u):u},set(p){const h=n.set?n.set(p):p;if(!Qs(h,u)&&!(d!==Yn&&Qs(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${i}`in m)||(u=p,c()),o.emit(`update:${t}`,h),Qs(p,h)&&Qs(p,d)&&!Qs(h,f)&&c(),d=p,f=h}}});return r[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?l||Yn:r,done:!1}:{done:!0}}}},r}const kA=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fs(t)}Modifiers`]||e[`${Wi(t)}Modifiers`];function RP(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Yn;let s=n;const i=t.startsWith("update:"),l=i&&kA(o,t.slice(7));l&&(l.trim&&(s=n.map(u=>To(u)?u.trim():u)),l.number&&(s=n.map(gp)));let r,a=o[r=l4(t)]||o[r=l4(Fs(t))];!a&&i&&(a=o[r=l4(Wi(t))]),a&&Dl(a,e,6,s);const c=o[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Dl(c,e,6,s)}}const PP=new WeakMap;function bA(e,t,n=!1){const o=n?PP:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let l={},r=!1;if(!_n(e)){const a=c=>{const u=bA(c,t,!0);u&&(r=!0,xo(l,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!r?(po(e)&&o.set(e,null),null):(rn(i)?i.forEach(a=>l[a]=null):xo(l,i),po(e)&&o.set(e,l),l)}function Mp(e,t){return!e||!ff(t)?!1:(t=t.slice(2).replace(/Once$/,""),fo(e,t[0].toLowerCase()+t.slice(1))||fo(e,Wi(t))||fo(e,t))}function a4(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:l,attrs:r,emit:a,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,k=I2(e);let x,y;try{if(n.shapeFlag&4){const _=s||o,A=_;x=Vi(c.call(A,_,u,d,p,f,h)),y=r}else{const _=t;x=Vi(_.length>1?_(d,{attrs:r,slots:l,emit:a}):_(d,null)),y=t.props?r:jP(r)}}catch(_){l2.length=0,Ru(_,e,1),x=W(xs)}let w=x;if(y&&m!==!1){const _=Object.keys(y),{shapeFlag:A}=w;_.length&&A&7&&(i&&_.some(dp)&&(y=OP(y,i)),w=wa(w,y,!1,!0))}return n.dirs&&(w=wa(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&m1(w,n.transition),x=w,I2(k),x}function FP(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||ff(n))&&((t||(t={}))[n]=e[n]);return t},OP=(e,t)=>{const n={};for(const o in e)(!dp(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function HP(e,t,n){const{props:o,children:s,component:i}=e,{props:l,children:r,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?vw(o,l,c):!!l;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(xA),CA=e=>Object.getPrototypeOf(e)===xA;function DP(e,t,n,o=!1){const s={},i=SA();e.propsDefaults=Object.create(null),MA(e,t,s,i);for(const l in e.propsOptions[0])l in s||(s[l]=void 0);n?e.props=o?s:jR(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function VP(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:l}}=e,r=so(s),[a]=e.propsOptions;let c=!1;if((o||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=AA(d,t,!0);xo(l,f),p&&r.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return po(e)&&o.set(e,eu),eu;if(rn(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",xg=e=>rn(e)?e.map(Vi):[Vi(e)],qP=(e,t,n)=>{if(t._n)return t;const o=ae((...s)=>xg(t(...s)),n);return o._c=!1,o},TA=(e,t,n)=>{const o=e._ctx;for(const s in e){if(_g(s))continue;const i=e[s];if(_n(i))t[s]=qP(s,i,o);else if(i!=null){const l=xg(i);t[s]=()=>l}}},EA=(e,t)=>{const n=xg(t);e.slots.default=()=>n},IA=(e,t,n)=>{for(const o in t)(n||!_g(o))&&(e[o]=t[o])},UP=(e,t,n)=>{const o=e.slots=SA();if(e.vnode.shapeFlag&32){const s=t._;s?(IA(o,t,n),n&&IM(o,"_",s,!0)):TA(t,o)}else t&&EA(e,t)},ZP=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,l=Yn;if(o.shapeFlag&32){const r=t._;r?n&&r===1?i=!1:IA(s,t,n):(i=!t.$stable,TA(t,s)),l=t}else t&&(EA(e,t),l={default:1});if(i)for(const r in s)!_g(r)&&l[r]==null&&delete s[r]},ks=RA;function KP(e){return LA(e)}function GP(e){return LA(e,pP)}function LA(e,t){const n=vp();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:l,createText:r,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Ol,insertStaticContent:h}=e,m=(F,K,he,ye=null,ve=null,ie=null,de=void 0,be=null,Se=!!K.dynamicChildren)=>{if(F===K)return;F&&!sr(F,K)&&(ye=me(F),te(F,ve,ie,!0),F=null),K.patchFlag===-2&&(Se=!1,K.dynamicChildren=null);const{type:je,ref:et,shapeFlag:le}=K;switch(je){case r1:k(F,K,he,ye);break;case xs:x(F,K,he,ye);break;case lu:F==null&&y(K,he,ye,de);break;case Ce:C(F,K,he,ye,ve,ie,de,be,Se);break;default:le&1?A(F,K,he,ye,ve,ie,de,be,Se):le&6?j(F,K,he,ye,ve,ie,de,be,Se):(le&64||le&128)&&je.process(F,K,he,ye,ve,ie,de,be,Se,at)}et!=null&&ve?su(et,F&&F.ref,ie,K||F,!K):et==null&&F&&F.ref!=null&&su(F.ref,null,ie,F,!0)},k=(F,K,he,ye)=>{if(F==null)o(K.el=r(K.children),he,ye);else{const ve=K.el=F.el;K.children!==F.children&&c(ve,K.children)}},x=(F,K,he,ye)=>{F==null?o(K.el=a(K.children||""),he,ye):K.el=F.el},y=(F,K,he,ye)=>{[F.el,F.anchor]=h(F.children,K,he,ye,F.el,F.anchor)},w=({el:F,anchor:K},he,ye)=>{let ve;for(;F&&F!==K;)ve=f(F),o(F,he,ye),F=ve;o(K,he,ye)},_=({el:F,anchor:K})=>{let he;for(;F&&F!==K;)he=f(F),s(F),F=he;s(K)},A=(F,K,he,ye,ve,ie,de,be,Se)=>{if(K.type==="svg"?de="svg":K.type==="math"&&(de="mathml"),F==null)P(K,he,ye,ve,ie,de,be,Se);else{const je=F.el&&F.el._isVueCE?F.el:null;try{je&&je._beginPatch(),E(F,K,ve,ie,de,be,Se)}finally{je&&je._endPatch()}}},P=(F,K,he,ye,ve,ie,de,be)=>{let Se,je;const{props:et,shapeFlag:le,transition:fe,dirs:ge}=F;if(Se=F.el=l(F.type,ie,et&&et.is,et),le&8?u(Se,F.children):le&16&&L(F.children,Se,null,ye,ve,dh(F,ie),de,be),ge&&Cr(F,null,ye,"created"),z(Se,F,F.scopeId,de,ye),et){for(const Fe in et)Fe!=="value"&&!T0(Fe)&&i(Se,Fe,null,et[Fe],ie,ye);"value"in et&&i(Se,"value",null,et.value,ie),(je=et.onVnodeBeforeMount)&&ji(je,ye,F)}ge&&Cr(F,null,ye,"beforeMount");const Oe=$A(ve,fe);Oe&&fe.beforeEnter(Se),o(Se,K,he),((je=et&&et.onVnodeMounted)||Oe||ge)&&ks(()=>{try{je&&ji(je,ye,F),Oe&&fe.enter(Se),ge&&Cr(F,null,ye,"mounted")}finally{}},ve)},z=(F,K,he,ye,ve)=>{if(he&&p(F,he),ye)for(let ie=0;ie{for(let je=Se;je{const be=K.el=F.el;let{patchFlag:Se,dynamicChildren:je,dirs:et}=K;Se|=F.patchFlag&16;const le=F.props||Yn,fe=K.props||Yn;let ge;if(he&&Q1(he,!1),(ge=fe.onVnodeBeforeUpdate)&&ji(ge,he,K,F),et&&Cr(K,F,he,"beforeUpdate"),he&&Q1(he,!0),(le.innerHTML&&fe.innerHTML==null||le.textContent&&fe.textContent==null)&&u(be,""),je?T(F.dynamicChildren,je,be,he,ye,dh(K,ve),ie):de||O(F,K,be,null,he,ye,dh(K,ve),ie,!1),Se>0){if(Se&16)$(be,le,fe,he,ve);else if(Se&2&&le.class!==fe.class&&i(be,"class",null,fe.class,ve),Se&4&&i(be,"style",le.style,fe.style,ve),Se&8){const Oe=K.dynamicProps;for(let Fe=0;Fe{ge&&ji(ge,he,K,F),et&&Cr(K,F,he,"updated")},ye)},T=(F,K,he,ye,ve,ie,de)=>{for(let be=0;be{if(K!==he){if(K!==Yn)for(const ie in K)!T0(ie)&&!(ie in he)&&i(F,ie,K[ie],null,ve,ye);for(const ie in he){if(T0(ie))continue;const de=he[ie],be=K[ie];de!==be&&ie!=="value"&&i(F,ie,be,de,ve,ye)}"value"in he&&i(F,"value",K.value,he.value,ve)}},C=(F,K,he,ye,ve,ie,de,be,Se)=>{const je=K.el=F?F.el:r(""),et=K.anchor=F?F.anchor:r("");let{patchFlag:le,dynamicChildren:fe,slotScopeIds:ge}=K;ge&&(be=be?be.concat(ge):ge),F==null?(o(je,he,ye),o(et,he,ye),L(K.children||[],he,et,ve,ie,de,be,Se)):le>0&&le&64&&fe&&F.dynamicChildren&&F.dynamicChildren.length===fe.length?(T(F.dynamicChildren,fe,he,ve,ie,de,be),(K.key!=null||ve&&K===ve.subTree)&&Sg(F,K,!0)):O(F,K,he,et,ve,ie,de,be,Se)},j=(F,K,he,ye,ve,ie,de,be,Se)=>{K.slotScopeIds=be,F==null?K.shapeFlag&512?ve.ctx.activate(K,he,ye,de,Se):H(K,he,ye,ve,ie,de,Se):D(F,K,Se)},H=(F,K,he,ye,ve,ie,de)=>{const be=F.component=HA(F,ye,ve);if(gf(F)&&(be.ctx.renderer=at),VA(be,!1,de),be.asyncDep){if(ve&&ve.registerDep(be,M,de),!F.el){const Se=be.subTree=W(xs);x(null,Se,K,he),F.placeholder=Se.el}}else M(be,F,K,he,ve,ie,de)},D=(F,K,he)=>{const ye=K.component=F.component;if(HP(F,K,he))if(ye.asyncDep&&!ye.asyncResolved){R(ye,K,he);return}else ye.next=K,ye.update();else K.el=F.el,ye.vnode=K},M=(F,K,he,ye,ve,ie,de)=>{const be=()=>{if(F.isMounted){let{next:le,bu:fe,u:ge,parent:Oe,vnode:Fe}=F;{const Jt=NA(F);if(Jt){le&&(le.el=Fe.el,R(F,le,de)),Jt.asyncDep.then(()=>{ks(()=>{F.isUnmounted||je()},ve)});return}}let pt=le,kt;Q1(F,!1),le?(le.el=Fe.el,R(F,le,de)):le=Fe,fe&&nu(fe),(kt=le.props&&le.props.onVnodeBeforeUpdate)&&ji(kt,Oe,le,Fe),Q1(F,!0);const qt=a4(F),nn=F.subTree;F.subTree=qt,m(nn,qt,d(nn.el),me(nn),F,ve,ie),le.el=qt.el,pt===null&&Ap(F,qt.el),ge&&ks(ge,ve),(kt=le.props&&le.props.onVnodeUpdated)&&ks(()=>ji(kt,Oe,le,Fe),ve)}else{let le;const{el:fe,props:ge}=K,{bm:Oe,m:Fe,parent:pt,root:kt,type:qt}=F,nn=ha(K);if(Q1(F,!1),Oe&&nu(Oe),!nn&&(le=ge&&ge.onVnodeBeforeMount)&&ji(le,pt,K),Q1(F,!0),fe&&oe){const Jt=()=>{F.subTree=a4(F),oe(fe,F.subTree,F,ve,null)};nn&&qt.__asyncHydrate?qt.__asyncHydrate(fe,F,Jt):Jt()}else{kt.ce&&kt.ce._hasShadowRoot()&&kt.ce._injectChildStyle(qt,F.parent?F.parent.type:void 0);const Jt=F.subTree=a4(F);m(null,Jt,he,ye,F,ve,ie),K.el=Jt.el}if(Fe&&ks(Fe,ve),!nn&&(le=ge&&ge.onVnodeMounted)){const Jt=K;ks(()=>ji(le,pt,Jt),ve)}(K.shapeFlag&256||pt&&ha(pt.vnode)&&pt.vnode.shapeFlag&256)&&F.a&&ks(F.a,ve),F.isMounted=!0,K=he=ye=null}};F.scope.on();const Se=F.effect=new O4(be);F.scope.off();const je=F.update=Se.run.bind(Se),et=F.job=Se.runIfDirty.bind(Se);et.i=F,et.id=F.uid,Se.scheduler=()=>pg(et),Q1(F,!0),je()},R=(F,K,he)=>{K.component=F;const ye=F.vnode.props;F.vnode=K,F.next=null,VP(F,K.props,ye,he),ZP(F,K.children,he),ga(),iw(F),va()},O=(F,K,he,ye,ve,ie,de,be,Se=!1)=>{const je=F&&F.children,et=F?F.shapeFlag:0,le=K.children,{patchFlag:fe,shapeFlag:ge}=K;if(fe>0){if(fe&128){Z(je,le,he,ye,ve,ie,de,be,Se);return}else if(fe&256){U(je,le,he,ye,ve,ie,de,be,Se);return}}ge&8?(et&16&&Q(je,ve,ie),le!==je&&u(he,le)):et&16?ge&16?Z(je,le,he,ye,ve,ie,de,be,Se):Q(je,ve,ie,!0):(et&8&&u(he,""),ge&16&&L(le,he,ye,ve,ie,de,be,Se))},U=(F,K,he,ye,ve,ie,de,be,Se)=>{F=F||eu,K=K||eu;const je=F.length,et=K.length,le=Math.min(je,et);let fe;for(fe=0;feet?Q(F,ve,ie,!0,!1,le):L(K,he,ye,ve,ie,de,be,Se,le)},Z=(F,K,he,ye,ve,ie,de,be,Se)=>{let je=0;const et=K.length;let le=F.length-1,fe=et-1;for(;je<=le&&je<=fe;){const ge=F[je],Oe=K[je]=Se?sa(K[je]):Vi(K[je]);if(sr(ge,Oe))m(ge,Oe,he,null,ve,ie,de,be,Se);else break;je++}for(;je<=le&&je<=fe;){const ge=F[le],Oe=K[fe]=Se?sa(K[fe]):Vi(K[fe]);if(sr(ge,Oe))m(ge,Oe,he,null,ve,ie,de,be,Se);else break;le--,fe--}if(je>le){if(je<=fe){const ge=fe+1,Oe=gefe)for(;je<=le;)te(F[je],ve,ie,!0),je++;else{const ge=je,Oe=je,Fe=new Map;for(je=Oe;je<=fe;je++){const xn=K[je]=Se?sa(K[je]):Vi(K[je]);xn.key!=null&&Fe.set(xn.key,je)}let pt,kt=0;const qt=fe-Oe+1;let nn=!1,Jt=0;const kn=new Array(qt);for(je=0;je=qt){te(xn,ve,ie,!0);continue}let $n;if(xn.key!=null)$n=Fe.get(xn.key);else for(pt=Oe;pt<=fe;pt++)if(kn[pt-Oe]===0&&sr(xn,K[pt])){$n=pt;break}$n===void 0?te(xn,ve,ie,!0):(kn[$n-Oe]=je+1,$n>=Jt?Jt=$n:nn=!0,m(xn,K[$n],he,null,ve,ie,de,be,Se),kt++)}const Dn=nn?YP(kn):eu;for(pt=Dn.length-1,je=qt-1;je>=0;je--){const xn=Oe+je,$n=K[xn],Hn=K[xn+1],bn=xn+1{const{el:ie,type:de,transition:be,children:Se,shapeFlag:je}=F;if(je&6){q(F.component.subTree,K,he,ye);return}if(je&128){F.suspense.move(K,he,ye);return}if(je&64){de.move(F,K,he,at);return}if(de===Ce){o(ie,K,he);for(let le=0;lebe.enter(ie),ve));else{const{leave:le,delayLeave:fe,afterLeave:ge}=be,Oe=()=>{F.ctx.isUnmounted?s(ie):o(ie,K,he)},Fe=()=>{const pt=ie._isLeaving||!!ie[Nl];ie._isLeaving&&ie[Nl](!0),be.persisted&&!pt?Oe():le(ie,()=>{Oe(),ge&&ge()})};fe?fe(ie,Oe,Fe):Fe()}else o(ie,K,he)},te=(F,K,he,ye=!1,ve=!1)=>{const{type:ie,props:de,ref:be,children:Se,dynamicChildren:je,shapeFlag:et,patchFlag:le,dirs:fe,cacheIndex:ge,memo:Oe}=F;if(le===-2&&(ve=!1),be!=null&&(ga(),su(be,null,he,F,!0),va()),ge!=null&&(K.renderCache[ge]=void 0),et&256){K.ctx.deactivate(F);return}const Fe=et&1&&fe,pt=!ha(F);let kt;if(pt&&(kt=de&&de.onVnodeBeforeUnmount)&&ji(kt,K,F),et&6)se(F.component,he,ye);else{if(et&128){F.suspense.unmount(he,ye);return}Fe&&Cr(F,null,K,"beforeUnmount"),et&64?F.type.remove(F,K,he,at,ye):je&&!je.hasOnce&&(ie!==Ce||le>0&&le&64)?Q(je,K,he,!1,!0):(ie===Ce&&le&384||!ve&&et&16)&&Q(Se,K,he),ye&&ee(F)}const qt=Oe!=null&&ge==null;(pt&&(kt=de&&de.onVnodeUnmounted)||Fe||qt)&&ks(()=>{kt&&ji(kt,K,F),Fe&&Cr(F,null,K,"unmounted"),qt&&(F.el=null)},he)},ee=F=>{const{type:K,el:he,anchor:ye,transition:ve}=F;if(K===Ce){J(he,ye);return}if(K===lu){_(F);return}const ie=()=>{s(he),ve&&!ve.persisted&&ve.afterLeave&&ve.afterLeave()};if(F.shapeFlag&1&&ve&&!ve.persisted){const{leave:de,delayLeave:be}=ve,Se=()=>de(he,ie);be?be(F.el,ie,Se):Se()}else ie()},J=(F,K)=>{let he;for(;F!==K;)he=f(F),s(F),F=he;s(K)},se=(F,K,he)=>{const{bum:ye,scope:ve,job:ie,subTree:de,um:be,m:Se,a:je}=F;K4(Se),K4(je),ye&&nu(ye),ve.stop(),ie&&(ie.flags|=8,te(de,F,K,he)),be&&ks(be,K),ks(()=>{F.isUnmounted=!0},K)},Q=(F,K,he,ye=!1,ve=!1,ie=0)=>{for(let de=ie;de{if(F.shapeFlag&6)return me(F.component.subTree);if(F.shapeFlag&128)return F.suspense.next();const K=f(F.anchor||F.el),he=K&&K[lA];return he?f(he):K};let xe=!1;const Ye=(F,K,he)=>{let ye;F==null?K._vnode&&(te(K._vnode,null,null,!0),ye=K._vnode.component):m(K._vnode||null,F,K,null,null,null,he),K._vnode=F,xe||(xe=!0,iw(ye),q4(),xe=!1)},at={p:m,um:te,m:q,r:ee,mt:H,mc:L,pc:O,pbc:T,n:me,o:e};let X,oe;return t&&([X,oe]=t(at)),{render:Ye,hydrate:X,createApp:BP(Ye,X)}}function dh({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Q1({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function $A(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Sg(e,t,n=!1){const o=e.children,s=t.children;if(rn(o)&&rn(s))for(let i=0;i>1,e[n[r]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function NA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:NA(t)}function K4(e){if(e)for(let t=0;te.__isSuspense;let h8=0;const XP={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,l,r,a,c){if(e==null)JP(t,n,o,s,i,l,r,a,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}QP(e,t,n,o,s,l,r,a,c)}},hydrate:eF,normalize:tF},QZe=XP;function z2(e,t){const n=e.props&&e.props[t];_n(n)&&n()}function JP(e,t,n,o,s,i,l,r,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=BA(e,s,o,t,d,n,i,l,r,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,i,l),f.deps>0?(z2(e,"onPending"),z2(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,i,l),iu(f,e.ssFallback)):f.resolve(!1,!0)}function QP(e,t,n,o,s,i,l,r,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:k,isHydrating:x}=d;if(m)d.pendingBranch=f,sr(m,f)?(a(m,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():k&&(x||(a(h,p,n,o,s,null,i,l,r),iu(d,p)))):(d.pendingId=h8++,x?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),k?(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,i,l,r),iu(d,p))):h&&sr(h,f)?(a(h,f,n,o,s,d,i,l,r),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0&&d.resolve()));else if(h&&sr(h,f))a(h,f,n,o,s,d,i,l,r),iu(d,f);else if(z2(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=h8++,a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0)d.resolve();else{const{timeout:y,pendingId:w}=d;y>0?setTimeout(()=>{d.pendingId===w&&d.fallback(p)},y):y===0&&d.fallback(p)}}function BA(e,t,n,o,s,i,l,r,a,c,u=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:k}}=c;let x;const y=nF(e);y&&t&&t.pendingBranch&&(x=t.pendingId,t.deps++);const w=e.props?j4(e.props.timeout):void 0,_=i,A={vnode:e,parent:t,parentComponent:n,namespace:l,container:o,hiddenContainer:s,deps:0,pendingId:h8++,timeout:typeof w=="number"?w:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(P=!1,z=!1){const{vnode:L,activeBranch:E,pendingBranch:T,pendingId:$,effects:C,parentComponent:j,container:H,isInFallback:D}=A;let M=!1;if(A.isHydrating)A.isHydrating=!1;else if(!P){M=E&&T.transition&&T.transition.mode==="out-in";let U=!1;M&&(E.transition.afterLeave=()=>{$===A.pendingId&&(f(T,H,i===_&&!U?h(E):i,0),W4(C),D&&L.ssFallback&&(L.ssFallback.el=null))}),E&&!A.isFallbackMountPending&&(m(E.el)===H&&(i=h(E),U=!0),p(E,j,A,!0),!M&&D&&L.ssFallback&&ks(()=>L.ssFallback.el=null,A)),M||f(T,H,i,0)}A.isFallbackMountPending=!1,iu(A,T),A.pendingBranch=null,A.isInFallback=!1;let R=A.parent,O=!1;for(;R;){if(R.pendingBranch){R.effects.push(...C),O=!0;break}R=R.parent}!O&&!M&&W4(C),A.effects=[],y&&t&&t.pendingBranch&&x===t.pendingId&&(t.deps--,t.deps===0&&!z&&t.resolve()),z2(L,"onResolve")},fallback(P){if(!A.pendingBranch)return;const{vnode:z,activeBranch:L,parentComponent:E,container:T,namespace:$}=A;z2(z,"onFallback");const C=h(L),j=()=>{A.isFallbackMountPending=!1,A.isInFallback&&(d(null,P,T,C,E,null,$,r,a),iu(A,P))},H=P.transition&&P.transition.mode==="out-in";H&&(A.isFallbackMountPending=!0,L.transition.afterLeave=j),A.isInFallback=!0,p(L,E,null,!0),H||j()},move(P,z,L){A.activeBranch&&f(A.activeBranch,P,z,L),A.container=P},next(){return A.activeBranch&&h(A.activeBranch)},registerDep(P,z,L){const E=!!A.pendingBranch;E&&A.deps++;const T=P.vnode.el;P.asyncDep.catch($=>{Ru($,P,0)}).then($=>{if(P.isUnmounted||A.isUnmounted||A.pendingId!==P.suspenseId)return;B2(),P.asyncResolved=!0;const{vnode:C}=P;m8(P,$,!1),T&&(C.el=T);const j=!T&&P.subTree.el;z(P,C,m(T||P.subTree.el),T?null:h(P.subTree),A,l,L),j&&(C.placeholder=null,k(j)),Ap(P,C.el),E&&--A.deps===0&&A.resolve()})},unmount(P,z){A.isUnmounted=!0,A.activeBranch&&p(A.activeBranch,n,P,z),A.pendingBranch&&p(A.pendingBranch,n,P,z)}};return A}function eF(e,t,n,o,s,i,l,r,a){const c=t.suspense=BA(t,o,n,e.parentNode,document.createElement("div"),null,s,i,l,r,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,i,l);return c.deps===0&&c.resolve(!1,!0),u}function tF(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=ww(o?n.default:n),e.ssFallback=o?ww(n.fallback):W(xs)}function ww(e){let t;if(_n(e)){const n=R0&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=fi,PA())}return rn(e)&&(e=FP(e)),e=Vi(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function RA(e,t){t&&t.pendingBranch?rn(e)?t.effects.push(...e):t.effects.push(e):W4(e)}function iu(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,Ap(o,s))}function nF(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ce=Symbol.for("v-fgt"),r1=Symbol.for("v-txt"),xs=Symbol.for("v-cmt"),lu=Symbol.for("v-stc"),l2=[];let fi=null;function g(e=!1){l2.push(fi=e?null:[])}function PA(){l2.pop(),fi=l2[l2.length-1]||null}let R0=1;function Y4(e,t=!1){R0+=e,e<0&&fi&&t&&(fi.hasOnce=!0)}function FA(e){return e.dynamicChildren=R0>0?fi||eu:null,PA(),R0>0&&fi&&fi.push(e),e}function S(e,t,n,o,s,i){return FA(b(e,t,n,o,s,i,!0))}function ue(e,t,n,o,s){return FA(W(e,t,n,o,s,!0))}function g1(e){return e?e.__v_isVNode===!0:!1}function sr(e,t){return e.type===t.type&&e.key===t.key}function eKe(e){}const jA=({key:e})=>e??null,c4=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?To(e)||ps(e)||_n(e)?{i:ti,r:e,k:t,f:!!n}:e:null);function b(e,t=null,n=null,o=0,s=null,i=e===Ce?0:1,l=!1,r=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&jA(t),ref:t&&c4(t),scopeId:Sp,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ti};return r?(Cg(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=To(n)?8:16),R0>0&&!l&&fi&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&fi.push(a),a}const W=oF;function oF(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===gA)&&(e=xs),g1(e)){const r=wa(e,t,!0);return n&&Cg(r,n),R0>0&&!i&&fi&&(r.shapeFlag&6?fi[fi.indexOf(e)]=r:fi.push(r)),r.patchFlag=-2,r}if(aF(e)&&(e=e.__vccOpts),t){t=OA(t);let{class:r,style:a}=t;r&&!To(r)&&(t.class=Be(r)),po(a)&&(xp(a)&&!rn(a)&&(a=xo({},a)),t.style=Gt(a))}const l=To(e)?1:G4(e)?128:rA(e)?64:po(e)?4:_n(e)?2:0;return b(e,t,n,o,s,l,i,!0)}function OA(e){return e?xp(e)||CA(e)?xo({},e):e:null}function wa(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:l,children:r,transition:a}=e,c=t?io(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&jA(c),ref:t&&t.ref?n&&i?rn(i)?i.concat(c4(t)):[i,c4(t)]:c4(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&wa(e.ssContent),ssFallback:e.ssFallback&&wa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&m1(u,a.clone(u)),u}function He(e=" ",t=0){return W(r1,null,e,t)}function L0(e,t){const n=W(lu,null,e);return n.staticCount=t,n}function Y(e="",t=!1){return t?(g(),ue(xs,null,e)):W(xs,null,e)}function Vi(e){return e==null||typeof e=="boolean"?W(xs):rn(e)?W(Ce,null,e.slice()):g1(e)?sa(e):W(r1,null,String(e))}function sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:wa(e)}function Cg(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(rn(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),Cg(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!CA(t)?t._ctx=ti:s===3&&ti&&(ti.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _n(t)?(t={default:t,_ctx:ti},n=32):(t=String(t),o&64?(n=16,t=[He(t)]):n=8);e.children=t,e.shapeFlag|=n}function io(...e){const t={};for(let n=0;nei||ti;let X4,ru;{const e=vp(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(l=>l(i)):s[0](i)}};X4=t("__VUE_INSTANCE_SETTERS__",n=>ei=n),ru=t("__VUE_SSR_SETTERS__",n=>P0=n)}const Pu=e=>{const t=ei;return X4(e),e.scope.on(),()=>{e.scope.off(),X4(t)}},B2=()=>{ei&&ei.scope.off(),X4(null)};function DA(e){return e.vnode.shapeFlag&4}let P0=!1;function VA(e,t=!1,n=!1){t&&ru(t);const{props:o,children:s}=e.vnode,i=DA(e);DP(e,o,i,t),UP(e,s,n||t);const l=i?lF(e,t):void 0;return t&&ru(!1),l}function lF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,u8);const{setup:o}=n;if(o){ga();const s=e.setupContext=o.length>1?qA(e):null,i=Pu(e),l=hf(o,e,0,[e.props,s]),r=ag(l);if(va(),i(),(r||e.sp)&&!ha(e)&&mg(e),r){if(l.then(B2,B2),t)return l.then(a=>{m8(e,a,t)}).catch(a=>{Ru(a,e,0)});e.asyncDep=l}else m8(e,l,t)}else WA(e,t)}function m8(e,t,n){_n(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:po(t)&&(e.setupState=XM(t)),WA(e,n)}let J4,g8;function tKe(e){J4=e,g8=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,TP))}}const nKe=()=>!J4;function WA(e,t,n){const o=e.type;if(!e.render){if(!t&&J4&&!o.render){const s=o.template||bg(e).template;if(s){const{isCustomElement:i,compilerOptions:l}=e.appContext.config,{delimiters:r,compilerOptions:a}=o,c=xo(xo({isCustomElement:i,delimiters:r},l),a);o.render=J4(s,c)}}e.render=o.render||Ol,g8&&g8(e)}{const s=Pu(e);ga();try{EP(e)}finally{va(),s()}}}const rF={get(e,t){return ui(e,"get",""),e[t]}};function qA(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,rF),slots:e.slots,emit:e.emit,expose:t}}function yf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(XM(It(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in i2)return i2[n](e)},has(t,n){return n in t||n in i2}})):e.proxy}function v8(e,t=!0){return _n(e)?e.displayName||e.name:e.name||t&&e.__name}function aF(e){return _n(e)&&"__vccOpts"in e}const B=(e,t)=>KR(e,t,P0);function vn(e,t,n){try{Y4(-1);const o=arguments.length;return o===2?po(t)&&!rn(t)?g1(t)?W(e,null,[t]):W(e,t):W(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&g1(n)&&(n=[n]),W(e,t,n))}finally{Y4(1)}}function oKe(){}function sKe(e,t,n,o){const s=n[o];if(s&&cF(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function cF(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&fi&&fi.push(e),!0}const uF="3.5.35",iKe=Ol,lKe=QR,rKe=Rc,aKe=oA,dF={createComponentInstance:HA,setupComponent:VA,renderComponentRoot:a4,setCurrentRenderingInstance:I2,isVNode:g1,normalizeVNode:Vi,getComponentPublicInstance:yf,ensureValidVNode:kg,pushWarningContext:XR,popWarningContext:JR},cKe=dF,uKe=null,dKe=null,fKe=null;/** +`)&&(c3(w,0)||kc(),w.textContent=_.children)}if(I){if(D||!L||N&48){const O=w.tagName.includes("-");for(const U in I)(D&&(U.endsWith("value")||U==="indeterminate")||ff(U)&&!T0(U)||U[0]==="."||O&&!T0(U))&&o(w,U,null,I[U],void 0,A)}else if(I.onClick)o(w,"onClick",null,I.onClick,void 0,A);else if(N&4&&l1(I.style))for(const O in I.style)I.style[O]}let R;(R=I&&I.onVnodeBeforeMount)&&ji(R,A,_),F&&Cr(_,null,A,"beforeMount"),((R=I&&I.onVnodeMounted)||F||M)&&PA(()=>{R&&ji(R,A,_),M&&H.enter(w),F&&Cr(_,null,A,"mounted")},P)}return w.nextSibling},p=(w,_,A,P,z,L,T)=>{T=T||!!_.dynamicChildren;const I=_.children,N=I.length;let C=!1;for(let F=0;F{const{slotScopeIds:T}=_;T&&(z=z?z.concat(T):T);const I=l(w),N=p(i(w),_,I,A,P,z,L);return N&&Wc(N)&&N.data==="]"?i(_.anchor=N):(kc(),a(_.anchor=c("]"),I,N),N)},m=(w,_,A,P,z,L)=>{if(c3(w.parentElement,1)||kc(),_.el=null,L){const N=k(w);for(;;){const C=i(w);if(C&&C!==N)r(C);else break}}const T=i(w),I=l(w);return r(w),n(null,_,I,T,A,P,a3(I),z),A&&(A.vnode.el=_.el,Ap(A,_.el)),T},k=(w,_="[",A="]")=>{let P=0;for(;w;)if(w=i(w),w&&Wc(w)&&(w.data===_&&P++,w.data===A)){if(P===0)return i(w);P--}return w},x=(w,_,A)=>{const P=_.parentNode;P&&P.replaceChild(w,_);let z=A;for(;z;)z.vnode.el===_&&(z.vnode.el=z.subTree.el=w),z=z.parent},y=w=>w.nodeType===1&&w.tagName==="TEMPLATE";return[u,d]}const pw="data-allow-mismatch",mP={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function c3(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(pw);)e=e.parentElement;const n=e&&e.getAttribute(pw);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(mP[t])}}const gP=vp().requestIdleCallback||(e=>setTimeout(e,1)),vP=vp().cancelIdleCallback||(e=>clearTimeout(e)),NZe=(e=1e4)=>t=>{const n=gP(t,{timeout:e});return()=>vP(n)};function yP(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:l}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(yP(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},BZe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},RZe=(e=[])=>(t,n)=>{To(e)&&(e=[e]);let o=!1;const s=l=>{o||(o=!0,i(),t(),l.target.dispatchEvent(new l.constructor(l.type,l)))},i=()=>{n(l=>{for(const r of e)l.removeEventListener(r,s)})};return n(l=>{for(const r of e)l.addEventListener(r,s,{once:!0})}),i};function wP(e,t){if(Wc(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(Wc(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const ha=e=>!!e.type.__asyncLoader;function Rl(e){_n(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:l,suspensible:r=!0,onError:a}=e;let c=null,u,d=0;const f=()=>(d++,c=null,p()),p=()=>{let h;return c||(h=c=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((k,x)=>{a(m,()=>k(f()),()=>x(m),d+1)});throw m}).then(m=>h!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return Je({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,k){let x=!1;(m.bu||(m.bu=[])).push(()=>x=!0);const y=()=>{x||k()},w=i?()=>{const _=i(y,A=>wP(h,A));_&&(m.bum||(m.bum=[])).push(_)}:y;u?w():p().then(()=>!m.isUnmounted&&w())},get __asyncResolved(){return u},setup(){const h=ei;if(gg(h),u)return()=>u3(u,h);const m=w=>{c=null,Ru(w,h,13,!o)};if(r&&h.suspense||P0)return p().then(w=>()=>u3(w,h)).catch(w=>(m(w),()=>o?W(o,{error:w}):null));const k=V(!1),x=V(),y=V(!!s);return s&&setTimeout(()=>{y.value=!1},s),l!=null&&setTimeout(()=>{if(!k.value&&!x.value){const w=new Error(`Async component timed out after ${l}ms.`);m(w),x.value=w}},l),p().then(()=>{k.value=!0,h.parent&&gf(h.parent.vnode)&&h.parent.update()}).catch(w=>{m(w),x.value=w}),()=>{if(k.value&&u)return u3(u,h);if(x.value&&o)return W(o,{error:x.value});if(n&&!y.value)return u3(n,h)}}})}function u3(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,l=W(e,o,s);return l.ref=n,l.ce=i,delete t.vnode.ce,l}const gf=e=>e.type.__isKeepAlive,kP={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ts(),o=n.ctx;if(!o.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const s=new Map,i=new Set;let l=null;const r=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(y,w,_,A,P)=>{const z=y.component;c(y,w,_,0,r),a(z.vnode,y,w,_,z,r,A,y.slotScopeIds,P),ks(()=>{z.isDeactivated=!1,z.a&&nu(z.a);const L=y.props&&y.props.onVnodeMounted;L&&ji(L,z.parent,y)},r)},o.deactivate=y=>{const w=y.component;K4(w.m),K4(w.a),c(y,f,null,1,r),ks(()=>{w.da&&nu(w.da);const _=y.props&&y.props.onVnodeUnmounted;_&&ji(_,w.parent,y),w.isDeactivated=!0},r)};function p(y){ch(y),u(y,n,r,!0)}function h(y){s.forEach((w,_)=>{const A=y8(ha(w)?w.type.__asyncResolved||{}:w.type);A&&!y(A)&&m(_)})}function m(y){const w=s.get(y);w&&(!l||!sr(w,l))?p(w):l&&ch(l),s.delete(y),i.delete(y)}Ke(()=>[e.include,e.exclude],([y,w])=>{y&&h(_=>Hd(y,_)),w&&h(_=>!Hd(w,_))},{flush:"post",deep:!0});let k=null;const x=()=>{k!=null&&(G4(n.subTree.type)?ks(()=>{s.set(k,d3(n.subTree))},n.subTree.suspense):s.set(k,d3(n.subTree)))};return In(x),vg(x),vo(()=>{s.forEach(y=>{const{subTree:w,suspense:_}=n,A=d3(w);if(y.type===A.type&&y.key===A.key){ch(A);const P=A.component.da;P&&ks(P,_);return}p(y)})}),()=>{if(k=null,!t.default)return l=null;const y=t.default(),w=y[0];if(y.length>1)return l=null,y;if(!g1(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return l=null,w;let _=d3(w);if(_.type===xs)return l=null,_;const A=_.type,P=y8(ha(_)?_.type.__asyncResolved||{}:A),{include:z,exclude:L,max:T}=e;if(z&&(!P||!Hd(z,P))||L&&P&&Hd(L,P))return _.shapeFlag&=-257,l=_,w;const I=_.key==null?A:_.key,N=s.get(I);return _.el&&(_=wa(_),w.shapeFlag&128&&(w.ssContent=_)),k=I,N?(_.el=N.el,_.component=N.component,_.transition&&m1(_,_.transition),_.shapeFlag|=512,i.delete(I),i.add(I)):(i.add(I),T&&i.size>parseInt(T,10)&&m(i.values().next().value)),_.shapeFlag|=256,l=_,G4(w.type)?w:_}}},PZe=kP;function Hd(e,t){return rn(e)?e.some(n=>Hd(n,t)):To(e)?e.split(",").includes(t):lR(e)?(e.lastIndex=0,e.test(t)):!1}function bP(e,t){hA(e,"a",t)}function _P(e,t){hA(e,"da",t)}function hA(e,t,n=ei){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Cp(t,o,n),n){let s=n.parent;for(;s&&s.parent;)gf(s.parent.vnode)&&xP(o,t,n,s),s=s.parent}}function xP(e,t,n,o){const s=Cp(t,e,o,!0);En(()=>{ag(o[t],s)},n)}function ch(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function d3(e){return e.shapeFlag&128?e.ssContent:e}function Cp(e,t,n=ei,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{ga();const r=Pu(n),a=Dl(t,n,e,l);return r(),va(),a});return o?s.unshift(i):s.push(i),i}}const Ma=e=>(t,n=ei)=>{(!P0||e==="sp")&&Cp(e,(...o)=>t(...o),n)},SP=Ma("bm"),In=Ma("m"),mA=Ma("bu"),vg=Ma("u"),vo=Ma("bum"),En=Ma("um"),CP=Ma("sp"),MP=Ma("rtg"),AP=Ma("rtc");function gA(e,t=ei){Cp("ec",e,t)}const yg="components",TP="directives";function wg(e,t){return kg(yg,e,!0,t)||e}const vA=Symbol.for("v-ndc");function cs(e){return To(e)?kg(yg,e,!1)||e:e||vA}function FZe(e){return kg(TP,e)}function kg(e,t,n=!0,o=!1){const s=ti||ei;if(s){const i=s.type;if(e===yg){const r=y8(i,!1);if(r&&(r===t||r===Fs(t)||r===mp(Fs(t))))return i}const l=hw(s[e]||i[e],t)||hw(s.appContext[e],t);return!l&&o?i:l}}function hw(e,t){return e&&(e[t]||e[Fs(t)]||e[mp(Fs(t))])}function rt(e,t,n,o){let s;const i=n&&n[o],l=rn(e);if(l||To(e)){const r=l&&l1(e);let a=!1,c=!1;r&&(a=!il(e),c=ya(e),e=kp(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(r,a,void 0,i&&i[a]));else{const r=Object.keys(e);s=new Array(r.length);for(let a=0,c=r.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function jn(e,t,n={},o,s){if(ti.ce||ti.parent&&ha(ti.parent)&&ti.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),ue(Ce,null,[W("slot",n,o&&o())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const l=i&&bg(i(n)),r=n.key||l&&l.key,a=ue(Ce,{key:(r&&!dl(r)?r:`_${t}`)+(!l&&o?"_fb":"")},l||(o?o():[]),l&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function bg(e){return e.some(t=>g1(t)?!(t.type===xs||t.type===Ce&&!bg(t.children)):!0)?e:null}function jZe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:l4(o)]=e[o];return n}const u8=e=>e?VA(e)?yf(e):u8(e.parent):null,i2=xo(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>u8(e.parent),$root:e=>u8(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>_g(e),$forceUpdate:e=>e.f||(e.f=()=>{hg(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>lP.bind(e)}),uh=(e,t)=>e!==Yn&&!e.__isScriptSetup&&fo(e,t),d8={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:l,type:r,appContext:a}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(uh(o,t))return l[t]=1,o[t];if(s!==Yn&&fo(s,t))return l[t]=2,s[t];if(fo(i,t))return l[t]=3,i[t];if(n!==Yn&&fo(n,t))return l[t]=4,n[t];f8&&(l[t]=0)}}const c=i2[t];let u,d;if(c)return t==="$attrs"&&ui(e.attrs,"get",""),c(e);if((u=r.__cssModules)&&(u=u[t]))return u;if(n!==Yn&&fo(n,t))return l[t]=4,n[t];if(d=a.config.globalProperties,fo(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return uh(s,t)?(s[t]=n,!0):o!==Yn&&fo(o,t)?(o[t]=n,!0):fo(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:l}},r){let a;return!!(n[r]||e!==Yn&&r[0]!=="$"&&fo(e,r)||uh(t,r)||fo(i,r)||fo(o,r)||fo(i2,r)||fo(s.config.globalProperties,r)||(a=l.__cssModules)&&a[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fo(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},EP=xo({},d8,{get(e,t){if(t!==Symbol.unscopables)return d8.get(e,t,e)},has(e,t){return t[0]!=="_"&&!dR(t)}});function OZe(){return null}function HZe(){return null}function DZe(e){}function VZe(e){}function WZe(){return null}function qZe(){}function UZe(e,t){return null}function ZZe(){return yA().slots}function vf(){return yA().attrs}function yA(e){const t=Ts();return t.setupContext||(t.setupContext=UA(t))}function N2(e){return rn(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function KZe(e,t){const n=N2(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?rn(s)||_n(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function GZe(e,t){return!e||!t?e||t:rn(e)&&rn(t)?e.concat(t):xo({},N2(e),N2(t))}function YZe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function XZe(e){const t=Ts(),n=P0;let o=e();B2(),n&&ru(!1);const s=()=>{Pu(t),n&&ru(!0)},i=()=>{Ts()!==t&&t.scope.off(),B2(),n&&ru(!1)};return cg(o)&&(o=o.catch(l=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),l})),[o,()=>{s(),Promise.resolve().then(i)}]}let f8=!0;function IP(e){const t=_g(e),n=e.proxy,o=e.ctx;f8=!1,t.beforeCreate&&mw(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:r,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:k,beforeDestroy:x,beforeUnmount:y,destroyed:w,unmounted:_,render:A,renderTracked:P,renderTriggered:z,errorCaptured:L,serverPrefetch:T,expose:I,inheritAttrs:N,components:C,directives:F,filters:H}=t;if(c&&LP(c,o,null),l)for(const R in l){const O=l[R];_n(O)&&(o[R]=O.bind(n))}if(s){const R=s.call(n,n);po(R)&&(e.data=ds(R))}if(f8=!0,i)for(const R in i){const O=i[R],U=_n(O)?O.bind(n,n):_n(O.get)?O.get.bind(n,n):Ol,Z=!_n(O)&&_n(O.set)?O.set.bind(n):Ol,q=B({get:U,set:Z});Object.defineProperty(o,R,{enumerable:!0,configurable:!0,get:()=>q.value,set:te=>q.value=te})}if(r)for(const R in r)wA(r[R],o,n,R);if(a){const R=_n(a)?a.call(n):a;Reflect.ownKeys(R).forEach(O=>{qn(O,R[O])})}u&&mw(u,e,"c");function M(R,O){rn(O)?O.forEach(U=>R(U.bind(n))):O&&R(O.bind(n))}if(M(SP,d),M(In,f),M(mA,p),M(vg,h),M(bP,m),M(_P,k),M(gA,L),M(AP,P),M(MP,z),M(vo,y),M(En,_),M(CP,T),rn(I))if(I.length){const R=e.exposed||(e.exposed={});I.forEach(O=>{Object.defineProperty(R,O,{get:()=>n[O],set:U=>n[O]=U,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===Ol&&(e.render=A),N!=null&&(e.inheritAttrs=N),C&&(e.components=C),F&&(e.directives=F),T&&gg(e)}function LP(e,t,n=Ol){rn(e)&&(e=p8(e));for(const o in e){const s=e[o];let i;po(s)?"default"in s?i=fn(s.from||o,s.default,!0):i=fn(s.from||o):i=fn(s),ps(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function mw(e,t,n){Dl(rn(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function wA(e,t,n,o){let s=o.includes(".")?lA(n,o):()=>n[o];if(To(e)){const i=t[e];_n(i)&&Ke(s,i)}else if(_n(e))Ke(s,e.bind(n));else if(po(e))if(rn(e))e.forEach(i=>wA(i,t,n,o));else{const i=_n(e.handler)?e.handler.bind(n):t[e.handler];_n(i)&&Ke(s,i,e)}}function _g(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let a;return r?a=r:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(c=>Z4(a,c,l,!0)),Z4(a,t,l)),po(t)&&i.set(t,a),a}function Z4(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&Z4(e,i,n,!0),s&&s.forEach(l=>Z4(e,l,n,!0));for(const l in t)if(!(o&&l==="expose")){const r=$P[l]||n&&n[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const $P={data:gw,props:vw,emits:vw,methods:Dd,computed:Dd,beforeCreate:ki,created:ki,beforeMount:ki,mounted:ki,beforeUpdate:ki,updated:ki,beforeDestroy:ki,beforeUnmount:ki,destroyed:ki,unmounted:ki,activated:ki,deactivated:ki,errorCaptured:ki,serverPrefetch:ki,components:Dd,directives:Dd,watch:zP,provide:gw,inject:NP};function gw(e,t){return t?e?function(){return xo(_n(e)?e.call(this,this):e,_n(t)?t.call(this,this):t)}:t:e}function NP(e,t){return Dd(p8(e),p8(t))}function p8(e){if(rn(e)){const t={};for(let n=0;n{let u,d=Yn,f;return iP(()=>{const p=e[s];Qs(u,p)&&(u=p,c())}),{get(){return a(),n.get?n.get(u):u},set(p){const h=n.set?n.set(p):p;if(!Qs(h,u)&&!(d!==Yn&&Qs(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${i}`in m)||(u=p,c()),o.emit(`update:${t}`,h),Qs(p,h)&&Qs(p,d)&&!Qs(h,f)&&c(),d=p,f=h}}});return r[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?l||Yn:r,done:!1}:{done:!0}}}},r}const bA=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fs(t)}Modifiers`]||e[`${Wi(t)}Modifiers`];function PP(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Yn;let s=n;const i=t.startsWith("update:"),l=i&&bA(o,t.slice(7));l&&(l.trim&&(s=n.map(u=>To(u)?u.trim():u)),l.number&&(s=n.map(gp)));let r,a=o[r=l4(t)]||o[r=l4(Fs(t))];!a&&i&&(a=o[r=l4(Wi(t))]),a&&Dl(a,e,6,s);const c=o[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Dl(c,e,6,s)}}const FP=new WeakMap;function _A(e,t,n=!1){const o=n?FP:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let l={},r=!1;if(!_n(e)){const a=c=>{const u=_A(c,t,!0);u&&(r=!0,xo(l,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!r?(po(e)&&o.set(e,null),null):(rn(i)?i.forEach(a=>l[a]=null):xo(l,i),po(e)&&o.set(e,l),l)}function Mp(e,t){return!e||!ff(t)?!1:(t=t.slice(2).replace(/Once$/,""),fo(e,t[0].toLowerCase()+t.slice(1))||fo(e,Wi(t))||fo(e,t))}function a4(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:l,attrs:r,emit:a,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,k=I2(e);let x,y;try{if(n.shapeFlag&4){const _=s||o,A=_;x=Vi(c.call(A,_,u,d,p,f,h)),y=r}else{const _=t;x=Vi(_.length>1?_(d,{attrs:r,slots:l,emit:a}):_(d,null)),y=t.props?r:OP(r)}}catch(_){l2.length=0,Ru(_,e,1),x=W(xs)}let w=x;if(y&&m!==!1){const _=Object.keys(y),{shapeFlag:A}=w;_.length&&A&7&&(i&&_.some(dp)&&(y=HP(y,i)),w=wa(w,y,!1,!0))}return n.dirs&&(w=wa(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&m1(w,n.transition),x=w,I2(k),x}function jP(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||ff(n))&&((t||(t={}))[n]=e[n]);return t},HP=(e,t)=>{const n={};for(const o in e)(!dp(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function DP(e,t,n){const{props:o,children:s,component:i}=e,{props:l,children:r,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?yw(o,l,c):!!l;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(SA),MA=e=>Object.getPrototypeOf(e)===SA;function VP(e,t,n,o=!1){const s={},i=CA();e.propsDefaults=Object.create(null),AA(e,t,s,i);for(const l in e.propsOptions[0])l in s||(s[l]=void 0);n?e.props=o?s:OR(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function WP(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:l}}=e,r=so(s),[a]=e.propsOptions;let c=!1;if((o||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=TA(d,t,!0);xo(l,f),p&&r.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return po(e)&&o.set(e,eu),eu;if(rn(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",Sg=e=>rn(e)?e.map(Vi):[Vi(e)],UP=(e,t,n)=>{if(t._n)return t;const o=ae((...s)=>Sg(t(...s)),n);return o._c=!1,o},EA=(e,t,n)=>{const o=e._ctx;for(const s in e){if(xg(s))continue;const i=e[s];if(_n(i))t[s]=UP(s,i,o);else if(i!=null){const l=Sg(i);t[s]=()=>l}}},IA=(e,t)=>{const n=Sg(t);e.slots.default=()=>n},LA=(e,t,n)=>{for(const o in t)(n||!xg(o))&&(e[o]=t[o])},ZP=(e,t,n)=>{const o=e.slots=CA();if(e.vnode.shapeFlag&32){const s=t._;s?(LA(o,t,n),n&&LM(o,"_",s,!0)):EA(t,o)}else t&&IA(e,t)},KP=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,l=Yn;if(o.shapeFlag&32){const r=t._;r?n&&r===1?i=!1:LA(s,t,n):(i=!t.$stable,EA(t,s)),l=t}else t&&(IA(e,t),l={default:1});if(i)for(const r in s)!xg(r)&&l[r]==null&&delete s[r]},ks=PA;function GP(e){return $A(e)}function YP(e){return $A(e,hP)}function $A(e,t){const n=vp();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:l,createText:r,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Ol,insertStaticContent:h}=e,m=(j,K,he,ye=null,ve=null,ie=null,de=void 0,be=null,Se=!!K.dynamicChildren)=>{if(j===K)return;j&&!sr(j,K)&&(ye=me(j),te(j,ve,ie,!0),j=null),K.patchFlag===-2&&(Se=!1,K.dynamicChildren=null);const{type:je,ref:et,shapeFlag:le}=K;switch(je){case r1:k(j,K,he,ye);break;case xs:x(j,K,he,ye);break;case lu:j==null&&y(K,he,ye,de);break;case Ce:C(j,K,he,ye,ve,ie,de,be,Se);break;default:le&1?A(j,K,he,ye,ve,ie,de,be,Se):le&6?F(j,K,he,ye,ve,ie,de,be,Se):(le&64||le&128)&&je.process(j,K,he,ye,ve,ie,de,be,Se,at)}et!=null&&ve?su(et,j&&j.ref,ie,K||j,!K):et==null&&j&&j.ref!=null&&su(j.ref,null,ie,j,!0)},k=(j,K,he,ye)=>{if(j==null)o(K.el=r(K.children),he,ye);else{const ve=K.el=j.el;K.children!==j.children&&c(ve,K.children)}},x=(j,K,he,ye)=>{j==null?o(K.el=a(K.children||""),he,ye):K.el=j.el},y=(j,K,he,ye)=>{[j.el,j.anchor]=h(j.children,K,he,ye,j.el,j.anchor)},w=({el:j,anchor:K},he,ye)=>{let ve;for(;j&&j!==K;)ve=f(j),o(j,he,ye),j=ve;o(K,he,ye)},_=({el:j,anchor:K})=>{let he;for(;j&&j!==K;)he=f(j),s(j),j=he;s(K)},A=(j,K,he,ye,ve,ie,de,be,Se)=>{if(K.type==="svg"?de="svg":K.type==="math"&&(de="mathml"),j==null)P(K,he,ye,ve,ie,de,be,Se);else{const je=j.el&&j.el._isVueCE?j.el:null;try{je&&je._beginPatch(),T(j,K,ve,ie,de,be,Se)}finally{je&&je._endPatch()}}},P=(j,K,he,ye,ve,ie,de,be)=>{let Se,je;const{props:et,shapeFlag:le,transition:fe,dirs:ge}=j;if(Se=j.el=l(j.type,ie,et&&et.is,et),le&8?u(Se,j.children):le&16&&L(j.children,Se,null,ye,ve,dh(j,ie),de,be),ge&&Cr(j,null,ye,"created"),z(Se,j,j.scopeId,de,ye),et){for(const Fe in et)Fe!=="value"&&!T0(Fe)&&i(Se,Fe,null,et[Fe],ie,ye);"value"in et&&i(Se,"value",null,et.value,ie),(je=et.onVnodeBeforeMount)&&ji(je,ye,j)}ge&&Cr(j,null,ye,"beforeMount");const Oe=NA(ve,fe);Oe&&fe.beforeEnter(Se),o(Se,K,he),((je=et&&et.onVnodeMounted)||Oe||ge)&&ks(()=>{try{je&&ji(je,ye,j),Oe&&fe.enter(Se),ge&&Cr(j,null,ye,"mounted")}finally{}},ve)},z=(j,K,he,ye,ve)=>{if(he&&p(j,he),ye)for(let ie=0;ie{for(let je=Se;je{const be=K.el=j.el;let{patchFlag:Se,dynamicChildren:je,dirs:et}=K;Se|=j.patchFlag&16;const le=j.props||Yn,fe=K.props||Yn;let ge;if(he&&Q1(he,!1),(ge=fe.onVnodeBeforeUpdate)&&ji(ge,he,K,j),et&&Cr(K,j,he,"beforeUpdate"),he&&Q1(he,!0),(le.innerHTML&&fe.innerHTML==null||le.textContent&&fe.textContent==null)&&u(be,""),je?I(j.dynamicChildren,je,be,he,ye,dh(K,ve),ie):de||O(j,K,be,null,he,ye,dh(K,ve),ie,!1),Se>0){if(Se&16)N(be,le,fe,he,ve);else if(Se&2&&le.class!==fe.class&&i(be,"class",null,fe.class,ve),Se&4&&i(be,"style",le.style,fe.style,ve),Se&8){const Oe=K.dynamicProps;for(let Fe=0;Fe{ge&&ji(ge,he,K,j),et&&Cr(K,j,he,"updated")},ye)},I=(j,K,he,ye,ve,ie,de)=>{for(let be=0;be{if(K!==he){if(K!==Yn)for(const ie in K)!T0(ie)&&!(ie in he)&&i(j,ie,K[ie],null,ve,ye);for(const ie in he){if(T0(ie))continue;const de=he[ie],be=K[ie];de!==be&&ie!=="value"&&i(j,ie,be,de,ve,ye)}"value"in he&&i(j,"value",K.value,he.value,ve)}},C=(j,K,he,ye,ve,ie,de,be,Se)=>{const je=K.el=j?j.el:r(""),et=K.anchor=j?j.anchor:r("");let{patchFlag:le,dynamicChildren:fe,slotScopeIds:ge}=K;ge&&(be=be?be.concat(ge):ge),j==null?(o(je,he,ye),o(et,he,ye),L(K.children||[],he,et,ve,ie,de,be,Se)):le>0&&le&64&&fe&&j.dynamicChildren&&j.dynamicChildren.length===fe.length?(I(j.dynamicChildren,fe,he,ve,ie,de,be),(K.key!=null||ve&&K===ve.subTree)&&Cg(j,K,!0)):O(j,K,he,et,ve,ie,de,be,Se)},F=(j,K,he,ye,ve,ie,de,be,Se)=>{K.slotScopeIds=be,j==null?K.shapeFlag&512?ve.ctx.activate(K,he,ye,de,Se):H(K,he,ye,ve,ie,de,Se):D(j,K,Se)},H=(j,K,he,ye,ve,ie,de)=>{const be=j.component=DA(j,ye,ve);if(gf(j)&&(be.ctx.renderer=at),WA(be,!1,de),be.asyncDep){if(ve&&ve.registerDep(be,M,de),!j.el){const Se=be.subTree=W(xs);x(null,Se,K,he),j.placeholder=Se.el}}else M(be,j,K,he,ve,ie,de)},D=(j,K,he)=>{const ye=K.component=j.component;if(DP(j,K,he))if(ye.asyncDep&&!ye.asyncResolved){R(ye,K,he);return}else ye.next=K,ye.update();else K.el=j.el,ye.vnode=K},M=(j,K,he,ye,ve,ie,de)=>{const be=()=>{if(j.isMounted){let{next:le,bu:fe,u:ge,parent:Oe,vnode:Fe}=j;{const Jt=zA(j);if(Jt){le&&(le.el=Fe.el,R(j,le,de)),Jt.asyncDep.then(()=>{ks(()=>{j.isUnmounted||je()},ve)});return}}let pt=le,kt;Q1(j,!1),le?(le.el=Fe.el,R(j,le,de)):le=Fe,fe&&nu(fe),(kt=le.props&&le.props.onVnodeBeforeUpdate)&&ji(kt,Oe,le,Fe),Q1(j,!0);const qt=a4(j),nn=j.subTree;j.subTree=qt,m(nn,qt,d(nn.el),me(nn),j,ve,ie),le.el=qt.el,pt===null&&Ap(j,qt.el),ge&&ks(ge,ve),(kt=le.props&&le.props.onVnodeUpdated)&&ks(()=>ji(kt,Oe,le,Fe),ve)}else{let le;const{el:fe,props:ge}=K,{bm:Oe,m:Fe,parent:pt,root:kt,type:qt}=j,nn=ha(K);if(Q1(j,!1),Oe&&nu(Oe),!nn&&(le=ge&&ge.onVnodeBeforeMount)&&ji(le,pt,K),Q1(j,!0),fe&&oe){const Jt=()=>{j.subTree=a4(j),oe(fe,j.subTree,j,ve,null)};nn&&qt.__asyncHydrate?qt.__asyncHydrate(fe,j,Jt):Jt()}else{kt.ce&&kt.ce._hasShadowRoot()&&kt.ce._injectChildStyle(qt,j.parent?j.parent.type:void 0);const Jt=j.subTree=a4(j);m(null,Jt,he,ye,j,ve,ie),K.el=Jt.el}if(Fe&&ks(Fe,ve),!nn&&(le=ge&&ge.onVnodeMounted)){const Jt=K;ks(()=>ji(le,pt,Jt),ve)}(K.shapeFlag&256||pt&&ha(pt.vnode)&&pt.vnode.shapeFlag&256)&&j.a&&ks(j.a,ve),j.isMounted=!0,K=he=ye=null}};j.scope.on();const Se=j.effect=new O4(be);j.scope.off();const je=j.update=Se.run.bind(Se),et=j.job=Se.runIfDirty.bind(Se);et.i=j,et.id=j.uid,Se.scheduler=()=>hg(et),Q1(j,!0),je()},R=(j,K,he)=>{K.component=j;const ye=j.vnode.props;j.vnode=K,j.next=null,WP(j,K.props,ye,he),KP(j,K.children,he),ga(),lw(j),va()},O=(j,K,he,ye,ve,ie,de,be,Se=!1)=>{const je=j&&j.children,et=j?j.shapeFlag:0,le=K.children,{patchFlag:fe,shapeFlag:ge}=K;if(fe>0){if(fe&128){Z(je,le,he,ye,ve,ie,de,be,Se);return}else if(fe&256){U(je,le,he,ye,ve,ie,de,be,Se);return}}ge&8?(et&16&&Q(je,ve,ie),le!==je&&u(he,le)):et&16?ge&16?Z(je,le,he,ye,ve,ie,de,be,Se):Q(je,ve,ie,!0):(et&8&&u(he,""),ge&16&&L(le,he,ye,ve,ie,de,be,Se))},U=(j,K,he,ye,ve,ie,de,be,Se)=>{j=j||eu,K=K||eu;const je=j.length,et=K.length,le=Math.min(je,et);let fe;for(fe=0;feet?Q(j,ve,ie,!0,!1,le):L(K,he,ye,ve,ie,de,be,Se,le)},Z=(j,K,he,ye,ve,ie,de,be,Se)=>{let je=0;const et=K.length;let le=j.length-1,fe=et-1;for(;je<=le&&je<=fe;){const ge=j[je],Oe=K[je]=Se?sa(K[je]):Vi(K[je]);if(sr(ge,Oe))m(ge,Oe,he,null,ve,ie,de,be,Se);else break;je++}for(;je<=le&&je<=fe;){const ge=j[le],Oe=K[fe]=Se?sa(K[fe]):Vi(K[fe]);if(sr(ge,Oe))m(ge,Oe,he,null,ve,ie,de,be,Se);else break;le--,fe--}if(je>le){if(je<=fe){const ge=fe+1,Oe=gefe)for(;je<=le;)te(j[je],ve,ie,!0),je++;else{const ge=je,Oe=je,Fe=new Map;for(je=Oe;je<=fe;je++){const xn=K[je]=Se?sa(K[je]):Vi(K[je]);xn.key!=null&&Fe.set(xn.key,je)}let pt,kt=0;const qt=fe-Oe+1;let nn=!1,Jt=0;const kn=new Array(qt);for(je=0;je=qt){te(xn,ve,ie,!0);continue}let $n;if(xn.key!=null)$n=Fe.get(xn.key);else for(pt=Oe;pt<=fe;pt++)if(kn[pt-Oe]===0&&sr(xn,K[pt])){$n=pt;break}$n===void 0?te(xn,ve,ie,!0):(kn[$n-Oe]=je+1,$n>=Jt?Jt=$n:nn=!0,m(xn,K[$n],he,null,ve,ie,de,be,Se),kt++)}const Dn=nn?XP(kn):eu;for(pt=Dn.length-1,je=qt-1;je>=0;je--){const xn=Oe+je,$n=K[xn],Hn=K[xn+1],bn=xn+1{const{el:ie,type:de,transition:be,children:Se,shapeFlag:je}=j;if(je&6){q(j.component.subTree,K,he,ye);return}if(je&128){j.suspense.move(K,he,ye);return}if(je&64){de.move(j,K,he,at);return}if(de===Ce){o(ie,K,he);for(let le=0;lebe.enter(ie),ve));else{const{leave:le,delayLeave:fe,afterLeave:ge}=be,Oe=()=>{j.ctx.isUnmounted?s(ie):o(ie,K,he)},Fe=()=>{const pt=ie._isLeaving||!!ie[Nl];ie._isLeaving&&ie[Nl](!0),be.persisted&&!pt?Oe():le(ie,()=>{Oe(),ge&&ge()})};fe?fe(ie,Oe,Fe):Fe()}else o(ie,K,he)},te=(j,K,he,ye=!1,ve=!1)=>{const{type:ie,props:de,ref:be,children:Se,dynamicChildren:je,shapeFlag:et,patchFlag:le,dirs:fe,cacheIndex:ge,memo:Oe}=j;if(le===-2&&(ve=!1),be!=null&&(ga(),su(be,null,he,j,!0),va()),ge!=null&&(K.renderCache[ge]=void 0),et&256){K.ctx.deactivate(j);return}const Fe=et&1&&fe,pt=!ha(j);let kt;if(pt&&(kt=de&&de.onVnodeBeforeUnmount)&&ji(kt,K,j),et&6)se(j.component,he,ye);else{if(et&128){j.suspense.unmount(he,ye);return}Fe&&Cr(j,null,K,"beforeUnmount"),et&64?j.type.remove(j,K,he,at,ye):je&&!je.hasOnce&&(ie!==Ce||le>0&&le&64)?Q(je,K,he,!1,!0):(ie===Ce&&le&384||!ve&&et&16)&&Q(Se,K,he),ye&&ee(j)}const qt=Oe!=null&&ge==null;(pt&&(kt=de&&de.onVnodeUnmounted)||Fe||qt)&&ks(()=>{kt&&ji(kt,K,j),Fe&&Cr(j,null,K,"unmounted"),qt&&(j.el=null)},he)},ee=j=>{const{type:K,el:he,anchor:ye,transition:ve}=j;if(K===Ce){J(he,ye);return}if(K===lu){_(j);return}const ie=()=>{s(he),ve&&!ve.persisted&&ve.afterLeave&&ve.afterLeave()};if(j.shapeFlag&1&&ve&&!ve.persisted){const{leave:de,delayLeave:be}=ve,Se=()=>de(he,ie);be?be(j.el,ie,Se):Se()}else ie()},J=(j,K)=>{let he;for(;j!==K;)he=f(j),s(j),j=he;s(K)},se=(j,K,he)=>{const{bum:ye,scope:ve,job:ie,subTree:de,um:be,m:Se,a:je}=j;K4(Se),K4(je),ye&&nu(ye),ve.stop(),ie&&(ie.flags|=8,te(de,j,K,he)),be&&ks(be,K),ks(()=>{j.isUnmounted=!0},K)},Q=(j,K,he,ye=!1,ve=!1,ie=0)=>{for(let de=ie;de{if(j.shapeFlag&6)return me(j.component.subTree);if(j.shapeFlag&128)return j.suspense.next();const K=f(j.anchor||j.el),he=K&&K[rA];return he?f(he):K};let xe=!1;const Ye=(j,K,he)=>{let ye;j==null?K._vnode&&(te(K._vnode,null,null,!0),ye=K._vnode.component):m(K._vnode||null,j,K,null,null,null,he),K._vnode=j,xe||(xe=!0,lw(ye),q4(),xe=!1)},at={p:m,um:te,m:q,r:ee,mt:H,mc:L,pc:O,pbc:I,n:me,o:e};let X,oe;return t&&([X,oe]=t(at)),{render:Ye,hydrate:X,createApp:RP(Ye,X)}}function dh({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Q1({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function NA(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cg(e,t,n=!1){const o=e.children,s=t.children;if(rn(o)&&rn(s))for(let i=0;i>1,e[n[r]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function zA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zA(t)}function K4(e){if(e)for(let t=0;te.__isSuspense;let m8=0;const JP={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,l,r,a,c){if(e==null)QP(t,n,o,s,i,l,r,a,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}eF(e,t,n,o,s,l,r,a,c)}},hydrate:tF,normalize:nF},QZe=JP;function z2(e,t){const n=e.props&&e.props[t];_n(n)&&n()}function QP(e,t,n,o,s,i,l,r,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=RA(e,s,o,t,d,n,i,l,r,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,i,l),f.deps>0?(z2(e,"onPending"),z2(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,i,l),iu(f,e.ssFallback)):f.resolve(!1,!0)}function eF(e,t,n,o,s,i,l,r,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:k,isHydrating:x}=d;if(m)d.pendingBranch=f,sr(m,f)?(a(m,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():k&&(x||(a(h,p,n,o,s,null,i,l,r),iu(d,p)))):(d.pendingId=m8++,x?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),k?(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,i,l,r),iu(d,p))):h&&sr(h,f)?(a(h,f,n,o,s,d,i,l,r),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0&&d.resolve()));else if(h&&sr(h,f))a(h,f,n,o,s,d,i,l,r),iu(d,f);else if(z2(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=m8++,a(null,f,d.hiddenContainer,null,s,d,i,l,r),d.deps<=0)d.resolve();else{const{timeout:y,pendingId:w}=d;y>0?setTimeout(()=>{d.pendingId===w&&d.fallback(p)},y):y===0&&d.fallback(p)}}function RA(e,t,n,o,s,i,l,r,a,c,u=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:k}}=c;let x;const y=oF(e);y&&t&&t.pendingBranch&&(x=t.pendingId,t.deps++);const w=e.props?j4(e.props.timeout):void 0,_=i,A={vnode:e,parent:t,parentComponent:n,namespace:l,container:o,hiddenContainer:s,deps:0,pendingId:m8++,timeout:typeof w=="number"?w:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(P=!1,z=!1){const{vnode:L,activeBranch:T,pendingBranch:I,pendingId:N,effects:C,parentComponent:F,container:H,isInFallback:D}=A;let M=!1;if(A.isHydrating)A.isHydrating=!1;else if(!P){M=T&&I.transition&&I.transition.mode==="out-in";let U=!1;M&&(T.transition.afterLeave=()=>{N===A.pendingId&&(f(I,H,i===_&&!U?h(T):i,0),W4(C),D&&L.ssFallback&&(L.ssFallback.el=null))}),T&&!A.isFallbackMountPending&&(m(T.el)===H&&(i=h(T),U=!0),p(T,F,A,!0),!M&&D&&L.ssFallback&&ks(()=>L.ssFallback.el=null,A)),M||f(I,H,i,0)}A.isFallbackMountPending=!1,iu(A,I),A.pendingBranch=null,A.isInFallback=!1;let R=A.parent,O=!1;for(;R;){if(R.pendingBranch){R.effects.push(...C),O=!0;break}R=R.parent}!O&&!M&&W4(C),A.effects=[],y&&t&&t.pendingBranch&&x===t.pendingId&&(t.deps--,t.deps===0&&!z&&t.resolve()),z2(L,"onResolve")},fallback(P){if(!A.pendingBranch)return;const{vnode:z,activeBranch:L,parentComponent:T,container:I,namespace:N}=A;z2(z,"onFallback");const C=h(L),F=()=>{A.isFallbackMountPending=!1,A.isInFallback&&(d(null,P,I,C,T,null,N,r,a),iu(A,P))},H=P.transition&&P.transition.mode==="out-in";H&&(A.isFallbackMountPending=!0,L.transition.afterLeave=F),A.isInFallback=!0,p(L,T,null,!0),H||F()},move(P,z,L){A.activeBranch&&f(A.activeBranch,P,z,L),A.container=P},next(){return A.activeBranch&&h(A.activeBranch)},registerDep(P,z,L){const T=!!A.pendingBranch;T&&A.deps++;const I=P.vnode.el;P.asyncDep.catch(N=>{Ru(N,P,0)}).then(N=>{if(P.isUnmounted||A.isUnmounted||A.pendingId!==P.suspenseId)return;B2(),P.asyncResolved=!0;const{vnode:C}=P;g8(P,N,!1),I&&(C.el=I);const F=!I&&P.subTree.el;z(P,C,m(I||P.subTree.el),I?null:h(P.subTree),A,l,L),F&&(C.placeholder=null,k(F)),Ap(P,C.el),T&&--A.deps===0&&A.resolve()})},unmount(P,z){A.isUnmounted=!0,A.activeBranch&&p(A.activeBranch,n,P,z),A.pendingBranch&&p(A.pendingBranch,n,P,z)}};return A}function tF(e,t,n,o,s,i,l,r,a){const c=t.suspense=RA(t,o,n,e.parentNode,document.createElement("div"),null,s,i,l,r,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,i,l);return c.deps===0&&c.resolve(!1,!0),u}function nF(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=kw(o?n.default:n),e.ssFallback=o?kw(n.fallback):W(xs)}function kw(e){let t;if(_n(e)){const n=R0&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=fi,FA())}return rn(e)&&(e=jP(e)),e=Vi(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function PA(e,t){t&&t.pendingBranch?rn(e)?t.effects.push(...e):t.effects.push(e):W4(e)}function iu(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,Ap(o,s))}function oF(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ce=Symbol.for("v-fgt"),r1=Symbol.for("v-txt"),xs=Symbol.for("v-cmt"),lu=Symbol.for("v-stc"),l2=[];let fi=null;function g(e=!1){l2.push(fi=e?null:[])}function FA(){l2.pop(),fi=l2[l2.length-1]||null}let R0=1;function Y4(e,t=!1){R0+=e,e<0&&fi&&t&&(fi.hasOnce=!0)}function jA(e){return e.dynamicChildren=R0>0?fi||eu:null,FA(),R0>0&&fi&&fi.push(e),e}function S(e,t,n,o,s,i){return jA(b(e,t,n,o,s,i,!0))}function ue(e,t,n,o,s){return jA(W(e,t,n,o,s,!0))}function g1(e){return e?e.__v_isVNode===!0:!1}function sr(e,t){return e.type===t.type&&e.key===t.key}function eKe(e){}const OA=({key:e})=>e??null,c4=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?To(e)||ps(e)||_n(e)?{i:ti,r:e,k:t,f:!!n}:e:null);function b(e,t=null,n=null,o=0,s=null,i=e===Ce?0:1,l=!1,r=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&OA(t),ref:t&&c4(t),scopeId:Sp,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ti};return r?(Mg(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=To(n)?8:16),R0>0&&!l&&fi&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&fi.push(a),a}const W=sF;function sF(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===vA)&&(e=xs),g1(e)){const r=wa(e,t,!0);return n&&Mg(r,n),R0>0&&!i&&fi&&(r.shapeFlag&6?fi[fi.indexOf(e)]=r:fi.push(r)),r.patchFlag=-2,r}if(cF(e)&&(e=e.__vccOpts),t){t=HA(t);let{class:r,style:a}=t;r&&!To(r)&&(t.class=Be(r)),po(a)&&(xp(a)&&!rn(a)&&(a=xo({},a)),t.style=Gt(a))}const l=To(e)?1:G4(e)?128:aA(e)?64:po(e)?4:_n(e)?2:0;return b(e,t,n,o,s,l,i,!0)}function HA(e){return e?xp(e)||MA(e)?xo({},e):e:null}function wa(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:l,children:r,transition:a}=e,c=t?io(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&OA(c),ref:t&&t.ref?n&&i?rn(i)?i.concat(c4(t)):[i,c4(t)]:c4(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&wa(e.ssContent),ssFallback:e.ssFallback&&wa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&m1(u,a.clone(u)),u}function He(e=" ",t=0){return W(r1,null,e,t)}function L0(e,t){const n=W(lu,null,e);return n.staticCount=t,n}function Y(e="",t=!1){return t?(g(),ue(xs,null,e)):W(xs,null,e)}function Vi(e){return e==null||typeof e=="boolean"?W(xs):rn(e)?W(Ce,null,e.slice()):g1(e)?sa(e):W(r1,null,String(e))}function sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:wa(e)}function Mg(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(rn(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),Mg(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!MA(t)?t._ctx=ti:s===3&&ti&&(ti.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _n(t)?(t={default:t,_ctx:ti},n=32):(t=String(t),o&64?(n=16,t=[He(t)]):n=8);e.children=t,e.shapeFlag|=n}function io(...e){const t={};for(let n=0;nei||ti;let X4,ru;{const e=vp(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(l=>l(i)):s[0](i)}};X4=t("__VUE_INSTANCE_SETTERS__",n=>ei=n),ru=t("__VUE_SSR_SETTERS__",n=>P0=n)}const Pu=e=>{const t=ei;return X4(e),e.scope.on(),()=>{e.scope.off(),X4(t)}},B2=()=>{ei&&ei.scope.off(),X4(null)};function VA(e){return e.vnode.shapeFlag&4}let P0=!1;function WA(e,t=!1,n=!1){t&&ru(t);const{props:o,children:s}=e.vnode,i=VA(e);VP(e,o,i,t),ZP(e,s,n||t);const l=i?rF(e,t):void 0;return t&&ru(!1),l}function rF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,d8);const{setup:o}=n;if(o){ga();const s=e.setupContext=o.length>1?UA(e):null,i=Pu(e),l=hf(o,e,0,[e.props,s]),r=cg(l);if(va(),i(),(r||e.sp)&&!ha(e)&&gg(e),r){if(l.then(B2,B2),t)return l.then(a=>{g8(e,a,t)}).catch(a=>{Ru(a,e,0)});e.asyncDep=l}else g8(e,l,t)}else qA(e,t)}function g8(e,t,n){_n(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:po(t)&&(e.setupState=JM(t)),qA(e,n)}let J4,v8;function tKe(e){J4=e,v8=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,EP))}}const nKe=()=>!J4;function qA(e,t,n){const o=e.type;if(!e.render){if(!t&&J4&&!o.render){const s=o.template||_g(e).template;if(s){const{isCustomElement:i,compilerOptions:l}=e.appContext.config,{delimiters:r,compilerOptions:a}=o,c=xo(xo({isCustomElement:i,delimiters:r},l),a);o.render=J4(s,c)}}e.render=o.render||Ol,v8&&v8(e)}{const s=Pu(e);ga();try{IP(e)}finally{va(),s()}}}const aF={get(e,t){return ui(e,"get",""),e[t]}};function UA(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,aF),slots:e.slots,emit:e.emit,expose:t}}function yf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(JM(It(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in i2)return i2[n](e)},has(t,n){return n in t||n in i2}})):e.proxy}function y8(e,t=!0){return _n(e)?e.displayName||e.name:e.name||t&&e.__name}function cF(e){return _n(e)&&"__vccOpts"in e}const B=(e,t)=>GR(e,t,P0);function vn(e,t,n){try{Y4(-1);const o=arguments.length;return o===2?po(t)&&!rn(t)?g1(t)?W(e,null,[t]):W(e,t):W(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&g1(n)&&(n=[n]),W(e,t,n))}finally{Y4(1)}}function oKe(){}function sKe(e,t,n,o){const s=n[o];if(s&&uF(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function uF(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&fi&&fi.push(e),!0}const dF="3.5.35",iKe=Ol,lKe=eP,rKe=Rc,aKe=sA,fF={createComponentInstance:DA,setupComponent:WA,renderComponentRoot:a4,setCurrentRenderingInstance:I2,isVNode:g1,normalizeVNode:Vi,getComponentPublicInstance:yf,ensureValidVNode:bg,pushWarningContext:JR,popWarningContext:QR},cKe=fF,uKe=null,dKe=null,fKe=null;/** * @vue/runtime-dom v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let y8;const kw=typeof window<"u"&&window.trustedTypes;if(kw)try{y8=kw.createPolicy("vue",{createHTML:e=>e})}catch{}const UA=y8?e=>y8.createHTML(e):e=>e,fF="http://www.w3.org/2000/svg",pF="http://www.w3.org/1998/Math/MathML",Qr=typeof document<"u"?document:null,bw=Qr&&Qr.createElement("template"),hF={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?Qr.createElementNS(fF,e):t==="mathml"?Qr.createElementNS(pF,e):n?Qr.createElement(e,{is:n}):Qr.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>Qr.createTextNode(e),createComment:e=>Qr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const l=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{bw.innerHTML=UA(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const r=bw.content;if(o==="svg"||o==="mathml"){const a=r.firstChild;for(;a.firstChild;)r.appendChild(a.firstChild);r.removeChild(a)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ba="transition",wd="animation",bu=Symbol("_vtc"),ZA={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},KA=xo({},cA,ZA),mF=e=>(e.displayName="Transition",e.props=KA,e),qi=mF((e,{slots:t})=>vn(uP,GA(e),t)),e0=(e,t=[])=>{rn(e)?e.forEach(n=>n(...t)):e&&e(...t)},_w=e=>e?rn(e)?e.some(t=>t.length>1):e.length>1:!1;function GA(e){const t={};for(const C in e)C in ZA||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:c=l,appearToClass:u=r,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=gF(s),m=h&&h[0],k=h&&h[1],{onBeforeEnter:x,onEnter:y,onEnterCancelled:w,onLeave:_,onLeaveCancelled:A,onBeforeAppear:P=x,onAppear:z=y,onAppearCancelled:L=w}=t,E=(C,j,H,D)=>{C._enterCancelled=D,qa(C,j?u:r),qa(C,j?c:l),H&&H()},T=(C,j)=>{C._isLeaving=!1,qa(C,d),qa(C,p),qa(C,f),j&&j()},$=C=>(j,H)=>{const D=C?z:y,M=()=>E(j,C,H);e0(D,[j,M]),xw(()=>{qa(j,C?a:i),_r(j,C?u:r),_w(D)||Sw(j,o,m,M)})};return xo(t,{onBeforeEnter(C){e0(x,[C]),_r(C,i),_r(C,l)},onBeforeAppear(C){e0(P,[C]),_r(C,a),_r(C,c)},onEnter:$(!1),onAppear:$(!0),onLeave(C,j){C._isLeaving=!0;const H=()=>T(C,j);_r(C,d),C._enterCancelled?(_r(C,f),w8(C)):(w8(C),_r(C,f)),xw(()=>{C._isLeaving&&(qa(C,d),_r(C,p),_w(_)||Sw(C,o,k,H))}),e0(_,[C,H])},onEnterCancelled(C){E(C,!1,void 0,!0),e0(w,[C])},onAppearCancelled(C){E(C,!0,void 0,!0),e0(L,[C])},onLeaveCancelled(C){T(C),e0(A,[C])}})}function gF(e){if(e==null)return null;if(po(e))return[fh(e.enter),fh(e.leave)];{const t=fh(e);return[t,t]}}function fh(e){return j4(e)}function _r(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[bu]||(e[bu]=new Set)).add(t)}function qa(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[bu];n&&(n.delete(t),n.size||(e[bu]=void 0))}function xw(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vF=0;function Sw(e,t,n,o){const s=e._endId=++vF,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:l,timeout:r,propCount:a}=YA(e,t);if(!l)return o();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[h]||"").split(", "),s=o(`${Ba}Delay`),i=o(`${Ba}Duration`),l=Cw(s,i),r=o(`${wd}Delay`),a=o(`${wd}Duration`),c=Cw(r,a);let u=null,d=0,f=0;t===Ba?l>0&&(u=Ba,d=l,f=i.length):t===wd?c>0&&(u=wd,d=c,f=a.length):(d=Math.max(l,c),u=d>0?l>c?Ba:wd:null,f=u?u===Ba?i.length:a.length:0);const p=u===Ba&&/\b(?:transform|all)(?:,|$)/.test(o(`${Ba}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Cw(e,t){for(;e.lengthMw(n)+Mw(e[o])))}function Mw(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function w8(e){return(e?e.ownerDocument:document).body.offsetHeight}function yF(e,t,n){const o=e[bu];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Q4=Symbol("_vod"),XA=Symbol("_vsh"),_i={name:"show",beforeMount(e,{value:t},{transition:n}){e[Q4]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):kd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),kd(e,!0),o.enter(e)):o.leave(e,()=>{kd(e,!1)}):kd(e,t))},beforeUnmount(e,{value:t}){kd(e,t)}};function kd(e,t){e.style.display=t?e[Q4]:"none",e[XA]=!t}function wF(){_i.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const JA=Symbol("");function pKe(e){const t=Ts();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>e5(i,s))},o=()=>{const s=e(t.proxy);t.ce?e5(t.ce,s):k8(t.subTree,s),n(s)};hA(()=>{W4(o)}),In(()=>{Ke(o,Ol,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),En(()=>s.disconnect())})}function k8(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{k8(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)e5(e.el,t);else if(e.type===Ce)e.children.forEach(n=>k8(n,t));else if(e.type===lu){let{el:n,anchor:o}=e;for(;n&&(e5(n,t),n!==o);)n=n.nextSibling}}function e5(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=wR(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[JA]=o}}const kF=/(?:^|;)\s*display\s*:/;function bF(e,t,n){const o=e.style,s=To(n);let i=!1;if(n&&!s){if(t)if(To(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();n[r]==null&&Vd(o,r,"")}else for(const l in t)n[l]==null&&Vd(o,l,"");for(const l in n){l==="display"&&(i=!0);const r=n[l];r!=null?xF(e,l,!To(t)&&t?t[l]:void 0,r)||Vd(o,l,r):Vd(o,l,"")}}else if(s){if(t!==n){const l=o[JA];l&&(n+=";"+l),o.cssText=n,i=kF.test(n)}}else t&&e.removeAttribute("style");Q4 in e&&(e[Q4]=i?o.display:"",e[XA]&&(o.display="none"))}const Aw=/\s*!important$/;function Vd(e,t,n){if(rn(n))n.forEach(o=>Vd(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=_F(e,t);Aw.test(n)?e.setProperty(Wi(o),n.replace(Aw,""),"important"):e[o]=n}}const Tw=["Webkit","Moz","ms"],ph={};function _F(e,t){const n=ph[t];if(n)return n;let o=Fs(t);if(o!=="filter"&&o in e)return ph[t]=o;o=mp(o);for(let s=0;shh||(AF.then(()=>hh=0),hh=Date.now());function EF(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(rn(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const l=s.slice(),r=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,IF=(e,t,n,o,s,i)=>{const l=s==="svg";t==="class"?yF(e,o,l):t==="style"?bF(e,n,o):ff(t)?dp(t)||CF(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):LF(e,t,o,l))?(Lw(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Iw(e,t,o,l,i,t!=="value")):e._isVueCE&&($F(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!To(o)))?Lw(e,Fs(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Iw(e,t,o,l))};function LF(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&zw(t)&&_n(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return zw(t)&&To(n)?!1:t in e}function $F(e,t){const n=e._def.props;if(!n)return!1;const o=Fs(t);return Array.isArray(n)?n.some(s=>Fs(s)===o):Object.keys(n).some(s=>Fs(s)===o)}const Bw={};function NF(e,t,n){let o=Je(e,t);fp(o)&&(o=xo({},o,t));class s extends Mg{constructor(l){super(o,l,n)}}return s.def=o,s}const hKe=((e,t)=>NF(e,t,YF)),zF=typeof HTMLElement<"u"?HTMLElement:class{};class Mg extends zF{constructor(t,n={},o=o5){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==o5?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(xo({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Mg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,yt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:l}=o;let r;if(i&&!rn(i))for(const a in i){const c=i[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=j4(this._props[a])),(r||(r=Object.create(null)))[Fs(a)]=!0)}this._numberProps=r,this._resolveProps(o),this.shadowRoot&&this._applyStyles(l),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)fo(this,o)||Object.defineProperty(this,o,{get:()=>v(n[o])})}_resolveProps(t){const{props:n}=t,o=rn(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(Fs))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):Bw;const s=Fs(t);n&&this._numberProps&&this._numberProps[s]&&(o=j4(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===Bw?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(Wi(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Wi(t),n+""):n||this.removeAttribute(Wi(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),GF(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=W(this._def,xo(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,l)=>{this.dispatchEvent(new CustomEvent(i,fp(l[0])?xo({detail:l},l[0]):{detail:l}))};o.emit=(i,...l)=>{s(i,l),Wi(i)!==i&&s(Wi(i),l)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,i=this.shadowRoot,l=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let r=null;for(let a=t.length-1;a>=0;a--){const c=document.createElement("style");s&&c.setAttribute("nonce",s),c.textContent=t[a],i.insertBefore(c,r||l),r=c,a===0&&(o||this._styleAnchors.set(this._def,c),n&&this._styleAnchors.set(n,c))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),PF=RF({name:"TransitionGroup",props:xo({},KA,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ts(),o=aA();let s,i;return gg(()=>{if(!s.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!DF(s[0].el,n.vnode.el,l)){s=[];return}s.forEach(jF),s.forEach(OF);const r=s.filter(HF);w8(n.vnode.el),r.forEach(a=>{const c=a.el,u=c.style;_r(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[t5]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[t5]=null,qa(c,l))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const l=so(e),r=GA(l);let a=l.tag||Ce;if(s=[],i)for(let c=0;c{r.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(r=>r&&o.classList.add(r)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:l}=YA(o);return i.removeChild(o),l}const v1=e=>{const t=e.props["onUpdate:modelValue"]||!1;return rn(t)?n=>nu(t,n):t};function VF(e){e.target.composing=!0}function Pw(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Hl=Symbol("_assign");function Fw(e,t,n){return t&&(e=e.trim()),n&&(e=gp(e)),e}const js={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[Hl]=v1(s);const i=o||s.props&&s.props.type==="number";aa(e,t?"change":"input",l=>{l.target.composing||e[Hl](Fw(e.value,n,i))}),(n||i)&&aa(e,"change",()=>{e.value=Fw(e.value,n,i)}),t||(aa(e,"compositionstart",VF),aa(e,"compositionend",Pw),aa(e,"change",Pw))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},l){if(e[Hl]=v1(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?gp(e.value):e.value,a=t??"";if(r===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},n5={deep:!0,created(e,t,n){e[Hl]=v1(n),aa(e,"change",()=>{const o=e._modelValue,s=_u(e),i=e.checked,l=e[Hl];if(rn(o)){const r=yp(o,s),a=r!==-1;if(i&&!a)l(o.concat(s));else if(!i&&a){const c=[...o];c.splice(r,1),l(c)}}else if(U0(o)){const r=new Set(o);i?r.add(s):r.delete(s),l(r)}else l(oT(e,i))})},mounted:jw,beforeUpdate(e,t,n){e[Hl]=v1(n),jw(e,t,n)}};function jw(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(rn(t))s=yp(t,o.props.value)>-1;else if(U0(t))s=t.has(o.props.value);else{if(t===n)return;s=ma(t,oT(e,!0))}e.checked!==s&&(e.checked=s)}const nT={created(e,{value:t},n){e.checked=ma(t,n.props.value),e[Hl]=v1(n),aa(e,"change",()=>{e[Hl](_u(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Hl]=v1(o),t!==n&&(e.checked=ma(t,o.props.value))}},b8={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=U0(t);aa(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?gp(_u(l)):_u(l));e[Hl](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,yt(()=>{e._assigning=!1})}),e[Hl]=v1(o)},mounted(e,{value:t}){Ow(e,t)},beforeUpdate(e,t,n){e[Hl]=v1(n)},updated(e,{value:t}){e._assigning||Ow(e,t)}};function Ow(e,t){const n=e.multiple,o=rn(t);if(!(n&&!o&&!U0(t))){for(let s=0,i=e.options.length;sString(c)===String(r)):l.selected=yp(t,r)>-1}else l.selected=t.has(r);else if(ma(_u(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function _u(e){return"_value"in e?e._value:e.value}function oT(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const WF={created(e,t,n){f3(e,t,n,null,"created")},mounted(e,t,n){f3(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){f3(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){f3(e,t,n,o,"updated")}};function sT(e,t){switch(e){case"SELECT":return b8;case"TEXTAREA":return js;default:switch(t){case"checkbox":return n5;case"radio":return nT;default:return js}}}function f3(e,t,n,o,s){const l=sT(e.tagName,n.props&&n.props.type)[s];l&&l(e,t,n,o)}function qF(){js.getSSRProps=({value:e})=>({value:e}),nT.getSSRProps=({value:e},t)=>{if(t.props&&ma(t.props.value,e))return{checked:!0}},n5.getSSRProps=({value:e},t)=>{if(rn(e)){if(t.props&&yp(e,t.props.value)>-1)return{checked:!0}}else if(U0(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},WF.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=sT(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const UF=["ctrl","shift","alt","meta"],ZF={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>UF.some(n=>e[`${n}Key`]&&!t.includes(n))},xt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=Wi(s.key);if(t.some(l=>l===i||KF[l]===i))return e(s)}))},iT=xo({patchProp:IF},hF);let r2,Hw=!1;function lT(){return r2||(r2=KP(iT))}function rT(){return r2=Hw?r2:GP(iT),Hw=!0,r2}const GF=((...e)=>{lT().render(...e)}),vKe=((...e)=>{rT().hydrate(...e)}),o5=((...e)=>{const t=lT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=cT(o);if(!s)return;const i=t._component;!_n(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const l=n(s,!1,aT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),l},t}),YF=((...e)=>{const t=rT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=cT(o);if(s)return n(s,!0,aT(s))},t});function aT(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function cT(e){return To(e)?document.querySelector(e):e}let Dw=!1;const yKe=()=>{Dw||(Dw=!0,qF(),wF())};/*! +**/let w8;const bw=typeof window<"u"&&window.trustedTypes;if(bw)try{w8=bw.createPolicy("vue",{createHTML:e=>e})}catch{}const ZA=w8?e=>w8.createHTML(e):e=>e,pF="http://www.w3.org/2000/svg",hF="http://www.w3.org/1998/Math/MathML",Qr=typeof document<"u"?document:null,_w=Qr&&Qr.createElement("template"),mF={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?Qr.createElementNS(pF,e):t==="mathml"?Qr.createElementNS(hF,e):n?Qr.createElement(e,{is:n}):Qr.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>Qr.createTextNode(e),createComment:e=>Qr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const l=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{_w.innerHTML=ZA(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const r=_w.content;if(o==="svg"||o==="mathml"){const a=r.firstChild;for(;a.firstChild;)r.appendChild(a.firstChild);r.removeChild(a)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ba="transition",wd="animation",bu=Symbol("_vtc"),KA={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},GA=xo({},uA,KA),gF=e=>(e.displayName="Transition",e.props=GA,e),qi=gF((e,{slots:t})=>vn(dP,YA(e),t)),e0=(e,t=[])=>{rn(e)?e.forEach(n=>n(...t)):e&&e(...t)},xw=e=>e?rn(e)?e.some(t=>t.length>1):e.length>1:!1;function YA(e){const t={};for(const C in e)C in KA||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:c=l,appearToClass:u=r,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=vF(s),m=h&&h[0],k=h&&h[1],{onBeforeEnter:x,onEnter:y,onEnterCancelled:w,onLeave:_,onLeaveCancelled:A,onBeforeAppear:P=x,onAppear:z=y,onAppearCancelled:L=w}=t,T=(C,F,H,D)=>{C._enterCancelled=D,qa(C,F?u:r),qa(C,F?c:l),H&&H()},I=(C,F)=>{C._isLeaving=!1,qa(C,d),qa(C,p),qa(C,f),F&&F()},N=C=>(F,H)=>{const D=C?z:y,M=()=>T(F,C,H);e0(D,[F,M]),Sw(()=>{qa(F,C?a:i),_r(F,C?u:r),xw(D)||Cw(F,o,m,M)})};return xo(t,{onBeforeEnter(C){e0(x,[C]),_r(C,i),_r(C,l)},onBeforeAppear(C){e0(P,[C]),_r(C,a),_r(C,c)},onEnter:N(!1),onAppear:N(!0),onLeave(C,F){C._isLeaving=!0;const H=()=>I(C,F);_r(C,d),C._enterCancelled?(_r(C,f),k8(C)):(k8(C),_r(C,f)),Sw(()=>{C._isLeaving&&(qa(C,d),_r(C,p),xw(_)||Cw(C,o,k,H))}),e0(_,[C,H])},onEnterCancelled(C){T(C,!1,void 0,!0),e0(w,[C])},onAppearCancelled(C){T(C,!0,void 0,!0),e0(L,[C])},onLeaveCancelled(C){I(C),e0(A,[C])}})}function vF(e){if(e==null)return null;if(po(e))return[fh(e.enter),fh(e.leave)];{const t=fh(e);return[t,t]}}function fh(e){return j4(e)}function _r(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[bu]||(e[bu]=new Set)).add(t)}function qa(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[bu];n&&(n.delete(t),n.size||(e[bu]=void 0))}function Sw(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let yF=0;function Cw(e,t,n,o){const s=e._endId=++yF,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:l,timeout:r,propCount:a}=XA(e,t);if(!l)return o();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[h]||"").split(", "),s=o(`${Ba}Delay`),i=o(`${Ba}Duration`),l=Mw(s,i),r=o(`${wd}Delay`),a=o(`${wd}Duration`),c=Mw(r,a);let u=null,d=0,f=0;t===Ba?l>0&&(u=Ba,d=l,f=i.length):t===wd?c>0&&(u=wd,d=c,f=a.length):(d=Math.max(l,c),u=d>0?l>c?Ba:wd:null,f=u?u===Ba?i.length:a.length:0);const p=u===Ba&&/\b(?:transform|all)(?:,|$)/.test(o(`${Ba}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Mw(e,t){for(;e.lengthAw(n)+Aw(e[o])))}function Aw(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function k8(e){return(e?e.ownerDocument:document).body.offsetHeight}function wF(e,t,n){const o=e[bu];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Q4=Symbol("_vod"),JA=Symbol("_vsh"),_i={name:"show",beforeMount(e,{value:t},{transition:n}){e[Q4]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):kd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),kd(e,!0),o.enter(e)):o.leave(e,()=>{kd(e,!1)}):kd(e,t))},beforeUnmount(e,{value:t}){kd(e,t)}};function kd(e,t){e.style.display=t?e[Q4]:"none",e[JA]=!t}function kF(){_i.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const QA=Symbol("");function pKe(e){const t=Ts();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>e5(i,s))},o=()=>{const s=e(t.proxy);t.ce?e5(t.ce,s):b8(t.subTree,s),n(s)};mA(()=>{W4(o)}),In(()=>{Ke(o,Ol,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),En(()=>s.disconnect())})}function b8(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{b8(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)e5(e.el,t);else if(e.type===Ce)e.children.forEach(n=>b8(n,t));else if(e.type===lu){let{el:n,anchor:o}=e;for(;n&&(e5(n,t),n!==o);)n=n.nextSibling}}function e5(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=kR(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[QA]=o}}const bF=/(?:^|;)\s*display\s*:/;function _F(e,t,n){const o=e.style,s=To(n);let i=!1;if(n&&!s){if(t)if(To(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();n[r]==null&&Vd(o,r,"")}else for(const l in t)n[l]==null&&Vd(o,l,"");for(const l in n){l==="display"&&(i=!0);const r=n[l];r!=null?SF(e,l,!To(t)&&t?t[l]:void 0,r)||Vd(o,l,r):Vd(o,l,"")}}else if(s){if(t!==n){const l=o[QA];l&&(n+=";"+l),o.cssText=n,i=bF.test(n)}}else t&&e.removeAttribute("style");Q4 in e&&(e[Q4]=i?o.display:"",e[JA]&&(o.display="none"))}const Tw=/\s*!important$/;function Vd(e,t,n){if(rn(n))n.forEach(o=>Vd(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=xF(e,t);Tw.test(n)?e.setProperty(Wi(o),n.replace(Tw,""),"important"):e[o]=n}}const Ew=["Webkit","Moz","ms"],ph={};function xF(e,t){const n=ph[t];if(n)return n;let o=Fs(t);if(o!=="filter"&&o in e)return ph[t]=o;o=mp(o);for(let s=0;shh||(TF.then(()=>hh=0),hh=Date.now());function IF(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(rn(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const l=s.slice(),r=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,LF=(e,t,n,o,s,i)=>{const l=s==="svg";t==="class"?wF(e,o,l):t==="style"?_F(e,n,o):ff(t)?dp(t)||MF(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$F(e,t,o,l))?($w(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Lw(e,t,o,l,i,t!=="value")):e._isVueCE&&(NF(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!To(o)))?$w(e,Fs(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Lw(e,t,o,l))};function $F(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bw(t)&&_n(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Bw(t)&&To(n)?!1:t in e}function NF(e,t){const n=e._def.props;if(!n)return!1;const o=Fs(t);return Array.isArray(n)?n.some(s=>Fs(s)===o):Object.keys(n).some(s=>Fs(s)===o)}const Rw={};function zF(e,t,n){let o=Je(e,t);fp(o)&&(o=xo({},o,t));class s extends Ag{constructor(l){super(o,l,n)}}return s.def=o,s}const hKe=((e,t)=>zF(e,t,XF)),BF=typeof HTMLElement<"u"?HTMLElement:class{};class Ag extends BF{constructor(t,n={},o=o5){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==o5?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(xo({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Ag){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,yt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:l}=o;let r;if(i&&!rn(i))for(const a in i){const c=i[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=j4(this._props[a])),(r||(r=Object.create(null)))[Fs(a)]=!0)}this._numberProps=r,this._resolveProps(o),this.shadowRoot&&this._applyStyles(l),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)fo(this,o)||Object.defineProperty(this,o,{get:()=>v(n[o])})}_resolveProps(t){const{props:n}=t,o=rn(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(Fs))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):Rw;const s=Fs(t);n&&this._numberProps&&this._numberProps[s]&&(o=j4(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===Rw?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(Wi(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Wi(t),n+""):n||this.removeAttribute(Wi(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),YF(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=W(this._def,xo(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,l)=>{this.dispatchEvent(new CustomEvent(i,fp(l[0])?xo({detail:l},l[0]):{detail:l}))};o.emit=(i,...l)=>{s(i,l),Wi(i)!==i&&s(Wi(i),l)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,i=this.shadowRoot,l=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let r=null;for(let a=t.length-1;a>=0;a--){const c=document.createElement("style");s&&c.setAttribute("nonce",s),c.textContent=t[a],i.insertBefore(c,r||l),r=c,a===0&&(o||this._styleAnchors.set(this._def,c),n&&this._styleAnchors.set(n,c))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),FF=PF({name:"TransitionGroup",props:xo({},GA,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ts(),o=cA();let s,i;return vg(()=>{if(!s.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!VF(s[0].el,n.vnode.el,l)){s=[];return}s.forEach(OF),s.forEach(HF);const r=s.filter(DF);k8(n.vnode.el),r.forEach(a=>{const c=a.el,u=c.style;_r(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[t5]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[t5]=null,qa(c,l))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const l=so(e),r=YA(l);let a=l.tag||Ce;if(s=[],i)for(let c=0;c{r.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(r=>r&&o.classList.add(r)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:l}=XA(o);return i.removeChild(o),l}const v1=e=>{const t=e.props["onUpdate:modelValue"]||!1;return rn(t)?n=>nu(t,n):t};function WF(e){e.target.composing=!0}function Fw(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Hl=Symbol("_assign");function jw(e,t,n){return t&&(e=e.trim()),n&&(e=gp(e)),e}const js={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[Hl]=v1(s);const i=o||s.props&&s.props.type==="number";aa(e,t?"change":"input",l=>{l.target.composing||e[Hl](jw(e.value,n,i))}),(n||i)&&aa(e,"change",()=>{e.value=jw(e.value,n,i)}),t||(aa(e,"compositionstart",WF),aa(e,"compositionend",Fw),aa(e,"change",Fw))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},l){if(e[Hl]=v1(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?gp(e.value):e.value,a=t??"";if(r===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},n5={deep:!0,created(e,t,n){e[Hl]=v1(n),aa(e,"change",()=>{const o=e._modelValue,s=_u(e),i=e.checked,l=e[Hl];if(rn(o)){const r=yp(o,s),a=r!==-1;if(i&&!a)l(o.concat(s));else if(!i&&a){const c=[...o];c.splice(r,1),l(c)}}else if(U0(o)){const r=new Set(o);i?r.add(s):r.delete(s),l(r)}else l(sT(e,i))})},mounted:Ow,beforeUpdate(e,t,n){e[Hl]=v1(n),Ow(e,t,n)}};function Ow(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(rn(t))s=yp(t,o.props.value)>-1;else if(U0(t))s=t.has(o.props.value);else{if(t===n)return;s=ma(t,sT(e,!0))}e.checked!==s&&(e.checked=s)}const oT={created(e,{value:t},n){e.checked=ma(t,n.props.value),e[Hl]=v1(n),aa(e,"change",()=>{e[Hl](_u(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Hl]=v1(o),t!==n&&(e.checked=ma(t,o.props.value))}},_8={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=U0(t);aa(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?gp(_u(l)):_u(l));e[Hl](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,yt(()=>{e._assigning=!1})}),e[Hl]=v1(o)},mounted(e,{value:t}){Hw(e,t)},beforeUpdate(e,t,n){e[Hl]=v1(n)},updated(e,{value:t}){e._assigning||Hw(e,t)}};function Hw(e,t){const n=e.multiple,o=rn(t);if(!(n&&!o&&!U0(t))){for(let s=0,i=e.options.length;sString(c)===String(r)):l.selected=yp(t,r)>-1}else l.selected=t.has(r);else if(ma(_u(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function _u(e){return"_value"in e?e._value:e.value}function sT(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const qF={created(e,t,n){f3(e,t,n,null,"created")},mounted(e,t,n){f3(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){f3(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){f3(e,t,n,o,"updated")}};function iT(e,t){switch(e){case"SELECT":return _8;case"TEXTAREA":return js;default:switch(t){case"checkbox":return n5;case"radio":return oT;default:return js}}}function f3(e,t,n,o,s){const l=iT(e.tagName,n.props&&n.props.type)[s];l&&l(e,t,n,o)}function UF(){js.getSSRProps=({value:e})=>({value:e}),oT.getSSRProps=({value:e},t)=>{if(t.props&&ma(t.props.value,e))return{checked:!0}},n5.getSSRProps=({value:e},t)=>{if(rn(e)){if(t.props&&yp(e,t.props.value)>-1)return{checked:!0}}else if(U0(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},qF.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=iT(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const ZF=["ctrl","shift","alt","meta"],KF={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ZF.some(n=>e[`${n}Key`]&&!t.includes(n))},xt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=Wi(s.key);if(t.some(l=>l===i||GF[l]===i))return e(s)}))},lT=xo({patchProp:LF},mF);let r2,Dw=!1;function rT(){return r2||(r2=GP(lT))}function aT(){return r2=Dw?r2:YP(lT),Dw=!0,r2}const YF=((...e)=>{rT().render(...e)}),vKe=((...e)=>{aT().hydrate(...e)}),o5=((...e)=>{const t=rT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=uT(o);if(!s)return;const i=t._component;!_n(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const l=n(s,!1,cT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),l},t}),XF=((...e)=>{const t=aT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=uT(o);if(s)return n(s,!0,cT(s))},t});function cT(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function uT(e){return To(e)?document.querySelector(e):e}let Vw=!1;const yKe=()=>{Vw||(Vw=!0,UF(),kF())};/*! * shared v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */const s5=typeof window<"u",C1=(e,t=!1)=>t?Symbol.for(e):Symbol(e),XF=(e,t,n)=>JF({l:e,k:t,s:n}),JF=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ss=e=>typeof e=="number"&&isFinite(e),uT=e=>Tg(e)==="[object Date]",xu=e=>Tg(e)==="[object RegExp]",Ag=e=>bo(e)&&Object.keys(e).length===0,Ms=Object.assign,QF=Object.create,Ao=(e=null)=>QF(e);let Vw;const b0=()=>Vw||(Vw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ao()),ej=Object.prototype.hasOwnProperty;function Pl(e,t){return ej.call(e,t)}const os=Array.isArray,jo=e=>typeof e=="function",Xt=e=>typeof e=="string",ao=e=>typeof e=="boolean",co=e=>e!==null&&typeof e=="object",tj=e=>co(e)&&jo(e.then)&&jo(e.catch),dT=Object.prototype.toString,Tg=e=>dT.call(e),bo=e=>Tg(e)==="[object Object]",nj=e=>e==null?"":os(e)||bo(e)&&e.toString===dT?JSON.stringify(e,null,2):String(e);function Eg(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}function oj(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function Ww(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function sj(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const ij=/^javascript:/i,lj=/^(?:href|src|action|formaction)$/i,rj=/&#(?:x([0-9a-f]+)|(\d+));?/gi,aj=/&(?:Tab|NewLine);/g,cj=/:?/gi,uj=/[\u0000-\u0020\u007f-\u009f]/g,dj=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,fj=/(^|[\s"'<>/])on(\w+\s*=)/gi,pj=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function hj(e,t,n){const o=t||n;if(!o)return e;const s=Number.parseInt(o,t?16:10);return s<=127?String.fromCharCode(s):e}function Ig(e){const t=e.replace(rj,hj).replace(aj,"").replace(cj,":").replace(uj,"");return ij.test(t)}function mj(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const i=s.index,l=t.lastIndex-1;let r=l+1,a=1,c=null;for(;r`${n}="${qw(n,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,o)=>`${n}='${qw(n,o)}'`),dj.test(e)&&(e=e.replace(fj,"$1on$2")),e=e.replace(pj,(t,n,o,s)=>Ig(s)?`${n}${o}about:blank`:t),e}const p3=e=>!co(e)||os(e);function u4(e,t){if(p3(e)||p3(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(co(o[i])&&!co(s[i])&&(s[i]=Array.isArray(o[i])?[]:Ao()),p3(s[i])||p3(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! + */const s5=typeof window<"u",C1=(e,t=!1)=>t?Symbol.for(e):Symbol(e),JF=(e,t,n)=>QF({l:e,k:t,s:n}),QF=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ss=e=>typeof e=="number"&&isFinite(e),dT=e=>Eg(e)==="[object Date]",xu=e=>Eg(e)==="[object RegExp]",Tg=e=>bo(e)&&Object.keys(e).length===0,Ms=Object.assign,ej=Object.create,Ao=(e=null)=>ej(e);let Ww;const b0=()=>Ww||(Ww=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ao()),tj=Object.prototype.hasOwnProperty;function Pl(e,t){return tj.call(e,t)}const os=Array.isArray,jo=e=>typeof e=="function",Xt=e=>typeof e=="string",ao=e=>typeof e=="boolean",co=e=>e!==null&&typeof e=="object",nj=e=>co(e)&&jo(e.then)&&jo(e.catch),fT=Object.prototype.toString,Eg=e=>fT.call(e),bo=e=>Eg(e)==="[object Object]",oj=e=>e==null?"":os(e)||bo(e)&&e.toString===fT?JSON.stringify(e,null,2):String(e);function Ig(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}function sj(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function qw(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function ij(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const lj=/^javascript:/i,rj=/^(?:href|src|action|formaction)$/i,aj=/&#(?:x([0-9a-f]+)|(\d+));?/gi,cj=/&(?:Tab|NewLine);/g,uj=/:?/gi,dj=/[\u0000-\u0020\u007f-\u009f]/g,fj=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,pj=/(^|[\s"'<>/])on(\w+\s*=)/gi,hj=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function mj(e,t,n){const o=t||n;if(!o)return e;const s=Number.parseInt(o,t?16:10);return s<=127?String.fromCharCode(s):e}function Lg(e){const t=e.replace(aj,mj).replace(cj,"").replace(uj,":").replace(dj,"");return lj.test(t)}function gj(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const i=s.index,l=t.lastIndex-1;let r=l+1,a=1,c=null;for(;r`${n}="${Uw(n,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,o)=>`${n}='${Uw(n,o)}'`),fj.test(e)&&(e=e.replace(pj,"$1on$2")),e=e.replace(hj,(t,n,o,s)=>Lg(s)?`${n}${o}about:blank`:t),e}const p3=e=>!co(e)||os(e);function u4(e,t){if(p3(e)||p3(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(co(o[i])&&!co(s[i])&&(s[i]=Array.isArray(o[i])?[]:Ao()),p3(s[i])||p3(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! * message-compiler v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */function vj(e,t,n){return{line:e,column:t,offset:n}}function _8(e,t,n){return{start:e,end:t}}const mo={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},yj=17;function Tp(e,t,n={}){const{domain:o,messages:s,args:i}=n,l=e,r=new SyntaxError(String(l));return r.code=e,t&&(r.location=t),r.domain=o,r}function wj(e){throw e}const vr=" ",kj="\r",ai=` -`,bj="\u2028",_j="\u2029";function xj(e){const t=e;let n=0,o=1,s=1,i=0;const l=z=>t[z]===kj&&t[z+1]===ai,r=z=>t[z]===ai,a=z=>t[z]===_j,c=z=>t[z]===bj,u=z=>l(z)||r(z)||a(z)||c(z),d=()=>n,f=()=>o,p=()=>s,h=()=>i,m=z=>l(z)||a(z)||c(z)?ai:t[z],k=()=>m(n),x=()=>m(n+i);function y(){return i=0,u(n)&&(o++,s=0),l(n)&&n++,n++,s++,t[n]}function w(){return l(n+i)&&i++,i++,t[n+i]}function _(){n=0,o=1,s=1,i=0}function A(z=0){i=z}function P(){const z=n+i;for(;z!==n;)y();i=0}return{index:d,line:f,column:p,peekOffset:h,charAt:m,currentChar:k,currentPeek:x,next:y,peek:w,reset:_,resetPeek:A,skipToPeek:P}}const Gr=void 0,Sj=".",Uw="'",Cj="tokenizer";function Mj(e,t={}){const n=t.location!==!1,o=xj(e),s=()=>o.index(),i=()=>vj(o.line(),o.column(),o.index()),l=i(),r=s(),a={currentType:13,offset:r,startLoc:l,endLoc:l,lastType:13,lastOffset:r,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},c=()=>a,{onError:u}=t;function d(ie,de,be,...Se){const je=c();if(de.column+=be,de.offset+=be,u){const et=n?_8(je.startLoc,de):null,le=Tp(ie,et,{domain:Cj,args:Se});u(le)}}function f(ie,de,be){ie.endLoc=i(),ie.currentType=de;const Se={type:de};return n&&(Se.loc=_8(ie.startLoc,ie.endLoc)),be!=null&&(Se.value=be),Se}const p=ie=>f(ie,13);function h(ie,de){return ie.currentChar()===de?(ie.next(),de):(d(mo.EXPECTED_TOKEN,i(),0,de),"")}function m(ie){let de="";for(;ie.currentPeek()===vr||ie.currentPeek()===ai;)de+=ie.currentPeek(),ie.peek();return de}function k(ie){const de=m(ie);return ie.skipToPeek(),de}function x(ie){if(ie===Gr)return!1;const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de===95}function y(ie){if(ie===Gr)return!1;const de=ie.charCodeAt(0);return de>=48&&de<=57}function w(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=x(ie.currentPeek());return ie.resetPeek(),Se}function _(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=ie.currentPeek()==="-"?ie.peek():ie.currentPeek(),je=y(Se);return ie.resetPeek(),je}function A(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=ie.currentPeek()===Uw;return ie.resetPeek(),Se}function P(ie,de){const{currentType:be}=de;if(be!==7)return!1;m(ie);const Se=ie.currentPeek()===".";return ie.resetPeek(),Se}function z(ie,de){const{currentType:be}=de;if(be!==8)return!1;m(ie);const Se=x(ie.currentPeek());return ie.resetPeek(),Se}function L(ie,de){const{currentType:be}=de;if(!(be===7||be===11))return!1;m(ie);const Se=ie.currentPeek()===":";return ie.resetPeek(),Se}function E(ie,de){const{currentType:be}=de;if(be!==9)return!1;const Se=()=>{const et=ie.currentPeek();return et==="{"?x(ie.peek()):et==="@"||et==="|"||et===":"||et==="."||et===vr||!et?!1:et===ai?(ie.peek(),Se()):$(ie,!1)},je=Se();return ie.resetPeek(),je}function T(ie){m(ie);const de=ie.currentPeek()==="|";return ie.resetPeek(),de}function $(ie,de=!0){const be=(je=!1,et="")=>{const le=ie.currentPeek();return le==="{"||le==="@"||!le?je:le==="|"?!(et===vr||et===ai):le===vr?(ie.peek(),be(!0,vr)):le===ai?(ie.peek(),be(!0,ai)):!0},Se=be();return de&&ie.resetPeek(),Se}function C(ie,de){const be=ie.currentChar();return be===Gr?Gr:de(be)?(ie.next(),be):null}function j(ie){const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36}function H(ie){return C(ie,j)}function D(ie){const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36||de===45}function M(ie){return C(ie,D)}function R(ie){const de=ie.charCodeAt(0);return de>=48&&de<=57}function O(ie){return C(ie,R)}function U(ie){const de=ie.charCodeAt(0);return de>=48&&de<=57||de>=65&&de<=70||de>=97&&de<=102}function Z(ie){return C(ie,U)}function q(ie){let de="",be="";for(;de=O(ie);)be+=de;return be}function te(ie){let de="";for(;;){const be=ie.currentChar();if(be==="\\"){const Se=ie.peek();Se==="{"||Se==="}"||Se==="@"||Se==="|"||Se==="\\"?(de+=be+Se,ie.next(),ie.next()):(ie.resetPeek(),de+=be,ie.next())}else{if(be==="{"||be==="}"||be==="@"||be==="|"||!be)break;if(be===vr||be===ai)if($(ie))de+=be,ie.next();else{if(T(ie))break;de+=be,ie.next()}else de+=be,ie.next()}}return de}function ee(ie){k(ie);let de="",be="";for(;de=M(ie);)be+=de;const Se=ie.currentChar();if(Se&&Se!=="}"&&Se!==Gr&&Se!==vr&&Se!==ai&&Se!==" "){const je=at(ie);return d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be+je),be+je}return ie.currentChar()===Gr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be}function J(ie){k(ie);let de="";return ie.currentChar()==="-"?(ie.next(),de+=`-${q(ie)}`):de+=q(ie),ie.currentChar()===Gr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de}function se(ie){return ie!==Uw&&ie!==ai}function Q(ie){k(ie),h(ie,"'");let de="",be="";for(;de=C(ie,se);)de==="\\"?be+=me(ie):be+=de;const Se=ie.currentChar();return Se===ai||Se===Gr?(d(mo.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),Se===ai&&(ie.next(),h(ie,"'")),be):(h(ie,"'"),be)}function me(ie){const de=ie.currentChar();switch(de){case"\\":case"'":return ie.next(),`\\${de}`;case"u":return xe(ie,de,4);case"U":return xe(ie,de,6);default:return d(mo.UNKNOWN_ESCAPE_SEQUENCE,i(),0,de),""}}function xe(ie,de,be){h(ie,de);let Se="";for(let je=0;je{const Se=ie.currentChar();return Se==="{"||Se==="@"||Se==="|"||Se==="("||Se===")"||!Se||Se===vr?be:(be+=Se,ie.next(),de(be))};return de("")}function F(ie){k(ie);const de=h(ie,"|");return k(ie),de}function K(ie,de){let be=null;switch(ie.currentChar()){case"{":return de.braceNest>=1&&d(mo.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),ie.next(),be=f(de,2,"{"),k(ie),de.braceNest++,be;case"}":return de.braceNest>0&&de.currentType===2&&d(mo.EMPTY_PLACEHOLDER,i(),0),ie.next(),be=f(de,3,"}"),de.braceNest--,de.braceNest>0&&k(ie),de.inLinked&&de.braceNest===0&&(de.inLinked=!1),be;case"@":return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be=he(ie,de)||p(de),de.braceNest=0,be;default:{let je=!0,et=!0,le=!0;if(T(ie))return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be=f(de,1,F(ie)),de.braceNest=0,de.inLinked=!1,be;if(de.braceNest>0&&(de.currentType===4||de.currentType===5||de.currentType===6))return d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de.braceNest=0,ye(ie,de);if(je=w(ie,de))return be=f(de,4,ee(ie)),k(ie),be;if(et=_(ie,de))return be=f(de,5,J(ie)),k(ie),be;if(le=A(ie,de))return be=f(de,6,Q(ie)),k(ie),be;if(!je&&!et&&!le)return be=f(de,12,at(ie)),d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be.value),k(ie),be;break}}return be}function he(ie,de){const{currentType:be}=de;let Se=null;const je=ie.currentChar();switch((be===7||be===8||be===11||be===9)&&(je===ai||je===vr)&&d(mo.INVALID_LINKED_FORMAT,i(),0),je){case"@":return ie.next(),Se=f(de,7,"@"),de.inLinked=!0,Se;case".":return k(ie),ie.next(),f(de,8,".");case":":return k(ie),ie.next(),f(de,9,":");default:return T(ie)?(Se=f(de,1,F(ie)),de.braceNest=0,de.inLinked=!1,Se):P(ie,de)||L(ie,de)?(k(ie),he(ie,de)):z(ie,de)?(k(ie),f(de,11,X(ie))):E(ie,de)?(k(ie),je==="{"?K(ie,de)||Se:f(de,10,oe(ie))):(be===7&&d(mo.INVALID_LINKED_FORMAT,i(),0),de.braceNest=0,de.inLinked=!1,ye(ie,de))}}function ye(ie,de){let be={type:13};if(de.braceNest>0)return K(ie,de)||p(de);if(de.inLinked)return he(ie,de)||p(de);switch(ie.currentChar()){case"{":return K(ie,de)||p(de);case"}":return d(mo.UNBALANCED_CLOSING_BRACE,i(),0),ie.next(),f(de,3,"}");case"@":return he(ie,de)||p(de);default:{if(T(ie))return be=f(de,1,F(ie)),de.braceNest=0,de.inLinked=!1,be;if($(ie))return f(de,0,te(ie));break}}return be}function ve(){const{currentType:ie,offset:de,startLoc:be,endLoc:Se}=a;return a.lastType=ie,a.lastOffset=de,a.lastStartLoc=be,a.lastEndLoc=Se,a.offset=s(),a.startLoc=i(),o.currentChar()===Gr?f(a,13):ye(o,a)}return{nextToken:ve,currentOffset:s,currentPosition:i,context:c}}const Aj="parser",Tj=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Ej=/\\([\\@{}|])/g;function Ij(e,t){return t}function Lj(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function $j(e={}){const t=e.location!==!1,{onError:n}=e;function o(x,y,w,_,...A){const P=x.currentPosition();if(P.offset+=_,P.column+=_,n){const z=t?_8(w,P):null,L=Tp(y,z,{domain:Aj,args:A});n(L)}}function s(x,y,w){const _={type:x};return t&&(_.start=y,_.end=y,_.loc={start:w,end:w}),_}function i(x,y,w,_){t&&(x.end=y,x.loc&&(x.loc.end=w))}function l(x,y){const w=x.context(),_=s(3,w.offset,w.startLoc);return _.value=y.replace(Ej,Ij),i(_,x.currentOffset(),x.currentPosition()),_}function r(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(5,_,A);return P.index=parseInt(y,10),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function a(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(4,_,A);return P.key=y,x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function c(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(9,_,A);return P.value=y.replace(Tj,Lj),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function u(x){const y=x.nextToken(),w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(8,_,A);return y.type!==11?(o(x,mo.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),P.value="",i(P,_,A),{nextConsumeToken:y,node:P}):(y.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(y)),P.value=y.value||"",i(P,x.currentOffset(),x.currentPosition()),{node:P})}function d(x,y){const w=x.context(),_=s(7,w.offset,w.startLoc);return _.value=y,i(_,x.currentOffset(),x.currentPosition()),_}function f(x){const y=x.context(),w=s(6,y.offset,y.startLoc);let _=x.nextToken();if(_.type===8){const A=u(x);w.modifier=A.node,_=A.nextConsumeToken||x.nextToken()}switch(_.type!==9&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),_=x.nextToken(),_.type===2&&(_=x.nextToken()),_.type){case 10:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=d(x,_.value||"");break;case 4:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=a(x,_.value||"");break;case 5:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=r(x,_.value||"");break;case 6:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=c(x,_.value||"");break;default:{o(x,mo.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const A=x.context(),P=s(7,A.offset,A.startLoc);return P.value="",i(P,A.offset,A.startLoc),w.key=P,i(w,A.offset,A.startLoc),{nextConsumeToken:_,node:w}}}return i(w,x.currentOffset(),x.currentPosition()),{node:w}}function p(x){const y=x.context(),w=y.currentType===1?x.currentOffset():y.offset,_=y.currentType===1?y.endLoc:y.startLoc,A=s(2,w,_);A.items=[];let P=null;do{const E=P||x.nextToken();switch(P=null,E.type){case 0:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(l(x,E.value||""));break;case 5:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(r(x,E.value||""));break;case 4:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(a(x,E.value||""));break;case 6:E.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(E)),A.items.push(c(x,E.value||""));break;case 7:{const T=f(x);A.items.push(T.node),P=T.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const z=y.currentType===1?y.lastOffset:x.currentOffset(),L=y.currentType===1?y.lastEndLoc:x.currentPosition();return i(A,z,L),A}function h(x,y,w,_){const A=x.context();let P=_.items.length===0;const z=s(1,y,w);z.cases=[],z.cases.push(_);do{const L=p(x);P||(P=L.items.length===0),z.cases.push(L)}while(A.currentType!==13);return P&&o(x,mo.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),i(z,x.currentOffset(),x.currentPosition()),z}function m(x){const y=x.context(),{offset:w,startLoc:_}=y,A=p(x);return y.currentType===13?A:h(x,w,_,A)}function k(x){const y=Mj(x,Ms({},e)),w=y.context(),_=s(0,w.offset,w.startLoc);return t&&_.loc&&(_.loc.source=x),_.body=m(y),e.onCacheKey&&(_.cacheKey=e.onCacheKey(x)),w.currentType!==13&&o(y,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,x[w.offset]||""),i(_,y.currentOffset(),y.currentPosition()),_}return{parse:k}}function yr(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Nj(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function Zw(e,t){for(let n=0;nKw(n)),e}function Kw(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nl;function a(m,k){l.code+=m}function c(m,k=!0){const x=k?o:"";a(s?x+" ".repeat(m):x)}function u(m=!0){const k=++l.indentLevel;m&&c(k)}function d(m=!0){const k=--l.indentLevel;m&&c(k)}function f(){c(l.indentLevel)}return{context:r,push:a,indent:u,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>l.needIndent}}function Pj(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Su(e,t.key),t.modifier?(e.push(", "),Su(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Fj(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let i=0;i{const n=Xt(t.mode)?t.mode:"normal",o=Xt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` -`,i=t.needIndent?t.needIndent:n!=="arrow",l=e.helpers||[],r=Rj(e,{filename:o,breakLineCode:s,needIndent:i});r.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),r.indent(i),l.length>0&&(r.push(`const { ${Eg(l.map(u=>`${u}: _${u}`),", ")} } = ctx`),r.newline()),r.push("return "),Su(r,e),r.deindent(i),r.push("}"),delete e.helpers;const{code:a,map:c}=r.context();return{ast:e,code:a,map:c?c.toJSON():void 0}};function Dj(e,t={}){const n=Ms({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,r=$j(n).parse(e);return o?(i&&Bj(r),s&&Pc(r),{ast:r,code:""}):(zj(r,n),Hj(r,n))}/*! + */function yj(e,t,n){return{line:e,column:t,offset:n}}function x8(e,t,n){return{start:e,end:t}}const mo={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},wj=17;function Tp(e,t,n={}){const{domain:o,messages:s,args:i}=n,l=e,r=new SyntaxError(String(l));return r.code=e,t&&(r.location=t),r.domain=o,r}function kj(e){throw e}const vr=" ",bj="\r",ai=` +`,_j="\u2028",xj="\u2029";function Sj(e){const t=e;let n=0,o=1,s=1,i=0;const l=z=>t[z]===bj&&t[z+1]===ai,r=z=>t[z]===ai,a=z=>t[z]===xj,c=z=>t[z]===_j,u=z=>l(z)||r(z)||a(z)||c(z),d=()=>n,f=()=>o,p=()=>s,h=()=>i,m=z=>l(z)||a(z)||c(z)?ai:t[z],k=()=>m(n),x=()=>m(n+i);function y(){return i=0,u(n)&&(o++,s=0),l(n)&&n++,n++,s++,t[n]}function w(){return l(n+i)&&i++,i++,t[n+i]}function _(){n=0,o=1,s=1,i=0}function A(z=0){i=z}function P(){const z=n+i;for(;z!==n;)y();i=0}return{index:d,line:f,column:p,peekOffset:h,charAt:m,currentChar:k,currentPeek:x,next:y,peek:w,reset:_,resetPeek:A,skipToPeek:P}}const Gr=void 0,Cj=".",Zw="'",Mj="tokenizer";function Aj(e,t={}){const n=t.location!==!1,o=Sj(e),s=()=>o.index(),i=()=>yj(o.line(),o.column(),o.index()),l=i(),r=s(),a={currentType:13,offset:r,startLoc:l,endLoc:l,lastType:13,lastOffset:r,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},c=()=>a,{onError:u}=t;function d(ie,de,be,...Se){const je=c();if(de.column+=be,de.offset+=be,u){const et=n?x8(je.startLoc,de):null,le=Tp(ie,et,{domain:Mj,args:Se});u(le)}}function f(ie,de,be){ie.endLoc=i(),ie.currentType=de;const Se={type:de};return n&&(Se.loc=x8(ie.startLoc,ie.endLoc)),be!=null&&(Se.value=be),Se}const p=ie=>f(ie,13);function h(ie,de){return ie.currentChar()===de?(ie.next(),de):(d(mo.EXPECTED_TOKEN,i(),0,de),"")}function m(ie){let de="";for(;ie.currentPeek()===vr||ie.currentPeek()===ai;)de+=ie.currentPeek(),ie.peek();return de}function k(ie){const de=m(ie);return ie.skipToPeek(),de}function x(ie){if(ie===Gr)return!1;const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de===95}function y(ie){if(ie===Gr)return!1;const de=ie.charCodeAt(0);return de>=48&&de<=57}function w(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=x(ie.currentPeek());return ie.resetPeek(),Se}function _(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=ie.currentPeek()==="-"?ie.peek():ie.currentPeek(),je=y(Se);return ie.resetPeek(),je}function A(ie,de){const{currentType:be}=de;if(be!==2)return!1;m(ie);const Se=ie.currentPeek()===Zw;return ie.resetPeek(),Se}function P(ie,de){const{currentType:be}=de;if(be!==7)return!1;m(ie);const Se=ie.currentPeek()===".";return ie.resetPeek(),Se}function z(ie,de){const{currentType:be}=de;if(be!==8)return!1;m(ie);const Se=x(ie.currentPeek());return ie.resetPeek(),Se}function L(ie,de){const{currentType:be}=de;if(!(be===7||be===11))return!1;m(ie);const Se=ie.currentPeek()===":";return ie.resetPeek(),Se}function T(ie,de){const{currentType:be}=de;if(be!==9)return!1;const Se=()=>{const et=ie.currentPeek();return et==="{"?x(ie.peek()):et==="@"||et==="|"||et===":"||et==="."||et===vr||!et?!1:et===ai?(ie.peek(),Se()):N(ie,!1)},je=Se();return ie.resetPeek(),je}function I(ie){m(ie);const de=ie.currentPeek()==="|";return ie.resetPeek(),de}function N(ie,de=!0){const be=(je=!1,et="")=>{const le=ie.currentPeek();return le==="{"||le==="@"||!le?je:le==="|"?!(et===vr||et===ai):le===vr?(ie.peek(),be(!0,vr)):le===ai?(ie.peek(),be(!0,ai)):!0},Se=be();return de&&ie.resetPeek(),Se}function C(ie,de){const be=ie.currentChar();return be===Gr?Gr:de(be)?(ie.next(),be):null}function F(ie){const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36}function H(ie){return C(ie,F)}function D(ie){const de=ie.charCodeAt(0);return de>=97&&de<=122||de>=65&&de<=90||de>=48&&de<=57||de===95||de===36||de===45}function M(ie){return C(ie,D)}function R(ie){const de=ie.charCodeAt(0);return de>=48&&de<=57}function O(ie){return C(ie,R)}function U(ie){const de=ie.charCodeAt(0);return de>=48&&de<=57||de>=65&&de<=70||de>=97&&de<=102}function Z(ie){return C(ie,U)}function q(ie){let de="",be="";for(;de=O(ie);)be+=de;return be}function te(ie){let de="";for(;;){const be=ie.currentChar();if(be==="\\"){const Se=ie.peek();Se==="{"||Se==="}"||Se==="@"||Se==="|"||Se==="\\"?(de+=be+Se,ie.next(),ie.next()):(ie.resetPeek(),de+=be,ie.next())}else{if(be==="{"||be==="}"||be==="@"||be==="|"||!be)break;if(be===vr||be===ai)if(N(ie))de+=be,ie.next();else{if(I(ie))break;de+=be,ie.next()}else de+=be,ie.next()}}return de}function ee(ie){k(ie);let de="",be="";for(;de=M(ie);)be+=de;const Se=ie.currentChar();if(Se&&Se!=="}"&&Se!==Gr&&Se!==vr&&Se!==ai&&Se!==" "){const je=at(ie);return d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be+je),be+je}return ie.currentChar()===Gr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be}function J(ie){k(ie);let de="";return ie.currentChar()==="-"?(ie.next(),de+=`-${q(ie)}`):de+=q(ie),ie.currentChar()===Gr&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de}function se(ie){return ie!==Zw&&ie!==ai}function Q(ie){k(ie),h(ie,"'");let de="",be="";for(;de=C(ie,se);)de==="\\"?be+=me(ie):be+=de;const Se=ie.currentChar();return Se===ai||Se===Gr?(d(mo.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),Se===ai&&(ie.next(),h(ie,"'")),be):(h(ie,"'"),be)}function me(ie){const de=ie.currentChar();switch(de){case"\\":case"'":return ie.next(),`\\${de}`;case"u":return xe(ie,de,4);case"U":return xe(ie,de,6);default:return d(mo.UNKNOWN_ESCAPE_SEQUENCE,i(),0,de),""}}function xe(ie,de,be){h(ie,de);let Se="";for(let je=0;je{const Se=ie.currentChar();return Se==="{"||Se==="@"||Se==="|"||Se==="("||Se===")"||!Se||Se===vr?be:(be+=Se,ie.next(),de(be))};return de("")}function j(ie){k(ie);const de=h(ie,"|");return k(ie),de}function K(ie,de){let be=null;switch(ie.currentChar()){case"{":return de.braceNest>=1&&d(mo.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),ie.next(),be=f(de,2,"{"),k(ie),de.braceNest++,be;case"}":return de.braceNest>0&&de.currentType===2&&d(mo.EMPTY_PLACEHOLDER,i(),0),ie.next(),be=f(de,3,"}"),de.braceNest--,de.braceNest>0&&k(ie),de.inLinked&&de.braceNest===0&&(de.inLinked=!1),be;case"@":return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be=he(ie,de)||p(de),de.braceNest=0,be;default:{let je=!0,et=!0,le=!0;if(I(ie))return de.braceNest>0&&d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),be=f(de,1,j(ie)),de.braceNest=0,de.inLinked=!1,be;if(de.braceNest>0&&(de.currentType===4||de.currentType===5||de.currentType===6))return d(mo.UNTERMINATED_CLOSING_BRACE,i(),0),de.braceNest=0,ye(ie,de);if(je=w(ie,de))return be=f(de,4,ee(ie)),k(ie),be;if(et=_(ie,de))return be=f(de,5,J(ie)),k(ie),be;if(le=A(ie,de))return be=f(de,6,Q(ie)),k(ie),be;if(!je&&!et&&!le)return be=f(de,12,at(ie)),d(mo.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be.value),k(ie),be;break}}return be}function he(ie,de){const{currentType:be}=de;let Se=null;const je=ie.currentChar();switch((be===7||be===8||be===11||be===9)&&(je===ai||je===vr)&&d(mo.INVALID_LINKED_FORMAT,i(),0),je){case"@":return ie.next(),Se=f(de,7,"@"),de.inLinked=!0,Se;case".":return k(ie),ie.next(),f(de,8,".");case":":return k(ie),ie.next(),f(de,9,":");default:return I(ie)?(Se=f(de,1,j(ie)),de.braceNest=0,de.inLinked=!1,Se):P(ie,de)||L(ie,de)?(k(ie),he(ie,de)):z(ie,de)?(k(ie),f(de,11,X(ie))):T(ie,de)?(k(ie),je==="{"?K(ie,de)||Se:f(de,10,oe(ie))):(be===7&&d(mo.INVALID_LINKED_FORMAT,i(),0),de.braceNest=0,de.inLinked=!1,ye(ie,de))}}function ye(ie,de){let be={type:13};if(de.braceNest>0)return K(ie,de)||p(de);if(de.inLinked)return he(ie,de)||p(de);switch(ie.currentChar()){case"{":return K(ie,de)||p(de);case"}":return d(mo.UNBALANCED_CLOSING_BRACE,i(),0),ie.next(),f(de,3,"}");case"@":return he(ie,de)||p(de);default:{if(I(ie))return be=f(de,1,j(ie)),de.braceNest=0,de.inLinked=!1,be;if(N(ie))return f(de,0,te(ie));break}}return be}function ve(){const{currentType:ie,offset:de,startLoc:be,endLoc:Se}=a;return a.lastType=ie,a.lastOffset=de,a.lastStartLoc=be,a.lastEndLoc=Se,a.offset=s(),a.startLoc=i(),o.currentChar()===Gr?f(a,13):ye(o,a)}return{nextToken:ve,currentOffset:s,currentPosition:i,context:c}}const Tj="parser",Ej=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Ij=/\\([\\@{}|])/g;function Lj(e,t){return t}function $j(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function Nj(e={}){const t=e.location!==!1,{onError:n}=e;function o(x,y,w,_,...A){const P=x.currentPosition();if(P.offset+=_,P.column+=_,n){const z=t?x8(w,P):null,L=Tp(y,z,{domain:Tj,args:A});n(L)}}function s(x,y,w){const _={type:x};return t&&(_.start=y,_.end=y,_.loc={start:w,end:w}),_}function i(x,y,w,_){t&&(x.end=y,x.loc&&(x.loc.end=w))}function l(x,y){const w=x.context(),_=s(3,w.offset,w.startLoc);return _.value=y.replace(Ij,Lj),i(_,x.currentOffset(),x.currentPosition()),_}function r(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(5,_,A);return P.index=parseInt(y,10),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function a(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(4,_,A);return P.key=y,x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function c(x,y){const w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(9,_,A);return P.value=y.replace(Ej,$j),x.nextToken(),i(P,x.currentOffset(),x.currentPosition()),P}function u(x){const y=x.nextToken(),w=x.context(),{lastOffset:_,lastStartLoc:A}=w,P=s(8,_,A);return y.type!==11?(o(x,mo.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),P.value="",i(P,_,A),{nextConsumeToken:y,node:P}):(y.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(y)),P.value=y.value||"",i(P,x.currentOffset(),x.currentPosition()),{node:P})}function d(x,y){const w=x.context(),_=s(7,w.offset,w.startLoc);return _.value=y,i(_,x.currentOffset(),x.currentPosition()),_}function f(x){const y=x.context(),w=s(6,y.offset,y.startLoc);let _=x.nextToken();if(_.type===8){const A=u(x);w.modifier=A.node,_=A.nextConsumeToken||x.nextToken()}switch(_.type!==9&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),_=x.nextToken(),_.type===2&&(_=x.nextToken()),_.type){case 10:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=d(x,_.value||"");break;case 4:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=a(x,_.value||"");break;case 5:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=r(x,_.value||"");break;case 6:_.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(_)),w.key=c(x,_.value||"");break;default:{o(x,mo.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const A=x.context(),P=s(7,A.offset,A.startLoc);return P.value="",i(P,A.offset,A.startLoc),w.key=P,i(w,A.offset,A.startLoc),{nextConsumeToken:_,node:w}}}return i(w,x.currentOffset(),x.currentPosition()),{node:w}}function p(x){const y=x.context(),w=y.currentType===1?x.currentOffset():y.offset,_=y.currentType===1?y.endLoc:y.startLoc,A=s(2,w,_);A.items=[];let P=null;do{const T=P||x.nextToken();switch(P=null,T.type){case 0:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),A.items.push(l(x,T.value||""));break;case 5:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),A.items.push(r(x,T.value||""));break;case 4:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),A.items.push(a(x,T.value||""));break;case 6:T.value==null&&o(x,mo.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,yr(T)),A.items.push(c(x,T.value||""));break;case 7:{const I=f(x);A.items.push(I.node),P=I.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const z=y.currentType===1?y.lastOffset:x.currentOffset(),L=y.currentType===1?y.lastEndLoc:x.currentPosition();return i(A,z,L),A}function h(x,y,w,_){const A=x.context();let P=_.items.length===0;const z=s(1,y,w);z.cases=[],z.cases.push(_);do{const L=p(x);P||(P=L.items.length===0),z.cases.push(L)}while(A.currentType!==13);return P&&o(x,mo.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),i(z,x.currentOffset(),x.currentPosition()),z}function m(x){const y=x.context(),{offset:w,startLoc:_}=y,A=p(x);return y.currentType===13?A:h(x,w,_,A)}function k(x){const y=Aj(x,Ms({},e)),w=y.context(),_=s(0,w.offset,w.startLoc);return t&&_.loc&&(_.loc.source=x),_.body=m(y),e.onCacheKey&&(_.cacheKey=e.onCacheKey(x)),w.currentType!==13&&o(y,mo.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,x[w.offset]||""),i(_,y.currentOffset(),y.currentPosition()),_}return{parse:k}}function yr(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function zj(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function Kw(e,t){for(let n=0;nGw(n)),e}function Gw(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nl;function a(m,k){l.code+=m}function c(m,k=!0){const x=k?o:"";a(s?x+" ".repeat(m):x)}function u(m=!0){const k=++l.indentLevel;m&&c(k)}function d(m=!0){const k=--l.indentLevel;m&&c(k)}function f(){c(l.indentLevel)}return{context:r,push:a,indent:u,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>l.needIndent}}function Fj(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Su(e,t.key),t.modifier?(e.push(", "),Su(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function jj(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let i=0;i{const n=Xt(t.mode)?t.mode:"normal",o=Xt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` +`,i=t.needIndent?t.needIndent:n!=="arrow",l=e.helpers||[],r=Pj(e,{filename:o,breakLineCode:s,needIndent:i});r.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),r.indent(i),l.length>0&&(r.push(`const { ${Ig(l.map(u=>`${u}: _${u}`),", ")} } = ctx`),r.newline()),r.push("return "),Su(r,e),r.deindent(i),r.push("}"),delete e.helpers;const{code:a,map:c}=r.context();return{ast:e,code:a,map:c?c.toJSON():void 0}};function Vj(e,t={}){const n=Ms({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,r=Nj(n).parse(e);return o?(i&&Rj(r),s&&Pc(r),{ast:r,code:""}):(Bj(r,n),Dj(r,n))}/*! * core-base v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */function Vj(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(b0().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(b0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Nr(e){return co(e)&&$g(e)===0&&(Pl(e,"b")||Pl(e,"body"))}const fT=["b","body"];function Wj(e){return M1(e,fT)}const pT=["c","cases"];function qj(e){return M1(e,pT,[])}const hT=["s","static"];function Uj(e){return M1(e,hT)}const mT=["i","items"];function Zj(e){return M1(e,mT,[])}const gT=["t","type"];function $g(e){return M1(e,gT)}const vT=["v","value"];function h3(e,t){const n=M1(e,vT);if(n!=null)return n;throw R2(t)}const yT=["m","modifier"];function Kj(e){return M1(e,yT)}const wT=["k","key"];function Gj(e){const t=M1(e,wT);if(t)return t;throw R2(6)}function M1(e,t,n){for(let o=0;oYj(n,e)}function Yj(e,t){const n=Wj(t);if(n==null)throw R2(0);if($g(n)===1){const i=qj(n);return e.plural(i.reduce((l,r)=>[...l,Gw(e,r)],[]))}else return Gw(e,n)}function Gw(e,t){const n=Uj(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=Zj(t).reduce((s,i)=>[...s,x8(e,i)],[]);return e.normalize(o)}}function x8(e,t){const n=$g(t);switch(n){case 3:return h3(t,n);case 9:return h3(t,n);case 4:{const o=t;if(Pl(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Pl(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw R2(n)}case 5:{const o=t;if(Pl(o,"i")&&Ss(o.i))return e.interpolate(e.list(o.i));if(Pl(o,"index")&&Ss(o.index))return e.interpolate(e.list(o.index));throw R2(n)}case 6:{const o=t,s=Kj(o),i=Gj(o);return e.linked(x8(e,i),s?x8(e,s):void 0,e.type)}case 7:return h3(t,n);case 8:return h3(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Xj=e=>e;let m3=Ao();function Jj(e,t={}){let n=!1;const o=t.onError||wj;return t.onError=s=>{n=!0,o(s)},{...Dj(e,t),detectError:n}}function Qj(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Xt(e)){ao(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||Xj)(e),s=m3[o];if(s)return s;const{ast:i,detectError:l}=Jj(e,{...t,location:!1,jit:!0}),r=mh(i);return l?r:m3[o]=r}else{const n=e.cacheKey;if(n){const o=m3[n];return o||(m3[n]=mh(e))}else return mh(e)}}let P2=null;function eO(e){P2=e}function tO(e,t,n){P2&&P2.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const nO=oO("function:translate");function oO(e){return t=>P2&&P2.emit(e,t)}const da={INVALID_ARGUMENT:yj,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},sO=24;function fa(e){return Tp(e,null,void 0)}function Ng(e,t){return t.locale!=null?Yw(t.locale):Yw(e.locale)}let gh;function Yw(e){if(Xt(e))return e;if(jo(e)){if(e.resolvedOnce&&gh!=null)return gh;if(e.constructor.name==="Function"){const t=e();if(tj(t))throw fa(da.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return gh=t}else throw fa(da.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw fa(da.NOT_SUPPORT_LOCALE_TYPE)}function iO(e,t,n){return[...new Set([n,...os(t)?t:co(t)?Object.keys(t):Xt(t)?[t]:[n]])]}function S8(e,t,n){const o=Xt(n)?n:F2,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let l=[n];for(;os(l);)l=Xw(i,l,t);const r=os(t)||!bo(t)?t:t.default?t.default:null;l=Xt(r)?[r]:r,os(l)&&Xw(i,l,!1),s.__localeChainCache.set(o,i)}return i}function Xw(e,t,n){let o=!0;for(let s=0;s{l===void 0?l=r:l+=r},f[1]=()=>{l!==void 0&&(t.push(l),l=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,l===void 0||(l=fO(l),l===!1))return!1;f[1]()}};function p(){const h=e[n+1];if(o===5&&h==="'"||o===6&&h==='"')return n++,r="\\"+h,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(a=dO(i),d=A1[o],c=d[a]||d.l||8,c===8||(o=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(r=i,u()===!1))))return;if(o===7)return t}}const Jw=new Map;function hO(e,t){return co(e)?e[t]:null}function mO(e,t){if(!co(e))return null;let n=Jw.get(t);if(n||(n=pO(t),n&&Jw.set(t,n)),!n)return null;const o=n.length;let s=e,i=0;for(;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function vO(){return{upper:(e,t)=>t==="text"&&Xt(e)?e.toUpperCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Xt(e)?e.toLowerCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Xt(e)?Qw(e):t==="vnode"&&co(e)&&"__v_isVNode"in e?Qw(e.children):e}}let bT;function yO(e){bT=e}let _T;function wO(e){_T=e}let xT;function kO(e){xT=e}let ST=null;const bO=e=>{ST=e},_O=()=>ST;let CT=null;const ek=e=>{CT=e},xO=()=>CT;let tk=0;function SO(e={}){const t=jo(e.onWarn)?e.onWarn:oj,n=Xt(e.version)?e.version:gO,o=Xt(e.locale)||jo(e.locale)?e.locale:F2,s=jo(o)?F2:o,i=os(e.fallbackLocale)||bo(e.fallbackLocale)||Xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,l=bo(e.messages)?e.messages:vh(s),r=bo(e.datetimeFormats)?e.datetimeFormats:vh(s),a=bo(e.numberFormats)?e.numberFormats:vh(s),c=Ms(Ao(),e.modifiers,vO()),u=e.pluralRules||Ao(),d=jo(e.missing)?e.missing:null,f=ao(e.missingWarn)||xu(e.missingWarn)?e.missingWarn:!0,p=ao(e.fallbackWarn)||xu(e.fallbackWarn)?e.fallbackWarn:!0,h=!!e.fallbackFormat,m=!!e.unresolving,k=jo(e.postTranslation)?e.postTranslation:null,x=bo(e.processor)?e.processor:null,y=ao(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,_=jo(e.messageCompiler)?e.messageCompiler:bT,A=jo(e.messageResolver)?e.messageResolver:_T||hO,P=jo(e.localeFallbacker)?e.localeFallbacker:xT||iO,z=co(e.fallbackContext)?e.fallbackContext:void 0,L=e,E=co(L.__datetimeFormatters)?L.__datetimeFormatters:new Map,T=co(L.__numberFormatters)?L.__numberFormatters:new Map,$=co(L.__meta)?L.__meta:{};tk++;const C={version:n,cid:tk,locale:o,fallbackLocale:i,messages:l,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:m,postTranslation:k,processor:x,warnHtmlMessage:y,escapeParameter:w,messageCompiler:_,messageResolver:A,localeFallbacker:P,fallbackContext:z,onWarn:t,__meta:$};return C.datetimeFormats=r,C.numberFormats=a,C.__datetimeFormatters=E,C.__numberFormatters=T,__INTLIFY_PROD_DEVTOOLS__&&tO(C,n,$),C}const vh=e=>({[e]:Ao()});function MT(e,t,n,o,s){const{missing:i,onWarn:l}=e;if(i!==null){const r=i(e,n,t,s);return Xt(r)?r:t}else return t}function bd(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function CO(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function MO(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{o.includes(a)?r[a]=s[a]:t[a]=s[a]}),Xt(i)?t.locale=i:bo(i)&&(r=i),bo(l)&&(r=l),r}function nk(e,...t){const{datetimeFormats:n,unresolving:o,onWarn:s}=e,{__datetimeFormatters:i}=e;if(!Xt(t[0])&&!uT(t[0])&&!Ss(t[0]))return i5;const[l,r,a,c]=C8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=Ng(e,a);if(!Xt(l)||l===""){const y=new Intl.DateTimeFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=AT(e,l,p,n,u,d,"datetime format");if(!Xt(h))return o?Ep:l;const m=n[h][l],k=TT(h,l,c);let x=i.get(k);return x||(x=new Intl.DateTimeFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const LT=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function C8(...e){const[t]=e,n=Ao(),o=Ao();let s;if(Xt(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw fa(da.INVALID_ISO_DATE_ARGUMENT);const r=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();s=new Date(r);try{s.toISOString()}catch{throw fa(da.INVALID_ISO_DATE_ARGUMENT)}}else if(uT(t)){if(isNaN(t.getTime()))throw fa(da.INVALID_DATE_ARGUMENT);s=t}else if(Ss(t))s=t;else throw fa(da.INVALID_ARGUMENT);const i=IT(e,n,o,LT);return[n.key||"",s,n,i]}function ok(e,t,n){ET(e.__datetimeFormatters,t,n)}function sk(e,...t){const{numberFormats:n,unresolving:o,onWarn:s}=e,{__numberFormatters:i}=e;if(!Ss(t[0]))return i5;const[l,r,a,c]=M8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=Ng(e,a);if(!Xt(l)||l===""){const y=new Intl.NumberFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=AT(e,l,p,n,u,d,"number format");if(!Xt(h))return o?Ep:l;const m=n[h][l],k=TT(h,l,c);let x=i.get(k);return x||(x=new Intl.NumberFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const $T=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function M8(...e){const[t]=e,n=Ao(),o=Ao();if(!Ss(t))throw fa(da.INVALID_ARGUMENT);const s=t,i=IT(e,n,o,$T);return[n.key||"",s,n,i]}function ik(e,t,n){ET(e.__numberFormatters,t,n)}const AO=e=>e,TO=e=>"",EO="text",IO=e=>e.length===0?"":Eg(e),LO=nj;function yh(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function $O(e){const t=Ss(e.pluralIndex)?e.pluralIndex:-1;return Ss(e.named?.count)?e.named.count:Ss(e.named?.n)?e.named.n:t}function NO(e={}){const t=e.locale,n=$O(e),o=Xt(t)&&jo(e.pluralRules?.[t])?e.pluralRules[t]:yh,s=o===yh?void 0:yh,i=x=>x[o(n,x.length,s)],l=e.list||[],r=x=>l[x],a=e.named||Ao();Ss(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const c=x=>a[x];function u(x,y){const w=jo(e.messages)?e.messages(x,!!y):co(e.messages)?e.messages[x]:!1;return w||(e.parent?e.parent.message(x):TO)}const d=x=>e.modifiers?e.modifiers[x]:AO,f=jo(e.processor?.normalize)?e.processor.normalize:IO,p=jo(e.processor?.interpolate)?e.processor.interpolate:LO,h=Xt(e.processor?.type)?e.processor.type:EO,k={list:r,named:c,plural:i,linked:(x,...y)=>{const[w,_]=y;let A="text",P="";y.length===1?co(w)?(P=w.modifier||P,A=w.type||A):Xt(w)&&(P=w||P):y.length===2&&(Xt(w)&&(P=w||P),Xt(_)&&(A=_||A));const z=u(x,!0)(k),L=z===""||z===void 0?x:z,E=A==="vnode"&&os(L)&&P?L[0]:L;return P?d(P)(E,A):E},message:u,type:h,interpolate:p,normalize:f,values:Ms(Ao(),l,a)};return k}const lk=()=>"",Bl=e=>jo(e);function rk(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:l,messages:r}=e,[a,c]=A8(...t),u=ao(c.missingWarn)?c.missingWarn:e.missingWarn,d=ao(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=ao(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,h=Xt(c.default)||ao(c.default)?ao(c.default)?i?a:()=>a:c.default:n?i?a:()=>a:null,m=n||h!=null&&(Xt(h)||jo(h)),k=Ng(e,c);f&&zO(c);let[x,y,w]=p?[a,k,r[k]||Ao()]:NT(e,a,k,l,d,u),_=x,A=a;if(!p&&!(Xt(_)||Nr(_)||Bl(_))&&m&&(_=h,A=_),!p&&(!(Xt(_)||Nr(_)||Bl(_))||!Xt(y)))return s?Ep:a;let P=!1;const z=()=>{P=!0},L=Bl(_)?_:zT(e,a,y,_,A,z);if(P)return _;const E=PO(e,y,w,c),T=NO(E),$=BO(e,L,T);let C=o?o($,a):$;if(f&&Xt(C)&&(C=gj(C)),__INTLIFY_PROD_DEVTOOLS__){const j={timestamp:Date.now(),key:Xt(a)?a:Bl(_)?_.key:"",locale:y||(Bl(_)?_.locale:""),format:Xt(_)?_:Bl(_)?_.source:"",message:C};j.meta=Ms({},e.__meta,_O()||{}),nO(j)}return C}function zO(e){os(e.list)?e.list=e.list.map(t=>Xt(t)?Ww(t):t):co(e.named)&&Object.keys(e.named).forEach(t=>{Xt(e.named[t])&&(e.named[t]=Ww(e.named[t]))})}function NT(e,t,n,o,s,i){const{messages:l,onWarn:r,messageResolver:a,localeFallbacker:c}=e,u=c(e,o,n);let d=Ao(),f,p=null;const h="translate";for(let m=0;mo);return c.locale=n,c.key=t,c}const a=l(o,RO(e,n,s,o,r,i));return a.locale=n,a.key=t,a.source=o,a}function BO(e,t,n){return t(n)}function A8(...e){const[t,n,o]=e,s=Ao();if(!Xt(t)&&!Ss(t)&&!Bl(t)&&!Nr(t))throw fa(da.INVALID_ARGUMENT);const i=Ss(t)?String(t):(Bl(t),t);return Ss(n)?s.plural=n:Xt(n)?s.default=n:bo(n)&&!Ag(n)?s.named=n:os(n)&&(s.list=n),Ss(o)?s.plural=o:Xt(o)?s.default=o:bo(o)&&Ms(s,o),[i,s]}function RO(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:l=>{throw i&&i(l),l},onCacheKey:l=>XF(t,n,l)}}function PO(e,t,n,o){const{modifiers:s,pluralRules:i,messageResolver:l,fallbackLocale:r,fallbackWarn:a,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:s,pluralRules:i,messages:(p,h)=>{let m=l(n,p);if(m==null&&(u||h)){const[k,,x]=NT(u||e,p,t,r,a,c);m=k??l(x,p)}if(Xt(m)||Nr(m)){let k=!1;const y=zT(e,p,t,m,p,()=>{k=!0});return k?lk:y}else return Bl(m)?m:lk}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),Ss(o.plural)&&(f.pluralIndex=o.plural),f}Vj();/*! + */function Wj(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(b0().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(b0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Nr(e){return co(e)&&Ng(e)===0&&(Pl(e,"b")||Pl(e,"body"))}const pT=["b","body"];function qj(e){return M1(e,pT)}const hT=["c","cases"];function Uj(e){return M1(e,hT,[])}const mT=["s","static"];function Zj(e){return M1(e,mT)}const gT=["i","items"];function Kj(e){return M1(e,gT,[])}const vT=["t","type"];function Ng(e){return M1(e,vT)}const yT=["v","value"];function h3(e,t){const n=M1(e,yT);if(n!=null)return n;throw R2(t)}const wT=["m","modifier"];function Gj(e){return M1(e,wT)}const kT=["k","key"];function Yj(e){const t=M1(e,kT);if(t)return t;throw R2(6)}function M1(e,t,n){for(let o=0;oXj(n,e)}function Xj(e,t){const n=qj(t);if(n==null)throw R2(0);if(Ng(n)===1){const i=Uj(n);return e.plural(i.reduce((l,r)=>[...l,Yw(e,r)],[]))}else return Yw(e,n)}function Yw(e,t){const n=Zj(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=Kj(t).reduce((s,i)=>[...s,S8(e,i)],[]);return e.normalize(o)}}function S8(e,t){const n=Ng(t);switch(n){case 3:return h3(t,n);case 9:return h3(t,n);case 4:{const o=t;if(Pl(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Pl(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw R2(n)}case 5:{const o=t;if(Pl(o,"i")&&Ss(o.i))return e.interpolate(e.list(o.i));if(Pl(o,"index")&&Ss(o.index))return e.interpolate(e.list(o.index));throw R2(n)}case 6:{const o=t,s=Gj(o),i=Yj(o);return e.linked(S8(e,i),s?S8(e,s):void 0,e.type)}case 7:return h3(t,n);case 8:return h3(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Jj=e=>e;let m3=Ao();function Qj(e,t={}){let n=!1;const o=t.onError||kj;return t.onError=s=>{n=!0,o(s)},{...Vj(e,t),detectError:n}}function eO(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Xt(e)){ao(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||Jj)(e),s=m3[o];if(s)return s;const{ast:i,detectError:l}=Qj(e,{...t,location:!1,jit:!0}),r=mh(i);return l?r:m3[o]=r}else{const n=e.cacheKey;if(n){const o=m3[n];return o||(m3[n]=mh(e))}else return mh(e)}}let P2=null;function tO(e){P2=e}function nO(e,t,n){P2&&P2.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const oO=sO("function:translate");function sO(e){return t=>P2&&P2.emit(e,t)}const da={INVALID_ARGUMENT:wj,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},iO=24;function fa(e){return Tp(e,null,void 0)}function zg(e,t){return t.locale!=null?Xw(t.locale):Xw(e.locale)}let gh;function Xw(e){if(Xt(e))return e;if(jo(e)){if(e.resolvedOnce&&gh!=null)return gh;if(e.constructor.name==="Function"){const t=e();if(nj(t))throw fa(da.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return gh=t}else throw fa(da.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw fa(da.NOT_SUPPORT_LOCALE_TYPE)}function lO(e,t,n){return[...new Set([n,...os(t)?t:co(t)?Object.keys(t):Xt(t)?[t]:[n]])]}function C8(e,t,n){const o=Xt(n)?n:F2,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let l=[n];for(;os(l);)l=Jw(i,l,t);const r=os(t)||!bo(t)?t:t.default?t.default:null;l=Xt(r)?[r]:r,os(l)&&Jw(i,l,!1),s.__localeChainCache.set(o,i)}return i}function Jw(e,t,n){let o=!0;for(let s=0;s{l===void 0?l=r:l+=r},f[1]=()=>{l!==void 0&&(t.push(l),l=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,l===void 0||(l=pO(l),l===!1))return!1;f[1]()}};function p(){const h=e[n+1];if(o===5&&h==="'"||o===6&&h==='"')return n++,r="\\"+h,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(a=fO(i),d=A1[o],c=d[a]||d.l||8,c===8||(o=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(r=i,u()===!1))))return;if(o===7)return t}}const Qw=new Map;function mO(e,t){return co(e)?e[t]:null}function gO(e,t){if(!co(e))return null;let n=Qw.get(t);if(n||(n=hO(t),n&&Qw.set(t,n)),!n)return null;const o=n.length;let s=e,i=0;for(;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function yO(){return{upper:(e,t)=>t==="text"&&Xt(e)?e.toUpperCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Xt(e)?e.toLowerCase():t==="vnode"&&co(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Xt(e)?ek(e):t==="vnode"&&co(e)&&"__v_isVNode"in e?ek(e.children):e}}let _T;function wO(e){_T=e}let xT;function kO(e){xT=e}let ST;function bO(e){ST=e}let CT=null;const _O=e=>{CT=e},xO=()=>CT;let MT=null;const tk=e=>{MT=e},SO=()=>MT;let nk=0;function CO(e={}){const t=jo(e.onWarn)?e.onWarn:sj,n=Xt(e.version)?e.version:vO,o=Xt(e.locale)||jo(e.locale)?e.locale:F2,s=jo(o)?F2:o,i=os(e.fallbackLocale)||bo(e.fallbackLocale)||Xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,l=bo(e.messages)?e.messages:vh(s),r=bo(e.datetimeFormats)?e.datetimeFormats:vh(s),a=bo(e.numberFormats)?e.numberFormats:vh(s),c=Ms(Ao(),e.modifiers,yO()),u=e.pluralRules||Ao(),d=jo(e.missing)?e.missing:null,f=ao(e.missingWarn)||xu(e.missingWarn)?e.missingWarn:!0,p=ao(e.fallbackWarn)||xu(e.fallbackWarn)?e.fallbackWarn:!0,h=!!e.fallbackFormat,m=!!e.unresolving,k=jo(e.postTranslation)?e.postTranslation:null,x=bo(e.processor)?e.processor:null,y=ao(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,_=jo(e.messageCompiler)?e.messageCompiler:_T,A=jo(e.messageResolver)?e.messageResolver:xT||mO,P=jo(e.localeFallbacker)?e.localeFallbacker:ST||lO,z=co(e.fallbackContext)?e.fallbackContext:void 0,L=e,T=co(L.__datetimeFormatters)?L.__datetimeFormatters:new Map,I=co(L.__numberFormatters)?L.__numberFormatters:new Map,N=co(L.__meta)?L.__meta:{};nk++;const C={version:n,cid:nk,locale:o,fallbackLocale:i,messages:l,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:m,postTranslation:k,processor:x,warnHtmlMessage:y,escapeParameter:w,messageCompiler:_,messageResolver:A,localeFallbacker:P,fallbackContext:z,onWarn:t,__meta:N};return C.datetimeFormats=r,C.numberFormats=a,C.__datetimeFormatters=T,C.__numberFormatters=I,__INTLIFY_PROD_DEVTOOLS__&&nO(C,n,N),C}const vh=e=>({[e]:Ao()});function AT(e,t,n,o,s){const{missing:i,onWarn:l}=e;if(i!==null){const r=i(e,n,t,s);return Xt(r)?r:t}else return t}function bd(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function MO(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function AO(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{o.includes(a)?r[a]=s[a]:t[a]=s[a]}),Xt(i)?t.locale=i:bo(i)&&(r=i),bo(l)&&(r=l),r}function ok(e,...t){const{datetimeFormats:n,unresolving:o,onWarn:s}=e,{__datetimeFormatters:i}=e;if(!Xt(t[0])&&!dT(t[0])&&!Ss(t[0]))return i5;const[l,r,a,c]=M8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=zg(e,a);if(!Xt(l)||l===""){const y=new Intl.DateTimeFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=TT(e,l,p,n,u,d,"datetime format");if(!Xt(h))return o?Ep:l;const m=n[h][l],k=ET(h,l,c);let x=i.get(k);return x||(x=new Intl.DateTimeFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const $T=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function M8(...e){const[t]=e,n=Ao(),o=Ao();let s;if(Xt(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw fa(da.INVALID_ISO_DATE_ARGUMENT);const r=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();s=new Date(r);try{s.toISOString()}catch{throw fa(da.INVALID_ISO_DATE_ARGUMENT)}}else if(dT(t)){if(isNaN(t.getTime()))throw fa(da.INVALID_DATE_ARGUMENT);s=t}else if(Ss(t))s=t;else throw fa(da.INVALID_ARGUMENT);const i=LT(e,n,o,$T);return[n.key||"",s,n,i]}function sk(e,t,n){IT(e.__datetimeFormatters,t,n)}function ik(e,...t){const{numberFormats:n,unresolving:o,onWarn:s}=e,{__numberFormatters:i}=e;if(!Ss(t[0]))return i5;const[l,r,a,c]=A8(...t),u=ao(a.missingWarn)?a.missingWarn:e.missingWarn,d=ao(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=zg(e,a);if(!Xt(l)||l===""){const y=new Intl.NumberFormat(p.replace(/!/g,""),c);return f?y.formatToParts(r):y.format(r)}const h=TT(e,l,p,n,u,d,"number format");if(!Xt(h))return o?Ep:l;const m=n[h][l],k=ET(h,l,c);let x=i.get(k);return x||(x=new Intl.NumberFormat(h,Ms({},m,c)),i.set(k,x)),f?x.formatToParts(r):x.format(r)}const NT=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function A8(...e){const[t]=e,n=Ao(),o=Ao();if(!Ss(t))throw fa(da.INVALID_ARGUMENT);const s=t,i=LT(e,n,o,NT);return[n.key||"",s,n,i]}function lk(e,t,n){IT(e.__numberFormatters,t,n)}const TO=e=>e,EO=e=>"",IO="text",LO=e=>e.length===0?"":Ig(e),$O=oj;function yh(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function NO(e){const t=Ss(e.pluralIndex)?e.pluralIndex:-1;return Ss(e.named?.count)?e.named.count:Ss(e.named?.n)?e.named.n:t}function zO(e={}){const t=e.locale,n=NO(e),o=Xt(t)&&jo(e.pluralRules?.[t])?e.pluralRules[t]:yh,s=o===yh?void 0:yh,i=x=>x[o(n,x.length,s)],l=e.list||[],r=x=>l[x],a=e.named||Ao();Ss(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const c=x=>a[x];function u(x,y){const w=jo(e.messages)?e.messages(x,!!y):co(e.messages)?e.messages[x]:!1;return w||(e.parent?e.parent.message(x):EO)}const d=x=>e.modifiers?e.modifiers[x]:TO,f=jo(e.processor?.normalize)?e.processor.normalize:LO,p=jo(e.processor?.interpolate)?e.processor.interpolate:$O,h=Xt(e.processor?.type)?e.processor.type:IO,k={list:r,named:c,plural:i,linked:(x,...y)=>{const[w,_]=y;let A="text",P="";y.length===1?co(w)?(P=w.modifier||P,A=w.type||A):Xt(w)&&(P=w||P):y.length===2&&(Xt(w)&&(P=w||P),Xt(_)&&(A=_||A));const z=u(x,!0)(k),L=z===""||z===void 0?x:z,T=A==="vnode"&&os(L)&&P?L[0]:L;return P?d(P)(T,A):T},message:u,type:h,interpolate:p,normalize:f,values:Ms(Ao(),l,a)};return k}const rk=()=>"",Bl=e=>jo(e);function ak(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:l,messages:r}=e,[a,c]=T8(...t),u=ao(c.missingWarn)?c.missingWarn:e.missingWarn,d=ao(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=ao(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,h=Xt(c.default)||ao(c.default)?ao(c.default)?i?a:()=>a:c.default:n?i?a:()=>a:null,m=n||h!=null&&(Xt(h)||jo(h)),k=zg(e,c);f&&BO(c);let[x,y,w]=p?[a,k,r[k]||Ao()]:zT(e,a,k,l,d,u),_=x,A=a;if(!p&&!(Xt(_)||Nr(_)||Bl(_))&&m&&(_=h,A=_),!p&&(!(Xt(_)||Nr(_)||Bl(_))||!Xt(y)))return s?Ep:a;let P=!1;const z=()=>{P=!0},L=Bl(_)?_:BT(e,a,y,_,A,z);if(P)return _;const T=FO(e,y,w,c),I=zO(T),N=RO(e,L,I);let C=o?o(N,a):N;if(f&&Xt(C)&&(C=vj(C)),__INTLIFY_PROD_DEVTOOLS__){const F={timestamp:Date.now(),key:Xt(a)?a:Bl(_)?_.key:"",locale:y||(Bl(_)?_.locale:""),format:Xt(_)?_:Bl(_)?_.source:"",message:C};F.meta=Ms({},e.__meta,xO()||{}),oO(F)}return C}function BO(e){os(e.list)?e.list=e.list.map(t=>Xt(t)?qw(t):t):co(e.named)&&Object.keys(e.named).forEach(t=>{Xt(e.named[t])&&(e.named[t]=qw(e.named[t]))})}function zT(e,t,n,o,s,i){const{messages:l,onWarn:r,messageResolver:a,localeFallbacker:c}=e,u=c(e,o,n);let d=Ao(),f,p=null;const h="translate";for(let m=0;mo);return c.locale=n,c.key=t,c}const a=l(o,PO(e,n,s,o,r,i));return a.locale=n,a.key=t,a.source=o,a}function RO(e,t,n){return t(n)}function T8(...e){const[t,n,o]=e,s=Ao();if(!Xt(t)&&!Ss(t)&&!Bl(t)&&!Nr(t))throw fa(da.INVALID_ARGUMENT);const i=Ss(t)?String(t):(Bl(t),t);return Ss(n)?s.plural=n:Xt(n)?s.default=n:bo(n)&&!Tg(n)?s.named=n:os(n)&&(s.list=n),Ss(o)?s.plural=o:Xt(o)?s.default=o:bo(o)&&Ms(s,o),[i,s]}function PO(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:l=>{throw i&&i(l),l},onCacheKey:l=>JF(t,n,l)}}function FO(e,t,n,o){const{modifiers:s,pluralRules:i,messageResolver:l,fallbackLocale:r,fallbackWarn:a,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:s,pluralRules:i,messages:(p,h)=>{let m=l(n,p);if(m==null&&(u||h)){const[k,,x]=zT(u||e,p,t,r,a,c);m=k??l(x,p)}if(Xt(m)||Nr(m)){let k=!1;const y=BT(e,p,t,m,p,()=>{k=!0});return k?rk:y}else return Bl(m)?m:rk}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),Ss(o.plural)&&(f.pluralIndex=o.plural),f}Wj();/*! * vue-i18n v11.4.8 * (c) 2026 kazuya kawaguchi * Released under the MIT License. - */const FO="11.4.8";function jO(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(b0().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(b0().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(b0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(b0().__INTLIFY_PROD_DEVTOOLS__=!1)}const Ai={UNEXPECTED_RETURN_TYPE:sO,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Ui(e,...t){return Tp(e,null,void 0)}const T8=C1("__translateVNode"),E8=C1("__datetimeParts"),I8=C1("__numberParts"),BT=C1("__setPluralRules"),RT=C1("__injectWithOption"),qc=C1("__dispose");function j2(e){if(!co(e)||Nr(e))return e;for(const t in e)if(Pl(e,t))if(!t.includes("."))co(e[t])&&j2(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,i=!1;for(let l=0;l{if("locale"in r&&"resource"in r){const{locale:a,resource:c}=r;a?(l[a]=l[a]||Ao(),u4(c,l[a])):u4(c,l)}else Xt(r)&&u4(JSON.parse(r),l)}),s==null&&i)for(const r in l)Pl(l,r)&&j2(l[r]);return l}function PT(e){return e.type}function FT(e,t,n){let o=co(t.messages)?t.messages:Ao();"__i18nGlobal"in n&&(o=zg(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(co(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(l=>{e.mergeDateTimeFormat(l,t.datetimeFormats[l])})}if(co(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(l=>{e.mergeNumberFormat(l,t.numberFormats[l])})}}}function ak(e){return W(r1,null,e,0)}function O2(){return Ts()}const ck="__INTLIFY_META__",uk=()=>[],OO=()=>!1;let dk=0;function fk(e){return((t,n,o,s)=>e(n,o,O2()||void 0,s))}const HO=()=>{const e=O2();let t=null;return e&&(t=PT(e)[ck])?{[ck]:t}:null};function l5(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,i=s5?V:Uo;let l=ao(e.inheritLocale)?e.inheritLocale:!0;const r=i(t&&l?t.locale.value:Xt(e.locale)?e.locale:F2),a=i(t&&l?t.fallbackLocale.value:Xt(e.fallbackLocale)||os(e.fallbackLocale)||bo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r.value),c=i(zg(r.value,e)),u=i(bo(e.datetimeFormats)?e.datetimeFormats:{[r.value]:{}}),d=i(bo(e.numberFormats)?e.numberFormats:{[r.value]:{}});let f=t?t.missingWarn:ao(e.missingWarn)||xu(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:ao(e.fallbackWarn)||xu(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:ao(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,k=jo(e.missing)?e.missing:null,x=jo(e.missing)?fk(e.missing):null,y=jo(e.postTranslation)?e.postTranslation:null,w=t?t.warnHtmlMessage:ao(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const A=t?t.modifiers:bo(e.modifiers)?e.modifiers:{};let P=e.pluralRules||t&&t.pluralRules,z;z=(()=>{o&&ek(null);const le={version:FO,locale:r.value,fallbackLocale:a.value,messages:c.value,modifiers:A,pluralRules:P,missing:x===null?void 0:x,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:w,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};le.datetimeFormats=u.value,le.numberFormats=d.value,le.__datetimeFormatters=bo(z)?z.__datetimeFormatters:void 0,le.__numberFormatters=bo(z)?z.__numberFormatters:void 0;const fe=SO(le);return o&&ek(fe),fe})(),bd(z,r.value,a.value);function E(){return[r.value,a.value,c.value,u.value,d.value]}const T=B({get:()=>r.value,set:le=>{z.locale=le,r.value=le}}),$=B({get:()=>a.value,set:le=>{z.fallbackLocale=le,a.value=le,bd(z,r.value,le)}}),C=B(()=>c.value),j=B(()=>u.value),H=B(()=>d.value);function D(){return jo(y)?y:null}function M(le){y=le,z.postTranslation=le}function R(){return k}function O(le){le!==null&&(x=fk(le)),k=le,z.missing=x}const U=(le,fe,ge,Oe,Fe,pt)=>{E();let kt;try{__INTLIFY_PROD_DEVTOOLS__,o||(z.fallbackContext=t?xO():void 0),kt=le(z)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(z.fallbackContext=void 0)}if(ge!=="translate exists"&&Ss(kt)&&kt===Ep||ge==="translate exists"&&!kt){const[qt,nn]=fe();return t&&h?Oe(t):Fe(qt)}else{if(pt(kt))return kt;throw Ui(Ai.UNEXPECTED_RETURN_TYPE)}};function Z(...le){return U(fe=>Reflect.apply(rk,null,[fe,...le]),()=>A8(...le),"translate",fe=>Reflect.apply(fe.t,fe,[...le]),fe=>fe,fe=>Xt(fe))}function q(...le){const[fe,ge,Oe]=le;if(Oe&&!co(Oe))throw Ui(Ai.INVALID_ARGUMENT);return Z(fe,ge,Ms({resolvedMessage:!0},Oe||{}))}function te(...le){return U(fe=>Reflect.apply(nk,null,[fe,...le]),()=>C8(...le),"datetime format",fe=>Reflect.apply(fe.d,fe,[...le]),()=>i5,fe=>Xt(fe)||os(fe))}function ee(...le){return U(fe=>Reflect.apply(sk,null,[fe,...le]),()=>M8(...le),"number format",fe=>Reflect.apply(fe.n,fe,[...le]),()=>i5,fe=>Xt(fe)||os(fe))}function J(le){return le.map(fe=>Xt(fe)||Ss(fe)||ao(fe)?ak(String(fe)):fe)}const Q={normalize:J,interpolate:le=>le,type:"vnode"};function me(...le){return U(fe=>{let ge;const Oe=fe;try{Oe.processor=Q,ge=Reflect.apply(rk,null,[Oe,...le])}finally{Oe.processor=null}return ge},()=>A8(...le),"translate",fe=>fe[T8](...le),fe=>[ak(fe)],fe=>os(fe))}function xe(...le){return U(fe=>Reflect.apply(sk,null,[fe,...le]),()=>M8(...le),"number format",fe=>fe[I8](...le),uk,fe=>Xt(fe)||os(fe))}function Ye(...le){return U(fe=>Reflect.apply(nk,null,[fe,...le]),()=>C8(...le),"datetime format",fe=>fe[E8](...le),uk,fe=>Xt(fe)||os(fe))}function at(le){P=le,z.pluralRules=P}function X(le,fe){return U(()=>{if(!le)return!1;const ge=Xt(fe)?fe:r.value,Oe=Xt(fe)?[ge]:S8(z,a.value,ge);for(let Fe=0;Fe[le],"translate exists",ge=>Reflect.apply(ge.te,ge,[le,fe]),OO,ge=>ao(ge))}function oe(le){let fe=null;const ge=S8(z,a.value,r.value);for(let Oe=0;Oe{l&&(r.value=le,z.locale=le,bd(z,r.value,a.value))}),Ke(t.fallbackLocale,le=>{l&&(a.value=le,z.fallbackLocale=le,bd(z,r.value,a.value))}));const et={id:dk,locale:T,fallbackLocale:$,get inheritLocale(){return l},set inheritLocale(le){l=le,le&&t&&(r.value=t.locale.value,a.value=t.fallbackLocale.value,bd(z,r.value,a.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:C,get modifiers(){return A},get pluralRules(){return P||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(le){f=le,z.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(le){p=le,z.fallbackWarn=p},get fallbackRoot(){return h},set fallbackRoot(le){h=le},get fallbackFormat(){return m},set fallbackFormat(le){m=le,z.fallbackFormat=m},get warnHtmlMessage(){return w},set warnHtmlMessage(le){w=le,z.warnHtmlMessage=le},get escapeParameter(){return _},set escapeParameter(le){_=le,z.escapeParameter=le},t:Z,getLocaleMessage:K,setLocaleMessage:he,mergeLocaleMessage:ye,getPostTranslationHandler:D,setPostTranslationHandler:M,getMissingHandler:R,setMissingHandler:O,[BT]:at};return et.datetimeFormats=j,et.numberFormats=H,et.rt=q,et.te=X,et.tm=F,et.d=te,et.n=ee,et.getDateTimeFormat=ve,et.setDateTimeFormat=ie,et.mergeDateTimeFormat=de,et.getNumberFormat=be,et.setNumberFormat=Se,et.mergeNumberFormat=je,et[RT]=n,et[T8]=me,et[E8]=Ye,et[I8]=xe,et}function DO(e){const t=Xt(e.locale)?e.locale:F2,n=Xt(e.fallbackLocale)||os(e.fallbackLocale)||bo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=jo(e.missing)?e.missing:void 0,s=ao(e.silentTranslationWarn)||xu(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=ao(e.silentFallbackWarn)||xu(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,l=ao(e.fallbackRoot)?e.fallbackRoot:!0,r=!!e.formatFallbackMessages,a=bo(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=jo(e.postTranslation)?e.postTranslation:void 0,d=Xt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=ao(e.sync)?e.sync:!0;let h=e.messages;if(bo(e.sharedMessages)){const A=e.sharedMessages;h=Object.keys(A).reduce((z,L)=>{const E=z[L]||(z[L]={});return Ms(E,A[L]),z},h||{})}const{__i18n:m,__root:k,__injectWithOption:x}=e,y=e.datetimeFormats,w=e.numberFormats,_=e.flatJson;return{locale:t,fallbackLocale:n,messages:h,flatJson:_,datetimeFormats:y,numberFormats:w,missing:o,missingWarn:s,fallbackWarn:i,fallbackRoot:l,fallbackFormat:r,modifiers:a,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:k,__injectWithOption:x}}function L8(e={}){const t=l5(DO(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return ao(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=ao(s)?!s:s},get silentFallbackWarn(){return ao(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=ao(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,i){return t.te(s,i)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,i){t.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){t.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,i){t.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){t.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,i){t.setNumberFormat(s,i)},mergeNumberFormat(s,i){t.mergeNumberFormat(s,i)}};return o.__extender=n,o}function VO(e,t,n){return{beforeCreate(){const o=O2();if(!o)throw Ui(Ai.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const i=s.i18n;if(s.__i18n&&(i.__i18n=s.__i18n),i.__root=t,this===this.$root)this.$i18n=pk(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=L8(i);const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=pk(e,s);else{this.$i18n=L8({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&FT(t,s,s),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,l)=>this.$i18n.te(i,l),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=O2();if(!o)throw Ui(Ai.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function pk(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[BT](t.pluralizationRules||e.pluralizationRules);const n=zg(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const Bg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function WO({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Ce?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},Ao())}function jT(){return Ce}const qO=Je({name:"i18n-t",props:Ms({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ss(e)||!isNaN(e)}},Bg),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||$t({useScope:e.scope,__useComponent:!0});return()=>{const i=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),c=Ao();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=Xt(e.plural)?+e.plural:e.plural);const u=WO(t,a);return s[T8](e.keypath,u,c)},l=Ms(Ao(),o),r=Xt(e.tag)||co(e.tag)?e.tag:jT();return co(r)?vn(r,l,{default:i}):vn(r,l,i())}}}),hk=qO;function UO(e){return os(e)&&!Xt(e[0])}function OT(e,t,n,o){const{slots:s,attrs:i}=t;return()=>{const l=()=>{const c={part:!0};let u=Ao();e.locale&&(c.locale=e.locale),Xt(e.format)?c.key=e.format:co(e.format)&&(Xt(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((p,h)=>n.includes(h)?Ms(Ao(),p,{[h]:e.format[h]}):p,Ao()));const d=o(e.value,c,u);let f=[c.key];return os(d)?f=d.map((p,h)=>{const m=s[p.type],k=m?m({[p.type]:p.value,index:h,parts:d}):[p.value];return UO(k)&&(k[0].key=`${p.type}-${h}`),k}):Xt(d)&&(f=[d]),f},r=Ms(Ao(),i),a=Xt(e.tag)||co(e.tag)?e.tag:jT();return co(a)?vn(a,r,{default:l}):vn(a,r,l())}}const ZO=Je({name:"i18n-n",props:Ms({value:{type:Number,required:!0},format:{type:[String,Object]}},Bg),setup(e,t){const n=e.i18n||$t({useScope:e.scope,__useComponent:!0});return OT(e,t,$T,(...o)=>n[I8](...o))}}),mk=ZO;function KO(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function GO(e){const t=l=>{const{instance:r,value:a}=l;if(!r||!r.$)throw Ui(Ai.UNEXPECTED_ERROR);const c=KO(e,r.$),u=gk(a);return[Reflect.apply(c.t,c,[...vk(u)]),c]};return{created:(l,r)=>{const[a,c]=t(r);s5&&(l.__i18nWatcher=Ke(c.locale,()=>{r.instance&&r.instance.$forceUpdate()})),l.__composer=c,l.textContent=a},unmounted:l=>{s5&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:r})=>{if(l.__composer){const a=l.__composer,c=gk(r);l.textContent=Reflect.apply(a.t,a,[...vk(c)])}},getSSRProps:l=>{const[r]=t(l);return{textContent:r}}}}function gk(e){if(Xt(e))return{path:e};if(bo(e)){if(!("path"in e))throw Ui(Ai.REQUIRED_VALUE,"path");return e}else throw Ui(Ai.INVALID_VALUE)}function vk(e){const{path:t,locale:n,args:o,choice:s,plural:i}=e,l={},r=o||{};return Xt(n)&&(l.locale=n),Ss(s)&&(l.plural=s),Ss(i)&&(l.plural=i),[t,r,l]}function YO(e,t,...n){const o=bo(n[0])?n[0]:{};(ao(o.globalInstall)?o.globalInstall:!0)&&([hk.name,"I18nT"].forEach(i=>e.component(i,hk)),[mk.name,"I18nN"].forEach(i=>e.component(i,mk)),[kk.name,"I18nD"].forEach(i=>e.component(i,kk))),e.directive("t",GO(t))}const XO=C1("global-vue-i18n");function JO(e={}){const t=__VUE_I18N_LEGACY_API__&&ao(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=ao(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,i]=QO(e,t),l=C1("");function r(d){return o.get(d)||null}function a(d,f){o.set(d,f)}function c(d){o.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=l,d.provide(d.__VUE_I18N_SYMBOL__,u),bo(f[0])){const m=f[0];u.__composerExtend=m.__composerExtend,u.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=lH(d,u.global)),__VUE_I18N_FULL_INSTALL__&&YO(d,u,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(VO(i,i.__composer,u));const h=d.unmount;d.unmount=()=>{p&&p(),u.dispose(),h()}},get global(){return i},dispose(){s.stop()},__instances:o,__getInstance:r,__setInstance:a,__deleteInstance:c};return u}function $t(e={}){const t=O2();if(t==null)throw Ui(Ai.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Ui(Ai.NOT_INSTALLED);const n=eH(t),o=nH(n),s=PT(t),i=tH(e,s);if(i==="global")return FT(o,e,s),o;if(i==="parent"){let a=yk(n,t,e.__useComponent);return a==null&&(a=o),a}if(i==="isolated"){if(n.mode!=="composition")throw Ui(Ai.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,c=Ms({},e),u=yk(n,t);c.__root=u||o;const d=l5(c);return a.__composerExtend&&(d[qc]=a.__composerExtend(d)),cg()&&pf(()=>{const p=d[qc];p&&(p(),delete d[qc])}),d}const l=n;let r=l.__getInstance(t);if(r==null){const a=Ms({},e);"__i18n"in s&&(a.__i18n=s.__i18n),o&&(a.__root=o),r=l5(a),l.__composerExtend&&(r[qc]=l.__composerExtend(r)),sH(l,t,r),l.__setInstance(t,r)}return r}function QO(e,t){const n=kR(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>L8(e)):n.run(()=>l5(e));if(o==null)throw Ui(Ai.UNEXPECTED_ERROR);return[n,o]}function eH(e){const t=fn(e.isCE?XO:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Ui(e.isCE?Ai.NOT_INSTALLED_WITH_PROVIDE:Ai.UNEXPECTED_ERROR);return t}function tH(e,t){return Ag(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function nH(e){return e.mode==="composition"?e.global:e.global.__composer}function yk(e,t,n=!1){let o=null;const s=t.root;let i=oH(t,n);for(;i!=null;){const l=e;if(e.mode==="composition")o=l.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const r=l.__getInstance(i);r!=null&&(o=r.__composer,n&&o&&!o[RT]&&(o=null))}if(o!=null||s===i)break;i=i.parent}return o}function oH(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function sH(e,t,n){In(()=>{},t),En(()=>{const o=n;e.__deleteInstance(t);const s=o[qc];s&&(s(),delete o[qc])},t)}const iH=["locale","fallbackLocale","availableLocales"],wk=["t","rt","d","n","tm","te"];function lH(e,t){const n=Object.create(null);return iH.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i)throw Ui(Ai.UNEXPECTED_ERROR);const l=ps(i.value)?{get(){return i.value.value},set(r){i.value.value=r}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,s,l)}),e.config.globalProperties.$i18n=n,wk.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i||!i.value)throw Ui(Ai.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,i)}),()=>{delete e.config.globalProperties.$i18n,wk.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const rH=Je({name:"i18n-d",props:Ms({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Bg),setup(e,t){const n=e.i18n||$t({useScope:e.scope,__useComponent:!0});return OT(e,t,LT,(...o)=>n[E8](...o))}}),kk=rH;jO();yO(Qj);wO(mO);kO(S8);if(__INTLIFY_PROD_DEVTOOLS__){const e=b0();e.__INTLIFY__=!0,eO(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const aH="modulepreload",cH=function(e){return"/"+e},bk={},Cs=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),a=r?.nonce||r?.getAttribute("nonce");s=l(n.map(c=>{if(c=cH(c),c in bk)return;bk[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":aH,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(l){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=l,window.dispatchEvent(r),!r.defaultPrevented)throw l}return s.then(l=>{for(const r of l||[])r.status==="rejected"&&i(r.reason);return t().catch(i)})},uH="/brand/pythinker_banner_dark.svg";async function fs(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return fH(e)}function dH(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||fs(e)}function fH(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const dn={permission:"pythinker-web.permission",activeWorkspace:"pythinker-active-workspace",planMode:"pythinker-web.plan-mode",planArmed:"pythinker-web.plan-armed",dynamicWorkflowMode:"pythinker-web.dynamic-workflow-mode",goalMode:"pythinker-web.goal-mode",uiFontSize:"pythinker-web.ui-font-size",starredModels:"pythinker-web.starred-models",unread:"pythinker-web.unread",onboarded:"pythinker-web.onboarded",accent:"pythinker-web.accent",colorScheme:"pythinker-web.color-scheme",hiddenWorkspaces:"pythinker-web.hidden-workspaces",collapsedWorkspaces:"pythinker-web.collapsed-workspaces",workspaceOrder:"pythinker-web.workspace-order",workspaceNameOverrides:"pythinker-web.workspace-name-overrides",workspaceSort:"pythinker-web.workspace-sort",pinnedSessions:"pythinker-web.pinned-sessions",pinnedCollapsed:"pythinker-web.pinned-collapsed",recentEmojis:"pythinker-web.recent-emojis",conversationToc:"pythinker-web.beta-toc",turnFolding:"pythinker-web.turn-folding",activityRunFolding:"pythinker-web.activity-run-folding",notifyOnComplete:"pythinker-web.notify-on-complete",notifyOnQuestion:"pythinker-web.notify-on-question",notifyOnApproval:"pythinker-web.notify-on-approval",soundOnComplete:"pythinker-web.sound-on-complete",inputHistory:"pythinker-web.input-history",clientId:"pythinker-web.client-id",debug:"pythinker-web.debug",openInLastTarget:"pythinker-web.open-in.last-target",sidebarCollapsed:"pythinker-web.sidebar-collapsed",sidebarPinnedHeight:"pythinker-web.sidebar-pinned-height",sidebarWidth:"pythinker-web.sidebar-width",codeFont:"pythinker-web.code-font",contentAlign:"pythinker-web.content-align",theme:"pythinker-web.theme",thinking:"pythinker-web.thinking"};function _k(e){return`pythinker-web.draft.${e&&e.length>0?e:"__new__"}`}function ls(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Es(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function y1(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Fu(e){const t=ls(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function T1(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function Rg(){const e=ls(dn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[o,s]of Object.entries(t))s===!0&&(n[o]=!0);return n}catch{return{}}}function Pg(e){const n={...Rg()};for(const[o,s]of Object.entries(e))s?n[o]=!0:delete n[o];Es(dn.unread,JSON.stringify(n))}function pH(){const e=Fu(dn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function wh(e){T1(dn.collapsedWorkspaces,Array.from(e))}function hH(){const e=Fu(dn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function HT(e){T1(dn.workspaceOrder,Array.from(e))}function g3(){const e=Fu(dn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,o]of Object.entries(e))typeof o=="string"&&(t[n]=o);return t}function xk(e){T1(dn.workspaceNameOverrides,e)}function mH(){return ls(dn.workspaceSort)}function DT(e){Es(dn.workspaceSort,e)}function gH(e,t){if(e.length===0)return null;const n=new Set(e),o=t.filter(i=>n.has(i)),s=e.filter(i=>!t.includes(i));return s.length===0&&o.length===t.length?null:[...s,...o]}function vH(e,t){const n=new Map(t.map((o,s)=>[o,s]));return e.toSorted((o,s)=>(n.get(o.id)??-1)-(n.get(s.id)??-1))}function yH(e,t,n,o="before"){const s=e.indexOf(t),i=e.indexOf(n);if(s===-1||i===-1||s===i)return e;const l=[...e];l.splice(s,1);const r=s(t.get(o.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}const kH={"&":"&","<":"<",">":">",'"':""","'":"'"};function Sk(e){return e.replace(/[&<>"']/g,t=>kH[t]??t)}function bH(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _H(e,t,n=40){const o=e.replace(/\s+/g," ").trim();if(o.length===0)return"";const s=t.trim();if(s.length===0)return Ck(o,n*2);const i=o.toLowerCase().indexOf(s.toLowerCase());if(i<0)return Ck(o,n*2);const l=Math.max(0,i-n),r=Math.min(o.length,i+s.length+n),a=l>0,c=r`${i}`)}const m0=V(0),xH=["type","disabled","aria-label"],SH=Je({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},type:{default:"button"}},setup(e,{expose:t}){const n=V();return t({el:n}),(o,s)=>(g(),S("button",{ref_key:"el",ref:n,class:Be(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[jn(o.$slots,"default",{},void 0,!0)],10,xH))}}),vt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Dt=vt(SH,[["__scopeId","data-v-4b23513f"]]),v3=V(!1);let Mk=!1;function kh(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function Ip(){return!Mk&&typeof window<"u"&&typeof document<"u"&&(Mk=!0,v3.value=kh(),new MutationObserver(()=>{v3.value=kh()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia?.("(prefers-color-scheme: dark)")?.addEventListener("change",()=>{v3.value=kh()})),v3}const VT="file",CH="folder",y3={"._sc_":"godot-assets",".adonisrc.json":"adonis",".aiexclude":"gemini-ai",".angular-cli.json":"angular",".appveyor.yml":"appveyor",".astylerc":"astyle",".autorc":"auto",".babel-plugin-macrosrc":"babel",".babel-plugin-macrosrc.cjs":"babel",".babel-plugin-macrosrc.cts":"babel",".babel-plugin-macrosrc.js":"babel",".babel-plugin-macrosrc.json":"babel",".babel-plugin-macrosrc.json5":"babel",".babel-plugin-macrosrc.jsonc":"babel",".babel-plugin-macrosrc.mjs":"babel",".babel-plugin-macrosrc.mts":"babel",".babel-plugin-macrosrc.toml":"babel",".babel-plugin-macrosrc.ts":"babel",".babel-plugin-macrosrc.yaml":"babel",".babel-plugin-macrosrc.yml":"babel",".babelrc":"babel",".babelrc.cjs":"babel",".babelrc.cts":"babel",".babelrc.js":"babel",".babelrc.json":"babel",".babelrc.json5":"babel",".babelrc.jsonc":"babel",".babelrc.mjs":"babel",".babelrc.mts":"babel",".babelrc.toml":"babel",".babelrc.ts":"babel",".babelrc.yaml":"babel",".babelrc.yml":"babel",".bazelignore":"bazel",".bazelrc":"bazel",".bazelversion":"bazel",".biome.json":"biome",".biome.jsonc":"biome",".bithoundrc":"bithound",".blitz.config.compiled.js":"blitz",".bowerrc":"bower",".browserslistrc":"browserlist",".buckconfig":"buck",".buildignore":"settings",".bun-version":"bun",".cfignore":"cloudfoundry",".clang-format":"settings",".clang-format-ignore":"settings",".clang-tidy":"settings",".clangd":"clangd",".clinerules":"cline",".codeclimate.yml":"code-climate",".codecov.yaml":"codecov",".codecov.yml":"codecov",".coderabbit.yaml":"coderabbit-ai",".coderabbit.yml":"coderabbit-ai",".commitlint.yaml":"commitlint",".commitlint.yml":"commitlint",".commitlintrc":"commitlint",".commitlintrc.cjs":"commitlint",".commitlintrc.cts":"commitlint",".commitlintrc.js":"commitlint",".commitlintrc.json":"commitlint",".commitlintrc.json5":"commitlint",".commitlintrc.jsonc":"commitlint",".commitlintrc.mjs":"commitlint",".commitlintrc.mts":"commitlint",".commitlintrc.toml":"commitlint",".commitlintrc.ts":"commitlint",".commitlintrc.yaml":"commitlint",".commitlintrc.yml":"commitlint",".conf":"settings",".config/babel-plugin-macrosrc":"babel",".config/babel-plugin-macrosrc.cjs":"babel",".config/babel-plugin-macrosrc.cts":"babel",".config/babel-plugin-macrosrc.js":"babel",".config/babel-plugin-macrosrc.json":"babel",".config/babel-plugin-macrosrc.json5":"babel",".config/babel-plugin-macrosrc.jsonc":"babel",".config/babel-plugin-macrosrc.mjs":"babel",".config/babel-plugin-macrosrc.mts":"babel",".config/babel-plugin-macrosrc.toml":"babel",".config/babel-plugin-macrosrc.ts":"babel",".config/babel-plugin-macrosrc.yaml":"babel",".config/babel-plugin-macrosrc.yml":"babel",".config/babelrc":"babel",".config/babelrc.cjs":"babel",".config/babelrc.cts":"babel",".config/babelrc.js":"babel",".config/babelrc.json":"babel",".config/babelrc.json5":"babel",".config/babelrc.jsonc":"babel",".config/babelrc.mjs":"babel",".config/babelrc.mts":"babel",".config/babelrc.toml":"babel",".config/babelrc.ts":"babel",".config/babelrc.yaml":"babel",".config/babelrc.yml":"babel",".config/commitlintrc":"commitlint",".config/commitlintrc.cjs":"commitlint",".config/commitlintrc.cts":"commitlint",".config/commitlintrc.js":"commitlint",".config/commitlintrc.json":"commitlint",".config/commitlintrc.json5":"commitlint",".config/commitlintrc.jsonc":"commitlint",".config/commitlintrc.mjs":"commitlint",".config/commitlintrc.mts":"commitlint",".config/commitlintrc.toml":"commitlint",".config/commitlintrc.ts":"commitlint",".config/commitlintrc.yaml":"commitlint",".config/commitlintrc.yml":"commitlint",".config/cracorc":"craco",".config/cracorc.cjs":"craco",".config/cracorc.cts":"craco",".config/cracorc.js":"craco",".config/cracorc.json":"craco",".config/cracorc.json5":"craco",".config/cracorc.jsonc":"craco",".config/cracorc.mjs":"craco",".config/cracorc.mts":"craco",".config/cracorc.toml":"craco",".config/cracorc.ts":"craco",".config/cracorc.yaml":"craco",".config/cracorc.yml":"craco",".config/eslintrc":"eslint",".config/eslintrc.cjs":"eslint",".config/eslintrc.cts":"eslint",".config/eslintrc.js":"eslint",".config/eslintrc.json":"eslint",".config/eslintrc.json5":"eslint",".config/eslintrc.jsonc":"eslint",".config/eslintrc.mjs":"eslint",".config/eslintrc.mts":"eslint",".config/eslintrc.toml":"eslint",".config/eslintrc.ts":"eslint",".config/eslintrc.yaml":"eslint",".config/eslintrc.yml":"eslint",".config/graphqlrc":"graphql",".config/graphqlrc.cjs":"graphql",".config/graphqlrc.cts":"graphql",".config/graphqlrc.js":"graphql",".config/graphqlrc.json":"graphql",".config/graphqlrc.json5":"graphql",".config/graphqlrc.jsonc":"graphql",".config/graphqlrc.mjs":"graphql",".config/graphqlrc.mts":"graphql",".config/graphqlrc.toml":"graphql",".config/graphqlrc.ts":"graphql",".config/graphqlrc.yaml":"graphql",".config/graphqlrc.yml":"graphql",".config/huskyrc":"husky",".config/huskyrc.cjs":"husky",".config/huskyrc.cts":"husky",".config/huskyrc.js":"husky",".config/huskyrc.json":"husky",".config/huskyrc.json5":"husky",".config/huskyrc.jsonc":"husky",".config/huskyrc.mjs":"husky",".config/huskyrc.mts":"husky",".config/huskyrc.toml":"husky",".config/huskyrc.ts":"husky",".config/huskyrc.yaml":"husky",".config/huskyrc.yml":"husky",".config/postcssrc":"postcss",".config/postcssrc.cjs":"postcss",".config/postcssrc.cts":"postcss",".config/postcssrc.js":"postcss",".config/postcssrc.json":"postcss",".config/postcssrc.json5":"postcss",".config/postcssrc.jsonc":"postcss",".config/postcssrc.mjs":"postcss",".config/postcssrc.mts":"postcss",".config/postcssrc.toml":"postcss",".config/postcssrc.ts":"postcss",".config/postcssrc.yaml":"postcss",".config/postcssrc.yml":"postcss",".config/posthtmlrc":"posthtml",".config/posthtmlrc.cjs":"posthtml",".config/posthtmlrc.cts":"posthtml",".config/posthtmlrc.js":"posthtml",".config/posthtmlrc.json":"posthtml",".config/posthtmlrc.json5":"posthtml",".config/posthtmlrc.jsonc":"posthtml",".config/posthtmlrc.mjs":"posthtml",".config/posthtmlrc.mts":"posthtml",".config/posthtmlrc.toml":"posthtml",".config/posthtmlrc.ts":"posthtml",".config/posthtmlrc.yaml":"posthtml",".config/posthtmlrc.yml":"posthtml",".config/prettierrc":"prettier",".config/prettierrc.cjs":"prettier",".config/prettierrc.cts":"prettier",".config/prettierrc.js":"prettier",".config/prettierrc.json":"prettier",".config/prettierrc.json5":"prettier",".config/prettierrc.jsonc":"prettier",".config/prettierrc.mjs":"prettier",".config/prettierrc.mts":"prettier",".config/prettierrc.toml":"prettier",".config/prettierrc.ts":"prettier",".config/prettierrc.yaml":"prettier",".config/prettierrc.yml":"prettier",".config/puppeteerrc":"puppeteer",".config/puppeteerrc.cjs":"puppeteer",".config/puppeteerrc.cts":"puppeteer",".config/puppeteerrc.js":"puppeteer",".config/puppeteerrc.json":"puppeteer",".config/puppeteerrc.json5":"puppeteer",".config/puppeteerrc.jsonc":"puppeteer",".config/puppeteerrc.mjs":"puppeteer",".config/puppeteerrc.mts":"puppeteer",".config/puppeteerrc.toml":"puppeteer",".config/puppeteerrc.ts":"puppeteer",".config/puppeteerrc.yaml":"puppeteer",".config/puppeteerrc.yml":"puppeteer",".config/releaserc":"semantic-release",".config/releaserc.cjs":"semantic-release",".config/releaserc.cts":"semantic-release",".config/releaserc.js":"semantic-release",".config/releaserc.json":"semantic-release",".config/releaserc.json5":"semantic-release",".config/releaserc.jsonc":"semantic-release",".config/releaserc.mjs":"semantic-release",".config/releaserc.mts":"semantic-release",".config/releaserc.toml":"semantic-release",".config/releaserc.ts":"semantic-release",".config/releaserc.yaml":"semantic-release",".config/releaserc.yml":"semantic-release",".config/stylelintrc":"stylelint",".config/stylelintrc.cjs":"stylelint",".config/stylelintrc.cts":"stylelint",".config/stylelintrc.js":"stylelint",".config/stylelintrc.json":"stylelint",".config/stylelintrc.json5":"stylelint",".config/stylelintrc.jsonc":"stylelint",".config/stylelintrc.mjs":"stylelint",".config/stylelintrc.mts":"stylelint",".config/stylelintrc.toml":"stylelint",".config/stylelintrc.ts":"stylelint",".config/stylelintrc.yaml":"stylelint",".config/stylelintrc.yml":"stylelint",".config/svgrrc":"svgr",".config/svgrrc.cjs":"svgr",".config/svgrrc.cts":"svgr",".config/svgrrc.js":"svgr",".config/svgrrc.json":"svgr",".config/svgrrc.json5":"svgr",".config/svgrrc.jsonc":"svgr",".config/svgrrc.mjs":"svgr",".config/svgrrc.mts":"svgr",".config/svgrrc.toml":"svgr",".config/svgrrc.ts":"svgr",".config/svgrrc.yaml":"svgr",".config/svgrrc.yml":"svgr",".config/syncpackrc":"syncpack",".config/syncpackrc.cjs":"syncpack",".config/syncpackrc.cts":"syncpack",".config/syncpackrc.js":"syncpack",".config/syncpackrc.json":"syncpack",".config/syncpackrc.json5":"syncpack",".config/syncpackrc.jsonc":"syncpack",".config/syncpackrc.mjs":"syncpack",".config/syncpackrc.mts":"syncpack",".config/syncpackrc.toml":"syncpack",".config/syncpackrc.ts":"syncpack",".config/syncpackrc.yaml":"syncpack",".config/syncpackrc.yml":"syncpack",".copilotignore":"copilot",".coverage":"python-misc",".coveragerc":"python-misc",".cracorc":"craco",".cracorc.cjs":"craco",".cracorc.cts":"craco",".cracorc.js":"craco",".cracorc.json":"craco",".cracorc.json5":"craco",".cracorc.jsonc":"craco",".cracorc.mjs":"craco",".cracorc.mts":"craco",".cracorc.toml":"craco",".cracorc.ts":"craco",".cracorc.yaml":"craco",".cracorc.yml":"craco",".cursor":"cursor",".cursor.json":"cursor",".cursorignore":"cursor",".cursorindexingignore":"cursor",".cursorrc":"cursor",".cursorrules":"cursor",".cz.json":"commitizen",".cz.toml":"commitizen",".cz.yaml":"commitizen",".cz.yml":"commitizen",".czrc":"commitizen",".deepsource.toml":"deepsource",".dev.vars":"tune",".drone.yml":"drone",".easignore":"expo",".ecrc":"editorconfig",".editorconfig":"editorconfig",".editorconfig-checker.json":"editorconfig",".ember-cli":"ember",".ember-cli.js":"ember",".env.alpha":"tune",".env.defaults":"tune",".env.dev":"tune",".env.dev.local":"tune",".env.development":"tune",".env.development.local":"tune",".env.dist":"tune",".env.e2e":"tune",".env.example":"tune",".env.local":"tune",".env.preview":"tune",".env.prod":"tune",".env.prod.example":"tune",".env.prod.local":"tune",".env.production":"tune",".env.production.example":"tune",".env.production.local":"tune",".env.qa":"tune",".env.qa.local":"tune",".env.sample":"tune",".env.schema":"tune",".env.sentry-build-plugin":"sentry",".env.stage":"tune",".env.staging":"tune",".env.staging.local":"tune",".env.stg":"tune",".env.stg.local":"tune",".env.template":"tune",".env.test":"tune",".env.test.local":"tune",".env.testing":"tune",".env.uat":"tune",".envrc":"console",".esformatter":"json",".eslintcache":"eslint",".eslintignore":"eslint",".eslintrc":"eslint",".eslintrc-jsdoc.js":"eslint",".eslintrc-md.js":"eslint",".eslintrc.base.json":"eslint",".eslintrc.cjs":"eslint",".eslintrc.cts":"eslint",".eslintrc.js":"eslint",".eslintrc.json":"eslint",".eslintrc.json5":"eslint",".eslintrc.jsonc":"eslint",".eslintrc.mjs":"eslint",".eslintrc.mts":"eslint",".eslintrc.toml":"eslint",".eslintrc.ts":"eslint",".eslintrc.yaml":"eslint",".eslintrc.yml":"eslint",".esmrc":"nodejs",".firebaserc":"firebase",".flowconfig":"flow",".gardenignore":"garden",".gcloudignore":"gcp",".gdignore":"godot-assets",".git":"git",".git-blame-ignore":"git",".git-blame-ignore-revs":"git",".git-for-windows-updater":"git",".gitattributes":"git",".gitattributes-global":"git",".gitattributes_global":"git",".gitconfig":"git",".github/funding.yml":"github-sponsors",".github/labeler.yaml":"label",".github/labeler.yml":"label",".gitignore":"git",".gitignore-global":"git",".gitignore_global":"git",".gitinclude":"git",".gitkeep":"git",".gitmessage":"git",".gitmodules":"git",".gitpod.yml":"gitpod",".gitpreserve":"git",".graphqlconfig":"graphql",".graphqlrc":"graphql",".graphqlrc.cjs":"graphql",".graphqlrc.cts":"graphql",".graphqlrc.js":"graphql",".graphqlrc.json":"graphql",".graphqlrc.json5":"graphql",".graphqlrc.jsonc":"graphql",".graphqlrc.mjs":"graphql",".graphqlrc.mts":"graphql",".graphqlrc.toml":"graphql",".graphqlrc.ts":"graphql",".graphqlrc.yaml":"graphql",".graphqlrc.yml":"graphql",".hadolint.yaml":"hadolint",".hadolint.yml":"hadolint",".happo.cjs":"happo",".happo.js":"happo",".happo.mjs":"happo",".helmignore":"helm",".hg":"mercurial",".hgflow":"mercurial",".hgignore":"mercurial",".hgrc":"mercurial",".hgtags":"mercurial",".hhconfig":"hack",".hintrc":"webhint",".histoire.cjs":"histoire",".histoire.cts":"histoire",".histoire.js":"histoire",".histoire.mjs":"histoire",".histoire.mts":"histoire",".histoire.ts":"histoire",".htaccess":"xml",".htpasswd":"key",".hushlogin":"console",".huskyrc":"husky",".huskyrc.cjs":"husky",".huskyrc.cts":"husky",".huskyrc.js":"husky",".huskyrc.json":"husky",".huskyrc.json5":"husky",".huskyrc.jsonc":"husky",".huskyrc.mjs":"husky",".huskyrc.mts":"husky",".huskyrc.toml":"husky",".huskyrc.ts":"husky",".huskyrc.yaml":"husky",".huskyrc.yml":"husky",".io-config.json":"ionic",".istanbul.yml":"istanbul",".jestrc":"jest",".jestrc.js":"jest",".jestrc.json":"jest",".jsbeautifyrc":"json",".jscsrc":"json",".jshintignore":"settings",".jshintrc":"json",".justfile":"just",".k8s.yaml":"kubernetes",".k8s.yml":"kubernetes",".keep":"git",".kl":"kl",".knip.json":"knip",".knip.jsonc":"knip",".latexmkrc":"latexmk",".lefthook-local.json":"lefthook",".lefthook-local.toml":"lefthook",".lefthook-local.yaml":"lefthook",".lefthook-local.yml":"lefthook",".lefthook.json":"lefthook",".lefthook.toml":"lefthook",".lefthook.yaml":"lefthook",".lefthook.yml":"lefthook",".lefthookrc":"lefthook",".liaraignore":"liara",".lighthouserc.cjs":"lighthouse",".lighthouserc.js":"lighthouse",".lighthouserc.json":"lighthouse",".lighthouserc.yaml":"lighthouse",".lighthouserc.yml":"lighthouse",".lintstagedrc":"lintstaged",".lintstagedrc.cjs":"lintstaged",".lintstagedrc.js":"lintstaged",".lintstagedrc.json":"lintstaged",".lintstagedrc.mjs":"lintstaged",".lintstagedrc.yaml":"lintstaged",".lintstagedrc.yml":"lintstaged",".luacheckrc":"lua",".luaurc":"luau",".mailmap":"email",".markdownlint-cli2.cjs":"markdownlint",".markdownlint-cli2.jsonc":"markdownlint",".markdownlint-cli2.mjs":"markdownlint",".markdownlint-cli2.yaml":"markdownlint",".markdownlint.json":"markdownlint",".markdownlint.jsonc":"markdownlint",".markdownlint.yaml":"markdownlint",".markdownlint.yml":"markdownlint",".markdownlintignore":"markdownlint",".mcattributes":"minecraft",".mcdefinitions":"minecraft",".mcignore":"minecraft",".mincloudrc":"ifanr-cloud",".mjmlconfig":"mjml",".mocharc.cjs":"mocha",".mocharc.js":"mocha",".mocharc.json":"mocha",".mocharc.jsonc":"mocha",".mocharc.yaml":"mocha",".mocharc.yml":"mocha",".modernizrrc":"modernizr",".modernizrrc.js":"modernizr",".modernizrrc.json":"modernizr",".mrconfig":"settings",".nano-staged.cjs":"nano-staged",".nano-staged.js":"nano-staged",".nano-staged.json":"nano-staged",".nano-staged.mjs":"nano-staged",".nanostagedrc":"nano-staged",".nest-cli.json":"nest",".nestconfig.json":"nest",".node-version":"nodejs",".nowignore":"vercel",".npmignore":"npm",".npmrc":"npm",".nuspec":"nuget",".nuxtignore":"nuxt",".nuxtrc":"nuxt",".nvmrc":"nodejs",".nxignore":"nx",".nycrc":"istanbul",".nycrc.json":"istanbul",".nycrc.yaml":"istanbul",".nycrc.yml":"istanbul",".oxfmtrc.json":"oxc",".oxfmtrc.jsonc":"oxc",".oxlintrc.json":"oxc",".oxlintrc.jsonc":"oxc",".packshiprc":"packship",".packshiprc.js":"packship",".packshiprc.json":"packship",".packshiprc.ts":"packship",".parcelrc":"parcel",".pdm-python":"pdm",".percy.yml":"percy",".php-cs-fixer.dist.php":"php-cs-fixer",".php-cs-fixer.php":"php-cs-fixer",".php_cs":"php-cs-fixer",".php_cs.dist":"php-cs-fixer",".php_cs.dist.php":"php-cs-fixer",".php_cs.php":"php-cs-fixer",".phpunit-watcher.yml":"phpunit",".phpunit.result.cache":"phpunit",".pnpmfile.cjs":"pnpm",".postcssrc":"postcss",".postcssrc.cjs":"postcss",".postcssrc.cts":"postcss",".postcssrc.js":"postcss",".postcssrc.json":"postcss",".postcssrc.json5":"postcss",".postcssrc.jsonc":"postcss",".postcssrc.mjs":"postcss",".postcssrc.mts":"postcss",".postcssrc.toml":"postcss",".postcssrc.ts":"postcss",".postcssrc.yaml":"postcss",".postcssrc.yml":"postcss",".posthtmlrc":"posthtml",".posthtmlrc.cjs":"posthtml",".posthtmlrc.cts":"posthtml",".posthtmlrc.js":"posthtml",".posthtmlrc.json":"posthtml",".posthtmlrc.json5":"posthtml",".posthtmlrc.jsonc":"posthtml",".posthtmlrc.mjs":"posthtml",".posthtmlrc.mts":"posthtml",".posthtmlrc.toml":"posthtml",".posthtmlrc.ts":"posthtml",".posthtmlrc.yaml":"posthtml",".posthtmlrc.yml":"posthtml",".pre-commit-config.yaml":"pre-commit",".pre-commit-hooks.yaml":"pre-commit",".prettierignore":"prettier",".prettierrc":"prettier",".prettierrc.cjs":"prettier",".prettierrc.cts":"prettier",".prettierrc.js":"prettier",".prettierrc.json":"prettier",".prettierrc.json5":"prettier",".prettierrc.jsonc":"prettier",".prettierrc.mjs":"prettier",".prettierrc.mts":"prettier",".prettierrc.toml":"prettier",".prettierrc.ts":"prettier",".prettierrc.yaml":"prettier",".prettierrc.yml":"prettier",".pubignore":"dart",".pug-lintrc":"pug",".pug-lintrc.js":"pug",".pug-lintrc.json":"pug",".puppeteerrc":"puppeteer",".puppeteerrc.cjs":"puppeteer",".puppeteerrc.cts":"puppeteer",".puppeteerrc.js":"puppeteer",".puppeteerrc.json":"puppeteer",".puppeteerrc.json5":"puppeteer",".puppeteerrc.jsonc":"puppeteer",".puppeteerrc.mjs":"puppeteer",".puppeteerrc.mts":"puppeteer",".puppeteerrc.toml":"puppeteer",".puppeteerrc.ts":"puppeteer",".puppeteerrc.yaml":"puppeteer",".puppeteerrc.yml":"puppeteer",".pylintrc":"python-misc",".python-version":"python-misc",".qa-mincloudrc":"ifanr-cloud",".release-it.cjs":"rocket",".release-it.js":"rocket",".release-it.json":"rocket",".release-it.toml":"rocket",".release-it.ts":"rocket",".release-it.yaml":"rocket",".release-it.yml":"rocket",".release-plz.toml":"rocket",".releaserc":"semantic-release",".releaserc.cjs":"semantic-release",".releaserc.cts":"semantic-release",".releaserc.js":"semantic-release",".releaserc.json":"semantic-release",".releaserc.json5":"semantic-release",".releaserc.jsonc":"semantic-release",".releaserc.mjs":"semantic-release",".releaserc.mts":"semantic-release",".releaserc.toml":"semantic-release",".releaserc.ts":"semantic-release",".releaserc.yaml":"semantic-release",".releaserc.yml":"semantic-release",".remarkignore":"remark",".remarkrc":"remark",".remarkrc.cjs":"remark",".remarkrc.js":"remark",".remarkrc.json":"remark",".remarkrc.mjs":"remark",".remarkrc.yaml":"remark",".remarkrc.yml":"remark",".renovaterc":"renovate",".renovaterc.json":"renovate",".replit":"replit",".rhistory":"r",".rspec":"rspec",".rubocop-todo.yml":"rubocop",".rubocop.yml":"rubocop",".rubocop_todo.yml":"rubocop",".ruby-version":"ruby",".ruff.toml":"ruff",".scrapy":"python-misc",".secrets":"key",".semgrepignore":"semgrep",".sentryclirc":"sentry",".sequelizerc":"sequelize",".shellcheckrc":"shellcheck",".slugignore":"slug",".snyk":"snyk",".sonarcloud.properties":"sonarcloud",".stackblitzrc":"stackblitz",".steadybit.yaml":"steadybit",".steadybit.yml":"steadybit",".stryker.conf.cjs":"stryker",".stryker.conf.js":"stryker",".stryker.conf.json":"stryker",".stryker.conf.mjs":"stryker",".stryker.config.cjs":"stryker",".stryker.config.js":"stryker",".stryker.config.json":"stryker",".stryker.config.mjs":"stryker",".stylelintcache":"stylelint",".stylelintignore":"stylelint",".stylelintrc":"stylelint",".stylelintrc.cjs":"stylelint",".stylelintrc.cts":"stylelint",".stylelintrc.js":"stylelint",".stylelintrc.json":"stylelint",".stylelintrc.json5":"stylelint",".stylelintrc.jsonc":"stylelint",".stylelintrc.mjs":"stylelint",".stylelintrc.mts":"stylelint",".stylelintrc.toml":"stylelint",".stylelintrc.ts":"stylelint",".stylelintrc.yaml":"stylelint",".stylelintrc.yml":"stylelint",".svgrrc":"svgr",".svgrrc.cjs":"svgr",".svgrrc.cts":"svgr",".svgrrc.js":"svgr",".svgrrc.json":"svgr",".svgrrc.json5":"svgr",".svgrrc.jsonc":"svgr",".svgrrc.mjs":"svgr",".svgrrc.mts":"svgr",".svgrrc.toml":"svgr",".svgrrc.ts":"svgr",".svgrrc.yaml":"svgr",".svgrrc.yml":"svgr",".swift-format":"swift",".swift-version":"swift",".swiftformat":"swift",".syncpackrc":"syncpack",".syncpackrc.cjs":"syncpack",".syncpackrc.cts":"syncpack",".syncpackrc.js":"syncpack",".syncpackrc.json":"syncpack",".syncpackrc.json5":"syncpack",".syncpackrc.jsonc":"syncpack",".syncpackrc.mjs":"syncpack",".syncpackrc.mts":"syncpack",".syncpackrc.toml":"syncpack",".syncpackrc.ts":"syncpack",".syncpackrc.yaml":"syncpack",".syncpackrc.yml":"syncpack",".taskrc.yaml":"taskfile",".taskrc.yml":"taskfile",".taurignore":"tauri",".tazerc":"taze",".tazerc.json":"taze",".textlintignore":"textlint",".textlintrc":"textlint",".textlintrc.cjs":"textlint",".textlintrc.js":"textlint",".textlintrc.json":"textlint",".textlintrc.yaml":"textlint",".textlintrc.yml":"textlint",".tobimake":"tobimake",".travis.yml":"travis",".umirc.cjs":"umi",".umirc.cts":"umi",".umirc.js":"umi",".umirc.mjs":"umi",".umirc.mts":"umi",".umirc.ts":"umi",".uv.toml":"uv",".vars":"tune",".vercelignore":"vercel",".vfl":"vfl",".vsconfig":"visualstudio",".vuerc":"vue-config",".wakatime-project":"wakatime",".watchmanconfig":"watchman",".whitesource":"json",".yardopts":"settings",".yarn-integrity":"yarn",".yarnclean":"yarn",".yarnrc":"yarn",".yarnrc.yaml":"yarn",".yarnrc.yml":"yarn",_sc_:"godot-assets",ace:"adonis","amplify.yml":"amplify","androidmanifest.xml":"android","angular-cli.json":"angular","angular.json":"angular",apkbuild:"console","apollo.config.js":"apollo",appfile:"fastlane",appraisals:"ruby","appveyor.yml":"appveyor","appwrite.js":"appwrite","appwrite.json":"appwrite","appwrite.ts":"appwrite",architecture:"architecture","architecture.md":"architecture","architecture.rst":"architecture","architecture.txt":"architecture",artisan:"laravel","astro.config.cjs":"astro-config","astro.config.cts":"astro-config","astro.config.js":"astro-config","astro.config.mjs":"astro-config","astro.config.mts":"astro-config","astro.config.ts":"astro-config","aurelia.json":"aurelia",authors:"authors","authors.md":"authors","authors.rst":"authors","authors.txt":"authors","auto-config.js":"auto","auto-config.json":"auto","auto-config.ts":"auto","auto-config.yaml":"auto","auto-config.yml":"auto","auto.config.js":"auto","auto.config.ts":"auto","azure-pipelines-main.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines.yml":"azure-pipelines","babel-plugin-macros.config.cjs":"babel","babel-plugin-macros.config.cts":"babel","babel-plugin-macros.config.js":"babel","babel-plugin-macros.config.json":"babel","babel-plugin-macros.config.json5":"babel","babel-plugin-macros.config.jsonc":"babel","babel-plugin-macros.config.mjs":"babel","babel-plugin-macros.config.mts":"babel","babel-plugin-macros.config.toml":"babel","babel-plugin-macros.config.ts":"babel","babel-plugin-macros.config.yaml":"babel","babel-plugin-macros.config.yml":"babel","babel-transform.js":"babel","babel.config.cjs":"babel","babel.config.cts":"babel","babel.config.js":"babel","babel.config.json":"babel","babel.config.json5":"babel","babel.config.jsonc":"babel","babel.config.mjs":"babel","babel.config.mts":"babel","babel.config.toml":"babel","babel.config.ts":"babel","babel.config.yaml":"babel","babel.config.yml":"babel",bashrc_apple_terminal:"console",berksfile:"ruby","berksfile.lock":"ruby","biome.json":"biome","biome.jsonc":"biome","bitbucket-pipelines.yaml":"bitbucket","bitbucket-pipelines.yml":"bitbucket","blitz.config.js":"blitz","blitz.config.ts":"blitz","bower.json":"bower",brewfile:"ruby",browserslist:"browserlist","buildkite.yaml":"buildkite","buildkite.yml":"buildkite","bun.lock":"bun","bun.lockb":"bun","bunfig.toml":"bun","cabal.project":"cabal","cabal.project.freeze":"cabal","cabal.project.local":"cabal",caddyfile:"caddy","capacitor.config.json":"capacitor","capacitor.config.ts":"capacitor",capfile:"ruby","cdp.pid":"json","celerybeat-schedule":"python-misc","celerybeat.pid":"python-misc",changelog:"changelog","changelog.md":"changelog","changelog.rst":"changelog","changelog.txt":"changelog",changes:"changelog","changes.md":"changelog","changes.rst":"changelog","changes.txt":"changelog",cheffile:"ruby","chromatic.config.json":"chromatic","circle.yml":"circleci","citation.cff":"citation","claude.local.md":"claude","claude.md":"claude","cmakecache.txt":"cmake","cmakelists.txt":"cmake","cmakepresets.json":"cmake",cname:"http",code_of_conduct:"conduct","code_of_conduct.md":"conduct","code_of_conduct.txt":"conduct","codecov.yaml":"codecov","codecov.yml":"codecov",codeowners:"codeowners","commit-msg":"console",commit_editmsg:"git","commitlint.config.cjs":"commitlint","commitlint.config.cts":"commitlint","commitlint.config.js":"commitlint","commitlint.config.json":"commitlint","commitlint.config.json5":"commitlint","commitlint.config.jsonc":"commitlint","commitlint.config.mjs":"commitlint","commitlint.config.mts":"commitlint","commitlint.config.toml":"commitlint","commitlint.config.ts":"commitlint","commitlint.config.yaml":"commitlint","commitlint.config.yml":"commitlint","compile_flags.txt":"settings","compose.alpha.yaml":"docker","compose.alpha.yml":"docker","compose.beta.yaml":"docker","compose.beta.yml":"docker","compose.ci.yaml":"docker","compose.ci.yml":"docker","compose.dev.yaml":"docker","compose.dev.yml":"docker","compose.development.yaml":"docker","compose.development.yml":"docker","compose.local.yaml":"docker","compose.local.yml":"docker","compose.override.yaml":"docker","compose.override.yml":"docker","compose.prod.yaml":"docker","compose.prod.yml":"docker","compose.production.yaml":"docker","compose.production.yml":"docker","compose.stage.yaml":"docker","compose.stage.yml":"docker","compose.staging.yaml":"docker","compose.staging.yml":"docker","compose.test.yaml":"docker","compose.test.yml":"docker","compose.testing.yaml":"docker","compose.testing.yml":"docker","compose.web.yaml":"docker","compose.web.yml":"docker","compose.worker.yaml":"docker","compose.worker.yml":"docker","compose.yaml":"docker","compose.yml":"docker","composer.lock":"json","concourse.yml":"concourse",containerfile:"docker","containerfile.alpha":"docker","containerfile.beta":"docker","containerfile.ci":"docker","containerfile.dev":"docker","containerfile.development":"docker","containerfile.local":"docker","containerfile.prod":"docker","containerfile.production":"docker","containerfile.stage":"docker","containerfile.staging":"docker","containerfile.test":"docker","containerfile.testing":"docker","containerfile.web":"docker","containerfile.worker":"docker","contentlayer.config.cjs":"contentlayer","contentlayer.config.cts":"contentlayer","contentlayer.config.js":"contentlayer","contentlayer.config.mjs":"contentlayer","contentlayer.config.mts":"contentlayer","contentlayer.config.ts":"contentlayer",contributing:"contributing","contributing.md":"contributing","contributing.rst":"contributing","contributing.txt":"contributing",contributors:"authors","contributors.md":"authors","contributors.rst":"authors","contributors.txt":"authors","copilot-instructions.md":"copilot",copying:"license","copying.md":"license","copying.rst":"license","copying.txt":"license",copyright:"license","copyright.md":"license","copyright.rst":"license","copyright.txt":"license","craco.config.cjs":"craco","craco.config.cts":"craco","craco.config.js":"craco","craco.config.json":"craco","craco.config.json5":"craco","craco.config.jsonc":"craco","craco.config.mjs":"craco","craco.config.mts":"craco","craco.config.toml":"craco","craco.config.ts":"craco","craco.config.yaml":"craco","craco.config.yml":"craco",credits:"credits","credits.md":"credits","credits.rst":"credits","credits.txt":"credits","cypress.config.cjs":"cypress","cypress.config.cts":"cypress","cypress.config.js":"cypress","cypress.config.mjs":"cypress","cypress.config.mts":"cypress","cypress.config.ts":"cypress","cypress.env.json":"cypress","cypress.json":"cypress","cz.json":"commitizen","cz.toml":"commitizen","cz.yaml":"commitizen","cz.yml":"commitizen",dangerfile:"ruby",deliverfile:"ruby","deno.json":"deno","deno.jsonc":"deno","deno.lock":"deno","dependabot.yaml":"dependabot","dependabot.yml":"dependabot","docker-compose.alpha.yaml":"docker","docker-compose.alpha.yml":"docker","docker-compose.beta.yaml":"docker","docker-compose.beta.yml":"docker","docker-compose.ci.yaml":"docker","docker-compose.ci.yml":"docker","docker-compose.dev.yaml":"docker","docker-compose.dev.yml":"docker","docker-compose.development.yaml":"docker","docker-compose.development.yml":"docker","docker-compose.local.yaml":"docker","docker-compose.local.yml":"docker","docker-compose.override.yaml":"docker","docker-compose.override.yml":"docker","docker-compose.prod.yaml":"docker","docker-compose.prod.yml":"docker","docker-compose.production.yaml":"docker","docker-compose.production.yml":"docker","docker-compose.stage.yaml":"docker","docker-compose.stage.yml":"docker","docker-compose.staging.yaml":"docker","docker-compose.staging.yml":"docker","docker-compose.test.yaml":"docker","docker-compose.test.yml":"docker","docker-compose.testing.yaml":"docker","docker-compose.testing.yml":"docker","docker-compose.web.yaml":"docker","docker-compose.web.yml":"docker","docker-compose.worker.yaml":"docker","docker-compose.worker.yml":"docker","docker-compose.yaml":"docker","docker-compose.yml":"docker",dockerfile:"docker","dockerfile.alpha":"docker","dockerfile.beta":"docker","dockerfile.ci":"docker","dockerfile.dev":"docker","dockerfile.development":"docker","dockerfile.local":"docker","dockerfile.prod":"docker","dockerfile.production":"docker","dockerfile.stage":"docker","dockerfile.staging":"docker","dockerfile.test":"docker","dockerfile.testing":"docker","dockerfile.web":"docker","dockerfile.windows":"docker","dockerfile.worker":"docker","drizzle.config.dev.js":"drizzle","drizzle.config.dev.json":"drizzle","drizzle.config.dev.ts":"drizzle","drizzle.config.js":"drizzle","drizzle.config.json":"drizzle","drizzle.config.prod.js":"drizzle","drizzle.config.prod.json":"drizzle","drizzle.config.prod.ts":"drizzle","drizzle.config.ts":"drizzle","duc.fbs":"duc",dune:"dune","dune-project":"dune","dune-workspace":"dune","dune-workspace.dev":"dune","eas.json":"expo","ecosystem.config.cjs":"pm2-ecosystem","ecosystem.config.cts":"pm2-ecosystem","ecosystem.config.js":"pm2-ecosystem","ecosystem.config.mjs":"pm2-ecosystem","ecosystem.config.mts":"pm2-ecosystem","ecosystem.config.ts":"pm2-ecosystem","ember-cli-builds.js":"ember","esbuild.cjs":"esbuild","esbuild.config.cjs":"esbuild","esbuild.config.cts":"esbuild","esbuild.config.js":"esbuild","esbuild.config.mjs":"esbuild","esbuild.config.mts":"esbuild","esbuild.config.ts":"esbuild","esbuild.cts":"esbuild","esbuild.dev.cjs":"esbuild","esbuild.dev.cts":"esbuild","esbuild.dev.js":"esbuild","esbuild.dev.mjs":"esbuild","esbuild.dev.mts":"esbuild","esbuild.dev.ts":"esbuild","esbuild.js":"esbuild","esbuild.mjs":"esbuild","esbuild.mts":"esbuild","esbuild.prod.cjs":"esbuild","esbuild.prod.cts":"esbuild","esbuild.prod.js":"esbuild","esbuild.prod.mjs":"esbuild","esbuild.prod.mts":"esbuild","esbuild.prod.ts":"esbuild","esbuild.stage.cjs":"esbuild","esbuild.stage.cts":"esbuild","esbuild.stage.js":"esbuild","esbuild.stage.mjs":"esbuild","esbuild.stage.mts":"esbuild","esbuild.stage.ts":"esbuild","esbuild.test.cjs":"esbuild","esbuild.test.cts":"esbuild","esbuild.test.js":"esbuild","esbuild.test.mjs":"esbuild","esbuild.test.mts":"esbuild","esbuild.test.ts":"esbuild","esbuild.ts":"esbuild","eslint-options.js":"eslint","eslint.config.cjs":"eslint","eslint.config.cts":"eslint","eslint.config.js":"eslint","eslint.config.json":"eslint","eslint.config.json5":"eslint","eslint.config.jsonc":"eslint","eslint.config.mjs":"eslint","eslint.config.mts":"eslint","eslint.config.toml":"eslint","eslint.config.ts":"eslint","eslint.config.yaml":"eslint","eslint.config.yml":"eslint",excalidraw:"excalidraw","excalidraw.json":"excalidraw","excalidraw.png":"excalidraw","excalidraw.svg":"excalidraw","fabric.mod.json":"minecraft-fabric",fastfile:"fastlane","favicon.ico":"favicon","firebase.config.js":"firebase","firebase.json":"firebase","firestore.indexes.json":"firebase","firestore.rules":"firebase","fuse.js":"fusebox","garden.yaml":"garden","garden.yml":"garden","gatsby-browser.js":"gatsby","gatsby-browser.tsx":"gatsby","gatsby-config.js":"gatsby","gatsby-config.mjs":"gatsby","gatsby-config.ts":"gatsby","gatsby-node.js":"gatsby","gatsby-node.mjs":"gatsby","gatsby-node.ts":"gatsby","gatsby-ssr.js":"gatsby","gatsby-ssr.tsx":"gatsby",gemfile:"gemfile","gemini.md":"gemini-ai","git-history":"git","git-rebase-todo":"git","gleam.toml":"gleam",gnumakefile:"makefile","go.mod":"go-mod","go.sum":"go-mod","go.work":"go-mod","go.work.sum":"go-mod","google-services.json":"google","googleservice-info.plist":"google","gradle-wrapper.properties":"gradle","gradle.properties":"gradle",gradlew:"gradle","gradlew.bat":"gradle","graphql.config.cjs":"graphql","graphql.config.cts":"graphql","graphql.config.js":"graphql","graphql.config.json":"graphql","graphql.config.json5":"graphql","graphql.config.jsonc":"graphql","graphql.config.mjs":"graphql","graphql.config.mts":"graphql","graphql.config.toml":"graphql","graphql.config.ts":"graphql","graphql.config.yaml":"graphql","graphql.config.yml":"graphql","gridsome.config.js":"gridsome","gridsome.server.js":"gridsome","gruntfile.babel.coffee":"grunt","gruntfile.babel.js":"grunt","gruntfile.babel.ts":"grunt","gruntfile.cjs":"grunt","gruntfile.coffee":"grunt","gruntfile.cts":"grunt","gruntfile.js":"grunt","gruntfile.ts":"grunt",guardfile:"ruby","gulpfile.babel.js":"gulp","gulpfile.cjs":"gulp","gulpfile.cts":"gulp","gulpfile.js":"gulp","gulpfile.mjs":"gulp","gulpfile.mts":"gulp","gulpfile.ts":"gulp",gymfile:"ruby","hadolint.yaml":"hadolint","hadolint.yml":"hadolint","hardhat.config.js":"hardhat","hardhat.config.ts":"hardhat","harmonix.config.js":"harmonix","harmonix.config.ts":"harmonix",hgrc:"mercurial","histoire.config.cjs":"histoire","histoire.config.cts":"histoire","histoire.config.js":"histoire","histoire.config.mjs":"histoire","histoire.config.mts":"histoire","histoire.config.ts":"histoire",hobofile:"ruby","horusec-config.json":"horusec",hosts:"hosts","husky.config.cjs":"husky","husky.config.cts":"husky","husky.config.js":"husky","husky.config.json":"husky","husky.config.json5":"husky","husky.config.jsonc":"husky","husky.config.mjs":"husky","husky.config.mts":"husky","husky.config.toml":"husky","husky.config.ts":"husky","husky.config.yaml":"husky","husky.config.yml":"husky",install:"installation",installation:"installation","ionic.config.json":"ionic",jakefile:"javascript",jenkinsfile:"jenkins","jest-e2e.config.cjs":"jest","jest-e2e.config.cts":"jest","jest-e2e.config.js":"jest","jest-e2e.config.json":"jest","jest-e2e.config.mjs":"jest","jest-e2e.config.mts":"jest","jest-e2e.config.ts":"jest","jest-e2e.json":"jest","jest-github-actions-reporter.js":"jest","jest-preset.cjs":"jest","jest-preset.js":"jest","jest-preset.json":"jest","jest-preset.mjs":"jest","jest-unit.config.js":"jest","jest.config.cjs":"jest","jest.config.cts":"jest","jest.config.js":"jest","jest.config.json":"jest","jest.config.mjs":"jest","jest.config.mts":"jest","jest.config.ts":"jest","jest.e2e.config.cjs":"jest","jest.e2e.config.cts":"jest","jest.e2e.config.js":"jest","jest.e2e.config.json":"jest","jest.e2e.config.mjs":"jest","jest.e2e.config.mts":"jest","jest.e2e.config.ts":"jest","jest.e2e.json":"jest","jest.json":"jest","jest.preset.cjs":"jest","jest.preset.js":"jest","jest.preset.json":"jest","jest.preset.mjs":"jest","jest.setup.js":"jest","jest.setup.ts":"jest","jest.teardown.js":"jest","jsconfig.json":"jsconfig","jsr.json":"jsr","jsr.jsonc":"jsr",justfile:"just","jvm.config":"maven","k8s.yaml":"kubernetes","k8s.yml":"kubernetes","karma-main.js":"karma","karma-main.ts":"karma","karma.conf.coffee":"karma","karma.conf.js":"karma","karma.conf.ts":"karma","karma.config.js":"karma","karma.config.ts":"karma",kbuild:"makefile","kcl.mod":"kcl","kcl.yaml":"kcl","kcl.yml":"kcl","keystatic.config.js":"keystatic","keystatic.config.jsx":"keystatic","keystatic.config.ts":"keystatic","keystatic.config.tsx":"keystatic","knip.config.js":"knip","knip.config.ts":"knip","knip.js":"knip","knip.json":"knip","knip.jsonc":"knip","knip.ts":"knip","kubernetes.yaml":"kubernetes","kubernetes.yml":"kubernetes",latexmkrc:"latexmk","lefthook-local.json":"lefthook","lefthook-local.toml":"lefthook","lefthook-local.yaml":"lefthook","lefthook-local.yml":"lefthook","lefthook.json":"lefthook","lefthook.toml":"lefthook","lefthook.yaml":"lefthook","lefthook.yml":"lefthook",lefthookrc:"lefthook","lerna.json":"lerna","liara.json":"liara",licence:"license","licence-agpl":"license","licence-apache":"license","licence-bsd":"license","licence-gpl":"license","licence-lgpl":"license","licence-mit":"license","licence.md":"license","licence.rst":"license","licence.txt":"license",license:"license","license-agpl":"license","license-apache":"license","license-bsd":"license","license-gpl":"license","license-lgpl":"license","license-mit":"license","license.md":"license","license.rst":"license","license.txt":"license","lighthouserc.cjs":"lighthouse","lighthouserc.js":"lighthouse","lighthouserc.json":"lighthouse","lighthouserc.yaml":"lighthouse","lighthouserc.yml":"lighthouse","lint-staged.config.cjs":"lintstaged","lint-staged.config.js":"lintstaged","lint-staged.config.mjs":"lintstaged","lynx.config.cjs":"lynx","lynx.config.cts":"lynx","lynx.config.js":"lynx","lynx.config.mjs":"lynx","lynx.config.mts":"lynx","lynx.config.ts":"lynx",makefile:"makefile","manifest.in":"python-misc","manifest.mf":"settings","markdoc.config.cjs":"markdoc-config","markdoc.config.cts":"markdoc-config","markdoc.config.js":"markdoc-config","markdoc.config.mjs":"markdoc-config","markdoc.config.mts":"markdoc-config","markdoc.config.ts":"markdoc-config",matchfile:"ruby","maven.config":"maven","mercurial.ini":"mercurial",merge_msg:"git","meson.build":"meson","meson.options":"meson","meson_options.txt":"meson","metro.config.cjs":"metro","metro.config.cts":"metro","metro.config.js":"metro","metro.config.json":"metro","metro.config.mjs":"metro","metro.config.mts":"metro","metro.config.ts":"metro","milestones.md":"roadmap","milestones.txt":"roadmap","mocha.opts":"mocha","moon.yml":"moon","nano-staged.cjs":"nano-staged","nano-staged.js":"nano-staged","nano-staged.json":"nano-staged","nano-staged.mjs":"nano-staged","nest-cli.json":"nest","nestconfig.json":"nest","netlify.json":"netlify","netlify.toml":"netlify","netlify.yaml":"netlify","netlify.yml":"netlify","next.config.js":"next","next.config.mjs":"next","next.config.mts":"next","next.config.ts":"next","ng-package.json":"angular","nginx.conf":"nginx","nodemon-debug.json":"nodemon","nodemon.json":"nodemon","now.json":"vercel","nuget.config":"nuget","nuget.exe":"nuget","nuxt.config.js":"nuxt","nuxt.config.ts":"nuxt","nx.json":"nx","nyc.config.cjs":"istanbul","nyc.config.js":"istanbul","openapi.json":"openapi","openapi.yaml":"openapi","openapi.yml":"openapi","opencode.json":"opencode","opencode.jsonc":"opencode",owners:"codeowners","oxfmt.config.ts":"oxc","oxlint.config.ts":"oxc","package-lock.json":"nodejs","package.json":"nodejs","packship.config.js":"packship","packship.config.json":"packship","packship.config.mjs":"packship","packship.config.mts":"packship","packship.config.ts":"packship","panda.config.cjs":"panda","panda.config.cts":"panda","panda.config.js":"panda","panda.config.mjs":"panda","panda.config.mts":"panda","panda.config.ts":"panda","payload.config.js":"payload","payload.config.mjs":"payload","payload.config.mts":"payload","payload.config.ts":"payload","pdm.lock":"pdm","pdm.toml":"pdm","phpstan.dist.neon":"phpstan","phpstan.neon":"phpstan","phpstan.neon.dist":"phpstan","phpunit-watcher.yml":"phpunit","phpunit-watcher.yml.dist":"phpunit","phpunit.xml":"phpunit","phpunit.xml.dist":"phpunit",pipfile:"python-misc",pkgbuild:"console",pklproject:"pkl","pklproject.deps.json":"pkl","plastic.branchexplorer":"plastic","plastic.selector":"plastic","plastic.wktree":"plastic","plastic.workspace":"plastic","plastic.workspaces":"plastic","playwright-ct.config.cjs":"playwright","playwright-ct.config.cts":"playwright","playwright-ct.config.js":"playwright","playwright-ct.config.mjs":"playwright","playwright-ct.config.mts":"playwright","playwright-ct.config.ts":"playwright","playwright.config.base.cjs":"playwright","playwright.config.base.cts":"playwright","playwright.config.base.js":"playwright","playwright.config.base.mjs":"playwright","playwright.config.base.mts":"playwright","playwright.config.base.ts":"playwright","playwright.config.cjs":"playwright","playwright.config.cts":"playwright","playwright.config.js":"playwright","playwright.config.mjs":"playwright","playwright.config.mts":"playwright","playwright.config.ts":"playwright","plopfile.cjs":"plop","plopfile.js":"plop","plopfile.mjs":"plop","plopfile.ts":"plop","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm",podfile:"ruby","poetry.lock":"poetry","pom.xml":"maven","post-merge":"console","postcss.config.cjs":"postcss","postcss.config.cts":"postcss","postcss.config.js":"postcss","postcss.config.json":"postcss","postcss.config.json5":"postcss","postcss.config.jsonc":"postcss","postcss.config.mjs":"postcss","postcss.config.mts":"postcss","postcss.config.toml":"postcss","postcss.config.ts":"postcss","postcss.config.yaml":"postcss","postcss.config.yml":"postcss","posthtml.config.cjs":"posthtml","posthtml.config.cts":"posthtml","posthtml.config.js":"posthtml","posthtml.config.json":"posthtml","posthtml.config.json5":"posthtml","posthtml.config.jsonc":"posthtml","posthtml.config.mjs":"posthtml","posthtml.config.mts":"posthtml","posthtml.config.toml":"posthtml","posthtml.config.ts":"posthtml","posthtml.config.yaml":"posthtml","posthtml.config.yml":"posthtml","pre-commit":"console","pre-push":"console","prettier.config.cjs":"prettier","prettier.config.cts":"prettier","prettier.config.js":"prettier","prettier.config.json":"prettier","prettier.config.json5":"prettier","prettier.config.jsonc":"prettier","prettier.config.mjs":"prettier","prettier.config.mts":"prettier","prettier.config.toml":"prettier","prettier.config.ts":"prettier","prettier.config.yaml":"prettier","prettier.config.yml":"prettier","prisma.config.ts":"prisma","prisma.yml":"prisma",procfile:"heroku","procfile.windows":"heroku","project.garden.yaml":"garden","project.garden.yml":"garden","project.graphcool":"graphcool","protractor.conf.coffee":"protractor","protractor.conf.js":"protractor","protractor.conf.ts":"protractor","protractor.config.js":"protractor","protractor.config.ts":"protractor","puppeteer.config.cjs":"puppeteer","puppeteer.config.cts":"puppeteer","puppeteer.config.js":"puppeteer","puppeteer.config.json":"puppeteer","puppeteer.config.json5":"puppeteer","puppeteer.config.jsonc":"puppeteer","puppeteer.config.mjs":"puppeteer","puppeteer.config.mts":"puppeteer","puppeteer.config.toml":"puppeteer","puppeteer.config.ts":"puppeteer","puppeteer.config.yaml":"puppeteer","puppeteer.config.yml":"puppeteer",puppetfile:"ruby","py.typed":"python-misc",pylintrc:"python-misc","pyproject.toml":"python-misc","quasar.conf.js":"quasar","quasar.conf.ts":"quasar","quasar.config.cjs":"quasar","quasar.config.js":"quasar","quasar.config.ts":"quasar",rakefile:"ruby",rantfile:"ruby",readme:"readme","readme.md":"readme","readme.rst":"readme","readme.txt":"readme","release-plz.toml":"rocket","release.config.cjs":"semantic-release","release.config.cts":"semantic-release","release.config.js":"semantic-release","release.config.json":"semantic-release","release.config.json5":"semantic-release","release.config.jsonc":"semantic-release","release.config.mjs":"semantic-release","release.config.mts":"semantic-release","release.config.toml":"semantic-release","release.config.ts":"semantic-release","release.config.yaml":"semantic-release","release.config.yml":"semantic-release","release.toml":"rocket","remix.config.js":"remix","remix.config.ts":"remix","renovate-config.json":"renovate","renovate.json":"renovate","renovate.json5":"renovate","requirements.txt":"python-misc","roadmap.md":"roadmap","roadmap.txt":"roadmap","robots.txt":"robots","rolldown.config.cjs":"rolldown","rolldown.config.cts":"rolldown","rolldown.config.js":"rolldown","rolldown.config.mjs":"rolldown","rolldown.config.mts":"rolldown","rolldown.config.ts":"rolldown","rollup-config.js":"rollup","rollup-config.mjs":"rollup","rollup-config.ts":"rollup","rollup.config.base.js":"rollup","rollup.config.base.mjs":"rollup","rollup.config.base.ts":"rollup","rollup.config.common.js":"rollup","rollup.config.common.mjs":"rollup","rollup.config.common.ts":"rollup","rollup.config.dev.js":"rollup","rollup.config.dev.mjs":"rollup","rollup.config.dev.ts":"rollup","rollup.config.js":"rollup","rollup.config.mjs":"rollup","rollup.config.prod.js":"rollup","rollup.config.prod.mjs":"rollup","rollup.config.prod.ts":"rollup","rollup.config.prod.vendor.js":"rollup","rollup.config.prod.vendor.mjs":"rollup","rollup.config.prod.vendor.ts":"rollup","rollup.config.ts":"rollup","rome.json":"rome","route.js":"routing","route.jsx":"routing","route.ts":"routing","route.tsx":"routing","router.js":"routing","router.jsx":"routing","router.ts":"routing","router.tsx":"routing","routes.js":"routing","routes.jsx":"routing","routes.ts":"routing","routes.tsx":"routing","rsbuild.config.cjs":"rstack","rsbuild.config.cts":"rstack","rsbuild.config.js":"rstack","rsbuild.config.mjs":"rstack","rsbuild.config.mts":"rstack","rsbuild.config.ts":"rstack","rslib.config.cjs":"rstack","rslib.config.cts":"rstack","rslib.config.js":"rstack","rslib.config.mjs":"rstack","rslib.config.mts":"rstack","rslib.config.ts":"rstack","rslint.config.cjs":"rstack","rslint.config.cts":"rstack","rslint.config.js":"rstack","rslint.config.mjs":"rstack","rslint.config.mts":"rstack","rslint.config.ts":"rstack","rslint.json":"rstack","rslint.jsonc":"rstack","rspack.config.cjs":"rstack","rspack.config.cts":"rstack","rspack.config.js":"rstack","rspack.config.mjs":"rstack","rspack.config.mts":"rstack","rspack.config.ts":"rstack","rspress.config.cjs":"rstack","rspress.config.cts":"rstack","rspress.config.js":"rstack","rspress.config.mjs":"rstack","rspress.config.mts":"rstack","rspress.config.ts":"rstack","rstest.config.cjs":"rstack","rstest.config.cts":"rstack","rstest.config.js":"rstack","rstest.config.mjs":"rstack","rstest.config.mts":"rstack","rstest.config.ts":"rstack","ruff.toml":"ruff",scanfile:"ruby",sconscript:"scons",sconstruct:"scons","screwdriver.yaml":"screwdriver","screwdriver.yml":"screwdriver",scsub:"scons",security:"lock","security.md":"lock","security.txt":"lock","semgrep.yml":"semgrep","sentry.client.config.cjs":"sentry","sentry.client.config.cts":"sentry","sentry.client.config.js":"sentry","sentry.client.config.mjs":"sentry","sentry.client.config.mts":"sentry","sentry.client.config.ts":"sentry","sentry.edge.config.cjs":"sentry","sentry.edge.config.cts":"sentry","sentry.edge.config.js":"sentry","sentry.edge.config.mjs":"sentry","sentry.edge.config.mts":"sentry","sentry.edge.config.ts":"sentry","sentry.server.config.cjs":"sentry","sentry.server.config.cts":"sentry","sentry.server.config.js":"sentry","sentry.server.config.mjs":"sentry","sentry.server.config.mts":"sentry","sentry.server.config.ts":"sentry","serverless.js":"serverless","serverless.json":"serverless","serverless.ts":"serverless","serverless.yaml":"serverless","serverless.yml":"serverless",sha256sums:"key",shellcheckrc:"shellcheck","skill.md":"skill",snakefile:"snakemake","snapcraft.yaml":"snapcraft","snapcraft.yml":"snapcraft",snapfile:"ruby","snowpack.config.cjs":"snowpack","snowpack.config.cts":"snowpack","snowpack.config.js":"snowpack","snowpack.config.json":"snowpack","snowpack.config.mjs":"snowpack","snowpack.config.mts":"snowpack","snowpack.config.ts":"snowpack","snowpack.deps.json":"snowpack","sonar-project.properties":"sonarcloud","sonarcloud.yaml":"sonarcloud","sonarqube.analysis.xml":"sonarcloud","src/bashly.yaml":"bashly","src/bashly.yml":"bashly","steadybit.yaml":"steadybit","steadybit.yml":"steadybit","stencil.config.js":"stencil","stencil.config.ts":"stencil","stitches.config.js":"stitches","stitches.config.ts":"stitches","stryker.conf.cjs":"stryker","stryker.conf.js":"stryker","stryker.conf.json":"stryker","stryker.conf.mjs":"stryker","stryker.config.cjs":"stryker","stryker.config.js":"stryker","stryker.config.json":"stryker","stryker.config.mjs":"stryker","stylelint.config.cjs":"stylelint","stylelint.config.cts":"stylelint","stylelint.config.js":"stylelint","stylelint.config.json":"stylelint","stylelint.config.json5":"stylelint","stylelint.config.jsonc":"stylelint","stylelint.config.mjs":"stylelint","stylelint.config.mts":"stylelint","stylelint.config.toml":"stylelint","stylelint.config.ts":"stylelint","stylelint.config.yaml":"stylelint","stylelint.config.yml":"stylelint","supabase.js":"supabase","supabase.py":"supabase","supabase.ts":"supabase","svelte.config.cjs":"svelte","svelte.config.cts":"svelte","svelte.config.js":"svelte","svelte.config.mjs":"svelte","svelte.config.mts":"svelte","svelte.config.ts":"svelte","svgo.config.cjs":"svgo","svgo.config.js":"svgo","svgo.config.mjs":"svgo","svgr.config.cjs":"svgr","svgr.config.cts":"svgr","svgr.config.js":"svgr","svgr.config.json":"svgr","svgr.config.json5":"svgr","svgr.config.jsonc":"svgr","svgr.config.mjs":"svgr","svgr.config.mts":"svgr","svgr.config.toml":"svgr","svgr.config.ts":"svgr","svgr.config.yaml":"svgr","svgr.config.yml":"svgr","swagger.json":"swagger","swagger.yaml":"swagger","swagger.yml":"swagger","syncpack.config.cjs":"syncpack","syncpack.config.cts":"syncpack","syncpack.config.js":"syncpack","syncpack.config.json":"syncpack","syncpack.config.json5":"syncpack","syncpack.config.jsonc":"syncpack","syncpack.config.mjs":"syncpack","syncpack.config.mts":"syncpack","syncpack.config.toml":"syncpack","syncpack.config.ts":"syncpack","syncpack.config.yaml":"syncpack","syncpack.config.yml":"syncpack",tags:"label","tailwind.config.cjs":"tailwindcss","tailwind.config.cts":"tailwindcss","tailwind.config.js":"tailwindcss","tailwind.config.mjs":"tailwindcss","tailwind.config.mts":"tailwindcss","tailwind.config.ts":"tailwindcss","tailwind.js":"tailwindcss","tailwind.ts":"tailwindcss","taskfile.dist.yaml":"taskfile","taskfile.dist.yml":"taskfile","taskfile.yaml":"taskfile","taskfile.yml":"taskfile","tauri.conf.json":"tauri","tauri.config.json":"tauri","tauri.linux.conf.json":"tauri","tauri.macos.conf.json":"tauri","tauri.windows.conf.json":"tauri","taze.config.cjs":"taze","taze.config.cts":"taze","taze.config.js":"taze","taze.config.mjs":"taze","taze.config.mts":"taze","taze.config.ts":"taze",thorfile:"ruby",tiltfile:"tilt","timeline.md":"roadmap","timeline.txt":"roadmap","todo.md":"todo","todos.md":"todo","trigger.config.cjs":"trigger","trigger.config.cts":"trigger","trigger.config.js":"trigger","trigger.config.mjs":"trigger","trigger.config.mts":"trigger","trigger.config.ts":"trigger","tsconfig.app.json":"tsconfig","tsconfig.base.json":"tsconfig","tsconfig.build.json":"tsconfig","tsconfig.cjs.json":"tsconfig","tsconfig.client.json":"tsconfig","tsconfig.config.json":"tsconfig","tsconfig.declaration.json":"tsconfig","tsconfig.doc.json":"tsconfig","tsconfig.e2e.json":"tsconfig","tsconfig.editor.json":"tsconfig","tsconfig.eslint.json":"tsconfig","tsconfig.esm.json":"tsconfig","tsconfig.json":"tsconfig","tsconfig.lib.json":"tsconfig","tsconfig.lib.prod.json":"tsconfig","tsconfig.main.json":"tsconfig","tsconfig.mjs.json":"tsconfig","tsconfig.node.json":"tsconfig","tsconfig.paths.json":"tsconfig","tsconfig.renderer.json":"tsconfig","tsconfig.server.json":"tsconfig","tsconfig.spec.json":"tsconfig","tsconfig.test.json":"tsconfig","tsconfig.vitest.json":"tsconfig","tsconfig.web.json":"tsconfig","tsconfig.webworker.json":"tsconfig","tsconfig.worker.json":"tsconfig","tsdoc.json":"tsdoc","tsdown.config":"tsdown","tsdown.config.cjs":"tsdown","tsdown.config.cts":"tsdown","tsdown.config.js":"tsdown","tsdown.config.json":"tsdown","tsdown.config.mjs":"tsdown","tsdown.config.mts":"tsdown","tsdown.config.ts":"tsdown","turbo.json":"turborepo","turbo.jsonc":"turborepo","typedoc.js":"typedoc","typedoc.json":"typedoc","typst.toml":"typst",unlicense:"unlicense","unlicense.txt":"unlicense","uno.config.js":"unocss","uno.config.mjs":"unocss","uno.config.mts":"unocss","uno.config.ts":"unocss","unocss.config.js":"unocss","unocss.config.mjs":"unocss","unocss.config.mts":"unocss","unocss.config.ts":"unocss","uv.lock":"uv","uv.toml":"uv","v.mod":"vlang",vagrantfile:"vagrant","velite.config.cjs":"velite","velite.config.cts":"velite","velite.config.js":"velite","velite.config.mjs":"velite","velite.config.mts":"velite","velite.config.ts":"velite","vercel.json":"vercel","vercel.ts":"vercel","verdaccio.yml":"verdaccio","vetur.config.js":"vue-config","vetur.config.ts":"vue-config","vite.config.cjs":"vite","vite.config.cts":"vite","vite.config.js":"vite","vite.config.mjs":"vite","vite.config.mts":"vite","vite.config.ts":"vite","vitest.config.cjs":"vitest","vitest.config.cts":"vitest","vitest.config.js":"vitest","vitest.config.mjs":"vitest","vitest.config.mts":"vitest","vitest.config.ts":"vitest","vitest.e2e.config.cjs":"vitest","vitest.e2e.config.cts":"vitest","vitest.e2e.config.js":"vitest","vitest.e2e.config.mjs":"vitest","vitest.e2e.config.mts":"vitest","vitest.e2e.config.ts":"vitest","vitest.unit.config.cjs":"vitest","vitest.unit.config.cts":"vitest","vitest.unit.config.js":"vitest","vitest.unit.config.mjs":"vitest","vitest.unit.config.mts":"vitest","vitest.unit.config.ts":"vitest","vitest.workspace.cjs":"vitest","vitest.workspace.cts":"vitest","vitest.workspace.js":"vitest","vitest.workspace.mjs":"vitest","vitest.workspace.mts":"vitest","vitest.workspace.ts":"vitest","volar.config.js":"vue-config","vpkg.json":"vlang","vue.config.cjs":"vue-config","vue.config.js":"vue-config","vue.config.mjs":"vue-config","vue.config.ts":"vue-config","wallaby.conf.js":"wallaby","wallaby.js":"wallaby","wally.toml":"wally","warp.md":"warp","webpack.base.cjs":"webpack","webpack.base.cts":"webpack","webpack.base.js":"webpack","webpack.base.mjs":"webpack","webpack.base.mts":"webpack","webpack.base.ts":"webpack","webpack.cjs":"webpack","webpack.client.cjs":"webpack","webpack.client.cts":"webpack","webpack.client.js":"webpack","webpack.client.mjs":"webpack","webpack.client.mts":"webpack","webpack.client.ts":"webpack","webpack.common.cjs":"webpack","webpack.common.cts":"webpack","webpack.common.js":"webpack","webpack.common.mjs":"webpack","webpack.common.mts":"webpack","webpack.common.ts":"webpack","webpack.config.babel.cjs":"webpack","webpack.config.babel.cts":"webpack","webpack.config.babel.js":"webpack","webpack.config.babel.mjs":"webpack","webpack.config.babel.mts":"webpack","webpack.config.babel.ts":"webpack","webpack.config.base.babel.cjs":"webpack","webpack.config.base.babel.cts":"webpack","webpack.config.base.babel.js":"webpack","webpack.config.base.babel.mjs":"webpack","webpack.config.base.babel.mts":"webpack","webpack.config.base.babel.ts":"webpack","webpack.config.base.cjs":"webpack","webpack.config.base.cts":"webpack","webpack.config.base.js":"webpack","webpack.config.base.mjs":"webpack","webpack.config.base.mts":"webpack","webpack.config.base.ts":"webpack","webpack.config.cjs":"webpack","webpack.config.client.cjs":"webpack","webpack.config.client.cts":"webpack","webpack.config.client.js":"webpack","webpack.config.client.mjs":"webpack","webpack.config.client.mts":"webpack","webpack.config.client.ts":"webpack","webpack.config.coffee":"webpack","webpack.config.common.babel.cjs":"webpack","webpack.config.common.babel.cts":"webpack","webpack.config.common.babel.js":"webpack","webpack.config.common.babel.mjs":"webpack","webpack.config.common.babel.mts":"webpack","webpack.config.common.babel.ts":"webpack","webpack.config.common.cjs":"webpack","webpack.config.common.cts":"webpack","webpack.config.common.js":"webpack","webpack.config.common.mjs":"webpack","webpack.config.common.mts":"webpack","webpack.config.common.ts":"webpack","webpack.config.cts":"webpack","webpack.config.dev.babel.cjs":"webpack","webpack.config.dev.babel.cts":"webpack","webpack.config.dev.babel.js":"webpack","webpack.config.dev.babel.mjs":"webpack","webpack.config.dev.babel.mts":"webpack","webpack.config.dev.babel.ts":"webpack","webpack.config.dev.cjs":"webpack","webpack.config.dev.cts":"webpack","webpack.config.dev.js":"webpack","webpack.config.dev.mjs":"webpack","webpack.config.dev.mts":"webpack","webpack.config.dev.ts":"webpack","webpack.config.js":"webpack","webpack.config.main.cjs":"webpack","webpack.config.main.cts":"webpack","webpack.config.main.js":"webpack","webpack.config.main.mjs":"webpack","webpack.config.main.mts":"webpack","webpack.config.main.ts":"webpack","webpack.config.mjs":"webpack","webpack.config.mts":"webpack","webpack.config.prod.babel.cjs":"webpack","webpack.config.prod.babel.cts":"webpack","webpack.config.prod.babel.js":"webpack","webpack.config.prod.babel.mjs":"webpack","webpack.config.prod.babel.mts":"webpack","webpack.config.prod.babel.ts":"webpack","webpack.config.prod.cjs":"webpack","webpack.config.prod.cts":"webpack","webpack.config.prod.js":"webpack","webpack.config.prod.mjs":"webpack","webpack.config.prod.mts":"webpack","webpack.config.prod.ts":"webpack","webpack.config.production.babel.cjs":"webpack","webpack.config.production.babel.cts":"webpack","webpack.config.production.babel.js":"webpack","webpack.config.production.babel.mjs":"webpack","webpack.config.production.babel.mts":"webpack","webpack.config.production.babel.ts":"webpack","webpack.config.production.cjs":"webpack","webpack.config.production.cts":"webpack","webpack.config.production.js":"webpack","webpack.config.production.mjs":"webpack","webpack.config.production.mts":"webpack","webpack.config.production.ts":"webpack","webpack.config.renderer.cjs":"webpack","webpack.config.renderer.cts":"webpack","webpack.config.renderer.js":"webpack","webpack.config.renderer.mjs":"webpack","webpack.config.renderer.mts":"webpack","webpack.config.renderer.ts":"webpack","webpack.config.server.cjs":"webpack","webpack.config.server.cts":"webpack","webpack.config.server.js":"webpack","webpack.config.server.mjs":"webpack","webpack.config.server.mts":"webpack","webpack.config.server.ts":"webpack","webpack.config.staging.babel.cjs":"webpack","webpack.config.staging.babel.cts":"webpack","webpack.config.staging.babel.js":"webpack","webpack.config.staging.babel.mjs":"webpack","webpack.config.staging.babel.mts":"webpack","webpack.config.staging.babel.ts":"webpack","webpack.config.staging.cjs":"webpack","webpack.config.staging.cts":"webpack","webpack.config.staging.js":"webpack","webpack.config.staging.mjs":"webpack","webpack.config.staging.mts":"webpack","webpack.config.staging.ts":"webpack","webpack.config.test.cjs":"webpack","webpack.config.test.cts":"webpack","webpack.config.test.js":"webpack","webpack.config.test.mjs":"webpack","webpack.config.test.mts":"webpack","webpack.config.test.ts":"webpack","webpack.config.ts":"webpack","webpack.config.vendor.cjs":"webpack","webpack.config.vendor.cts":"webpack","webpack.config.vendor.js":"webpack","webpack.config.vendor.mjs":"webpack","webpack.config.vendor.mts":"webpack","webpack.config.vendor.production.cjs":"webpack","webpack.config.vendor.production.cts":"webpack","webpack.config.vendor.production.js":"webpack","webpack.config.vendor.production.mjs":"webpack","webpack.config.vendor.production.mts":"webpack","webpack.config.vendor.production.ts":"webpack","webpack.config.vendor.ts":"webpack","webpack.cts":"webpack","webpack.dev.cjs":"webpack","webpack.dev.cts":"webpack","webpack.dev.js":"webpack","webpack.dev.mjs":"webpack","webpack.dev.mts":"webpack","webpack.dev.ts":"webpack","webpack.development.cjs":"webpack","webpack.development.cts":"webpack","webpack.development.js":"webpack","webpack.development.mjs":"webpack","webpack.development.mts":"webpack","webpack.development.ts":"webpack","webpack.dist.cjs":"webpack","webpack.dist.cts":"webpack","webpack.dist.js":"webpack","webpack.dist.mjs":"webpack","webpack.dist.mts":"webpack","webpack.dist.ts":"webpack","webpack.js":"webpack","webpack.mix.cjs":"webpack","webpack.mix.cts":"webpack","webpack.mix.js":"webpack","webpack.mix.mjs":"webpack","webpack.mix.mts":"webpack","webpack.mix.ts":"webpack","webpack.mjs":"webpack","webpack.mts":"webpack","webpack.prod.cjs":"webpack","webpack.prod.config.cjs":"webpack","webpack.prod.config.cts":"webpack","webpack.prod.config.js":"webpack","webpack.prod.config.mjs":"webpack","webpack.prod.config.mts":"webpack","webpack.prod.config.ts":"webpack","webpack.prod.cts":"webpack","webpack.prod.js":"webpack","webpack.prod.mjs":"webpack","webpack.prod.mts":"webpack","webpack.prod.ts":"webpack","webpack.production.cjs":"webpack","webpack.production.cts":"webpack","webpack.production.js":"webpack","webpack.production.mjs":"webpack","webpack.production.mts":"webpack","webpack.production.ts":"webpack","webpack.server.cjs":"webpack","webpack.server.cts":"webpack","webpack.server.js":"webpack","webpack.server.mjs":"webpack","webpack.server.mts":"webpack","webpack.server.ts":"webpack","webpack.test.cjs":"webpack","webpack.test.cts":"webpack","webpack.test.js":"webpack","webpack.test.mjs":"webpack","webpack.test.mts":"webpack","webpack.test.ts":"webpack","webpack.ts":"webpack","webpackfile.cjs":"webpack","webpackfile.cts":"webpack","webpackfile.js":"webpack","webpackfile.mjs":"webpack","webpackfile.mts":"webpack","webpackfile.ts":"webpack","werf-giterminism.yaml":"werf","werf-giterminism.yml":"werf","werf-includes.lock":"werf","werf-includes.yaml":"werf","werf-includes.yml":"werf","werf.yaml":"werf","werf.yml":"werf","windi.config.cjs":"windicss","windi.config.cts":"windicss","windi.config.js":"windicss","windi.config.json":"windicss","windi.config.ts":"windicss","wrangler.json":"wrangler","wrangler.jsonc":"wrangler","wrangler.toml":"wrangler","wxt.config.cjs":"wxt","wxt.config.cts":"wxt","wxt.config.js":"wxt","wxt.config.mjs":"wxt","wxt.config.mts":"wxt","wxt.config.ts":"wxt","xamlstyler.json":"xaml",xmake:"xmake","xmake.lua":"xmake","yarn-error.log":"yarn","yarn.lock":"yarn","zeabur.json":"zeabur","zeabur.json5":"zeabur","zeabur.jsonc":"zeabur","zeabur.toml":"zeabur","zeabur.yaml":"zeabur","zeabur.yml":"zeabur",zlogin:"console",zlogout:"console",zprofile:"console",zshenv:"console",zshrc:"console",zshrc_apple_terminal:"console"},Ak={60:"slint",".ncurc.js":"dependencies-update",".ncurc.json":"dependencies-update",".ncurc.yml":"dependencies-update",".wakatime-project":"wakatime","001":"zip","123dx":"3d","3dm":"3d","3ds":"3d","3fr":"image","3mf":"3d","4th":"forth","7z":"zip","8svx":"audio",a:"lib",a51:"assembly",aa:"audio",aac:"audio",aax:"audio",abap:"abap",abc:"abc",ac:"3d",ac3:"audio",accdb:"database",accde:"database",acds:"abap",act:"palette",ad:"asciidoc",ada:"ada",adb:"ada",adoc:"asciidoc",adp:"database",ads:"ada",aea:"assembly",afphoto:"image",agc:"assembly",ags:"assembly",ahk:"autohotkey",ai:"adobe-illustrator",aif:"audio",aiff:"audio",ait:"adobe-illustrator",alac:"audio",ali:"ada",alloy:"grafana-alloy",ami:"image",amr:"audio",amx:"pawn",ape:"audio",apfs:"zip",apib:"apiblueprint",apiblueprint:"apiblueprint",apk:"android",applescript:"applescript",apx:"image",argus:"assembly",ari:"image",arj:"zip",arw:"image",as:"actionscript",asc:"key",asciidoc:"asciidoc",ascx:"xml",asddls:"abap",ase:"image",aseprite:"image",asm:"assembly",asp:"html",aspx:"html",ass:"subtitles",ast:"sas",astore:"sas",astro:"astro",atom:"xml",au3:"autoit",aux:"tex",avi:"video",avif:"image",awk:"console",axaml:"xml",axml:"xml",azcli:"azure","azure-pipelines-main.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines.yml":"azure-pipelines",b:"brainfuck",bak:"database",bal:"ballerina",balx:"ballerina",bas:"visualstudio",bash:"console",bash_aliases:"console",bash_login:"console",bash_logout:"console",bash_profile:"console",bashrc:"console",bat:"console",bay:"image",bazel:"bazel",bbl:"bibliography",bbx:"bbx",bcf:"bibliography",bdb:"database",bean:"beancount",beancount:"beancount","bench.cjs":"bench-js","bench.cts":"bench-ts","bench.js":"bench-js","bench.jsx":"bench-jsx","bench.mjs":"bench-js","bench.mts":"bench-ts","bench.ts":"bench-ts","bench.tsx":"bench-jsx",bf:"brainfuck",bib:"bibliography",bicep:"bicep",bin:"hex",binsource:"assembly","blade.php":"laravel",blend:"blender",blend1:"blender",blend2:"blender",blg:"bibliography",blink:"blink",bmap:"font",bmp:"image",bpg:"image",bpmn:"xml",br:"zip",braw:"image",brk:"image",brotli:"zip",brs:"visualstudio",bru:"bruno",bst:"bibtex-style",bubble:"dinophp",bz2:"zip",bzip2:"zip",bzl:"bazel",c:"c","c++":"cpp","c++m":"cpp",c3:"c3",cab:"zip",cabal:"cabal",caf:"audio",cairo:"cairo",cake:"cake",cap:"image",capnp:"capnp",catpart:"3d",catproduct:"3d",cbl:"cobol",cbx:"cbx",cc:"cpp",ccm:"cpp",cda:"audio",cdc:"cadence",cdr:"audio",cds:"cds",cer:"certificate",cert:"certificate",cfc:"coldfusion",cff:"yaml",cfg:"settings",cfm:"coldfusion",cfml:"coldfusion",cginc:"shader",cjs:"javascript","cjs.map":"javascript-map",cl:"lisp",class:"javaclass",clip:"image",clj:"clojure",cljc:"clojure",cljs:"clojure",cljx:"clojure",clo:"tex",clojure:"clojure",cls:"tex",cm:"sml",cmake:"cmake",cmd:"console",cmj:"bucklescript",cmx:"ocaml",cnf:"settings",coafile:"coala",coarc:"coala",cob:"cobol",coco:"coconut","code-profile":"vscode","code-search":"search","code-snippets":"vscode","code-workplace":"vscode","code-workspace":"vscode",coffee:"coffee",command:"command",comp:"shader","comp.glsl":"shader","comp.hlsl":"shader","compose.yaml":"docker","compose.yml":"docker",compute:"shader","compute.glsl":"shader","compute.hlsl":"shader",computeshader:"shader",conf:"settings",config:"settings",containerfile:"docker",containerignore:"docker","controller.js":"controller","controller.ts":"controller",copilotmd:"markdown",cp:"cpp",cpio:"zip",cpn:"coloredpetrinets",cpp:"cpp",cppm:"cpp",cpt:"image",cpy:"python",cr:"crystal",cr2:"image",cr3:"image",crt:"certificate",crw:"image",crx:"chrome",cs:"csharp",csh:"console",csharp:"csharp",cshrc:"console",cshtml:"razor",csl:"xml",cson:"coffee",csproj:"visualstudio","csproj.user":"xml",css:"css","css.cjs":"vanilla-extract","css.js":"vanilla-extract","css.jsx":"vanilla-extract","css.map":"css-map","css.mjs":"vanilla-extract","css.ts":"vanilla-extract","css.tsx":"vanilla-extract",csv:"table",csx:"csharp",ctp:"php",cts:"typescript",ctx:"context",cu:"cuda",cue:"cue",cuh:"cuda",cur:"image",cxx:"cpp",cxxm:"cpp","cy.js":"test-js","cy.jsx":"test-jsx","cy.ts":"test-ts","cy.tsx":"test-jsx",d:"d","d.cts":"typescript-def","d.ets":"typescript-def","d.mts":"typescript-def","d.ts":"typescript-def",dae:"3d",dart:"dart",dat:"hex",data:"image",db:"database",db3:"database",dbf:"database",dblite:"database",dblite3:"database",dcr:"image",dcs:"image",dds:"image",deb:"zip",debugsymbols:"database",def:"dotjs",dex:"android",dfxp:"subtitles",dhall:"dhall",dhallb:"dhall",diff:"diff",dio:"drawio",directory:"settings",dita:"xml",ditamap:"xml",djt:"django",dlc:"settings",dll:"dll",dmg:"disc",dmn:"xml",dng:"image",do:"tcl",doc:"word","docker-compose.yaml":"docker","docker-compose.yml":"docker",dockerfile:"docker",dockerignore:"docker",docx:"word",dot:"dotjs",drawio:"drawio",drf:"image","drone.yml":"drone",dsc:"denizenscript",dsql:"database",dss:"audio",dtd:"xml",dtml:"xml",duc:"duc",dwg:"3d",dxf:"3d","e2e-spec.cjs":"test-js","e2e-spec.cts":"test-ts","e2e-spec.js":"test-js","e2e-spec.mjs":"test-js","e2e-spec.mts":"test-ts","e2e-spec.ts":"test-ts",ebuild:"console",ec3:"audio",eclass:"console",ecr:"crystal",edb:"email",edge:"edge",edn:"clojure",eex:"elixir",efs:"audio",egg:"python-misc",eip:"image",ejs:"ejs",elm:"elm",eml:"email",emlx:"email",enc:"audio",ent:"xml",env:"tune",eot:"font",eps:"image",epub:"epub",erb:"ruby",erf:"image",erl:"erlang",es6:"javascript",esd:"zip",esx:"javascript",ex:"elixir",excalidraw:"excalidraw","excalidraw.json":"excalidraw","excalidraw.png":"excalidraw","excalidraw.svg":"excalidraw",exe:"exe",exp:"console",exr:"image",exrc:"vim",exs:"elixir",eyaml:"yaml",eyml:"yaml",f:"fortran",f03:"fortran",f08:"fortran",f3d:"3d",f77:"fortran",f90:"fortran",f95:"fortran",far:"zip",fast:"lisp",fat:"zip",fbx:"3d",fdb:"database",feather:"database",feature:"cucumber",features:"cucumber",fen:"chess",fff:"image",fhtml:"velocity",fig:"figma",fish:"console",flac:"audio",flp:"audio",flv:"video",fnt:"font",font:"font",fonts:"font",fpx:"image",frag:"shader","frag.glsl":"shader","fragment.glsl":"shader",fragmentshader:"shader","freezed.dart":"dart_generated",frm:"database",frt:"forth",fs:"fsharp","fs.glsl":"shader",fsi:"fsharp",fsproj:"fsharp",fsscript:"fsharp",fsx:"fsharp",fth:"forth",ftl:"freemarker",fun:"sml",fx:"shader",fxh:"shader",fxml:"xml",fxp:"foxpro","g.dart":"dart_generated",g4:"antlr","garden.yaml":"garden","garden.yml":"garden",gbr:"image",gd:"godot",gdb:"database",gdextension:"godot-assets",gdnlib:"godot-assets",gdns:"godot-assets",gdshader:"godot-assets",gdshaderinc:"godot-assets",gemini:"gemini",gemspec:"ruby",geojson:"json",geom:"shader","geom.glsl":"shader","geom.hlsl":"shader","geometry.glsl":"shader","geometry.hlsl":"shader",geometryshader:"shader",gif:"image",gifv:"video","gitlab-ci.yml":"gitlab",glb:"3d",gleam:"gleam",glsl:"shader",gltf:"3d",gmi:"gemini",gml:"gamemaker",gnu:"gnuplot",go:"go",godot:"godot-assets",gp:"audio",gpg:"key",gpl:"palette",gpr:"image",gql:"graphql",gr:"grain",gradle:"gradle",graphcool:"graphcool",graphql:"graphql",grm:"sml",groovy:"groovy",gs:"apps-script","gs.glsl":"shader",gsm:"audio",gvimrc:"vim",gvy:"groovy",gyp:"python",gypi:"python",gz:"zip",gzip:"zip",h:"h","h++":"hpp","h.in":"cpp",haml:"haml",handlebars:"handlebars",har:"json",hbs:"handlebars",hcl:"hcl",hdd:"disc",heex:"elixir",heic:"image",heif:"image",hex:"hex",hfs:"zip",hh:"hpp",hip:"hip",hjs:"handlebars",hjson:"hjson",hlsl:"shader",hlsli:"shader","horusec-config.json":"horusec",hp:"hpp",hpp:"hpp","hpp.in":"cpp",hs:"haskell",htm:"html",html:"html","html.bubble":"dinophp",html_vm:"html",http:"http",huff:"huff",hurl:"hurl",hx:"haxe",hxx:"hpp",i:"c",iam:"3d",ibc:"idris",ibd:"database",iced:"coffee",icns:"image",ico:"image",ics:"email",idr:"idris",ige:"3d",iges:"3d",igs:"3d",ii:"cpp",iiq:"image",ilk:"dll",imba:"imba",img:"image",iml:"xml",inc:"assembly",ini:"settings","inky.php":"laravel",inl:"hpp",ino:"arduino",ins:"doctex-installer",ipa:"applescript",ipp:"cpp",ipt:"3d",ipy:"python",ipynb:"jupyter",isml:"xml",iso:"disc",it:"audio",iuml:"uml",ixx:"cpp",j2:"jinja",jade:"pug",jar:"jar",jav:"java",java:"java",jb2:"image",jbig2:"image",jenkins:"jenkins",jenkinsfile:"jenkins",jfif:"image",jinja:"jinja","jinja-html":"jinja",jinja2:"jinja",jl:"julia",jmx:"xml",jng:"image",jpeg:"image",jpg:"image",jrxml:"xml",js:"javascript","js.map":"javascript-map","js.snap":"test-js","jsconfig.json":"jsconfig",jshtm:"html",json:"json",json5:"json",jsonc:"json",jsonl:"json",jsonld:"json",jsp:"java",jst:"dotjs",jsx:"react","jsx.snap":"test-jsx",jt:"3d",jxl:"image",jxr:"image",k:"kcl",k25:"image",kdbx:"database",kdc:"image",key:"key",kl:"kl",kql:"kusto",kra:"image",ksh:"console",kt:"kotlin",kts:"kotlin",ktx:"image",ktx2:"image",kv:"kivy",lang:"i18n",latex:"tex",launch:"xml",lbx:"lbx",ldf:"database",lean:"lean",leex:"elixir",less:"less",lex:"sml",lha:"zip",lhs:"haskell",lib:"lib",liquid:"liquid",lisp:"lisp",litcoffee:"markdown",liz:"zip",lock:"lock",log:"log",lol:"lolcode",lottie:"lottie",lrc:"lyric",ls:"livescript",lsp:"lisp",ltx:"tex",lua:"lua",luau:"luau",lucee:"coldfusion",ly:"lilypond",lz:"zip",lz4:"zip",lz5:"zip",lzh:"zip",lzma:"zip",lzma2:"zip",m:"objective-c",m2:"macaulay2",m2v:"video",m3u:"audio",m3u8:"audio",m4a:"audio",m4b:"audio",m4p:"audio",m4r:"audio",m4v:"video",mak:"settings",manifest:"xml",markdn:"markdown",markdoc:"markdoc","markdoc.md":"markdoc",markdown:"markdown",marko:"markojs",mbox:"email",mca:"minecraft",mcaddon:"minecraft",mcfunction:"minecraft",mcgame:"minecraft",mclevel:"minecraft",mcmeta:"minecraft",mcpack:"minecraft",mcproject:"minecraft",mcr:"minecraft",mcstructure:"minecraft",mctemplate:"minecraft",mcworld:"minecraft",md:"markdown",mdb:"database",mdc:"image",mde:"database",mdf:"database",mdoc:"markdoc",mdown:"markdown",mdp:"image",mdtext:"markdown",mdtxt:"markdown",mdwn:"markdown",mdx:"mdx",mef:"image",menu:"xml",merlin:"merlin",mermaid:"mermaid",mesh:"3d",mi:"c",mid:"audio",mii:"cpp",mine:"minecraft",mint:"mint",mitigus:"assembly",mjml:"mjml",mjs:"javascript","mjs.map":"javascript-map",mk:"makefile",mka:"audio",mkd:"markdown",mkdn:"markdown",mkv:"video",ml:"ocaml",mlb:"sml",mli:"ocaml",mlton:"sml",mm:"objective-cpp",mmd:"mermaid",mmf:"audio",mo:"i18n",mod:"audio","module.js":"angular","module.ts":"angular",mojo:"mojo",moon:"moonscript",mos:"image",mov:"video",mp2:"video",mp3:"audio",mp4:"video",mpc:"audio",mpe:"video",mpeg:"video",mpg:"video",mpv:"video",mqo:"3d",mrf:"font",mrpack:"mrpack",mrw:"image",ms:"assembly",mscz:"audio",msg:"email",msi:"exe",mtm:"audio",mts:"typescript",mui:"audio",mus:"minecraft",mustache:"handlebars",musx:"audio",mxl:"audio",mxml:"mxml",myd:"database",myi:"database",nasm:"assembly",nb:"mathematica",ndf:"database",ndjson:"json","ndst.json":"ndst","ndst.yaml":"ndst","ndst.yml":"ndst",nef:"image",nf:"groovy","ng-template":"angular",nginx:"nginx",nginxconf:"nginx",nginxconfig:"nginx",nim:"nim",nimble:"nim",nix:"nix",njk:"nunjucks",npmrc:"settings",nrw:"image",nsa:"audio",ntf:"font",ntfs:"zip",nu:"console",nunjucks:"nunjucks",nupkg:"nuget",nuspec:"nuget",o:"3d",obj:"3d",obm:"image",odb:"database",odin:"odin",odp:"powerpoint",ods:"table",odt:"word",odttf:"font",oft:"email",ogg:"video",ogv:"video",olm:"email",onnx:"onnx",opam:"opam","openapi.json":"openapi","openapi.yaml":"openapi","openapi.yml":"openapi",opml:"xml",option:"settings",opus:"audio",ora:"image",orc:"database",orf:"image",ost:"email",otf:"font",otne:"otne",owl:"xml",p:"prolog",p7s:"email",pac:"javascript",pal:"palette",parquet:"database",pas:"pascal",passwd:"key",patch:"git",pbm:"image",pcss:"postcss",pdb:"database",pde:"processing",pdf:"pdf","pdm.lock":"pdm","pdm.toml":"pdm",pdn:"image",pef:"image",pem:"key",pgf:"image",pgm:"image",pgn:"chess",pgsql:"database",php:"php","php.bubble":"dinophp",php4:"php",php5:"php",phtml:"php",pic:"image",pine:"pinejs",pipeline:"pipeline","pixel.hlsl":"shader",pkb:"database",pkf:"audio",pkl:"pkl",pks:"database",pl:"prolog",plantuml:"uml",plist:"xml",plpgsql:"database",ply:"3d",pm:"perl",pmd:"3d",pmx:"3d",png:"image",pnm:"image",pnml:"coloredpetrinets",po:"i18n",pod:"perl",podspec:"ruby",postgres:"database",pot:"i18n",potm:"powerpoint",potx:"powerpoint",pp:"puppet",ppa:"powerpoint",ppam:"powerpoint",ppm:"image",pps:"powerpoint",ppsm:"powerpoint",ppsx:"powerpoint",ppt:"powerpoint",pptm:"powerpoint",pptx:"powerpoint",prefs:"settings",prg:"foxpro",prisma:"prisma",pro:"prolog",profile:"console",proj:"xml",project:"xml","prompt.md":"prompt","prompts.md":"prompt",prop:"settings",properties:"settings",props:"settings",proto:"proto",prt:"3d",prw:"advpl",prx:"advpl",ps1:"powershell",ps1xml:"powershell",psb:"adobe-photoshop",psc1:"powershell",psd:"adobe-photoshop",psd1:"powershell",psdt:"adobe-photoshop",psgi:"perl",psh:"shader",psm1:"powershell",psql:"database",psrc:"powershell",pssc:"powershell",pst:"email",psv:"table",pt:"pytorch",pth:"pytorch",ptx:"image",pu:"uml",pub:"key",publishsettings:"xml",pubxml:"xml","pubxml.user":"xml",pug:"pug",puml:"uml",pure:"purescript",purs:"purescript",pwf:"pytorch",pwn:"pawn","px.hlsl":"shader",pxn:"image",py:"python",pyc:"python-misc",pyi:"python",pyt:"python",pyw:"python",qcow:"disc",qcow2:"disc",qcp:"audio",qed:"disc",qmd:"quarto",qs:"qsharp",qt:"video","quokka.js":"quokka","quokka.jsx":"quokka","quokka.ts":"quokka","quokka.tsx":"quokka",r:"r",r3d:"image",ra:"audio",raf:"image",rahit:"shader","rahit.glsl":"shader",rake:"ruby",raku:"perl",raml:"raml",rar:"zip",raw:"image",razor:"razor",rb:"ruby",rbi:"ruby",rbs:"ruby",rbx:"ruby",rbxl:"roblox",rbxlx:"roblox",rbxm:"roblox","rbxmk.lua":"rbxmk","rbxmk.luau":"rbxmk",rbxmx:"roblox",rc:"rc",rcall:"shader","rcall.glsl":"shader",rchit:"shader","rchit.glsl":"shader",rdf:"xml",re:"reason",reb:"image",red:"red",reg:"regedit",rego:"opa",rei:"reason",rej:"diff",repo:"settings",res:"rescript",resi:"rescript-interface",rest:"http",restql:"restql",resx:"xml",rf64:"audio",rgen:"shader","rgen.glsl":"shader",rhistory:"r",rhtml:"html",rint:"shader","rint.glsl":"shader",riot:"riot",rip:"audio",rjs:"ruby",rkt:"racket",rm:"video",rmd:"r",rmiss:"shader","rmiss.glsl":"shader",rmvb:"video",rng:"xml",robot:"robot",ron:"rust",ronn:"markdown","route.js":"routing","route.jsx":"routing","route.ts":"routing","route.tsx":"routing","routes.js":"routing","routes.jsx":"routing","routes.ts":"routing","routes.tsx":"routing","routing.js":"routing","routing.jsx":"routing","routing.ts":"routing","routing.tsx":"routing",rpm:"zip",rpmsg:"email",rprofile:"r",rpy:"python",rql:"restql",rs:"rust",rss:"xml",rst:"markdown",rt:"r",rtf:"word",ru:"ruby",ruleset:"visualstudio",rw2:"image",rwl:"image",rwz:"image",s:"assembly",sab:"3d",sai:"image",san:"san",sas:"sas",sas7bdat:"sas",sashdat:"sas",sass:"sass",sast:"sas",sat:"3d",sbt:"sbt",sbv:"subtitles",sc:"scala",scala:"scala","schema.json":"json_schema",scm:"scheme",scss:"sass",sdf:"database",sdt:"audio",secret:"key",sesx:"audio",settings:"settings",sf2:"audio",sh:"console",sha256:"key",sha256sum:"key",sha256sums:"key",shader:"shader",shasum:"key",shproj:"xml",shtml:"html",sig:"sml","sigstore.json":"verified",sketch:"sketch","skill.md":"skill","skills.md":"skill",skp:"3d",slang:"shader",sldasm:"3d",slddrw:"3d",sldprt:"3d",slim:"slim",slint:"slint",sln:"visualstudio","sln.dotsettings":"settings","sln.dotsettings.user":"settings",slnf:"visualstudio",slnx:"visualstudio",sls:"salt",slx:"simulink",smali:"android",smb:"3d",smk:"snakemake",sml:"sml",smt:"3d",snakemake:"snakemake",so:"dll",sol:"solidity","spec-d.ts":"test-ts","spec-d.tsx":"test-jsx","spec.cjs":"test-js","spec.cts":"test-ts","spec.js":"test-js","spec.jsx":"test-jsx","spec.mjs":"test-js","spec.mts":"test-ts","spec.ts":"test-ts","spec.tsx":"test-jsx",spv:"shader",spwn:"spwn",sql:"database",sqlite:"database",sqlite3:"database",squashfs:"zip",sr2:"image",srf:"image",srt:"subtitles",srw:"image",ss:"scheme",ssa:"subtitles",sss:"postcss","st.css":"stylable",stan:"stan",stap:"audio",ste:"3d","steadybit.yaml":"steadybit","steadybit.yml":"steadybit",step:"3d",stl:"3d","stories.js":"storybook","stories.jsx":"storybook","stories.mdx":"storybook","stories.svelte":"storybook","stories.ts":"storybook","stories.tsx":"storybook","stories.vue":"storybook","story.js":"storybook","story.jsx":"storybook","story.mdx":"storybook","story.ts":"storybook","story.tsx":"storybook",storyboard:"xml",stp:"3d",styl:"stylus",sub:"subtitles","sublime-project":"sublime","sublime-workspace":"sublime",sui:"font",suit:"font",suo:"visualstudio",sv:"verilog",svelte:"svelte",svg:"svg",svh:"verilog",svx:"mdsvex",sw:"sway","swagger.json":"swagger","swagger.yaml":"swagger","swagger.yml":"swagger",swc:"adobe-swc",swcrc:"swc",swf:"flash",swift:"swift",swiftdeps:"swift",swiftdoc:"swift",swiftmodule:"swift",swiftsourceinfo:"swift",swm:"zip",sy:"siyuan",synctex:"tex","synctex.gz":"tex",t:"perl",tag:"riot",tar:"zip",targets:"xml","taskfile.yaml":"taskfile","taskfile.yml":"taskfile",tauri:"tauri",taz:"zip",tbz:"zip",tbz2:"zip",tcc:"hpp",tcl:"tcl",tcsh:"console",tcshrc:"console",templ:"templ",template:"template",terraformignore:"terraform",tesc:"shader","tesc.glsl":"shader",tese:"shader","tese.glsl":"shader","tess.hlsl":"shader","tessellation.hlsl":"shader","test-d.ts":"test-ts","test-d.tsx":"test-jsx","test.cjs":"test-js","test.cts":"test-ts","test.js":"test-js","test.jsx":"test-jsx","test.mjs":"test-js","test.mts":"test-ts","test.ts":"test-ts","test.tsx":"test-jsx",tex:"tex",tf:"terraform","tf.json":"terraform",tfbackend:"terraform",tfstate:"terraform",tfvars:"terraform",tg:"audio",tga:"image",tgz:"zip",tif:"image",tiff:"image",tikz:"tex",tl:"teal",tld:"xml",tldr:"tldraw",tlz:"zip",tmlanguage:"xml",tmx:"xml",tnef:"email",tobi:"tobi",toc:"toc",todo:"todo",tofu:"opentofu",toml:"toml","tool-versions":"settings",toon:"toon",tpl:"smarty",tpp:"cpp",tpz:"zip",tree:"tree",tres:"godot-assets",ts:"typescript","ts.glsl":"shader","ts.map":"json","ts.snap":"test-ts",tsbuildinfo:"json",tscn:"godot-assets","tsconfig.json":"tsconfig",tsv:"table",tsx:"react_ts","tsx.snap":"test-jsx",ttc:"font",ttf:"font",ttml:"subtitles",tw:"twine",twee:"twine",twig:"twig",txt:"document",txx:"cpp",txz:"zip",typ:"typst",tz:"zip",tzst:"zip",tzstd:"zip",ua:"uiua",unity:"unity",unitypackage:"unity",url:"url",usd:"3d",usdz:"3d",use:"sml",v:"vlang",vac:"3d",vagrantfile:"vagrant",vala:"vala",vb:"visualstudio",vba:"visualstudio",vbhtml:"razor",vbox:"virtual","vbox-prev":"virtual",vbproj:"xml","vbproj.user":"xml",vbs:"visualstudio",vcl:"varnish",vcxitems:"visualstudio","vcxitems.filters":"visualstudio",vcxproj:"visualstudio","vcxproj.filters":"visualstudio",vdi:"virtual",vdp:"3d",ved:"vedic",veda:"vedic",vedic:"vedic",verse:"verse",vert:"shader","vert.glsl":"shader","vertex.glsl":"shader",vertexshader:"shader",vfl:"vfl",vhd:"verilog",vhdl:"verilog",vhdx:"verilog",vim:"vim",viminfo:"vim",vimrc:"vim",vm:"velocity",vmdk:"disc",vob:"video",voc:"audio",volt:"html",vox:"3d",vqf:"audio","vs.glsl":"shader",vscodeignore:"vscode",vsh:"shader",vsix:"vscode",vsixmanifest:"vscode",vtl:"velocity",vtt:"subtitles",vue:"vue",wasm:"webassembly",wat:"webassembly",wav:"audio",weba:"audio",webm:"video",webmanifest:"json",webp:"image",wfp:"audio",wgsl:"shader",whl:"python-misc",wim:"zip",windi:"windicss",winget:"yaml",wire:"3d",wixproj:"visualstudio",wl:"wolframlanguage",wls:"wolframlanguage",wma:"audio",wmv:"video",woff:"font",woff2:"font",workbook:"markdown",wpl:"audio",wproj:"audio",wpy:"wepy",wrap:"meson",wrl:"3d",wsd:"uml",wsdl:"xml",wv:"audio",wxi:"xml",wxl:"xml",wxs:"xml",x3f:"image",x_b:"3d",x_t:"3d",xaml:"xaml",xar:"zip",xbl:"xml",xcf:"image",xcplayground:"swift",xht:"html",xhtml:"html",xib:"xml",xlf:"i18n",xliff:"xml",xls:"table",xlsm:"table",xlsx:"table",xml:"xml","xml.dist":"xml","xml.dist.sample":"xml",xmp:"xml",xoml:"xml",xpdl:"xml",xprofile:"console",xquery:"xml",xsd:"xml",xsession:"console",xsessionrc:"console",xsh:"console",xsl:"xml",xslt:"xml",xul:"xml",xz:"zip",yaml:"yaml","yaml-tmlanguage":"yaml","yaml-tmpreferences":"yaml","yaml-tmtheme":"yaml","yaml.dist":"yaml",yang:"yang",yash_profile:"console",yashrc:"console",yml:"yaml","yml.dist":"yaml",yuv:"video",yy:"gamemaker",yyp:"gamemaker",yyz:"gamemaker",z:"zip",zeabur:"zeabur",zig:"zig",zip:"zip",zlogin:"console",zlogout:"console",zon:"zig",zprofile:"console",zsh:"console","zsh-theme":"console",zshenv:"console",zshrc:"console",zst:"zip",zstd:"zip",ц:"tsil","🔥":"mojo"},w3={"-@types":"folder-typescript","-addin":"folder-plugin","-addins":"folder-plugin","-addon":"folder-plugin","-addons":"folder-plugin","-admin":"folder-admin","-admins":"folder-admin","-agent":"folder-robot","-agents":"folder-robot","-android":"folder-android","-angular":"folder-angular","-anim":"folder-animation","-animated":"folder-animation","-animation":"folder-animation","-animations":"folder-animation","-anims":"folder-animation","-ansible":"folder-ansible","-api":"folder-api","-apis":"folder-api","-apollo":"folder-apollo","-apollo-cache":"folder-apollo","-apollo-client":"folder-apollo","-apollo-config":"folder-apollo","-app":"folder-app","-apple":"folder-macos","-application":"folder-app","-applications":"folder-app","-apps":"folder-app","-appwrite":"folder-appwrite","-arc":"folder-archive","-archival":"folder-archive","-archive":"folder-archive","-archives":"folder-archive","-arcs":"folder-archive","-article":"folder-docs","-articles":"folder-docs","-asm":"folder-assembly","-assembly":"folder-assembly","-asset":"folder-resource","-assets":"folder-resource","-astro":"folder-astro","-atom":"folder-atom","-atoms":"folder-atom","-attachment":"folder-attachment","-attachments":"folder-attachment","-aud":"folder-audio","-audio":"folder-audio","-audios":"folder-audio","-auds":"folder-audio","-aurelia_project":"folder-aurelia","-auth":"folder-secure","-authentication":"folder-secure","-auto":"folder-generator","-aws":"folder-aws","-azure":"folder-aws","-azure-pipelines":"folder-azure-pipelines","-azure-pipelines-ci":"folder-azure-pipelines","-back-up":"folder-backup","-back-ups":"folder-backup","-backend":"folder-server","-backends":"folder-server","-backup":"folder-backup","-backups":"folder-backup","-bak":"folder-backup","-baks":"folder-backup","-base":"folder-base","-bases":"folder-base","-batch":"folder-batch","-batches":"folder-batch","-batchs":"folder-batch","-bench":"folder-benchmark","-benches":"folder-benchmark","-benchmark":"folder-benchmark","-benchmarks":"folder-benchmark","-bibliographies":"folder-bibliography","-bibliography":"folder-bibliography","-bicep":"folder-bicep","-bin":"folder-dist","-bkp":"folder-backup","-bkps":"folder-backup","-blender":"folder-blender","-blender-assets":"folder-blender","-blender-files":"folder-blender","-blender-models":"folder-blender","-blender-project":"folder-blender","-bloc":"folder-bloc","-blocs":"folder-bloc","-blog":"folder-docs","-book":"folder-bibliography","-books":"folder-bibliography","-bot":"folder-robot","-bots":"folder-robot","-bower_components":"folder-bower","-browser":"folder-public","-browsers":"folder-public","-build":"folder-dist","-buildkite":"folder-buildkite","-builds":"folder-dist","-built":"folder-dist","-bull":"folder-queue","-cache":"folder-temp","-cached":"folder-temp","-calc":"folder-functions","-calcs":"folder-functions","-calculation":"folder-functions","-calculations":"folder-functions","-cargo":"folder-rust","-cart":"folder-cart","-centos":"folder-linux","-cert":"folder-secure","-certificate":"folder-secure","-certificates":"folder-secure","-certs":"folder-secure","-cfg":"folder-config","-cfgs":"folder-config","-cfn-gen":"folder-generator","-changes":"folder-delta","-changeset":"folder-changesets","-changesets":"folder-changesets","-chat":"folder-messages","-chats":"folder-messages","-ci":"folder-ci","-cipher":"folder-secure","-circleci":"folder-circleci","-cjs":"folder-javascript","-class":"folder-class","-classes":"folder-class","-claude":"folder-claude","-cli":"folder-command","-client":"folder-client","-clients":"folder-client","-cline_docs":"folder-cline","-clis":"folder-command","-cloud-firestore":"folder-firestore","-cloud-functions":"folder-cloud-functions","-cloudflare":"folder-cloudflare","-cloudfunctions":"folder-cloud-functions","-cluster":"folder-cluster","-clusters":"folder-cluster","-cmd":"folder-command","-cobol":"folder-cobol","-code":"folder-src","-color":"folder-theme","-colors":"folder-theme","-colour":"folder-theme","-colours":"folder-theme","-command":"folder-command","-commandline":"folder-command","-commands":"folder-command","-common":"folder-shared","-compiled":"folder-dist","-components":"folder-components","-composable":"folder-functions","-composables":"folder-functions","-concept":"folder-mock","-concepts":"folder-mock","-conf":"folder-config","-config":"folder-config","-configs":"folder-config","-configuration":"folder-config","-configurations":"folder-config","-confs":"folder-config","-connection":"folder-connection","-connections":"folder-connection","-console":"folder-console","-const":"folder-constant","-constant":"folder-constant","-constants":"folder-constant","-consts":"folder-constant","-container":"folder-container","-containers":"folder-container","-content":"folder-content","-contents":"folder-content","-context":"folder-context","-contexts":"folder-context","-contract":"folder-contract","-contract-test":"folder-contract","-contract-testing":"folder-contract","-contract-tests":"folder-contract","-contracts":"folder-contract","-controller":"folder-controller","-controllers":"folder-controller","-controls":"folder-controller","-conversation":"folder-messages","-conversations":"folder-messages","-core":"folder-core","-coverage":"folder-coverage","-crash":"folder-error","-crashes":"folder-error","-crates":"folder-lib","-css":"folder-css","-cts":"folder-typescript","-cubit":"folder-bloc","-cubits":"folder-bloc","-cue":"folder-cue","-cues":"folder-cue","-cursor":"folder-cursor","-custom":"folder-custom","-customs":"folder-custom","-cypher":"folder-secure","-cypress":"folder-cypress","-dal":"folder-dal","-dart":"folder-dart","-dart_tool":"folder-dart","-dart_tools":"folder-dart","-data":"folder-database","-data-access":"folder-dal","-data-access-layer":"folder-dal","-database":"folder-database","-databases":"folder-database","-db":"folder-database","-deb":"folder-linux","-debian":"folder-linux","-debug":"folder-debug","-debugger":"folder-debug","-debugging":"folder-debug","-decorator":"folder-decorators","-decorators":"folder-decorators","-deepin":"folder-linux","-delta":"folder-delta","-deltas":"folder-delta","-demo":"folder-examples","-demos":"folder-examples","-dependencies":"folder-packages","-design":"folder-theme","-designs":"folder-theme","-desktop":"folder-desktop","-devcontainer":"folder-container","-devpackages":"folder-packages","-devtools":"folder-tools","-dialog":"folder-messages","-dialogs":"folder-messages","-diary":"folder-docs","-directive":"folder-directive","-directives":"folder-directive","-display":"folder-desktop","-dist":"folder-dist","-distribution":"folder-dist","-doc":"folder-docs","-docker":"folder-docker","-dockerfiles":"folder-docker","-dockerhub":"folder-docker","-docs":"folder-docs","-document":"folder-docs","-documentation":"folder-docs","-documents":"folder-docs","-download":"folder-download","-downloader":"folder-download","-downloaders":"folder-download","-downloads":"folder-download","-draft":"folder-mock","-drafts":"folder-mock","-drizzle":"folder-drizzle","-ds_store":"folder-macos","-dump":"folder-dump","-dumps":"folder-dump","-e2e":"folder-coverage","-easing":"folder-animation","-easings":"folder-animation","-element":"folder-element","-elements":"folder-element","-email":"folder-mail","-emails":"folder-mail","-enum":"folder-enum","-enums":"folder-enum","-env":"folder-environment","-environment":"folder-environment","-environments":"folder-environment","-envs":"folder-environment","-err":"folder-error","-error":"folder-error","-errors":"folder-error","-errs":"folder-error","-eslint":"folder-eslint","-eslint-config":"folder-eslint","-eslint-configs":"folder-eslint","-eslint-plugin":"folder-eslint","-eslint-plugins":"folder-eslint","-etc":"folder-other","-event":"folder-event","-events":"folder-event","-example":"folder-examples","-examples":"folder-examples","-expo":"folder-expo","-expo-shared":"folder-expo","-export":"folder-export","-exported":"folder-export","-exports":"folder-export","-extension":"folder-plugin","-extensions":"folder-plugin","-external":"folder-lib","-externals":"folder-lib","-extra":"folder-other","-extras":"folder-other","-fastlane":"folder-fastlane","-favicon":"folder-favicon","-favicons":"folder-favicon","-feat":"folder-features","-feats":"folder-features","-feature":"folder-features","-features":"folder-features","-fig":"folder-images","-figs":"folder-images","-figure":"folder-images","-figures":"folder-images","-filter":"folder-filter","-filters":"folder-filter","-firebase":"folder-firebase","-firebase-cloud-functions":"folder-cloud-functions","-firebase-cloudfunctions":"folder-cloud-functions","-firebase-firestore":"folder-firestore","-firestore":"folder-firestore","-fixture":"folder-mock","-fixtures":"folder-mock","-flow-typed":"folder-flow","-flutter":"folder-flutter","-font":"folder-font","-fonts":"folder-font","-forgejo":"folder-forgejo","-form":"folder-form","-forms":"folder-form","-forum":"folder-messages","-fragments":"folder-components","-frontend":"folder-client","-frontends":"folder-client","-func":"folder-functions","-funcs":"folder-functions","-function":"folder-functions","-functions":"folder-functions","-game":"folder-console","-gamemaker":"folder-gamemaker","-gamemaker2":"folder-gamemaker","-games":"folder-console","-gcp":"folder-aws","-gemini":"folder-gemini-ai","-gemini-ai":"folder-gemini-ai","-geminiai":"folder-gemini-ai","-gen":"folder-generator","-generated":"folder-generator","-generator":"folder-generator","-generators":"folder-generator","-gens":"folder-generator","-git":"folder-git","-gitea":"folder-gitea","-githooks":"folder-git","-github":"folder-github","-github/issue_template":"folder-template","-github/pull_request_template":"folder-template","-github/workflows":"folder-gh-workflows","-gitlab":"folder-gitlab","-global":"folder-global","-glsl":"folder-shader","-go":"folder-go","-godot":"folder-godot","-godot-cpp":"folder-godot","-golang":"folder-go","-gql":"folder-graphql","-gradle":"folder-gradle","-graphql":"folder-graphql","-guard":"folder-guard","-guards":"folder-guard","-gui":"folder-ui","-gulp":"folder-gulp","-gulp-tasks":"folder-gulp","-gulpfile.babel.js":"folder-gulp","-gulpfile.js":"folder-gulp","-gulpfile.mjs":"folder-gulp","-gulpfile.ts":"folder-gulp","-gulpfiles":"folder-gulp","-handler":"folder-controller","-handlers":"folder-controller","-helm":"folder-helm","-helmchart":"folder-helm","-helmcharts":"folder-helm","-helper":"folder-helper","-helpers":"folder-helper","-hg":"folder-mercurial","-hgext":"folder-mercurial","-hghooks":"folder-mercurial","-histories":"folder-backup","-history":"folder-backup","-hlsl":"folder-shader","-home":"folder-home","-hook":"folder-hook","-hooks":"folder-hook","-html":"folder-views","-husky":"folder-husky","-i18n":"folder-i18n","-ico":"folder-images","-icon":"folder-images","-icons":"folder-images","-icos":"folder-images","-idea":"folder-intellij","-image":"folder-images","-images":"folder-images","-img":"folder-images","-imgs":"folder-images","-import":"folder-import","-imported":"folder-import","-imports":"folder-import","-in":"folder-input","-inc":"folder-include","-inc64":"folder-include","-include":"folder-include","-includes":"folder-include","-infra":"folder-server","-infrastructure":"folder-server","-input":"folder-input","-inputs":"folder-input","-integration":"folder-connection","-integration-test":"folder-coverage","-integration-tests":"folder-coverage","-integrations":"folder-connection","-interceptor":"folder-interceptor","-interceptors":"folder-interceptor","-interface":"folder-interface","-interfaces":"folder-interface","-internationalization":"folder-i18n","-inventories":"folder-server","-inventory":"folder-server","-io":"folder-input","-ios":"folder-ios","-ipad":"folder-macos","-iphone":"folder-macos","-ipod":"folder-macos","-ipynb":"folder-jupyter","-it":"folder-coverage","-j2":"folder-jinja","-java":"folder-java","-javascript":"folder-javascript","-javascripts":"folder-javascript","-jinja":"folder-jinja","-jinja2":"folder-jinja","-job":"folder-job","-jobs":"folder-job","-js":"folder-javascript","-json":"folder-json","-jsonc":"folder-json","-jsonl":"folder-json","-jsons":"folder-json","-jupyter":"folder-jupyter","-jwt":"folder-keys","-k8s":"folder-kubernetes","-key":"folder-keys","-keys":"folder-keys","-kit":"folder-tools","-kits":"folder-tools","-knowledge":"folder-docs","-kotlin":"folder-kotlin","-kql":"folder-kusto","-kubernetes":"folder-kubernetes","-kusto":"folder-kusto","-l10n":"folder-i18n","-lambda":"folder-functions","-lambdas":"folder-functions","-landing":"folder-home","-lang":"folder-i18n","-langs":"folder-i18n","-language":"folder-i18n","-languages":"folder-i18n","-layout":"folder-layout","-layouts":"folder-layout","-lefthook":"folder-lefthook","-lefthook-local":"folder-lefthook","-less":"folder-less","-lib":"folder-lib","-lib64":"folder-lib","-libraries":"folder-lib","-library":"folder-lib","-libs":"folder-lib","-license":"folder-license","-licenses":"folder-license","-link":"folder-link","-links":"folder-link","-linux":"folder-linux","-linuxbsd":"folder-linux","-liquibase":"folder-liquibase","-locale":"folder-i18n","-locales":"folder-i18n","-localization":"folder-i18n","-log":"folder-log","-logging":"folder-log","-logic":"folder-functions","-logs":"folder-log","-lottie":"folder-lottie","-lottiefiles":"folder-lottie","-lotties":"folder-lottie","-lua":"folder-lua","-luau":"folder-luau","-mac":"folder-macos","-macbook":"folder-macos","-macbook-air":"folder-macos","-macos":"folder-macos","-macosx":"folder-macos","-mail":"folder-mail","-mailers":"folder-mail","-mails":"folder-mail","-main":"folder-home","-manager":"folder-admin","-managers":"folder-admin","-mapping":"folder-mappings","-mappings":"folder-mappings","-markdown":"folder-markdown","-math":"folder-functions","-maths":"folder-functions","-md":"folder-markdown","-measure":"folder-benchmark","-measurement":"folder-benchmark","-measures":"folder-benchmark","-media":"folder-video","-messages":"folder-messages","-messaging":"folder-messages","-meta":"folder-meta","-meta-inf":"folder-config","-metadata":"folder-meta","-metro":"folder-metro","-middleware":"folder-middleware","-middlewares":"folder-middleware","-migration":"folder-migrations","-migrations":"folder-migrations","-mint":"folder-linux","-misc":"folder-other","-miscellaneous":"folder-other","-mjml":"folder-mjml","-mjs":"folder-javascript","-mobile":"folder-mobile","-mobiles":"folder-mobile","-mock":"folder-mock","-mocks":"folder-mock","-mod":"folder-plugin","-modding":"folder-plugin","-model":"folder-class","-models":"folder-class","-moderator":"folder-admin","-moderators":"folder-admin","-mods":"folder-plugin","-module":"folder-plugin","-modules":"folder-plugin","-mojo":"folder-mojo","-molecule":"folder-molecule","-molecules":"folder-molecule","-moon":"folder-moon","-motion":"folder-animation","-motions":"folder-animation","-movie":"folder-video","-movies":"folder-video","-mq":"folder-queue","-mts":"folder-typescript","-music":"folder-audio","-navigation":"folder-routes","-navigations":"folder-routes","-netlify":"folder-netlify","-news":"folder-docs","-next":"folder-next","-nginx":"folder-nginx","-node":"folder-node","-node_modules":"folder-node","-nodejs":"folder-node","-note":"folder-docs","-notebook":"folder-jupyter","-notebooks":"folder-jupyter","-notes":"folder-docs","-now":"folder-vercel","-nuxt":"folder-nuxt","-nyc-output":"folder-coverage","-nyc_output":"folder-coverage","-obsidian":"folder-obsidian","-opencode":"folder-opencode","-option":"folder-config","-options":"folder-config","-organism":"folder-organism","-organisms":"folder-organism","-osx":"folder-macos","-other":"folder-other","-others":"folder-other","-out":"folder-dist","-output":"folder-dist","-outputs":"folder-dist","-package":"folder-packages","-packages":"folder-packages","-pact":"folder-contract","-pacts":"folder-contract","-page":"folder-views","-pages":"folder-views","-palette":"folder-theme","-palettes":"folder-theme","-partial":"folder-include","-partials":"folder-include","-patches":"folder-git","-pdf":"folder-pdf","-pdfs":"folder-pdf","-pdm-build":"folder-pdm","-pdm-plugins":"folder-pdm","-perf":"folder-benchmark","-performance":"folder-benchmark","-phone":"folder-mobile","-phones":"folder-mobile","-photo":"folder-images","-photograph":"folder-images","-photographs":"folder-images","-photos":"folder-images","-php":"folder-php","-phpmailer":"folder-phpmailer","-pic":"folder-images","-pics":"folder-images","-picture":"folder-images","-pictures":"folder-images","-pipe":"folder-pipe","-pipeline":"folder-pipe","-pipelines":"folder-pipe","-pipes":"folder-pipe","-pkg":"folder-packages","-pkgs":"folder-packages","-plastic":"folder-plastic","-playground":"folder-sandbox","-playgrounds":"folder-sandbox","-playlist":"folder-audio","-playlists":"folder-audio","-plugin":"folder-plugin","-plugins":"folder-plugin","-policies":"folder-policy","-policy":"folder-policy","-popos":"folder-linux","-portability":"folder-mobile","-portable":"folder-mobile","-post":"folder-docs","-postman":"folder-postman","-posts":"folder-docs","-powershell":"folder-powershell","-pref":"folder-config","-preference":"folder-config","-preferences":"folder-config","-prefs":"folder-config","-presentation":"folder-ui","-preview":"folder-review","-previews":"folder-review","-prisma":"folder-prisma","-prisma/schema":"folder-prisma","-private":"folder-private","-profiling":"folder-benchmark","-proj":"folder-project","-project":"folder-project","-projects":"folder-project","-projs":"folder-project","-prompt":"folder-prompts","-prompts":"folder-prompts","-properties":"folder-config","-props":"folder-config","-proto":"folder-proto","-protobuf":"folder-proto","-protobufs":"folder-proto","-protos":"folder-proto","-provider":"folder-controller","-providers":"folder-controller","-proxy":"folder-public","-ps":"folder-powershell","-ps1":"folder-powershell","-ps4":"folder-console","-ps5":"folder-console","-public":"folder-public","-public_html":"folder-views","-pwa":"folder-client","-pycache":"folder-python","-pytest_cache":"folder-python","-python":"folder-python","-pytorch":"folder-pytorch","-quasar":"folder-quasar","-queue":"folder-queue","-queues":"folder-queue","-r":"folder-r","-recordings":"folder-audio","-release":"folder-dist","-remote":"folder-connection","-remotes":"folder-connection","-repo":"folder-repository","-report":"folder-resource","-reports":"folder-resource","-repos":"folder-repository","-repositories":"folder-repository","-repository":"folder-repository","-res":"folder-resource","-resolver":"folder-resolver","-resolvers":"folder-resolver","-resource":"folder-resource","-resources":"folder-resource","-restapi":"folder-api","-review":"folder-review","-reviewed":"folder-review","-reviews":"folder-review","-revisal":"folder-review","-revisals":"folder-review","-robot":"folder-robot","-robots":"folder-robot","-router":"folder-routes","-routers":"folder-routes","-routes":"folder-routes","-routing":"folder-routes","-rule":"folder-rules","-rules":"folder-rules","-rust":"folder-rust","-salt":"folder-salt","-saltstack":"folder-salt","-sample":"folder-examples","-sample-data":"folder-examples","-samples":"folder-examples","-sandbox":"folder-sandbox","-sandboxes":"folder-sandbox","-sass":"folder-sass","-scala":"folder-scala","-schema":"folder-class","-schemas":"folder-class","-sconf_temp":"folder-scons","-scons":"folder-scons","-scons_cache":"folder-scons","-screen":"folder-views","-screengrab":"folder-images","-screengrabs":"folder-images","-screens":"folder-views","-screenshot":"folder-images","-screenshots":"folder-images","-script":"folder-scripts","-scripting":"folder-scripts","-scripts":"folder-scripts","-scss":"folder-sass","-secret":"folder-keys","-secrets":"folder-keys","-secure":"folder-secure","-security":"folder-secure","-seed":"folder-seeders","-seeders":"folder-seeders","-seeding":"folder-seeders","-seeds":"folder-seeders","-server":"folder-server","-serverless":"folder-serverless","-serverpackages":"folder-packages","-servers":"folder-server","-service":"folder-controller","-services":"folder-controller","-setting":"folder-config","-settings":"folder-config","-shader":"folder-shader","-shaders":"folder-shader","-shared":"folder-shared","-shop":"folder-cart","-shopping":"folder-cart","-shopping-cart":"folder-cart","-sim":"folder-simulations","-sims":"folder-simulations","-simulation":"folder-simulations","-simulations":"folder-simulations","-site":"folder-public","-sketch":"folder-mock","-sketches":"folder-mock","-skill":"folder-skills","-skills":"folder-skills","-smtp":"folder-mail","-snap":"folder-snapcraft","-snapcraft":"folder-snapcraft","-snapshots":"folder-test","-snippet":"folder-snippet","-snippets":"folder-snippet","-song":"folder-audio","-songs":"folder-audio","-sound":"folder-audio","-sounds":"folder-audio","-source":"folder-src","-sources":"folder-src","-spa":"folder-client","-spec":"folder-test","-specs":"folder-test","-spellcheck":"folder-syntax","-spellcheckers":"folder-syntax","-sql":"folder-database","-src":"folder-src","-src-tauri":"folder-src-tauri","-srcs":"folder-src","-ssl":"folder-secure","-stack":"folder-stack","-stacks":"folder-stack","-start":"folder-home","-static":"folder-resource","-stencil":"folder-stencil","-store":"folder-store","-stores":"folder-store","-stories":"folder-storybook","-storybook":"folder-storybook","-style":"folder-css","-styles":"folder-css","-stylesheet":"folder-css","-stylesheets":"folder-css","-stylus":"folder-stylus","-sublime":"folder-sublime","-submodules":"folder-git","-supabase":"folder-supabase","-svelte":"folder-svelte","-svelte-kit":"folder-svelte","-svg":"folder-svg","-svgs":"folder-svg","-switch":"folder-console","-syntax":"folder-syntax","-syntaxes":"folder-syntax","-table-of-contents":"folder-toc","-target":"folder-target","-taskfile":"folder-taskfile","-taskfiles":"folder-taskfile","-tasks":"folder-tasks","-television":"folder-television","-temp":"folder-temp","-template":"folder-template","-templates":"folder-template","-terraform":"folder-terraform","-test":"folder-test","-testfiles":"folder-test","-testing":"folder-test","-tests":"folder-test","-texture":"folder-images","-textures":"folder-images","-theme":"folder-theme","-themes":"folder-theme","-third-party":"folder-lib","-thirdparty":"folder-lib","-tickets":"folder-tasks","-tls":"folder-secure","-tmp":"folder-temp","-toc":"folder-toc","-token":"folder-keys","-tokens":"folder-keys","-toolbox":"folder-tools","-toolboxes":"folder-tools","-tooling":"folder-tools","-toolkit":"folder-tools","-toolkits":"folder-tools","-tools":"folder-tools","-torch":"folder-pytorch","-transition":"folder-animation","-transitions":"folder-animation","-translate":"folder-i18n","-translation":"folder-i18n","-translations":"folder-i18n","-trash":"folder-trash","-trigger":"folder-trigger","-triggers":"folder-trigger","-ts":"folder-typescript","-turbo":"folder-turborepo","-tv":"folder-television","-tx":"folder-i18n","-typeface":"folder-font","-typefaces":"folder-font","-types":"folder-typescript","-typescript":"folder-typescript","-typings":"folder-typescript","-ubuntu":"folder-linux","-ui":"folder-ui","-unity":"folder-unity","-unix":"folder-linux","-update":"folder-update","-updates":"folder-update","-upgrade":"folder-update","-upgrades":"folder-update","-upload":"folder-upload","-uploads":"folder-upload","-util":"folder-utils","-utilities":"folder-utils","-utility":"folder-utils","-utils":"folder-utils","-ux":"folder-ui","-validation":"folder-rules","-validations":"folder-rules","-validator":"folder-rules","-validators":"folder-rules","-vector":"folder-svg","-vectors":"folder-svg","-vendor":"folder-lib","-vendors":"folder-lib","-venv":"folder-environment","-vercel":"folder-vercel","-verdaccio":"folder-verdaccio","-vid":"folder-video","-video":"folder-video","-videos":"folder-video","-vids":"folder-video","-view":"folder-views","-views":"folder-views","-vm":"folder-vm","-vms":"folder-vm","-voice":"folder-audio","-voices":"folder-audio","-vscode":"folder-vscode","-vscode-test":"folder-vscode","-vue":"folder-vue","-vuepress":"folder-vuepress","-wakatime":"folder-wakatime","-web":"folder-public","-webpack":"folder-webpack","-website":"folder-public","-websites":"folder-public","-widget":"folder-components","-widgets":"folder-components","-wiki":"folder-docs","-win":"folder-windows","-win10":"folder-windows","-win11":"folder-windows","-win32":"folder-windows","-windows":"folder-windows","-windows10":"folder-windows","-windows11":"folder-windows","-windowsnt":"folder-windows","-windowsxp":"folder-windows","-winnt":"folder-windows","-winxp":"folder-windows","-wordpress-org":"folder-wordpress","-wp-content":"folder-wordpress","-wsl":"folder-linux","-www":"folder-public","-wwwroot":"folder-public","-xbox":"folder-console","-xtask":"folder-scripts","-yarn":"folder-yarn","-zeabur":"folder-zeabur","-zed":"folder-zed",".@types":"folder-typescript",".addin":"folder-plugin",".addins":"folder-plugin",".addon":"folder-plugin",".addons":"folder-plugin",".admin":"folder-admin",".admins":"folder-admin",".agent":"folder-robot",".agents":"folder-robot",".android":"folder-android",".angular":"folder-angular",".anim":"folder-animation",".animated":"folder-animation",".animation":"folder-animation",".animations":"folder-animation",".anims":"folder-animation",".ansible":"folder-ansible",".api":"folder-api",".apis":"folder-api",".apollo":"folder-apollo",".apollo-cache":"folder-apollo",".apollo-client":"folder-apollo",".apollo-config":"folder-apollo",".app":"folder-app",".apple":"folder-macos",".application":"folder-app",".applications":"folder-app",".apps":"folder-app",".appwrite":"folder-appwrite",".arc":"folder-archive",".archival":"folder-archive",".archive":"folder-archive",".archives":"folder-archive",".arcs":"folder-archive",".article":"folder-docs",".articles":"folder-docs",".asm":"folder-assembly",".assembly":"folder-assembly",".asset":"folder-resource",".assets":"folder-resource",".astro":"folder-astro",".atom":"folder-atom",".atoms":"folder-atom",".attachment":"folder-attachment",".attachments":"folder-attachment",".aud":"folder-audio",".audio":"folder-audio",".audios":"folder-audio",".auds":"folder-audio",".aurelia_project":"folder-aurelia",".auth":"folder-secure",".authentication":"folder-secure",".auto":"folder-generator",".aws":"folder-aws",".azure":"folder-aws",".azure-pipelines":"folder-azure-pipelines",".azure-pipelines-ci":"folder-azure-pipelines",".back-up":"folder-backup",".back-ups":"folder-backup",".backend":"folder-server",".backends":"folder-server",".backup":"folder-backup",".backups":"folder-backup",".bak":"folder-backup",".baks":"folder-backup",".base":"folder-base",".bases":"folder-base",".batch":"folder-batch",".batches":"folder-batch",".batchs":"folder-batch",".bench":"folder-benchmark",".benches":"folder-benchmark",".benchmark":"folder-benchmark",".benchmarks":"folder-benchmark",".bibliographies":"folder-bibliography",".bibliography":"folder-bibliography",".bicep":"folder-bicep",".bin":"folder-dist",".bkp":"folder-backup",".bkps":"folder-backup",".blender":"folder-blender",".blender-assets":"folder-blender",".blender-files":"folder-blender",".blender-models":"folder-blender",".blender-project":"folder-blender",".bloc":"folder-bloc",".blocs":"folder-bloc",".blog":"folder-docs",".book":"folder-bibliography",".books":"folder-bibliography",".bot":"folder-robot",".bots":"folder-robot",".bower_components":"folder-bower",".browser":"folder-public",".browsers":"folder-public",".build":"folder-dist",".buildkite":"folder-buildkite",".builds":"folder-dist",".built":"folder-dist",".bull":"folder-queue",".cache":"folder-temp",".cached":"folder-temp",".calc":"folder-functions",".calcs":"folder-functions",".calculation":"folder-functions",".calculations":"folder-functions",".cargo":"folder-rust",".cart":"folder-cart",".centos":"folder-linux",".cert":"folder-secure",".certificate":"folder-secure",".certificates":"folder-secure",".certs":"folder-secure",".cfg":"folder-config",".cfgs":"folder-config",".cfn-gen":"folder-generator",".changes":"folder-delta",".changeset":"folder-changesets",".changesets":"folder-changesets",".chat":"folder-messages",".chats":"folder-messages",".ci":"folder-ci",".cipher":"folder-secure",".circleci":"folder-circleci",".cjs":"folder-javascript",".class":"folder-class",".classes":"folder-class",".claude":"folder-claude",".cli":"folder-command",".client":"folder-client",".clients":"folder-client",".cline_docs":"folder-cline",".clis":"folder-command",".cloud-firestore":"folder-firestore",".cloud-functions":"folder-cloud-functions",".cloudflare":"folder-cloudflare",".cloudfunctions":"folder-cloud-functions",".cluster":"folder-cluster",".clusters":"folder-cluster",".cmd":"folder-command",".cobol":"folder-cobol",".code":"folder-src",".color":"folder-theme",".colors":"folder-theme",".colour":"folder-theme",".colours":"folder-theme",".command":"folder-command",".commandline":"folder-command",".commands":"folder-command",".common":"folder-shared",".compiled":"folder-dist",".components":"folder-components",".composable":"folder-functions",".composables":"folder-functions",".concept":"folder-mock",".concepts":"folder-mock",".conf":"folder-config",".config":"folder-config",".configs":"folder-config",".configuration":"folder-config",".configurations":"folder-config",".confs":"folder-config",".connection":"folder-connection",".connections":"folder-connection",".console":"folder-console",".const":"folder-constant",".constant":"folder-constant",".constants":"folder-constant",".consts":"folder-constant",".container":"folder-container",".containers":"folder-container",".content":"folder-content",".contents":"folder-content",".context":"folder-context",".contexts":"folder-context",".contract":"folder-contract",".contract-test":"folder-contract",".contract-testing":"folder-contract",".contract-tests":"folder-contract",".contracts":"folder-contract",".controller":"folder-controller",".controllers":"folder-controller",".controls":"folder-controller",".conversation":"folder-messages",".conversations":"folder-messages",".core":"folder-core",".coverage":"folder-coverage",".crash":"folder-error",".crashes":"folder-error",".crates":"folder-lib",".css":"folder-css",".cts":"folder-typescript",".cubit":"folder-bloc",".cubits":"folder-bloc",".cue":"folder-cue",".cues":"folder-cue",".cursor":"folder-cursor",".custom":"folder-custom",".customs":"folder-custom",".cypher":"folder-secure",".cypress":"folder-cypress",".dal":"folder-dal",".dart":"folder-dart",".dart_tool":"folder-dart",".dart_tools":"folder-dart",".data":"folder-database",".data-access":"folder-dal",".data-access-layer":"folder-dal",".database":"folder-database",".databases":"folder-database",".db":"folder-database",".deb":"folder-linux",".debian":"folder-linux",".debug":"folder-debug",".debugger":"folder-debug",".debugging":"folder-debug",".decorator":"folder-decorators",".decorators":"folder-decorators",".deepin":"folder-linux",".delta":"folder-delta",".deltas":"folder-delta",".demo":"folder-examples",".demos":"folder-examples",".dependencies":"folder-packages",".design":"folder-theme",".designs":"folder-theme",".desktop":"folder-desktop",".devcontainer":"folder-container",".devpackages":"folder-packages",".devtools":"folder-tools",".dialog":"folder-messages",".dialogs":"folder-messages",".diary":"folder-docs",".directive":"folder-directive",".directives":"folder-directive",".display":"folder-desktop",".dist":"folder-dist",".distribution":"folder-dist",".doc":"folder-docs",".docker":"folder-docker",".dockerfiles":"folder-docker",".dockerhub":"folder-docker",".docs":"folder-docs",".document":"folder-docs",".documentation":"folder-docs",".documents":"folder-docs",".download":"folder-download",".downloader":"folder-download",".downloaders":"folder-download",".downloads":"folder-download",".draft":"folder-mock",".drafts":"folder-mock",".drizzle":"folder-drizzle",".ds_store":"folder-macos",".dump":"folder-dump",".dumps":"folder-dump",".e2e":"folder-coverage",".easing":"folder-animation",".easings":"folder-animation",".element":"folder-element",".elements":"folder-element",".email":"folder-mail",".emails":"folder-mail",".enum":"folder-enum",".enums":"folder-enum",".env":"folder-environment",".environment":"folder-environment",".environments":"folder-environment",".envs":"folder-environment",".err":"folder-error",".error":"folder-error",".errors":"folder-error",".errs":"folder-error",".eslint":"folder-eslint",".eslint-config":"folder-eslint",".eslint-configs":"folder-eslint",".eslint-plugin":"folder-eslint",".eslint-plugins":"folder-eslint",".etc":"folder-other",".event":"folder-event",".events":"folder-event",".example":"folder-examples",".examples":"folder-examples",".expo":"folder-expo",".expo-shared":"folder-expo",".export":"folder-export",".exported":"folder-export",".exports":"folder-export",".extension":"folder-plugin",".extensions":"folder-plugin",".external":"folder-lib",".externals":"folder-lib",".extra":"folder-other",".extras":"folder-other",".fastlane":"folder-fastlane",".favicon":"folder-favicon",".favicons":"folder-favicon",".feat":"folder-features",".feats":"folder-features",".feature":"folder-features",".features":"folder-features",".fig":"folder-images",".figs":"folder-images",".figure":"folder-images",".figures":"folder-images",".filter":"folder-filter",".filters":"folder-filter",".firebase":"folder-firebase",".firebase-cloud-functions":"folder-cloud-functions",".firebase-cloudfunctions":"folder-cloud-functions",".firebase-firestore":"folder-firestore",".firestore":"folder-firestore",".fixture":"folder-mock",".fixtures":"folder-mock",".flow-typed":"folder-flow",".flutter":"folder-flutter",".font":"folder-font",".fonts":"folder-font",".forgejo":"folder-forgejo",".form":"folder-form",".forms":"folder-form",".forum":"folder-messages",".fragments":"folder-components",".frontend":"folder-client",".frontends":"folder-client",".func":"folder-functions",".funcs":"folder-functions",".function":"folder-functions",".functions":"folder-functions",".game":"folder-console",".gamemaker":"folder-gamemaker",".gamemaker2":"folder-gamemaker",".games":"folder-console",".gcp":"folder-aws",".gemini":"folder-gemini-ai",".gemini-ai":"folder-gemini-ai",".geminiai":"folder-gemini-ai",".gen":"folder-generator",".generated":"folder-generator",".generator":"folder-generator",".generators":"folder-generator",".gens":"folder-generator",".git":"folder-git",".gitea":"folder-gitea",".githooks":"folder-git",".github":"folder-github",".github/issue_template":"folder-template",".github/pull_request_template":"folder-template",".github/workflows":"folder-gh-workflows",".gitlab":"folder-gitlab",".global":"folder-global",".glsl":"folder-shader",".go":"folder-go",".godot":"folder-godot",".godot-cpp":"folder-godot",".golang":"folder-go",".gql":"folder-graphql",".gradle":"folder-gradle",".graphql":"folder-graphql",".guard":"folder-guard",".guards":"folder-guard",".gui":"folder-ui",".gulp":"folder-gulp",".gulp-tasks":"folder-gulp",".gulpfile.babel.js":"folder-gulp",".gulpfile.js":"folder-gulp",".gulpfile.mjs":"folder-gulp",".gulpfile.ts":"folder-gulp",".gulpfiles":"folder-gulp",".handler":"folder-controller",".handlers":"folder-controller",".helm":"folder-helm",".helmchart":"folder-helm",".helmcharts":"folder-helm",".helper":"folder-helper",".helpers":"folder-helper",".hg":"folder-mercurial",".hgext":"folder-mercurial",".hghooks":"folder-mercurial",".histories":"folder-backup",".history":"folder-backup",".hlsl":"folder-shader",".home":"folder-home",".hook":"folder-hook",".hooks":"folder-hook",".html":"folder-views",".husky":"folder-husky",".i18n":"folder-i18n",".ico":"folder-images",".icon":"folder-images",".icons":"folder-images",".icos":"folder-images",".idea":"folder-intellij",".image":"folder-images",".images":"folder-images",".img":"folder-images",".imgs":"folder-images",".import":"folder-import",".imported":"folder-import",".imports":"folder-import",".in":"folder-input",".inc":"folder-include",".inc64":"folder-include",".include":"folder-include",".includes":"folder-include",".infra":"folder-server",".infrastructure":"folder-server",".input":"folder-input",".inputs":"folder-input",".integration":"folder-connection",".integration-test":"folder-coverage",".integration-tests":"folder-coverage",".integrations":"folder-connection",".interceptor":"folder-interceptor",".interceptors":"folder-interceptor",".interface":"folder-interface",".interfaces":"folder-interface",".internationalization":"folder-i18n",".inventories":"folder-server",".inventory":"folder-server",".io":"folder-input",".ios":"folder-ios",".ipad":"folder-macos",".iphone":"folder-macos",".ipod":"folder-macos",".ipynb":"folder-jupyter",".it":"folder-coverage",".j2":"folder-jinja",".java":"folder-java",".javascript":"folder-javascript",".javascripts":"folder-javascript",".jinja":"folder-jinja",".jinja2":"folder-jinja",".job":"folder-job",".jobs":"folder-job",".js":"folder-javascript",".json":"folder-json",".jsonc":"folder-json",".jsonl":"folder-json",".jsons":"folder-json",".jupyter":"folder-jupyter",".jwt":"folder-keys",".k8s":"folder-kubernetes",".key":"folder-keys",".keys":"folder-keys",".kit":"folder-tools",".kits":"folder-tools",".knowledge":"folder-docs",".kotlin":"folder-kotlin",".kql":"folder-kusto",".kubernetes":"folder-kubernetes",".kusto":"folder-kusto",".l10n":"folder-i18n",".lambda":"folder-functions",".lambdas":"folder-functions",".landing":"folder-home",".lang":"folder-i18n",".langs":"folder-i18n",".language":"folder-i18n",".languages":"folder-i18n",".layout":"folder-layout",".layouts":"folder-layout",".lefthook":"folder-lefthook",".lefthook-local":"folder-lefthook",".less":"folder-less",".lib":"folder-lib",".lib64":"folder-lib",".libraries":"folder-lib",".library":"folder-lib",".libs":"folder-lib",".license":"folder-license",".licenses":"folder-license",".link":"folder-link",".links":"folder-link",".linux":"folder-linux",".linuxbsd":"folder-linux",".liquibase":"folder-liquibase",".locale":"folder-i18n",".locales":"folder-i18n",".localization":"folder-i18n",".log":"folder-log",".logging":"folder-log",".logic":"folder-functions",".logs":"folder-log",".lottie":"folder-lottie",".lottiefiles":"folder-lottie",".lotties":"folder-lottie",".lua":"folder-lua",".luau":"folder-luau",".mac":"folder-macos",".macbook":"folder-macos",".macbook-air":"folder-macos",".macos":"folder-macos",".macosx":"folder-macos",".mail":"folder-mail",".mailers":"folder-mail",".mails":"folder-mail",".main":"folder-home",".manager":"folder-admin",".managers":"folder-admin",".mapping":"folder-mappings",".mappings":"folder-mappings",".markdown":"folder-markdown",".math":"folder-functions",".maths":"folder-functions",".md":"folder-markdown",".measure":"folder-benchmark",".measurement":"folder-benchmark",".measures":"folder-benchmark",".media":"folder-video",".messages":"folder-messages",".messaging":"folder-messages",".meta":"folder-meta",".meta-inf":"folder-config",".metadata":"folder-meta",".metro":"folder-metro",".middleware":"folder-middleware",".middlewares":"folder-middleware",".migration":"folder-migrations",".migrations":"folder-migrations",".mint":"folder-linux",".misc":"folder-other",".miscellaneous":"folder-other",".mjml":"folder-mjml",".mjs":"folder-javascript",".mobile":"folder-mobile",".mobiles":"folder-mobile",".mock":"folder-mock",".mocks":"folder-mock",".mod":"folder-plugin",".modding":"folder-plugin",".model":"folder-class",".models":"folder-class",".moderator":"folder-admin",".moderators":"folder-admin",".mods":"folder-plugin",".module":"folder-plugin",".modules":"folder-plugin",".mojo":"folder-mojo",".molecule":"folder-molecule",".molecules":"folder-molecule",".moon":"folder-moon",".motion":"folder-animation",".motions":"folder-animation",".movie":"folder-video",".movies":"folder-video",".mq":"folder-queue",".mts":"folder-typescript",".music":"folder-audio",".navigation":"folder-routes",".navigations":"folder-routes",".netlify":"folder-netlify",".news":"folder-docs",".next":"folder-next",".nginx":"folder-nginx",".node":"folder-node",".node_modules":"folder-node",".nodejs":"folder-node",".note":"folder-docs",".notebook":"folder-jupyter",".notebooks":"folder-jupyter",".notes":"folder-docs",".now":"folder-vercel",".nuxt":"folder-nuxt",".nyc-output":"folder-coverage",".nyc_output":"folder-coverage",".obsidian":"folder-obsidian",".opencode":"folder-opencode",".option":"folder-config",".options":"folder-config",".organism":"folder-organism",".organisms":"folder-organism",".osx":"folder-macos",".other":"folder-other",".others":"folder-other",".out":"folder-dist",".output":"folder-dist",".outputs":"folder-dist",".package":"folder-packages",".packages":"folder-packages",".pact":"folder-contract",".pacts":"folder-contract",".page":"folder-views",".pages":"folder-views",".palette":"folder-theme",".palettes":"folder-theme",".partial":"folder-include",".partials":"folder-include",".patches":"folder-git",".pdf":"folder-pdf",".pdfs":"folder-pdf",".pdm-build":"folder-pdm",".pdm-plugins":"folder-pdm",".perf":"folder-benchmark",".performance":"folder-benchmark",".phone":"folder-mobile",".phones":"folder-mobile",".photo":"folder-images",".photograph":"folder-images",".photographs":"folder-images",".photos":"folder-images",".php":"folder-php",".phpmailer":"folder-phpmailer",".pic":"folder-images",".pics":"folder-images",".picture":"folder-images",".pictures":"folder-images",".pipe":"folder-pipe",".pipeline":"folder-pipe",".pipelines":"folder-pipe",".pipes":"folder-pipe",".pkg":"folder-packages",".pkgs":"folder-packages",".plastic":"folder-plastic",".playground":"folder-sandbox",".playgrounds":"folder-sandbox",".playlist":"folder-audio",".playlists":"folder-audio",".plugin":"folder-plugin",".plugins":"folder-plugin",".policies":"folder-policy",".policy":"folder-policy",".popos":"folder-linux",".portability":"folder-mobile",".portable":"folder-mobile",".post":"folder-docs",".postman":"folder-postman",".posts":"folder-docs",".powershell":"folder-powershell",".pref":"folder-config",".preference":"folder-config",".preferences":"folder-config",".prefs":"folder-config",".presentation":"folder-ui",".preview":"folder-review",".previews":"folder-review",".prisma":"folder-prisma",".prisma/schema":"folder-prisma",".private":"folder-private",".profiling":"folder-benchmark",".proj":"folder-project",".project":"folder-project",".projects":"folder-project",".projs":"folder-project",".prompt":"folder-prompts",".prompts":"folder-prompts",".properties":"folder-config",".props":"folder-config",".proto":"folder-proto",".protobuf":"folder-proto",".protobufs":"folder-proto",".protos":"folder-proto",".provider":"folder-controller",".providers":"folder-controller",".proxy":"folder-public",".ps":"folder-powershell",".ps1":"folder-powershell",".ps4":"folder-console",".ps5":"folder-console",".public":"folder-public",".public_html":"folder-views",".pwa":"folder-client",".pycache":"folder-python",".pytest_cache":"folder-python",".python":"folder-python",".pytorch":"folder-pytorch",".quasar":"folder-quasar",".queue":"folder-queue",".queues":"folder-queue",".r":"folder-r",".recordings":"folder-audio",".release":"folder-dist",".remote":"folder-connection",".remotes":"folder-connection",".repo":"folder-repository",".report":"folder-resource",".reports":"folder-resource",".repos":"folder-repository",".repositories":"folder-repository",".repository":"folder-repository",".res":"folder-resource",".resolver":"folder-resolver",".resolvers":"folder-resolver",".resource":"folder-resource",".resources":"folder-resource",".restapi":"folder-api",".review":"folder-review",".reviewed":"folder-review",".reviews":"folder-review",".revisal":"folder-review",".revisals":"folder-review",".robot":"folder-robot",".robots":"folder-robot",".router":"folder-routes",".routers":"folder-routes",".routes":"folder-routes",".routing":"folder-routes",".rule":"folder-rules",".rules":"folder-rules",".rust":"folder-rust",".salt":"folder-salt",".saltstack":"folder-salt",".sample":"folder-examples",".sample-data":"folder-examples",".samples":"folder-examples",".sandbox":"folder-sandbox",".sandboxes":"folder-sandbox",".sass":"folder-sass",".scala":"folder-scala",".schema":"folder-class",".schemas":"folder-class",".sconf_temp":"folder-scons",".scons":"folder-scons",".scons_cache":"folder-scons",".screen":"folder-views",".screengrab":"folder-images",".screengrabs":"folder-images",".screens":"folder-views",".screenshot":"folder-images",".screenshots":"folder-images",".script":"folder-scripts",".scripting":"folder-scripts",".scripts":"folder-scripts",".scss":"folder-sass",".secret":"folder-keys",".secrets":"folder-keys",".secure":"folder-secure",".security":"folder-secure",".seed":"folder-seeders",".seeders":"folder-seeders",".seeding":"folder-seeders",".seeds":"folder-seeders",".server":"folder-server",".serverless":"folder-serverless",".serverpackages":"folder-packages",".servers":"folder-server",".service":"folder-controller",".services":"folder-controller",".setting":"folder-config",".settings":"folder-config",".shader":"folder-shader",".shaders":"folder-shader",".shared":"folder-shared",".shop":"folder-cart",".shopping":"folder-cart",".shopping-cart":"folder-cart",".sim":"folder-simulations",".sims":"folder-simulations",".simulation":"folder-simulations",".simulations":"folder-simulations",".site":"folder-public",".sketch":"folder-mock",".sketches":"folder-mock",".skill":"folder-skills",".skills":"folder-skills",".smtp":"folder-mail",".snap":"folder-snapcraft",".snapcraft":"folder-snapcraft",".snapshots":"folder-test",".snippet":"folder-snippet",".snippets":"folder-snippet",".song":"folder-audio",".songs":"folder-audio",".sound":"folder-audio",".sounds":"folder-audio",".source":"folder-src",".sources":"folder-src",".spa":"folder-client",".spec":"folder-test",".specs":"folder-test",".spellcheck":"folder-syntax",".spellcheckers":"folder-syntax",".sql":"folder-database",".src":"folder-src",".src-tauri":"folder-src-tauri",".srcs":"folder-src",".ssl":"folder-secure",".stack":"folder-stack",".stacks":"folder-stack",".start":"folder-home",".static":"folder-resource",".stencil":"folder-stencil",".store":"folder-store",".stores":"folder-store",".stories":"folder-storybook",".storybook":"folder-storybook",".style":"folder-css",".styles":"folder-css",".stylesheet":"folder-css",".stylesheets":"folder-css",".stylus":"folder-stylus",".sublime":"folder-sublime",".submodules":"folder-git",".supabase":"folder-supabase",".svelte":"folder-svelte",".svelte-kit":"folder-svelte",".svg":"folder-svg",".svgs":"folder-svg",".switch":"folder-console",".syntax":"folder-syntax",".syntaxes":"folder-syntax",".table-of-contents":"folder-toc",".target":"folder-target",".taskfile":"folder-taskfile",".taskfiles":"folder-taskfile",".tasks":"folder-tasks",".television":"folder-television",".temp":"folder-temp",".template":"folder-template",".templates":"folder-template",".terraform":"folder-terraform",".test":"folder-test",".testfiles":"folder-test",".testing":"folder-test",".tests":"folder-test",".texture":"folder-images",".textures":"folder-images",".theme":"folder-theme",".themes":"folder-theme",".third-party":"folder-lib",".thirdparty":"folder-lib",".tickets":"folder-tasks",".tls":"folder-secure",".tmp":"folder-temp",".toc":"folder-toc",".token":"folder-keys",".tokens":"folder-keys",".toolbox":"folder-tools",".toolboxes":"folder-tools",".tooling":"folder-tools",".toolkit":"folder-tools",".toolkits":"folder-tools",".tools":"folder-tools",".torch":"folder-pytorch",".transition":"folder-animation",".transitions":"folder-animation",".translate":"folder-i18n",".translation":"folder-i18n",".translations":"folder-i18n",".trash":"folder-trash",".trigger":"folder-trigger",".triggers":"folder-trigger",".ts":"folder-typescript",".turbo":"folder-turborepo",".tv":"folder-television",".tx":"folder-i18n",".typeface":"folder-font",".typefaces":"folder-font",".types":"folder-typescript",".typescript":"folder-typescript",".typings":"folder-typescript",".ubuntu":"folder-linux",".ui":"folder-ui",".unity":"folder-unity",".unix":"folder-linux",".update":"folder-update",".updates":"folder-update",".upgrade":"folder-update",".upgrades":"folder-update",".upload":"folder-upload",".uploads":"folder-upload",".util":"folder-utils",".utilities":"folder-utils",".utility":"folder-utils",".utils":"folder-utils",".ux":"folder-ui",".validation":"folder-rules",".validations":"folder-rules",".validator":"folder-rules",".validators":"folder-rules",".vector":"folder-svg",".vectors":"folder-svg",".vendor":"folder-lib",".vendors":"folder-lib",".venv":"folder-environment",".vercel":"folder-vercel",".verdaccio":"folder-verdaccio",".vid":"folder-video",".video":"folder-video",".videos":"folder-video",".vids":"folder-video",".view":"folder-views",".views":"folder-views",".vm":"folder-vm",".vms":"folder-vm",".voice":"folder-audio",".voices":"folder-audio",".vscode":"folder-vscode",".vscode-test":"folder-vscode",".vue":"folder-vue",".vuepress":"folder-vuepress",".wakatime":"folder-wakatime",".web":"folder-public",".webpack":"folder-webpack",".website":"folder-public",".websites":"folder-public",".widget":"folder-components",".widgets":"folder-components",".wiki":"folder-docs",".win":"folder-windows",".win10":"folder-windows",".win11":"folder-windows",".win32":"folder-windows",".windows":"folder-windows",".windows10":"folder-windows",".windows11":"folder-windows",".windowsnt":"folder-windows",".windowsxp":"folder-windows",".winnt":"folder-windows",".winxp":"folder-windows",".wordpress-org":"folder-wordpress",".wp-content":"folder-wordpress",".wsl":"folder-linux",".www":"folder-public",".wwwroot":"folder-public",".xbox":"folder-console",".xtask":"folder-scripts",".yarn":"folder-yarn",".zeabur":"folder-zeabur",".zed":"folder-zed","@types":"folder-typescript","_@types":"folder-typescript","__@types__":"folder-typescript",__addin__:"folder-plugin",__addins__:"folder-plugin",__addon__:"folder-plugin",__addons__:"folder-plugin",__admin__:"folder-admin",__admins__:"folder-admin",__agent__:"folder-robot",__agents__:"folder-robot",__android__:"folder-android",__angular__:"folder-angular",__anim__:"folder-animation",__animated__:"folder-animation",__animation__:"folder-animation",__animations__:"folder-animation",__anims__:"folder-animation",__ansible__:"folder-ansible",__api__:"folder-api",__apis__:"folder-api","__apollo-cache__":"folder-apollo","__apollo-client__":"folder-apollo","__apollo-config__":"folder-apollo",__apollo__:"folder-apollo",__app__:"folder-app",__apple__:"folder-macos",__application__:"folder-app",__applications__:"folder-app",__apps__:"folder-app",__appwrite__:"folder-appwrite",__arc__:"folder-archive",__archival__:"folder-archive",__archive__:"folder-archive",__archives__:"folder-archive",__arcs__:"folder-archive",__article__:"folder-docs",__articles__:"folder-docs",__asm__:"folder-assembly",__assembly__:"folder-assembly",__asset__:"folder-resource",__assets__:"folder-resource",__astro__:"folder-astro",__atom__:"folder-atom",__atoms__:"folder-atom",__attachment__:"folder-attachment",__attachments__:"folder-attachment",__aud__:"folder-audio",__audio__:"folder-audio",__audios__:"folder-audio",__auds__:"folder-audio",__aurelia_project__:"folder-aurelia",__auth__:"folder-secure",__authentication__:"folder-secure",__auto__:"folder-generator",__aws__:"folder-aws","__azure-pipelines-ci__":"folder-azure-pipelines","__azure-pipelines__":"folder-azure-pipelines",__azure__:"folder-aws","__back-up__":"folder-backup","__back-ups__":"folder-backup",__backend__:"folder-server",__backends__:"folder-server",__backup__:"folder-backup",__backups__:"folder-backup",__bak__:"folder-backup",__baks__:"folder-backup",__base__:"folder-base",__bases__:"folder-base",__batch__:"folder-batch",__batches__:"folder-batch",__batchs__:"folder-batch",__bench__:"folder-benchmark",__benches__:"folder-benchmark",__benchmark__:"folder-benchmark",__benchmarks__:"folder-benchmark",__bibliographies__:"folder-bibliography",__bibliography__:"folder-bibliography",__bicep__:"folder-bicep",__bin__:"folder-dist",__bkp__:"folder-backup",__bkps__:"folder-backup","__blender-assets__":"folder-blender","__blender-files__":"folder-blender","__blender-models__":"folder-blender","__blender-project__":"folder-blender",__blender__:"folder-blender",__bloc__:"folder-bloc",__blocs__:"folder-bloc",__blog__:"folder-docs",__book__:"folder-bibliography",__books__:"folder-bibliography",__bot__:"folder-robot",__bots__:"folder-robot",__bower_components__:"folder-bower",__browser__:"folder-public",__browsers__:"folder-public",__build__:"folder-dist",__buildkite__:"folder-buildkite",__builds__:"folder-dist",__built__:"folder-dist",__bull__:"folder-queue",__cache__:"folder-temp",__cached__:"folder-temp",__calc__:"folder-functions",__calcs__:"folder-functions",__calculation__:"folder-functions",__calculations__:"folder-functions",__cargo__:"folder-rust",__cart__:"folder-cart",__centos__:"folder-linux",__cert__:"folder-secure",__certificate__:"folder-secure",__certificates__:"folder-secure",__certs__:"folder-secure",__cfg__:"folder-config",__cfgs__:"folder-config","__cfn-gen__":"folder-generator",__changes__:"folder-delta",__changeset__:"folder-changesets",__changesets__:"folder-changesets",__chat__:"folder-messages",__chats__:"folder-messages",__ci__:"folder-ci",__cipher__:"folder-secure",__circleci__:"folder-circleci",__cjs__:"folder-javascript",__class__:"folder-class",__classes__:"folder-class",__claude__:"folder-claude",__cli__:"folder-command",__client__:"folder-client",__clients__:"folder-client",__cline_docs__:"folder-cline",__clis__:"folder-command","__cloud-firestore__":"folder-firestore","__cloud-functions__":"folder-cloud-functions",__cloudflare__:"folder-cloudflare",__cloudfunctions__:"folder-cloud-functions",__cluster__:"folder-cluster",__clusters__:"folder-cluster",__cmd__:"folder-command",__cobol__:"folder-cobol",__code__:"folder-src",__color__:"folder-theme",__colors__:"folder-theme",__colour__:"folder-theme",__colours__:"folder-theme",__command__:"folder-command",__commandline__:"folder-command",__commands__:"folder-command",__common__:"folder-shared",__compiled__:"folder-dist",__components__:"folder-components",__composable__:"folder-functions",__composables__:"folder-functions",__concept__:"folder-mock",__concepts__:"folder-mock",__conf__:"folder-config",__config__:"folder-config",__configs__:"folder-config",__configuration__:"folder-config",__configurations__:"folder-config",__confs__:"folder-config",__connection__:"folder-connection",__connections__:"folder-connection",__console__:"folder-console",__const__:"folder-constant",__constant__:"folder-constant",__constants__:"folder-constant",__consts__:"folder-constant",__container__:"folder-container",__containers__:"folder-container",__content__:"folder-content",__contents__:"folder-content",__context__:"folder-context",__contexts__:"folder-context","__contract-test__":"folder-contract","__contract-testing__":"folder-contract","__contract-tests__":"folder-contract",__contract__:"folder-contract",__contracts__:"folder-contract",__controller__:"folder-controller",__controllers__:"folder-controller",__controls__:"folder-controller",__conversation__:"folder-messages",__conversations__:"folder-messages",__core__:"folder-core",__coverage__:"folder-coverage",__crash__:"folder-error",__crashes__:"folder-error",__crates__:"folder-lib",__css__:"folder-css",__cts__:"folder-typescript",__cubit__:"folder-bloc",__cubits__:"folder-bloc",__cue__:"folder-cue",__cues__:"folder-cue",__cursor__:"folder-cursor",__custom__:"folder-custom",__customs__:"folder-custom",__cypher__:"folder-secure",__cypress__:"folder-cypress",__dal__:"folder-dal",__dart__:"folder-dart",__dart_tool__:"folder-dart",__dart_tools__:"folder-dart","__data-access-layer__":"folder-dal","__data-access__":"folder-dal",__data__:"folder-database",__database__:"folder-database",__databases__:"folder-database",__db__:"folder-database",__deb__:"folder-linux",__debian__:"folder-linux",__debug__:"folder-debug",__debugger__:"folder-debug",__debugging__:"folder-debug",__decorator__:"folder-decorators",__decorators__:"folder-decorators",__deepin__:"folder-linux",__delta__:"folder-delta",__deltas__:"folder-delta",__demo__:"folder-examples",__demos__:"folder-examples",__dependencies__:"folder-packages",__design__:"folder-theme",__designs__:"folder-theme",__desktop__:"folder-desktop",__devcontainer__:"folder-container",__devpackages__:"folder-packages",__devtools__:"folder-tools",__dialog__:"folder-messages",__dialogs__:"folder-messages",__diary__:"folder-docs",__directive__:"folder-directive",__directives__:"folder-directive",__display__:"folder-desktop",__dist__:"folder-dist",__distribution__:"folder-dist",__doc__:"folder-docs",__docker__:"folder-docker",__dockerfiles__:"folder-docker",__dockerhub__:"folder-docker",__docs__:"folder-docs",__document__:"folder-docs",__documentation__:"folder-docs",__documents__:"folder-docs",__download__:"folder-download",__downloader__:"folder-download",__downloaders__:"folder-download",__downloads__:"folder-download",__draft__:"folder-mock",__drafts__:"folder-mock",__drizzle__:"folder-drizzle",__ds_store__:"folder-macos",__dump__:"folder-dump",__dumps__:"folder-dump",__e2e__:"folder-coverage",__easing__:"folder-animation",__easings__:"folder-animation",__element__:"folder-element",__elements__:"folder-element",__email__:"folder-mail",__emails__:"folder-mail",__enum__:"folder-enum",__enums__:"folder-enum",__env__:"folder-environment",__environment__:"folder-environment",__environments__:"folder-environment",__envs__:"folder-environment",__err__:"folder-error",__error__:"folder-error",__errors__:"folder-error",__errs__:"folder-error","__eslint-config__":"folder-eslint","__eslint-configs__":"folder-eslint","__eslint-plugin__":"folder-eslint","__eslint-plugins__":"folder-eslint",__eslint__:"folder-eslint",__etc__:"folder-other",__event__:"folder-event",__events__:"folder-event",__example__:"folder-examples",__examples__:"folder-examples","__expo-shared__":"folder-expo",__expo__:"folder-expo",__export__:"folder-export",__exported__:"folder-export",__exports__:"folder-export",__extension__:"folder-plugin",__extensions__:"folder-plugin",__external__:"folder-lib",__externals__:"folder-lib",__extra__:"folder-other",__extras__:"folder-other",__fastlane__:"folder-fastlane",__favicon__:"folder-favicon",__favicons__:"folder-favicon",__feat__:"folder-features",__feats__:"folder-features",__feature__:"folder-features",__features__:"folder-features",__fig__:"folder-images",__figs__:"folder-images",__figure__:"folder-images",__figures__:"folder-images",__filter__:"folder-filter",__filters__:"folder-filter","__firebase-cloud-functions__":"folder-cloud-functions","__firebase-cloudfunctions__":"folder-cloud-functions","__firebase-firestore__":"folder-firestore",__firebase__:"folder-firebase",__firestore__:"folder-firestore",__fixture__:"folder-mock",__fixtures__:"folder-mock","__flow-typed__":"folder-flow",__flutter__:"folder-flutter",__font__:"folder-font",__fonts__:"folder-font",__forgejo__:"folder-forgejo",__form__:"folder-form",__forms__:"folder-form",__forum__:"folder-messages",__fragments__:"folder-components",__frontend__:"folder-client",__frontends__:"folder-client",__func__:"folder-functions",__funcs__:"folder-functions",__function__:"folder-functions",__functions__:"folder-functions",__game__:"folder-console",__gamemaker2__:"folder-gamemaker",__gamemaker__:"folder-gamemaker",__games__:"folder-console",__gcp__:"folder-aws","__gemini-ai__":"folder-gemini-ai",__gemini__:"folder-gemini-ai",__geminiai__:"folder-gemini-ai",__gen__:"folder-generator",__generated__:"folder-generator",__generator__:"folder-generator",__generators__:"folder-generator",__gens__:"folder-generator",__git__:"folder-git",__gitea__:"folder-gitea",__githooks__:"folder-git","__github/issue_template__":"folder-template","__github/pull_request_template__":"folder-template","__github/workflows__":"folder-gh-workflows",__github__:"folder-github",__gitlab__:"folder-gitlab",__global__:"folder-global",__glsl__:"folder-shader",__go__:"folder-go","__godot-cpp__":"folder-godot",__godot__:"folder-godot",__golang__:"folder-go",__gql__:"folder-graphql",__gradle__:"folder-gradle",__graphql__:"folder-graphql",__guard__:"folder-guard",__guards__:"folder-guard",__gui__:"folder-ui","__gulp-tasks__":"folder-gulp",__gulp__:"folder-gulp","__gulpfile.babel.js__":"folder-gulp","__gulpfile.js__":"folder-gulp","__gulpfile.mjs__":"folder-gulp","__gulpfile.ts__":"folder-gulp",__gulpfiles__:"folder-gulp",__handler__:"folder-controller",__handlers__:"folder-controller",__helm__:"folder-helm",__helmchart__:"folder-helm",__helmcharts__:"folder-helm",__helper__:"folder-helper",__helpers__:"folder-helper",__hg__:"folder-mercurial",__hgext__:"folder-mercurial",__hghooks__:"folder-mercurial",__histories__:"folder-backup",__history__:"folder-backup",__hlsl__:"folder-shader",__home__:"folder-home",__hook__:"folder-hook",__hooks__:"folder-hook",__html__:"folder-views",__husky__:"folder-husky",__i18n__:"folder-i18n",__ico__:"folder-images",__icon__:"folder-images",__icons__:"folder-images",__icos__:"folder-images",__idea__:"folder-intellij",__image__:"folder-images",__images__:"folder-images",__img__:"folder-images",__imgs__:"folder-images",__import__:"folder-import",__imported__:"folder-import",__imports__:"folder-import",__in__:"folder-input",__inc64__:"folder-include",__inc__:"folder-include",__include__:"folder-include",__includes__:"folder-include",__infra__:"folder-server",__infrastructure__:"folder-server",__input__:"folder-input",__inputs__:"folder-input","__integration-test__":"folder-coverage","__integration-tests__":"folder-coverage",__integration__:"folder-connection",__integrations__:"folder-connection",__interceptor__:"folder-interceptor",__interceptors__:"folder-interceptor",__interface__:"folder-interface",__interfaces__:"folder-interface",__internationalization__:"folder-i18n",__inventories__:"folder-server",__inventory__:"folder-server",__io__:"folder-input",__ios__:"folder-ios",__ipad__:"folder-macos",__iphone__:"folder-macos",__ipod__:"folder-macos",__ipynb__:"folder-jupyter",__it__:"folder-coverage",__j2__:"folder-jinja",__java__:"folder-java",__javascript__:"folder-javascript",__javascripts__:"folder-javascript",__jinja2__:"folder-jinja",__jinja__:"folder-jinja",__job__:"folder-job",__jobs__:"folder-job",__js__:"folder-javascript",__json__:"folder-json",__jsonc__:"folder-json",__jsonl__:"folder-json",__jsons__:"folder-json",__jupyter__:"folder-jupyter",__jwt__:"folder-keys",__k8s__:"folder-kubernetes",__key__:"folder-keys",__keys__:"folder-keys",__kit__:"folder-tools",__kits__:"folder-tools",__knowledge__:"folder-docs",__kotlin__:"folder-kotlin",__kql__:"folder-kusto",__kubernetes__:"folder-kubernetes",__kusto__:"folder-kusto",__l10n__:"folder-i18n",__lambda__:"folder-functions",__lambdas__:"folder-functions",__landing__:"folder-home",__lang__:"folder-i18n",__langs__:"folder-i18n",__language__:"folder-i18n",__languages__:"folder-i18n",__layout__:"folder-layout",__layouts__:"folder-layout","__lefthook-local__":"folder-lefthook",__lefthook__:"folder-lefthook",__less__:"folder-less",__lib64__:"folder-lib",__lib__:"folder-lib",__libraries__:"folder-lib",__library__:"folder-lib",__libs__:"folder-lib",__license__:"folder-license",__licenses__:"folder-license",__link__:"folder-link",__links__:"folder-link",__linux__:"folder-linux",__linuxbsd__:"folder-linux",__liquibase__:"folder-liquibase",__locale__:"folder-i18n",__locales__:"folder-i18n",__localization__:"folder-i18n",__log__:"folder-log",__logging__:"folder-log",__logic__:"folder-functions",__logs__:"folder-log",__lottie__:"folder-lottie",__lottiefiles__:"folder-lottie",__lotties__:"folder-lottie",__lua__:"folder-lua",__luau__:"folder-luau",__mac__:"folder-macos","__macbook-air__":"folder-macos",__macbook__:"folder-macos",__macos__:"folder-macos",__macosx__:"folder-macos",__mail__:"folder-mail",__mailers__:"folder-mail",__mails__:"folder-mail",__main__:"folder-home",__manager__:"folder-admin",__managers__:"folder-admin",__mapping__:"folder-mappings",__mappings__:"folder-mappings",__markdown__:"folder-markdown",__math__:"folder-functions",__maths__:"folder-functions",__md__:"folder-markdown",__measure__:"folder-benchmark",__measurement__:"folder-benchmark",__measures__:"folder-benchmark",__media__:"folder-video",__messages__:"folder-messages",__messaging__:"folder-messages","__meta-inf__":"folder-config",__meta__:"folder-meta",__metadata__:"folder-meta",__metro__:"folder-metro",__middleware__:"folder-middleware",__middlewares__:"folder-middleware",__migration__:"folder-migrations",__migrations__:"folder-migrations",__mint__:"folder-linux",__misc__:"folder-other",__miscellaneous__:"folder-other",__mjml__:"folder-mjml",__mjs__:"folder-javascript",__mobile__:"folder-mobile",__mobiles__:"folder-mobile",__mock__:"folder-mock",__mocks__:"folder-mock",__mod__:"folder-plugin",__modding__:"folder-plugin",__model__:"folder-class",__models__:"folder-class",__moderator__:"folder-admin",__moderators__:"folder-admin",__mods__:"folder-plugin",__module__:"folder-plugin",__modules__:"folder-plugin",__mojo__:"folder-mojo",__molecule__:"folder-molecule",__molecules__:"folder-molecule",__moon__:"folder-moon",__motion__:"folder-animation",__motions__:"folder-animation",__movie__:"folder-video",__movies__:"folder-video",__mq__:"folder-queue",__mts__:"folder-typescript",__music__:"folder-audio",__navigation__:"folder-routes",__navigations__:"folder-routes",__netlify__:"folder-netlify",__news__:"folder-docs",__next__:"folder-next",__nginx__:"folder-nginx",__node__:"folder-node",__node_modules__:"folder-node",__nodejs__:"folder-node",__note__:"folder-docs",__notebook__:"folder-jupyter",__notebooks__:"folder-jupyter",__notes__:"folder-docs",__now__:"folder-vercel",__nuxt__:"folder-nuxt","__nyc-output__":"folder-coverage",__nyc_output__:"folder-coverage",__obsidian__:"folder-obsidian",__opencode__:"folder-opencode",__option__:"folder-config",__options__:"folder-config",__organism__:"folder-organism",__organisms__:"folder-organism",__osx__:"folder-macos",__other__:"folder-other",__others__:"folder-other",__out__:"folder-dist",__output__:"folder-dist",__outputs__:"folder-dist",__package__:"folder-packages",__packages__:"folder-packages",__pact__:"folder-contract",__pacts__:"folder-contract",__page__:"folder-views",__pages__:"folder-views",__palette__:"folder-theme",__palettes__:"folder-theme",__partial__:"folder-include",__partials__:"folder-include",__patches__:"folder-git",__pdf__:"folder-pdf",__pdfs__:"folder-pdf","__pdm-build__":"folder-pdm","__pdm-plugins__":"folder-pdm",__perf__:"folder-benchmark",__performance__:"folder-benchmark",__phone__:"folder-mobile",__phones__:"folder-mobile",__photo__:"folder-images",__photograph__:"folder-images",__photographs__:"folder-images",__photos__:"folder-images",__php__:"folder-php",__phpmailer__:"folder-phpmailer",__pic__:"folder-images",__pics__:"folder-images",__picture__:"folder-images",__pictures__:"folder-images",__pipe__:"folder-pipe",__pipeline__:"folder-pipe",__pipelines__:"folder-pipe",__pipes__:"folder-pipe",__pkg__:"folder-packages",__pkgs__:"folder-packages",__plastic__:"folder-plastic",__playground__:"folder-sandbox",__playgrounds__:"folder-sandbox",__playlist__:"folder-audio",__playlists__:"folder-audio",__plugin__:"folder-plugin",__plugins__:"folder-plugin",__policies__:"folder-policy",__policy__:"folder-policy",__popos__:"folder-linux",__portability__:"folder-mobile",__portable__:"folder-mobile",__post__:"folder-docs",__postman__:"folder-postman",__posts__:"folder-docs",__powershell__:"folder-powershell",__pref__:"folder-config",__preference__:"folder-config",__preferences__:"folder-config",__prefs__:"folder-config",__presentation__:"folder-ui",__preview__:"folder-review",__previews__:"folder-review","__prisma/schema__":"folder-prisma",__prisma__:"folder-prisma",__private__:"folder-private",__profiling__:"folder-benchmark",__proj__:"folder-project",__project__:"folder-project",__projects__:"folder-project",__projs__:"folder-project",__prompt__:"folder-prompts",__prompts__:"folder-prompts",__properties__:"folder-config",__props__:"folder-config",__protobuf__:"folder-proto",__protobufs__:"folder-proto",__protos__:"folder-proto",__provider__:"folder-controller",__providers__:"folder-controller",__proxy__:"folder-public",__ps1__:"folder-powershell",__ps4__:"folder-console",__ps5__:"folder-console",__ps__:"folder-powershell",__public__:"folder-public",__public_html__:"folder-views",__pwa__:"folder-client",__pycache__:"folder-python",__pytest_cache__:"folder-python",__python__:"folder-python",__pytorch__:"folder-pytorch",__quasar__:"folder-quasar",__queue__:"folder-queue",__queues__:"folder-queue",__r__:"folder-r",__recordings__:"folder-audio",__release__:"folder-dist",__remote__:"folder-connection",__remotes__:"folder-connection",__repo__:"folder-repository",__report__:"folder-resource",__reports__:"folder-resource",__repos__:"folder-repository",__repositories__:"folder-repository",__repository__:"folder-repository",__res__:"folder-resource",__resolver__:"folder-resolver",__resolvers__:"folder-resolver",__resource__:"folder-resource",__resources__:"folder-resource",__restapi__:"folder-api",__review__:"folder-review",__reviewed__:"folder-review",__reviews__:"folder-review",__revisal__:"folder-review",__revisals__:"folder-review",__robot__:"folder-robot",__robots__:"folder-robot",__router__:"folder-routes",__routers__:"folder-routes",__routes__:"folder-routes",__routing__:"folder-routes",__rule__:"folder-rules",__rules__:"folder-rules",__rust__:"folder-rust",__salt__:"folder-salt",__saltstack__:"folder-salt","__sample-data__":"folder-examples",__sample__:"folder-examples",__samples__:"folder-examples",__sandbox__:"folder-sandbox",__sandboxes__:"folder-sandbox",__sass__:"folder-sass",__scala__:"folder-scala",__schema__:"folder-class",__schemas__:"folder-class",__sconf_temp__:"folder-scons",__scons__:"folder-scons",__scons_cache__:"folder-scons",__screen__:"folder-views",__screengrab__:"folder-images",__screengrabs__:"folder-images",__screens__:"folder-views",__screenshot__:"folder-images",__screenshots__:"folder-images",__script__:"folder-scripts",__scripting__:"folder-scripts",__scripts__:"folder-scripts",__scss__:"folder-sass",__secret__:"folder-keys",__secrets__:"folder-keys",__secure__:"folder-secure",__security__:"folder-secure",__seed__:"folder-seeders",__seeders__:"folder-seeders",__seeding__:"folder-seeders",__seeds__:"folder-seeders",__server__:"folder-server",__serverless__:"folder-serverless",__serverpackages__:"folder-packages",__servers__:"folder-server",__service__:"folder-controller",__services__:"folder-controller",__setting__:"folder-config",__settings__:"folder-config",__shader__:"folder-shader",__shaders__:"folder-shader",__shared__:"folder-shared",__shop__:"folder-cart","__shopping-cart__":"folder-cart",__shopping__:"folder-cart",__sim__:"folder-simulations",__sims__:"folder-simulations",__simulation__:"folder-simulations",__simulations__:"folder-simulations",__site__:"folder-public",__sketch__:"folder-mock",__sketches__:"folder-mock",__skill__:"folder-skills",__skills__:"folder-skills",__smtp__:"folder-mail",__snap__:"folder-snapcraft",__snapcraft__:"folder-snapcraft",__snapshots__:"folder-test",__snippet__:"folder-snippet",__snippets__:"folder-snippet",__song__:"folder-audio",__songs__:"folder-audio",__sound__:"folder-audio",__sounds__:"folder-audio",__source__:"folder-src",__sources__:"folder-src",__spa__:"folder-client",__spec__:"folder-test",__specs__:"folder-test",__spellcheck__:"folder-syntax",__spellcheckers__:"folder-syntax",__sql__:"folder-database","__src-tauri__":"folder-src-tauri",__src__:"folder-src",__srcs__:"folder-src",__ssl__:"folder-secure",__stack__:"folder-stack",__stacks__:"folder-stack",__start__:"folder-home",__static__:"folder-resource",__stencil__:"folder-stencil",__store__:"folder-store",__stores__:"folder-store",__stories__:"folder-storybook",__storybook__:"folder-storybook",__style__:"folder-css",__styles__:"folder-css",__stylesheet__:"folder-css",__stylesheets__:"folder-css",__stylus__:"folder-stylus",__sublime__:"folder-sublime",__submodules__:"folder-git",__supabase__:"folder-supabase","__svelte-kit__":"folder-svelte",__svelte__:"folder-svelte",__svg__:"folder-svg",__svgs__:"folder-svg",__switch__:"folder-console",__syntax__:"folder-syntax",__syntaxes__:"folder-syntax","__table-of-contents__":"folder-toc",__target__:"folder-target",__taskfile__:"folder-taskfile",__taskfiles__:"folder-taskfile",__tasks__:"folder-tasks",__television__:"folder-television",__temp__:"folder-temp",__template__:"folder-template",__templates__:"folder-template",__terraform__:"folder-terraform",__test__:"folder-test",__testfiles__:"folder-test",__testing__:"folder-test",__tests__:"folder-test",__texture__:"folder-images",__textures__:"folder-images",__theme__:"folder-theme",__themes__:"folder-theme","__third-party__":"folder-lib",__thirdparty__:"folder-lib",__tickets__:"folder-tasks",__tls__:"folder-secure",__tmp__:"folder-temp",__toc__:"folder-toc",__token__:"folder-keys",__tokens__:"folder-keys",__toolbox__:"folder-tools",__toolboxes__:"folder-tools",__tooling__:"folder-tools",__toolkit__:"folder-tools",__toolkits__:"folder-tools",__tools__:"folder-tools",__torch__:"folder-pytorch",__transition__:"folder-animation",__transitions__:"folder-animation",__translate__:"folder-i18n",__translation__:"folder-i18n",__translations__:"folder-i18n",__trash__:"folder-trash",__trigger__:"folder-trigger",__triggers__:"folder-trigger",__ts__:"folder-typescript",__turbo__:"folder-turborepo",__tv__:"folder-television",__tx__:"folder-i18n",__typeface__:"folder-font",__typefaces__:"folder-font",__types__:"folder-typescript",__typescript__:"folder-typescript",__typings__:"folder-typescript",__ubuntu__:"folder-linux",__ui__:"folder-ui",__unity__:"folder-unity",__unix__:"folder-linux",__update__:"folder-update",__updates__:"folder-update",__upgrade__:"folder-update",__upgrades__:"folder-update",__upload__:"folder-upload",__uploads__:"folder-upload",__util__:"folder-utils",__utilities__:"folder-utils",__utility__:"folder-utils",__utils__:"folder-utils",__ux__:"folder-ui",__validation__:"folder-rules",__validations__:"folder-rules",__validator__:"folder-rules",__validators__:"folder-rules",__vector__:"folder-svg",__vectors__:"folder-svg",__vendor__:"folder-lib",__vendors__:"folder-lib",__venv__:"folder-environment",__vercel__:"folder-vercel",__verdaccio__:"folder-verdaccio",__vid__:"folder-video",__video__:"folder-video",__videos__:"folder-video",__vids__:"folder-video",__view__:"folder-views",__views__:"folder-views",__vm__:"folder-vm",__vms__:"folder-vm",__voice__:"folder-audio",__voices__:"folder-audio","__vscode-test__":"folder-vscode",__vscode__:"folder-vscode",__vue__:"folder-vue",__vuepress__:"folder-vuepress",__wakatime__:"folder-wakatime",__web__:"folder-public",__webpack__:"folder-webpack",__website__:"folder-public",__websites__:"folder-public",__widget__:"folder-components",__widgets__:"folder-components",__wiki__:"folder-docs",__win10__:"folder-windows",__win11__:"folder-windows",__win32__:"folder-windows",__win__:"folder-windows",__windows10__:"folder-windows",__windows11__:"folder-windows",__windows__:"folder-windows",__windowsnt__:"folder-windows",__windowsxp__:"folder-windows",__winnt__:"folder-windows",__winxp__:"folder-windows","__wordpress-org__":"folder-wordpress","__wp-content__":"folder-wordpress",__wsl__:"folder-linux",__www__:"folder-public",__wwwroot__:"folder-public",__xbox__:"folder-console",__xtask__:"folder-scripts",__yarn__:"folder-yarn",__zeabur__:"folder-zeabur",__zed__:"folder-zed",_addin:"folder-plugin",_addins:"folder-plugin",_addon:"folder-plugin",_addons:"folder-plugin",_admin:"folder-admin",_admins:"folder-admin",_agent:"folder-robot",_agents:"folder-robot",_android:"folder-android",_angular:"folder-angular",_anim:"folder-animation",_animated:"folder-animation",_animation:"folder-animation",_animations:"folder-animation",_anims:"folder-animation",_ansible:"folder-ansible",_api:"folder-api",_apis:"folder-api",_apollo:"folder-apollo","_apollo-cache":"folder-apollo","_apollo-client":"folder-apollo","_apollo-config":"folder-apollo",_app:"folder-app",_apple:"folder-macos",_application:"folder-app",_applications:"folder-app",_apps:"folder-app",_appwrite:"folder-appwrite",_arc:"folder-archive",_archival:"folder-archive",_archive:"folder-archive",_archives:"folder-archive",_arcs:"folder-archive",_article:"folder-docs",_articles:"folder-docs",_asm:"folder-assembly",_assembly:"folder-assembly",_asset:"folder-resource",_assets:"folder-resource",_astro:"folder-astro",_atom:"folder-atom",_atoms:"folder-atom",_attachment:"folder-attachment",_attachments:"folder-attachment",_aud:"folder-audio",_audio:"folder-audio",_audios:"folder-audio",_auds:"folder-audio",_aurelia_project:"folder-aurelia",_auth:"folder-secure",_authentication:"folder-secure",_auto:"folder-generator",_aws:"folder-aws",_azure:"folder-aws","_azure-pipelines":"folder-azure-pipelines","_azure-pipelines-ci":"folder-azure-pipelines","_back-up":"folder-backup","_back-ups":"folder-backup",_backend:"folder-server",_backends:"folder-server",_backup:"folder-backup",_backups:"folder-backup",_bak:"folder-backup",_baks:"folder-backup",_base:"folder-base",_bases:"folder-base",_batch:"folder-batch",_batches:"folder-batch",_batchs:"folder-batch",_bench:"folder-benchmark",_benches:"folder-benchmark",_benchmark:"folder-benchmark",_benchmarks:"folder-benchmark",_bibliographies:"folder-bibliography",_bibliography:"folder-bibliography",_bicep:"folder-bicep",_bin:"folder-dist",_bkp:"folder-backup",_bkps:"folder-backup",_blender:"folder-blender","_blender-assets":"folder-blender","_blender-files":"folder-blender","_blender-models":"folder-blender","_blender-project":"folder-blender",_bloc:"folder-bloc",_blocs:"folder-bloc",_blog:"folder-docs",_book:"folder-bibliography",_books:"folder-bibliography",_bot:"folder-robot",_bots:"folder-robot",_bower_components:"folder-bower",_browser:"folder-public",_browsers:"folder-public",_build:"folder-dist",_buildkite:"folder-buildkite",_builds:"folder-dist",_built:"folder-dist",_bull:"folder-queue",_cache:"folder-temp",_cached:"folder-temp",_calc:"folder-functions",_calcs:"folder-functions",_calculation:"folder-functions",_calculations:"folder-functions",_cargo:"folder-rust",_cart:"folder-cart",_centos:"folder-linux",_cert:"folder-secure",_certificate:"folder-secure",_certificates:"folder-secure",_certs:"folder-secure",_cfg:"folder-config",_cfgs:"folder-config","_cfn-gen":"folder-generator",_changes:"folder-delta",_changeset:"folder-changesets",_changesets:"folder-changesets",_chat:"folder-messages",_chats:"folder-messages",_ci:"folder-ci",_cipher:"folder-secure",_circleci:"folder-circleci",_cjs:"folder-javascript",_class:"folder-class",_classes:"folder-class",_claude:"folder-claude",_cli:"folder-command",_client:"folder-client",_clients:"folder-client",_cline_docs:"folder-cline",_clis:"folder-command","_cloud-firestore":"folder-firestore","_cloud-functions":"folder-cloud-functions",_cloudflare:"folder-cloudflare",_cloudfunctions:"folder-cloud-functions",_cluster:"folder-cluster",_clusters:"folder-cluster",_cmd:"folder-command",_cobol:"folder-cobol",_code:"folder-src",_color:"folder-theme",_colors:"folder-theme",_colour:"folder-theme",_colours:"folder-theme",_command:"folder-command",_commandline:"folder-command",_commands:"folder-command",_common:"folder-shared",_compiled:"folder-dist",_components:"folder-components",_composable:"folder-functions",_composables:"folder-functions",_concept:"folder-mock",_concepts:"folder-mock",_conf:"folder-config",_config:"folder-config",_configs:"folder-config",_configuration:"folder-config",_configurations:"folder-config",_confs:"folder-config",_connection:"folder-connection",_connections:"folder-connection",_console:"folder-console",_const:"folder-constant",_constant:"folder-constant",_constants:"folder-constant",_consts:"folder-constant",_container:"folder-container",_containers:"folder-container",_content:"folder-content",_contents:"folder-content",_context:"folder-context",_contexts:"folder-context",_contract:"folder-contract","_contract-test":"folder-contract","_contract-testing":"folder-contract","_contract-tests":"folder-contract",_contracts:"folder-contract",_controller:"folder-controller",_controllers:"folder-controller",_controls:"folder-controller",_conversation:"folder-messages",_conversations:"folder-messages",_core:"folder-core",_coverage:"folder-coverage",_crash:"folder-error",_crashes:"folder-error",_crates:"folder-lib",_css:"folder-css",_cts:"folder-typescript",_cubit:"folder-bloc",_cubits:"folder-bloc",_cue:"folder-cue",_cues:"folder-cue",_cursor:"folder-cursor",_custom:"folder-custom",_customs:"folder-custom",_cypher:"folder-secure",_cypress:"folder-cypress",_dal:"folder-dal",_dart:"folder-dart",_dart_tool:"folder-dart",_dart_tools:"folder-dart",_data:"folder-database","_data-access":"folder-dal","_data-access-layer":"folder-dal",_database:"folder-database",_databases:"folder-database",_db:"folder-database",_deb:"folder-linux",_debian:"folder-linux",_debug:"folder-debug",_debugger:"folder-debug",_debugging:"folder-debug",_decorator:"folder-decorators",_decorators:"folder-decorators",_deepin:"folder-linux",_delta:"folder-delta",_deltas:"folder-delta",_demo:"folder-examples",_demos:"folder-examples",_dependencies:"folder-packages",_design:"folder-theme",_designs:"folder-theme",_desktop:"folder-desktop",_devcontainer:"folder-container",_devpackages:"folder-packages",_devtools:"folder-tools",_dialog:"folder-messages",_dialogs:"folder-messages",_diary:"folder-docs",_directive:"folder-directive",_directives:"folder-directive",_display:"folder-desktop",_dist:"folder-dist",_distribution:"folder-dist",_doc:"folder-docs",_docker:"folder-docker",_dockerfiles:"folder-docker",_dockerhub:"folder-docker",_docs:"folder-docs",_document:"folder-docs",_documentation:"folder-docs",_documents:"folder-docs",_download:"folder-download",_downloader:"folder-download",_downloaders:"folder-download",_downloads:"folder-download",_draft:"folder-mock",_drafts:"folder-mock",_drizzle:"folder-drizzle",_ds_store:"folder-macos",_dump:"folder-dump",_dumps:"folder-dump",_e2e:"folder-coverage",_easing:"folder-animation",_easings:"folder-animation",_element:"folder-element",_elements:"folder-element",_email:"folder-mail",_emails:"folder-mail",_enum:"folder-enum",_enums:"folder-enum",_env:"folder-environment",_environment:"folder-environment",_environments:"folder-environment",_envs:"folder-environment",_err:"folder-error",_error:"folder-error",_errors:"folder-error",_errs:"folder-error",_eslint:"folder-eslint","_eslint-config":"folder-eslint","_eslint-configs":"folder-eslint","_eslint-plugin":"folder-eslint","_eslint-plugins":"folder-eslint",_etc:"folder-other",_event:"folder-event",_events:"folder-event",_example:"folder-examples",_examples:"folder-examples",_expo:"folder-expo","_expo-shared":"folder-expo",_export:"folder-export",_exported:"folder-export",_exports:"folder-export",_extension:"folder-plugin",_extensions:"folder-plugin",_external:"folder-lib",_externals:"folder-lib",_extra:"folder-other",_extras:"folder-other",_fastlane:"folder-fastlane",_favicon:"folder-favicon",_favicons:"folder-favicon",_feat:"folder-features",_feats:"folder-features",_feature:"folder-features",_features:"folder-features",_fig:"folder-images",_figs:"folder-images",_figure:"folder-images",_figures:"folder-images",_filter:"folder-filter",_filters:"folder-filter",_firebase:"folder-firebase","_firebase-cloud-functions":"folder-cloud-functions","_firebase-cloudfunctions":"folder-cloud-functions","_firebase-firestore":"folder-firestore",_firestore:"folder-firestore",_fixture:"folder-mock",_fixtures:"folder-mock","_flow-typed":"folder-flow",_flutter:"folder-flutter",_font:"folder-font",_fonts:"folder-font",_forgejo:"folder-forgejo",_form:"folder-form",_forms:"folder-form",_forum:"folder-messages",_fragments:"folder-components",_frontend:"folder-client",_frontends:"folder-client",_func:"folder-functions",_funcs:"folder-functions",_function:"folder-functions",_functions:"folder-functions",_game:"folder-console",_gamemaker:"folder-gamemaker",_gamemaker2:"folder-gamemaker",_games:"folder-console",_gcp:"folder-aws",_gemini:"folder-gemini-ai","_gemini-ai":"folder-gemini-ai",_geminiai:"folder-gemini-ai",_gen:"folder-generator",_generated:"folder-generator",_generator:"folder-generator",_generators:"folder-generator",_gens:"folder-generator",_git:"folder-git",_gitea:"folder-gitea",_githooks:"folder-git",_github:"folder-github","_github/issue_template":"folder-template","_github/pull_request_template":"folder-template","_github/workflows":"folder-gh-workflows",_gitlab:"folder-gitlab",_global:"folder-global",_glsl:"folder-shader",_go:"folder-go",_godot:"folder-godot","_godot-cpp":"folder-godot",_golang:"folder-go",_gql:"folder-graphql",_gradle:"folder-gradle",_graphql:"folder-graphql",_guard:"folder-guard",_guards:"folder-guard",_gui:"folder-ui",_gulp:"folder-gulp","_gulp-tasks":"folder-gulp","_gulpfile.babel.js":"folder-gulp","_gulpfile.js":"folder-gulp","_gulpfile.mjs":"folder-gulp","_gulpfile.ts":"folder-gulp",_gulpfiles:"folder-gulp",_handler:"folder-controller",_handlers:"folder-controller",_helm:"folder-helm",_helmchart:"folder-helm",_helmcharts:"folder-helm",_helper:"folder-helper",_helpers:"folder-helper",_hg:"folder-mercurial",_hgext:"folder-mercurial",_hghooks:"folder-mercurial",_histories:"folder-backup",_history:"folder-backup",_hlsl:"folder-shader",_home:"folder-home",_hook:"folder-hook",_hooks:"folder-hook",_html:"folder-views",_husky:"folder-husky",_i18n:"folder-i18n",_ico:"folder-images",_icon:"folder-images",_icons:"folder-images",_icos:"folder-images",_idea:"folder-intellij",_image:"folder-images",_images:"folder-images",_img:"folder-images",_imgs:"folder-images",_import:"folder-import",_imported:"folder-import",_imports:"folder-import",_in:"folder-input",_inc:"folder-include",_inc64:"folder-include",_include:"folder-include",_includes:"folder-include",_infra:"folder-server",_infrastructure:"folder-server",_input:"folder-input",_inputs:"folder-input",_integration:"folder-connection","_integration-test":"folder-coverage","_integration-tests":"folder-coverage",_integrations:"folder-connection",_interceptor:"folder-interceptor",_interceptors:"folder-interceptor",_interface:"folder-interface",_interfaces:"folder-interface",_internationalization:"folder-i18n",_inventories:"folder-server",_inventory:"folder-server",_io:"folder-input",_ios:"folder-ios",_ipad:"folder-macos",_iphone:"folder-macos",_ipod:"folder-macos",_ipynb:"folder-jupyter",_it:"folder-coverage",_j2:"folder-jinja",_java:"folder-java",_javascript:"folder-javascript",_javascripts:"folder-javascript",_jinja:"folder-jinja",_jinja2:"folder-jinja",_job:"folder-job",_jobs:"folder-job",_js:"folder-javascript",_json:"folder-json",_jsonc:"folder-json",_jsonl:"folder-json",_jsons:"folder-json",_jupyter:"folder-jupyter",_jwt:"folder-keys",_k8s:"folder-kubernetes",_key:"folder-keys",_keys:"folder-keys",_kit:"folder-tools",_kits:"folder-tools",_knowledge:"folder-docs",_kotlin:"folder-kotlin",_kql:"folder-kusto",_kubernetes:"folder-kubernetes",_kusto:"folder-kusto",_l10n:"folder-i18n",_lambda:"folder-functions",_lambdas:"folder-functions",_landing:"folder-home",_lang:"folder-i18n",_langs:"folder-i18n",_language:"folder-i18n",_languages:"folder-i18n",_layout:"folder-layout",_layouts:"folder-layout",_lefthook:"folder-lefthook","_lefthook-local":"folder-lefthook",_less:"folder-less",_lib:"folder-lib",_lib64:"folder-lib",_libraries:"folder-lib",_library:"folder-lib",_libs:"folder-lib",_license:"folder-license",_licenses:"folder-license",_link:"folder-link",_links:"folder-link",_linux:"folder-linux",_linuxbsd:"folder-linux",_liquibase:"folder-liquibase",_locale:"folder-i18n",_locales:"folder-i18n",_localization:"folder-i18n",_log:"folder-log",_logging:"folder-log",_logic:"folder-functions",_logs:"folder-log",_lottie:"folder-lottie",_lottiefiles:"folder-lottie",_lotties:"folder-lottie",_lua:"folder-lua",_luau:"folder-luau",_mac:"folder-macos",_macbook:"folder-macos","_macbook-air":"folder-macos",_macos:"folder-macos",_macosx:"folder-macos",_mail:"folder-mail",_mailers:"folder-mail",_mails:"folder-mail",_main:"folder-home",_manager:"folder-admin",_managers:"folder-admin",_mapping:"folder-mappings",_mappings:"folder-mappings",_markdown:"folder-markdown",_math:"folder-functions",_maths:"folder-functions",_md:"folder-markdown",_measure:"folder-benchmark",_measurement:"folder-benchmark",_measures:"folder-benchmark",_media:"folder-video",_messages:"folder-messages",_messaging:"folder-messages",_meta:"folder-meta","_meta-inf":"folder-config",_metadata:"folder-meta",_metro:"folder-metro",_middleware:"folder-middleware",_middlewares:"folder-middleware",_migration:"folder-migrations",_migrations:"folder-migrations",_mint:"folder-linux",_misc:"folder-other",_miscellaneous:"folder-other",_mjml:"folder-mjml",_mjs:"folder-javascript",_mobile:"folder-mobile",_mobiles:"folder-mobile",_mock:"folder-mock",_mocks:"folder-mock",_mod:"folder-plugin",_modding:"folder-plugin",_model:"folder-class",_models:"folder-class",_moderator:"folder-admin",_moderators:"folder-admin",_mods:"folder-plugin",_module:"folder-plugin",_modules:"folder-plugin",_mojo:"folder-mojo",_molecule:"folder-molecule",_molecules:"folder-molecule",_moon:"folder-moon",_motion:"folder-animation",_motions:"folder-animation",_movie:"folder-video",_movies:"folder-video",_mq:"folder-queue",_mts:"folder-typescript",_music:"folder-audio",_navigation:"folder-routes",_navigations:"folder-routes",_netlify:"folder-netlify",_news:"folder-docs",_next:"folder-next",_nginx:"folder-nginx",_node:"folder-node",_node_modules:"folder-node",_nodejs:"folder-node",_note:"folder-docs",_notebook:"folder-jupyter",_notebooks:"folder-jupyter",_notes:"folder-docs",_now:"folder-vercel",_nuxt:"folder-nuxt","_nyc-output":"folder-coverage",_nyc_output:"folder-coverage",_obsidian:"folder-obsidian",_opencode:"folder-opencode",_option:"folder-config",_options:"folder-config",_organism:"folder-organism",_organisms:"folder-organism",_osx:"folder-macos",_other:"folder-other",_others:"folder-other",_out:"folder-dist",_output:"folder-dist",_outputs:"folder-dist",_package:"folder-packages",_packages:"folder-packages",_pact:"folder-contract",_pacts:"folder-contract",_page:"folder-views",_pages:"folder-views",_palette:"folder-theme",_palettes:"folder-theme",_partial:"folder-include",_partials:"folder-include",_patches:"folder-git",_pdf:"folder-pdf",_pdfs:"folder-pdf","_pdm-build":"folder-pdm","_pdm-plugins":"folder-pdm",_perf:"folder-benchmark",_performance:"folder-benchmark",_phone:"folder-mobile",_phones:"folder-mobile",_photo:"folder-images",_photograph:"folder-images",_photographs:"folder-images",_photos:"folder-images",_php:"folder-php",_phpmailer:"folder-phpmailer",_pic:"folder-images",_pics:"folder-images",_picture:"folder-images",_pictures:"folder-images",_pipe:"folder-pipe",_pipeline:"folder-pipe",_pipelines:"folder-pipe",_pipes:"folder-pipe",_pkg:"folder-packages",_pkgs:"folder-packages",_plastic:"folder-plastic",_playground:"folder-sandbox",_playgrounds:"folder-sandbox",_playlist:"folder-audio",_playlists:"folder-audio",_plugin:"folder-plugin",_plugins:"folder-plugin",_policies:"folder-policy",_policy:"folder-policy",_popos:"folder-linux",_portability:"folder-mobile",_portable:"folder-mobile",_post:"folder-docs",_postman:"folder-postman",_posts:"folder-docs",_powershell:"folder-powershell",_pref:"folder-config",_preference:"folder-config",_preferences:"folder-config",_prefs:"folder-config",_presentation:"folder-ui",_preview:"folder-review",_previews:"folder-review",_prisma:"folder-prisma","_prisma/schema":"folder-prisma",_private:"folder-private",_profiling:"folder-benchmark",_proj:"folder-project",_project:"folder-project",_projects:"folder-project",_projs:"folder-project",_prompt:"folder-prompts",_prompts:"folder-prompts",_properties:"folder-config",_props:"folder-config",_proto:"folder-proto",_protobuf:"folder-proto",_protobufs:"folder-proto",_protos:"folder-proto",_provider:"folder-controller",_providers:"folder-controller",_proxy:"folder-public",_ps:"folder-powershell",_ps1:"folder-powershell",_ps4:"folder-console",_ps5:"folder-console",_public:"folder-public",_public_html:"folder-views",_pwa:"folder-client",_pycache:"folder-python",_pytest_cache:"folder-python",_python:"folder-python",_pytorch:"folder-pytorch",_quasar:"folder-quasar",_queue:"folder-queue",_queues:"folder-queue",_r:"folder-r",_recordings:"folder-audio",_release:"folder-dist",_remote:"folder-connection",_remotes:"folder-connection",_repo:"folder-repository",_report:"folder-resource",_reports:"folder-resource",_repos:"folder-repository",_repositories:"folder-repository",_repository:"folder-repository",_res:"folder-resource",_resolver:"folder-resolver",_resolvers:"folder-resolver",_resource:"folder-resource",_resources:"folder-resource",_restapi:"folder-api",_review:"folder-review",_reviewed:"folder-review",_reviews:"folder-review",_revisal:"folder-review",_revisals:"folder-review",_robot:"folder-robot",_robots:"folder-robot",_router:"folder-routes",_routers:"folder-routes",_routes:"folder-routes",_routing:"folder-routes",_rule:"folder-rules",_rules:"folder-rules",_rust:"folder-rust",_salt:"folder-salt",_saltstack:"folder-salt",_sample:"folder-examples","_sample-data":"folder-examples",_samples:"folder-examples",_sandbox:"folder-sandbox",_sandboxes:"folder-sandbox",_sass:"folder-sass",_scala:"folder-scala",_schema:"folder-class",_schemas:"folder-class",_sconf_temp:"folder-scons",_scons:"folder-scons",_scons_cache:"folder-scons",_screen:"folder-views",_screengrab:"folder-images",_screengrabs:"folder-images",_screens:"folder-views",_screenshot:"folder-images",_screenshots:"folder-images",_script:"folder-scripts",_scripting:"folder-scripts",_scripts:"folder-scripts",_scss:"folder-sass",_secret:"folder-keys",_secrets:"folder-keys",_secure:"folder-secure",_security:"folder-secure",_seed:"folder-seeders",_seeders:"folder-seeders",_seeding:"folder-seeders",_seeds:"folder-seeders",_server:"folder-server",_serverless:"folder-serverless",_serverpackages:"folder-packages",_servers:"folder-server",_service:"folder-controller",_services:"folder-controller",_setting:"folder-config",_settings:"folder-config",_shader:"folder-shader",_shaders:"folder-shader",_shared:"folder-shared",_shop:"folder-cart",_shopping:"folder-cart","_shopping-cart":"folder-cart",_sim:"folder-simulations",_sims:"folder-simulations",_simulation:"folder-simulations",_simulations:"folder-simulations",_site:"folder-public",_sketch:"folder-mock",_sketches:"folder-mock",_skill:"folder-skills",_skills:"folder-skills",_smtp:"folder-mail",_snap:"folder-snapcraft",_snapcraft:"folder-snapcraft",_snapshots:"folder-test",_snippet:"folder-snippet",_snippets:"folder-snippet",_song:"folder-audio",_songs:"folder-audio",_sound:"folder-audio",_sounds:"folder-audio",_source:"folder-src",_sources:"folder-src",_spa:"folder-client",_spec:"folder-test",_specs:"folder-test",_spellcheck:"folder-syntax",_spellcheckers:"folder-syntax",_sql:"folder-database",_src:"folder-src","_src-tauri":"folder-src-tauri",_srcs:"folder-src",_ssl:"folder-secure",_stack:"folder-stack",_stacks:"folder-stack",_start:"folder-home",_static:"folder-resource",_stencil:"folder-stencil",_store:"folder-store",_stores:"folder-store",_stories:"folder-storybook",_storybook:"folder-storybook",_style:"folder-css",_styles:"folder-css",_stylesheet:"folder-css",_stylesheets:"folder-css",_stylus:"folder-stylus",_sublime:"folder-sublime",_submodules:"folder-git",_supabase:"folder-supabase",_svelte:"folder-svelte","_svelte-kit":"folder-svelte",_svg:"folder-svg",_svgs:"folder-svg",_switch:"folder-console",_syntax:"folder-syntax",_syntaxes:"folder-syntax","_table-of-contents":"folder-toc",_target:"folder-target",_taskfile:"folder-taskfile",_taskfiles:"folder-taskfile",_tasks:"folder-tasks",_television:"folder-television",_temp:"folder-temp",_template:"folder-template",_templates:"folder-template",_terraform:"folder-terraform",_test:"folder-test",_testfiles:"folder-test",_testing:"folder-test",_tests:"folder-test",_texture:"folder-images",_textures:"folder-images",_theme:"folder-theme",_themes:"folder-theme","_third-party":"folder-lib",_thirdparty:"folder-lib",_tickets:"folder-tasks",_tls:"folder-secure",_tmp:"folder-temp",_toc:"folder-toc",_token:"folder-keys",_tokens:"folder-keys",_toolbox:"folder-tools",_toolboxes:"folder-tools",_tooling:"folder-tools",_toolkit:"folder-tools",_toolkits:"folder-tools",_tools:"folder-tools",_torch:"folder-pytorch",_transition:"folder-animation",_transitions:"folder-animation",_translate:"folder-i18n",_translation:"folder-i18n",_translations:"folder-i18n",_trash:"folder-trash",_trigger:"folder-trigger",_triggers:"folder-trigger",_ts:"folder-typescript",_turbo:"folder-turborepo",_tv:"folder-television",_tx:"folder-i18n",_typeface:"folder-font",_typefaces:"folder-font",_types:"folder-typescript",_typescript:"folder-typescript",_typings:"folder-typescript",_ubuntu:"folder-linux",_ui:"folder-ui",_unity:"folder-unity",_unix:"folder-linux",_update:"folder-update",_updates:"folder-update",_upgrade:"folder-update",_upgrades:"folder-update",_upload:"folder-upload",_uploads:"folder-upload",_util:"folder-utils",_utilities:"folder-utils",_utility:"folder-utils",_utils:"folder-utils",_ux:"folder-ui",_validation:"folder-rules",_validations:"folder-rules",_validator:"folder-rules",_validators:"folder-rules",_vector:"folder-svg",_vectors:"folder-svg",_vendor:"folder-lib",_vendors:"folder-lib",_venv:"folder-environment",_vercel:"folder-vercel",_verdaccio:"folder-verdaccio",_vid:"folder-video",_video:"folder-video",_videos:"folder-video",_vids:"folder-video",_view:"folder-views",_views:"folder-views",_vm:"folder-vm",_vms:"folder-vm",_voice:"folder-audio",_voices:"folder-audio",_vscode:"folder-vscode","_vscode-test":"folder-vscode",_vue:"folder-vue",_vuepress:"folder-vuepress",_wakatime:"folder-wakatime",_web:"folder-public",_webpack:"folder-webpack",_website:"folder-public",_websites:"folder-public",_widget:"folder-components",_widgets:"folder-components",_wiki:"folder-docs",_win:"folder-windows",_win10:"folder-windows",_win11:"folder-windows",_win32:"folder-windows",_windows:"folder-windows",_windows10:"folder-windows",_windows11:"folder-windows",_windowsnt:"folder-windows",_windowsxp:"folder-windows",_winnt:"folder-windows",_winxp:"folder-windows","_wordpress-org":"folder-wordpress","_wp-content":"folder-wordpress",_wsl:"folder-linux",_www:"folder-public",_wwwroot:"folder-public",_xbox:"folder-console",_xtask:"folder-scripts",_yarn:"folder-yarn",_zeabur:"folder-zeabur",_zed:"folder-zed",addin:"folder-plugin",addins:"folder-plugin",addon:"folder-plugin",addons:"folder-plugin",admin:"folder-admin",admins:"folder-admin",agent:"folder-robot",agents:"folder-robot",android:"folder-android",angular:"folder-angular",anim:"folder-animation",animated:"folder-animation",animation:"folder-animation",animations:"folder-animation",anims:"folder-animation",ansible:"folder-ansible",api:"folder-api",apis:"folder-api",apollo:"folder-apollo","apollo-cache":"folder-apollo","apollo-client":"folder-apollo","apollo-config":"folder-apollo",app:"folder-app",apple:"folder-macos",application:"folder-app",applications:"folder-app",apps:"folder-app",appwrite:"folder-appwrite",arc:"folder-archive",archival:"folder-archive",archive:"folder-archive",archives:"folder-archive",arcs:"folder-archive",article:"folder-docs",articles:"folder-docs",asm:"folder-assembly",assembly:"folder-assembly",asset:"folder-resource",assets:"folder-resource",astro:"folder-astro",atom:"folder-atom",atoms:"folder-atom",attachment:"folder-attachment",attachments:"folder-attachment",aud:"folder-audio",audio:"folder-audio",audios:"folder-audio",auds:"folder-audio",aurelia_project:"folder-aurelia",auth:"folder-secure",authentication:"folder-secure",auto:"folder-generator",aws:"folder-aws",azure:"folder-aws","azure-pipelines":"folder-azure-pipelines","azure-pipelines-ci":"folder-azure-pipelines","back-up":"folder-backup","back-ups":"folder-backup",backend:"folder-server",backends:"folder-server",backup:"folder-backup",backups:"folder-backup",bak:"folder-backup",baks:"folder-backup",base:"folder-base",bases:"folder-base",batch:"folder-batch",batches:"folder-batch",batchs:"folder-batch",bench:"folder-benchmark",benches:"folder-benchmark",benchmark:"folder-benchmark",benchmarks:"folder-benchmark",bibliographies:"folder-bibliography",bibliography:"folder-bibliography",bicep:"folder-bicep",bin:"folder-dist",bkp:"folder-backup",bkps:"folder-backup",blender:"folder-blender","blender-assets":"folder-blender","blender-files":"folder-blender","blender-models":"folder-blender","blender-project":"folder-blender",bloc:"folder-bloc",blocs:"folder-bloc",blog:"folder-docs",book:"folder-bibliography",books:"folder-bibliography",bot:"folder-robot",bots:"folder-robot",bower_components:"folder-bower",browser:"folder-public",browsers:"folder-public",build:"folder-dist",buildkite:"folder-buildkite",builds:"folder-dist",built:"folder-dist",bull:"folder-queue",cache:"folder-temp",cached:"folder-temp",calc:"folder-functions",calcs:"folder-functions",calculation:"folder-functions",calculations:"folder-functions",cargo:"folder-rust",cart:"folder-cart",centos:"folder-linux",cert:"folder-secure",certificate:"folder-secure",certificates:"folder-secure",certs:"folder-secure",cfg:"folder-config",cfgs:"folder-config","cfn-gen":"folder-generator",changes:"folder-delta",changeset:"folder-changesets",changesets:"folder-changesets",chat:"folder-messages",chats:"folder-messages",ci:"folder-ci",cipher:"folder-secure",circleci:"folder-circleci",cjs:"folder-javascript",class:"folder-class",classes:"folder-class",claude:"folder-claude",cli:"folder-command",client:"folder-client",clients:"folder-client",cline_docs:"folder-cline",clis:"folder-command","cloud-firestore":"folder-firestore","cloud-functions":"folder-cloud-functions",cloudflare:"folder-cloudflare",cloudfunctions:"folder-cloud-functions",cluster:"folder-cluster",clusters:"folder-cluster",cmd:"folder-command",cobol:"folder-cobol",code:"folder-src",color:"folder-theme",colors:"folder-theme",colour:"folder-theme",colours:"folder-theme",command:"folder-command",commandline:"folder-command",commands:"folder-command",common:"folder-shared",compiled:"folder-dist",components:"folder-components",composable:"folder-functions",composables:"folder-functions",concept:"folder-mock",concepts:"folder-mock",conf:"folder-config",config:"folder-config",configs:"folder-config",configuration:"folder-config",configurations:"folder-config",confs:"folder-config",connection:"folder-connection",connections:"folder-connection",console:"folder-console",const:"folder-constant",constant:"folder-constant",constants:"folder-constant",consts:"folder-constant",container:"folder-container",containers:"folder-container",content:"folder-content",contents:"folder-content",context:"folder-context",contexts:"folder-context",contract:"folder-contract","contract-test":"folder-contract","contract-testing":"folder-contract","contract-tests":"folder-contract",contracts:"folder-contract",controller:"folder-controller",controllers:"folder-controller",controls:"folder-controller",conversation:"folder-messages",conversations:"folder-messages",core:"folder-core",coverage:"folder-coverage",crash:"folder-error",crashes:"folder-error",crates:"folder-lib",css:"folder-css",cts:"folder-typescript",cubit:"folder-bloc",cubits:"folder-bloc",cue:"folder-cue",cues:"folder-cue",cursor:"folder-cursor",custom:"folder-custom",customs:"folder-custom",cypher:"folder-secure",cypress:"folder-cypress",dal:"folder-dal",dart:"folder-dart",dart_tool:"folder-dart",dart_tools:"folder-dart",data:"folder-database","data-access":"folder-dal","data-access-layer":"folder-dal",database:"folder-database",databases:"folder-database",db:"folder-database",deb:"folder-linux",debian:"folder-linux",debug:"folder-debug",debugger:"folder-debug",debugging:"folder-debug",decorator:"folder-decorators",decorators:"folder-decorators",deepin:"folder-linux",delta:"folder-delta",deltas:"folder-delta",demo:"folder-examples",demos:"folder-examples",dependencies:"folder-packages",design:"folder-theme",designs:"folder-theme",desktop:"folder-desktop",devcontainer:"folder-container",devpackages:"folder-packages",devtools:"folder-tools",dialog:"folder-messages",dialogs:"folder-messages",diary:"folder-docs",directive:"folder-directive",directives:"folder-directive",display:"folder-desktop",dist:"folder-dist",distribution:"folder-dist",doc:"folder-docs",docker:"folder-docker",dockerfiles:"folder-docker",dockerhub:"folder-docker",docs:"folder-docs",document:"folder-docs",documentation:"folder-docs",documents:"folder-docs",download:"folder-download",downloader:"folder-download",downloaders:"folder-download",downloads:"folder-download",draft:"folder-mock",drafts:"folder-mock",drizzle:"folder-drizzle",ds_store:"folder-macos",dump:"folder-dump",dumps:"folder-dump",e2e:"folder-coverage",easing:"folder-animation",easings:"folder-animation",element:"folder-element",elements:"folder-element",email:"folder-mail",emails:"folder-mail",enum:"folder-enum",enums:"folder-enum",env:"folder-environment",environment:"folder-environment",environments:"folder-environment",envs:"folder-environment",err:"folder-error",error:"folder-error",errors:"folder-error",errs:"folder-error",eslint:"folder-eslint","eslint-config":"folder-eslint","eslint-configs":"folder-eslint","eslint-plugin":"folder-eslint","eslint-plugins":"folder-eslint",etc:"folder-other",event:"folder-event",events:"folder-event",example:"folder-examples",examples:"folder-examples",expo:"folder-expo","expo-shared":"folder-expo",export:"folder-export",exported:"folder-export",exports:"folder-export",extension:"folder-plugin",extensions:"folder-plugin",external:"folder-lib",externals:"folder-lib",extra:"folder-other",extras:"folder-other",fastlane:"folder-fastlane",favicon:"folder-favicon",favicons:"folder-favicon",feat:"folder-features",feats:"folder-features",feature:"folder-features",features:"folder-features",fig:"folder-images",figs:"folder-images",figure:"folder-images",figures:"folder-images",filter:"folder-filter",filters:"folder-filter",firebase:"folder-firebase","firebase-cloud-functions":"folder-cloud-functions","firebase-cloudfunctions":"folder-cloud-functions","firebase-firestore":"folder-firestore",firestore:"folder-firestore",fixture:"folder-mock",fixtures:"folder-mock","flow-typed":"folder-flow",flutter:"folder-flutter",font:"folder-font",fonts:"folder-font",forgejo:"folder-forgejo",form:"folder-form",forms:"folder-form",forum:"folder-messages",fragments:"folder-components",frontend:"folder-client",frontends:"folder-client",func:"folder-functions",funcs:"folder-functions",function:"folder-functions",functions:"folder-functions",game:"folder-console",gamemaker:"folder-gamemaker",gamemaker2:"folder-gamemaker",games:"folder-console",gcp:"folder-aws",gemini:"folder-gemini-ai","gemini-ai":"folder-gemini-ai",geminiai:"folder-gemini-ai",gen:"folder-generator",generated:"folder-generator",generator:"folder-generator",generators:"folder-generator",gens:"folder-generator",git:"folder-git",gitea:"folder-gitea",githooks:"folder-git",github:"folder-github","github/issue_template":"folder-template","github/pull_request_template":"folder-template","github/workflows":"folder-gh-workflows",gitlab:"folder-gitlab",global:"folder-global",glsl:"folder-shader",go:"folder-go",godot:"folder-godot","godot-cpp":"folder-godot",golang:"folder-go",gql:"folder-graphql",gradle:"folder-gradle",graphql:"folder-graphql",guard:"folder-guard",guards:"folder-guard",gui:"folder-ui",gulp:"folder-gulp","gulp-tasks":"folder-gulp","gulpfile.babel.js":"folder-gulp","gulpfile.js":"folder-gulp","gulpfile.mjs":"folder-gulp","gulpfile.ts":"folder-gulp",gulpfiles:"folder-gulp",handler:"folder-controller",handlers:"folder-controller",helm:"folder-helm",helmchart:"folder-helm",helmcharts:"folder-helm",helper:"folder-helper",helpers:"folder-helper",hg:"folder-mercurial",hgext:"folder-mercurial",hghooks:"folder-mercurial",histories:"folder-backup",history:"folder-backup",hlsl:"folder-shader",home:"folder-home",hook:"folder-hook",hooks:"folder-hook",html:"folder-views",husky:"folder-husky",i18n:"folder-i18n",ico:"folder-images",icon:"folder-images",icons:"folder-images",icos:"folder-images",idea:"folder-intellij",image:"folder-images",images:"folder-images",img:"folder-images",imgs:"folder-images",import:"folder-import",imported:"folder-import",imports:"folder-import",in:"folder-input",inc:"folder-include",inc64:"folder-include",include:"folder-include",includes:"folder-include",infra:"folder-server",infrastructure:"folder-server",input:"folder-input",inputs:"folder-input",integration:"folder-connection","integration-test":"folder-coverage","integration-tests":"folder-coverage",integrations:"folder-connection",interceptor:"folder-interceptor",interceptors:"folder-interceptor",interface:"folder-interface",interfaces:"folder-interface",internationalization:"folder-i18n",inventories:"folder-server",inventory:"folder-server",io:"folder-input",ios:"folder-ios",ipad:"folder-macos",iphone:"folder-macos",ipod:"folder-macos",ipynb:"folder-jupyter",it:"folder-coverage",j2:"folder-jinja",java:"folder-java",javascript:"folder-javascript",javascripts:"folder-javascript",jinja:"folder-jinja",jinja2:"folder-jinja",job:"folder-job",jobs:"folder-job",js:"folder-javascript",json:"folder-json",jsonc:"folder-json",jsonl:"folder-json",jsons:"folder-json",jupyter:"folder-jupyter",jwt:"folder-keys",k8s:"folder-kubernetes",key:"folder-keys",keys:"folder-keys",kit:"folder-tools",kits:"folder-tools",knowledge:"folder-docs",kotlin:"folder-kotlin",kql:"folder-kusto",kubernetes:"folder-kubernetes",kusto:"folder-kusto",l10n:"folder-i18n",lambda:"folder-functions",lambdas:"folder-functions",landing:"folder-home",lang:"folder-i18n",langs:"folder-i18n",language:"folder-i18n",languages:"folder-i18n",layout:"folder-layout",layouts:"folder-layout",lefthook:"folder-lefthook","lefthook-local":"folder-lefthook",less:"folder-less",lib:"folder-lib",lib64:"folder-lib",libraries:"folder-lib",library:"folder-lib",libs:"folder-lib",license:"folder-license",licenses:"folder-license",link:"folder-link",links:"folder-link",linux:"folder-linux",linuxbsd:"folder-linux",liquibase:"folder-liquibase",locale:"folder-i18n",locales:"folder-i18n",localization:"folder-i18n",log:"folder-log",logging:"folder-log",logic:"folder-functions",logs:"folder-log",lottie:"folder-lottie",lottiefiles:"folder-lottie",lotties:"folder-lottie",lua:"folder-lua",luau:"folder-luau",mac:"folder-macos",macbook:"folder-macos","macbook-air":"folder-macos",macos:"folder-macos",macosx:"folder-macos",mail:"folder-mail",mailers:"folder-mail",mails:"folder-mail",main:"folder-home",manager:"folder-admin",managers:"folder-admin",mapping:"folder-mappings",mappings:"folder-mappings",markdown:"folder-markdown",math:"folder-functions",maths:"folder-functions",md:"folder-markdown",measure:"folder-benchmark",measurement:"folder-benchmark",measures:"folder-benchmark",media:"folder-video",messages:"folder-messages",messaging:"folder-messages",meta:"folder-meta","meta-inf":"folder-config",metadata:"folder-meta",metro:"folder-metro",middleware:"folder-middleware",middlewares:"folder-middleware",migration:"folder-migrations",migrations:"folder-migrations",mint:"folder-linux",misc:"folder-other",miscellaneous:"folder-other",mjml:"folder-mjml",mjs:"folder-javascript",mobile:"folder-mobile",mobiles:"folder-mobile",mock:"folder-mock",mocks:"folder-mock",mod:"folder-plugin",modding:"folder-plugin",model:"folder-class",models:"folder-class",moderator:"folder-admin",moderators:"folder-admin",mods:"folder-plugin",module:"folder-plugin",modules:"folder-plugin",mojo:"folder-mojo",molecule:"folder-molecule",molecules:"folder-molecule",moon:"folder-moon",motion:"folder-animation",motions:"folder-animation",movie:"folder-video",movies:"folder-video",mq:"folder-queue",mts:"folder-typescript",music:"folder-audio",navigation:"folder-routes",navigations:"folder-routes",netlify:"folder-netlify",news:"folder-docs",next:"folder-next",nginx:"folder-nginx",node:"folder-node",node_modules:"folder-node",nodejs:"folder-node",note:"folder-docs",notebook:"folder-jupyter",notebooks:"folder-jupyter",notes:"folder-docs",now:"folder-vercel",nuxt:"folder-nuxt","nyc-output":"folder-coverage",nyc_output:"folder-coverage",obsidian:"folder-obsidian",opencode:"folder-opencode",option:"folder-config",options:"folder-config",organism:"folder-organism",organisms:"folder-organism",osx:"folder-macos",other:"folder-other",others:"folder-other",out:"folder-dist",output:"folder-dist",outputs:"folder-dist",package:"folder-packages",packages:"folder-packages",pact:"folder-contract",pacts:"folder-contract",page:"folder-views",pages:"folder-views",palette:"folder-theme",palettes:"folder-theme",partial:"folder-include",partials:"folder-include",patches:"folder-git",pdf:"folder-pdf",pdfs:"folder-pdf","pdm-build":"folder-pdm","pdm-plugins":"folder-pdm",perf:"folder-benchmark",performance:"folder-benchmark",phone:"folder-mobile",phones:"folder-mobile",photo:"folder-images",photograph:"folder-images",photographs:"folder-images",photos:"folder-images",php:"folder-php",phpmailer:"folder-phpmailer",pic:"folder-images",pics:"folder-images",picture:"folder-images",pictures:"folder-images",pipe:"folder-pipe",pipeline:"folder-pipe",pipelines:"folder-pipe",pipes:"folder-pipe",pkg:"folder-packages",pkgs:"folder-packages",plastic:"folder-plastic",playground:"folder-sandbox",playgrounds:"folder-sandbox",playlist:"folder-audio",playlists:"folder-audio",plugin:"folder-plugin",plugins:"folder-plugin",policies:"folder-policy",policy:"folder-policy",popos:"folder-linux",portability:"folder-mobile",portable:"folder-mobile",post:"folder-docs",postman:"folder-postman",posts:"folder-docs",powershell:"folder-powershell",pref:"folder-config",preference:"folder-config",preferences:"folder-config",prefs:"folder-config",presentation:"folder-ui",preview:"folder-review",previews:"folder-review",prisma:"folder-prisma","prisma/schema":"folder-prisma",private:"folder-private",profiling:"folder-benchmark",proj:"folder-project",project:"folder-project",projects:"folder-project",projs:"folder-project",prompt:"folder-prompts",prompts:"folder-prompts",properties:"folder-config",props:"folder-config",proto:"folder-proto",protobuf:"folder-proto",protobufs:"folder-proto",protos:"folder-proto",provider:"folder-controller",providers:"folder-controller",proxy:"folder-public",ps:"folder-powershell",ps1:"folder-powershell",ps4:"folder-console",ps5:"folder-console",public:"folder-public",public_html:"folder-views",pwa:"folder-client",pycache:"folder-python",pytest_cache:"folder-python",python:"folder-python",pytorch:"folder-pytorch",quasar:"folder-quasar",queue:"folder-queue",queues:"folder-queue",r:"folder-r",recordings:"folder-audio",release:"folder-dist",remote:"folder-connection",remotes:"folder-connection",repo:"folder-repository",report:"folder-resource",reports:"folder-resource",repos:"folder-repository",repositories:"folder-repository",repository:"folder-repository",res:"folder-resource",resolver:"folder-resolver",resolvers:"folder-resolver",resource:"folder-resource",resources:"folder-resource",restapi:"folder-api",review:"folder-review",reviewed:"folder-review",reviews:"folder-review",revisal:"folder-review",revisals:"folder-review",robot:"folder-robot",robots:"folder-robot",router:"folder-routes",routers:"folder-routes",routes:"folder-routes",routing:"folder-routes",rule:"folder-rules",rules:"folder-rules",rust:"folder-rust",salt:"folder-salt",saltstack:"folder-salt",sample:"folder-examples","sample-data":"folder-examples",samples:"folder-examples",sandbox:"folder-sandbox",sandboxes:"folder-sandbox",sass:"folder-sass",scala:"folder-scala",schema:"folder-class",schemas:"folder-class",sconf_temp:"folder-scons",scons:"folder-scons",scons_cache:"folder-scons",screen:"folder-views",screengrab:"folder-images",screengrabs:"folder-images",screens:"folder-views",screenshot:"folder-images",screenshots:"folder-images",script:"folder-scripts",scripting:"folder-scripts",scripts:"folder-scripts",scss:"folder-sass",secret:"folder-keys",secrets:"folder-keys",secure:"folder-secure",security:"folder-secure",seed:"folder-seeders",seeders:"folder-seeders",seeding:"folder-seeders",seeds:"folder-seeders",server:"folder-server",serverless:"folder-serverless",serverpackages:"folder-packages",servers:"folder-server",service:"folder-controller",services:"folder-controller",setting:"folder-config",settings:"folder-config",shader:"folder-shader",shaders:"folder-shader",shared:"folder-shared",shop:"folder-cart",shopping:"folder-cart","shopping-cart":"folder-cart",sim:"folder-simulations",sims:"folder-simulations",simulation:"folder-simulations",simulations:"folder-simulations",site:"folder-public",sketch:"folder-mock",sketches:"folder-mock",skill:"folder-skills",skills:"folder-skills",smtp:"folder-mail",snap:"folder-snapcraft",snapcraft:"folder-snapcraft",snapshots:"folder-test",snippet:"folder-snippet",snippets:"folder-snippet",song:"folder-audio",songs:"folder-audio",sound:"folder-audio",sounds:"folder-audio",source:"folder-src",sources:"folder-src",spa:"folder-client",spec:"folder-test",specs:"folder-test",spellcheck:"folder-syntax",spellcheckers:"folder-syntax",sql:"folder-database",src:"folder-src","src-tauri":"folder-src-tauri",srcs:"folder-src",ssl:"folder-secure",stack:"folder-stack",stacks:"folder-stack",start:"folder-home",static:"folder-resource",stencil:"folder-stencil",store:"folder-store",stores:"folder-store",stories:"folder-storybook",storybook:"folder-storybook",style:"folder-css",styles:"folder-css",stylesheet:"folder-css",stylesheets:"folder-css",stylus:"folder-stylus",sublime:"folder-sublime",submodules:"folder-git",supabase:"folder-supabase",svelte:"folder-svelte","svelte-kit":"folder-svelte",svg:"folder-svg",svgs:"folder-svg",switch:"folder-console",syntax:"folder-syntax",syntaxes:"folder-syntax","table-of-contents":"folder-toc",target:"folder-target",taskfile:"folder-taskfile",taskfiles:"folder-taskfile",tasks:"folder-tasks",television:"folder-television",temp:"folder-temp",template:"folder-template",templates:"folder-template",terraform:"folder-terraform",test:"folder-test",testfiles:"folder-test",testing:"folder-test",tests:"folder-test",texture:"folder-images",textures:"folder-images",theme:"folder-theme",themes:"folder-theme","third-party":"folder-lib",thirdparty:"folder-lib",tickets:"folder-tasks",tls:"folder-secure",tmp:"folder-temp",toc:"folder-toc",token:"folder-keys",tokens:"folder-keys",toolbox:"folder-tools",toolboxes:"folder-tools",tooling:"folder-tools",toolkit:"folder-tools",toolkits:"folder-tools",tools:"folder-tools",torch:"folder-pytorch",transition:"folder-animation",transitions:"folder-animation",translate:"folder-i18n",translation:"folder-i18n",translations:"folder-i18n",trash:"folder-trash",trigger:"folder-trigger",triggers:"folder-trigger",ts:"folder-typescript",turbo:"folder-turborepo",tv:"folder-television",tx:"folder-i18n",typeface:"folder-font",typefaces:"folder-font",types:"folder-typescript",typescript:"folder-typescript",typings:"folder-typescript",ubuntu:"folder-linux",ui:"folder-ui",unity:"folder-unity",unix:"folder-linux",update:"folder-update",updates:"folder-update",upgrade:"folder-update",upgrades:"folder-update",upload:"folder-upload",uploads:"folder-upload",util:"folder-utils",utilities:"folder-utils",utility:"folder-utils",utils:"folder-utils",ux:"folder-ui",validation:"folder-rules",validations:"folder-rules",validator:"folder-rules",validators:"folder-rules",vector:"folder-svg",vectors:"folder-svg",vendor:"folder-lib",vendors:"folder-lib",venv:"folder-environment",vercel:"folder-vercel",verdaccio:"folder-verdaccio",vid:"folder-video",video:"folder-video",videos:"folder-video",vids:"folder-video",view:"folder-views",views:"folder-views",vm:"folder-vm",vms:"folder-vm",voice:"folder-audio",voices:"folder-audio",vscode:"folder-vscode","vscode-test":"folder-vscode",vue:"folder-vue",vuepress:"folder-vuepress",wakatime:"folder-wakatime",web:"folder-public",webpack:"folder-webpack",website:"folder-public",websites:"folder-public",widget:"folder-components",widgets:"folder-components",wiki:"folder-docs",win:"folder-windows",win10:"folder-windows",win11:"folder-windows",win32:"folder-windows",windows:"folder-windows",windows10:"folder-windows",windows11:"folder-windows",windowsnt:"folder-windows",windowsxp:"folder-windows",winnt:"folder-windows",winxp:"folder-windows","wordpress-org":"folder-wordpress","wp-content":"folder-wordpress",wsl:"folder-linux",www:"folder-public",wwwroot:"folder-public",xbox:"folder-console",xtask:"folder-scripts",yarn:"folder-yarn",zeabur:"folder-zeabur",zed:"folder-zed"},Tk={".autorc":"auto_light",".browserslistrc":"browserlist_light",".bun-version":"bun_light",".codeclimate.yml":"code-climate_light",".config/releaserc":"semantic-release_light",".config/releaserc.cjs":"semantic-release_light",".config/releaserc.cts":"semantic-release_light",".config/releaserc.js":"semantic-release_light",".config/releaserc.json":"semantic-release_light",".config/releaserc.json5":"semantic-release_light",".config/releaserc.jsonc":"semantic-release_light",".config/releaserc.mjs":"semantic-release_light",".config/releaserc.mts":"semantic-release_light",".config/releaserc.toml":"semantic-release_light",".config/releaserc.ts":"semantic-release_light",".config/releaserc.yaml":"semantic-release_light",".config/releaserc.yml":"semantic-release_light",".config/stylelintrc":"stylelint_light",".config/stylelintrc.cjs":"stylelint_light",".config/stylelintrc.cts":"stylelint_light",".config/stylelintrc.js":"stylelint_light",".config/stylelintrc.json":"stylelint_light",".config/stylelintrc.json5":"stylelint_light",".config/stylelintrc.jsonc":"stylelint_light",".config/stylelintrc.mjs":"stylelint_light",".config/stylelintrc.mts":"stylelint_light",".config/stylelintrc.toml":"stylelint_light",".config/stylelintrc.ts":"stylelint_light",".config/stylelintrc.yaml":"stylelint_light",".config/stylelintrc.yml":"stylelint_light",".copilotignore":"copilot_light",".cursor":"cursor_light",".cursor.json":"cursor_light",".cursorignore":"cursor_light",".cursorindexingignore":"cursor_light",".cursorrc":"cursor_light",".cursorrules":"cursor_light",".drone.yml":"drone_light",".easignore":"expo_light",".nano-staged.cjs":"nano-staged_light",".nano-staged.js":"nano-staged_light",".nano-staged.json":"nano-staged_light",".nano-staged.mjs":"nano-staged_light",".nanostagedrc":"nano-staged_light",".nowignore":"vercel_light",".pnpmfile.cjs":"pnpm_light",".releaserc":"semantic-release_light",".releaserc.cjs":"semantic-release_light",".releaserc.cts":"semantic-release_light",".releaserc.js":"semantic-release_light",".releaserc.json":"semantic-release_light",".releaserc.json5":"semantic-release_light",".releaserc.jsonc":"semantic-release_light",".releaserc.mjs":"semantic-release_light",".releaserc.mts":"semantic-release_light",".releaserc.toml":"semantic-release_light",".releaserc.ts":"semantic-release_light",".releaserc.yaml":"semantic-release_light",".releaserc.yml":"semantic-release_light",".rubocop-todo.yml":"rubocop_light",".rubocop.yml":"rubocop_light",".rubocop_todo.yml":"rubocop_light",".shellcheckrc":"shellcheck_light",".stylelintcache":"stylelint_light",".stylelintignore":"stylelint_light",".stylelintrc":"stylelint_light",".stylelintrc.cjs":"stylelint_light",".stylelintrc.cts":"stylelint_light",".stylelintrc.js":"stylelint_light",".stylelintrc.json":"stylelint_light",".stylelintrc.json5":"stylelint_light",".stylelintrc.jsonc":"stylelint_light",".stylelintrc.mjs":"stylelint_light",".stylelintrc.mts":"stylelint_light",".stylelintrc.toml":"stylelint_light",".stylelintrc.ts":"stylelint_light",".stylelintrc.yaml":"stylelint_light",".stylelintrc.yml":"stylelint_light",".vercelignore":"vercel_light",".wakatime-project":"wakatime_light","auto-config.js":"auto_light","auto-config.json":"auto_light","auto-config.ts":"auto_light","auto-config.yaml":"auto_light","auto-config.yml":"auto_light","auto.config.js":"auto_light","auto.config.ts":"auto_light",browserslist:"browserlist_light","bun.lock":"bun_light","bun.lockb":"bun_light","bunfig.toml":"bun_light","circle.yml":"circleci_light","copilot-instructions.md":"copilot_light","deno.json":"deno_light","deno.jsonc":"deno_light","deno.lock":"deno_light","eas.json":"expo_light",hosts:"hosts_light","jsr.json":"jsr_light","jsr.jsonc":"jsr_light","nano-staged.cjs":"nano-staged_light","nano-staged.js":"nano-staged_light","nano-staged.json":"nano-staged_light","nano-staged.mjs":"nano-staged_light","netlify.json":"netlify_light","netlify.toml":"netlify_light","netlify.yaml":"netlify_light","netlify.yml":"netlify_light","next.config.js":"next_light","next.config.mjs":"next_light","next.config.mts":"next_light","next.config.ts":"next_light","now.json":"vercel_light","openapi.json":"openapi_light","openapi.yaml":"openapi_light","openapi.yml":"openapi_light","opencode.json":"opencode_light","opencode.jsonc":"opencode_light","payload.config.js":"payload_light","payload.config.mjs":"payload_light","payload.config.mts":"payload_light","payload.config.ts":"payload_light","pnpm-lock.yaml":"pnpm_light","pnpm-workspace.yaml":"pnpm_light","release.config.cjs":"semantic-release_light","release.config.cts":"semantic-release_light","release.config.js":"semantic-release_light","release.config.json":"semantic-release_light","release.config.json5":"semantic-release_light","release.config.jsonc":"semantic-release_light","release.config.mjs":"semantic-release_light","release.config.mts":"semantic-release_light","release.config.toml":"semantic-release_light","release.config.ts":"semantic-release_light","release.config.yaml":"semantic-release_light","release.config.yml":"semantic-release_light","remix.config.js":"remix_light","remix.config.ts":"remix_light",sconscript:"scons_light",sconstruct:"scons_light",scsub:"scons_light",shellcheckrc:"shellcheck_light","snowpack.config.cjs":"snowpack_light","snowpack.config.cts":"snowpack_light","snowpack.config.js":"snowpack_light","snowpack.config.json":"snowpack_light","snowpack.config.mjs":"snowpack_light","snowpack.config.mts":"snowpack_light","snowpack.config.ts":"snowpack_light","snowpack.deps.json":"snowpack_light","stitches.config.js":"stitches_light","stitches.config.ts":"stitches_light","stylelint.config.cjs":"stylelint_light","stylelint.config.cts":"stylelint_light","stylelint.config.js":"stylelint_light","stylelint.config.json":"stylelint_light","stylelint.config.json5":"stylelint_light","stylelint.config.jsonc":"stylelint_light","stylelint.config.mjs":"stylelint_light","stylelint.config.mts":"stylelint_light","stylelint.config.toml":"stylelint_light","stylelint.config.ts":"stylelint_light","stylelint.config.yaml":"stylelint_light","stylelint.config.yml":"stylelint_light","turbo.json":"turborepo_light","turbo.jsonc":"turborepo_light","vercel.json":"vercel_light","vercel.ts":"vercel_light","warp.md":"warp_light","zeabur.json":"zeabur_light","zeabur.json5":"zeabur_light","zeabur.jsonc":"zeabur_light","zeabur.toml":"zeabur_light","zeabur.yaml":"zeabur_light","zeabur.yml":"zeabur_light"},MH={".wakatime-project":"wakatime_light",ai:"adobe-illustrator_light",ait:"adobe-illustrator_light",blink:"blink_light",cr:"crystal_light","drone.yml":"drone_light",ecr:"crystal_light",fen:"chess_light",hcl:"hcl_light",huff:"huff_light",iuml:"uml_light",j2:"jinja_light",jinja:"jinja_light","jinja-html":"jinja_light",jinja2:"jinja_light","openapi.json":"openapi_light","openapi.yaml":"openapi_light","openapi.yml":"openapi_light",pgn:"chess_light",plantuml:"uml_light",psb:"adobe-photoshop_light",psd:"adobe-photoshop_light",psdt:"adobe-photoshop_light",pu:"uml_light",puml:"uml_light",tldr:"tldraw_light",tofu:"opentofu_light",toml:"toml_light",verse:"verse_light",wsd:"uml_light",zeabur:"zeabur_light"},Ek={"-cursor":"folder-cursor_light","-idea":"folder-intellij_light","-j2":"folder-jinja_light","-jinja":"folder-jinja_light","-jinja2":"folder-jinja_light",".cursor":"folder-cursor_light",".idea":"folder-intellij_light",".j2":"folder-jinja_light",".jinja":"folder-jinja_light",".jinja2":"folder-jinja_light",__cursor__:"folder-cursor_light",__idea__:"folder-intellij_light",__j2__:"folder-jinja_light",__jinja2__:"folder-jinja_light",__jinja__:"folder-jinja_light",_cursor:"folder-cursor_light",_idea:"folder-intellij_light",_j2:"folder-jinja_light",_jinja:"folder-jinja_light",_jinja2:"folder-jinja_light",cursor:"folder-cursor_light",idea:"folder-intellij_light",j2:"folder-jinja_light",jinja:"folder-jinja_light",jinja2:"folder-jinja_light"},Ik={pug:'',just:'',json:'',playwright:'',xml:'',javascript:'',rocket:'',routing:'',settings:'',typedoc:'',"markdoc-config":'',"astro-config":'',visualstudio:'',"go-mod":'',"python-misc":'',ruff:'',uv:'',scons:'',console:'',excalidraw:'',gradle:'',license:'',unlicense:'',key:'',keystatic:'',ruby:'',gemfile:'',rubocop:'',rspec:'',swift:'',docker:'',latexmk:'',email:'',graphql:'',xaml:'',happo:'',chromatic:'',git:'',lua:'',r:'',dart:'',cmake:'',semgrep:'',"vue-config":'',nuxt:'',harmonix:'',lock:'',angular:'',mjml:'',vercel:'',liara:'',verdaccio:'',payload:'',next:'',remark:'',remix:'',laravel:'',vfl:'',kl:'',postcss:'',posthtml:'',todo:'',cabal:'',http:'',graphcool:'',webpack:'',rstack:'',lynx:'',ionic:'',gulp:'',nodejs:'',npm:'',yarn:'',android:'',tune:'',turborepo:'',babel:'',blitz:'',contributing:'',readme:'',changelog:'',architecture:'',credits:'',authors:'',flow:'',favicon:'',karma:'',bithound:'',svgo:'',appveyor:'',travis:'',codecov:'',sonarcloud:'',protractor:'',fusebox:'',heroku:'',editorconfig:'',bower:'',eslint:'',conduct:'',watchman:'',aurelia:'',auto:'',mocha:'',jenkins:'',firebase:'',rollup:'',hack:'',hardhat:'',stylelint:'',"code-climate":'',prettier:'',renovate:'',apollo:'',nodemon:'',webhint:'',browserlist:'',snyk:'',drone:'',opencode:'',sequelize:'',gatsby:'',wakatime:'',circleci:'',cloudfoundry:'',grunt:'',jest:'',fastlane:'',helm:'',wallaby:'',stencil:'',makefile:'',"semantic-release":'',bitbucket:'',bazel:'',"godot-assets":'',"azure-pipelines":'',vagrant:'',prisma:'',istanbul:'',tailwindcss:'',buildkite:'',netlify:'',svelte:'',nest:'',moon:'',percy:'',gitpod:'',stackblitz:'',codeowners:'',gcp:'',amplify:'',husky:'',tilt:'',capacitor:'',adonis:'',meson:'',commitizen:'',commitlint:'',buck:'',nx:'',dune:'',roadmap:'',nuget:'',stryker:'',modernizr:'',slug:'',stitches:'',nginx:'',minecraft:'',replit:'',duc:'',snowpack:'',quasar:'',dependabot:'',vite:'',vitest:'',velite:'',rolldown:'',lerna:'',windicss:'',textlint:'',vlang:'',sentry:'',contentlayer:'',phpunit:'',"php-cs-fixer":'',robots:'',tsconfig:'',tauri:'',jsconfig:'',maven:'',serverless:'',supabase:'',ember:'',horusec:'',poetry:'',pdm:'',parcel:'',astyle:'',lighthouse:'',svgr:'',rome:'',cypress:'',plop:'',tobimake:'',gleam:'',pnpm:'',gridsome:'',steadybit:'',caddy:'',openapi:'',swagger:'',bun:'',"nano-staged":'',knip:'',taskfile:'',craco:'',mercurial:'',deno:'',plastic:'',typst:'',unocss:'',"ifanr-cloud":'',concourse:'',syncpack:'',werf:'',luau:'',wally:'',panda:'',biome:'',esbuild:'',drizzle:'',puppeteer:'',garden:'',pkl:'',kubernetes:'',phpstan:'',screwdriver:'',snapcraft:'',kcl:'',clangd:'',markdownlint:'',trigger:'',deepsource:'',jsr:'',"coderabbit-ai":'',"gemini-ai":'',taze:'',wxt:'',lefthook:'',label:'',zeabur:'',copilot:'',"pre-commit":'',lintstaged:'',histoire:'',installation:'',"github-sponsors":'',"minecraft-fabric":'',umi:'',"pm2-ecosystem":'',hosts:'',citation:'',xmake:'',wrangler:'',cline:'',packship:'',snakemake:'',hadolint:'',tsdoc:'',oxc:'',claude:'',cursor:'',metro:'',bashly:'',google:'',shellcheck:'',warp:'',skill:'',tsdown:'',appwrite:'',expo:'',slint:'',html:'',markdown:'',blink:'',css:'',sass:'',less:'',json_schema:'',hjson:'',jinja:'',proto:'',prompt:'',sublime:'',simulink:'',quarto:'',twine:'',yaml:'',toml:'',toon:'',image:'',palette:'',react:'',react_ts:'',typescript:'',"typescript-def":'',markdoc:'',markojs:'',astro:'',pdf:'',table:'',vscode:'',varnish:'',database:'',kusto:'',csharp:'',qsharp:'',zip:'',vala:'',zig:'',exe:'',hex:'',java:'',jar:'',javaclass:'',c3:'',c:'',h:'',hip:'',cpp:'',hpp:'',"objective-c":'',"objective-cpp":'',rc:'',go:'',python:'',url:'',powershell:'',word:'',certificate:'',font:'',lib:'',bibliography:'',"bibtex-style":'',dll:'',fsharp:'',arduino:'',tex:'',context:'',"doctex-installer":'',bbx:'',cbx:'',lbx:'',powerpoint:'',video:'',virtual:'',vedic:'',audio:'',coffee:'',document:'',lyric:'',rust:'',raml:'',haskell:'',kotlin:'',otne:'',diff:'',clojure:'',groovy:'',dart_generated:'',actionscript:'',mxml:'',autohotkey:'',flash:'',"adobe-swc":'',swc:'',assembly:'',vue:'',ocaml:'',odin:'',onnx:'',"javascript-map":'',"css-map":'',handlebars:'',perl:'',haxe:'',"test-ts":'',"test-jsx":'',"test-js":'',puppet:'',elixir:'',livescript:'',erlang:'',twig:'',julia:'',elm:'',purescript:'',smarty:'',stylus:'',reason:'',bucklescript:'',merlin:'',verilog:'',mathematica:'',wolframlanguage:'',nunjucks:'',robot:'',solidity:'',autoit:'',haml:'',yang:'',terraform:'',opentofu:'',applescript:'',cake:'',cucumber:'',nim:'',apiblueprint:'',riot:'',coldfusion:'',nix:'',slim:'',restql:'',kivy:'',sbt:'',gitlab:'',figma:'',huff:'',crystal:'',cuda:'',log:'',dotjs:'',ejs:'',processing:'',storybook:'',wepy:'',hcl:'',san:'',quokka:'',django:'',red:'',foxpro:'',i18n:'',webassembly:'',jupyter:'',d:'',mdx:'',mdsvex:'',ballerina:'',racket:'',mint:'',velocity:'',godot:'',azure:'',razor:'',abc:'',asciidoc:'',edge:'',scheme:'',lisp:'',"3d":'',svg:'',"adobe-illustrator":'',"adobe-photoshop":'',vim:'',moonscript:'',advpl:'',disc:'',fortran:'',tcl:'',liquid:'',prolog:'',coconut:'',sketch:'',pawn:'',forth:'',uml:'',dhall:'',sml:'',opam:'',imba:'',drawio:'',pascal:'',unity:'',sas:'',command:'',denizenscript:'',search:'',rescript:'',"rescript-interface":'',brainfuck:'',bicep:'',cobol:'',grain:'',lolcode:'',idris:'',pipeline:'',opa:'',scala:'',lilypond:'',chess:'',gemini:'',php:'',ada:'',coala:'',dinophp:'',teal:'',template:'',shader:'',siyuan:'',ndst:'',tobi:'',capnp:'',tree:'',cadence:'',antlr:'',stylable:'',pinejs:'',gamemaker:'',tldraw:'',mermaid:'',mojo:'',roblox:'',rbxmk:'',spwn:'',templ:'',chrome:'',stan:'',abap:'',lottie:'',"apps-script":'',verified:'',bruno:'',cairo:'',"grafana-alloy":'',freemarker:'',tsil:'',hurl:'',cds:'',verse:'',sway:'',"bench-ts":'',"bench-jsx":'',"bench-js":'',controller:'',"dependencies-update":'',subtitles:'',beancount:'',epub:'',regedit:'',gnuplot:'',coloredpetrinets:'',pytorch:'',blender:'',"vanilla-extract":'',toc:'',cue:'',lean:'',salt:'',macaulay2:'',uiua:'',mrpack:'',"folder-rust":'',"folder-robot":'',"folder-src":'',"folder-dist":'',"folder-css":'',"folder-sass":'',"folder-television":'',"folder-desktop":'',"folder-console":'',"folder-images":'',"folder-scripts":'',"folder-node":'',"folder-javascript":'',"folder-json":'',"folder-font":'',"folder-bower":'',"folder-test":'',"folder-directive":'',"folder-jinja":'',"folder-markdown":'',"folder-pdm":'',"folder-php":'',"folder-phpmailer":'',"folder-sublime":'',"folder-docs":'',"folder-gh-workflows":'',"folder-git":'',"folder-github":'',"folder-gitea":'',"folder-gitlab":'',"folder-forgejo":'',"folder-vscode":'',"folder-views":'',"folder-vue":'',"folder-vuepress":'',"folder-expo":'',"folder-config":'',"folder-i18n":'',"folder-components":'',"folder-verdaccio":'',"folder-aurelia":'',"folder-resource":'',"folder-lib":'',"folder-theme":'',"folder-webpack":'',"folder-global":'',"folder-public":'',"folder-include":'',"folder-docker":'',"folder-nginx":'',"folder-astro":'',"folder-database":'',"folder-migrations":'',"folder-log":'',"folder-target":'',"folder-temp":'',"folder-aws":'',"folder-audio":'',"folder-video":'',"folder-kubernetes":'',"folder-import":'',"folder-export":'',"folder-wakatime":'',"folder-circleci":'',"folder-wordpress":'',"folder-gradle":'',"folder-coverage":'',"folder-class":'',"folder-other":'',"folder-lua":'',"folder-turborepo":'',"folder-typescript":'',"folder-graphql":'',"folder-routes":'',"folder-ci":'',"folder-eslint":'',"folder-benchmark":'',"folder-messages":'',"folder-less":'',"folder-gulp":'',"folder-python":'',"folder-r":'',"folder-sandbox":'',"folder-scons":'',"folder-mojo":'',"folder-moon":'',"folder-debug":'',"folder-fastlane":'',"folder-plugin":'',"folder-middleware":'',"folder-controller":'',"folder-ansible":'',"folder-server":'',"folder-client":'',"folder-tasks":'',"folder-android":'',"folder-ios":'',"folder-ui":'',"folder-upload":'',"folder-download":'',"folder-tools":'',"folder-helper":'',"folder-serverless":'',"folder-api":'',"folder-app":'',"folder-apollo":'',"folder-archive":'',"folder-backup":'',"folder-batch":'',"folder-buildkite":'',"folder-cluster":'',"folder-command":'',"folder-constant":'',"folder-container":'',"folder-content":'',"folder-context":'',"folder-core":'',"folder-delta":'',"folder-dump":'',"folder-examples":'',"folder-environment":'',"folder-functions":'',"folder-generator":'',"folder-hook":'',"folder-trigger":'',"folder-job":'',"folder-keys":'',"folder-layout":'',"folder-mail":'',"folder-mappings":'',"folder-meta":'',"folder-changesets":'',"folder-packages":'',"folder-shared":'',"folder-shader":'',"folder-stack":'',"folder-template":'',"folder-utils":'',"folder-supabase":'',"folder-private":'',"folder-linux":'',"folder-windows":'',"folder-macos":'',"folder-error":'',"folder-event":'',"folder-secure":'',"folder-custom":'',"folder-mock":'',"folder-syntax":'',"folder-vm":'',"folder-stylus":'',"folder-flow":'',"folder-rules":'',"folder-review":'',"folder-animation":'',"folder-guard":'',"folder-prisma":'',"folder-pipe":'',"folder-interceptor":'',"folder-svg":'',"folder-nuxt":'',"folder-terraform":'',"folder-mobile":'',"folder-stencil":'',"folder-firebase":'',"folder-firestore":'',"folder-cloud-functions":'',"folder-svelte":'',"folder-update":'',"folder-intellij":'',"folder-azure-pipelines":'',"folder-mjml":'',"folder-admin":'',"folder-jupyter":'',"folder-scala":'',"folder-connection":'',"folder-quasar":'',"folder-next":'',"folder-dal":'',"folder-cobol":'',"folder-yarn":'',"folder-husky":'',"folder-storybook":'',"folder-base":'',"folder-cart":'',"folder-home":'',"folder-project":'',"folder-prompts":'',"folder-interface":'',"folder-netlify":'',"folder-enum":'',"folder-contract":'',"folder-helm":'',"folder-queue":'',"folder-vercel":'',"folder-cypress":'',"folder-decorators":'',"folder-java":'',"folder-resolver":'',"folder-angular":'',"folder-unity":'',"folder-pdf":'',"folder-proto":'',"folder-plastic":'',"folder-gamemaker":'',"folder-mercurial":'',"folder-godot":'',"folder-lottie":'',"folder-taskfile":'',"folder-drizzle":'',"folder-cloudflare":'',"folder-seeders":'',"folder-store":'',"folder-bicep":'',"folder-snapcraft":'',"folder-flutter":'',"folder-snippet":'',"folder-element":'',"folder-src-tauri":'',"folder-favicon":'',"folder-features":'',"folder-lefthook":'',"folder-bloc":'',"folder-powershell":'',"folder-repository":'',"folder-luau":'',"folder-obsidian":'',"folder-trash":'',"folder-cline":'',"folder-liquibase":'',"folder-dart":'',"folder-zeabur":'',"folder-kusto":'',"folder-policy":'',"folder-attachment":'',"folder-bibliography":'',"folder-link":'',"folder-pytorch":'',"folder-blender":'',"folder-atom":'',"folder-molecule":'',"folder-organism":'',"folder-claude":'',"folder-cursor":'',"folder-gemini-ai":'',"folder-opencode":'',"folder-input":'',"folder-salt":'',"folder-simulations":'',"folder-metro":'',"folder-filter":'',"folder-toc":'',"folder-cue":'',"folder-license":'',"folder-form":'',"folder-postman":'',"folder-skills":'',"folder-zed":'',"folder-appwrite":'',"folder-assembly":'',"folder-go":'',"folder-kotlin":'',file:'',folder:'',scons_light:'',rubocop_light:'',vercel_light:'',payload_light:'',next_light:'',remix_light:'',turborepo_light:'',auto_light:'',stylelint_light:'',"code-climate_light":'',browserlist_light:'',drone_light:'',opencode_light:'',wakatime_light:'',circleci_light:'',"semantic-release_light":'',netlify_light:'',stitches_light:'',snowpack_light:'',pnpm_light:'',openapi_light:'',bun_light:'',"nano-staged_light":'',deno_light:'',jsr_light:'',zeabur_light:'',copilot_light:'',hosts_light:'',cursor_light:'',shellcheck_light:'',warp_light:'',expo_light:'',blink_light:'',jinja_light:'',toml_light:'',opentofu_light:'',huff_light:'',crystal_light:'',hcl_light:'',"adobe-illustrator_light":'',"adobe-photoshop_light":'',uml_light:'',chess_light:'',tldraw_light:'',verse_light:'',"folder-jinja_light":'',"folder-intellij_light":'',"folder-cursor_light":''};function Cu(e,t){return Object.hasOwn(e,t)}function H2(e,t,n,o){const s=e[n];return!o||!Cu(t,n)?s:t[n]}function AH(){return typeof window<"u"&&typeof window.matchMedia!="function"?!1:!Ip().value}function TH(e,t){const n=e.toLowerCase();if(Cu(y3,e))return H2(y3,Tk,e,t);if(Cu(y3,n))return H2(y3,Tk,n,t)}function EH(e,t){const o=e.toLowerCase().split(".");for(let s=1;sn.length>0).at(-1)??e}function LH(e){return e.replaceAll(/\s(?:width|height)="[^"]*"/g,"").replace(/^
      -`}function Eoe(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),`
    1. `}function Ioe(){return`
    2. -`}function Loe(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),` ↩︎`}function $oe(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=Moe,e.renderer.rules.footnote_block_open=Aoe,e.renderer.rules.footnote_block_close=Toe,e.renderer.rules.footnote_open=Eoe,e.renderer.rules.footnote_close=Ioe,e.renderer.rules.footnote_anchor=Loe,e.renderer.rules.footnote_caption=Coe,e.renderer.rules.footnote_anchor_name=Soe;function o(r,a,c,u){const d=r.bMarks[a]+r.tShift[a],f=r.eMarks[a];if(d+4>f||r.src.charCodeAt(d)!==91||r.src.charCodeAt(d+1)!==94)return!1;let p;for(p=d+2;p=f||r.src.charCodeAt(++p)!==58)return!1;if(u)return!0;p++,r.env.footnotes||(r.env.footnotes={}),r.env.footnotes.refs||(r.env.footnotes.refs={});const h=r.src.slice(d+2,p-2);r.env.footnotes.refs[`:${h}`]=-1;const m=new r.Token("footnote_reference_open","",1);m.meta={label:h},m.level=r.level++,r.tokens.push(m);const k=r.bMarks[a],x=r.tShift[a],y=r.sCount[a],w=r.parentType,_=p,A=r.sCount[a]+p-(r.bMarks[a]+r.tShift[a]);let P=A;for(;p=c||r.src.charCodeAt(u)!==94||r.src.charCodeAt(u+1)!==91)return!1;const d=u+2,f=t(r,u+1);if(f<0)return!1;if(!a){r.env.footnotes||(r.env.footnotes={}),r.env.footnotes.list||(r.env.footnotes.list=[]);const p=r.env.footnotes.list.length,h=[];r.md.inline.parse(r.src.slice(d,f),r.md,r.env,h);const m=r.push("footnote_ref","",0);m.meta={id:p},r.env.footnotes.list[p]={content:r.src.slice(d,f),tokens:h}}return r.pos=f+1,r.posMax=c,!0}function i(r,a){const c=r.posMax,u=r.pos;if(u+3>c||!r.env.footnotes||!r.env.footnotes.refs||r.src.charCodeAt(u)!==91||r.src.charCodeAt(u+1)!==94)return!1;let d;for(d=u+2;d=c)return!1;d++;const f=r.src.slice(u+2,d-1);if(typeof r.env.footnotes.refs[`:${f}`]>"u")return!1;if(!a){r.env.footnotes.list||(r.env.footnotes.list=[]);let p;r.env.footnotes.refs[`:${f}`]<0?(p=r.env.footnotes.list.length,r.env.footnotes.list[p]={label:f,count:0},r.env.footnotes.refs[`:${f}`]=p):p=r.env.footnotes.refs[`:${f}`];const h=r.env.footnotes.list[p].count;r.env.footnotes.list[p].count++;const m=r.push("footnote_ref","",0);m.meta={id:p,subId:h,label:f}}return r.pos=d,r.posMax=c,!0}function l(r){let a,c,u,d=!1;const f={};if(!r.env.footnotes||(r.tokens=r.tokens.filter(function(h){return h.type==="footnote_reference_open"?(d=!0,c=[],u=h.meta.label,!1):h.type==="footnote_reference_close"?(d=!1,f[":"+u]=c,!1):(d&&c.push(h),!d)}),!r.env.footnotes.list))return;const p=r.env.footnotes.list;r.tokens.push(new r.Token("footnote_block_open","",1));for(let h=0,m=p.length;h0?p[h].count:1;for(let w=0;w?@[\]^_`{|}~-])/g;function Roe(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==126||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos?@[\]^_`{|}~-])/g;function joe(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==94||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos{t.exports=function(m,k){k=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},k),m.core.ruler.after("inline","github-task-lists",function(x){for(var y=x.tokens,w=0,_=2;_=0;y--)if(m[y].level===x)return y;return-1}function s(m,k){return d(m[k])&&f(m[k-1])&&p(m[k-2])&&h(m[k])}function i(m,k,x,y){var w=x.idPrefix+k;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(r(w,y)),m.children.push(a(y)),m.children.unshift(l(m,w,x,y)),x.divWrap&&(m.children.unshift(c(x,y)),m.children.push(u(y)))}function l(m,k,x,y){var w=new y("checkbox_input","input",0);return w.attrs=[["type","checkbox"],["id",k]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&w.attrs.push(["checked","true"]),x.disabled===!0&&w.attrs.push(["disabled","true"]),w}function r(m,k){var x=new k("label_open","label",1);return x.attrs=[["for",m]],x}function a(m){return new m("label_close","label",-1)}function c(m,k){var x=new k("checkbox_open","div",0);return x.attrs=[["class",m.divClass]],x}function u(m){return new m("checkbox_close","div",-1)}function d(m){return m.type==="inline"}function f(m){return m.type==="paragraph_open"}function p(m){return m.type==="list_item_open"}function h(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})}),Doe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Voe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),Ch;const Woe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),qoe=(Ch=String.fromCodePoint)!==null&&Ch!==void 0?Ch:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Uoe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Woe.get(e))!==null&&t!==void 0?t:e}var qs;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(qs||(qs={}));const Zoe=32;var n1;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(n1||(n1={}));function j8(e){return e>=qs.ZERO&&e<=qs.NINE}function Koe(e){return e>=qs.UPPER_A&&e<=qs.UPPER_F||e>=qs.LOWER_A&&e<=qs.LOWER_F}function Goe(e){return e>=qs.UPPER_A&&e<=qs.UPPER_Z||e>=qs.LOWER_A&&e<=qs.LOWER_Z||j8(e)}function Yoe(e){return e===qs.EQUALS||Goe(e)}var Ws;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ws||(Ws={}));var Ja;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ja||(Ja={}));var Xoe=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ws.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ja.Strict}startEntity(e){this.decodeMode=e,this.state=Ws.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ws.EntityStart:return e.charCodeAt(t)===qs.NUM?(this.state=Ws.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ws.NamedEntity,this.stateNamedEntity(e,t));case Ws.NumericStart:return this.stateNumericStart(e,t);case Ws.NumericDecimal:return this.stateNumericDecimal(e,t);case Ws.NumericHex:return this.stateNumericHex(e,t);case Ws.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Zoe)===qs.LOWER_X?(this.state=Ws.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ws.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,o){if(t!==n){const s=n-t;this.result=this.result*Math.pow(o,s)+parseInt(e.substr(t,s),o),this.consumed+=s}}stateNumericHex(e,t){const n=t;for(;t>14;for(;t>14,s!==0){if(i===qs.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ja.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,o=(n[t]&n1.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:o}=this;return this.emitCodePoint(t===1?o[e]&~n1.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Ws.NamedEntity:return this.result!==0&&(this.decodeMode!==Ja.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ws.NumericDecimal:return this.emitNumericEntity(0,2);case Ws.NumericHex:return this.emitNumericEntity(0,3);case Ws.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ws.EntityStart:return 0}}};function gE(e){let t="";const n=new Xoe(e,o=>t+=qoe(o));return function(s,i){let l=0,r=0;for(;(r=s.indexOf("&",r))>=0;){t+=s.slice(l,r),n.startEntity(i);const c=n.write(s,r+1);if(c<0){l=r+n.end();break}l=r+c,r=c===0?l+1:l}const a=t+s.slice(l);return t="",a}}function Joe(e,t,n,o){const s=(t&n1.BRANCH_LENGTH)>>7,i=t&n1.JUMP_TABLE;if(s===0)return i!==0&&o===i?n:-1;if(i){const a=o-i;return a<0||a>=s?-1:e[n+a]-1}let l=n,r=l+s-1;for(;l<=r;){const a=l+r>>>1,c=e[a];if(co)r=a-1;else return e[a+s]}return-1}const Qoe=gE(Doe);gE(Voe);function qg(e,t=Ja.Legacy){return Qoe(e,t)}var ese=mE(Hoe());const ob={};function tse(e){let t=ob[e];if(t)return t;t=ob[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);t.push(o)}for(let n=0;n=55296&&u<=57343?s+="���":s+=String.fromCharCode(u),i+=6;continue}}if((r&248)===240&&i+91114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}s+="�"}return s})}Lp.defaultChars=";/?:@&=+$,#";Lp.componentChars="";var O8=Lp;const sb={};function nse(e){let t=sb[e];if(t)return t;t=sb[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);/^[0-9a-z]$/i.test(o)?t.push(o):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const o=nse(t);let s="";for(let i=0,l=e.length;i=55296&&r<=57343){if(r>=55296&&r<=56319&&i+1=56320&&a<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}$p.defaultChars=";/?:@&=+$,-_.!~*'()#";$p.componentChars="-_.!~*'()";var vE=$p;function Ug(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function u5(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const ose=/^([a-z0-9.+-]+:)/i,sse=/:[0-9]*$/,ise=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,lse=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` -`," "]),rse=["'"].concat(lse),ib=["%","/","?",";","#"].concat(rse),lb=["/","?","#"],ase=255,rb=/^[+a-z0-9A-Z_-]{0,63}$/,cse=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ab={javascript:!0,"javascript:":!0},cb={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function use(e,t){if(e&&e instanceof u5)return e;const n=new u5;return n.parse(e,t),n}u5.prototype.parse=function(e,t){let n,o,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=ise.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let l=ose.exec(i);if(l&&(l=l[0],n=l.toLowerCase(),this.protocol=l,i=i.substr(l.length)),(t||l||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=i.substr(0,2)==="//",s&&!(l&&ab[l])&&(i=i.substr(2),this.slashes=!0)),!ab[l]&&(s||l&&!cb[l])){let c=-1;for(let h=0;h127?y+="x":y+=x[w];if(!y.match(rb)){const w=h.slice(0,m),_=h.slice(m+1),A=x.match(cse);A&&(w.push(A[1]),_.unshift(A[2])),_.length&&(i=_.join(".")+i),this.hostname=w.join(".");break}}}}this.hostname.length>ase&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const r=i.indexOf("#");r!==-1&&(this.hash=i.substr(r),i=i.slice(0,r));const a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),cb[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};u5.prototype.parseHost=function(e){let t=sse.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Zg=use,yE=hE({decode:()=>O8,encode:()=>vE,format:()=>Ug,parse:()=>Zg}),wE=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,kE=/[\0-\x1F\x7F-\x9F]/,dse=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,bE=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,fse=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,_E=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,pse=hE({Any:()=>wE,Cc:()=>kE,Cf:()=>dse,P:()=>bE,S:()=>fse,Z:()=>_E}),hse=Object.defineProperty,xE=e=>{let t={};for(var n in e)hse(t,n,{get:e[n],enumerable:!0});return t},Ps=class{type;tag;attrs;map;nesting;level;children;content;markup;info;meta;block;hidden;constructor(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,o=t.length;n=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},mse=xE({arrayReplaceAt:()=>_se,assign:()=>kse,countLines:()=>ns,escapeHtml:()=>Lse,escapeRE:()=>Nse,fromCodePoint:()=>U2,has:()=>wse,isMdAsciiPunct:()=>p5,isPunctChar:()=>f5,isPunctCode:()=>H8,isSpace:()=>bse,isString:()=>vse,isValidEntityCode:()=>zp,isWhiteSpace:()=>q2,lib:()=>zse,mdurl:()=>yE,normalizeReference:()=>Np,ucmicro:()=>d5,unescapeAll:()=>Z2,unescapeMd:()=>Mse});const d5=pse;function gse(e){return Object.prototype.toString.call(e)}function vse(e){return gse(e)==="[object String]"}const yse=Object.prototype.hasOwnProperty;function wse(e,t){return yse.call(e,t)}function kse(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(o=>{e[o]=n[o]})}}),e}function bse(e){return e===9||e===32}function q2(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function f5(e){return d5.P.test(e)||d5.S.test(e)}const ub=new Map;function H8(e){if(p5(e))return!0;if(e>=0&&e<128)return!1;const t=ub.get(e);if(t!==void 0)return t;const n=f5(String.fromCharCode(e));return ub.set(e,n),n}function p5(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Np(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function _se(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function zp(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function U2(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const SE=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,xse=new RegExp(`${SE.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Sse=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Cse(e,t){if(t.charCodeAt(0)===35&&Sse.test(t)){const o=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return zp(o)?U2(o):e}const n=qg(e);return n!==e?n:e}function Mse(e){return e.includes("\\")?e.replace(SE,"$1"):e}function Z2(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(xse,(t,n,o)=>n||Cse(t,o))}const Ase=/[&<>"]/,Tse=/[&<>"]/g,Ese={"&":"&","<":"<",">":">",'"':"""};function Ise(e){return Ese[e]}function Lse(e){return Ase.test(e)?e.replace(Tse,Ise):e}const $se=/[.?*+^$[\]\\(){}|-]/g;function Nse(e){return e.replace($se,"\\$&")}const zse={mdurl:yE,ucmicro:d5};function ns(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` -`,n+1))!==-1;)t++;return t}const Bse=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,Rse=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,Pse=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,Kg=["references","footnotes","abbreviations","abbr","abbrs"],Gg=Symbol.for("markdown-it-ts.global-state"),Yg=Object.prototype.hasOwnProperty;function db(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function lr(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function u1(e){if(Array.isArray(e))return e.map(t=>u1(t));if(lr(e)){const t={};for(const n of Object.keys(e))t[n]=u1(e[n]);return t}return e}function h5(e){return Array.isArray(e)?e.map((t,n)=>String(n)):lr(e)?Object.keys(e):[]}function D8(e,t){if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;ni.has(l)?!D8(s[l],CE(o.value,l)):!0)}}function _a(e){const t=Xg(e);if(t){for(const n of Kg){const o=t.snapshot[n];if(!o){delete e[n];continue}if(o.ownedKeys){jse(e,n,o);continue}o.existed?e[n]=Fse(e[n],o.value):delete e[n]}delete e[Gg]}}function Mh(e){return{area:e,attempted:!0,matched:!1,attemptMs:0,blocks:0,headings:0,paragraphs:0,lists:0,fences:0,paragraphCacheHits:0,paragraphCacheMisses:0,paragraphCacheBypasses:0,listCacheHits:0,listCacheMisses:0,fenceCacheHits:0,fenceCacheMisses:0}}const V8=Symbol.for("markdown-it-ts.diagnostics");function kf(e,t){if(e)try{const n=e[V8];if(n&&typeof n=="object")return n;if(!t)return;const o={};return e[V8]=o,o}catch{return}}function ea(e){return kf(e,!1)}function Hse(e){if(e)try{const t=e[V8];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function xi(e){Hse(e)}function Sd(e,t){const n=kf(e,!0);n&&(n.stockFast=t)}function bs(e,t){const n=kf(e,!0);n&&(n.strategy=t)}function Ah(e,t){const n=kf(e,!0);n&&(n.chunk=t)}function ME(e,t){const n=kf(e,!0);n&&(n.unbounded=t)}function Dse(e){const t={};e=e||{},t.src_Any=wE.source,t.src_Cc=kE.source,t.src_Z=_E.source,t.src_P=bE.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function W8(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function Bp(e){return Object.prototype.toString.call(e)}function Vse(e){return Bp(e)==="[object String]"}function Wse(e){return Bp(e)==="[object Object]"}function qse(e){return Bp(e)==="[object RegExp]"}function fb(e){return Bp(e)==="[object Function]"}function Use(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const AE={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Zse(e){return Object.keys(e||{}).reduce(function(t,n){return t||AE.hasOwnProperty(n)},!1)}const Kse={"http:":{validate:function(e,t,n){const o=e.slice(t);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},Gse="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Yse="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Xse(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function pb(){return function(e,t){t.normalize(e)}}function m5(e){const t=e.re=Dse(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Gse),n.push(t.src_xn),t.src_tlds=n.join("|");function o(r){return r.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(o(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(o(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(o(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const s=[];e.__compiled__={};function i(r,a){throw new Error(`(LinkifyIt) Invalid schema "${r}": ${a}`)}Object.keys(e.__schemas__).forEach(function(r){const a=e.__schemas__[r];if(a===null)return;const c={validate:null,link:null};if(e.__compiled__[r]=c,Wse(a)){qse(a.validate)?c.validate=Xse(a.validate):fb(a.validate)?c.validate=a.validate:i(r,a),fb(a.normalize)?c.normalize=a.normalize:a.normalize?i(r,a):c.normalize=pb();return}if(Vse(a)){s.push(r);return}i(r,a)}),s.forEach(function(r){e.__compiled__[e.__schemas__[r]]&&(e.__compiled__[r].validate=e.__compiled__[e.__schemas__[r]].validate,e.__compiled__[r].normalize=e.__compiled__[e.__schemas__[r]].normalize)}),e.__compiled__[""]={validate:null,normalize:pb()};const l=Object.keys(e.__compiled__).filter(function(r){return r.length>0&&e.__compiled__[r]}).map(Use).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${l})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${l})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function TE(e,t,n,o){const s=e.slice(n,o);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=o,this.raw=s,this.text=s,this.url=s}function fl(e,t){if(!(this instanceof fl))return new fl(e,t);t||Zse(e)&&(t=e,e={}),this.__opts__=W8({},AE,t),this.__schemas__=W8({},Kse,e),this.__compiled__={},this.__tlds__=Yse,this.__tlds_replaced__=!1,this.re={},m5(this)}fl.prototype.add=function(t,n){return this.__schemas__[t]=n,m5(this),this};fl.prototype.set=function(t){return this.__opts__=W8(this.__opts__,t),this};fl.prototype.test=function(t){if(!t.length)return!1;let n,o;if(this.re.schema_test.test(t)){for(o=this.re.schema_search,o.lastIndex=0;(n=o.exec(t))!==null;)if(this.testSchemaAt(t,n[2],o.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};fl.prototype.pretest=function(t){return this.re.pretest.test(t)};fl.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0};fl.prototype.match=function(t){const n=[],o=[],s=[],i=[];let l,r,a;function c(f,p){return f?p?f.index!==p.index?f.index=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(a=this.re.schema_search,a.lastIndex=0;(l=a.exec(t))!==null;)r=this.testSchemaAt(t,l[2],a.lastIndex),r&&o.push({schema:l[2],index:l.index+l[1].length,lastIndex:l.index+l[0].length+r});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(a=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,a.lastIndex=0;(l=a.exec(t))!==null;)s.push({schema:"",index:l.index+l[1].length,lastIndex:l.index+l[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(a=this.re.email_fuzzy_global,a.lastIndex=0;(l=a.exec(t))!==null;)i.push({schema:"mailto:",index:l.index+l[1].length,lastIndex:l.index+l[0].length});const u=[0,0,0];let d=0;for(;;){const f=[o[u[0]],i[u[1]],s[u[2]]],p=c(c(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?u[0]++:p===f[1]?u[1]++:u[2]++,p.index{const d=/^xn--/,f=/[^\0-\x7F]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,k=Math.floor,x=String.fromCharCode;function y(D){throw new RangeError(h[D])}function w(D,M){const R=[];let O=D.length;for(;O--;)R[O]=M(D[O]);return R}function _(D,M){const R=D.split("@");let O="";R.length>1&&(O=R[0]+"@",D=R[1]),D=D.replace(p,".");const U=w(D.split("."),M).join(".");return O+U}function A(D){const M=[];let R=0;const O=D.length;for(;R=55296&&U<=56319&&RString.fromCodePoint(...D),z=function(D){return D>=48&&D<58?26+(D-48):D>=65&&D<91?D-65:D>=97&&D<123?D-97:36},L=function(D,M){return D+22+75*(D<26)-((M!=0)<<5)},E=function(D,M,R){let O=0;for(D=R?k(D/700):D>>1,D+=k(D/M);D>m*26>>1;O+=36)D=k(D/m);return k(O+(m+1)*D/(D+38))},T=function(D){const M=[],R=D.length;let O=0,U=128,Z=72,q=D.lastIndexOf("-");q<0&&(q=0);for(let te=0;te=128&&y("not-basic"),M.push(D.charCodeAt(te));for(let te=q>0?q+1:0;te=R&&y("invalid-input");const me=z(D.charCodeAt(te++));me>=36&&y("invalid-input"),me>k((2147483647-O)/se)&&y("overflow"),O+=me*se;const xe=Q<=Z?1:Q>=Z+26?26:Q-Z;if(mek(2147483647/Ye)&&y("overflow"),se*=Ye}const J=M.length+1;Z=E(O-ee,J,ee==0),k(O/J)>2147483647-U&&y("overflow"),U+=k(O/J),O%=J,M.splice(O++,0,U)}return String.fromCodePoint(...M)},$=function(D){const M=[];D=A(D);const R=D.length;let O=128,U=0,Z=72;for(const ee of D)ee<128&&M.push(x(ee));const q=M.length;let te=q;for(q&&M.push("-");te=O&&sek((2147483647-U)/J)&&y("overflow"),U+=(ee-O)*J,O=ee;for(const se of D)if(se2147483647&&y("overflow"),se===O){let Q=U;for(let me=36;;me+=36){const xe=me<=Z?1:me>=Z+26?26:me-Z;if(Q32))return i;if(o===41){if(l===0)break;l--}s++}return t===s||l!==0||(i.str=Z2(e.slice(t,s)),i.pos=s,i.ok=!0),i}var LE=ev;const d4=-2;function Qse(e,t,n,o){let s=1,i=t+1;for(;i=0&&t+1>=u)return-1;const d=r.indexOf("]",t+1);if(d<0||d>=a)return e.linkLabelNoCloseFrom=t+1,-1;const f=Qse(r,t,a,n);if(f!==d4)return f;for(e.pos=t+1;e.pos=n)return l;let r=e.charCodeAt(i);if(r!==34&&r!==39&&r!==40)return l;t++,i++,r===40&&(r=41),l.marker=r}for(;i=0?e.attrs[n][1]:null}function nie(e,t,n){const o=Rp(e,t);o<0?ov(e,[t,n]):e.attrs[o][1]=`${e.attrs[o][1]} ${n}`}var oie=xE({attrGet:()=>tie,attrIndex:()=>Rp,attrJoin:()=>nie,attrPush:()=>ov,attrSet:()=>eie,parseLinkDestination:()=>ev,parseLinkLabel:()=>tv,parseLinkTitle:()=>nv});function sie(e){return e.includes("\r")||e.includes("\0")}function NE(e){return typeof e=="string"?e:e.toString()}function iie(e){if(e.inlineMode){const t=new Ps("inline","",0);t.content=NE(e.src),t.map=[0,1],t.children=[],t.level=0,e.tokens.push(t)}else e.md&&e.md.block&&e.md.block.parse(e.src,e.md,e.env,e.tokens)}const lie=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,rie=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function aie(e,t){let n=e.pos;const o=e.src;if(o.charCodeAt(n)!==60)return!1;const s=n,i=e.posMax;for(;;){if(++n>=i)return!1;const r=o.charCodeAt(n);if(r===60)return!1;if(r===62)break}const l=o.slice(s+1,n);if(rie.test(l)){const r=e.md.normalizeLink(l);if(!e.md.validateLink(r))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",r]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=l.length+2,!0}if(lie.test(l)){const r=e.md.normalizeLink(`mailto:${l}`);if(!e.md.validateLink(r))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",r]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=l.length+2,!0}return!1}var zE=aie;function cie(e,t){const n=e.src;let o=e.pos;if(n.charCodeAt(o)!==96)return!1;const s=o;o++;const i=e.posMax;for(;o2&&f.charCodeAt(0)===32&&f.charCodeAt(f.length-1)===32&&(f=f.slice(1,-1)),d.content=f}return e.pos=a,!0}e.backticks[u]=c}return e.backticksScanned=!0,t||(e.pending+=l),e.pos+=r,!0}var BE=cie;function hb(e){const t={},n=e.length;if(!n)return;let o=0,s=-2;const i=[];for(let l=0;la;c-=i[c]+1){const d=e[c];if(d.marker===r.marker&&d.open&&d.end<0){let f=!1;if((d.close||r.open)&&(d.length+r.length)%3===0&&(d.length%3!==0||r.length%3!==0)&&(f=!0),!f){const p=c>0&&!e[c-1].open?i[c-1]+1:0;i[l]=l-c+p,i[c]=p,r.open=!1,d.end=l,d.close=!1,u=-1,s=-2;break}}}u!==-1&&(t[r.marker][(r.open?3:0)+(r.length||0)%3]=u)}}function uie(e){const t=e.tokens_meta,n=e.tokens_meta.length;hb(e.delimiters);for(let o=0;o=0;s--){const i=t[s],l=i.marker;if(l!==95&&l!==42||i.end===-1)continue;const r=t[i.end],a=i.token,c=r.token,u=s>0&&t[s-1].end===i.end+1&&t[s-1].marker===l&&t[s-1].token===a-1&&t[i.end+1].token===c+1,d=l===42?RE:PE,f=o[a];u?(f.type="strong_open",f.tag="strong",f.nesting=1,f.markup=d+d,f.content=""):(f.type="em_open",f.tag="em",f.nesting=1,f.markup=d,f.content="");const p=o[c];u?(p.type="strong_close",p.tag="strong",p.nesting=-1,p.markup=d+d,p.content=""):(p.type="em_close",p.tag="em",p.nesting=-1,p.markup=d,p.content=""),u&&(o[t[s-1].token].content="",o[t[i.end+1].token].content="",s--)}}function pie(e){const t=e.tokens_meta,n=e.tokens_meta.length;mb(e,e.delimiters);for(let o=0;o=48&&e<=57}function hie(e){const t=e|32;return sv(e)||t>=97&&t<=102}function jE(e){const t=e|32;return t>=97&&t<=122}function mie(e){return jE(e)||sv(e)}function gie(e,t,n){let o=t+2;if(o>=n)return null;let s=!1,i=7,l=o;for((e.charCodeAt(o)|32)===120&&(s=!0,i=6,o++,l=o);o=n||e.charCodeAt(o)!==59?null:e.slice(t,o+1)}function vie(e,t,n){let o=t+1;if(o>=n||!jE(e.charCodeAt(o)))return null;for(o++;o=n||e.charCodeAt(o)!==59)return null;const s=e.slice(t,o+1);return FE(s)!==s?s:null}function yie(e,t){const n=e.pos,o=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=o)return!1;if(e.src.charCodeAt(n+1)===35){const s=gie(e.src,n,o);if(s){if(!t){const i=(s.charCodeAt(2)|32)===120?Number.parseInt(s.slice(3,-1),16):Number.parseInt(s.slice(2,-1),10),l=e.push("text_special","",0);l.content=zp(i)?U2(i):U2(65533),l.markup=s,l.info="entity"}return e.pos+=s.length,!0}}else{const s=vie(e.src,n,o);if(s){const i=FE(s);if(!t){const l=e.push("text_special","",0);l.content=i,l.markup=s,l.info="entity"}return e.pos+=s.length,!0}}return!1}var OE=yie;const HE=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),U8=new Array(128),DE=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);U8[e]=`\\${t}`,DE[e]=HE[e]?t:U8[e]}function gb(e,t,n){e.pending&&e.pushPending();const o=new Ps("text_special","",0);o.level=e.level,o.content=t,o.markup=n,o.info="escape",e.pendingLevel=e.level,e.tokens.push(o),e.tokens_meta.push(null)}function wie(e,t){let n=e.pos;const o=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=o))return!1;let i=s.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&a<=57343&&n++}return e.pos=n+1,!0}let l=s.charAt(n);if(i>=55296&&i<=56319&&n+1=56320&&a<=57343&&(l+=s.charAt(n+1),n++)}const r=`\\${l}`;return gb(e,i<256&&HE[i]?l:r,r),e.pos=n+1,!0}var VE=wie;function kie(e){let t,n,o=0;const s=e.tokens,i=e.tokens.length;for(t=n=0;t0&&o++,l.type==="text"&&t+1\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,qE="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",_ie=new RegExp(`^(?:${WE}|${qE}||<\\?[\\s\\S]*?\\?>|]*>|)`),xie=new RegExp(`^(?:${WE}|${qE})`);function UE(e){return e===32||e===9||e===10||e===12||e===13}function Sie(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||UE(t)}function Cie(e){if(e.length<4||e.charCodeAt(0)!==60||e.charCodeAt(1)!==47||(e.charCodeAt(2)|32)!==97)return!1;for(let t=3;t=97&&t<=122}function Aie(e,t){if(!e.md.options.html)return!1;const n=e.posMax,o=e.pos,s=e.src;if(s.charCodeAt(o)!==60||o+2>=n)return!1;const i=s.charCodeAt(o+1);if(i!==33&&i!==63&&i!==47&&!Mie(i))return!1;const l=s.slice(o).match(_ie);if(!l)return!1;const r=l[0];if(!t){const a=e.pushSimple("html_inline","");a.content=r,Sie(r)&&e.linkLevel++,Cie(r)&&e.linkLevel--}return e.pos+=r.length,!0}var ZE=Aie;function Tie(e,t){let n,o,s,i,l,r,a,c,u="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,h=g5(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;if(r=LE(e.src,i,e.posMax),r.ok){for(u=e.md.normalizeLink(r.str),e.md.validateLink(u)?i=r.pos:u="",c=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?s=e.src.slice(c,i++):i=h+1):i=h+1,s||(s=e.src.slice(p,h)),l=e.env.references[Np(s)],!l)return e.pos=d,!1;u=l.href,a=l.title}if(!t){o=e.src.slice(p,h);const m=[];e.md.inline.parse(o,e.md,e.env,m);const k=e.push("image","img",0);k.attrs=[["src",u],["alt",""]],k.children=m,k.content=o,a&&k.attrs.push(["title",a])}return e.pos=i,e.posMax=f,!0}var KE=Tie;function Th(e,t,n){for(;t"u")return!1;let d;if(r=l+1,r=0?(d=n.slice(p,h),d||(d=n.slice(i,l)),r=h+1):d=n.slice(i,l)}else d=n.slice(i,l);const f=e.env.references[Np(d)];if(!f)return e.pos=o,!1;a=f.href,c=f.title}if(!t){e.pos=i,e.posMax=l;const d=e.push("link_open","a",1);d.attrs=c?[["href",a],["title",c]]:[["href",a]],e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=r,e.posMax=s,!0}var GE=Eie;function YE(e){const t=e|32;return t>=97&&t<=122}function Iie(e){return e>=48&&e<=57}function Lie(e){return YE(e)||Iie(e)||e===43||e===45||e===46}function $ie(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&Lie(e.charCodeAt(t));)t--;return t++,t>=e.length||!YE(e.charCodeAt(t))?null:e.slice(t)}function Nie(e,t,n){let o=t;for(;o0)return!1;const n=e.pos,o=e.posMax;if(n+3>o||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=$ie(e.pending);if(!s)return!1;const i=Nie(e.src,n-s.length,o),l=e.md.linkify.matchAtStart(i);if(!l)return!1;let r=l.url;if(r.length<=s.length)return!1;let a=r.length;for(;a>0&&r.charCodeAt(a-1)===42;)a--;a!==r.length&&(r=r.slice(0,a));const c=e.md.normalizeLink(r);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const u=e.push("link_open","a",1);u.attrs=[["href",c]],u.markup="linkify",u.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(r);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=r.length-s.length,!0}function zie(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const o=e.pending.length-1,s=e.posMax;if(!t)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let i=o-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.pushSimple("hardbreak","br")}else e.pending=e.pending.slice(0,-1),e.pushSimple("softbreak","br");else e.pushSimple("softbreak","br");for(n++;n=s||yb(n.charCodeAt(o)))return!1;let i=o+1;for(;io-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function jie(e,t){return{chain:e,name:t,calls:0,hits:0,inclusiveMs:0,medianMs:0,maxMs:0,normalCalls:0,normalHits:0,silentCalls:0,silentHits:0,samples:[]}}function eI(e){const t=e;if(!t)return null;if(t.__mdtsRuleProfile)return t.__mdtsRuleProfile;if(!t.__mdtsProfileRules)return null;const n=t.__mdtsProfileRules===!0?{}:t.__mdtsProfileRules,o={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:iv(),records:Object.create(null)};return t.__mdtsRuleProfile=o,o}function cu(e,t,n,o,s,i){const l=eI(e);if(!l)return;const r=`${t}:${n}`,a=l.records[r]??(l.records[r]=jie(t,n));a.calls++,a.inclusiveMs+=o,o>a.maxMs&&(a.maxMs=o),a.samples.push(o),i?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,l.completedAt=iv()}function Oie(e){const t=eI(e);if(!t)return null;const n=Object.keys(t.records);for(let o=0;os.name===e);o>=0&&this.rules.splice(o,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const o=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(o<0)return;const s=this.rules[o];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(o<0)throw new Error(`Parser rule not found: ${e}`);this.rules[o].fn=t,n?.alt!==void 0&&(this.rules[o].alt=n.alt),this.invalidateCache()}before(e,t,n,o){const s=this.rules.findIndex(l=>l.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(l=>l.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,o){const s=this.rules.findIndex(l=>l.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(l=>l.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled||(this.rules[l].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled&&(this.rules[l].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache.get(t)??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache.get(t)??[]}compileCache(){const e=new Set([""]);for(const o of this.rules)if(o.enabled&&o.alt)for(const s of o.alt)e.add(s);const t=new Map,n=new Map;for(const o of e){const s=[],i=[];for(const l of this.rules)l.enabled&&(o!==""&&!l.alt?.includes(o)||(s.push(l.fn),i.push({name:l.name,fn:l.fn})));t.set(o,s),n.set(o,i)}this.cache=t,this.namedCache=n}},tI=class{src;md;env;tokens;tokens_meta;pos;posMax;level;pending;pendingLevel;cache;delimiters;_prev_delimiters;backticks;backticksScanned;linkLevel;linkLabelNoCloseFrom;maxNesting;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o,this.tokens_meta=new Array(o.length),this.pos=0,this.posMax=e.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0,this.linkLabelNoCloseFrom=-1,this.maxNesting=t.options.maxNesting}pushPending(){const e=new Ps("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}pushSimple(e,t){this.pending&&this.pushPending();const n=new Ps(e,t,0);return n.level=this.level,this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(null),n}push(e,t,n){if(this.pending&&this.pushPending(),n===0)return this.pushSimple(e,t);const o=new Ps(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(s),o}scanDelims(e,t){const{src:n,posMax:o}=this,s=n.charCodeAt(e);let i=e;for(;i0?n.charCodeAt(e-1):32,a=i@[\]\\^_`{}~]/;function kb(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return JE(e,t);case 33:return KE(e,t);case 38:return OE(e,t);case 42:case 95:return q8.tokenize(e,t);case 58:return e.md.options.linkify&&XE(e,t);case 60:return zE(e,t)||ZE(e,t);case 91:return GE(e,t);case 92:return VE(e,t);case 96:return BE(e,t);case 126:return Z8.tokenize(e,t);default:return QE(e,t)}}function nI(e){return!Hie.test(e)}var Die=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new wb,this.ruler2=new wb,this.ruler.push("text",QE),this.ruler.push("linkify",XE),this.ruler.push("newline",JE),this.ruler.push("escape",VE),this.ruler.push("backticks",BE),this.ruler.push("strikethrough",Z8.tokenize),this.ruler.push("emphasis",q8.tokenize),this.ruler.push("link",GE),this.ruler.push("image",KE),this.ruler.push("autolink",zE),this.ruler.push("html_inline",ZE),this.ruler.push("entity",OE),this.ruler2.push("balance_pairs",die),this.ruler2.push("strikethrough",Z8.postProcess),this.ruler2.push("emphasis",q8.postProcess),this.ruler2.push("fragments_join",bie),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),o=n.length,s=e.cache,i=s[t],l=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(i!==void 0){e.pos=i;return}let r=!1;if(e.level=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,r=kb(e,!0),e.level--,r&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;r||e.pos++,s[t]=e.pos}tokenize(e){const t=this.getRules(),n=t.length,o=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const i=this.isDefaultRuleset();for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos")}if(r){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(l){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending()}isDefaultRuleset(){return this.ruler.version===this.defaultRulerVersion&&this.ruler2.version===this.defaultRuler2Version}parseSource(e,t,n,o){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&nI(e)){const a=new Ps("text","",0);a.content=e,o.push(a);return}const s=new tI(e,t,n,o);this.tokenize(s);const i=this.getRules2(),l=i.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a0&&nI(i.content)){const l=new Ps("text","",0);l.content=i.content,i.children.push(l);continue}e.md.inline.parse(i.content,e.md,e.env,i.children)}}}const Wie=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,qie=/[0-9a-z]/i;function Uie(e){return/^\s]/i.test(e)}function Zie(e){return/^<\/a\s*>/i.test(e)}function Kie(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n=0;l--){const r=s[l];if(r.type==="link_close"){for(l--;l>=0&&s[l].level!==r.level&&s[l].type!=="link_open";)l--;continue}if(r.type==="html_inline"&&(Uie(r.content)&&i>0&&i--,Zie(r.content)&&i++),i>0||r.type!=="text"||!e.md.linkify.test(r.content))continue;const a=r.content;let c=(e.md.linkify.match(a)||[]).map(p=>Kie(e.md.linkify,p));if(c.length===0)continue;const u=[];let d=r.level,f=0;c.length>0&&c[0].index===0&&l>0&&s[l-1].type==="text_special"&&(c=c.slice(1));for(let p=0;pf){const A=new Ps("text","",0);A.content=a.slice(f,x),A.level=d,u.push(A)}const y=new Ps("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",u.push(y);const w=new Ps("text","",0);w.content=k,w.level=d,u.push(w);const _=new Ps("link_close","a",-1);_.level=--d,_.markup="linkify",_.info="auto",u.push(_),f=h.lastIndex}if(f!==0){if(f=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(ele,nle)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function sle(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&oI.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function ile(e){if(e.md?.options?.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");Qie.test(o)&&ole(n.children||[]),oI.test(o)&&sle(n.children||[])}}var lle=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t){const n=this.rules.findIndex(o=>o.name===e);n>=0&&this.rules.splice(n,1),this.rules.push({name:e,fn:t,enabled:!0}),this.invalidateCache()}at(e,t){const n=this.rules.findIndex(o=>o.name===e);if(n<0)throw new Error(`Parser rule not found: ${e}`);this.rules[n].fn=t,this.invalidateCache()}before(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled||(this.rules[l].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled&&(this.rules[l].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){this.cache=this.rules.filter(e=>e.enabled).map(e=>e.fn),this.namedCache=this.rules.filter(e=>e.enabled).map(e=>({name:e.name,fn:e.fn}))}getRules(e=""){return this.cache||this.compileCache(),this.cache}getNamedRules(e=""){return this.namedCache||this.compileCache(),this.namedCache}};const rle=/['"]/,bb=/['"]/g,_b="’";function C3(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function ale(e,t){let n;const o=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let i=0;i=0&&!(o[n].level<=r);n--);if(o.length=n+1,l.type!=="text")continue;let a=l.content,c=0,u=a.length;e:for(;c=0)m=a.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let k=32;if(c=48&&m<=57&&(p=f=!1),f&&p&&(f=x,p=y),!f&&!p){h&&(l.content=C3(l.content,d.index,_b));continue}if(p)for(n=o.length-1;n>=0;n--){let A=o[n];if(o[n].level=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!rle.test(o)||!n.children||ale(n.children,e)}}function ule(e){const t=e.tokens||[],n=t.length;for(let o=0;o=4||s.charCodeAt(u)!==62)return!1;if(o)return!0;const p=[],h=[],m=[],k=[],x=e.md.block.ruler.getRulesForState(e,"blockquote"),y=e.parentType;e.parentType="blockquote";let w=!1,_;for(_=t;_=d)break;if(s.charCodeAt(u++)===62&&!E){let $=a[_]+1,C,j;s.charCodeAt(u)===32?(u++,$++,j=!1,C=!0):s.charCodeAt(u)===9?(C=!0,(c[_]+$)%4===3?(u++,$++,j=!1):j=!0):C=!1;let H=$;for(p.push(i[_]),i[_]=u;u=d,h.push(c[_]),c[_]=a[_]+1+(C?1:0),m.push(a[_]),a[_]=H-$,k.push(r[_]),r[_]=u-i[_];continue}if(w)break;let T=!1;for(let $=0,C=x.length;$";const z=[t,0];P.map=z,e.md.block.tokenize(e,t,_);const L=e.push("blockquote_close","blockquote",-1);L.markup=">",e.lineMax=f,e.parentType=y,z[1]=e.line;for(let E=0;E=4){o++,s=o;continue}break}e.line=s;const i=e.push("code_block","code",0);return i.content=`${e.getLines(t,s,4+e.blkIndent,!1)} -`,i.map=[t,e.line],!0}function gle(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>i)return!1;const l=e.src.charCodeAt(s);if(l!==126&&l!==96)return!1;let r=s;s=e.skipChars(s,l);let a=s-r;if(a<3)return!1;const c=e.src.slice(r,s),u=e.src.slice(s,i);if(l===96&&u.includes(String.fromCharCode(l)))return!1;if(o)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=r=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],s=4)&&(s=e.skipChars(s,l),!(s-r=4)return!1;let u=s.charCodeAt(a);if(u!==35||a>=c)return!1;let d=1;for(u=s.charCodeAt(++a);u===35&&a6||aa&&Cb(s.charCodeAt(f-1))&&(c=f),e.line=t+1;const p=e.push("heading_open",xb[d],1);p.markup=Sb[d],p.map=[t,e.line];const h=e.push("inline","",0);h.content=s.slice(a,c).trim(),h.map=[t,e.line],h.children=[];const m=e.push("heading_close",xb[d],-1);return m.markup=Sb[d],!0}function yle(e){switch(e){case 9:case 32:return!0}return!1}function wle(e,t,n,o){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const l=e.src.charCodeAt(i++);if(l!==42&&l!==45&&l!==95)return!1;let r=1;for(;i|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${xie.source}\\s*$`),/^$/,!1]];function kle(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let l=e.src.slice(s,i),r=0;for(;r<_c.length&&!_c[r][0].test(l);r++);if(r===_c.length)return!1;if(o)return _c[r][2];let a=t+1;if(!_c[r][1].test(l)){for(;a=48&&e<=57}var aI=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];lineFlags=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType="root";level=0;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o;const s=this.src;let i=0,l=0,r=0,a=!1,c=0;for(let u=0,d=s.length;u0&&this.level++,this.tokens.push(o),o}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,o=this.eMarks;for(let s=this.lineMax;et;){const o=n.charCodeAt(--e);if(o!==9&&o!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let o=n.length;en;)if(t!==o.charCodeAt(--e))return e+1;return e}getLines(e,t,n,o){if(e>=t)return"";if(e+1===t){const u=e,d=this.bMarks[u];let f=d;const p=o?this.eMarks[u]+1:this.eMarks[u];let h=0;const m=this.src,k=this.bsCount,x=this.tShift;for(;fn?new Array(h-n+1).join(" ")+m.slice(f,p):m.slice(f,p)}const s=new Array(t-e),i=this.src,l=this.bMarks,r=this.eMarks,a=this.bsCount,c=this.tShift;for(let u=0,d=e;dn?s[u]=new Array(f-n+1).join(" ")+i.slice(h,m):s[u]=i.slice(h,m)}return s.join("")}};aI.prototype.Token=Ps;function _le(e,t,n){for(let o=t;o=s)return!1;const i=n.charCodeAt(o);switch(i){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return i>=48&&i<=57?!0:_le(n,o,s)}const Ab=["","h1","h2"];function xle(e,t,n){const o=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,i=e.bMarks,l=e.tShift,r=e.eMarks,a=e.sCount,c=e.blkIndent,u=cI(e);if(a[t]-c>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,p,h=t+1;for(;h=A)break;if(a[h]-c>3)continue;if(a[h]>=c&&(p=s.charCodeAt(_),p===45||p===61)){let z=_+1,L=z;for(;z=A){f=p===61?1:2;break}if(L-_>1)continue}if(a[h]<0||u&&!uI(e,h,s,_,A))continue;let P=!1;for(let z=0,L=o.length;z_;){const P=s.charCodeAt(A-1);if(P!==9&&P!==32)break;A--}m=s.slice(_,A)}else m=e.getLines(t,h,c,!1).trim();e.line=h+1;const k=p===61?"=":"-",x=e.push("heading_open",Ab[f],1);x.markup=k,x.map=[t,e.line];const y=e.push("inline","",0);y.content=m,y.map=[t,e.line-1],y.children=[];const w=e.push("heading_close",Ab[f],-1);return w.markup=k,e.parentType=d,!0}function dI(e){switch(e){case 9:case 32:return!0}return!1}function Tb(e,t){const n=e.eMarks,o=e.bMarks,s=e.tShift,i=e.src,l=n[t];let r=o[t]+s[t];const a=i.charCodeAt(r++);return a!==42&&a!==45&&a!==43||r=r)return-1;let c=i.charCodeAt(a++);if(c<48||c>57)return-1;for(;;){if(a>=r)return-1;if(c=i.charCodeAt(a++),c>=48&&c<=57){if(a-l>=10)return-1;continue}if(c===41||c===46)break;return-1}return a0&&++s=4||e.listIndent>=0&&e.sCount[r]-e.listIndent>=4&&e.sCount[r]=e.blkIndent&&(c=!0);let u,d,f;const p=e.src,h=e.bMarks,m=e.tShift,k=e.eMarks,x=e.sCount,y=e.bsCount,w=h[r]+m[r];if(w>=k[r])return!1;const _=p.charCodeAt(w);if(_>=48&&_<=57){if(f=Eb(e,r),f<0||(u=!0,l=w,d=Sle(e,r,f),c&&d!==1))return!1}else if(_===42||_===45||_===43){if(f=Tb(e,r),f<0)return!1;u=!1}else return!1;if(c&&e.skipSpaces(f)>=k[r])return!1;if(o)return!0;const A=p.charCodeAt(f-1),P=String.fromCharCode(A);if(u){const C=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(C.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const z=[r,0];e.tokens[e.tokens.length-1].map=z,e.tokens[e.tokens.length-1].markup=P;let L=!1;const E=e.tokens.length-1,T=e.md.block.ruler.getRulesForState(e,"list"),$=e.parentType;for(e.parentType="list";r=s?D=1:D=j-C,D>4&&(D=1);const M=C+D,R=e.push("list_item_open","li",1);R.markup=P;const O=[r,0];R.map=O,u&&(R.info=f-l-1===1?Cle[p.charCodeAt(l)-48]:p.slice(l,f-1));const U=e.tight,Z=e.tShift[r],q=e.sCount[r],te=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[r]=H-h[r],e.sCount[r]=j,H>=s&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,r,n,!0),(!e.tight||L)&&(a=!1),L=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=te,e.tShift[r]=Z,e.sCount[r]=q,e.tight=U,e.push("list_item_close","li",-1).markup=P,r=e.line,O[1]=r,r>=n||e.sCount[r]=4)break;let ee=!1;for(let J=0,se=T.length;J3||c[f]<0)continue;if(s==="list"&&c[f]>=u){const w=l[f]+r[f],_=a[f];if(w<_){const A=i.charCodeAt(w);if(A===42||A===45||A===43){if(w+1>=_||Ib(i.charCodeAt(w+1)))break}else if(A>=48&&A<=57&&w+1<_){let P=w+1;for(;;){if(P>=_){P=-1;break}const z=i.charCodeAt(P++);if(z>=48&&z<=57){if(P-w>=10){P=-1;break}continue}if((z===41||z===46)&&(P>=_||Ib(i.charCodeAt(P))))break;P=-1;break}if(P>=0)break}}}const k=l[f]+r[f],x=a[f];if(d&&!uI(e,f,i,k,x))continue;let y=!1;for(let w=0,_=o.length;w<_;w++)if(o[w](e,f,n,!0)){y=!0;break}if(y)break}const p=e.getLines(t,f,u,!1).trim();e.line=f;const h=e.push("paragraph_open","p",1);h.map=[t,e.line];const m=e.push("inline","",0);return m.content=p,m.map=[t,e.line],m.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}function M3(e){switch(e){case 9:case 32:return!0}return!1}function Ele(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],l=t+1;const r=e.md.block.ruler.getRulesForState(e,"reference");if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function a(w){const _=e.lineMax;if(w>=_||e.isEmpty(w))return null;let A=!1;if(e.sCount[w]-e.blkIndent>3&&(A=!0),e.sCount[w]<0&&(A=!0),!A){const L=e.parentType;e.parentType="reference";let E=!1;for(let T=0,$=r.length;T<$;T++)if(r[T](e,w,_,!0)){E=!0;break}if(e.parentType=L,E)return null}const P=e.bMarks[w]+e.tShift[w],z=e.eMarks[w];return e.src.slice(P,z+1)}let c=e.src.slice(s,i+1);i=c.length;let u=-1;for(s=1;s"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:x,href:f}),e.line=l),!0):!1}function Eh(e){switch(e){case 9:case 32:return!0}return!1}const Ile=65536;function Ih(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function Lle(e,t){if(e.lineFlags)return(e.lineFlags[t]&a2.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];nn)return!1;let s=t+1;if(e.sCount[s]=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;const l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58||i>=e.eMarks[s])return!1;const r=e.src.charCodeAt(i++);if(r!==124&&r!==45&&r!==58&&!Eh(r)||l===45&&Eh(r)||!Lle(e,t))return!1;for(;i=4)return!1;c=Lb(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==u.length)return!1;if(o)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRulesForState(e,"blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;const k=e.push("thead_open","thead",1);k.map=[t,t+1];const x=e.push("tr_open","tr",1);x.map=[t,t+1];for(let _=0;_=4||(c=Lb(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),w+=d-c.length,w>Ile))break;if(s===t+2){const P=e.push("tbody_open","tbody",1);P.map=y=[t+2,0]}const A=e.push("tr_open","tr",1);A.map=[s,s+1];for(let P=0;Pl.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(l=>l.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}after(e,t,n,o){const s=this._rules.findIndex(l=>l.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(l=>l.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache[t]??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache[t]??[]}getRulesForState(e,t){const n=e?.env;return n&&(Object.prototype.hasOwnProperty.call(n,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(n,"__mdtsProfileRules"))?this.getNamedRules(t).map(({name:o,fn:s})=>(i,l,r,a)=>{const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),u=s(i,l,r,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return cu(i?.env,"block",o,d-c,u,!!a),u}):this.getRules(t)}at(e,t,n){const o=this._rules.findIndex(s=>s.name===e);if(o===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[o].fn=t,n?.alt&&(this._rules[o].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const l=this._rules.findIndex(r=>r.name===i);if(l===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[l].enabled||(this._rules[l].enabled=!0,s=!0)}),s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const l=this._rules.findIndex(r=>r.name===i);if(l===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[l].enabled&&(this._rules[l].enabled=!1,s=!0)}),s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this._rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const o of this._rules)if(o.enabled)for(const s of o.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const o of e){const s=[],i=[];for(const l of this._rules)l.enabled&&(o!==""&&!l.alt.includes(o)||(s.push(l.fn),i.push({name:l.name,fn:l.fn})));t[o]=s,n[o]=i}this.cache=t,this.namedCache=n}};const A3=[["table",$le,["paragraph","reference"]],["code",mle],["fence",gle,["paragraph","reference","blockquote","list"]],["blockquote",hle,["paragraph","reference","blockquote","list"]],["hr",wle,["paragraph","reference","blockquote","list"]],["list",Ale,["paragraph","reference","blockquote"]],["reference",Ele],["html_block",kle,["paragraph","reference","blockquote"]],["heading",vle,["paragraph","reference","blockquote"]],["lheading",xle],["paragraph",Tle]];var zle=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new Nle;for(let e=0;e=a[u];)u++;if(e.line=u,u>=n||c[u]=i){e.line=n;break}const p=e.line;let h=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}if(!h)throw new Error("none of the block rules matched");e.tight=!d,l[e.line-1]+r[e.line-1]>=a[e.line-1]&&(d=!0),u=e.line,u=a[u]&&(d=!0,u++,e.line=u)}return}const f=this.ruler.getNamedRules("");for(;u=a[u];)u++;if(e.line=u,u>=n||c[u]=i){e.line=n;break}const p=e.line;let h=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}}if(!h)throw new Error("none of the block rules matched");e.tight=!d,l[e.line-1]+r[e.line-1]>=a[e.line-1]&&(d=!0),u=e.line,u=a[u]&&(d=!0,u++,e.line=u)}}parse(e,t,n,o){if(!e||e.length===0)return;const s=new aI(e,t,n,o);this.tokenize(s,s.line,s.lineMax)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}},fI=class{src;env;tokens;inlineMode;md;constructor(e,t,n={}){this.src=typeof e=="string"?e||"":e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}};fI.prototype.Token=Ps;const $b=[["normalize",Jie],["block",iie],["inline",Vie],["linkify",Gie],["replacements",ile],["smartquotes",cle],["text_join",ule]],Ble={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},Rle={parseLinkLabel:tv,parseLinkDestination:ev,parseLinkTitle:nv};function Ple(){return{...Ble}}function Fle(){return{...Rle}}var jle=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new zle,this.inline=new Die,this.ruler=new lle;for(let e=0;e<$b.length;e++){const[t,n]=$b[e];this.ruler.push(t,n)}this.fallbackParser={block:this.block,inline:this.inline,core:this,options:Ple(),helpers:Fle(),normalizeLink:lI,normalizeLinkText:rI,validateLink:iI,linkify:null}}resolveParser(e){return e||(this.linkifyInstance||(this.linkifyInstance=new EE),this.fallbackParser.block!==this.block&&(this.fallbackParser.block=this.block),this.fallbackParser.inline!==this.inline&&(this.fallbackParser.inline=this.inline),this.fallbackParser.core=this,this.fallbackParser.linkify=this.linkifyInstance,this.fallbackParser)}createState(e,t={},n){return new fI(e,this.resolveParser(n),t)}getCoreRules(){return this.cachedCoreRulesVersion!==this.ruler.version&&(this.cachedCoreRules=this.ruler.getRules(""),this.cachedCoreRulesVersion=this.ruler.version),this.cachedCoreRules}getCoreNamedRules(){return this.cachedCoreNamedRulesVersion!==this.ruler.version&&(this.cachedCoreNamedRules=this.ruler.getNamedRules(""),this.cachedCoreNamedRulesVersion=this.ruler.version),this.cachedCoreNamedRules}process(e){if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const n=this.getCoreRules();for(let o=0;o@[\]\\^_`{}~]/;function v5(e){return!Ole.test(e)}function Wd(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function f4(e,t,n){for(let o=t;o3)return v5(e);for(let t=0;t=o||t.charCodeAt(l)!==32)return!1;let r=l+1;for(;rr&&t.charCodeAt(a-1)===32;)a--;let c=a;for(;c>r&&t.charCodeAt(c-1)===35;)c--;if(c>r&&t.charCodeAt(c-1)===32)for(a=c-1;a>r&&t.charCodeAt(a-1)===32;)a--;const u=t.slice(r,a);if(!v5(u))return!1;const d=Dle[i],f=Vle[i],p=jl("heading_open",d,1,0);p.map=[s,s+1],p.markup=f,e.push(p),e.push(lv(u,s,1));const h=jl("heading_close",d,-1,0);return h.markup=f,e.push(h),!0}function qle(e,t,n){const o=jl("paragraph_open","p",1,0);o.map=[n,n+1],e.push(o),e.push(lv(t,n,1)),e.push(jl("paragraph_close","p",-1,0))}function Ule(e,t,n){const o=e.charCodeAt(n-1);return o===32||o===9?e.slice(t,n).trim():e.slice(t,n)}function zh(e,t){for(;t=1e5?zb:Nh,s="",i=!1,l=!1,r=0,a=0;for(;r"]/,Bb=/[&<>"]/g,Qle=/&/g,ere=/[<>"]/g,tre={"&":"&","<":"<",">":">",'"':"""};function Bh(e){return tre[e]||e}function ko(e){if(e.length===0)return"";if(e.length<32)return Jle.test(e)?e.replace(Bb,Bh):e;const t=e.includes("&"),n=e.includes("<"),o=e.includes(">"),s=e.includes('"');return!t&&!n&&!o&&!s?e:t&&!n&&!o&&!s?e.replace(Qle,"&"):t?e.replace(Bb,Bh):e.replace(ere,Bh)}const nre=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),ore=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function pI(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(nre,(t,n,o)=>{if(n)return n;if(ore.test(o)){const i=o[1].toLowerCase()==="x"?Number.parseInt(o.slice(2),16):Number.parseInt(o.slice(1),10);return zp(i)?U2(i):"�"}const s=qg(t);return s!==t?s:t})}const sre=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,ire=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,lre=/"/g;function Uc(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function y5(e,t,n){for(let o=t;o=e.length||e.charCodeAt(t)===10?!1:!y5(e,t,Uc(e,t))}function Rb(e,t,n){return t+2=n||e.charCodeAt(s)!==32)return null;let i=s+1;for(;ii&&e.charCodeAt(l-1)===32;)l--;let r=l;for(;r>i&&e.charCodeAt(r-1)===35;)r--;if(r>i&&e.charCodeAt(r-1)===32)for(l=r-1;l>i&&e.charCodeAt(l-1)===32;)l--;const a=rv(e.slice(i,l));return a===null?null:`${a} -`}function Pb(e,t,n){return t+1" +`}function Ioe(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),`
    3. `}function Loe(){return`
    4. +`}function $oe(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),` ↩︎`}function Noe(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=Aoe,e.renderer.rules.footnote_block_open=Toe,e.renderer.rules.footnote_block_close=Eoe,e.renderer.rules.footnote_open=Ioe,e.renderer.rules.footnote_close=Loe,e.renderer.rules.footnote_anchor=$oe,e.renderer.rules.footnote_caption=Moe,e.renderer.rules.footnote_anchor_name=Coe;function o(r,a,c,u){const d=r.bMarks[a]+r.tShift[a],f=r.eMarks[a];if(d+4>f||r.src.charCodeAt(d)!==91||r.src.charCodeAt(d+1)!==94)return!1;let p;for(p=d+2;p=f||r.src.charCodeAt(++p)!==58)return!1;if(u)return!0;p++,r.env.footnotes||(r.env.footnotes={}),r.env.footnotes.refs||(r.env.footnotes.refs={});const h=r.src.slice(d+2,p-2);r.env.footnotes.refs[`:${h}`]=-1;const m=new r.Token("footnote_reference_open","",1);m.meta={label:h},m.level=r.level++,r.tokens.push(m);const k=r.bMarks[a],x=r.tShift[a],y=r.sCount[a],w=r.parentType,_=p,A=r.sCount[a]+p-(r.bMarks[a]+r.tShift[a]);let P=A;for(;p=c||r.src.charCodeAt(u)!==94||r.src.charCodeAt(u+1)!==91)return!1;const d=u+2,f=t(r,u+1);if(f<0)return!1;if(!a){r.env.footnotes||(r.env.footnotes={}),r.env.footnotes.list||(r.env.footnotes.list=[]);const p=r.env.footnotes.list.length,h=[];r.md.inline.parse(r.src.slice(d,f),r.md,r.env,h);const m=r.push("footnote_ref","",0);m.meta={id:p},r.env.footnotes.list[p]={content:r.src.slice(d,f),tokens:h}}return r.pos=f+1,r.posMax=c,!0}function i(r,a){const c=r.posMax,u=r.pos;if(u+3>c||!r.env.footnotes||!r.env.footnotes.refs||r.src.charCodeAt(u)!==91||r.src.charCodeAt(u+1)!==94)return!1;let d;for(d=u+2;d=c)return!1;d++;const f=r.src.slice(u+2,d-1);if(typeof r.env.footnotes.refs[`:${f}`]>"u")return!1;if(!a){r.env.footnotes.list||(r.env.footnotes.list=[]);let p;r.env.footnotes.refs[`:${f}`]<0?(p=r.env.footnotes.list.length,r.env.footnotes.list[p]={label:f,count:0},r.env.footnotes.refs[`:${f}`]=p):p=r.env.footnotes.refs[`:${f}`];const h=r.env.footnotes.list[p].count;r.env.footnotes.list[p].count++;const m=r.push("footnote_ref","",0);m.meta={id:p,subId:h,label:f}}return r.pos=d,r.posMax=c,!0}function l(r){let a,c,u,d=!1;const f={};if(!r.env.footnotes||(r.tokens=r.tokens.filter(function(h){return h.type==="footnote_reference_open"?(d=!0,c=[],u=h.meta.label,!1):h.type==="footnote_reference_close"?(d=!1,f[":"+u]=c,!1):(d&&c.push(h),!d)}),!r.env.footnotes.list))return;const p=r.env.footnotes.list;r.tokens.push(new r.Token("footnote_block_open","",1));for(let h=0,m=p.length;h0?p[h].count:1;for(let w=0;w?@[\]^_`{|}~-])/g;function Poe(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==126||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos?@[\]^_`{|}~-])/g;function Ooe(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==94||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos{t.exports=function(m,k){k=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},k),m.core.ruler.after("inline","github-task-lists",function(x){for(var y=x.tokens,w=0,_=2;_=0;y--)if(m[y].level===x)return y;return-1}function s(m,k){return d(m[k])&&f(m[k-1])&&p(m[k-2])&&h(m[k])}function i(m,k,x,y){var w=x.idPrefix+k;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(r(w,y)),m.children.push(a(y)),m.children.unshift(l(m,w,x,y)),x.divWrap&&(m.children.unshift(c(x,y)),m.children.push(u(y)))}function l(m,k,x,y){var w=new y("checkbox_input","input",0);return w.attrs=[["type","checkbox"],["id",k]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&w.attrs.push(["checked","true"]),x.disabled===!0&&w.attrs.push(["disabled","true"]),w}function r(m,k){var x=new k("label_open","label",1);return x.attrs=[["for",m]],x}function a(m){return new m("label_close","label",-1)}function c(m,k){var x=new k("checkbox_open","div",0);return x.attrs=[["class",m.divClass]],x}function u(m){return new m("checkbox_close","div",-1)}function d(m){return m.type==="inline"}function f(m){return m.type==="paragraph_open"}function p(m){return m.type==="list_item_open"}function h(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})}),Voe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Woe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),Ch;const qoe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Uoe=(Ch=String.fromCodePoint)!==null&&Ch!==void 0?Ch:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Zoe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=qoe.get(e))!==null&&t!==void 0?t:e}var qs;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(qs||(qs={}));const Koe=32;var n1;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(n1||(n1={}));function O8(e){return e>=qs.ZERO&&e<=qs.NINE}function Goe(e){return e>=qs.UPPER_A&&e<=qs.UPPER_F||e>=qs.LOWER_A&&e<=qs.LOWER_F}function Yoe(e){return e>=qs.UPPER_A&&e<=qs.UPPER_Z||e>=qs.LOWER_A&&e<=qs.LOWER_Z||O8(e)}function Xoe(e){return e===qs.EQUALS||Yoe(e)}var Ws;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ws||(Ws={}));var Ja;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ja||(Ja={}));var Joe=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ws.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ja.Strict}startEntity(e){this.decodeMode=e,this.state=Ws.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ws.EntityStart:return e.charCodeAt(t)===qs.NUM?(this.state=Ws.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ws.NamedEntity,this.stateNamedEntity(e,t));case Ws.NumericStart:return this.stateNumericStart(e,t);case Ws.NumericDecimal:return this.stateNumericDecimal(e,t);case Ws.NumericHex:return this.stateNumericHex(e,t);case Ws.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Koe)===qs.LOWER_X?(this.state=Ws.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ws.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,o){if(t!==n){const s=n-t;this.result=this.result*Math.pow(o,s)+parseInt(e.substr(t,s),o),this.consumed+=s}}stateNumericHex(e,t){const n=t;for(;t>14;for(;t>14,s!==0){if(i===qs.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ja.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,o=(n[t]&n1.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:o}=this;return this.emitCodePoint(t===1?o[e]&~n1.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Ws.NamedEntity:return this.result!==0&&(this.decodeMode!==Ja.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ws.NumericDecimal:return this.emitNumericEntity(0,2);case Ws.NumericHex:return this.emitNumericEntity(0,3);case Ws.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ws.EntityStart:return 0}}};function vE(e){let t="";const n=new Joe(e,o=>t+=Uoe(o));return function(s,i){let l=0,r=0;for(;(r=s.indexOf("&",r))>=0;){t+=s.slice(l,r),n.startEntity(i);const c=n.write(s,r+1);if(c<0){l=r+n.end();break}l=r+c,r=c===0?l+1:l}const a=t+s.slice(l);return t="",a}}function Qoe(e,t,n,o){const s=(t&n1.BRANCH_LENGTH)>>7,i=t&n1.JUMP_TABLE;if(s===0)return i!==0&&o===i?n:-1;if(i){const a=o-i;return a<0||a>=s?-1:e[n+a]-1}let l=n,r=l+s-1;for(;l<=r;){const a=l+r>>>1,c=e[a];if(co)r=a-1;else return e[a+s]}return-1}const ese=vE(Voe);vE(Woe);function Ug(e,t=Ja.Legacy){return ese(e,t)}var tse=gE(Doe());const sb={};function nse(e){let t=sb[e];if(t)return t;t=sb[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);t.push(o)}for(let n=0;n=55296&&u<=57343?s+="���":s+=String.fromCharCode(u),i+=6;continue}}if((r&248)===240&&i+91114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}s+="�"}return s})}Lp.defaultChars=";/?:@&=+$,#";Lp.componentChars="";var H8=Lp;const ib={};function ose(e){let t=ib[e];if(t)return t;t=ib[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);/^[0-9a-z]$/i.test(o)?t.push(o):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const o=ose(t);let s="";for(let i=0,l=e.length;i=55296&&r<=57343){if(r>=55296&&r<=56319&&i+1=56320&&a<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}$p.defaultChars=";/?:@&=+$,-_.!~*'()#";$p.componentChars="-_.!~*'()";var yE=$p;function Zg(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function u5(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const sse=/^([a-z0-9.+-]+:)/i,ise=/:[0-9]*$/,lse=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,rse=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),ase=["'"].concat(rse),lb=["%","/","?",";","#"].concat(ase),rb=["/","?","#"],cse=255,ab=/^[+a-z0-9A-Z_-]{0,63}$/,use=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,cb={javascript:!0,"javascript:":!0},ub={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function dse(e,t){if(e&&e instanceof u5)return e;const n=new u5;return n.parse(e,t),n}u5.prototype.parse=function(e,t){let n,o,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=lse.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let l=sse.exec(i);if(l&&(l=l[0],n=l.toLowerCase(),this.protocol=l,i=i.substr(l.length)),(t||l||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=i.substr(0,2)==="//",s&&!(l&&cb[l])&&(i=i.substr(2),this.slashes=!0)),!cb[l]&&(s||l&&!ub[l])){let c=-1;for(let h=0;h127?y+="x":y+=x[w];if(!y.match(ab)){const w=h.slice(0,m),_=h.slice(m+1),A=x.match(use);A&&(w.push(A[1]),_.unshift(A[2])),_.length&&(i=_.join(".")+i),this.hostname=w.join(".");break}}}}this.hostname.length>cse&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const r=i.indexOf("#");r!==-1&&(this.hash=i.substr(r),i=i.slice(0,r));const a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),ub[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};u5.prototype.parseHost=function(e){let t=ise.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Kg=dse,wE=mE({decode:()=>H8,encode:()=>yE,format:()=>Zg,parse:()=>Kg}),kE=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,bE=/[\0-\x1F\x7F-\x9F]/,fse=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,_E=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,pse=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,xE=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,hse=mE({Any:()=>kE,Cc:()=>bE,Cf:()=>fse,P:()=>_E,S:()=>pse,Z:()=>xE}),mse=Object.defineProperty,SE=e=>{let t={};for(var n in e)mse(t,n,{get:e[n],enumerable:!0});return t},Ps=class{type;tag;attrs;map;nesting;level;children;content;markup;info;meta;block;hidden;constructor(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,o=t.length;n=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},gse=SE({arrayReplaceAt:()=>xse,assign:()=>bse,countLines:()=>ns,escapeHtml:()=>$se,escapeRE:()=>zse,fromCodePoint:()=>U2,has:()=>kse,isMdAsciiPunct:()=>p5,isPunctChar:()=>f5,isPunctCode:()=>D8,isSpace:()=>_se,isString:()=>yse,isValidEntityCode:()=>zp,isWhiteSpace:()=>q2,lib:()=>Bse,mdurl:()=>wE,normalizeReference:()=>Np,ucmicro:()=>d5,unescapeAll:()=>Z2,unescapeMd:()=>Ase});const d5=hse;function vse(e){return Object.prototype.toString.call(e)}function yse(e){return vse(e)==="[object String]"}const wse=Object.prototype.hasOwnProperty;function kse(e,t){return wse.call(e,t)}function bse(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(o=>{e[o]=n[o]})}}),e}function _se(e){return e===9||e===32}function q2(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function f5(e){return d5.P.test(e)||d5.S.test(e)}const db=new Map;function D8(e){if(p5(e))return!0;if(e>=0&&e<128)return!1;const t=db.get(e);if(t!==void 0)return t;const n=f5(String.fromCharCode(e));return db.set(e,n),n}function p5(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Np(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function xse(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function zp(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function U2(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const CE=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,Sse=new RegExp(`${CE.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Cse=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Mse(e,t){if(t.charCodeAt(0)===35&&Cse.test(t)){const o=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return zp(o)?U2(o):e}const n=Ug(e);return n!==e?n:e}function Ase(e){return e.includes("\\")?e.replace(CE,"$1"):e}function Z2(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(Sse,(t,n,o)=>n||Mse(t,o))}const Tse=/[&<>"]/,Ese=/[&<>"]/g,Ise={"&":"&","<":"<",">":">",'"':"""};function Lse(e){return Ise[e]}function $se(e){return Tse.test(e)?e.replace(Ese,Lse):e}const Nse=/[.?*+^$[\]\\(){}|-]/g;function zse(e){return e.replace(Nse,"\\$&")}const Bse={mdurl:wE,ucmicro:d5};function ns(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` +`,n+1))!==-1;)t++;return t}const Rse=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,Pse=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,Fse=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,Gg=["references","footnotes","abbreviations","abbr","abbrs"],Yg=Symbol.for("markdown-it-ts.global-state"),Xg=Object.prototype.hasOwnProperty;function fb(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function lr(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function u1(e){if(Array.isArray(e))return e.map(t=>u1(t));if(lr(e)){const t={};for(const n of Object.keys(e))t[n]=u1(e[n]);return t}return e}function h5(e){return Array.isArray(e)?e.map((t,n)=>String(n)):lr(e)?Object.keys(e):[]}function V8(e,t){if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;ni.has(l)?!V8(s[l],ME(o.value,l)):!0)}}function _a(e){const t=Jg(e);if(t){for(const n of Gg){const o=t.snapshot[n];if(!o){delete e[n];continue}if(o.ownedKeys){Ose(e,n,o);continue}o.existed?e[n]=jse(e[n],o.value):delete e[n]}delete e[Yg]}}function Mh(e){return{area:e,attempted:!0,matched:!1,attemptMs:0,blocks:0,headings:0,paragraphs:0,lists:0,fences:0,paragraphCacheHits:0,paragraphCacheMisses:0,paragraphCacheBypasses:0,listCacheHits:0,listCacheMisses:0,fenceCacheHits:0,fenceCacheMisses:0}}const W8=Symbol.for("markdown-it-ts.diagnostics");function kf(e,t){if(e)try{const n=e[W8];if(n&&typeof n=="object")return n;if(!t)return;const o={};return e[W8]=o,o}catch{return}}function ea(e){return kf(e,!1)}function Dse(e){if(e)try{const t=e[W8];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function xi(e){Dse(e)}function Sd(e,t){const n=kf(e,!0);n&&(n.stockFast=t)}function bs(e,t){const n=kf(e,!0);n&&(n.strategy=t)}function Ah(e,t){const n=kf(e,!0);n&&(n.chunk=t)}function AE(e,t){const n=kf(e,!0);n&&(n.unbounded=t)}function Vse(e){const t={};e=e||{},t.src_Any=kE.source,t.src_Cc=bE.source,t.src_Z=xE.source,t.src_P=_E.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function q8(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function Bp(e){return Object.prototype.toString.call(e)}function Wse(e){return Bp(e)==="[object String]"}function qse(e){return Bp(e)==="[object Object]"}function Use(e){return Bp(e)==="[object RegExp]"}function pb(e){return Bp(e)==="[object Function]"}function Zse(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const TE={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Kse(e){return Object.keys(e||{}).reduce(function(t,n){return t||TE.hasOwnProperty(n)},!1)}const Gse={"http:":{validate:function(e,t,n){const o=e.slice(t);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},Yse="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Xse="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Jse(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function hb(){return function(e,t){t.normalize(e)}}function m5(e){const t=e.re=Vse(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Yse),n.push(t.src_xn),t.src_tlds=n.join("|");function o(r){return r.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(o(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(o(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(o(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const s=[];e.__compiled__={};function i(r,a){throw new Error(`(LinkifyIt) Invalid schema "${r}": ${a}`)}Object.keys(e.__schemas__).forEach(function(r){const a=e.__schemas__[r];if(a===null)return;const c={validate:null,link:null};if(e.__compiled__[r]=c,qse(a)){Use(a.validate)?c.validate=Jse(a.validate):pb(a.validate)?c.validate=a.validate:i(r,a),pb(a.normalize)?c.normalize=a.normalize:a.normalize?i(r,a):c.normalize=hb();return}if(Wse(a)){s.push(r);return}i(r,a)}),s.forEach(function(r){e.__compiled__[e.__schemas__[r]]&&(e.__compiled__[r].validate=e.__compiled__[e.__schemas__[r]].validate,e.__compiled__[r].normalize=e.__compiled__[e.__schemas__[r]].normalize)}),e.__compiled__[""]={validate:null,normalize:hb()};const l=Object.keys(e.__compiled__).filter(function(r){return r.length>0&&e.__compiled__[r]}).map(Zse).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${l})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${l})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function EE(e,t,n,o){const s=e.slice(n,o);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=o,this.raw=s,this.text=s,this.url=s}function fl(e,t){if(!(this instanceof fl))return new fl(e,t);t||Kse(e)&&(t=e,e={}),this.__opts__=q8({},TE,t),this.__schemas__=q8({},Gse,e),this.__compiled__={},this.__tlds__=Xse,this.__tlds_replaced__=!1,this.re={},m5(this)}fl.prototype.add=function(t,n){return this.__schemas__[t]=n,m5(this),this};fl.prototype.set=function(t){return this.__opts__=q8(this.__opts__,t),this};fl.prototype.test=function(t){if(!t.length)return!1;let n,o;if(this.re.schema_test.test(t)){for(o=this.re.schema_search,o.lastIndex=0;(n=o.exec(t))!==null;)if(this.testSchemaAt(t,n[2],o.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};fl.prototype.pretest=function(t){return this.re.pretest.test(t)};fl.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0};fl.prototype.match=function(t){const n=[],o=[],s=[],i=[];let l,r,a;function c(f,p){return f?p?f.index!==p.index?f.index=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(a=this.re.schema_search,a.lastIndex=0;(l=a.exec(t))!==null;)r=this.testSchemaAt(t,l[2],a.lastIndex),r&&o.push({schema:l[2],index:l.index+l[1].length,lastIndex:l.index+l[0].length+r});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(a=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,a.lastIndex=0;(l=a.exec(t))!==null;)s.push({schema:"",index:l.index+l[1].length,lastIndex:l.index+l[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(a=this.re.email_fuzzy_global,a.lastIndex=0;(l=a.exec(t))!==null;)i.push({schema:"mailto:",index:l.index+l[1].length,lastIndex:l.index+l[0].length});const u=[0,0,0];let d=0;for(;;){const f=[o[u[0]],i[u[1]],s[u[2]]],p=c(c(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?u[0]++:p===f[1]?u[1]++:u[2]++,p.index{const d=/^xn--/,f=/[^\0-\x7F]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,k=Math.floor,x=String.fromCharCode;function y(D){throw new RangeError(h[D])}function w(D,M){const R=[];let O=D.length;for(;O--;)R[O]=M(D[O]);return R}function _(D,M){const R=D.split("@");let O="";R.length>1&&(O=R[0]+"@",D=R[1]),D=D.replace(p,".");const U=w(D.split("."),M).join(".");return O+U}function A(D){const M=[];let R=0;const O=D.length;for(;R=55296&&U<=56319&&RString.fromCodePoint(...D),z=function(D){return D>=48&&D<58?26+(D-48):D>=65&&D<91?D-65:D>=97&&D<123?D-97:36},L=function(D,M){return D+22+75*(D<26)-((M!=0)<<5)},T=function(D,M,R){let O=0;for(D=R?k(D/700):D>>1,D+=k(D/M);D>m*26>>1;O+=36)D=k(D/m);return k(O+(m+1)*D/(D+38))},I=function(D){const M=[],R=D.length;let O=0,U=128,Z=72,q=D.lastIndexOf("-");q<0&&(q=0);for(let te=0;te=128&&y("not-basic"),M.push(D.charCodeAt(te));for(let te=q>0?q+1:0;te=R&&y("invalid-input");const me=z(D.charCodeAt(te++));me>=36&&y("invalid-input"),me>k((2147483647-O)/se)&&y("overflow"),O+=me*se;const xe=Q<=Z?1:Q>=Z+26?26:Q-Z;if(mek(2147483647/Ye)&&y("overflow"),se*=Ye}const J=M.length+1;Z=T(O-ee,J,ee==0),k(O/J)>2147483647-U&&y("overflow"),U+=k(O/J),O%=J,M.splice(O++,0,U)}return String.fromCodePoint(...M)},N=function(D){const M=[];D=A(D);const R=D.length;let O=128,U=0,Z=72;for(const ee of D)ee<128&&M.push(x(ee));const q=M.length;let te=q;for(q&&M.push("-");te=O&&sek((2147483647-U)/J)&&y("overflow"),U+=(ee-O)*J,O=ee;for(const se of D)if(se2147483647&&y("overflow"),se===O){let Q=U;for(let me=36;;me+=36){const xe=me<=Z?1:me>=Z+26?26:me-Z;if(Q32))return i;if(o===41){if(l===0)break;l--}s++}return t===s||l!==0||(i.str=Z2(e.slice(t,s)),i.pos=s,i.ok=!0),i}var $E=tv;const d4=-2;function eie(e,t,n,o){let s=1,i=t+1;for(;i=0&&t+1>=u)return-1;const d=r.indexOf("]",t+1);if(d<0||d>=a)return e.linkLabelNoCloseFrom=t+1,-1;const f=eie(r,t,a,n);if(f!==d4)return f;for(e.pos=t+1;e.pos=n)return l;let r=e.charCodeAt(i);if(r!==34&&r!==39&&r!==40)return l;t++,i++,r===40&&(r=41),l.marker=r}for(;i=0?e.attrs[n][1]:null}function oie(e,t,n){const o=Rp(e,t);o<0?sv(e,[t,n]):e.attrs[o][1]=`${e.attrs[o][1]} ${n}`}var sie=SE({attrGet:()=>nie,attrIndex:()=>Rp,attrJoin:()=>oie,attrPush:()=>sv,attrSet:()=>tie,parseLinkDestination:()=>tv,parseLinkLabel:()=>nv,parseLinkTitle:()=>ov});function iie(e){return e.includes("\r")||e.includes("\0")}function zE(e){return typeof e=="string"?e:e.toString()}function lie(e){if(e.inlineMode){const t=new Ps("inline","",0);t.content=zE(e.src),t.map=[0,1],t.children=[],t.level=0,e.tokens.push(t)}else e.md&&e.md.block&&e.md.block.parse(e.src,e.md,e.env,e.tokens)}const rie=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,aie=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function cie(e,t){let n=e.pos;const o=e.src;if(o.charCodeAt(n)!==60)return!1;const s=n,i=e.posMax;for(;;){if(++n>=i)return!1;const r=o.charCodeAt(n);if(r===60)return!1;if(r===62)break}const l=o.slice(s+1,n);if(aie.test(l)){const r=e.md.normalizeLink(l);if(!e.md.validateLink(r))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",r]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=l.length+2,!0}if(rie.test(l)){const r=e.md.normalizeLink(`mailto:${l}`);if(!e.md.validateLink(r))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",r]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(l);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=l.length+2,!0}return!1}var BE=cie;function uie(e,t){const n=e.src;let o=e.pos;if(n.charCodeAt(o)!==96)return!1;const s=o;o++;const i=e.posMax;for(;o2&&f.charCodeAt(0)===32&&f.charCodeAt(f.length-1)===32&&(f=f.slice(1,-1)),d.content=f}return e.pos=a,!0}e.backticks[u]=c}return e.backticksScanned=!0,t||(e.pending+=l),e.pos+=r,!0}var RE=uie;function mb(e){const t={},n=e.length;if(!n)return;let o=0,s=-2;const i=[];for(let l=0;la;c-=i[c]+1){const d=e[c];if(d.marker===r.marker&&d.open&&d.end<0){let f=!1;if((d.close||r.open)&&(d.length+r.length)%3===0&&(d.length%3!==0||r.length%3!==0)&&(f=!0),!f){const p=c>0&&!e[c-1].open?i[c-1]+1:0;i[l]=l-c+p,i[c]=p,r.open=!1,d.end=l,d.close=!1,u=-1,s=-2;break}}}u!==-1&&(t[r.marker][(r.open?3:0)+(r.length||0)%3]=u)}}function die(e){const t=e.tokens_meta,n=e.tokens_meta.length;mb(e.delimiters);for(let o=0;o=0;s--){const i=t[s],l=i.marker;if(l!==95&&l!==42||i.end===-1)continue;const r=t[i.end],a=i.token,c=r.token,u=s>0&&t[s-1].end===i.end+1&&t[s-1].marker===l&&t[s-1].token===a-1&&t[i.end+1].token===c+1,d=l===42?PE:FE,f=o[a];u?(f.type="strong_open",f.tag="strong",f.nesting=1,f.markup=d+d,f.content=""):(f.type="em_open",f.tag="em",f.nesting=1,f.markup=d,f.content="");const p=o[c];u?(p.type="strong_close",p.tag="strong",p.nesting=-1,p.markup=d+d,p.content=""):(p.type="em_close",p.tag="em",p.nesting=-1,p.markup=d,p.content=""),u&&(o[t[s-1].token].content="",o[t[i.end+1].token].content="",s--)}}function hie(e){const t=e.tokens_meta,n=e.tokens_meta.length;gb(e,e.delimiters);for(let o=0;o=48&&e<=57}function mie(e){const t=e|32;return iv(e)||t>=97&&t<=102}function OE(e){const t=e|32;return t>=97&&t<=122}function gie(e){return OE(e)||iv(e)}function vie(e,t,n){let o=t+2;if(o>=n)return null;let s=!1,i=7,l=o;for((e.charCodeAt(o)|32)===120&&(s=!0,i=6,o++,l=o);o=n||e.charCodeAt(o)!==59?null:e.slice(t,o+1)}function yie(e,t,n){let o=t+1;if(o>=n||!OE(e.charCodeAt(o)))return null;for(o++;o=n||e.charCodeAt(o)!==59)return null;const s=e.slice(t,o+1);return jE(s)!==s?s:null}function wie(e,t){const n=e.pos,o=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=o)return!1;if(e.src.charCodeAt(n+1)===35){const s=vie(e.src,n,o);if(s){if(!t){const i=(s.charCodeAt(2)|32)===120?Number.parseInt(s.slice(3,-1),16):Number.parseInt(s.slice(2,-1),10),l=e.push("text_special","",0);l.content=zp(i)?U2(i):U2(65533),l.markup=s,l.info="entity"}return e.pos+=s.length,!0}}else{const s=yie(e.src,n,o);if(s){const i=jE(s);if(!t){const l=e.push("text_special","",0);l.content=i,l.markup=s,l.info="entity"}return e.pos+=s.length,!0}}return!1}var HE=wie;const DE=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),Z8=new Array(128),VE=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);Z8[e]=`\\${t}`,VE[e]=DE[e]?t:Z8[e]}function vb(e,t,n){e.pending&&e.pushPending();const o=new Ps("text_special","",0);o.level=e.level,o.content=t,o.markup=n,o.info="escape",e.pendingLevel=e.level,e.tokens.push(o),e.tokens_meta.push(null)}function kie(e,t){let n=e.pos;const o=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=o))return!1;let i=s.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&a<=57343&&n++}return e.pos=n+1,!0}let l=s.charAt(n);if(i>=55296&&i<=56319&&n+1=56320&&a<=57343&&(l+=s.charAt(n+1),n++)}const r=`\\${l}`;return vb(e,i<256&&DE[i]?l:r,r),e.pos=n+1,!0}var WE=kie;function bie(e){let t,n,o=0;const s=e.tokens,i=e.tokens.length;for(t=n=0;t0&&o++,l.type==="text"&&t+1\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,UE="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",xie=new RegExp(`^(?:${qE}|${UE}||<\\?[\\s\\S]*?\\?>|]*>|)`),Sie=new RegExp(`^(?:${qE}|${UE})`);function ZE(e){return e===32||e===9||e===10||e===12||e===13}function Cie(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||ZE(t)}function Mie(e){if(e.length<4||e.charCodeAt(0)!==60||e.charCodeAt(1)!==47||(e.charCodeAt(2)|32)!==97)return!1;for(let t=3;t=97&&t<=122}function Tie(e,t){if(!e.md.options.html)return!1;const n=e.posMax,o=e.pos,s=e.src;if(s.charCodeAt(o)!==60||o+2>=n)return!1;const i=s.charCodeAt(o+1);if(i!==33&&i!==63&&i!==47&&!Aie(i))return!1;const l=s.slice(o).match(xie);if(!l)return!1;const r=l[0];if(!t){const a=e.pushSimple("html_inline","");a.content=r,Cie(r)&&e.linkLevel++,Mie(r)&&e.linkLevel--}return e.pos+=r.length,!0}var KE=Tie;function Eie(e,t){let n,o,s,i,l,r,a,c,u="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,h=g5(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;if(r=$E(e.src,i,e.posMax),r.ok){for(u=e.md.normalizeLink(r.str),e.md.validateLink(u)?i=r.pos:u="",c=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?s=e.src.slice(c,i++):i=h+1):i=h+1,s||(s=e.src.slice(p,h)),l=e.env.references[Np(s)],!l)return e.pos=d,!1;u=l.href,a=l.title}if(!t){o=e.src.slice(p,h);const m=[];e.md.inline.parse(o,e.md,e.env,m);const k=e.push("image","img",0);k.attrs=[["src",u],["alt",""]],k.children=m,k.content=o,a&&k.attrs.push(["title",a])}return e.pos=i,e.posMax=f,!0}var GE=Eie;function Th(e,t,n){for(;t"u")return!1;let d;if(r=l+1,r=0?(d=n.slice(p,h),d||(d=n.slice(i,l)),r=h+1):d=n.slice(i,l)}else d=n.slice(i,l);const f=e.env.references[Np(d)];if(!f)return e.pos=o,!1;a=f.href,c=f.title}if(!t){e.pos=i,e.posMax=l;const d=e.push("link_open","a",1);d.attrs=c?[["href",a],["title",c]]:[["href",a]],e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=r,e.posMax=s,!0}var YE=Iie;function XE(e){const t=e|32;return t>=97&&t<=122}function Lie(e){return e>=48&&e<=57}function $ie(e){return XE(e)||Lie(e)||e===43||e===45||e===46}function Nie(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&$ie(e.charCodeAt(t));)t--;return t++,t>=e.length||!XE(e.charCodeAt(t))?null:e.slice(t)}function zie(e,t,n){let o=t;for(;o0)return!1;const n=e.pos,o=e.posMax;if(n+3>o||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=Nie(e.pending);if(!s)return!1;const i=zie(e.src,n-s.length,o),l=e.md.linkify.matchAtStart(i);if(!l)return!1;let r=l.url;if(r.length<=s.length)return!1;let a=r.length;for(;a>0&&r.charCodeAt(a-1)===42;)a--;a!==r.length&&(r=r.slice(0,a));const c=e.md.normalizeLink(r);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const u=e.push("link_open","a",1);u.attrs=[["href",c]],u.markup="linkify",u.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(r);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=r.length-s.length,!0}function Bie(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const o=e.pending.length-1,s=e.posMax;if(!t)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let i=o-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.pushSimple("hardbreak","br")}else e.pending=e.pending.slice(0,-1),e.pushSimple("softbreak","br");else e.pushSimple("softbreak","br");for(n++;n=s||wb(n.charCodeAt(o)))return!1;let i=o+1;for(;io-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function Oie(e,t){return{chain:e,name:t,calls:0,hits:0,inclusiveMs:0,medianMs:0,maxMs:0,normalCalls:0,normalHits:0,silentCalls:0,silentHits:0,samples:[]}}function tI(e){const t=e;if(!t)return null;if(t.__mdtsRuleProfile)return t.__mdtsRuleProfile;if(!t.__mdtsProfileRules)return null;const n=t.__mdtsProfileRules===!0?{}:t.__mdtsProfileRules,o={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:lv(),records:Object.create(null)};return t.__mdtsRuleProfile=o,o}function cu(e,t,n,o,s,i){const l=tI(e);if(!l)return;const r=`${t}:${n}`,a=l.records[r]??(l.records[r]=Oie(t,n));a.calls++,a.inclusiveMs+=o,o>a.maxMs&&(a.maxMs=o),a.samples.push(o),i?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,l.completedAt=lv()}function Hie(e){const t=tI(e);if(!t)return null;const n=Object.keys(t.records);for(let o=0;os.name===e);o>=0&&this.rules.splice(o,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const o=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(o<0)return;const s=this.rules[o];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(o<0)throw new Error(`Parser rule not found: ${e}`);this.rules[o].fn=t,n?.alt!==void 0&&(this.rules[o].alt=n.alt),this.invalidateCache()}before(e,t,n,o){const s=this.rules.findIndex(l=>l.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(l=>l.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,o){const s=this.rules.findIndex(l=>l.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(l=>l.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled||(this.rules[l].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled&&(this.rules[l].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache.get(t)??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache.get(t)??[]}compileCache(){const e=new Set([""]);for(const o of this.rules)if(o.enabled&&o.alt)for(const s of o.alt)e.add(s);const t=new Map,n=new Map;for(const o of e){const s=[],i=[];for(const l of this.rules)l.enabled&&(o!==""&&!l.alt?.includes(o)||(s.push(l.fn),i.push({name:l.name,fn:l.fn})));t.set(o,s),n.set(o,i)}this.cache=t,this.namedCache=n}},nI=class{src;md;env;tokens;tokens_meta;pos;posMax;level;pending;pendingLevel;cache;delimiters;_prev_delimiters;backticks;backticksScanned;linkLevel;linkLabelNoCloseFrom;maxNesting;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o,this.tokens_meta=new Array(o.length),this.pos=0,this.posMax=e.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0,this.linkLabelNoCloseFrom=-1,this.maxNesting=t.options.maxNesting}pushPending(){const e=new Ps("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}pushSimple(e,t){this.pending&&this.pushPending();const n=new Ps(e,t,0);return n.level=this.level,this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(null),n}push(e,t,n){if(this.pending&&this.pushPending(),n===0)return this.pushSimple(e,t);const o=new Ps(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(s),o}scanDelims(e,t){const{src:n,posMax:o}=this,s=n.charCodeAt(e);let i=e;for(;i0?n.charCodeAt(e-1):32,a=i@[\]\\^_`{}~]/;function bb(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return QE(e,t);case 33:return GE(e,t);case 38:return HE(e,t);case 42:case 95:return U8.tokenize(e,t);case 58:return e.md.options.linkify&&JE(e,t);case 60:return BE(e,t)||KE(e,t);case 91:return YE(e,t);case 92:return WE(e,t);case 96:return RE(e,t);case 126:return K8.tokenize(e,t);default:return eI(e,t)}}function oI(e){return!Die.test(e)}var Vie=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new kb,this.ruler2=new kb,this.ruler.push("text",eI),this.ruler.push("linkify",JE),this.ruler.push("newline",QE),this.ruler.push("escape",WE),this.ruler.push("backticks",RE),this.ruler.push("strikethrough",K8.tokenize),this.ruler.push("emphasis",U8.tokenize),this.ruler.push("link",YE),this.ruler.push("image",GE),this.ruler.push("autolink",BE),this.ruler.push("html_inline",KE),this.ruler.push("entity",HE),this.ruler2.push("balance_pairs",fie),this.ruler2.push("strikethrough",K8.postProcess),this.ruler2.push("emphasis",U8.postProcess),this.ruler2.push("fragments_join",_ie),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),o=n.length,s=e.cache,i=s[t],l=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(i!==void 0){e.pos=i;return}let r=!1;if(e.level=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,r=bb(e,!0),e.level--,r&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;r||e.pos++,s[t]=e.pos}tokenize(e){const t=this.getRules(),n=t.length,o=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const i=this.isDefaultRuleset();for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos")}if(r){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(l){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending()}isDefaultRuleset(){return this.ruler.version===this.defaultRulerVersion&&this.ruler2.version===this.defaultRuler2Version}parseSource(e,t,n,o){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&oI(e)){const a=new Ps("text","",0);a.content=e,o.push(a);return}const s=new nI(e,t,n,o);this.tokenize(s);const i=this.getRules2(),l=i.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a0&&oI(i.content)){const l=new Ps("text","",0);l.content=i.content,i.children.push(l);continue}e.md.inline.parse(i.content,e.md,e.env,i.children)}}}const qie=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,Uie=/[0-9a-z]/i;function Zie(e){return/^\s]/i.test(e)}function Kie(e){return/^<\/a\s*>/i.test(e)}function Gie(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n=0;l--){const r=s[l];if(r.type==="link_close"){for(l--;l>=0&&s[l].level!==r.level&&s[l].type!=="link_open";)l--;continue}if(r.type==="html_inline"&&(Zie(r.content)&&i>0&&i--,Kie(r.content)&&i++),i>0||r.type!=="text"||!e.md.linkify.test(r.content))continue;const a=r.content;let c=(e.md.linkify.match(a)||[]).map(p=>Gie(e.md.linkify,p));if(c.length===0)continue;const u=[];let d=r.level,f=0;c.length>0&&c[0].index===0&&l>0&&s[l-1].type==="text_special"&&(c=c.slice(1));for(let p=0;pf){const A=new Ps("text","",0);A.content=a.slice(f,x),A.level=d,u.push(A)}const y=new Ps("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",u.push(y);const w=new Ps("text","",0);w.content=k,w.level=d,u.push(w);const _=new Ps("link_close","a",-1);_.level=--d,_.markup="linkify",_.info="auto",u.push(_),f=h.lastIndex}if(f!==0){if(f=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(tle,ole)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function ile(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&sI.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function lle(e){if(e.md?.options?.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");ele.test(o)&&sle(n.children||[]),sI.test(o)&&ile(n.children||[])}}var rle=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t){const n=this.rules.findIndex(o=>o.name===e);n>=0&&this.rules.splice(n,1),this.rules.push({name:e,fn:t,enabled:!0}),this.invalidateCache()}at(e,t){const n=this.rules.findIndex(o=>o.name===e);if(n<0)throw new Error(`Parser rule not found: ${e}`);this.rules[n].fn=t,this.invalidateCache()}before(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled||(this.rules[l].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const l=this.rules.findIndex(r=>r.name===i);if(l<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[l].enabled&&(this.rules[l].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){this.cache=this.rules.filter(e=>e.enabled).map(e=>e.fn),this.namedCache=this.rules.filter(e=>e.enabled).map(e=>({name:e.name,fn:e.fn}))}getRules(e=""){return this.cache||this.compileCache(),this.cache}getNamedRules(e=""){return this.namedCache||this.compileCache(),this.namedCache}};const ale=/['"]/,_b=/['"]/g,xb="’";function C3(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function cle(e,t){let n;const o=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let i=0;i=0&&!(o[n].level<=r);n--);if(o.length=n+1,l.type!=="text")continue;let a=l.content,c=0,u=a.length;e:for(;c=0)m=a.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let k=32;if(c=48&&m<=57&&(p=f=!1),f&&p&&(f=x,p=y),!f&&!p){h&&(l.content=C3(l.content,d.index,xb));continue}if(p)for(n=o.length-1;n>=0;n--){let A=o[n];if(o[n].level=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!ale.test(o)||!n.children||cle(n.children,e)}}function dle(e){const t=e.tokens||[],n=t.length;for(let o=0;o=4||s.charCodeAt(u)!==62)return!1;if(o)return!0;const p=[],h=[],m=[],k=[],x=e.md.block.ruler.getRulesForState(e,"blockquote"),y=e.parentType;e.parentType="blockquote";let w=!1,_;for(_=t;_=d)break;if(s.charCodeAt(u++)===62&&!T){let N=a[_]+1,C,F;s.charCodeAt(u)===32?(u++,N++,F=!1,C=!0):s.charCodeAt(u)===9?(C=!0,(c[_]+N)%4===3?(u++,N++,F=!1):F=!0):C=!1;let H=N;for(p.push(i[_]),i[_]=u;u=d,h.push(c[_]),c[_]=a[_]+1+(C?1:0),m.push(a[_]),a[_]=H-N,k.push(r[_]),r[_]=u-i[_];continue}if(w)break;let I=!1;for(let N=0,C=x.length;N";const z=[t,0];P.map=z,e.md.block.tokenize(e,t,_);const L=e.push("blockquote_close","blockquote",-1);L.markup=">",e.lineMax=f,e.parentType=y,z[1]=e.line;for(let T=0;T=4){o++,s=o;continue}break}e.line=s;const i=e.push("code_block","code",0);return i.content=`${e.getLines(t,s,4+e.blkIndent,!1)} +`,i.map=[t,e.line],!0}function vle(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>i)return!1;const l=e.src.charCodeAt(s);if(l!==126&&l!==96)return!1;let r=s;s=e.skipChars(s,l);let a=s-r;if(a<3)return!1;const c=e.src.slice(r,s),u=e.src.slice(s,i);if(l===96&&u.includes(String.fromCharCode(l)))return!1;if(o)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=r=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],s=4)&&(s=e.skipChars(s,l),!(s-r=4)return!1;let u=s.charCodeAt(a);if(u!==35||a>=c)return!1;let d=1;for(u=s.charCodeAt(++a);u===35&&a6||aa&&Mb(s.charCodeAt(f-1))&&(c=f),e.line=t+1;const p=e.push("heading_open",Sb[d],1);p.markup=Cb[d],p.map=[t,e.line];const h=e.push("inline","",0);h.content=s.slice(a,c).trim(),h.map=[t,e.line],h.children=[];const m=e.push("heading_close",Sb[d],-1);return m.markup=Cb[d],!0}function wle(e){switch(e){case 9:case 32:return!0}return!1}function kle(e,t,n,o){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const l=e.src.charCodeAt(i++);if(l!==42&&l!==45&&l!==95)return!1;let r=1;for(;i|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${Sie.source}\\s*$`),/^$/,!1]];function ble(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let l=e.src.slice(s,i),r=0;for(;r<_c.length&&!_c[r][0].test(l);r++);if(r===_c.length)return!1;if(o)return _c[r][2];let a=t+1;if(!_c[r][1].test(l)){for(;a=48&&e<=57}var cI=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];lineFlags=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType="root";level=0;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o;const s=this.src;let i=0,l=0,r=0,a=!1,c=0;for(let u=0,d=s.length;u0&&this.level++,this.tokens.push(o),o}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,o=this.eMarks;for(let s=this.lineMax;et;){const o=n.charCodeAt(--e);if(o!==9&&o!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let o=n.length;en;)if(t!==o.charCodeAt(--e))return e+1;return e}getLines(e,t,n,o){if(e>=t)return"";if(e+1===t){const u=e,d=this.bMarks[u];let f=d;const p=o?this.eMarks[u]+1:this.eMarks[u];let h=0;const m=this.src,k=this.bsCount,x=this.tShift;for(;fn?new Array(h-n+1).join(" ")+m.slice(f,p):m.slice(f,p)}const s=new Array(t-e),i=this.src,l=this.bMarks,r=this.eMarks,a=this.bsCount,c=this.tShift;for(let u=0,d=e;dn?s[u]=new Array(f-n+1).join(" ")+i.slice(h,m):s[u]=i.slice(h,m)}return s.join("")}};cI.prototype.Token=Ps;function xle(e,t,n){for(let o=t;o=s)return!1;const i=n.charCodeAt(o);switch(i){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return i>=48&&i<=57?!0:xle(n,o,s)}const Tb=["","h1","h2"];function Sle(e,t,n){const o=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,i=e.bMarks,l=e.tShift,r=e.eMarks,a=e.sCount,c=e.blkIndent,u=uI(e);if(a[t]-c>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,p,h=t+1;for(;h=A)break;if(a[h]-c>3)continue;if(a[h]>=c&&(p=s.charCodeAt(_),p===45||p===61)){let z=_+1,L=z;for(;z=A){f=p===61?1:2;break}if(L-_>1)continue}if(a[h]<0||u&&!dI(e,h,s,_,A))continue;let P=!1;for(let z=0,L=o.length;z_;){const P=s.charCodeAt(A-1);if(P!==9&&P!==32)break;A--}m=s.slice(_,A)}else m=e.getLines(t,h,c,!1).trim();e.line=h+1;const k=p===61?"=":"-",x=e.push("heading_open",Tb[f],1);x.markup=k,x.map=[t,e.line];const y=e.push("inline","",0);y.content=m,y.map=[t,e.line-1],y.children=[];const w=e.push("heading_close",Tb[f],-1);return w.markup=k,e.parentType=d,!0}function fI(e){switch(e){case 9:case 32:return!0}return!1}function Eb(e,t){const n=e.eMarks,o=e.bMarks,s=e.tShift,i=e.src,l=n[t];let r=o[t]+s[t];const a=i.charCodeAt(r++);return a!==42&&a!==45&&a!==43||r=r)return-1;let c=i.charCodeAt(a++);if(c<48||c>57)return-1;for(;;){if(a>=r)return-1;if(c=i.charCodeAt(a++),c>=48&&c<=57){if(a-l>=10)return-1;continue}if(c===41||c===46)break;return-1}return a0&&++s=4||e.listIndent>=0&&e.sCount[r]-e.listIndent>=4&&e.sCount[r]=e.blkIndent&&(c=!0);let u,d,f;const p=e.src,h=e.bMarks,m=e.tShift,k=e.eMarks,x=e.sCount,y=e.bsCount,w=h[r]+m[r];if(w>=k[r])return!1;const _=p.charCodeAt(w);if(_>=48&&_<=57){if(f=Ib(e,r),f<0||(u=!0,l=w,d=Cle(e,r,f),c&&d!==1))return!1}else if(_===42||_===45||_===43){if(f=Eb(e,r),f<0)return!1;u=!1}else return!1;if(c&&e.skipSpaces(f)>=k[r])return!1;if(o)return!0;const A=p.charCodeAt(f-1),P=String.fromCharCode(A);if(u){const C=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(C.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const z=[r,0];e.tokens[e.tokens.length-1].map=z,e.tokens[e.tokens.length-1].markup=P;let L=!1;const T=e.tokens.length-1,I=e.md.block.ruler.getRulesForState(e,"list"),N=e.parentType;for(e.parentType="list";r=s?D=1:D=F-C,D>4&&(D=1);const M=C+D,R=e.push("list_item_open","li",1);R.markup=P;const O=[r,0];R.map=O,u&&(R.info=f-l-1===1?Mle[p.charCodeAt(l)-48]:p.slice(l,f-1));const U=e.tight,Z=e.tShift[r],q=e.sCount[r],te=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[r]=H-h[r],e.sCount[r]=F,H>=s&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,r,n,!0),(!e.tight||L)&&(a=!1),L=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=te,e.tShift[r]=Z,e.sCount[r]=q,e.tight=U,e.push("list_item_close","li",-1).markup=P,r=e.line,O[1]=r,r>=n||e.sCount[r]=4)break;let ee=!1;for(let J=0,se=I.length;J3||c[f]<0)continue;if(s==="list"&&c[f]>=u){const w=l[f]+r[f],_=a[f];if(w<_){const A=i.charCodeAt(w);if(A===42||A===45||A===43){if(w+1>=_||Lb(i.charCodeAt(w+1)))break}else if(A>=48&&A<=57&&w+1<_){let P=w+1;for(;;){if(P>=_){P=-1;break}const z=i.charCodeAt(P++);if(z>=48&&z<=57){if(P-w>=10){P=-1;break}continue}if((z===41||z===46)&&(P>=_||Lb(i.charCodeAt(P))))break;P=-1;break}if(P>=0)break}}}const k=l[f]+r[f],x=a[f];if(d&&!dI(e,f,i,k,x))continue;let y=!1;for(let w=0,_=o.length;w<_;w++)if(o[w](e,f,n,!0)){y=!0;break}if(y)break}const p=e.getLines(t,f,u,!1).trim();e.line=f;const h=e.push("paragraph_open","p",1);h.map=[t,e.line];const m=e.push("inline","",0);return m.content=p,m.map=[t,e.line],m.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}function M3(e){switch(e){case 9:case 32:return!0}return!1}function Ile(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],l=t+1;const r=e.md.block.ruler.getRulesForState(e,"reference");if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function a(w){const _=e.lineMax;if(w>=_||e.isEmpty(w))return null;let A=!1;if(e.sCount[w]-e.blkIndent>3&&(A=!0),e.sCount[w]<0&&(A=!0),!A){const L=e.parentType;e.parentType="reference";let T=!1;for(let I=0,N=r.length;I"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:x,href:f}),e.line=l),!0):!1}function Eh(e){switch(e){case 9:case 32:return!0}return!1}const Lle=65536;function Ih(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function $le(e,t){if(e.lineFlags)return(e.lineFlags[t]&a2.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];nn)return!1;let s=t+1;if(e.sCount[s]=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;const l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58||i>=e.eMarks[s])return!1;const r=e.src.charCodeAt(i++);if(r!==124&&r!==45&&r!==58&&!Eh(r)||l===45&&Eh(r)||!$le(e,t))return!1;for(;i=4)return!1;c=$b(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==u.length)return!1;if(o)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRulesForState(e,"blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;const k=e.push("thead_open","thead",1);k.map=[t,t+1];const x=e.push("tr_open","tr",1);x.map=[t,t+1];for(let _=0;_=4||(c=$b(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),w+=d-c.length,w>Lle))break;if(s===t+2){const P=e.push("tbody_open","tbody",1);P.map=y=[t+2,0]}const A=e.push("tr_open","tr",1);A.map=[s,s+1];for(let P=0;Pl.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(l=>l.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}after(e,t,n,o){const s=this._rules.findIndex(l=>l.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(l=>l.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache[t]??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache[t]??[]}getRulesForState(e,t){const n=e?.env;return n&&(Object.prototype.hasOwnProperty.call(n,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(n,"__mdtsProfileRules"))?this.getNamedRules(t).map(({name:o,fn:s})=>(i,l,r,a)=>{const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),u=s(i,l,r,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return cu(i?.env,"block",o,d-c,u,!!a),u}):this.getRules(t)}at(e,t,n){const o=this._rules.findIndex(s=>s.name===e);if(o===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[o].fn=t,n?.alt&&(this._rules[o].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const l=this._rules.findIndex(r=>r.name===i);if(l===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[l].enabled||(this._rules[l].enabled=!0,s=!0)}),s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const l=this._rules.findIndex(r=>r.name===i);if(l===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[l].enabled&&(this._rules[l].enabled=!1,s=!0)}),s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this._rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const o of this._rules)if(o.enabled)for(const s of o.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const o of e){const s=[],i=[];for(const l of this._rules)l.enabled&&(o!==""&&!l.alt.includes(o)||(s.push(l.fn),i.push({name:l.name,fn:l.fn})));t[o]=s,n[o]=i}this.cache=t,this.namedCache=n}};const A3=[["table",Nle,["paragraph","reference"]],["code",gle],["fence",vle,["paragraph","reference","blockquote","list"]],["blockquote",mle,["paragraph","reference","blockquote","list"]],["hr",kle,["paragraph","reference","blockquote","list"]],["list",Tle,["paragraph","reference","blockquote"]],["reference",Ile],["html_block",ble,["paragraph","reference","blockquote"]],["heading",yle,["paragraph","reference","blockquote"]],["lheading",Sle],["paragraph",Ele]];var Ble=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new zle;for(let e=0;e=a[u];)u++;if(e.line=u,u>=n||c[u]=i){e.line=n;break}const p=e.line;let h=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}if(!h)throw new Error("none of the block rules matched");e.tight=!d,l[e.line-1]+r[e.line-1]>=a[e.line-1]&&(d=!0),u=e.line,u=a[u]&&(d=!0,u++,e.line=u)}return}const f=this.ruler.getNamedRules("");for(;u=a[u];)u++;if(e.line=u,u>=n||c[u]=i){e.line=n;break}const p=e.line;let h=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}}if(!h)throw new Error("none of the block rules matched");e.tight=!d,l[e.line-1]+r[e.line-1]>=a[e.line-1]&&(d=!0),u=e.line,u=a[u]&&(d=!0,u++,e.line=u)}}parse(e,t,n,o){if(!e||e.length===0)return;const s=new cI(e,t,n,o);this.tokenize(s,s.line,s.lineMax)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}},pI=class{src;env;tokens;inlineMode;md;constructor(e,t,n={}){this.src=typeof e=="string"?e||"":e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}};pI.prototype.Token=Ps;const Nb=[["normalize",Qie],["block",lie],["inline",Wie],["linkify",Yie],["replacements",lle],["smartquotes",ule],["text_join",dle]],Rle={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},Ple={parseLinkLabel:nv,parseLinkDestination:tv,parseLinkTitle:ov};function Fle(){return{...Rle}}function jle(){return{...Ple}}var Ole=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new Ble,this.inline=new Vie,this.ruler=new rle;for(let e=0;e@[\]\\^_`{}~]/;function v5(e){return!Hle.test(e)}function Wd(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function f4(e,t,n){for(let o=t;o3)return v5(e);for(let t=0;t=o||t.charCodeAt(l)!==32)return!1;let r=l+1;for(;rr&&t.charCodeAt(a-1)===32;)a--;let c=a;for(;c>r&&t.charCodeAt(c-1)===35;)c--;if(c>r&&t.charCodeAt(c-1)===32)for(a=c-1;a>r&&t.charCodeAt(a-1)===32;)a--;const u=t.slice(r,a);if(!v5(u))return!1;const d=Vle[i],f=Wle[i],p=jl("heading_open",d,1,0);p.map=[s,s+1],p.markup=f,e.push(p),e.push(rv(u,s,1));const h=jl("heading_close",d,-1,0);return h.markup=f,e.push(h),!0}function Ule(e,t,n){const o=jl("paragraph_open","p",1,0);o.map=[n,n+1],e.push(o),e.push(rv(t,n,1)),e.push(jl("paragraph_close","p",-1,0))}function Zle(e,t,n){const o=e.charCodeAt(n-1);return o===32||o===9?e.slice(t,n).trim():e.slice(t,n)}function zh(e,t){for(;t=1e5?Bb:Nh,s="",i=!1,l=!1,r=0,a=0;for(;r"]/,Rb=/[&<>"]/g,ere=/&/g,tre=/[<>"]/g,nre={"&":"&","<":"<",">":">",'"':"""};function Bh(e){return nre[e]||e}function ko(e){if(e.length===0)return"";if(e.length<32)return Qle.test(e)?e.replace(Rb,Bh):e;const t=e.includes("&"),n=e.includes("<"),o=e.includes(">"),s=e.includes('"');return!t&&!n&&!o&&!s?e:t&&!n&&!o&&!s?e.replace(ere,"&"):t?e.replace(Rb,Bh):e.replace(tre,Bh)}const ore=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),sre=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function hI(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(ore,(t,n,o)=>{if(n)return n;if(sre.test(o)){const i=o[1].toLowerCase()==="x"?Number.parseInt(o.slice(2),16):Number.parseInt(o.slice(1),10);return zp(i)?U2(i):"�"}const s=Ug(t);return s!==t?s:t})}const ire=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,lre=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,rre=/"/g;function Uc(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function y5(e,t,n){for(let o=t;o=e.length||e.charCodeAt(t)===10?!1:!y5(e,t,Uc(e,t))}function Pb(e,t,n){return t+2=n||e.charCodeAt(s)!==32)return null;let i=s+1;for(;ii&&e.charCodeAt(l-1)===32;)l--;let r=l;for(;r>i&&e.charCodeAt(r-1)===35;)r--;if(r>i&&e.charCodeAt(r-1)===32)for(l=r-1;l>i&&e.charCodeAt(l-1)===32;)l--;const a=av(e.slice(i,l));return a===null?null:`${a} +`}function Fb(e,t,n){return t+1" `;case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return null}return`
    5. ${e[t]}
    6. -`}function dre(e,t,n){const o=t+2;if(n===o+1)return ure(e,o);const s=rv(e.slice(t+2,n));return s===null?null:`
    7. ${s}
    8. -`}function fre(e,t,n){for(;tt;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let o=n;for(let s=t;s`:"
      ",o.lang=i,o.open=d),{html:`${d}${ko(u)}
      -`,nextPos:c=25e4,i=[],l={lang:null,open:""};let r="",a="",c="",u="";for(;n -`;_ -`,r=x,a=y}let w=T3(e,k);for(;w${k}

      -`,c=p,u=h}const m=de.core.parse(t,n,e).tokens);let l=p4(t,s);if(s.maxChunks&&l.length>s.maxChunks&&(l=yre(l,s.maxChunks)),h4(t,l))return Ah(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),au(n,i,()=>e.core.parse(t,n,e).tokens);let r=0;const a=[];return Ah(n,{count:l.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:i||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!i}),au(n,i,()=>{for(let c=0;c=3&&(u?u.marker===w&&A>=u.length&&(u=null):u={marker:w,length:A})}}const k=h-f;s+=k,i+=1,r+=1,m?(a=0,c=0):(a+=1,c+=k);const x=m;if((s>=t.maxChunkChars||i>=t.maxChunkLines)&&!u)if(x)d(h);else{const y=Math.max(10,Math.floor(t.maxChunkLines*.5)),w=Math.max(t.maxChunkChars,8e3);(a>=y||c>=w)&&d(h)}f=h}return n&&d(e.length),o}function h4(e,t,n={rangesCoverWholeSource:!0}){const o=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;se.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let o=n+1;o=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function vre(e,t){for(let n=0;n=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function Fa(e){return e.length===0?0:ns(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Cre(e,t,n){for(let o=t;o=3&&(n?n.marker===l&&a>=n.length&&(n=null):n={marker:l,length:a})}o=s===e.length?e.length:s+1}return n!==null}function Are(e,t){if(e.length===0||e.charCodeAt(e.length-1)!==10)return!1;let n=e.length-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;return Cre(e,n+1,e.length-1)?!Mre(e,t):!1}function Tre(e,t,n,o={}){const s=o.mode??"full",i=o.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(o.maxChunkChars!==void 0||o.maxChunkLines!==void 0||o.autoTune===!1){const l=o.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??_re:e.options.fullChunkSizeChars??kre),r=o.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??xre:e.options.fullChunkSizeLines??bre);return{maxChunkChars:l,maxChunkLines:r,holdBelowChars:l,holdBelowLines:r,fenceAware:i}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:i}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:i}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}}var bf=class{md;options;pending="";tokens=[];committedChars=0;committedLines=0;fedChunks=0;parsedChunks=0;globalStateEnv=null;markedGlobalStateReason=null;constructor(e,t={}){if(this.md=e,this.options={mode:"full",autoTune:!0,retainTokens:!0,...t},this.options.retainTokens===!1&&!this.options.onChunkTokens)throw new Error("UnboundedBuffer with retainTokens=false requires onChunkTokens")}feed(e){e&&(this.pending+=e,this.fedChunks+=1)}flushAvailable(e={}){if(!this.pending)return null;const t=this.resolveWindow(),n=Fa(this.pending);if(this.pending.length=o||n>=s}function wI(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??mI))return"yes";const o=e.options.autoUnboundedThresholdLines??gI;return n!==void 0?n>=o?"yes":"no":t+1e.core.parse(t,n,e).tokens);const i=[],l=new bf(e,{mode:"full",...o,retainTokens:!1,onChunkTokens(r){vI(i,r)}});if(s&&Jg(n,s),l.feed(t),l.flushForce(n),s&&(Qg(n),o.fallbackOnGlobalState===!1)){const r=ea(n)?.unbounded;r&&(r.globalStateDetected=s,r.globalStateFallbackDisabled=!0)}return i}const uu=(e,t,n)=>en?n:e;function kI(e){return e.experimental?{...e,...e.experimental}:e}const Ob=[{max:5e3,strategy:"discrete",maxChunkChars:32e3,maxChunkLines:150,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:24e3,maxChunkLines:200,maxChunks:12,notes:"<=20k"},{max:1e5,strategy:"plain",notes:"<=100k plain"},{max:2e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:150,maxChunks:12,notes:"<=200k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=5M"}],Hb=[{max:5e3,strategy:"discrete",maxChunkChars:16e3,maxChunkLines:250,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=20k"},{max:1e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=100k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=5M"}];function bI(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function Nre(e,t=Math.max(0,e/40|0),n={}){const o=kI(n),s=o.fullChunkFenceAware??!0,i=o.fullChunkTargetChunks??8,l=o.fullChunkAdaptive!==!1;for(let r=0;r5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:l?{strategy:"adaptive",maxChunkChars:uu(Math.ceil(e/i),8e3,64e3),maxChunkLines:uu(Math.ceil(t/i),150,700),maxChunks:uu(Math.ceil(e/64e3),i,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.fullChunkSizeChars??1e4,maxChunkLines:o.fullChunkSizeLines??200,fenceAware:s,maxChunks:o.fullChunkMaxChunks}}function Db(e,t=Math.max(0,e/40|0),n={}){const o=kI(n),s=o.streamChunkFenceAware??!0,i=o.streamChunkTargetChunks??8,l=o.streamChunkAdaptive!==!1;for(let r=0;r5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:l?{strategy:"adaptive",maxChunkChars:uu(Math.ceil(e/i),8e3,64e3),maxChunkLines:uu(Math.ceil(t/i),150,700),maxChunks:uu(Math.ceil(e/64e3),i,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.streamChunkSizeChars??1e4,maxChunkLines:o.streamChunkSizeLines??200,maxChunks:o.streamChunkMaxChunks,fenceAware:s}}var zre={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]},inline2:{rules:["balance_pairs","emphasis","fragments_join"]}}},Bre={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Rre={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"]},inline2:{rules:["balance_pairs","fragments_join"]}}};function Pp(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function m4(e,t){if(Pp(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const Vb=e=>Pp(e)?e:Promise.resolve(e);function u2(e){switch(e){case"alt":case"class":case"href":case"id":case"lang":case"rel":case"src":case"start":case"style":case"target":case"title":return e;default:return ko(e)}}function w1(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${u2(t[0])}="${ko(t[1])}"`;for(let o=1;o=e.length)return{langName:e,langAttrs:""};let n=t;for(;n${s} +`}function pre(e,t,n){for(;tt;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let o=n;for(let s=t;s`:"
      ",o.lang=i,o.open=d),{html:`${d}${ko(u)}
      +`,nextPos:c=25e4,i=[],l={lang:null,open:""};let r="",a="",c="",u="";for(;n +`;_ +`,r=x,a=y}let w=T3(e,k);for(;w${k}

      +`,c=p,u=h}const m=de.core.parse(t,n,e).tokens);let l=p4(t,s);if(s.maxChunks&&l.length>s.maxChunks&&(l=wre(l,s.maxChunks)),h4(t,l))return Ah(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),au(n,i,()=>e.core.parse(t,n,e).tokens);let r=0;const a=[];return Ah(n,{count:l.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:i||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!i}),au(n,i,()=>{for(let c=0;c=3&&(u?u.marker===w&&A>=u.length&&(u=null):u={marker:w,length:A})}}const k=h-f;s+=k,i+=1,r+=1,m?(a=0,c=0):(a+=1,c+=k);const x=m;if((s>=t.maxChunkChars||i>=t.maxChunkLines)&&!u)if(x)d(h);else{const y=Math.max(10,Math.floor(t.maxChunkLines*.5)),w=Math.max(t.maxChunkChars,8e3);(a>=y||c>=w)&&d(h)}f=h}return n&&d(e.length),o}function h4(e,t,n={rangesCoverWholeSource:!0}){const o=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;se.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let o=n+1;o=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function yre(e,t){for(let n=0;n=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function Fa(e){return e.length===0?0:ns(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Mre(e,t,n){for(let o=t;o=3&&(n?n.marker===l&&a>=n.length&&(n=null):n={marker:l,length:a})}o=s===e.length?e.length:s+1}return n!==null}function Tre(e,t){if(e.length===0||e.charCodeAt(e.length-1)!==10)return!1;let n=e.length-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;return Mre(e,n+1,e.length-1)?!Are(e,t):!1}function Ere(e,t,n,o={}){const s=o.mode??"full",i=o.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(o.maxChunkChars!==void 0||o.maxChunkLines!==void 0||o.autoTune===!1){const l=o.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??xre:e.options.fullChunkSizeChars??bre),r=o.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??Sre:e.options.fullChunkSizeLines??_re);return{maxChunkChars:l,maxChunkLines:r,holdBelowChars:l,holdBelowLines:r,fenceAware:i}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:i}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:i}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}}var bf=class{md;options;pending="";tokens=[];committedChars=0;committedLines=0;fedChunks=0;parsedChunks=0;globalStateEnv=null;markedGlobalStateReason=null;constructor(e,t={}){if(this.md=e,this.options={mode:"full",autoTune:!0,retainTokens:!0,...t},this.options.retainTokens===!1&&!this.options.onChunkTokens)throw new Error("UnboundedBuffer with retainTokens=false requires onChunkTokens")}feed(e){e&&(this.pending+=e,this.fedChunks+=1)}flushAvailable(e={}){if(!this.pending)return null;const t=this.resolveWindow(),n=Fa(this.pending);if(this.pending.length=o||n>=s}function kI(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??gI))return"yes";const o=e.options.autoUnboundedThresholdLines??vI;return n!==void 0?n>=o?"yes":"no":t+1e.core.parse(t,n,e).tokens);const i=[],l=new bf(e,{mode:"full",...o,retainTokens:!1,onChunkTokens(r){yI(i,r)}});if(s&&Qg(n,s),l.feed(t),l.flushForce(n),s&&(ev(n),o.fallbackOnGlobalState===!1)){const r=ea(n)?.unbounded;r&&(r.globalStateDetected=s,r.globalStateFallbackDisabled=!0)}return i}const uu=(e,t,n)=>en?n:e;function bI(e){return e.experimental?{...e,...e.experimental}:e}const Hb=[{max:5e3,strategy:"discrete",maxChunkChars:32e3,maxChunkLines:150,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:24e3,maxChunkLines:200,maxChunks:12,notes:"<=20k"},{max:1e5,strategy:"plain",notes:"<=100k plain"},{max:2e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:150,maxChunks:12,notes:"<=200k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=5M"}],Db=[{max:5e3,strategy:"discrete",maxChunkChars:16e3,maxChunkLines:250,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=20k"},{max:1e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=100k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=5M"}];function _I(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function zre(e,t=Math.max(0,e/40|0),n={}){const o=bI(n),s=o.fullChunkFenceAware??!0,i=o.fullChunkTargetChunks??8,l=o.fullChunkAdaptive!==!1;for(let r=0;r5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:l?{strategy:"adaptive",maxChunkChars:uu(Math.ceil(e/i),8e3,64e3),maxChunkLines:uu(Math.ceil(t/i),150,700),maxChunks:uu(Math.ceil(e/64e3),i,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.fullChunkSizeChars??1e4,maxChunkLines:o.fullChunkSizeLines??200,fenceAware:s,maxChunks:o.fullChunkMaxChunks}}function Vb(e,t=Math.max(0,e/40|0),n={}){const o=bI(n),s=o.streamChunkFenceAware??!0,i=o.streamChunkTargetChunks??8,l=o.streamChunkAdaptive!==!1;for(let r=0;r5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:l?{strategy:"adaptive",maxChunkChars:uu(Math.ceil(e/i),8e3,64e3),maxChunkLines:uu(Math.ceil(t/i),150,700),maxChunks:uu(Math.ceil(e/64e3),i,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.streamChunkSizeChars??1e4,maxChunkLines:o.streamChunkSizeLines??200,maxChunks:o.streamChunkMaxChunks,fenceAware:s}}var Bre={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]},inline2:{rules:["balance_pairs","emphasis","fragments_join"]}}},Rre={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Pre={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"]},inline2:{rules:["balance_pairs","fragments_join"]}}};function Pp(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function m4(e,t){if(Pp(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const Wb=e=>Pp(e)?e:Promise.resolve(e);function u2(e){switch(e){case"alt":case"class":case"href":case"id":case"lang":case"rel":case"src":case"start":case"style":case"target":case"title":return e;default:return ko(e)}}function w1(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${u2(t[0])}="${ko(t[1])}"`;for(let o=1;o=e.length)return{langName:e,langAttrs:""};let n=t;for(;n${t} `;const i=e.attrIndex("class"),l=e.attrs?e.attrs.slice():[],r=`${s.langPrefix??"language-"}${o}`;return i<0?l.push(["class",r]):(l[i]=l[i].slice(),l[i][1]+=` ${r}`),`
      ${t}
      `}return`
      ${t}
      -`}function K2(e){return!e.attrs||e.attrs.length===0?`${ko(e.content)}`:`${ko(e.content)}`}function K8(e){const t=ko(e.content);return e.attrs?`${t} +`}function K2(e){return!e.attrs||e.attrs.length===0?`${ko(e.content)}`:`${ko(e.content)}`}function G8(e){const t=ko(e.content);return e.attrs?`${t} `:`
      ${t}
      -`}function Pre(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

      `;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function Wb(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function Fre(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function qb(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function k5(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const jre={langPrefix:"language-",xhtmlOut:!1,breaks:!1},E3=Object.prototype.hasOwnProperty,oo={code_inline(e,t){return K2(e[t])},code_block(e,t){return K8(e[t])},fence(e,t,n,o,s){const i=e[t],l=i.info?pI(i.info).trim():"",{langName:r,langAttrs:a}=_I(l),c=n.highlight,u=ko(i.content);if(!c)return d2(i,u,l,r,n);const d=c(i.content,r,a);return Pp(d)?d.then(f=>d2(i,f||u,l,r,n)):d2(i,d||u,l,r,n)},image(e,t,n,o,s){const i=e[t],l=s.renderInlineAsText(i.children||[],n,o),r=i.attrIndex("alt");return r>=0&&i.attrs?i.attrs[r][1]=l:i.attrs?i.attrs.push(["alt",l]):i.attrs=[["alt",l]],k5(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
      +`}function Fre(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

      `;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function qb(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function jre(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function Ub(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function k5(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const Ore={langPrefix:"language-",xhtmlOut:!1,breaks:!1},E3=Object.prototype.hasOwnProperty,oo={code_inline(e,t){return K2(e[t])},code_block(e,t){return G8(e[t])},fence(e,t,n,o,s){const i=e[t],l=i.info?hI(i.info).trim():"",{langName:r,langAttrs:a}=xI(l),c=n.highlight,u=ko(i.content);if(!c)return d2(i,u,l,r,n);const d=c(i.content,r,a);return Pp(d)?d.then(f=>d2(i,f||u,l,r,n)):d2(i,d||u,l,r,n)},image(e,t,n,o,s){const i=e[t],l=s.renderInlineAsText(i.children||[],n,o),r=i.attrIndex("alt");return r>=0&&i.attrs?i.attrs[r][1]=l:i.attrs?i.attrs.push(["alt",l]):i.attrs=[["alt",l]],k5(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
      `:`
      `},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
      `:`
      `:` -`},text(e,t){return ko(e[t].content)},text_special(e,t){return ko(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function Ub(e,t,n){const o=e.info?pI(e.info).trim():"",{langName:s,langAttrs:i}=_I(o),l=t.highlight,r=ko(e.content);if(!l)return d2(e,r,o,s,t);const a=l(e.content,s,i);if(Pp(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return d2(e,a||r,o,s,t)}function Rh(e,t,n,o){switch(e.type){case"text":return t.text===oo.text?e.content.length===0?"":ko(e.content):null;case"text_special":return t.text_special===oo.text_special?e.content.length===0?"":ko(e.content):null;case"softbreak":return t.softbreak===oo.softbreak?o:null;case"hardbreak":return t.hardbreak===oo.hardbreak?n:null;case"html_inline":return t.html_inline===oo.html_inline?e.content:null;case"code_inline":return t.code_inline===oo.code_inline?K2(e):null;default:return null}}function Ore(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===oo.text)return i.content.length===0?"":ko(i.content);break;case"text_special":if(s.text_special===oo.text_special)return i.content.length===0?"":ko(i.content);break;case"softbreak":if(s.softbreak===oo.softbreak)return t.breaks?t.xhtmlOut?`
      +`},text(e,t){return ko(e[t].content)},text_special(e,t){return ko(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function Zb(e,t,n){const o=e.info?hI(e.info).trim():"",{langName:s,langAttrs:i}=xI(o),l=t.highlight,r=ko(e.content);if(!l)return d2(e,r,o,s,t);const a=l(e.content,s,i);if(Pp(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return d2(e,a||r,o,s,t)}function Rh(e,t,n,o){switch(e.type){case"text":return t.text===oo.text?e.content.length===0?"":ko(e.content):null;case"text_special":return t.text_special===oo.text_special?e.content.length===0?"":ko(e.content):null;case"softbreak":return t.softbreak===oo.softbreak?o:null;case"hardbreak":return t.hardbreak===oo.hardbreak?n:null;case"html_inline":return t.html_inline===oo.html_inline?e.content:null;case"code_inline":return t.code_inline===oo.code_inline?K2(e):null;default:return null}}function Hre(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===oo.text)return i.content.length===0?"":ko(i.content);break;case"text_special":if(s.text_special===oo.text_special)return i.content.length===0?"":ko(i.content);break;case"softbreak":if(s.softbreak===oo.softbreak)return t.breaks?t.xhtmlOut?`
      `:`
      `:` `;break;case"hardbreak":if(s.hardbreak===oo.hardbreak)return t.xhtmlOut?`
      `:`
      -`;break;case"html_inline":if(s.html_inline===oo.html_inline)return i.content;break;case"code_inline":if(s.code_inline===oo.code_inline)return K2(i);break}const l=s[i.type];if(!l)return k5(i,t.xhtmlOut===!0);const r=l(e,0,t,n,o);return typeof r=="string"?r:m4(r,i.type)}var Hre=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...oo}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,l=o.xhtmlOut===!0;let r,a,c,u,d,f,p="",h="",m=!1,k="";for(let x=0;x0&&e[x-1].hidden?` -`:"";if(w==="list_item_open"&&(!y.attrs||y.attrs.length===0)&&x+3${this.renderInlineTokens(L.children||[],o,s)}`,x+=3;continue}}if(x+2 +`;break;case"html_inline":if(s.html_inline===oo.html_inline)return i.content;break;case"code_inline":if(s.code_inline===oo.code_inline)return K2(i);break}const l=s[i.type];if(!l)return k5(i,t.xhtmlOut===!0);const r=l(e,0,t,n,o);return typeof r=="string"?r:m4(r,i.type)}var Dre=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...oo}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,l=o.xhtmlOut===!0;let r,a,c,u,d,f,p="",h="",m=!1,k="";for(let x=0;x0&&e[x-1].hidden?` +`:"";if(w==="list_item_open"&&(!y.attrs||y.attrs.length===0)&&x+3${this.renderInlineTokens(L.children||[],o,s)}`,x+=3;continue}}if(x+2 `,x+=2;continue}}}if(w==="inline"){const z=y.children||[];if(z.length===1){m||(r=i.text,a=i.text_special,c=i.softbreak,u=i.hardbreak,d=i.html_inline,f=i.code_inline,p=o.xhtmlOut?`
      `:`
      `,h=o.breaks?p:` @@ -619,120 +619,120 @@ ${l} `;continue;case"td_open":k+=`${_}`;continue;case"td_close":k+=` `;continue;case"th_open":k+=`${_}`;continue;case"th_close":k+=` `;continue}else if(z.length===1){const L=z[0];if(w==="ordered_list_open"&&L[0]==="start"){k+=`${_}

        -`;continue}if(w==="td_open"&&L[0]==="style"){k+=`${_}`;continue}if(w==="th_open"&&L[0]==="style"){k+=`${_}`;continue}}}k+=this.renderToken(e,x,o);continue}if(w==="code_block"&&A===oo.code_block){k+=K8(y);continue}if(w==="fence"&&A===oo.fence){k+=Ub(y,o);continue}if(w==="html_block"&&A===oo.html_block){k+=y.content;continue}const P=A(e,x,o,s,this);typeof P=="string"?k+=P:k+=m4(P,y.type)}return k}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let l="";for(let r=0;r0&&e[t-1].hidden?` +`;continue}if(w==="td_open"&&L[0]==="style"){k+=`${_}`;continue}if(w==="th_open"&&L[0]==="style"){k+=`${_}`;continue}}}k+=this.renderToken(e,x,o);continue}if(w==="code_block"&&A===oo.code_block){k+=G8(y);continue}if(w==="fence"&&A===oo.fence){k+=Zb(y,o);continue}if(w==="html_block"&&A===oo.html_block){k+=y.content;continue}const P=A(e,x,o,s,this);typeof P=="string"?k+=P:k+=m4(P,y.type)}return k}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let l="";for(let r=0;r0&&e[t-1].hidden?` `:"",u=a?`> -`:">";if(!r||r.length===0)return i===0?n.xhtmlOut?`${c}<${l} /${u}`:`${c}<${l}${u}`:i===-1?`${c}(n||(n={...t}),n);if(E3.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),E3.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(E3.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(E3.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...jre,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===oo.code_block)return K8(t);if(i==="html_block"&&s.html_block===oo.html_block)return t.content;const l=this.mergeOptions(n),r=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],l,r);const a=s[i];if(!a)return t.block?this.renderToken(e,0,l):k5(t,l.xhtmlOut===!0);if(i==="fence"&&a===oo.fence)return Ub(t,l);const c=a(e,0,l,r,this);return typeof c=="string"?c:m4(c,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Ore(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
        +`:">";if(!r||r.length===0)return i===0?n.xhtmlOut?`${c}<${l} /${u}`:`${c}<${l}${u}`:i===-1?`${c}(n||(n={...t}),n);if(E3.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),E3.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(E3.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(E3.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...Ore,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===oo.code_block)return G8(t);if(i==="html_block"&&s.html_block===oo.html_block)return t.content;const l=this.mergeOptions(n),r=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],l,r);const a=s[i];if(!a)return t.block?this.renderToken(e,0,l):k5(t,l.xhtmlOut===!0);if(i==="fence"&&a===oo.fence)return Zb(t,l);const c=a(e,0,l,r,this);return typeof c=="string"?c:m4(c,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Hre(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
        `:`
        `,l=t.breaks?i:` -`,r=o.text,a=o.text_special,c=o.softbreak,u=o.hardbreak,d=o.html_inline,f=o.code_inline,p=o.link_open,h=o.link_close,m=o.em_open,k=o.em_close,x=o.strong_open,y=o.strong_close;let w="";for(let _=0;_`;if(c===oo.softbreak&&_+3`,_+=1;continue}if(A.type==="em_open"&&!m&&!k&&_+2${E}`,_+=2;continue}}}if(A.type==="strong_open"&&!x&&!y&&_+2${E}`,_+=2;continue}}}switch(A.type){case"text":if(r===oo.text){const L=A.content.length===0?"":ko(A.content);if(d===oo.html_inline&&_+1=4)return!0;continue}if(r===9){if(l+=4-l%4,i++,l>=4)return!0;continue}break}if(i0&&c<=6){if(a=3)return!0;break}default:if(r>=48&&r<=57){let a=i+1;for(;a57)break;a++}if(a=xe,!X&&Ye!==void 0&&(at=ns(e),X=at>=Ye)),X){const F=this.parseFullDocument(e,j,n,at,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(j,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ea(j)?.unbounded}),F.tokens}else if(O){const F=(be,Se,je)=>beje?je:be;at===void 0&&(at=ns(e));const K=se&&!J?Db(e.length,at,n.options):null,he=K?.maxChunkChars??(U?F(Math.ceil(e.length/Z),8e3,64e3):q??1e4),ye=K?.maxChunkLines??(U?F(Math.ceil(at/Z),150,700):te??200),ve=K?.maxChunks??(U?F(Math.ceil(e.length/64e3),Z,32):ee),ie=e.length>0&&e.charCodeAt(e.length-1)===10,de=R&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&K?.strategy!=="plain";if((M||de)&&(e.length>=he*2||at>=ye*2)&&ie){const be=w5(n,e,j,{maxChunkChars:he,maxChunkLines:ye,fenceAware:K?.fenceAware??Q,maxChunks:ve});return this.cache={src:e,tokens:be,env:j,lineCount:at,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,at),this.recordChunkedParseResult(j,M?"explicit-initial-large-doc":"default-initial-large-doc"),be}}const oe=this.parseFullDocument(e,j,n,at);return at=oe.lineCount,this.cache={src:e,tokens:oe.tokens,env:j,lineCount:at,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,at),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(j,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ea(j)?.unbounded}),oe.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",bs(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let l=s.globalStateReason;l===void 0&&(l=Oi(s.src),s.globalStateReason=l);const r=l?null:i!==null?this.detectGlobalStateForAppend(s,i):Oi(e),a=l||r;if(a){const j=o??s.env;_a(j);const H=Oi(e),D=this.parseFullDocument(e,j,n),M=D.tokens,R=D.lineCount;return this.cache={src:e,tokens:M,env:j,lineCount:R,lastSegment:void 0,globalStateReason:H},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(j,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ea(j)?.unbounded}),M}const c=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?H=8:u.length>1e3?H=6:u.length>200&&(H=4),H=Math.min(H,j);let D=null;const M=n.options?.streamContextParseStrategy??"chars",R=n.options?.streamContextParseMinChars??200,O=n.options?.streamContextParseMinLines??2;let U;const Z=()=>(U===void 0&&(U=ns(u)),U),q=this.canDirectlyParseAppend(s),te=q&&this.shouldUseUnboundedAppend(e,s,u);let ee=!1;if(!q)switch(M){case"lines":ee=Z()>=O;break;case"constructs":if(u.length>=R){ee=!0;break}if(Wre(u)){ee=!0;break}ee=Z()>=O;break;case"chars":default:ee=u.length>=R}if(H>0&&ee){const Q=this.getTailLines(s.src,H)+u;try{const me=this.core.parse(Q,s.env,n).tokens,xe=me.findIndex(Ye=>Ye.map&&typeof Ye.map[1]=="number"&&Ye.map[1]>H);if(xe!==-1){const Ye=me.slice(xe),at=j-H;at!==0&&this.shiftTokenLines(Ye,at),D={tokens:Ye}}}catch{D=null}}else D=null;if(!D){const Q=j;if(te)D={tokens:c2(n,u,s.env,{mode:"stream"})},Q>0&&this.shiftTokenLines(D.tokens,Q);else{const me=this.core.parse(u,s.env,n);Q>0&&this.shiftTokenLines(me.tokens,Q),D=me}}let J=0;if(s.tokens.length>0&&D.tokens.length>0){const Q=s.tokens[s.tokens.length-1],me=D.tokens[0];try{Q.type==="inline"&&me.type==="inline"&&(me.children&&me.children.length>0&&(Q.children||(Q.children=[]),this.appendTokens(Q.children,me.children)),Q.content=(Q.content||"")+(me.content||""),J=1)}catch{J=0}}const se=s.tokens.length;if(D.tokens.length>J){const Q=s.tokens,me=D.tokens,xe=Math.min(Q.length,me.length-J);let Ye=0;for(let at=xe;at>0;at--){let X=!0;for(let oe=0;oe0&&(J+=Ye),me.length>J&&this.appendTokens(s.tokens,me,J)}if(s.src=e,s.globalStateReason=null,s.lineCount=j+(U??Z()),s.tokens.length>se){const Q=this.getLastSegment(s.tokens,e,se,s.tokens.length,e.length-u.length,j);Q?s.lastSegment=Q:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,te&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",bs(s.env,{area:"stream",path:te?"stream-unbounded-append":"stream-append",reason:te?"large-delta":"safe-append",unbounded:te}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",bs(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,h=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,k=!p&&!u&&h,x=m||k,y=n.options?.streamChunkAdaptive!==!1,w=n.options?.streamChunkTargetChunks??8,_=n.options?.streamChunkSizeChars,A=n.options?.streamChunkSizeLines,P=n.options?.streamChunkMaxChunks,z=!!n.__explicitStreamChunkConfig,L=n.options?.autoTuneChunks!==!1,E=n.options?.streamChunkFenceAware??!0;let T=u&&s.lineCount!==void 0?s.lineCount+ns(u):void 0;if(x){T===void 0&&(T=ns(e));const j=(Z,q,te)=>Zte?te:Z,H=L&&!z?Db(e.length,T,n.options):null,D=H?.maxChunkChars??(y?j(Math.ceil(e.length/w),8e3,64e3):_??1e4),M=H?.maxChunkLines??(y?j(Math.ceil(T/w),150,700):A??200),R=H?.maxChunks??(y?j(Math.ceil(e.length/64e3),w,32):P),O=e.length>0&&e.charCodeAt(e.length-1)===10,U=k&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&H?.strategy!=="plain";if((m||U)&&(e.length>=D*2||T>=M*2)&&O){const Z=w5(n,e,d,{maxChunkChars:D,maxChunkLines:M,fenceAware:H?.fenceAware??E,maxChunks:R});return this.cache={src:e,tokens:Z,env:d,lineCount:T,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,T),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),Z}}const $=this.parseFullDocument(e,d,n,T),C=$.tokens;return T=$.lineCount,this.cache={src:e,tokens:C,env:d,lineCount:T,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,T),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ea(d)?.unbounded}),C}recordChunkedParseResult(e,t){const n=ea(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",bs(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!ea(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",bs(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=Oi(e);wf(t)&&_a(t);const l=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?wI(n,e.length,o):"no";if(l==="yes"){const a=c2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?ns(e):0)}}let r=o;if(l==="need-lines"&&(r=ns(e),yI(n,e.length,r))){const a=c2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:r}}return r===void 0&&(r=s?ns(e):0),{tokens:au(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:r}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:ns(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` +`,r=o.text,a=o.text_special,c=o.softbreak,u=o.hardbreak,d=o.html_inline,f=o.code_inline,p=o.link_open,h=o.link_close,m=o.em_open,k=o.em_close,x=o.strong_open,y=o.strong_close;let w="";for(let _=0;_`;if(c===oo.softbreak&&_+3`,_+=1;continue}if(A.type==="em_open"&&!m&&!k&&_+2${T}`,_+=2;continue}}}if(A.type==="strong_open"&&!x&&!y&&_+2${T}`,_+=2;continue}}}switch(A.type){case"text":if(r===oo.text){const L=A.content.length===0?"":ko(A.content);if(d===oo.html_inline&&_+1=4)return!0;continue}if(r===9){if(l+=4-l%4,i++,l>=4)return!0;continue}break}if(i0&&c<=6){if(a=3)return!0;break}default:if(r>=48&&r<=57){let a=i+1;for(;a57)break;a++}if(a=xe,!X&&Ye!==void 0&&(at=ns(e),X=at>=Ye)),X){const j=this.parseFullDocument(e,F,n,at,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(F,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ea(F)?.unbounded}),j.tokens}else if(O){const j=(be,Se,je)=>beje?je:be;at===void 0&&(at=ns(e));const K=se&&!J?Vb(e.length,at,n.options):null,he=K?.maxChunkChars??(U?j(Math.ceil(e.length/Z),8e3,64e3):q??1e4),ye=K?.maxChunkLines??(U?j(Math.ceil(at/Z),150,700):te??200),ve=K?.maxChunks??(U?j(Math.ceil(e.length/64e3),Z,32):ee),ie=e.length>0&&e.charCodeAt(e.length-1)===10,de=R&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&K?.strategy!=="plain";if((M||de)&&(e.length>=he*2||at>=ye*2)&&ie){const be=w5(n,e,F,{maxChunkChars:he,maxChunkLines:ye,fenceAware:K?.fenceAware??Q,maxChunks:ve});return this.cache={src:e,tokens:be,env:F,lineCount:at,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,at),this.recordChunkedParseResult(F,M?"explicit-initial-large-doc":"default-initial-large-doc"),be}}const oe=this.parseFullDocument(e,F,n,at);return at=oe.lineCount,this.cache={src:e,tokens:oe.tokens,env:F,lineCount:at,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,at),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(F,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ea(F)?.unbounded}),oe.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",bs(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let l=s.globalStateReason;l===void 0&&(l=Oi(s.src),s.globalStateReason=l);const r=l?null:i!==null?this.detectGlobalStateForAppend(s,i):Oi(e),a=l||r;if(a){const F=o??s.env;_a(F);const H=Oi(e),D=this.parseFullDocument(e,F,n),M=D.tokens,R=D.lineCount;return this.cache={src:e,tokens:M,env:F,lineCount:R,lastSegment:void 0,globalStateReason:H},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(F,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ea(F)?.unbounded}),M}const c=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?H=8:u.length>1e3?H=6:u.length>200&&(H=4),H=Math.min(H,F);let D=null;const M=n.options?.streamContextParseStrategy??"chars",R=n.options?.streamContextParseMinChars??200,O=n.options?.streamContextParseMinLines??2;let U;const Z=()=>(U===void 0&&(U=ns(u)),U),q=this.canDirectlyParseAppend(s),te=q&&this.shouldUseUnboundedAppend(e,s,u);let ee=!1;if(!q)switch(M){case"lines":ee=Z()>=O;break;case"constructs":if(u.length>=R){ee=!0;break}if(qre(u)){ee=!0;break}ee=Z()>=O;break;case"chars":default:ee=u.length>=R}if(H>0&&ee){const Q=this.getTailLines(s.src,H)+u;try{const me=this.core.parse(Q,s.env,n).tokens,xe=me.findIndex(Ye=>Ye.map&&typeof Ye.map[1]=="number"&&Ye.map[1]>H);if(xe!==-1){const Ye=me.slice(xe),at=F-H;at!==0&&this.shiftTokenLines(Ye,at),D={tokens:Ye}}}catch{D=null}}else D=null;if(!D){const Q=F;if(te)D={tokens:c2(n,u,s.env,{mode:"stream"})},Q>0&&this.shiftTokenLines(D.tokens,Q);else{const me=this.core.parse(u,s.env,n);Q>0&&this.shiftTokenLines(me.tokens,Q),D=me}}let J=0;if(s.tokens.length>0&&D.tokens.length>0){const Q=s.tokens[s.tokens.length-1],me=D.tokens[0];try{Q.type==="inline"&&me.type==="inline"&&(me.children&&me.children.length>0&&(Q.children||(Q.children=[]),this.appendTokens(Q.children,me.children)),Q.content=(Q.content||"")+(me.content||""),J=1)}catch{J=0}}const se=s.tokens.length;if(D.tokens.length>J){const Q=s.tokens,me=D.tokens,xe=Math.min(Q.length,me.length-J);let Ye=0;for(let at=xe;at>0;at--){let X=!0;for(let oe=0;oe0&&(J+=Ye),me.length>J&&this.appendTokens(s.tokens,me,J)}if(s.src=e,s.globalStateReason=null,s.lineCount=F+(U??Z()),s.tokens.length>se){const Q=this.getLastSegment(s.tokens,e,se,s.tokens.length,e.length-u.length,F);Q?s.lastSegment=Q:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,te&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",bs(s.env,{area:"stream",path:te?"stream-unbounded-append":"stream-append",reason:te?"large-delta":"safe-append",unbounded:te}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",bs(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,h=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,k=!p&&!u&&h,x=m||k,y=n.options?.streamChunkAdaptive!==!1,w=n.options?.streamChunkTargetChunks??8,_=n.options?.streamChunkSizeChars,A=n.options?.streamChunkSizeLines,P=n.options?.streamChunkMaxChunks,z=!!n.__explicitStreamChunkConfig,L=n.options?.autoTuneChunks!==!1,T=n.options?.streamChunkFenceAware??!0;let I=u&&s.lineCount!==void 0?s.lineCount+ns(u):void 0;if(x){I===void 0&&(I=ns(e));const F=(Z,q,te)=>Zte?te:Z,H=L&&!z?Vb(e.length,I,n.options):null,D=H?.maxChunkChars??(y?F(Math.ceil(e.length/w),8e3,64e3):_??1e4),M=H?.maxChunkLines??(y?F(Math.ceil(I/w),150,700):A??200),R=H?.maxChunks??(y?F(Math.ceil(e.length/64e3),w,32):P),O=e.length>0&&e.charCodeAt(e.length-1)===10,U=k&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&H?.strategy!=="plain";if((m||U)&&(e.length>=D*2||I>=M*2)&&O){const Z=w5(n,e,d,{maxChunkChars:D,maxChunkLines:M,fenceAware:H?.fenceAware??T,maxChunks:R});return this.cache={src:e,tokens:Z,env:d,lineCount:I,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,I),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),Z}}const N=this.parseFullDocument(e,d,n,I),C=N.tokens;return I=N.lineCount,this.cache={src:e,tokens:C,env:d,lineCount:I,lastSegment:void 0,globalStateReason:Oi(e)},this.updateCacheLineCount(this.cache,I),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",bs(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ea(d)?.unbounded}),C}recordChunkedParseResult(e,t){const n=ea(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",bs(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!ea(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",bs(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=Oi(e);wf(t)&&_a(t);const l=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?kI(n,e.length,o):"no";if(l==="yes"){const a=c2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?ns(e):0)}}let r=o;if(l==="need-lines"&&(r=ns(e),wI(n,e.length,r))){const a=c2(n,e,t);return bs(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:r}}return r===void 0&&(r=s?ns(e):0),{tokens:au(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:r}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:ns(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` `))return null;const o=n??t.slice(e.length);if(!o)return null;const s=o.length;if(o.charCodeAt(s-1)!==10)return null;let i=0,l=-1;for(let a=0;a=2));a++);if(i<2)return null;const r=(l===-1?o:o.slice(0,l)).trim();if(r.length===0)return null;if(/^[-=]+$/.test(r)){const a=e.slice(0,-1),c=a.lastIndexOf(` `);if(a.slice(c+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(o)?null:o}tryTailSegmentReparse(e,t,n,o){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const i=t.src.slice(0,s.srcOffset);if(!e.startsWith(i))return null;const l=t.src.slice(s.srcOffset),r=e.slice(s.srcOffset);if(r===l)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const c=this.tryContainerTailAppendMerge(e,t,n,o,s,a);if(c)return c}if(this.mayContainReferenceDefinition(l)||this.mayContainReferenceDefinition(r))return null;try{const c=this.core.parse(r,n,o),u=this.getLastSegment(c.tokens,r);return s.lineStart>0&&this.shiftTokenLines(c.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,c.tokens),t.lineCount=s.lineStart+ns(r),u?t.lastSegment={tokenStart:s.tokenStart+u.tokenStart,tokenEnd:s.tokenStart+u.tokenEnd,lineStart:s.lineStart+u.lineStart,lineEnd:s.lineStart+u.lineEnd,srcOffset:s.srcOffset+u.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let o=e.length-1;o>=0;o--)if(e.charCodeAt(o)===10&&(n--,n===0))return e.slice(o+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,o=e.slice(n),s=o.length;let i=null,l=0;for(;l<=s;){let r=o.indexOf(` -`,l);r===-1&&(r=s);let a=l;for(;a=3&&(i?i.marker===c&&d>=i.length&&(i=null):i={marker:c,length:d})}}if(r===s)break;l=r+1}return i!==null}peek(){return this.cache?.tokens??Vre}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sPh?n.slice(n.length-Ph):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let l=Number.POSITIVE_INFINITY,r=-1,a=0;for(let c=o-1;c>=n;c--){const u=e[c];if(u.map&&(u.map[0]r&&(r=u.map[1])),u.nesting<0){a+=-u.nesting;continue}if(u.nesting>0){if(a-=u.nesting,u.level===0&&a<=0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(u.level===0&&a===0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` +`,l);r===-1&&(r=s);let a=l;for(;a=3&&(i?i.marker===c&&d>=i.length&&(i=null):i={marker:c,length:d})}}if(r===s)break;l=r+1}return i!==null}peek(){return this.cache?.tokens??Wre}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sPh?n.slice(n.length-Ph):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let l=Number.POSITIVE_INFINITY,r=-1,a=0;for(let c=o-1;c>=n;c--){const u=e[c];if(u.map&&(u.map[0]r&&(r=u.map[1])),u.nesting<0){a+=-u.nesting;continue}if(u.nesting>0){if(a-=u.nesting,u.level===0&&a<=0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(u.level===0&&a===0){const d=Number.isFinite(l)?l:u.map?.[0]??0,f=r>=d?r:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` `,i+1),i===-1)return e.length;s--}return i+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let o=n,s=t-1;for(;o>0;){if(s=e.indexOf(` `,s+1),s===-1)return e.length;o--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,o,s,i){if(!i||this.mayContainReferenceDefinition(i))return null;const l=t.tokens[s.tokenStart];switch(l?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,o,s,i,l);case"table_open":return this.tryTableTailAppendMerge(e,t,n,o,s,i,l);default:return null}}tryListTailAppendMerge(e,t,n,o,s,i,l){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const r=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(r0&&this.shiftTokenLines(d,f);const p=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,l.level),h=this.getListParagraphMode(u,0,u.length,0);(p==="loose"||h==="loose"||this.endsWithBlankLine(t.src)||(u[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,l.level,!1),this.setListParagraphVisibility(d,0,d.length,l.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const m=f+ns(i);t.lineCount=m;const k=this.getDocLineCount(e,m);return l.map&&(l.map[1]=k),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:k,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,o,s,i,l){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(i))return null;const r=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(r=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(h.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(h,m);const k=p.tbodyCloseIndex>=0?p.tbodyCloseIndex:p.tableCloseIndex,x=t.lineCount??ns(t.src);t.tokens.splice(k,0,...h),t.src=e,t.env=n,t.globalStateReason=null;const y=x+ns(i);t.lineCount=y;const w=this.getDocLineCount(e,y);if(l.map&&(l.map[1]=w),p.tbodyOpenIndex>=0){const _=t.tokens[p.tbodyOpenIndex];_?.map&&(_.map[1]=w)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:w,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` `);if(t<0)return null;const n=e.indexOf(` -`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let r=n-1;r>t;r--){const a=e[r];if(a.type==="table_close"&&a.level===o){s=r;break}}if(s<0)return null;let i=-1,l=-1;for(let r=t+1;r=0){for(let r=s-1;r>i;r--){const a=e[r];if(a.type==="tbody_close"&&a.level===o+1){l=r;break}}if(l<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:l}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let l=0;for(let r=0;r0&&r0||a.nesting<0)&&(l+=a.nesting)}return l===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const l=o+2;for(let r=t;r=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=ns(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let l=i.children.length-1;l>=0;l--)n.push(i.children[l])}}}}};const Kb={default:Bre,zero:Rre,commonmark:zre};function Kre(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Gre(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function Gb(e){return e.experimental?{...e,...e.experimental}:e}function $l(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function Yb(e,t,n){for(let o=0;o=4?n.quotes=[L[0],L[1],L[2],L[3]]:n.quotes=["“","”","‘","’"]}let l=Yb(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),r=Yb(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=Xb(i?.options,s,"fullChunkedFallback"),c=Xb(i?.options,s,"streamChunkedFallback"),u=!1,d=null,f=null;const p=new jle;let h=null;const m=()=>(h||(h=new Dre(n)),h);let k=null;const x=()=>(k||(k=new Zre(p)),k);let y=null;const w=()=>(y||(y=new EE),y),_=L=>!u&&!!d&&!Gre(L,d),A=(L,E)=>o==="default"&&!u&&h===null&&f!==null&&L.parse===f&&_(L)&&!L.stream.enabled&&E<(L.options.autoUnboundedThresholdChars??4e6)&&L.options.html===!1&&L.options.xhtmlOut===!1&&L.options.breaks===!1&&L.options.langPrefix==="language-"&&L.options.linkify===!1&&L.options.typographer===!1&&L.options.highlight===null,P=(L,E)=>o==="default"&&!u&&_(L)&&!L.stream.enabled&&!L.options.fullChunkedFallback&&E<(L.options.autoUnboundedThresholdChars??4e6)&&L.options.html===!1&&L.options.linkify===!1&&L.options.typographer===!1,z={core:p,block:p.block,inline:p.inline,get linkify(){const L=w();return Object.defineProperty(this,"linkify",{value:L,writable:!0,configurable:!0}),L},get renderer(){const L=m();return Object.defineProperty(this,"renderer",{value:L,writable:!0,configurable:!0}),L},options:n,__explicitFullChunkConfig:l,__explicitStreamChunkConfig:r,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:c,__canUseImplicitLargeInputStrategy(){return _(this)},set(L){const E=Gb(L);return this.options={...this.options,...E},($l(L,"fullChunkSizeChars")||$l(L,"fullChunkSizeLines")||$l(L,"fullChunkMaxChunks"))&&(l=!0,this.__explicitFullChunkConfig=!0),($l(L,"streamChunkSizeChars")||$l(L,"streamChunkSizeLines")||$l(L,"streamChunkMaxChunks"))&&(r=!0,this.__explicitStreamChunkConfig=!0),$l(L,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),$l(L,"streamChunkedFallback")&&(c=!0,this.__explicitStreamChunkFallbackSetting=!0),h&&h.set(E),typeof E.stream=="boolean"&&(this.stream.enabled=E.stream,k&&(k.reset(),k.resetStats())),this},configure(L){const E=typeof L=="string"?Kb[L]:L;if(!E)throw new Error("Wrong `markdown-it` preset, can't be empty");if(E.options&&this.set(E.options),E.components){const T=E.components;T.core?.rules&&this.core.ruler.enableOnly(T.core.rules),T.block?.rules&&this.block.ruler.enableOnly(T.block.rules),T.inline?.rules&&this.inline.ruler.enableOnly(T.inline.rules),T.inline2?.rules&&this.inline.ruler2.enableOnly(T.inline2.rules)}return this},enable(L,E){const T=Array.isArray(L)?L:[L],$=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const j of $){if(!j)continue;const H=j.enable(T,!0);for(let D=0;D!C.has(H));if(j.length)throw new Error(`Rules manager: invalid rule name ${j.join(", ")}`)}return this},disable(L,E){const T=Array.isArray(L)?L:[L],$=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const j of $){if(!j)continue;const H=j.disable(T,!0);for(let D=0;D!C.has(H));if(j.length)throw new Error(`Rules manager: invalid rule name ${j.join(", ")}`)}return this},use(L,...E){const T=typeof L=="function"?L:L&&typeof L.default=="function"?L.default:void 0;if(!T)throw new TypeError("MarkdownIt.use: plugin must be a function");const $=[this,...E],C=L;return u=!0,T.apply(C,$),this},render(L,E){let T;if(A(this,L.length)){E!==void 0&&(xi(E),T=Mh("render"));const j=T?xc():0,H=T?jb(L,T):Fb(L);if(T&&(T.attemptMs=xc()-j,H===null&&(T.fallbackReason="unsupported-stock-subset"),Sd(E,T)),H!==null)return E!==void 0&&bs(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const $=E??{},C=this.parse(L,$);return T&&Sd($,T),m().render(C,this.options,$)},async renderAsync(L,E){let T;if(A(this,L.length)){E!==void 0&&(xi(E),T=Mh("render"));const j=T?xc():0,H=T?jb(L,T):Fb(L);if(T&&(T.attemptMs=xc()-j,H===null&&(T.fallbackReason="unsupported-stock-subset"),Sd(E,T)),H!==null)return E!==void 0&&bs(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const $=E??{},C=this.parse(L,$);return T&&Sd($,T),m().renderAsync(C,this.options,$)},renderIterable(L,E={}){const T=this.parseIterable(L,E);return m().render(T,this.options,E)},async renderAsyncIterable(L,E={}){const T=await this.parseAsyncIterable(L,E);return m().renderAsync(T,this.options,E)},renderInline(L,E={}){const T=this.parseInline(L,E);return m().render(T,this.options,E)},validateLink:iI,normalizeLink:lI,normalizeLinkText:rI,utils:mse,helpers:{...oie},parse(L,E){if(typeof L!="string")throw new TypeError("Input data should be a String");if(E!==void 0&&xi(E),P(this,L.length)){const j=E===void 0?void 0:Mh("parse"),H=j?xc():0,D=Xle(L,j);if(j&&(j.attemptMs=xc()-H,D===null&&(j.fallbackReason="unsupported-stock-subset"),Sd(E,j)),D!==null)return E!==void 0&&bs(E,{area:"parse",path:"stock-fast",reason:"stock-subset"}),D}const T=E??{};let $;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&_(this)){const j=wI(this,L.length);if(j==="yes"){const H=c2(this,L,T);return bs(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),H}j==="need-lines"&&($=ns(L))}if(!this.stream.enabled){const j=L.length,H=this.options.autoTuneChunks!==!1,D=l,M=!a&&_(this),R=!!this.options.fullChunkedFallback,O=M&&j>=2e5;let U;(R||O||$!==void 0)&&(U=$??ns(L));const Z=(R||O)&&H&&!D?Nre(j,U,this.options):null;if(R||O){const q=U??0;if(R?j>=(this.options.fullChunkThresholdChars??2e4)||q>=(this.options.fullChunkThresholdLines??400):O){if(Z&&Z.strategy!=="plain"){const te=w5(this,L,T,{maxChunkChars:Z.maxChunkChars,maxChunkLines:Z.maxChunkLines,fenceAware:Z.fenceAware,maxChunks:Z.maxChunks});return E&&Jb(E,R?"explicit-full-chunk":"default-large-string"),te}if(R){const te=(X,oe,F)=>XF?F:X,ee=this.options.fullChunkAdaptive!==!1,J=this.options.fullChunkTargetChunks??8,se=te(Math.ceil(j/J),8e3,64e3),Q=te(Math.ceil(q/J),150,700),me=ee?se:this.options.fullChunkSizeChars??1e4,xe=ee?Q:this.options.fullChunkSizeLines??200,Ye=ee?te(Math.ceil(j/64e3),J,32):this.options.fullChunkMaxChunks,at=w5(this,L,T,{maxChunkChars:me,maxChunkLines:xe,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:Ye});return E&&Jb(E,"explicit-full-chunk"),at}}}if($!==void 0&&_(this)&&yI(this,j,U??$)){const q=c2(this,L,T);return bs(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),q}}const C=Oi(L);return bs(E,{area:"parse",path:"plain",reason:"default-plain"}),au(T,C,()=>p.parse(L,T,this).tokens)},parseIterable(L,E={}){return xi(E),Ere(this,L,E)},parseAsyncIterable(L,E={}){return xi(E),Ire(this,L,E)},parseIterableToSink(L,E,T={}){return xi(T),Lre(this,L,E,T)},parseAsyncIterableToSink(L,E,T={}){return xi(T),$re(this,L,E,T)},parseInline(L,E={}){if(typeof L!="string")throw new TypeError("Input data should be a String");xi(E),wf(E)&&_a(E);const T=p.createState(L,E,this);return T.inlineMode=!0,p.process(T),T.tokens}};if(z.stream={enabled:!!n.stream,parse(L,E){return z.stream.enabled?x().parse(L,E,z):z.parse(L,E??{})},reset(){x().reset()},peek(){return k?k.peek():[]},stats(){return k?k.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){k&&k.resetStats()}},i?.components){const L=i.components;L.core?.rules&&z.core.ruler.enableOnly(L.core.rules),L.block?.rules&&z.block.ruler.enableOnly(L.block.rules),L.inline?.rules&&z.inline.ruler.enableOnly(L.inline.rules),L.inline2?.rules&&z.inline.ruler2.enableOnly(L.inline2.rules)}return d=Kre(z),f=z.parse,z}var Xre=Yre;const SI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Jre=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],CI=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],Qre=["svg","g","path"],eae=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],tae=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],nae=["action","data","href","src","srcset","poster","xlink:href","formaction"],oae=["script"],sae=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],k1=new Set(SI),MI=new Set(CI),G2=new Set([...SI,...Jre,...CI,...Qre]),AI=new Set([...G2,...eae]),iae=new Set(tae),lae=new Set(nae),_f=new Set(oae),TI=new Set(sae);function EI(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const rae={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function II(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const l=Number.parseInt(i,n?10:16);try{return Number.isFinite(l)?String.fromCodePoint(l):""}catch{return""}}return rae[String(s??"").toLowerCase()]??t})}const I3=new Set(["http","https","mailto","tel"]),aae=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),t0=new Set(["http","https"]);function LI(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const cae=/^https?:\/\//i;function uae(e){if(!cae.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function dae(e,t,n){if(!f2(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function f2(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function fae(e,t){return t==="href"||t==="xlink:href"?f2(e,t)?I3:t0:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?t0:(f2(e,t),I3)}function $0(e,t={}){if(uae(e))return!1;const n=EI(II(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const l=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!l:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=LI(n);return i?i==="file"?!dae(n,o,s):f2(o,s)?aae.has(i):!fae(o,s).has(i):!1}function pae(e){const t=II(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=LI(EI(t).toLowerCase());return n==="http"||n==="https"}function hae(e,t={}){const n=String(e??"").trim();return n?$0(n,t)?"":n:""}function Qb(e){return hae(e,{tagName:"img",attrName:"src"})}function mae(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,p,h,m,k){return f[p].nesting===1&&f[p].attrJoin("class",t),k.renderToken(f,p,h,m,k)}n=n||{};const i=3,l=n.marker||":",r=l.charCodeAt(0),a=l.length,c=n.validate||o,u=n.render||s;function d(f,p,h,m){let k,x=!1,y=f.bMarks[p]+f.tShift[p],w=f.eMarks[p];if(r!==f.src.charCodeAt(y))return!1;for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);const _=Math.floor((k-y)/a);if(_=h||(y=f.bMarks[z]+f.tShift[z],w=f.eMarks[z],y=4)){for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);if(!(Math.floor((k-y)/a)<_)&&(k-=(k-y)%a,k=f.skipSpaces(k),!(k=2){const l=Number(i[0]),r=Number(i[1]);Number.isFinite(l)&&Number.isFinite(r)&&(s.map=[l+t,Math.min(r+t,n)])}Array.isArray(s.children)&&$I(s.children,t,n)}}function vae(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(mae,t,{render(n,o){return n[o].nesting===1?`
        `:`
        -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,l=i.bMarks[n]+i.tShift[n],r=i.eMarks[n],a=i.src.slice(l,r),c=a.match(/^:::\s*([^\s{]+)/);if(!c)return!1;const u=c[1];if(!u.trim())return!1;const d=a.slice(c[0].length).trim();let f,p;const h=d.indexOf("{"),m=h>=0?d.slice(h).trimStart():void 0;if(h===-1)f=d||void 0;else{if(f=d.slice(0,h).trim()||void 0,m?.startsWith("{")){let P=0,z=-1;for(let L=0;L0&&(p=m.slice(0,z))}p||(f=d||void 0)}if(s)return!0;const k=!!i.env.__markstreamFinal;let x=n+1,y=!1;for(;x<=o;){const P=i.bMarks[x]+i.tShift[x],z=i.eMarks[x];if(i.src.slice(P,z).trim()===":::"){y=!0;break}x++}y||(x=o);const w=i.push("vmr_container_open","div",1);if(w.attrSet("class",`vmr-container vmr-container-${u}`),w.map=[n,y?x:o],w.meta={...w.meta??{},unclosed:!y&&!k},f&&w.attrSet("data-args",f),p)try{const P=JSON.parse(p);for(const[z,L]of Object.entries(P)){const E=L!=null&&typeof L=="object";w.attrSet(`data-${z}`,E?JSON.stringify(L):String(L))}}catch{const P=gae(p);if(P)for(const[z,L]of Object.entries(P)){const E=L!=null&&typeof L=="object";w.attrSet(`data-${z}`,E?JSON.stringify(L):String(L))}else w.attrSet("data-attrs",p)}const _=[];for(let P=n+1;PP.trim().length>0)){let P=_.join(` +`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let r=n-1;r>t;r--){const a=e[r];if(a.type==="table_close"&&a.level===o){s=r;break}}if(s<0)return null;let i=-1,l=-1;for(let r=t+1;r=0){for(let r=s-1;r>i;r--){const a=e[r];if(a.type==="tbody_close"&&a.level===o+1){l=r;break}}if(l<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:l}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let l=0;for(let r=0;r0&&r0||a.nesting<0)&&(l+=a.nesting)}return l===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const l=o+2;for(let r=t;r=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=ns(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let l=i.children.length-1;l>=0;l--)n.push(i.children[l])}}}}};const Gb={default:Rre,zero:Pre,commonmark:Bre};function Gre(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Yre(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function Yb(e){return e.experimental?{...e,...e.experimental}:e}function $l(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function Xb(e,t,n){for(let o=0;o=4?n.quotes=[L[0],L[1],L[2],L[3]]:n.quotes=["“","”","‘","’"]}let l=Xb(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),r=Xb(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=Jb(i?.options,s,"fullChunkedFallback"),c=Jb(i?.options,s,"streamChunkedFallback"),u=!1,d=null,f=null;const p=new Ole;let h=null;const m=()=>(h||(h=new Vre(n)),h);let k=null;const x=()=>(k||(k=new Kre(p)),k);let y=null;const w=()=>(y||(y=new IE),y),_=L=>!u&&!!d&&!Yre(L,d),A=(L,T)=>o==="default"&&!u&&h===null&&f!==null&&L.parse===f&&_(L)&&!L.stream.enabled&&T<(L.options.autoUnboundedThresholdChars??4e6)&&L.options.html===!1&&L.options.xhtmlOut===!1&&L.options.breaks===!1&&L.options.langPrefix==="language-"&&L.options.linkify===!1&&L.options.typographer===!1&&L.options.highlight===null,P=(L,T)=>o==="default"&&!u&&_(L)&&!L.stream.enabled&&!L.options.fullChunkedFallback&&T<(L.options.autoUnboundedThresholdChars??4e6)&&L.options.html===!1&&L.options.linkify===!1&&L.options.typographer===!1,z={core:p,block:p.block,inline:p.inline,get linkify(){const L=w();return Object.defineProperty(this,"linkify",{value:L,writable:!0,configurable:!0}),L},get renderer(){const L=m();return Object.defineProperty(this,"renderer",{value:L,writable:!0,configurable:!0}),L},options:n,__explicitFullChunkConfig:l,__explicitStreamChunkConfig:r,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:c,__canUseImplicitLargeInputStrategy(){return _(this)},set(L){const T=Yb(L);return this.options={...this.options,...T},($l(L,"fullChunkSizeChars")||$l(L,"fullChunkSizeLines")||$l(L,"fullChunkMaxChunks"))&&(l=!0,this.__explicitFullChunkConfig=!0),($l(L,"streamChunkSizeChars")||$l(L,"streamChunkSizeLines")||$l(L,"streamChunkMaxChunks"))&&(r=!0,this.__explicitStreamChunkConfig=!0),$l(L,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),$l(L,"streamChunkedFallback")&&(c=!0,this.__explicitStreamChunkFallbackSetting=!0),h&&h.set(T),typeof T.stream=="boolean"&&(this.stream.enabled=T.stream,k&&(k.reset(),k.resetStats())),this},configure(L){const T=typeof L=="string"?Gb[L]:L;if(!T)throw new Error("Wrong `markdown-it` preset, can't be empty");if(T.options&&this.set(T.options),T.components){const I=T.components;I.core?.rules&&this.core.ruler.enableOnly(I.core.rules),I.block?.rules&&this.block.ruler.enableOnly(I.block.rules),I.inline?.rules&&this.inline.ruler.enableOnly(I.inline.rules),I.inline2?.rules&&this.inline.ruler2.enableOnly(I.inline2.rules)}return this},enable(L,T){const I=Array.isArray(L)?L:[L],N=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const F of N){if(!F)continue;const H=F.enable(I,!0);for(let D=0;D!C.has(H));if(F.length)throw new Error(`Rules manager: invalid rule name ${F.join(", ")}`)}return this},disable(L,T){const I=Array.isArray(L)?L:[L],N=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],C=new Set;for(const F of N){if(!F)continue;const H=F.disable(I,!0);for(let D=0;D!C.has(H));if(F.length)throw new Error(`Rules manager: invalid rule name ${F.join(", ")}`)}return this},use(L,...T){const I=typeof L=="function"?L:L&&typeof L.default=="function"?L.default:void 0;if(!I)throw new TypeError("MarkdownIt.use: plugin must be a function");const N=[this,...T],C=L;return u=!0,I.apply(C,N),this},render(L,T){let I;if(A(this,L.length)){T!==void 0&&(xi(T),I=Mh("render"));const F=I?xc():0,H=I?Ob(L,I):jb(L);if(I&&(I.attemptMs=xc()-F,H===null&&(I.fallbackReason="unsupported-stock-subset"),Sd(T,I)),H!==null)return T!==void 0&&bs(T,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const N=T??{},C=this.parse(L,N);return I&&Sd(N,I),m().render(C,this.options,N)},async renderAsync(L,T){let I;if(A(this,L.length)){T!==void 0&&(xi(T),I=Mh("render"));const F=I?xc():0,H=I?Ob(L,I):jb(L);if(I&&(I.attemptMs=xc()-F,H===null&&(I.fallbackReason="unsupported-stock-subset"),Sd(T,I)),H!==null)return T!==void 0&&bs(T,{area:"render",path:"stock-fast",reason:"stock-subset"}),H}const N=T??{},C=this.parse(L,N);return I&&Sd(N,I),m().renderAsync(C,this.options,N)},renderIterable(L,T={}){const I=this.parseIterable(L,T);return m().render(I,this.options,T)},async renderAsyncIterable(L,T={}){const I=await this.parseAsyncIterable(L,T);return m().renderAsync(I,this.options,T)},renderInline(L,T={}){const I=this.parseInline(L,T);return m().render(I,this.options,T)},validateLink:lI,normalizeLink:rI,normalizeLinkText:aI,utils:gse,helpers:{...sie},parse(L,T){if(typeof L!="string")throw new TypeError("Input data should be a String");if(T!==void 0&&xi(T),P(this,L.length)){const F=T===void 0?void 0:Mh("parse"),H=F?xc():0,D=Jle(L,F);if(F&&(F.attemptMs=xc()-H,D===null&&(F.fallbackReason="unsupported-stock-subset"),Sd(T,F)),D!==null)return T!==void 0&&bs(T,{area:"parse",path:"stock-fast",reason:"stock-subset"}),D}const I=T??{};let N;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&_(this)){const F=kI(this,L.length);if(F==="yes"){const H=c2(this,L,I);return bs(T,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),H}F==="need-lines"&&(N=ns(L))}if(!this.stream.enabled){const F=L.length,H=this.options.autoTuneChunks!==!1,D=l,M=!a&&_(this),R=!!this.options.fullChunkedFallback,O=M&&F>=2e5;let U;(R||O||N!==void 0)&&(U=N??ns(L));const Z=(R||O)&&H&&!D?zre(F,U,this.options):null;if(R||O){const q=U??0;if(R?F>=(this.options.fullChunkThresholdChars??2e4)||q>=(this.options.fullChunkThresholdLines??400):O){if(Z&&Z.strategy!=="plain"){const te=w5(this,L,I,{maxChunkChars:Z.maxChunkChars,maxChunkLines:Z.maxChunkLines,fenceAware:Z.fenceAware,maxChunks:Z.maxChunks});return T&&Qb(T,R?"explicit-full-chunk":"default-large-string"),te}if(R){const te=(X,oe,j)=>Xj?j:X,ee=this.options.fullChunkAdaptive!==!1,J=this.options.fullChunkTargetChunks??8,se=te(Math.ceil(F/J),8e3,64e3),Q=te(Math.ceil(q/J),150,700),me=ee?se:this.options.fullChunkSizeChars??1e4,xe=ee?Q:this.options.fullChunkSizeLines??200,Ye=ee?te(Math.ceil(F/64e3),J,32):this.options.fullChunkMaxChunks,at=w5(this,L,I,{maxChunkChars:me,maxChunkLines:xe,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:Ye});return T&&Qb(T,"explicit-full-chunk"),at}}}if(N!==void 0&&_(this)&&wI(this,F,U??N)){const q=c2(this,L,I);return bs(T,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),q}}const C=Oi(L);return bs(T,{area:"parse",path:"plain",reason:"default-plain"}),au(I,C,()=>p.parse(L,I,this).tokens)},parseIterable(L,T={}){return xi(T),Ire(this,L,T)},parseAsyncIterable(L,T={}){return xi(T),Lre(this,L,T)},parseIterableToSink(L,T,I={}){return xi(I),$re(this,L,T,I)},parseAsyncIterableToSink(L,T,I={}){return xi(I),Nre(this,L,T,I)},parseInline(L,T={}){if(typeof L!="string")throw new TypeError("Input data should be a String");xi(T),wf(T)&&_a(T);const I=p.createState(L,T,this);return I.inlineMode=!0,p.process(I),I.tokens}};if(z.stream={enabled:!!n.stream,parse(L,T){return z.stream.enabled?x().parse(L,T,z):z.parse(L,T??{})},reset(){x().reset()},peek(){return k?k.peek():[]},stats(){return k?k.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){k&&k.resetStats()}},i?.components){const L=i.components;L.core?.rules&&z.core.ruler.enableOnly(L.core.rules),L.block?.rules&&z.block.ruler.enableOnly(L.block.rules),L.inline?.rules&&z.inline.ruler.enableOnly(L.inline.rules),L.inline2?.rules&&z.inline.ruler2.enableOnly(L.inline2.rules)}return d=Gre(z),f=z.parse,z}var Jre=Xre;const CI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Qre=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],MI=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],eae=["svg","g","path"],tae=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],nae=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],oae=["action","data","href","src","srcset","poster","xlink:href","formaction"],sae=["script"],iae=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],k1=new Set(CI),AI=new Set(MI),G2=new Set([...CI,...Qre,...MI,...eae]),TI=new Set([...G2,...tae]),lae=new Set(nae),rae=new Set(oae),_f=new Set(sae),EI=new Set(iae);function II(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const aae={amp:"&",bsol:"\\",colon:":",newline:` +`,sol:"/",tab:" "};function LI(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const l=Number.parseInt(i,n?10:16);try{return Number.isFinite(l)?String.fromCodePoint(l):""}catch{return""}}return aae[String(s??"").toLowerCase()]??t})}const I3=new Set(["http","https","mailto","tel"]),cae=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),t0=new Set(["http","https"]);function $I(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const uae=/^https?:\/\//i;function dae(e){if(!uae.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function fae(e,t,n){if(!f2(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function f2(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function pae(e,t){return t==="href"||t==="xlink:href"?f2(e,t)?I3:t0:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?t0:(f2(e,t),I3)}function $0(e,t={}){if(dae(e))return!1;const n=II(LI(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const l=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!l:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=$I(n);return i?i==="file"?!fae(n,o,s):f2(o,s)?cae.has(i):!pae(o,s).has(i):!1}function hae(e){const t=LI(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=$I(II(t).toLowerCase());return n==="http"||n==="https"}function mae(e,t={}){const n=String(e??"").trim();return n?$0(n,t)?"":n:""}function e_(e){return mae(e,{tagName:"img",attrName:"src"})}function gae(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,p,h,m,k){return f[p].nesting===1&&f[p].attrJoin("class",t),k.renderToken(f,p,h,m,k)}n=n||{};const i=3,l=n.marker||":",r=l.charCodeAt(0),a=l.length,c=n.validate||o,u=n.render||s;function d(f,p,h,m){let k,x=!1,y=f.bMarks[p]+f.tShift[p],w=f.eMarks[p];if(r!==f.src.charCodeAt(y))return!1;for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);const _=Math.floor((k-y)/a);if(_=h||(y=f.bMarks[z]+f.tShift[z],w=f.eMarks[z],y=4)){for(k=y+1;k<=w&&l[(k-y)%a]===f.src[k];k++);if(!(Math.floor((k-y)/a)<_)&&(k-=(k-y)%a,k=f.skipSpaces(k),!(k=2){const l=Number(i[0]),r=Number(i[1]);Number.isFinite(l)&&Number.isFinite(r)&&(s.map=[l+t,Math.min(r+t,n)])}Array.isArray(s.children)&&NI(s.children,t,n)}}function yae(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(gae,t,{render(n,o){return n[o].nesting===1?`
        `:`
        +`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,l=i.bMarks[n]+i.tShift[n],r=i.eMarks[n],a=i.src.slice(l,r),c=a.match(/^:::\s*([^\s{]+)/);if(!c)return!1;const u=c[1];if(!u.trim())return!1;const d=a.slice(c[0].length).trim();let f,p;const h=d.indexOf("{"),m=h>=0?d.slice(h).trimStart():void 0;if(h===-1)f=d||void 0;else{if(f=d.slice(0,h).trim()||void 0,m?.startsWith("{")){let P=0,z=-1;for(let L=0;L0&&(p=m.slice(0,z))}p||(f=d||void 0)}if(s)return!0;const k=!!i.env.__markstreamFinal;let x=n+1,y=!1;for(;x<=o;){const P=i.bMarks[x]+i.tShift[x],z=i.eMarks[x];if(i.src.slice(P,z).trim()===":::"){y=!0;break}x++}y||(x=o);const w=i.push("vmr_container_open","div",1);if(w.attrSet("class",`vmr-container vmr-container-${u}`),w.map=[n,y?x:o],w.meta={...w.meta??{},unclosed:!y&&!k},f&&w.attrSet("data-args",f),p)try{const P=JSON.parse(p);for(const[z,L]of Object.entries(P)){const T=L!=null&&typeof L=="object";w.attrSet(`data-${z}`,T?JSON.stringify(L):String(L))}}catch{const P=vae(p);if(P)for(const[z,L]of Object.entries(P)){const T=L!=null&&typeof L=="object";w.attrSet(`data-${z}`,T?JSON.stringify(L):String(L))}else w.attrSet("data-attrs",p)}const _=[];for(let P=n+1;PP.trim().length>0)){let P=_.join(` `);P.endsWith(` `)||(P+=` `),P.endsWith(` `)||(P+=` -`);const z=i.tokens[i.tokens.length-1];z&&(z.raw=P);const L=[];i.md.block.parse(P,i.md,i.env,L),$I(L,n+1,n+1+_.length),i.tokens.push(...L)}const A=i.push("vmr_container_close","div",-1);return y||(A.hidden=!0,A.map=[o,o]),i.line=y?x+1:x,!0},{alt:["paragraph","reference","blockquote","list"]})}function ur(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ss(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function Fp(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const yae=/^[a-z][a-z0-9_-]*$/;function e_(e){return yae.test(String(e??"").trim().toLowerCase())}function Vl(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return e_(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":e_(s)?s:""}function K0(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=Vl(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function wae(...e){const t=new Set,n=[];for(const o of e)for(const s of K0(o))t.has(s)||(t.add(s),n.push(s));return n}function kae(e){const t=K0(e);return{key:t.join(","),tags:t}}function NI(e){return Vl(e)}function bae(e,t){const n=String(e??""),o=Vl(t);if(!o)return!1;const s=ur(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function zI(e,t){const n=Vl(t);return!!n&&!G2.has(n)&&!bae(e,n)}function _ae(e,t){const n=String(e??""),o=Vl(t);if(!o)return n;const s=ur(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),l=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(l,"")}const BI=k1,xae=G2,RI=new Set(MI);RI.delete("details");const Sae=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Cae=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,G8=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Mae=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function b5(e){return(e.match(G8)?.[1]??"").toLowerCase()}function av(e){return/^\s*<\s*\//.test(e)}function cv(e,t){return BI.has(t)||/\/\s*>\s*$/.test(e)}function Aae(e,t){let n=0;for(let o=0;o0&&n--;continue}cv(s,i)||n++}}return n}function t_(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const l=i[0]??"",r=!!i[1],a=!r&&/\/\s*>$/.test(l);if(r){if(s===0)return{start:i.index,end:i.index+l.length};s--;continue}a||s++}return null}function Eae(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",l=!!s[1],r=!l&&/\/\s*>$/.test(i);if(l){o>0&&o--;continue}r||o++}return o}function _5(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Iae(e){const t=e;return t.meta||(t.meta={}),t.meta}function Fh(e,t,n){const o=Iae(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function Lae(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${ur(p)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=p=>p?n.some(h=>h.test(p)):!1,l=p=>{if(!(!p||!o.length))for(const h of o)h.raw+=p,h.inner+=p},r=()=>{!o.length||!s||(l(` -`),s=!1)},a=p=>{l(p)},c=p=>{for(let m=0;m{const h=o[o.length-1]?.tag;if(!h)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${ur(h)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!u(p),f=(p,h,m)=>{const k=m??(p.type==="html_inline"?b5(h):"");if(!(k&&t.has(k))){l(h);return}const x=av(h),y=!x&&cv(h,k);if(x){if(!o.length||o[o.length-1].tag!==k){l(h);return}c(h);return}if(l(h),y){Fh(p,h,"");return}o.push({tag:k,token:p,raw:h,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const h=String(p.content??"");if(d(h)?s=!1:r(),!o.length&&!i(h)){s=!1;continue}let m=0,k=!0;for(const x of p.children){const y=_5(x),w=x.type==="html_inline"?b5(y):"",_=w&&t.has(w);let A=y;if(k&&h&&y&&(o.length||_)){const P=h.indexOf(y,m);if(P!==-1)a(h.slice(m,P)),A=h.slice(P,P+y.length),m=P+y.length;else{if(o.length&&!_)continue;k=!1}}f(x,A,w)}k&&h&&m0;continue}if(o.length&&typeof p.content=="string"){const h=_5(p),m=p.type==="html_block"?u(h):null;if(m){c(`${s?` -`:""}${m}`),s=o.length>0;continue}if(!p.content)continue;r(),l(p.content),s=!0}}for(const p of o)Fh(p.token,p.raw,p.inner)}function $ae(e){return/^\s*<\s*[!?]/.test(e)}function Nae(e){const t=new Set(xae);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function n_(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function zae(e,t){let n=null;for(const i of e.matchAll(Sae)){const l=i.index??-1;if(l<0)continue;const r=(i[1]??"").toLowerCase();n_(r,t)&&ss(e.slice(l))===-1&&(!n||l")&&(!n||i")&&(!n||i{const p=f,h=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const w of m){const _=Vl(String(w??""));_&&h.add(_)}const k=Nae(Array.from(h)),x=new Set(Pae);for(const w of h)x.add(w);return{autoCloseInlineTagSet:x,commonHtmlTags:k,customTagSet:h,shouldMergeHtmlBlockTag:w=>h.has(w)||!k.has(w)||RI.has(w)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},i=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},l=f=>f.replace(/^(?:\r?\n)+/,""),r=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),c=(f,p)=>{const h=l(f);if(!/\S/.test(h))return[];if(r(h))return[{type:"code_block",content:a(h),raw:h}];const m=h.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const k={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},k,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[k]},u=(f,p,h)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":h,d=(f,p)=>{const h=l(p);return!/\S/.test(h)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${h}`,f.children.push({type:"text",content:h,raw:h}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const p=f.tokens??[],{commonHtmlTags:h,customTagSet:m}=o(f);for(const k of p){const x=k;if(x.type!=="inline"||!Array.isArray(x.children))continue;const y=String(x.content??""),w=x.children.length?x.children:y.includes("<")?[{type:"text",content:y,raw:y}]:null;if(w)try{const _=Rae(w,h);if(x.children=_.children,_.pendingBuffer){const A=y.lastIndexOf(_.pendingBuffer);if(A!==-1){const P=y.slice(0,A);x.content=P,typeof x.raw=="string"&&(x.raw=P)}}}catch(_){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",_)}}Lae(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:h,customTagSet:m,shouldMergeHtmlBlockTag:k}=o(f),x=[];for(let y=0;y0){const[A,P]=x[x.length-1];if(y!==P){if(w.type==="paragraph_open"||w.type==="paragraph_close"){p.splice(y,1),y--;continue}const z=String(w.content??w.raw??"");if(z){const L=p[P],E=`${String(L.content||"")} -${z}`,T=ss(E),$=T===-1?null:t_(E,A,T+1);if($){const C=E.slice(0,$.end),j=E.slice($.end);L.content=C,L.loading=!1,p.splice(y,1),x.pop();const H=d(L,j)?[]:c(j,u(p,y,"paragraph"));H.length&&p.splice(y,0,...H),y--;continue}L.content=E,L.loading!==!1&&(L.loading=!0)}p.splice(y,1),y--;continue}}const _=s(w);if(_){if($ae(_))continue;const A=(_.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),P=/^\s*<\s*\//.test(_);if(!A||!k(A))continue;if(i(w,_),!P)A&&!new RegExp(`^\\s*<\\s*${A}\\b[^>]*\\/\\s*>`,"i").test(_)&&Eae(_,A)>0&&x.push([A,y]);else if(x.length>0&&A&&x[x.length-1][0]===A){const[,z]=x[x.length-1],L=p[z];L.content=`${String(L.content||"")} +`);const z=i.tokens[i.tokens.length-1];z&&(z.raw=P);const L=[];i.md.block.parse(P,i.md,i.env,L),NI(L,n+1,n+1+_.length),i.tokens.push(...L)}const A=i.push("vmr_container_close","div",-1);return y||(A.hidden=!0,A.map=[o,o]),i.line=y?x+1:x,!0},{alt:["paragraph","reference","blockquote","list"]})}function ur(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ss(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function Fp(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const wae=/^[a-z][a-z0-9_-]*$/;function t_(e){return wae.test(String(e??"").trim().toLowerCase())}function Vl(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return t_(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":t_(s)?s:""}function K0(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=Vl(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function kae(...e){const t=new Set,n=[];for(const o of e)for(const s of K0(o))t.has(s)||(t.add(s),n.push(s));return n}function bae(e){const t=K0(e);return{key:t.join(","),tags:t}}function zI(e){return Vl(e)}function _ae(e,t){const n=String(e??""),o=Vl(t);if(!o)return!1;const s=ur(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function BI(e,t){const n=Vl(t);return!!n&&!G2.has(n)&&!_ae(e,n)}function xae(e,t){const n=String(e??""),o=Vl(t);if(!o)return n;const s=ur(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),l=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(l,"")}const RI=k1,Sae=G2,PI=new Set(AI);PI.delete("details");const Cae=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Mae=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,Y8=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Aae=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function b5(e){return(e.match(Y8)?.[1]??"").toLowerCase()}function cv(e){return/^\s*<\s*\//.test(e)}function uv(e,t){return RI.has(t)||/\/\s*>\s*$/.test(e)}function Tae(e,t){let n=0;for(let o=0;o0&&n--;continue}uv(s,i)||n++}}return n}function n_(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const l=i[0]??"",r=!!i[1],a=!r&&/\/\s*>$/.test(l);if(r){if(s===0)return{start:i.index,end:i.index+l.length};s--;continue}a||s++}return null}function Iae(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${ur(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",l=!!s[1],r=!l&&/\/\s*>$/.test(i);if(l){o>0&&o--;continue}r||o++}return o}function _5(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Lae(e){const t=e;return t.meta||(t.meta={}),t.meta}function Fh(e,t,n){const o=Lae(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function $ae(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${ur(p)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=p=>p?n.some(h=>h.test(p)):!1,l=p=>{if(!(!p||!o.length))for(const h of o)h.raw+=p,h.inner+=p},r=()=>{!o.length||!s||(l(` +`),s=!1)},a=p=>{l(p)},c=p=>{for(let m=0;m{const h=o[o.length-1]?.tag;if(!h)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${ur(h)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!u(p),f=(p,h,m)=>{const k=m??(p.type==="html_inline"?b5(h):"");if(!(k&&t.has(k))){l(h);return}const x=cv(h),y=!x&&uv(h,k);if(x){if(!o.length||o[o.length-1].tag!==k){l(h);return}c(h);return}if(l(h),y){Fh(p,h,"");return}o.push({tag:k,token:p,raw:h,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const h=String(p.content??"");if(d(h)?s=!1:r(),!o.length&&!i(h)){s=!1;continue}let m=0,k=!0;for(const x of p.children){const y=_5(x),w=x.type==="html_inline"?b5(y):"",_=w&&t.has(w);let A=y;if(k&&h&&y&&(o.length||_)){const P=h.indexOf(y,m);if(P!==-1)a(h.slice(m,P)),A=h.slice(P,P+y.length),m=P+y.length;else{if(o.length&&!_)continue;k=!1}}f(x,A,w)}k&&h&&m0;continue}if(o.length&&typeof p.content=="string"){const h=_5(p),m=p.type==="html_block"?u(h):null;if(m){c(`${s?` +`:""}${m}`),s=o.length>0;continue}if(!p.content)continue;r(),l(p.content),s=!0}}for(const p of o)Fh(p.token,p.raw,p.inner)}function Nae(e){return/^\s*<\s*[!?]/.test(e)}function zae(e){const t=new Set(Sae);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function o_(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function Bae(e,t){let n=null;for(const i of e.matchAll(Cae)){const l=i.index??-1;if(l<0)continue;const r=(i[1]??"").toLowerCase();o_(r,t)&&ss(e.slice(l))===-1&&(!n||l")&&(!n||i")&&(!n||i{const p=f,h=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const w of m){const _=Vl(String(w??""));_&&h.add(_)}const k=zae(Array.from(h)),x=new Set(Fae);for(const w of h)x.add(w);return{autoCloseInlineTagSet:x,commonHtmlTags:k,customTagSet:h,shouldMergeHtmlBlockTag:w=>h.has(w)||!k.has(w)||PI.has(w)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},i=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},l=f=>f.replace(/^(?:\r?\n)+/,""),r=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),c=(f,p)=>{const h=l(f);if(!/\S/.test(h))return[];if(r(h))return[{type:"code_block",content:a(h),raw:h}];const m=h.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const k={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},k,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[k]},u=(f,p,h)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":h,d=(f,p)=>{const h=l(p);return!/\S/.test(h)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${h}`,f.children.push({type:"text",content:h,raw:h}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const p=f.tokens??[],{commonHtmlTags:h,customTagSet:m}=o(f);for(const k of p){const x=k;if(x.type!=="inline"||!Array.isArray(x.children))continue;const y=String(x.content??""),w=x.children.length?x.children:y.includes("<")?[{type:"text",content:y,raw:y}]:null;if(w)try{const _=Pae(w,h);if(x.children=_.children,_.pendingBuffer){const A=y.lastIndexOf(_.pendingBuffer);if(A!==-1){const P=y.slice(0,A);x.content=P,typeof x.raw=="string"&&(x.raw=P)}}}catch(_){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",_)}}$ae(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:h,customTagSet:m,shouldMergeHtmlBlockTag:k}=o(f),x=[];for(let y=0;y0){const[A,P]=x[x.length-1];if(y!==P){if(w.type==="paragraph_open"||w.type==="paragraph_close"){p.splice(y,1),y--;continue}const z=String(w.content??w.raw??"");if(z){const L=p[P],T=`${String(L.content||"")} +${z}`,I=ss(T),N=I===-1?null:n_(T,A,I+1);if(N){const C=T.slice(0,N.end),F=T.slice(N.end);L.content=C,L.loading=!1,p.splice(y,1),x.pop();const H=d(L,F)?[]:c(F,u(p,y,"paragraph"));H.length&&p.splice(y,0,...H),y--;continue}L.content=T,L.loading!==!1&&(L.loading=!0)}p.splice(y,1),y--;continue}}const _=s(w);if(_){if(Nae(_))continue;const A=(_.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),P=/^\s*<\s*\//.test(_);if(!A||!k(A))continue;if(i(w,_),!P)A&&!new RegExp(`^\\s*<\\s*${A}\\b[^>]*\\/\\s*>`,"i").test(_)&&Iae(_,A)>0&&x.push([A,y]);else if(x.length>0&&A&&x[x.length-1][0]===A){const[,z]=x[x.length-1],L=p[z];L.content=`${String(L.content||"")} ${_}`,L.loading=!1,x.pop(),p.splice(y,1),y--}continue}else if(x.length>0){if(w.type==="paragraph_open"||w.type==="paragraph_close"){p.splice(y,1),y--;continue}const A=w.content||"",P=new RegExp(`<\\s*\\/\\s*${x[x.length-1][0]}\\s*>`,"i").test(A);if(A){const[,z]=x[x.length-1],L=p[z];L.content=`${L.content||""} -${A}`,L.loading!==!1&&(L.loading=!P)}P&&x.pop(),p.splice(y,1),y--}else continue}if(m.size>0){const y=new Map,w=new Map,_=z=>{let L=y.get(z);return L||(L=new RegExp(`<\\s*${z}\\b`,"i"),y.set(z,L)),L},A=z=>{let L=w.get(z);return L||(L=new RegExp(`<\\s*\\/\\s*${z}\\s*>`,"i"),w.set(z,L)),L},P=[];for(let z=0;z0){const $=P[P.length-1],C=p[$.index],j=L.type==="html_block"?A($.tag).exec(E):null;if(j){const M=j.index+j[0].length,R=E.slice(0,M),O=E.slice(M);C.content=`${String(C.content??"")} -${R}`,Array.isArray(C.children)&&C.children.push({type:"html_inline",content:``,raw:``}),P.pop();const U=d(C,O)?[]:c(O,u(p,z,"paragraph"));U.length?p.splice(z,1,...U):(p.splice(z,1),z--);continue}if(L.type!=="inline")continue;const H=Array.isArray(L.children)?L.children:[],D=Aae(H,$.tag);if(D!==-1){const M=H.slice(0,D+1),R=H.slice(D+1),O=M.map(U=>String(U?.content??U?.raw??"")).join("");if(C.content=`${String(C.content??"")} +${A}`,L.loading!==!1&&(L.loading=!P)}P&&x.pop(),p.splice(y,1),y--}else continue}if(m.size>0){const y=new Map,w=new Map,_=z=>{let L=y.get(z);return L||(L=new RegExp(`<\\s*${z}\\b`,"i"),y.set(z,L)),L},A=z=>{let L=w.get(z);return L||(L=new RegExp(`<\\s*\\/\\s*${z}\\s*>`,"i"),w.set(z,L)),L},P=[];for(let z=0;z0){const N=P[P.length-1],C=p[N.index],F=L.type==="html_block"?A(N.tag).exec(T):null;if(F){const M=F.index+F[0].length,R=T.slice(0,M),O=T.slice(M);C.content=`${String(C.content??"")} +${R}`,Array.isArray(C.children)&&C.children.push({type:"html_inline",content:``,raw:``}),P.pop();const U=d(C,O)?[]:c(O,u(p,z,"paragraph"));U.length?p.splice(z,1,...U):(p.splice(z,1),z--);continue}if(L.type!=="inline")continue;const H=Array.isArray(L.children)?L.children:[],D=Tae(H,N.tag);if(D!==-1){const M=H.slice(0,D+1),R=H.slice(D+1),O=M.map(U=>String(U?.content??U?.raw??"")).join("");if(C.content=`${String(C.content??"")} ${O}`,Array.isArray(C.children)&&C.children.push(...M),R.length){const U=R.map(Z=>String(Z.content??Z.raw??"")).join("");if(U.trim()){const Z=U.replace(/^\s+/,"");if(d(C,U))p.splice(z,1),z--;else if(Z.startsWith("<"))p.splice(z,1,{type:"html_block",content:Z});else{const q=c(U,u(p,z,"paragraph"));p.splice(z,1,...q)}}else p.splice(z,1),z--}else p.splice(z,1),z--;P.pop();continue}C.content=`${String(C.content??"")} -${E}`,Array.isArray(C.children)&&C.children.push(...H),p.splice(z,1),z--;continue}if(L.type!=="inline")continue;const T=Array.isArray(L.children)?L.children:[];for(const $ of m)if((T.length?Tae(T,$):_($).test(E)&&!A($).test(E)?1:0)>0){P.push({tag:$,index:z});break}}}{let y=0;for(let w=0;w0?y--:(p.splice(w,1),w--))}}for(let y=0;y/]+)/)?.[1]??"").toLowerCase();if(L.startsWith("!")||L.startsWith("?")){w.loading=!1;continue}if(m.has(L)){const D=String(w.content??""),M=ss(D),R=M===-1?null:t_(D,L,M+1);w.loading=R?!1:w.loading!==void 0?w.loading:!0;const O=R?.start??-1,U=R?R.end-R.start:0;if(O!==-1){const Z=D.slice(0,O+U);let q="";M!==-1&&M]+)))?/g;let T;for(;(T=E.exec(w.content||""))!==null;)T[1],T[2]||T[3]||T[4];const $=String(w.content??""),C=new RegExp(`<\\/\\s*${L}\\s*>`,"i").exec($),j=C?C.index:-1,H=C?C[0].length:0;if(j!==-1){const D=$.slice(0,j+H),M=($.slice(j+H)||"").replace(/^\s+/,"");w.children=[{type:"html_block",content:D,tag:L,loading:!1}],w.content=D,w.raw=D,M&&p.splice(y+1,0,M.startsWith("<")?{type:"html_block",content:M}:{type:"text",content:M,raw:M})}else w.children=[{type:"html_block",content:w.content,tag:L,loading:!0}];continue}if(!w||w.type!=="inline")continue;if(w.children.length===2&&w.children[0].type==="html_inline"){const L=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),E=w.children[1],T=String(E?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(E?.type==="html_inline"&&T===L)continue;h.has(L)?(w.children[0].loading=!0,w.children[0].tag=L,w.children.push({type:"html_inline",tag:L,loading:!0,content:``})):w.children=[{type:"html_block",loading:!0,tag:L,content:String(w.children[0]?.content??"")+String(w.children[1]?.content??"")}];continue}else if(w.children.length===3&&w.children[0].type==="html_inline"&&w.children[2].type==="html_inline"){const L=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(h.has(L))continue;w.children=[{type:"html_block",loading:!1,tag:L,content:w.children.map(E=>E.content).join("")}];continue}if(!w.content?.startsWith("<")||w.children?.length!==1)continue;const _=String(w.content),A=w,P=A.children[0];if(P?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(_)&&(A.children.length=0);continue}const z=String(P.content??_).match(Mae)?.[1]?.toLowerCase()??"";if(z){if(/\/\s*>\s*$/.test(_)||BI.has(z)){A.children=[{type:"html_inline",content:_}];continue}A.children.length=0}}})}function jae(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function Oae(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(r.length===1&&!jae(r[0]??"")){const a=r[0]??"",c=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:c},{type:"inline",tag:"",nesting:0,level:c,content:a,children:[{type:"text",content:a,level:c+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:c}),s+=2}}})}const PI=/\.([a-z0-9]{1,15})$/i,Hae=/[_()[\]{}<>]/u,Dae=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Vae=/[?#@]/u,Wae=/[\\/]/u,qae=/^[\p{L}\p{N}./\\-]+$/u,Uae=/^[A-Za-z0-9-]{1,63}$/u,Zae=/^xn--[a-z0-9-]{2,59}$/i,Kae=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Gae=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,Yae=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,Xae=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,Jae=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,Qae=2e3,e1e=512,t1e={},n1e=new Set(["ai","md","py","rs","sh","zip"]),FI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),o1e=new Set([...FI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),s1e=new Set(["com","dev","io","page","site"]),i1e=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),l1e=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),x0=new Map;function o_(e,t){if(!e||e.length>e1e)return t;for(x0.set(e,t);x0.size>Qae;){const n=x0.keys().next().value;if(!n)break;x0.delete(n)}return t}function Y2(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function jh(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Y2(n)?n:void 0}function s_(e,t){if(!Y2(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function i_(e){const t=xf(e);return Y2(t)?t:void 0}function r1e(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function l_(e,t){if(!Y2(t))return;const n=String(e??"").trim().split(/\s+/u).map(r1e).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>x5(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>x5(s,{marketTicker:!0}))&&(o.marketTicker=!0),Y2(o)?o:void 0}function E1(e,t=!1){let n;return{options(o){return t||o==null?s_(e,n):s_(e,jh(i_(o),l_(o,n)))},remember(o){const s=i_(o);n=t?jh(n,s):jh(s,l_(o,n))},reset(){n=void 0}}}function r_(e){return Uae.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function a1e(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return r_(n)||Zae.test(n)?t.every(r_):!1}function jI(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function c1e(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function u1e(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function OI(e,t,n){const o=c1e(t);return jI(e)&&u1e(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function d1e(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function xf(e){const t=String(e??""),n=x0.get(t);return n?(x0.delete(t),x0.set(t,n),n):d1e(t)?o_(t,{explicitFilename:Yae.test(t),filename:Xae.test(t),marketTicker:Jae.test(t)}):o_(t,t1e)}function f1e(e){return a1e(e.split(/[\\/]/)[0]??"")}function p1e(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function h1e(e){if(Hae.test(e)||!qae.test(e))return!0;if(Wae.test(e))return!f1e(e);const t=e.replace(PI,"");return jI(t)?!0:t.split(".").filter(Boolean).some(p1e)}function m1e(e,t,n){if(!(n?o1e:FI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Gae:Kae).test(o)}function x5(e,t={}){if(!e||Dae.test(e)||Vae.test(e))return!1;const n=e.match(PI);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return m1e(e,o,t.marketTicker===!0)?!0:l1e.has(o)?!n1e.has(o)||t.filename?!0:h1e(e):!!(t.explicitFilename&&s1e.has(o)||t.filename&&i1e.has(o))}const a_=["!"];function Fi(e){return{type:"text",content:e,raw:e}}function n0(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function o0(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function ja(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function g1e(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(Fi(t))}}function c_(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function y1e(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function u_(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;ol.type==="code_inline"),o=new Map;let s=0;for(let l=0;l0&&c?d_(c):-1;if(u!==-1&&c)for(const d of c.slice(u))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(l=a);continue}if(!(r.type!=="text"||typeof r.content!="string"))for(const a of r.content)a==="("?s++:a===")"&&s>0&&s--}const i=xf(t);for(let l=0;l<=e.length-1;l++){l<0&&(l=0);const r=e[l];if(!r)break;if(r.type==="link_open"&&(r.markup==="linkify"||r.markup==="autolink")){let a=-1;for(let c=l+1;c0){const h=d_(c);h!==-1&&(d===-1||h=m.content.length){p-=m.content.length;continue}if(p<0)break;const k=m.content[p],x=m.content.slice(0,p);let y=m.content.slice(p);for(let A=h+1;A0&&(e.splice(h+1,w),a=h+1);let _=u;if(k==="!"&&f!==-1)_=u.slice(0,f);else if(y){const A=encodeURI(y);if(A&&u.endsWith(A))_=u.slice(0,u.length-A.length);else{const P=k?encodeURI(k):"",z=P?u.indexOf(P):-1;z!==-1&&(_=u.slice(0,z))}}_!==u&&y1e(r,_),y&&e.splice(a+1,0,Fi(y));break}}}if(!n){if(r?.type==="em_open"&&e[l-1]?.type==="text"&&e[l-1].content?.endsWith("*")){const a=e[l-1].content?.replace(/(\*+)$/,"")||"";e[l-1].content=a,r.type="strong_open",r.tag="strong",r.markup="**";for(let c=l+1;cd[0]==="href")?.[1]||"";if(e[l+3]?.type==="text"){const d=(e[l+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(u+=e[l+3]?.content?.slice(0,d)||"",e[l+3].content=""),a.push(ja(c,u,f));const p=e[l+3].content?.replace(/^\)\**/,"");p&&a.push(Fi(p)),e.splice(l-4,8,...a)}else a.push({type:"link",loading:!0,href:u,title:"",text:c,children:[{type:"text",content:u,raw:u}],raw:`[${c}](${u})`}),e.splice(l-4,7,...a);continue}else if(e[l-1].content==="]("&&e[l-3]?.type==="text"&&e[l-3].content?.endsWith(")"))if(e[l-2]?.type==="strong_open"){const[a,c]=e[l-3].content?.split("[**")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else if(e[l-2]?.type==="em_open"){const[a,c]=e[l-3].content?.split("[*")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else{const[a,c]=e[l-3].content?.split("[")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}}if(r.type==="link_close"&&r.nesting===-1&&e[l-2]?.type==="link_open"&&e[l+1]?.type==="text"&&e[l-1]?.type==="text"){const a=e[l-1].content||"",c=e[l-2].attrs||[],u=c.find(x=>x[0]==="href")?.[1]||"",d=c.find(x=>x[0]==="title")?.[1]||"";let f=3,p=2;const h=(e[l-3]?.content||"").match(/^(\*+)$/),m=[];if(h){p+=1;const x=h[1].length;n0(m,x)}if(r.markup!=="linkify"&&e[l+1].type==="text"&&e[l+1]?.content?.startsWith("](")){f+=1;for(let x=l+1;xk[0]==="href")?.[1];e[l+5]?.type==="text"&&e[l+5].content==="."?(f=(m||f)+e[l+5].content,e[l+5].content=""):f=m||f,p+=3}let h=!0;if(r.nesting===-1&&(d=d.replace(/\*+$/,"")),e[l+2]?.type==="text"){const m=(e[l+2]?.content??"").indexOf(")");h=m===-1,m===-1&&(f+=e[l+2]?.content?.slice(0,m)||"",e[l+2].content="")}a.push(ja(d,f,h)),o0(a,2),e.splice(l-2,p,...a)}if(r.type==="text"&&/\*+\[[^\]]*$/.test(r.content||"")&&e[l+1]?.type==="strong_open"&&e[l+2]?.type==="text"&&e[l+2].content==="]("&&e[l+3]?.type==="link_open"&&e[l+5]?.type==="link_close"&&e[l+6]?.type==="text"&&e[l+6].content===")"&&e[l+7]?.type==="strong_close"){const a=(r.content||"").match(/^(\*+)\[(.*)$/);if(a){const c=(a[2]||"")+a[1];let u=e[l+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!u&&e[l+4]?.type==="text"&&(u=e[l+4].content||"");const d=[];n0(d,2),d.push(ja(c,u,!1)),o0(d,2),e.splice(l,9,...d),l-=d.length-1;continue}}}}if(n)return e;for(let l=0;l{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k{const n=t;try{const o=N1e(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function f_(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function p_(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function h_(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function HI(e,t){if(!e.startsWith("|")||e.includes(` -`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function Oh(e){return HI(e)!==null}function DI(e){return/^:?-+:?$/.test(e.trim())}function T1e(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(DI)}function E1e(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function I1e(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(DI)&&E1e(n)}function L1e(e){return e==="|"||e==="|:"}function $1e(e){const t=HI(e);return t!==null&&t.every(n=>!n.includes(":"))}function N1e(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const l=String(i.content??""),r=l.split(` +${T}`,Array.isArray(C.children)&&C.children.push(...H),p.splice(z,1),z--;continue}if(L.type!=="inline")continue;const I=Array.isArray(L.children)?L.children:[];for(const N of m)if((I.length?Eae(I,N):_(N).test(T)&&!A(N).test(T)?1:0)>0){P.push({tag:N,index:z});break}}}{let y=0;for(let w=0;w0?y--:(p.splice(w,1),w--))}}for(let y=0;y/]+)/)?.[1]??"").toLowerCase();if(L.startsWith("!")||L.startsWith("?")){w.loading=!1;continue}if(m.has(L)){const D=String(w.content??""),M=ss(D),R=M===-1?null:n_(D,L,M+1);w.loading=R?!1:w.loading!==void 0?w.loading:!0;const O=R?.start??-1,U=R?R.end-R.start:0;if(O!==-1){const Z=D.slice(0,O+U);let q="";M!==-1&&M]+)))?/g;let I;for(;(I=T.exec(w.content||""))!==null;)I[1],I[2]||I[3]||I[4];const N=String(w.content??""),C=new RegExp(`<\\/\\s*${L}\\s*>`,"i").exec(N),F=C?C.index:-1,H=C?C[0].length:0;if(F!==-1){const D=N.slice(0,F+H),M=(N.slice(F+H)||"").replace(/^\s+/,"");w.children=[{type:"html_block",content:D,tag:L,loading:!1}],w.content=D,w.raw=D,M&&p.splice(y+1,0,M.startsWith("<")?{type:"html_block",content:M}:{type:"text",content:M,raw:M})}else w.children=[{type:"html_block",content:w.content,tag:L,loading:!0}];continue}if(!w||w.type!=="inline")continue;if(w.children.length===2&&w.children[0].type==="html_inline"){const L=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),T=w.children[1],I=String(T?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(T?.type==="html_inline"&&I===L)continue;h.has(L)?(w.children[0].loading=!0,w.children[0].tag=L,w.children.push({type:"html_inline",tag:L,loading:!0,content:``})):w.children=[{type:"html_block",loading:!0,tag:L,content:String(w.children[0]?.content??"")+String(w.children[1]?.content??"")}];continue}else if(w.children.length===3&&w.children[0].type==="html_inline"&&w.children[2].type==="html_inline"){const L=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(h.has(L))continue;w.children=[{type:"html_block",loading:!1,tag:L,content:w.children.map(T=>T.content).join("")}];continue}if(!w.content?.startsWith("<")||w.children?.length!==1)continue;const _=String(w.content),A=w,P=A.children[0];if(P?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(_)&&(A.children.length=0);continue}const z=String(P.content??_).match(Aae)?.[1]?.toLowerCase()??"";if(z){if(/\/\s*>\s*$/.test(_)||RI.has(z)){A.children=[{type:"html_inline",content:_}];continue}A.children.length=0}}})}function Oae(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function Hae(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(r.length===1&&!Oae(r[0]??"")){const a=r[0]??"",c=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:c},{type:"inline",tag:"",nesting:0,level:c,content:a,children:[{type:"text",content:a,level:c+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:c}),s+=2}}})}const FI=/\.([a-z0-9]{1,15})$/i,Dae=/[_()[\]{}<>]/u,Vae=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Wae=/[?#@]/u,qae=/[\\/]/u,Uae=/^[\p{L}\p{N}./\\-]+$/u,Zae=/^[A-Za-z0-9-]{1,63}$/u,Kae=/^xn--[a-z0-9-]{2,59}$/i,Gae=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Yae=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,Xae=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,Jae=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,Qae=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,e1e=2e3,t1e=512,n1e={},o1e=new Set(["ai","md","py","rs","sh","zip"]),jI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),s1e=new Set([...jI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),i1e=new Set(["com","dev","io","page","site"]),l1e=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),r1e=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),x0=new Map;function s_(e,t){if(!e||e.length>t1e)return t;for(x0.set(e,t);x0.size>e1e;){const n=x0.keys().next().value;if(!n)break;x0.delete(n)}return t}function Y2(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function jh(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Y2(n)?n:void 0}function i_(e,t){if(!Y2(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function l_(e){const t=xf(e);return Y2(t)?t:void 0}function a1e(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function r_(e,t){if(!Y2(t))return;const n=String(e??"").trim().split(/\s+/u).map(a1e).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>x5(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>x5(s,{marketTicker:!0}))&&(o.marketTicker=!0),Y2(o)?o:void 0}function E1(e,t=!1){let n;return{options(o){return t||o==null?i_(e,n):i_(e,jh(l_(o),r_(o,n)))},remember(o){const s=l_(o);n=t?jh(n,s):jh(s,r_(o,n))},reset(){n=void 0}}}function a_(e){return Zae.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function c1e(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return a_(n)||Kae.test(n)?t.every(a_):!1}function OI(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function u1e(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function d1e(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function HI(e,t,n){const o=u1e(t);return OI(e)&&d1e(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function f1e(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function xf(e){const t=String(e??""),n=x0.get(t);return n?(x0.delete(t),x0.set(t,n),n):f1e(t)?s_(t,{explicitFilename:Xae.test(t),filename:Jae.test(t),marketTicker:Qae.test(t)}):s_(t,n1e)}function p1e(e){return c1e(e.split(/[\\/]/)[0]??"")}function h1e(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function m1e(e){if(Dae.test(e)||!Uae.test(e))return!0;if(qae.test(e))return!p1e(e);const t=e.replace(FI,"");return OI(t)?!0:t.split(".").filter(Boolean).some(h1e)}function g1e(e,t,n){if(!(n?s1e:jI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Yae:Gae).test(o)}function x5(e,t={}){if(!e||Vae.test(e)||Wae.test(e))return!1;const n=e.match(FI);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return g1e(e,o,t.marketTicker===!0)?!0:r1e.has(o)?!o1e.has(o)||t.filename?!0:m1e(e):!!(t.explicitFilename&&i1e.has(o)||t.filename&&l1e.has(o))}const c_=["!"];function Fi(e){return{type:"text",content:e,raw:e}}function n0(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function o0(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function ja(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function v1e(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(Fi(t))}}function u_(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function w1e(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function d_(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;ol.type==="code_inline"),o=new Map;let s=0;for(let l=0;l0&&c?f_(c):-1;if(u!==-1&&c)for(const d of c.slice(u))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(l=a);continue}if(!(r.type!=="text"||typeof r.content!="string"))for(const a of r.content)a==="("?s++:a===")"&&s>0&&s--}const i=xf(t);for(let l=0;l<=e.length-1;l++){l<0&&(l=0);const r=e[l];if(!r)break;if(r.type==="link_open"&&(r.markup==="linkify"||r.markup==="autolink")){let a=-1;for(let c=l+1;c0){const h=f_(c);h!==-1&&(d===-1||h=m.content.length){p-=m.content.length;continue}if(p<0)break;const k=m.content[p],x=m.content.slice(0,p);let y=m.content.slice(p);for(let A=h+1;A0&&(e.splice(h+1,w),a=h+1);let _=u;if(k==="!"&&f!==-1)_=u.slice(0,f);else if(y){const A=encodeURI(y);if(A&&u.endsWith(A))_=u.slice(0,u.length-A.length);else{const P=k?encodeURI(k):"",z=P?u.indexOf(P):-1;z!==-1&&(_=u.slice(0,z))}}_!==u&&w1e(r,_),y&&e.splice(a+1,0,Fi(y));break}}}if(!n){if(r?.type==="em_open"&&e[l-1]?.type==="text"&&e[l-1].content?.endsWith("*")){const a=e[l-1].content?.replace(/(\*+)$/,"")||"";e[l-1].content=a,r.type="strong_open",r.tag="strong",r.markup="**";for(let c=l+1;cd[0]==="href")?.[1]||"";if(e[l+3]?.type==="text"){const d=(e[l+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(u+=e[l+3]?.content?.slice(0,d)||"",e[l+3].content=""),a.push(ja(c,u,f));const p=e[l+3].content?.replace(/^\)\**/,"");p&&a.push(Fi(p)),e.splice(l-4,8,...a)}else a.push({type:"link",loading:!0,href:u,title:"",text:c,children:[{type:"text",content:u,raw:u}],raw:`[${c}](${u})`}),e.splice(l-4,7,...a);continue}else if(e[l-1].content==="]("&&e[l-3]?.type==="text"&&e[l-3].content?.endsWith(")"))if(e[l-2]?.type==="strong_open"){const[a,c]=e[l-3].content?.split("[**")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else if(e[l-2]?.type==="em_open"){const[a,c]=e[l-3].content?.split("[*")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}else{const[a,c]=e[l-3].content?.split("[")||[];e[l+1].content=c||"",e[l-3].content=a||"",e[l-1].content=""}}if(r.type==="link_close"&&r.nesting===-1&&e[l-2]?.type==="link_open"&&e[l+1]?.type==="text"&&e[l-1]?.type==="text"){const a=e[l-1].content||"",c=e[l-2].attrs||[],u=c.find(x=>x[0]==="href")?.[1]||"",d=c.find(x=>x[0]==="title")?.[1]||"";let f=3,p=2;const h=(e[l-3]?.content||"").match(/^(\*+)$/),m=[];if(h){p+=1;const x=h[1].length;n0(m,x)}if(r.markup!=="linkify"&&e[l+1].type==="text"&&e[l+1]?.content?.startsWith("](")){f+=1;for(let x=l+1;xk[0]==="href")?.[1];e[l+5]?.type==="text"&&e[l+5].content==="."?(f=(m||f)+e[l+5].content,e[l+5].content=""):f=m||f,p+=3}let h=!0;if(r.nesting===-1&&(d=d.replace(/\*+$/,"")),e[l+2]?.type==="text"){const m=(e[l+2]?.content??"").indexOf(")");h=m===-1,m===-1&&(f+=e[l+2]?.content?.slice(0,m)||"",e[l+2].content="")}a.push(ja(d,f,h)),o0(a,2),e.splice(l-2,p,...a)}if(r.type==="text"&&/\*+\[[^\]]*$/.test(r.content||"")&&e[l+1]?.type==="strong_open"&&e[l+2]?.type==="text"&&e[l+2].content==="]("&&e[l+3]?.type==="link_open"&&e[l+5]?.type==="link_close"&&e[l+6]?.type==="text"&&e[l+6].content===")"&&e[l+7]?.type==="strong_close"){const a=(r.content||"").match(/^(\*+)\[(.*)$/);if(a){const c=(a[2]||"")+a[1];let u=e[l+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!u&&e[l+4]?.type==="text"&&(u=e[l+4].content||"");const d=[];n0(d,2),d.push(ja(c,u,!1)),o0(d,2),e.splice(l,9,...d),l-=d.length-1;continue}}}}if(n)return e;for(let l=0;l{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=u+1;for(;k{const n=t;try{const o=z1e(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function p_(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function h_(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function m_(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function DI(e,t){if(!e.startsWith("|")||e.includes(` +`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function Oh(e){return DI(e)!==null}function VI(e){return/^:?-+:?$/.test(e.trim())}function E1e(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(VI)}function I1e(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function L1e(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(VI)&&I1e(n)}function $1e(e){return e==="|"||e==="|:"}function N1e(e){const t=DI(e);return t!==null&&t.every(n=>!n.includes(":"))}function z1e(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const l=String(i.content??""),r=l.split(` `)[0]??"",[a="",c="",...u]=l.split(` `),d=!t&&!l.includes(` `)&&/\r?\n$/.test(n)&&Oh(l);if(!t&&(l.includes(` -`)&&u.length===0&&Oh(a)&&I1e(c)||d)){const f=r.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>h_(h)),p=[...f_(),...f,...p_()];o.splice(s-1,3,...p)}else if(l.includes(` -`)&&u.length===0&&Oh(a)&&T1e(c)){const f=r.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>h_(h)),p=[...f_(),...f,...p_()];o.splice(s-1,3,...p)}else l.includes(` -`)&&u.length===0&&$1e(a)&&L1e(c)&&(i.content=l.slice(0,-2),i.children.splice(2,1))}return o}function z1e(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let c=t;for(;c=0&&e[u]==="\\";)d++,u--;if(d%2===0)return c}c++}return-1}const i=n[n.length-1],l=o;let r=0,a=t;for(;a=0&&e[u]==="\\";)d++,u--;if(d%2===0){if(r===0)return a;r--,a+=l.length;continue}}const c=e[a];if(c==="\\"){a+=2;continue}c===i?r++:c===l[l.length-1]&&r>0&&r--,a++}return-1}var B1e=z1e;const R1e=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],S5=R1e.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),P1e=/\\[a-z]+/i,VI="(?:\\\\|\\u0008)",F1e=new RegExp(String.raw`${VI}(?:${S5})\s*\{[^}]+\}`,"i"),j1e=new RegExp(String.raw`(?:${VI})?(?:${S5})\s*\{`,"i"),O1e=/\\(?:text|frac|left|right|times)/,H1e=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,D1e=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,V1e=/[A-Z]+\s*\([^)]+\)/i,W1e=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,q1e=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,U1e=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,Z1e={"\b":"\\b","\v":"\\v","\f":"\\f"};function K1e(e){let t="";for(const n of e)t+=Z1e[n]??n;return t}function Qa(e){if(!e)return!1;const t=K1e(e),n=t.trim();if(U1e.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=P1e.test(t),s=F1e.test(t),i=j1e.test(t),l=O1e.test(t),r=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=H1e.test(t)&&!D1e.test(t),c=V1e.test(t),u=W1e.test(n),d=q1e.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||l||r||a||c||u||d||f||p}const WI="__markstreamMathPluginApplied",Y8=80,qI=2e4,m_=qI+4096;function uv(e){return!!e[WI]}function G1e(e){e[WI]=!0}const UI=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],Y1e=["cdot","mathbf{","partial","mu_{"],ZI=UI.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),KI="[ \r\b\f\v]",X1e=new RegExp(`([^\\\\])(${Y1e.map(e=>e).join("|")})+`,"g"),J1e=/span\{([^}]+)\}/,Q1e=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,e0e=/(^|[^\\])\\\r?\n/g,t0e=/(^|[^\\])\\$/g,n0e=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,o0e=new RegExp(`(${KI})|(${ZI})\\b`,"g"),g_=new Map,v_=new Map;function s0e(e){if(!e)return o0e;const t=[...e];t.sort((l,r)=>r.length-l.length);const n=t.join(""),o=g_.get(n);if(o)return o;const s=`(?:${t.map(l=>l.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${KI})|(${s})\\b`,"g");return g_.set(n,i),i}function i0e(e,t){const n=e?[]:[...t??[]];e||n.sort((r,a)=>a.length-r.length);const o=e?"__default__":n.join(""),s=v_.get(o);if(s)return s;const i=e?[S5,ZI].filter(Boolean).join("|"):[n.map(r=>r.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),S5].filter(Boolean).join("|"),l=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return v_.set(o,l),l}const y_={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function w_(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function l0e(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&n0e.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function k_(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function Oa(e,t){const n=t?.commands??UI,o=t?.escapeExclamation??!0,s=t?.commands==null,i=s0e(s?void 0:n);let l=e.replace(i,(c,u,d,f,p)=>{if(u!==void 0&&y_[u]!==void 0)return`\\${y_[u]}`;if(d&&n.includes(d)){const h=p&&typeof f=="number"?p[f-1]:void 0;return h==="\\"||h&&/\w/.test(h)?c:`\\${d}`}return c});o&&(l=l0e(l));let r=l;const a=i0e(s,s?void 0:n);return r=r.replace(a,(c,u,d)=>`${u}\\${d}{`),r=r.replace(J1e,"span\\{$1\\}").replace(Q1e,"\\operatorname{span}\\{$1\\}"),r=r.replace(e0e,`$1\\\\ -`),r=r.replace(t0e,"$1\\\\"),r=r.replace(X1e,"$1\\$2"),r}function b_(e){const t=e.trim();return!(!Qa(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function GI(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[r]==="\\"&&r+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function X8(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=r)break;const c=C5(s,a);if(c){l=Math.max(a+Math.max(1,t.length),c[1]);continue}Sf(e,a)||i++,l=a+Math.max(1,t.length)}return i}function dv(e,t,n){const o=J2(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!J2(o.slice(0,s)).trim()||Sf(o,s))return-1;const i=GI(o);if(C5(i,s))return-1;const l=__(o,t,0,s,i);if(t==="$$"){if(l%2===1)return-1}else if(l>__(o,n,0,s,i))return-1;return s}function X2(e){return e===" "||e===" "}function J2(e){let t=e.length;for(;t>0&&X2(e[t-1]);)t--;return e.slice(0,t)}function x_(e){let t=0;for(let n=0;n=48&&t<=57}function a0e(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function c0e(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function u0e(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(c0e)}function d0e(e){let t=0;if(!S_(e[t]))return!1;for(;S_(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:X2(e[t+1])}function YI(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&X2(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&X2(t[1])||d0e(t)||a0e(t)||u0e(t))}function C_(e,t){return e?t?`${e} -${t}`:e:t}function J8(e){const t=String(e??"").trim();return t?Qa(t):!1}function M_(e){let t=0;for(let n=0;nY8){p=!0;break}const m=s[h],k=jc(m,u);if(k!==-1){const x=C_(f,m.slice(0,k));if(!J8(x)){p=!0;break}const y=m.slice(k+u.length),w=y.trim()?`suffix:${M_(y)}`:"nosuffix";return["closed",c,o+r,d,o+h,k,M_(x),w].join(":")}if(YI(m)){p=!0;break}if(f=C_(f,m),f.length>qI){p=!0;break}}if(!p&&J8(f))return["pending",c,o+r,d].join(":")}}return null}function Dh(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function p0e(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function Vh(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function h0e(e,t){G1e(e);const n=(l,r,a)=>{const c=String(r??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!c)return;const u=l.push("paragraph_open","p",1);u.map=[a,a+1];const d=l.push("inline","",0);d.content=c,d.map=[a,a+1],d.children=[],l.push("paragraph_close","p",-1)},o=(l,r)=>{const a=l,c=!!t?.strictDelimiters,u=!a?.env?.__markstreamFinal,d=(y,w)=>{let _=w;for(;_h.trim()).flatMap(h=>m_(h)),p=[...p_(),...f,...h_()];o.splice(s-1,3,...p)}else if(l.includes(` +`)&&u.length===0&&Oh(a)&&E1e(c)){const f=r.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>m_(h)),p=[...p_(),...f,...h_()];o.splice(s-1,3,...p)}else l.includes(` +`)&&u.length===0&&N1e(a)&&$1e(c)&&(i.content=l.slice(0,-2),i.children.splice(2,1))}return o}function B1e(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let c=t;for(;c=0&&e[u]==="\\";)d++,u--;if(d%2===0)return c}c++}return-1}const i=n[n.length-1],l=o;let r=0,a=t;for(;a=0&&e[u]==="\\";)d++,u--;if(d%2===0){if(r===0)return a;r--,a+=l.length;continue}}const c=e[a];if(c==="\\"){a+=2;continue}c===i?r++:c===l[l.length-1]&&r>0&&r--,a++}return-1}var R1e=B1e;const P1e=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],S5=P1e.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),F1e=/\\[a-z]+/i,WI="(?:\\\\|\\u0008)",j1e=new RegExp(String.raw`${WI}(?:${S5})\s*\{[^}]+\}`,"i"),O1e=new RegExp(String.raw`(?:${WI})?(?:${S5})\s*\{`,"i"),H1e=/\\(?:text|frac|left|right|times)/,D1e=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,V1e=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,W1e=/[A-Z]+\s*\([^)]+\)/i,q1e=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,U1e=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,Z1e=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,K1e={"\b":"\\b","\v":"\\v","\f":"\\f"};function G1e(e){let t="";for(const n of e)t+=K1e[n]??n;return t}function Qa(e){if(!e)return!1;const t=G1e(e),n=t.trim();if(Z1e.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=F1e.test(t),s=j1e.test(t),i=O1e.test(t),l=H1e.test(t),r=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=D1e.test(t)&&!V1e.test(t),c=W1e.test(t),u=q1e.test(n),d=U1e.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||l||r||a||c||u||d||f||p}const qI="__markstreamMathPluginApplied",X8=80,UI=2e4,g_=UI+4096;function dv(e){return!!e[qI]}function Y1e(e){e[qI]=!0}const ZI=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],X1e=["cdot","mathbf{","partial","mu_{"],KI=ZI.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),GI="[ \r\b\f\v]",J1e=new RegExp(`([^\\\\])(${X1e.map(e=>e).join("|")})+`,"g"),Q1e=/span\{([^}]+)\}/,e0e=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,t0e=/(^|[^\\])\\\r?\n/g,n0e=/(^|[^\\])\\$/g,o0e=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,s0e=new RegExp(`(${GI})|(${KI})\\b`,"g"),v_=new Map,y_=new Map;function i0e(e){if(!e)return s0e;const t=[...e];t.sort((l,r)=>r.length-l.length);const n=t.join(""),o=v_.get(n);if(o)return o;const s=`(?:${t.map(l=>l.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${GI})|(${s})\\b`,"g");return v_.set(n,i),i}function l0e(e,t){const n=e?[]:[...t??[]];e||n.sort((r,a)=>a.length-r.length);const o=e?"__default__":n.join(""),s=y_.get(o);if(s)return s;const i=e?[S5,KI].filter(Boolean).join("|"):[n.map(r=>r.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),S5].filter(Boolean).join("|"),l=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return y_.set(o,l),l}const w_={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function k_(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function r0e(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&o0e.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function b_(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function Oa(e,t){const n=t?.commands??ZI,o=t?.escapeExclamation??!0,s=t?.commands==null,i=i0e(s?void 0:n);let l=e.replace(i,(c,u,d,f,p)=>{if(u!==void 0&&w_[u]!==void 0)return`\\${w_[u]}`;if(d&&n.includes(d)){const h=p&&typeof f=="number"?p[f-1]:void 0;return h==="\\"||h&&/\w/.test(h)?c:`\\${d}`}return c});o&&(l=r0e(l));let r=l;const a=l0e(s,s?void 0:n);return r=r.replace(a,(c,u,d)=>`${u}\\${d}{`),r=r.replace(Q1e,"span\\{$1\\}").replace(e0e,"\\operatorname{span}\\{$1\\}"),r=r.replace(t0e,`$1\\\\ +`),r=r.replace(n0e,"$1\\\\"),r=r.replace(J1e,"$1\\$2"),r}function __(e){const t=e.trim();return!(!Qa(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function YI(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[r]==="\\"&&r+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function J8(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=r)break;const c=C5(s,a);if(c){l=Math.max(a+Math.max(1,t.length),c[1]);continue}Sf(e,a)||i++,l=a+Math.max(1,t.length)}return i}function fv(e,t,n){const o=J2(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!J2(o.slice(0,s)).trim()||Sf(o,s))return-1;const i=YI(o);if(C5(i,s))return-1;const l=x_(o,t,0,s,i);if(t==="$$"){if(l%2===1)return-1}else if(l>x_(o,n,0,s,i))return-1;return s}function X2(e){return e===" "||e===" "}function J2(e){let t=e.length;for(;t>0&&X2(e[t-1]);)t--;return e.slice(0,t)}function S_(e){let t=0;for(let n=0;n=48&&t<=57}function c0e(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function u0e(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function d0e(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(u0e)}function f0e(e){let t=0;if(!C_(e[t]))return!1;for(;C_(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:X2(e[t+1])}function XI(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&X2(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&X2(t[1])||f0e(t)||c0e(t)||d0e(t))}function M_(e,t){return e?t?`${e} +${t}`:e:t}function Q8(e){const t=String(e??"").trim();return t?Qa(t):!1}function A_(e){let t=0;for(let n=0;nX8){p=!0;break}const m=s[h],k=jc(m,u);if(k!==-1){const x=M_(f,m.slice(0,k));if(!Q8(x)){p=!0;break}const y=m.slice(k+u.length),w=y.trim()?`suffix:${A_(y)}`:"nosuffix";return["closed",c,o+r,d,o+h,k,A_(x),w].join(":")}if(XI(m)){p=!0;break}if(f=M_(f,m),f.length>UI){p=!0;break}}if(!p&&Q8(f))return["pending",c,o+r,d].join(":")}}return null}function Dh(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function h0e(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function Vh(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function m0e(e,t){Y1e(e);const n=(l,r,a)=>{const c=String(r??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!c)return;const u=l.push("paragraph_open","p",1);u.map=[a,a+1];const d=l.push("inline","",0);d.content=c,d.map=[a,a+1],d.children=[],l.push("paragraph_close","p",-1)},o=(l,r)=>{const a=l,c=!!t?.strictDelimiters,u=!a?.env?.__markstreamFinal,d=(y,w)=>{let _=w;for(;_=3&&(!_||/\s/.test(_))){const A=a.push("text","",0);return A.content=a.src.slice(a.pos,y),a.pos=y,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),h=Math.max(0,a.pos-p.length);let m=h,k=h;const x=h;for(const[y,w]of f){const _=a.src,A=GI(_),P=r0e(_,u);let z=!1;y==="$$"&&m!==x&&(m=x);let L=-1,E=-1,T=0;const $=C=>{if((C==="undefined"||C==null)&&(C=""),C==="\\"){a.pos=a.pos+C.length,m=a.pos;return}if(C==="\\)"||C==="\\("){const D=a.push("text_special","",0);D.content=C==="\\)"?")":"(",D.markup=C,a.pos=a.pos+C.length,m=a.pos;return}if(!C)return;if(y==="$$"&&C.includes("$")){let D=0;for(;D0&&C[M-1]==="$"||M+10){const R=C.slice(0,j),O=a.push("text","",0);O.content=R,a.pos=a.pos+R.length,m=a.pos}const D=C.slice(j).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(D){const[,R,O]=D,U=O.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),Z=U?U[1]:O,q=U&&U[2]?U[2]:null,te=a.push("image","img",0);te.attrs=[["src",Z],["alt",R]],q&&te.attrs.push(["title",q]),te.content=R,te.children=[{type:"text",content:R,tag:""}],a.pos=a.pos+D[0].length,m=a.pos;const ee=C.slice(j+D[0].length);ee&&$(ee);return}const M=a.push("text","",0);M.content=C,a.pos=a.pos+C.length,m=a.pos;return}const H=a.push("text","",0);H.content=C,a.pos=a.pos+C.length,m=a.pos};for(;!(m>=_.length);){const C=_.indexOf(y,m);if(C===-1)break;if(Sf(_,C)){m=C+Math.max(1,y.length);continue}const j=C5(A,C);if(j){m=j[1];continue}const H=C5(P,C);if(H){m=H[1];continue}if(C===L&&m===E){if(T++,T>2){m=C+Math.max(1,y.length);continue}}else T=0,L=C,E=m;if(y==="("&&C>0){let ee=C-1;for(;ee>=0&&_[ee]===" ";)ee--;if(ee>=0&&_[ee]==="]"){m=C+y.length;continue}}if(y==="$"&&C>0&&_[C-1]==="$"){m=C+1;continue}if(y==="$"&&C<_.length-1&&_[C+1]==="$"){m=C+2;continue}const D=y==="$"?Hh(_,C+y.length):B1e(_,C+y.length,y,w);if(D===-1){const ee=_.slice(C+y.length);if(ee.includes(y)){m=_.indexOf(y,C+y.length);continue}if(D===-1){const J=y==="$"&&p0e(ee);if(u&&!c&&!J&&Qa(ee)&&!ee.includes("`")){if(m=C+y.length,z=!0,!r){a.pending="";const se=k?_.slice(k,m):_.slice(0,m),Q=w_(se)%2===1;if(k)$(_.slice(k,m));else{let me=_.slice(0,m);me.endsWith(y)&&(me=me.slice(0,me.length-y.length)),$(me)}if(Q){const me=k_(se)?.marker??"**",xe=a.push("strong_open","",0);xe.markup=me;const Ye=a.push("math_inline","math",0);Ye.content=Oa(ee,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${ee}${w}`,Ye.loading=!0,xe.content=ee,a.push("strong_close","",0)}else{const me=a.push("math_inline","math",0);me.content=Oa(ee,t),me.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",me.raw=`${y}${ee}${w}`,me.loading=!0}a.pos=_.length}m=_.length,k=m}break}}const M=_.slice(C+y.length,D),R=M.includes("`"),O=!M||!M.trim(),U=y==="$",Z=_[D+w.length],q=U&&Dh(M,Z),te=U&&Vh(M);if(c?R||O||q||te:R||O||q||te||!U&&!Qa(M)){m=D+w.length;const ee=_.slice(a.pos,m);a.pending||($(ee),k=m);continue}if(z=!0,!r){const ee=_.slice(a.pos-(a.pending??"").length,C);let J=_.slice(0,m)?_.slice(k,C):ee;const se=w_(J)%2===1;C!==a.pos&&se&&(J=a.pending+_.slice(a.pos,C));const Q=se?k_(J):null,me=Q?.marker??"**";if(a.pending!==J)if(a.pending="",se)if(Q){const xe=J.slice(Q.index+me.length);$(J.slice(0,Q.index));const Ye=a.push("strong_open","",0);Ye.markup=me;const at=a.push("text","",0);at.content=xe,a.push("strong_close","",0)}else $(J);else $(J);if(se){const xe=a.push("strong_open","",0);xe.markup=me;const Ye=a.push("math_inline","math",0);Ye.content=Oa(M,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${M}${w}`,Ye.loading=!1;const at=_.slice(D+w.length).startsWith(me);return at&&a.push("strong_close","",0),a.pos=d(_,D+w.length),m=a.pos,k=m,at||a.push("strong_close","",0),!0}else{const xe=a.push("math_inline","math",0);xe.content=Oa(M,t),xe.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",xe.raw=`${y}${M}${w}`,xe.loading=!1}}return m=d(_,D+w.length),k=m,a.pos=m,!0}if(z){if(r)a.pos=m;else{if(y==="$$"&&m<_.length&&_.slice(m).includes("$")){let C=m;for(;!(C>=_.length);){const j=X8(_,C);if(j===-1)break;if(j+1<_.length&&_[j+1]==="$"){C=j+2;continue}if(j>0&&_[j-1]==="$"){C=j+1;continue}const H=Hh(_,j+1);if(H===-1)break;const D=_.slice(j+1,H),M=D.includes("`"),R=!D||!D.trim(),O=_[H+1],U=Dh(D,O),Z=Vh(D);if(!M&&!R&&!U&&!Z){const q=_.slice(m,j);q&&$(q);const te=a.push("math_inline","math",0);te.content=Oa(D,t),te.markup="$",te.raw=`$${D}$`,te.loading=!1,m=H+1,C=H+1}else $("$"),C=j+1}C<_.length&&$(_.slice(C))}else m<_.length&&$(_.slice(m));a.pos=_.length}return!0}}return!1},s=(l,r,a,c)=>{const u=l,d=!u?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],h=u.bMarks[r]+u.tShift[r];let m=u.src.slice(h,u.eMarks[r]).trim(),k=!1,x="",y="",w=!1,_="",A=!1;for(const[q,te]of p)if(m.startsWith(q))if(q.includes("[")){const ee=q==="\\["?m.slice(q.length):"";if(q==="\\["&&jc(ee,te)===-1&&!/^\s*!\[/.test(ee)&&!ee.includes("`")&&Qa(ee)){k=!0,x=q,y=te;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(r+1=0?"\\]":y,T=L>=0?L:jc(m,y,z);if(!w&&T>x.length){const q=m.slice(P+x.length,T),te=u.push("math_block","math",0);te.content=Oa(q),te.markup=x==="$$"?"$$":x==="["?"[]":"\\[\\]",te.map=[r,r+1],te.raw=`${x}${q}${E}`,te.block=!0,te.loading=!1,u.line=r+1;const ee=m.slice(T+E.length);return ee.trim()&&n(u,ee,r),!0}let $=r,C="",j=!1,H="",D=r;const M=w?m:m===x?"":m.slice(x.length),R=!f&&x==="\\["?"]":"",O=jc(M,y);if(O!==-1){const q=O;C=M.slice(0,q),H=M.slice(q+y.length),D=w?r+1:r,j=!0,$=D}else for(M&&!w&&(C=M),$=r+1;$=3&&(!_||/\s/.test(_))){const A=a.push("text","",0);return A.content=a.src.slice(a.pos,y),a.pos=y,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),h=Math.max(0,a.pos-p.length);let m=h,k=h;const x=h;for(const[y,w]of f){const _=a.src,A=YI(_),P=a0e(_,u);let z=!1;y==="$$"&&m!==x&&(m=x);let L=-1,T=-1,I=0;const N=C=>{if((C==="undefined"||C==null)&&(C=""),C==="\\"){a.pos=a.pos+C.length,m=a.pos;return}if(C==="\\)"||C==="\\("){const D=a.push("text_special","",0);D.content=C==="\\)"?")":"(",D.markup=C,a.pos=a.pos+C.length,m=a.pos;return}if(!C)return;if(y==="$$"&&C.includes("$")){let D=0;for(;D0&&C[M-1]==="$"||M+10){const R=C.slice(0,F),O=a.push("text","",0);O.content=R,a.pos=a.pos+R.length,m=a.pos}const D=C.slice(F).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(D){const[,R,O]=D,U=O.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),Z=U?U[1]:O,q=U&&U[2]?U[2]:null,te=a.push("image","img",0);te.attrs=[["src",Z],["alt",R]],q&&te.attrs.push(["title",q]),te.content=R,te.children=[{type:"text",content:R,tag:""}],a.pos=a.pos+D[0].length,m=a.pos;const ee=C.slice(F+D[0].length);ee&&N(ee);return}const M=a.push("text","",0);M.content=C,a.pos=a.pos+C.length,m=a.pos;return}const H=a.push("text","",0);H.content=C,a.pos=a.pos+C.length,m=a.pos};for(;!(m>=_.length);){const C=_.indexOf(y,m);if(C===-1)break;if(Sf(_,C)){m=C+Math.max(1,y.length);continue}const F=C5(A,C);if(F){m=F[1];continue}const H=C5(P,C);if(H){m=H[1];continue}if(C===L&&m===T){if(I++,I>2){m=C+Math.max(1,y.length);continue}}else I=0,L=C,T=m;if(y==="("&&C>0){let ee=C-1;for(;ee>=0&&_[ee]===" ";)ee--;if(ee>=0&&_[ee]==="]"){m=C+y.length;continue}}if(y==="$"&&C>0&&_[C-1]==="$"){m=C+1;continue}if(y==="$"&&C<_.length-1&&_[C+1]==="$"){m=C+2;continue}const D=y==="$"?Hh(_,C+y.length):R1e(_,C+y.length,y,w);if(D===-1){const ee=_.slice(C+y.length);if(ee.includes(y)){m=_.indexOf(y,C+y.length);continue}if(D===-1){const J=y==="$"&&h0e(ee);if(u&&!c&&!J&&Qa(ee)&&!ee.includes("`")){if(m=C+y.length,z=!0,!r){a.pending="";const se=k?_.slice(k,m):_.slice(0,m),Q=k_(se)%2===1;if(k)N(_.slice(k,m));else{let me=_.slice(0,m);me.endsWith(y)&&(me=me.slice(0,me.length-y.length)),N(me)}if(Q){const me=b_(se)?.marker??"**",xe=a.push("strong_open","",0);xe.markup=me;const Ye=a.push("math_inline","math",0);Ye.content=Oa(ee,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${ee}${w}`,Ye.loading=!0,xe.content=ee,a.push("strong_close","",0)}else{const me=a.push("math_inline","math",0);me.content=Oa(ee,t),me.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",me.raw=`${y}${ee}${w}`,me.loading=!0}a.pos=_.length}m=_.length,k=m}break}}const M=_.slice(C+y.length,D),R=M.includes("`"),O=!M||!M.trim(),U=y==="$",Z=_[D+w.length],q=U&&Dh(M,Z),te=U&&Vh(M);if(c?R||O||q||te:R||O||q||te||!U&&!Qa(M)){m=D+w.length;const ee=_.slice(a.pos,m);a.pending||(N(ee),k=m);continue}if(z=!0,!r){const ee=_.slice(a.pos-(a.pending??"").length,C);let J=_.slice(0,m)?_.slice(k,C):ee;const se=k_(J)%2===1;C!==a.pos&&se&&(J=a.pending+_.slice(a.pos,C));const Q=se?b_(J):null,me=Q?.marker??"**";if(a.pending!==J)if(a.pending="",se)if(Q){const xe=J.slice(Q.index+me.length);N(J.slice(0,Q.index));const Ye=a.push("strong_open","",0);Ye.markup=me;const at=a.push("text","",0);at.content=xe,a.push("strong_close","",0)}else N(J);else N(J);if(se){const xe=a.push("strong_open","",0);xe.markup=me;const Ye=a.push("math_inline","math",0);Ye.content=Oa(M,t),Ye.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",Ye.raw=`${y}${M}${w}`,Ye.loading=!1;const at=_.slice(D+w.length).startsWith(me);return at&&a.push("strong_close","",0),a.pos=d(_,D+w.length),m=a.pos,k=m,at||a.push("strong_close","",0),!0}else{const xe=a.push("math_inline","math",0);xe.content=Oa(M,t),xe.markup=y==="$$"?"$$":y==="\\("?"\\(\\)":y==="$"?"$":"()",xe.raw=`${y}${M}${w}`,xe.loading=!1}}return m=d(_,D+w.length),k=m,a.pos=m,!0}if(z){if(r)a.pos=m;else{if(y==="$$"&&m<_.length&&_.slice(m).includes("$")){let C=m;for(;!(C>=_.length);){const F=J8(_,C);if(F===-1)break;if(F+1<_.length&&_[F+1]==="$"){C=F+2;continue}if(F>0&&_[F-1]==="$"){C=F+1;continue}const H=Hh(_,F+1);if(H===-1)break;const D=_.slice(F+1,H),M=D.includes("`"),R=!D||!D.trim(),O=_[H+1],U=Dh(D,O),Z=Vh(D);if(!M&&!R&&!U&&!Z){const q=_.slice(m,F);q&&N(q);const te=a.push("math_inline","math",0);te.content=Oa(D,t),te.markup="$",te.raw=`$${D}$`,te.loading=!1,m=H+1,C=H+1}else N("$"),C=F+1}C<_.length&&N(_.slice(C))}else m<_.length&&N(_.slice(m));a.pos=_.length}return!0}}return!1},s=(l,r,a,c)=>{const u=l,d=!u?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],h=u.bMarks[r]+u.tShift[r];let m=u.src.slice(h,u.eMarks[r]).trim(),k=!1,x="",y="",w=!1,_="",A=!1;for(const[q,te]of p)if(m.startsWith(q))if(q.includes("[")){const ee=q==="\\["?m.slice(q.length):"";if(q==="\\["&&jc(ee,te)===-1&&!/^\s*!\[/.test(ee)&&!ee.includes("`")&&Qa(ee)){k=!0,x=q,y=te;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(r+1=0?"\\]":y,I=L>=0?L:jc(m,y,z);if(!w&&I>x.length){const q=m.slice(P+x.length,I),te=u.push("math_block","math",0);te.content=Oa(q),te.markup=x==="$$"?"$$":x==="["?"[]":"\\[\\]",te.map=[r,r+1],te.raw=`${x}${q}${T}`,te.block=!0,te.loading=!1,u.line=r+1;const ee=m.slice(I+T.length);return ee.trim()&&n(u,ee,r),!0}let N=r,C="",F=!1,H="",D=r;const M=w?m:m===x?"":m.slice(x.length),R=!f&&x==="\\["?"]":"",O=jc(M,y);if(O!==-1){const q=O;C=M.slice(0,q),H=M.slice(q+y.length),D=w?r+1:r,F=!0,N=D}else for(M&&!w&&(C=M),N=r+1;N{const u=l,d=u.bMarks[r]+u.tShift[r],f=u.src.slice(d,u.eMarks[r]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(l,r,a,c)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function m0e(e){const t=e.renderer.rules.image||function(n,o,s,i,l){const r=n,a=l;return a.renderToken?a.renderToken(r,o,s):""};e.renderer.rules.image=(n,o,s,i,l)=>{const r=n;return r[o].attrSet?.("loading","lazy"),t(r,o,s,i,l)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
        ${e.utils.escapeHtml(String(s.content??""))}
        `})}const g0e=/^\s]/i,v0e=/^<\/a\s*>/i;function y0e(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const l=String(i.content??"");g0e.test(l)&&o>0&&o--,v0e.test(l)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function w0e(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const l=s.filter(r=>y0e(r,i));if(l.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:l}))})}function k0e(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(r=>r.name==="link")?.fn,s=n?.find(r=>r.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,l=e;l.__markstreamOriginalValidateLink=i,t.at("link",(...r)=>{const a=r[0].md,c=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof c!="function")return o(...r);const u=a.validateLink;a.validateLink=c;try{return o(...r)}finally{a.validateLink=u}}),t.at("image",(...r)=>{const a=r[0].md;if(!a)return s(...r);const c=a.validateLink;a.validateLink=i;try{return s(...r)}finally{a.validateLink=c}})}function b0e(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new Xre({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:l=>!$0(l,{tagName:"a",attrName:"href"})}),k0e(i),w0e(i),(e.enableMath??!0)&&h0e(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&vae(i),e.enableFixIndentedCodeBlock!==!1&&Oae(i),w1e(i),x1e(i),b1e(i),A1e(i),m0e(i),Fae(i,{customHtmlTags:e.customHtmlTags}),i}function N0(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>N0(n))),t}function _0e(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function x0e(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function S0e(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function L3(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function T_(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function E_(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function A0e(e,t){const n=[],o=[],s=[],i=[],l=e.split(C0e),r=/\r?\n$/.test(e),a=l.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),c=p=>{const h=p;if(!QI.some(m=>h.startsWith(m)))if(h.startsWith("-")){const m=h.slice(1);s.push(E_(m,a))}else if(h.startsWith("+")){const m=h.slice(1);i.push(E_(m,a))}else{T_(n,o,s,i);const m=a&&h.startsWith(" ")?h.slice(1):h;n.push(m),o.push(m)}},u=r?Math.max(0,l.length-1):l.length;for(let p=0;p0||i.length>0)&&T_(n,o,s,i);const d=n.join(` +`:""}${y}`,Z.map=[r,N+1],Z.block=!0,Z.loading=!F,u.line=N+1,H.trim()&&n(u,H,D),!0},i=(l,r,a,c)=>{const u=l,d=u.bMarks[r]+u.tShift[r],f=u.src.slice(d,u.eMarks[r]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(l,r,a,c)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function g0e(e){const t=e.renderer.rules.image||function(n,o,s,i,l){const r=n,a=l;return a.renderToken?a.renderToken(r,o,s):""};e.renderer.rules.image=(n,o,s,i,l)=>{const r=n;return r[o].attrSet?.("loading","lazy"),t(r,o,s,i,l)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
        ${e.utils.escapeHtml(String(s.content??""))}
        `})}const v0e=/^\s]/i,y0e=/^<\/a\s*>/i;function w0e(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const l=String(i.content??"");v0e.test(l)&&o>0&&o--,y0e.test(l)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function k0e(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const l=s.filter(r=>w0e(r,i));if(l.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:l}))})}function b0e(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(r=>r.name==="link")?.fn,s=n?.find(r=>r.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,l=e;l.__markstreamOriginalValidateLink=i,t.at("link",(...r)=>{const a=r[0].md,c=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof c!="function")return o(...r);const u=a.validateLink;a.validateLink=c;try{return o(...r)}finally{a.validateLink=u}}),t.at("image",(...r)=>{const a=r[0].md;if(!a)return s(...r);const c=a.validateLink;a.validateLink=i;try{return s(...r)}finally{a.validateLink=c}})}function _0e(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new Jre({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:l=>!$0(l,{tagName:"a",attrName:"href"})}),b0e(i),k0e(i),(e.enableMath??!0)&&m0e(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&yae(i),e.enableFixIndentedCodeBlock!==!1&&Hae(i),k1e(i),S1e(i),_1e(i),T1e(i),g0e(i),jae(i,{customHtmlTags:e.customHtmlTags}),i}function N0(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>N0(n))),t}function x0e(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function S0e(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function C0e(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function L3(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function E_(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function I_(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function T0e(e,t){const n=[],o=[],s=[],i=[],l=e.split(M0e),r=/\r?\n$/.test(e),a=l.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),c=p=>{const h=p;if(!eL.some(m=>h.startsWith(m)))if(h.startsWith("-")){const m=h.slice(1);s.push(I_(m,a))}else if(h.startsWith("+")){const m=h.slice(1);i.push(I_(m,a))}else{E_(n,o,s,i);const m=a&&h.startsWith(" ")?h.slice(1):h;n.push(m),o.push(m)}},u=r?Math.max(0,l.length-1):l.length;for(let p=0;p0||i.length>0)&&E_(n,o,s,i);const d=n.join(` `),f=o.join(` `);return{original:t&&r&&d?`${d} `:d,updated:t&&r&&f?`${f} -`:f}}function fv(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},o=typeof n.closed=="boolean"?n.closed:void 0,s=o===!0||o!==!1&&t,i=String(e.info??""),l=i.startsWith("diff"),r=l?(()=>{const c=i,u=c.indexOf(" ");return u===-1?"":String(c.slice(u+1)??"")})():i;let a=String(e.content??"");if(A_.test(a)&&(a=a.replace(A_,"")),l){const{original:c,updated:u}=A0e(a,s===!0);return{type:"code_block",language:r,code:String(u??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t,originalCode:c,updatedCode:u}}return{type:"code_block",language:r,code:String(a??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t}}function T0e(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function E0e(){return{type:"hardbreak",raw:`\\ -`}}function I0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i\s*$/.test(t)||k1.has(e)}function L0e(e){if(!e||e.length===0)return I_();const t=qh.get(e);if(t)return t;const n=e.map(Vl).filter(Boolean);if(!n.length){const s=I_();return qh.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:Dp({customHtmlTags:e})};return qh.set(e,o),o}function oL(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function $0e(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function M5(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function N0e(e,t,n){const o=e.slice();return M5(o,"href")||o.push(["href",t]),n!=null&&!M5(o,"title")&&o.push(["title",n]),o}function Q8(e){return e.map(oL).join("")}function g4(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:g4(o.children)});continue}t.push(o)}return t}function z0e(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(A.toLowerCase())||(m+=A),x=!0,k=!0}const y=[],w=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let _;for(;(_=w.exec(r))!==null;){const A=_[1],P=_[2]||_[3]||_[4]||"";y.push([A,P])}if(c?.has(a)){const A=$0e(e);return[{type:a,tag:a,attrs:y,content:A?A.inner:p.innerTokens.length?Q8(p.innerTokens):"",children:p.innerTokens.length?o(p.innerTokens,s,i,l):[],raw:A?.raw??m,loading:e.loading||k,autoClosed:x},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:y,content:m,children:h,raw:m,loading:k,autoClosed:x},p.nextIndex]}function sL(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>sL(t)).join(""):String(e.content??"")}function R0e(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>sL(t)).join("")}function L_(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],l=R0e(o??e);let r="";l?r=l:i!=null&&String(i).length>0?r=String(i):o?.content!=null&&String(o.content).length>0?r=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?r=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?r=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(r=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,c=a===null?null:String(a),u=String(e.content??"");return{type:"image",src:s,alt:r,title:c,raw:u,loading:t}}function P0e(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function F0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function O0e(e,t,n){const o=e.slice();return A5(o,"href")||o.push(["href",t]),n!=null&&!A5(o,"title")&&o.push(["title",n]),o}function $3(e,t,n){const o=e[t],s=j0e(o.attrs),i=String(A5(s,"href")??""),l=A5(s,"title"),r=l==null?null:String(l),a=O0e(s,i,r);let c=t+1;const u=[];let d=!0;for(;ck.type==="strong_open")){const k=String(p.content??""),x=String(p.raw??k),y=N0(p);y.content=k.slice(0,-2),y.raw=x.replace(/\*\*$/,""),f=u.slice(),f[f.length-1]=y}const h=Ko(f,void 0,void 0,n),m=h.map(k=>{const x=k;return"content"in k?String(x.content??""):String(x.raw??"")}).join("");return{node:{type:"link",href:i,title:r,text:m,children:h,raw:`[${m}](${i}${r?` "${r}"`:""})`,loading:d,attrs:a},nextIndex:c0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,Q0e=/\p{P}/u,ece=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,tce=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,nce=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,oce=/:\/\//,e7=1,iL=2,sce=4,ice=8,lL=16,Za=32,v4=64,qd=128,rL=256,lce=512,Ud=1024,rce=1982;function N3(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function b1(e){return!!e&&X0e.test(e)}function _1(e){return!!e&&(J0e.test(e)||Q0e.test(e))}function cL(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&ece.test(e)}function uL(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&tce.test(e)}function cce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||b1(o)?!1:!(_1(o)&&!cL(o,n)&&n&&!b1(n)&&!_1(n))}function uce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||b1(n)?!1:!(_1(n)&&!uL(n,o)&&o&&!b1(o)&&!_1(o))}function dce(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||b1(o)?!1:!(_1(o)&&!cL(o,n)&&n&&!b1(n)&&!_1(n))}function pce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||b1(n)?!1:!(_1(n)&&!uL(n,o)&&o&&!b1(o)&&!_1(o))}function hce(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const yce=/[\p{L}\p{N}]/u,wce=/^[\p{L}\p{N}]+$/u;function t7(e){return e?yce.test(e):!1}function dL(e){return e?wce.test(e):!1}function p2(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function xce(e){return e?nce.test(e)||oce.test(e):!1}function Sce(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Ko(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=xf(t),l={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(l.filename||l.explicitFilename||l.marketTicker)&&(o={...o,__linkifyDemotionContext:l});const r=o,a=[];let c=null,u=0;const d=o?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function h(){c=null}function m(X,oe){const F=e.length===1?t:String(oe.content??""),K=[],he=kce(X);if(he!==-1){A(X.slice(0,he),X.slice(0,he));const ve=X.slice(he);return ve&&($({type:"text",content:ve,raw:ve}),u--),u++,!0}if(Z0e.test(X)){const ve=X.indexOf("~~");ve!==-1&&K.push({type:"strikethrough",index:ve})}if(K0e.test(X)){const ve=X.indexOf("**");ve!==-1&&K.push({type:"strong",index:ve})}if(/[^*]*\*[^*]+/.test(X)){const ve=F?aL(F,0):X.indexOf("*");if(F&&ve===-1)return!1;ve!==-1&&K.push({type:"emphasis",index:ve})}K.sort((ve,ie)=>ve.index!==ie.index?ve.index-ie.index:ve.type===ie.type?0:ve.type==="strong"?-1:ie.type==="strong"?1:0);const ye=K[0];if(!ye)return!1;if(ye.type==="strikethrough"){const ve=ye.index,ie=ve>-1?X.slice(0,ve):"";if(ie&&A(ie,ie),ve===-1)return u++,!0;const de=X.indexOf("~~",ve+2),be=de===-1?X.slice(ve+2):X.slice(ve+2,de),Se=de===-1?"":X.slice(de+2),{node:je}=N_([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:be,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return h(),_(je),Se&&($({type:"text",content:Se,raw:Se}),u--),u++,!0}if(ye.type==="strong"){const ve=ye.index,ie=ve>-1?X.slice(0,ve):"";if(ie&&A(ie,ie),ve===-1)return u++,!0;if(t&&ve===0){let le=!1,fe=0;for(;fe=2)return A(X,X),u++,!0}}if(t&&(X.match(/\*/g)||[]).length>ace(t))return A(X.slice(ie.length),X.slice(ie.length)),u++,!0;const de=p2(X,ve);if(de.len>=3){const le=_ce(X,ve+de.len);if(le!==-1){const fe=X.slice(ve+de.len,le);if(bce(fe)){const{node:ge}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:fe,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);h(),_(ge);const Oe=X.slice(le+3);return Oe&&($({type:"text",content:Oe,raw:Oe}),u--),u++,!0}}}if(!fce(X,ve)){const le=X.slice(ve,ve+de.len);A(le,le);const fe=X.slice(ve+de.len);return fe&&($({type:"text",content:fe,raw:fe}),u--),u++,!0}const be=hce(X,ve+2);let Se="",je="";if(be.index!==-1){Se=X.slice(ve+2,be.index),je=X.slice(be.index+2);const le=be.index,fe=p2(X,le);if(de.intraword&&fe.intraword&&!dL(Se)||!Se&&de.len>=4&&de.intraword)return A(X.slice(ie.length),X.slice(ie.length)),u++,!0}else{if(d||be.sawInvalidClose||de.intraword)return A(X.slice(ie.length),X.slice(ie.length)),u++,!0;Se=X.slice(ve+2),je=""}if(!Se&&/^\*+$/.test(je))return A(X,X),u++,!0;const{node:et}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:Se,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return h(),_(et),je&&($({type:"text",content:je,raw:je}),u--),u++,!0}if(ye.type==="emphasis"){let ve=ye.index;ve===-1&&(ve=0);const ie=X.slice(0,ve);if(ie&&A(ie,ie),!cce(X,ve)){A(X[ve],X[ve]);const le=X.slice(ve+1);return le&&($({type:"text",content:le,raw:le}),u--),u++,!0}const de=p2(X,ve),be=dce(F,X,ve+1),Se=be.index,je=e[u+1];if(o?.final&&je?.type==="em_open"&&Se!==-1&&X.slice(ve+1,Se).trim()!==X.slice(ve+1,Se)||Se===-1&&(be.sawInvalidClose||o?.final||de.intraword||!t7(X[ve+1])))return A(X.slice(ve),X.slice(ve)),u++,!0;const{node:et}=L3([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Se>-1?X.slice(ve+1,Se):X.slice(ve+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(h(),_(et),Se!==-1&&Se{for(let et=0;et=0&&je[fe]==="\\";fe--)le++;if(le%2===0)return et}return-1})(X);if(K===-1)return!1;let he=1;for(let je=K+1;jeye?.type==="math_inline")||!G0e.test(X))return null;const F=oe.parseInline(X,{__markstreamFinal:!!o?.final});if(!Array.isArray(F)||F.length===0)return null;const K=(F.find(ye=>ye?.type==="inline")?.children??[]).filter(ye=>!(ye?.type==="text"&&String(ye.content??"")===""));if(!K.length||!K.some(ye=>ye?.type!=="text")||K.length===1&&K[0]?.type==="text"&&String(K[0].content??"")===X)return null;const he=Ko(K,X,n,o);return he.length?he:null}function y(X){h(),a.push(X)}function w(X){h();const oe=N0(X);a.push(oe)}function _(X){y(X)}function A(X,oe){c?(c.content+=X,c.raw+=oe??X):(c={type:"text",content:String(X??""),raw:String(oe??X??"")},a.push(c))}function P(X,oe){if(!X)return;const F=Ko([{...oe,type:"text",content:X,raw:X}],X,n,o);if(F.length===1&&F[0]?.type==="text"){const K=F[0];A(String(K.content??""),String(K.raw??K.content??""));return}for(const K of F)_(K)}function z(X,oe){return String(X.markup??"").startsWith(oe)}function L(X){if(!c||X.loading!==!0||X.markup!=="\\(\\)")return;const oe=e[u-1];!oe||oe.type!=="text"||!z(oe,"\\(")||c.content.endsWith("(")&&(c.content=c.content.slice(0,-1),c.raw.endsWith("(")&&(c.raw=c.raw.slice(0,-1)),!c.content&&a[a.length-1]===c&&(a.pop(),c=null))}function E(X){return X.endsWith("](")?e[u+1]?.type==="link_open"&&e[u+1]?.markup==="linkify"&&e[u+2]?.type==="text"&&e[u+3]?.type==="link_close"&&e[u+4]?.type==="text"&&String(e[u+4]?.content??"").startsWith(")"):!1}function T(X,oe,F=N3(X)){let K=X;const he=String(oe.content??"");return(F&e7)!==0&&K.endsWith("\\")&&!z(oe,"\\\\")&&!he.endsWith("\\\\")&&(K=K.slice(0,-1)),(F&Ud)!==0&&K.endsWith("(")&&!z(oe,"\\(")&&!he.endsWith("\\(")&&(K=K.slice(0,-1)),(F&iL)!==0&&/\*+$/.test(K)&&!z(oe,"\\*")&&!he.endsWith("\\*")&&(K=K.replace(/\*+$/,"")),K}for(;u{const c=i,u=c.indexOf(" ");return u===-1?"":String(c.slice(u+1)??"")})():i;let a=String(e.content??"");if(T_.test(a)&&(a=a.replace(T_,"")),l){const{original:c,updated:u}=T0e(a,s===!0);return{type:"code_block",language:r,code:String(u??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t,originalCode:c,updatedCode:u}}return{type:"code_block",language:r,code:String(a??""),raw:String(a??""),diff:l,loading:o===!0?!1:o===!1?!0:!t}}function E0e(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function I0e(){return{type:"hardbreak",raw:`\\ +`}}function L0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i\s*$/.test(t)||k1.has(e)}function $0e(e){if(!e||e.length===0)return L_();const t=qh.get(e);if(t)return t;const n=e.map(Vl).filter(Boolean);if(!n.length){const s=L_();return qh.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:Dp({customHtmlTags:e})};return qh.set(e,o),o}function sL(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function N0e(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function M5(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function z0e(e,t,n){const o=e.slice();return M5(o,"href")||o.push(["href",t]),n!=null&&!M5(o,"title")&&o.push(["title",n]),o}function e7(e){return e.map(sL).join("")}function g4(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:g4(o.children)});continue}t.push(o)}return t}function B0e(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(A.toLowerCase())||(m+=A),x=!0,k=!0}const y=[],w=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let _;for(;(_=w.exec(r))!==null;){const A=_[1],P=_[2]||_[3]||_[4]||"";y.push([A,P])}if(c?.has(a)){const A=N0e(e);return[{type:a,tag:a,attrs:y,content:A?A.inner:p.innerTokens.length?e7(p.innerTokens):"",children:p.innerTokens.length?o(p.innerTokens,s,i,l):[],raw:A?.raw??m,loading:e.loading||k,autoClosed:x},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:y,content:m,children:h,raw:m,loading:k,autoClosed:x},p.nextIndex]}function iL(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>iL(t)).join(""):String(e.content??"")}function P0e(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>iL(t)).join("")}function $_(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],l=P0e(o??e);let r="";l?r=l:i!=null&&String(i).length>0?r=String(i):o?.content!=null&&String(o.content).length>0?r=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?r=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?r=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(r=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,c=a===null?null:String(a),u=String(e.content??"");return{type:"image",src:s,alt:r,title:c,raw:u,loading:t}}function F0e(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function j0e(e,t,n){const o=[];let s="",i=t+1;const l=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function H0e(e,t,n){const o=e.slice();return A5(o,"href")||o.push(["href",t]),n!=null&&!A5(o,"title")&&o.push(["title",n]),o}function $3(e,t,n){const o=e[t],s=O0e(o.attrs),i=String(A5(s,"href")??""),l=A5(s,"title"),r=l==null?null:String(l),a=H0e(s,i,r);let c=t+1;const u=[];let d=!0;for(;ck.type==="strong_open")){const k=String(p.content??""),x=String(p.raw??k),y=N0(p);y.content=k.slice(0,-2),y.raw=x.replace(/\*\*$/,""),f=u.slice(),f[f.length-1]=y}const h=Ko(f,void 0,void 0,n),m=h.map(k=>{const x=k;return"content"in k?String(x.content??""):String(x.raw??"")}).join("");return{node:{type:"link",href:i,title:r,text:m,children:h,raw:`[${m}](${i}${r?` "${r}"`:""})`,loading:d,attrs:a},nextIndex:c0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,ece=/\p{P}/u,tce=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,nce=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,oce=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,sce=/:\/\//,t7=1,lL=2,ice=4,lce=8,rL=16,Za=32,v4=64,qd=128,aL=256,rce=512,Ud=1024,ace=1982;function N3(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function b1(e){return!!e&&J0e.test(e)}function _1(e){return!!e&&(Q0e.test(e)||ece.test(e))}function uL(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&tce.test(e)}function dL(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&nce.test(e)}function uce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||b1(o)?!1:!(_1(o)&&!uL(o,n)&&n&&!b1(n)&&!_1(n))}function dce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||b1(n)?!1:!(_1(n)&&!dL(n,o)&&o&&!b1(o)&&!_1(o))}function fce(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||b1(o)?!1:!(_1(o)&&!uL(o,n)&&n&&!b1(n)&&!_1(n))}function hce(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||b1(n)?!1:!(_1(n)&&!dL(n,o)&&o&&!b1(o)&&!_1(o))}function mce(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const wce=/[\p{L}\p{N}]/u,kce=/^[\p{L}\p{N}]+$/u;function n7(e){return e?wce.test(e):!1}function fL(e){return e?kce.test(e):!1}function p2(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function Sce(e){return e?oce.test(e)||sce.test(e):!1}function Cce(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Ko(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=xf(t),l={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(l.filename||l.explicitFilename||l.marketTicker)&&(o={...o,__linkifyDemotionContext:l});const r=o,a=[];let c=null,u=0;const d=o?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function h(){c=null}function m(X,oe){const j=e.length===1?t:String(oe.content??""),K=[],he=bce(X);if(he!==-1){A(X.slice(0,he),X.slice(0,he));const ve=X.slice(he);return ve&&(N({type:"text",content:ve,raw:ve}),u--),u++,!0}if(K0e.test(X)){const ve=X.indexOf("~~");ve!==-1&&K.push({type:"strikethrough",index:ve})}if(G0e.test(X)){const ve=X.indexOf("**");ve!==-1&&K.push({type:"strong",index:ve})}if(/[^*]*\*[^*]+/.test(X)){const ve=j?cL(j,0):X.indexOf("*");if(j&&ve===-1)return!1;ve!==-1&&K.push({type:"emphasis",index:ve})}K.sort((ve,ie)=>ve.index!==ie.index?ve.index-ie.index:ve.type===ie.type?0:ve.type==="strong"?-1:ie.type==="strong"?1:0);const ye=K[0];if(!ye)return!1;if(ye.type==="strikethrough"){const ve=ye.index,ie=ve>-1?X.slice(0,ve):"";if(ie&&A(ie,ie),ve===-1)return u++,!0;const de=X.indexOf("~~",ve+2),be=de===-1?X.slice(ve+2):X.slice(ve+2,de),Se=de===-1?"":X.slice(de+2),{node:je}=z_([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:be,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return h(),_(je),Se&&(N({type:"text",content:Se,raw:Se}),u--),u++,!0}if(ye.type==="strong"){const ve=ye.index,ie=ve>-1?X.slice(0,ve):"";if(ie&&A(ie,ie),ve===-1)return u++,!0;if(t&&ve===0){let le=!1,fe=0;for(;fe=2)return A(X,X),u++,!0}}if(t&&(X.match(/\*/g)||[]).length>cce(t))return A(X.slice(ie.length),X.slice(ie.length)),u++,!0;const de=p2(X,ve);if(de.len>=3){const le=xce(X,ve+de.len);if(le!==-1){const fe=X.slice(ve+de.len,le);if(_ce(fe)){const{node:ge}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:fe,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);h(),_(ge);const Oe=X.slice(le+3);return Oe&&(N({type:"text",content:Oe,raw:Oe}),u--),u++,!0}}}if(!pce(X,ve)){const le=X.slice(ve,ve+de.len);A(le,le);const fe=X.slice(ve+de.len);return fe&&(N({type:"text",content:fe,raw:fe}),u--),u++,!0}const be=mce(X,ve+2);let Se="",je="";if(be.index!==-1){Se=X.slice(ve+2,be.index),je=X.slice(be.index+2);const le=be.index,fe=p2(X,le);if(de.intraword&&fe.intraword&&!fL(Se)||!Se&&de.len>=4&&de.intraword)return A(X.slice(ie.length),X.slice(ie.length)),u++,!0}else{if(d||be.sawInvalidClose||de.intraword)return A(X.slice(ie.length),X.slice(ie.length)),u++,!0;Se=X.slice(ve+2),je=""}if(!Se&&/^\*+$/.test(je))return A(X,X),u++,!0;const{node:et}=Cd([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:Se,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return h(),_(et),je&&(N({type:"text",content:je,raw:je}),u--),u++,!0}if(ye.type==="emphasis"){let ve=ye.index;ve===-1&&(ve=0);const ie=X.slice(0,ve);if(ie&&A(ie,ie),!uce(X,ve)){A(X[ve],X[ve]);const le=X.slice(ve+1);return le&&(N({type:"text",content:le,raw:le}),u--),u++,!0}const de=p2(X,ve),be=fce(j,X,ve+1),Se=be.index,je=e[u+1];if(o?.final&&je?.type==="em_open"&&Se!==-1&&X.slice(ve+1,Se).trim()!==X.slice(ve+1,Se)||Se===-1&&(be.sawInvalidClose||o?.final||de.intraword||!n7(X[ve+1])))return A(X.slice(ve),X.slice(ve)),u++,!0;const{node:et}=L3([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Se>-1?X.slice(ve+1,Se):X.slice(ve+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(h(),_(et),Se!==-1&&Se{for(let et=0;et=0&&je[fe]==="\\";fe--)le++;if(le%2===0)return et}return-1})(X);if(K===-1)return!1;let he=1;for(let je=K+1;jeye?.type==="math_inline")||!Y0e.test(X))return null;const j=oe.parseInline(X,{__markstreamFinal:!!o?.final});if(!Array.isArray(j)||j.length===0)return null;const K=(j.find(ye=>ye?.type==="inline")?.children??[]).filter(ye=>!(ye?.type==="text"&&String(ye.content??"")===""));if(!K.length||!K.some(ye=>ye?.type!=="text")||K.length===1&&K[0]?.type==="text"&&String(K[0].content??"")===X)return null;const he=Ko(K,X,n,o);return he.length?he:null}function y(X){h(),a.push(X)}function w(X){h();const oe=N0(X);a.push(oe)}function _(X){y(X)}function A(X,oe){c?(c.content+=X,c.raw+=oe??X):(c={type:"text",content:String(X??""),raw:String(oe??X??"")},a.push(c))}function P(X,oe){if(!X)return;const j=Ko([{...oe,type:"text",content:X,raw:X}],X,n,o);if(j.length===1&&j[0]?.type==="text"){const K=j[0];A(String(K.content??""),String(K.raw??K.content??""));return}for(const K of j)_(K)}function z(X,oe){return String(X.markup??"").startsWith(oe)}function L(X){if(!c||X.loading!==!0||X.markup!=="\\(\\)")return;const oe=e[u-1];!oe||oe.type!=="text"||!z(oe,"\\(")||c.content.endsWith("(")&&(c.content=c.content.slice(0,-1),c.raw.endsWith("(")&&(c.raw=c.raw.slice(0,-1)),!c.content&&a[a.length-1]===c&&(a.pop(),c=null))}function T(X){return X.endsWith("](")?e[u+1]?.type==="link_open"&&e[u+1]?.markup==="linkify"&&e[u+2]?.type==="text"&&e[u+3]?.type==="link_close"&&e[u+4]?.type==="text"&&String(e[u+4]?.content??"").startsWith(")"):!1}function I(X,oe,j=N3(X)){let K=X;const he=String(oe.content??"");return(j&t7)!==0&&K.endsWith("\\")&&!z(oe,"\\\\")&&!he.endsWith("\\\\")&&(K=K.slice(0,-1)),(j&Ud)!==0&&K.endsWith("(")&&!z(oe,"\\(")&&!he.endsWith("\\(")&&(K=K.slice(0,-1)),(j&lL)!==0&&/\*+$/.test(K)&&!z(oe,"\\*")&&!he.endsWith("\\*")&&(K=K.replace(/\*+$/,"")),K}for(;u=0;le--){const fe=a[le];if(fe.type!=="text")break;de=le,be=String(fe.content??"")+be}deie==="href")?.[1],ve=String(ye??"");if(t&&ve){const ie=t.indexOf("](");if(ie!==-1){const de=t.indexOf(")",ie+2);de===-1?oe.loading=!0:oe.loading&&t.slice(ie+2,de).includes(ve)&&(oe.loading=!1)}}R(oe)||y(oe)}function D(X){if(X.markup!=="linkify")return!1;const{node:oe,nextIndex:F}=$3(e,u,o);return U(oe,F)?(u=F,!0):!1}function M(X){h(),_(H0e(X)),u++}function R(X){if(X.type!=="link")return!1;const oe=a[a.length-1];if(!oe||oe.type!=="text")return!1;const F=String(oe.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!F)return!1;const K=X,he=String(K.href??""),ye=String(K.text??""),ve=String(F[2]??""),ie=he.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!he||!(ye===he||ye===ie||xce(ye)))return!1;const de=String(F[1]??"");return de?(oe.content=de,oe.raw=de):a.pop(),y({...X,text:ve,children:[{type:"text",content:ve,raw:ve}],raw:`[${ve}](${he}${K.title?` "${K.title}"`:""})`}),!0}function O(X){if(X.type!=="link")return!1;const oe=X,F=String(oe.href??"");return F?U({href:F,title:oe.title==null||oe.title===""?null:String(oe.title),loading:!!oe.loading},u+1):!1}function U(X,oe){const F=a[a.length-1];if(F?.type!=="image"||F.src||!F.loading||!String(F.raw??"").endsWith("]("))return!1;const K=e[oe],he=String(K?.content??"");if(K?.type!=="text"||!he.startsWith(")"))return!1;a.pop(),c=null;const ye=String(F.alt??"");y({type:"image",src:X.href,alt:ye,title:X.title,raw:`![${ye}](${X.href}${X.title?` "${X.title}"`:""})`,loading:!!X.loading});const ve=he.slice(1),ie=N0(K);return ie.content=ve,ie.raw=ve,p()[oe]=ie,!0}function Z(X){if(X.type!=="link")return!1;const oe=a[a.length-1],F=e[u-1];if(!oe||oe.type!=="text"||F?.type!=="text")return!1;const K=String(oe.content??""),he=String(F.content??"");if(!K.endsWith("!")||!he.endsWith("!")||z(F,"\\!"))return!1;const ye=K.slice(0,-1);ye?(oe.content=ye,oe.raw=ye,c=oe):(a.pop(),c=null);const ve=X,ie=String(ve.text??ve.children?.map(Se=>String(Se?.content??Se?.raw??"")).join("")??""),de=String(ve.href??""),be=ve.title==null||ve.title===""?null:String(ve.title);return y({type:"image",src:de,alt:ie,title:be,raw:`![${ie}](${de}${be?` "${be}"`:""})`,loading:!!ve.loading}),!0}function q(X,oe="",F=null){const K=String(X.alt??X.raw??"");return{type:"link",href:oe,title:F,text:K,children:[X],raw:`[${K}](${oe}${F?` "${F}"`:""})`,loading:!0}}function te(X){const oe=X.startsWith("![")?X:`![${X}`,F=oe.slice(2),K=F.indexOf("](");return{type:"image",src:"",alt:K===-1?F.replace(/\]$/,""):F.slice(0,K),title:null,raw:oe,loading:!0}}function ee(X){const oe=X.indexOf("[![");if(oe===-1||typeof t=="string"&&e.length===1&&vce(t,oe,"["))return!1;const F=X.slice(0,oe);return F&&A(F,F),y(q(te(X.slice(oe+1)))),u++,!0}function J(X){if(o?.final)return!1;const oe=e[u-1];if(oe?.type!=="text"||!String(oe.content??"").endsWith("[")||z(oe,"\\["))return!1;const F=a[a.length-1];if(F?.type==="text"&&F.content.endsWith("[")){const K=F.content.slice(0,-1);K?(F.content=K,F.raw=K,c=F):(a.pop(),c=null)}return y(q(L_(X))),u++,!0}function se(X){if(X.type!=="link")return!1;const oe=X,F=String(oe.raw??""),K=String(oe.text??"");if(!F.startsWith("[![")&&!K.startsWith("!["))return!1;const he=oe.title==null||oe.title===""?null:String(oe.title);return y(q({type:"image",src:String(oe.href??""),alt:K.replace(/^!\[/,"").replace(/\]$/,""),title:he,raw:F.startsWith("[![")?F.slice(1):F,loading:!0})),!0}function Q(X){if(!X.startsWith("]("))return!1;const oe=e[u-2];if(oe?.type==="text"&&String(oe.content??"").endsWith("[")&&z(oe,"\\["))return!1;const F=a[a.length-1];if(F?.type!=="image"&&F?.type!=="link")return!1;const K=F,he=F?.type==="link"&&Array.isArray(K.children)&&K.children.length===1&&K.children[0]?.type==="image"?a.pop():null,ye=he?he.children[0]:a.pop();if(!ye||ye.type!=="image")return!1;const ve=e[u+1];let ie=String(he?.href??""),de=he?.title==null?null:String(he.title),be=!0;if(ve?.type==="link_open"){const{node:je,nextIndex:et}=$3(e,u+1,o);ie=je.href,de=je.title,be=!0,u=et}else{if(ie=X.slice(2),ie.includes('"')){const je=ie.split('"');ie=String(je[0]??"").trim(),de=je[1]==null?null:String(je[1]).trim()}u++}const Se=q(ye,ie,de);return Se.loading=be,y(Se),!0}function me(){const X=e[u-3];return e[u-2]?.type==="image"&&e[u-1]?.type==="text"&&String(e[u-1].content??"")==="]("&&X?.type==="text"&&String(X.content??"").endsWith("[")&&z(X,"\\[")}function xe(X,oe){const F=X.indexOf("[");if(F===-1)return!1;let K=X.slice(0,F);const he=X.indexOf("](",F);if(he!==-1){const ye=e[u+2];let ve=X.slice(F+1,he);if(ve.includes("[")){const le=ve.indexOf("[");K+=X.slice(0,F+le+1);const fe=F+le+1;ve=X.slice(fe+1,he)}const ie=e[u+1];if(X.endsWith("](")&&ie?.type==="link_open"&&ye){const le=e[u+4];let fe=4,ge=!0;if(le?.type==="text"){const Fe=String(le.content??"");if(Fe.startsWith(")")){ge=!1;const pt=Fe.slice(1);if(pt){const kt=N0(le);kt.content=pt,kt.raw=pt,p()[u+4]=kt}else fe++}else Fe==="."&&fe++}P(K,oe);const Oe=String(ye.content??"");return o?.validateLink&&!o.validateLink(Oe)?A(ve,ve):y({type:"link",href:Oe,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:ge}),u+=fe,!0}const de=X.indexOf(")",he),be=de!==-1?X.slice(he+2,de):"",Se=de===-1;let je=K.match(/\*+$/);if(je&&(K=K.replace(/\*+$/,"")),P(K,oe),je||(je=ve.match(/^\*+/)),!d&&je){const le=je[0].length;ve=ve.replace(/^\*+/,"").replace(/\*+$/,"");const fe=[];if(le===1?fe.push({type:"em_open",tag:"em",nesting:1}):le===2?fe.push({type:"strong_open",tag:"strong",nesting:1}):le===3&&(fe.push({type:"strong_open",tag:"strong",nesting:1}),fe.push({type:"em_open",tag:"em",nesting:1})),fe.push({type:"link",href:be,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:Se}),le===1){fe.push({type:"em_close",tag:"em",nesting:-1});const{node:ge}=L3(fe,0,o);_(ge)}else if(le===2){fe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ge}=Cd(fe,0,void 0,o);_(ge)}else if(le===3){fe.push({type:"em_close",tag:"em",nesting:-1}),fe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ge}=Cd(fe,0,void 0,o);_(ge)}else{const{node:ge}=L3(fe,0,o);_(ge)}}else o?.validateLink&&!o.validateLink(be)?A(ve,ve):y({type:"link",href:be,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:Se});const et=de!==-1?X.slice(de+1):"";return et&&($({type:"text",content:et,raw:et}),u--),u++,!0}return!1}function Ye(X){const oe=X.indexOf("![");if(oe===-1)return!1;const F=X.slice(0,oe);return F&&!c?c={type:"text",content:F,raw:F}:F&&c&&(c.content+=F),c&&(a.push(c),c=null),y(te(X.slice(oe))),u++,!0}function at(X){if(!(X?.startsWith("[")&&n?.type==="list_item_open"))return!1;const oe=X.slice(1).match(/[^\s\]]/);if(oe===null)return u++,!0;if(oe&&/x/i.test(oe[0])){const F=oe[0]==="x"||oe[0]==="X";return y({type:"checkbox_input",checked:F,raw:F?"[x]":"[ ]"}),u++,!0}return!1}return a}function hv(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function z_(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` -`&&l++,{startLine:i,endLine:l}}function Q2(e,t,n,o){const s=Cce(e,t,n);return hv(s.startLine,s.endLine,o)}function Mce(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:hv(o,s,t)}function lo(e,t,n){if(!n?.includeSourceMap)return e;const o=Mce(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function Ace(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),l=Number(s[1]),r=Number(n);return!Number.isFinite(i)||!Number.isFinite(l)||!Number.isFinite(r)||(e.sourceMap=hv(i,Math.max(l,r),o)),e}function Tce(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),l=i.replace(/[ \t\r\n]+$/g,"");if(l===i)break;if(l){s.content=l;break}o.pop();continue}break}}function Ece(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const l=i.replace(/[ \t\r\n\d.)]+$/g,"");l!==i&&(l?s.content=l:o.pop())}break}}function Ice(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Ou(e,t,n){const o=e[t],s=[],i=E1(n,!0);let l=t+1;for(;ld.raw).join("")};n?.includeSourceMap&&lo(u,e[l],n),s.push(u),l=c+1}else l+=1;const r={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(c=>c[0]==="start");if(a){const c=Number(a[1]);return Number.isFinite(c)&&c!==0?c:1}}})(),items:s,raw:s.map(a=>a.raw).join(` -`)};return n?.includeSourceMap&&lo(r,o,n),[r,l+1]}function Lce(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),l=[],r=E1(o,!0);let a=t+1;for(;a=0;le--){const fe=a[le];if(fe.type!=="text")break;de=le,be=String(fe.content??"")+be}deie==="href")?.[1],ve=String(ye??"");if(t&&ve){const ie=t.indexOf("](");if(ie!==-1){const de=t.indexOf(")",ie+2);de===-1?oe.loading=!0:oe.loading&&t.slice(ie+2,de).includes(ve)&&(oe.loading=!1)}}R(oe)||y(oe)}function D(X){if(X.markup!=="linkify")return!1;const{node:oe,nextIndex:j}=$3(e,u,o);return U(oe,j)?(u=j,!0):!1}function M(X){h(),_(D0e(X)),u++}function R(X){if(X.type!=="link")return!1;const oe=a[a.length-1];if(!oe||oe.type!=="text")return!1;const j=String(oe.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!j)return!1;const K=X,he=String(K.href??""),ye=String(K.text??""),ve=String(j[2]??""),ie=he.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!he||!(ye===he||ye===ie||Sce(ye)))return!1;const de=String(j[1]??"");return de?(oe.content=de,oe.raw=de):a.pop(),y({...X,text:ve,children:[{type:"text",content:ve,raw:ve}],raw:`[${ve}](${he}${K.title?` "${K.title}"`:""})`}),!0}function O(X){if(X.type!=="link")return!1;const oe=X,j=String(oe.href??"");return j?U({href:j,title:oe.title==null||oe.title===""?null:String(oe.title),loading:!!oe.loading},u+1):!1}function U(X,oe){const j=a[a.length-1];if(j?.type!=="image"||j.src||!j.loading||!String(j.raw??"").endsWith("]("))return!1;const K=e[oe],he=String(K?.content??"");if(K?.type!=="text"||!he.startsWith(")"))return!1;a.pop(),c=null;const ye=String(j.alt??"");y({type:"image",src:X.href,alt:ye,title:X.title,raw:`![${ye}](${X.href}${X.title?` "${X.title}"`:""})`,loading:!!X.loading});const ve=he.slice(1),ie=N0(K);return ie.content=ve,ie.raw=ve,p()[oe]=ie,!0}function Z(X){if(X.type!=="link")return!1;const oe=a[a.length-1],j=e[u-1];if(!oe||oe.type!=="text"||j?.type!=="text")return!1;const K=String(oe.content??""),he=String(j.content??"");if(!K.endsWith("!")||!he.endsWith("!")||z(j,"\\!"))return!1;const ye=K.slice(0,-1);ye?(oe.content=ye,oe.raw=ye,c=oe):(a.pop(),c=null);const ve=X,ie=String(ve.text??ve.children?.map(Se=>String(Se?.content??Se?.raw??"")).join("")??""),de=String(ve.href??""),be=ve.title==null||ve.title===""?null:String(ve.title);return y({type:"image",src:de,alt:ie,title:be,raw:`![${ie}](${de}${be?` "${be}"`:""})`,loading:!!ve.loading}),!0}function q(X,oe="",j=null){const K=String(X.alt??X.raw??"");return{type:"link",href:oe,title:j,text:K,children:[X],raw:`[${K}](${oe}${j?` "${j}"`:""})`,loading:!0}}function te(X){const oe=X.startsWith("![")?X:`![${X}`,j=oe.slice(2),K=j.indexOf("](");return{type:"image",src:"",alt:K===-1?j.replace(/\]$/,""):j.slice(0,K),title:null,raw:oe,loading:!0}}function ee(X){const oe=X.indexOf("[![");if(oe===-1||typeof t=="string"&&e.length===1&&yce(t,oe,"["))return!1;const j=X.slice(0,oe);return j&&A(j,j),y(q(te(X.slice(oe+1)))),u++,!0}function J(X){if(o?.final)return!1;const oe=e[u-1];if(oe?.type!=="text"||!String(oe.content??"").endsWith("[")||z(oe,"\\["))return!1;const j=a[a.length-1];if(j?.type==="text"&&j.content.endsWith("[")){const K=j.content.slice(0,-1);K?(j.content=K,j.raw=K,c=j):(a.pop(),c=null)}return y(q($_(X))),u++,!0}function se(X){if(X.type!=="link")return!1;const oe=X,j=String(oe.raw??""),K=String(oe.text??"");if(!j.startsWith("[![")&&!K.startsWith("!["))return!1;const he=oe.title==null||oe.title===""?null:String(oe.title);return y(q({type:"image",src:String(oe.href??""),alt:K.replace(/^!\[/,"").replace(/\]$/,""),title:he,raw:j.startsWith("[![")?j.slice(1):j,loading:!0})),!0}function Q(X){if(!X.startsWith("]("))return!1;const oe=e[u-2];if(oe?.type==="text"&&String(oe.content??"").endsWith("[")&&z(oe,"\\["))return!1;const j=a[a.length-1];if(j?.type!=="image"&&j?.type!=="link")return!1;const K=j,he=j?.type==="link"&&Array.isArray(K.children)&&K.children.length===1&&K.children[0]?.type==="image"?a.pop():null,ye=he?he.children[0]:a.pop();if(!ye||ye.type!=="image")return!1;const ve=e[u+1];let ie=String(he?.href??""),de=he?.title==null?null:String(he.title),be=!0;if(ve?.type==="link_open"){const{node:je,nextIndex:et}=$3(e,u+1,o);ie=je.href,de=je.title,be=!0,u=et}else{if(ie=X.slice(2),ie.includes('"')){const je=ie.split('"');ie=String(je[0]??"").trim(),de=je[1]==null?null:String(je[1]).trim()}u++}const Se=q(ye,ie,de);return Se.loading=be,y(Se),!0}function me(){const X=e[u-3];return e[u-2]?.type==="image"&&e[u-1]?.type==="text"&&String(e[u-1].content??"")==="]("&&X?.type==="text"&&String(X.content??"").endsWith("[")&&z(X,"\\[")}function xe(X,oe){const j=X.indexOf("[");if(j===-1)return!1;let K=X.slice(0,j);const he=X.indexOf("](",j);if(he!==-1){const ye=e[u+2];let ve=X.slice(j+1,he);if(ve.includes("[")){const le=ve.indexOf("[");K+=X.slice(0,j+le+1);const fe=j+le+1;ve=X.slice(fe+1,he)}const ie=e[u+1];if(X.endsWith("](")&&ie?.type==="link_open"&&ye){const le=e[u+4];let fe=4,ge=!0;if(le?.type==="text"){const Fe=String(le.content??"");if(Fe.startsWith(")")){ge=!1;const pt=Fe.slice(1);if(pt){const kt=N0(le);kt.content=pt,kt.raw=pt,p()[u+4]=kt}else fe++}else Fe==="."&&fe++}P(K,oe);const Oe=String(ye.content??"");return o?.validateLink&&!o.validateLink(Oe)?A(ve,ve):y({type:"link",href:Oe,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:ge}),u+=fe,!0}const de=X.indexOf(")",he),be=de!==-1?X.slice(he+2,de):"",Se=de===-1;let je=K.match(/\*+$/);if(je&&(K=K.replace(/\*+$/,"")),P(K,oe),je||(je=ve.match(/^\*+/)),!d&&je){const le=je[0].length;ve=ve.replace(/^\*+/,"").replace(/\*+$/,"");const fe=[];if(le===1?fe.push({type:"em_open",tag:"em",nesting:1}):le===2?fe.push({type:"strong_open",tag:"strong",nesting:1}):le===3&&(fe.push({type:"strong_open",tag:"strong",nesting:1}),fe.push({type:"em_open",tag:"em",nesting:1})),fe.push({type:"link",href:be,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:Se}),le===1){fe.push({type:"em_close",tag:"em",nesting:-1});const{node:ge}=L3(fe,0,o);_(ge)}else if(le===2){fe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ge}=Cd(fe,0,void 0,o);_(ge)}else if(le===3){fe.push({type:"em_close",tag:"em",nesting:-1}),fe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ge}=Cd(fe,0,void 0,o);_(ge)}else{const{node:ge}=L3(fe,0,o);_(ge)}}else o?.validateLink&&!o.validateLink(be)?A(ve,ve):y({type:"link",href:be,title:null,text:ve,children:[{type:"text",content:ve,raw:ve}],loading:Se});const et=de!==-1?X.slice(de+1):"";return et&&(N({type:"text",content:et,raw:et}),u--),u++,!0}return!1}function Ye(X){const oe=X.indexOf("![");if(oe===-1)return!1;const j=X.slice(0,oe);return j&&!c?c={type:"text",content:j,raw:j}:j&&c&&(c.content+=j),c&&(a.push(c),c=null),y(te(X.slice(oe))),u++,!0}function at(X){if(!(X?.startsWith("[")&&n?.type==="list_item_open"))return!1;const oe=X.slice(1).match(/[^\s\]]/);if(oe===null)return u++,!0;if(oe&&/x/i.test(oe[0])){const j=oe[0]==="x"||oe[0]==="X";return y({type:"checkbox_input",checked:j,raw:j?"[x]":"[ ]"}),u++,!0}return!1}return a}function mv(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function B_(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` +`&&l++,{startLine:i,endLine:l}}function Q2(e,t,n,o){const s=Mce(e,t,n);return mv(s.startLine,s.endLine,o)}function Ace(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:mv(o,s,t)}function lo(e,t,n){if(!n?.includeSourceMap)return e;const o=Ace(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function Tce(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),l=Number(s[1]),r=Number(n);return!Number.isFinite(i)||!Number.isFinite(l)||!Number.isFinite(r)||(e.sourceMap=mv(i,Math.max(l,r),o)),e}function Ece(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),l=i.replace(/[ \t\r\n]+$/g,"");if(l===i)break;if(l){s.content=l;break}o.pop();continue}break}}function Ice(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const l=i.replace(/[ \t\r\n\d.)]+$/g,"");l!==i&&(l?s.content=l:o.pop())}break}}function Lce(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Ou(e,t,n){const o=e[t],s=[],i=E1(n,!0);let l=t+1;for(;ld.raw).join("")};n?.includeSourceMap&&lo(u,e[l],n),s.push(u),l=c+1}else l+=1;const r={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(c=>c[0]==="start");if(a){const c=Number(a[1]);return Number.isFinite(c)&&c!==0?c:1}}})(),items:s,raw:s.map(a=>a.raw).join(` +`)};return n?.includeSourceMap&&lo(r,o,n),[r,l+1]}function $ce(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),l=[],r=E1(o,!0);let a=t+1;for(;ac.raw).join(` `)} -:::`},a+1]}const $ce=new Set(["warning","info","note","tip","danger","caution"]);function Nce(e){let t=0;for(;t=0;m--){const k=f[m];if(k.type==="text"&&/:+/.test(k.content)){p=m;break}}const h={type:"paragraph",children:Ko((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&lo(h,e[c],n),r.push(h),a.remember(h.raw)}c+=3}else if(e[c].type==="bullet_list_open"||e[c].type==="ordered_list_open"){const[d,f]=Ou(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else if(e[c].type==="blockquote_open"){const[d,f]=Hu(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else{const d=jp(e,c,a.options());d?(r.push(d[0]),a.remember(d[0].raw),c=d[1]):c++}return[{type:"admonition",kind:s,title:i,children:r,raw:`:::${s} ${i} +:::`},a+1]}const Nce=new Set(["warning","info","note","tip","danger","caution"]);function zce(e){let t=0;for(;t=0;m--){const k=f[m];if(k.type==="text"&&/:+/.test(k.content)){p=m;break}}const h={type:"paragraph",children:Ko((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&lo(h,e[c],n),r.push(h),a.remember(h.raw)}c+=3}else if(e[c].type==="bullet_list_open"||e[c].type==="ordered_list_open"){const[d,f]=Ou(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else if(e[c].type==="blockquote_open"){const[d,f]=Hu(e,c,a.options());n?.includeSourceMap&&lo(d,e[c],n),r.push(d),a.remember(d.raw),c=f}else{const d=jp(e,c,a.options());d?(r.push(d[0]),a.remember(d[0].raw),c=d[1]):c++}return[{type:"admonition",kind:s,title:i,children:r,raw:`:::${s} ${i} ${r.map(d=>d.raw).join(` `)} -:::`},c+1]}const Bce=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Rce(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=Bce.exec(String(o.info??""));return s?Lce(e,t,s,n):null}const mv={parseContainer:(e,t,n)=>zce(e,t,n),matchAdmonition:Rce};function Hu(e,t,n){const o=[],s=E1(n,!0);let i=t+1;for(;ir.raw).join(` -`)};return n?.includeSourceMap&&lo(l,e[t],n),[l,i+1]}function Pce(e){if(e.info?.startsWith("diff"))return fv(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function Fce(e,t,n){const o=[];let s=t+1,i=[],l=[];const r=E1(n,!0);for(;sc.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(l=[];a0&&(o.push({type:"definition_item",term:i,definition:l,raw:`${i.map(c=>c.raw).join("")}: ${l.map(c=>c.raw).join(` +:::`},c+1]}const Rce=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Pce(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=Rce.exec(String(o.info??""));return s?$ce(e,t,s,n):null}const gv={parseContainer:(e,t,n)=>Bce(e,t,n),matchAdmonition:Pce};function Hu(e,t,n){const o=[],s=E1(n,!0);let i=t+1;for(;ir.raw).join(` +`)};return n?.includeSourceMap&&lo(l,e[t],n),[l,i+1]}function Fce(e){if(e.info?.startsWith("diff"))return pv(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function jce(e,t,n){const o=[];let s=t+1,i=[],l=[];const r=E1(n,!0);for(;sc.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(l=[];a0&&(o.push({type:"definition_item",term:i,definition:l,raw:`${i.map(c=>c.raw).join("")}: ${l.map(c=>c.raw).join(` `)}`}),i=[]),s=a+1}else s++;return[{type:"definition_list",items:o,raw:o.map(a=>a.raw).join(` -`)},s+1]}function jce(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],l=E1(n,!0);let r=t+1;for(;ra.raw).join(` -`)}`},r+1]}function Oce(e,t,n){const o=e[t],s=o.attrs,i=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(u=>Array.isArray(u)&&u.length>=1&&u[0]).map(([u,d])=>[String(u),d==null||d===""?!0:String(d)])):void 0,l=String(o.tag?.substring(1)??"1"),r=Number.parseInt(l,10),a=e[t+1],c=String(a.content??"");return{type:"heading",level:r,text:c,...i?{attrs:i}:{},children:Ko(a.children||[],c,void 0,n),raw:c}}function Hce(e,t,n){const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i");let l=0,r=Math.max(0,n);for(;r$/.test(d)||l++,r=a+u+1;continue}r=a+1}return-1}function fL(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!k.includes(">");else if(c)c=!k.includes("?>");else if(k.startsWith("");else if(k.startsWith("");else if(k.startsWith("");else{const x=s(k);if(x)if(x.closing){for(let y=l.length-1;y>=0;y--)if(l[y]===x.tag){l.length=y;break}}else x.selfClosing||i(x.after,x.tag)||l.push(x.tag)}}if(d===-1||d>=t)break;u=d+1}return r||a||c||l.length>0}function Sue(e,t,n){if(!n?.length)return!1;const o=new Set(K0(n));if(!o.size)return!1;const s=u=>{const d=u.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||u==="_"||u==="-"||u===":"},i=u=>u===" "||u===" ",l=u=>{if(u[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const k=u.indexOf(">",d);if(k===-1)return null;let x=k-1;for(;x>=0&&i(u[x]);)x--;return{closing:f,tag:h,selfClosing:!f&&u[x]==="/",after:u.slice(k+1)}},r=(u,d)=>{const f=u.toLowerCase();let p=0;for(;p")return!0}}return!1},a=[];let c=0;for(;c=t?t:u,f=e.slice(c,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=Du(p);if(h){const m=l(p.slice(h.index));if(m)if(m.closing){for(let k=a.length-1;k>=0;k--)if(a[k]===m.tag){a.length=k;break}}else m.selfClosing||r(m.after,m.tag)||a.push(m.tag)}if(u===-1||u>=t)break;c=u+1}return a.length>0}function Cue(e,t){const n=oue.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` -`,s),l=e.slice(s,i===-1?e.length:i);return!Du(l.endsWith("\r")?l.slice(0,-1):l)||_ue(e,s)||xue(e,s)||Sue(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function xL(e,t,n){let o=t;for(;oo&&(l=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!Md(e,r)){o!=null&&s&&n+i+2>o&&(l=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!Md(e,r)){const a=xL(e,i,"`"),c=Mue(e,i+a,a);if(c===-1)break;i=c+a;continue}if(e.startsWith("\\[",i)&&!Md(e,r)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!Md(e,r)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return l}function Aue(e,t){if(!uv(t))return e;const n=t,o=j_.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?SL(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:Hp(e).state;j_.set(n,{source:e,state:s});const{context:i}=s,l=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(l==null)return e;const r=e.slice(l+2),a=e.lastIndexOf(` -`,l-1)+1;if(e.slice(a,l).trim()!==""&&!/^\r?\n/.test(r)||/^\s*!\[/.test(r))return e;const c=r.trim(),u=/^(?:[a-z]|pi)$/i.test(c);return Qa(r)&&!u?e:e.slice(0,l)}function Tue(e,t,n,o,s){const i=yv(e),l=wv(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&kv(e)==null&&Xh(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(r.rest)&&Xh(t):(t.inFence=!0,t.fenceChar=r.markerChar,t.fenceLen=r.markerLen,t.fenceInBlockquote=r.inBlockquote,t.fenceInList=r.inList||t.listContentIndent!=null&&!r.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=r.listIndent||t.listContentIndent||0);else if(!t.inFence)return V_(e,t,n,o,s)}else return V_(e,t,n,o,s);return!1}function Hp(e,t=vue(),n=null,o=!1,s=0){const i=h2(t);let l=h2(t),r="",a=!1,c=0;for(;cc&&e[u-1]==="\r"?u-1:d?u:e.length,p=e.slice(c,f);Tue(p,i,s+c,n,o)&&(a=!0),d?(l=h2(i),r=""):r=p,c=d?u+1:e.length}return{closedOpenMath:a,state:{committedContext:l,context:i,lineBuffer:r}}}function SL(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:h2(e.committedContext),context:h2(e.context),lineBuffer:e.lineBuffer+t}}:Hp(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function Eue(e,t){if(!uv(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=Op.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,l=i&&s?t.slice(s.source.length):"",r=i&&s?SL(s.explicitBracketMath,l,s.source.length-s.explicitBracketMath.lineBuffer.length):Hp(t),a=r.state,c=i&&s?r.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!c&&!bue(s.source,l)&&!wue(t)){s.source=t,s.explicitBracketMath=a;return}const u=f0e(t);(s&&(s&&!i||s.key!==u||c)||!s&&u)&&n.reset(),yue(e,t,u,a)}function Iue(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function Lue(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function Jh(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&Lue(e,t)}function W_(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function $ue(e){for(let t=0;t+5":""}function U_(e){return{type:"paragraph",children:e,raw:e.map(Bue).join("")}}function Z_(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function K_(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=fue(t);if(!s?.size)return null;let i=-1;for(let u=0;up?.type==="hardbreak")){i=u;break}}if(i===-1)return null;const l=o.slice(0,i),r=o[i];if(!r)return null;const a=[];l.length&&a.push(U_(l)),a.push(r);const c=o.slice(i+1);return c.length&&a.push(U_(c)),a}function Rue(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function m2(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function Pue(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${ur(t)}\s*>\s*$`,"i").test(n)}const Qh=new Set(["iframe","script","style","textarea","title"]);function Cf(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}const p=ss(e.slice(f));if(p===-1)return null;const h=f+p+1,m=e.slice(f,h);if(/^<\s*[!?]/.test(m))return{closing:!1,end:h,selfClosing:!1,tag:""};let k=m.slice(1).trimStart();const x=k.startsWith("/");x&&(k=k.slice(1).trimStart());const y=k.match(/^([A-Z][\w:-]*)/i);return y?.[1]?{closing:x,end:h,selfClosing:/\/\s*>$/.test(m),tag:y[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,p)=>{const h=new RegExp(String.raw`<\s*\/\s*${ur(f)}(?=\s|>)`,"gi");h.lastIndex=p;const m=h.exec(e);if(!m||m.index==null)return null;const k=s(m.index);return k?{start:m.index,end:k.end}:null};let l=-1,r=-1,a=Math.max(0,n);for(;a$/.test(c))return{raw:c,start:l,end:r+1,closed:!0};if(Qh.has(o)){const f=i(o,r+1);return f?{raw:e.slice(l,f.end),start:l,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(l),start:l,end:e.length,closed:!1}}let u=1,d=r+1;for(;d]*$/,"")} -`}function G_(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Oue(e,t,n){return n?e.includes(n,t)?!0:G_(e.slice(Math.max(0,t))).includes(G_(n)):!1}function Hue(e,t){let n=Math.max(0,t);for(;n0?l:void 0,children:r,raw:f},u?c+1:c]}function Gh(e,t,n,o){if(n?.type.endsWith("_close")){let s=Array.isArray(n.map)?Number(n.map[1]):NaN;return Number.isFinite(s)||(s=Array.isArray(t.map)?Number(t.map[1])+1:NaN),Tce(e,t,s,o)}return lo(e,t,o)}function Yce(e){return e.replace(/^\r?\n/,"").replace(/\r?\n$/,"")}function Xce(e,t){if(!e||!t)return e;const n=new RegExp(String.raw`[\t ]*<\s*\/\s*${t}[^>]*$`,"i");return e.replace(n,"")}function Jce(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${ur(o)}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${ur(o)}(?=\s|>)`,"i");let l=0,r=Math.max(0,n);for(;r$/.test(d)||l++,r=a+u+1;continue}r=a+1}return null}function Qce(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=new RegExp(String.raw`<\s*${o}(?=\s|>|/)`,"gi");s.lastIndex=Math.max(0,n||0);const i=s.exec(e);if(!i||i.index==null)return null;const l=i.index,r=e.slice(l),a=ss(r);if(a===-1)return null;const c=l+a;if(/\/\s*>\s*$/.test(r.slice(0,a+1))){const h=c+1;return{raw:e.slice(l,h),start:l,end:h}}let u=1,d=c+1;const f=h=>{const m=e.slice(h);return new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i").test(m)},p=h=>{const m=e.slice(h);return new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i").test(m)};for(;d",h);if(m===-1)return null;if(u--,u===0){const k=m+1;return{raw:e.slice(l,k),start:l,end:k}}d=m+1;continue}if(f(h)){const m=ss(e.slice(h));if(m===-1)return null;u++,d=h+m+1;continue}d=h+1}return{raw:e.slice(l),start:l,end:e.length}}function o7(e){return Number.isFinite(e)&&e>0?e:0}function eue(e,t){const n=o7(t);if(!e||n<=0)return 0;let o=0;for(let s=0;s\s*$/.test(h),k=p===-1?null:Jce(f,r,p+1),x=k?.start??-1;let y="";p!==-1&&(x!==-1&&p]+)))?/g;let A;for(;(A=_.exec(h))!==null;){const L=A[1];if(!L||L.toLowerCase()===r)continue;const T=A[2]||A[3]||A[4]||"";w.push([L,T])}const P=!n?.final&&!m&&k==null,z={type:r,tag:r,content:Yce(y),raw:String(d?.raw??i.raw??f),loading:P,attrs:w.length?w:void 0};return s&&(d?z.sourceMap=Q2(a,d.start,d.end,n):lo(z,o,n)),[z,t+1]}return s&&lo(i,o,n),[i,t+1]}case"table_open":{const[i,l]=Uce(e,t,n);return s&&lo(i,o,n),[i,l]}case"dl_open":{const[i,l]=jce(e,t,n);return s&&lo(i,o,n),[i,l]}case"footnote_open":{const[i,l]=Oce(e,t,n);return s&&lo(i,o,n),[i,l]}case"hr":{const i=Zce();return s&&lo(i,o,n),[i,t+1]}}return null}function vv(e,t,n,o){const s=jp(e,t,n);if(s)return s;const i=e[t],l=n?.includeSourceMap===!0;switch(i.type){case"container_warning_open":case"container_info_open":case"container_note_open":case"container_tip_open":case"container_danger_open":case"container_caution_open":case"container_error_open":if(o?.parseContainer){const r=o.parseContainer(e,t,n);return l&&Gh(r[0],i,e[r[1]-1],n),r}break;case"container_open":if(o?.matchAdmonition){const r=o.matchAdmonition(e,t,n);if(r)return l&&Gh(r[0],i,e[r[1]-1],n),r}break;case"vmr_container_open":{const r=Gce(e,t,n);return l&&Gh(r[0],i,e[r[1]-1],n),r}}return null}function tue(){return{type:"hardbreak",raw:`\\ +`}}function nue(e,t,n){const o=e[t+1],s=String(o.content??"");return{type:"paragraph",children:Ko(o.children||[],s,void 0,n),raw:s}}const P_=new WeakMap,gL=new WeakMap,F_=new WeakMap,j_=new WeakMap;function wr(e,t,n){const o=t?.map,s=n?.__sourceMarkdown;if(!Array.isArray(o)||o.length<2||typeof s!="string"||!n)return;const i=Number(o[0]),l=Number(o[1]);if(!Number.isFinite(i)||!Number.isFinite(l))return;let r=F_.get(n);if(!r){r=[0];for(let a=0;a{if(!iue.has(t.type))return!1;const n=t.children;return!Array.isArray(n)||kL(n)})}function aue(e){const t=[];let n=!1,o=0;for(;o{const u=l[c+1]??n.length;return{firstToken:n[a],lastToken:n[u-1],tokenCount:u-a}});T5.set(e,{groupBoundaries:r,source:t,nodes:s,stableGroupCount:o.mixed?Math.max(0,l.length-1):cue(t)?l.length:Math.max(0,l.length-1),requireClosingStrong:i.requireClosingStrong})}function due(e,t,n,o){for(let s=0;s0&&a.requireClosingStrong===o.requireClosingStrong&&t.startsWith(a.source)&&r.length>=u&&(c==="append"||c==="tail")&&due(a,n,r,u)){const f=r[u]??n.length,p=y4(n.slice(f),o,s),h=r.length-u;if(p.length===h){const m=a.nodes.slice(0,u).concat(p);return ef(s,"processTokensReusedTopLevelNodes",u),D_(e,t,n,l,m,o),m}}const d=y4(n,o,s);return D_(e,t,n,l,d,o),d}function pue(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return null;const n=K0(t);return n.length?new Set(n):null}function hue(e,t){const n=e;let o=P_.get(n);o||(o=new Map,P_.set(n,o));const s=t.__markstreamFinal===!0?"final":"streaming";let i=o.get(s);i||(i={},o.set(s,i));for(const l of Object.keys(i))Object.prototype.hasOwnProperty.call(t,l)||delete i[l];return Object.assign(i,t),i}function mue(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function z3(e,t,n){for(const o of Reflect.ownKeys(e)){const s=Object.getOwnPropertyDescriptor(e,o);if(!s||!("value"in s))continue;const i=Object.getOwnPropertyDescriptor(t,o);i&&(!("value"in i)||i.writable===!1)||(t[o]=g0(s.value,n))}}function g0(e,t=new WeakMap){if(!e||typeof e!="object")return e;const n=e,o=t.get(n);if(o)return o;if(Array.isArray(e)){const l=[];t.set(n,l);for(const r of e)l.push(g0(r,t));return l}if(e instanceof Map){const l=new Map;t.set(n,l);for(const[r,a]of e)l.set(g0(r,t),g0(a,t));return l}if(e instanceof Set){const l=new Set;t.set(n,l);for(const r of e)l.add(g0(r,t));return l}if(e instanceof Date){const l=new Date(e.getTime());return t.set(n,l),l}if(e instanceof RegExp){const l=new RegExp(e.source,e.flags);return l.lastIndex=e.lastIndex,t.set(n,l),l}if(typeof URL<"u"&&e instanceof URL){const l=new URL(e.href);return t.set(n,l),z3(n,l,t),l}if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const l=new URLSearchParams(e.toString());return t.set(n,l),z3(n,l,t),l}if(e instanceof Error){let l;const r=e.constructor;try{l=new r(e.message)}catch{l=new Error(e.message)}return Object.setPrototypeOf(l,Object.getPrototypeOf(e)),t.set(n,l),z3(n,l,t),l}if(typeof Promise<"u"&&e instanceof Promise||typeof Node<"u"&&e instanceof Node)return t.set(n,e),e;if(!mue(e)){const l=Object.create(Object.getPrototypeOf(e));return t.set(n,l),z3(n,l,t),l}const s={};t.set(n,s);const i=e;for(const l of Object.keys(i))s[l]=g0(i[l],t);return s}function bL(e,t=!0){if(!t)return N0(e);const n=Object.create(Object.getPrototypeOf(e)),o=new WeakMap;for(const s of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,s);if(!i)continue;if(!("value"in i)){Object.defineProperty(n,s,i);continue}const l=i.value;let r=l;s==="attrs"&&Array.isArray(l)?r=l.map(a=>[...a]):s==="map"&&Array.isArray(l)?r=[...l]:s==="children"&&Array.isArray(l)?r=l.map(a=>bL(a,t)):t&&l&&typeof l=="object"&&(r=g0(l,o)),Object.defineProperty(n,s,{...i,value:r})}return n}function V_(e,t=!0){return e.map(n=>bL(n,t))}function yv(e,t){const n=t,o=e.stream,s=t.streamParse??"auto";return n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&(s===!0||s==="auto"&&t.final!==!0)&&o?.enabled===!0&&typeof o.parse=="function"}function gue(e,t){const n=t,o=t.streamParse??"auto",s=e.stream;return t.final===!0&&o==="auto"&&n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&s?.enabled===!0&&typeof s.reset=="function"}function vue(e){Op.delete(e)}function yue(){return{fenceChar:"",fenceInBlockquote:!1,fenceInList:!1,fenceLen:0,fenceListIndent:0,inDollarMath:!1,inFence:!1,inMath:!1,listContentIndent:null,dollarMathOpenOffset:null,mathOpenOffset:null}}function h2(e){return{...e}}function wue(e,t,n,o=Hp(t).state){Op.set(e,{explicitBracketMath:o,source:t,key:n,pendingCandidate:n===null&&QI(t)})}function kue(e){return e.endsWith("$")||e.endsWith("\\")}function bue(e){const t=Math.max(e.lastIndexOf(` +`)+1,0),n=e.slice(t).replace(/[\t ]+$/,"");return oue.some(o=>n.endsWith(o))}function _ue(e,t){return t?!!(t.includes("$$")||t.includes("\\[")||e.endsWith("$")&&t[0]==="$"||e.endsWith("\\")&&t[0]==="["||bue(e)&&/[\r\n]/.test(t)):!1}function Md(e,t){let n=t-1,o=0;for(;n>=0&&e[n]==="\\";)o++,n--;return o%2===1}function s7(e){return e===" "||e===" "}function _L(e,t){return t===" "?e+1:e+4-e%4}function wv(e){let t=0,n=0;for(;t3?null:t}function Yh(e){const t=Du(e);if(!t)return null;const n=t.index,o=e[n];if(o!=="`"&&o!=="~")return null;let s=n;for(;s")return n?t:null;n=!0,s++,(t[s]===" "||t[s]===" ")&&s++,t=t.slice(s)}}function xL(e){const t=Yh(e);if(t)return{...t,inBlockquote:!1,inList:!1,listIndent:0};const n=bv(e),o=n==null?null:Yh(n);if(o)return{...o,inBlockquote:!0,inList:!1,listIndent:0};const s=kv(e);if(!s)return null;const i=Yh(s.content);return i==null?null:{...i,inBlockquote:!1,inList:!0,listIndent:s.contentIndent}}function xue(e,t){let n=!1,o="",s=0,i=!1,l=!1,r=0,a=null,c=0;for(;c=t?t:u,f=e.slice(c,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=wv(p),m=kv(p);n&&i&&p.trim()&&bv(p)==null&&(n=!1,o="",s=0,i=!1,l=!1,r=0),n&&l&&p.trim()&&h.column=s&&/^\s*$/.test(k.rest)&&(n=!1,o="",s=0,i=!1,l=!1,r=0):(n=!0,o=k.markerChar,s=k.markerLen,i=k.inBlockquote,l=k.inList||a!=null&&!k.inBlockquote&&h.column>=a,r=k.listIndent||a||0)),u===-1||u>=t)break;c=u+1}return n}function Sue(e,t){const n=d=>d===" "||d===" ",o=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"||d===":"},s=d=>{if(d[0]!=="<")return null;let f=1;for(;f"&&k!=="/")return null;const x=ss(d);if(x===-1)return null;let y=x-1;for(;y>=0&&n(d[y]);)y--;return{closing:p,tag:m,selfClosing:!p&&d[y]==="/",after:d.slice(x+1)}},i=(d,f)=>{const p=d.toLowerCase();let h=0;for(;h")return!0}}return!1},l=[];let r=!1,a=!1,c=!1,u=0;for(;u=t?t:d,p=e.slice(u,f),h=p.endsWith("\r")?p.slice(0,-1):p,m=Du(h);if(m){const k=h.slice(m.index);if(r)r=!k.includes("-->");else if(a)a=!k.includes(">");else if(c)c=!k.includes("?>");else if(k.startsWith("");else if(k.startsWith("");else if(k.startsWith("");else{const x=s(k);if(x)if(x.closing){for(let y=l.length-1;y>=0;y--)if(l[y]===x.tag){l.length=y;break}}else x.selfClosing||i(x.after,x.tag)||l.push(x.tag)}}if(d===-1||d>=t)break;u=d+1}return r||a||c||l.length>0}function Cue(e,t,n){if(!n?.length)return!1;const o=new Set(K0(n));if(!o.size)return!1;const s=u=>{const d=u.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||u==="_"||u==="-"||u===":"},i=u=>u===" "||u===" ",l=u=>{if(u[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const k=u.indexOf(">",d);if(k===-1)return null;let x=k-1;for(;x>=0&&i(u[x]);)x--;return{closing:f,tag:h,selfClosing:!f&&u[x]==="/",after:u.slice(k+1)}},r=(u,d)=>{const f=u.toLowerCase();let p=0;for(;p")return!0}}return!1},a=[];let c=0;for(;c=t?t:u,f=e.slice(c,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=Du(p);if(h){const m=l(p.slice(h.index));if(m)if(m.closing){for(let k=a.length-1;k>=0;k--)if(a[k]===m.tag){a.length=k;break}}else m.selfClosing||r(m.after,m.tag)||a.push(m.tag)}if(u===-1||u>=t)break;c=u+1}return a.length>0}function Mue(e,t){const n=sue.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` +`,s),l=e.slice(s,i===-1?e.length:i);return!Du(l.endsWith("\r")?l.slice(0,-1):l)||xue(e,s)||Sue(e,s)||Cue(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function SL(e,t,n){let o=t;for(;oo&&(l=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!Md(e,r)){o!=null&&s&&n+i+2>o&&(l=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!Md(e,r)){const a=SL(e,i,"`"),c=Aue(e,i+a,a);if(c===-1)break;i=c+a;continue}if(e.startsWith("\\[",i)&&!Md(e,r)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!Md(e,r)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return l}function Tue(e,t){if(!dv(t))return e;const n=t,o=O_.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?CL(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:Hp(e).state;O_.set(n,{source:e,state:s});const{context:i}=s,l=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(l==null)return e;const r=e.slice(l+2),a=e.lastIndexOf(` +`,l-1)+1;if(e.slice(a,l).trim()!==""&&!/^\r?\n/.test(r)||/^\s*!\[/.test(r))return e;const c=r.trim(),u=/^(?:[a-z]|pi)$/i.test(c);return Qa(r)&&!u?e:e.slice(0,l)}function Eue(e,t,n,o,s){const i=wv(e),l=kv(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&bv(e)==null&&Xh(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(r.rest)&&Xh(t):(t.inFence=!0,t.fenceChar=r.markerChar,t.fenceLen=r.markerLen,t.fenceInBlockquote=r.inBlockquote,t.fenceInList=r.inList||t.listContentIndent!=null&&!r.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=r.listIndent||t.listContentIndent||0);else if(!t.inFence)return W_(e,t,n,o,s)}else return W_(e,t,n,o,s);return!1}function Hp(e,t=yue(),n=null,o=!1,s=0){const i=h2(t);let l=h2(t),r="",a=!1,c=0;for(;cc&&e[u-1]==="\r"?u-1:d?u:e.length,p=e.slice(c,f);Eue(p,i,s+c,n,o)&&(a=!0),d?(l=h2(i),r=""):r=p,c=d?u+1:e.length}return{closedOpenMath:a,state:{committedContext:l,context:i,lineBuffer:r}}}function CL(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:h2(e.committedContext),context:h2(e.context),lineBuffer:e.lineBuffer+t}}:Hp(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function Iue(e,t){if(!dv(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=Op.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,l=i&&s?t.slice(s.source.length):"",r=i&&s?CL(s.explicitBracketMath,l,s.source.length-s.explicitBracketMath.lineBuffer.length):Hp(t),a=r.state,c=i&&s?r.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!c&&!_ue(s.source,l)&&!kue(t)){s.source=t,s.explicitBracketMath=a;return}const u=p0e(t);(s&&(s&&!i||s.key!==u||c)||!s&&u)&&n.reset(),wue(e,t,u,a)}function Lue(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function $ue(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function Jh(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&$ue(e,t)}function q_(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function Nue(e){for(let t=0;t+5":""}function Z_(e){return{type:"paragraph",children:e,raw:e.map(Rue).join("")}}function K_(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function G_(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=pue(t);if(!s?.size)return null;let i=-1;for(let u=0;up?.type==="hardbreak")){i=u;break}}if(i===-1)return null;const l=o.slice(0,i),r=o[i];if(!r)return null;const a=[];l.length&&a.push(Z_(l)),a.push(r);const c=o.slice(i+1);return c.length&&a.push(Z_(c)),a}function Pue(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function m2(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function Fue(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${ur(t)}\s*>\s*$`,"i").test(n)}const Qh=new Set(["iframe","script","style","textarea","title"]);function Cf(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}const p=ss(e.slice(f));if(p===-1)return null;const h=f+p+1,m=e.slice(f,h);if(/^<\s*[!?]/.test(m))return{closing:!1,end:h,selfClosing:!1,tag:""};let k=m.slice(1).trimStart();const x=k.startsWith("/");x&&(k=k.slice(1).trimStart());const y=k.match(/^([A-Z][\w:-]*)/i);return y?.[1]?{closing:x,end:h,selfClosing:/\/\s*>$/.test(m),tag:y[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,p)=>{const h=new RegExp(String.raw`<\s*\/\s*${ur(f)}(?=\s|>)`,"gi");h.lastIndex=p;const m=h.exec(e);if(!m||m.index==null)return null;const k=s(m.index);return k?{start:m.index,end:k.end}:null};let l=-1,r=-1,a=Math.max(0,n);for(;a$/.test(c))return{raw:c,start:l,end:r+1,closed:!0};if(Qh.has(o)){const f=i(o,r+1);return f?{raw:e.slice(l,f.end),start:l,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(l),start:l,end:e.length,closed:!1}}let u=1,d=r+1;for(;d]*$/,"")} +`}function Y_(e){return e.replace(/\r\n/g,` +`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Hue(e,t,n){return n?e.includes(n,t)?!0:Y_(e.slice(Math.max(0,t))).includes(Y_(n)):!1}function Due(e,t){let n=Math.max(0,t);for(;n)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function ML(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Vue=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Wue=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function que(e){return/\n\s*\n/.test(e)||Wue.test(e)}function Uue(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Vue.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!que(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function Zue(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=Cf(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function Kue(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,l=F_.get(i),r=l&&l.final===o&&l.customHtmlTags===s&&l.requireClosingStrong===n.requireClosingStrong&&l.validateLink===n.validateLink,a=e.map((c,u)=>r&&l.blocks[u]===c?l.children[u]:du(c,t,n));return F_.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Gue(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,l=String(i.tag??"").toLowerCase();if(!l||l==="details"||TI.has(l)||Array.isArray(i.children))return s;const r=String(s.raw??i.content??"");if(!r)return s;const a=ss(r);if(a===-1)return s;const c=Cf(r,l,0),u=c?.closeStart??-1,d=c?.closed===!0&&u>=a+1,f=d?r.slice(a+1,u):r.slice(a+1);if(!f.trim())return s;const p=ML(n,o),h=d?null:Zue(f),m=h?Kue(h,t,p,o):du(f,t,p);return Uue(f,m)?{...s,children:m}:s})}function Yue(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function du(e,t,n){return e.trim()?TL(e,t,{...n,__disableStreamParse:!0}):[]}function Xue(e,t,n){const o=du(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Jue(e,t,n){const o=fL({content:e}),s=ss(e),i=CL(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const l=Xue(e.slice(s+1,i),t,n);l.length>0&&(o.children=l)}return o.raw=e,o}function Que(e,t,n){const o=ss(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=Cf(s,"summary",0);if(!i)return du(s,t,n);const l=s.slice(0,i.start),r=s.slice(i.end);return[...du(l,t,n),Jue(i.raw,t,n),...du(r,t,n)]}function AL(e,t,n,o,s,i=0){const l=[];let r=i;for(let a=0;a{const Z=CL(f,"details");return Z!==-1?f.slice(0,Z):f})():f,[w]=AL(x?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,p+f.length),_=Que(y,n,ML(o,s)),A=m===-1?"":String(e[m].raw??m2(e[m])??""),P=x||m!==-1&&k?.closed===!0,z=A.replace(/[\t\r\n ]+$/,""),L=P?(()=>{const Z=(k?.raw??"").lastIndexOf(z);return Z===-1?t.length:p+Z})():t.length,E=ss(f),T=x&&E!==-1?p+E+1:p+f.length,$=t.slice(T,L===-1?t.length:L),C=n.parse($,{__markstreamFinal:s}),j=n.renderer.render(C,n.options,{__markstreamFinal:s}),H=L+z.length,D=P?Math.max(L+A.length,Hue(t,H)):t.length,M=P?t.slice(L,D):A,R=P?t.slice(p,D):t.slice(p),O=x&&E!==-1?f.slice(0,E+1):f,U={...c,tag:"details",attrs:Fp(f.slice(0,E+1)),raw:R,content:`${O}${j}${M}`,children:[..._,...w],loading:!s&&!P};if(o.includeSourceMap&&(U.sourceMap=Q2(t,p,P?D:t.length,o)),l.push(U),r=P?D:t.length,m===-1&&!x)break;m!==-1&&(a=m)}return[l,r]}function ede(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let l=0;l=d.start&&E.end<=d.end){s.splice(P,1);continue}break}A=L+z.length,s.splice(P,1)}}return s}function tde(e){const t=r=>r===" "||r===" "||r===` +`?n+1:t}function X_(e){if(e.type!=="html_block"||String(e.tag??"").toLowerCase()!=="details")return!1;const t=String(e.raw??e.content??"");return/^\s*)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function AL(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Wue=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),que=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function Uue(e){return/\n\s*\n/.test(e)||que.test(e)}function Zue(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Wue.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!Uue(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function Kue(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=Cf(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function Gue(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,l=j_.get(i),r=l&&l.final===o&&l.customHtmlTags===s&&l.requireClosingStrong===n.requireClosingStrong&&l.validateLink===n.validateLink,a=e.map((c,u)=>r&&l.blocks[u]===c?l.children[u]:du(c,t,n));return j_.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Yue(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,l=String(i.tag??"").toLowerCase();if(!l||l==="details"||EI.has(l)||Array.isArray(i.children))return s;const r=String(s.raw??i.content??"");if(!r)return s;const a=ss(r);if(a===-1)return s;const c=Cf(r,l,0),u=c?.closeStart??-1,d=c?.closed===!0&&u>=a+1,f=d?r.slice(a+1,u):r.slice(a+1);if(!f.trim())return s;const p=AL(n,o),h=d?null:Kue(f),m=h?Gue(h,t,p,o):du(f,t,p);return Zue(f,m)?{...s,children:m}:s})}function Xue(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function du(e,t,n){return e.trim()?EL(e,t,{...n,__disableStreamParse:!0}):[]}function Jue(e,t,n){const o=du(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Que(e,t,n){const o=pL({content:e}),s=ss(e),i=ML(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const l=Jue(e.slice(s+1,i),t,n);l.length>0&&(o.children=l)}return o.raw=e,o}function ede(e,t,n){const o=ss(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=Cf(s,"summary",0);if(!i)return du(s,t,n);const l=s.slice(0,i.start),r=s.slice(i.end);return[...du(l,t,n),Que(i.raw,t,n),...du(r,t,n)]}function TL(e,t,n,o,s,i=0){const l=[];let r=i;for(let a=0;a{const Z=ML(f,"details");return Z!==-1?f.slice(0,Z):f})():f,[w]=TL(x?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,p+f.length),_=ede(y,n,AL(o,s)),A=m===-1?"":String(e[m].raw??m2(e[m])??""),P=x||m!==-1&&k?.closed===!0,z=A.replace(/[\t\r\n ]+$/,""),L=P?(()=>{const Z=(k?.raw??"").lastIndexOf(z);return Z===-1?t.length:p+Z})():t.length,T=ss(f),I=x&&T!==-1?p+T+1:p+f.length,N=t.slice(I,L===-1?t.length:L),C=n.parse(N,{__markstreamFinal:s}),F=n.renderer.render(C,n.options,{__markstreamFinal:s}),H=L+z.length,D=P?Math.max(L+A.length,Due(t,H)):t.length,M=P?t.slice(L,D):A,R=P?t.slice(p,D):t.slice(p),O=x&&T!==-1?f.slice(0,T+1):f,U={...c,tag:"details",attrs:Fp(f.slice(0,T+1)),raw:R,content:`${O}${F}${M}`,children:[..._,...w],loading:!s&&!P};if(o.includeSourceMap&&(U.sourceMap=Q2(t,p,P?D:t.length,o)),l.push(U),r=P?D:t.length,m===-1&&!x)break;m!==-1&&(a=m)}return[l,r]}function tde(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let l=0;l=d.start&&T.end<=d.end){s.splice(P,1);continue}break}A=L+z.length,s.splice(P,1)}}return s}function nde(e){const t=r=>r===" "||r===" "||r===` `||r==="\r",n=r=>{if(!r||r[0]!=="<"||r.includes(">"))return!1;let a=1;if(a{const k=m.charCodeAt(0);return k>=65&&k<=90||k>=97&&k<=122},u=m=>{const k=m.charCodeAt(0);return k>=48&&k<=57},d=m=>m==="!"||c(m),f=m=>c(m)||u(m)||m===":"||m==="-",p=m=>c(m)||u(m)||m==="_"||m==="."||m===":"||m==="-",h=p;if(a>=r.length||!d(r[a]))return!1;for(a++;a=r.length)return!0;if(r[a]==="/"){for(a++;a=r.length}if(!p(r[a]))return!1;for(a++;a=r.length)return!0;const m=r[a];if(m==='"'||m==="'"){for(a++;a=r.length)return!0;a++}else{for(;a"||k==='"'||k==="'"||k==="`")break;a++}if(a>=r.length)return!0}}}return!0},o=(r,a)=>{let c=!1,u="",d=0;const f=y=>y===" "||y===" ",p=y=>{let w=0;for(;w{let w=0;for(;w";)for(_=!0,w++;w{const w=p(y);if(w)return w;const _=h(y);return _==null?null:p(_)};let k=0;const x=r.split(/\r?\n/);for(const y of x){const w=k,_=k+y.length;if(a=d&&/^\s*$/.test(A.rest)&&(c=!1,u="",d=0):(c=!0,u=P,d=z)}if(a<=_)break;k=_+1}return c},s=String(e??""),i=s.lastIndexOf("<");if(i===-1||o(s,i))return s;if(i>0){const r=s[i-1],a=r===" "||r===" "||r===` `||r==="\r",c=s[i-2];if(!a&&!((r==="n"||r==="r")&&c==="\\"))return s}const l=s.slice(i);return l.includes(">")||l.length>1&&(l[1]===" "||l[1]===" "||l[1]===` -`||l[1]==="\r")||!n(l)?s:s.slice(0,i)}function X_(e,t){if(e===t)return;const n=e.split(/\r?\n/),o=t.split(/\r?\n/),s=[];let i=0;for(let l=0;l{const r=Number.isFinite(l)?Math.max(0,Math.trunc(l)):0;if(rString(h??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=h=>h===" "||h===" ",s=h=>{const m=h.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||h==="_"||h==="-"||h===":"},i=h=>{if(!h)return!1;if(h[0]===" ")return!0;let m=0;for(let k=0;k=4)return!0;continue}if(x===" ")return!0;break}return!1},l=h=>{let m=!1,k=!1;for(let x=0;x")return x}return-1},r=h=>{let m=0;for(;m{if(i(h))return-1;const k=h.replace(/^[ \t]+/,"");if(!k||k.startsWith(">")||k.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(k))return-1;let x=!1,y=0;for(;y=A.length){x=!0,y++;continue}const z=A[P];if(z==="!"||z==="?"){x=!0,y+=_+1;continue}if(z==="/"){x=!0,y+=_+1;continue}const L=P;for(;P"&&T!=="/"){x=!0,y++;continue}const $=new RegExp(String.raw`<\s*\/\s*${E}\s*>`,"i"),C=/\/\s*>$/.test(A),j=$.test(h.slice(y+_+1)),H=$.test(e.slice(m+y+_+1)),D=/[\r\n]/.test(e.slice(m+y+_+1));if(x&&n.has(E)&&!C&&!j&&(H||D))return y;x=!0,y+=_+1}return-1};let c=!1,u="",d=0,f="",p=0;for(;p{const r=Number.isFinite(l)?Math.max(0,Math.trunc(l)):0;if(rString(h??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=h=>h===" "||h===" ",s=h=>{const m=h.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||h==="_"||h==="-"||h===":"},i=h=>{if(!h)return!1;if(h[0]===" ")return!0;let m=0;for(let k=0;k=4)return!0;continue}if(x===" ")return!0;break}return!1},l=h=>{let m=!1,k=!1;for(let x=0;x")return x}return-1},r=h=>{let m=0;for(;m{if(i(h))return-1;const k=h.replace(/^[ \t]+/,"");if(!k||k.startsWith(">")||k.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(k))return-1;let x=!1,y=0;for(;y=A.length){x=!0,y++;continue}const z=A[P];if(z==="!"||z==="?"){x=!0,y+=_+1;continue}if(z==="/"){x=!0,y+=_+1;continue}const L=P;for(;P"&&I!=="/"){x=!0,y++;continue}const N=new RegExp(String.raw`<\s*\/\s*${T}\s*>`,"i"),C=/\/\s*>$/.test(A),F=N.test(h.slice(y+_+1)),H=N.test(e.slice(m+y+_+1)),D=/[\r\n]/.test(e.slice(m+y+_+1));if(x&&n.has(T)&&!C&&!F&&(H||D))return y;x=!0,y+=_+1}return-1};let c=!1,u="",d=0,f="",p=0;for(;pp&&e[h-1]==="\r",x=m?k?h-1:h:e.length,y=e.slice(p,x),w=m?k?`\r `:` `:"",_=r(y);let A=y;if(!c&&!_){const P=a(y,p);if(P!==-1){const z=w||` -`;A=`${y.slice(0,P).replace(/[ \t]+$/,"")}${z}${z}${y.slice(P).replace(/^[ \t]+/,"")}`}}f+=A,f+=w,_&&(c?_.markerChar===u&&_.markerLen>=d&&/^\s*$/.test(_.rest)&&(c=!1,u="",d=0):(c=!0,u=_.markerChar,d=_.markerLen)),p=m?h+1:e.length}return f}function ode(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,p=!1;for(let h=0;h")return h}return-1},r=(d,f,p)=>{const h=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let k=m+1;for(;k=d.length||d[k]!=="/"){m=d.indexOf("<",m+1);continue}for(k++;kd.length){m=d.indexOf("<",m+1);continue}let x=!0;for(let w=0;w="A"&&_<="Z"?String.fromCharCode(_.charCodeAt(0)+32):_)!==h[w]){x=!1;break}}if(!x){m=d.indexOf("<",m+1);continue}let y=k+h.length;if(y")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const p=f;for(;f=d&&/^\s*$/.test(_.rest)&&(c=!1,u="",d=0):(c=!0,u=_.markerChar,d=_.markerLen)),p=m?h+1:e.length}return f}function sde(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,p=!1;for(let h=0;h")return h}return-1},r=(d,f,p)=>{const h=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let k=m+1;for(;k=d.length||d[k]!=="/"){m=d.indexOf("<",m+1);continue}for(k++;kd.length){m=d.indexOf("<",m+1);continue}let x=!0;for(let w=0;w="A"&&_<="Z"?String.fromCharCode(_.charCodeAt(0)+32):_)!==h[w]){x=!1;break}}if(!x){m=d.indexOf("<",m+1);continue}let y=k+h.length;if(y")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const p=f;for(;fu&&e[d-1]==="\r",p=f?d-1:d,h=e.slice(u,p);c+=a(h),c+=f?`\r `:` -`,u=d+1}return c}function sde(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let p=0,h=!1,m=0;for(;p=f.length||f[p]!==">")break;for(h=!0,p++;p{let p=0;for(;pnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let r=!1,a="",c=0,u="",d=0;for(;dString(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let p=0,h=!1,m=0;for(;p=f.length||f[p]!==">")break;for(h=!0,p++;p{let p=0;for(;pnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let r=!1,a="",c=0,u="",d=0;for(;dd&&e[f-1]==="\r",m=p?h?f-1:f:e.length,k=e.slice(d,m),x=p?h?`\r `:` -`:"",y=s(k),w=y?.prefix??"",_=y?.content??k,A=i(_);A&&(r?A.markerChar===a&&A.markerLen>=c&&/^\s*$/.test(A.rest)&&(r=!1,a="",c=0):(r=!0,a=A.markerChar,c=A.markerLen));let P=_;if(!r&&P.includes("{if($.replace(/^[\t ]+/,"").startsWith("|"))return L;const C=$.slice(0,T).replace(/^[\t ]+/,"");if(C.length>0){const j=E.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",H=C.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!j||!H||j!==H)return L}return`${E} +`:"",y=s(k),w=y?.prefix??"",_=y?.content??k,A=i(_);A&&(r?A.markerChar===a&&A.markerLen>=c&&/^\s*$/.test(A.rest)&&(r=!1,a="",c=0):(r=!0,a=A.markerChar,c=A.markerLen));let P=_;if(!r&&P.includes("{if(N.replace(/^[\t ]+/,"").startsWith("|"))return L;const C=N.slice(0,I).replace(/^[\t ]+/,"");if(C.length>0){const F=T.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",H=C.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!F||!H||F!==H)return L}return`${T} `});if(w){const z=w+P.split(` `).join(` -${w}`);u+=z}else u+=P;u+=x,d=p?f+1:e.length}return u}function ide(e,t){if(!e||!t.length)return e;const n=new Set(t.map(C=>String(C??"").toLowerCase()));if(!n.size)return e;const o=C=>C===" "||C===" ",s=C=>{if(!C)return!1;if(C[0]===" ")return!0;let j=0;for(let H=0;H=4)return!0;continue}if(D===" ")return!0;break}return!1},i=C=>{const j=C.charCodeAt(0);return j>=65&&j<=90||j>=97&&j<=122||j>=48&&j<=57||C==="_"||C==="-"||C===":"},l=C=>{let j=0;for(;j{let j=0,H=!1,D=0;for(;j=C.length||C[j]!==">")break;for(H=!0,j++;jl(C).startsWith("<"),c=C=>{for(let j=0;j{if(s(C))return"";const j=l(C);if(!j.startsWith("<"))return"";let H=1;for(;H=j.length||j[H]==="/"||j[H]==="!"||j[H]==="?")return"";const D=H;for(;H"&&R!=="/"?"":M},d=C=>{if(s(C))return null;const j=l(C);if(!j.startsWith("<"))return null;let H=1;for(;H=j.length)return null;const D=j[H]==="/";if(D)for(H++;H"&&U!=="/")return null;if(D)return{type:"close",name:O};if(/\/\s*>\s*$/.test(j))return{type:"open",name:O,complete:!0};const Z=j.indexOf(">",H);if(Z!==-1){const q=j.slice(Z+1);if(new RegExp(`<\\s*\\/\\s*${O}\\s*>`,"i").test(q))return{type:"open",name:O,complete:!0}}return{type:"open",name:O,complete:!1}},f=C=>{if(s(C))return null;const j=l(C).replace(/[ \t]+$/,"");if(!j.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(j))return null;const H=j.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(H?.[1])return H[1].toLowerCase();const D=j.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!D?.[1]||!D[2])return null;const M=D[1].toLowerCase();return M===D[2].toLowerCase()?M:null};let p=!1,h="",m=0;const k=C=>{let j=0;for(;jk(C),y=C=>{const j=l(C);return j?s(C)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(j):!1},w=(C,j,H)=>{let D=C,M=0;for(;DD&&e[R-1]==="\r",Z=O?U?R-1:R:e.length,q=e.slice(D,Z),te=r(q),ee=te?.key??"";if(M>0&&j&&ee!==j)break;const J=te?.content??q,se=d(J);if(se?.name===H){if(se.type==="open")se.complete||M++;else if(M>0&&(M--,M===0))return!1}else if(M>0&&(c(J)||y(J)))return!0;if(O)D=R+1;else break}return!1};let _="",A=0,P=!0,z=!1,L=!1,E=` -`;const T=[];let $="";for(;AA&&e[C-1]==="\r",D=j?H?C-1:C:e.length,M=e.slice(A,D),R=j?H?`\r +${w}`);u+=z}else u+=P;u+=x,d=p?f+1:e.length}return u}function lde(e,t){if(!e||!t.length)return e;const n=new Set(t.map(C=>String(C??"").toLowerCase()));if(!n.size)return e;const o=C=>C===" "||C===" ",s=C=>{if(!C)return!1;if(C[0]===" ")return!0;let F=0;for(let H=0;H=4)return!0;continue}if(D===" ")return!0;break}return!1},i=C=>{const F=C.charCodeAt(0);return F>=65&&F<=90||F>=97&&F<=122||F>=48&&F<=57||C==="_"||C==="-"||C===":"},l=C=>{let F=0;for(;F{let F=0,H=!1,D=0;for(;F=C.length||C[F]!==">")break;for(H=!0,F++;Fl(C).startsWith("<"),c=C=>{for(let F=0;F{if(s(C))return"";const F=l(C);if(!F.startsWith("<"))return"";let H=1;for(;H=F.length||F[H]==="/"||F[H]==="!"||F[H]==="?")return"";const D=H;for(;H"&&R!=="/"?"":M},d=C=>{if(s(C))return null;const F=l(C);if(!F.startsWith("<"))return null;let H=1;for(;H=F.length)return null;const D=F[H]==="/";if(D)for(H++;H"&&U!=="/")return null;if(D)return{type:"close",name:O};if(/\/\s*>\s*$/.test(F))return{type:"open",name:O,complete:!0};const Z=F.indexOf(">",H);if(Z!==-1){const q=F.slice(Z+1);if(new RegExp(`<\\s*\\/\\s*${O}\\s*>`,"i").test(q))return{type:"open",name:O,complete:!0}}return{type:"open",name:O,complete:!1}},f=C=>{if(s(C))return null;const F=l(C).replace(/[ \t]+$/,"");if(!F.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(F))return null;const H=F.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(H?.[1])return H[1].toLowerCase();const D=F.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!D?.[1]||!D[2])return null;const M=D[1].toLowerCase();return M===D[2].toLowerCase()?M:null};let p=!1,h="",m=0;const k=C=>{let F=0;for(;Fk(C),y=C=>{const F=l(C);return F?s(C)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(F):!1},w=(C,F,H)=>{let D=C,M=0;for(;DD&&e[R-1]==="\r",Z=O?U?R-1:R:e.length,q=e.slice(D,Z),te=r(q),ee=te?.key??"";if(M>0&&F&&ee!==F)break;const J=te?.content??q,se=d(J);if(se?.name===H){if(se.type==="open")se.complete||M++;else if(M>0&&(M--,M===0))return!1}else if(M>0&&(c(J)||y(J)))return!0;if(O)D=R+1;else break}return!1};let _="",A=0,P=!0,z=!1,L=!1,T=` +`;const I=[];let N="";for(;AA&&e[C-1]==="\r",D=F?H?C-1:C:e.length,M=e.slice(A,D),R=F?H?`\r `:` -`:"",O=r(M),U=O?.key??"",Z=O?.content??M,q=x(Z);q&&(p?q.markerChar===h&&q.markerLen>=m&&/^\s*$/.test(q.rest)&&(p=!1,h="",m=0):(p=!0,h=q.markerChar,m=q.markerLen));const te=T.length>0;if(!p&&!te){const J=u(Z),se=!!J&&!P&&z&&L&&w(A,U,J);J&&!P&&(!z||se)&&(U&&$&&U===$?_+=`${U}${E}`:U||(_+=E))}if(_+=M,_+=R,R&&(E=R),!p){const J=d(Z);if(J){if(J.type==="open")J.complete||T.push(J.name);else for(let se=T.length-1;se>=0;se--)if(T[se]===J.name){T.length=se;break}}}const ee=c(Z);P=ee,z=!ee&&a(Z),L=!ee&&!!f(Z),$=U,A=j?C+1:e.length}return _}function TL(e,t,n={}){const o=gL(n),s=o?Mu():0,i=!!n.final,l=(e??"").toString();let r=l.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(mue(t,n)&&(t.stream.reset(),gue(t)),i||(r.endsWith("- *")&&(r=r.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*-\s*$/,y=>y.startsWith(` +`:"",O=r(M),U=O?.key??"",Z=O?.content??M,q=x(Z);q&&(p?q.markerChar===h&&q.markerLen>=m&&/^\s*$/.test(q.rest)&&(p=!1,h="",m=0):(p=!0,h=q.markerChar,m=q.markerLen));const te=I.length>0;if(!p&&!te){const J=u(Z),se=!!J&&!P&&z&&L&&w(A,U,J);J&&!P&&(!z||se)&&(U&&N&&U===N?_+=`${U}${T}`:U||(_+=T))}if(_+=M,_+=R,R&&(T=R),!p){const J=d(Z);if(J){if(J.type==="open")J.complete||I.push(J.name);else for(let se=I.length-1;se>=0;se--)if(I[se]===J.name){I.length=se;break}}}const ee=c(Z);P=ee,z=!ee&&a(Z),L=!ee&&!!f(Z),N=U,A=F?C+1:e.length}return _}function EL(e,t,n={}){const o=vL(n),s=o?Mu():0,i=!!n.final,l=(e??"").toString();let r=l.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(gue(t,n)&&(t.stream.reset(),vue(t)),i||(r.endsWith("- *")&&(r=r.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*-\s*$/,y=>y.startsWith(` `)?` `:""):/(?:^|\n)\s*--\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*--\s*$/,y=>y.startsWith(` `)?` @@ -744,29 +744,29 @@ ${w}`);u+=z}else u+=P;u+=x,d=p?f+1:e.length}return u}function ide(e,t){if(!e||!t `:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(r)?r=r.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(y,w,_)=>`${w}${_.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(r)?r=r.replace(/(?:^|\n)\s*\d+[.)]\s*$/,y=>y.startsWith(` `)?` `:""):/\n[[(]\n*$/.test(r)&&(r=r.replace(/(\n\[|\n\()+\n*$/g,` -`)),r=Aue(r,t),r=Cue(r,n.customHtmlTags)??r),n.customHtmlTags?.length&&r.includes("<")){const y=K0(n.customHtmlTags);if(y.length&&(r=nde(r,y),r=ode(r,y),r=ide(r,y),r=sde(r,y),r.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");r=r.replace(_,"$1$2$2")}}i||(r=tde(r));const a=Rue(r);if(a){if(n.includeSourceMap){const _={...n,__sourceLineMapper:X_(l,r)};a[0].sourceMap=Q2(r,0,r.length,_)}const y=n.preTransformTokens,w=n.postTransformTokens;if(vv(t,n)||typeof y=="function"||typeof w=="function"){const _=q_(t,r,{__markstreamFinal:i},n),A=typeof y=="function"&&y(_)||_;typeof w=="function"&&w(A)}return O_(a,n,o,s)}const c=q_(t,r,{__markstreamFinal:i},n);if(!c||!Array.isArray(c))return O_([],n,o,s);const u=n.preTransformTokens,d=n.postTransformTokens;let f=c;u&&typeof u=="function"&&(f=u(f)||f);const p=t,h=typeof p.validateLink=="function"&&p.__markstreamOriginalValidateLink&&p.validateLink!==p.__markstreamOriginalValidateLink?p.validateLink:void 0,m=n.validateLink??h??p.options?.validateLink??(typeof p.validateLink=="function"?p.validateLink:void 0),k={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?X_(l,r):void 0,__sourceMarkdown:r,__customHtmlBlockCursor:0};let x=due(t,r,f,k,o);if(d&&typeof d=="function"){const y=d(f);if(Array.isArray(y)){const w=y[0],_=w?.type;w&&typeof _=="string"?x=y4(y,{...k,__customHtmlBlockCursor:0},o):x=y}}if(Yue(x)&&(x=ede(x,i,r,k),x=AL(x,r,t,k,i)[0],x=Gue(x,t,k,i)),i){const y=new WeakSet,w=_=>{if(!_||typeof _!="object"||y.has(_))return;if(y.add(_),Array.isArray(_)){for(const P of _)w(P);return}const A=_;A.type==="html_block"&&A.loading===!0&&(A.loading=!1);for(const P of Object.values(A))w(P)};w(x)}return x=yL(x,n),n.debug&&console.log("Parsed Markdown Tree Structure:",x),vL(x,o,s)}function J_(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=E1(t),s=t?.includeSourceMap===!0;let i=0;for(;iu.type==="html_block")){if(s)for(const u of c)lo(u,r,t);for(const u of c)wr(u,r,t);n.push(...c)}else{const u={type:"paragraph",raw:a,children:c};s&&lo(u,r,t);const d=K_(u,t);if(d){s&&Z_(d,u);for(const f of d)wr(f,r,t);n.push(...d)}else wr(u,r,t),n.push(u)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const lde=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,rde=new Set([..._f,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),ade=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function Q_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cde(e){return typeof e=="string"?e:e==null?"":String(e)}function EL(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function e1(e){return cde(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function IL(e){return e1(e).replace(/`/g,"`")}function Vp(e){return String(e??"").trim().toLowerCase()}function bv(e,t="safe"){const n=Vp(e);return n?t==="escape"?!0:t==="trusted"?_f.has(n):!ade.has(n):!1}function LL(e,t="safe"){const n=Vp(e);return n?t==="escape"?!0:t==="trusted"?_f.has(n):rde.has(n):!1}function ex(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${IL(o)}"`).join("")}function $L(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(lde);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function ude(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||$0(s,{tagName:t,attrName:"srcset"})})}function NL(e,t,n,o){return iae.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?ude(t,o):!!(lae.has(e)&&t&&$0(t,{tagName:o,attrName:e}))}function v0(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function zL(e,t,n,o=!1){if(t!=="safe"||Vp(n)!=="a")return e;const s=v0(e,"href");if(o&&(!s||!e[s])){const a=v0(e,"target"),c=v0(e,"rel");return a&&delete e[a],c&&delete e[c],e}const i=v0(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const l=v0(e,"rel"),r=new Set(String(l?e[l]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return r.add("noopener"),r.add("noreferrer"),l&&l!=="rel"&&delete e[l],e.rel=Array.from(r).join(" "),e}function tx(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!EL(l)||NL(r,i,t,n)||(o[l]=i)}return zL(o,t,n,!!v0(e,"href"))}function BL(e,t){const n=e.toLowerCase();return AI.has(n)?!1:Q_(t,n)||Q_(t,e)}function _v(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!EL(l)||NL(r,i,t,n)||(o[l]=i)}return zL(o,t,n,!!v0(e,"href"))}function g2(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function w4(e,t="safe",n){const o=_v(g2(e),t,n),s=Object.entries(o).map(([i,l])=>[i,l]);return s.length>0?s:void 0}function dde(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function fde(e){const t={};for(const[n,o]of Object.entries(e))t[n]=dde(o,n);return t}function em(e){return e.trim().length>0}function RL(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const l=e.slice(n,o);em(l)&&t.push({type:"text",content:l})}if(e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=$L(e.slice(o+1,s));if(!i){const l=e.slice(o,s+1);em(l)&&t.push({type:"text",content:l}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||k1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l})}n=s+1}return t}function pde(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=$L(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||k1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l}),n=s+1}return t}function hde(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${e1(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${e1(o)}`:` ${e1(o)}="${IL(s)}"`).join("");return e.type==="self_closing"?`<${e1(t)}${n} />`:`<${e1(t)}${n}>`}function mde(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of RL(e))if((n.type==="tag_open"||n.type==="self_closing")&&BL(n.tagName??"",t))return!0;return!1}function fu(e,t="safe"){if(!e)return"";if(t==="escape")return e1(e);const n=pde(e),o=[],s=[],i=[];for(const l of n){if(l.type==="text"){i.length===0&&s.push(e1(l.content??""));continue}const r=Vp(l.tagName);if(!r)continue;if(LL(r,t)){l.type==="tag_open"?i.push(r):l.type==="tag_close"&&i[i.length-1]===r&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&bv(r,t)){s.push(hde(l));continue}if(l.type==="self_closing"){s.push(`<${r}${ex(tx(l.attrs??{},t,r))}>`);continue}if(l.type==="tag_open"){s.push(`<${r}${ex(tx(l.attrs??{},t,r))}>`),k1.has(r)||o.push(r);continue}const a=o.lastIndexOf(r);if(a===-1)continue;for(;o.length>a+1;){const u=o.pop();u&&s.push(``)}const c=o.pop();c&&s.push(``)}for(;o.length>0;){const l=o.pop();l&&s.push(``)}return s.join("")}const gde=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],nx="http://www.w3.org/2000/svg",vde=new Set(["script","style","iframe","object","embed","link","meta"]),yde=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),wde=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),kde=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),bde=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function _de(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function xde(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function Sde(e){const t=e.nodeName.toLowerCase();return t==="use"?_de(e):t==="image"?xde(e):t==="text"||t==="tspan"?!!e.textContent?.trim():bde.has(t)}function Cde(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function Mde(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?$0(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?$0(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":$0(i,{tagName:o,attrName:s})?"":i:""}function Ade(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function FL(e){const t=PL(e),n=t.toLowerCase();let o=0;for(;on.test(t))||FL(t)}function Tde(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function B3(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function jL(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!vde.has(o)){if(o==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))jL(s,t)}}function Ede(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];jL(t,n);const o=n.join("").split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=B3(t.getAttribute("width")),i=B3(t.getAttribute("height")),l=B3(t.getAttribute("x")),r=B3(t.getAttribute("y")),a=e.ownerDocument.createElementNS(nx,"text");a.setAttribute("x",String(l+s/2)),a.setAttribute("y",String(r+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const c=t.querySelector(".nodeLabel");if(c?.getAttribute("class")&&a.setAttribute("class",c.getAttribute("class")),o.length===1)a.textContent=o[0];else{const u=-.6*(o.length-1);for(const[d,f]of o.entries()){const p=e.ownerDocument.createElementNS(nx,"tspan");p.setAttribute("x",String(l+s/2)),p.setAttribute("dy",d===0?`${u}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function Ide(e){Ede(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!yde.has(o)){n.remove();continue}if(o==="style"&&ox(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const l=i.name.toLowerCase();if(/^on/i.test(l)){n.removeAttribute(i.name);continue}if(l==="style"&&i.value&&ox(i.value)){n.removeAttribute(i.name);continue}if(l==="srcdoc"){n.removeAttribute(i.name);continue}if(wde.has(l)&&i.value){const r=Mde(o,l,i.value);if(!r){n.removeAttribute(i.name);continue}r!==i.value&&n.setAttribute(i.name,r);continue}if(kde.has(l)&&i.value&&FL(i.value)){n.removeAttribute(i.name);continue}if(i.value){const r=Cde(i.value);r!==i.value&&n.setAttribute(i.name,r)}}Tde(n)}}function kKe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return Ide(n),Lde(n)?null:n}catch{return null}}function Lde(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),l=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(l)||i<=0||l<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){Sde(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const R3=[];function tm(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $de(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function Nde(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function sx(e=`editor-${Date.now()}`,t={}){const n=b0e(t),o=n;o.__markstreamRegisteredPluginCount=R3.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||R3.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;i=m=>h[m]??s[m]??m}else i=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const m=h;if(Array.isArray(m)){const[k,...x]=m;typeof k=="function"&&n.use(k,...x)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(R3.length)for(const h of R3)if(Array.isArray(h)){const[m,...k]=h;typeof m=="function"&&n.use(m,...k)}else typeof h=="function"&&n.use(h);n.use(Poe),n.use(Ooe),n.use(zoe);const l=ese,r=l.default??l;n.use(r),n.use(Noe),n.use($oe),n.core.ruler.after("block","mark_fence_closed",h=>{const m=h,k=m.src,x=!!m.env?.__markstreamFinal,y=k.split(/\r?\n/);for(const w of m.tokens){if(w.type!=="fence"||!w.map||!w.markup)continue;const _=w.map[0],A=w.map[1],P=w.markup,z=P[0],L=P.length,E=y[Math.max(0,A-1)]??"";let T=0;for(;T_+1&&$>=L&&C===E.length,H=w;H.meta=H.meta??{},H.meta.unclosed=!j,H.meta.closed=!!j}});const a=(h,m)=>{const k=h,x=k.pos;if(k.src[x]!=="~")return!1;const y=k.src[x-1],w=k.src[x+1];if(/\d/.test(y)&&/\d/.test(w)){if(!m){const _=k.push("text","",0);_.content="~"}return k.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(h,m)=>{const k=h[m],x=String(k.info??"").trim(),y=String(k.content??""),w=btoa(unescape(encodeURIComponent(y))),_=$de(x),A=tm(_),P=Nde(`editor-${e}-${m}-${_}`),z=tm(i("common.copy"));return`
        +`)),r=Tue(r,t),r=Mue(r,n.customHtmlTags)??r),n.customHtmlTags?.length&&r.includes("<")){const y=K0(n.customHtmlTags);if(y.length&&(r=ode(r,y),r=sde(r,y),r=lde(r,y),r=ide(r,y),r.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");r=r.replace(_,"$1$2$2")}}i||(r=nde(r));const a=Pue(r);if(a){if(n.includeSourceMap){const _={...n,__sourceLineMapper:J_(l,r)};a[0].sourceMap=Q2(r,0,r.length,_)}const y=n.preTransformTokens,w=n.postTransformTokens;if(yv(t,n)||typeof y=="function"||typeof w=="function"){const _=U_(t,r,{__markstreamFinal:i},n),A=typeof y=="function"&&y(_)||_;typeof w=="function"&&w(A)}return H_(a,n,o,s)}const c=U_(t,r,{__markstreamFinal:i},n);if(!c||!Array.isArray(c))return H_([],n,o,s);const u=n.preTransformTokens,d=n.postTransformTokens;let f=c;u&&typeof u=="function"&&(f=u(f)||f);const p=t,h=typeof p.validateLink=="function"&&p.__markstreamOriginalValidateLink&&p.validateLink!==p.__markstreamOriginalValidateLink?p.validateLink:void 0,m=n.validateLink??h??p.options?.validateLink??(typeof p.validateLink=="function"?p.validateLink:void 0),k={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?J_(l,r):void 0,__sourceMarkdown:r,__customHtmlBlockCursor:0};let x=fue(t,r,f,k,o);if(d&&typeof d=="function"){const y=d(f);if(Array.isArray(y)){const w=y[0],_=w?.type;w&&typeof _=="string"?x=y4(y,{...k,__customHtmlBlockCursor:0},o):x=y}}if(Xue(x)&&(x=tde(x,i,r,k),x=TL(x,r,t,k,i)[0],x=Yue(x,t,k,i)),i){const y=new WeakSet,w=_=>{if(!_||typeof _!="object"||y.has(_))return;if(y.add(_),Array.isArray(_)){for(const P of _)w(P);return}const A=_;A.type==="html_block"&&A.loading===!0&&(A.loading=!1);for(const P of Object.values(A))w(P)};w(x)}return x=wL(x,n),n.debug&&console.log("Parsed Markdown Tree Structure:",x),yL(x,o,s)}function Q_(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=E1(t),s=t?.includeSourceMap===!0;let i=0;for(;iu.type==="html_block")){if(s)for(const u of c)lo(u,r,t);for(const u of c)wr(u,r,t);n.push(...c)}else{const u={type:"paragraph",raw:a,children:c};s&&lo(u,r,t);const d=G_(u,t);if(d){s&&K_(d,u);for(const f of d)wr(f,r,t);n.push(...d)}else wr(u,r,t),n.push(u)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const rde=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,ade=new Set([..._f,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),cde=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function ex(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ude(e){return typeof e=="string"?e:e==null?"":String(e)}function IL(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function e1(e){return ude(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function LL(e){return e1(e).replace(/`/g,"`")}function Vp(e){return String(e??"").trim().toLowerCase()}function _v(e,t="safe"){const n=Vp(e);return n?t==="escape"?!0:t==="trusted"?_f.has(n):!cde.has(n):!1}function $L(e,t="safe"){const n=Vp(e);return n?t==="escape"?!0:t==="trusted"?_f.has(n):ade.has(n):!1}function tx(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${LL(o)}"`).join("")}function NL(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(rde);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function dde(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||$0(s,{tagName:t,attrName:"srcset"})})}function zL(e,t,n,o){return lae.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?dde(t,o):!!(rae.has(e)&&t&&$0(t,{tagName:o,attrName:e}))}function v0(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function BL(e,t,n,o=!1){if(t!=="safe"||Vp(n)!=="a")return e;const s=v0(e,"href");if(o&&(!s||!e[s])){const a=v0(e,"target"),c=v0(e,"rel");return a&&delete e[a],c&&delete e[c],e}const i=v0(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const l=v0(e,"rel"),r=new Set(String(l?e[l]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return r.add("noopener"),r.add("noreferrer"),l&&l!=="rel"&&delete e[l],e.rel=Array.from(r).join(" "),e}function nx(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!IL(l)||zL(r,i,t,n)||(o[l]=i)}return BL(o,t,n,!!v0(e,"href"))}function RL(e,t){const n=e.toLowerCase();return TI.has(n)?!1:ex(t,n)||ex(t,e)}function xv(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const l=s.trim(),r=l.toLowerCase();!l||!IL(l)||zL(r,i,t,n)||(o[l]=i)}return BL(o,t,n,!!v0(e,"href"))}function g2(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function w4(e,t="safe",n){const o=xv(g2(e),t,n),s=Object.entries(o).map(([i,l])=>[i,l]);return s.length>0?s:void 0}function fde(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function pde(e){const t={};for(const[n,o]of Object.entries(e))t[n]=fde(o,n);return t}function em(e){return e.trim().length>0}function PL(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const l=e.slice(n,o);em(l)&&t.push({type:"text",content:l})}if(e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=NL(e.slice(o+1,s));if(!i){const l=e.slice(o,s+1);em(l)&&t.push({type:"text",content:l}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||k1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l})}n=s+1}return t}function hde(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=NL(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const l={};if(i.attrsStr){const r=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=r.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(l[c]=u)}}t.push({type:i.isSelfClosing||k1.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:l}),n=s+1}return t}function mde(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${e1(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${e1(o)}`:` ${e1(o)}="${LL(s)}"`).join("");return e.type==="self_closing"?`<${e1(t)}${n} />`:`<${e1(t)}${n}>`}function gde(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of PL(e))if((n.type==="tag_open"||n.type==="self_closing")&&RL(n.tagName??"",t))return!0;return!1}function fu(e,t="safe"){if(!e)return"";if(t==="escape")return e1(e);const n=hde(e),o=[],s=[],i=[];for(const l of n){if(l.type==="text"){i.length===0&&s.push(e1(l.content??""));continue}const r=Vp(l.tagName);if(!r)continue;if($L(r,t)){l.type==="tag_open"?i.push(r):l.type==="tag_close"&&i[i.length-1]===r&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&_v(r,t)){s.push(mde(l));continue}if(l.type==="self_closing"){s.push(`<${r}${tx(nx(l.attrs??{},t,r))}>`);continue}if(l.type==="tag_open"){s.push(`<${r}${tx(nx(l.attrs??{},t,r))}>`),k1.has(r)||o.push(r);continue}const a=o.lastIndexOf(r);if(a===-1)continue;for(;o.length>a+1;){const u=o.pop();u&&s.push(``)}const c=o.pop();c&&s.push(``)}for(;o.length>0;){const l=o.pop();l&&s.push(``)}return s.join("")}const vde=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],ox="http://www.w3.org/2000/svg",yde=new Set(["script","style","iframe","object","embed","link","meta"]),wde=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),kde=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),bde=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),_de=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function xde(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function Sde(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function Cde(e){const t=e.nodeName.toLowerCase();return t==="use"?xde(e):t==="image"?Sde(e):t==="text"||t==="tspan"?!!e.textContent?.trim():_de.has(t)}function Mde(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function Ade(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?$0(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?$0(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":$0(i,{tagName:o,attrName:s})?"":i:""}function Tde(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function jL(e){const t=FL(e),n=t.toLowerCase();let o=0;for(;on.test(t))||jL(t)}function Ede(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function B3(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function OL(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!yde.has(o)){if(o==="br"){t.push(` +`);return}for(const s of Array.from(n.childNodes))OL(s,t)}}function Ide(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];OL(t,n);const o=n.join("").split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=B3(t.getAttribute("width")),i=B3(t.getAttribute("height")),l=B3(t.getAttribute("x")),r=B3(t.getAttribute("y")),a=e.ownerDocument.createElementNS(ox,"text");a.setAttribute("x",String(l+s/2)),a.setAttribute("y",String(r+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const c=t.querySelector(".nodeLabel");if(c?.getAttribute("class")&&a.setAttribute("class",c.getAttribute("class")),o.length===1)a.textContent=o[0];else{const u=-.6*(o.length-1);for(const[d,f]of o.entries()){const p=e.ownerDocument.createElementNS(ox,"tspan");p.setAttribute("x",String(l+s/2)),p.setAttribute("dy",d===0?`${u}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function Lde(e){Ide(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!wde.has(o)){n.remove();continue}if(o==="style"&&sx(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const l=i.name.toLowerCase();if(/^on/i.test(l)){n.removeAttribute(i.name);continue}if(l==="style"&&i.value&&sx(i.value)){n.removeAttribute(i.name);continue}if(l==="srcdoc"){n.removeAttribute(i.name);continue}if(kde.has(l)&&i.value){const r=Ade(o,l,i.value);if(!r){n.removeAttribute(i.name);continue}r!==i.value&&n.setAttribute(i.name,r);continue}if(bde.has(l)&&i.value&&jL(i.value)){n.removeAttribute(i.name);continue}if(i.value){const r=Mde(i.value);r!==i.value&&n.setAttribute(i.name,r)}}Ede(n)}}function kKe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return Lde(n),$de(n)?null:n}catch{return null}}function $de(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),l=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(l)||i<=0||l<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){Cde(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const R3=[];function tm(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Nde(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function zde(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function ix(e=`editor-${Date.now()}`,t={}){const n=_0e(t),o=n;o.__markstreamRegisteredPluginCount=R3.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||R3.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;i=m=>h[m]??s[m]??m}else i=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const m=h;if(Array.isArray(m)){const[k,...x]=m;typeof k=="function"&&n.use(k,...x)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(R3.length)for(const h of R3)if(Array.isArray(h)){const[m,...k]=h;typeof m=="function"&&n.use(m,...k)}else typeof h=="function"&&n.use(h);n.use(Foe),n.use(Hoe),n.use(Boe);const l=tse,r=l.default??l;n.use(r),n.use(zoe),n.use(Noe),n.core.ruler.after("block","mark_fence_closed",h=>{const m=h,k=m.src,x=!!m.env?.__markstreamFinal,y=k.split(/\r?\n/);for(const w of m.tokens){if(w.type!=="fence"||!w.map||!w.markup)continue;const _=w.map[0],A=w.map[1],P=w.markup,z=P[0],L=P.length,T=y[Math.max(0,A-1)]??"";let I=0;for(;I_+1&&N>=L&&C===T.length,H=w;H.meta=H.meta??{},H.meta.unclosed=!F,H.meta.closed=!!F}});const a=(h,m)=>{const k=h,x=k.pos;if(k.src[x]!=="~")return!1;const y=k.src[x-1],w=k.src[x+1];if(/\d/.test(y)&&/\d/.test(w)){if(!m){const _=k.push("text","",0);_.content="~"}return k.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(h,m)=>{const k=h[m],x=String(k.info??"").trim(),y=String(k.content??""),w=btoa(unescape(encodeURIComponent(y))),_=Nde(x),A=tm(_),P=zde(`editor-${e}-${m}-${_}`),z=tm(i("common.copy"));return`
        ${tm(_.toUpperCase())}
        -
        `};const c=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,d=h=>{if(!h.startsWith("["))return!1;const m=u.exec(h);if(!m)return h!=="["&&!/^\[\d+$/.test(h);const k=String(m[1]??"");return h.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(h,m)=>{const k=h;if(k.src[k.pos]!=="[")return!1;const x=c.exec(k.src.slice(k.pos));if(!x)return!1;const y=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(y))return!1;const w=k.src.slice(k.pos+x[0].length);if(w.startsWith("](")||w.startsWith("(")||d(w))return!1;if(!m){const _=x[1],A=k.push("reference","span",0);A.content=_,A.markup=x[0],A.raw=x[0]}return k.pos+=x[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(h,m)=>{const x=String(h[m].content??"");return`${x}`};const p=n.use.bind(n);return n.use=((...h)=>(o.__markstreamHasCustomParserExtensions=!0,p(...h))),n}function zde({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function OL({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:zde({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Bde={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function Rde(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function HL(e){const t=Rde(e);return Bde[t]??t}function Pde(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>HL(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Fde(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function jde(e){return Fde(e)?.join("\0")??""}function Ode(e,t){return`${jde(e)}\0\0${Pde(t)?.join("\0")??""}`}function Sc(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function ix(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var Hde=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const h=lx();this.startedAt=f&&this.hasStarted?h-this.normalizedStartDelayMs:h,this.lastTick=h,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=lx();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,k=qde(h/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const x=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),y=Wde(this.source.slice(this.visible.length),x,this.segmenter);y.text&&(this.visible+=y.text,this.charBudget=Math.max(0,this.charBudget-y.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:l=600,maxCommitFps:r=30,startDelayMs:a=80,maxCharsPerCommit:c=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=Sc(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Sc(o,1e3,1)),this.normalizedTargetLatencyMs=Sc(s,900,1),this.normalizedCatchUpLatencyMs=Sc(i,350,1),this.normalizedCatchUpThreshold=ix(l,600),this.normalizedStartDelayMs=ix(a,80),this.maxCommitFps=Math.trunc(Sc(r,30,1)),this.maxCharsPerCommit=Math.trunc(Sc(c,80,1)),this.flushOnFinish=u,this.segmenter=Vde(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Dde(e={},t){const n=new Hde(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Vde(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function Wde(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function lx(){return typeof performance<"u"?performance.now():Date.now()}function qde(e,t,n){return Math.min(n,Math.max(t,e))}var Ude=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const s7=Symbol.for("markstream-vue:node-lifecycle");function bKe(){}const xv=new Map;let DL="material";const Zc=new Map,rx=new Map;let i7=null;function Zde(e){xv.set(e.id,e)}function Kde(e){const t=xv.get(DL);if(!t)return;const n=t.core[e];if(n)return n;const o=Zc.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Zc.has(t.id)&&Yde(t)}function Gde(){var e,t;return(t=(e=xv.get(DL))==null?void 0:e.fallback)!=null?t:""}function Yde(e){return Ude(this,null,function*(){var t,n,o;if(Zc.has(e.id))return(t=Zc.get(e.id))!=null?t:null;let s=rx.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Zc.set(e.id,i),i7?.(),i)).catch(()=>(Zc.set(e.id,null),null)),rx.set(e.id,s)),s})}const ax='',cx='',Xde={id:"material",core:{"":cx,plain:'',text:cx,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:ax,csharp:ax,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Cs(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Jde=Uo(0);i7=()=>{Jde.value++},Zde(Xde);const Qde={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function Wp(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[l]=i.split(":");return l.toLowerCase()})(e);return(t=Qde[n])!=null?t:n}function _Ke(e){const t=Wp(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function xKe(e){return Kde(Wp(e))||Gde()}const ux={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var qp=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});let Mi=null,S0=!1,C0=null,Up=Cv;function Mf(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Sv(){try{const e=globalThis;return Mf(e?.katex)}catch{return null}}function Cv(){return qp(null,null,function*(){const e=Sv();if(e)return e;const t=yield Cs(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Cs(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return Mf(t)})}function VL(e){const t=Promise.resolve(e).then(n=>{var o;return C0===t&&n?(Mi=(o=Mf(n))!=null?o:n,Mi):null}).catch(()=>null).finally(()=>{C0===t&&(C0=null)});return C0=t,S0=!0,t}function e2e(e){Up=e,Mi=null,S0=!1,C0=null}function t2e(e){e2e(Cv)}function WL(){return typeof Up=="function"}function SKe(){var e;const t=Up;if(!t||t===Cv)return null;if(Mi)return Mi;const n=Sv();if(n)return Mi=n,Mi;if(S0)return null;try{const o=t();return o?typeof o?.then=="function"?(VL(o),null):(Mi=(e=Mf(o))!=null?e:o,Mi):null}catch{return null}}function qL(){return qp(this,null,function*(){var e;const t=Sv();if(t)return Mi=t,Mi;if(Mi)return Mi;if(C0)return C0;if(S0)return null;const n=Up;if(!n)return S0=!0,null;try{const o=n();if(typeof o?.then=="function")return VL(o);if(o)return Mi=(e=Mf(o))!=null?e:o,S0=!0,Mi}catch{}return S0=!0,null})}function UL(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let o1=null,Ya=null;const Js=new Map,pa=new Map;let tf=5;const z0=new Set;function v2(){if(Js.size{const{id:n,html:o,error:s}=t.data,i=Js.get(n);if(i)if(Js.delete(n),clearTimeout(i.timeoutId),i.cleanup(),v2(),s)i.aborted||i.reject(new Error(s));else{const{content:l,displayMode:r}=t.data;if(l){const a=`${r?"d":"i"}:${l}`;if(pa.set(a,o),pa.size>200){const c=pa.keys().next().value;pa.delete(c)}}i.aborted||i.resolve(o)}},o1.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Js.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Js.clear(),ZL()}}function o2e(){var e;for(const t of Js.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Js.clear(),ZL(),o1&&((e=o1.terminate)==null||e.call(o1)),o1=null,Ya=null}function s2e(e,t=!0,n=2e3,o){return qp(this,null,function*(){performance.now();const s=UL(e);if(!WL()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Ya)return Promise.reject(Ya);const i=`${t?"d":"i"}:${s}`,l=pa.get(i);if(l)return v2(),Promise.resolve(l);const r=o1||(Ya=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Ya.name="WorkerInitError",Ya.code="WORKER_INIT_ERROR",null);if(!r)return Promise.reject(Ya);if(Js.size>=tf){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Js.size,a.max=tf,Promise.reject(a)}return new Promise((a,c)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void c(m)}const u=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Js.get(u);if(!m)return;Js.delete(u),m.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",m.aborted||m.reject(k),v2()},n);d=()=>{const m=Js.get(u);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const k=new Error("Aborted");k.name="AbortError",c(k)},o&&o.addEventListener("abort",d,{once:!0});const p=a,h=c;Js.set(u,{resolve:m=>{p(m)},reject:m=>{h(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{r.postMessage({id:u,content:s,displayMode:t})}catch(m){const k=Js.get(u);Js.delete(u),clearTimeout(f),k?.cleanup(),k?.reject(m),v2()}})})}function CKe(e,t=!0,n){const o=`${t?"d":"i"}:${UL(e)}`;if(pa.set(o,n),pa.size>200){const s=pa.keys().next().value;pa.delete(s)}}const i2e="WORKER_BUSY";function l2e(e=2e3,t){return Js.size{let s,i=!1,l=null,r=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),z0.delete(r),t&&l&&t.removeEventListener("abort",l),l=null};r=()=>{i||(i=!0,a(),n())},z0.add(r),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const c=new Error("Wait for worker slot timed out");c.name="WorkerBusyTimeout",c.code="WORKER_BUSY_TIMEOUT",o(c)},e),queueMicrotask(()=>v2()),t&&(l=()=>{if(i)return;i=!0,a();const c=new Error("Aborted");c.name="AbortError",o(c)},t.aborted?l():t.addEventListener("abort",l,{once:!0}))})}const Ad={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function MKe(e){return qp(this,arguments,function*(t,n=!0,o={}){var s,i,l,r;if(!WL()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:Ad.timeout,c=(i=o.waitTimeout)!=null?i:Ad.waitTimeout,u=(l=o.backoffMs)!=null?l:Ad.backoffMs,d=(r=o.maxRetries)!=null?r:Ad.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):Ad.maxRetries,p=o.signal;let h=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield s2e(t,n,a,p)}catch(m){if(m?.code!==i2e||h>=f)throw m;if(h++,yield l2e(c,p).catch(()=>{}),p?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}u>0&&(yield new Promise(k=>globalThis.setTimeout(k,u*h)))}}})}function Kc(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function r2e(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function E5(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=r2e(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function I5(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function KL(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function L5(e,t=360,n=500){return KL(e,t,n)}function $5(e,t=360,n=500){return KL(e,t,n)}var a2e=Object.defineProperty,c2e=Object.defineProperties,u2e=Object.getOwnPropertyDescriptors,dx=Object.getOwnPropertySymbols,d2e=Object.prototype.hasOwnProperty,f2e=Object.prototype.propertyIsEnumerable,fx=(e,t,n)=>t in e?a2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GL=(e,t)=>{for(var n in t||(t={}))d2e.call(t,n)&&fx(e,n,t[n]);if(dx)for(var n of dx(t))f2e.call(t,n)&&fx(e,n,t[n]);return e},px=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const N5=()=>Cs(()=>import("./mermaid.core-BusHtpbx.js").then(e=>e.cb),__vite__mapDeps([4,5]));let Xr=null,Gc=N5,Kd=null,l7=!1,r7=!1,Gd=0;function p2e(e){Gc=e,Gd++,Xr=null,Kd=null,l7=!1,r7=!1}function h2e(e){p2e(N5)}function hx(){return typeof Gc=="function"}function mx(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=GL({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},c2e(n,u2e(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function gx(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=GL({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function AKe(){return px(this,null,function*(){if(Xr)return Xr;const e=(function(){try{const o=globalThis;return mx(o?.mermaid)}catch{return null}})();if(e)return Xr=e,gx(Xr),Xr;const t=Gc,n=Gd;return t?t===N5&&l7?null:Kd||(Kd=px(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===N5)return n===Gd&&t===Gc&&(l7=!0,(function(i){r7||(r7=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Gd&&t===Gc&&(Kd=null)}return n!==Gd||t!==Gc?null:o?(Xr=mx(o),gx(Xr),Xr):null}),Kd):null})}let Hi=null,Xa=null;const or=new Map,u0=new Map;function k4(e){for(const t of or.values())t.reject(e);or.clear(),u0.clear()}let vx=5,yx=!1;const m2e="WORKER_BUSY",wx="MERMAID_DISABLED";function g2e(e){if(Hi&&Hi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",k4(n)}Hi=e,Xa=null;const t=e;Hi.onmessage=n=>{if(Hi!==t)return;const{id:o,ok:s,result:i,error:l}=n.data,r=or.get(o);r&&(s===!1||l?r.reject(new Error(l||"Unknown error")):r.resolve(i))},Hi.onerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{yx?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}k4(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Hi.onmessageerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{yx?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}k4(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function v2e(){var e;if(Hi)try{k4(new Error("Worker cleared")),(e=Hi.terminate)==null||e.call(Hi)}catch{}Hi=null,Xa=null}function YL(e,t,n,o){if(!hx()){const l=new Error("Mermaid rendering disabled");return l.name="MermaidDisabled",l.code=wx,Promise.reject(l)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=u0.get(s);return i||(i=(function(l,r,a=1400){if(!hx()){const u=new Error("Mermaid rendering disabled");return u.name="MermaidDisabled",u.code=wx,Promise.reject(u)}if(Xa)return Promise.reject(Xa);const c=Hi||(Xa=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Xa.name="WorkerInitError",Xa.code="WORKER_INIT_ERROR",null);if(!c)return Promise.reject(Xa);if(or.size>=vx){const u=new Error("Worker busy");return u.name="WorkerBusy",u.code=m2e,u.inFlight=or.size,u.max=vx,Promise.reject(u)}return new Promise((u,d)=>{const f=Math.random().toString(36).slice(2);let p,h=!1;const m=()=>{h||(h=!0,p!=null&&globalThis.clearTimeout(p),or.delete(f))},k={resolve:x=>{m(),u(x)},reject:x=>{m(),d(x)}};or.set(f,k);try{c.postMessage({id:f,action:l,payload:r})}catch(x){return or.delete(f),void d(x)}p=globalThis.setTimeout(()=>{const x=new Error("Worker call timed out");x.name="WorkerTimeout",x.code="WORKER_TIMEOUT";const y=or.get(f);y&&y.reject(x)},a)})})(e,t,n),u0.set(s,i),i.then(()=>{u0.get(s)===i&&u0.delete(s)},()=>{u0.get(s)===i&&u0.delete(s)})),(function(l,r){if(!r)return l;if(r.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,c)=>{let u=()=>{};const d=()=>r.removeEventListener("abort",u);u=()=>{d();const f=new Error("Aborted");f.name="AbortError",c(f)},r.addEventListener("abort",u,{once:!0}),l.then(f=>{d(),a(f)},f=>{d(),c(f)})})})(i,o)}function TKe(e,t,n=1400,o){return YL("canParse",{code:e,theme:t},n,o)}function EKe(e,t,n=1400,o){return YL("findPrefix",{code:e,theme:t},n,o)}var y2e=Object.defineProperty,w2e=Object.defineProperties,k2e=Object.getOwnPropertyDescriptors,kx=Object.getOwnPropertySymbols,b2e=Object.prototype.hasOwnProperty,_2e=Object.prototype.propertyIsEnumerable,bx=(e,t,n)=>t in e?y2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t)=>{for(var n in t||(t={}))b2e.call(t,n)&&bx(e,n,t[n]);if(kx)for(var n of kx(t))_2e.call(t,n)&&bx(e,n,t[n]);return e},wn=(e,t)=>w2e(e,k2e(t)),zo=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const x2e="__global__",nm="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",a7=(()=>{const e=globalThis;if(e[nm])return e[nm];const t={scopedCustomComponents:{},revision:Uo(0)};return e[nm]=t,t})(),_x=a7.revision,S2e=Symbol("markstreamCustomComponents"),C2e=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function Af(e){return C2e.has(String(e).trim().toLowerCase())}function M2e(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function om(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([Vl(n),Vl(M2e(n))]))!s||Af(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function Is(e){const t=fn(S2e,null);return B(()=>{var n;return _x.value,(function(o,s={}){return _x.value,St(St(St({},om(a7.scopedCustomComponents[x2e]||{})),om(s)),om((function(i){return i&&a7.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const A2e=["aria-label"],T2e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},E2e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},ho=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},ll=ho(Je({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(g(),S("svg",E2e,[...n[1]||(n[1]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),b("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(g(),S("svg",T2e,[...n[0]||(n[0]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,A2e))}),[["__scopeId","data-v-be21ab83"]]);ll.install=e=>{e.component(ll.__name,ll)};const I2e={class:"emoji-node"},Zi=ho(Je({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",I2e,I(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Zi.install=e=>{e.component(Zi.__name,Zi)};const L2e=["id"],$2e=["title"],rl=ho(Je({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(g(),S("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[b("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+I(e.node.id)+"]",9,$2e)],8,L2e))}}),[["__scopeId","data-v-c1463a29"]]);rl.install=e=>{e.component(rl.__name,rl)};const XL=(()=>{try{return!1}catch{}return!1})();function sm(e){XL&&console.warn(e)}function xx(e,t="safe",n){return _v(e,t,n)}function JL(e){return fde(e)}function im(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Mv(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=w4((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([l,r])=>[String(l),im(r)]):s.filter(l=>l&&typeof l=="object"&&!Array.isArray(l)&&"name"in l).map(l=>[String(l.name),im(l.value)]):Object.entries(s).map(([l,r])=>[l,im(r)]):null,t,n);var s;if(!o)return;const i=JL(g2(o));return Object.keys(i).length>0?i:void 0}function Sx(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,l])=>l===""?` ${i}`:` ${i}="${l}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function Td(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function lm(e,t,n,o,s,i,l=!1){const r=(function(d,f){return BL(d,f)})(e,o);if(_f.has(e.toLowerCase())||!r&&LL(e,i))return null;if(!r&&bv(e,i))return l?[Sx(e,t,!0)]:[Sx(e,t),...n,``];const a=_v(t,i,e),c=a.key,u=c!=null&&c!==""?c:s;if(r){const d=o[e]||o[e.toLowerCase()],f=JL(a);return vn(d,wn(St({},f),{key:u}),n.length>0?n:void 0)}return vn(e,wn(St({},a),{innerHTML:void 0,key:u}),n.length>0?n:void 0)}function QL(e,t){return mde(e,t)}function z5(e,t,n="safe"){if(!e)return[];try{return(function(i,l,r="safe"){let a=0;const c=[],u=[];for(const d of i)if(d.type==="text")(c.length>0?c[c.length-1].children:u).push(d.content);else if(d.type==="self_closing"){const f=lm(d.tagName,d.attrs||{},[],l,"ms-html-"+a++,r,!0);Td(c.length>0?c[c.length-1].children:u,f)}else if(d.type==="tag_open")c.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let h=c.length-1;h>=0;h--)if(c[h].tagName.toLowerCase()===f){p=h;break}if(p!==-1)for(;c.length>p;){const h=c.pop(),m=lm(h.tagName,h.attrs||{},h.children,l,h.autoKey,r);c.length>0?Td(c[c.length-1].children,m):Td(u,m),h.tagName.toLowerCase()!==f&&c.length>p&&sm(`Auto-closing unclosed tag: <${h.tagName}>`)}else sm(`Ignoring closing tag with no matching opening tag: `)}for(;c.length>0;){const d=c.pop(),f=lm(d.tagName,d.attrs||{},d.children,l,d.autoKey,r);c.length>0?Td(c[c.length-1].children,f):Td(u,f),sm(`Auto-closing unclosed tag: <${d.tagName}>`)}return u})(RL(e),t,n)}catch(s){return o=s,XL&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const N2e=["innerHTML"],al=ho(Je({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=B(()=>{var r,a;return(a=(r=t.htmlPolicy)!=null?r:n?.value)!=null?a:"safe"}),s=Is(()=>t.customId),i=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),l=B(()=>{const r=t.node.content;if(!r)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:fu(r,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:r};if(t.node.loading&&t.node.autoClosed){const c=z5(r,s.value,o.value);if(c!==null)return{mode:"dynamic",nodes:c}}if(!QL(r,s.value))return{mode:"html",content:fu(r,o.value)};const a=z5(r,s.value,o.value);return a===null?{mode:"html",content:fu(r,o.value)}:{mode:"dynamic",nodes:a}});return(r,a)=>l.value.mode==="dynamic"?(g(),S("span",{key:0,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[W(v(i),{nodes:l.value.nodes},null,8,["nodes"])],2)):l.value.mode==="text"?(g(),S("span",{key:1,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},I(l.value.content),3)):(g(),S("span",{key:2,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:l.value.content},null,10,N2e))}}),[["__scopeId","data-v-d17f12b0"]]);al.install=e=>{e.component(al.__name,al)};const z2e={class:"inline-code"},B2e={key:0},hi=ho(Je({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=vf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=B(()=>{const y=n.fade;return y===""||y===!0||y==="true"||y!==!1&&y!=="false"&&void 0}),r=B(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=B(()=>{var y;return String((y=t.node.code)!=null?y:"")}),c=B(()=>!r.value),u=B(()=>{var y;const w=(y=n["index-key"])!=null?y:n.indexKey;return w==null||w===""?"":String(w)}),d=V(t.node.code),f=V(""),p=V(0);let h;function m(){h?.(),h=void 0}function k(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ke([()=>t.node.code,u,r],([y])=>{const w=String(y??""),_=u.value,A=OL({nextContent:w,persistedContent:_?s?.get(_):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:r.value});d.value=A.settledContent,f.value=A.streamedDelta,A.appended?(p.value+=1,(function(){if(!f.value||h||!i)return;const P=i.value;h=Ke(()=>i.value,z=>{z!==P&&k()},{flush:"sync"})})()):f.value||m(),_&&s?.set(_,w)},{immediate:!0}),pf(m);const x=B(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(y,w)=>(g(),S("code",z2e,[c.value?(g(),S(Ce,{key:0},[He(I(a.value),1)],64)):(g(),S(Ce,{key:1},[d.value?(g(),S("span",B2e,I(d.value),1)):Y("",!0),f.value?(g(),S("span",{key:1,class:Be(["inline-code-stream-delta",[x.value]]),onAnimationend:k},I(f.value),35)):Y("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);hi.install=e=>{e.component(hi.__name,hi)};const c7=V(!1),Cx=V(""),Mx=V("top"),y2=V(null),w2=V(null),u7=V(null),d7=V(null),Ax=V(null);let b4=null,_4=null,f7=0;function e$(){b4&&(clearTimeout(b4),b4=null),_4&&(clearTimeout(_4),_4=null)}let P3=!1,F3=null,Tx=!1;function R2e(e,t,n="top",o=!1,s,i){if(!e)return;const l=++f7;e$();const r=()=>zo(null,null,function*(){var a,c;if(yield(function(){return zo(this,null,function*(){if(!P3&&!Tx&&typeof document<"u"){F3!=null||(F3=zo(null,null,function*(){const[{createApp:u,h:d},{default:f}]=yield Promise.all([Cs(()=>import("./vue.runtime.esm-bundler-B0BJU7Oe.js"),[]),Cs(()=>import("./Tooltip-aicK0c3c.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),u({setup:()=>()=>{var h;return d(f,{visible:c7.value,"anchor-el":y2.value,content:Cx.value,placement:Mx.value,id:w2.value,originX:u7.value,originY:d7.value,isDark:(h=Ax.value)!=null?h:void 0})}}).mount(p),P3=!0}));try{yield F3}catch(u){P3=!1,F3=null,Tx=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",u)}}})})(),P3&&l===f7){w2.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,y2.value=e,Cx.value=t,Mx.value=n,u7.value=(a=s?.x)!=null?a:null,d7.value=(c=s?.y)!=null?c:null,Ax.value=typeof i=="boolean"?i:null,c7.value=!0;try{e.setAttribute("aria-describedby",w2.value)}catch{}}});o?r():b4=setTimeout(r,80)}function P2e(e=!1){f7+=1,e$();const t=()=>{if(y2.value&&w2.value)try{y2.value.removeAttribute("aria-describedby")}catch{}c7.value=!1,y2.value=null,w2.value=null,u7.value=null,d7.value=null};e?t():_4=setTimeout(t,120)}const F2e={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},j2e=Symbol("markstreamI18nFallback");function t$(e,t){var n;return(n=t?.[e])!=null?n:F2e[e]}const p7=(e,t)=>{var n;return(n=t$(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function Ex(e,t){return{t(n){const o=t$(n,t);if(e.te&&o!=null&&!e.te(n))return p7(n,t);const s=e.t(n);return s===n&&o!=null?p7(n,t):s}}}function O2e(){const e=(function(){var n,o,s;try{const i=Ts(),l=j2e,r=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=r?.[l])!=null?o:a?.[l])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=Ts(),i=s?.proxy,l=i?.$t;if(typeof l=="function"){const c=i?.$te;return{t:l.bind(i),te:typeof c=="function"?c.bind(i):void 0}}const r=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=r?.$t;if(typeof a=="function"){const c=r?.$te;return{t:a.bind(r),te:typeof c=="function"?c.bind(r):void 0}}}catch{}return null})();if(t)return Ex(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return Ex({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>p7(n,e)}}const n$=Symbol("ViewportPriority"),o$=Symbol("ViewportPriorityOptions"),s$=Symbol("OffscreenHeavyNodeDeferral"),H2e=B(()=>!1),F0="400px";function Av(){return fn(o$,void 0)}function Tv(){return fn(s$,H2e)}function D2e(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?V(t):t,l=s?(n=window.requestIdleCallback)!=null?n:z=>window.setTimeout(()=>z({didTimeout:!0,timeRemaining:()=>0}),16):null,r=s?(o=window.cancelIdleCallback)!=null?o:z=>window.clearTimeout(z):null,a=new WeakMap;let c=1;const u=new Map,d=new Map,f=new Set;let p=null,h=null;function m(z){if(!z)return"viewport";let L=a.get(z);return L||(L=c++,a.set(z,L)),String(L)}function k(){if(p!=null){try{r?.(p)}catch{}p=null}}function x(z){if(z){const L=u.get(z);if(L&&!L.targets.size){try{L.io.disconnect()}catch{}u.delete(z)}}d.size||f.size||k()}function y(z){const L=d.get(z);if(!L)return;const E=u.get(L.bucketKey);if(!L.visible.value){L.visible.value=!0;try{L.resolve()}catch{}}try{E?.io.unobserve(z)}catch{}E?.targets.delete(z),d.delete(z),f.delete(z),x(L.bucketKey)}function w(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&p==null&&f.size&&(p=l(()=>{p=null;const z=f.values().next().value;z&&(f.delete(z),y(z),f.size&&w())},{timeout:1200}))}function _(z,L){if(!s||typeof IntersectionObserver>"u")return null;const E=(function(D,M){var R,O,U;return{root:(R=e?.(D??null))!=null?R:null,rootMargin:(O=M?.rootMargin)!=null?O:F0,threshold:(U=M?.threshold)!=null?U:0}})(z,L),T=[m(($=E).root),$.rootMargin,$.threshold].join("\0");var $;const C=u.get(T);if(C)return{key:T,bucket:C};let j;try{j=new IntersectionObserver(D=>{for(const M of D)(M.isIntersecting||M.intersectionRatio>0)&&y(M.target)},{root:E.root,rootMargin:E.rootMargin,threshold:E.threshold})}catch{return null}const H={io:j,targets:new Map};return u.set(T,H),{key:T,bucket:H}}function A(){if(s&&i.value)for(const[z,L]of Array.from(d.entries())){const E=_(z,L.opts);if(!E){y(z);continue}if(E.key===L.bucketKey)continue;const T=L.bucketKey,$=u.get(T);try{$?.io.unobserve(z)}catch{}$?.targets.delete(z),L.bucketKey=E.key,E.bucket.targets.set(z,L),E.bucket.io.observe(z),x(T)}}Ke(i,z=>{if(!z){for(const L of Array.from(d.keys()))y(L);k()}},{flush:"sync"});const P=(z,L)=>{const E=V(!1);let T,$=!1;const C=new Promise(M=>{T=()=>{$||($=!0,M())}}),j=()=>{const M=d.get(z);if(!M)return f.delete(z),void x();const R=u.get(M.bucketKey);try{R?.io.unobserve(z)}catch{}R?.targets.delete(z),d.delete(z),f.delete(z),x(M.bucketKey)};if(!s||!i.value)return E.value=!0,T(),{isVisible:E,whenVisible:C,destroy:j};const H=_(z,L);if(!H)return E.value=!0,T(),{isVisible:E,whenVisible:C,destroy:j};const D={resolve:T,visible:E,bucketKey:H.key,opts:L};return d.set(z,D),H.bucket.targets.set(z,D),H.bucket.io.observe(z),s&&h==null&&(h=window.requestAnimationFrame(()=>{h=null,A()})),L?.allowIdle!==!1&&(f.add(z),w()),{isVisible:E,whenVisible:C,destroy:j}};return P.refresh=A,qn(n$,P),P}function Ev(){var e,t;const n=fn(n$,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let l=null;const r=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,c=()=>{if(l!=null){try{a?.(l)}catch{}l=null}},u=p=>{if(!p)return;const h=s.get(p);if(h&&!h.targets.size){try{h.io.disconnect()}catch{}s.delete(p)}},d=p=>{const h=o.get(p);if(!h)return;const m=s.get(h.bucketKey);if(!h.visible.value){h.visible.value=!0;try{h.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}o.delete(p),m?.targets.delete(p),i.delete(p),u(h.bucketKey),i.size||c()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&l==null&&i.size&&(l=r(()=>{l=null;const p=i.values().next().value;p&&(i.delete(p),d(p),i.size&&f())},{timeout:1200}))};return(p,h)=>{const m=V(!1);let k,x=!1;const y=new Promise(A=>{k=()=>{x||(x=!0,A())}}),w=()=>{const A=o.get(p);if(!A)return i.delete(p),void(i.size||c());const P=s.get(A.bucketKey);try{P?.io.unobserve(p)}catch{}o.delete(p),P?.targets.delete(p),i.delete(p),u(A.bucketKey),i.size||c()},_=(A=>{var P,z;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const L=(j=>{var H,D;return[(H=j?.rootMargin)!=null?H:F0,(D=j?.threshold)!=null?D:0].join("\0")})(A),E=s.get(L);if(E)return{key:L,bucket:E};const T=(P=A?.rootMargin)!=null?P:F0;let $;try{$=new IntersectionObserver(j=>{for(const H of j)(H.isIntersecting||H.intersectionRatio>0)&&d(H.target)},{root:null,rootMargin:T,threshold:(z=A?.threshold)!=null?z:0})}catch{return null}const C={io:$,targets:new Set};return s.set(L,C),{key:L,bucket:C}})(h);return _?(o.set(p,{resolve:k,visible:m,bucketKey:_.key}),_.bucket.targets.add(p),_.bucket.io.observe(p),h?.allowIdle!==!1&&(i.add(p),f()),{isVisible:m,whenVisible:y,destroy:w}):(m.value=!0,k(),{isVisible:m,whenVisible:y,destroy:w})}}function V2e(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const W2e=["data-markstream-viewport-pending"],q2e=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],U2e={key:1,class:"image-placeholder"},Z2e={key:1,class:"image-node__raw-text"},K2e={key:2,class:"image-shimmer-overlay"},G2e={key:1,class:"image-node__raw-text"},Y2e={key:3,class:"image-error"},d1=ho(Je({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,l=t,r=V(!1),a=V(!1),c=V(""),u=V("primary"),d=V(null),f=vf(),p=fn(s7,null),h=Ev(),m=Av(),k=Tv(),x=B(()=>Qb(i.node.src)),y=B(()=>Qb(i.fallbackSrc)),w=(s=(o=(n=Ts())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),_=typeof window<"u"&&w?.getAttribute("src")===(x.value||y.value),A=V(typeof window>"u"||_||!k.value),P=Uo(null);let z="",L=null;const E=B(()=>c.value),T=B(()=>!i.lazy),$=B(()=>typeof window<"u"&&k.value&&!_),C=B(()=>!$.value||A.value),j=B(()=>C.value?E.value:""),H=B(()=>{var xe,Ye;return(Ye=(xe=m?.value.heavyBlockMargin)!=null?xe:m?.value.rootMargin)!=null?Ye:F0}),D=B(()=>!i.node.loading&&u.value!=="failed"&&c.value.length>0),M=B(()=>u.value==="failed"),R=B(()=>(!T.value||$.value&&!A.value)&&!r.value&&!a.value&&u.value!=="failed"&&c.value.length>0),O=B(()=>V2e(i,f));function U(xe=O.value){xe&&d.value&&p?.reportHeight(xe,d.value.offsetHeight)}function Z(xe=O.value){xe&&yt(()=>{U(xe)})}function q(){L&&(clearTimeout(L),L=null)}function te(){const xe=O.value;xe&&z!==xe&&(z&&p?.markSettled(z),q(),z=xe,p?.markPending(xe),typeof window<"u"&&(L=window.setTimeout(()=>{z===xe&&(Z(xe),ee())},8e3)))}function ee(){return zo(this,null,function*(){const xe=z;xe&&(q(),z="",yield yt(),U(xe),p?.markSettled(xe))})}function J(){if(u.value==="primary"&&y.value&&y.value!==c.value)return u.value="fallback",c.value=y.value,r.value=!1,a.value=!1,void Z();u.value="failed",a.value=!0,l("error",c.value),Z()}function se(){r.value=!0,a.value=!1,l("load",E.value),Z()}function Q(xe){xe.preventDefault(),r.value&&!a.value&&l("click",[xe,E.value])}const{t:me}=O2e();return Ke([x,y,()=>i.node.loading],()=>(r.value=!1,a.value=!1,i.node.loading||x.value?(c.value=x.value,void(u.value="primary")):y.value?(c.value=y.value,void(u.value="fallback")):(c.value="",u.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ke([d,$],([xe,Ye],at,X)=>{var oe;if((oe=P.value)==null||oe.destroy(),P.value=null,!Ye||A.value)return void(A.value=!0);if(!xe)return void(A.value=!1);let F=!0;const K=h(xe,{rootMargin:H.value,allowIdle:!1});P.value=K,A.value=K.isVisible.value,K.whenVisible.then(()=>{F&&P.value===K&&(A.value=!0)}),X(()=>{F=!1,K.destroy(),P.value===K&&(P.value=null)})},{immediate:!0}),Ke([D,r,a,E,()=>i.lazy,C],([xe,Ye,at,X,oe,F])=>xe&&X&&!at&&F?Ye?(ee(),void Z()):oe?(te(),void Z()):void(Ye||at||te()):(ee(),void Z()),{flush:"post",immediate:!0}),vo(()=>{var xe;(xe=P.value)==null||xe.destroy(),P.value=null,(function(){const Ye=z;Ye&&(q(),z="",p?.markSettled(Ye))})()}),(xe,Ye)=>{var at,X,oe,F,K;return g(),S("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":$.value&&!A.value?"true":void 0},[D.value?(g(),S("img",{key:0,src:j.value||void 0,alt:String((X=(at=i.node.alt)!=null?at:i.node.title)!=null?X:""),title:String((F=(oe=i.node.title)!=null?oe:i.node.alt)!=null?F:""),class:Be(["image-node__img",{"is-loading":!T.value&&!r.value,"is-loaded":T.value||r.value,"has-natural-size":r.value,"cursor-pointer":r.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:T.value?"high":void 0,decoding:T.value?"sync":"async",tabindex:r.value?0:-1,"aria-label":(K=i.node.alt)!=null?K:v(me)("image.preview"),onError:J,onLoad:se,onClick:Q},null,42,q2e)):Y("",!0),e.node.loading&&!a.value?(g(),S("span",U2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:E.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[0]||(Ye[0]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",Z2e,I(e.node.raw),1))])):Y("",!0),R.value&&!e.node.loading?(g(),S("span",K2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:E.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[1]||(Ye[1]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",G2e,I(e.node.raw),1))])):Y("",!0),M.value?(g(),S("span",Y2e,[jn(xe.$slots,"error",{node:i.node,displaySrc:E.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[2]||(Ye[2]=b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[b("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),b("span",null,I(v(me)("image.loadError")),1)],!0)])):Y("",!0)],8,W2e)}}}),[["__scopeId","data-v-046e82ac"]]);d1.install=e=>{e.component(d1.__name,d1)};const X2e={key:2},Pr=Je({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamNestedRendererProps",void 0),i=B(()=>{var h;return(h=o?.value)!=null?h:"safe"}),l=B(()=>{var h,m;const k=(h=s?.value)!=null?h:{};return wn(St({},k),{customId:(m=t.customId)!=null?m:k.customId,htmlPolicy:i.value})}),r=Rl({loader:()=>Promise.resolve().then(()=>Ov),suspensible:!1}),a=B(()=>t.components[String(t.node.type)]),c=B(()=>!!(a.value&&n.value[t.node.type]&&!Af(String(t.node.type)))),u=B(()=>c.value?Mv(t.node,i.value):void 0),d=B(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=B(()=>{var h;return String((h=t.node.content)!=null?h:"")}),p=B(()=>{var h,m;return String((m=(h=t.node.content)!=null?h:t.node.raw)!=null?m:"")});return(h,m)=>a.value&&c.value?(g(),ue(cs(a.value),io({key:0},u.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":l.value.isDark}),{default:ae(()=>[d.value?(g(),ue(v(r),io({key:0},l.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(g(),ue(v(r),io({key:1},l.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(g(),ue(cs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(g(),S("span",X2e,I(p.value),1)):Y("",!0)}}),Ix=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function J2e(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return wn(St(St({},Ix),n),{enabled:(t=n.enabled)==null||t})}return St({},Ix)}function Iv(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function i$(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function Lx(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function Q2e(e){var t;return e.diff===!0||Lx(e.language)||Lx(i$(String((t=e.raw)!=null?t:"")))}function efe(e,t,n){const o=(function(s){const i=i$(s);if(!i)return"";const l=i.split(/\s+/).filter(Boolean);if(!l.length)return"";const r=l[0]==="diff"?l.slice(1):l;for(const a of r){const c=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(c&&/[./\\-]/.test(c))return c}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const tfe=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],nfe={key:0,translate:"no",class:"markstream-pre__diff-code"},ofe={class:"markstream-pre__diff-pane-content"},sfe={class:"markstream-pre__diff-number","aria-hidden":"true"},ife={class:"markstream-pre__diff-content"},lfe={class:"markstream-pre__diff-content-inner"},rfe={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},afe=["textContent"],cfe=["textContent"],Di=Je({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(se,Q){const me=String(se??"");return Q?me:me.replace(/\r\n$|\n$|\r$/,"")}const o=B(()=>{var se,Q,me;const xe=String((Q=(se=t.node)==null?void 0:se.language)!=null?Q:"");return String((me=String(xe).split(/\s+/g)[0])!=null?me:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=B(()=>`language-${o.value}`),i=B(()=>{var se;return t.loading===!0||((se=t.node)==null?void 0:se.loading)===!0}),l=B(()=>{var se;return n((se=t.node)==null?void 0:se.code,i.value)});let r="",a=1;const c=B(()=>(function(se){let Q=0,me=1;se.startsWith(r)&&(Q=r.length,me=a,Q>0&&se[Q-1]==="\r"&&se[Q]===` +
        `};const c=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,d=h=>{if(!h.startsWith("["))return!1;const m=u.exec(h);if(!m)return h!=="["&&!/^\[\d+$/.test(h);const k=String(m[1]??"");return h.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(h,m)=>{const k=h;if(k.src[k.pos]!=="[")return!1;const x=c.exec(k.src.slice(k.pos));if(!x)return!1;const y=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(y))return!1;const w=k.src.slice(k.pos+x[0].length);if(w.startsWith("](")||w.startsWith("(")||d(w))return!1;if(!m){const _=x[1],A=k.push("reference","span",0);A.content=_,A.markup=x[0],A.raw=x[0]}return k.pos+=x[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(h,m)=>{const x=String(h[m].content??"");return`${x}`};const p=n.use.bind(n);return n.use=((...h)=>(o.__markstreamHasCustomParserExtensions=!0,p(...h))),n}function Bde({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function HL({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:Bde({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Rde={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function Pde(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function DL(e){const t=Pde(e);return Rde[t]??t}function Fde(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>DL(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function jde(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function Ode(e){return jde(e)?.join("\0")??""}function Hde(e,t){return`${Ode(e)}\0\0${Fde(t)?.join("\0")??""}`}function Sc(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function lx(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var Dde=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const h=rx();this.startedAt=f&&this.hasStarted?h-this.normalizedStartDelayMs:h,this.lastTick=h,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=rx();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,k=Ude(h/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const x=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),y=qde(this.source.slice(this.visible.length),x,this.segmenter);y.text&&(this.visible+=y.text,this.charBudget=Math.max(0,this.charBudget-y.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:l=600,maxCommitFps:r=30,startDelayMs:a=80,maxCharsPerCommit:c=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=Sc(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Sc(o,1e3,1)),this.normalizedTargetLatencyMs=Sc(s,900,1),this.normalizedCatchUpLatencyMs=Sc(i,350,1),this.normalizedCatchUpThreshold=lx(l,600),this.normalizedStartDelayMs=lx(a,80),this.maxCommitFps=Math.trunc(Sc(r,30,1)),this.maxCharsPerCommit=Math.trunc(Sc(c,80,1)),this.flushOnFinish=u,this.segmenter=Wde(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Vde(e={},t){const n=new Dde(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Wde(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function qde(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function rx(){return typeof performance<"u"?performance.now():Date.now()}function Ude(e,t,n){return Math.min(n,Math.max(t,e))}var Zde=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const i7=Symbol.for("markstream-vue:node-lifecycle");function bKe(){}const Sv=new Map;let VL="material";const Zc=new Map,ax=new Map;let l7=null;function Kde(e){Sv.set(e.id,e)}function Gde(e){const t=Sv.get(VL);if(!t)return;const n=t.core[e];if(n)return n;const o=Zc.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Zc.has(t.id)&&Xde(t)}function Yde(){var e,t;return(t=(e=Sv.get(VL))==null?void 0:e.fallback)!=null?t:""}function Xde(e){return Zde(this,null,function*(){var t,n,o;if(Zc.has(e.id))return(t=Zc.get(e.id))!=null?t:null;let s=ax.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Zc.set(e.id,i),l7?.(),i)).catch(()=>(Zc.set(e.id,null),null)),ax.set(e.id,s)),s})}const cx='',ux='',Jde={id:"material",core:{"":ux,plain:'',text:ux,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:cx,csharp:cx,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Cs(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Qde=Uo(0);l7=()=>{Qde.value++},Kde(Jde);const e2e={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function Wp(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[l]=i.split(":");return l.toLowerCase()})(e);return(t=e2e[n])!=null?t:n}function _Ke(e){const t=Wp(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function xKe(e){return Gde(Wp(e))||Yde()}const dx={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var qp=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});let Mi=null,S0=!1,C0=null,Up=Mv;function Mf(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Cv(){try{const e=globalThis;return Mf(e?.katex)}catch{return null}}function Mv(){return qp(null,null,function*(){const e=Cv();if(e)return e;const t=yield Cs(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Cs(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return Mf(t)})}function WL(e){const t=Promise.resolve(e).then(n=>{var o;return C0===t&&n?(Mi=(o=Mf(n))!=null?o:n,Mi):null}).catch(()=>null).finally(()=>{C0===t&&(C0=null)});return C0=t,S0=!0,t}function t2e(e){Up=e,Mi=null,S0=!1,C0=null}function n2e(e){t2e(Mv)}function qL(){return typeof Up=="function"}function SKe(){var e;const t=Up;if(!t||t===Mv)return null;if(Mi)return Mi;const n=Cv();if(n)return Mi=n,Mi;if(S0)return null;try{const o=t();return o?typeof o?.then=="function"?(WL(o),null):(Mi=(e=Mf(o))!=null?e:o,Mi):null}catch{return null}}function UL(){return qp(this,null,function*(){var e;const t=Cv();if(t)return Mi=t,Mi;if(Mi)return Mi;if(C0)return C0;if(S0)return null;const n=Up;if(!n)return S0=!0,null;try{const o=n();if(typeof o?.then=="function")return WL(o);if(o)return Mi=(e=Mf(o))!=null?e:o,S0=!0,Mi}catch{}return S0=!0,null})}function ZL(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let o1=null,Ya=null;const Js=new Map,pa=new Map;let tf=5;const z0=new Set;function v2(){if(Js.size{const{id:n,html:o,error:s}=t.data,i=Js.get(n);if(i)if(Js.delete(n),clearTimeout(i.timeoutId),i.cleanup(),v2(),s)i.aborted||i.reject(new Error(s));else{const{content:l,displayMode:r}=t.data;if(l){const a=`${r?"d":"i"}:${l}`;if(pa.set(a,o),pa.size>200){const c=pa.keys().next().value;pa.delete(c)}}i.aborted||i.resolve(o)}},o1.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Js.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Js.clear(),KL()}}function s2e(){var e;for(const t of Js.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Js.clear(),KL(),o1&&((e=o1.terminate)==null||e.call(o1)),o1=null,Ya=null}function i2e(e,t=!0,n=2e3,o){return qp(this,null,function*(){performance.now();const s=ZL(e);if(!qL()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Ya)return Promise.reject(Ya);const i=`${t?"d":"i"}:${s}`,l=pa.get(i);if(l)return v2(),Promise.resolve(l);const r=o1||(Ya=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Ya.name="WorkerInitError",Ya.code="WORKER_INIT_ERROR",null);if(!r)return Promise.reject(Ya);if(Js.size>=tf){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Js.size,a.max=tf,Promise.reject(a)}return new Promise((a,c)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void c(m)}const u=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Js.get(u);if(!m)return;Js.delete(u),m.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",m.aborted||m.reject(k),v2()},n);d=()=>{const m=Js.get(u);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const k=new Error("Aborted");k.name="AbortError",c(k)},o&&o.addEventListener("abort",d,{once:!0});const p=a,h=c;Js.set(u,{resolve:m=>{p(m)},reject:m=>{h(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{r.postMessage({id:u,content:s,displayMode:t})}catch(m){const k=Js.get(u);Js.delete(u),clearTimeout(f),k?.cleanup(),k?.reject(m),v2()}})})}function CKe(e,t=!0,n){const o=`${t?"d":"i"}:${ZL(e)}`;if(pa.set(o,n),pa.size>200){const s=pa.keys().next().value;pa.delete(s)}}const l2e="WORKER_BUSY";function r2e(e=2e3,t){return Js.size{let s,i=!1,l=null,r=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),z0.delete(r),t&&l&&t.removeEventListener("abort",l),l=null};r=()=>{i||(i=!0,a(),n())},z0.add(r),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const c=new Error("Wait for worker slot timed out");c.name="WorkerBusyTimeout",c.code="WORKER_BUSY_TIMEOUT",o(c)},e),queueMicrotask(()=>v2()),t&&(l=()=>{if(i)return;i=!0,a();const c=new Error("Aborted");c.name="AbortError",o(c)},t.aborted?l():t.addEventListener("abort",l,{once:!0}))})}const Ad={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function MKe(e){return qp(this,arguments,function*(t,n=!0,o={}){var s,i,l,r;if(!qL()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:Ad.timeout,c=(i=o.waitTimeout)!=null?i:Ad.waitTimeout,u=(l=o.backoffMs)!=null?l:Ad.backoffMs,d=(r=o.maxRetries)!=null?r:Ad.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):Ad.maxRetries,p=o.signal;let h=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield i2e(t,n,a,p)}catch(m){if(m?.code!==l2e||h>=f)throw m;if(h++,yield r2e(c,p).catch(()=>{}),p?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}u>0&&(yield new Promise(k=>globalThis.setTimeout(k,u*h)))}}})}function Kc(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function a2e(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function E5(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=a2e(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function I5(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function GL(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function L5(e,t=360,n=500){return GL(e,t,n)}function $5(e,t=360,n=500){return GL(e,t,n)}var c2e=Object.defineProperty,u2e=Object.defineProperties,d2e=Object.getOwnPropertyDescriptors,fx=Object.getOwnPropertySymbols,f2e=Object.prototype.hasOwnProperty,p2e=Object.prototype.propertyIsEnumerable,px=(e,t,n)=>t in e?c2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YL=(e,t)=>{for(var n in t||(t={}))f2e.call(t,n)&&px(e,n,t[n]);if(fx)for(var n of fx(t))p2e.call(t,n)&&px(e,n,t[n]);return e},hx=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const N5=()=>Cs(()=>import("./mermaid.core-CwGP16Dm.js").then(e=>e.cb),__vite__mapDeps([4,5]));let Xr=null,Gc=N5,Kd=null,r7=!1,a7=!1,Gd=0;function h2e(e){Gc=e,Gd++,Xr=null,Kd=null,r7=!1,a7=!1}function m2e(e){h2e(N5)}function mx(){return typeof Gc=="function"}function gx(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=YL({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},u2e(n,d2e(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function vx(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=YL({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function AKe(){return hx(this,null,function*(){if(Xr)return Xr;const e=(function(){try{const o=globalThis;return gx(o?.mermaid)}catch{return null}})();if(e)return Xr=e,vx(Xr),Xr;const t=Gc,n=Gd;return t?t===N5&&r7?null:Kd||(Kd=hx(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===N5)return n===Gd&&t===Gc&&(r7=!0,(function(i){a7||(a7=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Gd&&t===Gc&&(Kd=null)}return n!==Gd||t!==Gc?null:o?(Xr=gx(o),vx(Xr),Xr):null}),Kd):null})}let Hi=null,Xa=null;const or=new Map,u0=new Map;function k4(e){for(const t of or.values())t.reject(e);or.clear(),u0.clear()}let yx=5,wx=!1;const g2e="WORKER_BUSY",kx="MERMAID_DISABLED";function v2e(e){if(Hi&&Hi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",k4(n)}Hi=e,Xa=null;const t=e;Hi.onmessage=n=>{if(Hi!==t)return;const{id:o,ok:s,result:i,error:l}=n.data,r=or.get(o);r&&(s===!1||l?r.reject(new Error(l||"Unknown error")):r.resolve(i))},Hi.onerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{wx?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}k4(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Hi.onmessageerror=n=>{var o,s;if(Hi===t)if(or.size!==0){try{wx?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}k4(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function y2e(){var e;if(Hi)try{k4(new Error("Worker cleared")),(e=Hi.terminate)==null||e.call(Hi)}catch{}Hi=null,Xa=null}function XL(e,t,n,o){if(!mx()){const l=new Error("Mermaid rendering disabled");return l.name="MermaidDisabled",l.code=kx,Promise.reject(l)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=u0.get(s);return i||(i=(function(l,r,a=1400){if(!mx()){const u=new Error("Mermaid rendering disabled");return u.name="MermaidDisabled",u.code=kx,Promise.reject(u)}if(Xa)return Promise.reject(Xa);const c=Hi||(Xa=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Xa.name="WorkerInitError",Xa.code="WORKER_INIT_ERROR",null);if(!c)return Promise.reject(Xa);if(or.size>=yx){const u=new Error("Worker busy");return u.name="WorkerBusy",u.code=g2e,u.inFlight=or.size,u.max=yx,Promise.reject(u)}return new Promise((u,d)=>{const f=Math.random().toString(36).slice(2);let p,h=!1;const m=()=>{h||(h=!0,p!=null&&globalThis.clearTimeout(p),or.delete(f))},k={resolve:x=>{m(),u(x)},reject:x=>{m(),d(x)}};or.set(f,k);try{c.postMessage({id:f,action:l,payload:r})}catch(x){return or.delete(f),void d(x)}p=globalThis.setTimeout(()=>{const x=new Error("Worker call timed out");x.name="WorkerTimeout",x.code="WORKER_TIMEOUT";const y=or.get(f);y&&y.reject(x)},a)})})(e,t,n),u0.set(s,i),i.then(()=>{u0.get(s)===i&&u0.delete(s)},()=>{u0.get(s)===i&&u0.delete(s)})),(function(l,r){if(!r)return l;if(r.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,c)=>{let u=()=>{};const d=()=>r.removeEventListener("abort",u);u=()=>{d();const f=new Error("Aborted");f.name="AbortError",c(f)},r.addEventListener("abort",u,{once:!0}),l.then(f=>{d(),a(f)},f=>{d(),c(f)})})})(i,o)}function TKe(e,t,n=1400,o){return XL("canParse",{code:e,theme:t},n,o)}function EKe(e,t,n=1400,o){return XL("findPrefix",{code:e,theme:t},n,o)}var w2e=Object.defineProperty,k2e=Object.defineProperties,b2e=Object.getOwnPropertyDescriptors,bx=Object.getOwnPropertySymbols,_2e=Object.prototype.hasOwnProperty,x2e=Object.prototype.propertyIsEnumerable,_x=(e,t,n)=>t in e?w2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t)=>{for(var n in t||(t={}))_2e.call(t,n)&&_x(e,n,t[n]);if(bx)for(var n of bx(t))x2e.call(t,n)&&_x(e,n,t[n]);return e},wn=(e,t)=>k2e(e,b2e(t)),zo=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{r(n.next(a))}catch(c){s(c)}},l=a=>{try{r(n.throw(a))}catch(c){s(c)}},r=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,l);r((n=n.apply(e,t)).next())});const S2e="__global__",nm="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",c7=(()=>{const e=globalThis;if(e[nm])return e[nm];const t={scopedCustomComponents:{},revision:Uo(0)};return e[nm]=t,t})(),xx=c7.revision,C2e=Symbol("markstreamCustomComponents"),M2e=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function Af(e){return M2e.has(String(e).trim().toLowerCase())}function A2e(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function om(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([Vl(n),Vl(A2e(n))]))!s||Af(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function Is(e){const t=fn(C2e,null);return B(()=>{var n;return xx.value,(function(o,s={}){return xx.value,St(St(St({},om(c7.scopedCustomComponents[S2e]||{})),om(s)),om((function(i){return i&&c7.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const T2e=["aria-label"],E2e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},I2e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},ho=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},ll=ho(Je({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(g(),S("svg",I2e,[...n[1]||(n[1]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),b("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(g(),S("svg",E2e,[...n[0]||(n[0]=[b("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,T2e))}),[["__scopeId","data-v-be21ab83"]]);ll.install=e=>{e.component(ll.__name,ll)};const L2e={class:"emoji-node"},Zi=ho(Je({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("span",L2e,E(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Zi.install=e=>{e.component(Zi.__name,Zi)};const $2e=["id"],N2e=["title"],rl=ho(Je({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(g(),S("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[b("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+E(e.node.id)+"]",9,N2e)],8,$2e))}}),[["__scopeId","data-v-c1463a29"]]);rl.install=e=>{e.component(rl.__name,rl)};const JL=(()=>{try{return!1}catch{}return!1})();function sm(e){JL&&console.warn(e)}function Sx(e,t="safe",n){return xv(e,t,n)}function QL(e){return pde(e)}function im(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Av(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=w4((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([l,r])=>[String(l),im(r)]):s.filter(l=>l&&typeof l=="object"&&!Array.isArray(l)&&"name"in l).map(l=>[String(l.name),im(l.value)]):Object.entries(s).map(([l,r])=>[l,im(r)]):null,t,n);var s;if(!o)return;const i=QL(g2(o));return Object.keys(i).length>0?i:void 0}function Cx(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,l])=>l===""?` ${i}`:` ${i}="${l}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function Td(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function lm(e,t,n,o,s,i,l=!1){const r=(function(d,f){return RL(d,f)})(e,o);if(_f.has(e.toLowerCase())||!r&&$L(e,i))return null;if(!r&&_v(e,i))return l?[Cx(e,t,!0)]:[Cx(e,t),...n,``];const a=xv(t,i,e),c=a.key,u=c!=null&&c!==""?c:s;if(r){const d=o[e]||o[e.toLowerCase()],f=QL(a);return vn(d,wn(St({},f),{key:u}),n.length>0?n:void 0)}return vn(e,wn(St({},a),{innerHTML:void 0,key:u}),n.length>0?n:void 0)}function e$(e,t){return gde(e,t)}function z5(e,t,n="safe"){if(!e)return[];try{return(function(i,l,r="safe"){let a=0;const c=[],u=[];for(const d of i)if(d.type==="text")(c.length>0?c[c.length-1].children:u).push(d.content);else if(d.type==="self_closing"){const f=lm(d.tagName,d.attrs||{},[],l,"ms-html-"+a++,r,!0);Td(c.length>0?c[c.length-1].children:u,f)}else if(d.type==="tag_open")c.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let h=c.length-1;h>=0;h--)if(c[h].tagName.toLowerCase()===f){p=h;break}if(p!==-1)for(;c.length>p;){const h=c.pop(),m=lm(h.tagName,h.attrs||{},h.children,l,h.autoKey,r);c.length>0?Td(c[c.length-1].children,m):Td(u,m),h.tagName.toLowerCase()!==f&&c.length>p&&sm(`Auto-closing unclosed tag: <${h.tagName}>`)}else sm(`Ignoring closing tag with no matching opening tag: `)}for(;c.length>0;){const d=c.pop(),f=lm(d.tagName,d.attrs||{},d.children,l,d.autoKey,r);c.length>0?Td(c[c.length-1].children,f):Td(u,f),sm(`Auto-closing unclosed tag: <${d.tagName}>`)}return u})(PL(e),t,n)}catch(s){return o=s,JL&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const z2e=["innerHTML"],al=ho(Je({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=B(()=>{var r,a;return(a=(r=t.htmlPolicy)!=null?r:n?.value)!=null?a:"safe"}),s=Is(()=>t.customId),i=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),l=B(()=>{const r=t.node.content;if(!r)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:fu(r,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:r};if(t.node.loading&&t.node.autoClosed){const c=z5(r,s.value,o.value);if(c!==null)return{mode:"dynamic",nodes:c}}if(!e$(r,s.value))return{mode:"html",content:fu(r,o.value)};const a=z5(r,s.value,o.value);return a===null?{mode:"html",content:fu(r,o.value)}:{mode:"dynamic",nodes:a}});return(r,a)=>l.value.mode==="dynamic"?(g(),S("span",{key:0,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[W(v(i),{nodes:l.value.nodes},null,8,["nodes"])],2)):l.value.mode==="text"?(g(),S("span",{key:1,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},E(l.value.content),3)):(g(),S("span",{key:2,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:l.value.content},null,10,z2e))}}),[["__scopeId","data-v-d17f12b0"]]);al.install=e=>{e.component(al.__name,al)};const B2e={class:"inline-code"},R2e={key:0},hi=ho(Je({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=vf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=B(()=>{const y=n.fade;return y===""||y===!0||y==="true"||y!==!1&&y!=="false"&&void 0}),r=B(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=B(()=>{var y;return String((y=t.node.code)!=null?y:"")}),c=B(()=>!r.value),u=B(()=>{var y;const w=(y=n["index-key"])!=null?y:n.indexKey;return w==null||w===""?"":String(w)}),d=V(t.node.code),f=V(""),p=V(0);let h;function m(){h?.(),h=void 0}function k(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ke([()=>t.node.code,u,r],([y])=>{const w=String(y??""),_=u.value,A=HL({nextContent:w,persistedContent:_?s?.get(_):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:r.value});d.value=A.settledContent,f.value=A.streamedDelta,A.appended?(p.value+=1,(function(){if(!f.value||h||!i)return;const P=i.value;h=Ke(()=>i.value,z=>{z!==P&&k()},{flush:"sync"})})()):f.value||m(),_&&s?.set(_,w)},{immediate:!0}),pf(m);const x=B(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(y,w)=>(g(),S("code",B2e,[c.value?(g(),S(Ce,{key:0},[He(E(a.value),1)],64)):(g(),S(Ce,{key:1},[d.value?(g(),S("span",R2e,E(d.value),1)):Y("",!0),f.value?(g(),S("span",{key:1,class:Be(["inline-code-stream-delta",[x.value]]),onAnimationend:k},E(f.value),35)):Y("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);hi.install=e=>{e.component(hi.__name,hi)};const u7=V(!1),Mx=V(""),Ax=V("top"),y2=V(null),w2=V(null),d7=V(null),f7=V(null),Tx=V(null);let b4=null,_4=null,p7=0;function t$(){b4&&(clearTimeout(b4),b4=null),_4&&(clearTimeout(_4),_4=null)}let P3=!1,F3=null,Ex=!1;function P2e(e,t,n="top",o=!1,s,i){if(!e)return;const l=++p7;t$();const r=()=>zo(null,null,function*(){var a,c;if(yield(function(){return zo(this,null,function*(){if(!P3&&!Ex&&typeof document<"u"){F3!=null||(F3=zo(null,null,function*(){const[{createApp:u,h:d},{default:f}]=yield Promise.all([Cs(()=>import("./vue.runtime.esm-bundler-C60WDxyU.js"),[]),Cs(()=>import("./Tooltip-BMItlE4H.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),u({setup:()=>()=>{var h;return d(f,{visible:u7.value,"anchor-el":y2.value,content:Mx.value,placement:Ax.value,id:w2.value,originX:d7.value,originY:f7.value,isDark:(h=Tx.value)!=null?h:void 0})}}).mount(p),P3=!0}));try{yield F3}catch(u){P3=!1,F3=null,Ex=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",u)}}})})(),P3&&l===p7){w2.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,y2.value=e,Mx.value=t,Ax.value=n,d7.value=(a=s?.x)!=null?a:null,f7.value=(c=s?.y)!=null?c:null,Tx.value=typeof i=="boolean"?i:null,u7.value=!0;try{e.setAttribute("aria-describedby",w2.value)}catch{}}});o?r():b4=setTimeout(r,80)}function F2e(e=!1){p7+=1,t$();const t=()=>{if(y2.value&&w2.value)try{y2.value.removeAttribute("aria-describedby")}catch{}u7.value=!1,y2.value=null,w2.value=null,d7.value=null,f7.value=null};e?t():_4=setTimeout(t,120)}const j2e={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},O2e=Symbol("markstreamI18nFallback");function n$(e,t){var n;return(n=t?.[e])!=null?n:j2e[e]}const h7=(e,t)=>{var n;return(n=n$(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function Ix(e,t){return{t(n){const o=n$(n,t);if(e.te&&o!=null&&!e.te(n))return h7(n,t);const s=e.t(n);return s===n&&o!=null?h7(n,t):s}}}function H2e(){const e=(function(){var n,o,s;try{const i=Ts(),l=O2e,r=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=r?.[l])!=null?o:a?.[l])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=Ts(),i=s?.proxy,l=i?.$t;if(typeof l=="function"){const c=i?.$te;return{t:l.bind(i),te:typeof c=="function"?c.bind(i):void 0}}const r=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=r?.$t;if(typeof a=="function"){const c=r?.$te;return{t:a.bind(r),te:typeof c=="function"?c.bind(r):void 0}}}catch{}return null})();if(t)return Ix(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return Ix({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>h7(n,e)}}const o$=Symbol("ViewportPriority"),s$=Symbol("ViewportPriorityOptions"),i$=Symbol("OffscreenHeavyNodeDeferral"),D2e=B(()=>!1),F0="400px";function Tv(){return fn(s$,void 0)}function Ev(){return fn(i$,D2e)}function V2e(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?V(t):t,l=s?(n=window.requestIdleCallback)!=null?n:z=>window.setTimeout(()=>z({didTimeout:!0,timeRemaining:()=>0}),16):null,r=s?(o=window.cancelIdleCallback)!=null?o:z=>window.clearTimeout(z):null,a=new WeakMap;let c=1;const u=new Map,d=new Map,f=new Set;let p=null,h=null;function m(z){if(!z)return"viewport";let L=a.get(z);return L||(L=c++,a.set(z,L)),String(L)}function k(){if(p!=null){try{r?.(p)}catch{}p=null}}function x(z){if(z){const L=u.get(z);if(L&&!L.targets.size){try{L.io.disconnect()}catch{}u.delete(z)}}d.size||f.size||k()}function y(z){const L=d.get(z);if(!L)return;const T=u.get(L.bucketKey);if(!L.visible.value){L.visible.value=!0;try{L.resolve()}catch{}}try{T?.io.unobserve(z)}catch{}T?.targets.delete(z),d.delete(z),f.delete(z),x(L.bucketKey)}function w(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&p==null&&f.size&&(p=l(()=>{p=null;const z=f.values().next().value;z&&(f.delete(z),y(z),f.size&&w())},{timeout:1200}))}function _(z,L){if(!s||typeof IntersectionObserver>"u")return null;const T=(function(D,M){var R,O,U;return{root:(R=e?.(D??null))!=null?R:null,rootMargin:(O=M?.rootMargin)!=null?O:F0,threshold:(U=M?.threshold)!=null?U:0}})(z,L),I=[m((N=T).root),N.rootMargin,N.threshold].join("\0");var N;const C=u.get(I);if(C)return{key:I,bucket:C};let F;try{F=new IntersectionObserver(D=>{for(const M of D)(M.isIntersecting||M.intersectionRatio>0)&&y(M.target)},{root:T.root,rootMargin:T.rootMargin,threshold:T.threshold})}catch{return null}const H={io:F,targets:new Map};return u.set(I,H),{key:I,bucket:H}}function A(){if(s&&i.value)for(const[z,L]of Array.from(d.entries())){const T=_(z,L.opts);if(!T){y(z);continue}if(T.key===L.bucketKey)continue;const I=L.bucketKey,N=u.get(I);try{N?.io.unobserve(z)}catch{}N?.targets.delete(z),L.bucketKey=T.key,T.bucket.targets.set(z,L),T.bucket.io.observe(z),x(I)}}Ke(i,z=>{if(!z){for(const L of Array.from(d.keys()))y(L);k()}},{flush:"sync"});const P=(z,L)=>{const T=V(!1);let I,N=!1;const C=new Promise(M=>{I=()=>{N||(N=!0,M())}}),F=()=>{const M=d.get(z);if(!M)return f.delete(z),void x();const R=u.get(M.bucketKey);try{R?.io.unobserve(z)}catch{}R?.targets.delete(z),d.delete(z),f.delete(z),x(M.bucketKey)};if(!s||!i.value)return T.value=!0,I(),{isVisible:T,whenVisible:C,destroy:F};const H=_(z,L);if(!H)return T.value=!0,I(),{isVisible:T,whenVisible:C,destroy:F};const D={resolve:I,visible:T,bucketKey:H.key,opts:L};return d.set(z,D),H.bucket.targets.set(z,D),H.bucket.io.observe(z),s&&h==null&&(h=window.requestAnimationFrame(()=>{h=null,A()})),L?.allowIdle!==!1&&(f.add(z),w()),{isVisible:T,whenVisible:C,destroy:F}};return P.refresh=A,qn(o$,P),P}function Iv(){var e,t;const n=fn(o$,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let l=null;const r=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,c=()=>{if(l!=null){try{a?.(l)}catch{}l=null}},u=p=>{if(!p)return;const h=s.get(p);if(h&&!h.targets.size){try{h.io.disconnect()}catch{}s.delete(p)}},d=p=>{const h=o.get(p);if(!h)return;const m=s.get(h.bucketKey);if(!h.visible.value){h.visible.value=!0;try{h.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}o.delete(p),m?.targets.delete(p),i.delete(p),u(h.bucketKey),i.size||c()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&l==null&&i.size&&(l=r(()=>{l=null;const p=i.values().next().value;p&&(i.delete(p),d(p),i.size&&f())},{timeout:1200}))};return(p,h)=>{const m=V(!1);let k,x=!1;const y=new Promise(A=>{k=()=>{x||(x=!0,A())}}),w=()=>{const A=o.get(p);if(!A)return i.delete(p),void(i.size||c());const P=s.get(A.bucketKey);try{P?.io.unobserve(p)}catch{}o.delete(p),P?.targets.delete(p),i.delete(p),u(A.bucketKey),i.size||c()},_=(A=>{var P,z;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const L=(F=>{var H,D;return[(H=F?.rootMargin)!=null?H:F0,(D=F?.threshold)!=null?D:0].join("\0")})(A),T=s.get(L);if(T)return{key:L,bucket:T};const I=(P=A?.rootMargin)!=null?P:F0;let N;try{N=new IntersectionObserver(F=>{for(const H of F)(H.isIntersecting||H.intersectionRatio>0)&&d(H.target)},{root:null,rootMargin:I,threshold:(z=A?.threshold)!=null?z:0})}catch{return null}const C={io:N,targets:new Set};return s.set(L,C),{key:L,bucket:C}})(h);return _?(o.set(p,{resolve:k,visible:m,bucketKey:_.key}),_.bucket.targets.add(p),_.bucket.io.observe(p),h?.allowIdle!==!1&&(i.add(p),f()),{isVisible:m,whenVisible:y,destroy:w}):(m.value=!0,k(),{isVisible:m,whenVisible:y,destroy:w})}}function W2e(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const q2e=["data-markstream-viewport-pending"],U2e=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],Z2e={key:1,class:"image-placeholder"},K2e={key:1,class:"image-node__raw-text"},G2e={key:2,class:"image-shimmer-overlay"},Y2e={key:1,class:"image-node__raw-text"},X2e={key:3,class:"image-error"},d1=ho(Je({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,l=t,r=V(!1),a=V(!1),c=V(""),u=V("primary"),d=V(null),f=vf(),p=fn(i7,null),h=Iv(),m=Tv(),k=Ev(),x=B(()=>e_(i.node.src)),y=B(()=>e_(i.fallbackSrc)),w=(s=(o=(n=Ts())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),_=typeof window<"u"&&w?.getAttribute("src")===(x.value||y.value),A=V(typeof window>"u"||_||!k.value),P=Uo(null);let z="",L=null;const T=B(()=>c.value),I=B(()=>!i.lazy),N=B(()=>typeof window<"u"&&k.value&&!_),C=B(()=>!N.value||A.value),F=B(()=>C.value?T.value:""),H=B(()=>{var xe,Ye;return(Ye=(xe=m?.value.heavyBlockMargin)!=null?xe:m?.value.rootMargin)!=null?Ye:F0}),D=B(()=>!i.node.loading&&u.value!=="failed"&&c.value.length>0),M=B(()=>u.value==="failed"),R=B(()=>(!I.value||N.value&&!A.value)&&!r.value&&!a.value&&u.value!=="failed"&&c.value.length>0),O=B(()=>W2e(i,f));function U(xe=O.value){xe&&d.value&&p?.reportHeight(xe,d.value.offsetHeight)}function Z(xe=O.value){xe&&yt(()=>{U(xe)})}function q(){L&&(clearTimeout(L),L=null)}function te(){const xe=O.value;xe&&z!==xe&&(z&&p?.markSettled(z),q(),z=xe,p?.markPending(xe),typeof window<"u"&&(L=window.setTimeout(()=>{z===xe&&(Z(xe),ee())},8e3)))}function ee(){return zo(this,null,function*(){const xe=z;xe&&(q(),z="",yield yt(),U(xe),p?.markSettled(xe))})}function J(){if(u.value==="primary"&&y.value&&y.value!==c.value)return u.value="fallback",c.value=y.value,r.value=!1,a.value=!1,void Z();u.value="failed",a.value=!0,l("error",c.value),Z()}function se(){r.value=!0,a.value=!1,l("load",T.value),Z()}function Q(xe){xe.preventDefault(),r.value&&!a.value&&l("click",[xe,T.value])}const{t:me}=H2e();return Ke([x,y,()=>i.node.loading],()=>(r.value=!1,a.value=!1,i.node.loading||x.value?(c.value=x.value,void(u.value="primary")):y.value?(c.value=y.value,void(u.value="fallback")):(c.value="",u.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ke([d,N],([xe,Ye],at,X)=>{var oe;if((oe=P.value)==null||oe.destroy(),P.value=null,!Ye||A.value)return void(A.value=!0);if(!xe)return void(A.value=!1);let j=!0;const K=h(xe,{rootMargin:H.value,allowIdle:!1});P.value=K,A.value=K.isVisible.value,K.whenVisible.then(()=>{j&&P.value===K&&(A.value=!0)}),X(()=>{j=!1,K.destroy(),P.value===K&&(P.value=null)})},{immediate:!0}),Ke([D,r,a,T,()=>i.lazy,C],([xe,Ye,at,X,oe,j])=>xe&&X&&!at&&j?Ye?(ee(),void Z()):oe?(te(),void Z()):void(Ye||at||te()):(ee(),void Z()),{flush:"post",immediate:!0}),vo(()=>{var xe;(xe=P.value)==null||xe.destroy(),P.value=null,(function(){const Ye=z;Ye&&(q(),z="",p?.markSettled(Ye))})()}),(xe,Ye)=>{var at,X,oe,j,K;return g(),S("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":N.value&&!A.value?"true":void 0},[D.value?(g(),S("img",{key:0,src:F.value||void 0,alt:String((X=(at=i.node.alt)!=null?at:i.node.title)!=null?X:""),title:String((j=(oe=i.node.title)!=null?oe:i.node.alt)!=null?j:""),class:Be(["image-node__img",{"is-loading":!I.value&&!r.value,"is-loaded":I.value||r.value,"has-natural-size":r.value,"cursor-pointer":r.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:I.value?"high":void 0,decoding:I.value?"sync":"async",tabindex:r.value?0:-1,"aria-label":(K=i.node.alt)!=null?K:v(me)("image.preview"),onError:J,onLoad:se,onClick:Q},null,42,U2e)):Y("",!0),e.node.loading&&!a.value?(g(),S("span",Z2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:T.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[0]||(Ye[0]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",K2e,E(e.node.raw),1))])):Y("",!0),R.value&&!e.node.loading?(g(),S("span",G2e,[i.usePlaceholder?jn(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:T.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[1]||(Ye[1]=b("span",{class:"image-shimmer"},null,-1))],!0):(g(),S("span",Y2e,E(e.node.raw),1))])):Y("",!0),M.value?(g(),S("span",X2e,[jn(xe.$slots,"error",{node:i.node,displaySrc:T.value,imageLoaded:r.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[Ye[2]||(Ye[2]=b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[b("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),b("span",null,E(v(me)("image.loadError")),1)],!0)])):Y("",!0)],8,q2e)}}}),[["__scopeId","data-v-046e82ac"]]);d1.install=e=>{e.component(d1.__name,d1)};const J2e={key:2},Pr=Je({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamNestedRendererProps",void 0),i=B(()=>{var h;return(h=o?.value)!=null?h:"safe"}),l=B(()=>{var h,m;const k=(h=s?.value)!=null?h:{};return wn(St({},k),{customId:(m=t.customId)!=null?m:k.customId,htmlPolicy:i.value})}),r=Rl({loader:()=>Promise.resolve().then(()=>Hv),suspensible:!1}),a=B(()=>t.components[String(t.node.type)]),c=B(()=>!!(a.value&&n.value[t.node.type]&&!Af(String(t.node.type)))),u=B(()=>c.value?Av(t.node,i.value):void 0),d=B(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=B(()=>{var h;return String((h=t.node.content)!=null?h:"")}),p=B(()=>{var h,m;return String((m=(h=t.node.content)!=null?h:t.node.raw)!=null?m:"")});return(h,m)=>a.value&&c.value?(g(),ue(cs(a.value),io({key:0},u.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":l.value.isDark}),{default:ae(()=>[d.value?(g(),ue(v(r),io({key:0},l.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(g(),ue(v(r),io({key:1},l.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(g(),ue(cs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(g(),S("span",J2e,E(p.value),1)):Y("",!0)}}),Lx=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Q2e(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return wn(St(St({},Lx),n),{enabled:(t=n.enabled)==null||t})}return St({},Lx)}function Lv(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function l$(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function $x(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function efe(e){var t;return e.diff===!0||$x(e.language)||$x(l$(String((t=e.raw)!=null?t:"")))}function tfe(e,t,n){const o=(function(s){const i=l$(s);if(!i)return"";const l=i.split(/\s+/).filter(Boolean);if(!l.length)return"";const r=l[0]==="diff"?l.slice(1):l;for(const a of r){const c=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(c&&/[./\\-]/.test(c))return c}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const nfe=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],ofe={key:0,translate:"no",class:"markstream-pre__diff-code"},sfe={class:"markstream-pre__diff-pane-content"},ife={class:"markstream-pre__diff-number","aria-hidden":"true"},lfe={class:"markstream-pre__diff-content"},rfe={class:"markstream-pre__diff-content-inner"},afe={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},cfe=["textContent"],ufe=["textContent"],Di=Je({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(se,Q){const me=String(se??"");return Q?me:me.replace(/\r\n$|\n$|\r$/,"")}const o=B(()=>{var se,Q,me;const xe=String((Q=(se=t.node)==null?void 0:se.language)!=null?Q:"");return String((me=String(xe).split(/\s+/g)[0])!=null?me:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=B(()=>`language-${o.value}`),i=B(()=>{var se;return t.loading===!0||((se=t.node)==null?void 0:se.loading)===!0}),l=B(()=>{var se;return n((se=t.node)==null?void 0:se.code,i.value)});let r="",a=1;const c=B(()=>(function(se){let Q=0,me=1;se.startsWith(r)&&(Q=r.length,me=a,Q>0&&se[Q-1]==="\r"&&se[Q]===` `&&Q++);for(let xe=Q;xel.value.split(/\r\n|\n|\r/));let d=0,f="";const p=B(()=>{const se=c.value;se{var se;return t.showLineNumbers===!0&&((se=t.node)==null?void 0:se.diff)===!0}),m=B(()=>h.value&&t.diffInline===!0),k=B(()=>{const se=Number(t.reservedHeightPx);if(!Number.isFinite(se)||se<=0)return;const Q=`${Math.ceil(se)}px`;return i.value?{maxHeight:Q,overflow:"auto"}:{height:Q,minHeight:Q,maxHeight:Q,overflow:"auto"}}),x=["diff ","index ","--- ","+++ ","@@ "];function y(se){return String(se??"").trim().length===0}function w(se,Q="context",me={}){const xe=y(se);return{code:se,kind:xe&&Q!=="hunk"&&Q!=="spacer"&&!me.preserveBlankKind?"context":Q,empty:xe}}function _(se){const Q=n(se,i.value);return Q?Q.split(/\r\n|\n|\r/):[]}function A(se,Q){return!y(se[Q])||Qx.some(me=>Q.startsWith(me)))}function E(se,Q){return Q||!se.startsWith(" ")||se.startsWith(" ")?se:` ${se}`}function T(se,Q){const me=se.length,xe=Q.length,Ye=[];let at=0;for(;at=at&&F>=at&&se[oe]===Q[F];)X.unshift({originalIndex:oe,modifiedIndex:F}),oe--,F--;const K=oe-at+1,he=F-at+1;if(K<=0||he<=0||i.value||(K+1)*(he+1)>15e5)return Ye.concat(X);const ye=he+1,ve=new Uint32Array((K+1)*(he+1));for(let Se=K-1;Se>=0;Se--)for(let je=he-1;je>=0;je--){const et=Se*ye+je;if(se[at+Se]===Q[at+je])ve[et]=ve[(Se+1)*ye+je+1]+1;else{const le=ve[(Se+1)*ye+je],fe=ve[Se*ye+je+1];ve[et]=le>=fe?le:fe}}const ie=[];let de=0,be=0;for(;de=ve[de*ye+be+1]?de++:be++;return Ye.concat(ie,X)}function $(se){var Q;const me=(function(){var F,K;const he=t.diffHideUnchangedRegions;if(he==null||he===!1)return null;const ye=he===!0?{}:he;return ye.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((F=ye.contextLineCount)!=null?F:2)),minimumLineCount:Math.max(1,Math.floor((K=ye.minimumLineCount)!=null?K:4))}})();if(!me||se.length<1||se.length>2||se.length===2&&se[0].lines.length!==se[1].lines.length)return se;const xe=se[0].lines,Ye=(Q=se[1])==null?void 0:Q.lines,at=F=>xe[F].kind==="context"&&(Ye===void 0||Ye[F].kind==="context"&&xe[F].code===Ye[F].code),X=[];let oe=0;for(;oe=me.minimumLineCount){const he=F+(F===0?0:me.contextLineCount),ye=K-(K===xe.length?0:me.contextLineCount);ye-he>=me.minimumLineCount&&X.push({start:he,end:ye})}oe===F&&oe++}return X.length?se.map((F,K)=>{const he=[];let ye=0;for(const ve of X)he.push(...F.lines.slice(ye,ve.start)),he.push({code:K===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${F.key}-collapsed-${ve.start}-${ve.end}`,number:""}),ye=ve.end;return he.push(...F.lines.slice(ye)),wn(St({},F),{lines:he})}):se}const C=B(()=>{var se,Q,me,xe;if(!h.value)return[];const Ye=(function(K){const he=K.some(ve=>P(ve)),ye=K.some(ve=>z(ve));return he&&ye||(function(){var ve,ie,de,be;if(o.value==="diff")return!0;const Se=(be=(de=String((ie=(ve=t.node)==null?void 0:ve.raw)!=null?ie:"").split(/\r?\n/,1)[0])==null?void 0:de.trim())!=null?be:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Se)})()&&(he||ye)})(u.value),at=(function(){var K,he;return((K=t.node)==null?void 0:K.originalCode)!=null||((he=t.node)==null?void 0:he.updatedCode)!=null})();if(m.value){const K=at?(function(he,ye){const ve=_(he),ie=_(ye),de=T(ve,ie);if(de.length>0){const fe=[];let ge=0,Oe=0;for(const Fe of de){for(;ge=Se&&et>=Se&&ve[je]===ie[et];)le.unshift(wn(St({},w(ie[et])),{key:`inline-suffix-${et}`,number:et+1})),je--,et--;for(let fe=Se;fe<=je;fe++)be.push(wn(St({},w(ve[fe],"removed",{preserveBlankKind:A(ve,fe)})),{key:`inline-removed-source-${fe}`,number:fe+1}));for(let fe=Se;fe<=et;fe++)be.push(wn(St({},w(ie[fe],"added",{preserveBlankKind:A(ie,fe)})),{key:`inline-added-source-${fe}`,number:fe+1}));return be.concat(le)})((se=t.node)==null?void 0:se.originalCode,(Q=t.node)==null?void 0:Q.updatedCode):(function(he){const ye=[];let ve=1,ie=1;const de=L(he);for(const[be,Se]of he.entries())if(Se.startsWith("@@")){const je=Se.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);je&&(ve=Number(je[1]),ie=Number(je[2])),ye.push(wn(St({},w(Se,"hunk")),{key:`inline-hunk-${be}`,number:""}))}else if(P(Se))ye.push(wn(St({},w(E(Se.slice(1),de),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${be}`,number:ve++}));else if(z(Se))ye.push(wn(St({},w(E(Se.slice(1),de),"added",{preserveBlankKind:!0})),{key:`inline-added-${be}`,number:ie++}));else{const je=de&&Se.startsWith(" ")?Se.slice(1):Se;ye.push(wn(St({},w(je)),{key:`inline-context-${be}`,number:ie})),ve++,ie++}return ye})(u.value);return $([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:K}])}if(!Ye&&at)return(function(K,he){const ye=_(K),ve=_(he),ie=T(ye,ve),de=[],be=[];let Se=0,je=0,et=0;const le=(fe,ge)=>{const Oe=Math.max(fe-Se,ge-je);for(let Fe=0;Fewn(St({},K),{key:`original-${he}`,number:he+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:oe.map((K,he)=>wn(St({},K),{key:`modified-${he}`,number:he+1}))}])}),j=B(()=>C.value.some(se=>se.lines.some(Q=>Q.kind==="collapsed"))),H=B(()=>{const se=o.value;return se?`Code block: ${se}`:"Code block"}),D=V(null),M=V([]);let R=null,O=!1,U=null;function Z(se){const Q=Number.parseFloat(String(se??""));return Number.isFinite(Q)&&Q>0?Q:0}function q(se,Q){var me;if(!se)return Q;if(se.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const xe=se.querySelector(".markstream-pre__diff-content"),Ye=xe?.getBoundingClientRect(),at=(me=Ye?.height)!=null?me:0;return Math.max(Q,Math.ceil(at))}function te(){O||typeof window>"u"||(R!=null&&window.cancelAnimationFrame(R),R=window.requestAnimationFrame(()=>{R=null,O||(function(){var se,Q;R=null;const me=D.value;if(!me||!h.value||m.value||!me.classList.contains("is-wrap"))return void(M.value.length&&(M.value=[]));const xe=(function(he){const ye=window.getComputedStyle(he),ve=Z(ye.getPropertyValue("--markstream-pre-diff-line-height"));if(ve>0)return ve;const ie=Z(ye.lineHeight);return ie>0?ie:18})(me),Ye=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),at=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),X=Math.max(Ye.length,at.length),oe=[];for(let he=0;he{const ve=K[ye];return ve&&Math.abs(he.rowHeight-ve.rowHeight)<=.5&&Math.abs(he.originalHeight-ve.originalHeight)<=.5&&Math.abs(he.modifiedHeight-ve.modifiedHeight)<=.5})||(M.value=oe)})()}))}function ee(se){U?.disconnect(),U=null,se&&h.value&&!m.value&&typeof ResizeObserver<"u"&&(U=new ResizeObserver(()=>{te()}),U.observe(se))}function J(se,Q){const me=M.value[se];if(!me)return;const xe=Q==="original"?me.originalHeight:me.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(me.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(xe)}px`}}return Ke(D,se=>{ee(se),yt(()=>te())},{flush:"post"}),Ke([h,m,C],()=>{ee(D.value),yt(()=>te())},{flush:"post",immediate:!0}),vo(()=>{O=!0,R!=null&&(window.cancelAnimationFrame(R),R=null),U?.disconnect(),U=null}),(se,Q)=>(g(),S("pre",{ref_key:"preRef",ref:D,style:Gt(k.value),class:Be([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":h.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":j.value}]),"aria-busy":i.value,"aria-label":H.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[h.value?(g(),S("code",nfe,[(g(!0),S(Ce,null,rt(C.value,me=>(g(),S("span",{key:me.key,class:Be(["markstream-pre__diff-pane",me.className])},[b("span",ofe,[(g(!0),S(Ce,null,rt(me.lines,(xe,Ye)=>(g(),S("span",{key:xe.key,class:Be(["markstream-pre__diff-line",[`markstream-pre__diff-line--${xe.kind}`,{"markstream-pre__diff-line--empty":xe.empty}]]),style:Gt(J(Ye,me.key))},[Q[0]||(Q[0]=b("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),b("span",sfe,I(xe.number),1),b("span",ife,[b("span",lfe,I(xe.code),1)])],6))),128))])],2))),128))])):(g(),S(Ce,{key:1},[t.showLineNumbers?(g(),S("span",rfe,[b("span",{class:"markstream-pre__line-numbers-text",textContent:I(p.value)},null,8,afe)])):Y("",!0),b("code",{translate:"no",class:"markstream-pre__code",textContent:I(l.value)},null,8,cfe)],64))],14,tfe))}});Di.install=e=>{e.component(Di.__name,Di)};const ufe={key:0},is=ho(Je({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=vf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=B(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),r=B(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=B(()=>{var k;const x=(k=n["index-key"])!=null?k:n.indexKey;return x==null||x===""?"":String(x)}),c=V(t.node.content),u=V(""),d=V(0);let f;function p(){f?.(),f=void 0}function h(){p(),u.value&&(c.value=c.value+u.value,u.value="")}Ke([()=>t.node.content,a,r],([k])=>{const x=String(k??""),y=a.value,w=OL({nextContent:x,persistedContent:y?s?.get(y):void 0,currentState:{settledContent:c.value,streamedDelta:u.value},typewriterEnabled:r.value});c.value=w.settledContent,u.value=w.streamedDelta,w.appended?(d.value+=1,(function(){if(!u.value||f||!i)return;const _=i.value;f=Ke(()=>i.value,A=>{A!==_&&h()},{flush:"sync"})})()):u.value||p(),y&&s?.set(y,x)},{immediate:!0}),pf(p);const m=B(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,x)=>(g(),S("span",{class:Be([[e.node.center?"text-node-center":""],"text-node"])},[c.value?(g(),S("span",ufe,I(c.value),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Be(["text-node-stream-delta",[m.value]]),onAnimationend:h},I(u.value),35)):Y("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Yd(e,t,n){return Je({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var l,r;const a=Ev(),c=Av(),u=Tv(),d=typeof window<"u"&&((r=(l=Ts())==null?void 0:l.vnode.el)==null?void 0:r.nodeType)===1,f=V(typeof window>"u"||d||!u.value),p=Uo(null);let h=null;function m(k){const x=k&&"$el"in k?k.$el:k;p.value=x instanceof HTMLElement?x:null}return typeof window<"u"&&Ke([p,u],([k,x],y,w)=>{if(h?.destroy(),h=null,!x||f.value)return void(f.value=!0);if(!k)return;let _=!0;const A=a(k,{rootMargin:c?.value.heavyBlockMargin,allowIdle:!1});h=A,f.value=A.isVisible.value,A.whenVisible.then(()=>{_&&h===A&&(f.value=!0)}),w(()=>{_=!1,A.destroy(),h===A&&(h=null)})},{immediate:!0}),vo(()=>{h?.destroy(),h=null}),()=>vn(f.value?t:n,wn(St({},s),{ref:m}),i)}})}is.install=e=>{e.component(is.__name,is)};const B5=Je({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,l,r,a,c;const u=Wp(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=ux[u]||(u?u.charAt(0).toUpperCase()+u.slice(1):ux[""]),f=Q2e(n.node),p=efe(String((l=(i=n.node)==null?void 0:i.raw)!=null?l:""),d,f),h=n.monacoOptions,m=f&&((r=n.estimatedDiffInline)!=null?r:Iv(h??{},typeof window>"u"?0:window.innerWidth)),k=h?.diffAppearance,x=k==="dark"||k!=="light"&&n.isDark===!0,y=typeof h?.fontSize=="number"&&Number.isFinite(h.fontSize)&&h.fontSize>0?h.fontSize:12,w=typeof h?.lineHeight=="number"&&Number.isFinite(h.lineHeight)&&h.lineHeight>0?h.lineHeight:y===12?18:Math.max(12,Math.round(1.5*y)),_=typeof h?.tabSize=="number"&&Number.isFinite(h.tabSize)&&h.tabSize>0?h.tabSize:4,A=f?0:8,P=typeof((a=h?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(h.padding.top)&&h.padding.top>=0?h.padding.top:A,z=typeof((c=h?.padding)==null?void 0:c.bottom)=="number"&&Number.isFinite(h.padding.bottom)&&h.padding.bottom>=0?h.padding.bottom:A,L=typeof h?.fontFamily=="string"?h.fontFamily.trim():"",E=St(St({fontSize:`${y}px`,lineHeight:`${w}px`,tabSize:_,paddingTop:`${P}px`,paddingBottom:`${z}px`,"--markstream-pre-line-number-top":`${P}px`},f?{"--markstream-pre-diff-line-height":`${w}px`}:{}),L?{"--markstream-code-font-family":L}:{}),T=()=>vn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[vn("svg",{class:"action-icon"})]),$=n.isShowPreview!==!1&&(u==="html"||u==="svg"),C=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||$&&n.showPreviewButton!==!1,j=D=>{if(D!=null)return typeof D=="number"?`${D}px`:String(D)},H=St(St(St({"--markstream-code-layout-character-width":"1ch"},j(n.minWidth)?{minWidth:j(n.minWidth)}:{}),j(n.maxWidth)?{maxWidth:j(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return vn("div",wn(St({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":x,"is-diff":f,"is-plain-text":u===""||u==="plaintext"||u==="text"},t.class],style:[H,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:vn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[vn("div",{class:"code-header-main"},[vn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),vn("div",{class:"code-header-copy"},[vn("div",{class:"code-header-title"},p.title),p.caption?vn("div",{class:"code-header-caption"},p.caption):null])]),vn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?vn("div",{class:"code-diff-stats","aria-hidden":"true"},[vn("span",{class:"code-diff-stat removed"},"-0"),vn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:T(),n.showCollapseButton===!1?null:T(),C?vn("div",{class:"relative"},[T()]):null])]),vn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[vn(Di,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?J2e(h?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:E,"data-markstream-code-loading":"1"})]),vn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[vn("div",{class:"loading-skeleton"},[vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line short"})])]),vn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),rm=Yd("ViewportDeferredCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./CodeBlockNode-D4cpL5UZ.js"),__vite__mapDeps([6,7]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),Di}}),loadingComponent:B5,delay:0,suspensible:!1}),B5),fr=Rl(()=>zo(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return vn(is,wn(St({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield qL(),(yield Cs(()=>import("./index7-BEZwnfMu.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return vn(is,wn(St({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),l$=Rl(()=>zo(null,null,function*(){try{return yield qL(),(yield Cs(()=>import("./index6-rJ6wldFa.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return vn(is,wn(St({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),Ti=ho(Je({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(g(),S("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},I(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);Ti.install=e=>{e.component(Ti.__name,Ti)};const dfe={class:"superscript-node"},Ki=ho(Je({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sup",dfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"superscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Ki.install=e=>{e.component(Ki.__name,Ki)};const ffe={class:"subscript-node"},Gi=ho(Je({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,superscript:Ki,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sub",ffe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"subscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Gi.install=e=>{e.component(Gi.__name,Gi)};const pfe={class:"strong-node"},Ei=ho(Je({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("strong",pfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"strong"}-${r}`,components:o.value,node:l,"index-key":`${e.indexKey||"strong"}-${r}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);Ei.install=e=>{e.component(Ei.__name,Ei)};const hfe={class:"strikethrough-node"},Ii=ho(Je({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("del",hfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"strikethrough"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);Ii.install=e=>{e.component(Ii.__name,Ii)};const mfe=["href","title","aria-label","aria-hidden","target","rel"],gfe=["aria-hidden"],vfe={class:"link-text-wrapper relative inline-flex"},yfe={class:"leading-[normal] link-text"},Li=ho(Je({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=fn("markstreamShowTooltips",void 0),o=B(()=>{const x=n?.value;return typeof x=="boolean"?x:t.showTooltip}),s=B(()=>{var x,y,w,_,A;const P=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",z=(x=t.animationOpacity)!=null?x:.35,L=Math.max(.12,Math.min(.5*z,z)),E={"--underline-height":`${(y=t.underlineHeight)!=null?y:2}px`,"--underline-bottom":P,"--underline-opacity":String(z),"--underline-rest-opacity":String(L),"--underline-duration":`${(w=t.animationDuration)!=null?w:1.6}s`,"--underline-timing":(_=t.animationTiming)!=null?_:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(A=t.animationIteration)!=null?A:"infinite"};return t.color&&(E["--link-color"]=t.color),E}),i=Is(()=>t.customId),l=B(()=>St({text:is,strong:Ei,strikethrough:Ii,emphasis:$i,image:d1,html_inline:al,inline_code:hi},i.value)),r=vf(),a=B(()=>{var x,y;const w=(x=t.node)==null?void 0:x.attrs;if(!w||typeof w!="object")return{};const _={};if(Array.isArray(w))for(const A of w)Array.isArray(A)&&A[0]&&(_[String(A[0])]=String((y=A[1])!=null?y:""));else for(const[A,P]of Object.entries(w))A&&P!=null&&P!==!1&&(_[A]=P===!0?"":String(P));return xx(_,"safe","a")}),c=B(()=>St(St({},r),a.value)),u=B(()=>{var x,y;return xx({href:String((y=(x=t.node)==null?void 0:x.href)!=null?y:"")},"safe","a").href}),d=B(()=>{if(!u.value)return;const x=c.value.target;return(typeof x=="string"?x.trim():String(x??"").trim())||(pae(u.value)?"_blank":void 0)}),f=B(()=>{var x;return String((x=d.value)!=null?x:"").trim().toLowerCase()==="_blank"}),p=B(()=>{if(!u.value)return;const x=c.value.rel,y=new Set((typeof x=="string"?x:String(x??"")).split(/\s+/).filter(Boolean)),w=new Set(Array.from(y).filter(_=>_.toLowerCase()!=="opener"));return f.value&&(w.add("noopener"),w.add("noreferrer")),w.size>0?Array.from(w).join(" "):void 0}),h=B(()=>{const x=St({},c.value);return delete x.title,delete x.href,delete x.target,delete x.rel,x});function m(){o.value&&P2e()}const k=B(()=>{var x,y;const w=(x=t.node)==null?void 0:x.title;return typeof w=="string"&&w.trim().length>0?w:String((y=u.value)!=null?y:"")});return(x,y)=>{var w,_;return e.node.loading?(g(),S("span",io({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},v(r),{style:s.value}),[b("span",vfe,[b("span",yfe,[W(v(is),{class:"leading-[normal] link-text",node:{type:"text",content:String((w=e.node.text)!=null?w:""),raw:String((_=e.node.text)!=null?_:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),y[1]||(y[1]=b("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,gfe)):(g(),S("a",io({key:0,class:"link-node",href:u.value,title:o.value?"":k.value,"aria-label":`Link: ${k.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},h.value,{style:s.value,onMouseenter:y[0]||(y[0]=A=>(function(P){var z,L,E,T;if(!o.value)return;const $=P,C=$?.clientX!=null&&$?.clientY!=null?{x:$.clientX,y:$.clientY}:void 0,j=((z=t.node)==null?void 0:z.title)||((L=u.value)!=null&&L.includes("xn--")&&((T=(E=t.node)==null?void 0:E.text)!=null&&T.includes("://"))?t.node.text:u.value)||"";R2e(P.currentTarget,j,"top",!1,C)})(A)),onMouseleave:m}),[(g(!0),S(Ce,null,rt(e.node.children,(A,P)=>(g(),ue(v(Pr),{key:`${e.indexKey||"emphasis"}-${P}`,components:l.value,node:A,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${P}`},null,8,["components","node","custom-id","index-key"]))),128))],16,mfe))}}}),[["__scopeId","data-v-367e6ca4"]]);Li.install=e=>{e.component(Li.__name,Li)};const wfe={class:"insert-node"},Yi=ho(Je({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("ins",wfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"insert"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Yi.install=e=>{e.component(Yi.__name,Yi)};const kfe={class:"highlight-node"},cl=ho(Je({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("mark",kfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"highlight"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);cl.install=e=>{e.component(cl.__name,cl)};const bfe={class:"emphasis-node"},$i=ho(Je({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("em",bfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"emphasis"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);$i.install=e=>{e.component($i.__name,$i)};const _fe={class:"hard-break"},f1=ho(Je({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("br",_fe))}),[["__scopeId","data-v-50c58f70"]]);f1.install=e=>{e.component(f1.__name,f1)};const nf=Je({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=It({checkbox:ll,checkbox_input:ll,emoji:Zi,emphasis:$i,hardbreak:f1,highlight:cl,inline_code:hi,insert:Yi,link:Li,reference:Ti,strikethrough:Ii,strong:Ei,subscript:Gi,superscript:Ki,text:is}),o=Is(()=>t.customId),s=B(()=>{const i=o.value;return Object.keys(i).length>0?St(St({},n),i):n});return(i,l)=>(g(!0),S(Ce,null,rt(e.nodes,(r,a)=>(g(),ue(v(Pr),{key:a,components:s.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function h7(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(h7)}function R5(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(h7))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(h7)?s:null}function j0(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const xfe=["cite"],Sfe={key:0,dir:"auto",class:"paragraph-node"},Cfe=["custom-id"],x4=ho(Je({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>!!n.value.paragraph),s=B(()=>!!n.value.text),i=B(()=>R5(t.node.children,!o.value)),l=B(()=>t.fade!==!1||s.value?null:j0(i.value));return qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade)),(r,a)=>(g(),S("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(g(),S("p",Sfe,[l.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(l.value),9,Cfe)):(g(),ue(v(nf),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(g(),ue(v(Xi),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=c=>r.$emit("copy",c))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,xfe))}}),[["__scopeId","data-v-abfecebc"]]);x4.install=e=>{e.component(x4.__name,x4)};const Mfe={class:"definition-list"},Afe={class:"definition-term"},Tfe={class:"definition-desc"},S4=ho(Je({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("dl",Mfe,[(g(!0),S(Ce,null,rt(t.node.items,(s,i)=>(g(),S(Ce,{key:i},[b("dt",Afe,[W(v(Xi),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),b("dd",Tfe,[W(v(Xi),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);S4.install=e=>{e.component(S4.__name,S4)};const Efe=["href","title"],k2=ho(Je({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,l=document.getElementById(i);l&&l.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(g(),S("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Efe))}}),[["__scopeId","data-v-e1eb37b6"]]);k2.install=e=>{e.component(k2.__name,k2)};const Ife=["id"],Lfe={class:"flex-1"},C4=Je({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[b("div",Lfe,[W(v(Xi),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Ife))}});C4.install=e=>{e.component(C4.__name,C4)};const $fe=["custom-id"],m7=ho(Je({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamFade",void 0),s=B(()=>o?.value!==!1||n.value.text?null:j0(t.node.children)),i=B(()=>St({text:is,inline_code:hi,link:Li,image:d1,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,footnote_reference:rl,hardbreak:f1,math_inline:fr,reference:Ti},n.value));return(l,r)=>(g(),ue(cs(`h${e.node.level}`),io({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ae(()=>[s.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(s.value),9,$fe)):(g(!0),S(Ce,{key:1},rt(e.node.children,(a,c)=>(g(),ue(v(Pr),{key:c,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${c}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),Zp=m7;Zp.install=e=>{e.component(m7.__name,m7)};const Nfe={key:0,dir:"auto",class:"paragraph-node"},zfe=["custom-id"],Bfe={dir:"auto",class:"paragraph-node"},Rfe=["custom-id"],pu=ho(Je({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=B(()=>{var p;return(p=t.node)!=null?p:t.item}),o=Is(()=>t.customId),s=B(()=>!!o.value.paragraph),i=B(()=>!!o.value.text),l=B(()=>{var p;return R5((p=n.value)==null?void 0:p.children,!s.value)}),r=B(()=>{var p;if(s.value)return null;const h=(p=n.value)==null?void 0:p.children;if(!Array.isArray(h)||h.length<2)return null;const m=h[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const k=h.slice(1);if(!k.every(y=>y?.type==="list"))return null;const x=R5([m]);return x?{paragraphChildren:x,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const c=B(()=>a()?j0(l.value):null),u=B(()=>{var p;return a()?j0((p=r.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=B(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade)),(p,h)=>{var m,k;return g(),S("li",io({class:"list-item",dir:"auto"},f.value),[l.value?(g(),S("p",Nfe,[c.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(c.value),9,zfe)):(g(),ue(v(nf),{key:1,nodes:l.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):r.value?(g(),S(Ce,{key:1},[b("p",Bfe,[u.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(u.value),9,Rfe)):(g(),ue(v(nf),{key:1,nodes:r.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(g(!0),S(Ce,null,rt(r.value.nestedLists,(x,y)=>(g(),ue(v(Xi),{key:y,nodes:[x],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${y}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:h[0]||(h[0]=w=>p.$emit("copy",w))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(g(),ue(v(Xi),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(m=n.value)==null?void 0:m.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:h[1]||(h[1]=x=>p.$emit("copy",x))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);pu.install=e=>{e.component(pu.__name,pu)};const hu=ho(Je({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=Is(()=>e.customId),n=B(()=>t.value.list_item||pu);return(o,s)=>(g(),ue(cs(e.node.ordered?"ol":"ul"),{class:Be(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ae(()=>[(g(!0),S(Ce,null,rt(e.node.items,(i,l)=>{var r;return g(),ue(cs(n.value),io({key:`${e.indexKey||"list"}-${l}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${l}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((r=e.node.start)!=null?r:1)+l:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);hu.install=e=>{e.component(hu.__name,hu)};const Pfe={key:2,class:"html-block-node__raw"},Ffe=["innerHTML"],jfe={key:1,class:"html-block-node__placeholder"},b2=ho(Je({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=fn("markstreamNestedRendererProps",void 0),s=B(()=>{var C,j;return(j=(C=t.htmlPolicy)!=null?C:n?.value)!=null?j:"safe"}),i=B(()=>{var C,j;const H=(C=o?.value)!=null?C:{};return wn(St({},H),{customId:(j=t.customId)!=null?j:H.customId,htmlPolicy:s.value})}),l=Rl({loader:()=>Promise.resolve().then(()=>Ov),suspensible:!1}),r=B(()=>{const C=w4(t.node.attrs,s.value);if(!C)return;const j=g2(C);return Object.keys(j).length>0?j:void 0}),a=B(()=>{const C=String(t.node.tag||"").trim(),j=w4(t.node.attrs,s.value,C);if(!j)return;const H=g2(j);return Object.keys(H).length>0?H:void 0}),c=Is(()=>t.customId),u=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>"u"),p=V(t.node.content),h=B(()=>Array.isArray(t.node.children)?t.node.children:[]),m=B(()=>String(t.node.tag||"div")),k=B(()=>{var C;if(m.value.trim().toLowerCase()!=="details"||(C=t.node.attrs)!=null&&C.some(([H])=>String(H).toLowerCase()==="open"))return null;const j=h.value[0];return j?.type==="html_block"&&String(j.tag||"").toLowerCase()==="summary"?j:null}),x=B(()=>{var C;return j0((C=k.value)==null?void 0:C.children)}),y=B(()=>{const C=k.value;if(!C)return;const j=w4(C.attrs,s.value,"summary");if(!j)return;const H=g2(j);return Object.keys(H).length>0?H:void 0}),w=B(()=>x.value==null?h.value:h.value.slice(1)),_=B(()=>{const C=m.value.trim().toLowerCase();return TI.has(C)||bv(C,s.value)}),A=B(()=>h.value.length>0&&!!t.node.tag&&!_.value),P=B(()=>{var C,j,H;if(A.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(C=p.value)!=null?C:""};const D=(j=p.value)!=null?j:t.node.content;if(!D)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:fu(D,s.value)};if(t.node.loading){const R=z5(D,c.value,s.value);return R===null?{mode:"text",content:(H=t.node.raw)!=null?H:D}:{mode:"dynamic",nodes:R}}if(!QL(D,c.value))return{mode:"html",content:fu(D,s.value)};const M=z5(D,c.value,s.value);return M===null?{mode:"html",content:fu(D,s.value)}:{mode:"dynamic",nodes:M}}),z=Ev(),L=Av(),E=Tv(),T=Uo(null),$=!!t.node.loading;return typeof window<"u"?(Ke([()=>d.value,()=>L?.value.heavyBlockMargin,()=>L?.value.rootMargin],([C],j,H)=>{var D,M,R,O;if((M=(D=T.value)==null?void 0:D.destroy)==null||M.call(D),T.value=null,!$)return f.value=!0,void(p.value=t.node.content);if(!C)return void(f.value=!1);let U=!0;const Z=(O=(R=L?.value.heavyBlockMargin)!=null?R:L?.value.rootMargin)!=null?O:F0,q=z(C,{rootMargin:Z,allowIdle:!E.value});T.value=q,f.value=f.value||q.isVisible.value,q.whenVisible.then(()=>{U&&T.value===q&&(f.value=!0)}),H(()=>{U=!1,q.destroy(),T.value===q&&(T.value=null)})},{immediate:!0}),Ke(()=>t.node.content,C=>{$&&!f.value||(p.value=C)})):f.value=!0,vo(()=>{var C,j;(j=(C=T.value)==null?void 0:C.destroy)==null||j.call(C),T.value=null}),(C,j)=>(g(),ue(cs(A.value?m.value:"div"),io({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":v(E)&&!f.value?"true":void 0},A.value?a.value:void 0),{default:ae(()=>[f.value?(g(),S(Ce,{key:0},[P.value.mode==="structured"?(g(),S(Ce,{key:0},[x.value!==null?(g(),S(Ce,{key:0},[b("summary",mR(OA(y.value)),I(x.value),17),w.value.length?(g(),ue(v(l),io({key:0},i.value,{nodes:w.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):Y("",!0)],64)):(g(),ue(v(l),io({key:1},i.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):P.value.mode==="dynamic"?(g(),ue(v(u),{key:1,nodes:P.value.nodes},null,8,["nodes"])):P.value.mode==="text"?(g(),S("pre",Pfe,I(P.value.content),1)):(g(),S("div",io({key:3},r.value,{innerHTML:P.value.content}),null,16,Ffe))],64)):(g(),S("div",jfe,[jn(C.$slots,"placeholder",{node:e.node},()=>[j[0]||(j[0]=b("span",{class:"html-block-node__placeholder-bar"},null,-1)),j[1]||(j[1]=b("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),j[2]||(j[2]=b("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);b2.install=e=>{e.component(b2.__name,b2)};const Ofe={dir:"auto",class:"paragraph-node"},Hfe=["custom-id"],B0=ho(Je({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamFade",void 0),i=fn("markstreamParseOptions",void 0),l=fn("markstreamCustomMarkdownIt",void 0),r=fn("markstreamNestedRendererProps",void 0),a=B(()=>{var L;return(L=o?.value)!=null?L:"safe"}),c=B(()=>{var L;return(L=t.parseOptions)!=null?L:i?.value}),u=B(()=>{var L;return(L=t.customMarkdownIt)!=null?L:l?.value}),d=B(()=>{var L,E;return(E=t.customHtmlTags)!=null?E:(L=r?.value)==null?void 0:L.customHtmlTags}),f=B(()=>{var L,E;const T=(L=r?.value)!=null?L:{};return wn(St({},T),{customId:(E=t.customId)!=null?E:T.customId,customHtmlTags:d.value,parseOptions:c.value,customMarkdownIt:u.value,htmlPolicy:a.value})}),p=Rl({loader:()=>Promise.resolve().then(()=>Ov),suspensible:!1});function h(L){var E;return L.type==="text"&&String((E=L.content)!=null?E:"").trim()===""}const m=B(()=>t.node.children.filter(L=>!h(L))),k=B(()=>m.value.length>0&&m.value.every(L=>L.type==="image"||(function(E){var T;const $=(function(C){return C.type==="link"&&Array.isArray(C.children)?C.children.filter(j=>!h(j)):[]})(E);return $.length===1&&((T=$[0])==null?void 0:T.type)==="image"})(L))),x=B(()=>new Set(K0(d.value))),y=B(()=>{if(!k.value||m.value.length<=1)return t.node.children;const L=[];for(let E=0;E0,C=t.node.children.slice(E+1).some(j=>!h(j));$&&C&&L.push(wn(St({},T),{content:" ",raw:" "}))}return L}),w=B(()=>s?.value===!1&&!n.value.text),_=B(()=>w.value?j0(y.value):null);function A(L,E){return{node:L,"index-key":`${t.indexKey}-${E}`,"custom-id":t.customId,"custom-html-tags":d.value}}const P=B(()=>St({inline_code:hi,image:d1,link:Li,hardbreak:f1,emphasis:$i,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,html_inline:al,html_block:b2,emoji:Zi,checkbox:ll,math_inline:fr,checkbox_input:ll,reference:Ti,footnote_anchor:k2,footnote_reference:rl,text:is},n.value)),z=B(()=>y.value.map((L,E)=>{var T;const $=(function(C){var j,H,D,M;if(C.type==="html_block"||C.type==="html_inline"){const R=String((j=C.tag)!=null?j:"").trim().toLowerCase()||NI(C.content);if(R&&!x.value.has(R)&&zI((H=C.content)!=null?H:C.raw,R)){const O=String((M=(D=C.content)!=null?D:C.raw)!=null?M:"");return{child:{type:"text",content:O,raw:O},component:is,isCustomComponent:!1}}}return{child:C,component:P.value[C.type],isCustomComponent:!!(n.value[C.type]&&!Af(String(C.type)))}})(L);return wn(St({},$),{index:E,key:`${t.indexKey||"paragraph"}-${E}`,customAttrs:$.isCustomComponent?Mv($.child,a.value):void 0,hasSlotChildren:Array.isArray($.child.children)&&$.child.children.length>0,slotContent:String((T=$.child.content)!=null?T:""),originalChild:L})}));return(L,E)=>(g(),S("p",Ofe,[_.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(_.value),9,Hfe)):(g(!0),S(Ce,{key:1},rt(z.value,T=>{return g(),S(Ce,{key:T.key},[k.value&&h(T.originalChild)?(g(),S(Ce,{key:0},[He(I(($=T.originalChild,String((C=$.content)!=null?C:""))),1)],64)):T.isCustomComponent?(g(),ue(cs(T.component),io({key:1,ref_for:!0},T.customAttrs,{node:T.child,loading:T.child.loading,"index-key":T.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ae(()=>[T.hasSlotChildren?(g(),ue(v(p),io({key:0,ref_for:!0},f.value,{nodes:T.child.children,"index-key":T.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):T.slotContent?(g(),ue(v(p),io({key:1,ref_for:!0},f.value,{content:T.slotContent,final:!T.child.loading,"index-key":`${T.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(g(),ue(cs(T.component),io({key:2,ref_for:!0},A(T.child,T.index)),null,16))],64);var $,C}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);B0.install=e=>{e.component(B0.__name,B0)};const Dfe={class:"table-node-wrapper"},Vfe=["aria-busy"],Wfe={key:0},qfe=["custom-id"],Ufe=["aria-label","onPointerdown"],Zfe=["custom-id"],Kfe={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},_2=ho(Je({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=B(()=>{var x;return(x=t.node.loading)!=null&&x}),o=B(()=>{var x;return(x=t.node.rows)!=null?x:[]}),s=V(null),i=V([]);let l=null;const r=B(()=>t.node.header.cells.length),a=B(()=>i.value.some(x=>Number.isFinite(x)&&x>0)),c=B(()=>a.value?i.value.map(x=>x>0?{width:`${x}px`}:void 0):[]);qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade));const u=Is(()=>t.customId),d=B(()=>!!u.value.text),f=B(()=>!!u.value.paragraph),p=new WeakMap;function h(x){const y=t.fade===!1&&!d.value,w=!f.value,_=p.get(x);if(_?.children===x.children&&_.textFastPath===y&&_.paragraphFastPath===w)return _.info;const A=R5(x.children,w,!0),P={simpleChildren:A,plainText:A&&y?j0(A):null};return p.set(x,{children:x.children,textFastPath:y,paragraphFastPath:w,info:P}),P}function m(x){if(!l)return;x.preventDefault();const y=l.startWidth+l.nextStartWidth,w=Math.min(48,Math.floor(y/2)),_=Math.max(w,Math.min(y-w,Math.round(l.startWidth+x.clientX-l.startX))),A=[...l.widths];A[l.index]=_,A[l.index+1]=y-_,i.value=A}function k(){l&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),l=null)}return Ke(r,()=>{k(),i.value=[]}),vo(k),(x,y)=>(g(),S("div",Dfe,[b("table",{ref_key:"tableRef",ref:s,class:Be(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(g(),S("colgroup",Wfe,[(g(!0),S(Ce,null,rt(e.node.header.cells,(w,_)=>(g(),S("col",{key:_,style:Gt(c.value[_])},null,4))),128))])):Y("",!0),b("thead",null,[b("tr",null,[(g(!0),S(Ce,null,rt(e.node.header.cells,(w,_)=>(g(),S("th",{key:_,dir:"auto",class:Be([w.align==="right"?"text-right":w.align==="center"?"text-center":"text-left"])},[h(w).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(h(w).plainText),9,qfe)):h(w).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(w).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${_}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:w.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[0]||(y[0]=A=>x.$emit("copy",A))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),_(function(P,z){if(z.button!==0)return;const L=(function(){var $;const C=($=s.value)==null?void 0:$.querySelectorAll("thead th");return Array.from(C??[],j=>Math.round(j.getBoundingClientRect().width))})(),E=L[P],T=L[P+1];E&&T&&(z.preventDefault(),l={index:P,startX:z.clientX,startWidth:E,nextStartWidth:T,widths:L},i.value=L,window.addEventListener("pointermove",m),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(_,A)},null,40,Ufe)):Y("",!0)],2))),128))])]),b("tbody",null,[(g(!0),S(Ce,null,rt(o.value,(w,_)=>(g(),S("tr",{key:_},[(g(!0),S(Ce,null,rt(w.cells,(A,P)=>(g(),S("td",{key:P,class:Be([A.align==="right"?"text-right":A.align==="center"?"text-center":"text-left"]),dir:"auto"},[h(A).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},I(h(A).plainText),9,Zfe)):h(A).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(A).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${_}-${P}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:A.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[1]||(y[1]=z=>x.$emit("copy",z))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Vfe),W(qi,{name:"table-node-fade"},{default:ae(()=>[n.value?(g(),S("div",Kfe,[jn(x.$slots,"loading",{isLoading:n.value},()=>[y[2]||(y[2]=b("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),y[3]||(y[3]=b("span",{class:"sr-only"},"Loading",-1))],!0)])):Y("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);_2.install=e=>{e.component(_2.__name,_2)};const Gfe={class:"hr-node"},M4=ho({},[["render",function(e,t){return g(),S("hr",Gfe)}],["__scopeId","data-v-39b2349c"]]);M4.install=e=>{e.component(M4.__name,M4)};const Yfe={class:"unknown-node"},g7=Je({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(g(),S("div",Yfe,I(e.node.raw),1))}),A4=ho(Je({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=B(()=>`vmr-container vmr-container-${t.node.name}`),o=Is(()=>t.customId),s=B(()=>St({text:is,paragraph:B0,heading:Zp,inline_code:hi,link:Li,image:d1,strong:Ei,emphasis:$i,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,checkbox:ll,checkbox_input:ll,hardbreak:f1,math_inline:fr,reference:Ti,list:hu,math_block:l$,table:_2},o.value));return(i,l)=>(g(),S("div",io({class:n.value},e.node.attrs),[(g(!0),S(Ce,null,rt(e.node.children,(r,a)=>{return g(),ue(cs((c=r.type,s.value[c]||g7)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:r,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var c}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);A4.install=e=>{e.component(A4.__name,A4)};const Xfe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],$x=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Jfe(e){if(e<=255)return Xfe[e];let t=0,n=$x.length-1;for(;t<=n;){const o=t+n>>1,s=$x[o];if(es[1]))return s[2];t=o+1}}return"L"}const Qfe=/[ \t\n\r\f]+/g,e3e=/[\t\n\r\f]| {2,}|^ | $/;let am=null;const t3e=new RegExp("\\p{Script=Arabic}","u"),x1=new RegExp("\\p{M}","u"),Lv=new RegExp("\\p{Nd}","u");function Nx(e){return t3e.test(e)}function zx(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Lr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(zx(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(zx(n))return!0}}return!1}const n3e=new Set([" "," ","⁠","\uFEFF"]),o3e=new Set(["-","‐","–","—"]);function r$(e,t){return!((function(n){const o=x2(n);return o!==null&&n3e.has(o)})(e)||t&&((function(n){const o=x2(n);return o!==null&&($v.has(o)||O0.has(o))})(e)||(function(n){const o=x2(n);return o!==null&&o3e.has(o)})(e)))}const $v=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Kp=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Nv=new Set(["'","’"]),O0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),s3e=new Set([":",".","،","؛"]),i3e=new Set(["၏"]),l3e=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function r3e(e){if(zv(e))return!0;let t=!1;for(const n of e)if(O0.has(n)||F5(n))t=!0;else if(!t||!x1.test(n))return!1;return t}function a3e(e){for(const t of e)if(!$v.has(t)&&!O0.has(t))return!1;return e.length>0}function c3e(e){if(zv(e))return!0;for(const t of e)if(!(Kp.has(t)||Nv.has(t)||x1.test(t)||F5(t)))return!1;return e.length>0}function zv(e){let t=!1;for(const n of e)if(n!=="\\"&&!x1.test(n)){if(!(Kp.has(n)||O0.has(n)||Nv.has(n)))return!1;t=!0}return t}function P5(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function x2(e){if(e.length===0)return null;const t=P5(e,e.length);return e.slice(t)}const u3e=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function F5(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,u3e)}function d3e(e){const t=(function(n){for(const o of n)if(!x1.test(o))return o;return null})(e);return t!==null&&Lv.test(t)}function f3e(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(x1.test(o))n--;else{if(!Kp.has(o)&&!Nv.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function p3e(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function Bx(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function Rx(e,t){return e&&t!==null&&s3e.has(t)}function h3e(e){const t=x2(e);return t!==null&&i3e.has(t)}function m3e(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function v7(e){let t=e.length;for(;t>0;){const n=P5(e,t),o=e.slice(n,t);if(l3e.has(o))return!0;if(!O0.has(o))return!1;t=n}return!1}function g3e(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const v3e=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function nr(e){return e.length===1?e[0]:e.join("")}function y3e(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),nr(n)}function w3e(e,t,n,o){if(!v3e.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=g3e(u,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length):(l.push(u),c+=u.length)}return i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),s}function cm(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const k3e=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function b3e(e,t){const n=e.texts[t];return!!n.startsWith("www.")||k3e.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!M3e.has(e)&&!C3e.test(e)&&S3e.test(e)}function Px(e){let t=!1;for(const n of e)if(!x1.test(n)){if(!a$(n))return!1;t=!0}return t}function A3e(e,t,n,o){const s=!t&&Px(e),i=!o&&Px(n),l=(function(a){const c=(function(u){for(let d=u.length;d>0;){const f=P5(u,d),p=u.slice(f,d);if(!x1.test(p))return p;d=f}return null})(a);return c!==null&&F5(c)})(e),r=(t||l)&&(function(a){for(let c=a.length;c>0;){const u=P5(a,c),d=a.slice(u,c);if(!x1.test(d))return a$(d)||F5(d);c=u}return!1})(e);return!!(s||i||r)&&!Lr(e)&&!Lr(n)&&(t||s||l)&&(o||i)}function Fx(e){for(const t of e)if(Lv.test(t))return!0;return!1}function T4(e){if(e.length===0)return!1;for(const t of e)if(!Lv.test(t)&&!x3e.has(t))return!1;return!0}function T3e(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s{var se;return t.showLineNumbers===!0&&((se=t.node)==null?void 0:se.diff)===!0}),m=B(()=>h.value&&t.diffInline===!0),k=B(()=>{const se=Number(t.reservedHeightPx);if(!Number.isFinite(se)||se<=0)return;const Q=`${Math.ceil(se)}px`;return i.value?{maxHeight:Q,overflow:"auto"}:{height:Q,minHeight:Q,maxHeight:Q,overflow:"auto"}}),x=["diff ","index ","--- ","+++ ","@@ "];function y(se){return String(se??"").trim().length===0}function w(se,Q="context",me={}){const xe=y(se);return{code:se,kind:xe&&Q!=="hunk"&&Q!=="spacer"&&!me.preserveBlankKind?"context":Q,empty:xe}}function _(se){const Q=n(se,i.value);return Q?Q.split(/\r\n|\n|\r/):[]}function A(se,Q){return!y(se[Q])||Qx.some(me=>Q.startsWith(me)))}function T(se,Q){return Q||!se.startsWith(" ")||se.startsWith(" ")?se:` ${se}`}function I(se,Q){const me=se.length,xe=Q.length,Ye=[];let at=0;for(;at=at&&j>=at&&se[oe]===Q[j];)X.unshift({originalIndex:oe,modifiedIndex:j}),oe--,j--;const K=oe-at+1,he=j-at+1;if(K<=0||he<=0||i.value||(K+1)*(he+1)>15e5)return Ye.concat(X);const ye=he+1,ve=new Uint32Array((K+1)*(he+1));for(let Se=K-1;Se>=0;Se--)for(let je=he-1;je>=0;je--){const et=Se*ye+je;if(se[at+Se]===Q[at+je])ve[et]=ve[(Se+1)*ye+je+1]+1;else{const le=ve[(Se+1)*ye+je],fe=ve[Se*ye+je+1];ve[et]=le>=fe?le:fe}}const ie=[];let de=0,be=0;for(;de=ve[de*ye+be+1]?de++:be++;return Ye.concat(ie,X)}function N(se){var Q;const me=(function(){var j,K;const he=t.diffHideUnchangedRegions;if(he==null||he===!1)return null;const ye=he===!0?{}:he;return ye.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((j=ye.contextLineCount)!=null?j:2)),minimumLineCount:Math.max(1,Math.floor((K=ye.minimumLineCount)!=null?K:4))}})();if(!me||se.length<1||se.length>2||se.length===2&&se[0].lines.length!==se[1].lines.length)return se;const xe=se[0].lines,Ye=(Q=se[1])==null?void 0:Q.lines,at=j=>xe[j].kind==="context"&&(Ye===void 0||Ye[j].kind==="context"&&xe[j].code===Ye[j].code),X=[];let oe=0;for(;oe=me.minimumLineCount){const he=j+(j===0?0:me.contextLineCount),ye=K-(K===xe.length?0:me.contextLineCount);ye-he>=me.minimumLineCount&&X.push({start:he,end:ye})}oe===j&&oe++}return X.length?se.map((j,K)=>{const he=[];let ye=0;for(const ve of X)he.push(...j.lines.slice(ye,ve.start)),he.push({code:K===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${j.key}-collapsed-${ve.start}-${ve.end}`,number:""}),ye=ve.end;return he.push(...j.lines.slice(ye)),wn(St({},j),{lines:he})}):se}const C=B(()=>{var se,Q,me,xe;if(!h.value)return[];const Ye=(function(K){const he=K.some(ve=>P(ve)),ye=K.some(ve=>z(ve));return he&&ye||(function(){var ve,ie,de,be;if(o.value==="diff")return!0;const Se=(be=(de=String((ie=(ve=t.node)==null?void 0:ve.raw)!=null?ie:"").split(/\r?\n/,1)[0])==null?void 0:de.trim())!=null?be:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Se)})()&&(he||ye)})(u.value),at=(function(){var K,he;return((K=t.node)==null?void 0:K.originalCode)!=null||((he=t.node)==null?void 0:he.updatedCode)!=null})();if(m.value){const K=at?(function(he,ye){const ve=_(he),ie=_(ye),de=I(ve,ie);if(de.length>0){const fe=[];let ge=0,Oe=0;for(const Fe of de){for(;ge=Se&&et>=Se&&ve[je]===ie[et];)le.unshift(wn(St({},w(ie[et])),{key:`inline-suffix-${et}`,number:et+1})),je--,et--;for(let fe=Se;fe<=je;fe++)be.push(wn(St({},w(ve[fe],"removed",{preserveBlankKind:A(ve,fe)})),{key:`inline-removed-source-${fe}`,number:fe+1}));for(let fe=Se;fe<=et;fe++)be.push(wn(St({},w(ie[fe],"added",{preserveBlankKind:A(ie,fe)})),{key:`inline-added-source-${fe}`,number:fe+1}));return be.concat(le)})((se=t.node)==null?void 0:se.originalCode,(Q=t.node)==null?void 0:Q.updatedCode):(function(he){const ye=[];let ve=1,ie=1;const de=L(he);for(const[be,Se]of he.entries())if(Se.startsWith("@@")){const je=Se.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);je&&(ve=Number(je[1]),ie=Number(je[2])),ye.push(wn(St({},w(Se,"hunk")),{key:`inline-hunk-${be}`,number:""}))}else if(P(Se))ye.push(wn(St({},w(T(Se.slice(1),de),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${be}`,number:ve++}));else if(z(Se))ye.push(wn(St({},w(T(Se.slice(1),de),"added",{preserveBlankKind:!0})),{key:`inline-added-${be}`,number:ie++}));else{const je=de&&Se.startsWith(" ")?Se.slice(1):Se;ye.push(wn(St({},w(je)),{key:`inline-context-${be}`,number:ie})),ve++,ie++}return ye})(u.value);return N([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:K}])}if(!Ye&&at)return(function(K,he){const ye=_(K),ve=_(he),ie=I(ye,ve),de=[],be=[];let Se=0,je=0,et=0;const le=(fe,ge)=>{const Oe=Math.max(fe-Se,ge-je);for(let Fe=0;Fewn(St({},K),{key:`original-${he}`,number:he+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:oe.map((K,he)=>wn(St({},K),{key:`modified-${he}`,number:he+1}))}])}),F=B(()=>C.value.some(se=>se.lines.some(Q=>Q.kind==="collapsed"))),H=B(()=>{const se=o.value;return se?`Code block: ${se}`:"Code block"}),D=V(null),M=V([]);let R=null,O=!1,U=null;function Z(se){const Q=Number.parseFloat(String(se??""));return Number.isFinite(Q)&&Q>0?Q:0}function q(se,Q){var me;if(!se)return Q;if(se.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const xe=se.querySelector(".markstream-pre__diff-content"),Ye=xe?.getBoundingClientRect(),at=(me=Ye?.height)!=null?me:0;return Math.max(Q,Math.ceil(at))}function te(){O||typeof window>"u"||(R!=null&&window.cancelAnimationFrame(R),R=window.requestAnimationFrame(()=>{R=null,O||(function(){var se,Q;R=null;const me=D.value;if(!me||!h.value||m.value||!me.classList.contains("is-wrap"))return void(M.value.length&&(M.value=[]));const xe=(function(he){const ye=window.getComputedStyle(he),ve=Z(ye.getPropertyValue("--markstream-pre-diff-line-height"));if(ve>0)return ve;const ie=Z(ye.lineHeight);return ie>0?ie:18})(me),Ye=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),at=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),X=Math.max(Ye.length,at.length),oe=[];for(let he=0;he{const ve=K[ye];return ve&&Math.abs(he.rowHeight-ve.rowHeight)<=.5&&Math.abs(he.originalHeight-ve.originalHeight)<=.5&&Math.abs(he.modifiedHeight-ve.modifiedHeight)<=.5})||(M.value=oe)})()}))}function ee(se){U?.disconnect(),U=null,se&&h.value&&!m.value&&typeof ResizeObserver<"u"&&(U=new ResizeObserver(()=>{te()}),U.observe(se))}function J(se,Q){const me=M.value[se];if(!me)return;const xe=Q==="original"?me.originalHeight:me.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(me.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(xe)}px`}}return Ke(D,se=>{ee(se),yt(()=>te())},{flush:"post"}),Ke([h,m,C],()=>{ee(D.value),yt(()=>te())},{flush:"post",immediate:!0}),vo(()=>{O=!0,R!=null&&(window.cancelAnimationFrame(R),R=null),U?.disconnect(),U=null}),(se,Q)=>(g(),S("pre",{ref_key:"preRef",ref:D,style:Gt(k.value),class:Be([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":h.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":F.value}]),"aria-busy":i.value,"aria-label":H.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[h.value?(g(),S("code",ofe,[(g(!0),S(Ce,null,rt(C.value,me=>(g(),S("span",{key:me.key,class:Be(["markstream-pre__diff-pane",me.className])},[b("span",sfe,[(g(!0),S(Ce,null,rt(me.lines,(xe,Ye)=>(g(),S("span",{key:xe.key,class:Be(["markstream-pre__diff-line",[`markstream-pre__diff-line--${xe.kind}`,{"markstream-pre__diff-line--empty":xe.empty}]]),style:Gt(J(Ye,me.key))},[Q[0]||(Q[0]=b("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),b("span",ife,E(xe.number),1),b("span",lfe,[b("span",rfe,E(xe.code),1)])],6))),128))])],2))),128))])):(g(),S(Ce,{key:1},[t.showLineNumbers?(g(),S("span",afe,[b("span",{class:"markstream-pre__line-numbers-text",textContent:E(p.value)},null,8,cfe)])):Y("",!0),b("code",{translate:"no",class:"markstream-pre__code",textContent:E(l.value)},null,8,ufe)],64))],14,nfe))}});Di.install=e=>{e.component(Di.__name,Di)};const dfe={key:0},is=ho(Je({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=vf(),o=fn("markstreamFade",void 0),s=fn("markstreamTextStreamState",void 0),i=fn("markstreamStreamVersion",void 0),l=B(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),r=B(()=>typeof l.value=="boolean"?l.value:typeof o?.value!="boolean"||o.value),a=B(()=>{var k;const x=(k=n["index-key"])!=null?k:n.indexKey;return x==null||x===""?"":String(x)}),c=V(t.node.content),u=V(""),d=V(0);let f;function p(){f?.(),f=void 0}function h(){p(),u.value&&(c.value=c.value+u.value,u.value="")}Ke([()=>t.node.content,a,r],([k])=>{const x=String(k??""),y=a.value,w=HL({nextContent:x,persistedContent:y?s?.get(y):void 0,currentState:{settledContent:c.value,streamedDelta:u.value},typewriterEnabled:r.value});c.value=w.settledContent,u.value=w.streamedDelta,w.appended?(d.value+=1,(function(){if(!u.value||f||!i)return;const _=i.value;f=Ke(()=>i.value,A=>{A!==_&&h()},{flush:"sync"})})()):u.value||p(),y&&s?.set(y,x)},{immediate:!0}),pf(p);const m=B(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,x)=>(g(),S("span",{class:Be([[e.node.center?"text-node-center":""],"text-node"])},[c.value?(g(),S("span",dfe,E(c.value),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Be(["text-node-stream-delta",[m.value]]),onAnimationend:h},E(u.value),35)):Y("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Yd(e,t,n){return Je({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var l,r;const a=Iv(),c=Tv(),u=Ev(),d=typeof window<"u"&&((r=(l=Ts())==null?void 0:l.vnode.el)==null?void 0:r.nodeType)===1,f=V(typeof window>"u"||d||!u.value),p=Uo(null);let h=null;function m(k){const x=k&&"$el"in k?k.$el:k;p.value=x instanceof HTMLElement?x:null}return typeof window<"u"&&Ke([p,u],([k,x],y,w)=>{if(h?.destroy(),h=null,!x||f.value)return void(f.value=!0);if(!k)return;let _=!0;const A=a(k,{rootMargin:c?.value.heavyBlockMargin,allowIdle:!1});h=A,f.value=A.isVisible.value,A.whenVisible.then(()=>{_&&h===A&&(f.value=!0)}),w(()=>{_=!1,A.destroy(),h===A&&(h=null)})},{immediate:!0}),vo(()=>{h?.destroy(),h=null}),()=>vn(f.value?t:n,wn(St({},s),{ref:m}),i)}})}is.install=e=>{e.component(is.__name,is)};const B5=Je({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,l,r,a,c;const u=Wp(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=dx[u]||(u?u.charAt(0).toUpperCase()+u.slice(1):dx[""]),f=efe(n.node),p=tfe(String((l=(i=n.node)==null?void 0:i.raw)!=null?l:""),d,f),h=n.monacoOptions,m=f&&((r=n.estimatedDiffInline)!=null?r:Lv(h??{},typeof window>"u"?0:window.innerWidth)),k=h?.diffAppearance,x=k==="dark"||k!=="light"&&n.isDark===!0,y=typeof h?.fontSize=="number"&&Number.isFinite(h.fontSize)&&h.fontSize>0?h.fontSize:12,w=typeof h?.lineHeight=="number"&&Number.isFinite(h.lineHeight)&&h.lineHeight>0?h.lineHeight:y===12?18:Math.max(12,Math.round(1.5*y)),_=typeof h?.tabSize=="number"&&Number.isFinite(h.tabSize)&&h.tabSize>0?h.tabSize:4,A=f?0:8,P=typeof((a=h?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(h.padding.top)&&h.padding.top>=0?h.padding.top:A,z=typeof((c=h?.padding)==null?void 0:c.bottom)=="number"&&Number.isFinite(h.padding.bottom)&&h.padding.bottom>=0?h.padding.bottom:A,L=typeof h?.fontFamily=="string"?h.fontFamily.trim():"",T=St(St({fontSize:`${y}px`,lineHeight:`${w}px`,tabSize:_,paddingTop:`${P}px`,paddingBottom:`${z}px`,"--markstream-pre-line-number-top":`${P}px`},f?{"--markstream-pre-diff-line-height":`${w}px`}:{}),L?{"--markstream-code-font-family":L}:{}),I=()=>vn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[vn("svg",{class:"action-icon"})]),N=n.isShowPreview!==!1&&(u==="html"||u==="svg"),C=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||N&&n.showPreviewButton!==!1,F=D=>{if(D!=null)return typeof D=="number"?`${D}px`:String(D)},H=St(St(St({"--markstream-code-layout-character-width":"1ch"},F(n.minWidth)?{minWidth:F(n.minWidth)}:{}),F(n.maxWidth)?{maxWidth:F(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return vn("div",wn(St({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":x,"is-diff":f,"is-plain-text":u===""||u==="plaintext"||u==="text"},t.class],style:[H,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:vn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[vn("div",{class:"code-header-main"},[vn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),vn("div",{class:"code-header-copy"},[vn("div",{class:"code-header-title"},p.title),p.caption?vn("div",{class:"code-header-caption"},p.caption):null])]),vn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?vn("div",{class:"code-diff-stats","aria-hidden":"true"},[vn("span",{class:"code-diff-stat removed"},"-0"),vn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:I(),n.showCollapseButton===!1?null:I(),C?vn("div",{class:"relative"},[I()]):null])]),vn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[vn(Di,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?Q2e(h?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:T,"data-markstream-code-loading":"1"})]),vn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[vn("div",{class:"loading-skeleton"},[vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line"}),vn("div",{class:"skeleton-line short"})])]),vn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),rm=Yd("ViewportDeferredCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./CodeBlockNode-D5JTfsXt.js"),__vite__mapDeps([6,7]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),Di}}),loadingComponent:B5,delay:0,suspensible:!1}),B5),fr=Rl(()=>zo(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return vn(is,wn(St({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield UL(),(yield Cs(()=>import("./index7-BEEN1sEQ.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return vn(is,wn(St({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),r$=Rl(()=>zo(null,null,function*(){try{return yield UL(),(yield Cs(()=>import("./index6-BYfcWmNm.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return vn(is,wn(St({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),Ti=ho(Je({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(g(),S("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},E(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);Ti.install=e=>{e.component(Ti.__name,Ti)};const ffe={class:"superscript-node"},Ki=ho(Je({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sup",ffe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"superscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Ki.install=e=>{e.component(Ki.__name,Ki)};const pfe={class:"subscript-node"},Gi=ho(Je({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,footnote_reference:rl,strikethrough:Ii,highlight:cl,insert:Yi,superscript:Ki,emoji:Zi,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("sub",pfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"subscript"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${r}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Gi.install=e=>{e.component(Gi.__name,Gi)};const hfe={class:"strong-node"},Ei=ho(Je({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("strong",hfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"strong"}-${r}`,components:o.value,node:l,"index-key":`${e.indexKey||"strong"}-${r}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);Ei.install=e=>{e.component(Ei.__name,Ei)};const mfe={class:"strikethrough-node"},Ii=ho(Je({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("del",mfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"strikethrough"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);Ii.install=e=>{e.component(Ii.__name,Ii)};const gfe=["href","title","aria-label","aria-hidden","target","rel"],vfe=["aria-hidden"],yfe={class:"link-text-wrapper relative inline-flex"},wfe={class:"leading-[normal] link-text"},Li=ho(Je({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=fn("markstreamShowTooltips",void 0),o=B(()=>{const x=n?.value;return typeof x=="boolean"?x:t.showTooltip}),s=B(()=>{var x,y,w,_,A;const P=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",z=(x=t.animationOpacity)!=null?x:.35,L=Math.max(.12,Math.min(.5*z,z)),T={"--underline-height":`${(y=t.underlineHeight)!=null?y:2}px`,"--underline-bottom":P,"--underline-opacity":String(z),"--underline-rest-opacity":String(L),"--underline-duration":`${(w=t.animationDuration)!=null?w:1.6}s`,"--underline-timing":(_=t.animationTiming)!=null?_:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(A=t.animationIteration)!=null?A:"infinite"};return t.color&&(T["--link-color"]=t.color),T}),i=Is(()=>t.customId),l=B(()=>St({text:is,strong:Ei,strikethrough:Ii,emphasis:$i,image:d1,html_inline:al,inline_code:hi},i.value)),r=vf(),a=B(()=>{var x,y;const w=(x=t.node)==null?void 0:x.attrs;if(!w||typeof w!="object")return{};const _={};if(Array.isArray(w))for(const A of w)Array.isArray(A)&&A[0]&&(_[String(A[0])]=String((y=A[1])!=null?y:""));else for(const[A,P]of Object.entries(w))A&&P!=null&&P!==!1&&(_[A]=P===!0?"":String(P));return Sx(_,"safe","a")}),c=B(()=>St(St({},r),a.value)),u=B(()=>{var x,y;return Sx({href:String((y=(x=t.node)==null?void 0:x.href)!=null?y:"")},"safe","a").href}),d=B(()=>{if(!u.value)return;const x=c.value.target;return(typeof x=="string"?x.trim():String(x??"").trim())||(hae(u.value)?"_blank":void 0)}),f=B(()=>{var x;return String((x=d.value)!=null?x:"").trim().toLowerCase()==="_blank"}),p=B(()=>{if(!u.value)return;const x=c.value.rel,y=new Set((typeof x=="string"?x:String(x??"")).split(/\s+/).filter(Boolean)),w=new Set(Array.from(y).filter(_=>_.toLowerCase()!=="opener"));return f.value&&(w.add("noopener"),w.add("noreferrer")),w.size>0?Array.from(w).join(" "):void 0}),h=B(()=>{const x=St({},c.value);return delete x.title,delete x.href,delete x.target,delete x.rel,x});function m(){o.value&&F2e()}const k=B(()=>{var x,y;const w=(x=t.node)==null?void 0:x.title;return typeof w=="string"&&w.trim().length>0?w:String((y=u.value)!=null?y:"")});return(x,y)=>{var w,_;return e.node.loading?(g(),S("span",io({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},v(r),{style:s.value}),[b("span",yfe,[b("span",wfe,[W(v(is),{class:"leading-[normal] link-text",node:{type:"text",content:String((w=e.node.text)!=null?w:""),raw:String((_=e.node.text)!=null?_:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),y[1]||(y[1]=b("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,vfe)):(g(),S("a",io({key:0,class:"link-node",href:u.value,title:o.value?"":k.value,"aria-label":`Link: ${k.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},h.value,{style:s.value,onMouseenter:y[0]||(y[0]=A=>(function(P){var z,L,T,I;if(!o.value)return;const N=P,C=N?.clientX!=null&&N?.clientY!=null?{x:N.clientX,y:N.clientY}:void 0,F=((z=t.node)==null?void 0:z.title)||((L=u.value)!=null&&L.includes("xn--")&&((I=(T=t.node)==null?void 0:T.text)!=null&&I.includes("://"))?t.node.text:u.value)||"";P2e(P.currentTarget,F,"top",!1,C)})(A)),onMouseleave:m}),[(g(!0),S(Ce,null,rt(e.node.children,(A,P)=>(g(),ue(v(Pr),{key:`${e.indexKey||"emphasis"}-${P}`,components:l.value,node:A,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${P}`},null,8,["components","node","custom-id","index-key"]))),128))],16,gfe))}}}),[["__scopeId","data-v-367e6ca4"]]);Li.install=e=>{e.component(Li.__name,Li)};const kfe={class:"insert-node"},Yi=ho(Je({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("ins",kfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"insert"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Yi.install=e=>{e.component(Yi.__name,Yi)};const bfe={class:"highlight-node"},cl=ho(Je({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,emphasis:$i,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("mark",bfe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"highlight"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);cl.install=e=>{e.component(cl.__name,cl)};const _fe={class:"emphasis-node"},$i=ho(Je({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>St({text:is,inline_code:hi,link:Li,html_inline:al,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,footnote_reference:rl,math_inline:fr,reference:Ti},n.value));return(s,i)=>(g(),S("em",_fe,[(g(!0),S(Ce,null,rt(e.node.children,(l,r)=>(g(),ue(v(Pr),{key:`${e.indexKey||"emphasis"}-${r}`,components:o.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);$i.install=e=>{e.component($i.__name,$i)};const xfe={class:"hard-break"},f1=ho(Je({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(g(),S("br",xfe))}),[["__scopeId","data-v-50c58f70"]]);f1.install=e=>{e.component(f1.__name,f1)};const nf=Je({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=It({checkbox:ll,checkbox_input:ll,emoji:Zi,emphasis:$i,hardbreak:f1,highlight:cl,inline_code:hi,insert:Yi,link:Li,reference:Ti,strikethrough:Ii,strong:Ei,subscript:Gi,superscript:Ki,text:is}),o=Is(()=>t.customId),s=B(()=>{const i=o.value;return Object.keys(i).length>0?St(St({},n),i):n});return(i,l)=>(g(!0),S(Ce,null,rt(e.nodes,(r,a)=>(g(),ue(v(Pr),{key:a,components:s.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function m7(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(m7)}function R5(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(m7))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(m7)?s:null}function j0(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const Sfe=["cite"],Cfe={key:0,dir:"auto",class:"paragraph-node"},Mfe=["custom-id"],x4=ho(Je({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=Is(()=>t.customId),o=B(()=>!!n.value.paragraph),s=B(()=>!!n.value.text),i=B(()=>R5(t.node.children,!o.value)),l=B(()=>t.fade!==!1||s.value?null:j0(i.value));return qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade)),(r,a)=>(g(),S("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(g(),S("p",Cfe,[l.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(l.value),9,Mfe)):(g(),ue(v(nf),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(g(),ue(v(Xi),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=c=>r.$emit("copy",c))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,Sfe))}}),[["__scopeId","data-v-abfecebc"]]);x4.install=e=>{e.component(x4.__name,x4)};const Afe={class:"definition-list"},Tfe={class:"definition-term"},Efe={class:"definition-desc"},S4=ho(Je({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("dl",Afe,[(g(!0),S(Ce,null,rt(t.node.items,(s,i)=>(g(),S(Ce,{key:i},[b("dt",Tfe,[W(v(Xi),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),b("dd",Efe,[W(v(Xi),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=l=>n.$emit("copy",l))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);S4.install=e=>{e.component(S4.__name,S4)};const Ife=["href","title"],k2=ho(Je({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,l=document.getElementById(i);l&&l.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(g(),S("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Ife))}}),[["__scopeId","data-v-e1eb37b6"]]);k2.install=e=>{e.component(k2.__name,k2)};const Lfe=["id"],$fe={class:"flex-1"},C4=Je({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),S("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[b("div",$fe,[W(v(Xi),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Lfe))}});C4.install=e=>{e.component(C4.__name,C4)};const Nfe=["custom-id"],g7=ho(Je({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamFade",void 0),s=B(()=>o?.value!==!1||n.value.text?null:j0(t.node.children)),i=B(()=>St({text:is,inline_code:hi,link:Li,image:d1,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,footnote_reference:rl,hardbreak:f1,math_inline:fr,reference:Ti},n.value));return(l,r)=>(g(),ue(cs(`h${e.node.level}`),io({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ae(()=>[s.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(s.value),9,Nfe)):(g(!0),S(Ce,{key:1},rt(e.node.children,(a,c)=>(g(),ue(v(Pr),{key:c,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${c}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),Zp=g7;Zp.install=e=>{e.component(g7.__name,g7)};const zfe={key:0,dir:"auto",class:"paragraph-node"},Bfe=["custom-id"],Rfe={dir:"auto",class:"paragraph-node"},Pfe=["custom-id"],pu=ho(Je({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=B(()=>{var p;return(p=t.node)!=null?p:t.item}),o=Is(()=>t.customId),s=B(()=>!!o.value.paragraph),i=B(()=>!!o.value.text),l=B(()=>{var p;return R5((p=n.value)==null?void 0:p.children,!s.value)}),r=B(()=>{var p;if(s.value)return null;const h=(p=n.value)==null?void 0:p.children;if(!Array.isArray(h)||h.length<2)return null;const m=h[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const k=h.slice(1);if(!k.every(y=>y?.type==="list"))return null;const x=R5([m]);return x?{paragraphChildren:x,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const c=B(()=>a()?j0(l.value):null),u=B(()=>{var p;return a()?j0((p=r.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=B(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade)),(p,h)=>{var m,k;return g(),S("li",io({class:"list-item",dir:"auto"},f.value),[l.value?(g(),S("p",zfe,[c.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(c.value),9,Bfe)):(g(),ue(v(nf),{key:1,nodes:l.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):r.value?(g(),S(Ce,{key:1},[b("p",Rfe,[u.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(u.value),9,Pfe)):(g(),ue(v(nf),{key:1,nodes:r.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(g(!0),S(Ce,null,rt(r.value.nestedLists,(x,y)=>(g(),ue(v(Xi),{key:y,nodes:[x],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${y}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:h[0]||(h[0]=w=>p.$emit("copy",w))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(g(),ue(v(Xi),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(m=n.value)==null?void 0:m.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:h[1]||(h[1]=x=>p.$emit("copy",x))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);pu.install=e=>{e.component(pu.__name,pu)};const hu=ho(Je({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=Is(()=>e.customId),n=B(()=>t.value.list_item||pu);return(o,s)=>(g(),ue(cs(e.node.ordered?"ol":"ul"),{class:Be(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ae(()=>[(g(!0),S(Ce,null,rt(e.node.items,(i,l)=>{var r;return g(),ue(cs(n.value),io({key:`${e.indexKey||"list"}-${l}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${l}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((r=e.node.start)!=null?r:1)+l:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);hu.install=e=>{e.component(hu.__name,hu)};const Ffe={key:2,class:"html-block-node__raw"},jfe=["innerHTML"],Ofe={key:1,class:"html-block-node__placeholder"},b2=ho(Je({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=fn("markstreamHtmlPolicy",void 0),o=fn("markstreamNestedRendererProps",void 0),s=B(()=>{var C,F;return(F=(C=t.htmlPolicy)!=null?C:n?.value)!=null?F:"safe"}),i=B(()=>{var C,F;const H=(C=o?.value)!=null?C:{};return wn(St({},H),{customId:(F=t.customId)!=null?F:H.customId,htmlPolicy:s.value})}),l=Rl({loader:()=>Promise.resolve().then(()=>Hv),suspensible:!1}),r=B(()=>{const C=w4(t.node.attrs,s.value);if(!C)return;const F=g2(C);return Object.keys(F).length>0?F:void 0}),a=B(()=>{const C=String(t.node.tag||"").trim(),F=w4(t.node.attrs,s.value,C);if(!F)return;const H=g2(F);return Object.keys(H).length>0?H:void 0}),c=Is(()=>t.customId),u=Je({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>"u"),p=V(t.node.content),h=B(()=>Array.isArray(t.node.children)?t.node.children:[]),m=B(()=>String(t.node.tag||"div")),k=B(()=>{var C;if(m.value.trim().toLowerCase()!=="details"||(C=t.node.attrs)!=null&&C.some(([H])=>String(H).toLowerCase()==="open"))return null;const F=h.value[0];return F?.type==="html_block"&&String(F.tag||"").toLowerCase()==="summary"?F:null}),x=B(()=>{var C;return j0((C=k.value)==null?void 0:C.children)}),y=B(()=>{const C=k.value;if(!C)return;const F=w4(C.attrs,s.value,"summary");if(!F)return;const H=g2(F);return Object.keys(H).length>0?H:void 0}),w=B(()=>x.value==null?h.value:h.value.slice(1)),_=B(()=>{const C=m.value.trim().toLowerCase();return EI.has(C)||_v(C,s.value)}),A=B(()=>h.value.length>0&&!!t.node.tag&&!_.value),P=B(()=>{var C,F,H;if(A.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(C=p.value)!=null?C:""};const D=(F=p.value)!=null?F:t.node.content;if(!D)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:fu(D,s.value)};if(t.node.loading){const R=z5(D,c.value,s.value);return R===null?{mode:"text",content:(H=t.node.raw)!=null?H:D}:{mode:"dynamic",nodes:R}}if(!e$(D,c.value))return{mode:"html",content:fu(D,s.value)};const M=z5(D,c.value,s.value);return M===null?{mode:"html",content:fu(D,s.value)}:{mode:"dynamic",nodes:M}}),z=Iv(),L=Tv(),T=Ev(),I=Uo(null),N=!!t.node.loading;return typeof window<"u"?(Ke([()=>d.value,()=>L?.value.heavyBlockMargin,()=>L?.value.rootMargin],([C],F,H)=>{var D,M,R,O;if((M=(D=I.value)==null?void 0:D.destroy)==null||M.call(D),I.value=null,!N)return f.value=!0,void(p.value=t.node.content);if(!C)return void(f.value=!1);let U=!0;const Z=(O=(R=L?.value.heavyBlockMargin)!=null?R:L?.value.rootMargin)!=null?O:F0,q=z(C,{rootMargin:Z,allowIdle:!T.value});I.value=q,f.value=f.value||q.isVisible.value,q.whenVisible.then(()=>{U&&I.value===q&&(f.value=!0)}),H(()=>{U=!1,q.destroy(),I.value===q&&(I.value=null)})},{immediate:!0}),Ke(()=>t.node.content,C=>{N&&!f.value||(p.value=C)})):f.value=!0,vo(()=>{var C,F;(F=(C=I.value)==null?void 0:C.destroy)==null||F.call(C),I.value=null}),(C,F)=>(g(),ue(cs(A.value?m.value:"div"),io({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":v(T)&&!f.value?"true":void 0},A.value?a.value:void 0),{default:ae(()=>[f.value?(g(),S(Ce,{key:0},[P.value.mode==="structured"?(g(),S(Ce,{key:0},[x.value!==null?(g(),S(Ce,{key:0},[b("summary",gR(HA(y.value)),E(x.value),17),w.value.length?(g(),ue(v(l),io({key:0},i.value,{nodes:w.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):Y("",!0)],64)):(g(),ue(v(l),io({key:1},i.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):P.value.mode==="dynamic"?(g(),ue(v(u),{key:1,nodes:P.value.nodes},null,8,["nodes"])):P.value.mode==="text"?(g(),S("pre",Ffe,E(P.value.content),1)):(g(),S("div",io({key:3},r.value,{innerHTML:P.value.content}),null,16,jfe))],64)):(g(),S("div",Ofe,[jn(C.$slots,"placeholder",{node:e.node},()=>[F[0]||(F[0]=b("span",{class:"html-block-node__placeholder-bar"},null,-1)),F[1]||(F[1]=b("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),F[2]||(F[2]=b("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);b2.install=e=>{e.component(b2.__name,b2)};const Hfe={dir:"auto",class:"paragraph-node"},Dfe=["custom-id"],B0=ho(Je({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=Is(()=>t.customId),o=fn("markstreamHtmlPolicy",void 0),s=fn("markstreamFade",void 0),i=fn("markstreamParseOptions",void 0),l=fn("markstreamCustomMarkdownIt",void 0),r=fn("markstreamNestedRendererProps",void 0),a=B(()=>{var L;return(L=o?.value)!=null?L:"safe"}),c=B(()=>{var L;return(L=t.parseOptions)!=null?L:i?.value}),u=B(()=>{var L;return(L=t.customMarkdownIt)!=null?L:l?.value}),d=B(()=>{var L,T;return(T=t.customHtmlTags)!=null?T:(L=r?.value)==null?void 0:L.customHtmlTags}),f=B(()=>{var L,T;const I=(L=r?.value)!=null?L:{};return wn(St({},I),{customId:(T=t.customId)!=null?T:I.customId,customHtmlTags:d.value,parseOptions:c.value,customMarkdownIt:u.value,htmlPolicy:a.value})}),p=Rl({loader:()=>Promise.resolve().then(()=>Hv),suspensible:!1});function h(L){var T;return L.type==="text"&&String((T=L.content)!=null?T:"").trim()===""}const m=B(()=>t.node.children.filter(L=>!h(L))),k=B(()=>m.value.length>0&&m.value.every(L=>L.type==="image"||(function(T){var I;const N=(function(C){return C.type==="link"&&Array.isArray(C.children)?C.children.filter(F=>!h(F)):[]})(T);return N.length===1&&((I=N[0])==null?void 0:I.type)==="image"})(L))),x=B(()=>new Set(K0(d.value))),y=B(()=>{if(!k.value||m.value.length<=1)return t.node.children;const L=[];for(let T=0;T0,C=t.node.children.slice(T+1).some(F=>!h(F));N&&C&&L.push(wn(St({},I),{content:" ",raw:" "}))}return L}),w=B(()=>s?.value===!1&&!n.value.text),_=B(()=>w.value?j0(y.value):null);function A(L,T){return{node:L,"index-key":`${t.indexKey}-${T}`,"custom-id":t.customId,"custom-html-tags":d.value}}const P=B(()=>St({inline_code:hi,image:d1,link:Li,hardbreak:f1,emphasis:$i,strong:Ei,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,html_inline:al,html_block:b2,emoji:Zi,checkbox:ll,math_inline:fr,checkbox_input:ll,reference:Ti,footnote_anchor:k2,footnote_reference:rl,text:is},n.value)),z=B(()=>y.value.map((L,T)=>{var I;const N=(function(C){var F,H,D,M;if(C.type==="html_block"||C.type==="html_inline"){const R=String((F=C.tag)!=null?F:"").trim().toLowerCase()||zI(C.content);if(R&&!x.value.has(R)&&BI((H=C.content)!=null?H:C.raw,R)){const O=String((M=(D=C.content)!=null?D:C.raw)!=null?M:"");return{child:{type:"text",content:O,raw:O},component:is,isCustomComponent:!1}}}return{child:C,component:P.value[C.type],isCustomComponent:!!(n.value[C.type]&&!Af(String(C.type)))}})(L);return wn(St({},N),{index:T,key:`${t.indexKey||"paragraph"}-${T}`,customAttrs:N.isCustomComponent?Av(N.child,a.value):void 0,hasSlotChildren:Array.isArray(N.child.children)&&N.child.children.length>0,slotContent:String((I=N.child.content)!=null?I:""),originalChild:L})}));return(L,T)=>(g(),S("p",Hfe,[_.value!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(_.value),9,Dfe)):(g(!0),S(Ce,{key:1},rt(z.value,I=>{return g(),S(Ce,{key:I.key},[k.value&&h(I.originalChild)?(g(),S(Ce,{key:0},[He(E((N=I.originalChild,String((C=N.content)!=null?C:""))),1)],64)):I.isCustomComponent?(g(),ue(cs(I.component),io({key:1,ref_for:!0},I.customAttrs,{node:I.child,loading:I.child.loading,"index-key":I.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ae(()=>[I.hasSlotChildren?(g(),ue(v(p),io({key:0,ref_for:!0},f.value,{nodes:I.child.children,"index-key":I.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):I.slotContent?(g(),ue(v(p),io({key:1,ref_for:!0},f.value,{content:I.slotContent,final:!I.child.loading,"index-key":`${I.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(g(),ue(cs(I.component),io({key:2,ref_for:!0},A(I.child,I.index)),null,16))],64);var N,C}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);B0.install=e=>{e.component(B0.__name,B0)};const Vfe={class:"table-node-wrapper"},Wfe=["aria-busy"],qfe={key:0},Ufe=["custom-id"],Zfe=["aria-label","onPointerdown"],Kfe=["custom-id"],Gfe={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},_2=ho(Je({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=B(()=>{var x;return(x=t.node.loading)!=null&&x}),o=B(()=>{var x;return(x=t.node.rows)!=null?x:[]}),s=V(null),i=V([]);let l=null;const r=B(()=>t.node.header.cells.length),a=B(()=>i.value.some(x=>Number.isFinite(x)&&x>0)),c=B(()=>a.value?i.value.map(x=>x>0?{width:`${x}px`}:void 0):[]);qn("markstreamShowTooltips",B(()=>t.showTooltips)),qn("markstreamFade",B(()=>t.fade));const u=Is(()=>t.customId),d=B(()=>!!u.value.text),f=B(()=>!!u.value.paragraph),p=new WeakMap;function h(x){const y=t.fade===!1&&!d.value,w=!f.value,_=p.get(x);if(_?.children===x.children&&_.textFastPath===y&&_.paragraphFastPath===w)return _.info;const A=R5(x.children,w,!0),P={simpleChildren:A,plainText:A&&y?j0(A):null};return p.set(x,{children:x.children,textFastPath:y,paragraphFastPath:w,info:P}),P}function m(x){if(!l)return;x.preventDefault();const y=l.startWidth+l.nextStartWidth,w=Math.min(48,Math.floor(y/2)),_=Math.max(w,Math.min(y-w,Math.round(l.startWidth+x.clientX-l.startX))),A=[...l.widths];A[l.index]=_,A[l.index+1]=y-_,i.value=A}function k(){l&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),l=null)}return Ke(r,()=>{k(),i.value=[]}),vo(k),(x,y)=>(g(),S("div",Vfe,[b("table",{ref_key:"tableRef",ref:s,class:Be(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(g(),S("colgroup",qfe,[(g(!0),S(Ce,null,rt(e.node.header.cells,(w,_)=>(g(),S("col",{key:_,style:Gt(c.value[_])},null,4))),128))])):Y("",!0),b("thead",null,[b("tr",null,[(g(!0),S(Ce,null,rt(e.node.header.cells,(w,_)=>(g(),S("th",{key:_,dir:"auto",class:Be([w.align==="right"?"text-right":w.align==="center"?"text-center":"text-left"])},[h(w).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(h(w).plainText),9,Ufe)):h(w).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(w).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${_}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:w.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[0]||(y[0]=A=>x.$emit("copy",A))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),_(function(P,z){if(z.button!==0)return;const L=(function(){var N;const C=(N=s.value)==null?void 0:N.querySelectorAll("thead th");return Array.from(C??[],F=>Math.round(F.getBoundingClientRect().width))})(),T=L[P],I=L[P+1];T&&I&&(z.preventDefault(),l={index:P,startX:z.clientX,startWidth:T,nextStartWidth:I,widths:L},i.value=L,window.addEventListener("pointermove",m),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(_,A)},null,40,Zfe)):Y("",!0)],2))),128))])]),b("tbody",null,[(g(!0),S(Ce,null,rt(o.value,(w,_)=>(g(),S("tr",{key:_},[(g(!0),S(Ce,null,rt(w.cells,(A,P)=>(g(),S("td",{key:P,class:Be([A.align==="right"?"text-right":A.align==="center"?"text-center":"text-left"]),dir:"auto"},[h(A).plainText!==null?(g(),S("span",{key:0,class:"text-node","custom-id":t.customId},E(h(A).plainText),9,Kfe)):h(A).simpleChildren?(g(),ue(v(nf),{key:1,nodes:h(A).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${_}-${P}`},null,8,["nodes","custom-id","index-key"])):(g(),ue(v(Xi),{key:2,nodes:A.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:y[1]||(y[1]=z=>x.$emit("copy",z))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Wfe),W(qi,{name:"table-node-fade"},{default:ae(()=>[n.value?(g(),S("div",Gfe,[jn(x.$slots,"loading",{isLoading:n.value},()=>[y[2]||(y[2]=b("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),y[3]||(y[3]=b("span",{class:"sr-only"},"Loading",-1))],!0)])):Y("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);_2.install=e=>{e.component(_2.__name,_2)};const Yfe={class:"hr-node"},M4=ho({},[["render",function(e,t){return g(),S("hr",Yfe)}],["__scopeId","data-v-39b2349c"]]);M4.install=e=>{e.component(M4.__name,M4)};const Xfe={class:"unknown-node"},v7=Je({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(g(),S("div",Xfe,E(e.node.raw),1))}),A4=ho(Je({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=B(()=>`vmr-container vmr-container-${t.node.name}`),o=Is(()=>t.customId),s=B(()=>St({text:is,paragraph:B0,heading:Zp,inline_code:hi,link:Li,image:d1,strong:Ei,emphasis:$i,strikethrough:Ii,insert:Yi,subscript:Gi,superscript:Ki,checkbox:ll,checkbox_input:ll,hardbreak:f1,math_inline:fr,reference:Ti,list:hu,math_block:r$,table:_2},o.value));return(i,l)=>(g(),S("div",io({class:n.value},e.node.attrs),[(g(!0),S(Ce,null,rt(e.node.children,(r,a)=>{return g(),ue(cs((c=r.type,s.value[c]||v7)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:r,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var c}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);A4.install=e=>{e.component(A4.__name,A4)};const Jfe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Nx=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Qfe(e){if(e<=255)return Jfe[e];let t=0,n=Nx.length-1;for(;t<=n;){const o=t+n>>1,s=Nx[o];if(es[1]))return s[2];t=o+1}}return"L"}const e3e=/[ \t\n\r\f]+/g,t3e=/[\t\n\r\f]| {2,}|^ | $/;let am=null;const n3e=new RegExp("\\p{Script=Arabic}","u"),x1=new RegExp("\\p{M}","u"),$v=new RegExp("\\p{Nd}","u");function zx(e){return n3e.test(e)}function Bx(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Lr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(Bx(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(Bx(n))return!0}}return!1}const o3e=new Set([" "," ","⁠","\uFEFF"]),s3e=new Set(["-","‐","–","—"]);function a$(e,t){return!((function(n){const o=x2(n);return o!==null&&o3e.has(o)})(e)||t&&((function(n){const o=x2(n);return o!==null&&(Nv.has(o)||O0.has(o))})(e)||(function(n){const o=x2(n);return o!==null&&s3e.has(o)})(e)))}const Nv=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Kp=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),zv=new Set(["'","’"]),O0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),i3e=new Set([":",".","،","؛"]),l3e=new Set(["၏"]),r3e=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function a3e(e){if(Bv(e))return!0;let t=!1;for(const n of e)if(O0.has(n)||F5(n))t=!0;else if(!t||!x1.test(n))return!1;return t}function c3e(e){for(const t of e)if(!Nv.has(t)&&!O0.has(t))return!1;return e.length>0}function u3e(e){if(Bv(e))return!0;for(const t of e)if(!(Kp.has(t)||zv.has(t)||x1.test(t)||F5(t)))return!1;return e.length>0}function Bv(e){let t=!1;for(const n of e)if(n!=="\\"&&!x1.test(n)){if(!(Kp.has(n)||O0.has(n)||zv.has(n)))return!1;t=!0}return t}function P5(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function x2(e){if(e.length===0)return null;const t=P5(e,e.length);return e.slice(t)}const d3e=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function F5(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,d3e)}function f3e(e){const t=(function(n){for(const o of n)if(!x1.test(o))return o;return null})(e);return t!==null&&$v.test(t)}function p3e(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(x1.test(o))n--;else{if(!Kp.has(o)&&!zv.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function h3e(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function Rx(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function Px(e,t){return e&&t!==null&&i3e.has(t)}function m3e(e){const t=x2(e);return t!==null&&l3e.has(t)}function g3e(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function y7(e){let t=e.length;for(;t>0;){const n=P5(e,t),o=e.slice(n,t);if(r3e.has(o))return!0;if(!O0.has(o))return!1;t=n}return!1}function v3e(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const y3e=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function nr(e){return e.length===1?e[0]:e.join("")}function w3e(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),nr(n)}function k3e(e,t,n,o){if(!y3e.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=v3e(u,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length):(l.push(u),c+=u.length)}return i!==null&&s.push({text:nr(l),isWordLike:a,kind:i,start:r}),s}function cm(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const b3e=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function _3e(e,t){const n=e.texts[t];return!!n.startsWith("www.")||b3e.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!A3e.has(e)&&!M3e.test(e)&&C3e.test(e)}function Fx(e){let t=!1;for(const n of e)if(!x1.test(n)){if(!c$(n))return!1;t=!0}return t}function T3e(e,t,n,o){const s=!t&&Fx(e),i=!o&&Fx(n),l=(function(a){const c=(function(u){for(let d=u.length;d>0;){const f=P5(u,d),p=u.slice(f,d);if(!x1.test(p))return p;d=f}return null})(a);return c!==null&&F5(c)})(e),r=(t||l)&&(function(a){for(let c=a.length;c>0;){const u=P5(a,c),d=a.slice(u,c);if(!x1.test(d))return c$(d)||F5(d);c=u}return!1})(e);return!!(s||i||r)&&!Lr(e)&&!Lr(n)&&(t||s||l)&&(o||i)}function jx(e){for(const t of e)if($v.test(t))return!0;return!1}function T4(e){if(e.length===0)return!1;for(const t of e)if(!$v.test(t)&&!S3e.has(t))return!1;return!0}function E3e(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s0&&c.charCodeAt(c.length-1)===32&&(c=c.slice(0,-1)),c})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=(function(a,c,u){var d,f,p;const h=(am===null&&(am=new Intl.Segmenter(void 0,{granularity:"word"})),am);let m=0;const k=[],x=[],y=[],w=[],_=[],A=[],P=[],z=[],L=[],E=[],T=[],$=[];for(const M of h.segment(a))for(const R of w3e(M.segment,(d=M.isWordLike)!=null&&d,M.index,u)){let O=function(){A[Q]!==null&&(x[Q]=[Bx(k,A,P,Q)],A[Q]=null),x[Q].push(R.text),y[Q]=y[Q]||R.isWordLike,z[Q]=z[Q]||q,L[Q]=L[Q]||te,E[Q]=J,T[Q]=se,$[Q]=Rx(L[Q],ee)};const U=R.kind==="text",Z=p3e(R.text,R.isWordLike,R.kind),q=Lr(R.text),te=Nx(R.text),ee=x2(R.text),J=v7(R.text),se=h3e(R.text),Q=m-1;c.carryCJKAfterClosingQuote&&U&&m>0&&w[Q]==="text"&&q&&z[Q]&&E[Q]||U&&m>0&&w[Q]==="text"&&a3e(R.text)&&z[Q]||U&&m>0&&w[Q]==="text"&&T[Q]?O():U&&m>0&&w[Q]==="text"&&R.isWordLike&&te&&$[Q]?(O(),y[Q]=!0):Z!==null&&m>0&&w[Q]==="text"&&A[Q]===Z?P[Q]=((f=P[Q])!=null?f:1)+1:U&&!R.isWordLike&&m>0&&w[Q]==="text"&&!z[Q]&&(r3e(R.text)||R.text==="-"&&y[Q])?O():(k[m]=R.text,x[m]=[R.text],y[m]=R.isWordLike,w[m]=R.kind,_[m]=R.start,A[m]=Z,P[m]=Z===null?0:1,z[m]=q,L[m]=te,E[m]=J,T[m]=se,$[m]=Rx(te,ee),m++)}for(let M=0;Mnull);let j=-1;for(let M=m-1;M>=0;M--){const R=k[M];if(R.length!==0){if(w[M]==="text"&&!y[M]&&j>=0&&w[j]==="text"&&(c3e(R)||R==="-"&&d3e(k[j]))){const O=(p=C[j])!=null?p:[];O.push(R),C[j]=O,_[j]=_[M],k[M]="";continue}j=M}}for(let M=0;Mq+1){R.push(nr(se)),O.push(me),U.push("text"),Z.push(M.starts[q]),q=Q;continue}}R.push(te),O.push(J),U.push(ee),Z.push(M.starts[q]),q++}return{len:R.length,texts:R,isWordLike:O,kinds:U,starts:Z}})((function(M){const R=[],O=[],U=[],Z=[];for(let q=0;q1;for(let se=0;se=M.len||cm(M.kinds[ee]))continue;const J=[],se=M.starts[ee];let Q=ee;for(;Q0&&(R.push(nr(J)),O.push(!0),U.push("text"),Z.push(se),q=Q-1)}return{len:R.length,texts:R,isWordLike:O,kinds:U,starts:Z}})((function(M){const R=M.texts.slice(),O=M.isWordLike.slice(),U=M.kinds.slice(),Z=M.starts.slice();for(let te=0;te=0&&!r$(c.texts[w-1],u)&&y(w),m<0&&(m=w),k=k||Lr(_))}return y(c.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:h}})(i,l,t.breakKeepAllAfterPunctuation):l;return St({normalized:i,chunks:T3e(r,s)},r)}let Cc=null;const jx=new Map;let Mc=null;const I3e=new RegExp("\\p{Emoji_Presentation}","u"),L3e=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let um=null;const Ox=new Map;function y7(){if(Cc!==null)return Cc;if(typeof OffscreenCanvas<"u")return Cc=new OffscreenCanvas(1,1).getContext("2d"),Cc;if(typeof document<"u")return Cc=document.createElement("canvas").getContext("2d"),Cc;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Ha(e,t){let n=t.get(e);return n===void 0&&(n={width:y7().measureText(e).width,containsCJK:Lr(e)},t.set(e,n)),n}function j5(){if(Mc!==null)return Mc;if(typeof navigator>"u")return Mc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mc;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Mc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mc}function c$(){return um===null&&(um=new Intl.Segmenter(void 0,{granularity:"grapheme"})),um}function $3e(e){return I3e.test(e)||e.includes("️")}function s0(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let l=0;const r=c$();for(const a of r.segment(i))$3e(a.segment)&&l++;return l})(o)),s.emojiCount})(e,t)*n}function N3e(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function Hx(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function Dx(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function Bv(e,t){return t===0?0:e+t}function R3e(e,t,n,o,s){return Bv(o,t==="tab"?s+(function(i,l){return i.letterSpacing!==0&&i.spacingGraphemeCounts[l]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function Vx(e,t,n,o){return Bv(o,t==="tab"?0:e.lineEndFitAdvances[n])}function Wx(e,t,n,o,s){return Bv(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function P3e(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function F3e(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function j3(e,t,n){let o=t;for(;oO){if(ye!==null&&ie>F){Q(oe,ie,de),be=ie,ve=j3(ye,ve,be+1),ie=-1,de=0;continue}Q(),xe(oe,be,Se)}else Z+=Se,te=oe,ee=be+1;else xe(oe,be,Se);const je=be+1;ye!==null&&ye[ve]===je&&(ie=je,de=Z,ve++),be++}q&&te===oe&&ee===he.length&&(te=oe+1,ee=0)}let X=0;for(;X=H.length)));){const oe=H[X],F=Hx(D[X]);if(q)if(Z+oe>O){if(F){Ye(X,oe),Q(X+1,0,Z-oe),X++;continue}if(J>=0){if(te>J||te===J&&ee>0){Q();continue}Q(J,0,se);continue}if(oe>O&&M[X]!==null){Q(),at(X,0),X++;continue}Q()}else Ye(X,oe),F&&(J=X+1,se=Z-oe),X++;else oe>O&&M[X]!==null?at(X,0):me(X,oe),F&&(J=X+1,se=Z-oe),X++}return q&&Q(),U})(n,o);const{widths:s,kinds:i,breakableFitAdvances:l,breakablePreferredBreaks:r,discretionaryHyphenWidth:a,chunks:c}=n;if(s.length===0||c.length===0)return 0;const u=j5(),d=o+u.lineFitEpsilon;let f=0,p=0,h=!1,m=0,k=0,x=-1,y=0,w=null;function _(){x=-1,y=0,w=null}function A(C=m,j=k,H){f++,p=0,h=!1,_()}function P(C,j){h=!0,m=C+1,k=0,p=j}function z(C,j,H){h=!0,m=C,k=j+1,p=H}function L(C,j){h?(p+=j,m=C+1,k=0):P(C,j)}function E(C,j,H,D,M,R){if(!j)return;const O=Vx(n,C,H,M);Wx(n,C,H,M,D),x=H+1,y=p-R+O,w=C}function T(C,j){var H;const D=l[C],M=(H=r[C])!=null?H:null;let R=M===null?-1:j3(M,0,j+1),O=-1,U=j;for(;Ud){if(M!==null&&O>j){A(C,O),U=O,R=j3(M,R,U+1),O=-1;continue}A(),z(C,U,Z)}else p=ee,m=C,k=U+1}else z(C,U,Z);const q=U+1;M!==null&&M[R]===q&&(O=q,R++),U++}h&&m===C&&k===D.length&&(m=C+1,k=0)}function $(C){f++,_()}for(let C=0;C=j.endSegmentIndex)));){const D=i[H],M=Hx(D),R=B3e(n,h,H),O=D==="tab"?z3e(p+R,n.tabStopAdvance):s[H],U=R+O,Z=R3e(n,D,H,R,O);if(D!=="soft-hyphen")if(h){if(p+Z>d){const q=p+Vx(n,D,H,R);if(Wx(n,D,H,R,O),w==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&y<=d){A(x,0);continue}if(M&&q<=d){L(H,U),A(H+1,0),H++;continue}if(x>=0&&y<=d){if(m>x||m===x&&k>0){A();continue}const te=x;A(te,0),H=te;continue}if(Z>d&&l[H]!==null){A(),T(H,0),H++;continue}A();continue}L(H,U),E(D,M,H,O,R,U),H++}else Z>d&&l[H]!==null?T(H,0):P(H,O),E(D,M,H,O,R,U),H++;else h&&(m=H+1,k=0,x=H+1,y=p+a,w=D),H++}h&&(j.consumedEndSegmentIndex,A(j.consumedEndSegmentIndex,0))}return f})(e,t)}let dm=null;function Rv(){return dm===null&&(dm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),dm}function O3e(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=v7(d),r=Kp.has(d)}function u(d,f){o.push(d),i=i||f;const p=v7(d);l=d.length===1&&O0.has(d)&&l||p,r=!1}for(const d of Rv().segment(e)){const f=d.segment,p=Lr(f);o.length!==0?r||$v.has(f)||O0.has(f)||t.carryCJKAfterClosingQuote&&p&&l?u(f,p):i||p?(a(),c(f,d.index,p)):u(f,p):c(f,d.index,p)}return a(),n}function H3e(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(r){if(!(s<0)){if(i)s+1===r?o.push(t[s]):(function(a,c){const u=t[a].start,d=c=0&&!r$(t[r-1].text,n)&&l(r),s<0&&(s=r),i=i||Lr(a.text)}return l(t.length),o}function qx(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=Rv();for(const s of o.segment(e))n++;return n}function D3e(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function V3e(e,t,n,o,s){const i=j5(),{cache:l,emojiCorrection:r}=(function($,C){y7().font=$;const j=(function(M){let R=jx.get(M);return R||(R=new Map,jx.set(M,R)),R})($),H=(function(M){const R=M.match(/(\d+(?:\.\d+)?)\s*px/);return R?parseFloat(R[1]):16})($),D=C?(function(M,R){let O=Ox.get(M);if(O!==void 0)return O;const U=y7();U.font=M;const Z=U.measureText("😀").width;if(O=0,Z>R+.5&&typeof document<"u"&&document.body!==null){const q=document.createElement("span");q.style.font=M,q.style.display="inline-block",q.style.visibility="hidden",q.style.position="absolute",q.textContent="😀",document.body.appendChild(q);const te=q.getBoundingClientRect().width;document.body.removeChild(q),Z-te>.5&&(O=Z-te)}return Ox.set(M,O),O})($,H):0;return{cache:j,fontSize:H,emojiCorrection:D}})(t,(a=e.normalized,L3e.test(a)));var a;const c=s0("-",Ha("-",l),r)+(s===0?0:2*s),u=8*s0(" ",Ha(" ",l),r),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=null,y=[],w=[],_=[],A=null,P=Array.from({length:e.len});function z($,C,j,H,D,M,R,O,U){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(j),h.push(H),m.push(D),y.push(R),w.push(O),d&&_.push(U)}function L($,C,j,H,D){const M=Ha($,l),R=d?qx($,C):0,O=(function(te,ee,J){return ee>1?te+(ee-1)*J:te})(s0($,M,r),R,s),U=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:O,Z=U===0?0:U+(R>0?s:0),q=C==="space"||C==="zero-width-break"?0:O;if(D&&H&&$.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":T4($)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const ee=(function(se,Q,me,xe,Ye){if(Q.breakableFitAdvances!==void 0&&Q.breakableFitMode===Ye)return Q.breakableFitAdvances;Q.breakableFitMode=Ye;const at=c$(),X=[];for(const he of at.segment(se))X.push(he.segment);if(X.length<=1)return Q.breakableFitAdvances=null,Q.breakableFitAdvances;if(Ye==="sum-graphemes"){const he=[];for(const ye of X){const ve=Ha(ye,me);he.push(s0(ye,ve,xe))}return Q.breakableFitAdvances=he,Q.breakableFitAdvances}if(Ye==="pair-context"||X.length>96){const he=[];let ye=null,ve=0;for(const ie of X){const de=s0(ie,Ha(ie,me),xe);if(ye===null)he.push(de);else{const be=ye+ie,Se=Ha(be,me);he.push(s0(be,Se,xe)-ve)}ye=ie,ve=de}return Q.breakableFitAdvances=he,Q.breakableFitAdvances}const oe=[];let F="",K=0;for(const he of X){F+=he;const ye=s0(F,Ha(F,me),xe);oe.push(ye-K),K=ye}return Q.breakableFitAdvances=oe,Q.breakableFitAdvances})($,M,l,r,te),J=ee===null||o==="keep-all"?null:(function(se){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(se))return null;const Q=[];let me=0;for(const xe of Rv().segment(se))me++,D3e(xe.segment)&&Q.push(me);return Q.length===0?null:Q})($);return void z($,O,Z,q,C,j,ee,J,R)}z($,O,Z,q,C,j,null,null,R)}for(let $=0;$=55296&&se<=56319&&J+1=56320&&Ye<=57343&&(Q=Ye-56320+(se-55296<<10)+65536,me=2)}const xe=Jfe(Q);xe!=="R"&&xe!=="AL"&&xe!=="AN"||(O=!0);for(let Ye=0;Ye=0&&R[se]==="ET";se--)R[se]="EN";for(se=J+1;se0?R[J-1]:te)!=="L"?"R":"L";if(Q===((se{const e=globalThis;if(e[fm])return e[fm];const t={configs:{},controllers:{},revision:Uo(0),preparedCache:new Map,blockEstimateCache:new Map};return e[fm]=t,t})();let Ed=null;const pm=zs.revision;function Ux(e){var t;return e&&(t=zs.configs[e])!=null?t:null}function Zx(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function q3e(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function hm(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!q3e(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function mm(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Ed!=null)return Ed;if(typeof document>"u")return!1;try{const l=document.createElement("canvas");return Ed=!!((i=l.getContext)!=null&&i.call(l,"2d")),Ed}catch{return Ed=!1,!1}})())return null;try{const i=Math.round(100*t)/100,l=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),r=zs.blockEstimateCache.get(l);if(r)return zs.blockEstimateCache.delete(l),zs.blockEstimateCache.set(l,r),{kind:"simple-text",height:r.height,contentHeight:r.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",c=(function(p,h,m){const k=`${m}\0${h}\0${p}`,x=zs.preparedCache.get(k);if(x)return zs.preparedCache.delete(k),zs.preparedCache.set(k,x),x.prepared;const y=(function(w,_,A){return(function(P,z,L,E){var T,$;const C=(T=E?.wordBreak)!=null?T:"normal",j=($=E?.letterSpacing)!=null?$:0;return V3e(E3e(P,j5(),E?.whiteSpace,C),z,!1,C,j)})(w,_,0,A)})(p,h,{whiteSpace:m});for(zs.preparedCache.set(k,{prepared:y});zs.preparedCache.size>240;){const w=zs.preparedCache.keys().next().value;if(!w)break;zs.preparedCache.delete(w)}return y})(e,n.font,a),u=(function(p,h,m){const k=j3e(p,h);return{lineCount:k,height:k*m}})(c,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,u.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(zs.blockEstimateCache.set(l,{height:f,contentHeight:Math.round(d)});zs.blockEstimateCache.size>4e3;){const p=zs.blockEstimateCache.keys().next().value;if(!p)break;zs.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function u$(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=hm(e.children);return i&&n.paragraph?mm(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),l=hm(e.children),r=n.headings[i];return l&&r?mm(l,t,r):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const l=hm((s=i[0])==null?void 0:s.children);return l?mm(l,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let l=Math.max(0,n.listWrapperOverhead);for(const r of i){const a=u$(r,t,n);if(!a)return null;l+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(l)),contentHeight:Math.max(1,Math.round(l))}}return null}function Id(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function i0(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function gm(e,t,n=0){return e.diff?Iv(t??{},n)?(function(o){const s=i0(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(l=>!W3e.some(r=>l.startsWith(r))).length):Math.max(1,i.length)}return Id(i0(o.originalCode))+Id(i0(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(Id(i0(s)),Id(i0(i)));const l=i0(o.code).split(/\r?\n/);let r=0,a=0;for(const c of l)c.startsWith("+")&&!c.startsWith("+++")?a++:c.startsWith("-")&&!c.startsWith("---")?r++:(r++,a++);return Math.max(1,r,a)})(e):Id(i0(e.code,e.loading===!0))}function U3e(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function vm(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=Zx(o.lineHeight,1.5*Zx(o.fontSize,16)),l=e.getBoundingClientRect().width,r=t.getBoundingClientRect().width;return{font:U3e(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,l-r),whiteSpace:n}}const Z3e=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function Kx(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[l,r]of Object.entries(i))Z3e.has(l)||s.has(l)||r.enumerable&&"value"in r&&(o[l]=r.value);return o}function Gx(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),l=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=l);const r=Math.max(0,i-l),a=[-r,r];let c=a[0],u=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=o.getNormalizedScrollTop(e,t,!1),h=Math.abs(p-l);hd&&(e.scrollTop=c)}function Yx(e,t){let n=0,o=null,s=null;const i=()=>{const l=s;s=null,o=null,l&&(n=Date.now(),e(...l))};return function(...l){const r=Date.now(),a=t-(r-n);s=l,a<=0?(o&&(clearTimeout(o),o=null),n=r,s=null,e(...l)):o||(o=setTimeout(i,a))}}function Xx(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const d$=Symbol("MarkstreamMathBlockMinHeightCache");function IKe(){return fn(d$,null)}const K3e=new Set(["text","inline_code","emoji","footnote_reference"]),G3e=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Ld(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function l0(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),l=s.split(/\r?\n/).length,r=Math.ceil(s.length/i),a=Math.max(1,l,r);return Math.max(n,Math.ceil(a*o+12))}function f$(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(K3e.has(o))return!0;if(!G3e.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(f$)}function w7(e){var t,n,o,s,i,l,r,a;if(!e||typeof e!="object")return"";const c=e,u=String((t=c.type)!=null?t:"");if(u==="text")return String((o=(n=c.content)!=null?n:c.raw)!=null?o:"");if(u==="inline_code")return String((l=(i=(s=c.code)!=null?s:c.content)!=null?i:c.raw)!=null?l:"");if(u==="emoji")return String((a=(r=c.name)!=null?r:c.raw)!=null?a:"");if(typeof c.text=="string")return c.text;const d=[];for(const f of["children","items","cells","rows"]){const p=c[f];if(Array.isArray(p)){const h=p.map(w7).filter(Boolean).join(" ");h&&d.push(h)}}return d.join(" ").replace(/\s+/g," ").trim()}function p$(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(p$)})}function Y3e(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function X3e(e,t){var n,o,s,i,l,r,a,c,u,d,f,p,h,m;if(!e||typeof e!="object")return 32;const k=e,x=String((n=k.type)!=null?n:""),y=Number.isFinite(t)&&t>0?t:640;switch(x){case"heading":return(function(w){var _;const A=Number((_=w.level)!=null?_:w.depth);return A>=4?20:A===3?30:A===2?32:44})(k);case"paragraph":return(function(w,_){const A=String(w??"");if(!A)return 28;const P=Math.max(18,Math.floor(Math.max(320,_)/8)),z=A.split(/\r?\n/).length,L=Math.ceil(A.length/P);return Math.max(1,z,L)<=1?28:l0(A,_,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),y);case"list":return(function(w,_){var A;const P=Array.isArray(w.items)?w.items:[];if(!P.length)return 48;const z=Math.max(48,30*P.length+12);let L=12;for(const $ of P)L+=Y3e(w7($)||String((A=$.raw)!=null?A:""),_);const E=Math.max(0,L-z);if(P.length>20){const $=Math.round(2.4*P.length);return Math.round(z+Math.max($,Math.min(E,3*P.length)))}if(E<=0)return z;const T=P.length>8?8*P.length:E;return Math.round(z+Math.min(E,T))})(k,y);case"list_item":return l0(String((l=(i=k.raw)!=null?i:k.content)!=null?l:""),y,34);case"blockquote":return l0(String((a=(r=k.raw)!=null?r:k.content)!=null?a:""),y,56);case"table":return(function(w,_){const A=[...w.header?[w.header]:[],...Array.isArray(w.rows)?w.rows:[]];if(!A.length){const P=Array.isArray(w.children)?w.children.length:3;return Math.max(120,38*P+48)}return Math.max(120,Math.round(4+A.reduce((P,z)=>P+(function(L,E){const T=Math.max(1,L.length),$=Math.max(80,(E-32)/T),C=Math.max(10,Math.floor($/8)),j=Math.max(1,...L.map(H=>{var D;const M=w7(H)||String((D=H?.raw)!=null?D:"");return Math.ceil(M.length/C)||1}));return 54+34*Math.max(0,j-1)+(T<=3&&L.some(p$)?14:0)})((function(L){var E;return Array.isArray(L?.cells)&&(E=L.cells)!=null?E:[]})(z),_),0)))})(k,y);case"code_block":{const w=String((c=k.language)!=null?c:"").trim().toLowerCase(),_=String((d=(u=k.code)!=null?u:k.raw)!=null?d:"");return w==="mermaid"?L5(E5(_)):w==="infographic"?$5(I5(_)):l0(_,y,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(w,_){var A,P,z;const L=w.match(/^\s*]*)>/i);return L&&!/(?:^|\s)open(?:\s|=|$)/i.test((A=L[1])!=null?A:"")?l0(((z=(P=w.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:P[1])==null?void 0:z.replace(/<[^>]*>/g,"").trim())||"Details",_,28,28):l0(w,_,96)})(String((p=(f=k.raw)!=null?f:k.content)!=null?p:""),y);case"thematic_break":return 24;default:return l0(String((m=(h=k.raw)!=null?h:k.content)!=null?m:""),y,40)}}function Jx(e,t,n){return Math.min(Math.max(e,t),n)}const J3e=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Q3e=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],e4e=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),h$=["raw","content","code","originalCode","updatedCode"],Qx=new WeakMap,eS=new WeakMap;let t4e=1;function er(){return typeof performance<"u"?performance.now():Date.now()}function tS(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function nl(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=Qx.get(t);return n||(n=t4e++,Qx.set(t,n)),String(n)}function nS(e,t,n,o={}){var s,i;const l=o.includeFinal!==!1,r={md:nl(t),customMarkdownIt:nl(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:nl(e.validateLink),preTransformTokens:nl(e.preTransformTokens),postTransformTokens:nl(e.postTransformTokens),postTransformNodes:nl(e.postTransformNodes)};return l&&(r.final=e.final===!0),JSON.stringify(r)}function oS(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` -`,t-1)+1;return e.slice(n,t).trim()}function sS(e){const t=m$(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function m$(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function g$(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function Pv(e){const t=String(e??"");return`${t.length}:${g$(t)}`}function k7(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(l){return l.length<=8192?Pv(l):`${l.length}:${g$(l.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${nl(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${nl(o)}`;const i=nl(o);if(t.set(o,i),Array.isArray(e)){const l=e.slice(0,200);return`a:${e.length}:${l.map(r=>k7(r,t,n+1)).join(",")}`}if(typeof e=="object"){const l=e,r=Object.keys(l).sort(),a=r.slice(0,80);return`o:${r.length}:${a.sort().map(c=>`${c}:${k7(l[c],t,n+1)}`).join(";")}`}return typeof e}function O5(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function v$(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>O5(o)?S1(o,t,n+1):v$(o,t,n+1)).join(",")}`:O5(e)?S1(e,t,n):k7(e,t,n)}function n4e(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!h$.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${Pv(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${nl(s)}`:e4e.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${v$(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${nl(s)}`:""}).filter(Boolean).join(";")}function o4e(e){return h$.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${Pv(n)}`:""}).filter(Boolean).join(";")}function S1(e,t=new WeakMap,n=0){const o=eS.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${nl(s)}`;const l=nl(s);t.set(s,l);const r=(function(a,c,u){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(h=>S1(h,c,u+1)).join("|"):"";return[a.type,o4e(d),n4e(d,c,u),f.length,p].join(":")})(e,t,n);return eS.set(s,r),r}function y$(e,t){return S1(e)===S1(t)}function Fv(e,t,n){const o=er(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=er()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function iS(e,t,n){return Fv(t,n,()=>S1(e))}function w$(e,t,n){return iS(e,n,"stabilizeSignatureMs")===iS(t,n,"stabilizeSignatureMs")}function O3(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function lS(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function rS(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function s4e(e,t){return e.length===t.length&&e===t}function jv(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(u=>u!=="type"&&u!=="children").sort(),l=Object.keys(s).filter(u=>u!=="type"&&u!=="children").sort();if(i.length!==l.length)return!1;for(let u=0;u{o=jv(e,t)}),o??w$(e,t,n)}function r4e(e,t){const n={};for(const o of J3e){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function a4e(e,t){var n;const o=sx(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:B(()=>!1),l=V(t.renderContent.value);let r=[],a="",c="",u="",d=!1;const f=(function(){let H="",D=0,M=!1,R=!1,O=!1,U=!1;function Z(){H="",D=0,M=!1,R=!1,O=!1,U=!1}function q(te){let ee=!1;for(let J=0;J{if(!te||!ee.startsWith(te)||ee.length<=te.length)return Z(),[!0,0];let J=0;H!==te&&(Z(),q(te),J=te.length);const se=ee.slice(te.length),Q=q(se);return H=ee,[Q,J+se.length]}})();let p,h=0,m=0,k=er(),x=-1,y=0;function w(H){x=Number.isInteger(H)?H:0,y+=1}function _(){p&&(clearTimeout(p),p=void 0)}function A(){_();const H=t.renderContent.value;l.value!==H&&(l.value=H),k=er()}Ke([t.renderContent,t.effectiveFinal,i],([H,D,M])=>{l.value!==H&&(!M||D||(function(R,O){if(!R&&O||O.length<=80||O.length0&&c.charCodeAt(c.length-1)===32&&(c=c.slice(0,-1)),c})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=(function(a,c,u){var d,f,p;const h=(am===null&&(am=new Intl.Segmenter(void 0,{granularity:"word"})),am);let m=0;const k=[],x=[],y=[],w=[],_=[],A=[],P=[],z=[],L=[],T=[],I=[],N=[];for(const M of h.segment(a))for(const R of k3e(M.segment,(d=M.isWordLike)!=null&&d,M.index,u)){let O=function(){A[Q]!==null&&(x[Q]=[Rx(k,A,P,Q)],A[Q]=null),x[Q].push(R.text),y[Q]=y[Q]||R.isWordLike,z[Q]=z[Q]||q,L[Q]=L[Q]||te,T[Q]=J,I[Q]=se,N[Q]=Px(L[Q],ee)};const U=R.kind==="text",Z=h3e(R.text,R.isWordLike,R.kind),q=Lr(R.text),te=zx(R.text),ee=x2(R.text),J=y7(R.text),se=m3e(R.text),Q=m-1;c.carryCJKAfterClosingQuote&&U&&m>0&&w[Q]==="text"&&q&&z[Q]&&T[Q]||U&&m>0&&w[Q]==="text"&&c3e(R.text)&&z[Q]||U&&m>0&&w[Q]==="text"&&I[Q]?O():U&&m>0&&w[Q]==="text"&&R.isWordLike&&te&&N[Q]?(O(),y[Q]=!0):Z!==null&&m>0&&w[Q]==="text"&&A[Q]===Z?P[Q]=((f=P[Q])!=null?f:1)+1:U&&!R.isWordLike&&m>0&&w[Q]==="text"&&!z[Q]&&(a3e(R.text)||R.text==="-"&&y[Q])?O():(k[m]=R.text,x[m]=[R.text],y[m]=R.isWordLike,w[m]=R.kind,_[m]=R.start,A[m]=Z,P[m]=Z===null?0:1,z[m]=q,L[m]=te,T[m]=J,I[m]=se,N[m]=Px(te,ee),m++)}for(let M=0;Mnull);let F=-1;for(let M=m-1;M>=0;M--){const R=k[M];if(R.length!==0){if(w[M]==="text"&&!y[M]&&F>=0&&w[F]==="text"&&(u3e(R)||R==="-"&&f3e(k[F]))){const O=(p=C[F])!=null?p:[];O.push(R),C[F]=O,_[F]=_[M],k[M]="";continue}F=M}}for(let M=0;Mq+1){R.push(nr(se)),O.push(me),U.push("text"),Z.push(M.starts[q]),q=Q;continue}}R.push(te),O.push(J),U.push(ee),Z.push(M.starts[q]),q++}return{len:R.length,texts:R,isWordLike:O,kinds:U,starts:Z}})((function(M){const R=[],O=[],U=[],Z=[];for(let q=0;q1;for(let se=0;se=M.len||cm(M.kinds[ee]))continue;const J=[],se=M.starts[ee];let Q=ee;for(;Q0&&(R.push(nr(J)),O.push(!0),U.push("text"),Z.push(se),q=Q-1)}return{len:R.length,texts:R,isWordLike:O,kinds:U,starts:Z}})((function(M){const R=M.texts.slice(),O=M.isWordLike.slice(),U=M.kinds.slice(),Z=M.starts.slice();for(let te=0;te=0&&!a$(c.texts[w-1],u)&&y(w),m<0&&(m=w),k=k||Lr(_))}return y(c.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:h}})(i,l,t.breakKeepAllAfterPunctuation):l;return St({normalized:i,chunks:E3e(r,s)},r)}let Cc=null;const Ox=new Map;let Mc=null;const L3e=new RegExp("\\p{Emoji_Presentation}","u"),$3e=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let um=null;const Hx=new Map;function w7(){if(Cc!==null)return Cc;if(typeof OffscreenCanvas<"u")return Cc=new OffscreenCanvas(1,1).getContext("2d"),Cc;if(typeof document<"u")return Cc=document.createElement("canvas").getContext("2d"),Cc;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Ha(e,t){let n=t.get(e);return n===void 0&&(n={width:w7().measureText(e).width,containsCJK:Lr(e)},t.set(e,n)),n}function j5(){if(Mc!==null)return Mc;if(typeof navigator>"u")return Mc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mc;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Mc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mc}function u$(){return um===null&&(um=new Intl.Segmenter(void 0,{granularity:"grapheme"})),um}function N3e(e){return L3e.test(e)||e.includes("️")}function s0(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let l=0;const r=u$();for(const a of r.segment(i))N3e(a.segment)&&l++;return l})(o)),s.emojiCount})(e,t)*n}function z3e(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function Dx(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function Vx(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function Rv(e,t){return t===0?0:e+t}function P3e(e,t,n,o,s){return Rv(o,t==="tab"?s+(function(i,l){return i.letterSpacing!==0&&i.spacingGraphemeCounts[l]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function Wx(e,t,n,o){return Rv(o,t==="tab"?0:e.lineEndFitAdvances[n])}function qx(e,t,n,o,s){return Rv(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function F3e(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function j3e(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function j3(e,t,n){let o=t;for(;oO){if(ye!==null&&ie>j){Q(oe,ie,de),be=ie,ve=j3(ye,ve,be+1),ie=-1,de=0;continue}Q(),xe(oe,be,Se)}else Z+=Se,te=oe,ee=be+1;else xe(oe,be,Se);const je=be+1;ye!==null&&ye[ve]===je&&(ie=je,de=Z,ve++),be++}q&&te===oe&&ee===he.length&&(te=oe+1,ee=0)}let X=0;for(;X=H.length)));){const oe=H[X],j=Dx(D[X]);if(q)if(Z+oe>O){if(j){Ye(X,oe),Q(X+1,0,Z-oe),X++;continue}if(J>=0){if(te>J||te===J&&ee>0){Q();continue}Q(J,0,se);continue}if(oe>O&&M[X]!==null){Q(),at(X,0),X++;continue}Q()}else Ye(X,oe),j&&(J=X+1,se=Z-oe),X++;else oe>O&&M[X]!==null?at(X,0):me(X,oe),j&&(J=X+1,se=Z-oe),X++}return q&&Q(),U})(n,o);const{widths:s,kinds:i,breakableFitAdvances:l,breakablePreferredBreaks:r,discretionaryHyphenWidth:a,chunks:c}=n;if(s.length===0||c.length===0)return 0;const u=j5(),d=o+u.lineFitEpsilon;let f=0,p=0,h=!1,m=0,k=0,x=-1,y=0,w=null;function _(){x=-1,y=0,w=null}function A(C=m,F=k,H){f++,p=0,h=!1,_()}function P(C,F){h=!0,m=C+1,k=0,p=F}function z(C,F,H){h=!0,m=C,k=F+1,p=H}function L(C,F){h?(p+=F,m=C+1,k=0):P(C,F)}function T(C,F,H,D,M,R){if(!F)return;const O=Wx(n,C,H,M);qx(n,C,H,M,D),x=H+1,y=p-R+O,w=C}function I(C,F){var H;const D=l[C],M=(H=r[C])!=null?H:null;let R=M===null?-1:j3(M,0,F+1),O=-1,U=F;for(;Ud){if(M!==null&&O>F){A(C,O),U=O,R=j3(M,R,U+1),O=-1;continue}A(),z(C,U,Z)}else p=ee,m=C,k=U+1}else z(C,U,Z);const q=U+1;M!==null&&M[R]===q&&(O=q,R++),U++}h&&m===C&&k===D.length&&(m=C+1,k=0)}function N(C){f++,_()}for(let C=0;C=F.endSegmentIndex)));){const D=i[H],M=Dx(D),R=R3e(n,h,H),O=D==="tab"?B3e(p+R,n.tabStopAdvance):s[H],U=R+O,Z=P3e(n,D,H,R,O);if(D!=="soft-hyphen")if(h){if(p+Z>d){const q=p+Wx(n,D,H,R);if(qx(n,D,H,R,O),w==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&y<=d){A(x,0);continue}if(M&&q<=d){L(H,U),A(H+1,0),H++;continue}if(x>=0&&y<=d){if(m>x||m===x&&k>0){A();continue}const te=x;A(te,0),H=te;continue}if(Z>d&&l[H]!==null){A(),I(H,0),H++;continue}A();continue}L(H,U),T(D,M,H,O,R,U),H++}else Z>d&&l[H]!==null?I(H,0):P(H,O),T(D,M,H,O,R,U),H++;else h&&(m=H+1,k=0,x=H+1,y=p+a,w=D),H++}h&&(F.consumedEndSegmentIndex,A(F.consumedEndSegmentIndex,0))}return f})(e,t)}let dm=null;function Pv(){return dm===null&&(dm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),dm}function H3e(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=y7(d),r=Kp.has(d)}function u(d,f){o.push(d),i=i||f;const p=y7(d);l=d.length===1&&O0.has(d)&&l||p,r=!1}for(const d of Pv().segment(e)){const f=d.segment,p=Lr(f);o.length!==0?r||Nv.has(f)||O0.has(f)||t.carryCJKAfterClosingQuote&&p&&l?u(f,p):i||p?(a(),c(f,d.index,p)):u(f,p):c(f,d.index,p)}return a(),n}function D3e(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(r){if(!(s<0)){if(i)s+1===r?o.push(t[s]):(function(a,c){const u=t[a].start,d=c=0&&!a$(t[r-1].text,n)&&l(r),s<0&&(s=r),i=i||Lr(a.text)}return l(t.length),o}function Ux(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=Pv();for(const s of o.segment(e))n++;return n}function V3e(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function W3e(e,t,n,o,s){const i=j5(),{cache:l,emojiCorrection:r}=(function(N,C){w7().font=N;const F=(function(M){let R=Ox.get(M);return R||(R=new Map,Ox.set(M,R)),R})(N),H=(function(M){const R=M.match(/(\d+(?:\.\d+)?)\s*px/);return R?parseFloat(R[1]):16})(N),D=C?(function(M,R){let O=Hx.get(M);if(O!==void 0)return O;const U=w7();U.font=M;const Z=U.measureText("😀").width;if(O=0,Z>R+.5&&typeof document<"u"&&document.body!==null){const q=document.createElement("span");q.style.font=M,q.style.display="inline-block",q.style.visibility="hidden",q.style.position="absolute",q.textContent="😀",document.body.appendChild(q);const te=q.getBoundingClientRect().width;document.body.removeChild(q),Z-te>.5&&(O=Z-te)}return Hx.set(M,O),O})(N,H):0;return{cache:F,fontSize:H,emojiCorrection:D}})(t,(a=e.normalized,$3e.test(a)));var a;const c=s0("-",Ha("-",l),r)+(s===0?0:2*s),u=8*s0(" ",Ha(" ",l),r),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=null,y=[],w=[],_=[],A=null,P=Array.from({length:e.len});function z(N,C,F,H,D,M,R,O,U){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(F),h.push(H),m.push(D),y.push(R),w.push(O),d&&_.push(U)}function L(N,C,F,H,D){const M=Ha(N,l),R=d?Ux(N,C):0,O=(function(te,ee,J){return ee>1?te+(ee-1)*J:te})(s0(N,M,r),R,s),U=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:O,Z=U===0?0:U+(R>0?s:0),q=C==="space"||C==="zero-width-break"?0:O;if(D&&H&&N.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":T4(N)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const ee=(function(se,Q,me,xe,Ye){if(Q.breakableFitAdvances!==void 0&&Q.breakableFitMode===Ye)return Q.breakableFitAdvances;Q.breakableFitMode=Ye;const at=u$(),X=[];for(const he of at.segment(se))X.push(he.segment);if(X.length<=1)return Q.breakableFitAdvances=null,Q.breakableFitAdvances;if(Ye==="sum-graphemes"){const he=[];for(const ye of X){const ve=Ha(ye,me);he.push(s0(ye,ve,xe))}return Q.breakableFitAdvances=he,Q.breakableFitAdvances}if(Ye==="pair-context"||X.length>96){const he=[];let ye=null,ve=0;for(const ie of X){const de=s0(ie,Ha(ie,me),xe);if(ye===null)he.push(de);else{const be=ye+ie,Se=Ha(be,me);he.push(s0(be,Se,xe)-ve)}ye=ie,ve=de}return Q.breakableFitAdvances=he,Q.breakableFitAdvances}const oe=[];let j="",K=0;for(const he of X){j+=he;const ye=s0(j,Ha(j,me),xe);oe.push(ye-K),K=ye}return Q.breakableFitAdvances=oe,Q.breakableFitAdvances})(N,M,l,r,te),J=ee===null||o==="keep-all"?null:(function(se){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(se))return null;const Q=[];let me=0;for(const xe of Pv().segment(se))me++,V3e(xe.segment)&&Q.push(me);return Q.length===0?null:Q})(N);return void z(N,O,Z,q,C,F,ee,J,R)}z(N,O,Z,q,C,F,null,null,R)}for(let N=0;N=55296&&se<=56319&&J+1=56320&&Ye<=57343&&(Q=Ye-56320+(se-55296<<10)+65536,me=2)}const xe=Qfe(Q);xe!=="R"&&xe!=="AL"&&xe!=="AN"||(O=!0);for(let Ye=0;Ye=0&&R[se]==="ET";se--)R[se]="EN";for(se=J+1;se0?R[J-1]:te)!=="L"?"R":"L";if(Q===((se{const e=globalThis;if(e[fm])return e[fm];const t={configs:{},controllers:{},revision:Uo(0),preparedCache:new Map,blockEstimateCache:new Map};return e[fm]=t,t})();let Ed=null;const pm=zs.revision;function Zx(e){var t;return e&&(t=zs.configs[e])!=null?t:null}function Kx(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function U3e(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function hm(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!U3e(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` +`)}return s.length>0?s:null}function mm(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Ed!=null)return Ed;if(typeof document>"u")return!1;try{const l=document.createElement("canvas");return Ed=!!((i=l.getContext)!=null&&i.call(l,"2d")),Ed}catch{return Ed=!1,!1}})())return null;try{const i=Math.round(100*t)/100,l=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),r=zs.blockEstimateCache.get(l);if(r)return zs.blockEstimateCache.delete(l),zs.blockEstimateCache.set(l,r),{kind:"simple-text",height:r.height,contentHeight:r.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",c=(function(p,h,m){const k=`${m}\0${h}\0${p}`,x=zs.preparedCache.get(k);if(x)return zs.preparedCache.delete(k),zs.preparedCache.set(k,x),x.prepared;const y=(function(w,_,A){return(function(P,z,L,T){var I,N;const C=(I=T?.wordBreak)!=null?I:"normal",F=(N=T?.letterSpacing)!=null?N:0;return W3e(I3e(P,j5(),T?.whiteSpace,C),z,!1,C,F)})(w,_,0,A)})(p,h,{whiteSpace:m});for(zs.preparedCache.set(k,{prepared:y});zs.preparedCache.size>240;){const w=zs.preparedCache.keys().next().value;if(!w)break;zs.preparedCache.delete(w)}return y})(e,n.font,a),u=(function(p,h,m){const k=O3e(p,h);return{lineCount:k,height:k*m}})(c,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,u.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(zs.blockEstimateCache.set(l,{height:f,contentHeight:Math.round(d)});zs.blockEstimateCache.size>4e3;){const p=zs.blockEstimateCache.keys().next().value;if(!p)break;zs.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function d$(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=hm(e.children);return i&&n.paragraph?mm(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),l=hm(e.children),r=n.headings[i];return l&&r?mm(l,t,r):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const l=hm((s=i[0])==null?void 0:s.children);return l?mm(l,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let l=Math.max(0,n.listWrapperOverhead);for(const r of i){const a=d$(r,t,n);if(!a)return null;l+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(l)),contentHeight:Math.max(1,Math.round(l))}}return null}function Id(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function i0(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function gm(e,t,n=0){return e.diff?Lv(t??{},n)?(function(o){const s=i0(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(l=>!q3e.some(r=>l.startsWith(r))).length):Math.max(1,i.length)}return Id(i0(o.originalCode))+Id(i0(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(Id(i0(s)),Id(i0(i)));const l=i0(o.code).split(/\r?\n/);let r=0,a=0;for(const c of l)c.startsWith("+")&&!c.startsWith("+++")?a++:c.startsWith("-")&&!c.startsWith("---")?r++:(r++,a++);return Math.max(1,r,a)})(e):Id(i0(e.code,e.loading===!0))}function Z3e(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function vm(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=Kx(o.lineHeight,1.5*Kx(o.fontSize,16)),l=e.getBoundingClientRect().width,r=t.getBoundingClientRect().width;return{font:Z3e(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,l-r),whiteSpace:n}}const K3e=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function Gx(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[l,r]of Object.entries(i))K3e.has(l)||s.has(l)||r.enumerable&&"value"in r&&(o[l]=r.value);return o}function Yx(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),l=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=l);const r=Math.max(0,i-l),a=[-r,r];let c=a[0],u=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=o.getNormalizedScrollTop(e,t,!1),h=Math.abs(p-l);hd&&(e.scrollTop=c)}function Xx(e,t){let n=0,o=null,s=null;const i=()=>{const l=s;s=null,o=null,l&&(n=Date.now(),e(...l))};return function(...l){const r=Date.now(),a=t-(r-n);s=l,a<=0?(o&&(clearTimeout(o),o=null),n=r,s=null,e(...l)):o||(o=setTimeout(i,a))}}function Jx(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const f$=Symbol("MarkstreamMathBlockMinHeightCache");function IKe(){return fn(f$,null)}const G3e=new Set(["text","inline_code","emoji","footnote_reference"]),Y3e=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Ld(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function l0(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),l=s.split(/\r?\n/).length,r=Math.ceil(s.length/i),a=Math.max(1,l,r);return Math.max(n,Math.ceil(a*o+12))}function p$(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(G3e.has(o))return!0;if(!Y3e.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(p$)}function k7(e){var t,n,o,s,i,l,r,a;if(!e||typeof e!="object")return"";const c=e,u=String((t=c.type)!=null?t:"");if(u==="text")return String((o=(n=c.content)!=null?n:c.raw)!=null?o:"");if(u==="inline_code")return String((l=(i=(s=c.code)!=null?s:c.content)!=null?i:c.raw)!=null?l:"");if(u==="emoji")return String((a=(r=c.name)!=null?r:c.raw)!=null?a:"");if(typeof c.text=="string")return c.text;const d=[];for(const f of["children","items","cells","rows"]){const p=c[f];if(Array.isArray(p)){const h=p.map(k7).filter(Boolean).join(" ");h&&d.push(h)}}return d.join(" ").replace(/\s+/g," ").trim()}function h$(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(h$)})}function X3e(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function J3e(e,t){var n,o,s,i,l,r,a,c,u,d,f,p,h,m;if(!e||typeof e!="object")return 32;const k=e,x=String((n=k.type)!=null?n:""),y=Number.isFinite(t)&&t>0?t:640;switch(x){case"heading":return(function(w){var _;const A=Number((_=w.level)!=null?_:w.depth);return A>=4?20:A===3?30:A===2?32:44})(k);case"paragraph":return(function(w,_){const A=String(w??"");if(!A)return 28;const P=Math.max(18,Math.floor(Math.max(320,_)/8)),z=A.split(/\r?\n/).length,L=Math.ceil(A.length/P);return Math.max(1,z,L)<=1?28:l0(A,_,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),y);case"list":return(function(w,_){var A;const P=Array.isArray(w.items)?w.items:[];if(!P.length)return 48;const z=Math.max(48,30*P.length+12);let L=12;for(const N of P)L+=X3e(k7(N)||String((A=N.raw)!=null?A:""),_);const T=Math.max(0,L-z);if(P.length>20){const N=Math.round(2.4*P.length);return Math.round(z+Math.max(N,Math.min(T,3*P.length)))}if(T<=0)return z;const I=P.length>8?8*P.length:T;return Math.round(z+Math.min(T,I))})(k,y);case"list_item":return l0(String((l=(i=k.raw)!=null?i:k.content)!=null?l:""),y,34);case"blockquote":return l0(String((a=(r=k.raw)!=null?r:k.content)!=null?a:""),y,56);case"table":return(function(w,_){const A=[...w.header?[w.header]:[],...Array.isArray(w.rows)?w.rows:[]];if(!A.length){const P=Array.isArray(w.children)?w.children.length:3;return Math.max(120,38*P+48)}return Math.max(120,Math.round(4+A.reduce((P,z)=>P+(function(L,T){const I=Math.max(1,L.length),N=Math.max(80,(T-32)/I),C=Math.max(10,Math.floor(N/8)),F=Math.max(1,...L.map(H=>{var D;const M=k7(H)||String((D=H?.raw)!=null?D:"");return Math.ceil(M.length/C)||1}));return 54+34*Math.max(0,F-1)+(I<=3&&L.some(h$)?14:0)})((function(L){var T;return Array.isArray(L?.cells)&&(T=L.cells)!=null?T:[]})(z),_),0)))})(k,y);case"code_block":{const w=String((c=k.language)!=null?c:"").trim().toLowerCase(),_=String((d=(u=k.code)!=null?u:k.raw)!=null?d:"");return w==="mermaid"?L5(E5(_)):w==="infographic"?$5(I5(_)):l0(_,y,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(w,_){var A,P,z;const L=w.match(/^\s*]*)>/i);return L&&!/(?:^|\s)open(?:\s|=|$)/i.test((A=L[1])!=null?A:"")?l0(((z=(P=w.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:P[1])==null?void 0:z.replace(/<[^>]*>/g,"").trim())||"Details",_,28,28):l0(w,_,96)})(String((p=(f=k.raw)!=null?f:k.content)!=null?p:""),y);case"thematic_break":return 24;default:return l0(String((m=(h=k.raw)!=null?h:k.content)!=null?m:""),y,40)}}function Qx(e,t,n){return Math.min(Math.max(e,t),n)}const Q3e=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],e4e=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],t4e=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),m$=["raw","content","code","originalCode","updatedCode"],eS=new WeakMap,tS=new WeakMap;let n4e=1;function er(){return typeof performance<"u"?performance.now():Date.now()}function nS(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function nl(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=eS.get(t);return n||(n=n4e++,eS.set(t,n)),String(n)}function oS(e,t,n,o={}){var s,i;const l=o.includeFinal!==!1,r={md:nl(t),customMarkdownIt:nl(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:nl(e.validateLink),preTransformTokens:nl(e.preTransformTokens),postTransformTokens:nl(e.postTransformTokens),postTransformNodes:nl(e.postTransformNodes)};return l&&(r.final=e.final===!0),JSON.stringify(r)}function sS(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` +`,t-1)+1;return e.slice(n,t).trim()}function iS(e){const t=g$(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function g$(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function v$(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function Fv(e){const t=String(e??"");return`${t.length}:${v$(t)}`}function b7(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(l){return l.length<=8192?Fv(l):`${l.length}:${v$(l.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${nl(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${nl(o)}`;const i=nl(o);if(t.set(o,i),Array.isArray(e)){const l=e.slice(0,200);return`a:${e.length}:${l.map(r=>b7(r,t,n+1)).join(",")}`}if(typeof e=="object"){const l=e,r=Object.keys(l).sort(),a=r.slice(0,80);return`o:${r.length}:${a.sort().map(c=>`${c}:${b7(l[c],t,n+1)}`).join(";")}`}return typeof e}function O5(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function y$(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>O5(o)?S1(o,t,n+1):y$(o,t,n+1)).join(",")}`:O5(e)?S1(e,t,n):b7(e,t,n)}function o4e(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!m$.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${Fv(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${nl(s)}`:t4e.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${y$(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${nl(s)}`:""}).filter(Boolean).join(";")}function s4e(e){return m$.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${Fv(n)}`:""}).filter(Boolean).join(";")}function S1(e,t=new WeakMap,n=0){const o=tS.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${nl(s)}`;const l=nl(s);t.set(s,l);const r=(function(a,c,u){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(h=>S1(h,c,u+1)).join("|"):"";return[a.type,s4e(d),o4e(d,c,u),f.length,p].join(":")})(e,t,n);return tS.set(s,r),r}function w$(e,t){return S1(e)===S1(t)}function jv(e,t,n){const o=er(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=er()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function lS(e,t,n){return jv(t,n,()=>S1(e))}function k$(e,t,n){return lS(e,n,"stabilizeSignatureMs")===lS(t,n,"stabilizeSignatureMs")}function O3(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function rS(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function aS(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function i4e(e,t){return e.length===t.length&&e===t}function Ov(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(u=>u!=="type"&&u!=="children").sort(),l=Object.keys(s).filter(u=>u!=="type"&&u!=="children").sort();if(i.length!==l.length)return!1;for(let u=0;u{o=Ov(e,t)}),o??k$(e,t,n)}function a4e(e,t){const n={};for(const o of Q3e){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function c4e(e,t){var n;const o=ix(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:B(()=>!1),l=V(t.renderContent.value);let r=[],a="",c="",u="",d=!1;const f=(function(){let H="",D=0,M=!1,R=!1,O=!1,U=!1;function Z(){H="",D=0,M=!1,R=!1,O=!1,U=!1}function q(te){let ee=!1;for(let J=0;J{if(!te||!ee.startsWith(te)||ee.length<=te.length)return Z(),[!0,0];let J=0;H!==te&&(Z(),q(te),J=te.length);const se=ee.slice(te.length),Q=q(se);return H=ee,[Q,J+se.length]}})();let p,h=0,m=0,k=er(),x=-1,y=0;function w(H){x=Number.isInteger(H)?H:0,y+=1}function _(){p&&(clearTimeout(p),p=void 0)}function A(){_();const H=t.renderContent.value;l.value!==H&&(l.value=H),k=er()}Ke([t.renderContent,t.effectiveFinal,i],([H,D,M])=>{l.value!==H&&(!M||D||(function(R,O){if(!R&&O||O.length<=80||O.length\s*|`{3,}|~{3,})/.test(U))||U.endsWith(` -`)&&!(function(Z){const q=oS(Z);if(sS(q))return!1;const te=m$(q);return te.length>=2&&te.some(ee=>ee.trim())})(O))})(l.value,H)?A():(function(){if(m+=1,p)return;const R=Math.max(0,(function(O){const U=O.parseCoalesceMs;return typeof U=="number"&&Number.isFinite(U)&&U>=0?U:80})(e)-(er()-k));R<=0?A():p=setTimeout(A,R)})())},{flush:"sync",immediate:!0}),pf(_);const P=B(()=>{var H,D,M,R;return wae(e.customHtmlTags,(H=e.parseOptions)==null?void 0:H.customHtmlTags,(R=(M=(D=t.customComponentsMap)==null?void 0:D.value)!=null?M:{},Object.entries(R).map(([O,U])=>{const Z=Vl(O);return U==null||!Z||Af(Z)||AI.has(Z)||_f.has(Z)?"":Z}).filter(Boolean)))}),z=B(()=>{const{key:H,tags:D}=kae(P.value);if(!H)return o;const M=s.get(H);if(M)return M;const R=sx(t.instanceMsgId,{customHtmlTags:D});return s.set(H,R),R}),L=B(()=>{const H=z.value;if(!e.customMarkdownIt)return H;const D=e.customMarkdownIt(H);return H.__markstreamHasCustomParserExtensions=!0,D.__markstreamHasCustomParserExtensions=!0,D}),E=B(()=>{var H,D;const M=(H=e.parseOptions)!=null?H:{},R=t.effectiveFinal.value,O=P.value,U=R!=null,Z=O.length>0;return U||Z||M.streamParse==null?St(St(wn(St({},M),{streamParse:(D=M.streamParse)==null||D}),U?{final:R}:{}),Z?{customHtmlTags:O}:{}):M}),T=B(()=>{var H;return new Set(((H=E.value.customHtmlTags)!=null?H:[]).map(D=>String(D).trim().toLowerCase()).filter(Boolean))}),$=B(()=>nS(E.value,L.value,e.customMarkdownIt,{includeFinal:!0})),C=B(()=>nS(E.value,L.value,e.customMarkdownIt,{includeFinal:!1}));Ke([$,C],([H,D],[M,R])=>{M&&(H===M&&D===R||(A(),D!==R&&(r=[],u="")))},{flush:"sync"});const j=B(()=>{var H,D,M,R,O,U,Z,q,te,ee,J;if((H=e.nodes)!=null&&H.length)return r=[],u="",w(0),It(e.nodes.slice());const se=l.value;if(!se)return r=[],u="",w(-1),[];const Q=t.debugPerformanceEnabled.value,me=Q?er():0,xe=L.value,Ye=$.value,at=C.value;a&&Ye!==a&&(function(Oe){var Fe,pt;(pt=(Fe=Oe.stream)==null?void 0:Fe.reset)==null||pt.call(Fe)})(xe),c&&at!==c&&(r=[],u="");const X=Object.keys((M=(D=t.customComponentsMap)==null?void 0:D.value)!=null?M:{}).length>0||typeof E.value.postTransformNodes=="function";X!==d&&(r=[],u="");const oe=!X&&r.length>0&&se.startsWith(u)&&at===c,F=Q?tS(xe):null,K=Q?{}:void 0,he=rS(xe),ye=!he&&!X,ve=St(St(wn(St({},E.value),{__reuseStableTopLevelNodes:ye}),he?{__disableStreamParse:!0}:{}),K?{__timing:K}:{}),ie=TL(se,xe,ve),de=Q?er():0,be=Q?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let Se,je=Q?O3(ie.length):void 0,et=0,le=0,fe=0;if(oe){const Oe=Q?er():0,[Fe,pt]=(function(qt){var nn,Jt;const[kn,Dn]=qt.scanGlobalReferenceAppend(qt.previousContent,qt.content),xn=qt.parseOptions;return[qt.previousDirtyStartIndex>0&&xn.final!==!0&&!qt.customMarkdownIt&&!rS(qt.md)&&!kn&&typeof xn.preTransformTokens!="function"&&typeof xn.postTransformTokens!="function"&&typeof xn.postTransformNodes!="function"&&((Jt=(nn=xn.customHtmlTags)==null?void 0:nn.length)!=null?Jt:0)===0?qt.previousDirtyStartIndex:0,Dn]})({content:se,previousContent:u,previousDirtyStartIndex:x,parseOptions:E.value,customMarkdownIt:e.customMarkdownIt,md:xe,scanGlobalReferenceAppend:f});fe=pt;const kt=Fe<=0;if(be){const qt=(function(nn,Jt,kn,Dn={}){var xn;if(!Jt.length)return{nodes:nn,metrics:O3(nn.length)};const $n=(xn=Dn.scanStartIndex)!=null?xn:0,Hn=Dn.reuseDirtyTail!==!1,bn=(function(Mn,Nn,An,Qn=0){const Fn=Math.min(Mn.length,Nn.length);for(let Qt=Math.min(Fn,Math.max(0,Qn));QtS1(Oe[kt]))})(Se,be,le):(function(Oe,Fe=0){for(let pt=Math.max(0,Fe);pt((O=F?.total)!=null?O:0);t.logPerf(Fe?"parse(stream)":"parse(sync)",St(St(St({rendererId:t.instanceMsgId,ms:Math.round(er()-me),nodes:Se.length,contentLength:se.length,parseCommitCount:h,parseCoalescedCount:m,nodeReuseMs:ge,referenceDefinitionScanChars:fe,signatureMs:(U=be?.signatureMs)!=null?U:0,stabilizeSignatureMs:(Z=be?.stabilizeSignatureMs)!=null?Z:0,primeSignatureMs:(q=be?.primeSignatureMs)!=null?q:0,signatureCallCount:(te=be?.signatureCallCount)!=null?te:0,stabilizeSignatureCallCount:(ee=be?.stabilizeSignatureCallCount)!=null?ee:0,primeSignatureCallCount:(J=be?.primeSignatureCallCount)!=null?J:0,stabilizeMs:et},je??{}),K?Object.fromEntries(Q3e.map(pt=>{var kt;return[pt,(kt=K[pt])!=null?kt:0]})):{}),Oe?{streamMode:Oe.lastMode,streamDelta:r4e(Oe,F),streamStats:Oe}:{}))}return It(Se)});return{effectiveCustomHtmlTags:P,effectiveCustomHtmlTagsSet:T,mdBase:z,mdInstance:L,mergedParseOptions:E,getParsedNodesDirtyStartIndex:()=>x,getParsedNodesRevision:()=>y,parsedNodes:j}}function c4e(e){const{isClient:t}=e,n=V(new Set),o=new Map,s=new Map,i=new Map;function l(c){if(!t)return;const u=i.get(c);u!=null&&(window.clearTimeout(u),i.delete(c))}function r(){if(t)for(const c of i.values())window.clearTimeout(c);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:l,clearAllVisibilityFallbacks:r,markNodeVisible:function(c,u=!0){var d;u&&l(c),(function(f,p){if((m=(h=e.shouldTrackVisibleNodeIndices)==null?void 0:h.call(e))!=null&&!m)return;var h,m;const k=n.value,x=k.has(f);if(p){if(x)return;const w=new Set(k);return w.add(f),void(n.value=w)}if(!x)return;const y=new Set(k);y.delete(f),n.value=y})(c,u),u&&((d=e.onNodeMarkedVisible)==null||d.call(e,c))},resetNodeVisibleState:a,cleanupNodeVisibility:function(c){var u;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f{const u=s.getSnapshot();t.value=u.source,n.value=u.visible,o.value=u.done},l=s.subscribe(i);i();const r=B(()=>Math.max(0,t.value.length-n.value.length)),a=B(()=>r.value===0),c=B(()=>o.value&&a.value);return cg()&&pf(()=>{l(),s.destroy()}),{source:t,visible:n,done:o,final:c,caughtUp:a,pendingChars:r,enqueue:u=>s.enqueue(u),finish:u=>s.finish(u),flush:()=>s.flush(),reset:u=>s.reset(u),pause:()=>s.pause(),resume:()=>s.resume()}}const d4e={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},aS=/auto|scroll|overlay/i;function f4e(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return aS.test(t)||aS.test(n)}function p4e(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const h4e={class:"m-0 p-0"},m4e=["data-probe"],g4e=ho(Je(wn(St({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(g(),S("div",{class:"height-estimation-probes",style:Gt({width:`${e.width}px`}),"aria-hidden":"true"},[b("div",{ref:i=>e.setParagraphWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[W(v(B0),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),b("div",{ref:i=>e.setListItemWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[b("ul",h4e,[W(v(pu),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),b("div",{ref:i=>e.setListWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[W(v(hu),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(g(),S(Ce,null,rt(6,i=>b("div",{key:`probe-heading-${i}`,ref_for:!0,ref:l=>e.setHeadingWrapper(i,l),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[W(v(Zp),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,m4e)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),cS=Je({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=B(()=>{var n,o;return $5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:I5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),vn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),vn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,vn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"absolute inset-0"},[vn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),uS=Je({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=B(()=>{var n,o;return L5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:E5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),vn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[vn("span",{class:"action-icon block"})])))]):null,vn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),v4e={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function Vs(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const y4e=["data-custom-id"],w4e=["data-node-index","data-node-type"],dS="typewriter-simple-cursor-target",k$=ho(Je(wn(St({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(N){if(!(typeof Event<"u"&&N instanceof Event))return typeof N=="string"&&s("copy-code",N),void s("copy",N)}const l=Ts(),r=fn("markstreamNestedRendererProps",void 0);function a(N){const G=l?.vnode.props;return!!G&&(Object.prototype.hasOwnProperty.call(G,N)||Object.prototype.hasOwnProperty.call(G,String(N).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function c(N){var G,re;const ce=o[N];return a(N)?ce:(re=(G=r?.value)==null?void 0:G[N])!=null?re:ce}const u=B(()=>{return(N=c("mode"))==="chat"||N==="minimal"||N==="docs"?N:"docs";var N}),d=B(()=>Xx(c("typewriter"))),f=B(()=>d.value!=="off"),p=B(()=>c("domMode")==="minimal"?"minimal":"full"),h=B(()=>{return(N={mode:u.value,codeRenderer:c("codeRenderer"),renderCodeBlocksAsPre:c("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":N.codeRenderer==="pre"||N.codeRenderer==="shiki"||N.codeRenderer==="monaco"?N.codeRenderer:N.renderCodeBlocksAsPre===!1||N.mode==="docs"?"monaco":"pre";var N}),m=B(()=>v4e[u.value]),k=B(()=>{var N;return(N=c("showTooltips"))!=null?N:m.value.showTooltips}),x=B(()=>{var N;return(N=c("fade"))!=null?N:m.value.fade}),y=B(()=>{var N;return(N=c("batchRendering"))!=null?N:m.value.batchRendering}),w=B(()=>{var N;return(N=c("initialRenderBatchSize"))!=null?N:m.value.initialRenderBatchSize}),_=B(()=>{var N;return(N=c("renderBatchSize"))!=null?N:m.value.renderBatchSize}),A=B(()=>{var N;return(N=c("renderBatchDelay"))!=null?N:m.value.renderBatchDelay}),P=B(()=>{var N;return(N=c("renderBatchBudgetMs"))!=null?N:m.value.renderBatchBudgetMs}),z=B(()=>{var N;return(N=c("renderBatchIdleTimeoutMs"))!=null?N:m.value.renderBatchIdleTimeoutMs}),L=B(()=>{var N;return(N=c("deferNodesUntilVisible"))!=null?N:m.value.deferNodesUntilVisible}),E=B(()=>{var N;return(N=c("maxLiveNodes"))!=null?N:m.value.maxLiveNodes}),T=B(()=>{var N;return(N=c("liveNodeBuffer"))!=null?N:m.value.liveNodeBuffer}),$=B(()=>{var N;return(N=c("nodeVirtual"))!=null?N:m.value.nodeVirtual}),C={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return c("parseOptions")},get customMarkdownIt(){return c("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return c("customHtmlTags")},get mode(){return c("mode")},get domMode(){return p.value},get htmlPolicy(){return c("htmlPolicy")},get viewportPriority(){return c("viewportPriority")},get viewportPriorityOptions(){return c("viewportPriorityOptions")},get codeBlockStream(){return c("codeBlockStream")},get codeBlockDarkTheme(){return c("codeBlockDarkTheme")},get codeBlockLightTheme(){return c("codeBlockLightTheme")},get codeBlockMonacoOptions(){return c("codeBlockMonacoOptions")},get codeRenderer(){return c("codeRenderer")},get renderCodeBlocksAsPre(){return c("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return c("codeBlockMinWidth")},get codeBlockMaxWidth(){return c("codeBlockMaxWidth")},get codeBlockProps(){return c("codeBlockProps")},get mermaidProps(){return c("mermaidProps")},get d2Props(){return c("d2Props")},get infographicProps(){return c("infographicProps")},get showTooltips(){return k.value},get themes(){return c("themes")},get langs(){return c("langs")},get isDark(){return c("isDark")},get customId(){return c("customId")},get indexKey(){return o.indexKey},get typewriter(){return c("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return c("smoothStreamingOptions")},get parseCoalesceMs(){return c("parseCoalesceMs")},get fade(){return x.value},get batchRendering(){return y.value},get initialRenderBatchSize(){return w.value},get renderBatchSize(){return _.value},get renderBatchDelay(){return A.value},get renderBatchBudgetMs(){return P.value},get renderBatchIdleTimeoutMs(){return z.value},get deferNodesUntilVisible(){return L.value},get maxLiveNodes(){return E.value},get liveNodeBuffer(){return T.value},get nodeVirtual(){return $.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function j(N){s("height-change",N)}function H(N){s("virtual-state-change",N)}function D(N){s("anchor-change",N)}const M=V(),R=V(null),O=V(null),U=V(null),Z=ds({1:null,2:null,3:null,4:null,5:null,6:null}),q=V(!1),te=new Map,ee=V(0),J=V(0),se=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Q(N,G){return typeof N!="string"?G:N.trim()||G}function me(N){const G=Number(N);return Number.isFinite(G)&&G>0?Math.max(1,Math.trunc(G)):640}const xe=B(()=>{var N;const G=(N=C.viewportPriorityOptions)!=null?N:{},re=Q(G.rootMargin,F0);return{rootMargin:re,heavyBlockMargin:Q(G.heavyBlockMargin,re),maxTargets:me(G.maxTargets)}}),Ye=B(()=>{var N;return(N=xe.value.rootMargin)!=null?N:F0}),at=B(()=>{var N;return(N=xe.value.maxTargets)!=null?N:640});function X(){var N,G;if(((N=o.virtualScroll)==null?void 0:N.enabled)!==!0)return null;const re=(G=o.virtualScroll)==null?void 0:G.scrollRoot;return oe(typeof re=="function"?re():re)}function oe(N){return N?typeof HTMLElement<"u"&&N instanceof HTMLElement?N:typeof N=="object"&&"value"in N?oe(N.value):typeof N=="object"&&"$el"in N?oe(N.$el):null:null}qn(o$,xe);const{isClient:F,renderAsFragment:K,debugPerformanceEnabled:he,resolvedShowTooltips:ye,resolvedHtmlPolicy:ve,inheritedSmoothStreaming:ie,ownsTypewriterCursor:de}=(function(N){const G=typeof window<"u",re=vf(),ce=fn("markstreamHtmlPolicy",void 0),we=fn("markstreamTypewriterCursor",void 0),ze=fn("markstreamSmoothStreaming",void 0),De=B(()=>N.renderAsFragment===!0),Ue=B(()=>!!(N.debugPerformance&&G&&typeof console<"u")),ut=B(()=>{var ct;if(typeof N.showTooltips=="boolean")return N.showTooltips;const Ve=(ct=re.showTooltips)!=null?ct:re["show-tooltips"];return Ve===""||Ve===!0||Ve==="true"||Ve!==!1&&Ve!=="false"&&void 0}),Ze=B(()=>{var ct,Ve;return(Ve=(ct=N.htmlPolicy)!=null?ct:ce?.value)!=null?Ve:"safe"}),tt=B(()=>we?.value!==!0);return{isClient:G,renderAsFragment:De,debugPerformanceEnabled:Ue,resolvedShowTooltips:ut,resolvedHtmlPolicy:Ze,inheritedSmoothStreaming:ze,inheritedTypewriterCursor:we,ownsTypewriterCursor:tt}})(C),{resolveViewportRoot:be,resolveScrollContainer:Se,isReverseFlexScrollRoot:je,getNormalizedScrollTop:et,getOffsetTopWithinRoot:le}=(function(N,G){function re(){var Ue,ut;return(ut=(Ue=G.scrollRoot)==null?void 0:Ue.call(G))!=null?ut:null}function ce(Ue){if(typeof window>"u")return null;const ut=re();if(ut)return ut;const Ze=Ue??N.value;if(!Ze)return null;const tt=Ze.ownerDocument||document,ct=tt.scrollingElement||tt.documentElement;let Ve=Ze;for(;Ve&&Ve!==tt.body&&Ve!==ct;){if(f4e(window.getComputedStyle(Ve))&&p4e(Ve))return Ve;Ve=Ve.parentElement}return null}function we(Ue){if(!G.isClient)return!1;try{const ut=window.getComputedStyle(Ue);return!!(ut.display||"").toLowerCase().includes("flex")&&(ut.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function ze(Ue,ut,Ze){var tt,ct;if(Ze)return De(ut);const Ve=Ue.scrollTop;if(!we(Ue))return Ve;const nt=Ve<0?-Ve:Ve;return Math.max(0,((tt=Ue.scrollHeight)!=null?tt:0)-((ct=Ue.clientHeight)!=null?ct:0))-nt}function De(Ue){var ut,Ze,tt,ct,Ve;const nt=Number((ut=Ue.scrollingElement)==null?void 0:ut.scrollTop),gt=Number((tt=(Ze=Ue.documentElement)==null?void 0:Ze.scrollTop)!=null?tt:0),mt=Number((Ve=(ct=Ue.body)==null?void 0:ct.scrollTop)!=null?Ve:0);return Math.max(0,Number.isFinite(nt)?nt:0,Number.isFinite(gt)?gt:0,Number.isFinite(mt)?mt:0)}return{resolveViewportRoot:ce,resolveScrollContainer:function(Ue){var ut,Ze,tt,ct;const Ve=re();if(Ve)return Ve;const nt=ce((ut=Ue??N.value)!=null?ut:null);if(nt)return nt;const gt=(ct=(tt=Ue?.ownerDocument)!=null?tt:(Ze=N.value)==null?void 0:Ze.ownerDocument)!=null?ct:typeof document<"u"?document:null;return gt?.scrollingElement||gt?.documentElement||null},isReverseFlexScrollRoot:we,getNormalizedScrollTop:ze,getOffsetTopWithinRoot:function(Ue,ut){const Ze=ut.ownerDocument||Ue.ownerDocument||document;if((function(nt,gt){return nt===gt.documentElement||nt===gt.body||nt===gt.scrollingElement})(ut,Ze))return Ue.getBoundingClientRect().top+De(Ze);const tt=ut.getBoundingClientRect(),ct=Ue.getBoundingClientRect(),Ve=ze(ut,Ze,!1);return ct.top-tt.top+Ve}}})(M,{isClient:F,scrollRoot:X});qn("markstreamShowTooltips",ye),qn("markstreamHtmlPolicy",ve),qn("markstreamTypewriter",f),qn("markstreamFade",B(()=>C.fade!==!1)),qn("markstreamTypewriterCursor",B(()=>!0)),qn("markstreamTextStreamState",te),qn("markstreamStreamVersion",ee),qn("markstreamParseOptions",B(()=>C.parseOptions)),qn("markstreamCustomMarkdownIt",B(()=>C.customMarkdownIt));const{smoothStreamingEnabled:fe,renderContent:ge,requestedFinal:Oe,effectiveFinal:Fe}=(function(N,G){const re=u4e(St(St({},d4e),N.smoothStreamingOptions)),ce=B(()=>{var Ve,nt,gt;return N.smoothStreaming!==!1&&!((Ve=N.nodes)!=null&&Ve.length)&&(N.smoothStreaming===!0||!((nt=G.inheritedSmoothStreaming)!=null&&nt.value))&&(N.smoothStreaming===!0||Xx(N.typewriter)!=="off"||((gt=N.maxLiveNodes)!=null?gt:0)<=0)}),we=V(!G.isClient||N.smoothStreaming===!0);In(()=>{we.value=!0});const ze=B(()=>we.value&&ce.value),De=B(()=>{var Ve;return ze.value?re.visible.value:(Ve=N.content)!=null?Ve:""}),Ue=B(()=>{var Ve,nt;const gt=(Ve=N.parseOptions)!=null?Ve:{};return(nt=N.final)!=null?nt:gt.final}),ut=B(()=>{const Ve=Ue.value;return ze.value&&Ve!=null?!!Ve&&re.caughtUp.value:Ve});let Ze=0,tt=!1;function ct(){Ze=0,tt=!1}return Ke([()=>N.content,()=>N.nodes,ze,Ue],([Ve,nt,gt,mt])=>{if(nt?.length)return ct(),void re.reset("");const Et=Ve??"";if(!gt)return ct(),re.reset(Et),void(mt&&re.finish({flush:!0}));const _t=re.source.value;if(Et){if(Et!==_t)if(Et.startsWith(_t)){const Ot=Et.slice(_t.length),Kt=re.pendingChars.value;Ot.length<=8?(Ze++,tt||Ze>=2&&Kt<=8?(tt=!0,re.reset(Et)):re.enqueue(Ot)):(ct(),re.enqueue(Ot))}else ct(),re.reset(Et)}else ct(),re.reset("");mt&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ce,smoothStreamingEnabled:ze,renderContent:De,requestedFinal:Ue,effectiveFinal:ut}})(C,{isClient:F,inheritedSmoothStreaming:ie}),pt=Oe.value===!0;qn("markstreamSmoothStreaming",fe);const kt=V(!1),qt=V(!1),nn=V(!1);let Jt="",kn=!1,Dn=null;function xn(){F&&Dn!=null&&(window.clearTimeout(Dn),Dn=null)}function $n(){kt.value=!1,xn()}function Hn(N,G){if(!he.value)return;const re=(function(){if(!he.value)return null;const ce=Nn(bn),we=Nn(Wn),ze=Math.max(Mn,we);if(ce<=0&&ze<=0)return null;const De={total:ce,maxPerFrame:ze,byLabel:(Ue=bn,Object.fromEntries(Array.from(Ue.entries()).sort((ut,Ze)=>Ze[1]-ut[1]||ut[0].localeCompare(Ze[0]))))};var Ue;return bn.clear(),Wn.clear(),Mn=0,De})();console.info(`[markstream-vue][perf] ${N}`,re?wn(St({},G),{layoutReads:re}):G)}Ke([()=>C.indexKey,()=>C.customId],()=>{var N,G;$n(),qt.value=!1,nn.value=!((N=o.nodes)!=null&&N.length)&&Oe.value!==!0&&!!o.content,Jt=(G=ge.value)!=null?G:"",kn=Jt.length>0},{flush:"sync"}),Ke([()=>o.content,()=>o.nodes,Oe],([N,G,re])=>{!G?.length&&re!==!0&&N&&(nn.value=!0)},{flush:"sync",immediate:!0}),Ke([ge,()=>o.nodes,Oe],([N,G,re])=>{const ce=N??"";return G?.length||re===!0?($n(),qt.value=!1,Jt=ce,void(kn=!0)):(ce.length>0&&(nn.value=!0),kn?(Jt&&ce.length>Jt.length&&ce.startsWith(Jt)?(kt.value=!0,qt.value=!0,F&&(xn(),Dn=window.setTimeout(()=>{var we;Dn=null,Fe.value===!0||(we=o.nodes)!=null&&we.length||(pc(),kt.value=!1,Wr())},1200))):(ce.length"u")return null;const ze=window;if(ze.__markstreamLayoutReadPerformance)return ze.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return ze.__markstreamLayoutReadPerformance=De,De})();we&&(we.total=Number(we.total||0)+1,we.byLabel[ce]=Number(we.byLabel[ce]||0)+1,we.currentFrameTotal=Number(we.currentFrameTotal||0)+1,we.frameScheduled||(we.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Qn(we),0):queueMicrotask(()=>Qn(we)):window.requestAnimationFrame(()=>Qn(we))))})(N),Pn||(Pn=!0,F&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(An):typeof queueMicrotask!="function"?setTimeout(An,0):queueMicrotask(An)))}function Qt(N,G){return Fn(N),G()}const uo=C.customId?`renderer-${C.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Zn=(function(N){const G=new Map;return{scope:N,cache:G,clear:()=>G.clear()}})(uo),Bo=uo;qn(d$,Zn);const Un=Is(()=>C.customId),{effectiveCustomHtmlTagsSet:hs,mergedParseOptions:Io,parsedNodes:Rt,getParsedNodesDirtyStartIndex:Jo,getParsedNodesRevision:Ls}=a4e(C,{instanceMsgId:uo,renderContent:ge,effectiveFinal:Fe,smoothStreamingEnabled:fe,debugPerformanceEnabled:he,customComponentsMap:Un,logPerf:Hn});Ke(Rt,()=>{kt.value||Zn.clear(),ee.value+=1},{immediate:!0});const $e=B(()=>({customId:C.customId,customHtmlTags:Io.value.customHtmlTags,parseOptions:C.parseOptions,customMarkdownIt:C.customMarkdownIt,htmlPolicy:ve.value,viewportPriority:C.viewportPriority,viewportPriorityOptions:xe.value,mode:u.value,domMode:C.domMode,codeRenderer:h.value,codeBlockStream:C.codeBlockStream,codeBlockDarkTheme:C.codeBlockDarkTheme,codeBlockLightTheme:C.codeBlockLightTheme,codeBlockMonacoOptions:C.codeBlockMonacoOptions,renderCodeBlocksAsPre:C.renderCodeBlocksAsPre,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockProps:C.codeBlockProps,mermaidProps:C.mermaidProps,d2Props:C.d2Props,infographicProps:C.infographicProps,showTooltips:ye.value,themes:C.themes,langs:C.langs,isDark:C.isDark,typewriter:f.value,smoothStreamingOptions:C.smoothStreamingOptions,parseCoalesceMs:C.parseCoalesceMs,fade:C.fade}));qn("markstreamNestedRendererProps",$e);const Ge=B(()=>Rt.value),ot=B(()=>Rt.value.length),dt=V(null),Mt=V(null),Ft=V(null),Ut=V(null),en=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),tn=!en&&C.customId?Ux(C.customId):null,eo=B(()=>tn?(pm.value,Ux(C.customId)):null),Ro=B(()=>{var N;return!!(!K.value&&C.customId&&!en&&((N=eo.value)!=null&&N.enabled))}),$s=B(()=>!!(F&&Ro.value)),Do=B(()=>{var N;return!!(!K.value&&((N=o.virtualScroll)!=null&&N.enabled))}),We=B(()=>Do.value),st=V(!1);In(()=>{st.value=!0});const Xe=B(()=>!!(F&&Do.value));qn("markstreamHostScrollManaged",Xe);const qe=B(()=>!!(st.value&&Xe.value)),Pe=B(()=>$s.value||Xe.value),bt=B(()=>$s.value||qe.value),Lt=B(()=>{var N;return Pe.value&&((N=eo.value)==null?void 0:N.textEstimation)!==!1});function cn(){const N=J.value||Qt("getMeasuredContainerWidth.clientWidth",()=>{var G;return((G=M.value)==null?void 0:G.clientWidth)||0});return Number.isFinite(N)&&N>0?N:0}const So=B(()=>{const N=cn();return N>0?Math.max(1,Math.round(N)):640}),Qo=B(()=>{var N,G;return!(Fe.value!==!0||Do.value||u.value!=="chat"&&u.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(N=o.nodes)!=null&&N.length||nn.value||!(((G=C.maxLiveNodes)!=null?G:0)<=0))}),Po=B(()=>{var N;return Qo.value?50:Math.max(1,(N=C.maxLiveNodes)!=null?N:320)}),Xn=B(()=>{var N;return Qo.value?16:Math.max(0,(N=C.liveNodeBuffer)!=null?N:60)}),pn=B(()=>{var N;return!K.value&&C.nodeVirtual!==!1&&!(((N=C.maxLiveNodes)!=null?N:0)<=0&&!Qo.value)&&(C.nodeVirtual===!0?Rt.value.length>0:Rt.value.length>Po.value)}),Us=B(()=>pn.value||$s.value||Xe.value),mi=B(()=>C.viewportPriority!==!1),oi=B(()=>!!mi.value&&!q.value);var ql;ql=B(()=>mi.value),qn(s$,ql);const vl=B(()=>{var N;return!(K.value||C.deferNodesUntilVisible===!1||((N=C.maxLiveNodes)!=null?N:0)<=0||pn.value||Rt.value.length>900||C.viewportPriority===!1)}),Zs=D2e(N=>{var G;return be((G=N??M.value)!=null?G:null)},mi),{requestFrame:yo,cancelFrame:Lo,hasIdleCallback:yl,isTestEnv:ms}=(function(N){const G=N.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,re=N.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ce=N.isClient&&typeof window.requestIdleCallback=="function",we=(function(){var ze;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=(ze=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:ze.value;return De?.env})();return{requestFrame:G,cancelFrame:re,hasIdleCallback:ce,isTestEnv:we?.NODE_ENV==="test"}})({isClient:F}),wl=B(()=>Fe.value===!0&&!Do.value),{resolvedBatchSize:gi,resolvedInitialBatch:si,batchingEnabled:Ul,incrementalRenderingActive:Ni,renderedCount:Ae,previousRenderContext:Ie,adaptiveBatchSize:At,previousBatchConfig:lt}=(function(N,G){var re;const ce=B(()=>{var ct;const Ve=Math.trunc((ct=N.renderBatchSize)!=null?ct:80);return Number.isFinite(Ve)?Math.max(0,Ve):0}),we=B(()=>{var ct;const Ve=Math.trunc((ct=N.initialRenderBatchSize)!=null?ct:ce.value);return Number.isFinite(Ve)?Math.max(0,Ve):ce.value}),ze=B(()=>!G.renderAsFragment.value&&N.batchRendering!==!1&&ce.value>0&&G.isClient&&!G.isTestEnv),De=V(0),Ue=V({key:N.indexKey,total:0}),ut=V(Math.max(1,ce.value||1)),Ze=B(()=>{var ct,Ve,nt;return ze.value&&!((ct=G.continuousStreaming)!=null&&ct.value)&&!((Ve=G.forceFullRenderFinalContent)!=null&&Ve.value)&&((nt=N.maxLiveNodes)!=null?nt:0)<=0}),tt=V({batchSize:ce.value,initial:we.value,delay:(re=N.renderBatchDelay)!=null?re:16,enabled:Ze.value});return{resolvedBatchSize:ce,resolvedInitialBatch:we,batchingEnabled:ze,incrementalRenderingActive:Ze,renderedCount:De,previousRenderContext:Ue,adaptiveBatchSize:ut,previousBatchConfig:tt}})(C,{isClient:F,isTestEnv:ms,renderAsFragment:K,forceFullRenderFinalContent:wl,continuousStreaming:B(()=>qt.value&&Fe.value!==!0)}),mn=B(()=>{var N;return!K.value&&C.batchRendering!==!1&&gi.value>0&&!ms&&((N=C.maxLiveNodes)!=null?N:0)<=0&&!wl.value}),Kn=B(()=>mn.value),to=B(()=>Pe.value||Kn.value),Co=B(()=>{var N;return to.value&&((N=eo.value)==null?void 0:N.codeBlockEstimation)!==!1}),no=new Map,Vo=new Map,Qi=new WeakMap;let Os=null;const Ta=new WeakMap,Wo=new Map,zi=[];let gs=[],kl=[],es=-1;const Hs=Uo(zi),vs=new Set,bl=V(0);let Ks=0;const ne=V(0),ke=B(()=>(ne.value,Array.from(no.entries()).sort((N,G)=>N[0]-G[0]))),Te=V(null),Ne=V(null);let Qe,ht=null,jt=0,Zt=null;function Vt(){Qe.markFallbackHeightPrefixDirty()}function Wt(N){return Qe.getFallbackNodeHeight(N)}function on(N,G){return Qe.estimateHeightRange(N,G)}function Vn(N){return Qe.estimateIndexForOffset(N)}const{activeRestoreAnchor:Ht,getRelativeScrollTopWithinContainer:Tn,setRelativeScrollTopWithinContainer:zn,resolveAnchorOffset:Ns,clearRestoreReconcile:rs,scheduleRestoreReconcile:_l,captureRestoreAnchor:X0,restoreAnchor:J0,getAnchorDrift:qu}=(function(N){const{isClient:G,containerRef:re,parsedNodeCount:ce,requestFrame:we,cancelFrame:ze,resolveScrollContainer:De,getNormalizedScrollTop:Ue,getOffsetTopWithinRoot:ut,isReverseFlexScrollRoot:Ze,estimateIndexForOffset:tt,estimateHeightRange:ct,getFallbackNodeHeight:Ve,clamp:nt}=N,gt=V(null);let mt=null,Et=[];function _t(){const un=De(),Ln=re.value;if(!un||!Ln)return null;const On=un.ownerDocument||Ln.ownerDocument||document;if(un===On.documentElement||un===On.body||un===On.scrollingElement){const wo=Ln.getBoundingClientRect();return Math.max(0,-wo.top)}return Math.max(0,Ue(un,On,!1)-ut(Ln,un))}function Ot(un){var Ln;const On=De(),wo=re.value;if(!On||!wo)return;const Ys=Math.max(0,un),Ds=On.ownerDocument||wo.ownerDocument||document,Xl=Ds.defaultView||(typeof window<"u"?window:null);if(On===Ds.documentElement||On===Ds.body||On===Ds.scrollingElement){const gr=Ue(On,Ds,!0)+wo.getBoundingClientRect().top;return void((Ln=Xl?.scrollTo)==null||Ln.call(Xl,0,Math.max(0,gr+Ys)))}Gx(On,Ds,ut(wo,On)+Ys,{isReverseFlexScrollRoot:gr=>{var md;return(md=Ze?.(gr))!=null&&md},getNormalizedScrollTop:Ue})}function Kt(un){const Ln=ce.value,On=nt(un.nodeIndex,0,Math.max(0,Ln-1));return ct(0,On)+Math.max(0,un.offsetWithinNodePx)}function an(){if(mt!=null&&(ze?.(mt),mt=null),G)for(const un of Et)window.clearTimeout(un);Et=[]}function sn(un){const Ln=Kt(un),On=_t();On!=null&&Math.abs(On-Ln)<=.5||Ot(Ln)}return{activeRestoreAnchor:gt,getRelativeScrollTopWithinContainer:_t,setRelativeScrollTopWithinContainer:Ot,resolveAnchorOffset:Kt,clearRestoreReconcile:an,applyRestoreAnchor:sn,scheduleRestoreReconcile:function(){gt.value&&G&&mt==null&&(mt=we?we(()=>{mt=null,gt.value&&sn(gt.value)}):null,mt==null&>.value&&sn(gt.value))},captureRestoreAnchor:function(){const un=_t(),Ln=ce.value;if(un==null||Ln<=0)return null;const On=nt(tt(un+1),0,Ln-1),wo=ct(0,On),Ys=Ve(On);return{nodeIndex:On,offsetWithinNodePx:nt(un-wo,0,Math.max(0,Ys-1))}},restoreAnchor:function(un){const Ln=ce.value;if(gt.value={nodeIndex:nt(un.nodeIndex,0,Math.max(0,Ln-1)),offsetWithinNodePx:Math.max(0,un.offsetWithinNodePx)},an(),sn(gt.value),G)for(const On of[0,120,280,480])Et.push(window.setTimeout(()=>{gt.value&&sn(gt.value)},On))},getAnchorDrift:function(un){const Ln=_t();return Ln==null?null:Ln-Kt(un)}}})({isClient:F,containerRef:M,parsedNodeCount:ot,requestFrame:yo,cancelFrame:Lo,resolveScrollContainer:()=>Te.value||Se(),getNormalizedScrollTop:et,getOffsetTopWithinRoot:le,isReverseFlexScrollRoot:je,estimateIndexForOffset:Vn,estimateHeightRange:on,getFallbackNodeHeight:Wt,clamp:Gs}),{nodeHeights:hr,heightStats:ts,heightTreeSize:Fr,heightSumTree:Uu,heightKnownTree:Q0,averageNodeHeight:jr,resetHeightMeasurements:P1,pruneHeightMeasurements:F1,rebuildHeightTrees:Re,recordNodeHeight:pe,removeNodeHeights:Le,exportHeightCache:Sn,importHeightCache:ii,fenwickRangeSum:el}=(function(N={}){const G=ds({}),re=ds({total:0,count:0}),ce=V(0),we=V([]),ze=V([]);function De(){for(const Ve of Object.keys(G))delete G[Number(Ve)];re.total=0,re.count=0,ce.value=0,we.value=[],ze.value=[]}function Ue(Ve,nt,gt){for(let mt=nt+1;mt0;mt-=mt&-mt)gt+=Ve[mt];return gt}function Ze(Ve){ce.value=Ve;const nt=new Array(Ve+1).fill(0),gt=new Array(Ve+1).fill(0);for(const[mt,Et]of Object.entries(G)){const _t=Number(mt),Ot=Number(Et);!Number.isFinite(_t)||_t<0||_t>=Ve||!Number.isFinite(Ot)||Ot<=0||(Ue(nt,_t,Ot),Ue(gt,_t,1))}we.value=nt,ze.value=gt}function tt(Ve){if(!Number.isInteger(Ve)||Ve<0)return!1;const nt=G[Ve];if(!Number.isFinite(nt)||nt<=0)return!1;if(delete G[Ve],re.total=Math.max(0,re.total-nt),re.count=Math.max(0,re.count-1),ce.value>Ve){const gt=we.value,mt=ze.value;gt.length&&mt.length&&(Ue(gt,Ve,-nt),Ue(mt,Ve,-1))}return!0}const ct=B(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:G,heightStats:re,heightTreeSize:ce,heightSumTree:we,heightKnownTree:ze,averageNodeHeight:ct,resetHeightMeasurements:De,pruneHeightMeasurements:function(Ve){if(Ve<=0)return void De();let nt=0,gt=0;for(const[mt,Et]of Object.entries(G)){const _t=Number(mt),Ot=Number(Et);!Number.isFinite(_t)||_t<0||_t>=Ve||!Number.isFinite(Ot)||Ot<=0?delete G[_t]:(nt+=Ot,gt++)}re.total=nt,re.count=gt},rebuildHeightTrees:Ze,recordNodeHeight:function(Ve,nt,gt={}){(function(mt,Et,_t={}){var Ot;if(!Number.isFinite(Et)||Et<=0)return!1;const Kt=G[mt];if(Kt&&(_t.allowShrink===!1&&Etmt){const an=we.value,sn=ze.value;if(an.length&&sn.length)if(Kt){const un=Et-Kt;un!==0&&Ue(an,mt,un)}else Ue(an,mt,Et),Ue(sn,mt,1)}_t.notify!==!1&&((Ot=N.onHeightRecorded)==null||Ot.call(N))})(Ve,nt,wn(St({},gt),{notify:!0}))},removeNodeHeight:function(Ve,nt={}){var gt;const mt=tt(Ve);return mt&&nt.notify!==!1&&((gt=N.onHeightRecorded)==null||gt.call(N)),mt},removeNodeHeights:function(Ve,nt={}){var gt;let mt=0;for(const Et of Ve)tt(Number(Et))&&mt++;return mt>0&&nt.notify!==!1&&((gt=N.onHeightRecorded)==null||gt.call(N)),mt},exportHeightCache:function(){return Object.entries(G).map(([Ve,nt])=>({index:Number(Ve),height:Number(nt)})).filter(Ve=>Number.isFinite(Ve.index)&&Ve.index>=0&&Number.isFinite(Ve.height)&&Ve.height>0).sort((Ve,nt)=>Ve.index-nt.index)},importHeightCache:function(Ve,nt={}){var gt;if(!Array.isArray(Ve))return;const mt=ce.value;let Et=!1;if(nt.mode!=="merge"){const _t=Object.keys(G);if(_t.length>0){for(const Ot of _t)delete G[Number(Ot)];Et=!0}}for(const _t of Ve){const Ot=Number(_t.index),Kt=Number(_t.height);if(!Number.isInteger(Ot)||Ot<0||mt>0&&Ot>=mt||!Number.isFinite(Kt)||Kt<=0)continue;const an=G[Ot];an&&Math.abs(an-Kt)<=1||(G[Ot]=Kt,Et=!0)}Et&&((function(){let _t=0,Ot=0;const Kt=ce.value;for(const[an,sn]of Object.entries(G)){const un=Number(an),Ln=Number(sn);!Number.isFinite(un)||un<0||Kt>0&&un>=Kt||!Number.isFinite(Ln)||Ln<=0?delete G[un]:(_t+=Ln,Ot++)}re.total=_t,re.count=Ot})(),mt>0&&Ze(mt),(gt=N.onHeightRecorded)==null||gt.call(N))},fenwickRangeSum:function(Ve,nt,gt){if(gt<=nt)return 0;const mt=ut(Ve,gt-1);return nt<=0?mt:mt-ut(Ve,nt-1)}}})({onHeightRecorded:()=>{Vt(),Xe.value&&cd(),Ht.value&&_l(),Ne.value&&uc(),$o("node-resize")}});function Ea(N){Number.isInteger(N)&&N>=0&&vs.add(N)}function Or(N){for(const G of N)Ea(Number(G))}function Hr(N){Ks++;let G=!0;try{const re=N();return G=re!==!1,re}finally{Ks--,Ks===0&&G&&bl.value++}}function ec(){gs=[],kl=[],es=-1,vs.clear(),Hs.value=zi}function j1(){ec(),Hr(()=>P1()),Wo.clear()}function tc(N){!Number.isInteger(N)||N<0||N>=Rt.value.length||Wo.set(N,Ju(N))}function Zu(N,G,re={}){const ce=hr[N];Ea(N),pe(N,G,re);const we=hr[N];return Object.is(ce,we)?(vs.delete(N),!1):(we&&we>0?tc(N):ce&&Wo.delete(N),!0)}function O1(N,G){const re=Qt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ce,we;return(we=(ce=no.get(N))==null?void 0:ce.offsetHeight)!=null?we:0});return re>0?re:Qt("getNodeLayoutHeight.content.offsetHeight",()=>G.offsetHeight)}function Ku(N,G={}){G.mode!=="merge"?ec():Or(N.map(re=>re.index)),Hr(()=>ii(N,G)),O6()}const xl=B(()=>vl.value&&oi.value),zf=B(()=>{var N;return!K.value&&C.batchRendering!==!1&&gi.value>0&&((N=C.maxLiveNodes)!=null?N:0)<=0}),Sl=B(()=>!K.value&&pt&&Fe.value===!0&&!pn.value&&!Do.value&&!Ro.value&&!xl.value&&!zf.value),H1=B(()=>!!Zs&&xl.value),nc=B(()=>pn.value||Xe.value),{focusIndex:Zl,liveRange:ys,updateLiveRange:Dr}=(function(N,G){const{parsedNodeCount:re,virtualizationEnabled:ce,maxLiveNodesResolved:we,liveNodeBufferResolved:ze,clamp:De}=G,Ue=ze??B(()=>{var tt;return Math.max(0,(tt=N.liveNodeBuffer)!=null?tt:60)}),ut=V(0),Ze=ds({start:0,end:0});return{liveNodeBufferResolved:Ue,focusIndex:ut,liveRange:Ze,updateLiveRange:function(){const tt=re.value;if(!ce.value||tt===0)return Ze.start=0,void(Ze.end=tt);const ct=Math.min(we.value,tt),Ve=Ue.value,nt=De(ut.value-Ve,0,Math.max(0,tt-ct));Ze.start=nt,Ze.end=Math.min(tt,nt+ct)}}})(C,{parsedNodeCount:ot,virtualizationEnabled:pn,maxLiveNodesResolved:Po,liveNodeBufferResolved:Xn,clamp:Gs}),Cl=new Map,Bi=new Map,mr=new Map,D1=[],Kl=new Map,Gl=new Set,Me=V(0);let it=!1;const ft=B(()=>(Me.value,Gl.size)),yn=new Map,Yt=new Map,li=V(0),vi=B(()=>{li.value;let N=0;for(const G of yn.values())N+=Math.max(0,G);return N});let yi=null;const V1=B(()=>{if(!pn.value)return Rt.value.length;const N=Xn.value,G=Math.max(ys.end+N,si.value),re=Math.min(Rt.value.length,G);return Math.max(Ae.value,re)});function Ia(){it||(it=!0,queueMicrotask(()=>{it=!1,Me.value+=1}))}function Gu(N,G,re="node-resize"){if(!F||typeof window>"u")return null;const ce=window.setTimeout(()=>{Gl.delete(ce)&&Ia();try{G()}finally{$o(re)}},Math.max(0,N));return Gl.add(ce),Ia(),ce}function Bf(N){F&&N!=null&&(Gl.delete(N)&&Ia(),window.clearTimeout(N))}function X9(){if(F&&typeof window<"u")for(const N of Gl)window.clearTimeout(N);Gl.size&&(Gl.clear(),Ia()),D1.length=0,mr.clear()}function mB(N){R.value=N}function gB(N){O.value=N}function vB(N){U.value=N}const{cancelScheduledFocusSync:m6,scheduleFocusSync:Yl}=(function(N){const{isClient:G,containerRef:re,virtualizationEnabled:ce,requestFrame:we,cancelFrame:ze,syncFocusToScroll:De}=N;let Ue=null;function ut(){var tt,ct,Ve;return(Ve=(ct=(tt=re.value)==null?void 0:tt.ownerDocument)==null?void 0:ct.defaultView)!=null?Ve:typeof window<"u"?window:null}function Ze(){if(!Ue)return;const tt=ut();Ue.viaTimeout?tt?tt.clearTimeout(Ue.id):clearTimeout(Ue.id):ze?.(Ue.id),Ue=null}return{cancelScheduledFocusSync:Ze,scheduleFocusSync:function(tt={}){if(!ce.value)return;if(!G)return void De(!0);if(tt.immediate)return Ze(),void De(!0);if(Ue)return;const ct=()=>{Ue=null,De()};if(we)return void(Ue={id:we(ct),viaTimeout:!1});const Ve=ut();Ue={id:Ve?Ve.setTimeout(ct,16):setTimeout(ct,16),viaTimeout:!0}}}})({isClient:F,containerRef:M,virtualizationEnabled:pn,requestFrame:yo,cancelFrame:Lo,syncFocusToScroll:function(N=!1){var G;if(!pn.value)return;const re=Te.value||Se();if(!re)return;const ce=re.ownerDocument||((G=M.value)==null?void 0:G.ownerDocument)||document,we=ce?.defaultView||(typeof window<"u"?window:null),ze=re===ce?.documentElement||re===ce?.body,De=Rt.value.length;if(De<=0)return;if(!ze&&De>0&&je(re)){const mt=Qt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),Et=Qt("syncFocusToScroll.scrollTop",()=>re.scrollTop),_t=Et<0?-Et:Et;return void Ff(Gs((Ue=Math.max(0,_t)+.5*Math.max(0,mt),Qe.estimateIndexForOffsetFromEnd(Ue)),0,Math.max(0,De-1)),N)}var Ue;const ut=(function(mt,Et,_t,Ot){const Kt=M.value;if(!Kt)return null;const an=Ot?0:Qt("syncFocusToScroll.model.root.getBoundingClientRect",()=>mt.getBoundingClientRect().top),sn=Qt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Kt.getBoundingClientRect().top),un=Math.max(0,an-sn),Ln=Ot?Qt("syncFocusToScroll.model.viewport.clientHeight",()=>{var On,wo,Ys,Ds;return(Ds=(Ys=(wo=_t?.innerHeight)!=null?wo:(On=Et.documentElement)==null?void 0:On.clientHeight)!=null?Ys:mt.clientHeight)!=null?Ds:0}):Qt("syncFocusToScroll.model.root.clientHeight",()=>mt.clientHeight);return Gs(Vn(un+.5*Math.max(0,Ln)),0,Math.max(0,Rt.value.length-1))})(re,ce,we,ze);if(ut!=null)return void Ff(ut,N);const Ze=ze?null:Qt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),tt=ze?0:Ze.top,ct=ze?Qt("syncFocusToScroll.viewport.clientHeight",()=>{var mt,Et;return(Et=(mt=we?.innerHeight)!=null?mt:re.clientHeight)!=null?Et:0}):Ze.bottom,Ve=ke.value;let nt=null,gt=null;for(const[mt,Et]of Ve){if(!Et)continue;const _t=Qt("syncFocusToScroll.slot.getBoundingClientRect",()=>Et.getBoundingClientRect());_t.bottom<=tt||_t.top>=ct||(nt==null&&(nt=mt),gt=mt)}if(nt==null||gt==null){const mt=M.value;if(!mt)return;const Et=ze?{top:0}:Qt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),_t=Qt("syncFocusToScroll.fallback.scrollTop",()=>et(re,ce,ze)),Ot=ze?(()=>{const an=Qt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>mt.getBoundingClientRect()),sn=(ze?0:Et.top)-an.top;return Math.max(0,sn)})():(()=>{const an=le(mt,re);return Math.max(0,_t-an)})(),Kt=ze?Qt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var an,sn,un,Ln;return(Ln=(un=(sn=we?.innerHeight)!=null?sn:(an=ce?.documentElement)==null?void 0:an.clientHeight)!=null?un:re.clientHeight)!=null?Ln:0}):Qt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void Ff(Gs(Vn(Ot+.5*Math.max(0,Kt)),0,Math.max(0,Rt.value.length-1)),!0)}Ff(Math.round((nt+gt)/2),N)}}),{visibleNodeIndices:g6,nodeVisibilityHandles:oc,nodeVisibilityWatchStops:Rf,nodeVisibilityFallbackTimers:J9,clearVisibilityFallback:Pf,markNodeVisible:La,cleanupNodeVisibility:yB,destroyNodeVisibilityState:v6}=c4e({isClient:F,shouldTrackVisibleNodeIndices:()=>xl.value,shouldCleanupNodeVisibility:()=>pn.value,onNodeMarkedVisible:N=>{pn.value?Yl():Zl.value=Gs(N,0,Math.max(0,Rt.value.length-1))},onNodeVisibilityCleaned:N=>{no.delete(N)&&My()}}),{cleanupScrollListener:Q9,setupScrollListener:wB}=(function(N){const{isClient:G,virtualizationEnabled:re,listenerEnabled:ce,scrollRootElement:we,resolveScrollContainer:ze,scheduleFocusSync:De,onScroll:Ue}=N;let ut=null,Ze=null;function tt(){ut&&(ut(),ut=null),Ze=null,we.value=null}function ct(Ve){const nt=N.getScrollTop?N.getScrollTop(Ve):Ve.scrollTop;return Math.max(0,Number.isFinite(nt)?Math.abs(nt):0)}return{cleanupScrollListener:tt,setupScrollListener:function(){if(!G)return;if(!((Ve=ce?.value)!=null?Ve:re.value))return void tt();var Ve;const nt=ze();if(!nt)return void tt();if(we.value===nt&&ut)return;tt(),Ze=ct(nt);const gt=()=>{if(Ue?.(),re.value){const mt=(function(Et){const _t=ct(Et),Ot=Ze;Ze=_t;const Kt=Math.max(480,.75*(Et.clientHeight||0));return Ot==null?_t>Kt?{immediate:!0}:void 0:Math.abs(_t-Ot)>Kt?{immediate:!0}:void 0})(nt);mt?De(mt):De()}};nt.addEventListener("scroll",gt,{passive:!0}),we.value=nt,ut=()=>{nt.removeEventListener("scroll",gt)}}}})({isClient:F,virtualizationEnabled:pn,listenerEnabled:nc,scrollRootElement:Te,resolveScrollContainer:Se,scheduleFocusSync:Yl,onScroll:function(){const N=Ne.value;if(!N)return;const G=Xu();if(!G||(function(ce){if(od()>=jt)return Zt=null,!1;const we=Zt;if(we==null)return!0;const ze=Math.abs(ce.scrollTop-we)<=2;return ze||(Zt=null),ze})(G))return;const re=hy(G);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,N.distanceFromBottomPx))>32)&&cc("restore"):cc("restore")},getScrollTop:N=>{var G;const re=N.ownerDocument||((G=M.value)==null?void 0:G.ownerDocument)||document,ce=N===re.documentElement||N===re.body||N===re.scrollingElement;return Qt("scrollListener.getScrollTop",()=>et(N,re,ce))}});function Ff(N,G=!1){const re=Gs(N,0,Math.max(0,Rt.value.length-1));!G&&Math.abs(re-Zl.value)<=1||(Zl.value=re,Dr())}function Gs(N,G,re){return Math.min(Math.max(N,G),re)}function y6(N=Rt.value.length){const G=Jo();return!Number.isInteger(G)||G<0?N:Gs(G,0,N)}function w6(N){return N?.firstElementChild}function ey(N,G){var re;return N?(re=N.matches)!=null&&re.call(N,G)?N:N.querySelector(G):null}function kB(N,G){N<1||N>6||(Z[N]=G)}function ty(){if(!Pe.value)return void(J.value=0);const N=Qt("updateExperimentContainerWidth.clientWidth",()=>{var G,re;return(re=(G=M.value)==null?void 0:G.clientWidth)!=null?re:0});J.value=N>0?N:0}let Yu=null;function k6(){Yu?.disconnect(),Yu=null}const ny=Yd("ViewportDeferredMarkdownCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){return(yield Cs(()=>import("./index5-DRYrcfDq.js"),__vite__mapDeps([8,6,7]))).default}),loadingComponent:B5,delay:0,suspensible:!1}),B5);function oy(N){return N===ny}const sy=B(()=>h.value==="pre"?Di:h.value==="shiki"?ny:rm);function iy(){var N;return((N=C.codeBlockProps)==null?void 0:N.showHeader)!==!1}function ly(N,G,re){const ce=hr[G],we=typeof ce=="number"&&ce>0;if(Lt.value&&!we&&!(function(ze){return!!Un.value.paragraph&&(ze.type==="paragraph"||ze.type==="list_item"||ze.type==="list")})(N)){const ze=u$(N,re,se.value);if(ze)return ze}if(Co.value&&N.type==="code_block"){const ze=(function(De){if(De.type!=="code_block")return null;const Ue=Fy(De,Kf(De));return oy(Ue)?"markdown":Ue===Di?"pre":Ue===sy.value||Ue===rm?"monaco":null})(N);if(ze==="monaco"||ze==="markdown"||ze==="pre")return(function(De,Ue){var ut,Ze,tt;if(!De||De.type!=="code_block")return null;const ct=Ue.rendererKind,Ve=ct!=="pre"&&Ue.showHeader!==!1,nt=!!De.diff;let gt=0,mt=500;if(ct==="monaco"){const _t=(ut=Ue.monacoOptions)!=null?ut:{},Ot=gm(De,_t,Ue.width),Kt=(function(sn){const un=typeof sn?.fontSize=="number"&&sn.fontSize>0?sn.fontSize:12;return typeof sn?.lineHeight=="number"&&sn.lineHeight>0?sn.lineHeight:Math.round(1.5*un)})(_t),an=(function(sn,un){var Ln,On;const wo=typeof((Ln=sn?.padding)==null?void 0:Ln.top)=="number"?sn.padding.top:un?0:8,Ys=typeof((On=sn?.padding)==null?void 0:On.bottom)=="number"?sn.padding.bottom:un?0:8;return Math.max(0,wo)+Math.max(0,Ys)})(_t,nt);mt=typeof _t.MAX_HEIGHT=="number"&&_t.MAX_HEIGHT>0?_t.MAX_HEIGHT:500,gt=Math.round(Ot*Kt+an)}else if(ct==="markdown"){const _t=gm(De);gt=Math.round(21*_t+32)}else{const _t=gm(De);gt=Math.round(28*_t),mt=Number.POSITIVE_INFINITY}const Et=Math.max(1,Math.min(gt,mt));return St({kind:"code-block",height:Math.round(Et+(Ve?40:0)),contentHeight:Et,rendererKind:ct},nt&&ct==="monaco"?{diffInline:Iv((Ze=Ue.monacoOptions)!=null?Ze:{},(tt=Ue.width)!=null?tt:0)}:{})})(N,{rendererKind:ze,monacoOptions:C.codeBlockMonacoOptions,showHeader:iy(),width:re})}return null}sA(()=>{if(bl.value,Ks>0)return;const N=Rt.value,G=Ls();if(!N.length||!to.value)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const re=J.value||Qt("estimatedNodeHeights.clientWidth",()=>{var Ze;return((Ze=M.value)==null?void 0:Ze.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const ce=(function(Ze){return[Math.round(Ze),Lt.value,Co.value,se.value,C.codeBlockMonacoOptions,iy(),h.value,Un.value,pm.value]})(re),we=gs.length<=N.length&&(De=ce,(ze=kl).length===De.length&&ze.every((Ze,tt)=>Object.is(Ze,De[tt])));var ze,De;const Ue=we&&es===G?N.length:we?y6(N.length):0,ut=we?Array.from(vs):[];gs.length=N.length;for(let Ze=Ue;Ze=0&&ZeHs.value);Qe=(function(N){let G=!0,re=[0],ce="";function we(tt){var ct;const Ve=N.nodeHeights[tt];if(Number.isFinite(Ve)&&Ve>0)return Ve;const nt=N.parsedNodes.value[tt],gt=nt?.type,mt=!!((ct=N.hasCustomParagraphComponent)!=null&&ct.call(N)),Et=N.estimatedNodeHeights.value[tt],_t=Et?.height;if(!(function(Kt,an,sn){return!!(sn&&an?.kind==="simple-text"&&(Kt==="paragraph"||Kt==="list_item"||Kt==="list"))})(gt,Et,mt)&&Number.isFinite(_t)&&_t>0)return _t;const Ot=X3e(nt,N.getContainerWidth()||640);return gt==="heading"||gt==="paragraph"&&Ot<=28&&(function(Kt,an){if(an)return!1;const sn=Kt.children;return!Array.isArray(sn)||!sn.length||sn.every(f$)})(nt,mt)?Ot:Math.max(N.averageNodeHeight.value,Ot)}function ze(){var tt;const ct=N.parsedNodes.value.length,Ve=N.getPrefixCacheKeyParts().join(":");if(!G&&ce===Ve)return re;const nt=new Array(ct+1);nt[0]=0;for(let gt=0;gt=((ct=gt[nt])!=null?ct:0))return nt-1;let mt=0,Et=nt-1,_t=nt-1;for(;mt<=Et;){const Ot=mt+Et>>1;((Ve=gt[Ot+1])!=null?Ve:0)>=tt?(_t=Ot,Et=Ot-1):mt=Ot+1}return _t}function Ue(tt,ct){var Ve,nt;if(tt>=ct)return 0;if(N.heightEstimationActive.value)return(function(Et,_t){var Ot,Kt;const an=N.parsedNodes.value.length,sn=Jx(Math.trunc(Et),0,an),un=Jx(Math.trunc(_t),sn,an);if(sn>=un)return 0;const Ln=ze();return((Ot=Ln[un])!=null?Ot:0)-((Kt=Ln[sn])!=null?Kt:0)})(tt,ct);if(N.heightTreeSize.value!==N.parsedNodes.value.length){let Et=0;for(let _t=tt;_tsn<=0?0:N.fenwickRangeSum(mt,0,sn)+(sn-N.fenwickRangeSum(Et,0,sn))*gt;let Ot=0,Kt=Ve.length-1,an=Ve.length-1;for(;Ot<=Kt;){const sn=Ot+Kt>>1;_t(sn+1)>=tt?(an=sn,Kt=sn-1):Ot=sn+1}return an}let nt=tt;for(let gt=0;gt0||tt++}return tt}return{markFallbackHeightPrefixDirty:function(){G=!0},getFallbackNodeHeight:we,estimateHeightRange:Ue,estimateIndexForOffset:ut,estimateIndexForOffsetFromEnd:function(tt){var ct,Ve;const nt=N.parsedNodes.value;if(!nt.length)return 0;if(tt<=0)return Math.max(0,nt.length-1);if(N.heightEstimationActive.value){const mt=(ct=ze()[nt.length])!=null?ct:0;return De(Math.max(0,mt-tt))}if(N.heightTreeSize.value===nt.length){const mt=Ue(0,nt.length);return ut(Math.max(0,mt-tt))}let gt=tt;for(let mt=nt.length-1;mt>=0;mt--){const Et=(Ve=N.nodeHeights[mt])!=null?Ve:N.averageNodeHeight.value;if(gt<=Et)return mt;gt-=Et}return 0},getEstimatedNodeHeightCount:Ze,buildVirtualHeightSummary:function(tt){var ct;const Ve=N.parsedNodes.value.length;return{totalNodes:Ve,measuredCount:N.heightStats.count,estimatedCount:Ze(),averageNodeHeight:N.averageNodeHeight.value,topSpacerHeight:tt.topSpacerHeight,bottomSpacerHeight:tt.bottomSpacerHeight,estimatedTotalHeight:Ue(0,Ve),width:(ct=tt.width)!=null?ct:N.getContainerWidth()}}}})({parsedNodes:Rt,nodeHeights:hr,heightStats:ts,heightTreeSize:Fr,heightSumTree:Uu,heightKnownTree:Q0,averageNodeHeight:jr,heightEstimationActive:Pe,estimatedNodeHeights:sc,getContainerWidth:cn,hasCustomParagraphComponent:()=>!!Un.value.paragraph,getPrefixCacheKeyParts:()=>{var N;const G=Ld(J.value||Qt("getFallbackHeightPrefix.clientWidth",()=>{var ce;return((ce=M.value)==null?void 0:ce.clientWidth)||0})),re=((N=o.virtualScroll)==null?void 0:N.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[Rt.value.length,ts.count,Math.round(ts.total),Math.round(100*jr.value),re,G,Pe.value?1:0,pm.value,ee.value,Un.value.paragraph?1:0]},fenwickRangeSum:el}),Ke(()=>Rt.value.length,N=>{var G;Vt(),N<=0?j1():(NF1(G))),N!==Fr.value&&Re(N))},{immediate:!0});const bB=B(()=>{if(!pn.value)return Rt.value.map((ce,we)=>({node:ce,index:we}));const N=Rt.value.length,G=Gs(ys.start,0,N),re=Gs(ys.end,G,N);return Rt.value.slice(G,re).map((ce,we)=>({node:ce,index:G+we}))}),b6=B(()=>pn.value?on(0,Math.min(ys.start,Rt.value.length)):0),_6=B(()=>{if(!pn.value)return 0;const N=Rt.value.length;return on(Math.min(ys.end,N),N)});function ry(){return Qe.buildVirtualHeightSummary({topSpacerHeight:b6.value,bottomSpacerHeight:_6.value,width:W1()})}function _B(){const N=Rt.value,G=ry();return wn(St({},G),{probe:{paragraphReady:!!se.value.paragraph,listItemReady:!!se.value.listItem,listWrapperOverhead:se.value.listWrapperOverhead,headingReadyLevels:Object.entries(se.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:N.map((re,ce)=>{var we,ze,De,Ue,ut,Ze,tt,ct,Ve;return{index:ce,type:re.type,estimateKind:(ze=(we=sc.value[ce])==null?void 0:we.kind)!=null?ze:null,rendererKind:(Ue=(De=sc.value[ce])==null?void 0:De.rendererKind)!=null?Ue:null,estimatedHeight:(Ze=(ut=sc.value[ce])==null?void 0:ut.height)!=null?Ze:null,estimatedContentHeight:(ct=(tt=sc.value[ce])==null?void 0:tt.contentHeight)!=null?ct:null,measuredHeight:(Ve=hr[ce])!=null?Ve:null}})})}function x6(){return o.indexKey!=null?String(o.indexKey):Do.value?`virtual-${Fo()}`:"markdown-renderer"}function ay(N){const G=String(N),re=`${x6()}-`;if(!G.startsWith(re))return null;const ce=G.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ce)return null;const we=Number(ce[1]);return!Number.isInteger(we)||we<0||we>=Rt.value.length?null:we}function Fo(){var N,G,re;const ce=(N=o.virtualScroll)==null?void 0:N.sessionKey;return String(ce!=null&&ce!==""?ce:(re=(G=o.indexKey)!=null?G:C.customId)!=null?re:uo)}function ws(){var N;const G=(N=o.virtualScroll)==null?void 0:N.threadKey;return G==null||G===""?void 0:String(G)}const xB=B(()=>{var N,G,re;return(re=ws())!=null?re:String((G=(N=o.indexKey)!=null?N:C.customId)!=null?G:uo)});function S6(N){var G;return(N??"")===((G=ws())!=null?G:"")}function Vr(){var N,G,re;return G=(N=o.virtualScroll)==null?void 0:N.measurementKey,re=(function(){const ce=h.value;return(function(we){var ze,De;const Ue=we.renderer,ut=Ue==="monaco"?we.codeBlockMonacoOptions:void 0,Ze=we.codeBlockProps,tt=Ue==="shiki";return[we.isDark?"dark":"light",Ue==="monaco"?"code-rich":Ue==="pre"?"code-pre":"code-shiki",we.codeBlockStream===!1?"code-static":"code-stream",Vs(we.codeBlockMinWidth),Vs(we.codeBlockMaxWidth),...tt?[Ode((ze=Ze?.themes)!=null?ze:we.themes,(De=Ze?.langs)!=null?De:we.langs)]:[],Vs(ut?.fontSize),Vs(ut?.lineHeight),Vs(ut?.fontFamily),Vs(ut?.tabSize),Vs(ut?.MAX_HEIGHT),Vs(ut?.wordWrap),Vs(ut?.wrappingIndent),Vs(ut?.padding),Vs(Ze?.showHeader),Vs(Ze?.showCopyButton),Vs(Ze?.showExpandButton),Vs(Ze?.showPreviewButton),Vs(Ze?.showCollapseButton),Vs(Ze?.showFontSizeButtons)].join("\0")})({renderer:ce,isDark:C.isDark,codeBlockStream:C.codeBlockStream,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockMonacoOptions:ce==="monaco"?C.codeBlockMonacoOptions:void 0,codeBlockProps:C.codeBlockProps,themes:ce==="shiki"?C.themes:void 0,langs:ce==="shiki"?C.langs:void 0})})(),[G==null?"":String(G),re].join("\0")}function W1(){return cn()}const jf=B(()=>Ld(W1())),tl=B(()=>[Vr(),jf.value].join("\0")),SB=B(()=>{var N;return Do.value?["virtual",(N=ws())!=null?N:"",Fo(),tl.value].join("\0"):o.indexKey});function ic(){li.value+=1}function C6(N){return!(!N||!Number.isInteger(N.index)||N.index<0||N.index>=Rt.value.length||N.sessionKey!==Fo()||N.threadKey!==ws()||N.layoutEpochKey!==tl.value)}function cy(N){const G=String(N),re=Yt.get(G);return re?C6(re)?re.index:null:ay(G)}function uy(N="async-node"){(yn.size||Yt.size)&&(yn.clear(),Yt.clear(),ic(),$o(N))}const lc=fn(s7,null),M6={reportHeight(N,G){if(!Xe.value)return;const re=cy(N);if(re==null)return;const ce=Cl.get(re);if(!ce)return;const we=Number(G),ze=O1(re,ce);(function(De,Ue,ut={}){Hr(()=>Zu(De,Ue,ut))})(re,Number.isFinite(we)&&we>0?Math.max(we,ze||0):ze)},markPending(N){if(!Xe.value)return;const G=ay(N);G!=null&&(function(re,ce){var we;const ze=Yt.get(re);if(ze&&C6(ze))return yn.set(re,Math.max(0,(we=yn.get(re))!=null?we:0)+1),ic(),void $o("async-node");yn.set(re,1),Yt.set(re,(function(De){return{index:De,sessionKey:Fo(),threadKey:ws(),layoutEpochKey:tl.value}})(ce)),ic(),$o("async-node")})(String(N),G)},markSettled(N){if(!Xe.value)return;const G=String(N),re=cy(N);(re!=null||(function(ce){return yn.has(String(ce))})(G))&&(function(ce){var we;const ze=(we=yn.get(ce))!=null?we:0;return!(ze<=0||(ze<=1?(yn.delete(ce),Yt.delete(ce)):yn.set(ce,ze-1),ic(),ze===1&&$o("async-node"),0))})(G)&&re!=null&&Wr()}};function CB(){let N=0;for(const G of Cl.values())N+=Qt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=G?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,N))}qn(s7,{reportHeight(N,G){M6.reportHeight(N,G),lc?.reportHeight(N,G)},markPending(N){M6.markPending(N),lc?.markPending(N)},markSettled(N){M6.markSettled(N),lc?.markSettled(N)}});let A6,T6=null,rc=null;function Of(N){return N!==!1&&N!=null&&N!==""}function dy(){return pn.value?(function(){if(!pn.value)return!0;const N=Rt.value.length,G=Gs(ys.start,0,N),re=Gs(ys.end,G,N);if(G>=re)return!0;for(let ce=G;ce=V1.value}function E6(){return Fe.value===!0&&!kt.value&&vi.value===0&&Gl.size===0&&Kl.size===0&&yi==null&&dy()}function fy(){var N,G;if(((N=o.virtualScroll)==null?void 0:N.settleMode)!=="manual"||T6===Fo()&&A6===ws())return!0;const re=(G=o.virtualScroll)==null?void 0:G.settledToken;return!!Of(re)&&rc===ud(re)}function I6(){return E6()&&fy()}function MB(N,G){return G.totalNodes<=0?N==="final"?"final":"estimate":G.measuredCount>=G.totalNodes?N==="final"?"final":"measured":G.measuredCount>0||G.estimatedCount>0?"mixed":"estimate"}function q1(N="manual",G){const re=ry(),ce=(function(we){return we||(Fe.value!==!0?Rt.value.length>0?"streaming":"estimating":!dy()||Kl.size>0||yi!=null?"measuring":I6()?"settled":"settling")})(G);return{sessionKey:Fo(),threadKey:ws(),phase:ce,nodeCount:re.totalNodes,liveRange:{start:ys.start,end:ys.end},renderedCount:Ae.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:CB(),totalHeight:py(),width:re.width,final:Fe.value===!0,stable:I6(),confidence:MB(ce,re),reason:N}}function Xu(){const N=Te.value||Se(),G=M.value;if(!N||!G)return null;const re=N.ownerDocument||G.ownerDocument||document,ce=N===re.documentElement||N===re.body||N===re.scrollingElement,we=Qt("getScrollBox.scrollTop",()=>et(N,re,ce)),ze=Qt("getScrollBox.scrollHeight",()=>{var Ue,ut,Ze,tt,ct;return ce?Math.max((ut=(Ue=re.documentElement)==null?void 0:Ue.scrollHeight)!=null?ut:0,(tt=(Ze=re.body)==null?void 0:Ze.scrollHeight)!=null?tt:0,(ct=N.scrollHeight)!=null?ct:0):N.scrollHeight}),De=Qt("getScrollBox.clientHeight",()=>{var Ue;return ce?((Ue=re.documentElement)==null?void 0:Ue.clientHeight)||N.clientHeight||0:N.clientHeight});return{root:N,doc:re,isViewportRoot:ce,scrollTop:we,scrollHeight:ze,clientHeight:De}}function py(){const N=Rt.value.length,G=Math.max(0,on(0,N)),re=Qt("getRendererLogicalHeight.offsetHeight",()=>{var we,ze;return(ze=(we=M.value)==null?void 0:we.offsetHeight)!=null?ze:0}),ce=Math.max(0,re>0?re:Qt("getRendererLogicalHeight.scrollHeight",()=>{var we,ze;return(ze=(we=M.value)==null?void 0:we.scrollHeight)!=null?ze:0}));return N<=0?Math.ceil(re):pn.value?G>0?Math.max(1,Math.ceil(G),(function(){let we=b6.value+_6.value;for(const ze of no.values())ze&&(we+=Math.max(0,Qt("getVirtualizedDomLogicalHeight.offsetHeight",()=>ze.offsetHeight||0)));return Math.ceil(Math.max(0,we))})(),(function(we,ze){return we<=0||ze<=0?0:ze<=we+Math.max(512,.05*we)?Math.ceil(ze):0})(G,ce)):Math.max(1,Math.ceil(ce)):Xe.value?G>0||ts.count>0||Qe.getEstimatedNodeHeightCount()>0?(Ni.value&&Ae.value,Math.max(1,Math.ceil(ce),Math.ceil(G))):Math.ceil(ce):Math.max(1,Math.ceil(ce),Math.ceil(G))}function hy(N){const G=M.value;if(!G)return null;const re=Qt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>G.getBoundingClientRect());return(function(we){return we.isViewportRoot?we.clientHeight:Qt("getViewportBottomInRoot.getBoundingClientRect",()=>we.root.getBoundingClientRect().bottom)})(N)-re.bottom}function AB(N={}){const G=N.requireViewport!==!1,re=(function(ze=64){const De=Xu(),Ue=M.value;if(!De||!Ue)return!1;const ut=(function(tt){if(tt.isViewportRoot)return{top:0,bottom:tt.clientHeight};const ct=Qt("getVirtualViewportRect.getBoundingClientRect",()=>tt.root.getBoundingClientRect());return{top:ct.top,bottom:ct.bottom}})(De),Ze=Qt("isRendererNearVirtualViewport.getBoundingClientRect",()=>Ue.getBoundingClientRect());return Ze.bottom>=ut.top-ze&&Ze.top<=ut.bottom+ze})();if(G&&!re)return null;const ce=(function(){const ze=Xu(),De=M.value;if(!ze||!De||Math.max(0,ze.scrollHeight-ze.scrollTop-ze.clientHeight)>64)return null;const Ue=hy(ze);return Ue==null?null:Ue>=-8&&Ue<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,Ue)}:null})();if(ce)return{anchor:ce,captured:!0};const we=X0();if(we)return{anchor:{type:"node",nodeIndex:we.nodeIndex,offsetWithinNodePx:we.offsetWithinNodePx},captured:re};if(N.allowFallback===!0){const ze=(function(){const De=Rt.value.length;return De<=0?null:{type:"node",nodeIndex:Gs(Zl.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return ze?{anchor:ze,captured:!1}:null}return null}function L6(N){let G=2166136261;for(let re=0;re>>0).toString(36)}function TB(N,G){let re=N;for(let ce=0;ce8192?`${ce.slice(0,8192)}...${ce.length}`:ce;return`${ce.length}:${L6(we)}`})(N)}`;if(typeof N=="function")return"fn";if(typeof N!="object")return typeof N;if(G.has(N))return"cycle";if(re>=6)return"max-depth";G.add(N);try{if(Array.isArray(N)){if(N.length<=160){const Ze=[];for(let tt=0;tt=Ue&&De.push(tt)}return[`a:${N.length}`,`h=${ze.join(",")}`,`t=${De.join(",")}`,`all=${(ut>>>0).toString(36)}`].join(":")}const ce=N,we=Object.keys(ce).filter(ze=>{const De=ce[ze];return ze!=="parent"&&ze!=="el"&&ze!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||EB.has(ze))}).sort();return`o:${we.length}:${we.map(ze=>`${ze}=${Hf(ce[ze],G,re+1)}`).join(";")}`}finally{G.delete(N)}}let $6=-1,N6="",U1=[2166136261];function Ju(N){const G=Rt.value[N];return G?L6(Hf(G)):""}function IB(N,G){let re=N;for(let ce=0;ce>>0}function z6(){var N,G;const re=ee.value;if($6===re)return N6;const ce=Rt.value.length;let we=y6(ce);($6!==re-1||we>ce||U1.length>>0).toString(36),$6=re,N6}function ac(N,G={}){var re;const ce=G.includeHeightCache===!0,we=(re=G.includeContentHash)!=null?re:ce,ze=ce?(function(Ue){const ut=(function(){var mt,Et;const _t=Number((Et=(mt=o.virtualScroll)==null?void 0:mt.heightCacheLimit)!=null?Et:5e3);return!Number.isFinite(_t)||_t<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(_t))})();if(!Number.isFinite(ut)||Ue.length<=ut)return Ue;const Ze=new Map,tt=mt=>{!mt||Ze.size>=ut||Ze.set(mt.index,mt)},ct=Rt.value.length,Ve=Gs(ys.start-2*Xn.value,0,ct),nt=Gs(ys.end+2*Xn.value,Ve,ct);for(const mt of Ue)mt.index>=Ve&&mt.index=0&&Ze.sizemt.index-Et.index).slice(0,ut)})(Sn().map(Ue=>{var ut;const Ze=Rt.value[Ue.index];return Ze?wn(St({},Ue),{nodeType:String((ut=Ze.type)!=null?ut:""),signature:Ju(Ue.index)}):null}).filter(Ue=>!!Ue)):[],De=AB({allowFallback:G.allowAnchorFallback===!0,requireViewport:G.requireViewport});return De||ze.length||G.includeEmptyState===!0?wn(St({sessionKey:N.sessionKey,threadKey:N.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:N,width:N.width,contentHash:we?z6():void 0,measurementKey:Vr()||void 0,heightCache:ze.length?ze:void 0}):null}function B6(N){var G,re;const ce=Xu();if(!ce)return;const we=(function(Ue){const ut=M.value;if(!ut)return null;const Ze=le(ut,Ue.root),tt=Rt.value.length,ct=Qt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ut.offsetHeight||0),Ve=Math.max(0,ct>0?ct:tt>0?Qt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ut.scrollHeight||0):0),nt=py();return Ze+Math.max(Ve,nt)})(ce);if(we==null)return;const ze=Math.max(0,N.distanceFromBottomPx),De=Math.max(0,we-ce.clientHeight-ze);(function(Ue){jt=od()+120,Zt=Ue})(De),ce.isViewportRoot?(re=(G=ce.doc.defaultView)==null?void 0:G.scrollTo)==null||re.call(G,0,De):Gx(ce.root,ce.doc,De,{isReverseFlexScrollRoot:je,getNormalizedScrollTop:et})}const R6=[];function my(){if(F)for(ht!=null&&(Lo?.(ht),ht=null);R6.length;){const N=R6.pop();N!=null&&window.clearTimeout(N)}}function cc(N){const G=!!Ne.value;Ne.value=null,jt=0,Zt=null,my(),G&&N&&$o(N)}function uc(){if(!Ne.value||!F||ht!=null)return;const N=()=>{ht=null;const G=Ne.value;G&&B6(G)};ht=yo?yo(N):null,ht==null&&N()}function gy(N,G={}){const re=Rt.value.length;return re<=0?[]:N.filter(ce=>!(!Number.isInteger(ce.index)||ce.index<0||ce.index>=re)&&!(!Number.isFinite(ce.height)||ce.height<=0)&&!(G.requireSignature&&!ce.signature)&&!(G.requireCompatibilityMetadata&&!ce.nodeType&&!ce.signature)&&(function(we){var ze;const De=Rt.value[we.index];return!(!De||we.nodeType&&we.nodeType!==String((ze=De.type)!=null?ze:"")||we.signature&&we.signature!==Ju(we.index))})(ce))}function vy(N){const G=Ld(W1()),re=Ld(N);return G!==-1&&re!==-1&&G===re}function P6(N){var G;const re=Number(N?.width);if(Number.isFinite(re)&&re>0)return re;const ce=Number((G=N?.metrics)==null?void 0:G.width);return Number.isFinite(ce)&&ce>0?ce:null}function yy(N){var G;return N.sessionKey===Fo()&&!!S6(N.threadKey)&&((G=N.measurementKey)!=null?G:"")===Vr()&&!!vy(P6(N))&&!!(function(re){const ce=re.heightCache;return!!ce?.length&&(wy(re)?ce.some(we=>!!(we.nodeType||we.signature)):ce.some(we=>!!we.signature))})(N)}function wy(N){return!!(N.contentHash&&N.contentHash===z6())}function LB(N){return!wy(N)}let Z1=null,K1=null,Df=null,Qu=null,ed=null;function F6(N){var G;const re=N.map(we=>{var ze,De;return[we.index,Math.round(10*we.height),(ze=we.nodeType)!=null?ze:"",(De=we.signature)!=null?De:""].join("")}).join(""),ce=Ld(W1());return[(G=ws())!=null?G:"",Fo(),Vr(),Rt.value.length,ce,N.length,L6(re)].join(":")}function ky(N=(G=>(G=o.virtualScroll)==null?void 0:G.heightCache)()){if(!Xe.value||!N?.length||Rt.value.length<=0||!vy((G=o.virtualScroll)==null?void 0:G.heightCacheWidth))return!1;var G;const re=gy(N,{requireSignature:!0});if(!re.length)return!1;const ce=F6(re);return ce===Z1?(K1="standalone",!0):(Ku(re,{mode:"merge"}),Vt(),Z1=ce,K1="standalone",id(),$o("restore"),!0)}function j6(N,G={}){var re,ce,we;if(!Xe.value||!N||N.sessionKey!==Fo()||!S6(N.threadKey)||Rt.value.length<=0)return!1;const ze=!!((re=N.heightCache)!=null&&re.length)&&!Vf(),De=!N.anchor||N.anchorCaptured===!1&&G.allowUncapturedAnchor!==!0?null:N.anchor,Ue=G.restoreAnchor===!0&&!!De&&!Vf()&&Number(P6(N))>0;let ut=!1;if((ce=N.heightCache)!=null&&ce.length&&yy(N)){const tt=gy(N.heightCache,{requireCompatibilityMetadata:!N.contentHash,requireSignature:LB(N)});tt.length&&(Ku(tt,{mode:"merge"}),Vt(),Z1=F6(tt),K1="restore",id(),ut=!0)}if(ze||Ue)return!1;if(!G.restoreAnchor||!De)return ut&&$o("restore"),!0;const Ze=(function(tt,ct){var Ve;const nt=tt.anchor,gt=nt?nt.type==="bottom"?`bottom:${Math.round(nt.distanceFromBottomPx)}`:`node:${nt.nodeIndex}:${Math.round(nt.offsetWithinNodePx)}`:"none";return[(Ve=ws())!=null?Ve:"",Fo(),Vr(),jf.value,ct,gt].join(":")})(N,(we=G.restoreToken)!=null?we:"imperative");return Df===Ze?(ut&&$o("restore"),!0):(Df=Ze,(function(tt){const ct=()=>{if(tt.type==="node")return cc(),void J0({nodeIndex:tt.nodeIndex,offsetWithinNodePx:tt.offsetWithinNodePx});if(rs(),Ht.value=null,Ne.value=tt,my(),B6(tt),F)for(const Ve of[0,120,280,480])R6.push(window.setTimeout(()=>{const nt=Ne.value;nt&&B6(nt)},Ve))};(function(Ve){if(!pn.value)return!1;const nt=Rt.value.length;return!(nt<=0||(Zl.value=Ve.type==="node"?Gs(Ve.nodeIndex,0,nt-1):nt-1,Dr(),0))})(tt)?yt(ct):ct()})(De),$o("restore"),!0)}function Vf(){const N=W1();return Number.isFinite(N)&&N>0}function by(N){var G;return N.sessionKey===Fo()&&!!S6(N.threadKey)&&(Rt.value.length<=0||!(!((G=N.heightCache)!=null&&G.length)||Vf())||!(!(N.anchor&&Number(P6(N))>0)||Vf()))}function O6(){Wo.clear();for(const N of Object.keys(hr)){const G=Number(N);Number.isInteger(G)&&G>=0&&G{let G=!1,re=null;const ce=()=>{G||(G=!0,re!=null&&window.clearTimeout(re),N())};if(yo)return yo(ce),void(re=window.setTimeout(ce,50));re=window.setTimeout(ce,0)})}function H6(N,G=ws(),re=tl.value){return Fo()===N&&ws()===G&&tl.value===re}function D6(){return zo(this,arguments,function*(N={}){var G,re,ce,we,ze;const De=Fo(),Ue=ws(),ut=tl.value,Ze=(G=N.frames)!=null?G:2,tt=(re=N.timeoutMs)!=null?re:120,ct=(ce=N.reason)!=null?ce:"manual",Ve=N.expectedSettledTokenKey,nt=N.flushPendingTimers===!0,gt=q1(ct),mt=()=>wn(St({},gt),{phase:gt.final?"settling":gt.phase,stable:!1,confidence:gt.confidence==="final"?"mixed":gt.confidence,reason:ct}),Et=()=>H6(De,Ue,ut)&&(Ve==null||sd()===Ve);for(let an=0;anwindow.setTimeout(sn,an))})(tt),!Et()||(nt&&X9(),Wr(),td(),!Et()))return mt();const _t=E6();_t&&(T6=De,A6=Ue,((we=o.virtualScroll)==null?void 0:we.settleMode)==="manual"&&Ve!=null&&Of((ze=o.virtualScroll)==null?void 0:ze.settledToken)&&sd()===Ve&&(rc=ud(o.virtualScroll.settledToken)));const Ot=Et()&&_t&&fy(),Kt=q1(ct,Ot?"final":void 0);return Z6(Kt,!0),Kt})}let V6="content",G1=null,Y1=null,W6=0,nd=null,dc=null,q6=null,U6=null;function od(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function xy(N){var G,re;const ce=nd;if(!ce)return!0;const we=(re=(G=o.virtualScroll)==null?void 0:G.heightDiffThresholdPx)!=null?re:1;return Math.abs(N.totalHeight-ce.totalHeight)>we||N.sessionKey!==ce.sessionKey||N.phase!==ce.phase||N.stable!==ce.stable||N.final!==ce.final||N.threadKey!==ce.threadKey||N.nodeCount!==ce.nodeCount||N.measuredCount!==ce.measuredCount||N.width!==ce.width}function sd(N=(G=>(G=o.virtualScroll)==null?void 0:G.settledToken)()){return Vs(N)}function Sy(N,G){var re,ce;return[N,G.sessionKey,(re=G.threadKey)!=null?re:"",Vr(),z6(),Vs((ce=o.virtualScroll)==null?void 0:ce.settledToken),Math.round(G.totalHeight),Math.round(G.width)].join("\0")}function id(){q6=null,U6=null,dc=null}function $B(N){const G=N.heightCache;return G?.length?F6(G):""}function ld(N){var G,re,ce;const we=N.metrics,ze=N.anchor?(De=N.anchor).type==="bottom"?`bottom:${Math.round(De.distanceFromBottomPx)}`:`node:${De.nodeIndex}:${Math.round(De.offsetWithinNodePx)}`:"none";var De;return[N.sessionKey,(G=N.threadKey)!=null?G:"",(re=N.measurementKey)!=null?re:Vr(),(ce=N.contentHash)!=null?ce:"",$B(N),ze,N.anchorCaptured?1:0,we.liveRange.start,we.liveRange.end,we.renderedCount,we.nodeCount,Math.round(we.totalHeight),Math.round(we.width),we.phase,we.stable?1:0].join("\0")}function Z6(N,G=!1){if(!Xe.value||(function(De=!1){return!De&&Do.value&&!qe.value})(G))return;const re=G||xy(N),ce=(function(De,Ue=!1){return Ue||De.stable||De.phase==="final"?{state:ac(De,{includeHeightCache:!0})}:{state:ac(De)}})(N,G),we=ce.state,ze=!!(we&&(re||(function(De,Ue=!1){return!!Ue||ld(De)!==dc})(we,G)));if(re&&(j(N),nd=N,W6=od()),we&&ze&&(H(we),we.anchor&&D(we.anchor),dc=ld(we)),N.stable){const De=Sy("settled",N);if(De!==q6){q6=De;const Ue=ac(N,{includeHeightCache:!0});Ue&&(H(Ue),dc=ld(Ue)),(function(ut){s("render-settled",ut)})(N)}}if(N.phase==="final"){const De=Sy("final",N);if(De!==U6){U6=De;const Ue=ac(N,{includeHeightCache:!0});Ue&&(H(Ue),dc=ld(Ue)),(function(ut){s("render-final",ut)})(N)}}}function K6(){G1!=null&&(Lo?.(G1),G1=null),Y1!=null&&F&&(window.clearTimeout(Y1),Y1=null)}function Cy(){G1=null,Y1=null,(function(N){if(Kl.size>0||yi!=null)return!0;switch(N){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(V6)&&(Wr(),td()),Z6(q1(V6))}function $o(N){var G,re;if(!Xe.value||(V6=N,G1!=null||Y1!=null))return;const ce=Math.max(0,(re=(G=o.virtualScroll)==null?void 0:G.emitIntervalMs)!=null?re:32),we=Math.max(0,ce-(od()-W6)),ze=()=>{Y1=null,G1=yo?yo(Cy):null,G1==null&&Cy()};F&&we>0?Y1=window.setTimeout(ze,we):ze()}function My(){ne.value+=1}function Wf(N){if(Ni.value&&N>=Ae.value){const G=Rt.value[N],re=Oe.value===!0&&Fe.value!==!0&&N>=Rt.value.length-2,ce=G?.type==="code_block"||G?.type==="image"||G?.type==="mermaid"||G?.type==="infographic";if(!re||ce)return!1}return!xl.value||N=at.value&&(q.value||(q.value=!0,v6()),!H1.value||!Zs))return fc(N),void(G&&La(N,!0));if(N{if(J9.delete(ze),!xl.value||g6.value.has(ze))return;const ut=no.get(ze);if(!ut)return;const Ze=Se(ut),tt=ut.ownerDocument||document,ct=tt.defaultView||window,Ve=!Ze||Ze===tt.documentElement||Ze===tt.body,nt=!Ve&&Ze?Qt("nodeVisibilityFallback.root.getBoundingClientRect",()=>Ze.getBoundingClientRect()):null,gt=Ve?0:nt.top,mt=Ve?Qt("nodeVisibilityFallback.clientHeight",()=>{var _t,Ot;return(Ot=(_t=ct.innerHeight)!=null?_t:Ze?.clientHeight)!=null?Ot:0}):nt.bottom,Et=Qt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ut.getBoundingClientRect());Et.bottom>=gt-500&&Et.top<=mt+500&&La(ze,!0)},1800+De);J9.set(ze,Ue)})(N);let we=null;we=Ke(()=>ce.isVisible.value,ze=>{if(ze){Pf(N),La(N,!0),we?.(),Rf.delete(N),oc.get(N)===ce&&oc.delete(N);try{ce.destroy()}catch{}}},{immediate:!0}),Rf.set(N,we),pn.value&&Yl()}function G6(){yi=null,Hr(()=>{let N=!1;for(const[G,re]of Kl)Kl.delete(G),Cl.get(G)===re.el&&Bi.get(G)===re.version&&(N=Zu(G,re.height,{allowShrink:re.allowShrink})||N);return N})}function pc(){yi!=null&&(Lo?.(yi),yi=null),Kl.clear()}function Uf(N,G){(function(re,ce,we){var ze;if(!Number.isFinite(we)||we<=0||Cl.get(re)!==ce)return;const De=Bi.get(re);if(De==null)return;const Ue=Rt.value[re],ut=kt.value&&Fe.value!==!0&&!((ze=o.nodes)!=null&&ze.length)&&re>=Rt.value.length-2,Ze=!(Ue?.loading===!0||ut),tt=Kl.get(re),ct=tt?tt.allowShrink&&Ze:Ze,Ve=tt&&!ct?Math.max(tt.height,we):we;Kl.set(re,{height:Ve,allowShrink:ct,version:De,el:ce}),yi==null&&(yi=yo?yo(G6):null,yi==null&&G6())})(N,G,O1(N,G))}function Wr(){for(const[N,G]of Cl)G&&Uf(N,G)}function Ay(){Os?.disconnect(),Os=null,Vo.clear()}function Y6(){for(;D1.length;)Bf(D1.pop())}Ke(qe,N=>{N&&$o("content")},{flush:"post"}),t({getVirtualMetrics:q1,captureVirtualState:function(N={}){var G;return ac(q1("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:N.allowFallbackAnchor===!0,requireViewport:N.requireViewport===!0,includeEmptyState:(G=N.includeEmptyState)==null||G})},restoreVirtualState:function(N,G={}){const re=G.restoreAnchor===!0,ce=G.restoreToken==null?"imperative":String(G.restoreToken);Qu=N,ed={restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0},!j6(N,{restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0})&&by(N)||(Qu=null,ed=null)},forceMeasure:function(N="manual"){return zo(this,null,function*(){yield yt(),yield _y(),Wr(),td(),yield yt();const G=q1(N);return Z6(G,!0),G})},settle:D6,scrollToNode:function(N,G="start"){cc(),rs();const re=Rt.value.length;if(re<=0)return;const ce=Gs(N,0,re-1),we=()=>{var ze;const De=Ns({nodeIndex:ce,offsetWithinNodePx:0}),Ue=Wt(ce),ut=Xu(),Ze=(ze=ut?.clientHeight)!=null?ze:0,tt=Tn();let ct=De;if(G==="center")ct=De-Ze/2+Ue/2;else if(G==="end")ct=De-Ze+Ue;else if(G==="nearest"&&tt!=null){if(De>=tt&&De+Ue<=tt+Ze)return;ct=DeUs.value,N=>{if(!N){Ay();for(const G of mr.values())for(const re of G)Bf(re);mr.clear(),Bi.clear(),Y6(),pc()}},{immediate:!0}),Ke(Fe,N=>{N&&(function(){if(F&&Fe.value&&Cl.size){Y6();for(const G of[80,240,640]){const re=Gu(G,()=>{for(const[ce,we]of Cl)we&&Uf(ce,we)},"final");re!=null&&D1.push(re)}}})(),$o(N?"final":"content")});const NB=Yx(()=>$o("content"),16),zB=Yx(()=>$o("batch"),16);Ke([()=>Rt.value.length,()=>Ae.value],()=>{Ne.value&&uc(),NB()},{flush:"post",immediate:!0}),Ke([()=>ys.start,()=>ys.end],()=>{zB()},{flush:"post"});const{cleanupBatchScheduler:BB}=(function(N){const{props:G,isClient:re,isTestEnv:ce,parsedNodesIdentity:we,parsedNodeCount:ze,desiredRenderedCount:De,datasetKey:Ue,batchingEnabled:ut,incrementalRenderingActive:Ze,resolvedBatchSize:tt,resolvedInitialBatch:ct,renderedCount:Ve,adaptiveBatchSize:nt,previousRenderContext:gt,previousBatchConfig:mt,requestFrame:Et,cancelFrame:_t,hasIdleCallback:Ot,cleanupNodeVisibility:Kt,onDatasetKeyChanged:an,onDatasetChanged:sn}=N;let un=null,Ln="raf",On=null,wo=0,Ys=!1,Ds=!1;const Xl=new Set,gr=new Set;function md(){if(re){un!=null&&(Ln==="raf"&&_t?_t(un):Ln==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(un):Ln==="timeout"&&window.clearTimeout(un),un=null),wo+=1;for(const ri of Xl)_t&&_t(ri);for(const ri of gr)window.clearTimeout(ri);Xl.clear(),gr.clear(),On=null,Ys=!1,Ds=!1}}function t3(){return typeof performance<"u"?performance.now():Date.now()}function qy(ri){(function(qr){var Na;if(!Ze.value)return;const Ur=Math.max(2,(Na=G.renderBatchBudgetMs)!=null?Na:6),Zr=Math.max(1,tt.value||1),Jl=Math.max(1,Math.floor(Zr/4));qr>1.5*Ur?nt.value=Math.max(Jl,Math.floor(.8*nt.value)):qr<.6*Ur&&nt.value=Ur)return;const Zr=Math.max(1,ri),Jl=()=>{const gc=t3();un=null;const gd=On??Zr;On=null;const vc=t3();Ve.value=Math.min(Ur,Ve.value+gd),Kt(Ve.value),(function(oh,n3){if(!re)return void qy(n3);Ys=!0;const Gy=++wo;yt().then(()=>{var Yy;if(Gy!==wo)return;const nR=t3(),oR=Math.max(n3,nR-oh),Xy=()=>{Gy===wo&&qy(oR)};if(Et){let J1=null,yc=null,Qy=!1;const ew=()=>{Qy||(Qy=!0,J1!==null&&(Xl.delete(J1),J1=null),yc!==null&&(gr.delete(yc),window.clearTimeout(yc),yc=null),Xy())};return J1=Et(()=>{ew()}),Xl.add(J1),yc=window.setTimeout(()=>{J1!==null&&_t&&_t(J1),ew()},Math.max(32,(Yy=G.renderBatchIdleTimeoutMs)!=null?Yy:120)),void gr.add(yc)}const Jy=window.setTimeout(()=>{gr.delete(Jy),Xy()},0);gr.add(Jy)})})(gc,t3()-vc)};if(!re||Pi.immediate)return void Jl();const za=Math.max(0,(qr=G.renderBatchDelay)!=null?qr:16);if(On=On!=null?Math.max(On,Zr):Zr,un==null){if(!ce&&Ot&&window.requestIdleCallback){const gc=Math.max(0,(Na=G.renderBatchIdleTimeoutMs)!=null?Na:120);return Ln="idle",void(un=window.requestIdleCallback(()=>Jl(),{timeout:gc}))}if(Et&&!ce)return Ln="raf",void(un=Et(()=>{za===0?Jl():(Ln="timeout",un=window.setTimeout(()=>Jl(),za))}));Ln="timeout",un=window.setTimeout(()=>Jl(),za)}}function Zy(ri,Pi={}){Ys?Ds=!0:ri==null?Ky():Uy(ri,Pi)}function Ky(){Ze.value&&Uy(ut.value?Math.max(1,Math.round(nt.value)):Math.max(1,tt.value))}return Ke([we,ze,Ue,Ze,tt,ct,()=>G.renderBatchDelay],()=>{var ri;const Pi=ze.value,qr=gt.value,Na=Ue.value,Ur=!Object.is(Na,qr.key),Zr=Pi!==qr.total,Jl=Ur||Zr;gt.value={key:Na,total:Pi};const za=mt.value,gc=(ri=G.renderBatchDelay)!=null?ri:16,gd=za.batchSize!==tt.value||za.initial!==ct.value||za.delay!==gc||za.enabled!==Ze.value;mt.value={batchSize:tt.value,initial:ct.value,delay:gc,enabled:Ze.value},Ur&&an(Pi),(Jl||gd||!Ze.value)&&md(),(Jl||gd)&&(nt.value=Math.max(1,tt.value||1)),Jl&&sn();const vc=De.value;if(!Pi)return Ve.value=0,void Kt(0);if(!Ze.value)return Ve.value=vc,void Kt(Ve.value);const oh=Ur||qr.total===0;Ve.value=oh||gd?Math.min(vc,ct.value):Math.min(Ve.value,vc);const n3=Math.max(1,ct.value||tt.value||Pi);Ve.value{Ze.value&&(typeof Pi=="number"&&ri<=Pi||ri>Ve.value&&Zy())}),{cleanupBatchScheduler:md}})({props:C,isClient:F,isTestEnv:ms,parsedNodesIdentity:Ge,parsedNodeCount:ot,desiredRenderedCount:V1,datasetKey:SB,batchingEnabled:Ul,incrementalRenderingActive:Ni,resolvedBatchSize:gi,resolvedInitialBatch:si,renderedCount:Ae,adaptiveBatchSize:At,previousRenderContext:Ie,previousBatchConfig:lt,requestFrame:yo,cancelFrame:Lo,hasIdleCallback:yl,cleanupNodeVisibility:yB,onDatasetKeyChanged:N=>{pc(),j1(),Vt(),id(),N>0&&Re(N)},onDatasetChanged:()=>{pn.value&&Yl({immediate:!0})}});Ke([nc,pn,()=>M.value,()=>X()],([N,G])=>{if(!N)return Q9(),void m6();wB(),G?Yl({immediate:!0}):m6()},{flush:"post",immediate:!0}),Ke([()=>Rt.value.length,()=>pn.value],N=>zo(null,[N],function*([G,re]){re&&G&&F&&(yield yt(),Yl({immediate:!0}))}),{flush:"post"}),Ke(Pe,N=>{N&&(function(){var G;if(dt.value&&Mt.value&&Ft.value&&((G=Ut.value)!=null&&G[1]))return;const re=It({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ce=It({type:"list_item",children:[re],raw:"- Probe paragraph text"}),we=It({type:"list",ordered:!1,items:[ce],raw:"- Probe paragraph text"});dt.value=re,Mt.value=ce,Ft.value=we;const ze={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)ze[De]=It({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});Ut.value=ze})()},{immediate:!0}),Ke([()=>M.value,Pe],()=>{if(!Pe.value)return k6(),void(J.value=0);ty(),k6(),Pe.value&&M.value&&typeof ResizeObserver<"u"&&(Yu=new ResizeObserver(()=>{ty(),Ht.value&&_l(),Ne.value&&uc(),$o("resize")}),Yu.observe(M.value))},{immediate:!0}),Ke([Pe,So,tl],()=>zo(null,null,function*(){if(!Pe.value)return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();yield yt(),(function(){if(!Pe.value||typeof window>"u")return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();const N={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},G=ey(w6(R.value),".paragraph-node");N.paragraph=vm(R.value,G,"pre-wrap");const re=w6(O.value),ce=re?.querySelector(".paragraph-node");N.listItem=vm(O.value,ce,"pre-wrap");const we=Qt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,Ue;return(Ue=(De=U.value)==null?void 0:De.offsetHeight)!=null?Ue:0}),ze=Qt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,Ue;return(Ue=(De=O.value)==null?void 0:De.offsetHeight)!=null?Ue:0});N.listWrapperOverhead=Math.max(0,we-ze);for(let De=1;De<=6;De++){const Ue=ey(w6(Z[De]),`h${De}`);N.headings[De]=vm(Z[De],Ue,"pre-wrap")}se.value=N,Vt()})()}),{flush:"post",immediate:!0}),Ke(()=>Rt.value.length,()=>{pn.value&&Yl({immediate:!0})}),Ke([Pe,J],()=>{Vt(),pn.value&&Yl({immediate:!0}),Ht.value&&_l(),Ne.value&&uc(),$o("resize")},{immediate:!1}),Ke(()=>xl.value,N=>{if(N)for(const[G,re]of no)qf(G,re);else if(v6(),pn.value)Yl({immediate:!0});else for(const[G,re]of no)re&&La(G,!0)},{immediate:!1}),Ke([Ye,at,()=>X()],()=>{var N;(N=Zs.refresh)==null||N.call(Zs);for(const[G,re]of no)qf(G,re)},{immediate:!1}),Ke([()=>C.viewportPriority,()=>Rt.value.length,at],([N,G,re])=>{if(N!==!1){if(q.value&&(G<=200||G<=re)){q.value=!1;for(const[ce,we]of no)qf(ce,we)}}else q.value=!1}),Ke(()=>Ae.value,()=>{pn.value&&Yl({immediate:!0})}),Ke([Zl,Po,Xn,()=>Rt.value.length,pn],()=>{Dr()},{immediate:!0});let rd=null,ad=!1,hc=null;function cd(){rd=null,T6=null,A6=void 0,rc=null,id()}function X6(){pc(),j1(),Vt(),Wo.clear();const N=Rt.value.length;N>0&&Re(N),O6()}function J6(){K6(),X9(),nd=null,Z1=null,K1=null,Df=null,Qu=null,ed=null,ad=!1,cd(),uy("restore"),rs(),cc()}function ud(N){var G;return[(G=ws())!=null?G:"",Fo(),Vr(),jf.value,sd(N),Rt.value.length,Math.round(on(0,Rt.value.length)),Math.round(W1()),ts.count,Math.round(ts.total)].join(":")}function Ty(){return zo(this,null,function*(){var N,G,re,ce;const we=(N=o.virtualScroll)==null?void 0:N.settledToken,ze=sd(we),De=Fo(),Ue=ws(),ut=tl.value;if(Xe.value&&((G=o.virtualScroll)==null?void 0:G.settleMode)==="manual"&&Of(we))if(E6()){if(ud(we)!==rc&&!ad){ad=!0;try{const Ze=yield D6({reason:"manual",expectedSettledTokenKey:ze}),tt=sd()===ze;H6(De,Ue,ut)&&Ze.sessionKey===De&&Ze.threadKey===Ue&&tt&&Ze.stable&&Ze.phase==="final"&&(rc=ud((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{ad=!1,yield yt();const Ze=(ce=o.virtualScroll)==null?void 0:ce.settledToken,tt=Of(Ze)?ud(Ze):"";H6(De,Ue,ut)&&tt&&rc!==tt&&Ty()}}}else $o("manual")})}Ke(Xe,(N,G)=>{if(N!==G){if(!N)return J6(),void K6();J6(),X6(),hc=tl.value,$o("content")}},{flush:"post"}),Ke([Xe,tl],([N,G])=>{N?hc!=null?hc!==G&&(hc=G,(function(re="resize"){pc(),j1(),Vt(),Wo.clear();const ce=Rt.value.length;ce>0&&Re(ce),O6(),Z1=null,K1=null,Df=null,nd=null,ad=!1,cd(),ky(),yt(()=>{Wr(),Ht.value&&_l(),Ne.value&&uc(),$o(re)})})("resize")):hc=G:hc=null},{flush:"post",immediate:!0}),Ke([Xe,()=>Fo(),()=>ws()],([N])=>{N&&(J6(),X6(),uy("content"),$o("content"))}),Ke([Xe,()=>Fo(),()=>ws(),tl,()=>Rt.value.length],([N])=>{N&&(function(G="async-node"){let re=!1;for(const[ce,we]of Array.from(Yt.entries()))C6(we)||(Yt.delete(ce),yn.delete(ce),re=!0);re&&(ic(),$o(G))})("async-node")},{flush:"post"}),Ke([Xe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.sessionKey},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey},()=>o.indexKey,()=>ee.value],([N])=>{N&&(id(),(function(G="content"){if(!Xe.value)return;const re=[],ce=Rt.value.length,we=y6(ce);for(const ze of Array.from(Wo.keys())){if(ze>=ce){re.push(ze);continue}if(ze=ce&&Wo.delete(ze);re.length&&((function(ze,De={}){const Ue=Array.from(ze,Number);Or(Ue);let ut=0;if(Hr(()=>(ut=Le(Ue,De),ut>0)),ut>0)(function(Ze){for(const tt of Ze)Wo.delete(tt)})(Ue);else for(const Ze of Ue)vs.delete(Ze)})(re,{notify:!1}),Vt(),cd(),Ht.value&&_l(),Ne.value&&uc(),$o(G))})("content"))},{flush:"post",immediate:!0}),Ke([Xe,()=>Rt.value.length,()=>Fo(),()=>ws()],([N,G,re,ce],[we,ze,De,Ue])=>{N&&we&&re===De&&ce===Ue&&G!==ze&&cd()},{flush:"post"}),Ke([Xe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.heightCache},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.heightCacheWidth},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreState},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey},()=>Rt.value.length,()=>Fo(),J],()=>{ky()},{flush:"post",immediate:!0}),Ke([Xe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreState},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreAnchor},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey},()=>Rt.value.length,()=>Fo(),J],N=>zo(null,[N],function*([G,re]){if(!G||!re)return;yield yt();const ce=(function(){var we;const ze=(we=o.virtualScroll)==null?void 0:we.restoreAnchor;return ze==null||ze===!1?null:ze===!0?"true":String(ze)})();j6(re,{restoreAnchor:ce!=null,restoreToken:ce??void 0})}),{flush:"post",immediate:!0}),Ke([Xe,J,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.restoreState},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.measurementKey}],([N])=>{var G;if(!N)return;const re=(G=o.virtualScroll)==null?void 0:G.restoreState;re&&Z1&&K1==="restore"&&(yy(re)||(X6(),Z1=null,K1=null,$o("resize")))},{flush:"post"}),Ke([Xe,()=>Rt.value.length,()=>Fo(),J],N=>zo(null,[N],function*([G]){var re;const ce=Qu,we=ed;G&&ce&&(yield yt(),!j6(ce,{restoreAnchor:we?.restoreAnchor===!0,restoreToken:(re=we?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:we?.allowUncapturedAnchor===!0})&&by(ce)||(Qu=null,ed=null))}),{flush:"post",immediate:!0}),Ke([Xe,Fe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.settleMode},()=>Fo(),()=>ws(),tl,vi,ft,()=>Ae.value,V1,()=>ts.count,()=>ts.total],([N,G,re])=>{if(!N||G!==!0||re==="manual"||!I6())return;const ce=(function(){var we;const ze=Rt.value.length;return[(we=ws())!=null?we:"",Fo(),Vr(),jf.value,ze,Math.round(on(0,ze)),Math.round(W1()),ts.count,Math.round(ts.total)].join(":")})();rd!==ce&&(rd=ce,D6({reason:"final"}).then(we=>{we.stable||rd!==ce||(rd=null)}))},{flush:"post",immediate:!0}),Ke([Xe,Fe,()=>{var N;return(N=o.virtualScroll)==null?void 0:N.settleMode},()=>{var N;return(N=o.virtualScroll)==null?void 0:N.settledToken},()=>Fo(),()=>ws(),tl,vi,ft,()=>Ae.value,V1,()=>Rt.value.length,()=>ts.count,()=>ts.total],()=>{Ty()},{flush:"post",immediate:!0}),Ke([()=>Rt.value.length,pn,Po,Xn,()=>ys.start,()=>ys.end],([N,G,re,ce,we,ze])=>{he.value&&Hn("virtualization",{nodes:N,virtualization:G,maxLiveNodes:re,buffer:ce,focusIndex:Zl.value,scroll:G?(()=>{const De=Te.value||Se();return De?{reverse:je(De),scrollTop:Math.round(De.scrollTop),scrollTopAbs:Math.round(Math.abs(De.scrollTop)),scrollHeight:Math.round(De.scrollHeight),clientHeight:Math.round(De.clientHeight)}:null})():null,liveRange:{start:we,end:ze},rendered:Ae.value})}),Ke([()=>C.customId],([N],G,re)=>{if(!N||en)return;const ce=(function(we,ze){return we?(zs.controllers[we]=ze,()=>{zs.controllers[we]===ze&&delete zs.controllers[we]}):()=>{}})(N,{captureRestoreAnchor:X0,restoreAnchor:J0,getAnchorDrift:qu,getReport:_B});re(()=>{ce()})},{immediate:!0}),vo(()=>{(function(){if(Xe.value)try{Wr(),td();const N=q1("manual");xy(N)&&(j(N),nd=N,W6=od());const G=ac(N,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});G&&(H(G),G.anchor&&D(G.anchor),dc=ld(G))}catch{}})(),BB(),v6(),xn(),Ay();for(const N of mr.values())for(const G of N)Bf(G);mr.clear(),Bi.clear(),Wo.clear(),Y6(),pc(),k6(),rs(),cc(),K6(),Q9(),m6()});const RB=Yd("ViewportDeferredMermaidBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index11-BtnGHbJw.js"),__vite__mapDeps([9,7]))).default}catch(N){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',N),Di}}),loadingComponent:uS,delay:0}),uS),PB=Yd("ViewportDeferredInfographicBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index10-DRKt26_3.js"),[])).default}catch(N){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',N),Di}}),loadingComponent:cS,delay:0}),cS),FB=Yd("ViewportDeferredD2BlockNode",Rl(()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index8-Cir0nNuz.js"),[])).default}catch(N){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',N),Di}})),Di),Ey={text:is,paragraph:B0,heading:Zp,code_block:rm,list:hu,list_item:pu,blockquote:x4,table:_2,definition_list:S4,footnote:C4,footnote_reference:rl,footnote_anchor:k2,admonition:E4,vmr_container:A4,hardbreak:f1,link:Li,image:d1,thematic_break:M4,math_inline:fr,math_block:l$,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,inline_code:hi,html_inline:al,reference:Ti,html_block:b2},jB=B(()=>x6()),Iy=B(()=>Kx(C.codeBlockProps)),OB=B(()=>Kx(C.codeBlockProps,{omit:["langs"]})),Ly=B(()=>St(St({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,monacoOptions:C.codeBlockMonacoOptions,themes:C.themes,langs:h.value==="shiki"?C.langs:void 0,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ye.value=="boolean"?{showTooltips:ye.value}:{}),OB.value)),$y=B(()=>St(wn(St({},Ly.value),{langs:C.langs}),Iy.value));function Ny(N){return typeof N=="boolean"?N:void 0}const HB=B(()=>{const N=C.codeBlockProps||{},G={},re=Ny(N.showLineNumbers);re!==void 0&&(G.showLineNumbers=re);const ce=Ny(N.diffInline);ce!==void 0&&(G.diffInline=ce);const we=(function(ze){const De=Number(ze);return Number.isFinite(De)&&De>0?De:void 0})(N.reservedHeightPx);return we!==void 0&&(G.reservedHeightPx=we),G}),DB=B(()=>St(St({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,themes:C.themes,langs:C.langs,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ye.value=="boolean"?{showTooltips:ye.value}:{}),Iy.value)),VB=B(()=>St({},C.mermaidProps||{})),zy=B(()=>St({},C.d2Props||{})),WB=B(()=>St({},C.infographicProps||{})),dd=B(()=>({typewriter:f.value,fade:C.fade,customHtmlTags:Io.value.customHtmlTags})),qB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltip:ye.value}:{})),UB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{})),ZB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{})),KB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{}));function GB(N){return Array.isArray(N.children)&&N.children.length>0}const Zf=B(()=>bB.value.map(N=>{var G,re,ce,we,ze,De,Ue,ut;let Ze=(function(_t){var Ot,Kt,an,sn,un,Ln,On;if(_t.type!=="code_block")return _t;const wo=_t,Ys=[String((Ot=wo.language)!=null?Ot:""),String((Kt=wo.loading)!=null?Kt:""),String((an=wo.diff)!=null?an:""),String((sn=wo.code)!=null?sn:""),String((un=wo.originalCode)!=null?un:""),String((Ln=wo.updatedCode)!=null?Ln:""),String((On=wo.raw)!=null?On:"")].join("\0"),Ds=Ta.get(wo);if(Ds&&Ds.signature===Ys)return Ds.node;const Xl=St({},wo);return Ta.set(wo,{signature:Ys,node:Xl}),Xl})(N.node);const tt=Kf(Ze);let ct=Fy(Ze,tt);if((Ze.type==="html_block"||Ze.type==="html_inline")&&ct===Ey[Ze.type]){const _t=Ze,Ot=String((G=_t.tag)!=null?G:"").trim().toLowerCase()||NI(_t.content);if(Ot){const Kt=Un.value[Ot];if(hs.value.has(Ot)&&Kt)ct=Kt,Ze=wn(St({},_t),{type:Ot,tag:Ot,content:_ae(_t.content,Ot)});else if(zI((re=_t.content)!=null?re:_t.raw,Ot)){const an=String((we=(ce=_t.content)!=null?ce:_t.raw)!=null?we:"");Ze.type==="html_inline"?(ct=is,Ze={type:"text",content:an,raw:an}):(ct=B0,Ze={type:"paragraph",children:[{type:"text",content:an,raw:an}],raw:an})}}}const Ve=Ze.type==="code_block"&&h.value==="pre"&&ct===Di&&!Q6(Un.value,tt);let nt=St({},(function(_t,Ot,Kt){const an=Ot??Kf(_t);if(_t.type==="code_block"){const sn=an?Q6(Un.value,an):void 0;if(Kt&&h.value==="pre"&&!sn&&Kt===Di)return HB.value;if(Kt&&an&&Kt===sn)return an==="mermaid"?Ry(_t):an==="infographic"?Py(_t):an==="d2"||an==="d2lang"?zy.value:$y.value;if(Kt&&Kt===Un.value.code_block)return $y.value;if(oy(Kt))return DB.value}return an==="mermaid"?Ry(_t):an==="infographic"?Py(_t):an==="d2"||an==="d2lang"?zy.value:_t.type==="link"?qB.value:_t.type==="list"?UB.value:_t.type==="blockquote"?ZB.value:_t.type==="table"?KB.value:_t.type==="code_block"?Ly.value:dd.value})(Ze,tt,ct));const gt=Pe.value?sc.value[N.index]:null;Ze.type==="code_block"&>?.kind==="code-block"&&(nt=wn(St({},nt),Ve?{reservedHeightPx:(ze=gt.height)!=null?ze:gt.contentHeight}:{estimatedHeightPx:gt.height,estimatedContentHeightPx:gt.contentHeight,estimatedDiffInline:gt.diffInline})),Ve||Ze.type!=="code_block"||tt!=="mermaid"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(St({},nt),{estimatedPreviewHeightPx:L5(E5(String((De=Ze.code)!=null?De:"")))})),Ve||Ze.type!=="code_block"||tt!=="infographic"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(St({},nt),{estimatedPreviewHeightPx:$5(I5(String((Ue=Ze.code)!=null?Ue:"")))})),Ze.type==="math_block"&&(nt=wn(St({},nt),{cacheScope:Bo}));const mt=(function(_t,Ot){const Kt=String(_t.type);return!Af(Kt)&&Un.value[Kt]===Ot})(Ze,ct),Et=mt?Mv(Ze,ve.value):void 0;return wn(St({},N),{node:Ze,component:ct,bindings:nt,customBindings:St(St({},Et??{}),nt),rendersCustomNode:mt,hasSlotChildren:GB(Ze),slotContent:String((ut=Ze.content)!=null?ut:""),isCodeBlock:Ze.type==="code_block",indexKey:`${jB.value}-${N.index}`,vnodeKey:`${xB.value}\0${N.index}\0${Ze.type}`})}));function Kf(N){var G;return N?.type==="code_block"?String((G=N.language)!=null?G:"").trim().toLowerCase():""}function Q6(N,G){const re=G.trim().toLowerCase();if(re)for(const ce of[re,Wp(re),HL(re)]){const we=ce&&N[ce];if(we)return we}}function By(N,G,re,ce){var we,ze;const De=St({},N.value);return Kc(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=ce(re(String((we=G?.code)!=null?we:"")),void 0,De.maxHeight==="none"?null:(ze=Kc(De.maxHeight))!=null?ze:void 0)),De}function Ry(N){return By(VB,N,E5,L5)}function Py(N){return By(WB,N,I5,$5)}function Fy(N,G){if(!N)return g7;const re=Un.value,ce=re[String(N.type)];if(N.type==="code_block"){const we=G??Kf(N),ze=we?Q6(re,we):void 0;return ze||(h.value==="pre"?re.code_block||Di:we==="mermaid"?re.mermaid||RB:we==="infographic"?re.infographic||PB:we==="d2"||we==="d2lang"?re.d2||FB:ce||re.code_block||sy.value)}return ce||Ey[String(N.type)]||g7}function eh(N){s("click",N)}function YB(N){var G;(G=N.target)!=null&&G.closest("[data-node-index]")&&s("mouseover",N)}function XB(N){var G;(G=N.target)!=null&&G.closest("[data-node-index]")&&s("mouseout",N)}function jy(N){s("mouseover",N)}function Oy(N){s("mouseout",N)}const X1=V(null),Ri=V(!1),fd=V(null),JB=B(()=>!(C.domMode!=="minimal"||K.value||C.fade!==!1||f.value||Ri.value||mn.value||pn.value||We.value||Ro.value||vl.value||Object.keys(Un.value).length!==0));let pd,mc=null,th=0,Gf=0,Yf=0;const Hy=["code_block","admonition","table","math_block","html_block","image","thematic_break"],QB=new Set(Hy),Dy=[".typewriter-cursor",".height-estimation-probes",...Hy.map(N=>`[data-node-type="${N}"]`),"script","style"].join(",");function Vy(N){if(!N||typeof N!="object")return!1;const G=N.type;return typeof G=="string"&&QB.has(G)}function Xf(N){var G,re;if(!N||typeof N!="object")return 0;const ce=N,we=(re=(G=ce.raw)!=null?G:ce.content)!=null?re:ce.code;if(typeof we=="string")return we.length;const ze=ce.children;if(Array.isArray(ze))return ze.reduce((Ue,ut)=>Ue+Xf(ut),0);const De=ce.items;return Array.isArray(De)?De.reduce((Ue,ut)=>Ue+Xf(ut),0):0}function Jf(){pd&&(clearTimeout(pd),pd=void 0)}function nh(){th+=1,mc!=null&&(Lo?.(mc),mc=null)}function hd(){nh(),$a(),X1.value&&(X1.value.style.visibility="hidden")}function eR(N){var G;if(N.nodeType!==Node.TEXT_NODE||!((G=N.textContent)!=null?G:"").trim())return!1;const re=N.parentElement;return!!re&&!re.closest(Dy)}function tR(N){let G=N.lastChild;for(;G;){if(eR(G))return G;if(G.nodeType===Node.ELEMENT_NODE){const re=G;if(!re.matches(Dy)&&re.lastChild){G=re.lastChild;continue}}for(;G&&G!==N&&!G.previousSibling;)G=G.parentNode;if(!G||G===N)break;G=G.previousSibling}return null}function Wy(){const N=Zf.value;for(let G=N.length-1;G>=0;G--){const re=N[G];if(!re||Vy(re.node)||!Wf(re.index))continue;const ce=no.get(re.index);if(!ce)continue;const we=tR(ce);if(we)return we}return null}function $a(){fd.value&&(fd.value.classList.remove(dS),fd.value=null)}function Qf(){if(d.value!=="simple"||!F||!Ri.value||!M.value)return void $a();const N=Wy(),G=N?(function(re){var ce;const we=(ce=re.parentElement)==null?void 0:ce.closest(".text-node");return we instanceof HTMLElement?we:re.parentElement})(N):null;G!==fd.value&&($a(),G&&(G.classList.add(dS),fd.value=G))}function e3(){if(d.value!=="precise"||!F||!Ri.value||mc!=null)return;const N=th,G=()=>{mc=null,N===th&&(function(){var re,ce;if(d.value!=="precise"||!(F&&Ri.value&&M.value&&X1.value))return;const we=M.value,ze=X1.value;ze.style.visibility="hidden";const De=Wy();if(!De)return;let Ue=0,ut=0,Ze=20,tt=!1;if(De?.textContent){const ct=De.textContent.length,Ve=document.createRange();Ve.setStart(De,Math.max(0,ct-1)),Ve.setEnd(De,ct);const nt=typeof Ve.getClientRects=="function"?Ve.getClientRects():void 0,gt=(ce=nt?.[nt.length-1])!=null?ce:(re=De.parentElement)==null?void 0:re.getBoundingClientRect();if(gt){const mt=Qt("typewriterCursor.root.getBoundingClientRect",()=>we.getBoundingClientRect());Ue=gt.right-mt.left+we.scrollLeft,ut=gt.top-mt.top+we.scrollTop,Ze=gt.height||Ze,tt=!0}Ve.detach()}tt&&(ze.style.transform=`translate(${Math.max(0,Ue)}px, ${Math.max(0,ut)}px)`,ze.style.height=`${Ze}px`,ze.style.visibility="visible")})()};yo?mc=yo(G):G()}return Ke([ge,()=>o.content,()=>o.nodes,()=>C.typewriter,Fe],()=>zo(null,null,function*(){var N,G;if(!F||K.value||!de.value)return;if(Fe.value)return Ri.value=!1,Jf(),void hd();if((N=o.nodes)!=null&&N.length)return Ri.value=!1,Jf(),hd(),Gf=((G=o.content)!=null?G:"").length,void(Yf=ge.value.length);const re=(function(){var Ue,ut;return(Ue=o.nodes)!=null&&Ue.length?o.nodes.reduce((Ze,tt)=>Ze+Xf(tt),0):((ut=o.content)!=null?ut:"").length})(),ce=(function(){var Ue;return(Ue=o.nodes)!=null&&Ue.length?o.nodes.reduce((ut,Ze)=>ut+Xf(Ze),0):ge.value.length})(),we=!Vy(Rt.value[Rt.value.length-1]),ze=re>Gf,De=ce>Yf;if(!f.value||!we||!ze&&!De)return f.value&&we||(Ri.value=!1,hd()),Gf=re,void(Yf=ce);Gf=re,Yf=ce,Ri.value=!0,d.value==="precise"&&X1.value&&(X1.value.style.visibility="hidden"),Jf(),yield yt(),d.value==="simple"?Qf():($a(),e3()),pd=setTimeout(()=>{pd=void 0,Ri.value=!1},3e3)}),{flush:"post",immediate:!0}),Ke(Ri,N=>zo(null,null,function*(){N?(yield yt(),d.value!=="simple"?($a(),d.value==="precise"&&e3()):Qf()):hd()}),{flush:"post"}),Ke(d,()=>zo(null,null,function*(){if(F&&!K.value&&de.value&&Ri.value){if(yield yt(),d.value==="simple")return nh(),void Qf();$a(),d.value!=="precise"?hd():e3()}}),{flush:"post"}),Ke([()=>Ae.value,()=>ys.start,()=>ys.end],()=>zo(null,null,function*(){F&&!K.value&&de.value&&Ri.value&&(yield yt(),d.value!=="simple"?($a(),d.value==="precise"&&e3()):Qf())}),{flush:"post"}),vo(()=>{Jf(),nh(),$a(),Zn.clear()}),(N,G)=>{const re=yg("NodeRenderer",!0);return v(K)?(g(!0),S(Ce,{key:0},rt(Zf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onClick:eh,onMouseover:jy,onMouseout:Oy,onCopy:G[0]||(G[0]=we=>i(we)),onHandleArtifactClick:G[1]||(G[1]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onClick:eh,onMouseover:jy,onMouseout:Oy,onCopy:G[2]||(G[2]=we=>i(we)),onHandleArtifactClick:G[3]||(G[3]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(g(),S("div",{key:1,ref_key:"containerRef",ref:M,class:Be(["markstream-vue markdown-renderer",[{dark:C.isDark},{virtualized:pn.value},{"virtual-scroll-coordinated":qe.value},{"stable-layout":Sl.value},{"typewriter-simple-cursor":Ri.value&&d.value==="simple"}]]),"data-custom-id":C.customId,onClick:eh,onMouseover:YB,onMouseout:XB},[bt.value||pn.value?(g(),S(Ce,{key:0},[bt.value?(g(),ue(g4e,{key:0,width:So.value,"flow-root":pn.value||qe.value,"paragraph-node":dt.value,"list-item-node":Mt.value,"list-node":Ft.value,"heading-nodes":Ut.value,"set-paragraph-wrapper":mB,"set-list-item-wrapper":gB,"set-list-wrapper":vB,"set-heading-wrapper":kB},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):Y("",!0),pn.value?(g(),S("div",{key:1,class:"node-spacer",style:Gt({height:`${b6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],64)):Y("",!0),JB.value?(g(!0),S(Ce,{key:1},rt(Zf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[Wf(ce.index)?(g(),ue(cs(ce.component),io({key:0,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onMouseover:G[4]||(G[4]=we=>s("mouseover",we)),onMouseout:G[5]||(G[5]=we=>s("mouseout",we)),onCopy:G[6]||(G[6]=we=>i(we)),onHandleArtifactClick:G[7]||(G[7]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"])):Y("",!0)],64))),128)):(g(!0),S(Ce,{key:2},rt(Zf.value,ce=>(g(),S("div",{key:ce.vnodeKey,ref_for:!0,ref:we=>qf(ce.index,we),class:"node-slot","data-node-index":ce.index,"data-node-type":ce.node.type},[Wf(ce.index)?(g(),S("div",{key:0,ref_for:!0,ref:we=>(function(ze,De){var Ue;De||(function(ct){const Ve=`${x6()}-${ct}`;let nt=!1;for(const gt of Array.from(yn.keys())){const mt=Yt.get(gt);(mt?.index===ct||gt===Ve||gt.startsWith(`${Ve}-`))&&(yn.delete(gt),Yt.delete(gt),nt=!0)}nt&&(ic(),$o("async-node"))})(ze),Kl.delete(ze),(function(ct){var Ve;const nt=((Ve=Bi.get(ct))!=null?Ve:0)+1;Bi.set(ct,nt)})(ze);const ut=mr.get(ze);if(ut){for(const ct of ut)Bf(ct);mr.delete(ze)}if((function(ct){const Ve=Vo.get(ct);Ve&&(Os?.unobserve(Ve),Qi.delete(Ve),Vo.delete(ct))})(ze),!De||!Us.value)return Cl.delete(ze),void Bi.delete(ze);Cl.set(ze,De);const Ze=()=>{Uf(ze,De)};queueMicrotask(Ze);const tt=(Os||typeof ResizeObserver>"u"||(Os=new ResizeObserver(ct=>{if(ct.length)for(const Ve of ct){const nt=Qi.get(Ve.target),gt=Vo.get(nt??-1);nt!=null&>&&Uf(nt,gt)}else Wr()})),Os);if(tt&&(Vo.set(ze,De),Qi.set(De,ze),tt.observe(De)),typeof window<"u"){const ct=((Ue=Rt.value[ze])==null?void 0:Ue.type)==="code_block"?[16,80,240,800]:Fe.value?[80]:[];if(ct.length){const Ve=ct.map(nt=>Gu(nt,Ze,"node-resize")).filter(nt=>nt!=null);Ve.length&&mr.set(ze,Ve)}}})(ce.index,we),class:"node-content"},[ce.isCodeBlock?ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:1,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[12]||(G[12]=we=>i(we)),onHandleArtifactClick:G[13]||(G[13]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:2,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[14]||(G[14]=we=>i(we)),onHandleArtifactClick:G[15]||(G[15]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(qi,{key:0,name:"fade",css:C.fade!==!1,appear:C.fade!==!1},{default:ae(()=>[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[8]||(G[8]=we=>i(we)),onHandleArtifactClick:G[9]||(G[9]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[10]||(G[10]=we=>i(we)),onHandleArtifactClick:G[11]||(G[11]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(g(),S("div",{key:1,class:"node-placeholder",style:Gt({height:`${Wt(ce.index)}px`})},null,4))],8,w4e))),128)),Ri.value&&d.value==="precise"?(g(),S("span",{key:3,ref_key:"typewriterCursorRef",ref:X1,class:"typewriter-cursor","aria-hidden":"true"},null,512)):Y("",!0),pn.value?(g(),S("div",{key:4,class:"node-spacer",style:Gt({height:`${_6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],42,y4e))}}})),[["__scopeId","data-v-a9489508"]]),Xi=k$;Xi.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Xi.__name,Xi.name].filter(n=>!!n));for(const n of t)e.component(n,k$)};const Ov=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"})),k4e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},b4e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},_4e={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},x4e={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},S4e={class:"admonition-title"},C4e=["aria-expanded","aria-controls"],M4e=["id"],E4=ho(Je({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=B(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const c=o.node.kind||"note";return c.charAt(0).toUpperCase()+c.slice(1)}),l=V(!!o.node.collapsible&&!((n=o.node.open)==null||n));function r(){o.node.collapsible&&(l.value=!l.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(c,u)=>(g(),S("div",{class:Be(["admonition",[`admonition-${o.node.kind}`]])},[b("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(g(),S("svg",k4e,[...u[1]||(u[1]=[b("circle",{cx:"12",cy:"12",r:"10"},null,-1),b("path",{d:"M12 16v-4"},null,-1),b("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(g(),S("svg",b4e,[...u[2]||(u[2]=[b("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),b("path",{d:"M9 18h6"},null,-1),b("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(g(),S("svg",_4e,[...u[3]||(u[3]=[b("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),b("path",{d:"M12 9v4"},null,-1),b("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(g(),S("svg",x4e,[...u[4]||(u[4]=[b("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),b("path",{d:"M12 8v4"},null,-1),b("path",{d:"M12 16h.01"},null,-1)])])):Y("",!0),b("span",S4e,I(i.value),1),o.node.collapsible?(g(),S("button",{key:4,class:"admonition-toggle","aria-expanded":!l.value,"aria-controls":`${a}-content`,onClick:r},[(g(),S("svg",{style:Gt({rotate:l.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...u[5]||(u[5]=[b("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,C4e)):Y("",!0)]),Jn(b("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[W(v(Xi),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:u[0]||(u[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,M4e),[[_i,!l.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);E4.install=e=>{e.component(E4.__name,E4)};const b7=()=>Cs(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let H3=null,D3=b7,V3=null,fS=!1,pS=!1;function LKe(){return zo(this,null,function*(){if(H3)return H3;const e=D3;return e?e===b7&&fS?null:V3||(V3=zo(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===b7)return e===D3&&(fS=!0,(function(o){pS||(pS=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===D3&&(V3=null)}return e!==D3?null:t?(H3=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),H3):null}),V3):null})}let W3=null,b$=null,q3=null;function $Ke(){return typeof b$=="function"}function NKe(){return zo(this,null,function*(){if(W3)return W3;const e=b$;return e?q3||(q3=zo(null,null,function*(){const t=yield e(),n=(function(o){var s,i,l;if(!o)return null;const r=(s=o.default)!=null?s:o,a=typeof r=="function"&&typeof((i=r.prototype)==null?void 0:i.render)=="function"?r:(l=o.Infographic)!=null?l:r?.Infographic;return typeof a=="function"?a:null})(t);return n?(W3=n,W3):null}).finally(()=>{q3=null}),q3):null})}const zKe=Symbol("markstreamLanguageIconResolver"),_$=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],A4e=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),_7=[..._$].toSorted((e,t)=>t.length-e.length).join("|"),ym=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${_7}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${_7})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(""),"gi"),x$=/[),.;!?]+$/;function T4e(e){const t=e.toLowerCase();return _$.some(n=>t.endsWith(`.${n}`))}function E4e(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${_7}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function I4e(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(x$,"");if(!s)return null;const i=s.split("/").pop()??s,l=s.includes("/"),r=A4e.has(i),a=T4e(i);if(l&&!r&&!a)return null;if(!l&&!r){const d=t.aliases?.get(i);if(!d)return null;s=d}const c=o[2]??o[3],u=c?Number(c):void 0;return{path:s,line:u!==void 0&&Number.isFinite(u)&&u>0?u:void 0}}function L4e(e,t={}){const n=[];ym.lastIndex=0;let o;for(;(o=ym.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",l=s.indexOf(i);if(l<0)continue;const r=o[2]??o[3];let a=i+(r?s.slice(l+i.length):"");const c=a.replace(x$,""),u=a.length-c.length;a=c;const d=I4e(a,t);if(!d)continue;const f=o.index+l,p=f+a.length;n.push({...d,start:f,end:p,text:a}),u>0&&(ym.lastIndex-=u)}return n}const $4e=12e4,N4e=6e4,z4e=32,B4e=3e4,hS=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function R4e(e){let t=0,n=0,o=0;hS.lastIndex=0;let s;for(;(s=hS.exec(e))!==null;){const l=s[3]??"";t+=1,n+=l.length,o=Math.max(o,l.length)}return{codeRenderer:e.length>=$4e||n>=N4e||t>=z4e||o>=B4e?"pre":"shiki",codeFenceCount:t,codeChars:n}}function U3(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o--)n++;return n%2===1}const P4e=/\s/,F4e=/\p{Nd}/u;function p1(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function j4e(e,t){if(t<=0)return;const n=e.codePointAt(t-1),o=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function mS(e){return e!==void 0&&P4e.test(e)}function Au(e){return e!==void 0&&F4e.test(e)}function H5(e){return e!==void 0&&e>="A"&&e<="Z"}const S$=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function O4e(e,t){if(!H5(e[t-1]))return!1;let n=t-1;for(;n>0&&H5(e[n-1]);)n--;return S$.test(e.slice(n,t))||Au(p1(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(p1(e,t+1)??"")}function H4e(e,t){if(!H5(e[t-1]))return!1;let n=t-1;for(;n>0&&H5(e[n-1]);)n--;return S$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}function D4e(e,t){const n=e[t+1];return Au(p1(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−")&&Au(p1(e,t+2))}const V4e=/^[-–—,;:~([/]$/;function W4e(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Au(p1(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&V4e.test(o)}const wm=String.raw`[,;:~\-–—/\s()=*×]|and|or`;function q4e(e){let t=e.replace(new RegExp(String.raw`^(?:${wm})+`,"u"),"");for(;;){const o=t.replace(new RegExp(String.raw`^\p{L}+(?:${wm})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(o===t)break;t=o}if(!/\p{Nd}/u.test(t))return!1;const n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${wm})+${n}(?:\p{L}+)?)*$`,"u").test(t)}const gS=1,vS=2,yS=3,kr=-1;function U4e(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(kr),s=new Int32Array(t+1),i=new Int32Array(t+1),l=[],r=[];{const M=[];for(let Z=0;Z`*—–“”‘’'),c=[];for(const M of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))c.push(M.index);for(const M of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))c.push(M.index);for(const M of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(M.index===0||!/[\w~/.-]/.test(e[M.index-1]??""))&&c.push(M.index);c.sort((M,R)=>M-R);let u=-1;for(const M of c){if(MM+7&&!/[\w/?#@~.+&=%-]/.test(e[R+1]??""))break}}l.push([M,R]),u=R}const d=[];for(let M=0;M]/.test(q))continue;let te=kr,ee=kr;for(;O"){ee=O;break}if(!U&&J==="/"&&e[O+1]===">"){ee=O+1;break}if(!/\s/.test(J)){te=O;break}for(;O"){ee=O;break}if(U){te=O;break}if(se==="/"&&e[O+1]===">"){ee=O+1;break}const Q=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(O));if(!Q){te=O;break}O+=Q[0].length;let me=O;for(;me`]+/.exec(e.slice(me));if(!Ye){te=me;break}O=me+Ye[0].length}}}if(ee!==kr)d.push([M,ee+1]),M=ee;else if(te!==kr){const J=e.indexOf("<",M+1);M=(J!==-1&&J",M+2);te===-1?f=!1:(d.push([M,te+2]),M=te+1,O=!0)}else if(R==="!"){if(e[M+2]==="-"&&e[M+3]==="-"){if(p){const te=e.indexOf("-->",M+4);te===-1?p=!1:(d.push([M,te+3]),M=te+2,O=!0)}}else if(e.startsWith("[CDATA[",M+2)){if(h){const te=e.indexOf("]]>",M+9);te===-1?h=!1:(d.push([M,te+3]),M=te+2,O=!0)}}else if(m&&/[A-Z]/.test(e[M+2]??"")){const te=e.indexOf(">",M+3);te===-1?m=!1:(d.push([M,te+1]),M=te,O=!0)}}if(O)continue;if(R!==void 0&&/[a-zA-Z]/.test(R)){const te=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(M+1));if(te){let ee=M+1+te[0].length;for(;ee"&&e[ee]!=="<"&&!/\s/.test(e[ee]);)ee++;if(e[ee]===">"){d.push([M,ee+1]),M=ee;continue}}}if(R===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(R))continue;let U=M+1;for(;U"&&(d.push([M,U+1]),M=U)}}d.sort((M,R)=>M[0]-R[0]);const k=[];for(const M of d){const R=k.at(-1);R&&M[0]<=R[1]?R[1]=Math.max(R[1],M[1]):k.push([M[0],M[1]])}l.push(...k);const x=M=>{let R=0;for(;R=(r[R]?.[1]??0);)R++;const O=r[R];return O!==void 0&&M>=O[0]},y=M=>{let R=0;for(;R=(k[R]?.[1]??0);)R++;const O=k[R];return O!==void 0&&M>=O[0]},w=[];let _=null,A=0,P=!1;for(let M=0;M"&&(P=!1);continue}if(!(x(M)||y(M))){if(_!==null){e[M]===_&&(_=null);continue}if(w.length>0&&(e[M]==='"'||e[M]==="'")&&M>0&&/\s/.test(e[M-1]??""))_=e[M];else if(e[M]==="[")A++;else if(e[M]==="]")A>0&&e[M+1]==="("&&(w.push(M),P=e[M+2]==="<",M++),A=Math.max(0,A-1);else if(e[M]==="("&&w.length>0)w.push(-1);else if(e[M]===")"&&w.length>0){const R=w.pop();if(R!==void 0&&R>=0){const O=e.slice(R+2,M);(/\s/.exec(O)===null||O.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(O)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(O))&&l.push([R,M+1])}}}}l.sort((M,R)=>M[0]-R[0]);const z=[];for(const M of l){const R=z.at(-1);R&&M[0]<=R[1]?R[1]=Math.max(R[1],M[1]):z.push([M[0],M[1]])}const L=M=>{let R=0,O=z.length-1;for(;R<=O;){const U=R+O>>1,Z=z[U];if(Z===void 0)return!1;if(M=Z[1])R=U+1;else return!0}return!1},E=new Uint8Array(t);{let M=-1,R=!1,O=!1,U=0;for(let Z=0;Z<=t;Z++){const q=Z0&&(te==="{"?U++:te==="}"&&U--)}}for(let M=0;M=0;M--)n[M]===yS&&(T=M),o[M]=T;const $=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,C=/[^\p{L}\p{Nd}\s]$/u,j=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,D=(M,R)=>{const O=p1(e,M+1);if(O===void 0||!$.test(O))return!1;const U=o[M+1]??kr;if(U!==kr){const Z=e.slice(M+1,U);return!(U-(M+1)===((e.codePointAt(M+1)??0)>65535?2:1))&&j.test(Z)||/[,;:!?]$/.test(Z)||/^[a-z]{2,}$/.test(Z)?!1:(s[U]??0)-(s[M+1]??0)===0&&(i[U]??0)-(i[M+1]??0)===0}return C.test(R)||j.test(R)||H.test(R)};return(M,R=-1)=>{if(e[M]!=="$"||n[M]===gS||e[M+1]==="$"||e[M-1]==="$"&&R!==M||O4e(e,M)||M+1>=t||mS(p1(e,M+1)))return null;const O=o[M+1]??kr;if(O===kr||(s[O]??0)-(s[M+1]??0)>0||(i[O]??0)-(i[M+1]??0)>0)return null;const U=e.slice(M+1,O);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(U)||e[O+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(U)||Au(j4e(e,M))&&q4e(U)||D4e(e,M)&&(D(O,U)||H4e(e,O)||/\s/.test(U)&&/\p{Nd}$/u.test(U)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(U)||!1)||e[O+1]==="$"&&!/\p{L}/u.test(U)&&C.test(U)?null:{content:U,end:O+1}}}const Z4e=/^---[ \t]*(?:\r\n|\n)/,K4e=/^---[ \t]*$/;function G4e(e){const t=Z4e.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const o=n;for(;n<=e.length;){let s=e.indexOf(` -`,n);s===-1&&(s=e.length);let i=e.slice(n,s);if(i.endsWith("\r")&&(i=i.slice(0,-1)),K4e.test(i)){const l=e.slice(o,n);if(l==="")return{frontmatter:null,body:e};const r=s\n]*>|[^()\s]+)\)/g,Y4e=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,X4e=/^[a-zA-Z]:(?:[\\/]|%5c)/i,J4e=/^[A-Za-z0-9._~-]$/,D5="pythinker-code://skill/";let kS;function bS(e){return e.replaceAll("%","%25").replaceAll("&","%26").replaceAll("<","%3C").replaceAll(">","%3E").replaceAll(/[[\]\\]/g,"\\$&").replaceAll(` -`,"%0A").replaceAll("\r","%0D")}function Q4e(e){return e.replaceAll(/\\([\\[\]])/g,"$1").replaceAll("%26","&").replaceAll("%3C","<").replaceAll("%3E",">").replaceAll("%0A",` -`).replaceAll("%0D","\r").replaceAll("%25","%")}function C$(e){let t="";for(const n of e){const o=n.codePointAt(0);o>127||J4e.test(n)?t+=n:t+=`%${o.toString(16).toUpperCase().padStart(2,"0")}`}return t}function e5e(e){const t=e.split("/").map(C$).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function M$(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function _S(e){const t=M$(e);try{return decodeURIComponent(t)}catch{return t}}function t5e(e){const t=M$(e);return!t||t.startsWith("#")||t.startsWith("?")||t.startsWith("//")?null:t.startsWith(D5)&&t.length>D5.length?"skill":Y4e.test(t)&&!X4e.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?"folder":"file"}function km(e,t){if(!t)return;const n=e.at(-1);n?.type==="text"?n.value+=t:e.push({type:"text",value:t})}function Hv(e){if(e.kind==="skill")return`[${bS(e.name)}](${D5}${C$(e.name)})`;const t=e.kind==="folder"&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${bS(e.name)}](${e5e(t)})`}function A$(e){const t=[];let n=0;wS.lastIndex=0;for(const o of e.matchAll(wS)){const s=o.index;km(t,e.slice(n,s));const i=o[0],l=o[1],r=o[2],a=e[s-1]==="!"?null:t5e(r);if(a&&l){const c=a==="skill"?_S(r).slice(D5.length):void 0;t.push({type:"mention",attrs:{kind:a,name:c??Q4e(l),path:a==="skill"?"":_S(r)}})}else km(t,i);n=s+i.length}return km(t,e.slice(n)),t}function T$(e){const t=A$(e.args??"").filter(o=>o.type==="mention"&&o.attrs.kind==="skill"),n=t[0];return t.length===1&&n?.type==="mention"&&n.attrs.name===e.name}function E$(e,t){if(T$(e))return t.revivePill?e.args??"":null;if(e.name.includes(" "))return null;const n=e.args??"";return`/skill:${e.name}${n.length>0?` ${n}`:""}`}function n5e(e,t){return E$(e,t)!==null}function o5e(e){if(T$(e))return e.args??"";const t=Hv({kind:"skill",name:e.name,path:""});return e.args?`${t} ${e.args}`:t}function xS(e){return kS??=new Intl.Segmenter("und",{granularity:"grapheme"}),Array.from(kS.segment(e),({segment:t})=>t)}function I$(e){const t=xS(e);if(t.length<=32)return e;const n=e.lastIndexOf("."),s=(n>=0?xS(e.slice(n)).length:0)+4,i=31-s;return i<8?`${t.slice(0,31).join("")}…`:`${t.slice(0,i).join("")}…${t.slice(-s).join("")}`}function s5e(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function i5e(e){return new Worker("/assets/mermaidParser.worker-DimdFOud.js",{type:"module",name:e?.name})}const l5e={key:0,class:"md-frontmatter"},r5e={class:"diff-bar"},a5e=["aria-label","onClick"],c5e={class:"diff-pre"},u5e={key:0,class:"diff-sign"},d5e={class:"diff-text"},f5e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Z3="pythinker-code://skill/",SS="md-table-wide",CS="md-table-toggle",MS="md-table-fade",AS="md-table-toggle--show",p5e="md-table-at-end",h5e=26,TS="md-code-wrap",bm="md-code-wrap-toggle",_m="md-code-nums",ES="md-code-nums-toggle",IS="data-md-code-css",m5e=` +`)&&!(function(Z){const q=sS(Z);if(iS(q))return!1;const te=g$(q);return te.length>=2&&te.some(ee=>ee.trim())})(O))})(l.value,H)?A():(function(){if(m+=1,p)return;const R=Math.max(0,(function(O){const U=O.parseCoalesceMs;return typeof U=="number"&&Number.isFinite(U)&&U>=0?U:80})(e)-(er()-k));R<=0?A():p=setTimeout(A,R)})())},{flush:"sync",immediate:!0}),pf(_);const P=B(()=>{var H,D,M,R;return kae(e.customHtmlTags,(H=e.parseOptions)==null?void 0:H.customHtmlTags,(R=(M=(D=t.customComponentsMap)==null?void 0:D.value)!=null?M:{},Object.entries(R).map(([O,U])=>{const Z=Vl(O);return U==null||!Z||Af(Z)||TI.has(Z)||_f.has(Z)?"":Z}).filter(Boolean)))}),z=B(()=>{const{key:H,tags:D}=bae(P.value);if(!H)return o;const M=s.get(H);if(M)return M;const R=ix(t.instanceMsgId,{customHtmlTags:D});return s.set(H,R),R}),L=B(()=>{const H=z.value;if(!e.customMarkdownIt)return H;const D=e.customMarkdownIt(H);return H.__markstreamHasCustomParserExtensions=!0,D.__markstreamHasCustomParserExtensions=!0,D}),T=B(()=>{var H,D;const M=(H=e.parseOptions)!=null?H:{},R=t.effectiveFinal.value,O=P.value,U=R!=null,Z=O.length>0;return U||Z||M.streamParse==null?St(St(wn(St({},M),{streamParse:(D=M.streamParse)==null||D}),U?{final:R}:{}),Z?{customHtmlTags:O}:{}):M}),I=B(()=>{var H;return new Set(((H=T.value.customHtmlTags)!=null?H:[]).map(D=>String(D).trim().toLowerCase()).filter(Boolean))}),N=B(()=>oS(T.value,L.value,e.customMarkdownIt,{includeFinal:!0})),C=B(()=>oS(T.value,L.value,e.customMarkdownIt,{includeFinal:!1}));Ke([N,C],([H,D],[M,R])=>{M&&(H===M&&D===R||(A(),D!==R&&(r=[],u="")))},{flush:"sync"});const F=B(()=>{var H,D,M,R,O,U,Z,q,te,ee,J;if((H=e.nodes)!=null&&H.length)return r=[],u="",w(0),It(e.nodes.slice());const se=l.value;if(!se)return r=[],u="",w(-1),[];const Q=t.debugPerformanceEnabled.value,me=Q?er():0,xe=L.value,Ye=N.value,at=C.value;a&&Ye!==a&&(function(Oe){var Fe,pt;(pt=(Fe=Oe.stream)==null?void 0:Fe.reset)==null||pt.call(Fe)})(xe),c&&at!==c&&(r=[],u="");const X=Object.keys((M=(D=t.customComponentsMap)==null?void 0:D.value)!=null?M:{}).length>0||typeof T.value.postTransformNodes=="function";X!==d&&(r=[],u="");const oe=!X&&r.length>0&&se.startsWith(u)&&at===c,j=Q?nS(xe):null,K=Q?{}:void 0,he=aS(xe),ye=!he&&!X,ve=St(St(wn(St({},T.value),{__reuseStableTopLevelNodes:ye}),he?{__disableStreamParse:!0}:{}),K?{__timing:K}:{}),ie=EL(se,xe,ve),de=Q?er():0,be=Q?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let Se,je=Q?O3(ie.length):void 0,et=0,le=0,fe=0;if(oe){const Oe=Q?er():0,[Fe,pt]=(function(qt){var nn,Jt;const[kn,Dn]=qt.scanGlobalReferenceAppend(qt.previousContent,qt.content),xn=qt.parseOptions;return[qt.previousDirtyStartIndex>0&&xn.final!==!0&&!qt.customMarkdownIt&&!aS(qt.md)&&!kn&&typeof xn.preTransformTokens!="function"&&typeof xn.postTransformTokens!="function"&&typeof xn.postTransformNodes!="function"&&((Jt=(nn=xn.customHtmlTags)==null?void 0:nn.length)!=null?Jt:0)===0?qt.previousDirtyStartIndex:0,Dn]})({content:se,previousContent:u,previousDirtyStartIndex:x,parseOptions:T.value,customMarkdownIt:e.customMarkdownIt,md:xe,scanGlobalReferenceAppend:f});fe=pt;const kt=Fe<=0;if(be){const qt=(function(nn,Jt,kn,Dn={}){var xn;if(!Jt.length)return{nodes:nn,metrics:O3(nn.length)};const $n=(xn=Dn.scanStartIndex)!=null?xn:0,Hn=Dn.reuseDirtyTail!==!1,bn=(function(Mn,Nn,An,Qn=0){const Fn=Math.min(Mn.length,Nn.length);for(let Qt=Math.min(Fn,Math.max(0,Qn));QtS1(Oe[kt]))})(Se,be,le):(function(Oe,Fe=0){for(let pt=Math.max(0,Fe);pt((O=j?.total)!=null?O:0);t.logPerf(Fe?"parse(stream)":"parse(sync)",St(St(St({rendererId:t.instanceMsgId,ms:Math.round(er()-me),nodes:Se.length,contentLength:se.length,parseCommitCount:h,parseCoalescedCount:m,nodeReuseMs:ge,referenceDefinitionScanChars:fe,signatureMs:(U=be?.signatureMs)!=null?U:0,stabilizeSignatureMs:(Z=be?.stabilizeSignatureMs)!=null?Z:0,primeSignatureMs:(q=be?.primeSignatureMs)!=null?q:0,signatureCallCount:(te=be?.signatureCallCount)!=null?te:0,stabilizeSignatureCallCount:(ee=be?.stabilizeSignatureCallCount)!=null?ee:0,primeSignatureCallCount:(J=be?.primeSignatureCallCount)!=null?J:0,stabilizeMs:et},je??{}),K?Object.fromEntries(e4e.map(pt=>{var kt;return[pt,(kt=K[pt])!=null?kt:0]})):{}),Oe?{streamMode:Oe.lastMode,streamDelta:a4e(Oe,j),streamStats:Oe}:{}))}return It(Se)});return{effectiveCustomHtmlTags:P,effectiveCustomHtmlTagsSet:I,mdBase:z,mdInstance:L,mergedParseOptions:T,getParsedNodesDirtyStartIndex:()=>x,getParsedNodesRevision:()=>y,parsedNodes:F}}function u4e(e){const{isClient:t}=e,n=V(new Set),o=new Map,s=new Map,i=new Map;function l(c){if(!t)return;const u=i.get(c);u!=null&&(window.clearTimeout(u),i.delete(c))}function r(){if(t)for(const c of i.values())window.clearTimeout(c);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:l,clearAllVisibilityFallbacks:r,markNodeVisible:function(c,u=!0){var d;u&&l(c),(function(f,p){if((m=(h=e.shouldTrackVisibleNodeIndices)==null?void 0:h.call(e))!=null&&!m)return;var h,m;const k=n.value,x=k.has(f);if(p){if(x)return;const w=new Set(k);return w.add(f),void(n.value=w)}if(!x)return;const y=new Set(k);y.delete(f),n.value=y})(c,u),u&&((d=e.onNodeMarkedVisible)==null||d.call(e,c))},resetNodeVisibleState:a,cleanupNodeVisibility:function(c){var u;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f{const u=s.getSnapshot();t.value=u.source,n.value=u.visible,o.value=u.done},l=s.subscribe(i);i();const r=B(()=>Math.max(0,t.value.length-n.value.length)),a=B(()=>r.value===0),c=B(()=>o.value&&a.value);return ug()&&pf(()=>{l(),s.destroy()}),{source:t,visible:n,done:o,final:c,caughtUp:a,pendingChars:r,enqueue:u=>s.enqueue(u),finish:u=>s.finish(u),flush:()=>s.flush(),reset:u=>s.reset(u),pause:()=>s.pause(),resume:()=>s.resume()}}const f4e={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},cS=/auto|scroll|overlay/i;function p4e(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return cS.test(t)||cS.test(n)}function h4e(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const m4e={class:"m-0 p-0"},g4e=["data-probe"],v4e=ho(Je(wn(St({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(g(),S("div",{class:"height-estimation-probes",style:Gt({width:`${e.width}px`}),"aria-hidden":"true"},[b("div",{ref:i=>e.setParagraphWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[W(v(B0),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),b("div",{ref:i=>e.setListItemWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[b("ul",m4e,[W(v(pu),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),b("div",{ref:i=>e.setListWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[W(v(hu),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(g(),S(Ce,null,rt(6,i=>b("div",{key:`probe-heading-${i}`,ref_for:!0,ref:l=>e.setHeadingWrapper(i,l),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[W(v(Zp),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,g4e)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),uS=Je({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=B(()=>{var n,o;return $5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:I5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),vn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),vn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,vn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"absolute inset-0"},[vn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),dS=Je({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=B(()=>{var n,o;return L5((o=Kc(e.estimatedPreviewHeightPx))!=null?o:E5(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return vn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?vn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[vn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[vn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),vn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>vn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[vn("span",{class:"action-icon block"})])))]):null,vn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[vn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),vn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),y4e={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function Vs(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const w4e=["data-custom-id"],k4e=["data-node-index","data-node-type"],fS="typewriter-simple-cursor-target",b$=ho(Je(wn(St({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i($){if(!(typeof Event<"u"&&$ instanceof Event))return typeof $=="string"&&s("copy-code",$),void s("copy",$)}const l=Ts(),r=fn("markstreamNestedRendererProps",void 0);function a($){const G=l?.vnode.props;return!!G&&(Object.prototype.hasOwnProperty.call(G,$)||Object.prototype.hasOwnProperty.call(G,String($).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function c($){var G,re;const ce=o[$];return a($)?ce:(re=(G=r?.value)==null?void 0:G[$])!=null?re:ce}const u=B(()=>{return($=c("mode"))==="chat"||$==="minimal"||$==="docs"?$:"docs";var $}),d=B(()=>Jx(c("typewriter"))),f=B(()=>d.value!=="off"),p=B(()=>c("domMode")==="minimal"?"minimal":"full"),h=B(()=>{return($={mode:u.value,codeRenderer:c("codeRenderer"),renderCodeBlocksAsPre:c("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":$.codeRenderer==="pre"||$.codeRenderer==="shiki"||$.codeRenderer==="monaco"?$.codeRenderer:$.renderCodeBlocksAsPre===!1||$.mode==="docs"?"monaco":"pre";var $}),m=B(()=>y4e[u.value]),k=B(()=>{var $;return($=c("showTooltips"))!=null?$:m.value.showTooltips}),x=B(()=>{var $;return($=c("fade"))!=null?$:m.value.fade}),y=B(()=>{var $;return($=c("batchRendering"))!=null?$:m.value.batchRendering}),w=B(()=>{var $;return($=c("initialRenderBatchSize"))!=null?$:m.value.initialRenderBatchSize}),_=B(()=>{var $;return($=c("renderBatchSize"))!=null?$:m.value.renderBatchSize}),A=B(()=>{var $;return($=c("renderBatchDelay"))!=null?$:m.value.renderBatchDelay}),P=B(()=>{var $;return($=c("renderBatchBudgetMs"))!=null?$:m.value.renderBatchBudgetMs}),z=B(()=>{var $;return($=c("renderBatchIdleTimeoutMs"))!=null?$:m.value.renderBatchIdleTimeoutMs}),L=B(()=>{var $;return($=c("deferNodesUntilVisible"))!=null?$:m.value.deferNodesUntilVisible}),T=B(()=>{var $;return($=c("maxLiveNodes"))!=null?$:m.value.maxLiveNodes}),I=B(()=>{var $;return($=c("liveNodeBuffer"))!=null?$:m.value.liveNodeBuffer}),N=B(()=>{var $;return($=c("nodeVirtual"))!=null?$:m.value.nodeVirtual}),C={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return c("parseOptions")},get customMarkdownIt(){return c("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return c("customHtmlTags")},get mode(){return c("mode")},get domMode(){return p.value},get htmlPolicy(){return c("htmlPolicy")},get viewportPriority(){return c("viewportPriority")},get viewportPriorityOptions(){return c("viewportPriorityOptions")},get codeBlockStream(){return c("codeBlockStream")},get codeBlockDarkTheme(){return c("codeBlockDarkTheme")},get codeBlockLightTheme(){return c("codeBlockLightTheme")},get codeBlockMonacoOptions(){return c("codeBlockMonacoOptions")},get codeRenderer(){return c("codeRenderer")},get renderCodeBlocksAsPre(){return c("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return c("codeBlockMinWidth")},get codeBlockMaxWidth(){return c("codeBlockMaxWidth")},get codeBlockProps(){return c("codeBlockProps")},get mermaidProps(){return c("mermaidProps")},get d2Props(){return c("d2Props")},get infographicProps(){return c("infographicProps")},get showTooltips(){return k.value},get themes(){return c("themes")},get langs(){return c("langs")},get isDark(){return c("isDark")},get customId(){return c("customId")},get indexKey(){return o.indexKey},get typewriter(){return c("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return c("smoothStreamingOptions")},get parseCoalesceMs(){return c("parseCoalesceMs")},get fade(){return x.value},get batchRendering(){return y.value},get initialRenderBatchSize(){return w.value},get renderBatchSize(){return _.value},get renderBatchDelay(){return A.value},get renderBatchBudgetMs(){return P.value},get renderBatchIdleTimeoutMs(){return z.value},get deferNodesUntilVisible(){return L.value},get maxLiveNodes(){return T.value},get liveNodeBuffer(){return I.value},get nodeVirtual(){return N.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function F($){s("height-change",$)}function H($){s("virtual-state-change",$)}function D($){s("anchor-change",$)}const M=V(),R=V(null),O=V(null),U=V(null),Z=ds({1:null,2:null,3:null,4:null,5:null,6:null}),q=V(!1),te=new Map,ee=V(0),J=V(0),se=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Q($,G){return typeof $!="string"?G:$.trim()||G}function me($){const G=Number($);return Number.isFinite(G)&&G>0?Math.max(1,Math.trunc(G)):640}const xe=B(()=>{var $;const G=($=C.viewportPriorityOptions)!=null?$:{},re=Q(G.rootMargin,F0);return{rootMargin:re,heavyBlockMargin:Q(G.heavyBlockMargin,re),maxTargets:me(G.maxTargets)}}),Ye=B(()=>{var $;return($=xe.value.rootMargin)!=null?$:F0}),at=B(()=>{var $;return($=xe.value.maxTargets)!=null?$:640});function X(){var $,G;if((($=o.virtualScroll)==null?void 0:$.enabled)!==!0)return null;const re=(G=o.virtualScroll)==null?void 0:G.scrollRoot;return oe(typeof re=="function"?re():re)}function oe($){return $?typeof HTMLElement<"u"&&$ instanceof HTMLElement?$:typeof $=="object"&&"value"in $?oe($.value):typeof $=="object"&&"$el"in $?oe($.$el):null:null}qn(s$,xe);const{isClient:j,renderAsFragment:K,debugPerformanceEnabled:he,resolvedShowTooltips:ye,resolvedHtmlPolicy:ve,inheritedSmoothStreaming:ie,ownsTypewriterCursor:de}=(function($){const G=typeof window<"u",re=vf(),ce=fn("markstreamHtmlPolicy",void 0),we=fn("markstreamTypewriterCursor",void 0),ze=fn("markstreamSmoothStreaming",void 0),De=B(()=>$.renderAsFragment===!0),Ue=B(()=>!!($.debugPerformance&&G&&typeof console<"u")),ut=B(()=>{var ct;if(typeof $.showTooltips=="boolean")return $.showTooltips;const Ve=(ct=re.showTooltips)!=null?ct:re["show-tooltips"];return Ve===""||Ve===!0||Ve==="true"||Ve!==!1&&Ve!=="false"&&void 0}),Ze=B(()=>{var ct,Ve;return(Ve=(ct=$.htmlPolicy)!=null?ct:ce?.value)!=null?Ve:"safe"}),tt=B(()=>we?.value!==!0);return{isClient:G,renderAsFragment:De,debugPerformanceEnabled:Ue,resolvedShowTooltips:ut,resolvedHtmlPolicy:Ze,inheritedSmoothStreaming:ze,inheritedTypewriterCursor:we,ownsTypewriterCursor:tt}})(C),{resolveViewportRoot:be,resolveScrollContainer:Se,isReverseFlexScrollRoot:je,getNormalizedScrollTop:et,getOffsetTopWithinRoot:le}=(function($,G){function re(){var Ue,ut;return(ut=(Ue=G.scrollRoot)==null?void 0:Ue.call(G))!=null?ut:null}function ce(Ue){if(typeof window>"u")return null;const ut=re();if(ut)return ut;const Ze=Ue??$.value;if(!Ze)return null;const tt=Ze.ownerDocument||document,ct=tt.scrollingElement||tt.documentElement;let Ve=Ze;for(;Ve&&Ve!==tt.body&&Ve!==ct;){if(p4e(window.getComputedStyle(Ve))&&h4e(Ve))return Ve;Ve=Ve.parentElement}return null}function we(Ue){if(!G.isClient)return!1;try{const ut=window.getComputedStyle(Ue);return!!(ut.display||"").toLowerCase().includes("flex")&&(ut.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function ze(Ue,ut,Ze){var tt,ct;if(Ze)return De(ut);const Ve=Ue.scrollTop;if(!we(Ue))return Ve;const nt=Ve<0?-Ve:Ve;return Math.max(0,((tt=Ue.scrollHeight)!=null?tt:0)-((ct=Ue.clientHeight)!=null?ct:0))-nt}function De(Ue){var ut,Ze,tt,ct,Ve;const nt=Number((ut=Ue.scrollingElement)==null?void 0:ut.scrollTop),gt=Number((tt=(Ze=Ue.documentElement)==null?void 0:Ze.scrollTop)!=null?tt:0),mt=Number((Ve=(ct=Ue.body)==null?void 0:ct.scrollTop)!=null?Ve:0);return Math.max(0,Number.isFinite(nt)?nt:0,Number.isFinite(gt)?gt:0,Number.isFinite(mt)?mt:0)}return{resolveViewportRoot:ce,resolveScrollContainer:function(Ue){var ut,Ze,tt,ct;const Ve=re();if(Ve)return Ve;const nt=ce((ut=Ue??$.value)!=null?ut:null);if(nt)return nt;const gt=(ct=(tt=Ue?.ownerDocument)!=null?tt:(Ze=$.value)==null?void 0:Ze.ownerDocument)!=null?ct:typeof document<"u"?document:null;return gt?.scrollingElement||gt?.documentElement||null},isReverseFlexScrollRoot:we,getNormalizedScrollTop:ze,getOffsetTopWithinRoot:function(Ue,ut){const Ze=ut.ownerDocument||Ue.ownerDocument||document;if((function(nt,gt){return nt===gt.documentElement||nt===gt.body||nt===gt.scrollingElement})(ut,Ze))return Ue.getBoundingClientRect().top+De(Ze);const tt=ut.getBoundingClientRect(),ct=Ue.getBoundingClientRect(),Ve=ze(ut,Ze,!1);return ct.top-tt.top+Ve}}})(M,{isClient:j,scrollRoot:X});qn("markstreamShowTooltips",ye),qn("markstreamHtmlPolicy",ve),qn("markstreamTypewriter",f),qn("markstreamFade",B(()=>C.fade!==!1)),qn("markstreamTypewriterCursor",B(()=>!0)),qn("markstreamTextStreamState",te),qn("markstreamStreamVersion",ee),qn("markstreamParseOptions",B(()=>C.parseOptions)),qn("markstreamCustomMarkdownIt",B(()=>C.customMarkdownIt));const{smoothStreamingEnabled:fe,renderContent:ge,requestedFinal:Oe,effectiveFinal:Fe}=(function($,G){const re=d4e(St(St({},f4e),$.smoothStreamingOptions)),ce=B(()=>{var Ve,nt,gt;return $.smoothStreaming!==!1&&!((Ve=$.nodes)!=null&&Ve.length)&&($.smoothStreaming===!0||!((nt=G.inheritedSmoothStreaming)!=null&&nt.value))&&($.smoothStreaming===!0||Jx($.typewriter)!=="off"||((gt=$.maxLiveNodes)!=null?gt:0)<=0)}),we=V(!G.isClient||$.smoothStreaming===!0);In(()=>{we.value=!0});const ze=B(()=>we.value&&ce.value),De=B(()=>{var Ve;return ze.value?re.visible.value:(Ve=$.content)!=null?Ve:""}),Ue=B(()=>{var Ve,nt;const gt=(Ve=$.parseOptions)!=null?Ve:{};return(nt=$.final)!=null?nt:gt.final}),ut=B(()=>{const Ve=Ue.value;return ze.value&&Ve!=null?!!Ve&&re.caughtUp.value:Ve});let Ze=0,tt=!1;function ct(){Ze=0,tt=!1}return Ke([()=>$.content,()=>$.nodes,ze,Ue],([Ve,nt,gt,mt])=>{if(nt?.length)return ct(),void re.reset("");const Et=Ve??"";if(!gt)return ct(),re.reset(Et),void(mt&&re.finish({flush:!0}));const _t=re.source.value;if(Et){if(Et!==_t)if(Et.startsWith(_t)){const Ot=Et.slice(_t.length),Kt=re.pendingChars.value;Ot.length<=8?(Ze++,tt||Ze>=2&&Kt<=8?(tt=!0,re.reset(Et)):re.enqueue(Ot)):(ct(),re.enqueue(Ot))}else ct(),re.reset(Et)}else ct(),re.reset("");mt&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ce,smoothStreamingEnabled:ze,renderContent:De,requestedFinal:Ue,effectiveFinal:ut}})(C,{isClient:j,inheritedSmoothStreaming:ie}),pt=Oe.value===!0;qn("markstreamSmoothStreaming",fe);const kt=V(!1),qt=V(!1),nn=V(!1);let Jt="",kn=!1,Dn=null;function xn(){j&&Dn!=null&&(window.clearTimeout(Dn),Dn=null)}function $n(){kt.value=!1,xn()}function Hn($,G){if(!he.value)return;const re=(function(){if(!he.value)return null;const ce=Nn(bn),we=Nn(Wn),ze=Math.max(Mn,we);if(ce<=0&&ze<=0)return null;const De={total:ce,maxPerFrame:ze,byLabel:(Ue=bn,Object.fromEntries(Array.from(Ue.entries()).sort((ut,Ze)=>Ze[1]-ut[1]||ut[0].localeCompare(Ze[0]))))};var Ue;return bn.clear(),Wn.clear(),Mn=0,De})();console.info(`[markstream-vue][perf] ${$}`,re?wn(St({},G),{layoutReads:re}):G)}Ke([()=>C.indexKey,()=>C.customId],()=>{var $,G;$n(),qt.value=!1,nn.value=!(($=o.nodes)!=null&&$.length)&&Oe.value!==!0&&!!o.content,Jt=(G=ge.value)!=null?G:"",kn=Jt.length>0},{flush:"sync"}),Ke([()=>o.content,()=>o.nodes,Oe],([$,G,re])=>{!G?.length&&re!==!0&&$&&(nn.value=!0)},{flush:"sync",immediate:!0}),Ke([ge,()=>o.nodes,Oe],([$,G,re])=>{const ce=$??"";return G?.length||re===!0?($n(),qt.value=!1,Jt=ce,void(kn=!0)):(ce.length>0&&(nn.value=!0),kn?(Jt&&ce.length>Jt.length&&ce.startsWith(Jt)?(kt.value=!0,qt.value=!0,j&&(xn(),Dn=window.setTimeout(()=>{var we;Dn=null,Fe.value===!0||(we=o.nodes)!=null&&we.length||(pc(),kt.value=!1,Wr())},1200))):(ce.length"u")return null;const ze=window;if(ze.__markstreamLayoutReadPerformance)return ze.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return ze.__markstreamLayoutReadPerformance=De,De})();we&&(we.total=Number(we.total||0)+1,we.byLabel[ce]=Number(we.byLabel[ce]||0)+1,we.currentFrameTotal=Number(we.currentFrameTotal||0)+1,we.frameScheduled||(we.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Qn(we),0):queueMicrotask(()=>Qn(we)):window.requestAnimationFrame(()=>Qn(we))))})($),Pn||(Pn=!0,j&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(An):typeof queueMicrotask!="function"?setTimeout(An,0):queueMicrotask(An)))}function Qt($,G){return Fn($),G()}const uo=C.customId?`renderer-${C.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Zn=(function($){const G=new Map;return{scope:$,cache:G,clear:()=>G.clear()}})(uo),Bo=uo;qn(f$,Zn);const Un=Is(()=>C.customId),{effectiveCustomHtmlTagsSet:hs,mergedParseOptions:Io,parsedNodes:Rt,getParsedNodesDirtyStartIndex:Jo,getParsedNodesRevision:Ls}=c4e(C,{instanceMsgId:uo,renderContent:ge,effectiveFinal:Fe,smoothStreamingEnabled:fe,debugPerformanceEnabled:he,customComponentsMap:Un,logPerf:Hn});Ke(Rt,()=>{kt.value||Zn.clear(),ee.value+=1},{immediate:!0});const $e=B(()=>({customId:C.customId,customHtmlTags:Io.value.customHtmlTags,parseOptions:C.parseOptions,customMarkdownIt:C.customMarkdownIt,htmlPolicy:ve.value,viewportPriority:C.viewportPriority,viewportPriorityOptions:xe.value,mode:u.value,domMode:C.domMode,codeRenderer:h.value,codeBlockStream:C.codeBlockStream,codeBlockDarkTheme:C.codeBlockDarkTheme,codeBlockLightTheme:C.codeBlockLightTheme,codeBlockMonacoOptions:C.codeBlockMonacoOptions,renderCodeBlocksAsPre:C.renderCodeBlocksAsPre,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockProps:C.codeBlockProps,mermaidProps:C.mermaidProps,d2Props:C.d2Props,infographicProps:C.infographicProps,showTooltips:ye.value,themes:C.themes,langs:C.langs,isDark:C.isDark,typewriter:f.value,smoothStreamingOptions:C.smoothStreamingOptions,parseCoalesceMs:C.parseCoalesceMs,fade:C.fade}));qn("markstreamNestedRendererProps",$e);const Ge=B(()=>Rt.value),ot=B(()=>Rt.value.length),dt=V(null),Mt=V(null),Ft=V(null),Ut=V(null),en=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),tn=!en&&C.customId?Zx(C.customId):null,eo=B(()=>tn?(pm.value,Zx(C.customId)):null),Ro=B(()=>{var $;return!!(!K.value&&C.customId&&!en&&(($=eo.value)!=null&&$.enabled))}),$s=B(()=>!!(j&&Ro.value)),Do=B(()=>{var $;return!!(!K.value&&(($=o.virtualScroll)!=null&&$.enabled))}),We=B(()=>Do.value),st=V(!1);In(()=>{st.value=!0});const Xe=B(()=>!!(j&&Do.value));qn("markstreamHostScrollManaged",Xe);const qe=B(()=>!!(st.value&&Xe.value)),Pe=B(()=>$s.value||Xe.value),bt=B(()=>$s.value||qe.value),Lt=B(()=>{var $;return Pe.value&&(($=eo.value)==null?void 0:$.textEstimation)!==!1});function cn(){const $=J.value||Qt("getMeasuredContainerWidth.clientWidth",()=>{var G;return((G=M.value)==null?void 0:G.clientWidth)||0});return Number.isFinite($)&&$>0?$:0}const So=B(()=>{const $=cn();return $>0?Math.max(1,Math.round($)):640}),Qo=B(()=>{var $,G;return!(Fe.value!==!0||Do.value||u.value!=="chat"&&u.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||($=o.nodes)!=null&&$.length||nn.value||!(((G=C.maxLiveNodes)!=null?G:0)<=0))}),Po=B(()=>{var $;return Qo.value?50:Math.max(1,($=C.maxLiveNodes)!=null?$:320)}),Xn=B(()=>{var $;return Qo.value?16:Math.max(0,($=C.liveNodeBuffer)!=null?$:60)}),pn=B(()=>{var $;return!K.value&&C.nodeVirtual!==!1&&!((($=C.maxLiveNodes)!=null?$:0)<=0&&!Qo.value)&&(C.nodeVirtual===!0?Rt.value.length>0:Rt.value.length>Po.value)}),Us=B(()=>pn.value||$s.value||Xe.value),mi=B(()=>C.viewportPriority!==!1),oi=B(()=>!!mi.value&&!q.value);var ql;ql=B(()=>mi.value),qn(i$,ql);const vl=B(()=>{var $;return!(K.value||C.deferNodesUntilVisible===!1||(($=C.maxLiveNodes)!=null?$:0)<=0||pn.value||Rt.value.length>900||C.viewportPriority===!1)}),Zs=V2e($=>{var G;return be((G=$??M.value)!=null?G:null)},mi),{requestFrame:yo,cancelFrame:Lo,hasIdleCallback:yl,isTestEnv:ms}=(function($){const G=$.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,re=$.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ce=$.isClient&&typeof window.requestIdleCallback=="function",we=(function(){var ze;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=(ze=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:ze.value;return De?.env})();return{requestFrame:G,cancelFrame:re,hasIdleCallback:ce,isTestEnv:we?.NODE_ENV==="test"}})({isClient:j}),wl=B(()=>Fe.value===!0&&!Do.value),{resolvedBatchSize:gi,resolvedInitialBatch:si,batchingEnabled:Ul,incrementalRenderingActive:Ni,renderedCount:Ae,previousRenderContext:Ie,adaptiveBatchSize:At,previousBatchConfig:lt}=(function($,G){var re;const ce=B(()=>{var ct;const Ve=Math.trunc((ct=$.renderBatchSize)!=null?ct:80);return Number.isFinite(Ve)?Math.max(0,Ve):0}),we=B(()=>{var ct;const Ve=Math.trunc((ct=$.initialRenderBatchSize)!=null?ct:ce.value);return Number.isFinite(Ve)?Math.max(0,Ve):ce.value}),ze=B(()=>!G.renderAsFragment.value&&$.batchRendering!==!1&&ce.value>0&&G.isClient&&!G.isTestEnv),De=V(0),Ue=V({key:$.indexKey,total:0}),ut=V(Math.max(1,ce.value||1)),Ze=B(()=>{var ct,Ve,nt;return ze.value&&!((ct=G.continuousStreaming)!=null&&ct.value)&&!((Ve=G.forceFullRenderFinalContent)!=null&&Ve.value)&&((nt=$.maxLiveNodes)!=null?nt:0)<=0}),tt=V({batchSize:ce.value,initial:we.value,delay:(re=$.renderBatchDelay)!=null?re:16,enabled:Ze.value});return{resolvedBatchSize:ce,resolvedInitialBatch:we,batchingEnabled:ze,incrementalRenderingActive:Ze,renderedCount:De,previousRenderContext:Ue,adaptiveBatchSize:ut,previousBatchConfig:tt}})(C,{isClient:j,isTestEnv:ms,renderAsFragment:K,forceFullRenderFinalContent:wl,continuousStreaming:B(()=>qt.value&&Fe.value!==!0)}),mn=B(()=>{var $;return!K.value&&C.batchRendering!==!1&&gi.value>0&&!ms&&(($=C.maxLiveNodes)!=null?$:0)<=0&&!wl.value}),Kn=B(()=>mn.value),to=B(()=>Pe.value||Kn.value),Co=B(()=>{var $;return to.value&&(($=eo.value)==null?void 0:$.codeBlockEstimation)!==!1}),no=new Map,Vo=new Map,Qi=new WeakMap;let Os=null;const Ta=new WeakMap,Wo=new Map,zi=[];let gs=[],kl=[],es=-1;const Hs=Uo(zi),vs=new Set,bl=V(0);let Ks=0;const ne=V(0),ke=B(()=>(ne.value,Array.from(no.entries()).sort(($,G)=>$[0]-G[0]))),Te=V(null),Ne=V(null);let Qe,ht=null,jt=0,Zt=null;function Vt(){Qe.markFallbackHeightPrefixDirty()}function Wt($){return Qe.getFallbackNodeHeight($)}function on($,G){return Qe.estimateHeightRange($,G)}function Vn($){return Qe.estimateIndexForOffset($)}const{activeRestoreAnchor:Ht,getRelativeScrollTopWithinContainer:Tn,setRelativeScrollTopWithinContainer:zn,resolveAnchorOffset:Ns,clearRestoreReconcile:rs,scheduleRestoreReconcile:_l,captureRestoreAnchor:X0,restoreAnchor:J0,getAnchorDrift:qu}=(function($){const{isClient:G,containerRef:re,parsedNodeCount:ce,requestFrame:we,cancelFrame:ze,resolveScrollContainer:De,getNormalizedScrollTop:Ue,getOffsetTopWithinRoot:ut,isReverseFlexScrollRoot:Ze,estimateIndexForOffset:tt,estimateHeightRange:ct,getFallbackNodeHeight:Ve,clamp:nt}=$,gt=V(null);let mt=null,Et=[];function _t(){const un=De(),Ln=re.value;if(!un||!Ln)return null;const On=un.ownerDocument||Ln.ownerDocument||document;if(un===On.documentElement||un===On.body||un===On.scrollingElement){const wo=Ln.getBoundingClientRect();return Math.max(0,-wo.top)}return Math.max(0,Ue(un,On,!1)-ut(Ln,un))}function Ot(un){var Ln;const On=De(),wo=re.value;if(!On||!wo)return;const Ys=Math.max(0,un),Ds=On.ownerDocument||wo.ownerDocument||document,Xl=Ds.defaultView||(typeof window<"u"?window:null);if(On===Ds.documentElement||On===Ds.body||On===Ds.scrollingElement){const gr=Ue(On,Ds,!0)+wo.getBoundingClientRect().top;return void((Ln=Xl?.scrollTo)==null||Ln.call(Xl,0,Math.max(0,gr+Ys)))}Yx(On,Ds,ut(wo,On)+Ys,{isReverseFlexScrollRoot:gr=>{var md;return(md=Ze?.(gr))!=null&&md},getNormalizedScrollTop:Ue})}function Kt(un){const Ln=ce.value,On=nt(un.nodeIndex,0,Math.max(0,Ln-1));return ct(0,On)+Math.max(0,un.offsetWithinNodePx)}function an(){if(mt!=null&&(ze?.(mt),mt=null),G)for(const un of Et)window.clearTimeout(un);Et=[]}function sn(un){const Ln=Kt(un),On=_t();On!=null&&Math.abs(On-Ln)<=.5||Ot(Ln)}return{activeRestoreAnchor:gt,getRelativeScrollTopWithinContainer:_t,setRelativeScrollTopWithinContainer:Ot,resolveAnchorOffset:Kt,clearRestoreReconcile:an,applyRestoreAnchor:sn,scheduleRestoreReconcile:function(){gt.value&&G&&mt==null&&(mt=we?we(()=>{mt=null,gt.value&&sn(gt.value)}):null,mt==null&>.value&&sn(gt.value))},captureRestoreAnchor:function(){const un=_t(),Ln=ce.value;if(un==null||Ln<=0)return null;const On=nt(tt(un+1),0,Ln-1),wo=ct(0,On),Ys=Ve(On);return{nodeIndex:On,offsetWithinNodePx:nt(un-wo,0,Math.max(0,Ys-1))}},restoreAnchor:function(un){const Ln=ce.value;if(gt.value={nodeIndex:nt(un.nodeIndex,0,Math.max(0,Ln-1)),offsetWithinNodePx:Math.max(0,un.offsetWithinNodePx)},an(),sn(gt.value),G)for(const On of[0,120,280,480])Et.push(window.setTimeout(()=>{gt.value&&sn(gt.value)},On))},getAnchorDrift:function(un){const Ln=_t();return Ln==null?null:Ln-Kt(un)}}})({isClient:j,containerRef:M,parsedNodeCount:ot,requestFrame:yo,cancelFrame:Lo,resolveScrollContainer:()=>Te.value||Se(),getNormalizedScrollTop:et,getOffsetTopWithinRoot:le,isReverseFlexScrollRoot:je,estimateIndexForOffset:Vn,estimateHeightRange:on,getFallbackNodeHeight:Wt,clamp:Gs}),{nodeHeights:hr,heightStats:ts,heightTreeSize:Fr,heightSumTree:Uu,heightKnownTree:Q0,averageNodeHeight:jr,resetHeightMeasurements:P1,pruneHeightMeasurements:F1,rebuildHeightTrees:Re,recordNodeHeight:pe,removeNodeHeights:Le,exportHeightCache:Sn,importHeightCache:ii,fenwickRangeSum:el}=(function($={}){const G=ds({}),re=ds({total:0,count:0}),ce=V(0),we=V([]),ze=V([]);function De(){for(const Ve of Object.keys(G))delete G[Number(Ve)];re.total=0,re.count=0,ce.value=0,we.value=[],ze.value=[]}function Ue(Ve,nt,gt){for(let mt=nt+1;mt0;mt-=mt&-mt)gt+=Ve[mt];return gt}function Ze(Ve){ce.value=Ve;const nt=new Array(Ve+1).fill(0),gt=new Array(Ve+1).fill(0);for(const[mt,Et]of Object.entries(G)){const _t=Number(mt),Ot=Number(Et);!Number.isFinite(_t)||_t<0||_t>=Ve||!Number.isFinite(Ot)||Ot<=0||(Ue(nt,_t,Ot),Ue(gt,_t,1))}we.value=nt,ze.value=gt}function tt(Ve){if(!Number.isInteger(Ve)||Ve<0)return!1;const nt=G[Ve];if(!Number.isFinite(nt)||nt<=0)return!1;if(delete G[Ve],re.total=Math.max(0,re.total-nt),re.count=Math.max(0,re.count-1),ce.value>Ve){const gt=we.value,mt=ze.value;gt.length&&mt.length&&(Ue(gt,Ve,-nt),Ue(mt,Ve,-1))}return!0}const ct=B(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:G,heightStats:re,heightTreeSize:ce,heightSumTree:we,heightKnownTree:ze,averageNodeHeight:ct,resetHeightMeasurements:De,pruneHeightMeasurements:function(Ve){if(Ve<=0)return void De();let nt=0,gt=0;for(const[mt,Et]of Object.entries(G)){const _t=Number(mt),Ot=Number(Et);!Number.isFinite(_t)||_t<0||_t>=Ve||!Number.isFinite(Ot)||Ot<=0?delete G[_t]:(nt+=Ot,gt++)}re.total=nt,re.count=gt},rebuildHeightTrees:Ze,recordNodeHeight:function(Ve,nt,gt={}){(function(mt,Et,_t={}){var Ot;if(!Number.isFinite(Et)||Et<=0)return!1;const Kt=G[mt];if(Kt&&(_t.allowShrink===!1&&Etmt){const an=we.value,sn=ze.value;if(an.length&&sn.length)if(Kt){const un=Et-Kt;un!==0&&Ue(an,mt,un)}else Ue(an,mt,Et),Ue(sn,mt,1)}_t.notify!==!1&&((Ot=$.onHeightRecorded)==null||Ot.call($))})(Ve,nt,wn(St({},gt),{notify:!0}))},removeNodeHeight:function(Ve,nt={}){var gt;const mt=tt(Ve);return mt&&nt.notify!==!1&&((gt=$.onHeightRecorded)==null||gt.call($)),mt},removeNodeHeights:function(Ve,nt={}){var gt;let mt=0;for(const Et of Ve)tt(Number(Et))&&mt++;return mt>0&&nt.notify!==!1&&((gt=$.onHeightRecorded)==null||gt.call($)),mt},exportHeightCache:function(){return Object.entries(G).map(([Ve,nt])=>({index:Number(Ve),height:Number(nt)})).filter(Ve=>Number.isFinite(Ve.index)&&Ve.index>=0&&Number.isFinite(Ve.height)&&Ve.height>0).sort((Ve,nt)=>Ve.index-nt.index)},importHeightCache:function(Ve,nt={}){var gt;if(!Array.isArray(Ve))return;const mt=ce.value;let Et=!1;if(nt.mode!=="merge"){const _t=Object.keys(G);if(_t.length>0){for(const Ot of _t)delete G[Number(Ot)];Et=!0}}for(const _t of Ve){const Ot=Number(_t.index),Kt=Number(_t.height);if(!Number.isInteger(Ot)||Ot<0||mt>0&&Ot>=mt||!Number.isFinite(Kt)||Kt<=0)continue;const an=G[Ot];an&&Math.abs(an-Kt)<=1||(G[Ot]=Kt,Et=!0)}Et&&((function(){let _t=0,Ot=0;const Kt=ce.value;for(const[an,sn]of Object.entries(G)){const un=Number(an),Ln=Number(sn);!Number.isFinite(un)||un<0||Kt>0&&un>=Kt||!Number.isFinite(Ln)||Ln<=0?delete G[un]:(_t+=Ln,Ot++)}re.total=_t,re.count=Ot})(),mt>0&&Ze(mt),(gt=$.onHeightRecorded)==null||gt.call($))},fenwickRangeSum:function(Ve,nt,gt){if(gt<=nt)return 0;const mt=ut(Ve,gt-1);return nt<=0?mt:mt-ut(Ve,nt-1)}}})({onHeightRecorded:()=>{Vt(),Xe.value&&cd(),Ht.value&&_l(),Ne.value&&uc(),$o("node-resize")}});function Ea($){Number.isInteger($)&&$>=0&&vs.add($)}function Or($){for(const G of $)Ea(Number(G))}function Hr($){Ks++;let G=!0;try{const re=$();return G=re!==!1,re}finally{Ks--,Ks===0&&G&&bl.value++}}function ec(){gs=[],kl=[],es=-1,vs.clear(),Hs.value=zi}function j1(){ec(),Hr(()=>P1()),Wo.clear()}function tc($){!Number.isInteger($)||$<0||$>=Rt.value.length||Wo.set($,Ju($))}function Zu($,G,re={}){const ce=hr[$];Ea($),pe($,G,re);const we=hr[$];return Object.is(ce,we)?(vs.delete($),!1):(we&&we>0?tc($):ce&&Wo.delete($),!0)}function O1($,G){const re=Qt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ce,we;return(we=(ce=no.get($))==null?void 0:ce.offsetHeight)!=null?we:0});return re>0?re:Qt("getNodeLayoutHeight.content.offsetHeight",()=>G.offsetHeight)}function Ku($,G={}){G.mode!=="merge"?ec():Or($.map(re=>re.index)),Hr(()=>ii($,G)),O6()}const xl=B(()=>vl.value&&oi.value),zf=B(()=>{var $;return!K.value&&C.batchRendering!==!1&&gi.value>0&&(($=C.maxLiveNodes)!=null?$:0)<=0}),Sl=B(()=>!K.value&&pt&&Fe.value===!0&&!pn.value&&!Do.value&&!Ro.value&&!xl.value&&!zf.value),H1=B(()=>!!Zs&&xl.value),nc=B(()=>pn.value||Xe.value),{focusIndex:Zl,liveRange:ys,updateLiveRange:Dr}=(function($,G){const{parsedNodeCount:re,virtualizationEnabled:ce,maxLiveNodesResolved:we,liveNodeBufferResolved:ze,clamp:De}=G,Ue=ze??B(()=>{var tt;return Math.max(0,(tt=$.liveNodeBuffer)!=null?tt:60)}),ut=V(0),Ze=ds({start:0,end:0});return{liveNodeBufferResolved:Ue,focusIndex:ut,liveRange:Ze,updateLiveRange:function(){const tt=re.value;if(!ce.value||tt===0)return Ze.start=0,void(Ze.end=tt);const ct=Math.min(we.value,tt),Ve=Ue.value,nt=De(ut.value-Ve,0,Math.max(0,tt-ct));Ze.start=nt,Ze.end=Math.min(tt,nt+ct)}}})(C,{parsedNodeCount:ot,virtualizationEnabled:pn,maxLiveNodesResolved:Po,liveNodeBufferResolved:Xn,clamp:Gs}),Cl=new Map,Bi=new Map,mr=new Map,D1=[],Kl=new Map,Gl=new Set,Me=V(0);let it=!1;const ft=B(()=>(Me.value,Gl.size)),yn=new Map,Yt=new Map,li=V(0),vi=B(()=>{li.value;let $=0;for(const G of yn.values())$+=Math.max(0,G);return $});let yi=null;const V1=B(()=>{if(!pn.value)return Rt.value.length;const $=Xn.value,G=Math.max(ys.end+$,si.value),re=Math.min(Rt.value.length,G);return Math.max(Ae.value,re)});function Ia(){it||(it=!0,queueMicrotask(()=>{it=!1,Me.value+=1}))}function Gu($,G,re="node-resize"){if(!j||typeof window>"u")return null;const ce=window.setTimeout(()=>{Gl.delete(ce)&&Ia();try{G()}finally{$o(re)}},Math.max(0,$));return Gl.add(ce),Ia(),ce}function Bf($){j&&$!=null&&(Gl.delete($)&&Ia(),window.clearTimeout($))}function J9(){if(j&&typeof window<"u")for(const $ of Gl)window.clearTimeout($);Gl.size&&(Gl.clear(),Ia()),D1.length=0,mr.clear()}function gB($){R.value=$}function vB($){O.value=$}function yB($){U.value=$}const{cancelScheduledFocusSync:m6,scheduleFocusSync:Yl}=(function($){const{isClient:G,containerRef:re,virtualizationEnabled:ce,requestFrame:we,cancelFrame:ze,syncFocusToScroll:De}=$;let Ue=null;function ut(){var tt,ct,Ve;return(Ve=(ct=(tt=re.value)==null?void 0:tt.ownerDocument)==null?void 0:ct.defaultView)!=null?Ve:typeof window<"u"?window:null}function Ze(){if(!Ue)return;const tt=ut();Ue.viaTimeout?tt?tt.clearTimeout(Ue.id):clearTimeout(Ue.id):ze?.(Ue.id),Ue=null}return{cancelScheduledFocusSync:Ze,scheduleFocusSync:function(tt={}){if(!ce.value)return;if(!G)return void De(!0);if(tt.immediate)return Ze(),void De(!0);if(Ue)return;const ct=()=>{Ue=null,De()};if(we)return void(Ue={id:we(ct),viaTimeout:!1});const Ve=ut();Ue={id:Ve?Ve.setTimeout(ct,16):setTimeout(ct,16),viaTimeout:!0}}}})({isClient:j,containerRef:M,virtualizationEnabled:pn,requestFrame:yo,cancelFrame:Lo,syncFocusToScroll:function($=!1){var G;if(!pn.value)return;const re=Te.value||Se();if(!re)return;const ce=re.ownerDocument||((G=M.value)==null?void 0:G.ownerDocument)||document,we=ce?.defaultView||(typeof window<"u"?window:null),ze=re===ce?.documentElement||re===ce?.body,De=Rt.value.length;if(De<=0)return;if(!ze&&De>0&&je(re)){const mt=Qt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),Et=Qt("syncFocusToScroll.scrollTop",()=>re.scrollTop),_t=Et<0?-Et:Et;return void Ff(Gs((Ue=Math.max(0,_t)+.5*Math.max(0,mt),Qe.estimateIndexForOffsetFromEnd(Ue)),0,Math.max(0,De-1)),$)}var Ue;const ut=(function(mt,Et,_t,Ot){const Kt=M.value;if(!Kt)return null;const an=Ot?0:Qt("syncFocusToScroll.model.root.getBoundingClientRect",()=>mt.getBoundingClientRect().top),sn=Qt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Kt.getBoundingClientRect().top),un=Math.max(0,an-sn),Ln=Ot?Qt("syncFocusToScroll.model.viewport.clientHeight",()=>{var On,wo,Ys,Ds;return(Ds=(Ys=(wo=_t?.innerHeight)!=null?wo:(On=Et.documentElement)==null?void 0:On.clientHeight)!=null?Ys:mt.clientHeight)!=null?Ds:0}):Qt("syncFocusToScroll.model.root.clientHeight",()=>mt.clientHeight);return Gs(Vn(un+.5*Math.max(0,Ln)),0,Math.max(0,Rt.value.length-1))})(re,ce,we,ze);if(ut!=null)return void Ff(ut,$);const Ze=ze?null:Qt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),tt=ze?0:Ze.top,ct=ze?Qt("syncFocusToScroll.viewport.clientHeight",()=>{var mt,Et;return(Et=(mt=we?.innerHeight)!=null?mt:re.clientHeight)!=null?Et:0}):Ze.bottom,Ve=ke.value;let nt=null,gt=null;for(const[mt,Et]of Ve){if(!Et)continue;const _t=Qt("syncFocusToScroll.slot.getBoundingClientRect",()=>Et.getBoundingClientRect());_t.bottom<=tt||_t.top>=ct||(nt==null&&(nt=mt),gt=mt)}if(nt==null||gt==null){const mt=M.value;if(!mt)return;const Et=ze?{top:0}:Qt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),_t=Qt("syncFocusToScroll.fallback.scrollTop",()=>et(re,ce,ze)),Ot=ze?(()=>{const an=Qt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>mt.getBoundingClientRect()),sn=(ze?0:Et.top)-an.top;return Math.max(0,sn)})():(()=>{const an=le(mt,re);return Math.max(0,_t-an)})(),Kt=ze?Qt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var an,sn,un,Ln;return(Ln=(un=(sn=we?.innerHeight)!=null?sn:(an=ce?.documentElement)==null?void 0:an.clientHeight)!=null?un:re.clientHeight)!=null?Ln:0}):Qt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void Ff(Gs(Vn(Ot+.5*Math.max(0,Kt)),0,Math.max(0,Rt.value.length-1)),!0)}Ff(Math.round((nt+gt)/2),$)}}),{visibleNodeIndices:g6,nodeVisibilityHandles:oc,nodeVisibilityWatchStops:Rf,nodeVisibilityFallbackTimers:Q9,clearVisibilityFallback:Pf,markNodeVisible:La,cleanupNodeVisibility:wB,destroyNodeVisibilityState:v6}=u4e({isClient:j,shouldTrackVisibleNodeIndices:()=>xl.value,shouldCleanupNodeVisibility:()=>pn.value,onNodeMarkedVisible:$=>{pn.value?Yl():Zl.value=Gs($,0,Math.max(0,Rt.value.length-1))},onNodeVisibilityCleaned:$=>{no.delete($)&&Ay()}}),{cleanupScrollListener:ey,setupScrollListener:kB}=(function($){const{isClient:G,virtualizationEnabled:re,listenerEnabled:ce,scrollRootElement:we,resolveScrollContainer:ze,scheduleFocusSync:De,onScroll:Ue}=$;let ut=null,Ze=null;function tt(){ut&&(ut(),ut=null),Ze=null,we.value=null}function ct(Ve){const nt=$.getScrollTop?$.getScrollTop(Ve):Ve.scrollTop;return Math.max(0,Number.isFinite(nt)?Math.abs(nt):0)}return{cleanupScrollListener:tt,setupScrollListener:function(){if(!G)return;if(!((Ve=ce?.value)!=null?Ve:re.value))return void tt();var Ve;const nt=ze();if(!nt)return void tt();if(we.value===nt&&ut)return;tt(),Ze=ct(nt);const gt=()=>{if(Ue?.(),re.value){const mt=(function(Et){const _t=ct(Et),Ot=Ze;Ze=_t;const Kt=Math.max(480,.75*(Et.clientHeight||0));return Ot==null?_t>Kt?{immediate:!0}:void 0:Math.abs(_t-Ot)>Kt?{immediate:!0}:void 0})(nt);mt?De(mt):De()}};nt.addEventListener("scroll",gt,{passive:!0}),we.value=nt,ut=()=>{nt.removeEventListener("scroll",gt)}}}})({isClient:j,virtualizationEnabled:pn,listenerEnabled:nc,scrollRootElement:Te,resolveScrollContainer:Se,scheduleFocusSync:Yl,onScroll:function(){const $=Ne.value;if(!$)return;const G=Xu();if(!G||(function(ce){if(od()>=jt)return Zt=null,!1;const we=Zt;if(we==null)return!0;const ze=Math.abs(ce.scrollTop-we)<=2;return ze||(Zt=null),ze})(G))return;const re=my(G);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,$.distanceFromBottomPx))>32)&&cc("restore"):cc("restore")},getScrollTop:$=>{var G;const re=$.ownerDocument||((G=M.value)==null?void 0:G.ownerDocument)||document,ce=$===re.documentElement||$===re.body||$===re.scrollingElement;return Qt("scrollListener.getScrollTop",()=>et($,re,ce))}});function Ff($,G=!1){const re=Gs($,0,Math.max(0,Rt.value.length-1));!G&&Math.abs(re-Zl.value)<=1||(Zl.value=re,Dr())}function Gs($,G,re){return Math.min(Math.max($,G),re)}function y6($=Rt.value.length){const G=Jo();return!Number.isInteger(G)||G<0?$:Gs(G,0,$)}function w6($){return $?.firstElementChild}function ty($,G){var re;return $?(re=$.matches)!=null&&re.call($,G)?$:$.querySelector(G):null}function bB($,G){$<1||$>6||(Z[$]=G)}function ny(){if(!Pe.value)return void(J.value=0);const $=Qt("updateExperimentContainerWidth.clientWidth",()=>{var G,re;return(re=(G=M.value)==null?void 0:G.clientWidth)!=null?re:0});J.value=$>0?$:0}let Yu=null;function k6(){Yu?.disconnect(),Yu=null}const oy=Yd("ViewportDeferredMarkdownCodeBlockNode",Rl({loader:()=>zo(null,null,function*(){return(yield Cs(()=>import("./index5-BBtmbjGn.js"),__vite__mapDeps([8,6,7]))).default}),loadingComponent:B5,delay:0,suspensible:!1}),B5);function sy($){return $===oy}const iy=B(()=>h.value==="pre"?Di:h.value==="shiki"?oy:rm);function ly(){var $;return(($=C.codeBlockProps)==null?void 0:$.showHeader)!==!1}function ry($,G,re){const ce=hr[G],we=typeof ce=="number"&&ce>0;if(Lt.value&&!we&&!(function(ze){return!!Un.value.paragraph&&(ze.type==="paragraph"||ze.type==="list_item"||ze.type==="list")})($)){const ze=d$($,re,se.value);if(ze)return ze}if(Co.value&&$.type==="code_block"){const ze=(function(De){if(De.type!=="code_block")return null;const Ue=jy(De,Kf(De));return sy(Ue)?"markdown":Ue===Di?"pre":Ue===iy.value||Ue===rm?"monaco":null})($);if(ze==="monaco"||ze==="markdown"||ze==="pre")return(function(De,Ue){var ut,Ze,tt;if(!De||De.type!=="code_block")return null;const ct=Ue.rendererKind,Ve=ct!=="pre"&&Ue.showHeader!==!1,nt=!!De.diff;let gt=0,mt=500;if(ct==="monaco"){const _t=(ut=Ue.monacoOptions)!=null?ut:{},Ot=gm(De,_t,Ue.width),Kt=(function(sn){const un=typeof sn?.fontSize=="number"&&sn.fontSize>0?sn.fontSize:12;return typeof sn?.lineHeight=="number"&&sn.lineHeight>0?sn.lineHeight:Math.round(1.5*un)})(_t),an=(function(sn,un){var Ln,On;const wo=typeof((Ln=sn?.padding)==null?void 0:Ln.top)=="number"?sn.padding.top:un?0:8,Ys=typeof((On=sn?.padding)==null?void 0:On.bottom)=="number"?sn.padding.bottom:un?0:8;return Math.max(0,wo)+Math.max(0,Ys)})(_t,nt);mt=typeof _t.MAX_HEIGHT=="number"&&_t.MAX_HEIGHT>0?_t.MAX_HEIGHT:500,gt=Math.round(Ot*Kt+an)}else if(ct==="markdown"){const _t=gm(De);gt=Math.round(21*_t+32)}else{const _t=gm(De);gt=Math.round(28*_t),mt=Number.POSITIVE_INFINITY}const Et=Math.max(1,Math.min(gt,mt));return St({kind:"code-block",height:Math.round(Et+(Ve?40:0)),contentHeight:Et,rendererKind:ct},nt&&ct==="monaco"?{diffInline:Lv((Ze=Ue.monacoOptions)!=null?Ze:{},(tt=Ue.width)!=null?tt:0)}:{})})($,{rendererKind:ze,monacoOptions:C.codeBlockMonacoOptions,showHeader:ly(),width:re})}return null}iA(()=>{if(bl.value,Ks>0)return;const $=Rt.value,G=Ls();if(!$.length||!to.value)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const re=J.value||Qt("estimatedNodeHeights.clientWidth",()=>{var Ze;return((Ze=M.value)==null?void 0:Ze.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return gs=[],kl=[],es=-1,vs.clear(),void(Hs.value=zi);const ce=(function(Ze){return[Math.round(Ze),Lt.value,Co.value,se.value,C.codeBlockMonacoOptions,ly(),h.value,Un.value,pm.value]})(re),we=gs.length<=$.length&&(De=ce,(ze=kl).length===De.length&&ze.every((Ze,tt)=>Object.is(Ze,De[tt])));var ze,De;const Ue=we&&es===G?$.length:we?y6($.length):0,ut=we?Array.from(vs):[];gs.length=$.length;for(let Ze=Ue;Ze<$.length;Ze++)gs[Ze]=ry($[Ze],Ze,re);for(const Ze of ut)Ze>=0&&Ze<$.length&&ZeHs.value);Qe=(function($){let G=!0,re=[0],ce="";function we(tt){var ct;const Ve=$.nodeHeights[tt];if(Number.isFinite(Ve)&&Ve>0)return Ve;const nt=$.parsedNodes.value[tt],gt=nt?.type,mt=!!((ct=$.hasCustomParagraphComponent)!=null&&ct.call($)),Et=$.estimatedNodeHeights.value[tt],_t=Et?.height;if(!(function(Kt,an,sn){return!!(sn&&an?.kind==="simple-text"&&(Kt==="paragraph"||Kt==="list_item"||Kt==="list"))})(gt,Et,mt)&&Number.isFinite(_t)&&_t>0)return _t;const Ot=J3e(nt,$.getContainerWidth()||640);return gt==="heading"||gt==="paragraph"&&Ot<=28&&(function(Kt,an){if(an)return!1;const sn=Kt.children;return!Array.isArray(sn)||!sn.length||sn.every(p$)})(nt,mt)?Ot:Math.max($.averageNodeHeight.value,Ot)}function ze(){var tt;const ct=$.parsedNodes.value.length,Ve=$.getPrefixCacheKeyParts().join(":");if(!G&&ce===Ve)return re;const nt=new Array(ct+1);nt[0]=0;for(let gt=0;gt=((ct=gt[nt])!=null?ct:0))return nt-1;let mt=0,Et=nt-1,_t=nt-1;for(;mt<=Et;){const Ot=mt+Et>>1;((Ve=gt[Ot+1])!=null?Ve:0)>=tt?(_t=Ot,Et=Ot-1):mt=Ot+1}return _t}function Ue(tt,ct){var Ve,nt;if(tt>=ct)return 0;if($.heightEstimationActive.value)return(function(Et,_t){var Ot,Kt;const an=$.parsedNodes.value.length,sn=Qx(Math.trunc(Et),0,an),un=Qx(Math.trunc(_t),sn,an);if(sn>=un)return 0;const Ln=ze();return((Ot=Ln[un])!=null?Ot:0)-((Kt=Ln[sn])!=null?Kt:0)})(tt,ct);if($.heightTreeSize.value!==$.parsedNodes.value.length){let Et=0;for(let _t=tt;_tsn<=0?0:$.fenwickRangeSum(mt,0,sn)+(sn-$.fenwickRangeSum(Et,0,sn))*gt;let Ot=0,Kt=Ve.length-1,an=Ve.length-1;for(;Ot<=Kt;){const sn=Ot+Kt>>1;_t(sn+1)>=tt?(an=sn,Kt=sn-1):Ot=sn+1}return an}let nt=tt;for(let gt=0;gt0||tt++}return tt}return{markFallbackHeightPrefixDirty:function(){G=!0},getFallbackNodeHeight:we,estimateHeightRange:Ue,estimateIndexForOffset:ut,estimateIndexForOffsetFromEnd:function(tt){var ct,Ve;const nt=$.parsedNodes.value;if(!nt.length)return 0;if(tt<=0)return Math.max(0,nt.length-1);if($.heightEstimationActive.value){const mt=(ct=ze()[nt.length])!=null?ct:0;return De(Math.max(0,mt-tt))}if($.heightTreeSize.value===nt.length){const mt=Ue(0,nt.length);return ut(Math.max(0,mt-tt))}let gt=tt;for(let mt=nt.length-1;mt>=0;mt--){const Et=(Ve=$.nodeHeights[mt])!=null?Ve:$.averageNodeHeight.value;if(gt<=Et)return mt;gt-=Et}return 0},getEstimatedNodeHeightCount:Ze,buildVirtualHeightSummary:function(tt){var ct;const Ve=$.parsedNodes.value.length;return{totalNodes:Ve,measuredCount:$.heightStats.count,estimatedCount:Ze(),averageNodeHeight:$.averageNodeHeight.value,topSpacerHeight:tt.topSpacerHeight,bottomSpacerHeight:tt.bottomSpacerHeight,estimatedTotalHeight:Ue(0,Ve),width:(ct=tt.width)!=null?ct:$.getContainerWidth()}}}})({parsedNodes:Rt,nodeHeights:hr,heightStats:ts,heightTreeSize:Fr,heightSumTree:Uu,heightKnownTree:Q0,averageNodeHeight:jr,heightEstimationActive:Pe,estimatedNodeHeights:sc,getContainerWidth:cn,hasCustomParagraphComponent:()=>!!Un.value.paragraph,getPrefixCacheKeyParts:()=>{var $;const G=Ld(J.value||Qt("getFallbackHeightPrefix.clientWidth",()=>{var ce;return((ce=M.value)==null?void 0:ce.clientWidth)||0})),re=(($=o.virtualScroll)==null?void 0:$.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[Rt.value.length,ts.count,Math.round(ts.total),Math.round(100*jr.value),re,G,Pe.value?1:0,pm.value,ee.value,Un.value.paragraph?1:0]},fenwickRangeSum:el}),Ke(()=>Rt.value.length,$=>{var G;Vt(),$<=0?j1():($F1(G))),$!==Fr.value&&Re($))},{immediate:!0});const _B=B(()=>{if(!pn.value)return Rt.value.map((ce,we)=>({node:ce,index:we}));const $=Rt.value.length,G=Gs(ys.start,0,$),re=Gs(ys.end,G,$);return Rt.value.slice(G,re).map((ce,we)=>({node:ce,index:G+we}))}),b6=B(()=>pn.value?on(0,Math.min(ys.start,Rt.value.length)):0),_6=B(()=>{if(!pn.value)return 0;const $=Rt.value.length;return on(Math.min(ys.end,$),$)});function ay(){return Qe.buildVirtualHeightSummary({topSpacerHeight:b6.value,bottomSpacerHeight:_6.value,width:W1()})}function xB(){const $=Rt.value,G=ay();return wn(St({},G),{probe:{paragraphReady:!!se.value.paragraph,listItemReady:!!se.value.listItem,listWrapperOverhead:se.value.listWrapperOverhead,headingReadyLevels:Object.entries(se.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:$.map((re,ce)=>{var we,ze,De,Ue,ut,Ze,tt,ct,Ve;return{index:ce,type:re.type,estimateKind:(ze=(we=sc.value[ce])==null?void 0:we.kind)!=null?ze:null,rendererKind:(Ue=(De=sc.value[ce])==null?void 0:De.rendererKind)!=null?Ue:null,estimatedHeight:(Ze=(ut=sc.value[ce])==null?void 0:ut.height)!=null?Ze:null,estimatedContentHeight:(ct=(tt=sc.value[ce])==null?void 0:tt.contentHeight)!=null?ct:null,measuredHeight:(Ve=hr[ce])!=null?Ve:null}})})}function x6(){return o.indexKey!=null?String(o.indexKey):Do.value?`virtual-${Fo()}`:"markdown-renderer"}function cy($){const G=String($),re=`${x6()}-`;if(!G.startsWith(re))return null;const ce=G.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ce)return null;const we=Number(ce[1]);return!Number.isInteger(we)||we<0||we>=Rt.value.length?null:we}function Fo(){var $,G,re;const ce=($=o.virtualScroll)==null?void 0:$.sessionKey;return String(ce!=null&&ce!==""?ce:(re=(G=o.indexKey)!=null?G:C.customId)!=null?re:uo)}function ws(){var $;const G=($=o.virtualScroll)==null?void 0:$.threadKey;return G==null||G===""?void 0:String(G)}const SB=B(()=>{var $,G,re;return(re=ws())!=null?re:String((G=($=o.indexKey)!=null?$:C.customId)!=null?G:uo)});function S6($){var G;return($??"")===((G=ws())!=null?G:"")}function Vr(){var $,G,re;return G=($=o.virtualScroll)==null?void 0:$.measurementKey,re=(function(){const ce=h.value;return(function(we){var ze,De;const Ue=we.renderer,ut=Ue==="monaco"?we.codeBlockMonacoOptions:void 0,Ze=we.codeBlockProps,tt=Ue==="shiki";return[we.isDark?"dark":"light",Ue==="monaco"?"code-rich":Ue==="pre"?"code-pre":"code-shiki",we.codeBlockStream===!1?"code-static":"code-stream",Vs(we.codeBlockMinWidth),Vs(we.codeBlockMaxWidth),...tt?[Hde((ze=Ze?.themes)!=null?ze:we.themes,(De=Ze?.langs)!=null?De:we.langs)]:[],Vs(ut?.fontSize),Vs(ut?.lineHeight),Vs(ut?.fontFamily),Vs(ut?.tabSize),Vs(ut?.MAX_HEIGHT),Vs(ut?.wordWrap),Vs(ut?.wrappingIndent),Vs(ut?.padding),Vs(Ze?.showHeader),Vs(Ze?.showCopyButton),Vs(Ze?.showExpandButton),Vs(Ze?.showPreviewButton),Vs(Ze?.showCollapseButton),Vs(Ze?.showFontSizeButtons)].join("\0")})({renderer:ce,isDark:C.isDark,codeBlockStream:C.codeBlockStream,codeBlockMinWidth:C.codeBlockMinWidth,codeBlockMaxWidth:C.codeBlockMaxWidth,codeBlockMonacoOptions:ce==="monaco"?C.codeBlockMonacoOptions:void 0,codeBlockProps:C.codeBlockProps,themes:ce==="shiki"?C.themes:void 0,langs:ce==="shiki"?C.langs:void 0})})(),[G==null?"":String(G),re].join("\0")}function W1(){return cn()}const jf=B(()=>Ld(W1())),tl=B(()=>[Vr(),jf.value].join("\0")),CB=B(()=>{var $;return Do.value?["virtual",($=ws())!=null?$:"",Fo(),tl.value].join("\0"):o.indexKey});function ic(){li.value+=1}function C6($){return!(!$||!Number.isInteger($.index)||$.index<0||$.index>=Rt.value.length||$.sessionKey!==Fo()||$.threadKey!==ws()||$.layoutEpochKey!==tl.value)}function uy($){const G=String($),re=Yt.get(G);return re?C6(re)?re.index:null:cy(G)}function dy($="async-node"){(yn.size||Yt.size)&&(yn.clear(),Yt.clear(),ic(),$o($))}const lc=fn(i7,null),M6={reportHeight($,G){if(!Xe.value)return;const re=uy($);if(re==null)return;const ce=Cl.get(re);if(!ce)return;const we=Number(G),ze=O1(re,ce);(function(De,Ue,ut={}){Hr(()=>Zu(De,Ue,ut))})(re,Number.isFinite(we)&&we>0?Math.max(we,ze||0):ze)},markPending($){if(!Xe.value)return;const G=cy($);G!=null&&(function(re,ce){var we;const ze=Yt.get(re);if(ze&&C6(ze))return yn.set(re,Math.max(0,(we=yn.get(re))!=null?we:0)+1),ic(),void $o("async-node");yn.set(re,1),Yt.set(re,(function(De){return{index:De,sessionKey:Fo(),threadKey:ws(),layoutEpochKey:tl.value}})(ce)),ic(),$o("async-node")})(String($),G)},markSettled($){if(!Xe.value)return;const G=String($),re=uy($);(re!=null||(function(ce){return yn.has(String(ce))})(G))&&(function(ce){var we;const ze=(we=yn.get(ce))!=null?we:0;return!(ze<=0||(ze<=1?(yn.delete(ce),Yt.delete(ce)):yn.set(ce,ze-1),ic(),ze===1&&$o("async-node"),0))})(G)&&re!=null&&Wr()}};function MB(){let $=0;for(const G of Cl.values())$+=Qt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=G?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,$))}qn(i7,{reportHeight($,G){M6.reportHeight($,G),lc?.reportHeight($,G)},markPending($){M6.markPending($),lc?.markPending($)},markSettled($){M6.markSettled($),lc?.markSettled($)}});let A6,T6=null,rc=null;function Of($){return $!==!1&&$!=null&&$!==""}function fy(){return pn.value?(function(){if(!pn.value)return!0;const $=Rt.value.length,G=Gs(ys.start,0,$),re=Gs(ys.end,G,$);if(G>=re)return!0;for(let ce=G;ce=V1.value}function E6(){return Fe.value===!0&&!kt.value&&vi.value===0&&Gl.size===0&&Kl.size===0&&yi==null&&fy()}function py(){var $,G;if((($=o.virtualScroll)==null?void 0:$.settleMode)!=="manual"||T6===Fo()&&A6===ws())return!0;const re=(G=o.virtualScroll)==null?void 0:G.settledToken;return!!Of(re)&&rc===ud(re)}function I6(){return E6()&&py()}function AB($,G){return G.totalNodes<=0?$==="final"?"final":"estimate":G.measuredCount>=G.totalNodes?$==="final"?"final":"measured":G.measuredCount>0||G.estimatedCount>0?"mixed":"estimate"}function q1($="manual",G){const re=ay(),ce=(function(we){return we||(Fe.value!==!0?Rt.value.length>0?"streaming":"estimating":!fy()||Kl.size>0||yi!=null?"measuring":I6()?"settled":"settling")})(G);return{sessionKey:Fo(),threadKey:ws(),phase:ce,nodeCount:re.totalNodes,liveRange:{start:ys.start,end:ys.end},renderedCount:Ae.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:MB(),totalHeight:hy(),width:re.width,final:Fe.value===!0,stable:I6(),confidence:AB(ce,re),reason:$}}function Xu(){const $=Te.value||Se(),G=M.value;if(!$||!G)return null;const re=$.ownerDocument||G.ownerDocument||document,ce=$===re.documentElement||$===re.body||$===re.scrollingElement,we=Qt("getScrollBox.scrollTop",()=>et($,re,ce)),ze=Qt("getScrollBox.scrollHeight",()=>{var Ue,ut,Ze,tt,ct;return ce?Math.max((ut=(Ue=re.documentElement)==null?void 0:Ue.scrollHeight)!=null?ut:0,(tt=(Ze=re.body)==null?void 0:Ze.scrollHeight)!=null?tt:0,(ct=$.scrollHeight)!=null?ct:0):$.scrollHeight}),De=Qt("getScrollBox.clientHeight",()=>{var Ue;return ce?((Ue=re.documentElement)==null?void 0:Ue.clientHeight)||$.clientHeight||0:$.clientHeight});return{root:$,doc:re,isViewportRoot:ce,scrollTop:we,scrollHeight:ze,clientHeight:De}}function hy(){const $=Rt.value.length,G=Math.max(0,on(0,$)),re=Qt("getRendererLogicalHeight.offsetHeight",()=>{var we,ze;return(ze=(we=M.value)==null?void 0:we.offsetHeight)!=null?ze:0}),ce=Math.max(0,re>0?re:Qt("getRendererLogicalHeight.scrollHeight",()=>{var we,ze;return(ze=(we=M.value)==null?void 0:we.scrollHeight)!=null?ze:0}));return $<=0?Math.ceil(re):pn.value?G>0?Math.max(1,Math.ceil(G),(function(){let we=b6.value+_6.value;for(const ze of no.values())ze&&(we+=Math.max(0,Qt("getVirtualizedDomLogicalHeight.offsetHeight",()=>ze.offsetHeight||0)));return Math.ceil(Math.max(0,we))})(),(function(we,ze){return we<=0||ze<=0?0:ze<=we+Math.max(512,.05*we)?Math.ceil(ze):0})(G,ce)):Math.max(1,Math.ceil(ce)):Xe.value?G>0||ts.count>0||Qe.getEstimatedNodeHeightCount()>0?(Ni.value&&Ae.value,Math.max(1,Math.ceil(ce),Math.ceil(G))):Math.ceil(ce):Math.max(1,Math.ceil(ce),Math.ceil(G))}function my($){const G=M.value;if(!G)return null;const re=Qt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>G.getBoundingClientRect());return(function(we){return we.isViewportRoot?we.clientHeight:Qt("getViewportBottomInRoot.getBoundingClientRect",()=>we.root.getBoundingClientRect().bottom)})($)-re.bottom}function TB($={}){const G=$.requireViewport!==!1,re=(function(ze=64){const De=Xu(),Ue=M.value;if(!De||!Ue)return!1;const ut=(function(tt){if(tt.isViewportRoot)return{top:0,bottom:tt.clientHeight};const ct=Qt("getVirtualViewportRect.getBoundingClientRect",()=>tt.root.getBoundingClientRect());return{top:ct.top,bottom:ct.bottom}})(De),Ze=Qt("isRendererNearVirtualViewport.getBoundingClientRect",()=>Ue.getBoundingClientRect());return Ze.bottom>=ut.top-ze&&Ze.top<=ut.bottom+ze})();if(G&&!re)return null;const ce=(function(){const ze=Xu(),De=M.value;if(!ze||!De||Math.max(0,ze.scrollHeight-ze.scrollTop-ze.clientHeight)>64)return null;const Ue=my(ze);return Ue==null?null:Ue>=-8&&Ue<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,Ue)}:null})();if(ce)return{anchor:ce,captured:!0};const we=X0();if(we)return{anchor:{type:"node",nodeIndex:we.nodeIndex,offsetWithinNodePx:we.offsetWithinNodePx},captured:re};if($.allowFallback===!0){const ze=(function(){const De=Rt.value.length;return De<=0?null:{type:"node",nodeIndex:Gs(Zl.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return ze?{anchor:ze,captured:!1}:null}return null}function L6($){let G=2166136261;for(let re=0;re<$.length;re++)G^=$.charCodeAt(re),G=Math.imul(G,16777619);return(G>>>0).toString(36)}function EB($,G){let re=$;for(let ce=0;ce8192?`${ce.slice(0,8192)}...${ce.length}`:ce;return`${ce.length}:${L6(we)}`})($)}`;if(typeof $=="function")return"fn";if(typeof $!="object")return typeof $;if(G.has($))return"cycle";if(re>=6)return"max-depth";G.add($);try{if(Array.isArray($)){if($.length<=160){const Ze=[];for(let tt=0;tt<$.length;tt++)Ze.push(Hf($[tt],G,re+1));return`a:${$.length}:${Ze.join(",")}`}const ze=[],De=[],Ue=Math.max(0,$.length-32);let ut=2166136261;for(let Ze=0;Ze<$.length;Ze++){const tt=Hf($[Ze],G,re+1);ut=EB(ut,tt),Ze<32&&ze.push(tt),Ze>=Ue&&De.push(tt)}return[`a:${$.length}`,`h=${ze.join(",")}`,`t=${De.join(",")}`,`all=${(ut>>>0).toString(36)}`].join(":")}const ce=$,we=Object.keys(ce).filter(ze=>{const De=ce[ze];return ze!=="parent"&&ze!=="el"&&ze!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||IB.has(ze))}).sort();return`o:${we.length}:${we.map(ze=>`${ze}=${Hf(ce[ze],G,re+1)}`).join(";")}`}finally{G.delete($)}}let $6=-1,N6="",U1=[2166136261];function Ju($){const G=Rt.value[$];return G?L6(Hf(G)):""}function LB($,G){let re=$;for(let ce=0;ce>>0}function z6(){var $,G;const re=ee.value;if($6===re)return N6;const ce=Rt.value.length;let we=y6(ce);($6!==re-1||we>ce||U1.length>>0).toString(36),$6=re,N6}function ac($,G={}){var re;const ce=G.includeHeightCache===!0,we=(re=G.includeContentHash)!=null?re:ce,ze=ce?(function(Ue){const ut=(function(){var mt,Et;const _t=Number((Et=(mt=o.virtualScroll)==null?void 0:mt.heightCacheLimit)!=null?Et:5e3);return!Number.isFinite(_t)||_t<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(_t))})();if(!Number.isFinite(ut)||Ue.length<=ut)return Ue;const Ze=new Map,tt=mt=>{!mt||Ze.size>=ut||Ze.set(mt.index,mt)},ct=Rt.value.length,Ve=Gs(ys.start-2*Xn.value,0,ct),nt=Gs(ys.end+2*Xn.value,Ve,ct);for(const mt of Ue)mt.index>=Ve&&mt.index=0&&Ze.sizemt.index-Et.index).slice(0,ut)})(Sn().map(Ue=>{var ut;const Ze=Rt.value[Ue.index];return Ze?wn(St({},Ue),{nodeType:String((ut=Ze.type)!=null?ut:""),signature:Ju(Ue.index)}):null}).filter(Ue=>!!Ue)):[],De=TB({allowFallback:G.allowAnchorFallback===!0,requireViewport:G.requireViewport});return De||ze.length||G.includeEmptyState===!0?wn(St({sessionKey:$.sessionKey,threadKey:$.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:$,width:$.width,contentHash:we?z6():void 0,measurementKey:Vr()||void 0,heightCache:ze.length?ze:void 0}):null}function B6($){var G,re;const ce=Xu();if(!ce)return;const we=(function(Ue){const ut=M.value;if(!ut)return null;const Ze=le(ut,Ue.root),tt=Rt.value.length,ct=Qt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ut.offsetHeight||0),Ve=Math.max(0,ct>0?ct:tt>0?Qt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ut.scrollHeight||0):0),nt=hy();return Ze+Math.max(Ve,nt)})(ce);if(we==null)return;const ze=Math.max(0,$.distanceFromBottomPx),De=Math.max(0,we-ce.clientHeight-ze);(function(Ue){jt=od()+120,Zt=Ue})(De),ce.isViewportRoot?(re=(G=ce.doc.defaultView)==null?void 0:G.scrollTo)==null||re.call(G,0,De):Yx(ce.root,ce.doc,De,{isReverseFlexScrollRoot:je,getNormalizedScrollTop:et})}const R6=[];function gy(){if(j)for(ht!=null&&(Lo?.(ht),ht=null);R6.length;){const $=R6.pop();$!=null&&window.clearTimeout($)}}function cc($){const G=!!Ne.value;Ne.value=null,jt=0,Zt=null,gy(),G&&$&&$o($)}function uc(){if(!Ne.value||!j||ht!=null)return;const $=()=>{ht=null;const G=Ne.value;G&&B6(G)};ht=yo?yo($):null,ht==null&&$()}function vy($,G={}){const re=Rt.value.length;return re<=0?[]:$.filter(ce=>!(!Number.isInteger(ce.index)||ce.index<0||ce.index>=re)&&!(!Number.isFinite(ce.height)||ce.height<=0)&&!(G.requireSignature&&!ce.signature)&&!(G.requireCompatibilityMetadata&&!ce.nodeType&&!ce.signature)&&(function(we){var ze;const De=Rt.value[we.index];return!(!De||we.nodeType&&we.nodeType!==String((ze=De.type)!=null?ze:"")||we.signature&&we.signature!==Ju(we.index))})(ce))}function yy($){const G=Ld(W1()),re=Ld($);return G!==-1&&re!==-1&&G===re}function P6($){var G;const re=Number($?.width);if(Number.isFinite(re)&&re>0)return re;const ce=Number((G=$?.metrics)==null?void 0:G.width);return Number.isFinite(ce)&&ce>0?ce:null}function wy($){var G;return $.sessionKey===Fo()&&!!S6($.threadKey)&&((G=$.measurementKey)!=null?G:"")===Vr()&&!!yy(P6($))&&!!(function(re){const ce=re.heightCache;return!!ce?.length&&(ky(re)?ce.some(we=>!!(we.nodeType||we.signature)):ce.some(we=>!!we.signature))})($)}function ky($){return!!($.contentHash&&$.contentHash===z6())}function $B($){return!ky($)}let Z1=null,K1=null,Df=null,Qu=null,ed=null;function F6($){var G;const re=$.map(we=>{var ze,De;return[we.index,Math.round(10*we.height),(ze=we.nodeType)!=null?ze:"",(De=we.signature)!=null?De:""].join("")}).join(""),ce=Ld(W1());return[(G=ws())!=null?G:"",Fo(),Vr(),Rt.value.length,ce,$.length,L6(re)].join(":")}function by($=(G=>(G=o.virtualScroll)==null?void 0:G.heightCache)()){if(!Xe.value||!$?.length||Rt.value.length<=0||!yy((G=o.virtualScroll)==null?void 0:G.heightCacheWidth))return!1;var G;const re=vy($,{requireSignature:!0});if(!re.length)return!1;const ce=F6(re);return ce===Z1?(K1="standalone",!0):(Ku(re,{mode:"merge"}),Vt(),Z1=ce,K1="standalone",id(),$o("restore"),!0)}function j6($,G={}){var re,ce,we;if(!Xe.value||!$||$.sessionKey!==Fo()||!S6($.threadKey)||Rt.value.length<=0)return!1;const ze=!!((re=$.heightCache)!=null&&re.length)&&!Vf(),De=!$.anchor||$.anchorCaptured===!1&&G.allowUncapturedAnchor!==!0?null:$.anchor,Ue=G.restoreAnchor===!0&&!!De&&!Vf()&&Number(P6($))>0;let ut=!1;if((ce=$.heightCache)!=null&&ce.length&&wy($)){const tt=vy($.heightCache,{requireCompatibilityMetadata:!$.contentHash,requireSignature:$B($)});tt.length&&(Ku(tt,{mode:"merge"}),Vt(),Z1=F6(tt),K1="restore",id(),ut=!0)}if(ze||Ue)return!1;if(!G.restoreAnchor||!De)return ut&&$o("restore"),!0;const Ze=(function(tt,ct){var Ve;const nt=tt.anchor,gt=nt?nt.type==="bottom"?`bottom:${Math.round(nt.distanceFromBottomPx)}`:`node:${nt.nodeIndex}:${Math.round(nt.offsetWithinNodePx)}`:"none";return[(Ve=ws())!=null?Ve:"",Fo(),Vr(),jf.value,ct,gt].join(":")})($,(we=G.restoreToken)!=null?we:"imperative");return Df===Ze?(ut&&$o("restore"),!0):(Df=Ze,(function(tt){const ct=()=>{if(tt.type==="node")return cc(),void J0({nodeIndex:tt.nodeIndex,offsetWithinNodePx:tt.offsetWithinNodePx});if(rs(),Ht.value=null,Ne.value=tt,gy(),B6(tt),j)for(const Ve of[0,120,280,480])R6.push(window.setTimeout(()=>{const nt=Ne.value;nt&&B6(nt)},Ve))};(function(Ve){if(!pn.value)return!1;const nt=Rt.value.length;return!(nt<=0||(Zl.value=Ve.type==="node"?Gs(Ve.nodeIndex,0,nt-1):nt-1,Dr(),0))})(tt)?yt(ct):ct()})(De),$o("restore"),!0)}function Vf(){const $=W1();return Number.isFinite($)&&$>0}function _y($){var G;return $.sessionKey===Fo()&&!!S6($.threadKey)&&(Rt.value.length<=0||!(!((G=$.heightCache)!=null&&G.length)||Vf())||!(!($.anchor&&Number(P6($))>0)||Vf()))}function O6(){Wo.clear();for(const $ of Object.keys(hr)){const G=Number($);Number.isInteger(G)&&G>=0&&G{let G=!1,re=null;const ce=()=>{G||(G=!0,re!=null&&window.clearTimeout(re),$())};if(yo)return yo(ce),void(re=window.setTimeout(ce,50));re=window.setTimeout(ce,0)})}function H6($,G=ws(),re=tl.value){return Fo()===$&&ws()===G&&tl.value===re}function D6(){return zo(this,arguments,function*($={}){var G,re,ce,we,ze;const De=Fo(),Ue=ws(),ut=tl.value,Ze=(G=$.frames)!=null?G:2,tt=(re=$.timeoutMs)!=null?re:120,ct=(ce=$.reason)!=null?ce:"manual",Ve=$.expectedSettledTokenKey,nt=$.flushPendingTimers===!0,gt=q1(ct),mt=()=>wn(St({},gt),{phase:gt.final?"settling":gt.phase,stable:!1,confidence:gt.confidence==="final"?"mixed":gt.confidence,reason:ct}),Et=()=>H6(De,Ue,ut)&&(Ve==null||sd()===Ve);for(let an=0;anwindow.setTimeout(sn,an))})(tt),!Et()||(nt&&J9(),Wr(),td(),!Et()))return mt();const _t=E6();_t&&(T6=De,A6=Ue,((we=o.virtualScroll)==null?void 0:we.settleMode)==="manual"&&Ve!=null&&Of((ze=o.virtualScroll)==null?void 0:ze.settledToken)&&sd()===Ve&&(rc=ud(o.virtualScroll.settledToken)));const Ot=Et()&&_t&&py(),Kt=q1(ct,Ot?"final":void 0);return Z6(Kt,!0),Kt})}let V6="content",G1=null,Y1=null,W6=0,nd=null,dc=null,q6=null,U6=null;function od(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Sy($){var G,re;const ce=nd;if(!ce)return!0;const we=(re=(G=o.virtualScroll)==null?void 0:G.heightDiffThresholdPx)!=null?re:1;return Math.abs($.totalHeight-ce.totalHeight)>we||$.sessionKey!==ce.sessionKey||$.phase!==ce.phase||$.stable!==ce.stable||$.final!==ce.final||$.threadKey!==ce.threadKey||$.nodeCount!==ce.nodeCount||$.measuredCount!==ce.measuredCount||$.width!==ce.width}function sd($=(G=>(G=o.virtualScroll)==null?void 0:G.settledToken)()){return Vs($)}function Cy($,G){var re,ce;return[$,G.sessionKey,(re=G.threadKey)!=null?re:"",Vr(),z6(),Vs((ce=o.virtualScroll)==null?void 0:ce.settledToken),Math.round(G.totalHeight),Math.round(G.width)].join("\0")}function id(){q6=null,U6=null,dc=null}function NB($){const G=$.heightCache;return G?.length?F6(G):""}function ld($){var G,re,ce;const we=$.metrics,ze=$.anchor?(De=$.anchor).type==="bottom"?`bottom:${Math.round(De.distanceFromBottomPx)}`:`node:${De.nodeIndex}:${Math.round(De.offsetWithinNodePx)}`:"none";var De;return[$.sessionKey,(G=$.threadKey)!=null?G:"",(re=$.measurementKey)!=null?re:Vr(),(ce=$.contentHash)!=null?ce:"",NB($),ze,$.anchorCaptured?1:0,we.liveRange.start,we.liveRange.end,we.renderedCount,we.nodeCount,Math.round(we.totalHeight),Math.round(we.width),we.phase,we.stable?1:0].join("\0")}function Z6($,G=!1){if(!Xe.value||(function(De=!1){return!De&&Do.value&&!qe.value})(G))return;const re=G||Sy($),ce=(function(De,Ue=!1){return Ue||De.stable||De.phase==="final"?{state:ac(De,{includeHeightCache:!0})}:{state:ac(De)}})($,G),we=ce.state,ze=!!(we&&(re||(function(De,Ue=!1){return!!Ue||ld(De)!==dc})(we,G)));if(re&&(F($),nd=$,W6=od()),we&&ze&&(H(we),we.anchor&&D(we.anchor),dc=ld(we)),$.stable){const De=Cy("settled",$);if(De!==q6){q6=De;const Ue=ac($,{includeHeightCache:!0});Ue&&(H(Ue),dc=ld(Ue)),(function(ut){s("render-settled",ut)})($)}}if($.phase==="final"){const De=Cy("final",$);if(De!==U6){U6=De;const Ue=ac($,{includeHeightCache:!0});Ue&&(H(Ue),dc=ld(Ue)),(function(ut){s("render-final",ut)})($)}}}function K6(){G1!=null&&(Lo?.(G1),G1=null),Y1!=null&&j&&(window.clearTimeout(Y1),Y1=null)}function My(){G1=null,Y1=null,(function($){if(Kl.size>0||yi!=null)return!0;switch($){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(V6)&&(Wr(),td()),Z6(q1(V6))}function $o($){var G,re;if(!Xe.value||(V6=$,G1!=null||Y1!=null))return;const ce=Math.max(0,(re=(G=o.virtualScroll)==null?void 0:G.emitIntervalMs)!=null?re:32),we=Math.max(0,ce-(od()-W6)),ze=()=>{Y1=null,G1=yo?yo(My):null,G1==null&&My()};j&&we>0?Y1=window.setTimeout(ze,we):ze()}function Ay(){ne.value+=1}function Wf($){if(Ni.value&&$>=Ae.value){const G=Rt.value[$],re=Oe.value===!0&&Fe.value!==!0&&$>=Rt.value.length-2,ce=G?.type==="code_block"||G?.type==="image"||G?.type==="mermaid"||G?.type==="infographic";if(!re||ce)return!1}return!xl.value||$=at.value&&(q.value||(q.value=!0,v6()),!H1.value||!Zs))return fc($),void(G&&La($,!0));if(${if(Q9.delete(ze),!xl.value||g6.value.has(ze))return;const ut=no.get(ze);if(!ut)return;const Ze=Se(ut),tt=ut.ownerDocument||document,ct=tt.defaultView||window,Ve=!Ze||Ze===tt.documentElement||Ze===tt.body,nt=!Ve&&Ze?Qt("nodeVisibilityFallback.root.getBoundingClientRect",()=>Ze.getBoundingClientRect()):null,gt=Ve?0:nt.top,mt=Ve?Qt("nodeVisibilityFallback.clientHeight",()=>{var _t,Ot;return(Ot=(_t=ct.innerHeight)!=null?_t:Ze?.clientHeight)!=null?Ot:0}):nt.bottom,Et=Qt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ut.getBoundingClientRect());Et.bottom>=gt-500&&Et.top<=mt+500&&La(ze,!0)},1800+De);Q9.set(ze,Ue)})($);let we=null;we=Ke(()=>ce.isVisible.value,ze=>{if(ze){Pf($),La($,!0),we?.(),Rf.delete($),oc.get($)===ce&&oc.delete($);try{ce.destroy()}catch{}}},{immediate:!0}),Rf.set($,we),pn.value&&Yl()}function G6(){yi=null,Hr(()=>{let $=!1;for(const[G,re]of Kl)Kl.delete(G),Cl.get(G)===re.el&&Bi.get(G)===re.version&&($=Zu(G,re.height,{allowShrink:re.allowShrink})||$);return $})}function pc(){yi!=null&&(Lo?.(yi),yi=null),Kl.clear()}function Uf($,G){(function(re,ce,we){var ze;if(!Number.isFinite(we)||we<=0||Cl.get(re)!==ce)return;const De=Bi.get(re);if(De==null)return;const Ue=Rt.value[re],ut=kt.value&&Fe.value!==!0&&!((ze=o.nodes)!=null&&ze.length)&&re>=Rt.value.length-2,Ze=!(Ue?.loading===!0||ut),tt=Kl.get(re),ct=tt?tt.allowShrink&&Ze:Ze,Ve=tt&&!ct?Math.max(tt.height,we):we;Kl.set(re,{height:Ve,allowShrink:ct,version:De,el:ce}),yi==null&&(yi=yo?yo(G6):null,yi==null&&G6())})($,G,O1($,G))}function Wr(){for(const[$,G]of Cl)G&&Uf($,G)}function Ty(){Os?.disconnect(),Os=null,Vo.clear()}function Y6(){for(;D1.length;)Bf(D1.pop())}Ke(qe,$=>{$&&$o("content")},{flush:"post"}),t({getVirtualMetrics:q1,captureVirtualState:function($={}){var G;return ac(q1("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:$.allowFallbackAnchor===!0,requireViewport:$.requireViewport===!0,includeEmptyState:(G=$.includeEmptyState)==null||G})},restoreVirtualState:function($,G={}){const re=G.restoreAnchor===!0,ce=G.restoreToken==null?"imperative":String(G.restoreToken);Qu=$,ed={restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0},!j6($,{restoreAnchor:re,restoreToken:ce,allowUncapturedAnchor:G.allowUncapturedAnchor===!0})&&_y($)||(Qu=null,ed=null)},forceMeasure:function($="manual"){return zo(this,null,function*(){yield yt(),yield xy(),Wr(),td(),yield yt();const G=q1($);return Z6(G,!0),G})},settle:D6,scrollToNode:function($,G="start"){cc(),rs();const re=Rt.value.length;if(re<=0)return;const ce=Gs($,0,re-1),we=()=>{var ze;const De=Ns({nodeIndex:ce,offsetWithinNodePx:0}),Ue=Wt(ce),ut=Xu(),Ze=(ze=ut?.clientHeight)!=null?ze:0,tt=Tn();let ct=De;if(G==="center")ct=De-Ze/2+Ue/2;else if(G==="end")ct=De-Ze+Ue;else if(G==="nearest"&&tt!=null){if(De>=tt&&De+Ue<=tt+Ze)return;ct=DeUs.value,$=>{if(!$){Ty();for(const G of mr.values())for(const re of G)Bf(re);mr.clear(),Bi.clear(),Y6(),pc()}},{immediate:!0}),Ke(Fe,$=>{$&&(function(){if(j&&Fe.value&&Cl.size){Y6();for(const G of[80,240,640]){const re=Gu(G,()=>{for(const[ce,we]of Cl)we&&Uf(ce,we)},"final");re!=null&&D1.push(re)}}})(),$o($?"final":"content")});const zB=Xx(()=>$o("content"),16),BB=Xx(()=>$o("batch"),16);Ke([()=>Rt.value.length,()=>Ae.value],()=>{Ne.value&&uc(),zB()},{flush:"post",immediate:!0}),Ke([()=>ys.start,()=>ys.end],()=>{BB()},{flush:"post"});const{cleanupBatchScheduler:RB}=(function($){const{props:G,isClient:re,isTestEnv:ce,parsedNodesIdentity:we,parsedNodeCount:ze,desiredRenderedCount:De,datasetKey:Ue,batchingEnabled:ut,incrementalRenderingActive:Ze,resolvedBatchSize:tt,resolvedInitialBatch:ct,renderedCount:Ve,adaptiveBatchSize:nt,previousRenderContext:gt,previousBatchConfig:mt,requestFrame:Et,cancelFrame:_t,hasIdleCallback:Ot,cleanupNodeVisibility:Kt,onDatasetKeyChanged:an,onDatasetChanged:sn}=$;let un=null,Ln="raf",On=null,wo=0,Ys=!1,Ds=!1;const Xl=new Set,gr=new Set;function md(){if(re){un!=null&&(Ln==="raf"&&_t?_t(un):Ln==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(un):Ln==="timeout"&&window.clearTimeout(un),un=null),wo+=1;for(const ri of Xl)_t&&_t(ri);for(const ri of gr)window.clearTimeout(ri);Xl.clear(),gr.clear(),On=null,Ys=!1,Ds=!1}}function t3(){return typeof performance<"u"?performance.now():Date.now()}function Uy(ri){(function(qr){var Na;if(!Ze.value)return;const Ur=Math.max(2,(Na=G.renderBatchBudgetMs)!=null?Na:6),Zr=Math.max(1,tt.value||1),Jl=Math.max(1,Math.floor(Zr/4));qr>1.5*Ur?nt.value=Math.max(Jl,Math.floor(.8*nt.value)):qr<.6*Ur&&nt.value=Ur)return;const Zr=Math.max(1,ri),Jl=()=>{const gc=t3();un=null;const gd=On??Zr;On=null;const vc=t3();Ve.value=Math.min(Ur,Ve.value+gd),Kt(Ve.value),(function(oh,n3){if(!re)return void Uy(n3);Ys=!0;const Yy=++wo;yt().then(()=>{var Xy;if(Yy!==wo)return;const oR=t3(),sR=Math.max(n3,oR-oh),Jy=()=>{Yy===wo&&Uy(sR)};if(Et){let J1=null,yc=null,ew=!1;const tw=()=>{ew||(ew=!0,J1!==null&&(Xl.delete(J1),J1=null),yc!==null&&(gr.delete(yc),window.clearTimeout(yc),yc=null),Jy())};return J1=Et(()=>{tw()}),Xl.add(J1),yc=window.setTimeout(()=>{J1!==null&&_t&&_t(J1),tw()},Math.max(32,(Xy=G.renderBatchIdleTimeoutMs)!=null?Xy:120)),void gr.add(yc)}const Qy=window.setTimeout(()=>{gr.delete(Qy),Jy()},0);gr.add(Qy)})})(gc,t3()-vc)};if(!re||Pi.immediate)return void Jl();const za=Math.max(0,(qr=G.renderBatchDelay)!=null?qr:16);if(On=On!=null?Math.max(On,Zr):Zr,un==null){if(!ce&&Ot&&window.requestIdleCallback){const gc=Math.max(0,(Na=G.renderBatchIdleTimeoutMs)!=null?Na:120);return Ln="idle",void(un=window.requestIdleCallback(()=>Jl(),{timeout:gc}))}if(Et&&!ce)return Ln="raf",void(un=Et(()=>{za===0?Jl():(Ln="timeout",un=window.setTimeout(()=>Jl(),za))}));Ln="timeout",un=window.setTimeout(()=>Jl(),za)}}function Ky(ri,Pi={}){Ys?Ds=!0:ri==null?Gy():Zy(ri,Pi)}function Gy(){Ze.value&&Zy(ut.value?Math.max(1,Math.round(nt.value)):Math.max(1,tt.value))}return Ke([we,ze,Ue,Ze,tt,ct,()=>G.renderBatchDelay],()=>{var ri;const Pi=ze.value,qr=gt.value,Na=Ue.value,Ur=!Object.is(Na,qr.key),Zr=Pi!==qr.total,Jl=Ur||Zr;gt.value={key:Na,total:Pi};const za=mt.value,gc=(ri=G.renderBatchDelay)!=null?ri:16,gd=za.batchSize!==tt.value||za.initial!==ct.value||za.delay!==gc||za.enabled!==Ze.value;mt.value={batchSize:tt.value,initial:ct.value,delay:gc,enabled:Ze.value},Ur&&an(Pi),(Jl||gd||!Ze.value)&&md(),(Jl||gd)&&(nt.value=Math.max(1,tt.value||1)),Jl&&sn();const vc=De.value;if(!Pi)return Ve.value=0,void Kt(0);if(!Ze.value)return Ve.value=vc,void Kt(Ve.value);const oh=Ur||qr.total===0;Ve.value=oh||gd?Math.min(vc,ct.value):Math.min(Ve.value,vc);const n3=Math.max(1,ct.value||tt.value||Pi);Ve.value{Ze.value&&(typeof Pi=="number"&&ri<=Pi||ri>Ve.value&&Ky())}),{cleanupBatchScheduler:md}})({props:C,isClient:j,isTestEnv:ms,parsedNodesIdentity:Ge,parsedNodeCount:ot,desiredRenderedCount:V1,datasetKey:CB,batchingEnabled:Ul,incrementalRenderingActive:Ni,resolvedBatchSize:gi,resolvedInitialBatch:si,renderedCount:Ae,adaptiveBatchSize:At,previousRenderContext:Ie,previousBatchConfig:lt,requestFrame:yo,cancelFrame:Lo,hasIdleCallback:yl,cleanupNodeVisibility:wB,onDatasetKeyChanged:$=>{pc(),j1(),Vt(),id(),$>0&&Re($)},onDatasetChanged:()=>{pn.value&&Yl({immediate:!0})}});Ke([nc,pn,()=>M.value,()=>X()],([$,G])=>{if(!$)return ey(),void m6();kB(),G?Yl({immediate:!0}):m6()},{flush:"post",immediate:!0}),Ke([()=>Rt.value.length,()=>pn.value],$=>zo(null,[$],function*([G,re]){re&&G&&j&&(yield yt(),Yl({immediate:!0}))}),{flush:"post"}),Ke(Pe,$=>{$&&(function(){var G;if(dt.value&&Mt.value&&Ft.value&&((G=Ut.value)!=null&&G[1]))return;const re=It({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ce=It({type:"list_item",children:[re],raw:"- Probe paragraph text"}),we=It({type:"list",ordered:!1,items:[ce],raw:"- Probe paragraph text"});dt.value=re,Mt.value=ce,Ft.value=we;const ze={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)ze[De]=It({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});Ut.value=ze})()},{immediate:!0}),Ke([()=>M.value,Pe],()=>{if(!Pe.value)return k6(),void(J.value=0);ny(),k6(),Pe.value&&M.value&&typeof ResizeObserver<"u"&&(Yu=new ResizeObserver(()=>{ny(),Ht.value&&_l(),Ne.value&&uc(),$o("resize")}),Yu.observe(M.value))},{immediate:!0}),Ke([Pe,So,tl],()=>zo(null,null,function*(){if(!Pe.value)return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();yield yt(),(function(){if(!Pe.value||typeof window>"u")return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Vt();const $={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},G=ty(w6(R.value),".paragraph-node");$.paragraph=vm(R.value,G,"pre-wrap");const re=w6(O.value),ce=re?.querySelector(".paragraph-node");$.listItem=vm(O.value,ce,"pre-wrap");const we=Qt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,Ue;return(Ue=(De=U.value)==null?void 0:De.offsetHeight)!=null?Ue:0}),ze=Qt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,Ue;return(Ue=(De=O.value)==null?void 0:De.offsetHeight)!=null?Ue:0});$.listWrapperOverhead=Math.max(0,we-ze);for(let De=1;De<=6;De++){const Ue=ty(w6(Z[De]),`h${De}`);$.headings[De]=vm(Z[De],Ue,"pre-wrap")}se.value=$,Vt()})()}),{flush:"post",immediate:!0}),Ke(()=>Rt.value.length,()=>{pn.value&&Yl({immediate:!0})}),Ke([Pe,J],()=>{Vt(),pn.value&&Yl({immediate:!0}),Ht.value&&_l(),Ne.value&&uc(),$o("resize")},{immediate:!1}),Ke(()=>xl.value,$=>{if($)for(const[G,re]of no)qf(G,re);else if(v6(),pn.value)Yl({immediate:!0});else for(const[G,re]of no)re&&La(G,!0)},{immediate:!1}),Ke([Ye,at,()=>X()],()=>{var $;($=Zs.refresh)==null||$.call(Zs);for(const[G,re]of no)qf(G,re)},{immediate:!1}),Ke([()=>C.viewportPriority,()=>Rt.value.length,at],([$,G,re])=>{if($!==!1){if(q.value&&(G<=200||G<=re)){q.value=!1;for(const[ce,we]of no)qf(ce,we)}}else q.value=!1}),Ke(()=>Ae.value,()=>{pn.value&&Yl({immediate:!0})}),Ke([Zl,Po,Xn,()=>Rt.value.length,pn],()=>{Dr()},{immediate:!0});let rd=null,ad=!1,hc=null;function cd(){rd=null,T6=null,A6=void 0,rc=null,id()}function X6(){pc(),j1(),Vt(),Wo.clear();const $=Rt.value.length;$>0&&Re($),O6()}function J6(){K6(),J9(),nd=null,Z1=null,K1=null,Df=null,Qu=null,ed=null,ad=!1,cd(),dy("restore"),rs(),cc()}function ud($){var G;return[(G=ws())!=null?G:"",Fo(),Vr(),jf.value,sd($),Rt.value.length,Math.round(on(0,Rt.value.length)),Math.round(W1()),ts.count,Math.round(ts.total)].join(":")}function Ey(){return zo(this,null,function*(){var $,G,re,ce;const we=($=o.virtualScroll)==null?void 0:$.settledToken,ze=sd(we),De=Fo(),Ue=ws(),ut=tl.value;if(Xe.value&&((G=o.virtualScroll)==null?void 0:G.settleMode)==="manual"&&Of(we))if(E6()){if(ud(we)!==rc&&!ad){ad=!0;try{const Ze=yield D6({reason:"manual",expectedSettledTokenKey:ze}),tt=sd()===ze;H6(De,Ue,ut)&&Ze.sessionKey===De&&Ze.threadKey===Ue&&tt&&Ze.stable&&Ze.phase==="final"&&(rc=ud((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{ad=!1,yield yt();const Ze=(ce=o.virtualScroll)==null?void 0:ce.settledToken,tt=Of(Ze)?ud(Ze):"";H6(De,Ue,ut)&&tt&&rc!==tt&&Ey()}}}else $o("manual")})}Ke(Xe,($,G)=>{if($!==G){if(!$)return J6(),void K6();J6(),X6(),hc=tl.value,$o("content")}},{flush:"post"}),Ke([Xe,tl],([$,G])=>{$?hc!=null?hc!==G&&(hc=G,(function(re="resize"){pc(),j1(),Vt(),Wo.clear();const ce=Rt.value.length;ce>0&&Re(ce),O6(),Z1=null,K1=null,Df=null,nd=null,ad=!1,cd(),by(),yt(()=>{Wr(),Ht.value&&_l(),Ne.value&&uc(),$o(re)})})("resize")):hc=G:hc=null},{flush:"post",immediate:!0}),Ke([Xe,()=>Fo(),()=>ws()],([$])=>{$&&(J6(),X6(),dy("content"),$o("content"))}),Ke([Xe,()=>Fo(),()=>ws(),tl,()=>Rt.value.length],([$])=>{$&&(function(G="async-node"){let re=!1;for(const[ce,we]of Array.from(Yt.entries()))C6(we)||(Yt.delete(ce),yn.delete(ce),re=!0);re&&(ic(),$o(G))})("async-node")},{flush:"post"}),Ke([Xe,()=>{var $;return($=o.virtualScroll)==null?void 0:$.sessionKey},()=>{var $;return($=o.virtualScroll)==null?void 0:$.measurementKey},()=>o.indexKey,()=>ee.value],([$])=>{$&&(id(),(function(G="content"){if(!Xe.value)return;const re=[],ce=Rt.value.length,we=y6(ce);for(const ze of Array.from(Wo.keys())){if(ze>=ce){re.push(ze);continue}if(ze=ce&&Wo.delete(ze);re.length&&((function(ze,De={}){const Ue=Array.from(ze,Number);Or(Ue);let ut=0;if(Hr(()=>(ut=Le(Ue,De),ut>0)),ut>0)(function(Ze){for(const tt of Ze)Wo.delete(tt)})(Ue);else for(const Ze of Ue)vs.delete(Ze)})(re,{notify:!1}),Vt(),cd(),Ht.value&&_l(),Ne.value&&uc(),$o(G))})("content"))},{flush:"post",immediate:!0}),Ke([Xe,()=>Rt.value.length,()=>Fo(),()=>ws()],([$,G,re,ce],[we,ze,De,Ue])=>{$&&we&&re===De&&ce===Ue&&G!==ze&&cd()},{flush:"post"}),Ke([Xe,()=>{var $;return($=o.virtualScroll)==null?void 0:$.heightCache},()=>{var $;return($=o.virtualScroll)==null?void 0:$.heightCacheWidth},()=>{var $;return($=o.virtualScroll)==null?void 0:$.restoreState},()=>{var $;return($=o.virtualScroll)==null?void 0:$.measurementKey},()=>Rt.value.length,()=>Fo(),J],()=>{by()},{flush:"post",immediate:!0}),Ke([Xe,()=>{var $;return($=o.virtualScroll)==null?void 0:$.restoreState},()=>{var $;return($=o.virtualScroll)==null?void 0:$.restoreAnchor},()=>{var $;return($=o.virtualScroll)==null?void 0:$.measurementKey},()=>Rt.value.length,()=>Fo(),J],$=>zo(null,[$],function*([G,re]){if(!G||!re)return;yield yt();const ce=(function(){var we;const ze=(we=o.virtualScroll)==null?void 0:we.restoreAnchor;return ze==null||ze===!1?null:ze===!0?"true":String(ze)})();j6(re,{restoreAnchor:ce!=null,restoreToken:ce??void 0})}),{flush:"post",immediate:!0}),Ke([Xe,J,()=>{var $;return($=o.virtualScroll)==null?void 0:$.restoreState},()=>{var $;return($=o.virtualScroll)==null?void 0:$.measurementKey}],([$])=>{var G;if(!$)return;const re=(G=o.virtualScroll)==null?void 0:G.restoreState;re&&Z1&&K1==="restore"&&(wy(re)||(X6(),Z1=null,K1=null,$o("resize")))},{flush:"post"}),Ke([Xe,()=>Rt.value.length,()=>Fo(),J],$=>zo(null,[$],function*([G]){var re;const ce=Qu,we=ed;G&&ce&&(yield yt(),!j6(ce,{restoreAnchor:we?.restoreAnchor===!0,restoreToken:(re=we?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:we?.allowUncapturedAnchor===!0})&&_y(ce)||(Qu=null,ed=null))}),{flush:"post",immediate:!0}),Ke([Xe,Fe,()=>{var $;return($=o.virtualScroll)==null?void 0:$.settleMode},()=>Fo(),()=>ws(),tl,vi,ft,()=>Ae.value,V1,()=>ts.count,()=>ts.total],([$,G,re])=>{if(!$||G!==!0||re==="manual"||!I6())return;const ce=(function(){var we;const ze=Rt.value.length;return[(we=ws())!=null?we:"",Fo(),Vr(),jf.value,ze,Math.round(on(0,ze)),Math.round(W1()),ts.count,Math.round(ts.total)].join(":")})();rd!==ce&&(rd=ce,D6({reason:"final"}).then(we=>{we.stable||rd!==ce||(rd=null)}))},{flush:"post",immediate:!0}),Ke([Xe,Fe,()=>{var $;return($=o.virtualScroll)==null?void 0:$.settleMode},()=>{var $;return($=o.virtualScroll)==null?void 0:$.settledToken},()=>Fo(),()=>ws(),tl,vi,ft,()=>Ae.value,V1,()=>Rt.value.length,()=>ts.count,()=>ts.total],()=>{Ey()},{flush:"post",immediate:!0}),Ke([()=>Rt.value.length,pn,Po,Xn,()=>ys.start,()=>ys.end],([$,G,re,ce,we,ze])=>{he.value&&Hn("virtualization",{nodes:$,virtualization:G,maxLiveNodes:re,buffer:ce,focusIndex:Zl.value,scroll:G?(()=>{const De=Te.value||Se();return De?{reverse:je(De),scrollTop:Math.round(De.scrollTop),scrollTopAbs:Math.round(Math.abs(De.scrollTop)),scrollHeight:Math.round(De.scrollHeight),clientHeight:Math.round(De.clientHeight)}:null})():null,liveRange:{start:we,end:ze},rendered:Ae.value})}),Ke([()=>C.customId],([$],G,re)=>{if(!$||en)return;const ce=(function(we,ze){return we?(zs.controllers[we]=ze,()=>{zs.controllers[we]===ze&&delete zs.controllers[we]}):()=>{}})($,{captureRestoreAnchor:X0,restoreAnchor:J0,getAnchorDrift:qu,getReport:xB});re(()=>{ce()})},{immediate:!0}),vo(()=>{(function(){if(Xe.value)try{Wr(),td();const $=q1("manual");Sy($)&&(F($),nd=$,W6=od());const G=ac($,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});G&&(H(G),G.anchor&&D(G.anchor),dc=ld(G))}catch{}})(),RB(),v6(),xn(),Ty();for(const $ of mr.values())for(const G of $)Bf(G);mr.clear(),Bi.clear(),Wo.clear(),Y6(),pc(),k6(),rs(),cc(),K6(),ey(),m6()});const PB=Yd("ViewportDeferredMermaidBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index11-DJqeKSQb.js"),__vite__mapDeps([9,7]))).default}catch($){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',$),Di}}),loadingComponent:dS,delay:0}),dS),FB=Yd("ViewportDeferredInfographicBlockNode",Rl({loader:()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index10-C3bfH63E.js"),[])).default}catch($){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',$),Di}}),loadingComponent:uS,delay:0}),uS),jB=Yd("ViewportDeferredD2BlockNode",Rl(()=>zo(null,null,function*(){try{return(yield Cs(()=>import("./index8-C1u-nZQS.js"),[])).default}catch($){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',$),Di}})),Di),Iy={text:is,paragraph:B0,heading:Zp,code_block:rm,list:hu,list_item:pu,blockquote:x4,table:_2,definition_list:S4,footnote:C4,footnote_reference:rl,footnote_anchor:k2,admonition:E4,vmr_container:A4,hardbreak:f1,link:Li,image:d1,thematic_break:M4,math_inline:fr,math_block:r$,strong:Ei,emphasis:$i,strikethrough:Ii,highlight:cl,insert:Yi,subscript:Gi,superscript:Ki,emoji:Zi,checkbox:ll,checkbox_input:ll,inline_code:hi,html_inline:al,reference:Ti,html_block:b2},OB=B(()=>x6()),Ly=B(()=>Gx(C.codeBlockProps)),HB=B(()=>Gx(C.codeBlockProps,{omit:["langs"]})),$y=B(()=>St(St({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,monacoOptions:C.codeBlockMonacoOptions,themes:C.themes,langs:h.value==="shiki"?C.langs:void 0,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ye.value=="boolean"?{showTooltips:ye.value}:{}),HB.value)),Ny=B(()=>St(wn(St({},$y.value),{langs:C.langs}),Ly.value));function zy($){return typeof $=="boolean"?$:void 0}const DB=B(()=>{const $=C.codeBlockProps||{},G={},re=zy($.showLineNumbers);re!==void 0&&(G.showLineNumbers=re);const ce=zy($.diffInline);ce!==void 0&&(G.diffInline=ce);const we=(function(ze){const De=Number(ze);return Number.isFinite(De)&&De>0?De:void 0})($.reservedHeightPx);return we!==void 0&&(G.reservedHeightPx=we),G}),VB=B(()=>St(St({stream:C.codeBlockStream,darkTheme:C.codeBlockDarkTheme,lightTheme:C.codeBlockLightTheme,themes:C.themes,langs:C.langs,minWidth:C.codeBlockMinWidth,maxWidth:C.codeBlockMaxWidth},typeof ye.value=="boolean"?{showTooltips:ye.value}:{}),Ly.value)),WB=B(()=>St({},C.mermaidProps||{})),By=B(()=>St({},C.d2Props||{})),qB=B(()=>St({},C.infographicProps||{})),dd=B(()=>({typewriter:f.value,fade:C.fade,customHtmlTags:Io.value.customHtmlTags})),UB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltip:ye.value}:{})),ZB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{})),KB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{})),GB=B(()=>St(St({},dd.value),typeof ye.value=="boolean"?{showTooltips:ye.value}:{}));function YB($){return Array.isArray($.children)&&$.children.length>0}const Zf=B(()=>_B.value.map($=>{var G,re,ce,we,ze,De,Ue,ut;let Ze=(function(_t){var Ot,Kt,an,sn,un,Ln,On;if(_t.type!=="code_block")return _t;const wo=_t,Ys=[String((Ot=wo.language)!=null?Ot:""),String((Kt=wo.loading)!=null?Kt:""),String((an=wo.diff)!=null?an:""),String((sn=wo.code)!=null?sn:""),String((un=wo.originalCode)!=null?un:""),String((Ln=wo.updatedCode)!=null?Ln:""),String((On=wo.raw)!=null?On:"")].join("\0"),Ds=Ta.get(wo);if(Ds&&Ds.signature===Ys)return Ds.node;const Xl=St({},wo);return Ta.set(wo,{signature:Ys,node:Xl}),Xl})($.node);const tt=Kf(Ze);let ct=jy(Ze,tt);if((Ze.type==="html_block"||Ze.type==="html_inline")&&ct===Iy[Ze.type]){const _t=Ze,Ot=String((G=_t.tag)!=null?G:"").trim().toLowerCase()||zI(_t.content);if(Ot){const Kt=Un.value[Ot];if(hs.value.has(Ot)&&Kt)ct=Kt,Ze=wn(St({},_t),{type:Ot,tag:Ot,content:xae(_t.content,Ot)});else if(BI((re=_t.content)!=null?re:_t.raw,Ot)){const an=String((we=(ce=_t.content)!=null?ce:_t.raw)!=null?we:"");Ze.type==="html_inline"?(ct=is,Ze={type:"text",content:an,raw:an}):(ct=B0,Ze={type:"paragraph",children:[{type:"text",content:an,raw:an}],raw:an})}}}const Ve=Ze.type==="code_block"&&h.value==="pre"&&ct===Di&&!Q6(Un.value,tt);let nt=St({},(function(_t,Ot,Kt){const an=Ot??Kf(_t);if(_t.type==="code_block"){const sn=an?Q6(Un.value,an):void 0;if(Kt&&h.value==="pre"&&!sn&&Kt===Di)return DB.value;if(Kt&&an&&Kt===sn)return an==="mermaid"?Py(_t):an==="infographic"?Fy(_t):an==="d2"||an==="d2lang"?By.value:Ny.value;if(Kt&&Kt===Un.value.code_block)return Ny.value;if(sy(Kt))return VB.value}return an==="mermaid"?Py(_t):an==="infographic"?Fy(_t):an==="d2"||an==="d2lang"?By.value:_t.type==="link"?UB.value:_t.type==="list"?ZB.value:_t.type==="blockquote"?KB.value:_t.type==="table"?GB.value:_t.type==="code_block"?$y.value:dd.value})(Ze,tt,ct));const gt=Pe.value?sc.value[$.index]:null;Ze.type==="code_block"&>?.kind==="code-block"&&(nt=wn(St({},nt),Ve?{reservedHeightPx:(ze=gt.height)!=null?ze:gt.contentHeight}:{estimatedHeightPx:gt.height,estimatedContentHeightPx:gt.contentHeight,estimatedDiffInline:gt.diffInline})),Ve||Ze.type!=="code_block"||tt!=="mermaid"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(St({},nt),{estimatedPreviewHeightPx:L5(E5(String((De=Ze.code)!=null?De:"")))})),Ve||Ze.type!=="code_block"||tt!=="infographic"||Kc(nt.estimatedPreviewHeightPx)!=null||(nt=wn(St({},nt),{estimatedPreviewHeightPx:$5(I5(String((Ue=Ze.code)!=null?Ue:"")))})),Ze.type==="math_block"&&(nt=wn(St({},nt),{cacheScope:Bo}));const mt=(function(_t,Ot){const Kt=String(_t.type);return!Af(Kt)&&Un.value[Kt]===Ot})(Ze,ct),Et=mt?Av(Ze,ve.value):void 0;return wn(St({},$),{node:Ze,component:ct,bindings:nt,customBindings:St(St({},Et??{}),nt),rendersCustomNode:mt,hasSlotChildren:YB(Ze),slotContent:String((ut=Ze.content)!=null?ut:""),isCodeBlock:Ze.type==="code_block",indexKey:`${OB.value}-${$.index}`,vnodeKey:`${SB.value}\0${$.index}\0${Ze.type}`})}));function Kf($){var G;return $?.type==="code_block"?String((G=$.language)!=null?G:"").trim().toLowerCase():""}function Q6($,G){const re=G.trim().toLowerCase();if(re)for(const ce of[re,Wp(re),DL(re)]){const we=ce&&$[ce];if(we)return we}}function Ry($,G,re,ce){var we,ze;const De=St({},$.value);return Kc(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=ce(re(String((we=G?.code)!=null?we:"")),void 0,De.maxHeight==="none"?null:(ze=Kc(De.maxHeight))!=null?ze:void 0)),De}function Py($){return Ry(WB,$,E5,L5)}function Fy($){return Ry(qB,$,I5,$5)}function jy($,G){if(!$)return v7;const re=Un.value,ce=re[String($.type)];if($.type==="code_block"){const we=G??Kf($),ze=we?Q6(re,we):void 0;return ze||(h.value==="pre"?re.code_block||Di:we==="mermaid"?re.mermaid||PB:we==="infographic"?re.infographic||FB:we==="d2"||we==="d2lang"?re.d2||jB:ce||re.code_block||iy.value)}return ce||Iy[String($.type)]||v7}function eh($){s("click",$)}function XB($){var G;(G=$.target)!=null&&G.closest("[data-node-index]")&&s("mouseover",$)}function JB($){var G;(G=$.target)!=null&&G.closest("[data-node-index]")&&s("mouseout",$)}function Oy($){s("mouseover",$)}function Hy($){s("mouseout",$)}const X1=V(null),Ri=V(!1),fd=V(null),QB=B(()=>!(C.domMode!=="minimal"||K.value||C.fade!==!1||f.value||Ri.value||mn.value||pn.value||We.value||Ro.value||vl.value||Object.keys(Un.value).length!==0));let pd,mc=null,th=0,Gf=0,Yf=0;const Dy=["code_block","admonition","table","math_block","html_block","image","thematic_break"],eR=new Set(Dy),Vy=[".typewriter-cursor",".height-estimation-probes",...Dy.map($=>`[data-node-type="${$}"]`),"script","style"].join(",");function Wy($){if(!$||typeof $!="object")return!1;const G=$.type;return typeof G=="string"&&eR.has(G)}function Xf($){var G,re;if(!$||typeof $!="object")return 0;const ce=$,we=(re=(G=ce.raw)!=null?G:ce.content)!=null?re:ce.code;if(typeof we=="string")return we.length;const ze=ce.children;if(Array.isArray(ze))return ze.reduce((Ue,ut)=>Ue+Xf(ut),0);const De=ce.items;return Array.isArray(De)?De.reduce((Ue,ut)=>Ue+Xf(ut),0):0}function Jf(){pd&&(clearTimeout(pd),pd=void 0)}function nh(){th+=1,mc!=null&&(Lo?.(mc),mc=null)}function hd(){nh(),$a(),X1.value&&(X1.value.style.visibility="hidden")}function tR($){var G;if($.nodeType!==Node.TEXT_NODE||!((G=$.textContent)!=null?G:"").trim())return!1;const re=$.parentElement;return!!re&&!re.closest(Vy)}function nR($){let G=$.lastChild;for(;G;){if(tR(G))return G;if(G.nodeType===Node.ELEMENT_NODE){const re=G;if(!re.matches(Vy)&&re.lastChild){G=re.lastChild;continue}}for(;G&&G!==$&&!G.previousSibling;)G=G.parentNode;if(!G||G===$)break;G=G.previousSibling}return null}function qy(){const $=Zf.value;for(let G=$.length-1;G>=0;G--){const re=$[G];if(!re||Wy(re.node)||!Wf(re.index))continue;const ce=no.get(re.index);if(!ce)continue;const we=nR(ce);if(we)return we}return null}function $a(){fd.value&&(fd.value.classList.remove(fS),fd.value=null)}function Qf(){if(d.value!=="simple"||!j||!Ri.value||!M.value)return void $a();const $=qy(),G=$?(function(re){var ce;const we=(ce=re.parentElement)==null?void 0:ce.closest(".text-node");return we instanceof HTMLElement?we:re.parentElement})($):null;G!==fd.value&&($a(),G&&(G.classList.add(fS),fd.value=G))}function e3(){if(d.value!=="precise"||!j||!Ri.value||mc!=null)return;const $=th,G=()=>{mc=null,$===th&&(function(){var re,ce;if(d.value!=="precise"||!(j&&Ri.value&&M.value&&X1.value))return;const we=M.value,ze=X1.value;ze.style.visibility="hidden";const De=qy();if(!De)return;let Ue=0,ut=0,Ze=20,tt=!1;if(De?.textContent){const ct=De.textContent.length,Ve=document.createRange();Ve.setStart(De,Math.max(0,ct-1)),Ve.setEnd(De,ct);const nt=typeof Ve.getClientRects=="function"?Ve.getClientRects():void 0,gt=(ce=nt?.[nt.length-1])!=null?ce:(re=De.parentElement)==null?void 0:re.getBoundingClientRect();if(gt){const mt=Qt("typewriterCursor.root.getBoundingClientRect",()=>we.getBoundingClientRect());Ue=gt.right-mt.left+we.scrollLeft,ut=gt.top-mt.top+we.scrollTop,Ze=gt.height||Ze,tt=!0}Ve.detach()}tt&&(ze.style.transform=`translate(${Math.max(0,Ue)}px, ${Math.max(0,ut)}px)`,ze.style.height=`${Ze}px`,ze.style.visibility="visible")})()};yo?mc=yo(G):G()}return Ke([ge,()=>o.content,()=>o.nodes,()=>C.typewriter,Fe],()=>zo(null,null,function*(){var $,G;if(!j||K.value||!de.value)return;if(Fe.value)return Ri.value=!1,Jf(),void hd();if(($=o.nodes)!=null&&$.length)return Ri.value=!1,Jf(),hd(),Gf=((G=o.content)!=null?G:"").length,void(Yf=ge.value.length);const re=(function(){var Ue,ut;return(Ue=o.nodes)!=null&&Ue.length?o.nodes.reduce((Ze,tt)=>Ze+Xf(tt),0):((ut=o.content)!=null?ut:"").length})(),ce=(function(){var Ue;return(Ue=o.nodes)!=null&&Ue.length?o.nodes.reduce((ut,Ze)=>ut+Xf(Ze),0):ge.value.length})(),we=!Wy(Rt.value[Rt.value.length-1]),ze=re>Gf,De=ce>Yf;if(!f.value||!we||!ze&&!De)return f.value&&we||(Ri.value=!1,hd()),Gf=re,void(Yf=ce);Gf=re,Yf=ce,Ri.value=!0,d.value==="precise"&&X1.value&&(X1.value.style.visibility="hidden"),Jf(),yield yt(),d.value==="simple"?Qf():($a(),e3()),pd=setTimeout(()=>{pd=void 0,Ri.value=!1},3e3)}),{flush:"post",immediate:!0}),Ke(Ri,$=>zo(null,null,function*(){$?(yield yt(),d.value!=="simple"?($a(),d.value==="precise"&&e3()):Qf()):hd()}),{flush:"post"}),Ke(d,()=>zo(null,null,function*(){if(j&&!K.value&&de.value&&Ri.value){if(yield yt(),d.value==="simple")return nh(),void Qf();$a(),d.value!=="precise"?hd():e3()}}),{flush:"post"}),Ke([()=>Ae.value,()=>ys.start,()=>ys.end],()=>zo(null,null,function*(){j&&!K.value&&de.value&&Ri.value&&(yield yt(),d.value!=="simple"?($a(),d.value==="precise"&&e3()):Qf())}),{flush:"post"}),vo(()=>{Jf(),nh(),$a(),Zn.clear()}),($,G)=>{const re=wg("NodeRenderer",!0);return v(K)?(g(!0),S(Ce,{key:0},rt(Zf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onClick:eh,onMouseover:Oy,onMouseout:Hy,onCopy:G[0]||(G[0]=we=>i(we)),onHandleArtifactClick:G[1]||(G[1]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onClick:eh,onMouseover:Oy,onMouseout:Hy,onCopy:G[2]||(G[2]=we=>i(we)),onHandleArtifactClick:G[3]||(G[3]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(g(),S("div",{key:1,ref_key:"containerRef",ref:M,class:Be(["markstream-vue markdown-renderer",[{dark:C.isDark},{virtualized:pn.value},{"virtual-scroll-coordinated":qe.value},{"stable-layout":Sl.value},{"typewriter-simple-cursor":Ri.value&&d.value==="simple"}]]),"data-custom-id":C.customId,onClick:eh,onMouseover:XB,onMouseout:JB},[bt.value||pn.value?(g(),S(Ce,{key:0},[bt.value?(g(),ue(v4e,{key:0,width:So.value,"flow-root":pn.value||qe.value,"paragraph-node":dt.value,"list-item-node":Mt.value,"list-node":Ft.value,"heading-nodes":Ut.value,"set-paragraph-wrapper":gB,"set-list-item-wrapper":vB,"set-list-wrapper":yB,"set-heading-wrapper":bB},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):Y("",!0),pn.value?(g(),S("div",{key:1,class:"node-spacer",style:Gt({height:`${b6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],64)):Y("",!0),QB.value?(g(!0),S(Ce,{key:1},rt(Zf.value,ce=>(g(),S(Ce,{key:ce.vnodeKey},[Wf(ce.index)?(g(),ue(cs(ce.component),io({key:0,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onMouseover:G[4]||(G[4]=we=>s("mouseover",we)),onMouseout:G[5]||(G[5]=we=>s("mouseout",we)),onCopy:G[6]||(G[6]=we=>i(we)),onHandleArtifactClick:G[7]||(G[7]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"])):Y("",!0)],64))),128)):(g(!0),S(Ce,{key:2},rt(Zf.value,ce=>(g(),S("div",{key:ce.vnodeKey,ref_for:!0,ref:we=>qf(ce.index,we),class:"node-slot","data-node-index":ce.index,"data-node-type":ce.node.type},[Wf(ce.index)?(g(),S("div",{key:0,ref_for:!0,ref:we=>(function(ze,De){var Ue;De||(function(ct){const Ve=`${x6()}-${ct}`;let nt=!1;for(const gt of Array.from(yn.keys())){const mt=Yt.get(gt);(mt?.index===ct||gt===Ve||gt.startsWith(`${Ve}-`))&&(yn.delete(gt),Yt.delete(gt),nt=!0)}nt&&(ic(),$o("async-node"))})(ze),Kl.delete(ze),(function(ct){var Ve;const nt=((Ve=Bi.get(ct))!=null?Ve:0)+1;Bi.set(ct,nt)})(ze);const ut=mr.get(ze);if(ut){for(const ct of ut)Bf(ct);mr.delete(ze)}if((function(ct){const Ve=Vo.get(ct);Ve&&(Os?.unobserve(Ve),Qi.delete(Ve),Vo.delete(ct))})(ze),!De||!Us.value)return Cl.delete(ze),void Bi.delete(ze);Cl.set(ze,De);const Ze=()=>{Uf(ze,De)};queueMicrotask(Ze);const tt=(Os||typeof ResizeObserver>"u"||(Os=new ResizeObserver(ct=>{if(ct.length)for(const Ve of ct){const nt=Qi.get(Ve.target),gt=Vo.get(nt??-1);nt!=null&>&&Uf(nt,gt)}else Wr()})),Os);if(tt&&(Vo.set(ze,De),Qi.set(De,ze),tt.observe(De)),typeof window<"u"){const ct=((Ue=Rt.value[ze])==null?void 0:Ue.type)==="code_block"?[16,80,240,800]:Fe.value?[80]:[];if(ct.length){const Ve=ct.map(nt=>Gu(nt,Ze,"node-resize")).filter(nt=>nt!=null);Ve.length&&mr.set(ze,Ve)}}})(ce.index,we),class:"node-content"},[ce.isCodeBlock?ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:1,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[12]||(G[12]=we=>i(we)),onHandleArtifactClick:G[13]||(G[13]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:2,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[14]||(G[14]=we=>i(we)),onHandleArtifactClick:G[15]||(G[15]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(qi,{key:0,name:"fade",css:C.fade!==!1,appear:C.fade!==!1},{default:ae(()=>[ce.rendersCustomNode?(g(),ue(cs(ce.component),io({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[8]||(G[8]=we=>i(we)),onHandleArtifactClick:G[9]||(G[9]=we=>s("handleArtifactClick",we))}),{default:ae(()=>[ce.hasSlotChildren?(g(),ue(re,io({key:0,ref_for:!0},$e.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(g(),ue(re,io({key:1,ref_for:!0},$e.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):Y("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),ue(cs(ce.component),io({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":C.customId,"is-dark":C.isDark,onCopy:G[10]||(G[10]=we=>i(we)),onHandleArtifactClick:G[11]||(G[11]=we=>s("handleArtifactClick",we))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(g(),S("div",{key:1,class:"node-placeholder",style:Gt({height:`${Wt(ce.index)}px`})},null,4))],8,k4e))),128)),Ri.value&&d.value==="precise"?(g(),S("span",{key:3,ref_key:"typewriterCursorRef",ref:X1,class:"typewriter-cursor","aria-hidden":"true"},null,512)):Y("",!0),pn.value?(g(),S("div",{key:4,class:"node-spacer",style:Gt({height:`${_6.value}px`}),"aria-hidden":"true"},null,4)):Y("",!0)],42,w4e))}}})),[["__scopeId","data-v-a9489508"]]),Xi=b$;Xi.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Xi.__name,Xi.name].filter(n=>!!n));for(const n of t)e.component(n,b$)};const Hv=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"})),b4e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},_4e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},x4e={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},S4e={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},C4e={class:"admonition-title"},M4e=["aria-expanded","aria-controls"],A4e=["id"],E4=ho(Je({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=B(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const c=o.node.kind||"note";return c.charAt(0).toUpperCase()+c.slice(1)}),l=V(!!o.node.collapsible&&!((n=o.node.open)==null||n));function r(){o.node.collapsible&&(l.value=!l.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(c,u)=>(g(),S("div",{class:Be(["admonition",[`admonition-${o.node.kind}`]])},[b("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(g(),S("svg",b4e,[...u[1]||(u[1]=[b("circle",{cx:"12",cy:"12",r:"10"},null,-1),b("path",{d:"M12 16v-4"},null,-1),b("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(g(),S("svg",_4e,[...u[2]||(u[2]=[b("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),b("path",{d:"M9 18h6"},null,-1),b("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(g(),S("svg",x4e,[...u[3]||(u[3]=[b("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),b("path",{d:"M12 9v4"},null,-1),b("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(g(),S("svg",S4e,[...u[4]||(u[4]=[b("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),b("path",{d:"M12 8v4"},null,-1),b("path",{d:"M12 16h.01"},null,-1)])])):Y("",!0),b("span",C4e,E(i.value),1),o.node.collapsible?(g(),S("button",{key:4,class:"admonition-toggle","aria-expanded":!l.value,"aria-controls":`${a}-content`,onClick:r},[(g(),S("svg",{style:Gt({rotate:l.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...u[5]||(u[5]=[b("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,M4e)):Y("",!0)]),Jn(b("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[W(v(Xi),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:u[0]||(u[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,A4e),[[_i,!l.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);E4.install=e=>{e.component(E4.__name,E4)};const _7=()=>Cs(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let H3=null,D3=_7,V3=null,pS=!1,hS=!1;function LKe(){return zo(this,null,function*(){if(H3)return H3;const e=D3;return e?e===_7&&pS?null:V3||(V3=zo(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===_7)return e===D3&&(pS=!0,(function(o){hS||(hS=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===D3&&(V3=null)}return e!==D3?null:t?(H3=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),H3):null}),V3):null})}let W3=null,_$=null,q3=null;function $Ke(){return typeof _$=="function"}function NKe(){return zo(this,null,function*(){if(W3)return W3;const e=_$;return e?q3||(q3=zo(null,null,function*(){const t=yield e(),n=(function(o){var s,i,l;if(!o)return null;const r=(s=o.default)!=null?s:o,a=typeof r=="function"&&typeof((i=r.prototype)==null?void 0:i.render)=="function"?r:(l=o.Infographic)!=null?l:r?.Infographic;return typeof a=="function"?a:null})(t);return n?(W3=n,W3):null}).finally(()=>{q3=null}),q3):null})}const zKe=Symbol("markstreamLanguageIconResolver"),x$=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],T4e=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),x7=[...x$].toSorted((e,t)=>t.length-e.length).join("|"),ym=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${x7}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${x7})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(""),"gi"),S$=/[),.;!?]+$/;function E4e(e){const t=e.toLowerCase();return x$.some(n=>t.endsWith(`.${n}`))}function I4e(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${x7}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function L4e(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(S$,"");if(!s)return null;const i=s.split("/").pop()??s,l=s.includes("/"),r=T4e.has(i),a=E4e(i);if(l&&!r&&!a)return null;if(!l&&!r){const d=t.aliases?.get(i);if(!d)return null;s=d}const c=o[2]??o[3],u=c?Number(c):void 0;return{path:s,line:u!==void 0&&Number.isFinite(u)&&u>0?u:void 0}}function $4e(e,t={}){const n=[];ym.lastIndex=0;let o;for(;(o=ym.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",l=s.indexOf(i);if(l<0)continue;const r=o[2]??o[3];let a=i+(r?s.slice(l+i.length):"");const c=a.replace(S$,""),u=a.length-c.length;a=c;const d=L4e(a,t);if(!d)continue;const f=o.index+l,p=f+a.length;n.push({...d,start:f,end:p,text:a}),u>0&&(ym.lastIndex-=u)}return n}const N4e=12e4,z4e=6e4,B4e=32,R4e=3e4,mS=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function P4e(e){let t=0,n=0,o=0;mS.lastIndex=0;let s;for(;(s=mS.exec(e))!==null;){const l=s[3]??"";t+=1,n+=l.length,o=Math.max(o,l.length)}return{codeRenderer:e.length>=N4e||n>=z4e||t>=B4e||o>=R4e?"pre":"shiki",codeFenceCount:t,codeChars:n}}function U3(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o--)n++;return n%2===1}const F4e=/\s/,j4e=/\p{Nd}/u;function p1(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function O4e(e,t){if(t<=0)return;const n=e.codePointAt(t-1),o=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function gS(e){return e!==void 0&&F4e.test(e)}function Au(e){return e!==void 0&&j4e.test(e)}function H5(e){return e!==void 0&&e>="A"&&e<="Z"}const C$=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function H4e(e,t){if(!H5(e[t-1]))return!1;let n=t-1;for(;n>0&&H5(e[n-1]);)n--;return C$.test(e.slice(n,t))||Au(p1(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(p1(e,t+1)??"")}function D4e(e,t){if(!H5(e[t-1]))return!1;let n=t-1;for(;n>0&&H5(e[n-1]);)n--;return C$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}function V4e(e,t){const n=e[t+1];return Au(p1(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−")&&Au(p1(e,t+2))}const W4e=/^[-–—,;:~([/]$/;function q4e(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Au(p1(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&W4e.test(o)}const wm=String.raw`[,;:~\-–—/\s()=*×]|and|or`;function U4e(e){let t=e.replace(new RegExp(String.raw`^(?:${wm})+`,"u"),"");for(;;){const o=t.replace(new RegExp(String.raw`^\p{L}+(?:${wm})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(o===t)break;t=o}if(!/\p{Nd}/u.test(t))return!1;const n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${wm})+${n}(?:\p{L}+)?)*$`,"u").test(t)}const vS=1,yS=2,wS=3,kr=-1;function Z4e(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(kr),s=new Int32Array(t+1),i=new Int32Array(t+1),l=[],r=[];{const M=[];for(let Z=0;Z`*—–“”‘’'),c=[];for(const M of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))c.push(M.index);for(const M of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))c.push(M.index);for(const M of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(M.index===0||!/[\w~/.-]/.test(e[M.index-1]??""))&&c.push(M.index);c.sort((M,R)=>M-R);let u=-1;for(const M of c){if(MM+7&&!/[\w/?#@~.+&=%-]/.test(e[R+1]??""))break}}l.push([M,R]),u=R}const d=[];for(let M=0;M]/.test(q))continue;let te=kr,ee=kr;for(;O"){ee=O;break}if(!U&&J==="/"&&e[O+1]===">"){ee=O+1;break}if(!/\s/.test(J)){te=O;break}for(;O"){ee=O;break}if(U){te=O;break}if(se==="/"&&e[O+1]===">"){ee=O+1;break}const Q=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(O));if(!Q){te=O;break}O+=Q[0].length;let me=O;for(;me`]+/.exec(e.slice(me));if(!Ye){te=me;break}O=me+Ye[0].length}}}if(ee!==kr)d.push([M,ee+1]),M=ee;else if(te!==kr){const J=e.indexOf("<",M+1);M=(J!==-1&&J",M+2);te===-1?f=!1:(d.push([M,te+2]),M=te+1,O=!0)}else if(R==="!"){if(e[M+2]==="-"&&e[M+3]==="-"){if(p){const te=e.indexOf("-->",M+4);te===-1?p=!1:(d.push([M,te+3]),M=te+2,O=!0)}}else if(e.startsWith("[CDATA[",M+2)){if(h){const te=e.indexOf("]]>",M+9);te===-1?h=!1:(d.push([M,te+3]),M=te+2,O=!0)}}else if(m&&/[A-Z]/.test(e[M+2]??"")){const te=e.indexOf(">",M+3);te===-1?m=!1:(d.push([M,te+1]),M=te,O=!0)}}if(O)continue;if(R!==void 0&&/[a-zA-Z]/.test(R)){const te=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(M+1));if(te){let ee=M+1+te[0].length;for(;ee"&&e[ee]!=="<"&&!/\s/.test(e[ee]);)ee++;if(e[ee]===">"){d.push([M,ee+1]),M=ee;continue}}}if(R===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(R))continue;let U=M+1;for(;U"&&(d.push([M,U+1]),M=U)}}d.sort((M,R)=>M[0]-R[0]);const k=[];for(const M of d){const R=k.at(-1);R&&M[0]<=R[1]?R[1]=Math.max(R[1],M[1]):k.push([M[0],M[1]])}l.push(...k);const x=M=>{let R=0;for(;R=(r[R]?.[1]??0);)R++;const O=r[R];return O!==void 0&&M>=O[0]},y=M=>{let R=0;for(;R=(k[R]?.[1]??0);)R++;const O=k[R];return O!==void 0&&M>=O[0]},w=[];let _=null,A=0,P=!1;for(let M=0;M"&&(P=!1);continue}if(!(x(M)||y(M))){if(_!==null){e[M]===_&&(_=null);continue}if(w.length>0&&(e[M]==='"'||e[M]==="'")&&M>0&&/\s/.test(e[M-1]??""))_=e[M];else if(e[M]==="[")A++;else if(e[M]==="]")A>0&&e[M+1]==="("&&(w.push(M),P=e[M+2]==="<",M++),A=Math.max(0,A-1);else if(e[M]==="("&&w.length>0)w.push(-1);else if(e[M]===")"&&w.length>0){const R=w.pop();if(R!==void 0&&R>=0){const O=e.slice(R+2,M);(/\s/.exec(O)===null||O.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(O)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(O))&&l.push([R,M+1])}}}}l.sort((M,R)=>M[0]-R[0]);const z=[];for(const M of l){const R=z.at(-1);R&&M[0]<=R[1]?R[1]=Math.max(R[1],M[1]):z.push([M[0],M[1]])}const L=M=>{let R=0,O=z.length-1;for(;R<=O;){const U=R+O>>1,Z=z[U];if(Z===void 0)return!1;if(M=Z[1])R=U+1;else return!0}return!1},T=new Uint8Array(t);{let M=-1,R=!1,O=!1,U=0;for(let Z=0;Z<=t;Z++){const q=Z0&&(te==="{"?U++:te==="}"&&U--)}}for(let M=0;M=0;M--)n[M]===wS&&(I=M),o[M]=I;const N=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,C=/[^\p{L}\p{Nd}\s]$/u,F=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,D=(M,R)=>{const O=p1(e,M+1);if(O===void 0||!N.test(O))return!1;const U=o[M+1]??kr;if(U!==kr){const Z=e.slice(M+1,U);return!(U-(M+1)===((e.codePointAt(M+1)??0)>65535?2:1))&&F.test(Z)||/[,;:!?]$/.test(Z)||/^[a-z]{2,}$/.test(Z)?!1:(s[U]??0)-(s[M+1]??0)===0&&(i[U]??0)-(i[M+1]??0)===0}return C.test(R)||F.test(R)||H.test(R)};return(M,R=-1)=>{if(e[M]!=="$"||n[M]===vS||e[M+1]==="$"||e[M-1]==="$"&&R!==M||H4e(e,M)||M+1>=t||gS(p1(e,M+1)))return null;const O=o[M+1]??kr;if(O===kr||(s[O]??0)-(s[M+1]??0)>0||(i[O]??0)-(i[M+1]??0)>0)return null;const U=e.slice(M+1,O);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(U)||e[O+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(U)||Au(O4e(e,M))&&U4e(U)||V4e(e,M)&&(D(O,U)||D4e(e,O)||/\s/.test(U)&&/\p{Nd}$/u.test(U)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(U)||!1)||e[O+1]==="$"&&!/\p{L}/u.test(U)&&C.test(U)?null:{content:U,end:O+1}}}const K4e=/^---[ \t]*(?:\r\n|\n)/,G4e=/^---[ \t]*$/;function Y4e(e){const t=K4e.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const o=n;for(;n<=e.length;){let s=e.indexOf(` +`,n);s===-1&&(s=e.length);let i=e.slice(n,s);if(i.endsWith("\r")&&(i=i.slice(0,-1)),G4e.test(i)){const l=e.slice(o,n);if(l==="")return{frontmatter:null,body:e};const r=s\n]*>|[^()\s]+)\)/g,X4e=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,J4e=/^[a-zA-Z]:(?:[\\/]|%5c)/i,Q4e=/^[A-Za-z0-9._~-]$/,D5="pythinker-code://skill/";let bS;function _S(e){return e.replaceAll("%","%25").replaceAll("&","%26").replaceAll("<","%3C").replaceAll(">","%3E").replaceAll(/[[\]\\]/g,"\\$&").replaceAll(` +`,"%0A").replaceAll("\r","%0D")}function e5e(e){return e.replaceAll(/\\([\\[\]])/g,"$1").replaceAll("%26","&").replaceAll("%3C","<").replaceAll("%3E",">").replaceAll("%0A",` +`).replaceAll("%0D","\r").replaceAll("%25","%")}function M$(e){let t="";for(const n of e){const o=n.codePointAt(0);o>127||Q4e.test(n)?t+=n:t+=`%${o.toString(16).toUpperCase().padStart(2,"0")}`}return t}function t5e(e){const t=e.split("/").map(M$).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function A$(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function xS(e){const t=A$(e);try{return decodeURIComponent(t)}catch{return t}}function n5e(e){const t=A$(e);return!t||t.startsWith("#")||t.startsWith("?")||t.startsWith("//")?null:t.startsWith(D5)&&t.length>D5.length?"skill":X4e.test(t)&&!J4e.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?"folder":"file"}function km(e,t){if(!t)return;const n=e.at(-1);n?.type==="text"?n.value+=t:e.push({type:"text",value:t})}function Dv(e){if(e.kind==="skill")return`[${_S(e.name)}](${D5}${M$(e.name)})`;const t=e.kind==="folder"&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${_S(e.name)}](${t5e(t)})`}function T$(e){const t=[];let n=0;kS.lastIndex=0;for(const o of e.matchAll(kS)){const s=o.index;km(t,e.slice(n,s));const i=o[0],l=o[1],r=o[2],a=e[s-1]==="!"?null:n5e(r);if(a&&l){const c=a==="skill"?xS(r).slice(D5.length):void 0;t.push({type:"mention",attrs:{kind:a,name:c??e5e(l),path:a==="skill"?"":xS(r)}})}else km(t,i);n=s+i.length}return km(t,e.slice(n)),t}function E$(e){const t=T$(e.args??"").filter(o=>o.type==="mention"&&o.attrs.kind==="skill"),n=t[0];return t.length===1&&n?.type==="mention"&&n.attrs.name===e.name}function I$(e,t){if(E$(e))return t.revivePill?e.args??"":null;if(e.name.includes(" "))return null;const n=e.args??"";return`/skill:${e.name}${n.length>0?` ${n}`:""}`}function o5e(e,t){return I$(e,t)!==null}function s5e(e){if(E$(e))return e.args??"";const t=Dv({kind:"skill",name:e.name,path:""});return e.args?`${t} ${e.args}`:t}function SS(e){return bS??=new Intl.Segmenter("und",{granularity:"grapheme"}),Array.from(bS.segment(e),({segment:t})=>t)}function L$(e){const t=SS(e);if(t.length<=32)return e;const n=e.lastIndexOf("."),s=(n>=0?SS(e.slice(n)).length:0)+4,i=31-s;return i<8?`${t.slice(0,31).join("")}…`:`${t.slice(0,i).join("")}…${t.slice(-s).join("")}`}function i5e(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function l5e(e){return new Worker("/assets/mermaidParser.worker-DimdFOud.js",{type:"module",name:e?.name})}const r5e={key:0,class:"md-frontmatter"},a5e={class:"diff-bar"},c5e=["aria-label","onClick"],u5e={class:"diff-pre"},d5e={key:0,class:"diff-sign"},f5e={class:"diff-text"},p5e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Z3="pythinker-code://skill/",CS="md-table-wide",MS="md-table-toggle",AS="md-table-fade",TS="md-table-toggle--show",h5e="md-table-at-end",m5e=26,ES="md-code-wrap",bm="md-code-wrap-toggle",_m="md-code-nums",IS="md-code-nums-toggle",LS="data-md-code-css",g5e=` [data-line], [data-no-newline] { padding-inline: var(--space-3); } pre::selection, pre ::selection { background: var(--color-code-selection); @@ -813,14 +813,14 @@ pre[data-md-nums="on"] [data-line]::before { color: var(--color-text-faint); user-select: none; } -`,LS="github-light",$S="github-dark",g5e=Je({__name:"Markdown",props:{text:{},openFile:{},skills:{},streaming:{type:Boolean,default:!1}},setup(e){t2e(),h2e(),o2e(),v2e(),n2e(new s5e),g2e(new i5e);const t=new WeakMap;function n($e,Ge){if($e.src[$e.pos]!=="$")return!1;let ot=t.get($e);(!ot||ot.src!==$e.src)&&(ot={src:$e.src,match:U4e($e.src),lastEnd:-1},t.set($e,ot));const dt=ot.match($e.pos,ot.lastEnd);if(!dt||dt.end>$e.posMax)return!1;if(ot.lastEnd=dt.end,Ge)return $e.pos=dt.end,!0;const Mt=$e.push("math_inline","math",0);return Mt.content=dt.content,Mt.markup="$",Mt.raw=$e.src.slice($e.pos,dt.end),Mt.loading=!1,$e.pos=dt.end,!0}function o($e){return $e.set({typographer:!1}),$e.inline.ruler.disable("math"),$e.inline.ruler.before("escape","math",n),$e}const{t:s,locale:i}=$t(),l=fn("resolveImage"),r=V(null),a=e,c=B(()=>!a.streaming),u=B(()=>G4e(a.text??"")),d=B(()=>u.value.body),f=B(()=>E4e(d.value)),p=B(()=>a.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:R4e(d.value)),h=Ip(),m=B(()=>!a.streaming),k=ds(new Map),x=new Set,y=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,w=/(]*?\bsrc=")([^"]+)(")/gi;function _($e){return!/^(https?:|data:|blob:)/i.test($e)}function A($e){if(!l)return;const Ge=[];for(const ot of[y,w]){ot.lastIndex=0;let dt;for(;(dt=ot.exec($e))!==null;)Ge.push(dt[2]??"")}for(const ot of Ge)!ot||!_(ot)||k.has(ot)||x.has(ot)||(x.add(ot),l(ot).then(dt=>{k.set(ot,dt!==ot?dt:"")}).catch(()=>{k.set(ot,"")}).finally(()=>{x.delete(ot)}))}function P($e){if(!l)return $e;const Ge=ot=>{if(!_(ot))return null;const dt=k.get(ot);return dt===void 0?f5e:dt===""?null:dt};return $e.replace(y,(ot,dt,Mt,Ft)=>{const Ut=Ge(Mt);return Ut===null?ot:`${dt}${Ut}${Ft}`}).replace(w,(ot,dt,Mt,Ft)=>{const Ut=Ge(Mt);return Ut===null?ot:`${dt}${Ut}${Ft}`})}Ke(()=>d.value,$e=>A($e),{immediate:!0});function z(){if(!r.value||!a.openFile||a.streaming)return;const $e=document.createTreeWalker(r.value,NodeFilter.SHOW_TEXT),Ge=[];let ot=$e.nextNode();for(;ot;){const dt=ot,Mt=dt.parentElement;Mt&&!Mt.closest("a, pre, .md-file-link, svg")&&dt.data.trim().length>0&&Ge.push(dt),ot=$e.nextNode()}for(const dt of Ge){const Mt=L4e(dt.data,{aliases:f.value});if(Mt.length===0||!dt.parentNode)continue;const Ft=document.createDocumentFragment();let Ut=0;for(const en of Mt){en.start>Ut&&Ft.append(document.createTextNode(dt.data.slice(Ut,en.start)));const tn=document.createElement("button");tn.type="button",tn.className="md-file-link",tn.textContent=en.text,tn.title=en.line?`${en.path}:${en.line}`:en.path,tn.addEventListener("click",eo=>{eo.preventDefault(),eo.stopPropagation(),a.openFile?.({path:en.path,line:en.line})}),Ft.append(tn),Ut=en.end}UtZ3.length?"skill":$e.startsWith("#")||$e.startsWith("?")||$e.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test($e)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test($e)?null:$e.endsWith("/")||$e.endsWith("\\")||/%5c$/i.test($e)?"folder":"file":null}function $($e){try{return decodeURIComponent($e.slice(Z3.length))}catch{return $e.slice(Z3.length)}}function C($e){return $e.replace(/%0A/g,` -`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function j(){if(!r.value||a.streaming)return;const $e=r.value.querySelectorAll("a[href]");for(const Ge of $e){if(Ge.dataset.mdLinkHandled==="true"||Ge.closest("svg")||Ge.querySelector("img"))continue;const ot=Ge.getAttribute("href")??"",dt=T(ot);if(dt===null)continue;Ge.dataset.mdLinkHandled="true",Ge.removeAttribute("title");const Mt=dt==="skill"?ot:L(ot),Ft=C(Ge.textContent??"");Ge.classList.add("mention-pill",`mention-${dt}`),Ge.dataset.mentionKind=dt,Ge.dataset.mentionName=dt==="skill"?$(ot):Ft,Ge.dataset.mentionPath=Mt,(dt==="skill"||a.openFile)&&Ge.removeAttribute("href"),(dt==="skill"||dt==="file"&&a.openFile)&&(Ge.tabIndex=0,Ge.setAttribute("role","button"));const Ut=I$(Ft),en=document.createElement("span");if(en.className="mention-pill-name",en.textContent=Ut,Ge.replaceChildren(en),!Ge.querySelector(".mention-pill-icon")){const tn=document.createElement("span");tn.className="mention-pill-icon",tn.setAttribute("aria-hidden","true"),tn.innerHTML=dt==="skill"?Ll("sparkles","sm"):dt==="folder"?Ll("folder","sm"):ju(Mt,Ft),Ge.prepend(tn)}Ge.addEventListener("click",tn=>{dt!=="skill"&&!a.openFile||(tn.preventDefault(),tn.stopPropagation(),dt==="file"&&a.openFile?.({path:E(L(ot))}))}),dt==="file"&&a.openFile&&Ge.addEventListener("keydown",tn=>{tn.key!=="Enter"&&tn.key!==" "||(tn.preventDefault(),tn.stopPropagation(),a.openFile?.({path:E(L(ot))}))}),ve(Ge)}}function H($e){const Ge=$e.dataset.mentionKind??($e.classList.contains("mention-skill")?"skill":$e.classList.contains("mention-folder")?"folder":"file"),ot=$e.dataset.mentionName??$e.querySelector(".mention-pill-name")?.textContent??"";return{kind:Ge,name:ot,path:$e.dataset.mentionPath??""}}function D($e,Ge){let ot;return()=>{if(ot===void 0){const dt=getComputedStyle(document.documentElement).getPropertyValue($e).trim(),Mt=parseFloat(dt);ot=Number.isFinite(Mt)?dt.endsWith("s")?Mt*1e3:Mt:Ge}return ot}}const M=D("--space-1-5",6),R=D("--p-mention-tip-vmargin",12),O=D("--duration-tooltip",150),U=D("--duration-fast",120),Z=D("--duration-flash",1e3),q=V(null);let te=null,ee=0,J=0;function se($e){return q.value?.contains($e)??!1}function Q(){let $e=q.value;return $e||($e=document.createElement("div"),$e.className="mention-tip",$e.id="mention-tip",$e.setAttribute("role","tooltip"),$e.addEventListener("mouseenter",()=>window.clearTimeout(J)),$e.addEventListener("mouseleave",()=>K()),$e.addEventListener("focusin",()=>window.clearTimeout(J)),$e.addEventListener("focusout",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&($e.contains(ot)||te?.contains(ot))||oe()}),document.body.append($e),q.value=$e),$e}function me(){const $e=q.value,Ge=te;if(!$e||!Ge)return;const ot=Ge.getBoundingClientRect(),dt=M(),Mt=R();let Ft=ot.top-dt-$e.offsetHeight;FtGe.name===$e)}function Ye($e){const Ge=document.createElement("div");Ge.className="mention-tip-path";const ot=document.createElement("div");ot.className="mention-tip-path-text";const dt=$e.split(/([/\\])/);let Mt=dt.length-1;for(;Mt>0&&(dt[Mt]===""||dt[Mt]==="/"||dt[Mt]==="\\");)Mt--;for(let en=0;en{en.preventDefault(),en.stopPropagation(),fs($e).then(tn=>{tn&&(Ft.innerHTML=Ll("check","sm"),window.setTimeout(()=>{Ft.innerHTML=Ut},Z()))})}),Ge.append(Ft),Ge}function at($e){const Ge=document.createElement("div");Ge.className="mention-tip-skill";const ot=document.createElement("div");ot.className="mention-tip-head";const dt=document.createElement("span");if(dt.className="mention-tip-name",dt.textContent=$e.name,ot.append(dt),$e.path&&a.openFile){const Mt=document.createElement("button");Mt.type="button",Mt.className="mention-tip-open",Mt.setAttribute("aria-label",s("mention.openSkill")),Mt.innerHTML=Ll("external-link","sm");const Ft=$e.path;Mt.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),oe(),a.openFile?.({path:Ft})}),ot.append(Mt)}if(Ge.append(ot),$e.description){const Mt=document.createElement("div");Mt.className="mention-tip-desc",Mt.textContent=$e.description,Ge.append(Mt)}return Ge}function X($e){const Ge=Q();te?.removeAttribute("aria-describedby"),te=$e,$e.setAttribute("aria-describedby",Ge.id);const ot=H($e);Ge.replaceChildren(ot.kind==="skill"?at(xe(ot.name)??{name:ot.name,description:""}):Ye(ot.path||ot.name)),Ge.classList.remove("positioned"),me(),Ge.classList.add("positioned"),Ge.removeAttribute("inert")}function oe(){window.clearTimeout(ee),window.clearTimeout(J),te?.removeAttribute("aria-describedby"),te=null;const $e=q.value;$e?.classList.remove("positioned"),$e?.setAttribute("inert","")}function F($e){window.clearTimeout(J),window.clearTimeout(ee);const Ge=q.value?.classList.contains("positioned")&&te===$e;ee=window.setTimeout(()=>{$e.isConnected&&X($e)},Ge?0:O())}function K(){window.clearTimeout(ee),window.clearTimeout(J),J=window.setTimeout(oe,U())}function he($e){const Ge=q.value;if(!(!Ge||!Ge.classList.contains("positioned")||!te)){if($e.key==="Escape"){$e.target instanceof Node&&Ge.contains($e.target)&&te.focus(),oe(),$e.preventDefault(),$e.stopImmediatePropagation();return}if($e.key==="Tab"&&$e.target instanceof Node&&Ge.contains($e.target)){const ot=Array.from(Ge.querySelectorAll("button")),dt=ot[0],Mt=ot[ot.length-1];(!$e.shiftKey&&$e.target===Mt||$e.shiftKey&&$e.target===dt)&&($e.preventDefault(),te.focus(),oe())}}}function ye($e){const Ge=$e.target;Ge instanceof Node&&(se(Ge)||te?.contains(Ge))||oe()}function ve($e){$e.addEventListener("mouseenter",()=>F($e)),$e.addEventListener("mouseleave",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&se(ot)||K()}),$e.addEventListener("focus",()=>F($e)),$e.addEventListener("blur",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&se(ot)||K()})}function ie(){oe()}function de($e){return $e.querySelector(`button.${CS}`)}function be($e){return $e.querySelector(`.${MS}`)}function Se($e){const Ge=de($e);if(!Ge)return;const ot=$e.querySelector("thead tr")??$e.querySelector("tr");if(!ot)return;const dt=ot.getBoundingClientRect(),Mt=$e.getBoundingClientRect().top,Ft=Math.max(2,Math.round(dt.top-Mt+(dt.height-h5e)/2));Ge.style.top=`${Ft}px`,Ge.style.right=`${Ft}px`}function je($e){const Ge=$e.querySelector("table");return Ge!==null&&Ge.scrollWidth>$e.clientWidth+1}function et($e){const Ge=`translateX(${$e.scrollLeft}px)`,ot=be($e);ot&&(ot.style.transform=Ge);const dt=de($e);dt&&(dt.style.transform=Ge);const Mt=$e.scrollLeft+$e.clientWidth>=$e.scrollWidth-2;$e.classList.toggle(p5e,Mt)}function le($e){const Ge=de($e);if(!Ge)return;const ot=je($e),dt=$e.classList.contains(SS);Ge.classList.toggle(AS,ot||dt),be($e)?.classList.toggle(AS,ot),Se($e),et($e)}function fe($e){const Ge=de($e);if(Ge)return Ge;if(!$e.closest(".a-msg .msg"))return null;const ot=document.createElement("div");ot.className=MS,ot.setAttribute("aria-hidden","true");const dt=document.createElement("button");return dt.type="button",dt.className=CS,dt.innerHTML=Ll("expand","sm"),dt.setAttribute("aria-label",s("conversation.widenTable")),dt.title=s("conversation.widenTable"),dt.addEventListener("click",Mt=>{Mt.preventDefault(),Mt.stopPropagation(),ge($e)}),$e.append(ot,dt),$e.addEventListener("scroll",()=>et($e),{passive:!0}),le($e),dt}function ge($e){const Ge=$e.classList.toggle(SS),ot=de($e);if(ot){ot.innerHTML=Ll(Ge?"collapse":"expand","sm");const dt=s(Ge?"conversation.restoreTableWidth":"conversation.widenTable");ot.setAttribute("aria-label",dt),ot.title=dt}le($e),$e.dispatchEvent(new CustomEvent("pythinker-table-layout",{bubbles:!0}))}function Oe(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".table-node-wrapper"))fe($e)}function Fe(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".table-node-wrapper"))le($e)}function pt($e){return`${Math.max(String($e).length+1,4)}ch`}const kt={stateClass:_m,toggleClass:ES,iconOn:"list-numbers",iconOff:"list-numbers",labelOn:()=>s("conversation.hideLineNumbers"),labelOff:()=>s("conversation.showLineNumbers")},qt={stateClass:TS,toggleClass:bm,iconOn:"text-wrap-disabled",iconOff:"text-wrap",labelOn:()=>s("conversation.unwrapCode"),labelOff:()=>s("conversation.wrapCode")},nn=new WeakMap;function Jt($e){const Ge=$e.querySelector("diffs-container"),ot=Ge?.shadowRoot;if(!Ge||!ot)return;if(!nn.has(Ge)){const Ut=new MutationObserver(()=>Jt($e));Ut.observe(ot,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-overflow","data-md-nums"]}),nn.set(Ge,Ut)}if(!ot.querySelector(`style[${IS}]`)){const Ut=document.createElement("style");Ut.setAttribute(IS,""),Ut.textContent=m5e,ot.append(Ut)}const dt=ot.querySelector("pre[data-overflow]");if(!dt)return;const Mt=$e.classList.contains(TS)?"wrap":"scroll";dt.getAttribute("data-overflow")!==Mt&&dt.setAttribute("data-overflow",Mt);const Ft=$e.classList.contains(_m)?"on":"off";if(dt.getAttribute("data-md-nums")!==Ft&&dt.setAttribute("data-md-nums",Ft),Ft==="on"){const Ut=pt(ot.querySelectorAll("[data-line]").length);dt.style.getPropertyValue("--md-nums-gutter")!==Ut&&dt.style.setProperty("--md-nums-gutter",Ut)}else dt.style.getPropertyValue("--md-nums-gutter")&&dt.style.removeProperty("--md-nums-gutter")}function kn($e,Ge){const ot=$e.querySelector(`button.${Ge.toggleClass}`);if(!ot)return;const dt=$e.classList.contains(Ge.stateClass),Mt=dt?Ge.labelOn():Ge.labelOff(),Ft=Ll(dt?Ge.iconOn:Ge.iconOff,"sm");ot.innerHTML!==Ft&&(ot.innerHTML=Ft),ot.setAttribute("aria-label",Mt),ot.setAttribute("aria-pressed",String(dt)),ot.title=Mt}function Dn($e){kn($e,kt),kn($e,qt),Jt($e)}function xn($e,Ge,ot){const dt=$e.querySelector(`button.${ot.toggleClass}`);if(dt)return kn($e,ot),dt;if(!Ge)return null;const Mt=document.createElement("button");Mt.type="button",Mt.className=`${Ge.anchor.className} ${ot.toggleClass}`,Mt.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),$e.classList.toggle(ot.stateClass),Dn($e)});const Ft=ot===kt?$e.querySelector(`button.${bm}`)??Ge.anchor:Ge.anchor;return Ge.row.insertBefore(Mt,Ft),kn($e,ot),Mt}function $n($e){const Ge=$e.querySelector(`.code-block-header .code-action-btn:not([disabled]):not(.${bm}):not(.${ES})`),ot=Ge?.parentElement;return Ge&&ot?{row:ot,anchor:Ge}:null}function Hn(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".code-block-container")){const Ge=$n($e);$e.querySelector("diffs-container")&&xn($e,Ge,kt),xn($e,Ge,qt),Jt($e)}}function bn(){oe(),yt().then(()=>{z(),j(),Oe(),Hn()})}Ke(()=>a.text,bn),Ke(()=>a.streaming,bn),Ke(i,()=>{if(r.value)for(const $e of r.value.querySelectorAll(".code-block-container"))kn($e,kt),kn($e,qt)});let Wn=null,Pn=null;In(()=>{bn(),r.value&&(Wn=new MutationObserver(bn),Wn.observe(r.value,{childList:!0,subtree:!0}),typeof ResizeObserver<"u"&&(Pn=new ResizeObserver(Fe),Pn.observe(r.value))),window.addEventListener("scroll",ie,{capture:!0}),window.addEventListener("resize",ie),document.addEventListener("pointerdown",ye,{capture:!0}),document.addEventListener("keydown",he,{capture:!0})}),En(()=>{Wn?.disconnect(),Pn?.disconnect(),window.removeEventListener("scroll",ie,{capture:!0}),window.removeEventListener("resize",ie),document.removeEventListener("pointerdown",ye,{capture:!0}),document.removeEventListener("keydown",he,{capture:!0}),oe(),q.value?.remove(),q.value=null});const Mn={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},Nn=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,An=B(()=>{const $e=P(d.value),Ge=[];let ot=0;Nn.lastIndex=0;let dt;for(;(dt=Nn.exec($e))!==null;){const Ft=dt[1]??"",Ut=$e.slice(ot,dt.index)+(Ft||"");Ut.trim()&&Ge.push({kind:"md",text:Ut}),Ge.push({kind:"diff",code:dt[2]??""}),ot=Nn.lastIndex}const Mt=$e.slice(ot);return(Mt.trim()||Ge.length===0)&&Ge.push({kind:"md",text:Mt}),Ge});function Qn($e){return $e.split(` -`).map(Ge=>Ge.startsWith("@@")?{type:"hunk",sign:"",text:Ge}:/^\+(?!\+\+)/.test(Ge)?{type:"add",sign:"+",text:Ge.slice(1)}:/^-(?!--)/.test(Ge)?{type:"del",sign:"-",text:Ge.slice(1)}:Ge.startsWith(" ")?{type:"ctx",sign:"",text:Ge.slice(1)}:{type:"ctx",sign:"",text:Ge})}const Fn=ds(new Set),Qt=ds(new Set),uo=B(()=>{const $e=new Map;return An.value.map(Ge=>{if(Ge.kind!=="diff")return"";const ot=($e.get(Ge.code)??0)+1;return $e.set(Ge.code,ot),`${ot}#${Ge.code}`})});Ke(uo,$e=>{const Ge=new Set($e);for(const ot of[Fn,Qt]){const dt=Array.from(ot).filter(Mt=>!Ge.has(Mt));for(const Mt of dt)ot.delete(Mt)}});function Zn($e,Ge){const ot=uo.value[Ge];ot===void 0||ot===""||($e.has(ot)?$e.delete(ot):$e.add(ot))}function Bo($e){const Ge=uo.value[$e];return Ge!==void 0&&Ge!==""&&Fn.has(Ge)}function Un($e){const Ge=uo.value[$e];return Ge!==void 0&&Ge!==""&&Qt.has(Ge)}function hs($e){Zn(Fn,$e)}function Io($e){Zn(Qt,$e)}function Rt(){for(const $e of r.value?.querySelectorAll(".diff-wrap .diff-pre")??[]){if(!$e.closest(".diff-wrap")?.classList.contains(_m)){$e.style.removeProperty("--md-nums-gutter");continue}const Ge=$e.querySelectorAll(".diff-line:not(.diff-hunk)").length;$e.style.setProperty("--md-nums-gutter",pt(Ge))}}Ke([()=>Qt.size,An],()=>{yt(Rt)});const Jo=V(null);function Ls($e,Ge){fs($e).then(ot=>{ot&&(Jo.value=Ge,setTimeout(()=>{Jo.value=null},1400))})}return($e,Ge)=>(g(),S("div",{ref_key:"mdRef",ref:r,class:"md"},[u.value.frontmatter!==null?(g(),S("pre",l5e,I(u.value.frontmatter),1)):Y("",!0),(g(!0),S(Ce,null,rt(An.value,(ot,dt)=>(g(),S(Ce,{key:dt},[ot.kind==="md"?(g(),ue(v(Xi),{key:0,content:ot.text,"custom-markdown-it":o,mode:"chat","code-renderer":p.value.codeRenderer,"is-dark":v(h),"code-block-light-theme":LS,"code-block-dark-theme":$S,themes:[LS,$S],"code-block-props":Mn,final:c.value,"smooth-streaming":e.streaming,"batch-rendering":m.value,"defer-nodes-until-visible":!1,onCopy:v(dH)},null,8,["content","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(g(),S("div",{key:1,class:Be(["diff-wrap",{"md-code-wrap":Bo(dt),"md-code-nums":Un(dt)}])},[b("div",r5e,[Ge[0]||(Ge[0]=b("span",{class:"diff-lang"},"diff",-1)),W(Cn,{text:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers")},{default:ae(()=>[W(Dt,{size:"sm",label:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers"),"aria-pressed":Un(dt),onClick:Mt=>Io(dt)},{default:ae(()=>[W(Ee,{name:"list-numbers",size:"sm"})]),_:1},8,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode")},{default:ae(()=>[W(Dt,{size:"sm",label:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode"),"aria-pressed":Bo(dt),onClick:Mt=>hs(dt)},{default:ae(()=>[W(Ee,{name:Bo(dt)?"text-wrap-disabled":"text-wrap",size:"sm"},null,8,["name"])]),_:2},1032,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:v(s)("filePreview.copyCode")},{default:ae(()=>[b("button",{class:"diff-copy","aria-label":v(s)("filePreview.copyCode"),onClick:Mt=>Ls(ot.code,dt)},[W(Ee,{name:Jo.value===dt?"check":"copy",size:"sm"},null,8,["name"])],8,a5e)]),_:2},1032,["text"])]),b("pre",c5e,[b("code",null,[(g(!0),S(Ce,null,rt(Qn(ot.code),(Mt,Ft)=>(g(),S("span",{key:Ft,class:Be(["diff-line",`diff-${Mt.type}`])},[Mt.type!=="hunk"?(g(),S("span",u5e,I(Mt.sign),1)):Y("",!0),b("span",d5e,I(Mt.text),1)],2))),128))])])],2))],64))),128))],512))}}),Br=vt(g5e,[["__scopeId","data-v-1b44ea19"]]),v5e=Object.freeze(Object.defineProperty({__proto__:null,default:Br},Symbol.toStringTag,{value:"Module"})),y5e={class:"activity-notice",role:"status"},w5e={"aria-hidden":"true"},k5e={class:"an-label"},b5e=Je({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",y5e,[b("span",w5e,[W(Zo,{size:"sm"})]),b("span",k5e,I(e.label),1)]))}}),_5e=vt(b5e,[["__scopeId","data-v-5e7a6420"]]);function x5e(e,t="Yesterday"){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=u=>String(u).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,l=n.getFullYear()===o.getFullYear(),r=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(l&&r&&a)return i;const c=new Date(o);return c.setDate(o.getDate()-1),n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()?`${t} ${i}`:l?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const S5e=Je({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=$t(),o=V(!1),s=B(()=>{const r=new Date(t.time);if(Number.isNaN(r.getTime()))return t.time;const a=c=>String(c).padStart(2,"0");return`${r.getFullYear()}-${a(r.getMonth()+1)}-${a(r.getDate())} ${a(r.getHours())}:${a(r.getMinutes())}`}),i=B(()=>o.value?s.value:x5e(t.time,n("conversation.yesterday")));function l(){o.value=!o.value}return(r,a)=>(g(),S("button",{type:"button",class:"msg-time",onClick:xt(l,["stop"])},I(i.value),1))}}),Dv=vt(S5e,[["__scopeId","data-v-6761370d"]]);function C5e(e){return e.length===1?`0${e}`:e}function M5e(e,t){return`${String(Number(e))}:${C5e(t)}`}const NS=e=>/^\d+$/.test(e);function A5e(e,t){const n=e.trim().split(/\s+/);if(n.length!==5)return e;const[o,s,i,l,r]=n,a=i==="*"&&l==="*"&&r==="*",c=i==="*"&&l==="*";if(o==="*"&&s==="*"&&a)return t("conversation.cron.everyMinute");const u=/^\*\/(\d+)$/.exec(o);if(u&&s==="*"&&a)return u[1]==="1"?t("conversation.cron.everyMinute"):t("conversation.cron.everyNMinutes",{n:u[1]});if(o==="0"&&s==="*"&&a)return t("conversation.cron.everyHour");const d=/^\*\/(\d+)$/.exec(s);if(o==="0"&&d&&a)return t("conversation.cron.everyNHours",{n:d[1]});if(NS(o)&&NS(s)&&c){const f=M5e(s,o);if(r==="1-5")return t("conversation.cron.weekdaysAt",{time:f});if(r==="*")return t("conversation.cron.dailyAt",{time:f})}return e}const T5e=["data-turn-id"],E5e={class:"cn-bubble"},I5e={class:"cn-title"},L5e={key:0,class:"cn-prompt"},$5e={class:"cn-meta"},N5e={key:0,class:"cn-meta-item"},z5e={key:1,class:"cn-meta-item"},B5e=["aria-label"],R5e=["title"],P5e=Je({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=$t(),o=B(()=>t.cron),s=B(()=>o.value?.missedCount!==void 0),i=B(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),l=B(()=>{const u=o.value?.cron;return u?A5e(u,n):""}),r=B(()=>s.value?"error":"ok"),a=B(()=>{const u=o.value;if(!u)return"";const d=[];return u.recurring===!1&&d.push(n("conversation.cron.oneShot")),typeof u.coalescedCount=="number"&&u.coalescedCount>1&&d.push(n("conversation.cron.coalesced",{n:u.coalescedCount})),u.missedCount!==void 0&&d.push(n("conversation.cron.missedCount",{n:u.missedCount})),u.stale===!0&&d.push(n("conversation.cron.finalDelivery")),d.join(" · ")}),c=B(()=>t.text??"");return(u,d)=>(g(),S("div",{class:Be(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[b("div",E5e,[b("span",I5e,I(i.value),1),c.value?(g(),S("span",L5e,I(c.value),1)):Y("",!0)]),b("div",$5e,[W(Ee,{name:"clock",size:"sm",class:"cn-meta-ico","aria-hidden":"true"}),l.value?(g(),S("span",N5e,I(l.value),1)):Y("",!0),a.value?(g(),S("span",z5e,I(a.value),1)):Y("",!0),b("span",{class:Be(["cn-status",r.value]),"aria-label":r.value},[r.value==="ok"?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):(g(),ue(Ee,{key:1,name:"close",size:"sm"}))],10,B5e),o.value?.jobId?(g(),S("span",{key:2,class:"cn-meta-item cn-id",title:v(n)("conversation.cron.job",{id:o.value.jobId})},I(o.value.jobId),9,R5e)):Y("",!0),e.createdAt?(g(),ue(Dv,{key:3,time:e.createdAt},null,8,["time"])):Y("",!0)])],10,T5e))}}),F5e=vt(P5e,[["__scopeId","data-v-d3807b0f"]]),L$="pythinkerWeb.taskNotification",j5e=/]*)>([\s\S]*?)<\/notification>/g,O5e=/([\w-]+)="([^"]*)"/g,H5e=/]*)>[\s\S]*?<\/output-file>/,D5e=/]*)>([\s\S]*?)<\/output-preview>/,V5e=/^Title: (.*)$/m,W5e=/^Severity: (.*)$/m;function I4(e){return e.replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function xm(e){const t={};for(const n of e.matchAll(O5e))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=I4(n[2]));return t}function Sm(e){if(e===void 0)return;const t=Number(e);return Number.isFinite(t)?t:void 0}function q5e(e,t,n){const o=xm(e),s=V5e.exec(t)?.[1]?.trim()??"",i=W5e.exec(t)?.[1]?.trim()??"";let l=t.split(` +`,$S="github-light",NS="github-dark",v5e=Je({__name:"Markdown",props:{text:{},openFile:{},skills:{},streaming:{type:Boolean,default:!1}},setup(e){n2e(),m2e(),s2e(),y2e(),o2e(new i5e),v2e(new l5e);const t=new WeakMap;function n($e,Ge){if($e.src[$e.pos]!=="$")return!1;let ot=t.get($e);(!ot||ot.src!==$e.src)&&(ot={src:$e.src,match:Z4e($e.src),lastEnd:-1},t.set($e,ot));const dt=ot.match($e.pos,ot.lastEnd);if(!dt||dt.end>$e.posMax)return!1;if(ot.lastEnd=dt.end,Ge)return $e.pos=dt.end,!0;const Mt=$e.push("math_inline","math",0);return Mt.content=dt.content,Mt.markup="$",Mt.raw=$e.src.slice($e.pos,dt.end),Mt.loading=!1,$e.pos=dt.end,!0}function o($e){return $e.set({typographer:!1}),$e.inline.ruler.disable("math"),$e.inline.ruler.before("escape","math",n),$e}const{t:s,locale:i}=$t(),l=fn("resolveImage"),r=V(null),a=e,c=B(()=>!a.streaming),u=B(()=>Y4e(a.text??"")),d=B(()=>u.value.body),f=B(()=>I4e(d.value)),p=B(()=>a.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:P4e(d.value)),h=Ip(),m=B(()=>!a.streaming),k=ds(new Map),x=new Set,y=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,w=/(]*?\bsrc=")([^"]+)(")/gi;function _($e){return!/^(https?:|data:|blob:)/i.test($e)}function A($e){if(!l)return;const Ge=[];for(const ot of[y,w]){ot.lastIndex=0;let dt;for(;(dt=ot.exec($e))!==null;)Ge.push(dt[2]??"")}for(const ot of Ge)!ot||!_(ot)||k.has(ot)||x.has(ot)||(x.add(ot),l(ot).then(dt=>{k.set(ot,dt!==ot?dt:"")}).catch(()=>{k.set(ot,"")}).finally(()=>{x.delete(ot)}))}function P($e){if(!l)return $e;const Ge=ot=>{if(!_(ot))return null;const dt=k.get(ot);return dt===void 0?p5e:dt===""?null:dt};return $e.replace(y,(ot,dt,Mt,Ft)=>{const Ut=Ge(Mt);return Ut===null?ot:`${dt}${Ut}${Ft}`}).replace(w,(ot,dt,Mt,Ft)=>{const Ut=Ge(Mt);return Ut===null?ot:`${dt}${Ut}${Ft}`})}Ke(()=>d.value,$e=>A($e),{immediate:!0});function z(){if(!r.value||!a.openFile||a.streaming)return;const $e=document.createTreeWalker(r.value,NodeFilter.SHOW_TEXT),Ge=[];let ot=$e.nextNode();for(;ot;){const dt=ot,Mt=dt.parentElement;Mt&&!Mt.closest("a, pre, .md-file-link, svg")&&dt.data.trim().length>0&&Ge.push(dt),ot=$e.nextNode()}for(const dt of Ge){const Mt=$4e(dt.data,{aliases:f.value});if(Mt.length===0||!dt.parentNode)continue;const Ft=document.createDocumentFragment();let Ut=0;for(const en of Mt){en.start>Ut&&Ft.append(document.createTextNode(dt.data.slice(Ut,en.start)));const tn=document.createElement("button");tn.type="button",tn.className="md-file-link",tn.textContent=en.text,tn.title=en.line?`${en.path}:${en.line}`:en.path,tn.addEventListener("click",eo=>{eo.preventDefault(),eo.stopPropagation(),a.openFile?.({path:en.path,line:en.line})}),Ft.append(tn),Ut=en.end}UtZ3.length?"skill":$e.startsWith("#")||$e.startsWith("?")||$e.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test($e)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test($e)?null:$e.endsWith("/")||$e.endsWith("\\")||/%5c$/i.test($e)?"folder":"file":null}function N($e){try{return decodeURIComponent($e.slice(Z3.length))}catch{return $e.slice(Z3.length)}}function C($e){return $e.replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function F(){if(!r.value||a.streaming)return;const $e=r.value.querySelectorAll("a[href]");for(const Ge of $e){if(Ge.dataset.mdLinkHandled==="true"||Ge.closest("svg")||Ge.querySelector("img"))continue;const ot=Ge.getAttribute("href")??"",dt=I(ot);if(dt===null)continue;Ge.dataset.mdLinkHandled="true",Ge.removeAttribute("title");const Mt=dt==="skill"?ot:L(ot),Ft=C(Ge.textContent??"");Ge.classList.add("mention-pill",`mention-${dt}`),Ge.dataset.mentionKind=dt,Ge.dataset.mentionName=dt==="skill"?N(ot):Ft,Ge.dataset.mentionPath=Mt,(dt==="skill"||a.openFile)&&Ge.removeAttribute("href"),(dt==="skill"||dt==="file"&&a.openFile)&&(Ge.tabIndex=0,Ge.setAttribute("role","button"));const Ut=L$(Ft),en=document.createElement("span");if(en.className="mention-pill-name",en.textContent=Ut,Ge.replaceChildren(en),!Ge.querySelector(".mention-pill-icon")){const tn=document.createElement("span");tn.className="mention-pill-icon",tn.setAttribute("aria-hidden","true"),tn.innerHTML=dt==="skill"?Ll("sparkles","sm"):dt==="folder"?Ll("folder","sm"):ju(Mt,Ft),Ge.prepend(tn)}Ge.addEventListener("click",tn=>{dt!=="skill"&&!a.openFile||(tn.preventDefault(),tn.stopPropagation(),dt==="file"&&a.openFile?.({path:T(L(ot))}))}),dt==="file"&&a.openFile&&Ge.addEventListener("keydown",tn=>{tn.key!=="Enter"&&tn.key!==" "||(tn.preventDefault(),tn.stopPropagation(),a.openFile?.({path:T(L(ot))}))}),ve(Ge)}}function H($e){const Ge=$e.dataset.mentionKind??($e.classList.contains("mention-skill")?"skill":$e.classList.contains("mention-folder")?"folder":"file"),ot=$e.dataset.mentionName??$e.querySelector(".mention-pill-name")?.textContent??"";return{kind:Ge,name:ot,path:$e.dataset.mentionPath??""}}function D($e,Ge){let ot;return()=>{if(ot===void 0){const dt=getComputedStyle(document.documentElement).getPropertyValue($e).trim(),Mt=parseFloat(dt);ot=Number.isFinite(Mt)?dt.endsWith("s")?Mt*1e3:Mt:Ge}return ot}}const M=D("--space-1-5",6),R=D("--p-mention-tip-vmargin",12),O=D("--duration-tooltip",150),U=D("--duration-fast",120),Z=D("--duration-flash",1e3),q=V(null);let te=null,ee=0,J=0;function se($e){return q.value?.contains($e)??!1}function Q(){let $e=q.value;return $e||($e=document.createElement("div"),$e.className="mention-tip",$e.id="mention-tip",$e.setAttribute("role","tooltip"),$e.addEventListener("mouseenter",()=>window.clearTimeout(J)),$e.addEventListener("mouseleave",()=>K()),$e.addEventListener("focusin",()=>window.clearTimeout(J)),$e.addEventListener("focusout",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&($e.contains(ot)||te?.contains(ot))||oe()}),document.body.append($e),q.value=$e),$e}function me(){const $e=q.value,Ge=te;if(!$e||!Ge)return;const ot=Ge.getBoundingClientRect(),dt=M(),Mt=R();let Ft=ot.top-dt-$e.offsetHeight;FtGe.name===$e)}function Ye($e){const Ge=document.createElement("div");Ge.className="mention-tip-path";const ot=document.createElement("div");ot.className="mention-tip-path-text";const dt=$e.split(/([/\\])/);let Mt=dt.length-1;for(;Mt>0&&(dt[Mt]===""||dt[Mt]==="/"||dt[Mt]==="\\");)Mt--;for(let en=0;en{en.preventDefault(),en.stopPropagation(),fs($e).then(tn=>{tn&&(Ft.innerHTML=Ll("check","sm"),window.setTimeout(()=>{Ft.innerHTML=Ut},Z()))})}),Ge.append(Ft),Ge}function at($e){const Ge=document.createElement("div");Ge.className="mention-tip-skill";const ot=document.createElement("div");ot.className="mention-tip-head";const dt=document.createElement("span");if(dt.className="mention-tip-name",dt.textContent=$e.name,ot.append(dt),$e.path&&a.openFile){const Mt=document.createElement("button");Mt.type="button",Mt.className="mention-tip-open",Mt.setAttribute("aria-label",s("mention.openSkill")),Mt.innerHTML=Ll("external-link","sm");const Ft=$e.path;Mt.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),oe(),a.openFile?.({path:Ft})}),ot.append(Mt)}if(Ge.append(ot),$e.description){const Mt=document.createElement("div");Mt.className="mention-tip-desc",Mt.textContent=$e.description,Ge.append(Mt)}return Ge}function X($e){const Ge=Q();te?.removeAttribute("aria-describedby"),te=$e,$e.setAttribute("aria-describedby",Ge.id);const ot=H($e);Ge.replaceChildren(ot.kind==="skill"?at(xe(ot.name)??{name:ot.name,description:""}):Ye(ot.path||ot.name)),Ge.classList.remove("positioned"),me(),Ge.classList.add("positioned"),Ge.removeAttribute("inert")}function oe(){window.clearTimeout(ee),window.clearTimeout(J),te?.removeAttribute("aria-describedby"),te=null;const $e=q.value;$e?.classList.remove("positioned"),$e?.setAttribute("inert","")}function j($e){window.clearTimeout(J),window.clearTimeout(ee);const Ge=q.value?.classList.contains("positioned")&&te===$e;ee=window.setTimeout(()=>{$e.isConnected&&X($e)},Ge?0:O())}function K(){window.clearTimeout(ee),window.clearTimeout(J),J=window.setTimeout(oe,U())}function he($e){const Ge=q.value;if(!(!Ge||!Ge.classList.contains("positioned")||!te)){if($e.key==="Escape"){$e.target instanceof Node&&Ge.contains($e.target)&&te.focus(),oe(),$e.preventDefault(),$e.stopImmediatePropagation();return}if($e.key==="Tab"&&$e.target instanceof Node&&Ge.contains($e.target)){const ot=Array.from(Ge.querySelectorAll("button")),dt=ot[0],Mt=ot[ot.length-1];(!$e.shiftKey&&$e.target===Mt||$e.shiftKey&&$e.target===dt)&&($e.preventDefault(),te.focus(),oe())}}}function ye($e){const Ge=$e.target;Ge instanceof Node&&(se(Ge)||te?.contains(Ge))||oe()}function ve($e){$e.addEventListener("mouseenter",()=>j($e)),$e.addEventListener("mouseleave",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&se(ot)||K()}),$e.addEventListener("focus",()=>j($e)),$e.addEventListener("blur",Ge=>{const ot=Ge.relatedTarget;ot instanceof Node&&se(ot)||K()})}function ie(){oe()}function de($e){return $e.querySelector(`button.${MS}`)}function be($e){return $e.querySelector(`.${AS}`)}function Se($e){const Ge=de($e);if(!Ge)return;const ot=$e.querySelector("thead tr")??$e.querySelector("tr");if(!ot)return;const dt=ot.getBoundingClientRect(),Mt=$e.getBoundingClientRect().top,Ft=Math.max(2,Math.round(dt.top-Mt+(dt.height-m5e)/2));Ge.style.top=`${Ft}px`,Ge.style.right=`${Ft}px`}function je($e){const Ge=$e.querySelector("table");return Ge!==null&&Ge.scrollWidth>$e.clientWidth+1}function et($e){const Ge=`translateX(${$e.scrollLeft}px)`,ot=be($e);ot&&(ot.style.transform=Ge);const dt=de($e);dt&&(dt.style.transform=Ge);const Mt=$e.scrollLeft+$e.clientWidth>=$e.scrollWidth-2;$e.classList.toggle(h5e,Mt)}function le($e){const Ge=de($e);if(!Ge)return;const ot=je($e),dt=$e.classList.contains(CS);Ge.classList.toggle(TS,ot||dt),be($e)?.classList.toggle(TS,ot),Se($e),et($e)}function fe($e){const Ge=de($e);if(Ge)return Ge;if(!$e.closest(".a-msg .msg"))return null;const ot=document.createElement("div");ot.className=AS,ot.setAttribute("aria-hidden","true");const dt=document.createElement("button");return dt.type="button",dt.className=MS,dt.innerHTML=Ll("expand","sm"),dt.setAttribute("aria-label",s("conversation.widenTable")),dt.title=s("conversation.widenTable"),dt.addEventListener("click",Mt=>{Mt.preventDefault(),Mt.stopPropagation(),ge($e)}),$e.append(ot,dt),$e.addEventListener("scroll",()=>et($e),{passive:!0}),le($e),dt}function ge($e){const Ge=$e.classList.toggle(CS),ot=de($e);if(ot){ot.innerHTML=Ll(Ge?"collapse":"expand","sm");const dt=s(Ge?"conversation.restoreTableWidth":"conversation.widenTable");ot.setAttribute("aria-label",dt),ot.title=dt}le($e),$e.dispatchEvent(new CustomEvent("pythinker-table-layout",{bubbles:!0}))}function Oe(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".table-node-wrapper"))fe($e)}function Fe(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".table-node-wrapper"))le($e)}function pt($e){return`${Math.max(String($e).length+1,4)}ch`}const kt={stateClass:_m,toggleClass:IS,iconOn:"list-numbers",iconOff:"list-numbers",labelOn:()=>s("conversation.hideLineNumbers"),labelOff:()=>s("conversation.showLineNumbers")},qt={stateClass:ES,toggleClass:bm,iconOn:"text-wrap-disabled",iconOff:"text-wrap",labelOn:()=>s("conversation.unwrapCode"),labelOff:()=>s("conversation.wrapCode")},nn=new WeakMap;function Jt($e){const Ge=$e.querySelector("diffs-container"),ot=Ge?.shadowRoot;if(!Ge||!ot)return;if(!nn.has(Ge)){const Ut=new MutationObserver(()=>Jt($e));Ut.observe(ot,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-overflow","data-md-nums"]}),nn.set(Ge,Ut)}if(!ot.querySelector(`style[${LS}]`)){const Ut=document.createElement("style");Ut.setAttribute(LS,""),Ut.textContent=g5e,ot.append(Ut)}const dt=ot.querySelector("pre[data-overflow]");if(!dt)return;const Mt=$e.classList.contains(ES)?"wrap":"scroll";dt.getAttribute("data-overflow")!==Mt&&dt.setAttribute("data-overflow",Mt);const Ft=$e.classList.contains(_m)?"on":"off";if(dt.getAttribute("data-md-nums")!==Ft&&dt.setAttribute("data-md-nums",Ft),Ft==="on"){const Ut=pt(ot.querySelectorAll("[data-line]").length);dt.style.getPropertyValue("--md-nums-gutter")!==Ut&&dt.style.setProperty("--md-nums-gutter",Ut)}else dt.style.getPropertyValue("--md-nums-gutter")&&dt.style.removeProperty("--md-nums-gutter")}function kn($e,Ge){const ot=$e.querySelector(`button.${Ge.toggleClass}`);if(!ot)return;const dt=$e.classList.contains(Ge.stateClass),Mt=dt?Ge.labelOn():Ge.labelOff(),Ft=Ll(dt?Ge.iconOn:Ge.iconOff,"sm");ot.innerHTML!==Ft&&(ot.innerHTML=Ft),ot.setAttribute("aria-label",Mt),ot.setAttribute("aria-pressed",String(dt)),ot.title=Mt}function Dn($e){kn($e,kt),kn($e,qt),Jt($e)}function xn($e,Ge,ot){const dt=$e.querySelector(`button.${ot.toggleClass}`);if(dt)return kn($e,ot),dt;if(!Ge)return null;const Mt=document.createElement("button");Mt.type="button",Mt.className=`${Ge.anchor.className} ${ot.toggleClass}`,Mt.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),$e.classList.toggle(ot.stateClass),Dn($e)});const Ft=ot===kt?$e.querySelector(`button.${bm}`)??Ge.anchor:Ge.anchor;return Ge.row.insertBefore(Mt,Ft),kn($e,ot),Mt}function $n($e){const Ge=$e.querySelector(`.code-block-header .code-action-btn:not([disabled]):not(.${bm}):not(.${IS})`),ot=Ge?.parentElement;return Ge&&ot?{row:ot,anchor:Ge}:null}function Hn(){if(!(!r.value||a.streaming))for(const $e of r.value.querySelectorAll(".code-block-container")){const Ge=$n($e);$e.querySelector("diffs-container")&&xn($e,Ge,kt),xn($e,Ge,qt),Jt($e)}}function bn(){oe(),yt().then(()=>{z(),F(),Oe(),Hn()})}Ke(()=>a.text,bn),Ke(()=>a.streaming,bn),Ke(i,()=>{if(r.value)for(const $e of r.value.querySelectorAll(".code-block-container"))kn($e,kt),kn($e,qt)});let Wn=null,Pn=null;In(()=>{bn(),r.value&&(Wn=new MutationObserver(bn),Wn.observe(r.value,{childList:!0,subtree:!0}),typeof ResizeObserver<"u"&&(Pn=new ResizeObserver(Fe),Pn.observe(r.value))),window.addEventListener("scroll",ie,{capture:!0}),window.addEventListener("resize",ie),document.addEventListener("pointerdown",ye,{capture:!0}),document.addEventListener("keydown",he,{capture:!0})}),En(()=>{Wn?.disconnect(),Pn?.disconnect(),window.removeEventListener("scroll",ie,{capture:!0}),window.removeEventListener("resize",ie),document.removeEventListener("pointerdown",ye,{capture:!0}),document.removeEventListener("keydown",he,{capture:!0}),oe(),q.value?.remove(),q.value=null});const Mn={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},Nn=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,An=B(()=>{const $e=P(d.value),Ge=[];let ot=0;Nn.lastIndex=0;let dt;for(;(dt=Nn.exec($e))!==null;){const Ft=dt[1]??"",Ut=$e.slice(ot,dt.index)+(Ft||"");Ut.trim()&&Ge.push({kind:"md",text:Ut}),Ge.push({kind:"diff",code:dt[2]??""}),ot=Nn.lastIndex}const Mt=$e.slice(ot);return(Mt.trim()||Ge.length===0)&&Ge.push({kind:"md",text:Mt}),Ge});function Qn($e){return $e.split(` +`).map(Ge=>Ge.startsWith("@@")?{type:"hunk",sign:"",text:Ge}:/^\+(?!\+\+)/.test(Ge)?{type:"add",sign:"+",text:Ge.slice(1)}:/^-(?!--)/.test(Ge)?{type:"del",sign:"-",text:Ge.slice(1)}:Ge.startsWith(" ")?{type:"ctx",sign:"",text:Ge.slice(1)}:{type:"ctx",sign:"",text:Ge})}const Fn=ds(new Set),Qt=ds(new Set),uo=B(()=>{const $e=new Map;return An.value.map(Ge=>{if(Ge.kind!=="diff")return"";const ot=($e.get(Ge.code)??0)+1;return $e.set(Ge.code,ot),`${ot}#${Ge.code}`})});Ke(uo,$e=>{const Ge=new Set($e);for(const ot of[Fn,Qt]){const dt=Array.from(ot).filter(Mt=>!Ge.has(Mt));for(const Mt of dt)ot.delete(Mt)}});function Zn($e,Ge){const ot=uo.value[Ge];ot===void 0||ot===""||($e.has(ot)?$e.delete(ot):$e.add(ot))}function Bo($e){const Ge=uo.value[$e];return Ge!==void 0&&Ge!==""&&Fn.has(Ge)}function Un($e){const Ge=uo.value[$e];return Ge!==void 0&&Ge!==""&&Qt.has(Ge)}function hs($e){Zn(Fn,$e)}function Io($e){Zn(Qt,$e)}function Rt(){for(const $e of r.value?.querySelectorAll(".diff-wrap .diff-pre")??[]){if(!$e.closest(".diff-wrap")?.classList.contains(_m)){$e.style.removeProperty("--md-nums-gutter");continue}const Ge=$e.querySelectorAll(".diff-line:not(.diff-hunk)").length;$e.style.setProperty("--md-nums-gutter",pt(Ge))}}Ke([()=>Qt.size,An],()=>{yt(Rt)});const Jo=V(null);function Ls($e,Ge){fs($e).then(ot=>{ot&&(Jo.value=Ge,setTimeout(()=>{Jo.value=null},1400))})}return($e,Ge)=>(g(),S("div",{ref_key:"mdRef",ref:r,class:"md"},[u.value.frontmatter!==null?(g(),S("pre",r5e,E(u.value.frontmatter),1)):Y("",!0),(g(!0),S(Ce,null,rt(An.value,(ot,dt)=>(g(),S(Ce,{key:dt},[ot.kind==="md"?(g(),ue(v(Xi),{key:0,content:ot.text,"custom-markdown-it":o,mode:"chat","code-renderer":p.value.codeRenderer,"is-dark":v(h),"code-block-light-theme":$S,"code-block-dark-theme":NS,themes:[$S,NS],"code-block-props":Mn,final:c.value,"smooth-streaming":e.streaming,"batch-rendering":m.value,"defer-nodes-until-visible":!1,onCopy:v(fH)},null,8,["content","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(g(),S("div",{key:1,class:Be(["diff-wrap",{"md-code-wrap":Bo(dt),"md-code-nums":Un(dt)}])},[b("div",a5e,[Ge[0]||(Ge[0]=b("span",{class:"diff-lang"},"diff",-1)),W(Cn,{text:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers")},{default:ae(()=>[W(Dt,{size:"sm",label:Un(dt)?v(s)("conversation.hideLineNumbers"):v(s)("conversation.showLineNumbers"),"aria-pressed":Un(dt),onClick:Mt=>Io(dt)},{default:ae(()=>[W(Ee,{name:"list-numbers",size:"sm"})]),_:1},8,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode")},{default:ae(()=>[W(Dt,{size:"sm",label:Bo(dt)?v(s)("conversation.unwrapCode"):v(s)("conversation.wrapCode"),"aria-pressed":Bo(dt),onClick:Mt=>hs(dt)},{default:ae(()=>[W(Ee,{name:Bo(dt)?"text-wrap-disabled":"text-wrap",size:"sm"},null,8,["name"])]),_:2},1032,["label","aria-pressed","onClick"])]),_:2},1032,["text"]),W(Cn,{text:v(s)("filePreview.copyCode")},{default:ae(()=>[b("button",{class:"diff-copy","aria-label":v(s)("filePreview.copyCode"),onClick:Mt=>Ls(ot.code,dt)},[W(Ee,{name:Jo.value===dt?"check":"copy",size:"sm"},null,8,["name"])],8,c5e)]),_:2},1032,["text"])]),b("pre",u5e,[b("code",null,[(g(!0),S(Ce,null,rt(Qn(ot.code),(Mt,Ft)=>(g(),S("span",{key:Ft,class:Be(["diff-line",`diff-${Mt.type}`])},[Mt.type!=="hunk"?(g(),S("span",d5e,E(Mt.sign),1)):Y("",!0),b("span",f5e,E(Mt.text),1)],2))),128))])])],2))],64))),128))],512))}}),Br=vt(v5e,[["__scopeId","data-v-1b44ea19"]]),y5e=Object.freeze(Object.defineProperty({__proto__:null,default:Br},Symbol.toStringTag,{value:"Module"})),w5e={class:"activity-notice",role:"status"},k5e={"aria-hidden":"true"},b5e={class:"an-label"},_5e=Je({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",w5e,[b("span",k5e,[W(Zo,{size:"sm"})]),b("span",b5e,E(e.label),1)]))}}),x5e=vt(_5e,[["__scopeId","data-v-5e7a6420"]]);function S5e(e,t="Yesterday"){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=u=>String(u).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,l=n.getFullYear()===o.getFullYear(),r=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(l&&r&&a)return i;const c=new Date(o);return c.setDate(o.getDate()-1),n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()?`${t} ${i}`:l?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const C5e=Je({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=$t(),o=V(!1),s=B(()=>{const r=new Date(t.time);if(Number.isNaN(r.getTime()))return t.time;const a=c=>String(c).padStart(2,"0");return`${r.getFullYear()}-${a(r.getMonth()+1)}-${a(r.getDate())} ${a(r.getHours())}:${a(r.getMinutes())}`}),i=B(()=>o.value?s.value:S5e(t.time,n("conversation.yesterday")));function l(){o.value=!o.value}return(r,a)=>(g(),S("button",{type:"button",class:"msg-time",onClick:xt(l,["stop"])},E(i.value),1))}}),Vv=vt(C5e,[["__scopeId","data-v-6761370d"]]);function M5e(e){return e.length===1?`0${e}`:e}function A5e(e,t){return`${String(Number(e))}:${M5e(t)}`}const zS=e=>/^\d+$/.test(e);function T5e(e,t){const n=e.trim().split(/\s+/);if(n.length!==5)return e;const[o,s,i,l,r]=n,a=i==="*"&&l==="*"&&r==="*",c=i==="*"&&l==="*";if(o==="*"&&s==="*"&&a)return t("conversation.cron.everyMinute");const u=/^\*\/(\d+)$/.exec(o);if(u&&s==="*"&&a)return u[1]==="1"?t("conversation.cron.everyMinute"):t("conversation.cron.everyNMinutes",{n:u[1]});if(o==="0"&&s==="*"&&a)return t("conversation.cron.everyHour");const d=/^\*\/(\d+)$/.exec(s);if(o==="0"&&d&&a)return t("conversation.cron.everyNHours",{n:d[1]});if(zS(o)&&zS(s)&&c){const f=A5e(s,o);if(r==="1-5")return t("conversation.cron.weekdaysAt",{time:f});if(r==="*")return t("conversation.cron.dailyAt",{time:f})}return e}const E5e=["data-turn-id"],I5e={class:"cn-bubble"},L5e={class:"cn-title"},$5e={key:0,class:"cn-prompt"},N5e={class:"cn-meta"},z5e={key:0,class:"cn-meta-item"},B5e={key:1,class:"cn-meta-item"},R5e=["aria-label"],P5e=["title"],F5e=Je({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=$t(),o=B(()=>t.cron),s=B(()=>o.value?.missedCount!==void 0),i=B(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),l=B(()=>{const u=o.value?.cron;return u?T5e(u,n):""}),r=B(()=>s.value?"error":"ok"),a=B(()=>{const u=o.value;if(!u)return"";const d=[];return u.recurring===!1&&d.push(n("conversation.cron.oneShot")),typeof u.coalescedCount=="number"&&u.coalescedCount>1&&d.push(n("conversation.cron.coalesced",{n:u.coalescedCount})),u.missedCount!==void 0&&d.push(n("conversation.cron.missedCount",{n:u.missedCount})),u.stale===!0&&d.push(n("conversation.cron.finalDelivery")),d.join(" · ")}),c=B(()=>t.text??"");return(u,d)=>(g(),S("div",{class:Be(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[b("div",I5e,[b("span",L5e,E(i.value),1),c.value?(g(),S("span",$5e,E(c.value),1)):Y("",!0)]),b("div",N5e,[W(Ee,{name:"clock",size:"sm",class:"cn-meta-ico","aria-hidden":"true"}),l.value?(g(),S("span",z5e,E(l.value),1)):Y("",!0),a.value?(g(),S("span",B5e,E(a.value),1)):Y("",!0),b("span",{class:Be(["cn-status",r.value]),"aria-label":r.value},[r.value==="ok"?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):(g(),ue(Ee,{key:1,name:"close",size:"sm"}))],10,R5e),o.value?.jobId?(g(),S("span",{key:2,class:"cn-meta-item cn-id",title:v(n)("conversation.cron.job",{id:o.value.jobId})},E(o.value.jobId),9,P5e)):Y("",!0),e.createdAt?(g(),ue(Vv,{key:3,time:e.createdAt},null,8,["time"])):Y("",!0)])],10,E5e))}}),j5e=vt(F5e,[["__scopeId","data-v-d3807b0f"]]),$$="pythinkerWeb.taskNotification",O5e=/]*)>([\s\S]*?)<\/notification>/g,H5e=/([\w-]+)="([^"]*)"/g,D5e=/]*)>[\s\S]*?<\/output-file>/,V5e=/]*)>([\s\S]*?)<\/output-preview>/,W5e=/^Title: (.*)$/m,q5e=/^Severity: (.*)$/m;function I4(e){return e.replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function xm(e){const t={};for(const n of e.matchAll(H5e))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=I4(n[2]));return t}function Sm(e){if(e===void 0)return;const t=Number(e);return Number.isFinite(t)?t:void 0}function U5e(e,t,n){const o=xm(e),s=W5e.exec(t)?.[1]?.trim()??"",i=q5e.exec(t)?.[1]?.trim()??"";let l=t.split(` `).filter(k=>!k.startsWith("Title: ")&&!k.startsWith("Severity: ")).join(` -`);const r=l.search(/^<\w/m);r!==-1&&(l=l.slice(0,r));const a=H5e.exec(t),c=a?xm(a[1]??""):void 0,u=c?.path?{path:c.path,bytes:Sm(c.bytes)}:void 0,d=D5e.exec(t),f=d?xm(d[1]??""):void 0,p=(d?.[2]??"").replace(/^\n/,""),h=p.indexOf(` -`),m=d?{text:I4(h===-1?"":p.slice(h+1)).replace(/\n$/,""),bytes:Sm(f?.bytes),totalBytes:Sm(f?.total_bytes),truncated:f?.truncated==="true"?!0:f?.truncated==="false"?!1:void 0}:void 0;return{id:o.id??"",category:o.category??"",type:o.type??"",sourceKind:o.source_kind??"",sourceId:o.source_id??"",agentId:o.agent_id,title:I4(s),severity:i,body:I4(l.trim()),outputFile:u,outputPreview:m,raw:n}}function $$(e){if(!e.includes("{h=null,p.value=null},1200))}return En(()=>{h!==null&&clearTimeout(h)}),(k,x)=>(g(),S("div",K5e,[(g(!0),S(Ce,null,rt(t.items,(y,w)=>(g(),S("div",{key:s(y,w),class:Be(["ntn",v(Z5e)(y)]),role:"status"},[b("div",G5e,[W(Ee,{name:i(y),size:"sm",class:"ntn-ico","aria-hidden":"true"},null,8,["name"]),b("span",Y5e,I(c(y)),1)]),b("div",X5e,[y.title?(g(),S("div",J5e,I(y.title),1)):Y("",!0),y.body?(g(),S("div",Q5e,I(y.body),1)):Y("",!0),y.outputFile?(g(),S("div",epe,[W(Ee,{class:"ntn-out-ic",name:"file-text",size:"sm","aria-hidden":"true"}),b("span",{class:"ntn-out-path",title:y.outputFile.path},I(y.outputFile.path),9,tpe),y.outputFile.bytes!==void 0?(g(),S("span",npe,I(u(y.outputFile.bytes)),1)):Y("",!0),W(Nt,{"data-testid":"notification-copy-path",variant:"secondary",size:"sm",type:"button",onClick:_=>m(y.outputFile.path,s(y,w))},{default:ae(()=>[W(Ee,{name:"copy",size:"sm","aria-hidden":"true"}),He(" "+I(p.value===s(y,w)?v(n)("conversation.notification.copied"):v(n)("conversation.notification.copyPath")),1)]),_:2},1032,["onClick"])])):Y("",!0),f(y)?(g(),S("div",ope,[d(y)?(g(),S("div",spe,I(d(y)),1)):Y("",!0),y.outputPreview?.text?(g(),S("pre",ipe,I(y.outputPreview.text),1)):Y("",!0)])):Y("",!0),b("details",lpe,[b("summary",null,[W(Ee,{class:"ntn-raw-car",name:"chevron-right",size:"sm","aria-hidden":"true"}),b("span",null,I(v(n)("conversation.notification.rawPayload")),1)]),b("div",rpe,[b("div",ape,[b("span",cpe,I(v(n)("conversation.notification.fields.type")),1),b("span",upe,I(y.type),1),b("span",dpe,I(v(n)("conversation.notification.fields.source")),1),b("span",fpe,I(y.sourceKind)+" · "+I(y.sourceId),1),b("span",ppe,I(v(n)("conversation.notification.fields.severity")),1),b("span",hpe,I(y.severity||"—"),1)]),b("pre",mpe,I(y.raw),1)])])]),b("div",gpe,[y.createdAt?(g(),ue(Dv,{key:0,time:y.createdAt},null,8,["time"])):Y("",!0)])],2))),128))]))}}),N$=vt(vpe,[["__scopeId","data-v-6e055dc6"]]),zS=dn.clientId,ype="pythinker-code-web",wpe="web";function z$(){return{serverHttpUrl:bpe(),clientId:xpe(),clientName:ype,clientVersion:Spe(),clientUiMode:wpe}}function kpe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function bpe(e){const t=kpe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Yc(e,t,n="v1"){return`${e}/api/${n}${t.startsWith("/")?t:`/${t}`}`}function _pe(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}function xpe(){const e=ls(zS);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Es(zS,t),t}function Spe(){return"0.1.2".trim()?"0.1.2":"0.0.0-dev"}const B$="pythinkerWeb.compaction";class R$ extends Error{constructor(t){super("The subagent model policy changed on the server; reloaded the saved policy."),this.current=t,this.name="SubagentModelPolicyConflictError"}}function Cpe(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}function Mpe(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}const Ape={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function Tpe(e,t){switch(t.op){case"reset":return Epe(e,t);case"turn.upsert":return Lpe(e,t.turn);case"step.upsert":return Npe(e,t.turnId,t.step);case"frame.upsert":return Bpe(e,t);case"append":return Ppe(e,t);case"marker.upsert":return RS(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return RS(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return Ope(e,t.task);case"interaction.upsert":return Hpe(e,t.interaction);case"attachment.upsert":return Vpe(e,t.attachment);case"todo.upsert":return qpe(e,t.todo);case"prompt.upsert":return Zpe(e,t.prompt);case"meta.merge":return Ype(e,t.meta);case"items.remove":return jpe(e,t.ids)}}function Epe(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function BS(e,t){return{...e,kind:"turn",steps:[...t]}}function P$(e){return{kind:"turn",turnId:e,ordinal:Cpe(e),state:"running",origin:{kind:"other"},steps:[]}}function Ipe(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Tu(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function Vv(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function Gp(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function Lpe(e,t){const n=Tu(e,t.turnId);return n?$pe(n,t)?{state:e,changed:!1}:{state:{...e,items:Gp(e.items,t.turnId,o=>BS(t,o.steps))},changed:!0}:{state:{...e,items:Vv(e.items,BS(t,[]))},changed:!0}}function $pe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&("taskId"in e.origin?e.origin.taskId:void 0)===("taskId"in t.origin?t.origin.taskId:void 0)&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function Npe(e,t,n){const o=Tu(e,t)??P$(t),s=o.steps.findIndex(c=>c.stepId===n.stepId);let i,l=!0;if(s>=0){const c=o.steps[s];c&&zpe(c,n)?(l=!1,i=o.steps):i=o.steps.map(u=>u.stepId===n.stepId?{...n,kind:"step",frames:u.frames}:u)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((c,u)=>c.ordinal-u.ordinal);if(!l)return{state:e,changed:!1};const r={...o,steps:[...i]},a=Tu(e,t)?Gp(e.items,t,()=>r):Vv(e.items,r);return{state:{...e,items:a},changed:!0}}function zpe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function Bpe(e,t){const n=Tu(e,t.turnId)??P$(t.turnId),o=n.steps.find(u=>u.stepId===t.stepId)??Ipe(t.stepId,t.turnId),s=o.frames.findIndex(u=>u.frameId===t.frame.frameId);let i;if(s>=0){const u=o.frames[s];if(u!==void 0&&Rpe(u,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const l={...o,frames:[...i]},r=n.steps.some(u=>u.stepId===t.stepId)?n.steps.map(u=>u.stepId===t.stepId?l:u):[...n.steps,l].toSorted((u,d)=>u.ordinal-d.ordinal),a={...n,steps:r},c=Tu(e,t.turnId)?Gp(e.items,t.turnId,()=>a):Vv(e.items,a);return{state:{...e,items:c},changed:!0}}function Rpe(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail&&e.source===t.source:!1}function Ppe(e,t){if(t.target.type==="task")return Fpe(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Tu(e,n),l=i?.steps.find(f=>f.stepId===o),r=l?.frames.find(f=>f.frameId===s);if(!i||!l||!r||r.kind!=="text"&&r.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=F$(r.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const c={...r,text:a.text},u={...l,frames:l.frames.map(f=>f.frameId===s?c:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?u:f)};return{state:{...e,items:Gp(e.items,n,()=>d)},changed:!0}}function Fpe(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=F$(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const l=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},r=new Map(e.tasks);return r.set(n,l),{state:{...e,tasks:r},changed:!0}}function F$(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function RS(e,t,n,o){if(e.items.some(i=>S7(i)===n)){let i=!1;const l=e.items.map(r=>S7(r)!==n||r===t?r:(i=!0,t));return i?{state:{...e,items:l},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let l=i.length;for(let r=0;r=o){l=r;break}}return i.splice(l,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function S7(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function jpe(e,t){const n=new Set(t),o=e.items.filter(r=>r.kind==="turn"&&n.has(r.turnId)),s=e.items.filter(r=>!n.has(S7(r)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,l=e.interactions;if(o.length>0){const r=new Set,a=new Set(i),c=new Set;for(const u of o)for(const d of u.steps)for(const f of d.frames)f.kind==="tool"&&r.add(f.toolCallId);for(const u of l.values())u.toolCallId!==void 0&&r.has(u.toolCallId)&&(c.add(u.interactionId),a.delete(u.interactionId));if(c.size>0){const u=new Map(l);for(const d of c)u.delete(d);l=u}i=a}return{state:{...e,items:s,interactions:l,pendingInteractions:i},changed:!0}}function Ope(e,t){const n=e.tasks.get(t.taskId);if(n&&Gpe(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function Hpe(e,t){const n=e.interactions.get(t.interactionId);if(n&&Dpe(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function Dpe(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function Vpe(e,t){const n=e.attachments.get(t.attachmentId);if(n&&Wpe(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function Wpe(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function qpe(e,t){const n=e.todos.get(t.todoId);if(n&&Upe(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function Upe(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function Zpe(e,t){const n=e.prompts.get(t.promptId);if(n&&Kpe(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function Kpe(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function Gpe(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function Ype(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,dynamic_workflow:t.modes.dynamic_workflow===null?void 0:t.modes.dynamic_workflow??e.meta.modes?.dynamic_workflow,tower:t.modes.tower===null?void 0:t.modes.tower??e.meta.modes?.tower}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal===null?void 0:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.dynamic_workflow===void 0&&n.tower===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class Xpe{constructor(t){this.agentId=t}#e=Ape;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const l=Tpe(s,i);if(l.gap){o={target:i.target,...l.gap};continue}l.changed&&(s=l.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const l of this.#t)l(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,l)=>l.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,l=[];let r=0;for(const a of n)if(a.kind==="turn"){if(r+=1,r<=i)continue;l.push(a)}else r>i&&l.push(a);n=l,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}var PS;function wt(e,t,n){function o(r,a){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:a,constr:l,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,a);const c=l.prototype,u=Object.keys(c);for(let d=0;dn?.Parent&&r instanceof n.Parent?!0:r?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class mu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class j$ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(PS=globalThis).__zod_globalConfig??(PS.__zod_globalConfig={});const Wv=globalThis.__zod_globalConfig;function xa(e){return Wv}function O$(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function C7(e,t){return typeof t=="bigint"?t.toString():t}function Yp(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function qv(e){return e==null}function Uv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Jpe(e,t){const n=e/t,o=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o){};function of(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const e6e=Yp(()=>{if(Wv.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Eu(e){if(of(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(of(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function D$(e){return Eu(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const t6e=new Set(["string","number","symbol"]);function Iu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L1(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function hn(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function n6e(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const o6e={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function s6e(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=I1(e._zod.def,{get shape(){const l={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(l[r]=n.shape[r])}return G0(this,"shape",l),l},checks:[]});return L1(e,i)}function i6e(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=I1(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&delete l[r]}return G0(this,"shape",l),l},checks:[]});return L1(e,i)}function l6e(e,t){if(!Eu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=I1(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return G0(this,"shape",i),i}});return L1(e,s)}function r6e(e,t){if(!Eu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=I1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return G0(this,"shape",o),o}});return L1(e,n)}function a6e(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=I1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return G0(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return L1(e,n)}function c6e(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=I1(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const c in n){if(!(c in r))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(a[c]=e?new e({type:"optional",innerType:r[c]}):r[c])}else for(const c in r)a[c]=e?new e({type:"optional",innerType:r[c]}):r[c];return G0(this,"shape",a),a},checks:[]});return L1(t,l)}function u6e(e,t,n){const o=I1(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)i[l]=new e({type:"nonoptional",innerType:s[l]});return G0(this,"shape",i),i}});return L1(t,o)}function Xc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function K3(e){return typeof e=="string"?e:e?.message}function Sa(e,t,n){const o=e.message?e.message:K3(e.inst?._zod.def?.error?.(e))??K3(t?.error?.(e))??K3(n.customError?.(e))??K3(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:l,...r}=e;return r.path??(r.path=[]),r.message=o,t?.reportInput&&(r.input=l),r}function Zv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function sf(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const V$=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,C7,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},W$=wt("$ZodError",V$),q$=wt("$ZodError",V$,{Parent:Error});function f6e(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function p6e(e,t=n=>n.message){const n={_errors:[]},o=(s,i=[])=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(r=>o({issues:r},[...i,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...i,...l.path]);else{const r=[...i,...l.path];if(r.length===0)n._errors.push(t(l));else{let a=n,c=0;for(;c(t,n,o,s)=>{const i=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new mu;if(l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Sa(a,i,xa())));throw H$(r,s?.callee),r}return l.value},Gv=e=>async(t,n,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Sa(a,i,xa())));throw H$(r,s?.callee),r}return l.value},Xp=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new mu;return i.issues.length?{success:!1,error:new(e??W$)(i.issues.map(l=>Sa(l,s,xa())))}:{success:!0,data:i.value}},h6e=Xp(q$),Jp=e=>async(t,n,o)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Sa(l,s,xa())))}:{success:!0,data:i.value}},m6e=Jp(q$),g6e=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Kv(e)(t,n,s)},v6e=e=>(t,n,o)=>Kv(e)(t,n,o),y6e=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Gv(e)(t,n,s)},w6e=e=>async(t,n,o)=>Gv(e)(t,n,o),k6e=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Xp(e)(t,n,s)},b6e=e=>(t,n,o)=>Xp(e)(t,n,o),_6e=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Jp(e)(t,n,s)},x6e=e=>async(t,n,o)=>Jp(e)(t,n,o),S6e=/^[cC][0-9a-z]{6,}$/,C6e=/^[0-9a-z]+$/,M6e=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,A6e=/^[0-9a-vA-V]{20}$/,T6e=/^[A-Za-z0-9]{27}$/,E6e=/^[a-zA-Z0-9_-]{21}$/,I6e=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,L6e=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,OS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,$6e=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,N6e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function z6e(){return new RegExp(N6e,"u")}const B6e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,R6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,P6e=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,F6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,j6e=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,U$=/^[A-Za-z0-9_-]*$/,O6e=/^https?$/,H6e=/^\+[1-9]\d{6,14}$/,Z$="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",D6e=new RegExp(`^${Z$}$`);function K$(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function V6e(e){return new RegExp(`^${K$(e)}$`)}function W6e(e){const t=K$({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Z$}T(?:${o})$`)}const q6e=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},U6e=/^-?\d+$/,G$=/^-?\d+(?:\.\d+)?$/,Z6e=/^(?:true|false)$/i,K6e=/^[^A-Z]*$/,G6e=/^[^a-z]*$/,Ji=wt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Y$={number:"number",bigint:"bigint",object:"date"},X$=wt("$ZodCheckLessThan",(e,t)=>{Ji.init(e,t);const n=Y$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Ji.init(e,t);const n=Y$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Y6e=wt("$ZodCheckMultipleOf",(e,t)=>{Ji.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Jpe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),X6e=wt("$ZodCheckNumberFormat",(e,t)=>{Ji.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=o6e[t.format];e._zod.onattach.push(l=>{const r=l._zod.bag;r.format=t.format,r.minimum=s,r.maximum=i,n&&(r.pattern=U6e)}),e._zod.check=l=>{const r=l.value;if(n){if(!Number.isInteger(r)){l.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:r,inst:e});return}if(!Number.isSafeInteger(r)){r>0?l.issues.push({input:r,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):l.issues.push({input:r,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}ri&&l.issues.push({origin:"number",input:r,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),J6e=wt("$ZodCheckMaxLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!qv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const l=Zv(s);o.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Q6e=wt("$ZodCheckMinLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!qv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const l=Zv(s);o.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ehe=wt("$ZodCheckLengthEquals",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!qv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const l=Zv(s),r=i>t.length;o.issues.push({origin:l,...r?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Qp=wt("$ZodCheckStringFormat",(e,t)=>{var n,o;Ji.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),the=wt("$ZodCheckRegex",(e,t)=>{Qp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),nhe=wt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=K6e),Qp.init(e,t)}),ohe=wt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=G6e),Qp.init(e,t)}),she=wt("$ZodCheckIncludes",(e,t)=>{Ji.init(e,t);const n=Iu(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),ihe=wt("$ZodCheckStartsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`^${Iu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),lhe=wt("$ZodCheckEndsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`.*${Iu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),rhe=wt("$ZodCheckOverwrite",(e,t)=>{Ji.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class ahe{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` +`);const r=l.search(/^<\w/m);r!==-1&&(l=l.slice(0,r));const a=D5e.exec(t),c=a?xm(a[1]??""):void 0,u=c?.path?{path:c.path,bytes:Sm(c.bytes)}:void 0,d=V5e.exec(t),f=d?xm(d[1]??""):void 0,p=(d?.[2]??"").replace(/^\n/,""),h=p.indexOf(` +`),m=d?{text:I4(h===-1?"":p.slice(h+1)).replace(/\n$/,""),bytes:Sm(f?.bytes),totalBytes:Sm(f?.total_bytes),truncated:f?.truncated==="true"?!0:f?.truncated==="false"?!1:void 0}:void 0;return{id:o.id??"",category:o.category??"",type:o.type??"",sourceKind:o.source_kind??"",sourceId:o.source_id??"",agentId:o.agent_id,title:I4(s),severity:i,body:I4(l.trim()),outputFile:u,outputPreview:m,raw:n}}function N$(e){if(!e.includes("{h=null,p.value=null},1200))}return En(()=>{h!==null&&clearTimeout(h)}),(k,x)=>(g(),S("div",G5e,[(g(!0),S(Ce,null,rt(t.items,(y,w)=>(g(),S("div",{key:s(y,w),class:Be(["ntn",v(K5e)(y)]),role:"status"},[b("div",Y5e,[W(Ee,{name:i(y),size:"sm",class:"ntn-ico","aria-hidden":"true"},null,8,["name"]),b("span",X5e,E(c(y)),1)]),b("div",J5e,[y.title?(g(),S("div",Q5e,E(y.title),1)):Y("",!0),y.body?(g(),S("div",epe,E(y.body),1)):Y("",!0),y.outputFile?(g(),S("div",tpe,[W(Ee,{class:"ntn-out-ic",name:"file-text",size:"sm","aria-hidden":"true"}),b("span",{class:"ntn-out-path",title:y.outputFile.path},E(y.outputFile.path),9,npe),y.outputFile.bytes!==void 0?(g(),S("span",ope,E(u(y.outputFile.bytes)),1)):Y("",!0),W(Nt,{"data-testid":"notification-copy-path",variant:"secondary",size:"sm",type:"button",onClick:_=>m(y.outputFile.path,s(y,w))},{default:ae(()=>[W(Ee,{name:"copy",size:"sm","aria-hidden":"true"}),He(" "+E(p.value===s(y,w)?v(n)("conversation.notification.copied"):v(n)("conversation.notification.copyPath")),1)]),_:2},1032,["onClick"])])):Y("",!0),f(y)?(g(),S("div",spe,[d(y)?(g(),S("div",ipe,E(d(y)),1)):Y("",!0),y.outputPreview?.text?(g(),S("pre",lpe,E(y.outputPreview.text),1)):Y("",!0)])):Y("",!0),b("details",rpe,[b("summary",null,[W(Ee,{class:"ntn-raw-car",name:"chevron-right",size:"sm","aria-hidden":"true"}),b("span",null,E(v(n)("conversation.notification.rawPayload")),1)]),b("div",ape,[b("div",cpe,[b("span",upe,E(v(n)("conversation.notification.fields.type")),1),b("span",dpe,E(y.type),1),b("span",fpe,E(v(n)("conversation.notification.fields.source")),1),b("span",ppe,E(y.sourceKind)+" · "+E(y.sourceId),1),b("span",hpe,E(v(n)("conversation.notification.fields.severity")),1),b("span",mpe,E(y.severity||"—"),1)]),b("pre",gpe,E(y.raw),1)])])]),b("div",vpe,[y.createdAt?(g(),ue(Vv,{key:0,time:y.createdAt},null,8,["time"])):Y("",!0)])],2))),128))]))}}),z$=vt(ype,[["__scopeId","data-v-6e055dc6"]]),BS=dn.clientId,wpe="pythinker-code-web",kpe="web";function B$(){return{serverHttpUrl:_pe(),clientId:Spe(),clientName:wpe,clientVersion:Cpe(),clientUiMode:kpe}}function bpe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function _pe(e){const t=bpe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Yc(e,t,n="v1"){return`${e}/api/${n}${t.startsWith("/")?t:`/${t}`}`}function xpe(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}function Spe(){const e=ls(BS);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Es(BS,t),t}function Cpe(){return"0.1.2".trim()?"0.1.2":"0.0.0-dev"}const R$="pythinkerWeb.compaction";class P$ extends Error{constructor(t){super("The subagent model policy changed on the server; reloaded the saved policy."),this.current=t,this.name="SubagentModelPolicyConflictError"}}function Mpe(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}function Ape(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}const Tpe={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function Epe(e,t){switch(t.op){case"reset":return Ipe(e,t);case"turn.upsert":return $pe(e,t.turn);case"step.upsert":return zpe(e,t.turnId,t.step);case"frame.upsert":return Rpe(e,t);case"append":return Fpe(e,t);case"marker.upsert":return PS(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return PS(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return Hpe(e,t.task);case"interaction.upsert":return Dpe(e,t.interaction);case"attachment.upsert":return Wpe(e,t.attachment);case"todo.upsert":return Upe(e,t.todo);case"prompt.upsert":return Kpe(e,t.prompt);case"meta.merge":return Xpe(e,t.meta);case"items.remove":return Ope(e,t.ids)}}function Ipe(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function RS(e,t){return{...e,kind:"turn",steps:[...t]}}function F$(e){return{kind:"turn",turnId:e,ordinal:Mpe(e),state:"running",origin:{kind:"other"},steps:[]}}function Lpe(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Tu(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function Wv(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function Gp(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function $pe(e,t){const n=Tu(e,t.turnId);return n?Npe(n,t)?{state:e,changed:!1}:{state:{...e,items:Gp(e.items,t.turnId,o=>RS(t,o.steps))},changed:!0}:{state:{...e,items:Wv(e.items,RS(t,[]))},changed:!0}}function Npe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&("taskId"in e.origin?e.origin.taskId:void 0)===("taskId"in t.origin?t.origin.taskId:void 0)&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function zpe(e,t,n){const o=Tu(e,t)??F$(t),s=o.steps.findIndex(c=>c.stepId===n.stepId);let i,l=!0;if(s>=0){const c=o.steps[s];c&&Bpe(c,n)?(l=!1,i=o.steps):i=o.steps.map(u=>u.stepId===n.stepId?{...n,kind:"step",frames:u.frames}:u)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((c,u)=>c.ordinal-u.ordinal);if(!l)return{state:e,changed:!1};const r={...o,steps:[...i]},a=Tu(e,t)?Gp(e.items,t,()=>r):Wv(e.items,r);return{state:{...e,items:a},changed:!0}}function Bpe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function Rpe(e,t){const n=Tu(e,t.turnId)??F$(t.turnId),o=n.steps.find(u=>u.stepId===t.stepId)??Lpe(t.stepId,t.turnId),s=o.frames.findIndex(u=>u.frameId===t.frame.frameId);let i;if(s>=0){const u=o.frames[s];if(u!==void 0&&Ppe(u,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const l={...o,frames:[...i]},r=n.steps.some(u=>u.stepId===t.stepId)?n.steps.map(u=>u.stepId===t.stepId?l:u):[...n.steps,l].toSorted((u,d)=>u.ordinal-d.ordinal),a={...n,steps:r},c=Tu(e,t.turnId)?Gp(e.items,t.turnId,()=>a):Wv(e.items,a);return{state:{...e,items:c},changed:!0}}function Ppe(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail&&e.source===t.source:!1}function Fpe(e,t){if(t.target.type==="task")return jpe(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Tu(e,n),l=i?.steps.find(f=>f.stepId===o),r=l?.frames.find(f=>f.frameId===s);if(!i||!l||!r||r.kind!=="text"&&r.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=j$(r.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const c={...r,text:a.text},u={...l,frames:l.frames.map(f=>f.frameId===s?c:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?u:f)};return{state:{...e,items:Gp(e.items,n,()=>d)},changed:!0}}function jpe(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=j$(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const l=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},r=new Map(e.tasks);return r.set(n,l),{state:{...e,tasks:r},changed:!0}}function j$(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function PS(e,t,n,o){if(e.items.some(i=>C7(i)===n)){let i=!1;const l=e.items.map(r=>C7(r)!==n||r===t?r:(i=!0,t));return i?{state:{...e,items:l},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let l=i.length;for(let r=0;r=o){l=r;break}}return i.splice(l,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function C7(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function Ope(e,t){const n=new Set(t),o=e.items.filter(r=>r.kind==="turn"&&n.has(r.turnId)),s=e.items.filter(r=>!n.has(C7(r)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,l=e.interactions;if(o.length>0){const r=new Set,a=new Set(i),c=new Set;for(const u of o)for(const d of u.steps)for(const f of d.frames)f.kind==="tool"&&r.add(f.toolCallId);for(const u of l.values())u.toolCallId!==void 0&&r.has(u.toolCallId)&&(c.add(u.interactionId),a.delete(u.interactionId));if(c.size>0){const u=new Map(l);for(const d of c)u.delete(d);l=u}i=a}return{state:{...e,items:s,interactions:l,pendingInteractions:i},changed:!0}}function Hpe(e,t){const n=e.tasks.get(t.taskId);if(n&&Ype(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function Dpe(e,t){const n=e.interactions.get(t.interactionId);if(n&&Vpe(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function Vpe(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function Wpe(e,t){const n=e.attachments.get(t.attachmentId);if(n&&qpe(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function qpe(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function Upe(e,t){const n=e.todos.get(t.todoId);if(n&&Zpe(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function Zpe(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function Kpe(e,t){const n=e.prompts.get(t.promptId);if(n&&Gpe(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function Gpe(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function Ype(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function Xpe(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,dynamic_workflow:t.modes.dynamic_workflow===null?void 0:t.modes.dynamic_workflow??e.meta.modes?.dynamic_workflow,tower:t.modes.tower===null?void 0:t.modes.tower??e.meta.modes?.tower}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal===null?void 0:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.dynamic_workflow===void 0&&n.tower===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class Jpe{constructor(t){this.agentId=t}#e=Tpe;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const l=Epe(s,i);if(l.gap){o={target:i.target,...l.gap};continue}l.changed&&(s=l.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const l of this.#t)l(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,l)=>l.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,l=[];let r=0;for(const a of n)if(a.kind==="turn"){if(r+=1,r<=i)continue;l.push(a)}else r>i&&l.push(a);n=l,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}var FS;function wt(e,t,n){function o(r,a){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:a,constr:l,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,a);const c=l.prototype,u=Object.keys(c);for(let d=0;dn?.Parent&&r instanceof n.Parent?!0:r?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class mu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class O$ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(FS=globalThis).__zod_globalConfig??(FS.__zod_globalConfig={});const qv=globalThis.__zod_globalConfig;function xa(e){return qv}function H$(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function M7(e,t){return typeof t=="bigint"?t.toString():t}function Yp(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Uv(e){return e==null}function Zv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Qpe(e,t){const n=e/t,o=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o){};function of(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const t6e=Yp(()=>{if(qv.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Eu(e){if(of(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(of(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function V$(e){return Eu(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const n6e=new Set(["string","number","symbol"]);function Iu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L1(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function hn(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function o6e(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const s6e={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function i6e(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=I1(e._zod.def,{get shape(){const l={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(l[r]=n.shape[r])}return G0(this,"shape",l),l},checks:[]});return L1(e,i)}function l6e(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=I1(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&delete l[r]}return G0(this,"shape",l),l},checks:[]});return L1(e,i)}function r6e(e,t){if(!Eu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=I1(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return G0(this,"shape",i),i}});return L1(e,s)}function a6e(e,t){if(!Eu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=I1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return G0(this,"shape",o),o}});return L1(e,n)}function c6e(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=I1(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return G0(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return L1(e,n)}function u6e(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=I1(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const c in n){if(!(c in r))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(a[c]=e?new e({type:"optional",innerType:r[c]}):r[c])}else for(const c in r)a[c]=e?new e({type:"optional",innerType:r[c]}):r[c];return G0(this,"shape",a),a},checks:[]});return L1(t,l)}function d6e(e,t,n){const o=I1(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)i[l]=new e({type:"nonoptional",innerType:s[l]});return G0(this,"shape",i),i}});return L1(t,o)}function Xc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function K3(e){return typeof e=="string"?e:e?.message}function Sa(e,t,n){const o=e.message?e.message:K3(e.inst?._zod.def?.error?.(e))??K3(t?.error?.(e))??K3(n.customError?.(e))??K3(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:l,...r}=e;return r.path??(r.path=[]),r.message=o,t?.reportInput&&(r.input=l),r}function Kv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function sf(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const W$=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,M7,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},q$=wt("$ZodError",W$),U$=wt("$ZodError",W$,{Parent:Error});function p6e(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function h6e(e,t=n=>n.message){const n={_errors:[]},o=(s,i=[])=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(r=>o({issues:r},[...i,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...i,...l.path]);else{const r=[...i,...l.path];if(r.length===0)n._errors.push(t(l));else{let a=n,c=0;for(;c(t,n,o,s)=>{const i=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new mu;if(l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Sa(a,i,xa())));throw D$(r,s?.callee),r}return l.value},Yv=e=>async(t,n,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const r=new(s?.Err??e)(l.issues.map(a=>Sa(a,i,xa())));throw D$(r,s?.callee),r}return l.value},Xp=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new mu;return i.issues.length?{success:!1,error:new(e??q$)(i.issues.map(l=>Sa(l,s,xa())))}:{success:!0,data:i.value}},m6e=Xp(U$),Jp=e=>async(t,n,o)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Sa(l,s,xa())))}:{success:!0,data:i.value}},g6e=Jp(U$),v6e=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Gv(e)(t,n,s)},y6e=e=>(t,n,o)=>Gv(e)(t,n,o),w6e=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Yv(e)(t,n,s)},k6e=e=>async(t,n,o)=>Yv(e)(t,n,o),b6e=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Xp(e)(t,n,s)},_6e=e=>(t,n,o)=>Xp(e)(t,n,o),x6e=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return Jp(e)(t,n,s)},S6e=e=>async(t,n,o)=>Jp(e)(t,n,o),C6e=/^[cC][0-9a-z]{6,}$/,M6e=/^[0-9a-z]+$/,A6e=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,T6e=/^[0-9a-vA-V]{20}$/,E6e=/^[A-Za-z0-9]{27}$/,I6e=/^[a-zA-Z0-9_-]{21}$/,L6e=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$6e=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,HS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,N6e=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,z6e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function B6e(){return new RegExp(z6e,"u")}const R6e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,P6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,F6e=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,j6e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O6e=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Z$=/^[A-Za-z0-9_-]*$/,H6e=/^https?$/,D6e=/^\+[1-9]\d{6,14}$/,K$="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",V6e=new RegExp(`^${K$}$`);function G$(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function W6e(e){return new RegExp(`^${G$(e)}$`)}function q6e(e){const t=G$({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${K$}T(?:${o})$`)}const U6e=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Z6e=/^-?\d+$/,Y$=/^-?\d+(?:\.\d+)?$/,K6e=/^(?:true|false)$/i,G6e=/^[^A-Z]*$/,Y6e=/^[^a-z]*$/,Ji=wt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),X$={number:"number",bigint:"bigint",object:"date"},J$=wt("$ZodCheckLessThan",(e,t)=>{Ji.init(e,t);const n=X$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Ji.init(e,t);const n=X$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),X6e=wt("$ZodCheckMultipleOf",(e,t)=>{Ji.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Qpe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),J6e=wt("$ZodCheckNumberFormat",(e,t)=>{Ji.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=s6e[t.format];e._zod.onattach.push(l=>{const r=l._zod.bag;r.format=t.format,r.minimum=s,r.maximum=i,n&&(r.pattern=Z6e)}),e._zod.check=l=>{const r=l.value;if(n){if(!Number.isInteger(r)){l.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:r,inst:e});return}if(!Number.isSafeInteger(r)){r>0?l.issues.push({input:r,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):l.issues.push({input:r,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}ri&&l.issues.push({origin:"number",input:r,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Q6e=wt("$ZodCheckMaxLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Uv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const l=Kv(s);o.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ehe=wt("$ZodCheckMinLength",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Uv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const l=Kv(s);o.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),the=wt("$ZodCheckLengthEquals",(e,t)=>{var n;Ji.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Uv(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const l=Kv(s),r=i>t.length;o.issues.push({origin:l,...r?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Qp=wt("$ZodCheckStringFormat",(e,t)=>{var n,o;Ji.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),nhe=wt("$ZodCheckRegex",(e,t)=>{Qp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ohe=wt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=G6e),Qp.init(e,t)}),she=wt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Y6e),Qp.init(e,t)}),ihe=wt("$ZodCheckIncludes",(e,t)=>{Ji.init(e,t);const n=Iu(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),lhe=wt("$ZodCheckStartsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`^${Iu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),rhe=wt("$ZodCheckEndsWith",(e,t)=>{Ji.init(e,t);const n=new RegExp(`.*${Iu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),ahe=wt("$ZodCheckOverwrite",(e,t)=>{Ji.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class che{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` `).filter(l=>l),s=Math.min(...o.map(l=>l.length-l.trimStart().length)),i=o.map(l=>l.slice(s)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(` -`))}}const che={major:4,minor:4,patch:3},Go=wt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=che;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,r,a)=>{let c=Xc(l),u;for(const d of r){if(d._zod.def.when){if(d6e(l)||!d._zod.def.when(l))continue}else if(c)continue;const f=l.issues.length,p=d._zod.check(l);if(p instanceof Promise&&a?.async===!1)throw new mu;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,l.issues.length!==f&&(c||(c=Xc(l,f)))});else{if(l.issues.length===f)continue;c||(c=Xc(l,f))}}return u?u.then(()=>l):l},i=(l,r,a)=>{if(Xc(l))return l.aborted=!0,l;const c=s(r,o,a);if(c instanceof Promise){if(a.async===!1)throw new mu;return c.then(u=>e._zod.parse(u,a))}return e._zod.parse(c,a)};e._zod.run=(l,r)=>{if(r.skipChecks)return e._zod.parse(l,r);if(r.direction==="backward"){const c=e._zod.parse({value:l.value,issues:[]},{...r,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,l,r)):i(c,l,r)}const a=e._zod.parse(l,r);if(a instanceof Promise){if(r.async===!1)throw new mu;return a.then(c=>s(c,o,r))}return s(a,o,r)}}_o(e,"~standard",()=>({validate:s=>{try{const i=h6e(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return m6e(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Yv=wt("$ZodString",(e,t)=>{Go.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??q6e(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ho=wt("$ZodStringFormat",(e,t)=>{Qp.init(e,t),Yv.init(e,t)}),uhe=wt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=L6e),Ho.init(e,t)}),dhe=wt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=OS(o))}else t.pattern??(t.pattern=OS());Ho.init(e,t)}),fhe=wt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$6e),Ho.init(e,t)}),phe=wt("$ZodURL",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{try{const o=n.value.trim();if(!t.normalize&&t.protocol?.source===O6e.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),hhe=wt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=z6e()),Ho.init(e,t)}),mhe=wt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=E6e),Ho.init(e,t)}),ghe=wt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=S6e),Ho.init(e,t)}),vhe=wt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=C6e),Ho.init(e,t)}),yhe=wt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=M6e),Ho.init(e,t)}),whe=wt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=A6e),Ho.init(e,t)}),khe=wt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=T6e),Ho.init(e,t)}),bhe=wt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=W6e(t)),Ho.init(e,t)}),_he=wt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=D6e),Ho.init(e,t)}),xhe=wt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=V6e(t)),Ho.init(e,t)}),She=wt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=I6e),Ho.init(e,t)}),Che=wt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=B6e),Ho.init(e,t),e._zod.bag.format="ipv4"}),Mhe=wt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=R6e),Ho.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ahe=wt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=P6e),Ho.init(e,t)}),The=wt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=F6e),Ho.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Q$(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ehe=wt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=j6e),Ho.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Q$(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ihe(e){if(!U$.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Q$(n)}const Lhe=wt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=U$),Ho.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Ihe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),$he=wt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=H6e),Ho.init(e,t)});function Nhe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const zhe=wt("$ZodJWT",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{Nhe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),eN=wt("$ZodNumber",(e,t)=>{Go.init(e,t),e._zod.pattern=e._zod.bag.pattern??G$,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),Bhe=wt("$ZodNumberFormat",(e,t)=>{X6e.init(e,t),eN.init(e,t)}),Rhe=wt("$ZodBoolean",(e,t)=>{Go.init(e,t),e._zod.pattern=Z6e,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),Phe=wt("$ZodUnknown",(e,t)=>{Go.init(e,t),e._zod.parse=n=>n}),Fhe=wt("$ZodNever",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function HS(e,t,n){e.issues.length&&t.issues.push(...Jc(n,e.issues)),t.value[n]=e.value}const jhe=wt("$ZodArray",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let l=0;lHS(c,n,l))):HS(a,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function V5(e,t,n,o,s,i){const l=n in o;if(e.issues.length){if(s&&i&&!l)return;t.issues.push(...Jc(n,e.issues))}if(!l&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function tN(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=n6e(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function nN(e,t,n,o,s,i){const l=[],r=s.keySet,a=s.catchall._zod,c=a.def.type,u=a.optin==="optional",d=a.optout==="optional";for(const f in t){if(f==="__proto__"||r.has(f))continue;if(c==="never"){l.push(f);continue}const p=a.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(h=>V5(h,n,f,t,u,d))):V5(p,n,f,t,u,d)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Ohe=wt("$ZodObject",(e,t)=>{if(Go.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const r=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...r};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=Yp(()=>tN(t));_o(e._zod,"propValues",()=>{const r=t.shape,a={};for(const c in r){const u=r[c]._zod;if(u.values){a[c]??(a[c]=new Set);for(const d of u.values)a[c].add(d)}}return a});const s=of,i=t.catchall;let l;e._zod.parse=(r,a)=>{l??(l=o.value);const c=r.value;if(!s(c))return r.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),r;r.value={};const u=[],d=l.shape;for(const f of l.keys){const p=d[f],h=p._zod.optin==="optional",m=p._zod.optout==="optional",k=p._zod.run({value:c[f],issues:[]},a);k instanceof Promise?u.push(k.then(x=>V5(x,r,f,c,h,m))):V5(k,r,f,c,h,m)}return i?nN(u,c,r,a,o.value,e):u.length?Promise.all(u).then(()=>r):r}}),Hhe=wt("$ZodObjectJIT",(e,t)=>{Ohe.init(e,t);const n=e._zod.parse,o=Yp(()=>tN(t)),s=f=>{const p=new ahe(["shape","payload","ctx"]),h=o.value,m=w=>{const _=jS(w);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};p.write("const input = payload.value;");const k=Object.create(null);let x=0;for(const w of h.keys)k[w]=`key_${x++}`;p.write("const newResult = {};");for(const w of h.keys){const _=k[w],A=jS(w),P=f[w],z=P?._zod?.optin==="optional",L=P?._zod?.optout==="optional";p.write(`const ${_} = ${m(w)};`),z&&L?p.write(` +`))}}const uhe={major:4,minor:4,patch:3},Go=wt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=uhe;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,r,a)=>{let c=Xc(l),u;for(const d of r){if(d._zod.def.when){if(f6e(l)||!d._zod.def.when(l))continue}else if(c)continue;const f=l.issues.length,p=d._zod.check(l);if(p instanceof Promise&&a?.async===!1)throw new mu;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,l.issues.length!==f&&(c||(c=Xc(l,f)))});else{if(l.issues.length===f)continue;c||(c=Xc(l,f))}}return u?u.then(()=>l):l},i=(l,r,a)=>{if(Xc(l))return l.aborted=!0,l;const c=s(r,o,a);if(c instanceof Promise){if(a.async===!1)throw new mu;return c.then(u=>e._zod.parse(u,a))}return e._zod.parse(c,a)};e._zod.run=(l,r)=>{if(r.skipChecks)return e._zod.parse(l,r);if(r.direction==="backward"){const c=e._zod.parse({value:l.value,issues:[]},{...r,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,l,r)):i(c,l,r)}const a=e._zod.parse(l,r);if(a instanceof Promise){if(r.async===!1)throw new mu;return a.then(c=>s(c,o,r))}return s(a,o,r)}}_o(e,"~standard",()=>({validate:s=>{try{const i=m6e(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return g6e(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Xv=wt("$ZodString",(e,t)=>{Go.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??U6e(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ho=wt("$ZodStringFormat",(e,t)=>{Qp.init(e,t),Xv.init(e,t)}),dhe=wt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=$6e),Ho.init(e,t)}),fhe=wt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=HS(o))}else t.pattern??(t.pattern=HS());Ho.init(e,t)}),phe=wt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=N6e),Ho.init(e,t)}),hhe=wt("$ZodURL",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{try{const o=n.value.trim();if(!t.normalize&&t.protocol?.source===H6e.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),mhe=wt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=B6e()),Ho.init(e,t)}),ghe=wt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=I6e),Ho.init(e,t)}),vhe=wt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=C6e),Ho.init(e,t)}),yhe=wt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=M6e),Ho.init(e,t)}),whe=wt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=A6e),Ho.init(e,t)}),khe=wt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=T6e),Ho.init(e,t)}),bhe=wt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=E6e),Ho.init(e,t)}),_he=wt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=q6e(t)),Ho.init(e,t)}),xhe=wt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=V6e),Ho.init(e,t)}),She=wt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=W6e(t)),Ho.init(e,t)}),Che=wt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=L6e),Ho.init(e,t)}),Mhe=wt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=R6e),Ho.init(e,t),e._zod.bag.format="ipv4"}),Ahe=wt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=P6e),Ho.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),The=wt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=F6e),Ho.init(e,t)}),Ehe=wt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=j6e),Ho.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function eN(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ihe=wt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=O6e),Ho.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{eN(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Lhe(e){if(!Z$.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return eN(n)}const $he=wt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Z$),Ho.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Lhe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Nhe=wt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=D6e),Ho.init(e,t)});function zhe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const Bhe=wt("$ZodJWT",(e,t)=>{Ho.init(e,t),e._zod.check=n=>{zhe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),tN=wt("$ZodNumber",(e,t)=>{Go.init(e,t),e._zod.pattern=e._zod.bag.pattern??Y$,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),Rhe=wt("$ZodNumberFormat",(e,t)=>{J6e.init(e,t),tN.init(e,t)}),Phe=wt("$ZodBoolean",(e,t)=>{Go.init(e,t),e._zod.pattern=K6e,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),Fhe=wt("$ZodUnknown",(e,t)=>{Go.init(e,t),e._zod.parse=n=>n}),jhe=wt("$ZodNever",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function DS(e,t,n){e.issues.length&&t.issues.push(...Jc(n,e.issues)),t.value[n]=e.value}const Ohe=wt("$ZodArray",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let l=0;lDS(c,n,l))):DS(a,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function V5(e,t,n,o,s,i){const l=n in o;if(e.issues.length){if(s&&i&&!l)return;t.issues.push(...Jc(n,e.issues))}if(!l&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function nN(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=o6e(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function oN(e,t,n,o,s,i){const l=[],r=s.keySet,a=s.catchall._zod,c=a.def.type,u=a.optin==="optional",d=a.optout==="optional";for(const f in t){if(f==="__proto__"||r.has(f))continue;if(c==="never"){l.push(f);continue}const p=a.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(h=>V5(h,n,f,t,u,d))):V5(p,n,f,t,u,d)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Hhe=wt("$ZodObject",(e,t)=>{if(Go.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const r=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...r};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=Yp(()=>nN(t));_o(e._zod,"propValues",()=>{const r=t.shape,a={};for(const c in r){const u=r[c]._zod;if(u.values){a[c]??(a[c]=new Set);for(const d of u.values)a[c].add(d)}}return a});const s=of,i=t.catchall;let l;e._zod.parse=(r,a)=>{l??(l=o.value);const c=r.value;if(!s(c))return r.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),r;r.value={};const u=[],d=l.shape;for(const f of l.keys){const p=d[f],h=p._zod.optin==="optional",m=p._zod.optout==="optional",k=p._zod.run({value:c[f],issues:[]},a);k instanceof Promise?u.push(k.then(x=>V5(x,r,f,c,h,m))):V5(k,r,f,c,h,m)}return i?oN(u,c,r,a,o.value,e):u.length?Promise.all(u).then(()=>r):r}}),Dhe=wt("$ZodObjectJIT",(e,t)=>{Hhe.init(e,t);const n=e._zod.parse,o=Yp(()=>nN(t)),s=f=>{const p=new che(["shape","payload","ctx"]),h=o.value,m=w=>{const _=OS(w);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};p.write("const input = payload.value;");const k=Object.create(null);let x=0;for(const w of h.keys)k[w]=`key_${x++}`;p.write("const newResult = {};");for(const w of h.keys){const _=k[w],A=OS(w),P=f[w],z=P?._zod?.optin==="optional",L=P?._zod?.optout==="optional";p.write(`const ${_} = ${m(w)};`),z&&L?p.write(` if (${_}.issues.length) { if (${A} in input) { payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ @@ -879,74 +879,74 @@ pre[data-md-nums="on"] [data-line]::before { } } - `)}p.write("payload.value = newResult;"),p.write("return payload;");const y=p.compile();return(w,_)=>y(f,w,_)};let i;const l=of,r=!Wv.jitless,c=r&&e6e.value,u=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=o.value);const h=f.value;return l(h)?r&&c&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),f=i(f,p),u?nN([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function DS(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Xc(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>Sa(l,o,xa())))}),t)}const oN=wt("$ZodUnion",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_o(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_o(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),_o(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Uv(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(n)return n(o,s);let i=!1;const l=[];for(const r of t.options){const a=r._zod.run({value:o.value,issues:[]},s);if(a instanceof Promise)l.push(a),i=!0;else{if(a.issues.length===0)return a;l.push(a)}}return i?Promise.all(l).then(r=>DS(r,o,e,s)):DS(l,o,e,s)}}),Dhe=wt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,oN.init(e,t);const n=e._zod.parse;_o(e._zod,"propValues",()=>{const s={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[r,a]of Object.entries(l)){s[r]||(s[r]=new Set);for(const c of a)s[r].add(c)}}return s});const o=Yp(()=>{const s=t.options,i=new Map;for(const l of s){const r=l._zod.propValues?.[t.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const a of r){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,l)}}return i});e._zod.parse=(s,i)=>{const l=s.value;if(!of(l))return s.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),s;const r=o.value.get(l?.[t.discriminator]);return r?r._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:l,path:[t.discriminator],inst:e}),s)}}),Vhe=wt("$ZodIntersection",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),l=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([a,c])=>VS(n,a,c)):VS(n,i,l)}});function M7(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Eu(e)&&Eu(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const l=M7(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};s[i]=l.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;or.l&&r.r).map(([r])=>r);if(i.length&&s&&e.issues.push({...s,keys:i}),Xc(e))return e;const l=M7(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const Whe=wt("$ZodRecord",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Eu(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const r=new Set;for(const c of l)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){r.add(typeof c=="number"?c.toString():c);const u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Sa(p,o,xa())),input:c,path:[c],inst:e});continue}const d=u.value,f=t.valueType._zod.run({value:s[c],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...Jc(c,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Jc(c,f.issues)),n.value[d]=f.value)}let a;for(const c in s)r.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const r of Reflect.ownKeys(s)){if(r==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,r))continue;let a=t.keyType._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof r=="string"&&G$.test(r)&&a.issues.length){const d=t.keyType._zod.run({value:Number(r),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[r]=s[r]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>Sa(d,o,xa())),input:r,path:[r],inst:e});continue}const u=t.valueType._zod.run({value:s[r],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&n.issues.push(...Jc(r,d.issues)),n.value[a.value]=d.value})):(u.issues.length&&n.issues.push(...Jc(r,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),qhe=wt("$ZodEnum",(e,t)=>{Go.init(e,t);const n=O$(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>t6e.has(typeof s)).map(s=>typeof s=="string"?Iu(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const l=s.value;return o.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),Uhe=wt("$ZodLiteral",(e,t)=>{if(Go.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Iu(o):o?Iu(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Zhe=wt("$ZodTransform",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new j$(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n.fallback=!0,n));if(s instanceof Promise)throw new mu;return n.value=s,n.fallback=!0,n}});function WS(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const sN=wt("$ZodOptional",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Uv(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>WS(l,s)):WS(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Khe=wt("$ZodExactOptional",(e,t)=>{sN.init(e,t),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Ghe=wt("$ZodNullable",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.innerType._zod.optin),_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Uv(n.source)}|null)$`):void 0}),_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Yhe=wt("$ZodDefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>qS(i,t)):qS(s,t)}});function qS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Xhe=wt("$ZodPrefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Jhe=wt("$ZodNonOptional",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>US(i,e)):US(s,e)}});function US(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Qhe=wt("$ZodCatch",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Sa(l,o,xa()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Sa(i,o,xa()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),eme=wt("$ZodPipe",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>t.in._zod.values),_o(e._zod,"optin",()=>t.in._zod.optin),_o(e._zod,"optout",()=>t.out._zod.optout),_o(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(l=>G3(l,t.in,o)):G3(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>G3(i,t.out,o)):G3(s,t.out,o)}});function G3(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const tme=wt("$ZodReadonly",(e,t)=>{Go.init(e,t),_o(e._zod,"propValues",()=>t.innerType._zod.propValues),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"optin",()=>t.innerType?._zod?.optin),_o(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(ZS):ZS(s)}});function ZS(e){return e.value=Object.freeze(e.value),e}const nme=wt("$ZodCustom",(e,t)=>{Ji.init(e,t),Go.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>KS(i,n,o,e));KS(s,n,o,e)}});function KS(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(sf(s))}}var GS;class ome{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function sme(){return new ome}(GS=globalThis).__zod_globalRegistry??(GS.__zod_globalRegistry=sme());const Xd=globalThis.__zod_globalRegistry;function ime(e,t){return new e({type:"string",...hn(t)})}function lme(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...hn(t)})}function YS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...hn(t)})}function rme(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...hn(t)})}function ame(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...hn(t)})}function cme(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...hn(t)})}function ume(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...hn(t)})}function dme(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...hn(t)})}function fme(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...hn(t)})}function pme(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...hn(t)})}function hme(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...hn(t)})}function mme(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...hn(t)})}function gme(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...hn(t)})}function vme(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...hn(t)})}function yme(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...hn(t)})}function wme(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...hn(t)})}function kme(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...hn(t)})}function bme(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...hn(t)})}function _me(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...hn(t)})}function xme(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...hn(t)})}function Sme(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...hn(t)})}function Cme(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...hn(t)})}function Mme(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...hn(t)})}function Ame(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...hn(t)})}function Tme(e,t){return new e({type:"string",format:"date",check:"string_format",...hn(t)})}function Eme(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...hn(t)})}function Ime(e,t){return new e({type:"string",format:"duration",check:"string_format",...hn(t)})}function Lme(e,t){return new e({type:"number",checks:[],...hn(t)})}function $me(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...hn(t)})}function Nme(e,t){return new e({type:"boolean",...hn(t)})}function zme(e){return new e({type:"unknown"})}function Bme(e,t){return new e({type:"never",...hn(t)})}function XS(e,t){return new X$({check:"less_than",...hn(t),value:e,inclusive:!1})}function Cm(e,t){return new X$({check:"less_than",...hn(t),value:e,inclusive:!0})}function JS(e,t){return new J$({check:"greater_than",...hn(t),value:e,inclusive:!1})}function Mm(e,t){return new J$({check:"greater_than",...hn(t),value:e,inclusive:!0})}function QS(e,t){return new Y6e({check:"multiple_of",...hn(t),value:e})}function iN(e,t){return new J6e({check:"max_length",...hn(t),maximum:e})}function W5(e,t){return new Q6e({check:"min_length",...hn(t),minimum:e})}function lN(e,t){return new ehe({check:"length_equals",...hn(t),length:e})}function Rme(e,t){return new the({check:"string_format",format:"regex",...hn(t),pattern:e})}function Pme(e){return new nhe({check:"string_format",format:"lowercase",...hn(e)})}function Fme(e){return new ohe({check:"string_format",format:"uppercase",...hn(e)})}function jme(e,t){return new she({check:"string_format",format:"includes",...hn(t),includes:e})}function Ome(e,t){return new ihe({check:"string_format",format:"starts_with",...hn(t),prefix:e})}function Hme(e,t){return new lhe({check:"string_format",format:"ends_with",...hn(t),suffix:e})}function Vu(e){return new rhe({check:"overwrite",tx:e})}function Dme(e){return Vu(t=>t.normalize(e))}function Vme(){return Vu(e=>e.trim())}function Wme(){return Vu(e=>e.toLowerCase())}function qme(){return Vu(e=>e.toUpperCase())}function Ume(){return Vu(e=>Qpe(e))}function Zme(e,t,n){return new e({type:"array",element:t,...hn(n)})}function Kme(e,t,n){return new e({type:"custom",check:"custom",fn:t,...hn(n)})}function Gme(e,t){const n=Yme(o=>(o.addIssue=s=>{if(typeof s=="string")o.issues.push(sf(s,o.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(sf(i))}},e(o.value,o)),t);return n}function Yme(e,t){const n=new Ji({check:"custom",...hn(t)});return n._zod.check=e,n}function rN(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Xd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function As(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const r=e._zod.toJSONSchema?.();if(r)l.schema=r;else{const u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,u);else{const f=l.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,u)}const d=e._zod.parent;d&&(l.ref||(l.ref=d),As(d,t,u),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(l.schema,a),t.io==="input"&&bi(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((o=l.schema).default??(o.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function aN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const l of e.seen.entries()){const r=e.metadataRegistry.get(l[0])?.id;if(r){const a=o.get(r);if(a&&a!==l[0])throw new Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(r,l[0])}}const s=l=>{const r=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(l[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const p=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=p,{defId:p,ref:`${f("__shared")}#/${r}/${p}`}}if(l[1]===n)return{ref:"#"};const c=`#/${r}/`,u=l[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=l=>{if(l[1].schema.$ref)return;const r=l[1],{ref:a,defId:c}=s(l);r.def={...r.schema},c&&(r.defId=c);const u=r.schema;for(const d in u)delete u[d];u.$ref=a};if(e.cycles==="throw")for(const l of e.seen.entries()){const r=l[1];if(r.cycle)throw new Error(`Cycle detected: #/${r.cycle?.join("/")}/ + `)}p.write("payload.value = newResult;"),p.write("return payload;");const y=p.compile();return(w,_)=>y(f,w,_)};let i;const l=of,r=!qv.jitless,c=r&&t6e.value,u=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=o.value);const h=f.value;return l(h)?r&&c&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),f=i(f,p),u?oN([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function VS(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Xc(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>Sa(l,o,xa())))}),t)}const sN=wt("$ZodUnion",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_o(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_o(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),_o(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Zv(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(n)return n(o,s);let i=!1;const l=[];for(const r of t.options){const a=r._zod.run({value:o.value,issues:[]},s);if(a instanceof Promise)l.push(a),i=!0;else{if(a.issues.length===0)return a;l.push(a)}}return i?Promise.all(l).then(r=>VS(r,o,e,s)):VS(l,o,e,s)}}),Vhe=wt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,sN.init(e,t);const n=e._zod.parse;_o(e._zod,"propValues",()=>{const s={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[r,a]of Object.entries(l)){s[r]||(s[r]=new Set);for(const c of a)s[r].add(c)}}return s});const o=Yp(()=>{const s=t.options,i=new Map;for(const l of s){const r=l._zod.propValues?.[t.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const a of r){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,l)}}return i});e._zod.parse=(s,i)=>{const l=s.value;if(!of(l))return s.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),s;const r=o.value.get(l?.[t.discriminator]);return r?r._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:l,path:[t.discriminator],inst:e}),s)}}),Whe=wt("$ZodIntersection",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),l=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([a,c])=>WS(n,a,c)):WS(n,i,l)}});function A7(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Eu(e)&&Eu(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const l=A7(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};s[i]=l.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;or.l&&r.r).map(([r])=>r);if(i.length&&s&&e.issues.push({...s,keys:i}),Xc(e))return e;const l=A7(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const qhe=wt("$ZodRecord",(e,t)=>{Go.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Eu(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const r=new Set;for(const c of l)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){r.add(typeof c=="number"?c.toString():c);const u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Sa(p,o,xa())),input:c,path:[c],inst:e});continue}const d=u.value,f=t.valueType._zod.run({value:s[c],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...Jc(c,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Jc(c,f.issues)),n.value[d]=f.value)}let a;for(const c in s)r.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const r of Reflect.ownKeys(s)){if(r==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,r))continue;let a=t.keyType._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof r=="string"&&Y$.test(r)&&a.issues.length){const d=t.keyType._zod.run({value:Number(r),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[r]=s[r]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>Sa(d,o,xa())),input:r,path:[r],inst:e});continue}const u=t.valueType._zod.run({value:s[r],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&n.issues.push(...Jc(r,d.issues)),n.value[a.value]=d.value})):(u.issues.length&&n.issues.push(...Jc(r,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Uhe=wt("$ZodEnum",(e,t)=>{Go.init(e,t);const n=H$(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>n6e.has(typeof s)).map(s=>typeof s=="string"?Iu(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const l=s.value;return o.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),Zhe=wt("$ZodLiteral",(e,t)=>{if(Go.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Iu(o):o?Iu(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Khe=wt("$ZodTransform",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new O$(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n.fallback=!0,n));if(s instanceof Promise)throw new mu;return n.value=s,n.fallback=!0,n}});function qS(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const iN=wt("$ZodOptional",(e,t)=>{Go.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Zv(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>qS(l,s)):qS(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Ghe=wt("$ZodExactOptional",(e,t)=>{iN.init(e,t),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Yhe=wt("$ZodNullable",(e,t)=>{Go.init(e,t),_o(e._zod,"optin",()=>t.innerType._zod.optin),_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Zv(n.source)}|null)$`):void 0}),_o(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Xhe=wt("$ZodDefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>US(i,t)):US(s,t)}});function US(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Jhe=wt("$ZodPrefault",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Qhe=wt("$ZodNonOptional",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>ZS(i,e)):ZS(s,e)}});function ZS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const eme=wt("$ZodCatch",(e,t)=>{Go.init(e,t),e._zod.optin="optional",_o(e._zod,"optout",()=>t.innerType._zod.optout),_o(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Sa(l,o,xa()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Sa(i,o,xa()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),tme=wt("$ZodPipe",(e,t)=>{Go.init(e,t),_o(e._zod,"values",()=>t.in._zod.values),_o(e._zod,"optin",()=>t.in._zod.optin),_o(e._zod,"optout",()=>t.out._zod.optout),_o(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(l=>G3(l,t.in,o)):G3(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>G3(i,t.out,o)):G3(s,t.out,o)}});function G3(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const nme=wt("$ZodReadonly",(e,t)=>{Go.init(e,t),_o(e._zod,"propValues",()=>t.innerType._zod.propValues),_o(e._zod,"values",()=>t.innerType._zod.values),_o(e._zod,"optin",()=>t.innerType?._zod?.optin),_o(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(KS):KS(s)}});function KS(e){return e.value=Object.freeze(e.value),e}const ome=wt("$ZodCustom",(e,t)=>{Ji.init(e,t),Go.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>GS(i,n,o,e));GS(s,n,o,e)}});function GS(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(sf(s))}}var YS;class sme{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function ime(){return new sme}(YS=globalThis).__zod_globalRegistry??(YS.__zod_globalRegistry=ime());const Xd=globalThis.__zod_globalRegistry;function lme(e,t){return new e({type:"string",...hn(t)})}function rme(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...hn(t)})}function XS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...hn(t)})}function ame(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...hn(t)})}function cme(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...hn(t)})}function ume(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...hn(t)})}function dme(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...hn(t)})}function fme(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...hn(t)})}function pme(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...hn(t)})}function hme(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...hn(t)})}function mme(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...hn(t)})}function gme(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...hn(t)})}function vme(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...hn(t)})}function yme(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...hn(t)})}function wme(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...hn(t)})}function kme(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...hn(t)})}function bme(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...hn(t)})}function _me(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...hn(t)})}function xme(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...hn(t)})}function Sme(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...hn(t)})}function Cme(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...hn(t)})}function Mme(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...hn(t)})}function Ame(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...hn(t)})}function Tme(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...hn(t)})}function Eme(e,t){return new e({type:"string",format:"date",check:"string_format",...hn(t)})}function Ime(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...hn(t)})}function Lme(e,t){return new e({type:"string",format:"duration",check:"string_format",...hn(t)})}function $me(e,t){return new e({type:"number",checks:[],...hn(t)})}function Nme(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...hn(t)})}function zme(e,t){return new e({type:"boolean",...hn(t)})}function Bme(e){return new e({type:"unknown"})}function Rme(e,t){return new e({type:"never",...hn(t)})}function JS(e,t){return new J$({check:"less_than",...hn(t),value:e,inclusive:!1})}function Cm(e,t){return new J$({check:"less_than",...hn(t),value:e,inclusive:!0})}function QS(e,t){return new Q$({check:"greater_than",...hn(t),value:e,inclusive:!1})}function Mm(e,t){return new Q$({check:"greater_than",...hn(t),value:e,inclusive:!0})}function eC(e,t){return new X6e({check:"multiple_of",...hn(t),value:e})}function lN(e,t){return new Q6e({check:"max_length",...hn(t),maximum:e})}function W5(e,t){return new ehe({check:"min_length",...hn(t),minimum:e})}function rN(e,t){return new the({check:"length_equals",...hn(t),length:e})}function Pme(e,t){return new nhe({check:"string_format",format:"regex",...hn(t),pattern:e})}function Fme(e){return new ohe({check:"string_format",format:"lowercase",...hn(e)})}function jme(e){return new she({check:"string_format",format:"uppercase",...hn(e)})}function Ome(e,t){return new ihe({check:"string_format",format:"includes",...hn(t),includes:e})}function Hme(e,t){return new lhe({check:"string_format",format:"starts_with",...hn(t),prefix:e})}function Dme(e,t){return new rhe({check:"string_format",format:"ends_with",...hn(t),suffix:e})}function Vu(e){return new ahe({check:"overwrite",tx:e})}function Vme(e){return Vu(t=>t.normalize(e))}function Wme(){return Vu(e=>e.trim())}function qme(){return Vu(e=>e.toLowerCase())}function Ume(){return Vu(e=>e.toUpperCase())}function Zme(){return Vu(e=>e6e(e))}function Kme(e,t,n){return new e({type:"array",element:t,...hn(n)})}function Gme(e,t,n){return new e({type:"custom",check:"custom",fn:t,...hn(n)})}function Yme(e,t){const n=Xme(o=>(o.addIssue=s=>{if(typeof s=="string")o.issues.push(sf(s,o.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(sf(i))}},e(o.value,o)),t);return n}function Xme(e,t){const n=new Ji({check:"custom",...hn(t)});return n._zod.check=e,n}function aN(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Xd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function As(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const r=e._zod.toJSONSchema?.();if(r)l.schema=r;else{const u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,u);else{const f=l.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,u)}const d=e._zod.parent;d&&(l.ref||(l.ref=d),As(d,t,u),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(l.schema,a),t.io==="input"&&bi(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((o=l.schema).default??(o.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function cN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const l of e.seen.entries()){const r=e.metadataRegistry.get(l[0])?.id;if(r){const a=o.get(r);if(a&&a!==l[0])throw new Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(r,l[0])}}const s=l=>{const r=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(l[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const p=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=p,{defId:p,ref:`${f("__shared")}#/${r}/${p}`}}if(l[1]===n)return{ref:"#"};const c=`#/${r}/`,u=l[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=l=>{if(l[1].schema.$ref)return;const r=l[1],{ref:a,defId:c}=s(l);r.def={...r.schema},c&&(r.defId=c);const u=r.schema;for(const d in u)delete u[d];u.$ref=a};if(e.cycles==="throw")for(const l of e.seen.entries()){const r=l[1];if(r.cycle)throw new Error(`Cycle detected: #/${r.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const r=l[1];if(t===l[0]){i(l);continue}if(e.external){const c=e.external.registry.get(l[0])?.id;if(t!==l[0]&&c){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(r.cycle){i(l);continue}if(r.count>1&&e.reused==="ref"){i(l);continue}}}function cN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=r=>{const a=e.seen.get(r);if(a.ref===null)return;const c=a.def??a.schema,u={...c},d=a.ref;if(a.ref=null,d){o(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),r._zod.parent===d)for(const k in c)k==="$ref"||k==="allOf"||k in u||delete c[k];if(h.$ref&&p.def)for(const k in c)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(c[k])===JSON.stringify(p.def[k])&&delete c[k]}const f=r._zod.parent;if(f&&f!==d){o(f);const p=e.seen.get(f);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(const h in c)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(c[h])===JSON.stringify(p.def[h])&&delete c[h]}e.override({zodSchema:r,jsonSchema:c,path:a.path??[]})};for(const r of[...e.seen.entries()].reverse())o(r[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const l=e.external?.defs??{};for(const r of e.seen.entries()){const a=r[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,l[a.defId]=a.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:q5(t,"input",e.processors),output:q5(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function bi(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return bi(o.element,n);if(o.type==="set")return bi(o.valueType,n);if(o.type==="lazy")return bi(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return bi(o.innerType,n);if(o.type==="intersection")return bi(o.left,n)||bi(o.right,n);if(o.type==="record"||o.type==="map")return bi(o.keyType,n)||bi(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:bi(o.in,n)||bi(o.out,n);if(o.type==="object"){for(const s in o.shape)if(bi(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(bi(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(bi(s,n))return!0;return!!(o.rest&&bi(o.rest,n))}return!1}const Xme=(e,t={})=>n=>{const o=rN({...n,processors:t});return As(e,o),aN(o,e),cN(o,e)},q5=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},l=rN({...s??{},target:i,io:t,processors:n});return As(e,l),aN(l,e),cN(l,e)},Jme={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Qme=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:l,format:r,patterns:a,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof l=="number"&&(s.maxLength=l),r&&(s.format=Jme[r]??r,s.format===""&&delete s.format,r==="time"&&delete s.format),c&&(s.contentEncoding=c),a&&a.size>0){const u=[...a];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},e8e=(e,t,n,o)=>{const s=n,{minimum:i,maximum:l,format:r,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof r=="string"&&r.includes("int")?s.type="integer":s.type="number";const d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(l??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u:typeof i=="number"&&(s.minimum=i),f?p?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c:typeof l=="number"&&(s.maximum=l),typeof a=="number"&&(s.multipleOf=a)},t8e=(e,t,n,o)=>{n.type="boolean"},n8e=(e,t,n,o)=>{n.not={}},o8e=(e,t,n,o)=>{},s8e=(e,t,n,o)=>{const s=e._zod.def,i=O$(s.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},i8e=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const l of s.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},l8e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},r8e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},a8e=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:l,maximum:r}=e._zod.bag;typeof l=="number"&&(s.minItems=l),typeof r=="number"&&(s.maxItems=r),s.type="array",s.items=As(i.element,t,{...o,path:[...o.path,"items"]})},c8e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const l=i.shape;for(const c in l)s.properties[c]=As(l[c],t,{...o,path:[...o.path,"properties",c]});const r=new Set(Object.keys(l)),a=new Set([...r].filter(c=>{const u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=As(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},u8e=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,l=s.options.map((r,a)=>As(r,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=l:n.anyOf=l},d8e=(e,t,n,o)=>{const s=e._zod.def,i=As(s.left,t,{...o,path:[...o.path,"allOf",0]}),l=As(s.right,t,{...o,path:[...o.path,"allOf",1]}),r=c=>"allOf"in c&&Object.keys(c).length===1,a=[...r(i)?i.allOf:[i],...r(l)?l.allOf:[l]];n.allOf=a},f8e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const l=i.keyType,a=l._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const u=As(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=As(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=As(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const c=l._zod.values;if(c){const u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(s.required=u)}},p8e=(e,t,n,o)=>{const s=e._zod.def,i=As(s.innerType,t,o),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},h8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},m8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},g8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},v8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let l;try{l=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},y8e=(e,t,n,o)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?i?s.out:s.in:s.out;As(l,t,o);const r=t.seen.get(e);r.ref=l},w8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},uN=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},k8e=wt("ZodISODateTime",(e,t)=>{bhe.init(e,t),Xo.init(e,t)});function b8e(e){return Ame(k8e,e)}const _8e=wt("ZodISODate",(e,t)=>{_he.init(e,t),Xo.init(e,t)});function x8e(e){return Tme(_8e,e)}const S8e=wt("ZodISOTime",(e,t)=>{xhe.init(e,t),Xo.init(e,t)});function C8e(e){return Eme(S8e,e)}const M8e=wt("ZodISODuration",(e,t)=>{She.init(e,t),Xo.init(e,t)});function A8e(e){return Ime(M8e,e)}const T8e=(e,t)=>{W$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>p6e(e,n)},flatten:{value:n=>f6e(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,C7,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,C7,2)}},isEmpty:{get(){return e.issues.length===0}}})},Wl=wt("ZodError",T8e,{Parent:Error}),E8e=Kv(Wl),I8e=Gv(Wl),L8e=Xp(Wl),$8e=Jp(Wl),N8e=g6e(Wl),z8e=v6e(Wl),B8e=y6e(Wl),R8e=w6e(Wl),P8e=k6e(Wl),F8e=b6e(Wl),j8e=_6e(Wl),O8e=x6e(Wl),eC=new WeakMap;function Tf(e,t,n){const o=Object.getPrototypeOf(e);let s=eC.get(o);if(s||(s=new Set,eC.set(o,s)),!s.has(t)){s.add(t);for(const i in n){const l=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const r=l.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(r){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r})}})}}}const Yo=wt("ZodType",(e,t)=>(Go.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:q5(e,"input"),output:q5(e,"output")}}),e.toJSONSchema=Xme(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>E8e(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>L8e(e,n,o),e.parseAsync=async(n,o)=>I8e(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>$8e(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>N8e(e,n,o),e.decode=(n,o)=>z8e(e,n,o),e.encodeAsync=async(n,o)=>B8e(e,n,o),e.decodeAsync=async(n,o)=>R8e(e,n,o),e.safeEncode=(n,o)=>P8e(e,n,o),e.safeDecode=(n,o)=>F8e(e,n,o),e.safeEncodeAsync=async(n,o)=>j8e(e,n,o),e.safeDecodeAsync=async(n,o)=>O8e(e,n,o),Tf(e,"ZodType",{check(...n){const o=this.def;return this.clone(I1(o,{checks:[...o.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return L1(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(N7e(n,o))},superRefine(n,o){return this.check(z7e(n,o))},overwrite(n){return this.check(Vu(n))},optional(){return sC(this)},exactOptional(){return k7e(this)},nullable(){return iC(this)},nullish(){return sC(iC(this))},nonoptional(n){return M7e(this,n)},array(){return ro(this)},or(n){return f7e([this,n])},and(n){return m7e(this,n)},transform(n){return lC(this,y7e(n))},default(n){return x7e(this,n)},prefault(n){return C7e(this,n)},catch(n){return T7e(this,n)},pipe(n){return lC(this,n)},readonly(){return L7e(this)},describe(n){const o=this.clone();return Xd.add(o,{description:n}),o},meta(...n){if(n.length===0)return Xd.get(this);const o=this.clone();return Xd.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Xd.get(e)?.description},configurable:!0}),e)),dN=wt("_ZodString",(e,t)=>{Yv.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>Qme(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Tf(e,"_ZodString",{regex(...o){return this.check(Rme(...o))},includes(...o){return this.check(jme(...o))},startsWith(...o){return this.check(Ome(...o))},endsWith(...o){return this.check(Hme(...o))},min(...o){return this.check(W5(...o))},max(...o){return this.check(iN(...o))},length(...o){return this.check(lN(...o))},nonempty(...o){return this.check(W5(1,...o))},lowercase(o){return this.check(Pme(o))},uppercase(o){return this.check(Fme(o))},trim(){return this.check(Vme())},normalize(...o){return this.check(Dme(...o))},toLowerCase(){return this.check(Wme())},toUpperCase(){return this.check(qme())},slugify(){return this.check(Ume())}})}),H8e=wt("ZodString",(e,t)=>{Yv.init(e,t),dN.init(e,t),e.email=n=>e.check(lme(D8e,n)),e.url=n=>e.check(dme(V8e,n)),e.jwt=n=>e.check(Mme(s7e,n)),e.emoji=n=>e.check(fme(W8e,n)),e.guid=n=>e.check(YS(tC,n)),e.uuid=n=>e.check(rme(Y3,n)),e.uuidv4=n=>e.check(ame(Y3,n)),e.uuidv6=n=>e.check(cme(Y3,n)),e.uuidv7=n=>e.check(ume(Y3,n)),e.nanoid=n=>e.check(pme(q8e,n)),e.guid=n=>e.check(YS(tC,n)),e.cuid=n=>e.check(hme(U8e,n)),e.cuid2=n=>e.check(mme(Z8e,n)),e.ulid=n=>e.check(gme(K8e,n)),e.base64=n=>e.check(xme(t7e,n)),e.base64url=n=>e.check(Sme(n7e,n)),e.xid=n=>e.check(vme(G8e,n)),e.ksuid=n=>e.check(yme(Y8e,n)),e.ipv4=n=>e.check(wme(X8e,n)),e.ipv6=n=>e.check(kme(J8e,n)),e.cidrv4=n=>e.check(bme(Q8e,n)),e.cidrv6=n=>e.check(_me(e7e,n)),e.e164=n=>e.check(Cme(o7e,n)),e.datetime=n=>e.check(b8e(n)),e.date=n=>e.check(x8e(n)),e.time=n=>e.check(C8e(n)),e.duration=n=>e.check(A8e(n))});function Tt(e){return ime(H8e,e)}const Xo=wt("ZodStringFormat",(e,t)=>{Ho.init(e,t),dN.init(e,t)}),D8e=wt("ZodEmail",(e,t)=>{fhe.init(e,t),Xo.init(e,t)}),tC=wt("ZodGUID",(e,t)=>{uhe.init(e,t),Xo.init(e,t)}),Y3=wt("ZodUUID",(e,t)=>{dhe.init(e,t),Xo.init(e,t)}),V8e=wt("ZodURL",(e,t)=>{phe.init(e,t),Xo.init(e,t)}),W8e=wt("ZodEmoji",(e,t)=>{hhe.init(e,t),Xo.init(e,t)}),q8e=wt("ZodNanoID",(e,t)=>{mhe.init(e,t),Xo.init(e,t)}),U8e=wt("ZodCUID",(e,t)=>{ghe.init(e,t),Xo.init(e,t)}),Z8e=wt("ZodCUID2",(e,t)=>{vhe.init(e,t),Xo.init(e,t)}),K8e=wt("ZodULID",(e,t)=>{yhe.init(e,t),Xo.init(e,t)}),G8e=wt("ZodXID",(e,t)=>{whe.init(e,t),Xo.init(e,t)}),Y8e=wt("ZodKSUID",(e,t)=>{khe.init(e,t),Xo.init(e,t)}),X8e=wt("ZodIPv4",(e,t)=>{Che.init(e,t),Xo.init(e,t)}),J8e=wt("ZodIPv6",(e,t)=>{Mhe.init(e,t),Xo.init(e,t)}),Q8e=wt("ZodCIDRv4",(e,t)=>{Ahe.init(e,t),Xo.init(e,t)}),e7e=wt("ZodCIDRv6",(e,t)=>{The.init(e,t),Xo.init(e,t)}),t7e=wt("ZodBase64",(e,t)=>{Ehe.init(e,t),Xo.init(e,t)}),n7e=wt("ZodBase64URL",(e,t)=>{Lhe.init(e,t),Xo.init(e,t)}),o7e=wt("ZodE164",(e,t)=>{$he.init(e,t),Xo.init(e,t)}),s7e=wt("ZodJWT",(e,t)=>{zhe.init(e,t),Xo.init(e,t)}),fN=wt("ZodNumber",(e,t)=>{eN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>e8e(e,o,s),Tf(e,"ZodNumber",{gt(o,s){return this.check(JS(o,s))},gte(o,s){return this.check(Mm(o,s))},min(o,s){return this.check(Mm(o,s))},lt(o,s){return this.check(XS(o,s))},lte(o,s){return this.check(Cm(o,s))},max(o,s){return this.check(Cm(o,s))},int(o){return this.check(nC(o))},safe(o){return this.check(nC(o))},positive(o){return this.check(JS(0,o))},nonnegative(o){return this.check(Mm(0,o))},negative(o){return this.check(XS(0,o))},nonpositive(o){return this.check(Cm(0,o))},multipleOf(o,s){return this.check(QS(o,s))},step(o,s){return this.check(QS(o,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ln(e){return Lme(fN,e)}const i7e=wt("ZodNumberFormat",(e,t)=>{Bhe.init(e,t),fN.init(e,t)});function nC(e){return $me(i7e,e)}const l7e=wt("ZodBoolean",(e,t)=>{Rhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>t8e(e,n,o)});function Ef(e){return Nme(l7e,e)}const r7e=wt("ZodUnknown",(e,t)=>{Phe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>o8e()});function Rs(){return zme(r7e)}const a7e=wt("ZodNever",(e,t)=>{Fhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>n8e(e,n,o)});function c7e(e){return Bme(a7e,e)}const u7e=wt("ZodArray",(e,t)=>{jhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>a8e(e,n,o,s),e.element=t.element,Tf(e,"ZodArray",{min(n,o){return this.check(W5(n,o))},nonempty(n){return this.check(W5(1,n))},max(n,o){return this.check(iN(n,o))},length(n,o){return this.check(lN(n,o))},unwrap(){return this.element}})});function ro(e,t){return Zme(u7e,e,t)}const d7e=wt("ZodObject",(e,t)=>{Hhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>c8e(e,n,o,s),_o(e,"shape",()=>t.shape),Tf(e,"ZodObject",{keyof(){return Oo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Rs()})},loose(){return this.clone({...this._zod.def,catchall:Rs()})},strict(){return this.clone({...this._zod.def,catchall:c7e()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return l6e(this,n)},safeExtend(n){return r6e(this,n)},merge(n){return a6e(this,n)},pick(n){return s6e(this,n)},omit(n){return i6e(this,n)},partial(...n){return c6e(hN,this,n[0])},required(...n){return u6e(mN,this,n[0])}})});function Pt(e,t){const n={type:"object",shape:e??{},...hn(t)};return new d7e(n)}const pN=wt("ZodUnion",(e,t)=>{oN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>u8e(e,n,o,s),e.options=t.options});function f7e(e,t){return new pN({type:"union",options:e,...hn(t)})}const p7e=wt("ZodDiscriminatedUnion",(e,t)=>{pN.init(e,t),Dhe.init(e,t)});function $1(e,t,n){return new p7e({type:"union",options:t,discriminator:e,...hn(n)})}const h7e=wt("ZodIntersection",(e,t)=>{Vhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>d8e(e,n,o,s)});function m7e(e,t){return new h7e({type:"intersection",left:e,right:t})}const oC=wt("ZodRecord",(e,t)=>{Whe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>f8e(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function Xv(e,t,n){return!t||!t._zod?new oC({type:"record",keyType:Tt(),valueType:e,...hn(t)}):new oC({type:"record",keyType:e,valueType:t,...hn(n)})}const A7=wt("ZodEnum",(e,t)=>{qhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>s8e(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const l of o)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new A7({...t,checks:[],...hn(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const l of o)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new A7({...t,checks:[],...hn(s),entries:i})}});function Oo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new A7({type:"enum",entries:n,...hn(t)})}const g7e=wt("ZodLiteral",(e,t)=>{Uhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>i8e(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Rn(e,t){return new g7e({type:"literal",values:Array.isArray(e)?e:[e],...hn(t)})}const v7e=wt("ZodTransform",(e,t)=>{Zhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>r8e(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new j$(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(sf(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(sf(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function y7e(e){return new v7e({type:"transform",transform:e})}const hN=wt("ZodOptional",(e,t)=>{sN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>uN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function sC(e){return new hN({type:"optional",innerType:e})}const w7e=wt("ZodExactOptional",(e,t)=>{Khe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>uN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function k7e(e){return new w7e({type:"optional",innerType:e})}const b7e=wt("ZodNullable",(e,t)=>{Ghe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>p8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function iC(e){return new b7e({type:"nullable",innerType:e})}const _7e=wt("ZodDefault",(e,t)=>{Yhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>m8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function x7e(e,t){return new _7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():D$(t)}})}const S7e=wt("ZodPrefault",(e,t)=>{Xhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>g8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function C7e(e,t){return new S7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():D$(t)}})}const mN=wt("ZodNonOptional",(e,t)=>{Jhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>h8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function M7e(e,t){return new mN({type:"nonoptional",innerType:e,...hn(t)})}const A7e=wt("ZodCatch",(e,t)=>{Qhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>v8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function T7e(e,t){return new A7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const E7e=wt("ZodPipe",(e,t)=>{eme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>y8e(e,n,o,s),e.in=t.in,e.out=t.out});function lC(e,t){return new E7e({type:"pipe",in:e,out:t})}const I7e=wt("ZodReadonly",(e,t)=>{tme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>w8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function L7e(e){return new I7e({type:"readonly",innerType:e})}const $7e=wt("ZodCustom",(e,t)=>{nme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>l8e(e,n)});function N7e(e,t={}){return Kme($7e,e,t)}function z7e(e,t){return Gme(e,t)}const H0=Tt().min(1),Jv=Tt().min(1),If=Tt().min(1),D0=Tt().min(1),pl=Tt().min(1),B7e=/^[A-Za-z0-9._-]{1,128}$/;function R7e(e){return B7e.test(e)&&e!=="."&&e!==".."}const gN=$1("kind",[Pt({kind:Rn("user"),payload:Rs().optional()}),Pt({kind:Rn("cron"),taskId:D0.optional(),payload:Rs().optional()}),Pt({kind:Rn("task"),taskId:D0,payload:Rs().optional()}),Pt({kind:Rn("hook"),payload:Rs().optional()}),Pt({kind:Rn("compaction"),payload:Rs().optional()}),Pt({kind:Rn("side"),payload:Rs().optional()}),Pt({kind:Rn("other"),payload:Rs().optional()})]),P7e=Pt({inputTokens:ln().optional(),outputTokens:ln().optional(),cachedTokens:ln().optional(),cost:ln().optional()}),S2=Pt({inputOther:ln(),output:ln(),inputCacheRead:ln(),inputCacheCreation:ln()}),F7e=Pt({llmFirstTokenLatencyMs:ln().optional(),llmStreamDurationMs:ln().optional(),llmRequestBuildMs:ln().optional(),llmServerFirstTokenMs:ln().optional(),llmServerDecodeMs:ln().optional(),llmClientConsumeMs:ln().optional()}),j7e=Pt({failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:Tt(),errorMessage:Tt(),statusCode:ln().optional()}),vN=Oo(["queued","running","completed","failed","cancelled"]),O7e=Oo(["running","completed","interrupted","failed"]),H7e=Pt({kind:Rn("text"),frameId:If,role:Oo(["assistant","user"]),text:Tt(),attachmentIds:ro(Tt()).optional(),taskId:D0.optional(),promptIds:ro(Tt()).optional()}),D7e=Pt({kind:Rn("thinking"),frameId:If,text:Tt()}),V7e=Pt({agentId:pl,role:Oo(["child","member"]).optional()}),W7e=Pt({kind:Oo(["stdout","stderr","progress","status","custom"]),text:Tt().optional(),percent:ln().optional(),customKind:Tt().optional(),customData:Rs().optional()}),q7e=Pt({kind:Rn("tool"),frameId:If,toolCallId:Tt(),name:Tt(),view:Tt().optional(),state:Oo(["running","done","error"]),input:Rs().optional(),output:Rs().optional(),display:Rs().optional(),error:Tt().optional(),inputText:Tt().optional(),progress:W7e.optional(),taskId:D0.optional(),approvalId:Tt().optional(),todoId:Tt().optional(),agentRefs:ro(V7e).optional()}),Qv=Pt({interactionId:Tt(),interactionKind:Oo(["approval","question"]),toolCallId:Tt().optional(),state:Oo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Rs().optional(),response:Rs().optional()}),U7e=Pt({kind:Rn("notice"),frameId:If,level:Oo(["error","warning","info"]),source:Tt().optional(),message:Tt(),detail:Rs().optional()}),yN=$1("kind",[H7e,D7e,q7e,U7e]),wN=Pt({kind:Rn("step"),stepId:Jv,turnId:H0,ordinal:ln().int(),state:O7e,frames:ro(yN),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:S2.optional(),finishReason:Tt().optional(),timing:F7e.optional(),retry:j7e.optional(),endReason:Tt().optional(),endMessage:Tt().optional()}),kN=Pt({kind:Rn("turn"),turnId:H0,ordinal:ln().int(),state:vN,origin:gN,prompt:Tt().optional(),attachmentIds:ro(Tt()).optional(),steps:ro(wN),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:P7e.optional(),durationMs:ln().optional(),error:Tt().optional()}),bN=Pt({kind:Rn("marker"),markerId:Tt(),marker:Tt(),payload:Rs().optional(),at:Tt().optional()}),_N=Pt({kind:Rn("taskref"),refId:Tt(),taskId:D0,at:Tt().optional()}),xN=$1("kind",[kN,bN,_N]),e9=Pt({taskId:D0,kind:Oo(["shell","subagent","tool","other"]),state:Oo(["running","completed","failed","timed_out","killed","lost"]),detached:Ef(),description:Tt().optional(),agentId:pl.optional(),outputTail:Tt(),startedAt:Tt().optional(),endedAt:Tt().optional(),resultSummary:Tt().optional(),error:Tt().optional(),stateReason:Tt().optional(),usage:S2.optional(),model:Tt().optional(),thinkingEffort:Tt().optional()}),SN=Pt({objective:Tt(),status:Oo(["active","paused","blocked","complete"]),completionCriterion:Tt().optional(),budgetUsed:ln().optional(),budgetLimit:ln().optional()}),Z7e=Pt({plan:Pt({reviewPath:Tt().optional(),version:ln().optional()}).optional(),dynamic_workflow:Pt({trigger:Tt().optional()}).optional(),tower:Pt({}).optional()}),K7e=Pt({plan:Pt({reviewPath:Tt().optional(),version:ln().optional()}).nullable().optional(),dynamic_workflow:Pt({trigger:Tt().optional()}).nullable().optional(),tower:Pt({}).nullable().optional()}),G7e=$1("kind",[Pt({kind:Rn("idle")}),Pt({kind:Rn("running"),turnId:ln(),step:ln(),stepId:Tt(),since:ln()}),Pt({kind:Rn("streaming"),turnId:ln(),step:ln(),stepId:Tt(),stream:Oo(["assistant","thinking","tool_call"]),toolCallId:Tt().optional(),toolName:Tt().optional(),since:ln()}),Pt({kind:Rn("tool_call"),turnId:ln(),step:ln(),toolCallId:Tt(),name:Tt(),since:ln()}),Pt({kind:Rn("retrying"),turnId:ln(),step:ln(),stepId:Tt(),failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:Tt().optional(),statusCode:ln().optional(),since:ln()}),Pt({kind:Rn("awaiting_approval"),turnId:ln(),step:ln().optional(),approval:Rs().optional(),since:ln()}),Pt({kind:Rn("interrupted"),turnId:ln(),step:ln().optional(),reason:Oo(["aborted","max_steps","error"]),message:Tt().optional(),at:ln()}),Pt({kind:Rn("ended"),turnId:ln(),reason:Oo(["completed","cancelled","failed","blocked"]),durationMs:ln().optional(),at:ln()})]),Y7e=Pt({byModel:Xv(Tt(),S2).optional(),currentTurn:S2.optional(),total:S2.optional()}),X7e=Pt({model:Tt().optional(),thinkingEffort:Tt().optional(),usage:Y7e.optional(),contextTokens:ln().optional(),maxContextTokens:ln().optional(),contextUsage:ln().optional(),permission:Oo(["manual","yolo","auto"]).optional(),phase:G7e.optional()}),t9=Pt({goal:SN.optional(),modes:Z7e.optional(),activity:Oo(["idle","turn","disposing","unknown"]).optional(),agent:X7e.optional()}),J7e=t9.extend({goal:SN.nullable().optional(),modes:K7e.optional()}),e6=Pt({attachmentId:Tt(),mediaType:Tt(),name:Tt().optional(),size:ln().optional(),source:$1("kind",[Pt({kind:Rn("url"),url:Tt()}),Pt({kind:Rn("file"),fileId:Tt()}),Pt({kind:Rn("session_media"),fileId:Tt()})]).optional(),placeholder:Tt().optional()}),Q7e=Pt({title:Tt(),status:Oo(["pending","in_progress","done"])}),n9=Pt({todoId:Tt(),items:ro(Q7e),updatedAt:Tt().optional()}),o9=Pt({promptId:Tt(),status:Oo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:Tt().optional(),content:Rs().optional(),createdAt:Tt(),finishedAt:Tt().optional(),steeredAt:Tt().optional()}),CN=Pt({items:ro(xN),tasks:ro(e9),interactions:ro(Qv).default([]),attachments:ro(e6).default([]),todos:ro(n9).default([]),prompts:ro(o9).default([]),meta:t9,hasMoreOlder:Ef().optional()}),ege=kN.omit({steps:!0}),tge=wN.omit({frames:!0}),nge=$1("type",[Pt({type:Rn("frame"),turnId:H0,stepId:Jv,frameId:If}),Pt({type:Rn("task"),taskId:D0})]),s9=$1("op",[Pt({op:Rn("reset"),agentId:pl,snapshot:CN}),Pt({op:Rn("turn.upsert"),turn:ege}),Pt({op:Rn("step.upsert"),turnId:H0,step:tge}),Pt({op:Rn("frame.upsert"),turnId:H0,stepId:Jv,frame:yN}),Pt({op:Rn("append"),target:nge,offset:ln().int().nonnegative(),text:Tt()}),Pt({op:Rn("marker.upsert"),item:bN,beforeTurn:ln().int().optional()}),Pt({op:Rn("taskref.upsert"),item:_N,beforeTurn:ln().int().optional()}),Pt({op:Rn("task.upsert"),task:e9}),Pt({op:Rn("interaction.upsert"),interaction:Qv}),Pt({op:Rn("attachment.upsert"),attachment:e6}),Pt({op:Rn("todo.upsert"),todo:n9}),Pt({op:Rn("prompt.upsert"),prompt:o9}),Pt({op:Rn("meta.merge"),meta:J7e}),Pt({op:Rn("items.remove"),ids:ro(Tt())})]);Pt({agentId:pl,ops:ro(s9)});const oge=Oo(["off","turn","block","delta"]),Lu=ln().int().nonnegative(),sge=Xv(Tt(),oge);Pt({session_id:Tt().min(1),transcript:sge,transcript_since:Xv(Tt(),Lu).optional()});Pt({agent_id:pl,before_turn:Tt().min(1).optional(),after_turn:Tt().min(1).optional(),page_size:ln().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),R7e(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const ige=Pt({agentId:pl,type:Oo(["main","sub","independent"]).optional(),parentAgentId:pl.optional(),label:Tt().optional(),createdAt:Tt().optional(),disposedAt:Tt().optional()}),lge=Pt({agent_id:pl,items:ro(xN),has_more:Ef(),tasks:ro(e9),interactions:ro(Qv).default([]),attachments:ro(e6).default([]),todos:ro(n9).default([]),prompts:ro(o9).default([]),meta:t9,agents:ro(ige),pending_interactions:ro(Tt()),seq:Lu.optional()});Pt({agent_id:pl,batches:ro(Pt({seq:Lu,ops:ro(s9)})),latest_seq:Lu,complete:Ef()});const rge=Pt({turn_id:H0,ordinal:ln().int(),state:vN,origin:gN,prompt:Tt(),attachment_ids:ro(Tt()).optional(),started_at:Tt().optional()});Pt({agents:ro(Pt({agent_id:pl,messages:ro(rge),attachments:ro(e6).default([])}))});const age=Pt({state:Oo(["pending","approved","rejected","cancelled"]),selected_option:Tt().optional(),feedback:Tt().optional()}),cge=Pt({tool_call_id:Tt(),turn_id:H0,source:Oo(["interaction","display","output"]),plan:Tt(),path:Tt().optional(),options:ro(Pt({label:Tt(),description:Tt().optional()})).optional(),review:age.optional()});Pt({agent_id:pl,plans:ro(cge)});const uge=Pt({agent_id:pl,snapshot:CN,has_more_older:Ef(),seq:Lu.optional()}),dge=Pt({agent_id:pl,ops:ro(s9),seq:Lu.optional()}),MN=uge.extend({type:Rn("transcript.reset")}),AN=dge.extend({type:Rn("transcript.ops")});$1("type",[MN,AN]);const fge=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],TN=500,U5=256*1024,rC=200,Am=16384,Tm=500,Em=50,Im=50,pge=6,hge=/api[_-]?key|authorization|token|secret|password|cookie|credential/i,mge=/^[A-Za-z0-9+/=_-]{200,}$/;let Lm=null;function pr(){if(Lm!==null)return Lm;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=ls(dn.debug)==="1"),Lm=e,e}const h1=[],Qc=[];let Jd=0;const y0=[];let Qd=0,gge=1;const Z5=new TextEncoder,vge=new Set(fge),i9=V(0),e2=Uo(!1);function yge(){return h1}function wge(){h1.length=0,Qc.length=0,Jd=0,y0.length=0,Qd=0,i9.value++}function Aa(e){if(!e2.value){try{const t={id:gge++,ts:Date.now(),source:e.source,kind:String(gu(e.kind)),label:String(gu(e.label)),sessionId:e.sessionId===void 0?void 0:String(gu(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:N1(e.detail)},n=JSON.stringify(t),o=Z5.encode(n).byteLength;if(o>U5)return;for(h1.push(t),Qc.push(n),Jd+=o+(Qc.length>1?1:0);h1.length>TN||Jd>U5;){const s=Qc.shift();h1.shift(),s!==void 0&&(Jd-=Z5.encode(s).byteLength,Qc.length>0&&(Jd-=1))}}catch{return}i9.value++}}function r0(e){if(typeof e=="string")return e.length<=rC?e:e.slice(0,rC)}function Al(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function kge(e,t){if(vge.has(e))try{const n={ts:Date.now(),event:e,sessionId:r0(t?.sessionId),status:r0(t?.status),operation:r0(t?.operation),seq:Al(t?.seq),durationMs:Al(t?.durationMs),messageCount:Al(t?.messageCount),contentCount:Al(t?.contentCount),mediaCount:Al(t?.mediaCount),sessionCount:Al(t?.sessionCount),workspaceCount:Al(t?.workspaceCount),promptId:r0(t?.promptId),zipBytes:Al(t?.zipBytes),errorName:r0(t?.errorName),errorCode:Al(t?.errorCode),requestId:r0(t?.requestId),phase:r0(t?.phase),httpStatus:Al(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Al(t?.line),col:Al(t?.col)},o=JSON.stringify(n),s=Z5.encode(o).byteLength;if(s>U5)return;for(y0.push(o),Qd+=s+(y0.length>1?1:0);y0.length>TN||Qd>U5;){const i=y0.shift();i!==void 0&&(Qd-=Z5.encode(i).byteLength,y0.length>0&&(Qd-=1))}}catch{return}}function gu(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return mge.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>Tm?`${i.slice(0,Tm)}… [+${i.length-Tm} chars]`:i}if(n!=="object")return String(e);if(t>=pge)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,Em).map(l=>gu(l,t+1));return e.length>Em&&i.push(`[+${e.length-Em} more items]`),i}const o={},s=Object.entries(e);for(const[i,l]of s.slice(0,Im))o[i]=hge.test(i)?"[redacted]":gu(l,t+1);return s.length>Im&&(o._truncatedKeys=s.length-Im),o}function N1(e){if(e===void 0)return;const t=gu(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>Am)return{_truncated:`detail JSON was ${n.length} chars; first ${Am} kept`,preview:n.slice(0,Am)}}catch{return"[unserializable detail]"}return t}function X3(e){pr()&&Aa({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:N1(e.body)}})}function Ac(e){if(!pr())return;const t=e.code!==0;Aa({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:N1(e.data)}})}function Da(e){pr()&&Aa({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Tc(e,t){pr()&&Aa({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:N1(t)})}function bge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;Aa({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:N1(e)})}function _ge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,l=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Aa({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${l.length>0?` (${l.join(" ")})`:""}`,detail:N1(t.payload)})}const xge={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Sge(e,t,n){pr()&&Aa({source:"client",kind:`client:${e}`,label:`${xge[e]} ${t}`,detail:N1(n)})}function ia(e,t){pr()&&Aa({source:"client",kind:"client:event",label:`· ${e}`,detail:N1(t)})}function _s(e,t){kge(e,t),Aa({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let $m=!1,J3=null;function Cge(){if($m)return()=>J3?.();$m=!0;const e=[];try{if(typeof window<"u"){const n=s=>{_s("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno})},o=s=>{const i=s.reason;_s("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i})};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(pr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{Sge(n,i.map(Mge).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(J3===t){for(const n of e.toReversed())n();J3=null,$m=!1}};return J3=t,t}function Mge(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function EN(e=h1){if(typeof document>"u")return;const t=new Blob([Age(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`pythinker-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Age(e=h1){return e===h1?Qc.join(` +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const r=l[1];if(t===l[0]){i(l);continue}if(e.external){const c=e.external.registry.get(l[0])?.id;if(t!==l[0]&&c){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(r.cycle){i(l);continue}if(r.count>1&&e.reused==="ref"){i(l);continue}}}function uN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=r=>{const a=e.seen.get(r);if(a.ref===null)return;const c=a.def??a.schema,u={...c},d=a.ref;if(a.ref=null,d){o(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),r._zod.parent===d)for(const k in c)k==="$ref"||k==="allOf"||k in u||delete c[k];if(h.$ref&&p.def)for(const k in c)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(c[k])===JSON.stringify(p.def[k])&&delete c[k]}const f=r._zod.parent;if(f&&f!==d){o(f);const p=e.seen.get(f);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(const h in c)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(c[h])===JSON.stringify(p.def[h])&&delete c[h]}e.override({zodSchema:r,jsonSchema:c,path:a.path??[]})};for(const r of[...e.seen.entries()].reverse())o(r[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const l=e.external?.defs??{};for(const r of e.seen.entries()){const a=r[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,l[a.defId]=a.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:q5(t,"input",e.processors),output:q5(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function bi(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return bi(o.element,n);if(o.type==="set")return bi(o.valueType,n);if(o.type==="lazy")return bi(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return bi(o.innerType,n);if(o.type==="intersection")return bi(o.left,n)||bi(o.right,n);if(o.type==="record"||o.type==="map")return bi(o.keyType,n)||bi(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:bi(o.in,n)||bi(o.out,n);if(o.type==="object"){for(const s in o.shape)if(bi(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(bi(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(bi(s,n))return!0;return!!(o.rest&&bi(o.rest,n))}return!1}const Jme=(e,t={})=>n=>{const o=aN({...n,processors:t});return As(e,o),cN(o,e),uN(o,e)},q5=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},l=aN({...s??{},target:i,io:t,processors:n});return As(e,l),cN(l,e),uN(l,e)},Qme={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},e8e=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:l,format:r,patterns:a,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof l=="number"&&(s.maxLength=l),r&&(s.format=Qme[r]??r,s.format===""&&delete s.format,r==="time"&&delete s.format),c&&(s.contentEncoding=c),a&&a.size>0){const u=[...a];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},t8e=(e,t,n,o)=>{const s=n,{minimum:i,maximum:l,format:r,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof r=="string"&&r.includes("int")?s.type="integer":s.type="number";const d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(l??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u:typeof i=="number"&&(s.minimum=i),f?p?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c:typeof l=="number"&&(s.maximum=l),typeof a=="number"&&(s.multipleOf=a)},n8e=(e,t,n,o)=>{n.type="boolean"},o8e=(e,t,n,o)=>{n.not={}},s8e=(e,t,n,o)=>{},i8e=(e,t,n,o)=>{const s=e._zod.def,i=H$(s.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},l8e=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const l of s.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},r8e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},a8e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},c8e=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:l,maximum:r}=e._zod.bag;typeof l=="number"&&(s.minItems=l),typeof r=="number"&&(s.maxItems=r),s.type="array",s.items=As(i.element,t,{...o,path:[...o.path,"items"]})},u8e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const l=i.shape;for(const c in l)s.properties[c]=As(l[c],t,{...o,path:[...o.path,"properties",c]});const r=new Set(Object.keys(l)),a=new Set([...r].filter(c=>{const u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=As(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},d8e=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,l=s.options.map((r,a)=>As(r,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=l:n.anyOf=l},f8e=(e,t,n,o)=>{const s=e._zod.def,i=As(s.left,t,{...o,path:[...o.path,"allOf",0]}),l=As(s.right,t,{...o,path:[...o.path,"allOf",1]}),r=c=>"allOf"in c&&Object.keys(c).length===1,a=[...r(i)?i.allOf:[i],...r(l)?l.allOf:[l]];n.allOf=a},p8e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const l=i.keyType,a=l._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const u=As(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=As(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=As(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const c=l._zod.values;if(c){const u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(s.required=u)}},h8e=(e,t,n,o)=>{const s=e._zod.def,i=As(s.innerType,t,o),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},m8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},g8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},v8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},y8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let l;try{l=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},w8e=(e,t,n,o)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?i?s.out:s.in:s.out;As(l,t,o);const r=t.seen.get(e);r.ref=l},k8e=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},dN=(e,t,n,o)=>{const s=e._zod.def;As(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},b8e=wt("ZodISODateTime",(e,t)=>{_he.init(e,t),Xo.init(e,t)});function _8e(e){return Tme(b8e,e)}const x8e=wt("ZodISODate",(e,t)=>{xhe.init(e,t),Xo.init(e,t)});function S8e(e){return Eme(x8e,e)}const C8e=wt("ZodISOTime",(e,t)=>{She.init(e,t),Xo.init(e,t)});function M8e(e){return Ime(C8e,e)}const A8e=wt("ZodISODuration",(e,t)=>{Che.init(e,t),Xo.init(e,t)});function T8e(e){return Lme(A8e,e)}const E8e=(e,t)=>{q$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>h6e(e,n)},flatten:{value:n=>p6e(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,M7,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,M7,2)}},isEmpty:{get(){return e.issues.length===0}}})},Wl=wt("ZodError",E8e,{Parent:Error}),I8e=Gv(Wl),L8e=Yv(Wl),$8e=Xp(Wl),N8e=Jp(Wl),z8e=v6e(Wl),B8e=y6e(Wl),R8e=w6e(Wl),P8e=k6e(Wl),F8e=b6e(Wl),j8e=_6e(Wl),O8e=x6e(Wl),H8e=S6e(Wl),tC=new WeakMap;function Tf(e,t,n){const o=Object.getPrototypeOf(e);let s=tC.get(o);if(s||(s=new Set,tC.set(o,s)),!s.has(t)){s.add(t);for(const i in n){const l=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const r=l.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(r){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:r})}})}}}const Yo=wt("ZodType",(e,t)=>(Go.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:q5(e,"input"),output:q5(e,"output")}}),e.toJSONSchema=Jme(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>I8e(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>$8e(e,n,o),e.parseAsync=async(n,o)=>L8e(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>N8e(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>z8e(e,n,o),e.decode=(n,o)=>B8e(e,n,o),e.encodeAsync=async(n,o)=>R8e(e,n,o),e.decodeAsync=async(n,o)=>P8e(e,n,o),e.safeEncode=(n,o)=>F8e(e,n,o),e.safeDecode=(n,o)=>j8e(e,n,o),e.safeEncodeAsync=async(n,o)=>O8e(e,n,o),e.safeDecodeAsync=async(n,o)=>H8e(e,n,o),Tf(e,"ZodType",{check(...n){const o=this.def;return this.clone(I1(o,{checks:[...o.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return L1(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(z7e(n,o))},superRefine(n,o){return this.check(B7e(n,o))},overwrite(n){return this.check(Vu(n))},optional(){return iC(this)},exactOptional(){return b7e(this)},nullable(){return lC(this)},nullish(){return iC(lC(this))},nonoptional(n){return A7e(this,n)},array(){return ro(this)},or(n){return p7e([this,n])},and(n){return g7e(this,n)},transform(n){return rC(this,w7e(n))},default(n){return S7e(this,n)},prefault(n){return M7e(this,n)},catch(n){return E7e(this,n)},pipe(n){return rC(this,n)},readonly(){return $7e(this)},describe(n){const o=this.clone();return Xd.add(o,{description:n}),o},meta(...n){if(n.length===0)return Xd.get(this);const o=this.clone();return Xd.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Xd.get(e)?.description},configurable:!0}),e)),fN=wt("_ZodString",(e,t)=>{Xv.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>e8e(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Tf(e,"_ZodString",{regex(...o){return this.check(Pme(...o))},includes(...o){return this.check(Ome(...o))},startsWith(...o){return this.check(Hme(...o))},endsWith(...o){return this.check(Dme(...o))},min(...o){return this.check(W5(...o))},max(...o){return this.check(lN(...o))},length(...o){return this.check(rN(...o))},nonempty(...o){return this.check(W5(1,...o))},lowercase(o){return this.check(Fme(o))},uppercase(o){return this.check(jme(o))},trim(){return this.check(Wme())},normalize(...o){return this.check(Vme(...o))},toLowerCase(){return this.check(qme())},toUpperCase(){return this.check(Ume())},slugify(){return this.check(Zme())}})}),D8e=wt("ZodString",(e,t)=>{Xv.init(e,t),fN.init(e,t),e.email=n=>e.check(rme(V8e,n)),e.url=n=>e.check(fme(W8e,n)),e.jwt=n=>e.check(Ame(i7e,n)),e.emoji=n=>e.check(pme(q8e,n)),e.guid=n=>e.check(XS(nC,n)),e.uuid=n=>e.check(ame(Y3,n)),e.uuidv4=n=>e.check(cme(Y3,n)),e.uuidv6=n=>e.check(ume(Y3,n)),e.uuidv7=n=>e.check(dme(Y3,n)),e.nanoid=n=>e.check(hme(U8e,n)),e.guid=n=>e.check(XS(nC,n)),e.cuid=n=>e.check(mme(Z8e,n)),e.cuid2=n=>e.check(gme(K8e,n)),e.ulid=n=>e.check(vme(G8e,n)),e.base64=n=>e.check(Sme(n7e,n)),e.base64url=n=>e.check(Cme(o7e,n)),e.xid=n=>e.check(yme(Y8e,n)),e.ksuid=n=>e.check(wme(X8e,n)),e.ipv4=n=>e.check(kme(J8e,n)),e.ipv6=n=>e.check(bme(Q8e,n)),e.cidrv4=n=>e.check(_me(e7e,n)),e.cidrv6=n=>e.check(xme(t7e,n)),e.e164=n=>e.check(Mme(s7e,n)),e.datetime=n=>e.check(_8e(n)),e.date=n=>e.check(S8e(n)),e.time=n=>e.check(M8e(n)),e.duration=n=>e.check(T8e(n))});function Tt(e){return lme(D8e,e)}const Xo=wt("ZodStringFormat",(e,t)=>{Ho.init(e,t),fN.init(e,t)}),V8e=wt("ZodEmail",(e,t)=>{phe.init(e,t),Xo.init(e,t)}),nC=wt("ZodGUID",(e,t)=>{dhe.init(e,t),Xo.init(e,t)}),Y3=wt("ZodUUID",(e,t)=>{fhe.init(e,t),Xo.init(e,t)}),W8e=wt("ZodURL",(e,t)=>{hhe.init(e,t),Xo.init(e,t)}),q8e=wt("ZodEmoji",(e,t)=>{mhe.init(e,t),Xo.init(e,t)}),U8e=wt("ZodNanoID",(e,t)=>{ghe.init(e,t),Xo.init(e,t)}),Z8e=wt("ZodCUID",(e,t)=>{vhe.init(e,t),Xo.init(e,t)}),K8e=wt("ZodCUID2",(e,t)=>{yhe.init(e,t),Xo.init(e,t)}),G8e=wt("ZodULID",(e,t)=>{whe.init(e,t),Xo.init(e,t)}),Y8e=wt("ZodXID",(e,t)=>{khe.init(e,t),Xo.init(e,t)}),X8e=wt("ZodKSUID",(e,t)=>{bhe.init(e,t),Xo.init(e,t)}),J8e=wt("ZodIPv4",(e,t)=>{Mhe.init(e,t),Xo.init(e,t)}),Q8e=wt("ZodIPv6",(e,t)=>{Ahe.init(e,t),Xo.init(e,t)}),e7e=wt("ZodCIDRv4",(e,t)=>{The.init(e,t),Xo.init(e,t)}),t7e=wt("ZodCIDRv6",(e,t)=>{Ehe.init(e,t),Xo.init(e,t)}),n7e=wt("ZodBase64",(e,t)=>{Ihe.init(e,t),Xo.init(e,t)}),o7e=wt("ZodBase64URL",(e,t)=>{$he.init(e,t),Xo.init(e,t)}),s7e=wt("ZodE164",(e,t)=>{Nhe.init(e,t),Xo.init(e,t)}),i7e=wt("ZodJWT",(e,t)=>{Bhe.init(e,t),Xo.init(e,t)}),pN=wt("ZodNumber",(e,t)=>{tN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>t8e(e,o,s),Tf(e,"ZodNumber",{gt(o,s){return this.check(QS(o,s))},gte(o,s){return this.check(Mm(o,s))},min(o,s){return this.check(Mm(o,s))},lt(o,s){return this.check(JS(o,s))},lte(o,s){return this.check(Cm(o,s))},max(o,s){return this.check(Cm(o,s))},int(o){return this.check(oC(o))},safe(o){return this.check(oC(o))},positive(o){return this.check(QS(0,o))},nonnegative(o){return this.check(Mm(0,o))},negative(o){return this.check(JS(0,o))},nonpositive(o){return this.check(Cm(0,o))},multipleOf(o,s){return this.check(eC(o,s))},step(o,s){return this.check(eC(o,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ln(e){return $me(pN,e)}const l7e=wt("ZodNumberFormat",(e,t)=>{Rhe.init(e,t),pN.init(e,t)});function oC(e){return Nme(l7e,e)}const r7e=wt("ZodBoolean",(e,t)=>{Phe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>n8e(e,n,o)});function Ef(e){return zme(r7e,e)}const a7e=wt("ZodUnknown",(e,t)=>{Fhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>s8e()});function Rs(){return Bme(a7e)}const c7e=wt("ZodNever",(e,t)=>{jhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>o8e(e,n,o)});function u7e(e){return Rme(c7e,e)}const d7e=wt("ZodArray",(e,t)=>{Ohe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>c8e(e,n,o,s),e.element=t.element,Tf(e,"ZodArray",{min(n,o){return this.check(W5(n,o))},nonempty(n){return this.check(W5(1,n))},max(n,o){return this.check(lN(n,o))},length(n,o){return this.check(rN(n,o))},unwrap(){return this.element}})});function ro(e,t){return Kme(d7e,e,t)}const f7e=wt("ZodObject",(e,t)=>{Dhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>u8e(e,n,o,s),_o(e,"shape",()=>t.shape),Tf(e,"ZodObject",{keyof(){return Oo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Rs()})},loose(){return this.clone({...this._zod.def,catchall:Rs()})},strict(){return this.clone({...this._zod.def,catchall:u7e()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return r6e(this,n)},safeExtend(n){return a6e(this,n)},merge(n){return c6e(this,n)},pick(n){return i6e(this,n)},omit(n){return l6e(this,n)},partial(...n){return u6e(mN,this,n[0])},required(...n){return d6e(gN,this,n[0])}})});function Pt(e,t){const n={type:"object",shape:e??{},...hn(t)};return new f7e(n)}const hN=wt("ZodUnion",(e,t)=>{sN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>d8e(e,n,o,s),e.options=t.options});function p7e(e,t){return new hN({type:"union",options:e,...hn(t)})}const h7e=wt("ZodDiscriminatedUnion",(e,t)=>{hN.init(e,t),Vhe.init(e,t)});function $1(e,t,n){return new h7e({type:"union",options:t,discriminator:e,...hn(n)})}const m7e=wt("ZodIntersection",(e,t)=>{Whe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>f8e(e,n,o,s)});function g7e(e,t){return new m7e({type:"intersection",left:e,right:t})}const sC=wt("ZodRecord",(e,t)=>{qhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>p8e(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function Jv(e,t,n){return!t||!t._zod?new sC({type:"record",keyType:Tt(),valueType:e,...hn(t)}):new sC({type:"record",keyType:e,valueType:t,...hn(n)})}const T7=wt("ZodEnum",(e,t)=>{Uhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>i8e(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const l of o)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new T7({...t,checks:[],...hn(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const l of o)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new T7({...t,checks:[],...hn(s),entries:i})}});function Oo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new T7({type:"enum",entries:n,...hn(t)})}const v7e=wt("ZodLiteral",(e,t)=>{Zhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>l8e(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Rn(e,t){return new v7e({type:"literal",values:Array.isArray(e)?e:[e],...hn(t)})}const y7e=wt("ZodTransform",(e,t)=>{Khe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>a8e(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new O$(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(sf(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(sf(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function w7e(e){return new y7e({type:"transform",transform:e})}const mN=wt("ZodOptional",(e,t)=>{iN.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>dN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function iC(e){return new mN({type:"optional",innerType:e})}const k7e=wt("ZodExactOptional",(e,t)=>{Ghe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>dN(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function b7e(e){return new k7e({type:"optional",innerType:e})}const _7e=wt("ZodNullable",(e,t)=>{Yhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>h8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function lC(e){return new _7e({type:"nullable",innerType:e})}const x7e=wt("ZodDefault",(e,t)=>{Xhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>g8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function S7e(e,t){return new x7e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():V$(t)}})}const C7e=wt("ZodPrefault",(e,t)=>{Jhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>v8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function M7e(e,t){return new C7e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():V$(t)}})}const gN=wt("ZodNonOptional",(e,t)=>{Qhe.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>m8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function A7e(e,t){return new gN({type:"nonoptional",innerType:e,...hn(t)})}const T7e=wt("ZodCatch",(e,t)=>{eme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>y8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function E7e(e,t){return new T7e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const I7e=wt("ZodPipe",(e,t)=>{tme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>w8e(e,n,o,s),e.in=t.in,e.out=t.out});function rC(e,t){return new I7e({type:"pipe",in:e,out:t})}const L7e=wt("ZodReadonly",(e,t)=>{nme.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>k8e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function $7e(e){return new L7e({type:"readonly",innerType:e})}const N7e=wt("ZodCustom",(e,t)=>{ome.init(e,t),Yo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>r8e(e,n)});function z7e(e,t={}){return Gme(N7e,e,t)}function B7e(e,t){return Yme(e,t)}const H0=Tt().min(1),Qv=Tt().min(1),If=Tt().min(1),D0=Tt().min(1),pl=Tt().min(1),R7e=/^[A-Za-z0-9._-]{1,128}$/;function P7e(e){return R7e.test(e)&&e!=="."&&e!==".."}const vN=$1("kind",[Pt({kind:Rn("user"),payload:Rs().optional()}),Pt({kind:Rn("cron"),taskId:D0.optional(),payload:Rs().optional()}),Pt({kind:Rn("task"),taskId:D0,payload:Rs().optional()}),Pt({kind:Rn("hook"),payload:Rs().optional()}),Pt({kind:Rn("compaction"),payload:Rs().optional()}),Pt({kind:Rn("side"),payload:Rs().optional()}),Pt({kind:Rn("other"),payload:Rs().optional()})]),F7e=Pt({inputTokens:ln().optional(),outputTokens:ln().optional(),cachedTokens:ln().optional(),cost:ln().optional()}),S2=Pt({inputOther:ln(),output:ln(),inputCacheRead:ln(),inputCacheCreation:ln()}),j7e=Pt({llmFirstTokenLatencyMs:ln().optional(),llmStreamDurationMs:ln().optional(),llmRequestBuildMs:ln().optional(),llmServerFirstTokenMs:ln().optional(),llmServerDecodeMs:ln().optional(),llmClientConsumeMs:ln().optional()}),O7e=Pt({failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:Tt(),errorMessage:Tt(),statusCode:ln().optional()}),yN=Oo(["queued","running","completed","failed","cancelled"]),H7e=Oo(["running","completed","interrupted","failed"]),D7e=Pt({kind:Rn("text"),frameId:If,role:Oo(["assistant","user"]),text:Tt(),attachmentIds:ro(Tt()).optional(),taskId:D0.optional(),promptIds:ro(Tt()).optional()}),V7e=Pt({kind:Rn("thinking"),frameId:If,text:Tt()}),W7e=Pt({agentId:pl,role:Oo(["child","member"]).optional()}),q7e=Pt({kind:Oo(["stdout","stderr","progress","status","custom"]),text:Tt().optional(),percent:ln().optional(),customKind:Tt().optional(),customData:Rs().optional()}),U7e=Pt({kind:Rn("tool"),frameId:If,toolCallId:Tt(),name:Tt(),view:Tt().optional(),state:Oo(["running","done","error"]),input:Rs().optional(),output:Rs().optional(),display:Rs().optional(),error:Tt().optional(),inputText:Tt().optional(),progress:q7e.optional(),taskId:D0.optional(),approvalId:Tt().optional(),todoId:Tt().optional(),agentRefs:ro(W7e).optional()}),e9=Pt({interactionId:Tt(),interactionKind:Oo(["approval","question"]),toolCallId:Tt().optional(),state:Oo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Rs().optional(),response:Rs().optional()}),Z7e=Pt({kind:Rn("notice"),frameId:If,level:Oo(["error","warning","info"]),source:Tt().optional(),message:Tt(),detail:Rs().optional()}),wN=$1("kind",[D7e,V7e,U7e,Z7e]),kN=Pt({kind:Rn("step"),stepId:Qv,turnId:H0,ordinal:ln().int(),state:H7e,frames:ro(wN),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:S2.optional(),finishReason:Tt().optional(),timing:j7e.optional(),retry:O7e.optional(),endReason:Tt().optional(),endMessage:Tt().optional()}),bN=Pt({kind:Rn("turn"),turnId:H0,ordinal:ln().int(),state:yN,origin:vN,prompt:Tt().optional(),attachmentIds:ro(Tt()).optional(),steps:ro(kN),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:F7e.optional(),durationMs:ln().optional(),error:Tt().optional()}),_N=Pt({kind:Rn("marker"),markerId:Tt(),marker:Tt(),payload:Rs().optional(),at:Tt().optional()}),xN=Pt({kind:Rn("taskref"),refId:Tt(),taskId:D0,at:Tt().optional()}),SN=$1("kind",[bN,_N,xN]),t9=Pt({taskId:D0,kind:Oo(["shell","subagent","tool","other"]),state:Oo(["running","completed","failed","timed_out","killed","lost"]),detached:Ef(),description:Tt().optional(),agentId:pl.optional(),outputTail:Tt(),startedAt:Tt().optional(),endedAt:Tt().optional(),resultSummary:Tt().optional(),error:Tt().optional(),stateReason:Tt().optional(),usage:S2.optional(),model:Tt().optional(),thinkingEffort:Tt().optional()}),CN=Pt({objective:Tt(),status:Oo(["active","paused","blocked","complete"]),completionCriterion:Tt().optional(),budgetUsed:ln().optional(),budgetLimit:ln().optional()}),K7e=Pt({plan:Pt({reviewPath:Tt().optional(),version:ln().optional()}).optional(),dynamic_workflow:Pt({trigger:Tt().optional()}).optional(),tower:Pt({}).optional()}),G7e=Pt({plan:Pt({reviewPath:Tt().optional(),version:ln().optional()}).nullable().optional(),dynamic_workflow:Pt({trigger:Tt().optional()}).nullable().optional(),tower:Pt({}).nullable().optional()}),Y7e=$1("kind",[Pt({kind:Rn("idle")}),Pt({kind:Rn("running"),turnId:ln(),step:ln(),stepId:Tt(),since:ln()}),Pt({kind:Rn("streaming"),turnId:ln(),step:ln(),stepId:Tt(),stream:Oo(["assistant","thinking","tool_call"]),toolCallId:Tt().optional(),toolName:Tt().optional(),since:ln()}),Pt({kind:Rn("tool_call"),turnId:ln(),step:ln(),toolCallId:Tt(),name:Tt(),since:ln()}),Pt({kind:Rn("retrying"),turnId:ln(),step:ln(),stepId:Tt(),failedAttempt:ln(),nextAttempt:ln(),maxAttempts:ln(),delayMs:ln(),errorName:Tt().optional(),statusCode:ln().optional(),since:ln()}),Pt({kind:Rn("awaiting_approval"),turnId:ln(),step:ln().optional(),approval:Rs().optional(),since:ln()}),Pt({kind:Rn("interrupted"),turnId:ln(),step:ln().optional(),reason:Oo(["aborted","max_steps","error"]),message:Tt().optional(),at:ln()}),Pt({kind:Rn("ended"),turnId:ln(),reason:Oo(["completed","cancelled","failed","blocked"]),durationMs:ln().optional(),at:ln()})]),X7e=Pt({byModel:Jv(Tt(),S2).optional(),currentTurn:S2.optional(),total:S2.optional()}),J7e=Pt({model:Tt().optional(),thinkingEffort:Tt().optional(),usage:X7e.optional(),contextTokens:ln().optional(),maxContextTokens:ln().optional(),contextUsage:ln().optional(),permission:Oo(["manual","yolo","auto"]).optional(),phase:Y7e.optional()}),n9=Pt({goal:CN.optional(),modes:K7e.optional(),activity:Oo(["idle","turn","disposing","unknown"]).optional(),agent:J7e.optional()}),Q7e=n9.extend({goal:CN.nullable().optional(),modes:G7e.optional()}),e6=Pt({attachmentId:Tt(),mediaType:Tt(),name:Tt().optional(),size:ln().optional(),source:$1("kind",[Pt({kind:Rn("url"),url:Tt()}),Pt({kind:Rn("file"),fileId:Tt()}),Pt({kind:Rn("session_media"),fileId:Tt()})]).optional(),placeholder:Tt().optional()}),ege=Pt({title:Tt(),status:Oo(["pending","in_progress","done"])}),o9=Pt({todoId:Tt(),items:ro(ege),updatedAt:Tt().optional()}),s9=Pt({promptId:Tt(),status:Oo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:Tt().optional(),content:Rs().optional(),createdAt:Tt(),finishedAt:Tt().optional(),steeredAt:Tt().optional()}),MN=Pt({items:ro(SN),tasks:ro(t9),interactions:ro(e9).default([]),attachments:ro(e6).default([]),todos:ro(o9).default([]),prompts:ro(s9).default([]),meta:n9,hasMoreOlder:Ef().optional()}),tge=bN.omit({steps:!0}),nge=kN.omit({frames:!0}),oge=$1("type",[Pt({type:Rn("frame"),turnId:H0,stepId:Qv,frameId:If}),Pt({type:Rn("task"),taskId:D0})]),i9=$1("op",[Pt({op:Rn("reset"),agentId:pl,snapshot:MN}),Pt({op:Rn("turn.upsert"),turn:tge}),Pt({op:Rn("step.upsert"),turnId:H0,step:nge}),Pt({op:Rn("frame.upsert"),turnId:H0,stepId:Qv,frame:wN}),Pt({op:Rn("append"),target:oge,offset:ln().int().nonnegative(),text:Tt()}),Pt({op:Rn("marker.upsert"),item:_N,beforeTurn:ln().int().optional()}),Pt({op:Rn("taskref.upsert"),item:xN,beforeTurn:ln().int().optional()}),Pt({op:Rn("task.upsert"),task:t9}),Pt({op:Rn("interaction.upsert"),interaction:e9}),Pt({op:Rn("attachment.upsert"),attachment:e6}),Pt({op:Rn("todo.upsert"),todo:o9}),Pt({op:Rn("prompt.upsert"),prompt:s9}),Pt({op:Rn("meta.merge"),meta:Q7e}),Pt({op:Rn("items.remove"),ids:ro(Tt())})]);Pt({agentId:pl,ops:ro(i9)});const sge=Oo(["off","turn","block","delta"]),Lu=ln().int().nonnegative(),ige=Jv(Tt(),sge);Pt({session_id:Tt().min(1),transcript:ige,transcript_since:Jv(Tt(),Lu).optional()});Pt({agent_id:pl,before_turn:Tt().min(1).optional(),after_turn:Tt().min(1).optional(),page_size:ln().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),P7e(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const lge=Pt({agentId:pl,type:Oo(["main","sub","independent"]).optional(),parentAgentId:pl.optional(),label:Tt().optional(),createdAt:Tt().optional(),disposedAt:Tt().optional()}),rge=Pt({agent_id:pl,items:ro(SN),has_more:Ef(),tasks:ro(t9),interactions:ro(e9).default([]),attachments:ro(e6).default([]),todos:ro(o9).default([]),prompts:ro(s9).default([]),meta:n9,agents:ro(lge),pending_interactions:ro(Tt()),seq:Lu.optional()});Pt({agent_id:pl,batches:ro(Pt({seq:Lu,ops:ro(i9)})),latest_seq:Lu,complete:Ef()});const age=Pt({turn_id:H0,ordinal:ln().int(),state:yN,origin:vN,prompt:Tt(),attachment_ids:ro(Tt()).optional(),started_at:Tt().optional()});Pt({agents:ro(Pt({agent_id:pl,messages:ro(age),attachments:ro(e6).default([])}))});const cge=Pt({state:Oo(["pending","approved","rejected","cancelled"]),selected_option:Tt().optional(),feedback:Tt().optional()}),uge=Pt({tool_call_id:Tt(),turn_id:H0,source:Oo(["interaction","display","output"]),plan:Tt(),path:Tt().optional(),options:ro(Pt({label:Tt(),description:Tt().optional()})).optional(),review:cge.optional()});Pt({agent_id:pl,plans:ro(uge)});const dge=Pt({agent_id:pl,snapshot:MN,has_more_older:Ef(),seq:Lu.optional()}),fge=Pt({agent_id:pl,ops:ro(i9),seq:Lu.optional()}),AN=dge.extend({type:Rn("transcript.reset")}),TN=fge.extend({type:Rn("transcript.ops")});$1("type",[AN,TN]);const pge=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],EN=500,U5=256*1024,aC=200,Am=16384,Tm=500,Em=50,Im=50,hge=6,mge=/api[_-]?key|authorization|token|secret|password|cookie|credential/i,gge=/^[A-Za-z0-9+/=_-]{200,}$/;let Lm=null;function pr(){if(Lm!==null)return Lm;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=ls(dn.debug)==="1"),Lm=e,e}const h1=[],Qc=[];let Jd=0;const y0=[];let Qd=0,vge=1;const Z5=new TextEncoder,yge=new Set(pge),l9=V(0),e2=Uo(!1);function wge(){return h1}function kge(){h1.length=0,Qc.length=0,Jd=0,y0.length=0,Qd=0,l9.value++}function Aa(e){if(!e2.value){try{const t={id:vge++,ts:Date.now(),source:e.source,kind:String(gu(e.kind)),label:String(gu(e.label)),sessionId:e.sessionId===void 0?void 0:String(gu(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:N1(e.detail)},n=JSON.stringify(t),o=Z5.encode(n).byteLength;if(o>U5)return;for(h1.push(t),Qc.push(n),Jd+=o+(Qc.length>1?1:0);h1.length>EN||Jd>U5;){const s=Qc.shift();h1.shift(),s!==void 0&&(Jd-=Z5.encode(s).byteLength,Qc.length>0&&(Jd-=1))}}catch{return}l9.value++}}function r0(e){if(typeof e=="string")return e.length<=aC?e:e.slice(0,aC)}function Al(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function bge(e,t){if(yge.has(e))try{const n={ts:Date.now(),event:e,sessionId:r0(t?.sessionId),status:r0(t?.status),operation:r0(t?.operation),seq:Al(t?.seq),durationMs:Al(t?.durationMs),messageCount:Al(t?.messageCount),contentCount:Al(t?.contentCount),mediaCount:Al(t?.mediaCount),sessionCount:Al(t?.sessionCount),workspaceCount:Al(t?.workspaceCount),promptId:r0(t?.promptId),zipBytes:Al(t?.zipBytes),errorName:r0(t?.errorName),errorCode:Al(t?.errorCode),requestId:r0(t?.requestId),phase:r0(t?.phase),httpStatus:Al(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Al(t?.line),col:Al(t?.col)},o=JSON.stringify(n),s=Z5.encode(o).byteLength;if(s>U5)return;for(y0.push(o),Qd+=s+(y0.length>1?1:0);y0.length>EN||Qd>U5;){const i=y0.shift();i!==void 0&&(Qd-=Z5.encode(i).byteLength,y0.length>0&&(Qd-=1))}}catch{return}}function gu(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return gge.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>Tm?`${i.slice(0,Tm)}… [+${i.length-Tm} chars]`:i}if(n!=="object")return String(e);if(t>=hge)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,Em).map(l=>gu(l,t+1));return e.length>Em&&i.push(`[+${e.length-Em} more items]`),i}const o={},s=Object.entries(e);for(const[i,l]of s.slice(0,Im))o[i]=mge.test(i)?"[redacted]":gu(l,t+1);return s.length>Im&&(o._truncatedKeys=s.length-Im),o}function N1(e){if(e===void 0)return;const t=gu(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>Am)return{_truncated:`detail JSON was ${n.length} chars; first ${Am} kept`,preview:n.slice(0,Am)}}catch{return"[unserializable detail]"}return t}function X3(e){pr()&&Aa({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:N1(e.body)}})}function Ac(e){if(!pr())return;const t=e.code!==0;Aa({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:N1(e.data)}})}function Da(e){pr()&&Aa({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Tc(e,t){pr()&&Aa({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:N1(t)})}function _ge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;Aa({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:N1(e)})}function xge(e){if(!pr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,l=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Aa({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${l.length>0?` (${l.join(" ")})`:""}`,detail:N1(t.payload)})}const Sge={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Cge(e,t,n){pr()&&Aa({source:"client",kind:`client:${e}`,label:`${Sge[e]} ${t}`,detail:N1(n)})}function ia(e,t){pr()&&Aa({source:"client",kind:"client:event",label:`· ${e}`,detail:N1(t)})}function _s(e,t){bge(e,t),Aa({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let $m=!1,J3=null;function Mge(){if($m)return()=>J3?.();$m=!0;const e=[];try{if(typeof window<"u"){const n=s=>{_s("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno})},o=s=>{const i=s.reason;_s("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i})};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(pr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{Cge(n,i.map(Age).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(J3===t){for(const n of e.toReversed())n();J3=null,$m=!1}};return J3=t,t}function Age(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function IN(e=h1){if(typeof document>"u")return;const t=new Blob([Tge(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`pythinker-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Tge(e=h1){return e===h1?Qc.join(` `):e.map(t=>JSON.stringify(t)).join(` -`)}function Tge(){return y0.join(` -`)}function IN(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function T7(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function tr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:IN(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function C2(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function aC(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url,id:e.id}}function l9(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:aC(e.source)};case"video":return{type:"video",source:aC(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function E7(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(l9),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function Ege(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url,id:t.id},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function Ige(e){return{content:e.content.map(Ege),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,dynamic_workflow_mode:e.dynamicWorkflowMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function Lge(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function LN(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function $ge(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function Nge(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map($ge),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function $N(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(Nge),createdAt:e.created_at}}function zge(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function Bge(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=zge(o);return{answers:t,method:e.method,note:e.note}}const Rge=["spawn","fork","resume"],Pge=["requested","default","fork-inherit","resume-existing"],Fge=["caller","policy-default","policy-pool","policy-force","fork-inherit","resume-existing"],jge=["inherit","default","pool","force"],Oge=["config","default"],Hge=["master-env","env","config","default"];function Ec(e,t){return typeof t=="string"&&e.includes(t)?t:void 0}function cC(e){return typeof e=="string"&&e.length>0?e:void 0}function NN(e,t){const n=Ec(Rge,e[t.operation]),o=Ec(Pge,e[t.profileSource]),s=Ec(Fge,e[t.modelSource]),i=Ec(jge,e[t.policyMode]),l=Ec(Oge,e[t.policySource]),r=Ec(Hge,e[t.featureSource]),a=cC(e[t.routingEnvRevision]),c=cC(e[t.routeDecision]);if(!(n===void 0||o===void 0||s===void 0||i===void 0||l===void 0||r===void 0||a===void 0||c===void 0))return{operation:n,profileSource:o,modelSource:s,policyMode:i,policySource:l,featureSource:r,routingEnvRevision:a,routeDecision:c}}const Dge={operation:"operation",profileSource:"profile_source",modelSource:"model_source",policyMode:"policy_mode",policySource:"policy_source",featureSource:"feature_source",routingEnvRevision:"routing_env_revision",routeDecision:"route_decision"},Vge={operation:"operation",profileSource:"profileSource",modelSource:"modelSource",policyMode:"policyMode",policySource:"policySource",featureSource:"featureSource",routingEnvRevision:"resolvedFromRoutingEnvironmentRevision",routeDecision:"routeDecisionFingerprint"};function Wge(e){if(!(typeof e!="object"||e===null))return NN(e,Dge)}function uC(e){if(!(typeof e!="object"||e===null))return NN(e,Vge)}function Nm(e){switch(e.mode){case"default":return{mode:"default",defaultModel:e.default_model??"",defaultEffort:e.default_effort};case"pool":return{mode:"pool",defaultModel:e.default_model??"",models:e.models??{},defaultEffort:e.default_effort};case"force":return{mode:"force",defaultModel:e.default_model??"",defaultEffort:e.default_effort};default:return{mode:"inherit"}}}function qge(e){switch(e.mode){case"default":return{mode:"default",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};case"pool":return{mode:"pool",default_model:e.defaultModel,models:e.models,default_effort:e.defaultEffort||void 0};case"force":return{mode:"force",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};default:return{mode:"inherit"}}}function dC(e){return{policy:Nm(e.policy),resourceVersion:e.resource_version,configuredPolicy:Nm(e.effective.configured_policy),effectivePolicy:Nm(e.effective.effective_policy),policySource:e.effective.policy_source,feature:{enabled:e.effective.feature.enabled,source:e.effective.feature.source}}}function L4(e){return{id:e.id,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,agentId:e.agent_id,model:e.model,thinkingEffort:e.thinking_effort,routing:Wge(e.routing),currentRoutingEnvRevision:e.current_routing_env_revision,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,dynamicWorkflowIndex:e.dynamic_workflow_index,swarmIndex:e.swarm_index,runInBackground:e.run_in_background}}function fC(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function Va(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ic(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Tl(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function zN(e){if(!e||typeof e!="object")return null;const t=e,n=Va(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:Va(t,"goalId")??Va(t,"goal_id")??"goal",objective:Va(t,"objective")??"",completionCriterion:Va(t,"completionCriterion")??Va(t,"completion_criterion"),status:n,turnsUsed:Ic(t,"turnsUsed")??Ic(t,"turns_used")??0,tokensUsed:Ic(t,"tokensUsed")??Ic(t,"tokens_used")??0,wallClockMs:Ic(t,"wallClockMs")??Ic(t,"wall_clock_ms")??0,terminalReason:Va(t,"terminalReason")??Va(t,"terminal_reason"),budget:{tokenBudget:Tl(s,"tokenBudget")??Tl(s,"token_budget"),remainingTokens:Tl(s,"remainingTokens")??Tl(s,"remaining_tokens"),turnBudget:Tl(s,"turnBudget")??Tl(s,"turn_budget"),remainingTurns:Tl(s,"remainingTurns")??Tl(s,"remaining_turns"),wallClockBudgetMs:Tl(s,"wallClockBudgetMs")??Tl(s,"wall_clock_budget_ms"),remainingWallClockMs:Tl(s,"remainingWallClockMs")??Tl(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function Uge(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:tr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:tr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.session.archived":return{type:"sessionArchived",sessionId:t.session_id,workspaceId:t.payload.workspace_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:C2(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:C2(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:IN(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=zN(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:E7(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(l9),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:LN(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:$N(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:L4(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:I7(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function Zge(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort,adaptiveThinking:e.adaptive_thinking}}function zm(e){return{loginId:e.login_id,state:e.state,defaultModel:e.default_model,message:e.message}}function $d(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function BN(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function Kge(e){return{provider:BN(e.provider),modelsImported:e.models_imported}}function Gge(e){return Array.isArray(e)?e.map(t=>({id:t.id,enabled:t.enabled===!0,source:t.source,configValue:typeof t.config_value=="boolean"?t.config_value:void 0,defaultEnabled:t.default_enabled===!0,externallyControlled:t.externally_controlled===!0,overridden:t.overridden===!0})):[]}function I7(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultThinking:e.default_thinking,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,disabledSkills:e.disabled_skills,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry}}function Yge(e){return e.session_id}function Xge(e){return e.seq}const Jge="main",Qge=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function ta(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function eve(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}const L7=new Map;function tve(e){return L7.get(e)}function pC(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0}}function as(e,t){const n=e[t];return typeof n=="string"?n:void 0}function a0(e){return e.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}function d0(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function El(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function nve(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=as(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=as(t,"goalId")??as(t,"goal_id")??"goal",l=as(t,"objective")??"";return{goalId:i,objective:l,completionCriterion:as(t,"completionCriterion")??as(t,"completion_criterion"),status:s,turnsUsed:d0(t,"turnsUsed")??d0(t,"turns_used")??0,tokensUsed:d0(t,"tokensUsed")??d0(t,"tokens_used")??0,wallClockMs:d0(t,"wallClockMs")??d0(t,"wall_clock_ms")??0,terminalReason:as(t,"terminalReason")??as(t,"terminal_reason"),budget:{tokenBudget:El(o,"tokenBudget")??El(o,"token_budget"),remainingTokens:El(o,"remainingTokens")??El(o,"remaining_tokens"),turnBudget:El(o,"turnBudget")??El(o,"turn_budget"),remainingTurns:El(o,"remainingTurns")??El(o,"remaining_turns"),wallClockBudgetMs:El(o,"wallClockBudgetMs")??El(o,"wall_clock_budget_ms"),remainingWallClockMs:El(o,"remainingWallClockMs")??El(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function w0(e,t,n,o,s=[]){if(typeof n!="string"||n.length===0)return null;const i=e.subagentMeta.get(n)??{id:n,sessionId:t,kind:"subagent",description:"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},r=(i.status==="completed"||i.status==="failed"||i.status==="cancelled")&&o.status==="running"?{...o,status:i.status,subagentPhase:i.subagentPhase,startedAt:i.startedAt,completedAt:i.completedAt,outputPreview:i.outputPreview,outputBytes:i.outputBytes,suspendedReason:i.suspendedReason}:o,a=Object.fromEntries(Object.entries(r).filter(([,u])=>u!==void 0)),c={...i,...a,id:n,agentId:n,sessionId:t,kind:"subagent"};for(const u of s)u in a||delete c[u];return e.subagentMeta.set(n,c),c}function ove(e,t){if(e==="turn.step.started")return null;if(e==="tool.use"||e==="tool.call.started"){const n=as(t,"name")??as(t,"toolName")??"tool",o=ni(sve(n)),s=ive(n,t.args??t.input);return s?`Calling ${o}: ${s}`:`Calling ${o}`}if(e==="tool.progress"){const n=t.update;if(n&&typeof n=="object"){const s=as(n,"text");if(s)return Bm(s);const i=as(n,"message");if(i)return Bm(i)}const o=as(t,"message");if(o)return Bm(o)}return null}function sve(e){return e.replace(/_\d+$/,"")}const hC=2e3;function Bm(e){return e.length>hC?`${e.slice(0,hC)}…`:e}function ive(e,t){if(t==null)return"";const n=typeof t=="string"?t:JSON.stringify(t);return ka(e,n)}function lve(e,t,n,o,s,i){if(i.has(n)&&o==="turn.step.started")return[];if(o==="assistant.delta"){const u=as(s,"delta");if(!u)return[];const d=e.subagentMeta.get(n),f=w0(e,t,n,{status:"running",subagentPhase:"working",startedAt:d?.startedAt??new Date().toISOString()}),p=[];return f&&p.push({type:"taskCreated",sessionId:t,task:f}),p.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:u,stream:"stdout",kind:"text"}),p}const l=ove(o,s);if(l===null||l.length===0)return[];const r=e.subagentMeta.get(n),a=w0(e,t,n,{status:"running",subagentPhase:"working",startedAt:r?.startedAt??new Date().toISOString()}),c=[];return a&&c.push({type:"taskCreated",sessionId:t,task:a}),c.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:l,stream:"stdout"}),c}function Lc(e){return{...e,content:e.content.map(t=>({...t}))}}function mC(e,t,n){const o={id:ta("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function rve(e,t,n,o,s,i){const l={id:o,sessionId:t,role:"user",content:s,createdAt:i,promptId:n};return e.messages.push(l),l}function ave(e){return Array.isArray(e)?e.map(t=>l9(t)):[]}function gC(e,t,n,o){const s=e.messages.find(l=>l.id===t);if(!s)return-1;const i=s.content.at(-1);return i&&i.type===n?(n==="text"?i.text+=o:i.thinking+=o,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:o}:{type:"thinking",thinking:o}),s.content.length-1)}function cve(e,t,n,o,s,i){const l=e.messages.find(r=>r.id===t);l&&l.content.push({type:"toolUse",toolCallId:n,toolName:o,input:s,outputLines:i})}function uve(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",i=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return i.length>0?{outputChunk:i,stream:s}:null}function vC(e,t){e.messages.find(n=>n.id===t)}function dve(e,t,n,o,s,i){const l={id:ta("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:o,isError:s}],createdAt:new Date().toISOString(),promptId:i};return e.messages.push(l),l}function Nd(e,t){return e.messages.find(n=>n.id===t)}function yC(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function fve(){const e=new Map,t=new Set;function n(u){let d=e.get(u);return d||(d=pC(),e.set(u,d)),d}function o(u){e.set(u,pC())}function s(u){t.add(u)}function i(u,d){const f=n(u);f.currentPromptId=d}function l(u,d){o(u);const f=n(u),p=d.promptId??ta("pr_");f.currentPromptId=p,f.turnPromptId.set(d.turnId,p);const h=mC(f,u,p);d.thinkingText.length>0&&h.content.push({type:"thinking",thinking:d.thinkingText}),d.assistantText.length>0&&h.content.push({type:"text",text:d.assistantText});for(const m of d.runningTools){const k=typeof m.lastProgress?.text=="string"&&m.lastProgress.text.length>0?[m.lastProgress.text]:void 0;h.content.push({type:"toolUse",toolCallId:m.toolCallId,toolName:m.name,input:m.args??{},outputLines:k}),f.toolStartTimes.set(m.toolCallId,Date.now())}return f.currentAssistantMsgId=h.id,f.turnTextLen=d.assistantText.length,f.turnThinkLen=d.thinkingText.length,[{type:"messageCreated",message:Lc(h)}]}function r(u,d,f,p){try{return c(u,d,f,p)}catch(h){return console.error("[agentProjector] Error projecting event:",u,h instanceof Error?h.message:h),[]}}function a(u,d){return d===void 0?"append":du?"gap":"append"}function c(u,d,f,p){const h=n(f),m=d,k=[],x=m?.agentId;if(typeof x=="string"&&x!==Jge){const y=t.has(x);if(y&&(u==="thinking.delta"||u==="assistant.delta")){const w=m?.delta??"";return w?[{type:"agentDelta",sessionId:f,agentId:x,delta:{[u==="thinking.delta"?"thinking":"text"]:w}}]:[]}if(y&&u==="turn.ended")return[{type:"agentTurnEnded",sessionId:f,agentId:x,reason:m?.reason}];if(Qge.has(u))return lve(h,f,x,u,m??{},t)}switch(u){case"session.meta.updated":{const y=m?.patch?.title??m?.title,w=m?.patch?.lastPrompt,_={};typeof y=="string"&&y.length>0&&(_.title=y),typeof w=="string"&&(_.lastPrompt=w),(_.title!==void 0||_.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:f,..._});break}case"prompt.submitted":{const y=m?.promptId,w=m?.userMessageId;if(!y||!w)break;const _=ave(m?.content);if(_.length===0)break;h.currentPromptId=y;const A=rve(h,f,y,w,_,typeof m?.createdAt=="string"?m.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:Lc(A)});break}case"turn.started":{const y=m?.turnId,w=h.currentPromptId??ta("pr_");h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w),h.turnTextLen=0,h.turnThinkLen=0,L7.delete(f),k.push({type:"turnActiveChanged",sessionId:f,active:!0});break}case"turn.step.started":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;if(w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w)),h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId!==void 0){const A=h.retryReuseMsgId;if(h.retryReuseMsgId=void 0,Nd(h,A)!==void 0){h.currentAssistantMsgId=A;break}}const _=mC(h,f,w);h.currentAssistantMsgId=_.id,k.push({type:"messageCreated",message:Lc(_)});break}case"thinking.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnThinkLen>0&&(h.turnThinkLen=0);const _=a(h.turnThinkLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const A=gC(h,y,"thinking",w);if(A<0)break;h.turnThinkLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:A,delta:{thinking:w}});break}case"assistant.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnTextLen>0&&(h.turnTextLen=0);const _=a(h.turnTextLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const A=gC(h,y,"text",w);if(A<0)break;h.turnTextLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:A,delta:{text:w}});break}case"tool.use":case"tool.call.started":{const y=h.currentAssistantMsgId,w=m?.turnId,_=h.turnPromptId.get(w)??h.currentPromptId;if(!y||!_)break;const A=m?.toolCallId,P=m?.name??m?.toolName??"",z=m?.args??m?.input??{};cve(h,y,A,P,z);const L=Nd(h,y);L&&L.content.length-1,h.toolStartTimes.set(A,Date.now()),L&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:L.content.map(E=>({...E})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const y=m?.toolCallId,w=uve(m??{});y&&w&&k.push({type:"toolOutput",sessionId:f,toolCallId:y,outputChunk:w.outputChunk,stream:w.stream});break}case"tool.result":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w));const _=m?.toolCallId,A=m?.output,P=m?.isError??!1;h.toolStartTimes.get(_)??Date.now(),h.toolStartTimes.delete(_);const z=dve(h,f,_,A,P,w);k.push({type:"messageCreated",message:Lc(z)}),h.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const y=h.currentAssistantMsgId,w=eve(m?.usage);if(h.totalInput+=w.input,h.totalOutput+=w.output,h.totalCacheRead+=w.cacheRead,h.totalCacheCreate+=w.cacheCreate,y){vC(h,y);const _=Nd(h,y);_&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:_.content.map(A=>({...A})),status:"completed"})}break}case"agent.status.updated":{m?.model&&(h.model=m.model),m?.contextTokens!==void 0&&(h.contextTokens=m.contextTokens),m?.maxContextTokens!==void 0&&(h.contextLimit=m.maxContextTokens),k.push({type:"sessionUsageUpdated",sessionId:f,usage:yC(h),model:h.model||void 0,dynamicWorkflowMode:m?.dynamicWorkflowMode===!0?!0:m?.dynamicWorkflowMode===!1?!1:void 0,planMode:m?.planMode===!0?!0:m?.planMode===!1?!1:void 0,thinking:typeof m?.thinkingEffort=="string"&&m.thinkingEffort.length>0?m.thinkingEffort:void 0});break}case"turn.ended":{const y=h.currentAssistantMsgId,w=m?.reason??"completed",_=d0(m??{},"durationMs");if(k.push({type:"turnActiveChanged",sessionId:f,active:!1,reason:m?.reason}),y){vC(h,y);const P=Nd(h,y);P&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:P.content.map(z=>({...z})),status:w==="failed"||w==="blocked"?"error":"completed",durationMs:_})}h.turnCount++;const A=yC(h);k.push({type:"sessionUsageUpdated",sessionId:f,usage:A}),h.currentAssistantMsgId=void 0,h.currentPromptId=void 0,h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId=void 0;break}case"prompt.completed":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptCompleted",sessionId:f,promptId:y,reason:m?.reason??"completed"});break}case"prompt.aborted":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptAborted",sessionId:f,promptId:y});break}case"turn.step.retrying":{const y=h.currentAssistantMsgId;if(y!==void 0){const w=Nd(h,y);w!==void 0&&(w.content=w.content.filter(_=>_.type!=="text"&&_.type!=="thinking"&&_.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:f,messageId:y,content:w.content.map(_=>({..._})),status:"pending"}),h.retryReuseMsgId=y)}h.turnTextLen=0,h.turnThinkLen=0,h.toolStartTimes.clear();break}case"turn.step.interrupted":{h.currentAssistantMsgId=void 0,h.retryReuseMsgId=void 0;const y=typeof m?.reason=="string"&&m.reason.length>0?m.reason:"error",w=typeof m?.message=="string"&&m.message.length>0?m.message:void 0;L7.set(f,{reason:y,message:w,turnId:typeof m?.turnId=="number"?m.turnId:void 0,at:Date.now()});break}case"subagent.spawned":{const y=typeof m?.subagentId=="string"&&m.subagentId.length>0?m.subagentId:ta("task_"),w={id:y,agentId:y,sessionId:f,kind:"subagent",description:typeof m?.description=="string"?m.description:m?.subagentName??"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof m?.subagentName=="string"?m.subagentName:void 0,model:typeof m?.model=="string"?m.model:void 0,thinkingEffort:typeof m?.thinkingEffort=="string"?m.thinkingEffort:void 0,routing:uC(m?.routing),currentRoutingEnvRevision:typeof m?.currentRoutingEnvironmentRevision=="string"?m.currentRoutingEnvironmentRevision:void 0,parentToolCallId:typeof m?.parentToolCallId=="string"?m.parentToolCallId:void 0,dynamicWorkflowIndex:typeof m?.dynamicWorkflowIndex=="number"?m.dynamicWorkflowIndex:void 0,runInBackground:m?.runInBackground===!0};h.subagentMeta.set(w.id,w),k.push({type:"taskCreated",sessionId:f,task:w});break}case"subagent.started":{const y=w0(h,f,m?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.suspended":{const y=w0(h,f,m?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof m?.reason=="string"?m.reason:void 0},["suspendedReason"]);y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.completed":{const y=typeof m?.resultSummary=="string"?m.resultSummary:void 0,w=w0(h,f,m?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"completed",outputPreview:y});break}case"subagent.failed":{const y=typeof m?.error=="string"?m.error:void 0,w=w0(h,f,m?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"failed",outputPreview:y});break}case"task.notified":{const y=as(m??{},"notificationType"),w=as(m??{},"sourceKind"),_=as(m??{},"sourceId");if(!y||!w||!_)break;const A=y.startsWith("task.")?y.slice(5):y,P=`task:${_}:${A}`,z=as(m??{},"title")??"",L=as(m??{},"severity")??"",E=as(m??{},"body")??"",T=` +`)}function Ege(){return y0.join(` +`)}function LN(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function E7(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function tr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:LN(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function C2(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function cC(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url,id:e.id}}function r9(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:cC(e.source)};case"video":return{type:"video",source:cC(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function I7(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(r9),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function Ige(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url,id:t.id},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function Lge(e){return{content:e.content.map(Ige),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,dynamic_workflow_mode:e.dynamicWorkflowMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function $ge(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function $N(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function Nge(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function zge(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(Nge),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function NN(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(zge),createdAt:e.created_at}}function Bge(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function Rge(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=Bge(o);return{answers:t,method:e.method,note:e.note}}const Pge=["spawn","fork","resume"],Fge=["requested","default","fork-inherit","resume-existing"],jge=["caller","policy-default","policy-pool","policy-force","fork-inherit","resume-existing"],Oge=["inherit","default","pool","force"],Hge=["config","default"],Dge=["master-env","env","config","default"];function Ec(e,t){return typeof t=="string"&&e.includes(t)?t:void 0}function uC(e){return typeof e=="string"&&e.length>0?e:void 0}function zN(e,t){const n=Ec(Pge,e[t.operation]),o=Ec(Fge,e[t.profileSource]),s=Ec(jge,e[t.modelSource]),i=Ec(Oge,e[t.policyMode]),l=Ec(Hge,e[t.policySource]),r=Ec(Dge,e[t.featureSource]),a=uC(e[t.routingEnvRevision]),c=uC(e[t.routeDecision]);if(!(n===void 0||o===void 0||s===void 0||i===void 0||l===void 0||r===void 0||a===void 0||c===void 0))return{operation:n,profileSource:o,modelSource:s,policyMode:i,policySource:l,featureSource:r,routingEnvRevision:a,routeDecision:c}}const Vge={operation:"operation",profileSource:"profile_source",modelSource:"model_source",policyMode:"policy_mode",policySource:"policy_source",featureSource:"feature_source",routingEnvRevision:"routing_env_revision",routeDecision:"route_decision"},Wge={operation:"operation",profileSource:"profileSource",modelSource:"modelSource",policyMode:"policyMode",policySource:"policySource",featureSource:"featureSource",routingEnvRevision:"resolvedFromRoutingEnvironmentRevision",routeDecision:"routeDecisionFingerprint"};function qge(e){if(!(typeof e!="object"||e===null))return zN(e,Vge)}function dC(e){if(!(typeof e!="object"||e===null))return zN(e,Wge)}function Nm(e){switch(e.mode){case"default":return{mode:"default",defaultModel:e.default_model??"",defaultEffort:e.default_effort};case"pool":return{mode:"pool",defaultModel:e.default_model??"",models:e.models??{},defaultEffort:e.default_effort};case"force":return{mode:"force",defaultModel:e.default_model??"",defaultEffort:e.default_effort};default:return{mode:"inherit"}}}function Uge(e){switch(e.mode){case"default":return{mode:"default",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};case"pool":return{mode:"pool",default_model:e.defaultModel,models:e.models,default_effort:e.defaultEffort||void 0};case"force":return{mode:"force",default_model:e.defaultModel,default_effort:e.defaultEffort||void 0};default:return{mode:"inherit"}}}function fC(e){return{policy:Nm(e.policy),resourceVersion:e.resource_version,configuredPolicy:Nm(e.effective.configured_policy),effectivePolicy:Nm(e.effective.effective_policy),policySource:e.effective.policy_source,feature:{enabled:e.effective.feature.enabled,source:e.effective.feature.source}}}function L4(e){return{id:e.id,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,agentId:e.agent_id,model:e.model,thinkingEffort:e.thinking_effort,routing:qge(e.routing),currentRoutingEnvRevision:e.current_routing_env_revision,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,dynamicWorkflowIndex:e.dynamic_workflow_index,swarmIndex:e.swarm_index,runInBackground:e.run_in_background}}function pC(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function Va(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ic(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Tl(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function BN(e){if(!e||typeof e!="object")return null;const t=e,n=Va(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:Va(t,"goalId")??Va(t,"goal_id")??"goal",objective:Va(t,"objective")??"",completionCriterion:Va(t,"completionCriterion")??Va(t,"completion_criterion"),status:n,turnsUsed:Ic(t,"turnsUsed")??Ic(t,"turns_used")??0,tokensUsed:Ic(t,"tokensUsed")??Ic(t,"tokens_used")??0,wallClockMs:Ic(t,"wallClockMs")??Ic(t,"wall_clock_ms")??0,terminalReason:Va(t,"terminalReason")??Va(t,"terminal_reason"),budget:{tokenBudget:Tl(s,"tokenBudget")??Tl(s,"token_budget"),remainingTokens:Tl(s,"remainingTokens")??Tl(s,"remaining_tokens"),turnBudget:Tl(s,"turnBudget")??Tl(s,"turn_budget"),remainingTurns:Tl(s,"remainingTurns")??Tl(s,"remaining_turns"),wallClockBudgetMs:Tl(s,"wallClockBudgetMs")??Tl(s,"wall_clock_budget_ms"),remainingWallClockMs:Tl(s,"remainingWallClockMs")??Tl(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function Zge(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:tr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:tr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.session.archived":return{type:"sessionArchived",sessionId:t.session_id,workspaceId:t.payload.workspace_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:C2(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:C2(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:LN(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=BN(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:I7(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(r9),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:$N(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:NN(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:L4(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:L7(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function Kge(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort,adaptiveThinking:e.adaptive_thinking}}function zm(e){return{loginId:e.login_id,state:e.state,defaultModel:e.default_model,message:e.message}}function $d(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function RN(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function Gge(e){return{provider:RN(e.provider),modelsImported:e.models_imported}}function Yge(e){return Array.isArray(e)?e.map(t=>({id:t.id,enabled:t.enabled===!0,source:t.source,configValue:typeof t.config_value=="boolean"?t.config_value:void 0,defaultEnabled:t.default_enabled===!0,externallyControlled:t.externally_controlled===!0,overridden:t.overridden===!0})):[]}function L7(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultThinking:e.default_thinking,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,disabledSkills:e.disabled_skills,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry}}function Xge(e){return e.session_id}function Jge(e){return e.seq}const Qge="main",eve=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function ta(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function tve(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}const $7=new Map;function nve(e){return $7.get(e)}function hC(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0}}function as(e,t){const n=e[t];return typeof n=="string"?n:void 0}function a0(e){return e.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}function d0(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function El(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function ove(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=as(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=as(t,"goalId")??as(t,"goal_id")??"goal",l=as(t,"objective")??"";return{goalId:i,objective:l,completionCriterion:as(t,"completionCriterion")??as(t,"completion_criterion"),status:s,turnsUsed:d0(t,"turnsUsed")??d0(t,"turns_used")??0,tokensUsed:d0(t,"tokensUsed")??d0(t,"tokens_used")??0,wallClockMs:d0(t,"wallClockMs")??d0(t,"wall_clock_ms")??0,terminalReason:as(t,"terminalReason")??as(t,"terminal_reason"),budget:{tokenBudget:El(o,"tokenBudget")??El(o,"token_budget"),remainingTokens:El(o,"remainingTokens")??El(o,"remaining_tokens"),turnBudget:El(o,"turnBudget")??El(o,"turn_budget"),remainingTurns:El(o,"remainingTurns")??El(o,"remaining_turns"),wallClockBudgetMs:El(o,"wallClockBudgetMs")??El(o,"wall_clock_budget_ms"),remainingWallClockMs:El(o,"remainingWallClockMs")??El(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function w0(e,t,n,o,s=[]){if(typeof n!="string"||n.length===0)return null;const i=e.subagentMeta.get(n)??{id:n,sessionId:t,kind:"subagent",description:"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},r=(i.status==="completed"||i.status==="failed"||i.status==="cancelled")&&o.status==="running"?{...o,status:i.status,subagentPhase:i.subagentPhase,startedAt:i.startedAt,completedAt:i.completedAt,outputPreview:i.outputPreview,outputBytes:i.outputBytes,suspendedReason:i.suspendedReason}:o,a=Object.fromEntries(Object.entries(r).filter(([,u])=>u!==void 0)),c={...i,...a,id:n,agentId:n,sessionId:t,kind:"subagent"};for(const u of s)u in a||delete c[u];return e.subagentMeta.set(n,c),c}function sve(e,t){if(e==="turn.step.started")return null;if(e==="tool.use"||e==="tool.call.started"){const n=as(t,"name")??as(t,"toolName")??"tool",o=ni(ive(n)),s=lve(n,t.args??t.input);return s?`Calling ${o}: ${s}`:`Calling ${o}`}if(e==="tool.progress"){const n=t.update;if(n&&typeof n=="object"){const s=as(n,"text");if(s)return Bm(s);const i=as(n,"message");if(i)return Bm(i)}const o=as(t,"message");if(o)return Bm(o)}return null}function ive(e){return e.replace(/_\d+$/,"")}const mC=2e3;function Bm(e){return e.length>mC?`${e.slice(0,mC)}…`:e}function lve(e,t){if(t==null)return"";const n=typeof t=="string"?t:JSON.stringify(t);return ka(e,n)}function rve(e,t,n,o,s,i){if(i.has(n)&&o==="turn.step.started")return[];if(o==="assistant.delta"){const u=as(s,"delta");if(!u)return[];const d=e.subagentMeta.get(n),f=w0(e,t,n,{status:"running",subagentPhase:"working",startedAt:d?.startedAt??new Date().toISOString()}),p=[];return f&&p.push({type:"taskCreated",sessionId:t,task:f}),p.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:u,stream:"stdout",kind:"text"}),p}const l=sve(o,s);if(l===null||l.length===0)return[];const r=e.subagentMeta.get(n),a=w0(e,t,n,{status:"running",subagentPhase:"working",startedAt:r?.startedAt??new Date().toISOString()}),c=[];return a&&c.push({type:"taskCreated",sessionId:t,task:a}),c.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:l,stream:"stdout"}),c}function Lc(e){return{...e,content:e.content.map(t=>({...t}))}}function gC(e,t,n){const o={id:ta("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function ave(e,t,n,o,s,i){const l={id:o,sessionId:t,role:"user",content:s,createdAt:i,promptId:n};return e.messages.push(l),l}function cve(e){return Array.isArray(e)?e.map(t=>r9(t)):[]}function vC(e,t,n,o){const s=e.messages.find(l=>l.id===t);if(!s)return-1;const i=s.content.at(-1);return i&&i.type===n?(n==="text"?i.text+=o:i.thinking+=o,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:o}:{type:"thinking",thinking:o}),s.content.length-1)}function uve(e,t,n,o,s,i){const l=e.messages.find(r=>r.id===t);l&&l.content.push({type:"toolUse",toolCallId:n,toolName:o,input:s,outputLines:i})}function dve(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",i=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return i.length>0?{outputChunk:i,stream:s}:null}function yC(e,t){e.messages.find(n=>n.id===t)}function fve(e,t,n,o,s,i){const l={id:ta("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:o,isError:s}],createdAt:new Date().toISOString(),promptId:i};return e.messages.push(l),l}function Nd(e,t){return e.messages.find(n=>n.id===t)}function wC(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function pve(){const e=new Map,t=new Set;function n(u){let d=e.get(u);return d||(d=hC(),e.set(u,d)),d}function o(u){e.set(u,hC())}function s(u){t.add(u)}function i(u,d){const f=n(u);f.currentPromptId=d}function l(u,d){o(u);const f=n(u),p=d.promptId??ta("pr_");f.currentPromptId=p,f.turnPromptId.set(d.turnId,p);const h=gC(f,u,p);d.thinkingText.length>0&&h.content.push({type:"thinking",thinking:d.thinkingText}),d.assistantText.length>0&&h.content.push({type:"text",text:d.assistantText});for(const m of d.runningTools){const k=typeof m.lastProgress?.text=="string"&&m.lastProgress.text.length>0?[m.lastProgress.text]:void 0;h.content.push({type:"toolUse",toolCallId:m.toolCallId,toolName:m.name,input:m.args??{},outputLines:k}),f.toolStartTimes.set(m.toolCallId,Date.now())}return f.currentAssistantMsgId=h.id,f.turnTextLen=d.assistantText.length,f.turnThinkLen=d.thinkingText.length,[{type:"messageCreated",message:Lc(h)}]}function r(u,d,f,p){try{return c(u,d,f,p)}catch(h){return console.error("[agentProjector] Error projecting event:",u,h instanceof Error?h.message:h),[]}}function a(u,d){return d===void 0?"append":du?"gap":"append"}function c(u,d,f,p){const h=n(f),m=d,k=[],x=m?.agentId;if(typeof x=="string"&&x!==Qge){const y=t.has(x);if(y&&(u==="thinking.delta"||u==="assistant.delta")){const w=m?.delta??"";return w?[{type:"agentDelta",sessionId:f,agentId:x,delta:{[u==="thinking.delta"?"thinking":"text"]:w}}]:[]}if(y&&u==="turn.ended")return[{type:"agentTurnEnded",sessionId:f,agentId:x,reason:m?.reason}];if(eve.has(u))return rve(h,f,x,u,m??{},t)}switch(u){case"session.meta.updated":{const y=m?.patch?.title??m?.title,w=m?.patch?.lastPrompt,_={};typeof y=="string"&&y.length>0&&(_.title=y),typeof w=="string"&&(_.lastPrompt=w),(_.title!==void 0||_.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:f,..._});break}case"prompt.submitted":{const y=m?.promptId,w=m?.userMessageId;if(!y||!w)break;const _=cve(m?.content);if(_.length===0)break;h.currentPromptId=y;const A=ave(h,f,y,w,_,typeof m?.createdAt=="string"?m.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:Lc(A)});break}case"turn.started":{const y=m?.turnId,w=h.currentPromptId??ta("pr_");h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w),h.turnTextLen=0,h.turnThinkLen=0,$7.delete(f),k.push({type:"turnActiveChanged",sessionId:f,active:!0});break}case"turn.step.started":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;if(w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w)),h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId!==void 0){const A=h.retryReuseMsgId;if(h.retryReuseMsgId=void 0,Nd(h,A)!==void 0){h.currentAssistantMsgId=A;break}}const _=gC(h,f,w);h.currentAssistantMsgId=_.id,k.push({type:"messageCreated",message:Lc(_)});break}case"thinking.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnThinkLen>0&&(h.turnThinkLen=0);const _=a(h.turnThinkLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const A=vC(h,y,"thinking",w);if(A<0)break;h.turnThinkLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:A,delta:{thinking:w}});break}case"assistant.delta":{const y=h.currentAssistantMsgId;if(!y)break;const w=m?.delta??"";if(!w)break;p?.offset===0&&h.turnTextLen>0&&(h.turnTextLen=0);const _=a(h.turnTextLen,p?.offset);if(_==="skip")break;if(_==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const A=vC(h,y,"text",w);if(A<0)break;h.turnTextLen+=w.length,k.push({type:"assistantDelta",sessionId:f,messageId:y,contentIndex:A,delta:{text:w}});break}case"tool.use":case"tool.call.started":{const y=h.currentAssistantMsgId,w=m?.turnId,_=h.turnPromptId.get(w)??h.currentPromptId;if(!y||!_)break;const A=m?.toolCallId,P=m?.name??m?.toolName??"",z=m?.args??m?.input??{};uve(h,y,A,P,z);const L=Nd(h,y);L&&L.content.length-1,h.toolStartTimes.set(A,Date.now()),L&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:L.content.map(T=>({...T})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const y=m?.toolCallId,w=dve(m??{});y&&w&&k.push({type:"toolOutput",sessionId:f,toolCallId:y,outputChunk:w.outputChunk,stream:w.stream});break}case"tool.result":{const y=m?.turnId;let w=h.turnPromptId.get(y)??h.currentPromptId;w||(w=ta("pr_"),h.currentPromptId=w,y!==void 0&&h.turnPromptId.set(y,w));const _=m?.toolCallId,A=m?.output,P=m?.isError??!1;h.toolStartTimes.get(_)??Date.now(),h.toolStartTimes.delete(_);const z=fve(h,f,_,A,P,w);k.push({type:"messageCreated",message:Lc(z)}),h.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const y=h.currentAssistantMsgId,w=tve(m?.usage);if(h.totalInput+=w.input,h.totalOutput+=w.output,h.totalCacheRead+=w.cacheRead,h.totalCacheCreate+=w.cacheCreate,y){yC(h,y);const _=Nd(h,y);_&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:_.content.map(A=>({...A})),status:"completed"})}break}case"agent.status.updated":{m?.model&&(h.model=m.model),m?.contextTokens!==void 0&&(h.contextTokens=m.contextTokens),m?.maxContextTokens!==void 0&&(h.contextLimit=m.maxContextTokens),k.push({type:"sessionUsageUpdated",sessionId:f,usage:wC(h),model:h.model||void 0,dynamicWorkflowMode:m?.dynamicWorkflowMode===!0?!0:m?.dynamicWorkflowMode===!1?!1:void 0,planMode:m?.planMode===!0?!0:m?.planMode===!1?!1:void 0,thinking:typeof m?.thinkingEffort=="string"&&m.thinkingEffort.length>0?m.thinkingEffort:void 0});break}case"turn.ended":{const y=h.currentAssistantMsgId,w=m?.reason??"completed",_=d0(m??{},"durationMs");if(k.push({type:"turnActiveChanged",sessionId:f,active:!1,reason:m?.reason}),y){yC(h,y);const P=Nd(h,y);P&&k.push({type:"messageUpdated",sessionId:f,messageId:y,content:P.content.map(z=>({...z})),status:w==="failed"||w==="blocked"?"error":"completed",durationMs:_})}h.turnCount++;const A=wC(h);k.push({type:"sessionUsageUpdated",sessionId:f,usage:A}),h.currentAssistantMsgId=void 0,h.currentPromptId=void 0,h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId=void 0;break}case"prompt.completed":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptCompleted",sessionId:f,promptId:y,reason:m?.reason??"completed"});break}case"prompt.aborted":{const y=m?.promptId;typeof y=="string"&&y.length>0&&k.push({type:"promptAborted",sessionId:f,promptId:y});break}case"turn.step.retrying":{const y=h.currentAssistantMsgId;if(y!==void 0){const w=Nd(h,y);w!==void 0&&(w.content=w.content.filter(_=>_.type!=="text"&&_.type!=="thinking"&&_.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:f,messageId:y,content:w.content.map(_=>({..._})),status:"pending"}),h.retryReuseMsgId=y)}h.turnTextLen=0,h.turnThinkLen=0,h.toolStartTimes.clear();break}case"turn.step.interrupted":{h.currentAssistantMsgId=void 0,h.retryReuseMsgId=void 0;const y=typeof m?.reason=="string"&&m.reason.length>0?m.reason:"error",w=typeof m?.message=="string"&&m.message.length>0?m.message:void 0;$7.set(f,{reason:y,message:w,turnId:typeof m?.turnId=="number"?m.turnId:void 0,at:Date.now()});break}case"subagent.spawned":{const y=typeof m?.subagentId=="string"&&m.subagentId.length>0?m.subagentId:ta("task_"),w={id:y,agentId:y,sessionId:f,kind:"subagent",description:typeof m?.description=="string"?m.description:m?.subagentName??"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof m?.subagentName=="string"?m.subagentName:void 0,model:typeof m?.model=="string"?m.model:void 0,thinkingEffort:typeof m?.thinkingEffort=="string"?m.thinkingEffort:void 0,routing:dC(m?.routing),currentRoutingEnvRevision:typeof m?.currentRoutingEnvironmentRevision=="string"?m.currentRoutingEnvironmentRevision:void 0,parentToolCallId:typeof m?.parentToolCallId=="string"?m.parentToolCallId:void 0,dynamicWorkflowIndex:typeof m?.dynamicWorkflowIndex=="number"?m.dynamicWorkflowIndex:void 0,runInBackground:m?.runInBackground===!0};h.subagentMeta.set(w.id,w),k.push({type:"taskCreated",sessionId:f,task:w});break}case"subagent.started":{const y=w0(h,f,m?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.suspended":{const y=w0(h,f,m?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof m?.reason=="string"?m.reason:void 0},["suspendedReason"]);y&&k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.completed":{const y=typeof m?.resultSummary=="string"?m.resultSummary:void 0,w=w0(h,f,m?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"completed",outputPreview:y});break}case"subagent.failed":{const y=typeof m?.error=="string"?m.error:void 0,w=w0(h,f,m?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:y});w&&k.push({type:"taskCreated",sessionId:f,task:w}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"failed",outputPreview:y});break}case"task.notified":{const y=as(m??{},"notificationType"),w=as(m??{},"sourceKind"),_=as(m??{},"sourceId");if(!y||!w||!_)break;const A=y.startsWith("task.")?y.slice(5):y,P=`task:${_}:${A}`,z=as(m??{},"title")??"",L=as(m??{},"severity")??"",T=as(m??{},"body")??"",I=` `+(z!==""?`Title: ${a0(z)} `:"")+(L!==""?`Severity: ${a0(L)} -`:"")+(E!==""?`${a0(E)} -`:"")+"",$={id:`task_ntf_${P}`,sessionId:f,role:"user",content:[{type:"text",text:T}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:_,status:A,notificationId:P}}};h.messages.push($),k.push({type:"messageCreated",message:Lc($)});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:m?.code,message:m?.message,name:m?.name,details:m?.details,retryable:m?.retryable}});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:m?.message}});break}case"task.started":{const y=m?.info??{},w=typeof y.startedAt=="number"?new Date(y.startedAt).toISOString():void 0,_=typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):ta("task_"),A=typeof y.description=="string"?y.description:typeof y.command=="string"?y.command:Mo.global.t("tasks.defaultDescription");if(y.kind==="agent"){const z=typeof y.agentId=="string"&&y.agentId.length>0?y.agentId:void 0;if(z!==void 0){const L=w0(h,f,z,{description:A,backgroundTaskId:_,model:typeof y.model=="string"?y.model:void 0,thinkingEffort:typeof y.thinkingEffort=="string"?y.thinkingEffort:void 0,routing:uC(y.routing),currentRoutingEnvRevision:typeof y.currentRoutingEnvironmentRevision=="string"?y.currentRoutingEnvironmentRevision:void 0,runInBackground:!0});L&&k.push({type:"taskCreated",sessionId:f,task:L})}else k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"subagent",description:A,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,subagentPhase:"queued",runInBackground:!0}});break}const P=typeof y.command=="string"?y.command:void 0;k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"bash",description:A,command:P,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,outputPreview:P!==void 0?`$ ${P}`:void 0}});break}case"task.terminated":{const y=m?.info??{},w=y.status==="failed"||typeof y.exitCode=="number"&&y.exitCode!==0;k.push({type:"taskCompleted",sessionId:f,taskId:typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):"",status:w?"failed":"completed"});break}case"compaction.completed":{const y=m?.result??{};k.push({type:"compactionCompleted",sessionId:f,tokensBefore:typeof y.tokensBefore=="number"?y.tokensBefore:void 0,tokensAfter:typeof y.tokensAfter=="number"?y.tokensAfter:void 0,summary:typeof y.summary=="string"?y.summary:void 0}),k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:f,trigger:m?.trigger==="manual"?"manual":"auto",instruction:typeof m?.instruction=="string"?m.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:f});break}case"goal.updated":{const y=nve(m?.snapshot??null);k.push({type:"goalUpdated",sessionId:f,goal:y?.status==="complete"?null:y});break}case"cron.fired":{const y=m?.origin,w=as(m??{},"prompt");if(y&&typeof y=="object"&&y.kind==="cron_job"&&w){const _={id:ta("cron_"),sessionId:f,role:"user",content:[{type:"text",text:w}],createdAt:new Date().toISOString(),metadata:{origin:y}};h.messages.push(_),k.push({type:"messageCreated",message:Lc(_)})}break}}return k}return{project:r,bindNextPromptId:i,seedInFlight:l,reset:o,markSideChannelAgent:s}}const pve=new Set(["server_hello","ack","ping","resync_required","error","pong"]),wC=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","task.notified","background.task.started","background.task.terminated","cron.fired"]),hve=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),mve=new Set(["assistant.delta","thinking.delta"]);function gve(e,t){if(pve.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return mve.has(o)?vve(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?hve.has(o)?{route:"protocol"}:wC.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:wC.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function vve(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}class t2 extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class Jr extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}function ol(e){return e instanceof t2||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function r9(e){return e instanceof Jr||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}const Xs="pythinker-web.server-credential",yve="token",wve=10080*60*1e3;let $r;const $7=new Set;function kve(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(yve);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function N7(e){return{version:1,credential:e,expiresAt:Date.now()+wve}}function bve(e){return JSON.stringify(e)}function a9(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function z7(e){globalThis.localStorage?.setItem(Xs,bve(e))}function _ve(){try{const e=globalThis.localStorage?.getItem(Xs);if(e){const n=a9(e);if(n===void 0){const o=N7(e);let s=!1;try{z7(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Xs),globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs);return}const t=globalThis.sessionStorage?.getItem(Xs);if(t){const n=N7(t);let o=!1;try{z7(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs),o=!0}catch{}return o?n:void 0}return}catch{return}}function xve(){const e=kve();return e?(PN(e),!0):($r=_ve(),$r!==void 0)}function RN(){if($r!==void 0){if($r.expiresAt<=Date.now()){Sve($r);return}return $r.credential}}function Sve(e){$r=void 0;try{globalThis.sessionStorage?.removeItem(Xs);const t=globalThis.localStorage?.getItem(Xs),n=t==null?void 0:a9(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Xs)}catch{}}function PN(e){const t=N7(e);$r=t;try{z7(t)}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}}function Cve(){const e=$r;$r=void 0;try{const t=globalThis.localStorage?.getItem(Xs),o=(t==null?void 0:a9(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(Xs),globalThis.sessionStorage?.removeItem(Xs)}catch{}}function Mve(e){return $7.add(e),()=>{$7.delete(e)}}function Ave(){Cve();for(const e of $7)try{e()}catch{}}const Oc=3e4,Q3=5*6e4,FN="0123456789ABCDEFGHJKMNPQRSTVWXYZ",kC=500,jN=40101;function e4(e,t=Oc){let n;try{n=AbortSignal.timeout(t)}catch{n=void 0}if(e===void 0)return n;if(n===void 0)return e;try{return AbortSignal.any([e,n])}catch{return e}}function Tve(e,t){let n="",o=e;for(let s=0;sFN[n%32]).join("")}function t4(){return`${Tve(Date.now(),10)}${Eve(16)}`}function Ive(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function Rm(e){try{const t=await e.text();return t?t.length>kC?`${t.slice(0,kC)}...`:t:void 0}catch{return}}class B7{constructor(t,n,o="v1"){this.origin=t,this.identity=n,this.apiVersion=o}async get(t,n,o){return this.request("GET",t,void 0,n,[],void 0,!1,o?.signal)}async getBlob(t){const n=Yc(this.origin,t,this.apiVersion),o=t4(),s={"X-Request-Id":o};this.addClientHeaders(s);const i=Date.now();X3({method:"GET",path:t,url:n,requestId:o});let l;try{l=await fetch(n,{method:"GET",headers:s,signal:e4()})}catch(a){throw Da({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-i,error:a}),new Jr({message:`Network error calling GET ${t}`,cause:a,method:"GET",path:t,url:n,requestId:o,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-i})}if(l.ok)return Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:0,msg:""}),l.blob();let r;try{r=await l.clone().json()}catch{}throw this.checkAuthRequired(l,r?.code??0),Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:r?.code??l.status,msg:r?.msg??l.statusText,envelopeRequestId:r?.request_id}),new t2({code:r?.code??l.status,msg:r?.msg??l.statusText,requestId:r?.request_id??o,details:r?.details,timestamp:Date.now(),durationMs:Date.now()-i})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async exchange(t,n,o={}){return this.request(t,n,o.body,void 0,o.allowCodes??[],o.headers,!0)}async postZip(t,n,o){const s="POST",i=Yc(this.origin,t,this.apiVersion),l=t4(),r={"X-Request-Id":l,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(r);const a=Date.now();X3({method:s,path:t,url:i,requestId:l,body:o});let c;try{c=await fetch(i,{method:s,headers:r,body:JSON.stringify(n),signal:e4(void 0,Q3)})}catch(p){throw Da({method:s,path:t,requestId:l,phase:"fetch",durationMs:Date.now()-a,error:p}),new Jr({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"fetch",timeoutMs:Q3,timestamp:Date.now(),durationMs:Date.now()-a})}const u=c.headers.get("content-type")??void 0,d=u?.split(";",1)[0]?.trim().toLowerCase();if(!c.ok||d!=="application/zip"){let p;try{p=await c.clone().json()}catch{}if(this.checkAuthRequired(c,p?.code??0),!c.ok||p!==void 0&&p.code!==0){const k=p?.code??c.status,x=p?.msg??c.statusText;throw Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:k,msg:x,envelopeRequestId:p?.request_id}),new t2({code:k,msg:x,requestId:p?.request_id??l,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const h=c.clone(),m=new TypeError(`Expected application/zip, received ${u??"no content type"}`);throw Da({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:m}),new Jr({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:Q3,status:c.status,statusText:c.statusText,contentType:u,bodyPreview:await Rm(h),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await c.blob()}catch(p){throw Da({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:p}),new Jr({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:Q3,status:c.status,statusText:c.statusText,contentType:u,timestamp:Date.now(),durationMs:Date.now()-a})}return Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:c.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=Yc(this.origin,t,this.apiVersion),s=t4(),i={"X-Request-Id":s};this.addClientHeaders(i);const l=Date.now();X3({method:"POST",path:t,url:o,requestId:s,body:Ive(n)});let r;try{r=await fetch(o,{method:"POST",headers:i,body:n,signal:e4()})}catch(u){throw Da({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-l,error:u}),new Jr({message:`Network error calling POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-l})}let a;const c=r.clone();try{a=await r.json()}catch(u){throw Da({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-l,status:r.status,error:u}),new Jr({message:`Failed to parse JSON response from POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:Oc,status:r.status,statusText:r.statusText,contentType:r.headers.get("content-type")??void 0,bodyPreview:await Rm(c),timestamp:Date.now(),durationMs:Date.now()-l})}if(Ac({method:"POST",path:t,requestId:s,status:r.status,durationMs:Date.now()-l,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(r,a.code),a.code!==0)throw new t2({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-l});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[],l,r,a){let c=Yc(this.origin,n,this.apiVersion);if(s){const k=new URLSearchParams;for(const[y,w]of Object.entries(s))w!==void 0&&k.set(y,String(w));const x=k.toString();x&&(c=`${c}?${x}`)}const u=t4(),d={"X-Request-Id":u};this.addClientHeaders(d),o!==void 0&&(d["Content-Type"]="application/json; charset=utf-8"),l!==void 0&&Object.assign(d,l);const f=Date.now();X3({method:t,path:n,url:c,requestId:u,body:o});let p;try{p=await fetch(c,{method:t,headers:d,body:o!==void 0?JSON.stringify(o):void 0,signal:e4(a)})}catch(k){throw Da({method:t,path:n,requestId:u,phase:"fetch",durationMs:Date.now()-f,error:k}),new Jr({message:`Network error calling ${t} ${n}`,cause:k,method:t,path:n,url:c,requestId:u,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-f})}let h;const m=p.clone();try{h=await p.json()}catch(k){throw Da({method:t,path:n,requestId:u,phase:"parse",durationMs:Date.now()-f,status:p.status,error:k}),new Jr({message:`Failed to parse JSON response from ${t} ${n}`,cause:k,method:t,path:n,url:c,requestId:u,phase:"parse",timeoutMs:Oc,status:p.status,statusText:p.statusText,contentType:p.headers.get("content-type")??void 0,bodyPreview:await Rm(m),timestamp:Date.now(),durationMs:Date.now()-f})}if(Ac({method:t,path:n,requestId:u,status:p.status,durationMs:Date.now()-f,code:h.code,msg:h.msg,envelopeRequestId:h.request_id,data:h.data}),this.checkAuthRequired(p,h.code),h.code!==0&&!i.includes(h.code))throw new t2({code:h.code,msg:h.msg,requestId:h.request_id,details:h.details,timestamp:Date.now(),durationMs:Date.now()-f});return r===!0?{data:h.data,code:h.code,headers:p.headers}:h.data}addClientHeaders(t){const n=RN();n!==void 0&&(t.Authorization=`Bearer ${n}`),this.identity!==void 0&&(t["X-Pythinker-Client-Id"]=this.identity.clientId,t["X-Pythinker-Client-Name"]=this.identity.clientName,t["X-Pythinker-Client-Version"]=this.identity.clientVersion,t["X-Pythinker-Client-Ui-Mode"]=this.identity.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===jN)&&Ave()}}const Lve="pythinker-code.bearer.",$ve=3e4;class Nve{constructor(t,n,o){this.wsUrl=t,this.clientId=n,this.handlers=o}ws=null;connected=!1;closed=!1;subscriptions=new Map;pendingSubscriptions=[];transcriptSubscriptions=new Map;terminalAttachments=new Map;msgSeq=0;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),Tc("connect",{url:this.wsUrl,attempt:this.reconnectAttempts});const t=RN(),n=t!==void 0?[`${Lve}${t}`]:void 0,o=new WebSocket(this.wsUrl,n);this.ws=o,o.onopen=()=>{Tc("open")},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));_ge(i),this.handleFrame(i)}catch(i){Tc("parse-error",{error:String(i)}),this.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{Tc("error"),this.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{Tc("close",s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0),this.connected=!1,this.ws=null,this.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,Tc("reconnect-scheduled",{delayMs:n,attempt:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,sinceSeq:o}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=n4(t,n),i=this.terminalAttachments.get(s),l=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:l}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,l)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(n4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(n4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,$ve),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=MN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const l=s.data;this.handlers.onTranscriptReset?.(i,l.agent_id,{...l.snapshot,hasMoreOlder:l.has_more_older},l.seq);const r=this.transcriptSubscriptions.get(i);r?.agentId===l.agent_id&&l.seq!==void 0&&(r.sinceSeq=l.seq);return}if(o==="transcript.ops"){const s=AN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const l=s.data,r=this.handlers.onTranscriptOps?.(i,l.agent_id,l.ops,l.seq),a=this.transcriptSubscriptions.get(i);r!==!1&&a?.agentId===l.agent_id&&l.seq!==void 0&&(a.sinceSeq=l.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.handlers.onRawAgentEvent?this.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,l=n.seq,r=n4(s,i),a=this.terminalAttachments.get(r);a&&this.terminalAttachments.set(r,{...a,lastSeq:Math.max(a.lastSeq,l)});const c=typeof n.payload?.data=="string"?n.payload.data:"";this.handlers.onTerminalOutput?.(s,i,c,l);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,l=n.payload?.exit_code,r=typeof l=="number"?l:null;this.handlers.onTerminalExit?.(s,i,r);break}default:{this.trackCursor(n);const s=n.type,i=gve(s,n.payload);if(i.route==="protocol"){this.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const l=n,r=n;this.handlers.onRawAgentEvent({type:i.agentType,seq:l.seq,session_id:l.session_id,timestamp:l.timestamp,payload:l.payload,...r.volatile!==void 0?{volatile:r.volatile}:{},...r.offset!==void 0?{offset:r.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const o of this.pendingSubscriptions)this.subscriptions.set(o.sessionId,o.cursor),t.includes(o.sessionId)||t.push(o.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[o,s]of this.subscriptions.entries())n[o]=s;this.send({type:"client_hello",id:this.nextId(),payload:{client_id:this.clientId,subscriptions:t,cursors:n}});for(const[o,s]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(o,s.agentId,s.sinceSeq);for(const o of this.terminalAttachments.values())this.sendTerminalAttach(o.sessionId,o.terminalId,o.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n}})}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),bge(t)}catch{}}nextId(){return`c_${++this.msgSeq}`}}function n4(e,t){return`${e}\0${t}`}function zve(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function bC(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function Bve(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:e.activity.model??"",usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id||void 0}}function Rve(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function _C(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function xC(e){const t={type:e.type,models:e.models.map(n=>({model:n.model,max_context_size:n.maxContextSize,display_name:n.displayName,capabilities:n.capabilities,max_output_size:n.maxOutputSize,support_efforts:n.supportEfforts,adaptive_thinking:n.adaptiveThinking}))};return"id"in e&&(t.id=e.id),"newId"in e&&e.newId!==void 0&&(t.new_id=e.newId),e.apiKey!==void 0&&(t.api_key=e.apiKey),e.baseUrl!==void 0&&(t.base_url=e.baseUrl),e.defaultModel!==void 0&&(t.default_model=e.defaultModel),t}function Pm(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function SC(e){return e==="auto_compact"||e==="manual_compact"}const CC=41201;class Pve{http;httpV2;config;constructor(t){this.config=t;const n={clientId:t.clientId,clientName:t.clientName,clientVersion:t.clientVersion,clientUiMode:t.clientUiMode};this.http=new B7(t.serverHttpUrl,n),this.httpV2=new B7(t.serverHttpUrl,n,"v2")}async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,backend:t.backend==="v2"?"v2":"v1",experimentalFlagStates:Gge(t.experimental_flag_states)}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(tr),hasMore:o.has_more}}async listSessionGroupsV2(t){const n=await this.httpV2.get("/sessions",{view:"by_workspace","group.page_size":t?.groupPageSize,"meta.has_prompt":t?.hasPrompt,page_size:t?.pageSize,page_token:t?.pageToken});return{groups:n.groups.map(o=>({workspace:o.workspace,sessions:o.sessions.map(Bve),total:o.total})),hasMore:n.has_more,nextPageToken:n.next_page_token,total:n.total}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return tr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return tr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.dynamicWorkflowMode!==void 0&&(s.dynamic_workflow_mode=n.dynamicWorkflowMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),n.tools!==void 0&&(s.tools=n.tools),n.mcpServers!==void 0&&(s.mcp_servers=n.mcpServers),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return tr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,dynamicWorkflowMode:n.dynamic_workflow_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return zN(n)}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return tr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(E7),hasMore:s.has_more}}async getSessionTranscript(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=lge.parse(o);return{agentId:s.agent_id,snapshot:{items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more},agents:s.agents,pendingInteractions:s.pending_interactions,seq:s.seq}}async getSessionSnapshot(t){const n=Date.now();_s("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:tr(o.session),messages:o.messages.items.map(E7),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map(LN),pendingQuestions:o.pending_questions.map($N),subagents:(o.subagents??[]).map(L4)};return _s("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw _s("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...bC(o)}),o}}async exportSession(t,n){const o=n===void 0?0:new TextEncoder().encode(n).byteLength,s=n===void 0||n.length===0?0:n.split(` -`).length,i=await this.http.postZip(`/sessions/${encodeURIComponent(t)}/export`,{web_log:n},{web_log_bytes:o,web_log_entries:s}),l=`${t}.zip`;return{blob:i.blob,fileName:zve(i.contentDisposition,l)}}async submitPrompt(t,n){const o=Date.now();_s("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,Ige(n));return _s("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw _s("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...bC(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return tr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return tr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(tr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,Lge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,Bge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n?.status,with_output:n?.withOutput,output_bytes:n?.outputBytes,output_status:n?.outputStatus};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o,{signal:n?.signal})).items.map(L4)}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s,{signal:o?.signal});return L4(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async detachTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:detach`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(Pm)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return Pm(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return Pm(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listTools(t){return((await this.http.get("/tools",{session_id:t})).tools??[]).map(o=>({name:o.name,description:o.description,inputSchema:o.input_schema,source:o.source,mcpServerId:o.mcp_server_id}))}async listConnectors(){return((await this.http.get("/mcp/servers")).servers??[]).map(n=>({id:n.id,name:n.name,transport:n.transport,status:n.status,toolCount:n.tool_count,lastError:n.last_error,editable:n.editable,definition:n.definition===void 0?void 0:Rve(n.definition)}))}async createConnector(t){return this.http.post("/mcp/servers",{mcp_server_id:t.name,config:_C(t)})}async updateConnector(t,n){return this.http.put(`/mcp/servers/${encodeURIComponent(t)}`,{config:_C(n)})}async removeConnector(t){return this.http.delete(`/mcp/servers/${encodeURIComponent(t)}`)}async restartConnector(t){return this.http.post(`/mcp/servers/${encodeURIComponent(t)}:restart`,{})}async listPlugins(){return((await this.http.get("/plugins")).plugins??[]).map(n=>({id:n.id,displayName:n.display_name,version:n.version,enabled:n.enabled,state:n.state,skillCount:n.skill_count,mcpServerCount:n.mcp_server_count,hasErrors:n.has_errors,source:n.source}))}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:set-enabled`,{enabled:n})}async listSubagents(t){return((await this.http.get("/agent-profiles",{work_dir:t})).profiles??[]).map(o=>({name:o.name,description:o.description,source:o.source,tools:o.tools,model:o.model,effort:o.effort,whenToUse:o.when_to_use}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([l,r])=>[l,r.map(fC)])):void 0;return{items:s.items.map(fC),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length),n.encoding!==void 0&&(o.encoding=n.encoding);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async writeFile(t,n){const o={path:n.path,content:n.content};n.encoding!==void 0&&(o.encoding=n.encoding),n.baseEtag!==void 0&&(o.base_etag=n.baseEtag);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:write`,o);return{path:s.path,size:s.size,etag:s.etag,created:s.created}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Yc(this.config.serverHttpUrl,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async revealSavedPlan(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/transcript/plan:reveal`,{agent_id:n.agentId,tool_call_id:n.toolCallId})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(C2)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return C2(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return C2(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async generateSessionTitle(t,n){const o={};return n?.force===!0&&(o.force=!0),n?.source!==void 0&&(o.source=n.source),this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,o)}async listModels(){return(await this.http.get("/models")).items.map(Zge)}async listProviders(){return(await this.http.get("/providers")).items.map($d)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=$d(n);return n.api_key===void 0?o:{...o,apiKey:n.api_key}}async addProvider(t){const n=await this.http.post("/providers",xC(t));return $d(n)}async updateProvider(t,n){const o=await this.http.put(`/providers/${encodeURIComponent(t)}`,xC(n));return{provider:$d(o.provider)}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map($d),modelsImported:o.models_imported}}async deleteProvider(t){return this.http.delete(`/providers/${encodeURIComponent(t)}`)}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return MC(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return MC(t)}async startCodexLogin(){const t=await this.http.post("/auth/codex:start");return{loginId:t.login_id,authorizeUrl:t.authorize_url,loopback:t.loopback,expiresAt:t.expires_at}}async getCodexLoginStatus(t){const n=await this.http.get(`/auth/codex/${encodeURIComponent(t)}`);return zm(n)}async submitCodexLoginRedirect(t,n){const o=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:submit_code`,{redirect_url:n});return zm(o)}async cancelCodexLogin(t){const n=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:cancel`);return zm(n)}async getConfig(){const t=await this.http.get("/config");return I7(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultThinking:"default_thinking",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",disabledSkills:"disabled_skills",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry"};for(const[i,l]of Object.entries(t)){const r=o[i];r!==void 0&&(n[r]=l)}const s=await this.http.post("/config",n);return I7(s)}async getSubagentModelPolicy(){const t=await this.http.exchange("GET","/config/subagent-model-policy");return dC(t.data)}async setSubagentModelPolicy(t,n){return this.subagentModelPolicyWrite("PUT",qge(t),n)}async clearSubagentModelPolicy(t){return this.subagentModelPolicyWrite("DELETE",void 0,t)}async subagentModelPolicyWrite(t,n,o){const s=o===void 0?void 0:{"If-Match":`"${o}"`},i=await this.http.exchange(t,"/config/subagent-model-policy",{body:n,headers:s,allowCodes:[CC]});if(i.code===CC||i.data===null)throw new R$(await this.getSubagentModelPolicy());return dC(i.data)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model}}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return Yc(this.config.serverHttpUrl,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}connectEvents(t){const n=_pe(this.config.serverHttpUrl,this.config.clientId),o=fve(),s=new Nve(n,this.config.clientId,{onWireEvent:i=>{const l=Yge(i),r=Xge(i),a=Uge(i);a.type==="historyCompacted"&&!SC(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:l,seq:r})},onRawAgentEvent:i=>{const{type:l,seq:r,session_id:a,payload:c,offset:u}=i,d=o.project(l,c,a,{offset:u});for(const f of d){const p=c?.turnId,h=f.type==="assistantDelta"&&typeof p=="number"&&typeof u=="number"&&(l==="assistant.delta"||l==="thinking.delta")?{turnId:p,offset:u,kind:l==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!SC(f.reason)&&t.onResync(a,r),t.onEvent(f,{sessionId:a,seq:r,stream:h})}},onResync:(i,l,r)=>{o.reset(i),t.onResync(i,l,r)},onConnectionState:i=>{t.onConnectionChange(i)},onError:(i,l,r)=>{t.onError(i,l,r)},onTranscriptReset:(i,l,r,a)=>{t.onTranscriptReset?.(i,l,r,a)},onTranscriptOps:(i,l,r,a)=>t.onTranscriptOps?.(i,l,r,a),onTerminalOutput:(i,l,r,a)=>{t.onTerminalOutput?.(i,l,r,a)},onTerminalExit:(i,l,r)=>{t.onTerminalExit?.(i,l,r)}});return s.connect(),{subscribe(i,l){s.subscribe(i,l??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,l,r){s.subscribeTranscript(i,l,r)},unsubscribeTranscript(i,l){s.unsubscribeTranscript(i,l)},seedSnapshot(i,l){if(l.inFlightTurn===null){o.reset(i);return}const r=o.seedInFlight(i,l.inFlightTurn);for(const a of r)t.onEvent(a,{sessionId:i,seq:l.asOfSeq})},bindNextPromptId(i,l){o.bindNextPromptId(i,l)},abort(i,l){s.abort(i,l)},terminalAttach(i,l,r){s.terminalAttach(i,l,r)},terminalInput(i,l,r){s.terminalInput(i,l,r)},terminalResize(i,l,r,a){s.terminalResize(i,l,r,a)},terminalDetach(i,l){s.terminalDetach(i,l)},terminalClose(i,l){s.terminalClose(i,l)},markSideChannelAgent(i){o.markSideChannelAgent(i)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function MC(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function Fve(e){const t=new B7(e.serverHttpUrl,{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode});return{async listCatalogProviders(){return(await t.get("/catalog/providers")).items.map(BN)},async importCatalogProvider(n){const o={catalog_id:n.catalogId};n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.id!==void 0&&(o.id=n.id);const s=await t.post("/providers:import_catalog",o);return Kge(s)}}}let Fm;function Ct(){if(Fm===void 0){const e=z$();Fm=Object.assign(new Pve(e),Fve(e))}return Fm}const jve=["src","controls","muted"],Ove=["aria-label"],Hve=["src","alt"],Dve=["aria-label"],R7=Je({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=V(t.fileId?"":t.url),o=V(null),s=V(!t.fileId);let i=null,l=0,r=!1,a=null;function c(){i!==null&&(URL.revokeObjectURL(i),i=null)}async function u(){const d=++l;if(c(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await Ct().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(r||d!==l){URL.revokeObjectURL(p);return}i=p,n.value=i}catch{if(r||d!==l)return;n.value=t.url}}return Ke(()=>[t.fileId,t.url,s.value],u,{immediate:!0}),In(()=>{typeof IntersectionObserver=="function"&&o.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(o.value)):s.value=!0}),vo(()=>{r=!0,a?.disconnect(),a=null,c()}),(d,f)=>e.kind==="video"?(g(),S(Ce,{key:0},[n.value?(g(),S("video",{key:0,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,jve)):(g(),S("span",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"status","aria-label":e.alt||""},null,10,Ove))],64)):n.value?(g(),S("img",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,alt:e.alt||"",loading:"lazy"},null,10,Hve)):(g(),S("span",{key:2,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"img","aria-label":e.alt||""},null,10,Dve))}}),Vve=["title","data-kind"],Wve=["aria-label","aria-haspopup","aria-expanded"],qve={class:"att-tile"},Uve={class:"att-name"},Zve={key:1,class:"att-err"},Kve=["aria-label"],Gve=["data-side","aria-label"],Yve={class:"att-tip-preview"},Xve={key:1,class:"att-tip-placeholder"},Jve={class:"att-tip-meta"},Qve={key:0},e9e={key:0,class:"att-tip-error"},t9e={class:"att-tip-foot"},n9e=Je({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(!1),a=V("top"),c=V({});let u=null;const d=B(()=>{const L=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return L?L.toUpperCase():void 0}),f=B(()=>{const z=d.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(z)?"file-text":"file"}),p=B(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function h(z){return z<1024?`${z} B`:z<1024*1024?`${Math.round(z/1024)} KB`:`${(z/(1024*1024)).toFixed(1)} MB`}const m=B(()=>{const z=[p.value];return n.size!==void 0&&z.push(h(n.size)),z.join(" · ")}),k=B(()=>n.kind!=="file"),x=B(()=>k.value&&(!!n.url||!!n.fileId)),y=B(()=>n.error?s("mention.stateUploadFailed"):n.uploading?s("mention.stateUploading"):s("mention.stateUploaded"));function w(){const z=i.value,L=l.value;if(!z||!L)return;const E=z.getBoundingClientRect(),T=8,$=8,C=L.offsetWidth,j=L.offsetHeight;let H=E.top-j-$,D="top";H{r.value=!1,u=null},120)}function P(){u!==null&&clearTimeout(u),u=null,r.value=!1}return Ke(r,z=>{const L=z?"addEventListener":"removeEventListener";window[L]("resize",w),window[L]("scroll",w,!0)}),En(()=>{P(),window.removeEventListener("resize",w),window.removeEventListener("scroll",w,!0)}),(z,L)=>(g(),S(Ce,null,[b("span",{ref_key:"anchorRef",ref:i,class:Be(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:m.value,"data-kind":e.kind,onMouseenter:_,onMouseleave:A,onFocusin:_,onFocusout:A,onKeydown:go(P,["esc"])},[b("button",{type:"button",class:"att-activate","aria-label":m.value,"aria-haspopup":k.value?"dialog":void 0,"aria-expanded":k.value?r.value:void 0,onClick:L[0]||(L[0]=E=>o("activate"))},[b("span",qve,[e.kind==="image"&&e.url?(g(),ue(R7,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(g(),ue(Ee,{key:1,name:"play",size:"sm"})):e.kind==="image"?(g(),ue(Ee,{key:2,name:"image",size:"sm"})):(g(),ue(Ee,{key:3,name:f.value,size:"sm"},null,8,["name"]))]),b("span",Uve,I(p.value),1),e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("composer.uploading")},null,8,["label"])):e.error?(g(),S("span",Zve,[W(Ee,{name:"info",size:"sm"})])):Y("",!0)],8,Wve),e.removable?(g(),ue(Cn,{key:0,text:e.removeLabel??v(s)("composer.remove")},{default:ae(()=>[b("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??v(s)("composer.remove"),onClick:L[1]||(L[1]=E=>o("remove"))},[W(Ee,{name:"close",size:"sm"})],8,Kve)]),_:1},8,["text"])):Y("",!0)],42,Vve),(g(),ue(hl,{to:"body"},[r.value&&k.value?(g(),S("div",{key:0,ref_key:"tipRef",ref:l,class:"att-tip","data-side":a.value,style:Gt(c.value),role:"dialog","aria-label":m.value,onMouseenter:_,onMouseleave:A,onFocusin:_,onFocusout:A,onKeydown:go(P,["esc"])},[L[3]||(L[3]=b("span",{class:"att-tip-caret","aria-hidden":"true"},null,-1)),b("div",Yve,[x.value?(g(),ue(R7,{key:0,url:e.url??"",kind:e.kind==="video"?"video":"image",alt:p.value,"file-id":e.fileId,"media-class":"att-tip-media",controls:e.kind==="video",muted:""},null,8,["url","kind","alt","file-id","controls"])):(g(),S("span",Xve,[e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("mention.mediaPreviewUploading")},null,8,["label"])):(g(),ue(Ee,{key:1,name:e.kind==="video"?"play":"image"},null,8,["name"])),b("span",null,I(e.uploading?v(s)("mention.mediaPreviewUploading"):v(s)("mention.mediaPreviewUnavailable")),1)]))]),b("div",Jve,[W(Ee,{name:e.kind==="video"?"play":"image",size:"sm"},null,8,["name"]),b("strong",null,I(p.value),1),e.size!==void 0?(g(),S("span",Qve,"· "+I(h(e.size)),1)):Y("",!0)]),e.error?(g(),S("div",e9e,I(v(s)("mention.attachmentUploadFailed")),1)):Y("",!0),b("div",t9e,[b("span",{class:Be(["att-tip-state",{danger:e.error}])},[e.uploading?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),He(" "+I(y.value),1)],2),x.value?(g(),S("button",{key:0,type:"button",class:"att-tip-open",onClick:L[2]||(L[2]=E=>o("activate"))},[W(Ee,{name:"expand",size:"sm"}),b("span",null,I(v(s)("mention.viewFullscreen")),1)])):Y("",!0)])],44,Gve)):Y("",!0)]))],64))}}),P7=vt(n9e,[["__scopeId","data-v-e59edff1"]]),o9e=["data-mention-kind","data-mention-name","data-mention-path","tabindex","role","onClick","onKeydown"],s9e=["innerHTML"],i9e={class:"mention-pill-name"},AC=Je({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{}},setup(e){const t=e,n=V(null),o=B(()=>A$(t.text));function s(l,r){r.kind!=="file"||!t.interactive||!t.openFile||(l.preventDefault(),l.stopPropagation(),t.openFile({path:r.path}))}function i(l){const r=window.getSelection(),a=n.value;if(!r||r.rangeCount===0||!a||!l.clipboardData)return;const c=r.getRangeAt(0);if(!c.intersectsNode(a))return;const u=c.cloneContents();for(const d of u.querySelectorAll(".mention-pill")){const{mentionKind:f,mentionName:p,mentionPath:h}=d.dataset;f!=="file"&&f!=="folder"&&f!=="skill"||p===void 0||h===void 0||d.replaceWith(document.createTextNode(Hv({kind:f,name:p,path:h})))}l.clipboardData.setData("text/plain",u.textContent??""),l.preventDefault()}return(l,r)=>(g(),S("span",{ref_key:"root",ref:n,class:"composer-text",onCopy:i},[(g(!0),S(Ce,null,rt(o.value,(a,c)=>(g(),S(Ce,{key:c},[a.type==="text"?(g(),S(Ce,{key:0},[He(I(a.value),1)],64)):(g(),S("span",{key:1,class:Be(["mention-pill",`mention-${a.attrs.kind}`]),"data-mention-kind":a.attrs.kind,"data-mention-name":a.attrs.name,"data-mention-path":a.attrs.path,tabindex:a.attrs.kind==="file"&&e.interactive&&e.openFile?0:void 0,role:a.attrs.kind==="file"&&e.interactive&&e.openFile?"button":void 0,onClick:u=>s(u,a.attrs),onKeydown:[go(u=>s(u,a.attrs),["enter"]),go(u=>s(u,a.attrs),["space"])]},[b("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:a.attrs.kind==="skill"?v(Ll)("sparkles","sm"):v(ju)(a.attrs.path,a.attrs.name)},null,8,s9e),b("span",i9e,I(v(I$)(a.attrs.name)),1)],42,o9e))],64))),128))],544))}}),l9e=["aria-expanded","title"],r9e={class:"tf-sum"},a9e=["inert"],c9e={class:"tf-body-inner"},u9e={key:1,class:"msg"},d9e=Je({__name:"TurnFold",props:{items:{},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},streamingTailIndex:{default:null},durationMs:{default:void 0},toolDiffPanel:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent","detach"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=B(()=>n.streamingTailIndex!==null),l=B(()=>n.live?n.parked?"parked":"live":"settled"),r=V(!1),a=B(()=>i.value||r.value),c=V(a.value),u=V(a.value);let d=null;Ke(a,z=>{if(z){if(d!==null&&(clearTimeout(d),d=null),c.value){u.value=!0;return}c.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{u.value=!0})});return}u.value=!1,d=setTimeout(()=>{d=null,c.value=!1},200)});const f=fn("pinScroll",()=>{}),p=V(null);function h(){r.value=!r.value,yt(()=>{const z=p.value;z&&f(z)})}const m=V(Date.now());let k=null;function x(){k!==null&&(clearInterval(k),k=null)}Ke(l,(z,L)=>{z!=="settled"?(m.value=Date.now(),k===null&&(k=setInterval(()=>{m.value=Date.now()},1e3))):x(),L==="live"&&z!=="live"&&(r.value=!1)},{immediate:!0}),En(()=>{x(),d!==null&&clearTimeout(d)});const y=B(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),w=B(()=>{if(l.value==="settled")return n.durationMs!==void 0?Math.max(0,n.durationMs):y.value===void 0||n.endedMs===void 0?void 0:Math.max(0,n.endedMs-y.value);if(y.value!==void 0)return Math.max(0,m.value-y.value)}),_=B(()=>{const z=w.value;if(z===void 0)return s("conversation.fold.workedUnknown");const L=V2(z);return L?s("conversation.fold.worked",{duration:L}):s("conversation.fold.workedUnknown")});function A(z){return c1(z)?!1:n.streamingTailIndex!==null&&"sourceIndex"in z&&z.sourceIndex===n.streamingTailIndex}function P(z){if(n.streamingTailIndex===null)return!1;const L=z.items.at(-1);return L!==void 0&&c1(L)?!1:L!==void 0&&L.sourceIndex===n.streamingTailIndex}return(z,L)=>e.items.length>0?(g(),S("div",{key:0,class:Be(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?Y("",!0):(g(),S("button",{key:0,ref_key:"headEl",ref:p,type:"button",class:"tf-head","aria-expanded":r.value,title:_.value,onClick:h},[b("span",r9e,I(_.value),1),W(Ee,{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,l9e)),c.value?(g(),S("div",{key:1,class:Be(["tf-body",{open:u.value}]),inert:!a.value},[b("div",c9e,[(g(!0),S(Ce,null,rt(e.items,(E,T)=>(g(),S(Ce,{key:v(cE)(E,T)},[E.kind==="thinking"?(g(),ue(Vg,{key:0,text:E.thinking,mobile:e.mobile,streaming:A(E),"started-at-ms":v(W2)(E.startedAt),"duration-ms":E.durationMs},null,8,["text","mobile","streaming","started-at-ms","duration-ms"])):E.kind==="text"&&E.text?(g(),S("div",u9e,[W(Br,{text:E.text,streaming:A(E),"open-file":$=>o("openFile",$)},null,8,["text","streaming","open-file"])])):E.kind==="activity-run"?(g(),ue(dE,{key:2,items:E.items,mobile:e.mobile,streaming:P(E),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:L[0]||(L[0]=$=>o("openMedia",$)),onOpenFile:L[1]||(L[1]=$=>o("openFile",$)),onOpenToolDiff:L[2]||(L[2]=$=>o("openToolDiff",$)),onOpenAgent:L[3]||(L[3]=$=>o("openAgent",$)),onDetach:L[4]||(L[4]=$=>o("detach",$))},null,8,["items","mobile","streaming","tool-diff-panel"])):E.kind==="tool"?(g(),ue(Dg,{key:3,tool:E.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:L[5]||(L[5]=$=>o("openMedia",$)),onOpenFile:L[6]||(L[6]=$=>o("openFile",$)),onOpenToolDiff:L[7]||(L[7]=$=>o("openToolDiff",$)),onOpenAgent:L[8]||(L[8]=$=>o("openAgent",$)),onDetach:L[9]||(L[9]=$=>o("detach",$))},null,8,["tool","mobile","tool-diff-panel"])):E.kind==="notification"?(g(),ue(N$,{key:4,items:E.items},null,8,["items"])):Y("",!0)],64))),128))])],10,a9e)):Y("",!0)],2)):Y("",!0)}}),f9e=vt(d9e,[["__scopeId","data-v-331ba726"]]),p9e={key:0,class:"ui-card__head"},h9e={class:"ui-card__body"},m9e={key:1,class:"ui-card__foot"},g9e=Je({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(g(),S("div",p9e,[jn(t.$slots,"head",{},void 0,!0)])):Y("",!0),b("div",h9e,[jn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(g(),S("div",m9e,[jn(t.$slots,"foot",{},void 0,!0)])):Y("",!0)],2))}}),c9=vt(g9e,[["__scopeId","data-v-d2cab471"]]),v9e={class:"tf-ic"},y9e={class:"tf-title"},w9e={key:0,class:"tf-stats"},k9e={key:0,class:"tf-add"},b9e={key:1,class:"tf-del"},_9e={class:"diffbar","aria-hidden":"true"},x9e={class:"tf-list"},S9e=["innerHTML"],C9e={class:"tf-dir"},M9e={class:"tf-base"},A9e={key:0,class:"tf-stats"},T9e={key:0,class:"tf-add"},E9e={key:1,class:"tf-del"},I9e=Je({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=Uo(!1),i=B(()=>s.value?e.changes:e.changes.slice(0,3)),l=B(()=>Math.max(0,e.changes.length-3)),r=B(()=>e.changes.reduce((k,x)=>k+x.added,0)),a=B(()=>e.changes.reduce((k,x)=>k+x.removed,0)),c=B(()=>e.changes.every(k=>!k.statsIncomplete)),u=B(()=>r.value+a.value),d=B(()=>u.value===0?1:r.value),f=B(()=>u.value===0?1:a.value);function p(k){if(!e.cwd)return k;const x=e.cwd.replaceAll("\\","/").replace(/\/$/,""),y=k.replaceAll("\\","/");return y.startsWith(`${x}/`)?y.slice(x.length+1):k}function h(k){const x=p(k).replaceAll("\\","/"),y=x.lastIndexOf("/");return y<0?{dir:"",base:x}:{dir:x.slice(0,y+1),base:x.slice(y+1)}}function m(k){e.interactive&&(k.hasWrite?n("openFile",{path:k.path}):n("openDiff",k))}return(k,x)=>(g(),ue(c9,{class:"turn-files"},$2({head:ae(()=>[b("span",v9e,[W(Ee,{name:"pencil",size:"sm"})]),b("span",y9e,I(v(o)(e.changes.length===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:e.changes.length})),1),c.value&&u.value>0?(g(),S("span",w9e,[r.value>0?(g(),S("span",k9e,"+"+I(r.value),1)):Y("",!0),a.value>0?(g(),S("span",b9e,"−"+I(a.value),1)):Y("",!0),b("span",_9e,[b("span",{class:"seg-add",style:Gt({flexGrow:d.value})},null,4),b("span",{class:"seg-del",style:Gt({flexGrow:f.value})},null,4)])])):Y("",!0)]),default:ae(()=>[b("ul",x9e,[(g(!0),S(Ce,null,rt(i.value,y=>(g(),S("li",{key:y.path,class:"tf-row"},[(g(),ue(cs(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:"tf-file",onClick:w=>m(y)},{default:ae(()=>[b("span",{class:"tf-ficon","aria-hidden":"true",innerHTML:v(ju)(y.path)},null,8,S9e),b("span",C9e,I(h(y.path).dir),1),b("span",M9e,I(h(y.path).base),1)]),_:2},1032,["type","onClick"])),!y.statsIncomplete&&(y.added>0||y.removed>0)?(g(),S("span",A9e,[y.added>0?(g(),S("span",T9e,"+"+I(y.added),1)):Y("",!0),y.removed>0?(g(),S("span",E9e,"−"+I(y.removed),1)):Y("",!0)])):Y("",!0)]))),128))])]),_:2},[l.value>0?{name:"foot",fn:ae(()=>[W(Nt,{class:"tf-more",variant:"ghost",size:"sm",onClick:x[0]||(x[0]=y=>s.value=!s.value)},{default:ae(()=>[W(Ee,{class:Be(["tf-more-car",{open:s.value}]),name:"chevron-down",size:"sm"},null,8,["class"]),He(" "+I(s.value?v(o)("conversation.turnFiles.showLess"):v(o)(l.value===1?"conversation.turnFiles.moreOne":"conversation.turnFiles.more",{number:l.value})),1)]),_:1})]),key:"0"}:void 0]),1024))}}),L9e=vt(I9e,[["__scopeId","data-v-11486090"]]),$9e=["src"],N9e=6,z9e=300,B9e=6,R9e=250,P9e=Je({__name:"MascotSprite",props:{state:{},size:{default:48}},setup(e){const t=N9e*z9e,n=B9e*R9e,o=e,s=V("laptop");let i;const l=B(()=>{const d=o.size;return{width:`${d}px`,height:`${d*208/192}px`}}),r=B(()=>o.state==="failed"?"/brand/mascot-failed.png":`/brand/mascot-${s.value}.png`);function a(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function c(){i!==void 0&&(clearTimeout(i),i=void 0)}function u(){if(c(),o.state==="failed"||a())return;const d=s.value==="laptop"?t:n;i=setTimeout(()=>{i=void 0,s.value=s.value==="laptop"?"review":"laptop",u()},d)}return In(u),En(c),Ke(()=>o.state==="failed",d=>{if(d){c();return}s.value="laptop",u()}),(d,f)=>(g(),S("img",{"aria-hidden":"true",class:"mascot-apng",src:r.value,style:Gt(l.value)},null,12,$9e))}}),F9e=vt(P9e,[["__scopeId","data-v-c03cab60"]]),j9e={class:"working-indicator",role:"status"},O9e={class:"wi-mascot","aria-hidden":"true"},H9e={class:"wi-label ui-shimmer"},D9e=Je({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",j9e,[b("span",O9e,[W(F9e,{state:"running",size:40})]),b("span",H9e,I(e.label),1)]))}}),V9e=vt(D9e,[["__scopeId","data-v-934cc635"]]),Tr=V(null),vu=V(!1);function u9(e){const t=Tr.value;!t||vu.value||(Tr.value=null,t.resolve(e))}async function W9e(){const e=Tr.value;if(!(!e||vu.value)){if(!e.action){u9(!0);return}vu.value=!0;try{await e.action(),Tr.value===e&&(Tr.value=null),e.resolve(!0)}catch(t){Tr.value===e&&(Tr.value=null),e.reject(t)}finally{vu.value=!1}}}function q9e(e){return vu.value?Promise.resolve(!1):(Tr.value&&u9(!1),new Promise((t,n)=>{Tr.value={...e,resolve:t,reject:n}}))}function z1(){return{current:Tr,busy:vu,confirm:q9e,settle:u9,runAction:W9e}}const U9e=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,Z9e=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,K9e=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,TC="text/plain;charset=utf-8";function G9e(e,t){const n=(t??"").toLowerCase();if(U9e.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:TC;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:Z9e.test(o)?TC:K9e.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function ON(e,t,n){const o=G9e(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await Ct().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const l=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=l;else{const r=document.createElement("a");r.href=l,r.download=t??e,r.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}function Y9e(e){const t=e.replaceAll("\\","/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const l=n!=="",r=[];for(const c of o.split("/"))!c||c==="."||(c===".."?r.length>0&&r.at(-1)!==".."?r.pop():l||r.push(c):r.push(c));const a=n+r.join("/");return s?a.toLowerCase():a}function X9e(e,t){let n=0,o=0;for(const s of e)s.oldNo!==void 0&&(n=Math.max(n,s.oldNo)),s.newNo!==void 0&&(o=Math.max(o,s.newNo));return t.map(s=>({...s,oldNo:s.oldNo===void 0?void 0:s.oldNo+n,newNo:s.newNo===void 0?void 0:s.newNo+o}))}function J9e(e){const t=new Map;for(const n of a1(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=pi(n.tool.name);if(o!=="edit"&&o!=="multi_edit"&&o!=="write")continue;const s=Hg(n.tool.arg);if(!s)continue;const i=o==="write",l=i?null:Og(n.tool),r=l?sE(l):{added:0,removed:0},a=i||l===null,c=Y9e(s),u=t.get(c);if(!u){t.set(c,{path:s,...r,hasWrite:i,statsIncomplete:a,diff:l});continue}u.added+=r.added,u.removed+=r.removed,u.hasWrite||=i,u.statsIncomplete||=a,u.diff!==null&&l!==null?u.diff=[...u.diff,{type:"hunk",text:"···"},...X9e(u.diff,l)]:u.diff=null}return[...t.values()]}const Q9e={class:"chat"},eye={key:0,class:"chat-loading"},tye={class:"chat-loading-text"},nye={key:1,class:"chat-empty"},oye={key:1,class:"top-sentinel-text"},sye={key:0,class:"u-turn"},iye=["data-turn-id"],lye={key:0,class:"u-atts"},rye={key:1,class:"skill-act"},aye={class:"skill-act-head"},cye=["aria-expanded","onClick"],uye={key:0,class:"u-meta"},dye=["aria-label","onClick"],fye=["aria-label","onClick"],pye=["data-turn-id"],hye=["onClick"],mye={class:"cd-view"},gye={key:1,class:"cd-label"},vye=["data-turn-id"],yye={key:1,class:"msg"},wye={key:1,class:"a-msg-ft"},kye={key:0,class:"a-duration"},bye=["aria-label","onClick"],_ye={key:3,class:"turn-failed",role:"alert"},xye={class:"tf-chip","aria-hidden":"true"},Sye={class:"tf-main"},Cye={class:"tf-title"},Mye=["title"],Aye={key:5,class:"sending-placeholder"},Tye={key:6,class:"q-stack"},Eye={class:"q-head"},Iye={class:"q-title"},Lye=["onDragover","onDrop"],$ye=["aria-label","onClick"],Nye={class:"u-bub q-bub"},zye=["title","onDragstart"],Bye=["title","onClick"],Rye={key:0,class:"u-text q-text"},Pye={key:1,class:"q-text q-text-placeholder"},Fye={key:0,class:"q-imgs"},jye={key:0,class:"q-file"},Oye=["aria-label","onClick"],Hye={key:0,class:"open-unsupported",role:"status"},Dye=2500,Vye=Je({__name:"ChatPane",props:{turns:{},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},fastMoon:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},turnFolding:{type:Boolean,default:!0},activityRunFolding:{type:Boolean,default:!0},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},cwd:{},queued:{default:()=>[]}},emits:["openFile","openMedia","copyConversationCopied","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","editMessage","loadOlderMessages","unqueue","editQueued","reorderQueue","steerQueued","continueTurn"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),{confirm:s}=z1();En(()=>{for(const le of w.values())le.disconnect();w.clear(),y.clear(),oe!==null&&(clearTimeout(oe),oe=null),se!==null&&(clearTimeout(se),se=null),q!==null&&(clearTimeout(q),q=null),ve!==null&&(clearTimeout(ve),ve=null)});const i=e,l=V(null);let r=null;function a(){!l.value||typeof IntersectionObserver>"u"||(r?.disconnect(),r=new IntersectionObserver(le=>{le[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&m("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),r.observe(l.value))}In(a),En(()=>{r?.disconnect(),r=null}),Ke(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{yt().then(a)});const c=B(()=>{if(!i.turnActive||i.turns.length===0)return null;const le=i.turns.at(-1);return le.role==="assistant"?le.id:null}),u=B(()=>i.working),d=new WeakMap;function f(le){const fe=d.get(le);if(fe?.activityRunFolding===i.activityRunFolding&&fe.turnFolding===i.turnFolding)return fe.model;const ge=Jne(le,i.activityRunFolding),{folded:Oe,visible:Fe}=Qne(ge,i.turnFolding),pt={all:ge,folded:Oe,visible:Fe,changes:J9e(le)};return d.set(le,{activityRunFolding:i.activityRunFolding,turnFolding:i.turnFolding,model:pt}),pt}const p=B(()=>{const le=new Map;for(const fe of i.turns)fe.role==="assistant"&&le.set(fe.id,f(fe));return le}),h=B(()=>{const le=i.turns.at(-1);if(le?.role!=="assistant")return o("conversation.requesting");const fe=p.value.get(le.id)?.all.some(ge=>ge.kind==="text"?ge.text.trim().length>0:!0);return o(fe?"conversation.working":"conversation.requesting")}),m=n,k=V({}),x=V({}),y=new Map,w=new Map;function _(le){const ge=y.get(le)?.querySelector(".u-text");if(!ge)return;const Oe=Number.parseFloat(getComputedStyle(ge).lineHeight)||24;x.value[le]=ge.scrollHeight>Oe*10+1}function A(le,fe){const ge=fe instanceof HTMLElement?fe:null;if(!ge){w.get(le)?.disconnect(),w.delete(le),y.delete(le);return}if(y.get(le)!==ge){if(w.get(le)?.disconnect(),y.set(le,ge),typeof ResizeObserver<"u"){const Oe=new ResizeObserver(()=>_(le));Oe.observe(ge.querySelector(".u-text")??ge),w.set(le,Oe)}yt(()=>_(le))}}function P(le){k.value[le]=!k.value[le]}const z=V(null),L=V(null);function E(le){return(le.attachments?.length??0)>0}function T(le){m("editQueued",le)}function $(le,fe){if(z.value=le,!fe.dataTransfer)return;fe.dataTransfer.effectAllowed="move",fe.dataTransfer.setData("text/plain",String(le));const ge=fe.currentTarget?.closest(".q-turn");ge&&fe.dataTransfer.setDragImage(ge,24,24)}function C(le,fe){if(z.value===null)return;fe.preventDefault(),fe.dataTransfer&&(fe.dataTransfer.dropEffect="move");const ge=fe.currentTarget.getBoundingClientRect(),Oe=fe.clientY{for(let le=i.turns.length-1;le>=0;le--)if(i.turns[le].role==="user")return i.turns[le].id;return null});function M(le){return!i.readOnly&&le.role==="user"&&le.id===D.value&&!i.working&&!le.pluginCommand&&!(le.skillActivation&&!n5e(le.skillActivation,{revivePill:!1}))}function R(le){return le.skillActivation?o5e(le.skillActivation):le.pluginCommand?le.pluginCommand.args||null:le.text||null}function O(le){const fe=le.compaction,ge=fe?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof fe?.tokensBefore=="number"&&typeof fe?.tokensAfter=="number"?ge+o("conversation.compactedTokens",{before:ba(fe.tokensBefore),after:ba(fe.tokensAfter)}):ge}const U=V(null),Z=V(null);let q=null;async function te(le){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&ee(le)}function ee(le){if(Z.value!==null)return;Z.value=le.id;const fe=le.skillActivation?E$(le.skillActivation,{revivePill:!1})??le.text:le.text;m("editMessage",{text:fe,attachments:le.attachments}),q=setTimeout(()=>{q=null,Z.value=null},Dye)}Ke(()=>i.turns,le=>{Z.value!==null&&(le.some(fe=>fe.id===Z.value)||(Z.value=null,q!==null&&(clearTimeout(q),q=null)))},{flush:"post"});const J=V(!1);let se=null;function Q(){if(i.turns.length===0)return;const le=[];for(const ge of i.turns){if(ge.role==="compaction"||ge.role==="cron")continue;const Oe=ge.role==="user"?"User":"Assistant",Fe=toe(ge);Fe.trim()&&le.push(`**${Oe}** +`:"")+(T!==""?`${a0(T)} +`:"")+"",N={id:`task_ntf_${P}`,sessionId:f,role:"user",content:[{type:"text",text:I}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:_,status:A,notificationId:P}}};h.messages.push(N),k.push({type:"messageCreated",message:Lc(N)});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:m?.code,message:m?.message,name:m?.name,details:m?.details,retryable:m?.retryable}});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:m?.message}});break}case"task.started":{const y=m?.info??{},w=typeof y.startedAt=="number"?new Date(y.startedAt).toISOString():void 0,_=typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):ta("task_"),A=typeof y.description=="string"?y.description:typeof y.command=="string"?y.command:Mo.global.t("tasks.defaultDescription");if(y.kind==="agent"){const z=typeof y.agentId=="string"&&y.agentId.length>0?y.agentId:void 0;if(z!==void 0){const L=w0(h,f,z,{description:A,backgroundTaskId:_,model:typeof y.model=="string"?y.model:void 0,thinkingEffort:typeof y.thinkingEffort=="string"?y.thinkingEffort:void 0,routing:dC(y.routing),currentRoutingEnvRevision:typeof y.currentRoutingEnvironmentRevision=="string"?y.currentRoutingEnvironmentRevision:void 0,runInBackground:!0});L&&k.push({type:"taskCreated",sessionId:f,task:L})}else k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"subagent",description:A,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,subagentPhase:"queued",runInBackground:!0}});break}const P=typeof y.command=="string"?y.command:void 0;k.push({type:"taskCreated",sessionId:f,task:{id:_,sessionId:f,kind:"bash",description:A,command:P,status:"running",createdAt:w??new Date().toISOString(),startedAt:w,outputPreview:P!==void 0?`$ ${P}`:void 0}});break}case"task.terminated":{const y=m?.info??{},w=y.status==="failed"||typeof y.exitCode=="number"&&y.exitCode!==0;k.push({type:"taskCompleted",sessionId:f,taskId:typeof y.taskId=="string"?y.taskId:typeof y.taskId=="number"?String(y.taskId):"",status:w?"failed":"completed"});break}case"compaction.completed":{const y=m?.result??{};k.push({type:"compactionCompleted",sessionId:f,tokensBefore:typeof y.tokensBefore=="number"?y.tokensBefore:void 0,tokensAfter:typeof y.tokensAfter=="number"?y.tokensAfter:void 0,summary:typeof y.summary=="string"?y.summary:void 0}),k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:f,trigger:m?.trigger==="manual"?"manual":"auto",instruction:typeof m?.instruction=="string"?m.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:f});break}case"goal.updated":{const y=ove(m?.snapshot??null);k.push({type:"goalUpdated",sessionId:f,goal:y?.status==="complete"?null:y});break}case"cron.fired":{const y=m?.origin,w=as(m??{},"prompt");if(y&&typeof y=="object"&&y.kind==="cron_job"&&w){const _={id:ta("cron_"),sessionId:f,role:"user",content:[{type:"text",text:w}],createdAt:new Date().toISOString(),metadata:{origin:y}};h.messages.push(_),k.push({type:"messageCreated",message:Lc(_)})}break}}return k}return{project:r,bindNextPromptId:i,seedInFlight:l,reset:o,markSideChannelAgent:s}}const hve=new Set(["server_hello","ack","ping","resync_required","error","pong"]),kC=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","task.notified","background.task.started","background.task.terminated","cron.fired"]),mve=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),gve=new Set(["assistant.delta","thinking.delta"]);function vve(e,t){if(hve.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return gve.has(o)?yve(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?mve.has(o)?{route:"protocol"}:kC.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:kC.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function yve(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}class t2 extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class Jr extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}function ol(e){return e instanceof t2||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function a9(e){return e instanceof Jr||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}const Xs="pythinker-web.server-credential",wve="token",kve=10080*60*1e3;let $r;const N7=new Set;function bve(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(wve);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function z7(e){return{version:1,credential:e,expiresAt:Date.now()+kve}}function _ve(e){return JSON.stringify(e)}function c9(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function B7(e){globalThis.localStorage?.setItem(Xs,_ve(e))}function xve(){try{const e=globalThis.localStorage?.getItem(Xs);if(e){const n=c9(e);if(n===void 0){const o=z7(e);let s=!1;try{B7(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Xs),globalThis.localStorage?.getItem(Xs)===e&&globalThis.localStorage?.removeItem(Xs);return}const t=globalThis.sessionStorage?.getItem(Xs);if(t){const n=z7(t);let o=!1;try{B7(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Xs),o=!0}catch{}return o?n:void 0}return}catch{return}}function Sve(){const e=bve();return e?(FN(e),!0):($r=xve(),$r!==void 0)}function PN(){if($r!==void 0){if($r.expiresAt<=Date.now()){Cve($r);return}return $r.credential}}function Cve(e){$r=void 0;try{globalThis.sessionStorage?.removeItem(Xs);const t=globalThis.localStorage?.getItem(Xs),n=t==null?void 0:c9(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Xs)}catch{}}function FN(e){const t=z7(e);$r=t;try{B7(t)}catch{}try{globalThis.sessionStorage?.removeItem(Xs)}catch{}}function Mve(){const e=$r;$r=void 0;try{const t=globalThis.localStorage?.getItem(Xs),o=(t==null?void 0:c9(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(Xs),globalThis.sessionStorage?.removeItem(Xs)}catch{}}function Ave(e){return N7.add(e),()=>{N7.delete(e)}}function Tve(){Mve();for(const e of N7)try{e()}catch{}}const Oc=3e4,Q3=5*6e4,jN="0123456789ABCDEFGHJKMNPQRSTVWXYZ",bC=500,ON=40101;function e4(e,t=Oc){let n;try{n=AbortSignal.timeout(t)}catch{n=void 0}if(e===void 0)return n;if(n===void 0)return e;try{return AbortSignal.any([e,n])}catch{const o=[e,n],s=new AbortController,i=()=>{for(const a of o)a.removeEventListener("abort",l)},l=a=>{i(),s.abort(a.target.reason)};for(const a of o)a.addEventListener("abort",l,{once:!0});const r=o.find(a=>a.aborted);return r!==void 0&&(i(),s.abort(r.reason)),s.signal}}function Eve(e,t){let n="",o=e;for(let s=0;sjN[n%32]).join("")}function t4(){return`${Eve(Date.now(),10)}${Ive(16)}`}function Lve(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function Rm(e){try{const t=await e.text();return t?t.length>bC?`${t.slice(0,bC)}...`:t:void 0}catch{return}}class R7{constructor(t,n,o="v1"){this.origin=t,this.identity=n,this.apiVersion=o}async get(t,n,o){return this.request("GET",t,void 0,n,[],void 0,!1,o?.signal)}async getBlob(t){const n=Yc(this.origin,t,this.apiVersion),o=t4(),s={"X-Request-Id":o};this.addClientHeaders(s);const i=Date.now();X3({method:"GET",path:t,url:n,requestId:o});let l;try{l=await fetch(n,{method:"GET",headers:s,signal:e4()})}catch(a){throw Da({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-i,error:a}),new Jr({message:`Network error calling GET ${t}`,cause:a,method:"GET",path:t,url:n,requestId:o,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-i})}if(l.ok)return Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:0,msg:""}),l.blob();let r;try{r=await l.clone().json()}catch{}throw this.checkAuthRequired(l,r?.code??0),Ac({method:"GET",path:t,requestId:o,status:l.status,durationMs:Date.now()-i,code:r?.code??l.status,msg:r?.msg??l.statusText,envelopeRequestId:r?.request_id}),new t2({code:r?.code??l.status,msg:r?.msg??l.statusText,requestId:r?.request_id??o,details:r?.details,timestamp:Date.now(),durationMs:Date.now()-i})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async exchange(t,n,o={}){return this.request(t,n,o.body,void 0,o.allowCodes??[],o.headers,!0)}async postZip(t,n,o){const s="POST",i=Yc(this.origin,t,this.apiVersion),l=t4(),r={"X-Request-Id":l,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(r);const a=Date.now();X3({method:s,path:t,url:i,requestId:l,body:o});let c;try{c=await fetch(i,{method:s,headers:r,body:JSON.stringify(n),signal:e4(void 0,Q3)})}catch(p){throw Da({method:s,path:t,requestId:l,phase:"fetch",durationMs:Date.now()-a,error:p}),new Jr({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"fetch",timeoutMs:Q3,timestamp:Date.now(),durationMs:Date.now()-a})}const u=c.headers.get("content-type")??void 0,d=u?.split(";",1)[0]?.trim().toLowerCase();if(!c.ok||d!=="application/zip"){let p;try{p=await c.clone().json()}catch{}if(this.checkAuthRequired(c,p?.code??0),!c.ok||p!==void 0&&p.code!==0){const k=p?.code??c.status,x=p?.msg??c.statusText;throw Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:k,msg:x,envelopeRequestId:p?.request_id}),new t2({code:k,msg:x,requestId:p?.request_id??l,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const h=c.clone(),m=new TypeError(`Expected application/zip, received ${u??"no content type"}`);throw Da({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:m}),new Jr({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:Q3,status:c.status,statusText:c.statusText,contentType:u,bodyPreview:await Rm(h),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await c.blob()}catch(p){throw Da({method:s,path:t,requestId:l,phase:"parse",durationMs:Date.now()-a,status:c.status,error:p}),new Jr({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:l,phase:"parse",timeoutMs:Q3,status:c.status,statusText:c.statusText,contentType:u,timestamp:Date.now(),durationMs:Date.now()-a})}return Ac({method:s,path:t,requestId:l,status:c.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:c.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=Yc(this.origin,t,this.apiVersion),s=t4(),i={"X-Request-Id":s};this.addClientHeaders(i);const l=Date.now();X3({method:"POST",path:t,url:o,requestId:s,body:Lve(n)});let r;try{r=await fetch(o,{method:"POST",headers:i,body:n,signal:e4()})}catch(u){throw Da({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-l,error:u}),new Jr({message:`Network error calling POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-l})}let a;const c=r.clone();try{a=await r.json()}catch(u){throw Da({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-l,status:r.status,error:u}),new Jr({message:`Failed to parse JSON response from POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:Oc,status:r.status,statusText:r.statusText,contentType:r.headers.get("content-type")??void 0,bodyPreview:await Rm(c),timestamp:Date.now(),durationMs:Date.now()-l})}if(Ac({method:"POST",path:t,requestId:s,status:r.status,durationMs:Date.now()-l,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(r,a.code),a.code!==0)throw new t2({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-l});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[],l,r,a){let c=Yc(this.origin,n,this.apiVersion);if(s){const k=new URLSearchParams;for(const[y,w]of Object.entries(s))w!==void 0&&k.set(y,String(w));const x=k.toString();x&&(c=`${c}?${x}`)}const u=t4(),d={"X-Request-Id":u};this.addClientHeaders(d),o!==void 0&&(d["Content-Type"]="application/json; charset=utf-8"),l!==void 0&&Object.assign(d,l);const f=Date.now();X3({method:t,path:n,url:c,requestId:u,body:o});let p;try{p=await fetch(c,{method:t,headers:d,body:o!==void 0?JSON.stringify(o):void 0,signal:e4(a)})}catch(k){throw Da({method:t,path:n,requestId:u,phase:"fetch",durationMs:Date.now()-f,error:k}),new Jr({message:`Network error calling ${t} ${n}`,cause:k,method:t,path:n,url:c,requestId:u,phase:"fetch",timeoutMs:Oc,timestamp:Date.now(),durationMs:Date.now()-f})}let h;const m=p.clone();try{h=await p.json()}catch(k){throw Da({method:t,path:n,requestId:u,phase:"parse",durationMs:Date.now()-f,status:p.status,error:k}),new Jr({message:`Failed to parse JSON response from ${t} ${n}`,cause:k,method:t,path:n,url:c,requestId:u,phase:"parse",timeoutMs:Oc,status:p.status,statusText:p.statusText,contentType:p.headers.get("content-type")??void 0,bodyPreview:await Rm(m),timestamp:Date.now(),durationMs:Date.now()-f})}if(Ac({method:t,path:n,requestId:u,status:p.status,durationMs:Date.now()-f,code:h.code,msg:h.msg,envelopeRequestId:h.request_id,data:h.data}),this.checkAuthRequired(p,h.code),h.code!==0&&!i.includes(h.code))throw new t2({code:h.code,msg:h.msg,requestId:h.request_id,details:h.details,timestamp:Date.now(),durationMs:Date.now()-f});return r===!0?{data:h.data,code:h.code,headers:p.headers}:h.data}addClientHeaders(t){const n=PN();n!==void 0&&(t.Authorization=`Bearer ${n}`),this.identity!==void 0&&(t["X-Pythinker-Client-Id"]=this.identity.clientId,t["X-Pythinker-Client-Name"]=this.identity.clientName,t["X-Pythinker-Client-Version"]=this.identity.clientVersion,t["X-Pythinker-Client-Ui-Mode"]=this.identity.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===ON)&&Tve()}}const $ve="pythinker-code.bearer.",Nve=3e4;class zve{constructor(t,n,o){this.wsUrl=t,this.clientId=n,this.handlers=o}ws=null;connected=!1;closed=!1;subscriptions=new Map;pendingSubscriptions=[];transcriptSubscriptions=new Map;terminalAttachments=new Map;msgSeq=0;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),Tc("connect",{url:this.wsUrl,attempt:this.reconnectAttempts});const t=PN(),n=t!==void 0?[`${$ve}${t}`]:void 0,o=new WebSocket(this.wsUrl,n);this.ws=o,o.onopen=()=>{Tc("open")},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));xge(i),this.handleFrame(i)}catch(i){Tc("parse-error",{error:String(i)}),this.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{Tc("error"),this.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{Tc("close",s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0),this.connected=!1,this.ws=null,this.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,Tc("reconnect-scheduled",{delayMs:n,attempt:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,sinceSeq:o}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=n4(t,n),i=this.terminalAttachments.get(s),l=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:l}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,l)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(n4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(n4(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,Nve),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=AN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const l=s.data;this.handlers.onTranscriptReset?.(i,l.agent_id,{...l.snapshot,hasMoreOlder:l.has_more_older},l.seq);const r=this.transcriptSubscriptions.get(i);r?.agentId===l.agent_id&&l.seq!==void 0&&(r.sinceSeq=l.seq);return}if(o==="transcript.ops"){const s=TN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const l=s.data,r=this.handlers.onTranscriptOps?.(i,l.agent_id,l.ops,l.seq),a=this.transcriptSubscriptions.get(i);r!==!1&&a?.agentId===l.agent_id&&l.seq!==void 0&&(a.sinceSeq=l.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.handlers.onRawAgentEvent?this.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,l=n.seq,r=n4(s,i),a=this.terminalAttachments.get(r);a&&this.terminalAttachments.set(r,{...a,lastSeq:Math.max(a.lastSeq,l)});const c=typeof n.payload?.data=="string"?n.payload.data:"";this.handlers.onTerminalOutput?.(s,i,c,l);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,l=n.payload?.exit_code,r=typeof l=="number"?l:null;this.handlers.onTerminalExit?.(s,i,r);break}default:{this.trackCursor(n);const s=n.type,i=vve(s,n.payload);if(i.route==="protocol"){this.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const l=n,r=n;this.handlers.onRawAgentEvent({type:i.agentType,seq:l.seq,session_id:l.session_id,timestamp:l.timestamp,payload:l.payload,...r.volatile!==void 0?{volatile:r.volatile}:{},...r.offset!==void 0?{offset:r.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const o of this.pendingSubscriptions)this.subscriptions.set(o.sessionId,o.cursor),t.includes(o.sessionId)||t.push(o.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[o,s]of this.subscriptions.entries())n[o]=s;this.send({type:"client_hello",id:this.nextId(),payload:{client_id:this.clientId,subscriptions:t,cursors:n}});for(const[o,s]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(o,s.agentId,s.sinceSeq);for(const o of this.terminalAttachments.values())this.sendTerminalAttach(o.sessionId,o.terminalId,o.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n}})}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),_ge(t)}catch{}}nextId(){return`c_${++this.msgSeq}`}}function n4(e,t){return`${e}\0${t}`}function Bve(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function _C(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function Rve(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:e.activity.model??"",usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id||void 0}}function Pve(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function xC(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function SC(e){const t={type:e.type,models:e.models.map(n=>({model:n.model,max_context_size:n.maxContextSize,display_name:n.displayName,capabilities:n.capabilities,max_output_size:n.maxOutputSize,support_efforts:n.supportEfforts,adaptive_thinking:n.adaptiveThinking}))};return"id"in e&&(t.id=e.id),"newId"in e&&e.newId!==void 0&&(t.new_id=e.newId),e.apiKey!==void 0&&(t.api_key=e.apiKey),e.baseUrl!==void 0&&(t.base_url=e.baseUrl),e.defaultModel!==void 0&&(t.default_model=e.defaultModel),t}function Pm(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function CC(e){return e==="auto_compact"||e==="manual_compact"}const MC=41201;class Fve{http;httpV2;config;constructor(t){this.config=t;const n={clientId:t.clientId,clientName:t.clientName,clientVersion:t.clientVersion,clientUiMode:t.clientUiMode};this.http=new R7(t.serverHttpUrl,n),this.httpV2=new R7(t.serverHttpUrl,n,"v2")}async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,backend:t.backend==="v2"?"v2":"v1",experimentalFlagStates:Yge(t.experimental_flag_states)}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(tr),hasMore:o.has_more}}async listSessionGroupsV2(t){const n=await this.httpV2.get("/sessions",{view:"by_workspace","group.page_size":t?.groupPageSize,"meta.has_prompt":t?.hasPrompt,page_size:t?.pageSize,page_token:t?.pageToken});return{groups:n.groups.map(o=>({workspace:o.workspace,sessions:o.sessions.map(Rve),total:o.total})),hasMore:n.has_more,nextPageToken:n.next_page_token,total:n.total}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return tr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return tr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.dynamicWorkflowMode!==void 0&&(s.dynamic_workflow_mode=n.dynamicWorkflowMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),n.tools!==void 0&&(s.tools=n.tools),n.mcpServers!==void 0&&(s.mcp_servers=n.mcpServers),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return tr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,dynamicWorkflowMode:n.dynamic_workflow_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return BN(n)}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return tr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(I7),hasMore:s.has_more}}async getSessionTranscript(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=rge.parse(o);return{agentId:s.agent_id,snapshot:{items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more},agents:s.agents,pendingInteractions:s.pending_interactions,seq:s.seq}}async getSessionSnapshot(t){const n=Date.now();_s("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:tr(o.session),messages:o.messages.items.map(I7),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map($N),pendingQuestions:o.pending_questions.map(NN),subagents:(o.subagents??[]).map(L4)};return _s("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw _s("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,..._C(o)}),o}}async exportSession(t,n){const o=n===void 0?0:new TextEncoder().encode(n).byteLength,s=n===void 0||n.length===0?0:n.split(` +`).length,i=await this.http.postZip(`/sessions/${encodeURIComponent(t)}/export`,{web_log:n},{web_log_bytes:o,web_log_entries:s}),l=`${t}.zip`;return{blob:i.blob,fileName:Bve(i.contentDisposition,l)}}async submitPrompt(t,n){const o=Date.now();_s("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,Lge(n));return _s("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw _s("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,..._C(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return tr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return tr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(tr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,$ge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,Rge(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n?.status,with_output:n?.withOutput,output_bytes:n?.outputBytes,output_status:n?.outputStatus};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o,{signal:n?.signal})).items.map(L4)}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s,{signal:o?.signal});return L4(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async detachTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:detach`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(Pm)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return Pm(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return Pm(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listTools(t){return((await this.http.get("/tools",{session_id:t})).tools??[]).map(o=>({name:o.name,description:o.description,inputSchema:o.input_schema,source:o.source,mcpServerId:o.mcp_server_id}))}async listConnectors(){return((await this.http.get("/mcp/servers")).servers??[]).map(n=>({id:n.id,name:n.name,transport:n.transport,status:n.status,toolCount:n.tool_count,lastError:n.last_error,editable:n.editable,definition:n.definition===void 0?void 0:Pve(n.definition)}))}async createConnector(t){return this.http.post("/mcp/servers",{mcp_server_id:t.name,config:xC(t)})}async updateConnector(t,n){return this.http.put(`/mcp/servers/${encodeURIComponent(t)}`,{config:xC(n)})}async removeConnector(t){return this.http.delete(`/mcp/servers/${encodeURIComponent(t)}`)}async restartConnector(t){return this.http.post(`/mcp/servers/${encodeURIComponent(t)}:restart`,{})}async listPlugins(){return((await this.http.get("/plugins")).plugins??[]).map(n=>({id:n.id,displayName:n.display_name,version:n.version,enabled:n.enabled,state:n.state,skillCount:n.skill_count,mcpServerCount:n.mcp_server_count,hasErrors:n.has_errors,source:n.source}))}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:set-enabled`,{enabled:n})}async listSubagents(t){return((await this.http.get("/agent-profiles",{work_dir:t})).profiles??[]).map(o=>({name:o.name,description:o.description,source:o.source,tools:o.tools,model:o.model,effort:o.effort,whenToUse:o.when_to_use}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([l,r])=>[l,r.map(pC)])):void 0;return{items:s.items.map(pC),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length),n.encoding!==void 0&&(o.encoding=n.encoding);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async writeFile(t,n){const o={path:n.path,content:n.content};n.encoding!==void 0&&(o.encoding=n.encoding),n.baseEtag!==void 0&&(o.base_etag=n.baseEtag);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:write`,o);return{path:s.path,size:s.size,etag:s.etag,created:s.created}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Yc(this.config.serverHttpUrl,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async revealSavedPlan(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/transcript/plan:reveal`,{agent_id:n.agentId,tool_call_id:n.toolCallId})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(C2)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return C2(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return C2(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async generateSessionTitle(t,n){const o={};return n?.force===!0&&(o.force=!0),n?.source!==void 0&&(o.source=n.source),this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,o)}async listModels(){return(await this.http.get("/models")).items.map(Kge)}async listProviders(){return(await this.http.get("/providers")).items.map($d)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=$d(n);return n.api_key===void 0?o:{...o,apiKey:n.api_key}}async addProvider(t){const n=await this.http.post("/providers",SC(t));return $d(n)}async updateProvider(t,n){const o=await this.http.put(`/providers/${encodeURIComponent(t)}`,SC(n));return{provider:$d(o.provider)}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map($d),modelsImported:o.models_imported}}async deleteProvider(t){return this.http.delete(`/providers/${encodeURIComponent(t)}`)}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return AC(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return AC(t)}async startCodexLogin(){const t=await this.http.post("/auth/codex:start");return{loginId:t.login_id,authorizeUrl:t.authorize_url,loopback:t.loopback,expiresAt:t.expires_at}}async getCodexLoginStatus(t){const n=await this.http.get(`/auth/codex/${encodeURIComponent(t)}`);return zm(n)}async submitCodexLoginRedirect(t,n){const o=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:submit_code`,{redirect_url:n});return zm(o)}async cancelCodexLogin(t){const n=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:cancel`);return zm(n)}async getConfig(){const t=await this.http.get("/config");return L7(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultThinking:"default_thinking",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",disabledSkills:"disabled_skills",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry"};for(const[i,l]of Object.entries(t)){const r=o[i];r!==void 0&&(n[r]=l)}const s=await this.http.post("/config",n);return L7(s)}async getSubagentModelPolicy(){const t=await this.http.exchange("GET","/config/subagent-model-policy");return fC(t.data)}async setSubagentModelPolicy(t,n){return this.subagentModelPolicyWrite("PUT",Uge(t),n)}async clearSubagentModelPolicy(t){return this.subagentModelPolicyWrite("DELETE",void 0,t)}async subagentModelPolicyWrite(t,n,o){const s=o===void 0?void 0:{"If-Match":`"${o}"`},i=await this.http.exchange(t,"/config/subagent-model-policy",{body:n,headers:s,allowCodes:[MC]});if(i.code===MC||i.data===null)throw new P$(await this.getSubagentModelPolicy());return fC(i.data)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model}}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return Yc(this.config.serverHttpUrl,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}connectEvents(t){const n=xpe(this.config.serverHttpUrl,this.config.clientId),o=pve(),s=new zve(n,this.config.clientId,{onWireEvent:i=>{const l=Xge(i),r=Jge(i),a=Zge(i);a.type==="historyCompacted"&&!CC(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:l,seq:r})},onRawAgentEvent:i=>{const{type:l,seq:r,session_id:a,payload:c,offset:u}=i,d=o.project(l,c,a,{offset:u});for(const f of d){const p=c?.turnId,h=f.type==="assistantDelta"&&typeof p=="number"&&typeof u=="number"&&(l==="assistant.delta"||l==="thinking.delta")?{turnId:p,offset:u,kind:l==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!CC(f.reason)&&t.onResync(a,r),t.onEvent(f,{sessionId:a,seq:r,stream:h})}},onResync:(i,l,r)=>{o.reset(i),t.onResync(i,l,r)},onConnectionState:i=>{t.onConnectionChange(i)},onError:(i,l,r)=>{t.onError(i,l,r)},onTranscriptReset:(i,l,r,a)=>{t.onTranscriptReset?.(i,l,r,a)},onTranscriptOps:(i,l,r,a)=>t.onTranscriptOps?.(i,l,r,a),onTerminalOutput:(i,l,r,a)=>{t.onTerminalOutput?.(i,l,r,a)},onTerminalExit:(i,l,r)=>{t.onTerminalExit?.(i,l,r)}});return s.connect(),{subscribe(i,l){s.subscribe(i,l??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,l,r){s.subscribeTranscript(i,l,r)},unsubscribeTranscript(i,l){s.unsubscribeTranscript(i,l)},seedSnapshot(i,l){if(l.inFlightTurn===null){o.reset(i);return}const r=o.seedInFlight(i,l.inFlightTurn);for(const a of r)t.onEvent(a,{sessionId:i,seq:l.asOfSeq})},bindNextPromptId(i,l){o.bindNextPromptId(i,l)},abort(i,l){s.abort(i,l)},terminalAttach(i,l,r){s.terminalAttach(i,l,r)},terminalInput(i,l,r){s.terminalInput(i,l,r)},terminalResize(i,l,r,a){s.terminalResize(i,l,r,a)},terminalDetach(i,l){s.terminalDetach(i,l)},terminalClose(i,l){s.terminalClose(i,l)},markSideChannelAgent(i){o.markSideChannelAgent(i)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function AC(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function jve(e){const t=new R7(e.serverHttpUrl,{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode});return{async listCatalogProviders(){return(await t.get("/catalog/providers")).items.map(RN)},async importCatalogProvider(n){const o={catalog_id:n.catalogId};n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.id!==void 0&&(o.id=n.id);const s=await t.post("/providers:import_catalog",o);return Gge(s)}}}let Fm;function Ct(){if(Fm===void 0){const e=B$();Fm=Object.assign(new Fve(e),jve(e))}return Fm}const Ove=["src","controls","muted"],Hve=["aria-label"],Dve=["src","alt"],Vve=["aria-label"],P7=Je({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=V(t.fileId?"":t.url),o=V(null),s=V(!t.fileId);let i=null,l=0,r=!1,a=null;function c(){i!==null&&(URL.revokeObjectURL(i),i=null)}async function u(){const d=++l;if(c(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await Ct().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(r||d!==l){URL.revokeObjectURL(p);return}i=p,n.value=i}catch{if(r||d!==l)return;n.value=t.url}}return Ke(()=>[t.fileId,t.url,s.value],u,{immediate:!0}),In(()=>{typeof IntersectionObserver=="function"&&o.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(o.value)):s.value=!0}),vo(()=>{r=!0,a?.disconnect(),a=null,c()}),(d,f)=>e.kind==="video"?(g(),S(Ce,{key:0},[n.value?(g(),S("video",{key:0,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,Ove)):(g(),S("span",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"status","aria-label":e.alt||""},null,10,Hve))],64)):n.value?(g(),S("img",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,alt:e.alt||"",loading:"lazy"},null,10,Dve)):(g(),S("span",{key:2,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"img","aria-label":e.alt||""},null,10,Vve))}}),Wve=["title","data-kind"],qve=["aria-label","aria-haspopup","aria-expanded"],Uve={class:"att-tile"},Zve={class:"att-name"},Kve={key:1,class:"att-err"},Gve=["aria-label"],Yve=["data-side","aria-label"],Xve={class:"att-tip-preview"},Jve={key:1,class:"att-tip-placeholder"},Qve={class:"att-tip-meta"},e9e={key:0},t9e={key:0,class:"att-tip-error"},n9e={class:"att-tip-foot"},o9e=Je({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(!1),a=V("top"),c=V({});let u=null;const d=B(()=>{const L=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return L?L.toUpperCase():void 0}),f=B(()=>{const z=d.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(z)?"file-text":"file"}),p=B(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function h(z){return z<1024?`${z} B`:z<1024*1024?`${Math.round(z/1024)} KB`:`${(z/(1024*1024)).toFixed(1)} MB`}const m=B(()=>{const z=[p.value];return n.size!==void 0&&z.push(h(n.size)),z.join(" · ")}),k=B(()=>n.kind!=="file"),x=B(()=>k.value&&(!!n.url||!!n.fileId)),y=B(()=>n.error?s("mention.stateUploadFailed"):n.uploading?s("mention.stateUploading"):s("mention.stateUploaded"));function w(){const z=i.value,L=l.value;if(!z||!L)return;const T=z.getBoundingClientRect(),I=8,N=8,C=L.offsetWidth,F=L.offsetHeight;let H=T.top-F-N,D="top";H{r.value=!1,u=null},120)}function P(){u!==null&&clearTimeout(u),u=null,r.value=!1}return Ke(r,z=>{const L=z?"addEventListener":"removeEventListener";window[L]("resize",w),window[L]("scroll",w,!0)}),En(()=>{P(),window.removeEventListener("resize",w),window.removeEventListener("scroll",w,!0)}),(z,L)=>(g(),S(Ce,null,[b("span",{ref_key:"anchorRef",ref:i,class:Be(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:m.value,"data-kind":e.kind,onMouseenter:_,onMouseleave:A,onFocusin:_,onFocusout:A,onKeydown:go(P,["esc"])},[b("button",{type:"button",class:"att-activate","aria-label":m.value,"aria-haspopup":k.value?"dialog":void 0,"aria-expanded":k.value?r.value:void 0,onClick:L[0]||(L[0]=T=>o("activate"))},[b("span",Uve,[e.kind==="image"&&e.url?(g(),ue(P7,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(g(),ue(Ee,{key:1,name:"play",size:"sm"})):e.kind==="image"?(g(),ue(Ee,{key:2,name:"image",size:"sm"})):(g(),ue(Ee,{key:3,name:f.value,size:"sm"},null,8,["name"]))]),b("span",Zve,E(p.value),1),e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("composer.uploading")},null,8,["label"])):e.error?(g(),S("span",Kve,[W(Ee,{name:"info",size:"sm"})])):Y("",!0)],8,qve),e.removable?(g(),ue(Cn,{key:0,text:e.removeLabel??v(s)("composer.remove")},{default:ae(()=>[b("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??v(s)("composer.remove"),onClick:L[1]||(L[1]=T=>o("remove"))},[W(Ee,{name:"close",size:"sm"})],8,Gve)]),_:1},8,["text"])):Y("",!0)],42,Wve),(g(),ue(hl,{to:"body"},[r.value&&k.value?(g(),S("div",{key:0,ref_key:"tipRef",ref:l,class:"att-tip","data-side":a.value,style:Gt(c.value),role:"dialog","aria-label":m.value,onMouseenter:_,onMouseleave:A,onFocusin:_,onFocusout:A,onKeydown:go(P,["esc"])},[L[3]||(L[3]=b("span",{class:"att-tip-caret","aria-hidden":"true"},null,-1)),b("div",Xve,[x.value?(g(),ue(P7,{key:0,url:e.url??"",kind:e.kind==="video"?"video":"image",alt:p.value,"file-id":e.fileId,"media-class":"att-tip-media",controls:e.kind==="video",muted:""},null,8,["url","kind","alt","file-id","controls"])):(g(),S("span",Jve,[e.uploading?(g(),ue(Zo,{key:0,size:"sm",label:v(s)("mention.mediaPreviewUploading")},null,8,["label"])):(g(),ue(Ee,{key:1,name:e.kind==="video"?"play":"image"},null,8,["name"])),b("span",null,E(e.uploading?v(s)("mention.mediaPreviewUploading"):v(s)("mention.mediaPreviewUnavailable")),1)]))]),b("div",Qve,[W(Ee,{name:e.kind==="video"?"play":"image",size:"sm"},null,8,["name"]),b("strong",null,E(p.value),1),e.size!==void 0?(g(),S("span",e9e,"· "+E(h(e.size)),1)):Y("",!0)]),e.error?(g(),S("div",t9e,E(v(s)("mention.attachmentUploadFailed")),1)):Y("",!0),b("div",n9e,[b("span",{class:Be(["att-tip-state",{danger:e.error}])},[e.uploading?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),He(" "+E(y.value),1)],2),x.value?(g(),S("button",{key:0,type:"button",class:"att-tip-open",onClick:L[2]||(L[2]=T=>o("activate"))},[W(Ee,{name:"expand",size:"sm"}),b("span",null,E(v(s)("mention.viewFullscreen")),1)])):Y("",!0)])],44,Yve)):Y("",!0)]))],64))}}),F7=vt(o9e,[["__scopeId","data-v-e59edff1"]]),s9e=["data-mention-kind","data-mention-name","data-mention-path","tabindex","role","onClick","onKeydown"],i9e=["innerHTML"],l9e={class:"mention-pill-name"},TC=Je({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{}},setup(e){const t=e,n=V(null),o=B(()=>T$(t.text));function s(l,r){r.kind!=="file"||!t.interactive||!t.openFile||(l.preventDefault(),l.stopPropagation(),t.openFile({path:r.path}))}function i(l){const r=window.getSelection(),a=n.value;if(!r||r.rangeCount===0||!a||!l.clipboardData)return;const c=r.getRangeAt(0);if(!c.intersectsNode(a))return;const u=c.cloneContents();for(const d of u.querySelectorAll(".mention-pill")){const{mentionKind:f,mentionName:p,mentionPath:h}=d.dataset;f!=="file"&&f!=="folder"&&f!=="skill"||p===void 0||h===void 0||d.replaceWith(document.createTextNode(Dv({kind:f,name:p,path:h})))}l.clipboardData.setData("text/plain",u.textContent??""),l.preventDefault()}return(l,r)=>(g(),S("span",{ref_key:"root",ref:n,class:"composer-text",onCopy:i},[(g(!0),S(Ce,null,rt(o.value,(a,c)=>(g(),S(Ce,{key:c},[a.type==="text"?(g(),S(Ce,{key:0},[He(E(a.value),1)],64)):(g(),S("span",{key:1,class:Be(["mention-pill",`mention-${a.attrs.kind}`]),"data-mention-kind":a.attrs.kind,"data-mention-name":a.attrs.name,"data-mention-path":a.attrs.path,tabindex:a.attrs.kind==="file"&&e.interactive&&e.openFile?0:void 0,role:a.attrs.kind==="file"&&e.interactive&&e.openFile?"button":void 0,onClick:u=>s(u,a.attrs),onKeydown:[go(u=>s(u,a.attrs),["enter"]),go(u=>s(u,a.attrs),["space"])]},[b("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:a.attrs.kind==="skill"?v(Ll)("sparkles","sm"):v(ju)(a.attrs.path,a.attrs.name)},null,8,i9e),b("span",l9e,E(v(L$)(a.attrs.name)),1)],42,s9e))],64))),128))],544))}}),r9e=["aria-expanded","title"],a9e={class:"tf-sum"},c9e=["inert"],u9e={class:"tf-body-inner"},d9e={key:1,class:"msg"},f9e=Je({__name:"TurnFold",props:{items:{},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},streamingTailIndex:{default:null},durationMs:{default:void 0},toolDiffPanel:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent","detach"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=B(()=>n.streamingTailIndex!==null),l=B(()=>n.live?n.parked?"parked":"live":"settled"),r=V(!1),a=B(()=>i.value||r.value),c=V(a.value),u=V(a.value);let d=null;Ke(a,z=>{if(z){if(d!==null&&(clearTimeout(d),d=null),c.value){u.value=!0;return}c.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{u.value=!0})});return}u.value=!1,d=setTimeout(()=>{d=null,c.value=!1},200)});const f=fn("pinScroll",()=>{}),p=V(null);function h(){r.value=!r.value,yt(()=>{const z=p.value;z&&f(z)})}const m=V(Date.now());let k=null;function x(){k!==null&&(clearInterval(k),k=null)}Ke(l,(z,L)=>{z!=="settled"?(m.value=Date.now(),k===null&&(k=setInterval(()=>{m.value=Date.now()},1e3))):x(),L==="live"&&z!=="live"&&(r.value=!1)},{immediate:!0}),En(()=>{x(),d!==null&&clearTimeout(d)});const y=B(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),w=B(()=>{if(l.value==="settled")return n.durationMs!==void 0?Math.max(0,n.durationMs):y.value===void 0||n.endedMs===void 0?void 0:Math.max(0,n.endedMs-y.value);if(y.value!==void 0)return Math.max(0,m.value-y.value)}),_=B(()=>{const z=w.value;if(z===void 0)return s("conversation.fold.workedUnknown");const L=V2(z);return L?s("conversation.fold.worked",{duration:L}):s("conversation.fold.workedUnknown")});function A(z){return c1(z)?!1:n.streamingTailIndex!==null&&"sourceIndex"in z&&z.sourceIndex===n.streamingTailIndex}function P(z){if(n.streamingTailIndex===null)return!1;const L=z.items.at(-1);return L!==void 0&&c1(L)?!1:L!==void 0&&L.sourceIndex===n.streamingTailIndex}return(z,L)=>e.items.length>0?(g(),S("div",{key:0,class:Be(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?Y("",!0):(g(),S("button",{key:0,ref_key:"headEl",ref:p,type:"button",class:"tf-head","aria-expanded":r.value,title:_.value,onClick:h},[b("span",a9e,E(_.value),1),W(Ee,{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,r9e)),c.value?(g(),S("div",{key:1,class:Be(["tf-body",{open:u.value}]),inert:!a.value},[b("div",u9e,[(g(!0),S(Ce,null,rt(e.items,(T,I)=>(g(),S(Ce,{key:v(uE)(T,I)},[T.kind==="thinking"?(g(),ue(Wg,{key:0,text:T.thinking,mobile:e.mobile,streaming:A(T),"started-at-ms":v(W2)(T.startedAt),"duration-ms":T.durationMs},null,8,["text","mobile","streaming","started-at-ms","duration-ms"])):T.kind==="text"&&T.text?(g(),S("div",d9e,[W(Br,{text:T.text,streaming:A(T),"open-file":N=>o("openFile",N)},null,8,["text","streaming","open-file"])])):T.kind==="activity-run"?(g(),ue(fE,{key:2,items:T.items,mobile:e.mobile,streaming:P(T),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:L[0]||(L[0]=N=>o("openMedia",N)),onOpenFile:L[1]||(L[1]=N=>o("openFile",N)),onOpenToolDiff:L[2]||(L[2]=N=>o("openToolDiff",N)),onOpenAgent:L[3]||(L[3]=N=>o("openAgent",N)),onDetach:L[4]||(L[4]=N=>o("detach",N))},null,8,["items","mobile","streaming","tool-diff-panel"])):T.kind==="tool"?(g(),ue(Vg,{key:3,tool:T.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:L[5]||(L[5]=N=>o("openMedia",N)),onOpenFile:L[6]||(L[6]=N=>o("openFile",N)),onOpenToolDiff:L[7]||(L[7]=N=>o("openToolDiff",N)),onOpenAgent:L[8]||(L[8]=N=>o("openAgent",N)),onDetach:L[9]||(L[9]=N=>o("detach",N))},null,8,["tool","mobile","tool-diff-panel"])):T.kind==="notification"?(g(),ue(z$,{key:4,items:T.items},null,8,["items"])):Y("",!0)],64))),128))])],10,c9e)):Y("",!0)],2)):Y("",!0)}}),p9e=vt(f9e,[["__scopeId","data-v-331ba726"]]),h9e={key:0,class:"ui-card__head"},m9e={class:"ui-card__body"},g9e={key:1,class:"ui-card__foot"},v9e=Je({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(g(),S("div",h9e,[jn(t.$slots,"head",{},void 0,!0)])):Y("",!0),b("div",m9e,[jn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(g(),S("div",g9e,[jn(t.$slots,"foot",{},void 0,!0)])):Y("",!0)],2))}}),u9=vt(v9e,[["__scopeId","data-v-d2cab471"]]),y9e={class:"tf-ic"},w9e={class:"tf-title"},k9e={key:0,class:"tf-stats"},b9e={key:0,class:"tf-add"},_9e={key:1,class:"tf-del"},x9e={class:"diffbar","aria-hidden":"true"},S9e={class:"tf-list"},C9e=["innerHTML"],M9e={class:"tf-dir"},A9e={class:"tf-base"},T9e={key:0,class:"tf-stats"},E9e={key:0,class:"tf-add"},I9e={key:1,class:"tf-del"},L9e=Je({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=Uo(!1),i=B(()=>s.value?e.changes:e.changes.slice(0,3)),l=B(()=>Math.max(0,e.changes.length-3)),r=B(()=>e.changes.reduce((k,x)=>k+x.added,0)),a=B(()=>e.changes.reduce((k,x)=>k+x.removed,0)),c=B(()=>e.changes.every(k=>!k.statsIncomplete)),u=B(()=>r.value+a.value),d=B(()=>u.value===0?1:r.value),f=B(()=>u.value===0?1:a.value);function p(k){if(!e.cwd)return k;const x=e.cwd.replaceAll("\\","/").replace(/\/$/,""),y=k.replaceAll("\\","/");return y.startsWith(`${x}/`)?y.slice(x.length+1):k}function h(k){const x=p(k).replaceAll("\\","/"),y=x.lastIndexOf("/");return y<0?{dir:"",base:x}:{dir:x.slice(0,y+1),base:x.slice(y+1)}}function m(k){e.interactive&&(k.hasWrite?n("openFile",{path:k.path}):n("openDiff",k))}return(k,x)=>(g(),ue(u9,{class:"turn-files"},$2({head:ae(()=>[b("span",y9e,[W(Ee,{name:"pencil",size:"sm"})]),b("span",w9e,E(v(o)(e.changes.length===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:e.changes.length})),1),c.value&&u.value>0?(g(),S("span",k9e,[r.value>0?(g(),S("span",b9e,"+"+E(r.value),1)):Y("",!0),a.value>0?(g(),S("span",_9e,"−"+E(a.value),1)):Y("",!0),b("span",x9e,[b("span",{class:"seg-add",style:Gt({flexGrow:d.value})},null,4),b("span",{class:"seg-del",style:Gt({flexGrow:f.value})},null,4)])])):Y("",!0)]),default:ae(()=>[b("ul",S9e,[(g(!0),S(Ce,null,rt(i.value,y=>(g(),S("li",{key:y.path,class:"tf-row"},[(g(),ue(cs(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:"tf-file",onClick:w=>m(y)},{default:ae(()=>[b("span",{class:"tf-ficon","aria-hidden":"true",innerHTML:v(ju)(y.path)},null,8,C9e),b("span",M9e,E(h(y.path).dir),1),b("span",A9e,E(h(y.path).base),1)]),_:2},1032,["type","onClick"])),!y.statsIncomplete&&(y.added>0||y.removed>0)?(g(),S("span",T9e,[y.added>0?(g(),S("span",E9e,"+"+E(y.added),1)):Y("",!0),y.removed>0?(g(),S("span",I9e,"−"+E(y.removed),1)):Y("",!0)])):Y("",!0)]))),128))])]),_:2},[l.value>0?{name:"foot",fn:ae(()=>[W(Nt,{class:"tf-more",variant:"ghost",size:"sm",onClick:x[0]||(x[0]=y=>s.value=!s.value)},{default:ae(()=>[W(Ee,{class:Be(["tf-more-car",{open:s.value}]),name:"chevron-down",size:"sm"},null,8,["class"]),He(" "+E(s.value?v(o)("conversation.turnFiles.showLess"):v(o)(l.value===1?"conversation.turnFiles.moreOne":"conversation.turnFiles.more",{number:l.value})),1)]),_:1})]),key:"0"}:void 0]),1024))}}),$9e=vt(L9e,[["__scopeId","data-v-11486090"]]),N9e=["src"],z9e=6,B9e=300,R9e=6,P9e=250,F9e=Je({__name:"MascotSprite",props:{state:{},size:{default:48}},setup(e){const t=z9e*B9e,n=R9e*P9e,o=e,s=V("laptop");let i;const l=B(()=>{const d=o.size;return{width:`${d}px`,height:`${d*208/192}px`}}),r=B(()=>o.state==="failed"?"/brand/mascot-failed.png":`/brand/mascot-${s.value}.png`);function a(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function c(){i!==void 0&&(clearTimeout(i),i=void 0)}function u(){if(c(),o.state==="failed"||a())return;const d=s.value==="laptop"?t:n;i=setTimeout(()=>{i=void 0,s.value=s.value==="laptop"?"review":"laptop",u()},d)}return In(u),En(c),Ke(()=>o.state==="failed",d=>{if(d){c();return}s.value="laptop",u()}),(d,f)=>(g(),S("img",{"aria-hidden":"true",class:"mascot-apng",src:r.value,style:Gt(l.value)},null,12,N9e))}}),j9e=vt(F9e,[["__scopeId","data-v-c03cab60"]]),O9e={class:"working-indicator",role:"status"},H9e={class:"wi-mascot","aria-hidden":"true"},D9e={class:"wi-label ui-shimmer"},V9e=Je({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(g(),S("div",O9e,[b("span",H9e,[W(j9e,{state:"running",size:40})]),b("span",D9e,E(e.label),1)]))}}),W9e=vt(V9e,[["__scopeId","data-v-934cc635"]]),Tr=V(null),vu=V(!1);function d9(e){const t=Tr.value;!t||vu.value||(Tr.value=null,t.resolve(e))}async function q9e(){const e=Tr.value;if(!(!e||vu.value)){if(!e.action){d9(!0);return}vu.value=!0;try{await e.action(),Tr.value===e&&(Tr.value=null),e.resolve(!0)}catch(t){Tr.value===e&&(Tr.value=null),e.reject(t)}finally{vu.value=!1}}}function U9e(e){return vu.value?Promise.resolve(!1):(Tr.value&&d9(!1),new Promise((t,n)=>{Tr.value={...e,resolve:t,reject:n}}))}function z1(){return{current:Tr,busy:vu,confirm:U9e,settle:d9,runAction:q9e}}const Z9e=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,K9e=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,G9e=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,EC="text/plain;charset=utf-8";function Y9e(e,t){const n=(t??"").toLowerCase();if(Z9e.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:EC;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:K9e.test(o)?EC:G9e.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function HN(e,t,n){const o=Y9e(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await Ct().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const l=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=l;else{const r=document.createElement("a");r.href=l,r.download=t??e,r.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}function X9e(e){const t=e.replaceAll("\\","/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const l=n!=="",r=[];for(const c of o.split("/"))!c||c==="."||(c===".."?r.length>0&&r.at(-1)!==".."?r.pop():l||r.push(c):r.push(c));const a=n+r.join("/");return s?a.toLowerCase():a}function J9e(e,t){let n=0,o=0;for(const s of e)s.oldNo!==void 0&&(n=Math.max(n,s.oldNo)),s.newNo!==void 0&&(o=Math.max(o,s.newNo));return t.map(s=>({...s,oldNo:s.oldNo===void 0?void 0:s.oldNo+n,newNo:s.newNo===void 0?void 0:s.newNo+o}))}function Q9e(e){const t=new Map;for(const n of a1(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=pi(n.tool.name);if(o!=="edit"&&o!=="multi_edit"&&o!=="write")continue;const s=Dg(n.tool.arg);if(!s)continue;const i=o==="write",l=i?null:Hg(n.tool),r=l?iE(l):{added:0,removed:0},a=i||l===null,c=X9e(s),u=t.get(c);if(!u){t.set(c,{path:s,...r,hasWrite:i,statsIncomplete:a,diff:l});continue}u.added+=r.added,u.removed+=r.removed,u.hasWrite||=i,u.statsIncomplete||=a,u.diff!==null&&l!==null?u.diff=[...u.diff,{type:"hunk",text:"···"},...J9e(u.diff,l)]:u.diff=null}return[...t.values()]}const eye={class:"chat"},tye={key:0,class:"chat-loading"},nye={class:"chat-loading-text"},oye={key:1,class:"chat-empty"},sye={key:1,class:"top-sentinel-text"},iye={key:0,class:"u-turn"},lye=["data-turn-id"],rye={key:0,class:"u-atts"},aye={key:1,class:"skill-act"},cye={class:"skill-act-head"},uye=["aria-expanded","onClick"],dye={key:0,class:"u-meta"},fye=["aria-label","onClick"],pye=["aria-label","onClick"],hye=["data-turn-id"],mye=["onClick"],gye={class:"cd-view"},vye={key:1,class:"cd-label"},yye=["data-turn-id"],wye={key:1,class:"msg"},kye={key:1,class:"a-msg-ft"},bye={key:0,class:"a-duration"},_ye=["aria-label","onClick"],xye={key:3,class:"turn-failed",role:"alert"},Sye={class:"tf-chip","aria-hidden":"true"},Cye={class:"tf-main"},Mye={class:"tf-title"},Aye=["title"],Tye={key:5,class:"sending-placeholder"},Eye={key:6,class:"q-stack"},Iye={class:"q-head"},Lye={class:"q-title"},$ye=["onDragover","onDrop"],Nye=["aria-label","onClick"],zye={class:"u-bub q-bub"},Bye=["title","onDragstart"],Rye=["title","onClick"],Pye={key:0,class:"u-text q-text"},Fye={key:1,class:"q-text q-text-placeholder"},jye={key:0,class:"q-imgs"},Oye={key:0,class:"q-file"},Hye=["aria-label","onClick"],Dye={key:0,class:"open-unsupported",role:"status"},Vye=2500,Wye=Je({__name:"ChatPane",props:{turns:{},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},fastMoon:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},turnFolding:{type:Boolean,default:!0},activityRunFolding:{type:Boolean,default:!0},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},cwd:{},queued:{default:()=>[]}},emits:["openFile","openMedia","copyConversationCopied","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","editMessage","loadOlderMessages","unqueue","editQueued","reorderQueue","steerQueued","continueTurn"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),{confirm:s}=z1();En(()=>{for(const le of w.values())le.disconnect();w.clear(),y.clear(),oe!==null&&(clearTimeout(oe),oe=null),se!==null&&(clearTimeout(se),se=null),q!==null&&(clearTimeout(q),q=null),ve!==null&&(clearTimeout(ve),ve=null)});const i=e,l=V(null);let r=null;function a(){!l.value||typeof IntersectionObserver>"u"||(r?.disconnect(),r=new IntersectionObserver(le=>{le[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&m("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),r.observe(l.value))}In(a),En(()=>{r?.disconnect(),r=null}),Ke(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{yt().then(a)});const c=B(()=>{if(!i.turnActive||i.turns.length===0)return null;const le=i.turns.at(-1);return le.role==="assistant"?le.id:null}),u=B(()=>i.working),d=new WeakMap;function f(le){const fe=d.get(le);if(fe?.activityRunFolding===i.activityRunFolding&&fe.turnFolding===i.turnFolding)return fe.model;const ge=Qne(le,i.activityRunFolding),{folded:Oe,visible:Fe}=eoe(ge,i.turnFolding),pt={all:ge,folded:Oe,visible:Fe,changes:Q9e(le)};return d.set(le,{activityRunFolding:i.activityRunFolding,turnFolding:i.turnFolding,model:pt}),pt}const p=B(()=>{const le=new Map;for(const fe of i.turns)fe.role==="assistant"&&le.set(fe.id,f(fe));return le}),h=B(()=>{const le=i.turns.at(-1);if(le?.role!=="assistant")return o("conversation.requesting");const fe=p.value.get(le.id)?.all.some(ge=>ge.kind==="text"?ge.text.trim().length>0:!0);return o(fe?"conversation.working":"conversation.requesting")}),m=n,k=V({}),x=V({}),y=new Map,w=new Map;function _(le){const ge=y.get(le)?.querySelector(".u-text");if(!ge)return;const Oe=Number.parseFloat(getComputedStyle(ge).lineHeight)||24;x.value[le]=ge.scrollHeight>Oe*10+1}function A(le,fe){const ge=fe instanceof HTMLElement?fe:null;if(!ge){w.get(le)?.disconnect(),w.delete(le),y.delete(le);return}if(y.get(le)!==ge){if(w.get(le)?.disconnect(),y.set(le,ge),typeof ResizeObserver<"u"){const Oe=new ResizeObserver(()=>_(le));Oe.observe(ge.querySelector(".u-text")??ge),w.set(le,Oe)}yt(()=>_(le))}}function P(le){k.value[le]=!k.value[le]}const z=V(null),L=V(null);function T(le){return(le.attachments?.length??0)>0}function I(le){m("editQueued",le)}function N(le,fe){if(z.value=le,!fe.dataTransfer)return;fe.dataTransfer.effectAllowed="move",fe.dataTransfer.setData("text/plain",String(le));const ge=fe.currentTarget?.closest(".q-turn");ge&&fe.dataTransfer.setDragImage(ge,24,24)}function C(le,fe){if(z.value===null)return;fe.preventDefault(),fe.dataTransfer&&(fe.dataTransfer.dropEffect="move");const ge=fe.currentTarget.getBoundingClientRect(),Oe=fe.clientY{for(let le=i.turns.length-1;le>=0;le--)if(i.turns[le].role==="user")return i.turns[le].id;return null});function M(le){return!i.readOnly&&le.role==="user"&&le.id===D.value&&!i.working&&!le.pluginCommand&&!(le.skillActivation&&!o5e(le.skillActivation,{revivePill:!1}))}function R(le){return le.skillActivation?s5e(le.skillActivation):le.pluginCommand?le.pluginCommand.args||null:le.text||null}function O(le){const fe=le.compaction,ge=fe?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof fe?.tokensBefore=="number"&&typeof fe?.tokensAfter=="number"?ge+o("conversation.compactedTokens",{before:ba(fe.tokensBefore),after:ba(fe.tokensAfter)}):ge}const U=V(null),Z=V(null);let q=null;async function te(le){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&ee(le)}function ee(le){if(Z.value!==null)return;Z.value=le.id;const fe=le.skillActivation?I$(le.skillActivation,{revivePill:!1})??le.text:le.text;m("editMessage",{text:fe,attachments:le.attachments}),q=setTimeout(()=>{q=null,Z.value=null},Vye)}Ke(()=>i.turns,le=>{Z.value!==null&&(le.some(fe=>fe.id===Z.value)||(Z.value=null,q!==null&&(clearTimeout(q),q=null)))},{flush:"post"});const J=V(!1);let se=null;function Q(){if(i.turns.length===0)return;const le=[];for(const ge of i.turns){if(ge.role==="compaction"||ge.role==="cron")continue;const Oe=ge.role==="user"?"User":"Assistant",Fe=noe(ge);Fe.trim()&&le.push(`**${Oe}** ${Fe}`)}const fe=le.join(` --- -`);fs(fe).then(ge=>{ge&&(J.value=!0,m("copyConversationCopied"),se!==null&&clearTimeout(se),se=setTimeout(()=>{se=null,J.value=!1},2e3))}).catch(()=>{})}function me(le){const fe=[];for(let ge=le;ge>=0;ge--){const Oe=i.turns[ge];if(!Oe||Oe.role!=="assistant")break;fe.unshift(Oe)}return fe}function xe(le){return me(le).map(fe=>eoe(fe)).filter(Boolean).join(` +`);fs(fe).then(ge=>{ge&&(J.value=!0,m("copyConversationCopied"),se!==null&&clearTimeout(se),se=setTimeout(()=>{se=null,J.value=!1},2e3))}).catch(()=>{})}function me(le){const fe=[];for(let ge=le;ge>=0;ge--){const Oe=i.turns[ge];if(!Oe||Oe.role!=="assistant")break;fe.unshift(Oe)}return fe}function xe(le){return me(le).map(fe=>toe(fe)).filter(Boolean).join(` -`)}function Ye(){for(let le=i.turns.length-1;le>=0;le-=1)if(i.turns[le]?.role==="assistant")return xe(le);return""}function at(){const le=Ye();le.trim()&&fs(le).then(fe=>{fe&&(J.value=!0,m("copyConversationCopied"),se!==null&&clearTimeout(se),se=setTimeout(()=>{se=null,J.value=!1},2e3))}).catch(()=>{})}t({copyConversation:Q,copyFinalSummary:at});function X(le){const fe=i.turns[le];if(!fe||fe.role!=="assistant")return!1;const ge=i.turns[le+1];return!ge||ge.role!=="assistant"}let oe=null;function F(le){const fe=i.turns[le];if(!fe)return;const ge=xe(le);ge.trim()&&fs(ge).then(Oe=>{Oe&&(U.value=fe.id,oe!==null&&clearTimeout(oe),oe=setTimeout(()=>{oe=null,U.value=null},1400))}).catch(()=>{})}function K(le){const fe=le.text;fe.trim()&&fs(fe).then(ge=>{ge&&(U.value=le.id,oe!==null&&clearTimeout(oe),oe=setTimeout(()=>{oe=null,U.value=null},1400))}).catch(()=>{})}function he(le){return{kind:le.kind==="video"?"video":"image",url:le.url,path:le.name,fileId:le.fileId}}const ye=V(null);let ve=null;function ie(le){if(le.kind==="image"||le.kind==="video"){m("openMedia",he(le));return}le.fileId!==void 0&&ON(le.fileId,le.name,le.mediaType).then(fe=>{fe==="unsupported"&&(ye.value=le.name??le.fileId??"",ve!==null&&clearTimeout(ve),ve=setTimeout(()=>{ve=null,ye.value=null},2400))})}function de(le,fe){return le.id!==c.value||c1(fe)?!1:fe.sourceIndex===a1(le).length-1}function be(le){if(le.id!==c.value)return null;const fe=a1(le),ge=fe.at(-1);if(ge!==void 0&&c1(ge))return null;if(ge?.kind==="tool"&&ge.tool.status==="running"){const Oe=ge.tool.id;if(i.approvals.some(pt=>pt.toolCallId===Oe)||(i.questions??[]).some(pt=>pt.toolCallId===Oe))return null}return fe.length-1}function Se(le){if(!le.createdAt)return;const fe=Date.parse(le.createdAt);return Number.isFinite(fe)?fe:void 0}function je(le,fe){if(le.id!==c.value)return!1;const ge=fe.items.at(-1);return ge!==void 0&&c1(ge)?!1:ge!==void 0&&ge.sourceIndex===a1(le).length-1}function et(){m("continueTurn",o("conversation.turnFailedResumeText"))}return(le,fe)=>(g(),S(Ce,null,[b("div",Q9e,[e.sessionLoading?(g(),S("div",eye,[W(Zo,{size:"sm"}),b("span",tye,I(v(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(g(),S("div",nye)):Y("",!0),e.hasMoreMessages||e.loadingMore?(g(),S("div",{key:2,ref_key:"topSentinelRef",ref:l,class:Be(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(g(),S("span",oye,[W(Zo,{size:"sm"}),He(" "+I(v(o)("conversation.loadingOlder")),1)])):(g(),S("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:fe[0]||(fe[0]=ge=>m("loadOlderMessages"))},I(v(o)("conversation.loadOlder")),1))],2)):Y("",!0),(g(!0),S(Ce,null,rt(e.turns,(ge,Oe)=>(g(),S(Ce,{key:ge.id},[ge.role==="user"?(g(),S("div",sye,[b("div",{class:Be(["u-bub turn-anchor",{undoing:Z.value===ge.id}]),"data-turn-id":ge.id},[ge.attachments&&ge.attachments.length>0?(g(),S("div",lye,[(g(!0),S(Ce,null,rt(ge.attachments,(Fe,pt)=>(g(),ue(P7,{key:pt,kind:Fe.kind,name:Fe.name,url:Fe.url,"file-id":Fe.fileId,"media-type":Fe.mediaType,size:Fe.size,onActivate:kt=>ie(Fe)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):Y("",!0),ge.pluginCommand?(g(),S("div",rye,[b("div",aye,[fe[17]||(fe[17]=b("span",{class:"skill-act-arrow"},"▶",-1)),b("span",null,"/"+I(ge.pluginCommand.pluginId)+":"+I(ge.pluginCommand.commandName),1)])])):Y("",!0),R(ge)!==null?(g(),S("div",{key:2,ref_for:!0,ref:Fe=>A(ge.id,Fe),class:Be(["u-text-wrap",{"u-text-wrap-args":!!ge.pluginCommand,"is-clamped":x.value[ge.id]&&!k.value[ge.id]}])},[b("div",{class:Be(ge.pluginCommand?"skill-act-args":"u-text")},[W(AC,{text:R(ge)??"","open-file":Fe=>m("openFile",Fe)},null,8,["text","open-file"])],2),x.value[ge.id]?(g(),S("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!!k.value[ge.id],onClick:Fe=>P(ge.id)},[He(I(v(o)(k.value[ge.id]?"conversation.userMessage.collapse":"conversation.userMessage.expand"))+" ",1),W(Ee,{class:"u-text-toggle-car",name:"chevron-down",size:"sm"})],8,cye)):Y("",!0)],2)):Y("",!0)],10,iye),ge.createdAt||M(ge)?(g(),S("div",uye,[M(ge)?(g(),S("div",{key:0,class:Be(["u-edit-wrap",{undoing:Z.value===ge.id}])},[b("button",{type:"button",class:"u-edit","aria-label":v(o)("conversation.undoTooltip"),onClick:Fe=>te(ge)},[W(Ee,{name:"undo",size:"sm"})],8,dye)],2)):Y("",!0),ge.text.trim().length>0?(g(),S("button",{key:1,type:"button",class:"u-copy","aria-label":v(o)("filePreview.copy"),onClick:xt(Fe=>K(ge),["stop"])},[U.value!==ge.id?(g(),ue(Ee,{key:0,name:"copy",size:"sm"})):(g(),ue(Ee,{key:1,name:"check",size:"sm"}))],8,fye)):Y("",!0),ge.createdAt?(g(),ue(Dv,{key:2,time:ge.createdAt},null,8,["time"])):Y("",!0)])):Y("",!0)])):ge.role==="compaction"?(g(),S("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":ge.id,role:"separator"},[fe[18]||(fe[18]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1)),ge.text?(g(),S("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Fe=>m("openCompaction",{turnId:ge.id})},[b("span",null,I(O(ge)),1),b("span",mye,I(v(o)("conversation.viewSummary")),1)],8,hye)):(g(),S("span",gye,I(O(ge)),1)),fe[19]||(fe[19]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,pye)):ge.role==="cron"?(g(),ue(F5e,{key:2,text:ge.text,cron:ge.cron,"turn-id":ge.id,"created-at":ge.createdAt},null,8,["text","cron","turn-id","created-at"])):(g(),S("div",{key:3,class:"a-msg turn-anchor","data-turn-id":ge.id},[W(f9e,{items:p.value.get(ge.id)?.folded??[],live:ge.id===c.value,parked:ge.id===c.value&&be(ge)===null,"streaming-tail-index":be(ge),"seed-ms":v(Xne)(ge),"created-ms":Se(ge),"duration-ms":ge.durationMs,"tool-diff-panel":e.toolDiffPanel,mobile:"",onOpenMedia:fe[1]||(fe[1]=Fe=>m("openMedia",Fe)),onOpenFile:fe[2]||(fe[2]=Fe=>m("openFile",Fe)),onOpenToolDiff:fe[3]||(fe[3]=Fe=>m("openToolDiff",Fe)),onOpenAgent:fe[4]||(fe[4]=Fe=>m("openAgent",Fe)),onDetach:fe[5]||(fe[5]=Fe=>m("detachTask",Fe))},null,8,["items","live","parked","streaming-tail-index","seed-ms","created-ms","duration-ms","tool-diff-panel"]),(g(!0),S(Ce,null,rt(p.value.get(ge.id)?.visible??[],(Fe,pt)=>(g(),S(Ce,{key:v(cE)(Fe,pt)},[Fe.kind==="thinking"?(g(),ue(Vg,{key:0,text:Fe.thinking,mobile:"",streaming:de(ge,Fe),"started-at-ms":v(W2)(Fe.startedAt),"duration-ms":Fe.durationMs},null,8,["text","streaming","started-at-ms","duration-ms"])):Fe.kind==="text"&&Fe.text?(g(),S("div",yye,[W(Br,{text:Fe.text,streaming:de(ge,Fe),"open-file":kt=>m("openFile",kt)},null,8,["text","streaming","open-file"])])):Fe.kind==="activity-run"?(g(),ue(dE,{key:2,items:Fe.items,mobile:"",streaming:je(ge,Fe),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:fe[6]||(fe[6]=kt=>m("openMedia",kt)),onOpenFile:fe[7]||(fe[7]=kt=>m("openFile",kt)),onOpenToolDiff:fe[8]||(fe[8]=kt=>m("openToolDiff",kt)),onOpenAgent:fe[9]||(fe[9]=kt=>m("openAgent",kt)),onDetach:fe[10]||(fe[10]=kt=>m("detachTask",kt))},null,8,["items","streaming","tool-diff-panel"])):Fe.kind==="tool"?(g(),ue(Dg,{key:3,tool:Fe.tool,mobile:"","tool-diff-panel":e.toolDiffPanel,onOpenMedia:fe[11]||(fe[11]=kt=>m("openMedia",kt)),onOpenFile:fe[12]||(fe[12]=kt=>m("openFile",kt)),onOpenToolDiff:fe[13]||(fe[13]=kt=>m("openToolDiff",kt)),onOpenAgent:fe[14]||(fe[14]=kt=>m("openAgent",kt)),onDetach:fe[15]||(fe[15]=kt=>m("detachTask",kt))},null,8,["tool","tool-diff-panel"])):Fe.kind==="notification"?(g(),ue(N$,{key:4,items:Fe.items},null,8,["items"])):Y("",!0)],64))),128)),ge.id!==c.value&&(p.value.get(ge.id)?.changes.length??0)>0?(g(),ue(L9e,{key:0,changes:p.value.get(ge.id)?.changes??[],cwd:e.cwd,onOpenDiff:Fe=>m("openTurnDiff",{turnId:ge.id,changes:p.value.get(ge.id)?.changes??[]}),onOpenFile:fe[16]||(fe[16]=Fe=>m("openFile",Fe))},null,8,["changes","cwd","onOpenDiff"])):Y("",!0),ge.id!==c.value&&X(Oe)&&(xe(Oe).trim().length>0||ge.durationMs!==void 0)?(g(),S("div",wye,[W(Cn,{text:`${ge.durationMs} ms`},{default:ae(()=>[ge.durationMs!==void 0?(g(),S("span",kye,I(v(Yne)(ge.durationMs)),1)):Y("",!0)]),_:2},1032,["text"]),xe(Oe).trim().length>0?(g(),S("button",{key:0,class:"a-cpbtn","aria-label":v(o)("filePreview.copy"),onClick:Fe=>F(Oe)},[U.value!==ge.id?(g(),ue(Ee,{key:0,name:"copy",size:"sm"})):(g(),ue(Ee,{key:1,name:"check",size:"sm"}))],8,bye)):Y("",!0)])):Y("",!0)],8,vye))],64))),128)),e.lastTurnReason==="failed"&&!e.working?(g(),S("div",_ye,[b("span",xye,[W(Ee,{name:"alert-triangle",size:"sm"})]),b("div",Sye,[b("span",Cye,I(e.turnErrorKind==="max_steps"?v(o)("conversation.turnFailedMaxSteps"):v(o)("conversation.turnFailed")),1),e.turnErrorMessage?(g(),S("span",{key:0,class:"tf-sub",title:e.turnErrorMessage},I(e.turnErrorMessage),9,Mye)):Y("",!0)]),W(Nt,{variant:"secondary",size:"sm",onClick:et},{default:ae(()=>[He(I(v(o)("conversation.turnFailedResume")),1)]),_:1})])):Y("",!0),e.compaction?(g(),ue(_5e,{key:4,label:v(o)("conversation.compacting")},null,8,["label"])):Y("",!0),u.value?(g(),S("div",Aye,[W(V9e,{label:h.value},null,8,["label"])])):Y("",!0),e.queued.length>0?(g(),S("div",Tye,[b("div",Eye,[b("span",Iye,[W(Ee,{name:"mail",size:"sm"}),He(" "+I(v(o)("composer.queueLabel"))+" · ",1),b("b",null,I(v(o)("composer.queuePending",{n:e.queued.length})),1)])]),(g(!0),S(Ce,null,rt(e.queued,(ge,Oe)=>(g(),S("div",{key:ge.id,class:Be(["u-turn q-turn",{"q-dragging":z.value===Oe,"drop-before":L.value?.index===Oe&&L.value.position==="before","drop-after":L.value?.index===Oe&&L.value.position==="after"}]),onDragover:Fe=>C(Oe,Fe),onDrop:Fe=>j(Oe,Fe)},[Oe===0?(g(),ue(Cn,{key:0,text:v(o)("composer.queueSteer")},{default:ae(()=>[b("button",{type:"button",class:"q-send","aria-label":v(o)("composer.queueSteer"),onClick:xt(Fe=>m("steerQueued",Oe),["stop"])},[W(Ee,{name:"send",size:"lg"})],8,$ye)]),_:2},1032,["text"])):Y("",!0),b("div",Nye,[b("span",{class:"q-grip",title:v(o)("composer.queueDragTitle"),draggable:"true",onDragstart:Fe=>$(Oe,Fe),onDragend:H},[W(Ee,{name:"grip",size:"sm"})],40,zye),b("button",{type:"button",class:"q-body",title:v(o)("composer.editQueued"),onClick:Fe=>T(Oe)},[ge.text?(g(),S("span",Rye,[W(AC,{text:ge.text,interactive:!1},null,8,["text"])])):(g(),S("span",Pye,[W(Ee,{name:"file",size:"sm"}),He(" "+I(v(o)("composer.queuedAttachments",{n:ge.attachments?.length??0})),1)]))],8,Bye),E(ge)?(g(),S("div",Fye,[(g(!0),S(Ce,null,rt(ge.attachments,(Fe,pt)=>(g(),S(Ce,{key:pt},[Fe.kind==="file"?(g(),S("span",jye,[W(Ee,{name:"file",size:"sm"}),He(" "+I(Fe.name??Fe.fileId),1)])):(g(),ue(R7,{key:1,url:Fe.url,kind:Fe.kind,"file-id":Fe.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):Y("",!0),b("button",{type:"button",class:"q-rm","aria-label":v(o)("composer.remove"),onClick:xt(Fe=>m("unqueue",Oe),["stop"])},[W(Ee,{name:"close",size:"sm"})],8,Oye)])],42,Lye))),128))])):Y("",!0)]),ye.value!==null?(g(),S("div",Hye,I(v(o)("composer.attachmentOpenUnsupported",{name:ye.value})),1)):Y("",!0)],64))}}),d9=vt(Vye,[["__scopeId","data-v-bb073357"]]),Wye={class:"ch-id"},qye={key:0,class:"ch-ws"},Uye={key:1,class:"ch-sep"},Zye=["onKeydown"],Kye={class:"ch-ses"},Gye={key:0,class:"ch-pill ch-sync-pill"},Yye={key:0,class:"ch-ahead"},Xye={key:1,class:"ch-behind"},Jye={key:1,class:"ch-pill ch-diff-pill"},Qye={key:0,class:"ch-add"},ewe={key:1,class:"ch-del"},twe={class:"ch-pill ch-pr pr-merged ch-done-pill"},nwe=Je({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},sessionDone:{type:Boolean},pinned:{type:Boolean},panelVisible:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","togglePin","archiveSession","restoreSession","exportSession","togglePanel"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=B(()=>o.ahead??0),l=B(()=>o.behind??0),r=B(()=>o.gitDiffStats?.totalAdditions??0),a=B(()=>o.gitDiffStats?.totalDeletions??0),c=B(()=>r.value>0||a.value>0),u={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(q){return q.trim().toLowerCase().replaceAll("_","-")}function f(q){const te=d(q);return u[te]?`pr-${te}`:"pr-unknown"}function p(q){return n(u[d(q)]??"header.prStatusUnknown")}const h=V(!1),m=V(null),k=V(null),x=V({});function y(q){const te=q.target;k.value?.el?.contains(te)||m.value?.el?.contains(te)||A()}function w(){A()}async function _(q){if(q.stopPropagation(),h.value){A();return}h.value=!0,document.addEventListener("mousedown",y),window.addEventListener("resize",w),await yt();const te=m.value?.el,ee=k.value?.el;if(!te||!ee)return;const J=te.getBoundingClientRect(),se=4,Q=8,me=ee.offsetWidth,xe=ee.offsetHeight;let Ye=J.bottom+se;Ye+xe>window.innerHeight-Q&&(Ye=Math.max(Q,J.top-xe-se));let at=J.left;at+me>window.innerWidth-Q&&(at=Math.max(Q,J.right-me)),x.value={top:`${Math.round(Ye)}px`,left:`${Math.round(at)}px`}}function A(){h.value=!1,document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)}En(()=>{document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)});function P(){s("copyAll"),A()}function z(){s("copyFinalSummary"),A()}const L=V(!1);function E(){o.sessionId&&fs(o.sessionId).then(q=>{q&&(L.value=!0,setTimeout(()=>{L.value=!1},1200))})}const T=V(!1),$=V(""),C=V(null);async function j(){if(A(),!!o.sessionId){T.value=!0,$.value=o.sessionTitle??"",await yt();try{C.value?.focus(),C.value?.select()}catch{}}}function H(){const q=$.value.trim();q&&o.sessionId&&q!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,q),T.value=!1}function D(){T.value=!1}function M(){o.sessionId&&(A(),s("forkSession",o.sessionId))}function R(){o.sessionId&&(A(),s("exportSession",o.sessionId))}function O(){o.sessionId&&(A(),s("togglePin",o.sessionId))}function U(){o.sessionId&&(A(),s("archiveSession",o.sessionId))}function Z(){o.sessionId&&(A(),s("restoreSession",o.sessionId))}return(q,te)=>(g(),S("header",{class:Be(["chat-header",{"macos-desktop":v(Fg)}])},[b("div",Wye,[e.workspaceName?(g(),S("span",qye,I(e.workspaceName),1)):Y("",!0),e.workspaceName&&e.sessionTitle?(g(),S("span",Uye,"/")):Y("",!0),T.value?Jn((g(),S("input",{key:2,ref_key:"renameInputRef",ref:C,"onUpdate:modelValue":te[0]||(te[0]=ee=>$.value=ee),class:"ch-rename",type:"text",onKeydown:[go(xt(H,["stop"]),["enter"]),go(xt(D,["stop"]),["esc"])],onBlur:H,onClick:te[1]||(te[1]=xt(()=>{},["stop"]))},null,40,Zye)),[[js,$.value]]):e.sessionTitle?(g(),ue(Cn,{key:3,text:e.sessionTitle},{default:ae(()=>[b("span",Kye,I(e.sessionTitle),1)]),_:1},8,["text"])):Y("",!0)]),e.panelVisible?Y("",!0):(g(),ue(Dt,{key:0,class:"ch-panel",label:v(n)("panel.openPanel"),onClick:te[2]||(te[2]=ee=>s("togglePanel"))},{default:ae(()=>[W(Ee,{name:"panel-expand-right",size:"md"})]),_:1},8,["label"])),W(Dt,{ref_key:"kebabRef",ref:m,class:Be(["ch-act-more",{open:h.value}]),label:v(n)("header.options"),"aria-expanded":h.value,"aria-haspopup":"menu",onClick:te[3]||(te[3]=xt(ee=>_(ee),["stop"]))},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["class","label","aria-expanded"]),h.value?(g(),ue(zr,{key:1,ref_key:"menuRef",ref:k,class:"ch-menu",style:Gt(x.value),onClick:te[4]||(te[4]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{onClick:P},{default:ae(()=>[W(Ee,{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),He(" "+I(e.copied?v(n)("header.copied"):v(n)("header.copyAll")),1)]),_:1}),W(Bn,{onClick:z},{default:ae(()=>[W(Ee,{name:"file-text",size:"sm"}),He(" "+I(v(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(g(),S(Ce,{key:0},[W(Bn,{separator:""}),W(Bn,{onClick:E},{default:ae(()=>[W(Ee,{name:L.value?"check":"copy",size:"sm"},null,8,["name"]),He(" "+I(L.value?v(n)("header.copied"):v(n)("header.copySessionId")),1)]),_:1}),e.sessionDone?Y("",!0):(g(),ue(Bn,{key:0,onClick:O},{default:ae(()=>[W(Ee,{name:e.pinned?"pushpin-fill":"pushpin-line",size:"sm"},null,8,["name"]),He(" "+I(e.pinned?v(n)("header.unpinSession"):v(n)("header.pinSession")),1)]),_:1})),W(Bn,{onClick:j},{default:ae(()=>[W(Ee,{name:"pencil",size:"sm"}),He(" "+I(v(n)("header.renameSession")),1)]),_:1}),W(Bn,{onClick:M},{default:ae(()=>[W(Ee,{name:"git-fork",size:"sm"}),He(" "+I(v(n)("header.forkSession")),1)]),_:1}),W(Bn,{onClick:R},{default:ae(()=>[W(Ee,{name:"download",size:"sm"}),He(" "+I(v(n)("header.exportSession")),1)]),_:1}),e.sessionDone?(g(),ue(Bn,{key:1,onClick:Z},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"}),He(" "+I(v(n)("header.reopenSession")),1)]),_:1})):(g(),ue(Bn,{key:2,onClick:U},{default:ae(()=>[W(Ee,{name:"archive",size:"sm"}),He(" "+I(v(n)("header.markSessionDone")),1)]),_:1}))],64)):Y("",!0)]),_:1},8,["style"])):Y("",!0),te[7]||(te[7]=b("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(g(),S("button",{key:2,type:"button",class:"ch-git",onClick:te[5]||(te[5]=ee=>s("openChanges"))},[b("span",{class:Be(["ch-branch",{"ch-detached":!e.branch}])},I(e.branch||v(n)("header.detached")),3),i.value>0||l.value>0?(g(),S("span",Gye,[i.value>0?(g(),S("span",Yye,"↑"+I(i.value),1)):Y("",!0),l.value>0?(g(),S("span",Xye,"↓"+I(l.value),1)):Y("",!0)])):Y("",!0),c.value?(g(),S("span",Jye,[r.value>0?(g(),S("span",Qye,"+"+I(r.value),1)):Y("",!0),a.value>0?(g(),S("span",ewe,"-"+I(a.value),1)):Y("",!0)])):Y("",!0)])):Y("",!0),e.pr?(g(),S("button",{key:3,type:"button",class:Be(["ch-pill ch-pr",f(e.pr.state)]),onClick:te[6]||(te[6]=ee=>e.pr&&s("openPr",e.pr.url))},[W(Ee,{name:"git-pull-request",size:"sm"}),b("span",null,"PR #"+I(e.pr.number)+" · "+I(p(e.pr.state)),1)],2)):Y("",!0),e.sessionId&&e.sessionDone?(g(),S(Ce,{key:4},[b("span",twe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,I(v(n)("header.sessionDone")),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Z},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"}),He(" "+I(v(n)("header.reopenSession")),1)]),_:1})],64)):Y("",!0)],2))}}),owe=vt(nwe,[["__scopeId","data-v-25d0d989"]]),swe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],EC=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function iwe(e){if(e<=255)return swe[e];let t=0,n=EC.length-1;for(;t<=n;){const o=t+n>>1,s=EC[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function lwe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let c=0;c=55296&&u<=56319&&c+1=56320&&h<=57343&&(d=(u-55296<<10)+(h-56320)+65536,f=2)}const p=iwe(d);(p==="R"||p==="AL"||p==="AN")&&(o=!0);for(let h=0;h=0&&n[u]==="ET";u--)n[u]="EN";for(u=c+1;u0?n[c-1]:r,f=u0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function fwe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` +`)}function Ye(){for(let le=i.turns.length-1;le>=0;le-=1)if(i.turns[le]?.role==="assistant")return xe(le);return""}function at(){const le=Ye();le.trim()&&fs(le).then(fe=>{fe&&(J.value=!0,m("copyConversationCopied"),se!==null&&clearTimeout(se),se=setTimeout(()=>{se=null,J.value=!1},2e3))}).catch(()=>{})}t({copyConversation:Q,copyFinalSummary:at});function X(le){const fe=i.turns[le];if(!fe||fe.role!=="assistant")return!1;const ge=i.turns[le+1];return!ge||ge.role!=="assistant"}let oe=null;function j(le){const fe=i.turns[le];if(!fe)return;const ge=xe(le);ge.trim()&&fs(ge).then(Oe=>{Oe&&(U.value=fe.id,oe!==null&&clearTimeout(oe),oe=setTimeout(()=>{oe=null,U.value=null},1400))}).catch(()=>{})}function K(le){const fe=le.text;fe.trim()&&fs(fe).then(ge=>{ge&&(U.value=le.id,oe!==null&&clearTimeout(oe),oe=setTimeout(()=>{oe=null,U.value=null},1400))}).catch(()=>{})}function he(le){return{kind:le.kind==="video"?"video":"image",url:le.url,path:le.name,fileId:le.fileId}}const ye=V(null);let ve=null;function ie(le){if(le.kind==="image"||le.kind==="video"){m("openMedia",he(le));return}le.fileId!==void 0&&HN(le.fileId,le.name,le.mediaType).then(fe=>{fe==="unsupported"&&(ye.value=le.name??le.fileId??"",ve!==null&&clearTimeout(ve),ve=setTimeout(()=>{ve=null,ye.value=null},2400))})}function de(le,fe){return le.id!==c.value||c1(fe)?!1:fe.sourceIndex===a1(le).length-1}function be(le){if(le.id!==c.value)return null;const fe=a1(le),ge=fe.at(-1);if(ge!==void 0&&c1(ge))return null;if(ge?.kind==="tool"&&ge.tool.status==="running"){const Oe=ge.tool.id;if(i.approvals.some(pt=>pt.toolCallId===Oe)||(i.questions??[]).some(pt=>pt.toolCallId===Oe))return null}return fe.length-1}function Se(le){if(!le.createdAt)return;const fe=Date.parse(le.createdAt);return Number.isFinite(fe)?fe:void 0}function je(le,fe){if(le.id!==c.value)return!1;const ge=fe.items.at(-1);return ge!==void 0&&c1(ge)?!1:ge!==void 0&&ge.sourceIndex===a1(le).length-1}function et(){m("continueTurn",o("conversation.turnFailedResumeText"))}return(le,fe)=>(g(),S(Ce,null,[b("div",eye,[e.sessionLoading?(g(),S("div",tye,[W(Zo,{size:"sm"}),b("span",nye,E(v(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(g(),S("div",oye)):Y("",!0),e.hasMoreMessages||e.loadingMore?(g(),S("div",{key:2,ref_key:"topSentinelRef",ref:l,class:Be(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(g(),S("span",sye,[W(Zo,{size:"sm"}),He(" "+E(v(o)("conversation.loadingOlder")),1)])):(g(),S("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:fe[0]||(fe[0]=ge=>m("loadOlderMessages"))},E(v(o)("conversation.loadOlder")),1))],2)):Y("",!0),(g(!0),S(Ce,null,rt(e.turns,(ge,Oe)=>(g(),S(Ce,{key:ge.id},[ge.role==="user"?(g(),S("div",iye,[b("div",{class:Be(["u-bub turn-anchor",{undoing:Z.value===ge.id}]),"data-turn-id":ge.id},[ge.attachments&&ge.attachments.length>0?(g(),S("div",rye,[(g(!0),S(Ce,null,rt(ge.attachments,(Fe,pt)=>(g(),ue(F7,{key:pt,kind:Fe.kind,name:Fe.name,url:Fe.url,"file-id":Fe.fileId,"media-type":Fe.mediaType,size:Fe.size,onActivate:kt=>ie(Fe)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):Y("",!0),ge.pluginCommand?(g(),S("div",aye,[b("div",cye,[fe[17]||(fe[17]=b("span",{class:"skill-act-arrow"},"▶",-1)),b("span",null,"/"+E(ge.pluginCommand.pluginId)+":"+E(ge.pluginCommand.commandName),1)])])):Y("",!0),R(ge)!==null?(g(),S("div",{key:2,ref_for:!0,ref:Fe=>A(ge.id,Fe),class:Be(["u-text-wrap",{"u-text-wrap-args":!!ge.pluginCommand,"is-clamped":x.value[ge.id]&&!k.value[ge.id]}])},[b("div",{class:Be(ge.pluginCommand?"skill-act-args":"u-text")},[W(TC,{text:R(ge)??"","open-file":Fe=>m("openFile",Fe)},null,8,["text","open-file"])],2),x.value[ge.id]?(g(),S("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!!k.value[ge.id],onClick:Fe=>P(ge.id)},[He(E(v(o)(k.value[ge.id]?"conversation.userMessage.collapse":"conversation.userMessage.expand"))+" ",1),W(Ee,{class:"u-text-toggle-car",name:"chevron-down",size:"sm"})],8,uye)):Y("",!0)],2)):Y("",!0)],10,lye),ge.createdAt||M(ge)?(g(),S("div",dye,[M(ge)?(g(),S("div",{key:0,class:Be(["u-edit-wrap",{undoing:Z.value===ge.id}])},[b("button",{type:"button",class:"u-edit","aria-label":v(o)("conversation.undoTooltip"),onClick:Fe=>te(ge)},[W(Ee,{name:"undo",size:"sm"})],8,fye)],2)):Y("",!0),ge.text.trim().length>0?(g(),S("button",{key:1,type:"button",class:"u-copy","aria-label":v(o)("filePreview.copy"),onClick:xt(Fe=>K(ge),["stop"])},[U.value!==ge.id?(g(),ue(Ee,{key:0,name:"copy",size:"sm"})):(g(),ue(Ee,{key:1,name:"check",size:"sm"}))],8,pye)):Y("",!0),ge.createdAt?(g(),ue(Vv,{key:2,time:ge.createdAt},null,8,["time"])):Y("",!0)])):Y("",!0)])):ge.role==="compaction"?(g(),S("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":ge.id,role:"separator"},[fe[18]||(fe[18]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1)),ge.text?(g(),S("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Fe=>m("openCompaction",{turnId:ge.id})},[b("span",null,E(O(ge)),1),b("span",gye,E(v(o)("conversation.viewSummary")),1)],8,mye)):(g(),S("span",vye,E(O(ge)),1)),fe[19]||(fe[19]=b("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,hye)):ge.role==="cron"?(g(),ue(j5e,{key:2,text:ge.text,cron:ge.cron,"turn-id":ge.id,"created-at":ge.createdAt},null,8,["text","cron","turn-id","created-at"])):(g(),S("div",{key:3,class:"a-msg turn-anchor","data-turn-id":ge.id},[W(p9e,{items:p.value.get(ge.id)?.folded??[],live:ge.id===c.value,parked:ge.id===c.value&&be(ge)===null,"streaming-tail-index":be(ge),"seed-ms":v(Jne)(ge),"created-ms":Se(ge),"duration-ms":ge.durationMs,"tool-diff-panel":e.toolDiffPanel,mobile:"",onOpenMedia:fe[1]||(fe[1]=Fe=>m("openMedia",Fe)),onOpenFile:fe[2]||(fe[2]=Fe=>m("openFile",Fe)),onOpenToolDiff:fe[3]||(fe[3]=Fe=>m("openToolDiff",Fe)),onOpenAgent:fe[4]||(fe[4]=Fe=>m("openAgent",Fe)),onDetach:fe[5]||(fe[5]=Fe=>m("detachTask",Fe))},null,8,["items","live","parked","streaming-tail-index","seed-ms","created-ms","duration-ms","tool-diff-panel"]),(g(!0),S(Ce,null,rt(p.value.get(ge.id)?.visible??[],(Fe,pt)=>(g(),S(Ce,{key:v(uE)(Fe,pt)},[Fe.kind==="thinking"?(g(),ue(Wg,{key:0,text:Fe.thinking,mobile:"",streaming:de(ge,Fe),"started-at-ms":v(W2)(Fe.startedAt),"duration-ms":Fe.durationMs},null,8,["text","streaming","started-at-ms","duration-ms"])):Fe.kind==="text"&&Fe.text?(g(),S("div",wye,[W(Br,{text:Fe.text,streaming:de(ge,Fe),"open-file":kt=>m("openFile",kt)},null,8,["text","streaming","open-file"])])):Fe.kind==="activity-run"?(g(),ue(fE,{key:2,items:Fe.items,mobile:"",streaming:je(ge,Fe),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:fe[6]||(fe[6]=kt=>m("openMedia",kt)),onOpenFile:fe[7]||(fe[7]=kt=>m("openFile",kt)),onOpenToolDiff:fe[8]||(fe[8]=kt=>m("openToolDiff",kt)),onOpenAgent:fe[9]||(fe[9]=kt=>m("openAgent",kt)),onDetach:fe[10]||(fe[10]=kt=>m("detachTask",kt))},null,8,["items","streaming","tool-diff-panel"])):Fe.kind==="tool"?(g(),ue(Vg,{key:3,tool:Fe.tool,mobile:"","tool-diff-panel":e.toolDiffPanel,onOpenMedia:fe[11]||(fe[11]=kt=>m("openMedia",kt)),onOpenFile:fe[12]||(fe[12]=kt=>m("openFile",kt)),onOpenToolDiff:fe[13]||(fe[13]=kt=>m("openToolDiff",kt)),onOpenAgent:fe[14]||(fe[14]=kt=>m("openAgent",kt)),onDetach:fe[15]||(fe[15]=kt=>m("detachTask",kt))},null,8,["tool","tool-diff-panel"])):Fe.kind==="notification"?(g(),ue(z$,{key:4,items:Fe.items},null,8,["items"])):Y("",!0)],64))),128)),ge.id!==c.value&&(p.value.get(ge.id)?.changes.length??0)>0?(g(),ue($9e,{key:0,changes:p.value.get(ge.id)?.changes??[],cwd:e.cwd,onOpenDiff:Fe=>m("openTurnDiff",{turnId:ge.id,changes:p.value.get(ge.id)?.changes??[]}),onOpenFile:fe[16]||(fe[16]=Fe=>m("openFile",Fe))},null,8,["changes","cwd","onOpenDiff"])):Y("",!0),ge.id!==c.value&&X(Oe)&&(xe(Oe).trim().length>0||ge.durationMs!==void 0)?(g(),S("div",kye,[W(Cn,{text:`${ge.durationMs} ms`},{default:ae(()=>[ge.durationMs!==void 0?(g(),S("span",bye,E(v(Xne)(ge.durationMs)),1)):Y("",!0)]),_:2},1032,["text"]),xe(Oe).trim().length>0?(g(),S("button",{key:0,class:"a-cpbtn","aria-label":v(o)("filePreview.copy"),onClick:Fe=>j(Oe)},[U.value!==ge.id?(g(),ue(Ee,{key:0,name:"copy",size:"sm"})):(g(),ue(Ee,{key:1,name:"check",size:"sm"}))],8,_ye)):Y("",!0)])):Y("",!0)],8,yye))],64))),128)),e.lastTurnReason==="failed"&&!e.working?(g(),S("div",xye,[b("span",Sye,[W(Ee,{name:"alert-triangle",size:"sm"})]),b("div",Cye,[b("span",Mye,E(e.turnErrorKind==="max_steps"?v(o)("conversation.turnFailedMaxSteps"):v(o)("conversation.turnFailed")),1),e.turnErrorMessage?(g(),S("span",{key:0,class:"tf-sub",title:e.turnErrorMessage},E(e.turnErrorMessage),9,Aye)):Y("",!0)]),W(Nt,{variant:"secondary",size:"sm",onClick:et},{default:ae(()=>[He(E(v(o)("conversation.turnFailedResume")),1)]),_:1})])):Y("",!0),e.compaction?(g(),ue(x5e,{key:4,label:v(o)("conversation.compacting")},null,8,["label"])):Y("",!0),u.value?(g(),S("div",Tye,[W(W9e,{label:h.value},null,8,["label"])])):Y("",!0),e.queued.length>0?(g(),S("div",Eye,[b("div",Iye,[b("span",Lye,[W(Ee,{name:"mail",size:"sm"}),He(" "+E(v(o)("composer.queueLabel"))+" · ",1),b("b",null,E(v(o)("composer.queuePending",{n:e.queued.length})),1)])]),(g(!0),S(Ce,null,rt(e.queued,(ge,Oe)=>(g(),S("div",{key:ge.id,class:Be(["u-turn q-turn",{"q-dragging":z.value===Oe,"drop-before":L.value?.index===Oe&&L.value.position==="before","drop-after":L.value?.index===Oe&&L.value.position==="after"}]),onDragover:Fe=>C(Oe,Fe),onDrop:Fe=>F(Oe,Fe)},[Oe===0?(g(),ue(Cn,{key:0,text:v(o)("composer.queueSteer")},{default:ae(()=>[b("button",{type:"button",class:"q-send","aria-label":v(o)("composer.queueSteer"),onClick:xt(Fe=>m("steerQueued",Oe),["stop"])},[W(Ee,{name:"send",size:"lg"})],8,Nye)]),_:2},1032,["text"])):Y("",!0),b("div",zye,[b("span",{class:"q-grip",title:v(o)("composer.queueDragTitle"),draggable:"true",onDragstart:Fe=>N(Oe,Fe),onDragend:H},[W(Ee,{name:"grip",size:"sm"})],40,Bye),b("button",{type:"button",class:"q-body",title:v(o)("composer.editQueued"),onClick:Fe=>I(Oe)},[ge.text?(g(),S("span",Pye,[W(TC,{text:ge.text,interactive:!1},null,8,["text"])])):(g(),S("span",Fye,[W(Ee,{name:"file",size:"sm"}),He(" "+E(v(o)("composer.queuedAttachments",{n:ge.attachments?.length??0})),1)]))],8,Rye),T(ge)?(g(),S("div",jye,[(g(!0),S(Ce,null,rt(ge.attachments,(Fe,pt)=>(g(),S(Ce,{key:pt},[Fe.kind==="file"?(g(),S("span",Oye,[W(Ee,{name:"file",size:"sm"}),He(" "+E(Fe.name??Fe.fileId),1)])):(g(),ue(P7,{key:1,url:Fe.url,kind:Fe.kind,"file-id":Fe.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):Y("",!0),b("button",{type:"button",class:"q-rm","aria-label":v(o)("composer.remove"),onClick:xt(Fe=>m("unqueue",Oe),["stop"])},[W(Ee,{name:"close",size:"sm"})],8,Hye)])],42,$ye))),128))])):Y("",!0)]),ye.value!==null?(g(),S("div",Dye,E(v(o)("composer.attachmentOpenUnsupported",{name:ye.value})),1)):Y("",!0)],64))}}),f9=vt(Wye,[["__scopeId","data-v-bb073357"]]),qye={class:"ch-id"},Uye={key:0,class:"ch-ws"},Zye={key:1,class:"ch-sep"},Kye=["onKeydown"],Gye={class:"ch-ses"},Yye={key:0,class:"ch-pill ch-sync-pill"},Xye={key:0,class:"ch-ahead"},Jye={key:1,class:"ch-behind"},Qye={key:1,class:"ch-pill ch-diff-pill"},ewe={key:0,class:"ch-add"},twe={key:1,class:"ch-del"},nwe={class:"ch-pill ch-pr pr-merged ch-done-pill"},owe=Je({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},sessionDone:{type:Boolean},pinned:{type:Boolean},panelVisible:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","togglePin","archiveSession","restoreSession","exportSession","togglePanel"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=B(()=>o.ahead??0),l=B(()=>o.behind??0),r=B(()=>o.gitDiffStats?.totalAdditions??0),a=B(()=>o.gitDiffStats?.totalDeletions??0),c=B(()=>r.value>0||a.value>0),u={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(q){return q.trim().toLowerCase().replaceAll("_","-")}function f(q){const te=d(q);return u[te]?`pr-${te}`:"pr-unknown"}function p(q){return n(u[d(q)]??"header.prStatusUnknown")}const h=V(!1),m=V(null),k=V(null),x=V({});function y(q){const te=q.target;k.value?.el?.contains(te)||m.value?.el?.contains(te)||A()}function w(){A()}async function _(q){if(q.stopPropagation(),h.value){A();return}h.value=!0,document.addEventListener("mousedown",y),window.addEventListener("resize",w),await yt();const te=m.value?.el,ee=k.value?.el;if(!te||!ee)return;const J=te.getBoundingClientRect(),se=4,Q=8,me=ee.offsetWidth,xe=ee.offsetHeight;let Ye=J.bottom+se;Ye+xe>window.innerHeight-Q&&(Ye=Math.max(Q,J.top-xe-se));let at=J.left;at+me>window.innerWidth-Q&&(at=Math.max(Q,J.right-me)),x.value={top:`${Math.round(Ye)}px`,left:`${Math.round(at)}px`}}function A(){h.value=!1,document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)}En(()=>{document.removeEventListener("mousedown",y),window.removeEventListener("resize",w)});function P(){s("copyAll"),A()}function z(){s("copyFinalSummary"),A()}const L=V(!1);function T(){o.sessionId&&fs(o.sessionId).then(q=>{q&&(L.value=!0,setTimeout(()=>{L.value=!1},1200))})}const I=V(!1),N=V(""),C=V(null);async function F(){if(A(),!!o.sessionId){I.value=!0,N.value=o.sessionTitle??"",await yt();try{C.value?.focus(),C.value?.select()}catch{}}}function H(){const q=N.value.trim();q&&o.sessionId&&q!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,q),I.value=!1}function D(){I.value=!1}function M(){o.sessionId&&(A(),s("forkSession",o.sessionId))}function R(){o.sessionId&&(A(),s("exportSession",o.sessionId))}function O(){o.sessionId&&(A(),s("togglePin",o.sessionId))}function U(){o.sessionId&&(A(),s("archiveSession",o.sessionId))}function Z(){o.sessionId&&(A(),s("restoreSession",o.sessionId))}return(q,te)=>(g(),S("header",{class:Be(["chat-header",{"macos-desktop":v(jg)}])},[b("div",qye,[e.workspaceName?(g(),S("span",Uye,E(e.workspaceName),1)):Y("",!0),e.workspaceName&&e.sessionTitle?(g(),S("span",Zye,"/")):Y("",!0),I.value?Jn((g(),S("input",{key:2,ref_key:"renameInputRef",ref:C,"onUpdate:modelValue":te[0]||(te[0]=ee=>N.value=ee),class:"ch-rename",type:"text",onKeydown:[go(xt(H,["stop"]),["enter"]),go(xt(D,["stop"]),["esc"])],onBlur:H,onClick:te[1]||(te[1]=xt(()=>{},["stop"]))},null,40,Kye)),[[js,N.value]]):e.sessionTitle?(g(),ue(Cn,{key:3,text:e.sessionTitle},{default:ae(()=>[b("span",Gye,E(e.sessionTitle),1)]),_:1},8,["text"])):Y("",!0)]),e.panelVisible?Y("",!0):(g(),ue(Dt,{key:0,class:"ch-panel",label:v(n)("panel.openPanel"),onClick:te[2]||(te[2]=ee=>s("togglePanel"))},{default:ae(()=>[W(Ee,{name:"panel-expand-right",size:"md"})]),_:1},8,["label"])),W(Dt,{ref_key:"kebabRef",ref:m,class:Be(["ch-act-more",{open:h.value}]),label:v(n)("header.options"),"aria-expanded":h.value,"aria-haspopup":"menu",onClick:te[3]||(te[3]=xt(ee=>_(ee),["stop"]))},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["class","label","aria-expanded"]),h.value?(g(),ue(zr,{key:1,ref_key:"menuRef",ref:k,class:"ch-menu",style:Gt(x.value),onClick:te[4]||(te[4]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{onClick:P},{default:ae(()=>[W(Ee,{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),He(" "+E(e.copied?v(n)("header.copied"):v(n)("header.copyAll")),1)]),_:1}),W(Bn,{onClick:z},{default:ae(()=>[W(Ee,{name:"file-text",size:"sm"}),He(" "+E(v(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(g(),S(Ce,{key:0},[W(Bn,{separator:""}),W(Bn,{onClick:T},{default:ae(()=>[W(Ee,{name:L.value?"check":"copy",size:"sm"},null,8,["name"]),He(" "+E(L.value?v(n)("header.copied"):v(n)("header.copySessionId")),1)]),_:1}),e.sessionDone?Y("",!0):(g(),ue(Bn,{key:0,onClick:O},{default:ae(()=>[W(Ee,{name:e.pinned?"pushpin-fill":"pushpin-line",size:"sm"},null,8,["name"]),He(" "+E(e.pinned?v(n)("header.unpinSession"):v(n)("header.pinSession")),1)]),_:1})),W(Bn,{onClick:F},{default:ae(()=>[W(Ee,{name:"pencil",size:"sm"}),He(" "+E(v(n)("header.renameSession")),1)]),_:1}),W(Bn,{onClick:M},{default:ae(()=>[W(Ee,{name:"git-fork",size:"sm"}),He(" "+E(v(n)("header.forkSession")),1)]),_:1}),W(Bn,{onClick:R},{default:ae(()=>[W(Ee,{name:"download",size:"sm"}),He(" "+E(v(n)("header.exportSession")),1)]),_:1}),e.sessionDone?(g(),ue(Bn,{key:1,onClick:Z},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"}),He(" "+E(v(n)("header.reopenSession")),1)]),_:1})):(g(),ue(Bn,{key:2,onClick:U},{default:ae(()=>[W(Ee,{name:"archive",size:"sm"}),He(" "+E(v(n)("header.markSessionDone")),1)]),_:1}))],64)):Y("",!0)]),_:1},8,["style"])):Y("",!0),te[7]||(te[7]=b("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(g(),S("button",{key:2,type:"button",class:"ch-git",onClick:te[5]||(te[5]=ee=>s("openChanges"))},[b("span",{class:Be(["ch-branch",{"ch-detached":!e.branch}])},E(e.branch||v(n)("header.detached")),3),i.value>0||l.value>0?(g(),S("span",Yye,[i.value>0?(g(),S("span",Xye,"↑"+E(i.value),1)):Y("",!0),l.value>0?(g(),S("span",Jye,"↓"+E(l.value),1)):Y("",!0)])):Y("",!0),c.value?(g(),S("span",Qye,[r.value>0?(g(),S("span",ewe,"+"+E(r.value),1)):Y("",!0),a.value>0?(g(),S("span",twe,"-"+E(a.value),1)):Y("",!0)])):Y("",!0)])):Y("",!0),e.pr?(g(),S("button",{key:3,type:"button",class:Be(["ch-pill ch-pr",f(e.pr.state)]),onClick:te[6]||(te[6]=ee=>e.pr&&s("openPr",e.pr.url))},[W(Ee,{name:"git-pull-request",size:"sm"}),b("span",null,"PR #"+E(e.pr.number)+" · "+E(p(e.pr.state)),1)],2)):Y("",!0),e.sessionId&&e.sessionDone?(g(),S(Ce,{key:4},[b("span",nwe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,E(v(n)("header.sessionDone")),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Z},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"}),He(" "+E(v(n)("header.reopenSession")),1)]),_:1})],64)):Y("",!0)],2))}}),swe=vt(owe,[["__scopeId","data-v-25d0d989"]]),iwe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],IC=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function lwe(e){if(e<=255)return iwe[e];let t=0,n=IC.length-1;for(;t<=n;){const o=t+n>>1,s=IC[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function rwe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let c=0;c=55296&&u<=56319&&c+1=56320&&h<=57343&&(d=(u-55296<<10)+(h-56320)+65536,f=2)}const p=lwe(d);(p==="R"||p==="AL"||p==="AN")&&(o=!0);for(let h=0;h=0&&n[u]==="ET";u--)n[u]="EN";for(u=c+1;u0?n[c-1]:r,f=u0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function pwe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` `).replace(/[\r\f]/g,` -`):e}let jm=null,pwe;function hwe(){return jm===null&&(jm=new Intl.Segmenter(pwe,{granularity:"word"})),jm}const mwe=/\p{Script=Arabic}/u,B1=/\p{M}/u,f9=/\p{Nd}/u;function IC(e){return mwe.test(e)}function LC(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Rr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if(LC(s))return!0;t++;continue}}if(LC(n))return!0}}return!1}function gwe(e){const t=Lf(e);return t!==null&&(p9.has(t)||V0.has(t))}const vwe=new Set([" "," ","⁠","\uFEFF"]),ywe=new Set(["-","‐","–","—"]);function wwe(e){const t=Lf(e);return t!==null&&vwe.has(t)}function kwe(e){const t=Lf(e);return t!==null&&ywe.has(t)}function HN(e,t){return wwe(e)?!1:t?!(gwe(e)||kwe(e)):!0}const p9=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),t6=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),h9=new Set(["'","’"]),V0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),bwe=new Set([":",".","،","؛"]),_we=new Set(["၏"]),xwe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Swe(e){if(m9(e))return!0;let t=!1;for(const n of e){if(V0.has(n)||o6(n)){t=!0;continue}if(!(t&&B1.test(n)))return!1}return t}function Cwe(e){for(const t of e)if(!p9.has(t)&&!V0.has(t))return!1;return e.length>0}function Mwe(e){if(m9(e))return!0;for(const t of e)if(!t6.has(t)&&!h9.has(t)&&!B1.test(t)&&!o6(t))return!1;return e.length>0}function m9(e){let t=!1;for(const n of e)if(!(n==="\\"||B1.test(n))){if(t6.has(n)||V0.has(n)||h9.has(n)){t=!0;continue}return!1}return t}function n6(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function Lf(e){if(e.length===0)return null;const t=n6(e,e.length);return e.slice(t)}function Awe(e){for(const t of e)if(!B1.test(t))return t;return null}function Twe(e){for(let t=e.length;t>0;){const n=n6(e,t),o=e.slice(n,t);if(!B1.test(o))return o;t=n}return null}const Ewe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Iwe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function o6(e){const t=e.codePointAt(0);return t!==void 0&&Iwe(t,Ewe)}function Lwe(e){const t=Twe(e);return t!==null&&o6(t)}function $we(e){const t=Awe(e);return t!==null&&f9.test(t)}function Nwe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(B1.test(o)){n--;continue}if(t6.has(o)||h9.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function zwe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function $C(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function NC(e,t){return e&&t!==null&&bwe.has(t)}function Bwe(e){const t=Lf(e);return t!==null&&_we.has(t)}function Rwe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function F7(e){let t=e.length;for(;t>0;){const n=n6(e,t),o=e.slice(n,t);if(xwe.has(o))return!0;if(!V0.has(o))return!1;t=n}return!1}function Pwe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const Fwe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function ar(e){return e.length===1?e[0]:e.join("")}function jwe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),ar(n)}function Owe(e,t,n,o){if(!Fwe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=Pwe(u,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){l.push(u),c+=u.length;continue}i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length}return i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),s}function j7(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Hwe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Dwe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:Hwe.test(n)&&t+1=e.len||j7(e.kinds[r]))continue;const a=[],c=e.starts[r];let u=r;for(;u0&&(t.push(ar(a)),n.push(!0),o.push("text"),s.push(c),i=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const Uwe=new Set([":","-","/","×",",",".","+","–","—"]),Zwe=/[\p{P}\p{S}\p{Co}]/u,Kwe=/\p{Emoji_Presentation}/u,Gwe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function Ywe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function DN(e){const t=e.charCodeAt(0);return t<128?Ywe(t):!Gwe.has(e)&&!Kwe.test(e)&&Zwe.test(e)}function zC(e){let t=!1;for(const n of e)if(!B1.test(n)){if(!DN(n))return!1;t=!0}return t}function Xwe(e){for(let t=e.length;t>0;){const n=n6(e,t),o=e.slice(n,t);if(B1.test(o)){t=n;continue}return DN(o)||o6(o)}return!1}function Jwe(e,t,n,o){const s=!t&&zC(e),i=!o&&zC(n),l=Lwe(e),r=(t||l)&&Xwe(e);return!s&&!i&&!r||Rr(e)||Rr(n)?!1:(t||s||l)&&(o||i)}function VN(e){for(const t of e)if(f9.test(t))return!0;return!1}function K5(e){if(e.length===0)return!1;for(const t of e)if(!(f9.test(t)||Uwe.has(t)))return!1;return!0}function Qwe(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(ar(c)),n.push(d),o.push("text"),s.push(e.starts[i]),i=u;continue}}t.push(l),n.push(a),o.push(r),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function tke(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let c=0;c0&&a[D]==="text"&&T&&f[D]&&h[D]||L&&s>0&&a[D]==="text"&&Cwe(z.text)&&f[D]||L&&s>0&&a[D]==="text"&&m[D]?M():L&&s>0&&a[D]==="text"&&z.isWordLike&&$&&k[D]?(M(),r[D]=!0):E!==null&&s>0&&a[D]==="text"&&u[D]===E?d[D]=(d[D]??1)+1:L&&!z.isWordLike&&s>0&&a[D]==="text"&&!f[D]&&(Swe(z.text)||z.text==="-"&&r[D])?M():(i[s]=z.text,l[s]=[z.text],r[s]=z.isWordLike,a[s]=z.kind,c[s]=z.start,u[s]=E,d[s]=E===null?0:1,f[s]=T,p[s]=$,h[s]=j,m[s]=H,k[s]=NC($,C),s++)}for(let P=0;Pnull);let y=-1;for(let P=s-1;P>=0;P--){const z=i[P];if(z.length!==0){if(a[P]==="text"&&!r[P]&&y>=0&&a[y]==="text"&&(Mwe(z)||z==="-"&&$we(i[y]))){const L=x[y]??[];L.push(z),x[y]=L,c[y]=c[P],i[P]="";continue}y=P}}for(let P=0;P=0&&!HN(t.texts[f-1],n)&&d(f),r<0&&(r=f),a=a||Rr(p);continue}d(f),o.push(p),s.push(t.isWordLike[f]),i.push(h),l.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:l}}function rke(e,t,n="normal",o="normal"){const s=uwe(n),i=s.mode==="pre-wrap"?fwe(e):dwe(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=ske(i,t,s),r=o==="keep-all"?lke(i,l,t.breakKeepAllAfterPunctuation):l;return{normalized:i,chunks:ike(r,s),...r}}let $c=null;const BC=new Map;let Nc=null;const ake=96,cke=/\p{Emoji_Presentation}/u,uke=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Om=null;const RC=new Map;function g9(){if($c!==null)return $c;if(typeof OffscreenCanvas<"u")return $c=new OffscreenCanvas(1,1).getContext("2d"),$c;if(typeof document<"u")return $c=document.createElement("canvas").getContext("2d"),$c;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function dke(e){let t=BC.get(e);return t||(t=new Map,BC.set(e,t)),t}function s1(e,t){let n=t.get(e);return n===void 0&&(n={width:g9().measureText(e).width,containsCJK:Rr(e)},t.set(e,n)),n}function s6(){if(Nc!==null)return Nc;if(typeof navigator>"u")return Nc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Nc;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Nc={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Nc}function fke(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function WN(){return Om===null&&(Om=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Om}function pke(e){return cke.test(e)||e.includes("️")}function hke(e){return uke.test(e)}function mke(e,t){let n=RC.get(e);if(n!==void 0)return n;const o=g9();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const l=i.getBoundingClientRect().width;document.body.removeChild(i),s-l>.5&&(n=s-l)}return RC.set(e,n),n}function gke(e){let t=0;const n=WN();for(const o of n.segment(e))pke(o.segment)&&t++;return t}function vke(e,t){return t.emojiCount===void 0&&(t.emojiCount=gke(e)),t.emojiCount}function M0(e,t,n){return n===0?t.width:t.width-vke(e,t)*n}function yke(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=WN(),l=[];for(const u of i.segment(e))l.push(u.segment);if(l.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const u=[];for(const d of l){const f=s1(d,n);u.push(M0(d,f,o))}return t.breakableFitAdvances=u,t.breakableFitAdvances}if(s==="pair-context"||l.length>ake){const u=[];let d=null,f=0;for(const p of l){const h=s1(p,n),m=M0(p,h,o);if(d===null)u.push(m);else{const k=d+p,x=s1(k,n);u.push(M0(k,x,o)-f)}d=p,f=m}return t.breakableFitAdvances=u,t.breakableFitAdvances}const r=[];let a="",c=0;for(const u of l){a+=u;const d=s1(a,n),f=M0(a,d,o);r.push(f-c),c=f}return t.breakableFitAdvances=r,t.breakableFitAdvances}function wke(e,t){const n=g9();n.font=e;const o=dke(e),s=fke(e),i=t?mke(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function kke(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function qN(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function UN(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function v9(e,t){return t===0?0:e+t}function xke(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Ske(e,t,n,o,s){const i=t==="tab"?s+xke(e,n):e.lineEndFitAdvances[n];return v9(o,i)}function PC(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return v9(o,s)}function FC(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return v9(o,i)}function Cke(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Mke(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function G5(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const l=e.kinds[i];if(!(l==="space"||l==="zero-width-break"||l==="hard-break")){if(l==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Tke(e,t,n,o,s,i){return t+Ake(e,n,o,s,i)}function Eke(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l}=e;if(o.length===0)return 0;const a=s6().lineFitEpsilon,c=t+a;let u=0,d=0,f=!1,p=0,h=0,m=0,k=0,x=-1,y=0;function w(){x=-1,y=0}function _(T=m,$=k,C=d){u++,n?.(C,p,h,T,$),d=0,f=!1,w()}function A(T,$){f=!0,p=T,h=0,m=T+1,k=0,d=$}function P(T,$,C){f=!0,p=T,h=$,m=T,k=$+1,d=C}function z(T,$){if(!f){A(T,$);return}d+=$,m=T+1,k=0}function L(T,$){const C=i[T],j=l[T]??null;let H=j===null?-1:G5(j,0,$+1),D=-1,M=0,R=$;for(;Rc){if(j!==null&&D>$){_(T,D,M),R=D,H=G5(j,H,R+1),D=-1,M=0;continue}_(),P(T,R,O)}else d+=O,m=T,k=R+1;const U=R+1;j!==null&&j[H]===U&&(D=U,M=d,H++),R++}f&&m===T&&k===C.length&&(m=T+1,k=0)}let E=0;for(;E=o.length));){const T=o[E],$=s[E],C=qN($);if(!f){T>c&&i[E]!==null?L(E,0):A(E,T),C&&(x=E+1,y=d-T),E++;continue}if(d+T>c){if(C){z(E,T),_(E+1,0,d-T),E++;continue}if(x>=0){if(m>x||m===x&&k>0){_();continue}_(x,0,y);continue}if(T>c&&i[E]!==null){_(),L(E,0),E++;continue}_();continue}z(E,T),C&&(x=E+1,y=d-T),E++}return f&&_(),u}function Ike(e,t,n){if(e.simpleLineWalkFastPath)return Eke(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l,discretionaryHyphenWidth:r,chunks:a}=e;if(o.length===0||a.length===0)return 0;const c=s6(),u=c.lineFitEpsilon,d=t+u;let f=0,p=0,h=!1,m=0,k=0,x=0,y=0,w=-1,_=0,A=0,P=null;function z(){w=-1,_=0,A=0,P=null}function L(){return P==="soft-hyphen"&&w===x&&y===0?A:p}function E(M=x,R=y,O){f++,n!==void 0&&n(Tke(e,O??L(),m,k,M,R),m,k,M,R),p=0,h=!1,z()}function T(M,R){h=!0,m=M,k=0,x=M+1,y=0,p=R}function $(M,R,O){h=!0,m=M,k=R,x=M,y=R+1,p=O}function C(M,R){if(!h){T(M,R);return}p+=R,x=M+1,y=0}function j(M,R,O,U,Z,q){if(!R)return;const te=PC(e,M,O,Z),ee=FC(e,M,O,Z,U);w=O+1,_=p-q+te,A=p-q+ee,P=M}function H(M,R){const O=i[M],U=l[M]??null;let Z=U===null?-1:G5(U,0,R+1),q=-1,te=0,ee=R;for(;eed){if(U!==null&&q>R){E(M,q,te),ee=q,Z=G5(U,Z,ee+1),q=-1,te=0;continue}E(),$(M,ee,J)}else p=me,x=M,y=ee+1}const se=ee+1;U!==null&&U[Z]===se&&(q=se,te=p,Z++),ee++}h&&x===M&&y===O.length&&(x=M+1,y=0)}function D(M){f++,n?.(0,M.startSegmentIndex,0,M.consumedEndSegmentIndex,0),z()}for(let M=0;M=R.endSegmentIndex));){const U=s[O],Z=qN(U),q=_ke(e,h,O),te=U==="tab"?bke(p+q,e.tabStopAdvance):o[O],ee=q+te,J=Ske(e,U,O,q,te);if(U==="soft-hyphen"){h&&(x=O+1,y=0,w=O+1,_=p+r,A=p+r,P=U),O++;continue}if(!h){J>d&&i[O]!==null?H(O,0):T(O,te),j(U,Z,O,te,q,ee),O++;continue}if(p+J>d){const Q=p+PC(e,U,O,q),me=p+FC(e,U,O,q,te);if(P==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&_<=d){E(w,0,A);continue}if(Z&&Q<=d){C(O,ee),E(O+1,0,me),O++;continue}if(w>=0&&_<=d){if(x>w||x===w&&y>0){E();continue}const xe=w;E(xe,0,A),O=xe;continue}if(J>d&&i[O]!==null){E(),H(O,0),O++;continue}E();continue}C(O,ee),j(U,Z,O,te,q,ee),O++}if(h){const U=w===R.consumedEndSegmentIndex?A:p;E(R.consumedEndSegmentIndex,0,U)}}return f}let Hm=null;function y9(){return Hm===null&&(Hm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Hm}function Lke(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function $ke(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=F7(d),r=t6.has(d)}function u(d,f){o.push(d),i=i||f;const p=F7(d);d.length===1&&V0.has(d)?l=l||p:l=p,r=!1}for(const d of y9().segment(e)){const f=d.segment,p=Rr(f);if(o.length===0){c(f,d.index,p);continue}if(r||p9.has(f)||V0.has(f)||t.carryCJKAfterClosingQuote&&p&&l){u(f,p);continue}if(!i&&!p){u(f,p);continue}a(),c(f,d.index,p)}return a(),n}function Nke(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(a,c){const u=t[a].start,d=c=0&&!HN(t[a-1].text,n)&&r(a),s<0&&(s=a),i=i||Rr(c.text)}return r(t.length),o}function jC(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=y9();for(const s of o.segment(e))n++;return n}function zke(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Bke(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of y9().segment(e))n++,zke(o.segment)&&t.push(n);return t.length===0?null:t}function Rke(e,t,n){return t>1?e+(t-1)*n:e}function Pke(e,t,n,o,s){const i=s6(),{cache:l,emojiCorrection:r}=wke(t,hke(e.normalized)),a=M0("-",s1("-",l),r)+(s===0?0:s*2),u=M0(" ",s1(" ",l),r)*8,d=s!==0;if(e.len===0)return Lke();const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=n?[]:null,y=[],w=[],_=[],A=n?[]:null,P=Array.from({length:e.len});function z($,C,j,H,D,M,R,O,U){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(j),h.push(H),m.push(D),x?.push(M),y.push(R),w.push(O),d&&_.push(U),A!==null&&A.push($)}function L($,C,j,H,D){const M=s1($,l),R=d?jC($,C):0,O=Rke(M0($,M,r),R,s),U=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:O,Z=U===0?0:U+(R>0?s:0),q=C==="space"||C==="zero-width-break"?0:O;if(D&&H&&$.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":K5($)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const ee=yke($,M,l,r,te),J=ee===null||o==="keep-all"?null:Bke($);z($,O,Z,q,C,j,ee,J,R);return}z($,O,Z,q,C,j,null,null,R)}for(let $=0;${n>t&&(t=n)}),t}function Dke(e){const t=e.toLowerCase(),n=[];let o=0;for(const s of e){const i=s.toLowerCase().length;for(let l=0;l=0&&ao[0]-s[0]),n=[];for(const o of t){const s=n.at(-1);s&&o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):n.push([...o])}return n}function HC(e,t){if(!t||t.length===0||e.length===0)return[{text:e,hit:!1}];const n=[];let o=0;for(const[s,i]of Vke(t)){const l=Math.max(0,Math.min(s,e.length)),r=Math.max(l,Math.min(i,e.length));r<=l||(l>o&&n.push({text:e.slice(o,l),hit:!1}),n.push({text:e.slice(l,r),hit:!0}),o=r)}return o0?n:[{text:e,hit:!1}]}function DC(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function Wke(e,t){const n=e.toLowerCase();let o=-1,s=-1,i=0;for(let l=0;l0,a.value=w.scrollTop+w.clientHeight{const w={},_="var(--menu-scroll-fade)";let A;return r.value&&a.value?A=`linear-gradient(to bottom, transparent 0, black ${_}, black calc(100% - ${_}), transparent 100%)`:r.value?A=`linear-gradient(to bottom, transparent, black ${_})`:a.value&&(A=`linear-gradient(to top, transparent, black ${_})`),A&&(w.maskImage=A,w.WebkitMaskImage=A),u.value&&(w.maxHeight=u.value),Object.keys(w).length>0?w:void 0}),p=B(()=>{const w=c.value;return w?{top:`${w.top}px`,height:`${w.height}px`}:void 0});function h(){const w=t.value,_=n.value,A=w?.offsetParent;if(!w||!_||!A)return;const P=getComputedStyle(w),z=zd(w,"--space-2",8),L=(parseFloat(P.paddingTop)||0)+(parseFloat(P.paddingBottom)||0),E=zd(_,o,Number.POSITIVE_INFINITY),T=window.visualViewport?.offsetTop??0,$=A.getBoundingClientRect().top-T-z-L;u.value=`${Math.max(Math.floor(Math.min(E,$)),0)}px`,yt(d)}function m(){const w=n.value;if(!w)return;const _=w.querySelectorAll('[role="option"]')[s?.value??-1];if(!_)return;const A=w.getBoundingClientRect(),P=_.getBoundingClientRect(),z=P.top-A.top+w.scrollTop,L=z+P.height;zw.scrollTop+w.clientHeight&&(w.scrollTop=L-w.clientHeight)}let k=null;function x(w){const _=n.value,A=c.value;if(!_||!A)return;w.preventDefault(),k?.();const P=w.pointerId;(w.target instanceof Element?w.target:null)?.setPointerCapture?.(P);const L=zd(_,"--menu-scrollbar-track-inset",0),E=_.clientHeight-L*2-A.height,T=_.scrollHeight-_.clientHeight,$=w.clientY,C=_.scrollTop,j=M=>{M.pointerId!==P||E<=0||(_.scrollTop=C+(M.clientY-$)/E*T)},H=M=>{M.pointerId===P&&k?.()};k=()=>{window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",H),window.removeEventListener("pointercancel",H),k=null},window.addEventListener("pointermove",j),window.addEventListener("pointerup",H),window.addEventListener("pointercancel",H)}let y=null;return In(()=>{if(typeof ResizeObserver=="function"&&n.value&&(y=new ResizeObserver(w=>{for(const _ of w)_.target===n.value?d():h()}),y.observe(n.value),l)){const w=t.value?.offsetParent;w&&y.observe(w)}l&&(window.addEventListener("resize",h),window.visualViewport?.addEventListener("resize",h),window.visualViewport?.addEventListener("scroll",h),h()),d()}),En(()=>{y?.disconnect(),y=null,k?.(),window.removeEventListener("resize",h),window.visualViewport?.removeEventListener("resize",h),window.visualViewport?.removeEventListener("scroll",h)}),Ke(()=>[s?.value,i?.value],()=>{yt(()=>{d(),m()})}),{atTop:r,atBottom:a,thumb:c,scrollStyle:f,thumbStyle:p,onScroll:d,onThumbPointerDown:x}}const Uke={key:0,class:"slash-empty",role:"status"},Zke=["id","aria-selected","onMouseenter","onMousedown"],Kke={class:"slash-name"},Gke={key:0,class:"slash-match"},Yke={class:"slash-desc"},Xke={key:0,class:"slash-desc-match"},Jke=Je({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{default:()=>[]},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);ca(i);const l=V(null),r=B(()=>n.activeIndex),a=B(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=ZN({menuEl:i,scrollEl:l,maxHeightVar:"--p-slash-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"}),h=B(()=>n.items.map((m,k)=>{const x=m.isSkill?m.desc:s(m.desc),y=n.ranges[k]??qke(n.query,m.name,x);return{item:m,namePieces:HC(m.name,y.name),desc:x,descPieces:HC(x,y.desc)}}));return(m,k)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Be(["slash-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.items.length===0?(g(),S("div",Uke,I(v(s)("composer.noCommands")),1)):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"slash-scroll",role:"listbox",style:Gt(v(u)),onScroll:k[0]||(k[0]=(...x)=>v(f)&&v(f)(...x))},[(g(!0),S(Ce,null,rt(h.value,(x,y)=>(g(),S("div",{id:`composer-slash-option-${y}`,key:`${x.item.name}-${y}`,class:Be(["slash-item",{active:y===n.activeIndex}]),role:"option","aria-selected":y===n.activeIndex,onMouseenter:w=>o("hover",y),onMousedown:xt(w=>o("select",x.item),["prevent"])},[b("span",Kke,[(g(!0),S(Ce,null,rt(x.namePieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",Gke,I(w.text),1)):(g(),S(Ce,{key:1},[He(I(w.text),1)],64))],64))),128))]),b("span",Yke,[(g(!0),S(Ce,null,rt(x.descPieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",Xke,I(w.text),1)):(g(),S(Ce,{key:1},[He(I(w.text),1)],64))],64))),128))])],42,Zke))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:1,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:k[1]||(k[1]=(...x)=>v(p)&&v(p)(...x))},null,36)):Y("",!0)],2))}}),VC=vt(Jke,[["__scopeId","data-v-9f177a8d"]]),Qke={key:0,class:"mention-state dim",role:"status"},ebe={key:1,class:"mention-state dim",role:"status"},tbe=["id","aria-selected","onMouseenter","onMousedown"],nbe=["innerHTML"],obe={class:"mention-name"},sbe={key:0,class:"mention-hit"},ibe={class:"mention-meta"},lbe=["innerHTML"],rbe={class:"mention-name"},abe={key:0,class:"mention-hit"},cbe={key:0,class:"mention-meta"},ube={key:0,class:"mention-hit"},dbe=Je({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean,default:!1},stale:{type:Boolean,default:!1},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);ca(i);const l=V(null),r=B(()=>n.activeIndex),a=B(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=ZN({menuEl:i,scrollEl:l,maxHeightVar:"--p-mention-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"});function h(w){const _=w.endsWith("/")?w.slice(0,-1):w,A=_.lastIndexOf("/");return A===-1?"":_.slice(0,A)}function m(w){const _=w.file.path.endsWith("/")?w.file.path.slice(0,-1):w.file.path;return Dm(w.file.name,w.file.matchPositions,Math.max(0,_.length-w.file.name.length))}function k(w){return Dm(h(w.file.path),w.file.matchPositions,0)}function x(w){return Dm(w.skill.name,w.matchPositions,0)}function y(w){return w.kind==="skill"?`skill:${w.skill.name}`:w.file.path}return(w,_)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Be(["mention-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.loading&&n.items.length===0?(g(),S("div",Qke,I(v(s)("mention.searching")),1)):n.items.length===0?(g(),S("div",ebe,I(v(s)("mention.noMatch")),1)):Y("",!0),n.loading&&n.items.length>0?(g(),ue(Zo,{key:2,class:"mention-spin",size:"sm",label:v(s)("mention.searching")},null,8,["label"])):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"mention-scroll",role:"listbox",style:Gt(v(u)),onScroll:_[0]||(_[0]=(...A)=>v(f)&&v(f)(...A))},[(g(!0),S(Ce,null,rt(n.items,(A,P)=>(g(),S("div",{id:`composer-mention-option-${P}`,key:y(A),class:Be(["mention-item",{active:P===n.activeIndex,stale:n.stale&&A.kind!=="skill"}]),role:"option","aria-selected":P===n.activeIndex,onMouseenter:z=>o("hover",P),onMousedown:xt(z=>o("select",A),["prevent"])},[A.kind==="skill"?(g(),S(Ce,{key:0},[b("span",{class:"mention-icon",innerHTML:v(Ll)("sparkles","sm"),"aria-hidden":"true"},null,8,nbe),b("span",obe,[(g(!0),S(Ce,null,rt(x(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",sbe,I(z.text),1)):(g(),S(Ce,{key:1},[He(I(z.text),1)],64))],64))),128))]),b("span",ibe,I(A.skill.description),1)],64)):(g(),S(Ce,{key:1},[b("span",{class:"mention-icon",innerHTML:v(ju)(A.file.path,A.file.name),"aria-hidden":"true"},null,8,lbe),b("span",rbe,[(g(!0),S(Ce,null,rt(m(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",abe,I(z.text),1)):(g(),S(Ce,{key:1},[He(I(z.text),1)],64))],64))),128))]),h(A.file.path)?(g(),S("span",cbe,[(g(!0),S(Ce,null,rt(k(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",ube,I(z.text),1)):(g(),S(Ce,{key:1},[He(I(z.text),1)],64))],64))),128))])):Y("",!0)],64))],42,tbe))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:3,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:_[1]||(_[1]=(...A)=>v(p)&&v(p)(...A))},null,36)):Y("",!0)],2))}}),WC=vt(dbe,[["__scopeId","data-v-0ac2fbc1"]]),KN=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/workflow",desc:"commands.dynamicWorkflow.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function fbe(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const Y5="skill:";function pbe(e){return e.startsWith(Y5)?e.slice(Y5.length):e}function GN(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Y5}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...KN,...t]}function hbe(e,t=KN){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let l=0;return i===n?l=3:i.startsWith(n)?l=2:i.includes(n)&&(l=1),{item:o,index:s,score:l}}).filter(({score:o})=>o>0).toSorted((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}function i6(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function YN(e){return e?.supportEfforts??[]}function mbe(e){return e[Math.floor(e.length/2)]}function lf(e){if(i6(e)==="unsupported")return"off";const t=YN(e);return t.length>0?e?.defaultEffort??mbe(t):"on"}function l6(e){const t=YN(e),n=i6(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function rf(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function gbe(e,t){return l6(e).includes(t)}function XN(e,t){return t==="off"?"off":t==="on"?lf(e):t}function w9(e,t){return t??lf(e)}function vbe(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function ybe(e,t,n){return!n||e===void 0?t:lf(e)}const X5=100;function wbe(e){const t=Fu(dn.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>X5?n.slice(-X5):n,s={[e]:o};return T1(dn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function kbe(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=V(wbe(s())),l=B(()=>i.value[s()??""]??[]);let r=-1,a="";function c(x){const y=s();if(r=-1,!y)return;const w=x.trim();if(!w)return;const _=i.value[y]??[];if(_.at(-1)===w)return;const A=[..._,w],P=A.length>X5?A.slice(-X5):A;i.value={...i.value,[y]:P},T1(dn.inputHistory,i.value)}function u(){const x=n.value;return x?(x.selectionStart??0)===0:!1}function d(x){t.value=x,yt(()=>{const y=n.value;if(!y)return;o();const w=x.length;y.setSelectionRange(w,w)})}function f(){const x=l.value;if(x.length!==0){if(r===-1)a=t.value,r=x.length-1;else if(r>0)r-=1;else return;d(x[r])}}function p(){if(r===-1)return;const x=l.value;r0}return Ke(s,()=>{r=-1}),{push:c,caretAtTextStart:u,recallOlder:f,recallNewer:p,resetBrowsing:h,isBrowsing:m,hasHistory:k}}function bbe(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:l,clearDraft:r}=e,a=V(!1),c=V([]),u=V(0);function d(){const p=t.value;p.startsWith("/")&&!p.includes(" ")?(c.value=hbe(p,GN(s())),u.value=0,a.value=c.value.length>0):a.value=!1}function f(p){if(a.value=!1,p.acceptsInput){t.value=`${p.name} `,yt(()=>{const h=n.value;if(!h)return;const m=t.value.length;h.setSelectionRange(m,m),h.focus(),o()});return}t.value="",r?.(),l(p.name),i(p.name)}return{open:a,items:c,active:u,update:d,select:f}}function _be(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s,searchSkills:i,insertSkill:l}=e,r=V(!1),a=V([]),c=V(0),u=V(!1),d=V(!1);let f=null,p=0;function h(){const y=t.value,w=n.value?.selectionStart??y.length;let _=w-1;for(;_>=0&&!/\s/.test(y[_]);)_--;_++;const A=y.slice(_,w);return A.startsWith("@")?{token:A.slice(1),start:_,end:w}:null}function m(){const y=h(),w=s(),_=i?.();if(!y||!w&&!_){r.value=!1,d.value=!1;return}const A=y.token;f!==null&&clearTimeout(f),f=setTimeout(async()=>{const P=++p;u.value=!0,r.value=!0,c.value=0,a.value.length>0&&(d.value=!0);try{const[z,L]=await Promise.all([w?w(A).catch(()=>[]):Promise.resolve([]),_?_(A).catch(()=>[]):Promise.resolve([])]);if(P!==p)return;a.value=[...z.map(E=>({kind:E.path.endsWith("/")?"folder":"file",file:{...E,matchPositions:OC(A,E.path)}})),...L.map(E=>({kind:"skill",skill:E,matchPositions:OC(A,E.name)}))]}catch{P===p&&(a.value=[])}finally{P===p&&(u.value=!1,d.value=!1)}},200)}function k(){f!==null&&clearTimeout(f),f=null,p++,r.value=!1,u.value=!1,d.value=!1}function x(y){const w=h();if(!w)return;if(r.value=!1,y.kind==="skill"){l?.(y.skill.name);return}const _=t.value,A=y.file.name||y.file.path.split(/[\\/]/).findLast(Boolean)||y.file.path,P=Hv({kind:y.kind,name:A,path:y.file.path});t.value=`${_.slice(0,w.start)}${P} ${_.slice(w.end)}`,yt(()=>{const z=n.value;if(!z)return;const L=w.start+P.length+1;z.setSelectionRange(L,L),z.focus(),o()})}return{open:r,items:a,active:c,loading:u,stale:d,update:m,select:x,close:k,getMentionToken:h}}function xbe(e){const{sessionId:t}=e;function n(c){return ls(_k(c))??""}function o(c,u){const d=_k(c);u?Es(d,u):y1(d)}const s=V(n(t())),i=V(null);function l(){const c=i.value;c&&(c.style.height="auto",c.style.height=`${c.scrollHeight}px`)}Ke(s,c=>{yt(l),o(t(),c)}),Ke(t,(c,u)=>{c!==u&&(o(u,s.value),s.value=n(c),yt(l))});function r(c){s.value=c,yt(()=>{const u=i.value;if(!u)return;u.focus();const d=c.length;u.setSelectionRange(d,d),l()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:l,loadForEdit:r,clearDraft:a}}function Sbe(e){const{uploadImage:t,sessionId:n}=e,o=V({}),s=B(()=>o.value[n()??""]??[]),i=V(null),l=V(null),r=V(!1);let a=0;function c(){return`att_${++a}`}function u(R,O){o.value={...o.value,[R]:O}}function d(R){if(R.previewUrl!==void 0)try{URL.revokeObjectURL(R.previewUrl)}catch{}}function f(R){return R.startsWith("image/")?"image":R.startsWith("video/")?"video":"file"}async function p(R){const O=t();if(!O)return;const U=n()??"";if(R.length!==0)for(const Z of R){const q=f(Z.type),te=c(),ee=q==="file"?void 0:URL.createObjectURL(Z),J={localId:te,name:Z.name,kind:q,previewUrl:ee,mediaType:Z.type||"application/octet-stream",size:Z.size,uploading:!0};u(U,[...o.value[U]??[],J]),O(Z,Z.name).then(se=>{const Q=o.value[U]??[];u(U,Q.map(me=>me.localId===te?{...me,uploading:!1,fileId:se?.fileId,mediaType:se?.mediaType??me.mediaType,error:se===null}:me))}).catch(()=>{const se=o.value[U]??[];u(U,se.map(Q=>Q.localId===te?{...Q,uploading:!1,error:!0}:Q))})}}function h(R){const O=n()??"",U=o.value[O]??[],Z=U.find(q=>q.localId===R);i.value?.localId===R&&(i.value=null),Z&&d(Z),u(O,U.filter(q=>q.localId!==R))}function m(R){i.value=R}function k(){i.value=null}function x(){l.value?.click()}function y(R){const O=R.target,U=Array.from(O.files??[]);p(U),O.value=""}function w(R){if(!t())return;const O=R.clipboardData;if(!O)return;const U=[],Z=new Set,q=(te,ee)=>{const J=`${te.size}:${te.type}:${ee}`;if(Z.has(J))return;Z.add(J);const se=te.type.split("/")[1]??"png",Q=ee.includes(".")?ee:`paste-${Date.now()}.${se}`;U.push(te instanceof File?te:new File([te],Q,{type:te.type}))};for(const te of Array.from(O.items))if(te.kind==="file"){const ee=te.getAsFile();ee&&q(ee,ee.name||`paste-${Date.now()}.${te.type.split("/")[1]??"png"}`)}for(const te of Array.from(O.files))q(te,te.name);U.length!==0&&(R.preventDefault(),p(U))}let _=0;function A(R){!t()||!Array.from(R.dataTransfer?.items??[]).some(U=>U.kind==="file")||(R.preventDefault(),R.stopPropagation(),r.value=!0)}function P(){r.value=!1}function z(R){if(_=0,r.value=!1,!t())return;R.preventDefault(),R.stopPropagation();const O=Array.from(R.dataTransfer?.files??[]);p(O)}function L(R){return Array.from(R.dataTransfer?.items??[]).some(O=>O.kind==="file")}function E(R){!t()||!L(R)||(R.preventDefault(),_+=1,r.value=!0)}function T(R){!t()||!L(R)||R.preventDefault()}function $(R){!t()||!L(R)||(_=Math.max(0,_-1),_===0&&(r.value=!1))}function C(R){if(_=0,r.value=!1,!t())return;R.preventDefault();const O=Array.from(R.dataTransfer?.files??[]);p(O)}function j(){const R=n()??"";for(const O of o.value[R]??[])d(O);u(R,[])}function H(R,O,U){const Z=o.value[R]??[];Z.some(q=>q.localId===O)&&u(R,Z.map(q=>q.localId===O?{...q,...U}:q))}function D(R){return fetch(R).then(O=>{if(!O.ok)throw new Error(`fetch failed: ${O.status}`);return O.blob()})}function M(R){const O=n()??"";for(const U of o.value[O]??[])d(U);u(O,[]);for(const U of R){const Z=c(),q=/^data:/i.test(U.url),te=/^blob:/i.test(U.url),ee=U.name??U.kind;if(U.fileId){const J={localId:Z,name:ee,kind:U.kind,previewUrl:U.kind==="file"?void 0:U.url,uploading:!1,fileId:U.fileId};u(O,[...o.value[O]??[],J]),U.kind!=="file"&&!q&&!te&&Ct().getFileBlob(U.fileId).then(se=>{const Q=URL.createObjectURL(se);if(!(o.value[O]??[]).some(xe=>xe.localId===Z)){URL.revokeObjectURL(Q);return}H(O,Z,{previewUrl:Q})}).catch(()=>{})}else{if(!U.url)continue;const J=t();if(!J)continue;const se={localId:Z,name:ee,kind:U.kind,previewUrl:U.url,uploading:!0};u(O,[...o.value[O]??[],se]),D(U.url).then(Q=>{const me=ee.includes(".")?ee:`${ee}.${Q.type.split("/")[1]??"bin"}`;return J(Q,me)}).then(Q=>{if(Q===null){const me=o.value[O]??[];u(O,me.filter(xe=>xe.localId!==Z));return}H(O,Z,{uploading:!1,fileId:Q.fileId})}).catch(()=>{const Q=o.value[O]??[];u(O,Q.filter(me=>me.localId!==Z))})}}}return Ke(n,()=>{i.value=null}),In(()=>{document.addEventListener("paste",w),document.addEventListener("dragenter",E),document.addEventListener("dragover",T),document.addEventListener("dragleave",$),document.addEventListener("drop",C)}),En(()=>{document.removeEventListener("paste",w),document.removeEventListener("dragenter",E),document.removeEventListener("dragover",T),document.removeEventListener("dragleave",$),document.removeEventListener("drop",C);for(const R of Object.values(o.value))for(const O of R)d(O);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:l,isDragOver:r,removeAttachment:h,openAttachmentPreview:m,closeAttachmentPreview:k,openFilePicker:x,handleFileInputChange:y,handleDragOver:A,handleDragLeave:P,handleDrop:z,clearAfterSubmit:j,loadAttachments:M}}const Cbe=640,Mbe=`(max-width: ${Cbe}px)`;function r6(){const e=V(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(Mbe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),En(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),En(()=>t.removeListener(n))),e}const Abe={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},Tbe=["stroke-dasharray","stroke-dashoffset"],Vm=7,Ebe=Je({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*Vm;return(o,s)=>(g(),S("svg",Abe,[b("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:Vm,fill:"none","stroke-width":"2.5"}),b("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:Vm,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,Tbe)]))}}),Ibe=vt(Ebe,[["__scopeId","data-v-97f3cf66"]]),Lbe=["aria-selected","onClick"],$be=Je({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("div",{class:Be(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[(g(!0),S(Ce,null,rt(e.options,i=>(g(),S("button",{key:i.value,class:Be(["ui-seg__item",{"is-on":i.value===e.modelValue}]),type:"button",role:"tab","aria-selected":i.value===e.modelValue,onClick:l=>n("update:modelValue",i.value)},I(i.label),11,Lbe))),128))],2))}}),di=vt($be,[["__scopeId","data-v-bffb3dae"]]),Wm=["pythinking","pyreasoning","pypondering","pyplanning","pyiterating","pyorchestrating","reasonating","pondercrafting","neuroning","logic-weaving","rubber-duckoning","token-wrangling","bug-whispering","stack-divining","gizmo-tinkering"],JN=6e4;function Nbe(e=Date.now()){const t=Math.floor(e/JN)%Wm.length;return Wm[t]??Wm[0]}function zbe(e=Date.now()){return`${Nbe(e)}…`}const af=["⣷","⣯","⣟","⡿","⢿","⣻","⣽","⣾"],yu=80,Bbe=["aria-label"],Rbe=Je({__name:"ActivitySpinner",props:{fast:{type:Boolean},label:{}},setup(e){const t=af.length*yu,n=yu/2,o=e,s=V(Date.now());let i;In(()=>{o.label===void 0&&(i=setInterval(()=>{s.value=Date.now()},JN))}),En(()=>{i!==void 0&&clearInterval(i)});const l=B(()=>o.label??zbe(s.value));function r(a){return{"--spinner-frame-delay":`${a*yu-t}ms`,"--spinner-frame-fast-delay":`${a*n-t/2}ms`}}return(a,c)=>(g(),S("span",{class:Be(["activity-spin",{"activity-spin--fast":e.fast}]),"aria-label":l.value,role:"img"},[(g(!0),S(Ce,null,rt(v(af),(u,d)=>(g(),S("span",{key:u,class:"activity-frame",style:Gt(r(d)),"aria-hidden":"true"},I(u),5))),128))],10,Bbe))}}),qm=vt(Rbe,[["__scopeId","data-v-c12d8332"]]),Pbe=["disabled"],Fbe={key:0,class:"leading"},jbe={class:"label"},Obe={key:1,class:"count"},Hbe={key:2,class:"trailing"},Dbe=Je({__name:"MenuRow",props:{count:{},active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("button",{type:"button",class:Be(["menu-row",{active:e.active,selected:e.selected,disabled:e.disabled}]),disabled:e.disabled},[t.$slots.leading?(g(),S("span",Fbe,[jn(t.$slots,"leading",{},void 0,!0)])):Y("",!0),b("span",jbe,[jn(t.$slots,"label",{},()=>[jn(t.$slots,"default",{},void 0,!0)],!0)]),e.count!==void 0?(g(),S("span",Obe,I(e.count),1)):Y("",!0),t.$slots.trailing?(g(),S("span",Hbe,[jn(t.$slots,"trailing",{},void 0,!0)])):Y("",!0)],10,Pbe))}}),zc=vt(Dbe,[["__scopeId","data-v-261bf74a"]]),Vbe=["aria-checked","disabled"],Wbe=Je({__name:"SwitchToggle",props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function s(){n.disabled||o("update:modelValue",!n.modelValue)}function i(l){n.disabled||l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),s())}return(l,r)=>(g(),S("button",{type:"button",class:"switch-toggle",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,onClick:s,onKeydown:i},[...r[0]||(r[0]=[b("span",{class:"track","aria-hidden":"true"},null,-1),b("span",{class:"thumb","aria-hidden":"true"},null,-1)])],40,Vbe))}}),qC=vt(Wbe,[["__scopeId","data-v-169237c7"]]);function qbe({initialized:e,onboardingCompleted:t,authReady:n}){return e?t?n?"app":"recovery":"first-run":"loading"}function Ube(e,t){return e||t}function Zbe(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const Kbe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function sl(e){const t=e.replaceAll("\\","/"),n=Kbe.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function Gbe(e,t){const n=sl(t.cwd);return e.find(o=>sl(o.root)===n)?.id??t.workspaceId??t.cwd}function Ybe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(sl)),l=new Map;for(const d of t){const f=sl(d.root);i.has(f)||l.has(f)||l.set(f,{...d})}for(const d of n){const f=d.cwd;if(!f)continue;const p=sl(f);i.has(p)||l.has(p)||l.set(p,{id:d.workspaceId??f,root:f,name:Zbe(f),sessionCount:0})}const r=new Map;for(const d of n){const f=Gbe(t,d);r.set(f,(r.get(f)??0)+1)}const a=[];for(const d of t){const f=sl(d.root);!i.has(f)&&!a.includes(f)&&a.push(f)}const c=[...l.keys()].filter(d=>!a.includes(d));c.sort((d,f)=>l.get(d).root.localeCompare(l.get(f).root));const u=[];for(const d of[...a,...c]){const f=l.get(d),p=r.get(f.id)??r.get(f.root)??0,h=s[f.id]===!1?p:Math.max(f.sessionCount,p);u.push({...f,sessionCount:h})}return u}function Xbe(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const o=new Set(t.map(l=>l.id)),s=new Set(t.filter(l=>l.role==="user").map(l=>l.id)),i=e.filter(l=>{const r=Date.parse(l.createdAt);return!(Number.isNaN(r)||r>=n||o.has(l.id)||l.role==="user"&&l.promptId!==void 0&&s.has(l.promptId))});return i.length>0?[...i,...t]:t}function Jbe(e,t){const n=new Set(e.map(c=>c.id)),o=t.filter(c=>c.kind==="subagent"&&!n.has(c.id));if(o.length===0)return e;const s=new Map(e.map(c=>[c.id,c])),i=new Map;for(const c of e)c.kind==="subagent"&&c.agentId!==void 0&&!i.has(c.agentId)&&i.set(c.agentId,c);const l=new Set,r=o.map(c=>{const u=(c.backgroundTaskId!==void 0?s.get(c.backgroundTaskId):void 0)??i.get(c.id)??(c.agentId!==void 0?i.get(c.agentId):void 0);if(u===void 0)return c;l.add(u.id);const d=c.status==="running"&&u.status!=="running",f=u.completedAt!==void 0&&u.completedAtEstimated!==!0;return{...c,status:c.status==="running"?u.status:c.status,subagentPhase:d?u.status==="completed"?"completed":u.status==="cancelled"?"cancelled":"failed":c.subagentPhase,agentId:c.agentId??u.agentId,model:c.model??u.model,thinkingEffort:c.thinkingEffort??u.thinkingEffort,routing:c.routing??u.routing,currentRoutingEnvRevision:c.currentRoutingEnvRevision??u.currentRoutingEnvRevision,completedAt:f?u.completedAt:c.completedAt??u.completedAt,completedAtEstimated:f?u.completedAtEstimated:c.completedAt!==void 0?c.completedAtEstimated:u.completedAtEstimated,outputPreview:u.outputPreview??c.outputPreview,outputBytes:u.outputBytes??c.outputBytes}});return[...e.filter(c=>!l.has(c.id)),...r]}function Qbe(e,t){if(e.length===0)return t;const n=new Map(t.map(l=>[l.id,l])),o=new Set(e.map(l=>l.id)),s=e.map(l=>{const r=n.get(l.id);return r?{...l,outputLines:r.outputLines,text:r.text}:l}),i=t.filter(l=>!o.has(l.id));return i.length===0?s:[...s,...i]}function e_e(e){const t=new Map,n=new Set;function o(i){const l=t.get(i);if(l!==void 0)return l;const r=(async()=>e(i))().finally(()=>{t.delete(i),n.delete(i)&&o(i)});return t.set(i,r),r}function s(i){if(t.has(i)){n.add(i);return}o(i)}return{run:o,request:s}}const t_e=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function n_e(e){return t_e.has(e.type)}const o_e=50,s_e=100,O7=32*1024,i_e={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,o_e)},cancelTask(e){clearTimeout(e)}};function l_e(e,t,n={}){const o=n.scheduler??i_e,s=Math.max(1,Math.floor(n.maxItemsPerSlice??s_e)),i=[];let l=0,r=null,a=null,c=0,u=!1;const d=()=>i.length-l,f=()=>{c+=1,r!==null&&(o.cancelFrame(r),r=null),a!==null&&(o.cancelTask(a),a=null)},p=()=>{l===i.length?(i.length=0,l=0):l>=1024&&(i.splice(0,l),l=0)};let h;const m=()=>{if(u||r!==null||a!==null||d()===0)return;const x=++c,y=()=>{x===c&&h()};r=o.requestFrame(y),a=o.requestTask(y)};h=()=>{f();let x=0;for(;!u&&x{if(!u){if(t(x)){const y=i.length>l?i.at(-1):void 0,w=y===void 0?void 0:n.coalesce?.(y,x);w===void 0?i.push(x):i[i.length-1]=w,m();return}if(d()===0){e(x);return}i.push(x),h()}});return k.flush=()=>{if(!u){for(f();!u&&l{if(u||d()===0)return;let y=l;for(let w=l;w{u||(u=!0,f(),i.length=0,l=0)},k}function H7(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function r_e(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=H7(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=O7)return[e];const s=[];let i=0;for(;ii&&/[\uD800-\uDBFF]/u.test(o.value[l-1])&&/[\uDC00-\uDFFF]/u.test(o.value[l])&&(l-=1);const r=o.value.slice(i,l);s.push({appEvent:{...t,delta:o.kind==="text"?{text:r}:{thinking:r}},meta:{...e.meta,stream:{...n,offset:n.offset+i}}}),i=l}return s}function a_e(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=H7(e.appEvent),i=H7(t.appEvent);if(n===void 0||o===void 0||s===void 0||i===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==o.turnId||n.kind!==o.kind||s.kind!==i.kind||n.kind!==s.kind||o.kind!==i.kind||o.offset!==n.offset+s.value.length||s.value.length+i.value.length>O7)return;const l=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:l}:{thinking:l}},meta:{...t.meta,stream:{...n}}}}const QN=[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],ez=new Set(["blue","mono"]),tz=new Set(["light","dark","system"]),nz=14,c_e=12,u_e=20,d_e={small:12,medium:14,large:16,xlarge:18};function f_e(){const e=ls(dn.accent);return e&&ez.has(e)?e:"blue"}function p_e(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.accent=e)}function h_e(){const e=ls(dn.colorScheme);return e&&tz.has(e)?e:"system"}function m_e(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?"#121212":e==="light"?"#ffffff":null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?"#121212":"#ffffff";o.setAttribute("content",n??i)})}function k9(e){return Number.isFinite(e)?Math.min(u_e,Math.max(c_e,Math.round(e))):nz}function b9(e){const t=k9(e);return t<=13?"small":t<=15?"medium":t<=17?"large":"xlarge"}function oz(e){return d_e[e]}function g_e(){const e=ls(dn.uiFontSize);return e===null?nz:k9(Number(e))}function v_e(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=b9(e))}const _9=V(h_e()),x9=V(f_e()),S9=V(g_e());Ke(_9,m_e,{immediate:!0});Ke(x9,p_e,{immediate:!0});Ke(S9,v_e,{immediate:!0});function y_e(e){tz.has(e)&&(_9.value=e,Es(dn.colorScheme,e))}function w_e(e){ez.has(e)&&(x9.value=e,Es(dn.accent,e))}function k_e(e){const t=k9(e);S9.value=t,Es(dn.uiFontSize,String(t))}const b_e=600,__e=250,a6=250,x_e=1e3,S_e=160,J5=V(!1);let k0=[],A0=null,Q5=-a6;function C_e(){k0=[],Q5=-a6,J5.value=!1,A0!==null&&(clearTimeout(A0),A0=null)}function M_e(){J5.value=!0,A0!==null&&clearTimeout(A0),A0=setTimeout(()=>{A0=null,k0=[],Q5=-a6,J5.value=!1},x_e)}function A_e(e){if(e<=0)return;const t=Date.now();k0.push({time:t,chars:e});const n=t-b_e;if(k0=k0.filter(r=>r.time>=n),t-Q5r+a.chars,0)/s*1e3>=S_e&&M_e()}function C9(){return{colorScheme:_9,accent:x9,uiFontSize:S9,fastMoon:J5,setColorScheme:y_e,setAccent:w_e,setUiFontSize:k_e,resetFastMoon:C_e,recordMoonDelta:A_e}}function T_e(e,t,n){return e==="idle"&&!t&&!n}function M9(e,t){const n=ls(e);return n===null?t:n==="1"}const A9=V(M9(dn.notifyOnComplete,!0)),T9=V(M9(dn.notifyOnQuestion,!1)),E9=V(M9(dn.notifyOnApproval,!1)),I9=V(typeof Notification<"u"?Notification.permission:"denied"),E_e="/favicon.ico";async function L9(e,t,n){if(!n){e.value=!1,Es(t,"0");return}if(typeof Notification>"u")return;let o=Notification.permission;if(o==="default")try{o=await Notification.requestPermission()}catch{}I9.value=o,o==="granted"&&(e.value=!0,Es(t,"1"))}function I_e(e){return L9(A9,dn.notifyOnComplete,e)}function L_e(e){return L9(T9,dn.notifyOnQuestion,e)}function $_e(e){return L9(E9,dn.notifyOnApproval,e)}function $9(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function N_e(e){return{title:Mo.global.t("settings.notifyTitle"),body:$9(e,Mo.global.t("settings.notifyFallback"))}}function z_e(e,t){return{title:Mo.global.t("settings.notifyQuestionTitle"),body:$9(t,e,Mo.global.t("settings.notifyQuestionFallback"))}}function B_e(e,t){return{title:Mo.global.t("settings.notifyApprovalTitle"),body:$9(t,e,Mo.global.t("settings.notifyApprovalFallback"))}}function N9(e,t,n,o){if(!e||typeof Notification>"u")return;const s=Notification.permission;if(s!=="denied"){if(s==="default"){Notification.requestPermission().then(i=>{I9.value=i,i==="granted"&&UC(t,n,o)});return}UC(t,n,o)}}function UC(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:E_e});o.onclick=()=>{try{window.focus()}catch{}e.onClick(),o.close()}}catch{}}function R_e(e,t){N9(A9.value,t,N_e(t.sessionTitle),`pythinker-complete-${e}-${t.promptId??Date.now()}`)}function P_e(e){N9(T9.value,e,z_e(e.sessionTitle,e.questionPreview),`pythinker-question-${e.questionId}`)}function F_e(e){N9(E9.value,e,B_e(e.sessionTitle,e.toolName),`pythinker-approval-${e.approvalId}`)}function j_e(){return{notifyOnComplete:A9,notifyOnQuestion:T9,notifyOnApproval:E9,notifyPermission:I9,setNotifyOnComplete:I_e,setNotifyOnQuestion:L_e,setNotifyOnApproval:$_e,maybeNotifyCompletion:R_e,maybeNotifyQuestion:P_e,maybeNotifyApproval:F_e}}function O_e(){return ls(dn.soundOnComplete)==="1"}const Wu=V(O_e());function H_e(){if(typeof window>"u")return;const e=window;return window.AudioContext??e.webkitAudioContext}let Um=null;function sz(){const e=H_e();if(!e)return null;if(Um===null)try{Um=new e}catch{return null}return Um}function iz(){if(!Wu.value)return;const e=sz();e!==null&&e.state==="suspended"&&e.resume().then(()=>{ia("sound: audio context resumed",{state:e.state})},t=>{ia("sound: audio context resume rejected",{error:String(t)})})}let ZC=!1;function D_e(){if(ZC||typeof window>"u")return;ZC=!0;const e=()=>{iz()};window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("keydown",e,{capture:!0})}D_e();function V_e(e){Wu.value=e,Es(dn.soundOnComplete,e?"1":"0"),e&&iz()}function KC(e,t,n,o,s){const i=e.createOscillator(),l=e.createGain();i.type="sine",i.frequency.value=t,i.connect(l),l.connect(e.destination);const r=e.currentTime+n;l.gain.setValueAtTime(1e-4,r),l.gain.exponentialRampToValueAtTime(s,r+.01),l.gain.exponentialRampToValueAtTime(1e-4,r+o),i.start(r),i.stop(r+o+.02)}function z9(){const e=sz();if(e===null){ia("sound: skipped, AudioContext unavailable");return}if(e.state!=="running"){ia("sound: skipped, context not running",{state:e.state}),e.state==="suspended"&&e.resume().then(()=>{ia("sound: context resumed for next time",{state:e.state})},t=>{ia("sound: resume rejected",{error:String(t)})});return}try{KC(e,880,0,.16,.18),KC(e,1320,.1,.22,.16),ia("sound: chime scheduled",{state:e.state})}catch(t){ia("sound: failed to play",{error:String(t)})}}function W_e(){Wu.value&&z9()}function q_e(){Wu.value&&z9()}function U_e(){Wu.value&&z9()}function Z_e(){return{soundOnComplete:Wu,setSoundOnComplete:V_e,maybePlayCompletionSound:W_e,maybePlayQuestionSound:q_e,maybePlayApprovalSound:U_e}}const K_e=1e3,G_e=4096,GC=32*1024;function Y_e(e,t){return e.length===t.length&&e.every((n,o)=>Object.is(n,t[o]))}function lz(e,t){const n=e,o=t,s=new Set([...Object.keys(n),...Object.keys(o)]);for(const i of s){const l=n[i],r=o[i];if(i==="outputLines"&&Array.isArray(l)&&Array.isArray(r)){if(!Y_e(l,r))return!1}else if(i==="routing"&&l&&r){if(!lz(l,r))return!1}else if(!Object.is(l,r))return!1}return!0}function X_e(e,t){const n=new Map(t.map(s=>[s.id,s])),o=e.map(s=>{const i=n.get(s.id);return i&&lz(s,i)?i:s});return o.length===t.length&&o.every((s,i)=>s===t[i])?t:o}function J_e(e,t){const n=new Map(t.map(o=>[o.id,o]));return e.map(o=>{const s=n.get(o.id);return{...o,outputLines:s?.outputLines,text:s?.text,outputPreview:o.outputPreview??s?.outputPreview,outputBytes:o.outputBytes??s?.outputBytes}})}function YC(e){return e.status!=="running"}function Q_e(e,t){let n=null,o=null,s=null,i=null,l=null,r,a;const c=new Set,u=V(0);function d(T){a!==T&&(a=T,c.clear())}function f(T,$){const C=e.tasksBySession[T]??[],j=Jbe(J_e($,C),C),H=X_e(j,C);H!==C&&(e.tasksBySession={...e.tasksBySession,[T]:H})}function p(T){for(const $ of T)YC($)&&c.add($.id)}function h(T){return T.some($=>YC($)&&!c.has($.id))}async function m(T){if(e.activeSessionId!==T)return;d(T),l?.abort();const $=new AbortController;l=$;try{const C=await Ct().listTasks(T,{withOutput:!0,outputBytes:GC,outputStatus:"all",signal:$.signal});if($.signal.aborted||e.activeSessionId!==T)return;p(C),f(T,C)}catch{return}finally{l===$&&(l=null)}}async function k(T,$){try{const C=Ct();let j=await C.listTasks(T,{withOutput:!0,outputBytes:G_e,outputStatus:"running",signal:$});if($.aborted||e.activeSessionId!==T)return;if(h(j)){if(j=await C.listTasks(T,{withOutput:!0,outputBytes:GC,outputStatus:"all",signal:$}),$.aborted||e.activeSessionId!==T)return;p(j)}f(T,j)}catch{return}}function x(T){return(e.tasksBySession[T]??[]).some($=>$.status==="running")}function y(T,$){n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,w(T)},$)}async function w(T){if(r!==T||e.activeSessionId!==T||!x(T)||typeof document<"u"&&document.visibilityState==="hidden")return;const $=new AbortController;i=$,await k(T,$.signal),i===$&&(i=null),!$.signal.aborted&&r===T&&e.activeSessionId===T&&x(T)&&y(T,K_e)}function _(){document.visibilityState!=="visible"||r===void 0||n!==null||i!==null||w(r)}typeof document<"u"&&document.addEventListener("visibilitychange",_);function A(){n!==null&&(clearTimeout(n),n=null),i?.abort(),i=null,r=void 0}function P(T){r!==T&&(A(),d(T),r=T,w(T))}const z=Ke(()=>t.value.some(T=>T.status==="running"),T=>{T&&s===null?s=setInterval(()=>{u.value=(u.value+1)%Number.MAX_SAFE_INTEGER},1e3):!T&&s!==null&&(clearInterval(s),s=null)},{immediate:!0}),L=Ke([()=>e.activeSessionId,()=>{const T=e.activeSessionId;return T===void 0?!1:x(T)}],([T,$],[C,j])=>{if(o!==null&&(clearTimeout(o),o=null),T!==C&&(l?.abort(),l=null,d(T)),T!==void 0&&$){P(T);return}if(A(),T===void 0||!j)return;const H=e.tasksBySession[T]??[];h(H)&&(o=setTimeout(()=>{o=null,e.activeSessionId===T&&!x(T)&&m(T)},1500))},{immediate:!0});function E(){typeof document<"u"&&document.removeEventListener("visibilitychange",_),z(),L(),A(),l?.abort(),l=null,o!==null&&clearTimeout(o),o=null,s!==null&&clearInterval(s),s=null,c.clear()}return{taskClock:B(()=>u.value),loadTasksForSession:m,dispose:E}}function exe(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function txe(e){const t=[];if(!e)return t;let n=0,o=0,s=!1;for(const i of e.split(` -`)){if(i.startsWith("diff --git")){s=!1;continue}if(!s&&exe(i))continue;if(i.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(i);a&&(n=Number.parseInt(a[1],10),o=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:i});continue}if(!s||i.startsWith("\\"))continue;const l=i.charAt(0),r=i.slice(1);l==="+"?(t.push({type:"add",text:r,newNo:o}),o+=1):l==="-"?(t.push({type:"del",text:r,oldNo:n}),n+=1):l===" "&&(t.push({type:"context",text:r,oldNo:n,newNo:o}),n+=1,o+=1)}return t}const D7="/sessions/";function XC(e){const{pathname:t}=e;if(!t.startsWith(D7))return;const n=t.slice(D7.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function nxe(e){return e===void 0||e.length===0?"/":`${D7}${encodeURIComponent(e)}`}const oxe=50,f0=5,sxe=40402,ixe=40410,lxe=40902,rxe=2e3;function Zm(e){return ol(e)&&e.code===lxe}const axe=40904;function JC(e){return ol(e)&&e.code===axe}const c0=ds({}),o4=ds({}),Km=ds({}),Gm=ds({}),br=ds(new Set),c6=new Map,W0=new Map,ep=new Map;let cxe=0;const p0=new Map,uxe=3;let QC=0;function dxe(){return QC+=1,`${Date.now().toString(36)}-${QC}`}function fxe(e){return{generation:c6.get(e)??0,pending:(W0.get(e)?.size??0)>0}}function V7(e){const t=++cxe;c6.set(e,t);const n=W0.get(e)??new Set;return n.add(t),W0.set(e,n),t}function W7(e,t){const n=W0.get(e);if(n===void 0||(n.delete(t),n.size>0))return;W0.delete(e);const o=ep.get(e);ep.delete(e),o?.()}function pxe(e){c6.delete(e),W0.delete(e),ep.delete(e),p0.delete(e)}function hxe(e,t){return!t.pending&&t.generation===(c6.get(e)??0)}function mxe(e,t){if((W0.get(e)?.size??0)===0){t();return}ep.set(e,t)}function gxe(e,t){const{t:n}=Mo.global,{confirm:o}=z1(),{taskPoller:s,sideChat:i,modelProvider:l,pushOperationFailure:r,activity:a,sessionsKnownEmpty:c,setSessions:u,updateSession:d,upsertSessionFront:f,appendSession:p,forgetSession:h,setActiveSessionId:m,updateSessionMessages:k,nextOptimisticMsgId:x,getEventConn:y,syncSessionFromSnapshot:w,reopenSession:_,hasLoadedMessages:A,refreshSessionStatus:P,refreshSessionGoal:z,persistSessionProfile:L,mergedWorkspaces:E,workspacesView:T,status:$,workspaceIdForSession:C,seedPermissionFromDaemonDefault:j,savePlanModeToStorage:H,saveDynamicWorkflowModeToStorage:D,saveGoalModeToStorage:M,draftModes:R,saveUnread:O,saveActiveWorkspaceToStorage:U,saveHiddenWorkspacesToStorage:Z,goalErrorMessage:q,resetFastMoon:te,initialized:ee,connectIssue:J,selectedDiffPath:se,fileDiffLines:Q,fileDiffLoading:me}=t;let xe=!1,Ye=0;function at(){const ne=e.config?.defaultPermissionMode;return ne==="auto"||ne==="yolo"||ne==="manual"?ne:"manual"}function X(ne){return e.permissionBySession[ne]??at()}async function oe(ne){if(e.messagesLoadingMoreBySession[ne])return;const ke=e.messagesBySession[ne];if(!ke||ke.length===0)return;const Te=ke[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!1};try{const Ne=await Ct().listMessages(ne,{beforeId:Te,pageSize:oxe}),Qe=[...Ne.items].toReversed();k(ne,ht=>[...Qe,...ht]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[ne]:Ne.hasMore}}catch(Ne){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!0},r("loadOlderMessages",Ne,{sessionId:ne})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!1}}}function F(ne){s.loadTasksForSession(ne),ye(ne),P(ne),z(ne),Object.prototype.hasOwnProperty.call(l.skillsBySession.value,ne)||l.loadSkillsForSession(ne)}async function K(ne){const ke=e.activeSessionId;if(ke){se.value=ne,Q.value=[],me.value=!0;try{const Ne=await Ct().getFileDiff(ke,ne);if(se.value!==ne)return;Q.value=txe(Ne.diff)}catch(Te){se.value===ne&&(Q.value=[]),console.warn("[loadFileDiff] diff unavailable for",ne,Te)}finally{se.value===ne&&(me.value=!1)}}}function he(){se.value=null,Q.value=[],me.value=!1}async function ye(ne){try{const Te=await Ct().getGitStatus(ne);e.gitStatusBySession={...e.gitStatusBySession,[ne]:Te}}catch{}}async function ve(){try{const ke=await Ct().getAuth();return e.authReady=ke.ready,e.defaultModel=ke.defaultModel,J.value=null,"proceed"}catch(ne){return ol(ne)&&(ne.code===401||ne.code===jN)?(J.value=null,"server-auth-required"):(J.value=(ne instanceof Error?ne.message:String(ne)).slice(0,140),"retry")}}async function ie(){let ne=!0;for(;;){const ke=await ve();if(ke!=="retry")return ke;ne&&(J.value=null,ne=!1),await new Promise(Te=>{setTimeout(Te,rxe)})}}async function de(){try{e.subagentModelPolicy=await Ct().getSubagentModelPolicy()}catch{e.subagentModelPolicy=null}}async function be(ne){e.subagentModelPolicySaving=!0;try{return e.subagentModelPolicy=await ne(e.subagentModelPolicy?.resourceVersion),!0}catch(ke){return ke instanceof R$?(e.subagentModelPolicy=ke.current,r("saveSubagentModelPolicy",ke,{message:ke.message}),!1):(r("saveSubagentModelPolicy",ke),!1)}finally{e.subagentModelPolicySaving=!1}}function Se(ne){return be(ke=>Ct().setSubagentModelPolicy(ne,ke))}function je(){return be(ne=>Ct().clearSubagentModelPolicy(ne))}async function et(){await de();try{const ne=Ct();e.config=await ne.getConfig(),j()}catch{}}function le(ne){ne!=="manual"&&ne!=="auto"&&ne!=="yolo"||e.activeSessionId||(e.permission=ne)}function fe(ne,ke){if(ke===ne)return;l.draftModel.value=null;const Te=e.activeSessionId;if(!Te)return;const Ne=e.sessions.find(Qe=>Qe.id===Te);Ne===void 0||Ne.messageCount>0||Ne.busy||e.inFlightBySession[Te]||!Ne.model||Ne.model.length===0||Ne.model!==ne||(d(Te,Qe=>({...Qe,model:ke})),L({model:ke},Te))}async function ge(ne){try{const ke=Ct(),Te=e.defaultModel,Ne=await ke.setConfig(ne);e.config=Ne,e.defaultModel=Ne.defaultModel??null;const Qe=Ne.defaultModel;return ne.defaultPermissionMode!==void 0&&le(Ne.defaultPermissionMode??ne.defaultPermissionMode),ne.defaultModel!==void 0&&Qe!==null&&Qe!==void 0&&Qe.length>0&&fe(Te,Qe),!0}catch(ke){return r("setConfig",ke),!1}}const Oe=100,Fe=30,pt=720*60*1e3;async function kt(){const ne=Ct(),ke=[];let Te,Ne;for(;;){let Qe;try{Qe=await ne.listSessions({pageSize:Oe,beforeId:Te,excludeEmpty:!0})}catch(ht){if(ke.length===0)throw ht;Ne=ht;break}if(ke.push(...Qe.items),!Qe.hasMore||Qe.items.length===0)break;Te=Qe.items.at(-1).id}return{sessions:ke,error:Ne}}function qt(ne){const ke=new Map(e.sessions.map(Te=>[Te.id,Te.usage]));u(ne.map(Te=>{const Ne=ke.get(Te.id);return Ne!==void 0&&T7(Te.usage)&&!T7(Ne)?{...Te,usage:Ne}:Te}))}function nn(ne){const ke=[...ne],Te=new Set(ke.map(Ne=>Ne.id));for(const Ne of e.sessions)Te.has(Ne.id)||(ke.push(Ne),Te.add(Ne.id));return ke.sort((Ne,Qe)=>new Date(Qe.updatedAt).getTime()-new Date(Ne.updatedAt).getTime()),ke}async function Jt(ne){const ke=Ct(),Te=[],Ne=Date.now(),Qe=Wt=>Ne-new Date(Wt.updatedAt).getTime();let ht,jt=!1,Zt=!0,Vt;for(;;){let Wt;try{Wt=await ke.listSessions({workspaceId:ne,pageSize:f0,beforeId:ht,excludeEmpty:!0})}catch(Ht){if(Zt)throw Ht;Vt=Ht,jt=!0;break}if(jt=Wt.hasMore,Wt.items.length===0)break;const on=Wt.items.at(-1),Vn=Qe(on)>=pt;if(!Zt&&Vn){const Ht=Wt.items.findIndex(zn=>Qe(zn)>=pt),Tn=Ht>=0?Ht+1:Wt.items.length;Te.push(...Wt.items.slice(0,Tn)),jt=Wt.hasMore||TnJt(Ht.id))),Te=[],Ne=new Set,Qe=new Map,ht=new Set;let jt;for(let Ht=0;Htht.has(Ht.id)).map(Ht=>Ht.root)),Vt=new Set(ne.map(Ht=>Ht.id));for(const Ht of e.sessions)!(Ht.workspaceId!==void 0&&Vt.has(Ht.workspaceId)?ht.has(Ht.workspaceId):Zt.has(Ht.cwd)||ht.has(C(Ht)))||Ne.has(Ht.id)||(Te.push(Ht),Ne.add(Ht.id));const Wt={},on={},Vn={};for(const{id:Ht}of ne){const Tn=Qe.get(Ht);if(Tn===void 0){const zn=e.sessionsHasMoreByWorkspace[Ht],Ns=e.sessionsCursorByWorkspace[Ht],rs=e.sessionsInitialCountByWorkspace[Ht];zn!==void 0&&(Wt[Ht]=zn),Ns!==void 0&&(on[Ht]=Ns),rs!==void 0&&(Vn[Ht]=rs);continue}Wt[Ht]=Tn.hasMore,on[Ht]=Tn.items.length>0?Tn.items.at(-1).id:void 0,Vn[Ht]=Math.max(Tn.items.length,f0)}return e.sessionsHasMoreByWorkspace=Wt,e.sessionsCursorByWorkspace=on,e.sessionsInitialCountByWorkspace=Vn,e.sessionsFullyLoaded=!1,Te.sort((Ht,Tn)=>new Date(Tn.updatedAt).getTime()-new Date(Ht.updatedAt).getTime()),ht.size>0&&r("load",jt),Te}function Dn(){const ne=++Ye;if(e.backend!=="v2")return;const ke={groupPageSize:f0,hasPrompt:!0};return{firstPage:Promise.resolve().then(()=>Ct().listSessionGroupsV2(ke)).then(Te=>({page:Te}),Te=>({error:Te})),input:ke,serial:ne}}function xn(ne,ke){const Te=new Map(ne.map(on=>[on.workspace.id,on])),Ne=new Map;for(const on of ne)on.workspace.cwd!==null&&Ne.set(sl(on.workspace.cwd),on);const Qe=[],ht=new Set,jt={},Zt={},Vt={},Wt=[];for(const on of e.workspaces){const Vn=Te.get(on.id)??Ne.get(sl(on.root));if(Vn===void 0){jt[on.id]=!ke,Zt[on.id]=void 0,Vt[on.id]=f0;continue}const Ht=[];for(const Tn of Vn.sessions){if(!Tn.lastPrompt||ht.has(Tn.id))continue;const zn={...Tn,cwd:Tn.cwd||on.root,workspaceId:on.id};Qe.push(zn),Ht.push(zn),ht.add(zn.id),(zn.busy||zn.pendingInteraction==="approval"||zn.pendingInteraction==="question")&&Wt.push(zn.id)}jt[on.id]=Vn.sessions.lengthnew Date(Vn.updatedAt).getTime()-new Date(on.updatedAt).getTime()),{loaded:Qe,hasMore:jt,cursors:Zt,counts:Vt,liveIds:Wt}}function $n(ne,ke){if(ke===void 0){e.sessionsHasMoreByWorkspace=ne.hasMore,e.sessionsCursorByWorkspace=ne.cursors,e.sessionsInitialCountByWorkspace=ne.counts;return}const Te={...e.sessionsHasMoreByWorkspace},Ne={...e.sessionsCursorByWorkspace},Qe={...e.sessionsInitialCountByWorkspace};for(const ht of e.workspaces)e.sessionsCursorByWorkspace[ht.id]===ke[ht.id]&&(Te[ht.id]=ne.hasMore[ht.id]??!1,Ne[ht.id]=ne.cursors[ht.id],Qe[ht.id]=ne.counts[ht.id]??f0);e.sessionsHasMoreByWorkspace=Te,e.sessionsCursorByWorkspace=Ne,e.sessionsInitialCountByWorkspace=Qe}async function Hn(ne,ke,Te){const Ne=[...ne.groups];let Qe=ne.nextPageToken;for(;Qe!==null;){if(ke.serial!==Ye)return;let Vt;try{Vt=await Ct().listSessionGroupsV2({...ke.input,pageToken:Qe})}catch(Wt){r("load",Wt);return}Ne.push(...Vt.groups),Qe=Vt.nextPageToken}if(ke.serial!==Ye)return;const ht=xn(Ne,!0),jt=new Set(ht.loaded.map(Vt=>Vt.id)),Zt=[...ht.loaded,...e.sessions.filter(Vt=>!jt.has(Vt.id))].sort((Vt,Wt)=>new Date(Wt.updatedAt).getTime()-new Date(Vt.updatedAt).getTime());if(qt(Zt),e.sessionsFullyLoaded){const Vt={};for(const Wt of e.workspaces)Vt[Wt.id]=!1;e.sessionsHasMoreByWorkspace=Vt}else $n(ht,Te.cursors);await Promise.allSettled(ht.liveIds.map(Vt=>P(Vt)))}async function bn(ne){if(e.workspaces.length===0){const ht=await kn();return ht===void 0?void 0:{sessions:ht,liveIds:[]}}const{page:ke,error:Te}=await ne.firstPage;if(ke===void 0){r("load",Te);return}const Ne=ke.nextPageToken===null,Qe=xn(ke.groups,Ne);return $n(Qe),e.sessionsFullyLoaded=!1,{sessions:Qe.loaded,liveIds:Qe.liveIds,finishInBackground:Ne?void 0:()=>{Hn(ke,ne,Qe)}}}async function Wn(ne){if(e.sessionsLoadingMoreByWorkspace[ne]||e.sessionsHasMoreByWorkspace[ne]===!1)return;const ke=e.sessionsCursorByWorkspace[ne];if(ke!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!0};try{const Te=await Ct().listSessions({workspaceId:ne,pageSize:Fe,beforeId:ke,excludeEmpty:!0}),Ne=new Set(e.sessions.map(ht=>ht.id)),Qe=Te.items.filter(ht=>!Ne.has(ht.id));Qe.length>0&&u([...e.sessions,...Qe]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[ne]:Te.items.length>0?Te.items.at(-1).id:ke},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[ne]:Te.hasMore}}catch(Te){r("loadMoreSessions",Te)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!1}}}}async function Pn(){if(e.sessionsFullyLoaded)return;const ne=await kt().catch(Ne=>(console.warn("[pythinker-web] loadAllSessions failed; search covers only loaded sessions",Ne),null));if(ne===null)return;const ke=ne.error===void 0?ne.sessions:nn(ne.sessions);if(qt(ke),e.sessionsFullyLoaded=ne.error===void 0,ne.error!==void 0)return;const Te={};for(const Ne of e.workspaces)Te[Ne.id]=!1;e.sessionsHasMoreByWorkspace=Te}async function Mn(){const ne=await Ct().getMeta().catch(()=>null);ne!==null&&(e.serverVersion=ne.serverVersion,e.availableOpenInApps=ne.openInApps,e.dangerousBypassAuth=ne.dangerousBypassAuth,e.backend=ne.backend,e.experimentalFlagStates=ne.experimentalFlagStates,e.serverCapabilities=ne.capabilities)}async function Nn(){const ne=Date.now();let ke="accepted";_s("app:load:start"),e.loading=!0;const Te=!ee.value;let Ne=!0;try{if(Te&&await ie()==="server-auth-required"){Ne=!1,ke="auth-required";return}const Qe=Ct();await Promise.all([Qe.getHealth().catch(()=>null),Mn(),l.loadModels()]),Te||await ve(),await et();const ht=Dn();await An();const jt=ht===void 0?void 0:await bn(ht),Zt=ht===void 0?await kn():jt?.sessions,Vt=Zt??e.sessions;Zt!==void 0&&qt(Zt),jt?.finishInBackground?.(),jt!==void 0&&await Promise.allSettled(jt.liveIds.map(Tn=>P(Tn)));const Wt=Vt[0],on=e.activeWorkspaceId;!(on!==null&&E.value.some(Tn=>Tn.id===on))&&Wt&&Fn(C(Wt)),Ut();const Ht=typeof window<"u"?XC(window.location):void 0;!e.activeSessionId&&Ht!==void 0&&(e.sessions.some(zn=>zn.id===Ht)||await dt(Ht))&&await en(Ht,{urlMode:"replace"}),!e.activeSessionId&&Vt.length>0&&await en(Vt[0].id,{urlMode:"replace"})}catch(Qe){ke="failed",r("load",Qe)}finally{e.loading=!1,Ne&&(ee.value=!0),_s("app:load:complete",{status:ke,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-ne})}}async function An(){try{const ne=Ct(),[ke,Te]=await Promise.all([ne.listWorkspaces().catch(()=>[]),ne.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=Qn(ke),e.fsHome=Te.home||null,e.recentRoots=Te.recentRoots}catch{}}function Qn(ne){const ke=g3();return Object.keys(ke).length===0?ne:ne.map(Te=>{const Ne=ke[Te.root];return Ne!==void 0?{...Te,name:Ne}:Te})}function Fn(ne){e.activeWorkspaceId=ne,U(ne)}function Qt(ne){Fn(ne);const ke=e.sessions.filter(Te=>C(Te)===ne);if(ke.length>0){const Te=ke[0];Te&&Te.id!==e.activeSessionId&&en(Te.id)}else m(void 0),ot(void 0,"push")}function uo(ne){const ke=g3()[ne.root],Te=ke!==void 0?{...ne,name:ke}:ne,Ne=sl(Te.root);e.hiddenWorkspaceRoots.some(jt=>sl(jt)===Ne)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(jt=>sl(jt)!==Ne),Z(e.hiddenWorkspaceRoots));const Qe=e.workspaces.findIndex(jt=>jt.id===Te.id||jt.root===Te.root);if(Qe===-1){e.workspaces=[Te,...e.workspaces];return}const ht=[...e.workspaces];ht[Qe]=Te,e.workspaces=ht}function Zn(ne){if(ne.type==="workspaceCreated"||ne.type==="workspaceUpdated"){uo(ne.workspace);return}const ke=e.workspaces.find(Ne=>Ne.id===ne.workspaceId)?.root??ne.root;if(ke&&!e.hiddenWorkspaceRoots.includes(ke)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,ke],Z(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Ne=>Ne.id!==ne.workspaceId&&Ne.root!==ke),e.activeWorkspaceId===ne.workspaceId||e.activeWorkspaceId===ke){const Ne=T.value[0]?.id??null;if(e.activeWorkspaceId=Ne,Ne)U(Ne);else try{y1(dn.activeWorkspace)}catch{}m(void 0),e.sessionLoading=!1,he(),ot(void 0,"replace")}}function Bo(){m(void 0),e.permission=at(),ot(void 0,"push")}function Un(ne){Fn(ne),Bo(),he()}async function hs(ne){const ke=E.value.find(Vn=>Vn.id===ne);if(!ke)return null;const Te=e.thinking,Ne=e.permission,Qe=Ct();let ht,jt=ke.root;try{const Vn=await Qe.addWorkspace({root:ke.root});ht=Vn.id,jt=Vn.root,uo(Vn)}catch{}const Zt=l.draftModel.value??void 0,Vt=await Qe.createSession({workspaceId:ht,cwd:jt,model:Zt});l.draftModel.value=null;const Wt=Zt!==void 0&&(!Vt.model||Vt.model.length===0)?{...Vt,model:Zt}:Vt;f(Wt),e.permissionBySession={...e.permissionBySession,[Vt.id]:Ne},Fn(Vt.workspaceId??ht??ne),await en(Vt.id);const on=Vt.id;return Te!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[on]:Te}),R.planMode&&(e.planModeBySession={...e.planModeBySession,[on]:!0},H()),R.dynamicWorkflowMode&&(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[on]:!0},D()),R.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[on]:!0},M()),R.planMode=!1,R.dynamicWorkflowMode=!1,R.goalMode=!1,on}async function Io(ne,ke,Te){if(!br.has(ne)){br.add(ne);try{const Ne=await hs(ne);if(!Ne)return;await tn(Ne,ke,Te)}catch(Ne){r("startSessionAndSendPrompt",Ne)}finally{br.delete(ne)}}}async function Rt(ne,ke,Te){if(!br.has(ne)){br.add(ne);try{const Ne=await hs(ne);if(!Ne)return;const Qe=e.planModeBySession[Ne]??!1,ht=e.dynamicWorkflowModeBySession[Ne]??!1,jt=e.sessions.find(Wt=>Wt.id===Ne),Zt=(jt?.model&&jt.model.length>0?jt.model:e.defaultModel)??void 0;if(!await L({model:Zt,planMode:Qe,dynamicWorkflowMode:ht,permissionMode:X(Ne)},Ne))return;await l.activateSkill(ke,Te,Ne)}catch(Ne){r("startSessionAndActivateSkill",Ne)}finally{br.delete(ne)}}}async function Jo(ne,ke){if(!br.has(ne)){br.add(ne);try{const Te=await hs(ne);if(!Te)return;await i.openSideChatOn(Te,ke)}catch(Te){r("startSessionAndOpenSideChat",Te)}finally{br.delete(ne)}}}async function Ls(ne){const ke=ne.trim();if(!ke)return!1;const Te=Ct();try{const Ne=await Te.addWorkspace({root:ke});return uo(Ne),Un(Ne.id),!0}catch(Ne){return console.warn("[pythinker-web] addWorkspaceByPath failed for",ke,Ne),!1}}async function $e(ne){try{return await Ct().browseFs(ne)}catch{return{path:"",parent:null,entries:[]}}}async function Ge(){try{return await Ct().getFsHome()}catch{return{home:"",recentRoots:[]}}}function ot(ne,ke){if(ke==="none"||typeof window>"u"||!window.history)return;const Te=nxe(ne);if(window.location.pathname!==Te)try{ke==="push"?window.history.pushState(null,"",Te):window.history.replaceState(null,"",Te)}catch{}}async function dt(ne){try{const ke=await Ct().getSession(ne);return e.sessions.some(Te=>Te.id===ke.id)||p(ke),!0}catch{return!1}}function Mt(){const ne=XC(window.location);if(ne===void 0){m(void 0);return}if(ne!==e.activeSessionId){if(e.sessions.some(ke=>ke.id===ne)){en(ne,{urlMode:"none"});return}(async()=>{if(await dt(ne)){await en(ne,{urlMode:"none"});return}const ke=e.sessions[0];ke?await en(ke.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))})()}}let Ft=!1;function Ut(){Ft||typeof window>"u"||(Ft=!0,window.addEventListener("popstate",Mt))}async function en(ne,ke){const Te=A(ne),Ne=!Te&&c.has(ne);c.delete(ne);try{ot(ne,ke?.urlMode??"push"),e.sessionLoading=!Te&&!Ne,m(ne),e.permission=X(ne),te(),e.unreadBySession[ne]&&(e.unreadBySession={...e.unreadBySession,[ne]:!1},O({[ne]:!1})),he();const Qe=e.sessions.find(ht=>ht.id===ne);if(Qe){const ht=C(Qe);e.activeWorkspaceId!==ht&&Fn(ht)}if(Te){if(await _(ne)==="not-found")return}else if(await w(ne)==="not-found")return;F(ne)}catch(Qe){r("selectSession",Qe,{sessionId:ne})}finally{e.activeSessionId===ne&&(e.sessionLoading=!1)}}async function tn(ne,ke,Te){const Ne=V7(ne);e.inFlightBySession={...e.inFlightBySession,[ne]:!0};const Qe=x();try{const ht=Ct(),jt=[];ke&&jt.push({type:"text",text:ke});for(const zn of Te??[])zn.kind==="video"?jt.push({type:"video",source:{kind:"file",fileId:zn.fileId}}):zn.kind==="file"?jt.push({type:"file",fileId:zn.fileId,name:zn.name??"",mediaType:zn.mediaType||"application/octet-stream",size:zn.size??0}):jt.push({type:"image",source:{kind:"file",fileId:zn.fileId}});if(jt.length===0)return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},"rejected";const Zt={id:Qe,sessionId:ne,role:"user",content:jt,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,zn=>[...zn,Zt]);const Vt=e.sessions.find(zn=>zn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=e.planModeBySession[ne]??!1,Vn=e.dynamicWorkflowModeBySession[ne]??!1,Ht=e.goalModeBySession[ne]??!1;if(Ht&&ke)try{await ht.updateSession(ne,{goalObjective:ke.trim()})}catch(zn){return r("createGoal",zn,{sessionId:ne}),e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,Ns=>Ns.some(rs=>rs.id===Qe)?Ns.filter(rs=>rs.id!==Qe):Ns),"rejected"}const Tn=await ht.submitPrompt(ne,{content:jt,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:on,dynamicWorkflowMode:Vn});return Ht&&(e.goalModeBySession={...e.goalModeBySession,[ne]:!1},M()),e.promptIdBySession={...e.promptIdBySession,[ne]:Tn.promptId},k(ne,zn=>{const Ns=zn.findIndex(_l=>_l.id===Qe);if(Ns===-1)return zn;const rs=[...zn];return rs[Ns]={...rs[Ns],promptId:rs[Ns].promptId??Tn.promptId},rs}),y()?.bindNextPromptId(ne,Tn.promptId),"ok"}catch(ht){return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,jt=>jt.some(Zt=>Zt.id===Qe)?jt.filter(Zt=>Zt.id!==Qe):jt),r("sendPrompt",ht,{sessionId:ne}),ol(ht)?"rejected":"uncertain"}finally{W7(ne,Ne)}}async function eo(ne,ke){const Te=e.activeSessionId;if(Te){if(a.value!=="idle"||e.inFlightBySession[Te]){bt(ne,ke);return}if((e.queuedBySession[Te]?.length??0)>0){bt(ne,ke),Lt(Te);return}await tn(Te,ne,ke)}}const Ro=new Map;function $s(ne,ke){const Te=(Ro.get(ne)??Promise.resolve()).catch(()=>{}).then(ke);return Ro.set(ne,Te),Te.finally(()=>{Ro.get(ne)===Te&&Ro.delete(ne)})}function Do(ne,ke){const Te=e.activeSessionId;return Te?$s(Te,()=>We(Te,ne,ke)):Promise.resolve()}async function We(ne,ke,Te){const Ne=e.queuedBySession[ne]??[],Qe=[],ht=[];for(const Wt of Ne){const on=Wt.text.trim();on&&Qe.push(on),Wt.attachments?.length&&ht.push(...Wt.attachments)}const jt=ke.trim();if(jt&&Qe.push(jt),Te?.length&&ht.push(...Te),Qe.length===0&&ht.length===0||(Ne.length>0&&(e.queuedBySession={...e.queuedBySession,[ne]:[]}),await qe(ne,Qe.join(` +`):e}let jm=null,hwe;function mwe(){return jm===null&&(jm=new Intl.Segmenter(hwe,{granularity:"word"})),jm}const gwe=/\p{Script=Arabic}/u,B1=/\p{M}/u,p9=/\p{Nd}/u;function LC(e){return gwe.test(e)}function $C(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Rr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if($C(s))return!0;t++;continue}}if($C(n))return!0}}return!1}function vwe(e){const t=Lf(e);return t!==null&&(h9.has(t)||V0.has(t))}const ywe=new Set([" "," ","⁠","\uFEFF"]),wwe=new Set(["-","‐","–","—"]);function kwe(e){const t=Lf(e);return t!==null&&ywe.has(t)}function bwe(e){const t=Lf(e);return t!==null&&wwe.has(t)}function DN(e,t){return kwe(e)?!1:t?!(vwe(e)||bwe(e)):!0}const h9=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),t6=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),m9=new Set(["'","’"]),V0=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),_we=new Set([":",".","،","؛"]),xwe=new Set(["၏"]),Swe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Cwe(e){if(g9(e))return!0;let t=!1;for(const n of e){if(V0.has(n)||o6(n)){t=!0;continue}if(!(t&&B1.test(n)))return!1}return t}function Mwe(e){for(const t of e)if(!h9.has(t)&&!V0.has(t))return!1;return e.length>0}function Awe(e){if(g9(e))return!0;for(const t of e)if(!t6.has(t)&&!m9.has(t)&&!B1.test(t)&&!o6(t))return!1;return e.length>0}function g9(e){let t=!1;for(const n of e)if(!(n==="\\"||B1.test(n))){if(t6.has(n)||V0.has(n)||m9.has(n)){t=!0;continue}return!1}return t}function n6(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function Lf(e){if(e.length===0)return null;const t=n6(e,e.length);return e.slice(t)}function Twe(e){for(const t of e)if(!B1.test(t))return t;return null}function Ewe(e){for(let t=e.length;t>0;){const n=n6(e,t),o=e.slice(n,t);if(!B1.test(o))return o;t=n}return null}const Iwe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Lwe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function o6(e){const t=e.codePointAt(0);return t!==void 0&&Lwe(t,Iwe)}function $we(e){const t=Ewe(e);return t!==null&&o6(t)}function Nwe(e){const t=Twe(e);return t!==null&&p9.test(t)}function zwe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(B1.test(o)){n--;continue}if(t6.has(o)||m9.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Bwe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function NC(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const l=n[o];if(i.length===l)return i;const r=s.repeat(l);return e[o]=r,r}function zC(e,t){return e&&t!==null&&_we.has(t)}function Rwe(e){const t=Lf(e);return t!==null&&xwe.has(t)}function Pwe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function j7(e){let t=e.length;for(;t>0;){const n=n6(e,t),o=e.slice(n,t);if(Swe.has(o))return!0;if(!V0.has(o))return!1;t=n}return!1}function Fwe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const jwe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function ar(e){return e.length===1?e[0]:e.join("")}function Owe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),ar(n)}function Hwe(e,t,n,o){if(!jwe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,l=[],r=n,a=!1,c=0;for(const u of e){const d=Fwe(u,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){l.push(u),c+=u.length;continue}i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),i=d,l=[u],r=n+c,a=f,c+=u.length}return i!==null&&s.push({text:ar(l),isWordLike:a,kind:i,start:r}),s}function O7(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Dwe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Vwe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:Dwe.test(n)&&t+1=e.len||O7(e.kinds[r]))continue;const a=[],c=e.starts[r];let u=r;for(;u0&&(t.push(ar(a)),n.push(!0),o.push("text"),s.push(c),i=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const Zwe=new Set([":","-","/","×",",",".","+","–","—"]),Kwe=/[\p{P}\p{S}\p{Co}]/u,Gwe=/\p{Emoji_Presentation}/u,Ywe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function Xwe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function VN(e){const t=e.charCodeAt(0);return t<128?Xwe(t):!Ywe.has(e)&&!Gwe.test(e)&&Kwe.test(e)}function BC(e){let t=!1;for(const n of e)if(!B1.test(n)){if(!VN(n))return!1;t=!0}return t}function Jwe(e){for(let t=e.length;t>0;){const n=n6(e,t),o=e.slice(n,t);if(B1.test(o)){t=n;continue}return VN(o)||o6(o)}return!1}function Qwe(e,t,n,o){const s=!t&&BC(e),i=!o&&BC(n),l=$we(e),r=(t||l)&&Jwe(e);return!s&&!i&&!r||Rr(e)||Rr(n)?!1:(t||s||l)&&(o||i)}function WN(e){for(const t of e)if(p9.test(t))return!0;return!1}function K5(e){if(e.length===0)return!1;for(const t of e)if(!(p9.test(t)||Zwe.has(t)))return!1;return!0}function eke(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(ar(c)),n.push(d),o.push("text"),s.push(e.starts[i]),i=u;continue}}t.push(l),n.push(a),o.push(r),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function nke(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let c=0;c0&&a[D]==="text"&&I&&f[D]&&h[D]||L&&s>0&&a[D]==="text"&&Mwe(z.text)&&f[D]||L&&s>0&&a[D]==="text"&&m[D]?M():L&&s>0&&a[D]==="text"&&z.isWordLike&&N&&k[D]?(M(),r[D]=!0):T!==null&&s>0&&a[D]==="text"&&u[D]===T?d[D]=(d[D]??1)+1:L&&!z.isWordLike&&s>0&&a[D]==="text"&&!f[D]&&(Cwe(z.text)||z.text==="-"&&r[D])?M():(i[s]=z.text,l[s]=[z.text],r[s]=z.isWordLike,a[s]=z.kind,c[s]=z.start,u[s]=T,d[s]=T===null?0:1,f[s]=I,p[s]=N,h[s]=F,m[s]=H,k[s]=zC(N,C),s++)}for(let P=0;Pnull);let y=-1;for(let P=s-1;P>=0;P--){const z=i[P];if(z.length!==0){if(a[P]==="text"&&!r[P]&&y>=0&&a[y]==="text"&&(Awe(z)||z==="-"&&Nwe(i[y]))){const L=x[y]??[];L.push(z),x[y]=L,c[y]=c[P],i[P]="";continue}y=P}}for(let P=0;P=0&&!DN(t.texts[f-1],n)&&d(f),r<0&&(r=f),a=a||Rr(p);continue}d(f),o.push(p),s.push(t.isWordLike[f]),i.push(h),l.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:l}}function ake(e,t,n="normal",o="normal"){const s=dwe(n),i=s.mode==="pre-wrap"?pwe(e):fwe(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const l=ike(i,t,s),r=o==="keep-all"?rke(i,l,t.breakKeepAllAfterPunctuation):l;return{normalized:i,chunks:lke(r,s),...r}}let $c=null;const RC=new Map;let Nc=null;const cke=96,uke=/\p{Emoji_Presentation}/u,dke=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Om=null;const PC=new Map;function v9(){if($c!==null)return $c;if(typeof OffscreenCanvas<"u")return $c=new OffscreenCanvas(1,1).getContext("2d"),$c;if(typeof document<"u")return $c=document.createElement("canvas").getContext("2d"),$c;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function fke(e){let t=RC.get(e);return t||(t=new Map,RC.set(e,t)),t}function s1(e,t){let n=t.get(e);return n===void 0&&(n={width:v9().measureText(e).width,containsCJK:Rr(e)},t.set(e,n)),n}function s6(){if(Nc!==null)return Nc;if(typeof navigator>"u")return Nc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Nc;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Nc={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Nc}function pke(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function qN(){return Om===null&&(Om=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Om}function hke(e){return uke.test(e)||e.includes("️")}function mke(e){return dke.test(e)}function gke(e,t){let n=PC.get(e);if(n!==void 0)return n;const o=v9();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const l=i.getBoundingClientRect().width;document.body.removeChild(i),s-l>.5&&(n=s-l)}return PC.set(e,n),n}function vke(e){let t=0;const n=qN();for(const o of n.segment(e))hke(o.segment)&&t++;return t}function yke(e,t){return t.emojiCount===void 0&&(t.emojiCount=vke(e)),t.emojiCount}function M0(e,t,n){return n===0?t.width:t.width-yke(e,t)*n}function wke(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=qN(),l=[];for(const u of i.segment(e))l.push(u.segment);if(l.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const u=[];for(const d of l){const f=s1(d,n);u.push(M0(d,f,o))}return t.breakableFitAdvances=u,t.breakableFitAdvances}if(s==="pair-context"||l.length>cke){const u=[];let d=null,f=0;for(const p of l){const h=s1(p,n),m=M0(p,h,o);if(d===null)u.push(m);else{const k=d+p,x=s1(k,n);u.push(M0(k,x,o)-f)}d=p,f=m}return t.breakableFitAdvances=u,t.breakableFitAdvances}const r=[];let a="",c=0;for(const u of l){a+=u;const d=s1(a,n),f=M0(a,d,o);r.push(f-c),c=f}return t.breakableFitAdvances=r,t.breakableFitAdvances}function kke(e,t){const n=v9();n.font=e;const o=fke(e),s=pke(e),i=t?gke(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function bke(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function UN(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function ZN(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function y9(e,t){return t===0?0:e+t}function Ske(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Cke(e,t,n,o,s){const i=t==="tab"?s+Ske(e,n):e.lineEndFitAdvances[n];return y9(o,i)}function FC(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return y9(o,s)}function jC(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return y9(o,i)}function Mke(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Ake(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function G5(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const l=e.kinds[i];if(!(l==="space"||l==="zero-width-break"||l==="hard-break")){if(l==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Eke(e,t,n,o,s,i){return t+Tke(e,n,o,s,i)}function Ike(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l}=e;if(o.length===0)return 0;const a=s6().lineFitEpsilon,c=t+a;let u=0,d=0,f=!1,p=0,h=0,m=0,k=0,x=-1,y=0;function w(){x=-1,y=0}function _(I=m,N=k,C=d){u++,n?.(C,p,h,I,N),d=0,f=!1,w()}function A(I,N){f=!0,p=I,h=0,m=I+1,k=0,d=N}function P(I,N,C){f=!0,p=I,h=N,m=I,k=N+1,d=C}function z(I,N){if(!f){A(I,N);return}d+=N,m=I+1,k=0}function L(I,N){const C=i[I],F=l[I]??null;let H=F===null?-1:G5(F,0,N+1),D=-1,M=0,R=N;for(;Rc){if(F!==null&&D>N){_(I,D,M),R=D,H=G5(F,H,R+1),D=-1,M=0;continue}_(),P(I,R,O)}else d+=O,m=I,k=R+1;const U=R+1;F!==null&&F[H]===U&&(D=U,M=d,H++),R++}f&&m===I&&k===C.length&&(m=I+1,k=0)}let T=0;for(;T=o.length));){const I=o[T],N=s[T],C=UN(N);if(!f){I>c&&i[T]!==null?L(T,0):A(T,I),C&&(x=T+1,y=d-I),T++;continue}if(d+I>c){if(C){z(T,I),_(T+1,0,d-I),T++;continue}if(x>=0){if(m>x||m===x&&k>0){_();continue}_(x,0,y);continue}if(I>c&&i[T]!==null){_(),L(T,0),T++;continue}_();continue}z(T,I),C&&(x=T+1,y=d-I),T++}return f&&_(),u}function Lke(e,t,n){if(e.simpleLineWalkFastPath)return Ike(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:l,discretionaryHyphenWidth:r,chunks:a}=e;if(o.length===0||a.length===0)return 0;const c=s6(),u=c.lineFitEpsilon,d=t+u;let f=0,p=0,h=!1,m=0,k=0,x=0,y=0,w=-1,_=0,A=0,P=null;function z(){w=-1,_=0,A=0,P=null}function L(){return P==="soft-hyphen"&&w===x&&y===0?A:p}function T(M=x,R=y,O){f++,n!==void 0&&n(Eke(e,O??L(),m,k,M,R),m,k,M,R),p=0,h=!1,z()}function I(M,R){h=!0,m=M,k=0,x=M+1,y=0,p=R}function N(M,R,O){h=!0,m=M,k=R,x=M,y=R+1,p=O}function C(M,R){if(!h){I(M,R);return}p+=R,x=M+1,y=0}function F(M,R,O,U,Z,q){if(!R)return;const te=FC(e,M,O,Z),ee=jC(e,M,O,Z,U);w=O+1,_=p-q+te,A=p-q+ee,P=M}function H(M,R){const O=i[M],U=l[M]??null;let Z=U===null?-1:G5(U,0,R+1),q=-1,te=0,ee=R;for(;eed){if(U!==null&&q>R){T(M,q,te),ee=q,Z=G5(U,Z,ee+1),q=-1,te=0;continue}T(),N(M,ee,J)}else p=me,x=M,y=ee+1}const se=ee+1;U!==null&&U[Z]===se&&(q=se,te=p,Z++),ee++}h&&x===M&&y===O.length&&(x=M+1,y=0)}function D(M){f++,n?.(0,M.startSegmentIndex,0,M.consumedEndSegmentIndex,0),z()}for(let M=0;M=R.endSegmentIndex));){const U=s[O],Z=UN(U),q=xke(e,h,O),te=U==="tab"?_ke(p+q,e.tabStopAdvance):o[O],ee=q+te,J=Cke(e,U,O,q,te);if(U==="soft-hyphen"){h&&(x=O+1,y=0,w=O+1,_=p+r,A=p+r,P=U),O++;continue}if(!h){J>d&&i[O]!==null?H(O,0):I(O,te),F(U,Z,O,te,q,ee),O++;continue}if(p+J>d){const Q=p+FC(e,U,O,q),me=p+jC(e,U,O,q,te);if(P==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&_<=d){T(w,0,A);continue}if(Z&&Q<=d){C(O,ee),T(O+1,0,me),O++;continue}if(w>=0&&_<=d){if(x>w||x===w&&y>0){T();continue}const xe=w;T(xe,0,A),O=xe;continue}if(J>d&&i[O]!==null){T(),H(O,0),O++;continue}T();continue}C(O,ee),F(U,Z,O,te,q,ee),O++}if(h){const U=w===R.consumedEndSegmentIndex?A:p;T(R.consumedEndSegmentIndex,0,U)}}return f}let Hm=null;function w9(){return Hm===null&&(Hm=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Hm}function $ke(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function Nke(e,t){const n=[];let o=[],s=0,i=!1,l=!1,r=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,l=!1,r=!1)}function c(d,f,p){o=[d],s=f,i=p,l=j7(d),r=t6.has(d)}function u(d,f){o.push(d),i=i||f;const p=j7(d);d.length===1&&V0.has(d)?l=l||p:l=p,r=!1}for(const d of w9().segment(e)){const f=d.segment,p=Rr(f);if(o.length===0){c(f,d.index,p);continue}if(r||h9.has(f)||V0.has(f)||t.carryCJKAfterClosingQuote&&p&&l){u(f,p);continue}if(!i&&!p){u(f,p);continue}a(),c(f,d.index,p)}return a(),n}function zke(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function l(a,c){const u=t[a].start,d=c=0&&!DN(t[a-1].text,n)&&r(a),s<0&&(s=a),i=i||Rr(c.text)}return r(t.length),o}function OC(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=w9();for(const s of o.segment(e))n++;return n}function Bke(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Rke(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of w9().segment(e))n++,Bke(o.segment)&&t.push(n);return t.length===0?null:t}function Pke(e,t,n){return t>1?e+(t-1)*n:e}function Fke(e,t,n,o,s){const i=s6(),{cache:l,emojiCorrection:r}=kke(t,mke(e.normalized)),a=M0("-",s1("-",l),r)+(s===0?0:s*2),u=M0(" ",s1(" ",l),r)*8,d=s!==0;if(e.len===0)return $ke();const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const x=n?[]:null,y=[],w=[],_=[],A=n?[]:null,P=Array.from({length:e.len});function z(N,C,F,H,D,M,R,O,U){D!=="text"&&D!=="space"&&D!=="zero-width-break"&&(k=!1),f.push(C),p.push(F),h.push(H),m.push(D),x?.push(M),y.push(R),w.push(O),d&&_.push(U),A!==null&&A.push(N)}function L(N,C,F,H,D){const M=s1(N,l),R=d?OC(N,C):0,O=Pke(M0(N,M,r),R,s),U=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:O,Z=U===0?0:U+(R>0?s:0),q=C==="space"||C==="zero-width-break"?0:O;if(D&&H&&N.length>1){let te="sum-graphemes";s!==0?te="segment-prefixes":K5(N)?te="pair-context":i.preferPrefixWidthsForBreakableRuns&&(te="segment-prefixes");const ee=wke(N,M,l,r,te),J=ee===null||o==="keep-all"?null:Rke(N);z(N,O,Z,q,C,F,ee,J,R);return}z(N,O,Z,q,C,F,null,null,R)}for(let N=0;N{n>t&&(t=n)}),t}function Vke(e){const t=e.toLowerCase(),n=[];let o=0;for(const s of e){const i=s.toLowerCase().length;for(let l=0;l=0&&ao[0]-s[0]),n=[];for(const o of t){const s=n.at(-1);s&&o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):n.push([...o])}return n}function DC(e,t){if(!t||t.length===0||e.length===0)return[{text:e,hit:!1}];const n=[];let o=0;for(const[s,i]of Wke(t)){const l=Math.max(0,Math.min(s,e.length)),r=Math.max(l,Math.min(i,e.length));r<=l||(l>o&&n.push({text:e.slice(o,l),hit:!1}),n.push({text:e.slice(l,r),hit:!0}),o=r)}return o0?n:[{text:e,hit:!1}]}function VC(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function qke(e,t){const n=e.toLowerCase();let o=-1,s=-1,i=0;for(let l=0;l0,a.value=w.scrollTop+w.clientHeight{const w={},_="var(--menu-scroll-fade)";let A;return r.value&&a.value?A=`linear-gradient(to bottom, transparent 0, black ${_}, black calc(100% - ${_}), transparent 100%)`:r.value?A=`linear-gradient(to bottom, transparent, black ${_})`:a.value&&(A=`linear-gradient(to top, transparent, black ${_})`),A&&(w.maskImage=A,w.WebkitMaskImage=A),u.value&&(w.maxHeight=u.value),Object.keys(w).length>0?w:void 0}),p=B(()=>{const w=c.value;return w?{top:`${w.top}px`,height:`${w.height}px`}:void 0});function h(){const w=t.value,_=n.value,A=w?.offsetParent;if(!w||!_||!A)return;const P=getComputedStyle(w),z=zd(w,"--space-2",8),L=(parseFloat(P.paddingTop)||0)+(parseFloat(P.paddingBottom)||0),T=zd(_,o,Number.POSITIVE_INFINITY),I=window.visualViewport?.offsetTop??0,N=A.getBoundingClientRect().top-I-z-L;u.value=`${Math.max(Math.floor(Math.min(T,N)),0)}px`,yt(d)}function m(){const w=n.value;if(!w)return;const _=w.querySelectorAll('[role="option"]')[s?.value??-1];if(!_)return;const A=w.getBoundingClientRect(),P=_.getBoundingClientRect(),z=P.top-A.top+w.scrollTop,L=z+P.height;zw.scrollTop+w.clientHeight&&(w.scrollTop=L-w.clientHeight)}let k=null;function x(w){const _=n.value,A=c.value;if(!_||!A)return;w.preventDefault(),k?.();const P=w.pointerId;(w.target instanceof Element?w.target:null)?.setPointerCapture?.(P);const L=zd(_,"--menu-scrollbar-track-inset",0),T=_.clientHeight-L*2-A.height,I=_.scrollHeight-_.clientHeight,N=w.clientY,C=_.scrollTop,F=M=>{M.pointerId!==P||T<=0||(_.scrollTop=C+(M.clientY-N)/T*I)},H=M=>{M.pointerId===P&&k?.()};k=()=>{window.removeEventListener("pointermove",F),window.removeEventListener("pointerup",H),window.removeEventListener("pointercancel",H),k=null},window.addEventListener("pointermove",F),window.addEventListener("pointerup",H),window.addEventListener("pointercancel",H)}let y=null;return In(()=>{if(typeof ResizeObserver=="function"&&n.value&&(y=new ResizeObserver(w=>{for(const _ of w)_.target===n.value?d():h()}),y.observe(n.value),l)){const w=t.value?.offsetParent;w&&y.observe(w)}l&&(window.addEventListener("resize",h),window.visualViewport?.addEventListener("resize",h),window.visualViewport?.addEventListener("scroll",h),h()),d()}),En(()=>{y?.disconnect(),y=null,k?.(),window.removeEventListener("resize",h),window.visualViewport?.removeEventListener("resize",h),window.visualViewport?.removeEventListener("scroll",h)}),Ke(()=>[s?.value,i?.value],()=>{yt(()=>{d(),m()})}),{atTop:r,atBottom:a,thumb:c,scrollStyle:f,thumbStyle:p,onScroll:d,onThumbPointerDown:x}}const Zke={key:0,class:"slash-empty",role:"status"},Kke=["id","aria-selected","onMouseenter","onMousedown"],Gke={class:"slash-name"},Yke={key:0,class:"slash-match"},Xke={class:"slash-desc"},Jke={key:0,class:"slash-desc-match"},Qke=Je({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{default:()=>[]},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);ca(i);const l=V(null),r=B(()=>n.activeIndex),a=B(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=KN({menuEl:i,scrollEl:l,maxHeightVar:"--p-slash-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"}),h=B(()=>n.items.map((m,k)=>{const x=m.isSkill?m.desc:s(m.desc),y=n.ranges[k]??Uke(n.query,m.name,x);return{item:m,namePieces:DC(m.name,y.name),desc:x,descPieces:DC(x,y.desc)}}));return(m,k)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Be(["slash-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.items.length===0?(g(),S("div",Zke,E(v(s)("composer.noCommands")),1)):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"slash-scroll",role:"listbox",style:Gt(v(u)),onScroll:k[0]||(k[0]=(...x)=>v(f)&&v(f)(...x))},[(g(!0),S(Ce,null,rt(h.value,(x,y)=>(g(),S("div",{id:`composer-slash-option-${y}`,key:`${x.item.name}-${y}`,class:Be(["slash-item",{active:y===n.activeIndex}]),role:"option","aria-selected":y===n.activeIndex,onMouseenter:w=>o("hover",y),onMousedown:xt(w=>o("select",x.item),["prevent"])},[b("span",Gke,[(g(!0),S(Ce,null,rt(x.namePieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",Yke,E(w.text),1)):(g(),S(Ce,{key:1},[He(E(w.text),1)],64))],64))),128))]),b("span",Xke,[(g(!0),S(Ce,null,rt(x.descPieces,(w,_)=>(g(),S(Ce,{key:_},[w.hit?(g(),S("span",Jke,E(w.text),1)):(g(),S(Ce,{key:1},[He(E(w.text),1)],64))],64))),128))])],42,Kke))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:1,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:k[1]||(k[1]=(...x)=>v(p)&&v(p)(...x))},null,36)):Y("",!0)],2))}}),WC=vt(Qke,[["__scopeId","data-v-9f177a8d"]]),ebe={key:0,class:"mention-state dim",role:"status"},tbe={key:1,class:"mention-state dim",role:"status"},nbe=["id","aria-selected","onMouseenter","onMousedown"],obe=["innerHTML"],sbe={class:"mention-name"},ibe={key:0,class:"mention-hit"},lbe={class:"mention-meta"},rbe=["innerHTML"],abe={class:"mention-name"},cbe={key:0,class:"mention-hit"},ube={key:0,class:"mention-meta"},dbe={key:0,class:"mention-hit"},fbe=Je({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean,default:!1},stale:{type:Boolean,default:!1},layout:{default:"popup"}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);ca(i);const l=V(null),r=B(()=>n.activeIndex),a=B(()=>n.items),{thumb:c,scrollStyle:u,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=KN({menuEl:i,scrollEl:l,maxHeightVar:"--p-mention-menu-h",activeIndex:r,refreshKey:a,fitToViewport:n.layout!=="sheet"});function h(w){const _=w.endsWith("/")?w.slice(0,-1):w,A=_.lastIndexOf("/");return A===-1?"":_.slice(0,A)}function m(w){const _=w.file.path.endsWith("/")?w.file.path.slice(0,-1):w.file.path;return Dm(w.file.name,w.file.matchPositions,Math.max(0,_.length-w.file.name.length))}function k(w){return Dm(h(w.file.path),w.file.matchPositions,0)}function x(w){return Dm(w.skill.name,w.matchPositions,0)}function y(w){return w.kind==="skill"?`skill:${w.skill.name}`:w.file.path}return(w,_)=>(g(),S("div",{ref_key:"menuEl",ref:i,class:Be(["mention-menu",{"is-sheet":n.layout==="sheet"}]),"data-menu-frame":""},[n.loading&&n.items.length===0?(g(),S("div",ebe,E(v(s)("mention.searching")),1)):n.items.length===0?(g(),S("div",tbe,E(v(s)("mention.noMatch")),1)):Y("",!0),n.loading&&n.items.length>0?(g(),ue(Zo,{key:2,class:"mention-spin",size:"sm",label:v(s)("mention.searching")},null,8,["label"])):Y("",!0),b("div",{ref_key:"scrollEl",ref:l,class:"mention-scroll",role:"listbox",style:Gt(v(u)),onScroll:_[0]||(_[0]=(...A)=>v(f)&&v(f)(...A))},[(g(!0),S(Ce,null,rt(n.items,(A,P)=>(g(),S("div",{id:`composer-mention-option-${P}`,key:y(A),class:Be(["mention-item",{active:P===n.activeIndex,stale:n.stale&&A.kind!=="skill"}]),role:"option","aria-selected":P===n.activeIndex,onMouseenter:z=>o("hover",P),onMousedown:xt(z=>o("select",A),["prevent"])},[A.kind==="skill"?(g(),S(Ce,{key:0},[b("span",{class:"mention-icon",innerHTML:v(Ll)("sparkles","sm"),"aria-hidden":"true"},null,8,obe),b("span",sbe,[(g(!0),S(Ce,null,rt(x(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",ibe,E(z.text),1)):(g(),S(Ce,{key:1},[He(E(z.text),1)],64))],64))),128))]),b("span",lbe,E(A.skill.description),1)],64)):(g(),S(Ce,{key:1},[b("span",{class:"mention-icon",innerHTML:v(ju)(A.file.path,A.file.name),"aria-hidden":"true"},null,8,rbe),b("span",abe,[(g(!0),S(Ce,null,rt(m(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",cbe,E(z.text),1)):(g(),S(Ce,{key:1},[He(E(z.text),1)],64))],64))),128))]),h(A.file.path)?(g(),S("span",ube,[(g(!0),S(Ce,null,rt(k(A),(z,L)=>(g(),S(Ce,{key:L},[z.hit?(g(),S("span",dbe,E(z.text),1)):(g(),S(Ce,{key:1},[He(E(z.text),1)],64))],64))),128))])):Y("",!0)],64))],42,nbe))),128))],36),v(c)&&n.items.length>0?(g(),S("div",{key:3,class:"scroll-thumb",style:Gt(v(d)),onPointerdown:_[1]||(_[1]=(...A)=>v(p)&&v(p)(...A))},null,36)):Y("",!0)],2))}}),qC=vt(fbe,[["__scopeId","data-v-0ac2fbc1"]]),GN=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/workflow",desc:"commands.dynamicWorkflow.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function pbe(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const Y5="skill:";function hbe(e){return e.startsWith(Y5)?e.slice(Y5.length):e}function YN(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Y5}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...GN,...t]}function mbe(e,t=GN){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let l=0;return i===n?l=3:i.startsWith(n)?l=2:i.includes(n)&&(l=1),{item:o,index:s,score:l}}).filter(({score:o})=>o>0).toSorted((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}function i6(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function XN(e){return e?.supportEfforts??[]}function gbe(e){return e[Math.floor(e.length/2)]}function lf(e){if(i6(e)==="unsupported")return"off";const t=XN(e);return t.length>0?e?.defaultEffort??gbe(t):"on"}function l6(e){const t=XN(e),n=i6(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function rf(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function vbe(e,t){return l6(e).includes(t)}function JN(e,t){return t==="off"?"off":t==="on"?lf(e):t}function k9(e,t){return t??lf(e)}function ybe(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function wbe(e,t,n){return!n||e===void 0?t:lf(e)}const X5=100;function kbe(e){const t=Fu(dn.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>X5?n.slice(-X5):n,s={[e]:o};return T1(dn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function bbe(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=V(kbe(s())),l=B(()=>i.value[s()??""]??[]);let r=-1,a="";function c(x){const y=s();if(r=-1,!y)return;const w=x.trim();if(!w)return;const _=i.value[y]??[];if(_.at(-1)===w)return;const A=[..._,w],P=A.length>X5?A.slice(-X5):A;i.value={...i.value,[y]:P},T1(dn.inputHistory,i.value)}function u(){const x=n.value;return x?(x.selectionStart??0)===0:!1}function d(x){t.value=x,yt(()=>{const y=n.value;if(!y)return;o();const w=x.length;y.setSelectionRange(w,w)})}function f(){const x=l.value;if(x.length!==0){if(r===-1)a=t.value,r=x.length-1;else if(r>0)r-=1;else return;d(x[r])}}function p(){if(r===-1)return;const x=l.value;r0}return Ke(s,()=>{r=-1}),{push:c,caretAtTextStart:u,recallOlder:f,recallNewer:p,resetBrowsing:h,isBrowsing:m,hasHistory:k}}function _be(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:l,clearDraft:r}=e,a=V(!1),c=V([]),u=V(0);function d(){const p=t.value;p.startsWith("/")&&!p.includes(" ")?(c.value=mbe(p,YN(s())),u.value=0,a.value=c.value.length>0):a.value=!1}function f(p){if(a.value=!1,p.acceptsInput){t.value=`${p.name} `,yt(()=>{const h=n.value;if(!h)return;const m=t.value.length;h.setSelectionRange(m,m),h.focus(),o()});return}t.value="",r?.(),l(p.name),i(p.name)}return{open:a,items:c,active:u,update:d,select:f}}function xbe(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s,searchSkills:i,insertSkill:l}=e,r=V(!1),a=V([]),c=V(0),u=V(!1),d=V(!1);let f=null,p=0;function h(){const y=t.value,w=n.value?.selectionStart??y.length;let _=w-1;for(;_>=0&&!/\s/.test(y[_]);)_--;_++;const A=y.slice(_,w);return A.startsWith("@")?{token:A.slice(1),start:_,end:w}:null}function m(){const y=h(),w=s(),_=i?.();if(!y||!w&&!_){r.value=!1,d.value=!1;return}const A=y.token;f!==null&&clearTimeout(f),f=setTimeout(async()=>{const P=++p;u.value=!0,r.value=!0,c.value=0,a.value.length>0&&(d.value=!0);try{const[z,L]=await Promise.all([w?w(A).catch(()=>[]):Promise.resolve([]),_?_(A).catch(()=>[]):Promise.resolve([])]);if(P!==p)return;a.value=[...z.map(T=>({kind:T.path.endsWith("/")?"folder":"file",file:{...T,matchPositions:HC(A,T.path)}})),...L.map(T=>({kind:"skill",skill:T,matchPositions:HC(A,T.name)}))]}catch{P===p&&(a.value=[])}finally{P===p&&(u.value=!1,d.value=!1)}},200)}function k(){f!==null&&clearTimeout(f),f=null,p++,r.value=!1,u.value=!1,d.value=!1}function x(y){const w=h();if(!w)return;if(r.value=!1,y.kind==="skill"){l?.(y.skill.name);return}const _=t.value,A=y.file.name||y.file.path.split(/[\\/]/).findLast(Boolean)||y.file.path,P=Dv({kind:y.kind,name:A,path:y.file.path});t.value=`${_.slice(0,w.start)}${P} ${_.slice(w.end)}`,yt(()=>{const z=n.value;if(!z)return;const L=w.start+P.length+1;z.setSelectionRange(L,L),z.focus(),o()})}return{open:r,items:a,active:c,loading:u,stale:d,update:m,select:x,close:k,getMentionToken:h}}function Sbe(e){const{sessionId:t}=e;function n(c){return ls(xk(c))??""}function o(c,u){const d=xk(c);u?Es(d,u):y1(d)}const s=V(n(t())),i=V(null);function l(){const c=i.value;c&&(c.style.height="auto",c.style.height=`${c.scrollHeight}px`)}Ke(s,c=>{yt(l),o(t(),c)}),Ke(t,(c,u)=>{c!==u&&(o(u,s.value),s.value=n(c),yt(l))});function r(c){s.value=c,yt(()=>{const u=i.value;if(!u)return;u.focus();const d=c.length;u.setSelectionRange(d,d),l()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:l,loadForEdit:r,clearDraft:a}}function Cbe(e){const{uploadImage:t,sessionId:n}=e,o=V({}),s=B(()=>o.value[n()??""]??[]),i=V(null),l=V(null),r=V(!1);let a=0;function c(){return`att_${++a}`}function u(R,O){o.value={...o.value,[R]:O}}function d(R){if(R.previewUrl!==void 0)try{URL.revokeObjectURL(R.previewUrl)}catch{}}function f(R){return R.startsWith("image/")?"image":R.startsWith("video/")?"video":"file"}async function p(R){const O=t();if(!O)return;const U=n()??"";if(R.length!==0)for(const Z of R){const q=f(Z.type),te=c(),ee=q==="file"?void 0:URL.createObjectURL(Z),J={localId:te,name:Z.name,kind:q,previewUrl:ee,mediaType:Z.type||"application/octet-stream",size:Z.size,uploading:!0};u(U,[...o.value[U]??[],J]),O(Z,Z.name).then(se=>{const Q=o.value[U]??[];u(U,Q.map(me=>me.localId===te?{...me,uploading:!1,fileId:se?.fileId,mediaType:se?.mediaType??me.mediaType,error:se===null}:me))}).catch(()=>{const se=o.value[U]??[];u(U,se.map(Q=>Q.localId===te?{...Q,uploading:!1,error:!0}:Q))})}}function h(R){const O=n()??"",U=o.value[O]??[],Z=U.find(q=>q.localId===R);i.value?.localId===R&&(i.value=null),Z&&d(Z),u(O,U.filter(q=>q.localId!==R))}function m(R){i.value=R}function k(){i.value=null}function x(){l.value?.click()}function y(R){const O=R.target,U=Array.from(O.files??[]);p(U),O.value=""}function w(R){if(!t())return;const O=R.clipboardData;if(!O)return;const U=[],Z=new Set,q=(te,ee)=>{const J=`${te.size}:${te.type}:${ee}`;if(Z.has(J))return;Z.add(J);const se=te.type.split("/")[1]??"png",Q=ee.includes(".")?ee:`paste-${Date.now()}.${se}`;U.push(te instanceof File?te:new File([te],Q,{type:te.type}))};for(const te of Array.from(O.items))if(te.kind==="file"){const ee=te.getAsFile();ee&&q(ee,ee.name||`paste-${Date.now()}.${te.type.split("/")[1]??"png"}`)}for(const te of Array.from(O.files))q(te,te.name);U.length!==0&&(R.preventDefault(),p(U))}let _=0;function A(R){!t()||!Array.from(R.dataTransfer?.items??[]).some(U=>U.kind==="file")||(R.preventDefault(),R.stopPropagation(),r.value=!0)}function P(){r.value=!1}function z(R){if(_=0,r.value=!1,!t())return;R.preventDefault(),R.stopPropagation();const O=Array.from(R.dataTransfer?.files??[]);p(O)}function L(R){return Array.from(R.dataTransfer?.items??[]).some(O=>O.kind==="file")}function T(R){!t()||!L(R)||(R.preventDefault(),_+=1,r.value=!0)}function I(R){!t()||!L(R)||R.preventDefault()}function N(R){!t()||!L(R)||(_=Math.max(0,_-1),_===0&&(r.value=!1))}function C(R){if(_=0,r.value=!1,!t())return;R.preventDefault();const O=Array.from(R.dataTransfer?.files??[]);p(O)}function F(){const R=n()??"";for(const O of o.value[R]??[])d(O);u(R,[])}function H(R,O,U){const Z=o.value[R]??[];Z.some(q=>q.localId===O)&&u(R,Z.map(q=>q.localId===O?{...q,...U}:q))}function D(R){return fetch(R).then(O=>{if(!O.ok)throw new Error(`fetch failed: ${O.status}`);return O.blob()})}function M(R){const O=n()??"";for(const U of o.value[O]??[])d(U);u(O,[]);for(const U of R){const Z=c(),q=/^data:/i.test(U.url),te=/^blob:/i.test(U.url),ee=U.name??U.kind;if(U.fileId){const J={localId:Z,name:ee,kind:U.kind,previewUrl:U.kind==="file"?void 0:U.url,uploading:!1,fileId:U.fileId};u(O,[...o.value[O]??[],J]),U.kind!=="file"&&!q&&!te&&Ct().getFileBlob(U.fileId).then(se=>{const Q=URL.createObjectURL(se);if(!(o.value[O]??[]).some(xe=>xe.localId===Z)){URL.revokeObjectURL(Q);return}H(O,Z,{previewUrl:Q})}).catch(()=>{})}else{if(!U.url)continue;const J=t();if(!J)continue;const se={localId:Z,name:ee,kind:U.kind,previewUrl:U.url,uploading:!0};u(O,[...o.value[O]??[],se]),D(U.url).then(Q=>{const me=ee.includes(".")?ee:`${ee}.${Q.type.split("/")[1]??"bin"}`;return J(Q,me)}).then(Q=>{if(Q===null){const me=o.value[O]??[];u(O,me.filter(xe=>xe.localId!==Z));return}H(O,Z,{uploading:!1,fileId:Q.fileId})}).catch(()=>{const Q=o.value[O]??[];u(O,Q.filter(me=>me.localId!==Z))})}}}return Ke(n,()=>{i.value=null}),In(()=>{document.addEventListener("paste",w),document.addEventListener("dragenter",T),document.addEventListener("dragover",I),document.addEventListener("dragleave",N),document.addEventListener("drop",C)}),En(()=>{document.removeEventListener("paste",w),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",I),document.removeEventListener("dragleave",N),document.removeEventListener("drop",C);for(const R of Object.values(o.value))for(const O of R)d(O);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:l,isDragOver:r,removeAttachment:h,openAttachmentPreview:m,closeAttachmentPreview:k,openFilePicker:x,handleFileInputChange:y,handleDragOver:A,handleDragLeave:P,handleDrop:z,clearAfterSubmit:F,loadAttachments:M}}const Mbe=640,Abe=`(max-width: ${Mbe}px)`;function r6(){const e=V(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(Abe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),En(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),En(()=>t.removeListener(n))),e}const Tbe={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},Ebe=["stroke-dasharray","stroke-dashoffset"],Vm=7,Ibe=Je({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*Vm;return(o,s)=>(g(),S("svg",Tbe,[b("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:Vm,fill:"none","stroke-width":"2.5"}),b("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:Vm,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,Ebe)]))}}),Lbe=vt(Ibe,[["__scopeId","data-v-97f3cf66"]]),$be=["aria-selected","onClick"],Nbe=Je({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("div",{class:Be(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[(g(!0),S(Ce,null,rt(e.options,i=>(g(),S("button",{key:i.value,class:Be(["ui-seg__item",{"is-on":i.value===e.modelValue}]),type:"button",role:"tab","aria-selected":i.value===e.modelValue,onClick:l=>n("update:modelValue",i.value)},E(i.label),11,$be))),128))],2))}}),di=vt(Nbe,[["__scopeId","data-v-bffb3dae"]]),Wm=["pythinking","pyreasoning","pypondering","pyplanning","pyiterating","pyorchestrating","reasonating","pondercrafting","neuroning","logic-weaving","rubber-duckoning","token-wrangling","bug-whispering","stack-divining","gizmo-tinkering"],QN=6e4;function zbe(e=Date.now()){const t=Math.floor(e/QN)%Wm.length;return Wm[t]??Wm[0]}function Bbe(e=Date.now()){return`${zbe(e)}…`}const af=["⣷","⣯","⣟","⡿","⢿","⣻","⣽","⣾"],yu=80,Rbe=["aria-label"],Pbe=Je({__name:"ActivitySpinner",props:{fast:{type:Boolean},label:{}},setup(e){const t=af.length*yu,n=yu/2,o=e,s=V(Date.now());let i;In(()=>{o.label===void 0&&(i=setInterval(()=>{s.value=Date.now()},QN))}),En(()=>{i!==void 0&&clearInterval(i)});const l=B(()=>o.label??Bbe(s.value));function r(a){return{"--spinner-frame-delay":`${a*yu-t}ms`,"--spinner-frame-fast-delay":`${a*n-t/2}ms`}}return(a,c)=>(g(),S("span",{class:Be(["activity-spin",{"activity-spin--fast":e.fast}]),"aria-label":l.value,role:"img"},[(g(!0),S(Ce,null,rt(v(af),(u,d)=>(g(),S("span",{key:u,class:"activity-frame",style:Gt(r(d)),"aria-hidden":"true"},E(u),5))),128))],10,Rbe))}}),qm=vt(Pbe,[["__scopeId","data-v-c12d8332"]]),Fbe=["disabled"],jbe={key:0,class:"leading"},Obe={class:"label"},Hbe={key:1,class:"count"},Dbe={key:2,class:"trailing"},Vbe=Je({__name:"MenuRow",props:{count:{},active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),S("button",{type:"button",class:Be(["menu-row",{active:e.active,selected:e.selected,disabled:e.disabled}]),disabled:e.disabled},[t.$slots.leading?(g(),S("span",jbe,[jn(t.$slots,"leading",{},void 0,!0)])):Y("",!0),b("span",Obe,[jn(t.$slots,"label",{},()=>[jn(t.$slots,"default",{},void 0,!0)],!0)]),e.count!==void 0?(g(),S("span",Hbe,E(e.count),1)):Y("",!0),t.$slots.trailing?(g(),S("span",Dbe,[jn(t.$slots,"trailing",{},void 0,!0)])):Y("",!0)],10,Fbe))}}),zc=vt(Vbe,[["__scopeId","data-v-261bf74a"]]),Wbe=["aria-checked","disabled"],qbe=Je({__name:"SwitchToggle",props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function s(){n.disabled||o("update:modelValue",!n.modelValue)}function i(l){n.disabled||l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),s())}return(l,r)=>(g(),S("button",{type:"button",class:"switch-toggle",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,onClick:s,onKeydown:i},[...r[0]||(r[0]=[b("span",{class:"track","aria-hidden":"true"},null,-1),b("span",{class:"thumb","aria-hidden":"true"},null,-1)])],40,Wbe))}}),UC=vt(qbe,[["__scopeId","data-v-169237c7"]]);function Ube({initialized:e,onboardingCompleted:t,authReady:n}){return e?t?n?"app":"recovery":"first-run":"loading"}function Zbe(e,t){return e||t}function Kbe(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const Gbe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function sl(e){const t=e.replaceAll("\\","/"),n=Gbe.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function Ybe(e,t){const n=sl(t.cwd);return e.find(o=>sl(o.root)===n)?.id??t.workspaceId??t.cwd}function Xbe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(sl)),l=new Map;for(const d of t){const f=sl(d.root);i.has(f)||l.has(f)||l.set(f,{...d})}for(const d of n){const f=d.cwd;if(!f)continue;const p=sl(f);i.has(p)||l.has(p)||l.set(p,{id:d.workspaceId??f,root:f,name:Kbe(f),sessionCount:0})}const r=new Map;for(const d of n){const f=Ybe(t,d);r.set(f,(r.get(f)??0)+1)}const a=[];for(const d of t){const f=sl(d.root);!i.has(f)&&!a.includes(f)&&a.push(f)}const c=[...l.keys()].filter(d=>!a.includes(d));c.sort((d,f)=>l.get(d).root.localeCompare(l.get(f).root));const u=[];for(const d of[...a,...c]){const f=l.get(d),p=r.get(f.id)??r.get(f.root)??0,h=s[f.id]===!1?p:Math.max(f.sessionCount,p);u.push({...f,sessionCount:h})}return u}function Jbe(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const o=new Set(t.map(l=>l.id)),s=new Set(t.filter(l=>l.role==="user").map(l=>l.id)),i=e.filter(l=>{const r=Date.parse(l.createdAt);return!(Number.isNaN(r)||r>=n||o.has(l.id)||l.role==="user"&&l.promptId!==void 0&&s.has(l.promptId))});return i.length>0?[...i,...t]:t}function Qbe(e,t){const n=new Set(e.map(c=>c.id)),o=t.filter(c=>c.kind==="subagent"&&!n.has(c.id));if(o.length===0)return e;const s=new Map(e.map(c=>[c.id,c])),i=new Map;for(const c of e)c.kind==="subagent"&&c.agentId!==void 0&&!i.has(c.agentId)&&i.set(c.agentId,c);const l=new Set,r=o.map(c=>{const u=(c.backgroundTaskId!==void 0?s.get(c.backgroundTaskId):void 0)??i.get(c.id)??(c.agentId!==void 0?i.get(c.agentId):void 0);if(u===void 0)return c;l.add(u.id);const d=c.status==="running"&&u.status!=="running",f=u.completedAt!==void 0&&u.completedAtEstimated!==!0;return{...c,status:c.status==="running"?u.status:c.status,subagentPhase:d?u.status==="completed"?"completed":u.status==="cancelled"?"cancelled":"failed":c.subagentPhase,agentId:c.agentId??u.agentId,model:c.model??u.model,thinkingEffort:c.thinkingEffort??u.thinkingEffort,routing:c.routing??u.routing,currentRoutingEnvRevision:c.currentRoutingEnvRevision??u.currentRoutingEnvRevision,completedAt:f?u.completedAt:c.completedAt??u.completedAt,completedAtEstimated:f?u.completedAtEstimated:c.completedAt!==void 0?c.completedAtEstimated:u.completedAtEstimated,outputPreview:u.outputPreview??c.outputPreview,outputBytes:u.outputBytes??c.outputBytes}});return[...e.filter(c=>!l.has(c.id)),...r]}function e_e(e,t){if(e.length===0)return t;const n=new Map(t.map(l=>[l.id,l])),o=new Set(e.map(l=>l.id)),s=e.map(l=>{const r=n.get(l.id);return r?{...l,outputLines:r.outputLines,text:r.text}:l}),i=t.filter(l=>!o.has(l.id));return i.length===0?s:[...s,...i]}function t_e(e){const t=new Map,n=new Set;function o(i){const l=t.get(i);if(l!==void 0)return l;const r=(async()=>e(i))().finally(()=>{t.delete(i),n.delete(i)&&o(i)});return t.set(i,r),r}function s(i){if(t.has(i)){n.add(i);return}o(i)}return{run:o,request:s}}const n_e=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function o_e(e){return n_e.has(e.type)}const s_e=50,i_e=100,H7=32*1024,l_e={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,s_e)},cancelTask(e){clearTimeout(e)}};function r_e(e,t,n={}){const o=n.scheduler??l_e,s=Math.max(1,Math.floor(n.maxItemsPerSlice??i_e)),i=[];let l=0,r=null,a=null,c=0,u=!1;const d=()=>i.length-l,f=()=>{c+=1,r!==null&&(o.cancelFrame(r),r=null),a!==null&&(o.cancelTask(a),a=null)},p=()=>{l===i.length?(i.length=0,l=0):l>=1024&&(i.splice(0,l),l=0)};let h;const m=()=>{if(u||r!==null||a!==null||d()===0)return;const x=++c,y=()=>{x===c&&h()};r=o.requestFrame(y),a=o.requestTask(y)};h=()=>{f();let x=0;for(;!u&&x{if(!u){if(t(x)){const y=i.length>l?i.at(-1):void 0,w=y===void 0?void 0:n.coalesce?.(y,x);w===void 0?i.push(x):i[i.length-1]=w,m();return}if(d()===0){e(x);return}i.push(x),h()}});return k.flush=()=>{if(!u){for(f();!u&&l{if(u||d()===0)return;let y=l;for(let w=l;w{u||(u=!0,f(),i.length=0,l=0)},k}function D7(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function a_e(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=D7(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=H7)return[e];const s=[];let i=0;for(;ii&&/[\uD800-\uDBFF]/u.test(o.value[l-1])&&/[\uDC00-\uDFFF]/u.test(o.value[l])&&(l-=1);const r=o.value.slice(i,l);s.push({appEvent:{...t,delta:o.kind==="text"?{text:r}:{thinking:r}},meta:{...e.meta,stream:{...n,offset:n.offset+i}}}),i=l}return s}function c_e(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=D7(e.appEvent),i=D7(t.appEvent);if(n===void 0||o===void 0||s===void 0||i===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==o.turnId||n.kind!==o.kind||s.kind!==i.kind||n.kind!==s.kind||o.kind!==i.kind||o.offset!==n.offset+s.value.length||s.value.length+i.value.length>H7)return;const l=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:l}:{thinking:l}},meta:{...t.meta,stream:{...n}}}}const ez=[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],tz=new Set(["blue","mono"]),nz=new Set(["light","dark","system"]),oz=14,u_e=12,d_e=20,f_e={small:12,medium:14,large:16,xlarge:18};function p_e(){const e=ls(dn.accent);return e&&tz.has(e)?e:"blue"}function h_e(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.accent=e)}function m_e(){const e=ls(dn.colorScheme);return e&&nz.has(e)?e:"system"}function g_e(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?"#121212":e==="light"?"#ffffff":null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?"#121212":"#ffffff";o.setAttribute("content",n??i)})}function b9(e){return Number.isFinite(e)?Math.min(d_e,Math.max(u_e,Math.round(e))):oz}function _9(e){const t=b9(e);return t<=13?"small":t<=15?"medium":t<=17?"large":"xlarge"}function sz(e){return f_e[e]}function v_e(){const e=ls(dn.uiFontSize);return e===null?oz:b9(Number(e))}function y_e(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=_9(e))}const x9=V(m_e()),S9=V(p_e()),C9=V(v_e());Ke(x9,g_e,{immediate:!0});Ke(S9,h_e,{immediate:!0});Ke(C9,y_e,{immediate:!0});function w_e(e){nz.has(e)&&(x9.value=e,Es(dn.colorScheme,e))}function k_e(e){tz.has(e)&&(S9.value=e,Es(dn.accent,e))}function b_e(e){const t=b9(e);C9.value=t,Es(dn.uiFontSize,String(t))}const __e=600,x_e=250,a6=250,S_e=1e3,C_e=160,J5=V(!1);let k0=[],A0=null,Q5=-a6;function M_e(){k0=[],Q5=-a6,J5.value=!1,A0!==null&&(clearTimeout(A0),A0=null)}function A_e(){J5.value=!0,A0!==null&&clearTimeout(A0),A0=setTimeout(()=>{A0=null,k0=[],Q5=-a6,J5.value=!1},S_e)}function T_e(e){if(e<=0)return;const t=Date.now();k0.push({time:t,chars:e});const n=t-__e;if(k0=k0.filter(r=>r.time>=n),t-Q5r+a.chars,0)/s*1e3>=C_e&&A_e()}function M9(){return{colorScheme:x9,accent:S9,uiFontSize:C9,fastMoon:J5,setColorScheme:w_e,setAccent:k_e,setUiFontSize:b_e,resetFastMoon:M_e,recordMoonDelta:T_e}}function E_e(e,t,n){return e==="idle"&&!t&&!n}function A9(e,t){const n=ls(e);return n===null?t:n==="1"}const T9=V(A9(dn.notifyOnComplete,!0)),E9=V(A9(dn.notifyOnQuestion,!1)),I9=V(A9(dn.notifyOnApproval,!1)),L9=V(typeof Notification<"u"?Notification.permission:"denied"),I_e="/favicon.ico";async function $9(e,t,n){if(!n){e.value=!1,Es(t,"0");return}if(typeof Notification>"u")return;let o=Notification.permission;if(o==="default")try{o=await Notification.requestPermission()}catch{}L9.value=o,o==="granted"&&(e.value=!0,Es(t,"1"))}function L_e(e){return $9(T9,dn.notifyOnComplete,e)}function $_e(e){return $9(E9,dn.notifyOnQuestion,e)}function N_e(e){return $9(I9,dn.notifyOnApproval,e)}function N9(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function z_e(e){return{title:Mo.global.t("settings.notifyTitle"),body:N9(e,Mo.global.t("settings.notifyFallback"))}}function B_e(e,t){return{title:Mo.global.t("settings.notifyQuestionTitle"),body:N9(t,e,Mo.global.t("settings.notifyQuestionFallback"))}}function R_e(e,t){return{title:Mo.global.t("settings.notifyApprovalTitle"),body:N9(t,e,Mo.global.t("settings.notifyApprovalFallback"))}}function z9(e,t,n,o){if(!e||typeof Notification>"u")return;const s=Notification.permission;if(s!=="denied"){if(s==="default"){Notification.requestPermission().then(i=>{L9.value=i,i==="granted"&&ZC(t,n,o)});return}ZC(t,n,o)}}function ZC(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:I_e});o.onclick=()=>{try{window.focus()}catch{}e.onClick(),o.close()}}catch{}}function P_e(e,t){z9(T9.value,t,z_e(t.sessionTitle),`pythinker-complete-${e}-${t.promptId??Date.now()}`)}function F_e(e){z9(E9.value,e,B_e(e.sessionTitle,e.questionPreview),`pythinker-question-${e.questionId}`)}function j_e(e){z9(I9.value,e,R_e(e.sessionTitle,e.toolName),`pythinker-approval-${e.approvalId}`)}function O_e(){return{notifyOnComplete:T9,notifyOnQuestion:E9,notifyOnApproval:I9,notifyPermission:L9,setNotifyOnComplete:L_e,setNotifyOnQuestion:$_e,setNotifyOnApproval:N_e,maybeNotifyCompletion:P_e,maybeNotifyQuestion:F_e,maybeNotifyApproval:j_e}}function H_e(){return ls(dn.soundOnComplete)==="1"}const Wu=V(H_e());function D_e(){if(typeof window>"u")return;const e=window;return window.AudioContext??e.webkitAudioContext}let Um=null;function iz(){const e=D_e();if(!e)return null;if(Um===null)try{Um=new e}catch{return null}return Um}function lz(){if(!Wu.value)return;const e=iz();e!==null&&e.state==="suspended"&&e.resume().then(()=>{ia("sound: audio context resumed",{state:e.state})},t=>{ia("sound: audio context resume rejected",{error:String(t)})})}let KC=!1;function V_e(){if(KC||typeof window>"u")return;KC=!0;const e=()=>{lz()};window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("keydown",e,{capture:!0})}V_e();function W_e(e){Wu.value=e,Es(dn.soundOnComplete,e?"1":"0"),e&&lz()}function GC(e,t,n,o,s){const i=e.createOscillator(),l=e.createGain();i.type="sine",i.frequency.value=t,i.connect(l),l.connect(e.destination);const r=e.currentTime+n;l.gain.setValueAtTime(1e-4,r),l.gain.exponentialRampToValueAtTime(s,r+.01),l.gain.exponentialRampToValueAtTime(1e-4,r+o),i.start(r),i.stop(r+o+.02)}function B9(){const e=iz();if(e===null){ia("sound: skipped, AudioContext unavailable");return}if(e.state!=="running"){ia("sound: skipped, context not running",{state:e.state}),e.state==="suspended"&&e.resume().then(()=>{ia("sound: context resumed for next time",{state:e.state})},t=>{ia("sound: resume rejected",{error:String(t)})});return}try{GC(e,880,0,.16,.18),GC(e,1320,.1,.22,.16),ia("sound: chime scheduled",{state:e.state})}catch(t){ia("sound: failed to play",{error:String(t)})}}function q_e(){Wu.value&&B9()}function U_e(){Wu.value&&B9()}function Z_e(){Wu.value&&B9()}function K_e(){return{soundOnComplete:Wu,setSoundOnComplete:W_e,maybePlayCompletionSound:q_e,maybePlayQuestionSound:U_e,maybePlayApprovalSound:Z_e}}const Zm=1e3,G_e=4096,YC=32*1024;function Y_e(e,t){return e.length===t.length&&e.every((n,o)=>Object.is(n,t[o]))}function rz(e,t){const n=e,o=t,s=new Set([...Object.keys(n),...Object.keys(o)]);for(const i of s){const l=n[i],r=o[i];if(i==="outputLines"&&Array.isArray(l)&&Array.isArray(r)){if(!Y_e(l,r))return!1}else if(i==="routing"&&l&&r){if(!rz(l,r))return!1}else if(!Object.is(l,r))return!1}return!0}function X_e(e,t){const n=new Map(t.map(s=>[s.id,s])),o=e.map(s=>{const i=n.get(s.id);return i&&rz(s,i)?i:s});return o.length===t.length&&o.every((s,i)=>s===t[i])?t:o}function J_e(e,t){const n=new Map(t.map(o=>[o.id,o]));return e.map(o=>{const s=n.get(o.id);return{...o,outputLines:s?.outputLines,text:s?.text,outputPreview:o.outputPreview??s?.outputPreview,outputBytes:o.outputBytes??s?.outputBytes}})}function XC(e){return e.status!=="running"}function Q_e(e,t){let n=null,o=null,s=null,i=null,l=null,r=0,a,c;const u=new Set,d=V(0);function f(C){c!==C&&(c=C,u.clear())}function p(C,F){const H=e.tasksBySession[C]??[],D=Qbe(J_e(F,H),H),M=X_e(D,H);M!==H&&(e.tasksBySession={...e.tasksBySession,[C]:M})}function h(C){for(const F of C)XC(F)&&u.add(F.id)}function m(C){return C.some(F=>XC(F)&&!u.has(F.id))}async function k(C,F){try{const H=await Ct().listTasks(C,{withOutput:!0,outputBytes:YC,outputStatus:"all",signal:F});if(F.aborted||e.activeSessionId!==C)return;h(H),p(C,H)}catch{return}}async function x(C){if(e.activeSessionId!==C)return;f(C);const F=++r,H=l;if(i?.abort(),H!==null&&await H,F!==r||e.activeSessionId!==C)return;const D=new AbortController,M=k(C,D.signal);i=D,l=M;try{await M}finally{l===M&&(l=null,i=null)}F===r&&a===C&&e.activeSessionId===C&&w(C)&&_(C,Zm)}async function y(C,F){try{const H=Ct();let D=await H.listTasks(C,{withOutput:!0,outputBytes:G_e,outputStatus:"running",signal:F});if(F.aborted||e.activeSessionId!==C)return;if(m(D)){if(D=await H.listTasks(C,{withOutput:!0,outputBytes:YC,outputStatus:"all",signal:F}),F.aborted||e.activeSessionId!==C)return;h(D)}p(C,D)}catch{return}}function w(C){return(e.tasksBySession[C]??[]).some(F=>F.status==="running")}function _(C,F){n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,A(C)},F)}async function A(C){if(a!==C||e.activeSessionId!==C||!w(C)||typeof document<"u"&&document.visibilityState==="hidden")return;if(l!==null){_(C,Zm);return}const F=++r,H=new AbortController,D=y(C,H.signal);i=H,l=D;try{await D}finally{l===D&&(l=null,i=null)}F===r&&!H.signal.aborted&&a===C&&e.activeSessionId===C&&w(C)&&_(C,Zm)}function P(){document.visibilityState!=="visible"||a===void 0||n!==null||l!==null||A(a)}typeof document<"u"&&document.addEventListener("visibilitychange",P);function z(){n!==null&&(clearTimeout(n),n=null),i?.abort(),a=void 0}function L(C){a!==C&&(z(),f(C),a=C,A(C))}const T=Ke(()=>t.value.some(C=>C.status==="running"),C=>{C&&s===null?s=setInterval(()=>{d.value=(d.value+1)%Number.MAX_SAFE_INTEGER},1e3):!C&&s!==null&&(clearInterval(s),s=null)},{immediate:!0}),I=Ke([()=>e.activeSessionId,()=>{const C=e.activeSessionId;return C===void 0?!1:w(C)}],([C,F],[H,D])=>{if(o!==null&&(clearTimeout(o),o=null),C!==H&&(i?.abort(),f(C)),C!==void 0&&F){L(C);return}if(z(),C===void 0||!D)return;const M=e.tasksBySession[C]??[];m(M)&&(o=setTimeout(()=>{o=null,e.activeSessionId===C&&!w(C)&&x(C)},1500))},{immediate:!0});function N(){r+=1,typeof document<"u"&&document.removeEventListener("visibilitychange",P),T(),I(),z(),o!==null&&clearTimeout(o),o=null,s!==null&&clearInterval(s),s=null,u.clear()}return{taskClock:B(()=>d.value),loadTasksForSession:x,dispose:N}}function exe(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function txe(e){const t=[];if(!e)return t;let n=0,o=0,s=!1;for(const i of e.split(` +`)){if(i.startsWith("diff --git")){s=!1;continue}if(!s&&exe(i))continue;if(i.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(i);a&&(n=Number.parseInt(a[1],10),o=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:i});continue}if(!s||i.startsWith("\\"))continue;const l=i.charAt(0),r=i.slice(1);l==="+"?(t.push({type:"add",text:r,newNo:o}),o+=1):l==="-"?(t.push({type:"del",text:r,oldNo:n}),n+=1):l===" "&&(t.push({type:"context",text:r,oldNo:n,newNo:o}),n+=1,o+=1)}return t}const V7="/sessions/";function JC(e){const{pathname:t}=e;if(!t.startsWith(V7))return;const n=t.slice(V7.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function nxe(e){return e===void 0||e.length===0?"/":`${V7}${encodeURIComponent(e)}`}const oxe=50,f0=5,sxe=40402,ixe=40410,lxe=40902,rxe=2e3;function Km(e){return ol(e)&&e.code===lxe}const axe=40904;function QC(e){return ol(e)&&e.code===axe}const c0=ds({}),o4=ds({}),Gm=ds({}),Ym=ds({}),br=ds(new Set),c6=new Map,W0=new Map,ep=new Map;let cxe=0;const p0=new Map,uxe=3;let eM=0;function dxe(){return eM+=1,`${Date.now().toString(36)}-${eM}`}function fxe(e){return{generation:c6.get(e)??0,pending:(W0.get(e)?.size??0)>0}}function W7(e){const t=++cxe;c6.set(e,t);const n=W0.get(e)??new Set;return n.add(t),W0.set(e,n),t}function q7(e,t){const n=W0.get(e);if(n===void 0||(n.delete(t),n.size>0))return;W0.delete(e);const o=ep.get(e);ep.delete(e),o?.()}function pxe(e){c6.delete(e),W0.delete(e),ep.delete(e),p0.delete(e)}function hxe(e,t){return!t.pending&&t.generation===(c6.get(e)??0)}function mxe(e,t){if((W0.get(e)?.size??0)===0){t();return}ep.set(e,t)}function gxe(e,t){const{t:n}=Mo.global,{confirm:o}=z1(),{taskPoller:s,sideChat:i,modelProvider:l,pushOperationFailure:r,activity:a,sessionsKnownEmpty:c,setSessions:u,updateSession:d,upsertSessionFront:f,appendSession:p,forgetSession:h,setActiveSessionId:m,updateSessionMessages:k,nextOptimisticMsgId:x,getEventConn:y,syncSessionFromSnapshot:w,reopenSession:_,hasLoadedMessages:A,refreshSessionStatus:P,refreshSessionGoal:z,persistSessionProfile:L,mergedWorkspaces:T,workspacesView:I,status:N,workspaceIdForSession:C,seedPermissionFromDaemonDefault:F,savePlanModeToStorage:H,saveDynamicWorkflowModeToStorage:D,saveGoalModeToStorage:M,draftModes:R,saveUnread:O,saveActiveWorkspaceToStorage:U,saveHiddenWorkspacesToStorage:Z,goalErrorMessage:q,resetFastMoon:te,initialized:ee,connectIssue:J,selectedDiffPath:se,fileDiffLines:Q,fileDiffLoading:me}=t;let xe=!1,Ye=0;function at(){const ne=e.config?.defaultPermissionMode;return ne==="auto"||ne==="yolo"||ne==="manual"?ne:"manual"}function X(ne){return e.permissionBySession[ne]??at()}async function oe(ne){if(e.messagesLoadingMoreBySession[ne])return;const ke=e.messagesBySession[ne];if(!ke||ke.length===0)return;const Te=ke[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!1};try{const Ne=await Ct().listMessages(ne,{beforeId:Te,pageSize:oxe}),Qe=[...Ne.items].toReversed();k(ne,ht=>[...Qe,...ht]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[ne]:Ne.hasMore}}catch(Ne){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ne]:!0},r("loadOlderMessages",Ne,{sessionId:ne})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ne]:!1}}}function j(ne){s.loadTasksForSession(ne),ye(ne),P(ne),z(ne),Object.prototype.hasOwnProperty.call(l.skillsBySession.value,ne)||l.loadSkillsForSession(ne)}async function K(ne){const ke=e.activeSessionId;if(ke){se.value=ne,Q.value=[],me.value=!0;try{const Ne=await Ct().getFileDiff(ke,ne);if(se.value!==ne)return;Q.value=txe(Ne.diff)}catch(Te){se.value===ne&&(Q.value=[]),console.warn("[loadFileDiff] diff unavailable for",ne,Te)}finally{se.value===ne&&(me.value=!1)}}}function he(){se.value=null,Q.value=[],me.value=!1}async function ye(ne){try{const Te=await Ct().getGitStatus(ne);e.gitStatusBySession={...e.gitStatusBySession,[ne]:Te}}catch{}}async function ve(){try{const ke=await Ct().getAuth();return e.authReady=ke.ready,e.defaultModel=ke.defaultModel,J.value=null,"proceed"}catch(ne){return ol(ne)&&(ne.code===401||ne.code===ON)?(J.value=null,"server-auth-required"):(J.value=(ne instanceof Error?ne.message:String(ne)).slice(0,140),"retry")}}async function ie(){let ne=!0;for(;;){const ke=await ve();if(ke!=="retry")return ke;ne&&(J.value=null,ne=!1),await new Promise(Te=>{setTimeout(Te,rxe)})}}async function de(){try{e.subagentModelPolicy=await Ct().getSubagentModelPolicy()}catch{e.subagentModelPolicy=null}}async function be(ne){e.subagentModelPolicySaving=!0;try{return e.subagentModelPolicy=await ne(e.subagentModelPolicy?.resourceVersion),!0}catch(ke){return ke instanceof P$?(e.subagentModelPolicy=ke.current,r("saveSubagentModelPolicy",ke,{message:ke.message}),!1):(r("saveSubagentModelPolicy",ke),!1)}finally{e.subagentModelPolicySaving=!1}}function Se(ne){return be(ke=>Ct().setSubagentModelPolicy(ne,ke))}function je(){return be(ne=>Ct().clearSubagentModelPolicy(ne))}async function et(){await de();try{const ne=Ct();e.config=await ne.getConfig(),F()}catch{}}function le(ne){ne!=="manual"&&ne!=="auto"&&ne!=="yolo"||e.activeSessionId||(e.permission=ne)}function fe(ne,ke){if(ke===ne)return;l.draftModel.value=null;const Te=e.activeSessionId;if(!Te)return;const Ne=e.sessions.find(Qe=>Qe.id===Te);Ne===void 0||Ne.messageCount>0||Ne.busy||e.inFlightBySession[Te]||!Ne.model||Ne.model.length===0||Ne.model!==ne||(d(Te,Qe=>({...Qe,model:ke})),L({model:ke},Te))}async function ge(ne){try{const ke=Ct(),Te=e.defaultModel,Ne=await ke.setConfig(ne);e.config=Ne,e.defaultModel=Ne.defaultModel??null;const Qe=Ne.defaultModel;return ne.defaultPermissionMode!==void 0&&le(Ne.defaultPermissionMode??ne.defaultPermissionMode),ne.defaultModel!==void 0&&Qe!==null&&Qe!==void 0&&Qe.length>0&&fe(Te,Qe),!0}catch(ke){return r("setConfig",ke),!1}}const Oe=100,Fe=30,pt=720*60*1e3;async function kt(){const ne=Ct(),ke=[];let Te,Ne;for(;;){let Qe;try{Qe=await ne.listSessions({pageSize:Oe,beforeId:Te,excludeEmpty:!0})}catch(ht){if(ke.length===0)throw ht;Ne=ht;break}if(ke.push(...Qe.items),!Qe.hasMore||Qe.items.length===0)break;Te=Qe.items.at(-1).id}return{sessions:ke,error:Ne}}function qt(ne){const ke=new Map(e.sessions.map(Te=>[Te.id,Te.usage]));u(ne.map(Te=>{const Ne=ke.get(Te.id);return Ne!==void 0&&E7(Te.usage)&&!E7(Ne)?{...Te,usage:Ne}:Te}))}function nn(ne){const ke=[...ne],Te=new Set(ke.map(Ne=>Ne.id));for(const Ne of e.sessions)Te.has(Ne.id)||(ke.push(Ne),Te.add(Ne.id));return ke.sort((Ne,Qe)=>new Date(Qe.updatedAt).getTime()-new Date(Ne.updatedAt).getTime()),ke}async function Jt(ne){const ke=Ct(),Te=[],Ne=Date.now(),Qe=Wt=>Ne-new Date(Wt.updatedAt).getTime();let ht,jt=!1,Zt=!0,Vt;for(;;){let Wt;try{Wt=await ke.listSessions({workspaceId:ne,pageSize:f0,beforeId:ht,excludeEmpty:!0})}catch(Ht){if(Zt)throw Ht;Vt=Ht,jt=!0;break}if(jt=Wt.hasMore,Wt.items.length===0)break;const on=Wt.items.at(-1),Vn=Qe(on)>=pt;if(!Zt&&Vn){const Ht=Wt.items.findIndex(zn=>Qe(zn)>=pt),Tn=Ht>=0?Ht+1:Wt.items.length;Te.push(...Wt.items.slice(0,Tn)),jt=Wt.hasMore||TnJt(Ht.id))),Te=[],Ne=new Set,Qe=new Map,ht=new Set;let jt;for(let Ht=0;Htht.has(Ht.id)).map(Ht=>Ht.root)),Vt=new Set(ne.map(Ht=>Ht.id));for(const Ht of e.sessions)!(Ht.workspaceId!==void 0&&Vt.has(Ht.workspaceId)?ht.has(Ht.workspaceId):Zt.has(Ht.cwd)||ht.has(C(Ht)))||Ne.has(Ht.id)||(Te.push(Ht),Ne.add(Ht.id));const Wt={},on={},Vn={};for(const{id:Ht}of ne){const Tn=Qe.get(Ht);if(Tn===void 0){const zn=e.sessionsHasMoreByWorkspace[Ht],Ns=e.sessionsCursorByWorkspace[Ht],rs=e.sessionsInitialCountByWorkspace[Ht];zn!==void 0&&(Wt[Ht]=zn),Ns!==void 0&&(on[Ht]=Ns),rs!==void 0&&(Vn[Ht]=rs);continue}Wt[Ht]=Tn.hasMore,on[Ht]=Tn.items.length>0?Tn.items.at(-1).id:void 0,Vn[Ht]=Math.max(Tn.items.length,f0)}return e.sessionsHasMoreByWorkspace=Wt,e.sessionsCursorByWorkspace=on,e.sessionsInitialCountByWorkspace=Vn,e.sessionsFullyLoaded=!1,Te.sort((Ht,Tn)=>new Date(Tn.updatedAt).getTime()-new Date(Ht.updatedAt).getTime()),ht.size>0&&r("load",jt),Te}function Dn(){const ne=++Ye;if(e.backend!=="v2")return;const ke={groupPageSize:f0,hasPrompt:!0};return{firstPage:Promise.resolve().then(()=>Ct().listSessionGroupsV2(ke)).then(Te=>({page:Te}),Te=>({error:Te})),input:ke,serial:ne}}function xn(ne,ke){const Te=new Map(ne.map(on=>[on.workspace.id,on])),Ne=new Map;for(const on of ne)on.workspace.cwd!==null&&Ne.set(sl(on.workspace.cwd),on);const Qe=[],ht=new Set,jt={},Zt={},Vt={},Wt=[];for(const on of e.workspaces){const Vn=Te.get(on.id)??Ne.get(sl(on.root));if(Vn===void 0){jt[on.id]=!ke,Zt[on.id]=void 0,Vt[on.id]=f0;continue}const Ht=[];for(const Tn of Vn.sessions){if(!Tn.lastPrompt||ht.has(Tn.id))continue;const zn={...Tn,cwd:Tn.cwd||on.root,workspaceId:on.id};Qe.push(zn),Ht.push(zn),ht.add(zn.id),(zn.busy||zn.pendingInteraction==="approval"||zn.pendingInteraction==="question")&&Wt.push(zn.id)}jt[on.id]=Vn.sessions.lengthnew Date(Vn.updatedAt).getTime()-new Date(on.updatedAt).getTime()),{loaded:Qe,hasMore:jt,cursors:Zt,counts:Vt,liveIds:Wt}}function $n(ne,ke){if(ke===void 0){e.sessionsHasMoreByWorkspace=ne.hasMore,e.sessionsCursorByWorkspace=ne.cursors,e.sessionsInitialCountByWorkspace=ne.counts;return}const Te={...e.sessionsHasMoreByWorkspace},Ne={...e.sessionsCursorByWorkspace},Qe={...e.sessionsInitialCountByWorkspace};for(const ht of e.workspaces)e.sessionsCursorByWorkspace[ht.id]===ke[ht.id]&&(Te[ht.id]=ne.hasMore[ht.id]??!1,Ne[ht.id]=ne.cursors[ht.id],Qe[ht.id]=ne.counts[ht.id]??f0);e.sessionsHasMoreByWorkspace=Te,e.sessionsCursorByWorkspace=Ne,e.sessionsInitialCountByWorkspace=Qe}async function Hn(ne,ke,Te){const Ne=[...ne.groups];let Qe=ne.nextPageToken;for(;Qe!==null;){if(ke.serial!==Ye)return;let Vt;try{Vt=await Ct().listSessionGroupsV2({...ke.input,pageToken:Qe})}catch(Wt){r("load",Wt);return}Ne.push(...Vt.groups),Qe=Vt.nextPageToken}if(ke.serial!==Ye)return;const ht=xn(Ne,!0),jt=new Set(ht.loaded.map(Vt=>Vt.id)),Zt=[...ht.loaded,...e.sessions.filter(Vt=>!jt.has(Vt.id))].sort((Vt,Wt)=>new Date(Wt.updatedAt).getTime()-new Date(Vt.updatedAt).getTime());if(qt(Zt),e.sessionsFullyLoaded){const Vt={};for(const Wt of e.workspaces)Vt[Wt.id]=!1;e.sessionsHasMoreByWorkspace=Vt}else $n(ht,Te.cursors);await Promise.allSettled(ht.liveIds.map(Vt=>P(Vt)))}async function bn(ne){if(e.workspaces.length===0){const ht=await kn();return ht===void 0?void 0:{sessions:ht,liveIds:[]}}const{page:ke,error:Te}=await ne.firstPage;if(ke===void 0){r("load",Te);return}const Ne=ke.nextPageToken===null,Qe=xn(ke.groups,Ne);return $n(Qe),e.sessionsFullyLoaded=!1,{sessions:Qe.loaded,liveIds:Qe.liveIds,finishInBackground:Ne?void 0:()=>{Hn(ke,ne,Qe)}}}async function Wn(ne){if(e.sessionsLoadingMoreByWorkspace[ne]||e.sessionsHasMoreByWorkspace[ne]===!1)return;const ke=e.sessionsCursorByWorkspace[ne];if(ke!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!0};try{const Te=await Ct().listSessions({workspaceId:ne,pageSize:Fe,beforeId:ke,excludeEmpty:!0}),Ne=new Set(e.sessions.map(ht=>ht.id)),Qe=Te.items.filter(ht=>!Ne.has(ht.id));Qe.length>0&&u([...e.sessions,...Qe]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[ne]:Te.items.length>0?Te.items.at(-1).id:ke},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[ne]:Te.hasMore}}catch(Te){r("loadMoreSessions",Te)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ne]:!1}}}}async function Pn(){if(e.sessionsFullyLoaded)return;const ne=await kt().catch(Ne=>(console.warn("[pythinker-web] loadAllSessions failed; search covers only loaded sessions",Ne),null));if(ne===null)return;const ke=ne.error===void 0?ne.sessions:nn(ne.sessions);if(qt(ke),e.sessionsFullyLoaded=ne.error===void 0,ne.error!==void 0)return;const Te={};for(const Ne of e.workspaces)Te[Ne.id]=!1;e.sessionsHasMoreByWorkspace=Te}async function Mn(){const ne=await Ct().getMeta().catch(()=>null);ne!==null&&(e.serverVersion=ne.serverVersion,e.availableOpenInApps=ne.openInApps,e.dangerousBypassAuth=ne.dangerousBypassAuth,e.backend=ne.backend,e.experimentalFlagStates=ne.experimentalFlagStates,e.serverCapabilities=ne.capabilities)}async function Nn(){const ne=Date.now();let ke="accepted";_s("app:load:start"),e.loading=!0;const Te=!ee.value;let Ne=!0;try{if(Te&&await ie()==="server-auth-required"){Ne=!1,ke="auth-required";return}const Qe=Ct();await Promise.all([Qe.getHealth().catch(()=>null),Mn(),l.loadModels()]),Te||await ve(),await et();const ht=Dn();await An();const jt=ht===void 0?void 0:await bn(ht),Zt=ht===void 0?await kn():jt?.sessions,Vt=Zt??e.sessions;Zt!==void 0&&qt(Zt),jt?.finishInBackground?.(),jt!==void 0&&await Promise.allSettled(jt.liveIds.map(Tn=>P(Tn)));const Wt=Vt[0],on=e.activeWorkspaceId;!(on!==null&&T.value.some(Tn=>Tn.id===on))&&Wt&&Fn(C(Wt)),Ut();const Ht=typeof window<"u"?JC(window.location):void 0;!e.activeSessionId&&Ht!==void 0&&(e.sessions.some(zn=>zn.id===Ht)||await dt(Ht))&&await en(Ht,{urlMode:"replace"}),!e.activeSessionId&&Vt.length>0&&await en(Vt[0].id,{urlMode:"replace"})}catch(Qe){ke="failed",r("load",Qe)}finally{e.loading=!1,Ne&&(ee.value=!0),_s("app:load:complete",{status:ke,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-ne})}}async function An(){try{const ne=Ct(),[ke,Te]=await Promise.all([ne.listWorkspaces().catch(()=>[]),ne.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=Qn(ke),e.fsHome=Te.home||null,e.recentRoots=Te.recentRoots}catch{}}function Qn(ne){const ke=g3();return Object.keys(ke).length===0?ne:ne.map(Te=>{const Ne=ke[Te.root];return Ne!==void 0?{...Te,name:Ne}:Te})}function Fn(ne){e.activeWorkspaceId=ne,U(ne)}function Qt(ne){Fn(ne);const ke=e.sessions.filter(Te=>C(Te)===ne);if(ke.length>0){const Te=ke[0];Te&&Te.id!==e.activeSessionId&&en(Te.id)}else m(void 0),ot(void 0,"push")}function uo(ne){const ke=g3()[ne.root],Te=ke!==void 0?{...ne,name:ke}:ne,Ne=sl(Te.root);e.hiddenWorkspaceRoots.some(jt=>sl(jt)===Ne)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(jt=>sl(jt)!==Ne),Z(e.hiddenWorkspaceRoots));const Qe=e.workspaces.findIndex(jt=>jt.id===Te.id||jt.root===Te.root);if(Qe===-1){e.workspaces=[Te,...e.workspaces];return}const ht=[...e.workspaces];ht[Qe]=Te,e.workspaces=ht}function Zn(ne){if(ne.type==="workspaceCreated"||ne.type==="workspaceUpdated"){uo(ne.workspace);return}const ke=e.workspaces.find(Ne=>Ne.id===ne.workspaceId)?.root??ne.root;if(ke&&!e.hiddenWorkspaceRoots.includes(ke)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,ke],Z(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Ne=>Ne.id!==ne.workspaceId&&Ne.root!==ke),e.activeWorkspaceId===ne.workspaceId||e.activeWorkspaceId===ke){const Ne=I.value[0]?.id??null;if(e.activeWorkspaceId=Ne,Ne)U(Ne);else try{y1(dn.activeWorkspace)}catch{}m(void 0),e.sessionLoading=!1,he(),ot(void 0,"replace")}}function Bo(){m(void 0),e.permission=at(),ot(void 0,"push")}function Un(ne){Fn(ne),Bo(),he()}async function hs(ne){const ke=T.value.find(Vn=>Vn.id===ne);if(!ke)return null;const Te=e.thinking,Ne=e.permission,Qe=Ct();let ht,jt=ke.root;try{const Vn=await Qe.addWorkspace({root:ke.root});ht=Vn.id,jt=Vn.root,uo(Vn)}catch{}const Zt=l.draftModel.value??void 0,Vt=await Qe.createSession({workspaceId:ht,cwd:jt,model:Zt});l.draftModel.value=null;const Wt=Zt!==void 0&&(!Vt.model||Vt.model.length===0)?{...Vt,model:Zt}:Vt;f(Wt),e.permissionBySession={...e.permissionBySession,[Vt.id]:Ne},Fn(Vt.workspaceId??ht??ne),await en(Vt.id);const on=Vt.id;return Te!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[on]:Te}),R.planMode&&(e.planModeBySession={...e.planModeBySession,[on]:!0},H()),R.dynamicWorkflowMode&&(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[on]:!0},D()),R.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[on]:!0},M()),R.planMode=!1,R.dynamicWorkflowMode=!1,R.goalMode=!1,on}async function Io(ne,ke,Te){if(!br.has(ne)){br.add(ne);try{const Ne=await hs(ne);if(!Ne)return;await tn(Ne,ke,Te)}catch(Ne){r("startSessionAndSendPrompt",Ne)}finally{br.delete(ne)}}}async function Rt(ne,ke,Te){if(!br.has(ne)){br.add(ne);try{const Ne=await hs(ne);if(!Ne)return;const Qe=e.planModeBySession[Ne]??!1,ht=e.dynamicWorkflowModeBySession[Ne]??!1,jt=e.sessions.find(Wt=>Wt.id===Ne),Zt=(jt?.model&&jt.model.length>0?jt.model:e.defaultModel)??void 0;if(!await L({model:Zt,planMode:Qe,dynamicWorkflowMode:ht,permissionMode:X(Ne)},Ne))return;await l.activateSkill(ke,Te,Ne)}catch(Ne){r("startSessionAndActivateSkill",Ne)}finally{br.delete(ne)}}}async function Jo(ne,ke){if(!br.has(ne)){br.add(ne);try{const Te=await hs(ne);if(!Te)return;await i.openSideChatOn(Te,ke)}catch(Te){r("startSessionAndOpenSideChat",Te)}finally{br.delete(ne)}}}async function Ls(ne){const ke=ne.trim();if(!ke)return!1;const Te=Ct();try{const Ne=await Te.addWorkspace({root:ke});return uo(Ne),Un(Ne.id),!0}catch(Ne){return console.warn("[pythinker-web] addWorkspaceByPath failed for",ke,Ne),!1}}async function $e(ne){try{return await Ct().browseFs(ne)}catch{return{path:"",parent:null,entries:[]}}}async function Ge(){try{return await Ct().getFsHome()}catch{return{home:"",recentRoots:[]}}}function ot(ne,ke){if(ke==="none"||typeof window>"u"||!window.history)return;const Te=nxe(ne);if(window.location.pathname!==Te)try{ke==="push"?window.history.pushState(null,"",Te):window.history.replaceState(null,"",Te)}catch{}}async function dt(ne){try{const ke=await Ct().getSession(ne);return e.sessions.some(Te=>Te.id===ke.id)||p(ke),!0}catch{return!1}}function Mt(){const ne=JC(window.location);if(ne===void 0){m(void 0);return}if(ne!==e.activeSessionId){if(e.sessions.some(ke=>ke.id===ne)){en(ne,{urlMode:"none"});return}(async()=>{if(await dt(ne)){await en(ne,{urlMode:"none"});return}const ke=e.sessions[0];ke?await en(ke.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))})()}}let Ft=!1;function Ut(){Ft||typeof window>"u"||(Ft=!0,window.addEventListener("popstate",Mt))}async function en(ne,ke){const Te=A(ne),Ne=!Te&&c.has(ne);c.delete(ne);try{ot(ne,ke?.urlMode??"push"),e.sessionLoading=!Te&&!Ne,m(ne),e.permission=X(ne),te(),e.unreadBySession[ne]&&(e.unreadBySession={...e.unreadBySession,[ne]:!1},O({[ne]:!1})),he();const Qe=e.sessions.find(ht=>ht.id===ne);if(Qe){const ht=C(Qe);e.activeWorkspaceId!==ht&&Fn(ht)}if(Te){if(await _(ne)==="not-found")return}else if(await w(ne)==="not-found")return;j(ne)}catch(Qe){r("selectSession",Qe,{sessionId:ne})}finally{e.activeSessionId===ne&&(e.sessionLoading=!1)}}async function tn(ne,ke,Te){const Ne=W7(ne);e.inFlightBySession={...e.inFlightBySession,[ne]:!0};const Qe=x();try{const ht=Ct(),jt=[];ke&&jt.push({type:"text",text:ke});for(const zn of Te??[])zn.kind==="video"?jt.push({type:"video",source:{kind:"file",fileId:zn.fileId}}):zn.kind==="file"?jt.push({type:"file",fileId:zn.fileId,name:zn.name??"",mediaType:zn.mediaType||"application/octet-stream",size:zn.size??0}):jt.push({type:"image",source:{kind:"file",fileId:zn.fileId}});if(jt.length===0)return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},"rejected";const Zt={id:Qe,sessionId:ne,role:"user",content:jt,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,zn=>[...zn,Zt]);const Vt=e.sessions.find(zn=>zn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=e.planModeBySession[ne]??!1,Vn=e.dynamicWorkflowModeBySession[ne]??!1,Ht=e.goalModeBySession[ne]??!1;if(Ht&&ke)try{await ht.updateSession(ne,{goalObjective:ke.trim()})}catch(zn){return r("createGoal",zn,{sessionId:ne}),e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,Ns=>Ns.some(rs=>rs.id===Qe)?Ns.filter(rs=>rs.id!==Qe):Ns),"rejected"}const Tn=await ht.submitPrompt(ne,{content:jt,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:on,dynamicWorkflowMode:Vn});return Ht&&(e.goalModeBySession={...e.goalModeBySession,[ne]:!1},M()),e.promptIdBySession={...e.promptIdBySession,[ne]:Tn.promptId},k(ne,zn=>{const Ns=zn.findIndex(_l=>_l.id===Qe);if(Ns===-1)return zn;const rs=[...zn];return rs[Ns]={...rs[Ns],promptId:rs[Ns].promptId??Tn.promptId},rs}),y()?.bindNextPromptId(ne,Tn.promptId),"ok"}catch(ht){return e.inFlightBySession={...e.inFlightBySession,[ne]:!1},k(ne,jt=>jt.some(Zt=>Zt.id===Qe)?jt.filter(Zt=>Zt.id!==Qe):jt),r("sendPrompt",ht,{sessionId:ne}),ol(ht)?"rejected":"uncertain"}finally{q7(ne,Ne)}}async function eo(ne,ke){const Te=e.activeSessionId;if(Te){if(a.value!=="idle"||e.inFlightBySession[Te]){bt(ne,ke);return}if((e.queuedBySession[Te]?.length??0)>0){bt(ne,ke),Lt(Te);return}await tn(Te,ne,ke)}}const Ro=new Map;function $s(ne,ke){const Te=(Ro.get(ne)??Promise.resolve()).catch(()=>{}).then(ke);return Ro.set(ne,Te),Te.finally(()=>{Ro.get(ne)===Te&&Ro.delete(ne)})}function Do(ne,ke){const Te=e.activeSessionId;return Te?$s(Te,()=>We(Te,ne,ke)):Promise.resolve()}async function We(ne,ke,Te){const Ne=e.queuedBySession[ne]??[],Qe=[],ht=[];for(const Wt of Ne){const on=Wt.text.trim();on&&Qe.push(on),Wt.attachments?.length&&ht.push(...Wt.attachments)}const jt=ke.trim();if(jt&&Qe.push(jt),Te?.length&&ht.push(...Te),Qe.length===0&&ht.length===0||(Ne.length>0&&(e.queuedBySession={...e.queuedBySession,[ne]:[]}),await qe(ne,Qe.join(` -`),ht)!=="rejected"||Ne.length===0))return;const Vt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[...Ne,...Vt]}}function st(ne){const ke=e.activeSessionId;if(!ke)return Promise.resolve();const Te=(e.queuedBySession[ke]??[])[ne];if(Te===void 0)return Promise.resolve();const Ne=Te.id??Te.text;return $s(ke,()=>Xe(ke,Ne))}async function Xe(ne,ke){const Te=e.queuedBySession[ne]??[],Ne=Te.findIndex(Wt=>(Wt.id??Wt.text)===ke),Qe=Ne>=0?Te[Ne]:void 0;if(Qe===void 0)return;const ht=Qe.attachments??[];if(Qe.text.trim().length===0&&ht.length===0)return;const jt=[...Te];if(jt.splice(Ne,1),e.queuedBySession={...e.queuedBySession,[ne]:jt},await qe(ne,Qe.text,ht)!=="rejected"||!e.sessions.some(Wt=>Wt.id===ne))return;const Vt=[...e.queuedBySession[ne]??[]];Vt.splice(Math.min(Ne,Vt.length),0,Qe),e.queuedBySession={...e.queuedBySession,[ne]:Vt}}async function qe(ne,ke,Te){if(a.value==="idle"&&!e.inFlightBySession[ne])return tn(ne,ke,Te);const Ne=[];ke&&Ne.push({type:"text",text:ke});for(const Zt of Te)Zt.kind==="video"?Ne.push({type:"video",source:{kind:"file",fileId:Zt.fileId}}):Zt.kind==="file"?Ne.push({type:"file",fileId:Zt.fileId,name:Zt.name??"",mediaType:Zt.mediaType||"application/octet-stream",size:Zt.size??0}):Ne.push({type:"image",source:{kind:"file",fileId:Zt.fileId}});const Qe=x(),ht={id:Qe,sessionId:ne,role:"user",content:Ne,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,Zt=>[...Zt,ht]);const jt=V7(ne);try{const Zt=Ct(),Vt=e.sessions.find(Vn=>Vn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=await Zt.submitPrompt(ne,{content:Ne,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:e.planModeBySession[ne]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[ne]??!1});if(k(ne,Vn=>{const Ht=Vn.findIndex(zn=>zn.id===Qe);if(Ht===-1)return Vn;const Tn=[...Vn];return Tn[Ht]={...Tn[Ht],promptId:Tn[Ht].promptId??on.promptId},Tn}),on.status!=="queued")return e.promptIdBySession={...e.promptIdBySession,[ne]:on.promptId},y()?.bindNextPromptId(ne,on.promptId),"ok";try{await Zt.steerPrompts(ne,[on.promptId])}catch{return"ok"}return"ok"}catch(Zt){return k(ne,Vt=>Vt.filter(Wt=>Wt.id!==Qe)),r("steer",Zt,{sessionId:ne}),ol(Zt)?"rejected":"uncertain"}finally{W7(ne,jt)}}async function Pe(ne,ke){try{const Ne=await Ct().uploadFile({file:ne,name:ke});return{fileId:Ne.id,name:Ne.name,mediaType:Ne.mediaType}}catch(Te){return r("uploadImage",Te),null}}function bt(ne,ke){const Te=e.activeSessionId;if(!Te)return;const Ne=e.queuedBySession[Te]??[],Qe={text:ne,attachments:ke,id:dxe()};e.queuedBySession={...e.queuedBySession,[Te]:[...Ne,Qe]}}function Lt(ne){const[ke,...Te]=e.queuedBySession[ne]??[];ke!==void 0&&(e.queuedBySession={...e.queuedBySession,[ne]:Te},tn(ne,ke.text,ke.attachments).then(Ne=>{if(Ne==="ok"){p0.delete(ne);return}if(Ne==="uncertain"){p0.delete(ne);return}if(!e.sessions.some(Vt=>Vt.id===ne)){p0.delete(ne);return}const Qe=ke.id??ke.text,ht=p0.get(ne),jt=ht!==void 0&&ht.key===Qe?ht.count+1:1;if(jt>=uxe){p0.delete(ne),(e.queuedBySession[ne]?.length??0)>0&&Lt(ne);return}p0.set(ne,{key:Qe,count:jt});const Zt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[ke,...Zt]}}))}function cn(ne,ke){const Te=e.inFlightBySession[ne]===!0;if(e.inFlightBySession={...e.inFlightBySession,[ne]:!1},e.promptIdBySession[ne]!==void 0){const Qe={...e.promptIdBySession};delete Qe[ne],e.promptIdBySession=Qe}return ne===e.activeSessionId&&te(),(Te||ke?.turnWasActive===!0||(e.turnActiveBySession[ne]??!1))&&Lt(ne),Te}function So(ne,ke){ke.inFlightTurn!==null&&ke.busy||cn(ne)}async function Qo(){const ne=e.activeSessionId;if(!ne)return;const ke=e.sessions.find(Qe=>Qe.id===ne);let Te=e.promptIdBySession[ne];if(Te===void 0){const Qe=ke?.currentPromptId;Qe!==void 0&&Qe.length>0&&!Qe.startsWith("pr_")&&(Te=Qe)}const Ne=Ct();if(Te!==void 0)try{if((await Ne.abortPrompt(ne,Te)).aborted)return;const ht={...e.promptIdBySession};delete ht[ne],e.promptIdBySession=ht}catch(Qe){if(ol(Qe)&&Qe.code===sxe){const ht={...e.promptIdBySession};delete ht[ne],e.promptIdBySession=ht}else{r("abortCurrentPrompt",Qe,{sessionId:ne});return}}try{await Ne.abortSession(ne)}catch(Qe){r("abortCurrentPrompt",Qe,{sessionId:ne})}}function Po(ne,ke){const Te=e.approvalsBySession[ne]??[];e.approvalsBySession={...e.approvalsBySession,[ne]:Te.filter(Ne=>Ne.approvalId!==ke)}}function Xn(ne,ke){const Te=e.questionsBySession[ne]??[];e.questionsBySession={...e.questionsBySession,[ne]:Te.filter(Ne=>Ne.questionId!==ke)}}async function pn(ne,ke){const Te=e.activeSessionId;if(Te&&!o4[ne]){o4[ne]=!0;try{const Ne=Ct(),Qe={decision:ke.decision,scope:ke.scope,feedback:ke.feedback,selectedLabel:ke.selectedLabel};await Ne.respondApproval(Te,ne,Qe),Po(Te,ne)}catch(Ne){Zm(Ne)?Po(Te,ne):r("respondApproval",Ne,{sessionId:Te})}finally{delete o4[ne]}}}async function Us(ne,ke){const Te=e.activeSessionId;if(Te&&!c0[ne]){c0[ne]="answer";try{await Ct().respondQuestion(Te,ne,ke),Xn(Te,ne)}catch(Ne){Zm(Ne)?Xn(Te,ne):r("respondQuestion",Ne,{sessionId:Te})}finally{delete c0[ne]}}}async function mi(ne){const ke=e.activeSessionId;if(ke&&!c0[ne]){c0[ne]="dismiss";try{await Ct().dismissQuestion(ke,ne),Xn(ke,ne)}catch(Te){Zm(Te)?Xn(ke,ne):r("dismissQuestion",Te,{sessionId:ke})}finally{delete c0[ne]}}}async function oi(ne){const ke=e.activeSessionId;if(ke&&!Gm[ne]){Gm[ne]=!0;try{const Te=Ct(),Ne=Wt=>Wt.id===ne||Wt.parentToolCallId===ne;let Qe=(e.tasksBySession[ke]??[]).find(Ne),ht;if(Qe===void 0){let Wt;try{Wt=await Te.listTasks(ke)}catch(Vn){r("detachTask",Vn,{sessionId:ke});return}const on=Wt.find(Ne);if(on===void 0)return;Qe=on,ht=on.id}const jt=Qe;ht??=jt.backgroundTaskId??jt.id;const Zt=await Te.detachTask(ke,ht),Vt=e.tasksBySession[ke]??[];e.tasksBySession={...e.tasksBySession,[ke]:Vt.map(Wt=>Wt.id!==jt.id?Wt:Zt.status==="running"?{...Wt,runInBackground:!0}:{...Wt,status:Zt.status,completedAt:Wt.completedAt??new Date().toISOString(),completedAtEstimated:Wt.completedAt===void 0?!0:Wt.completedAtEstimated})}}catch(Te){JC(Te)||r("detachTask",Te,{sessionId:ke})}finally{delete Gm[ne]}}}async function ql(ne){const ke=e.activeSessionId;if(ke&&!Km[ne]){Km[ne]=!0;try{const Te=Ct(),Ne=(e.tasksBySession[ke]??[]).find(ht=>ht.id===ne)?.backgroundTaskId;await Te.cancelTask(ke,Ne??ne);const Qe=e.tasksBySession[ke]??[];e.tasksBySession={...e.tasksBySession,[ke]:Qe.map(ht=>ht.id===ne?{...ht,status:"cancelled"}:ht)}}catch(Te){JC(Te)||r("cancelTask",Te,{sessionId:ke})}finally{delete Km[ne]}}}function vl(ne){const ke=e.activeSessionId;ke?(e.planModeBySession={...e.planModeBySession,[ke]:ne},H(),L({planMode:ne})):R.planMode=ne}function Zs(){const ne=e.activeSessionId,ke=ne?e.planModeBySession[ne]??!1:R.planMode;vl(!ke)}function yo(ne){const ke=e.activeSessionId;ke?(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[ke]:ne},D(),L({dynamicWorkflowMode:ne})):R.dynamicWorkflowMode=ne}async function Lo(){const ne=e.activeSessionId,Te=!(ne?e.dynamicWorkflowModeBySession[ne]??!1:R.dynamicWorkflowMode);Te&&e.permission==="manual"&&!await o({title:n("workspace.dynamicWorkflowEnableTitle"),message:n("workspace.dynamicWorkflowEnableConfirm"),variant:"primary"})||yo(Te)}function yl(ne){const ke=e.activeSessionId;ke?(e.goalModeBySession={...e.goalModeBySession,[ke]:ne},M()):R.goalMode=ne}function ms(){const ne=e.activeSessionId,ke=ne?e.goalModeBySession[ne]??!1:R.goalMode;yl(!ke)}async function wl(ne){const ke=ne.trim();if(!ke||e.permission==="manual"&&!await o({title:n("workspace.goalStartConfirm",{objective:ke}),variant:"primary"}))return;let Te=e.activeSessionId;if(!Te){const Ne=e.activeWorkspaceId,Qe=Ne&&T.value.some(ht=>ht.id===Ne)?Ne:T.value[0]?.id??null;if(!Qe)return;try{Te=await hs(Qe)??void 0}catch(ht){r("createGoal",ht);return}if(!Te)return}try{await Ct().updateSession(Te,{goalObjective:ke})}catch(Ne){r("createGoal",Ne,{sessionId:Te,message:q(Ne)});return}e.goalModeBySession[Te]&&(e.goalModeBySession={...e.goalModeBySession,[Te]:!1},M()),e.activeSessionId===Te?await eo(ke):await tn(Te,ke)}function gi(ne){const ke=e.activeSessionId;ke&&Promise.resolve(Ct().updateSession(ke,{goalControl:ne})).catch(Te=>{r("controlGoal",Te,{sessionId:ke,message:q(Te)})})}function si(ne){e.permission=ne;const ke=e.activeSessionId;ke&&(e.permissionBySession={...e.permissionBySession,[ke]:ne},L({permissionMode:ne},ke))}function Ul(ne){const ke=[...e.warnings];ke.splice(ne,1),e.warnings=ke}async function Ni(ne,ke){try{await Ct().updateSession(ne,{title:ke}),d(ne,Ne=>({...Ne,title:ke}))}catch(Te){r("renameSession",Te,{sessionId:ne})}}async function Ae(ne){try{const Te=await Ct().generateSessionTitle(ne,{force:!0,source:"digest"});return Te.title.length>0?Te.title:null}catch(ke){return console.warn("[pythinker-web] generateSessionTitle failed for",ne,ke),null}}async function Ie(ne,ke){const Te=e.workspaces.find(Qe=>Qe.id===ne)?.root,Ne=()=>{e.workspaces=e.workspaces.map(Qe=>Qe.id===ne?{...Qe,name:ke}:Qe)};try{if(await Ct().updateWorkspace(ne,{name:ke}),Te!==void 0){const Qe=g3();Te in Qe&&(delete Qe[Te],xk(Qe))}Ne()}catch(Qe){if(Te!==void 0&&ol(Qe)&&Qe.code===ixe){xk({...g3(),[Te]:ke}),Ne();return}r("renameWorkspace",Qe)}}async function At(ne){const ke=e.workspaces.find(ht=>ht.id===ne)?.root??E.value.find(ht=>ht.id===ne)?.root??ne,Te=e.activeSessionId?e.sessions.find(ht=>ht.id===e.activeSessionId):void 0,Ne=e.activeWorkspaceId===ne||e.activeWorkspaceId===ke,Qe=!!(Te&&(Te.cwd===ke||Te.workspaceId===ne||C(Te)===ne));ke&&!e.hiddenWorkspaceRoots.includes(ke)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,ke],Z(e.hiddenWorkspaceRoots));try{await Ct().deleteWorkspace(ne)}catch(ht){console.warn("[pythinker-web] deleteWorkspace registry cleanup failed for",ne,ht)}if(e.workspaces=e.workspaces.filter(ht=>ht.id!==ne&&ht.root!==ke),Ne||Qe){const ht=T.value[0]?.id??null;if(e.activeWorkspaceId=ht,ht)U(ht);else try{y1(dn.activeWorkspace)}catch{}}(Ne||Qe)&&(m(void 0),e.sessionLoading=!1,he(),ot(void 0,"replace"))}async function lt(ne){try{await Ct().archiveSession(ne),h(ne),i.clearSideChatForSession(ne);const{[ne]:Te,...Ne}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=Ne,e.activeSessionId===ne){const Qe=e.sessions[0];Qe?await en(Qe.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))}}catch(ke){r("archiveSession",ke,{sessionId:ne})}}async function mn(ne){if(xe)return!1;const ke=ne??e.activeSessionId;if(!ke){const Ne=n("commands.export.noSession");return _s("export:failed",{status:"no-session"}),r("exportSession",new Error(Ne),{message:Ne}),!1}xe=!0;const Te=Date.now();_s("export:start",{sessionId:ke});try{const Ne=Tge(),{blob:Qe,fileName:ht}=await Ct().exportSession(ke,Ne);if(typeof document>"u")throw new Error("Document is unavailable");const jt=URL.createObjectURL(Qe);let Zt;try{Zt=document.createElement("a"),Zt.href=jt,Zt.download=ht,document.body.append(Zt),Zt.click()}finally{Zt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(jt)}catch{}},0)}return _s("export:accepted",{sessionId:ke,status:"accepted",zipBytes:Qe.size,durationMs:Date.now()-Te}),!0}catch(Ne){const Qe=typeof Ne=="object"&&Ne!==null?Ne:void 0;return _s("export:failed",{sessionId:ke,status:"failed",durationMs:Date.now()-Te,errorName:typeof Qe?.name=="string"?Qe.name:typeof Ne,errorCode:typeof Qe?.code=="number"?Qe.code:void 0,requestId:typeof Qe?.requestId=="string"?Qe.requestId:void 0,phase:typeof Qe?.phase=="string"?Qe.phase:void 0,httpStatus:typeof Qe?.status=="number"?Qe.status:void 0}),r("exportSession",Ne,{sessionId:ke}),!1}finally{xe=!1}}async function Kn(ne){try{const ke=await Ct().restoreSession(ne);return f(ke),!0}catch(ke){return r("restoreSession",ke,{sessionId:ne}),!1}}function to(ne){return Ct().listSessions({archivedOnly:!0,beforeId:ne?.beforeId,pageSize:ne?.pageSize??50})}function Co(ne){const ke=e.activeSessionId;ke&&Ct().compactSession(ke,ne).catch(Te=>{r("compact",Te,{sessionId:ke})})}async function no(ne){const ke=ne??e.activeSessionId;if(ke)try{const Te=await Ct().forkSession(ke);f(Te),await en(Te.id)}catch(Te){r("fork",Te,{sessionId:ke})}}async function Vo(ne=1){const ke=e.activeSessionId;if(!ke)return null;const Te=(()=>{const Ne=e.messagesBySession[ke]??[];for(let Qe=Ne.length-1;Qe>=0;Qe--){const ht=Ne[Qe];if(ht.role==="user"&&!(ht.metadata?.origin&&ht.metadata.origin.kind!=="user"))return ht.content.filter(jt=>jt.type==="text").map(jt=>jt.text).join(` -`)}return null})();try{return await Ct().undoSession(ke,ne),await w(ke),Te}catch(Ne){return r("undo",Ne,{sessionId:ke}),null}}function Qi(ne){const ke=e.activeSessionId;if(!ke)return;const Te=e.queuedBySession[ke]??[];if(ne<0||ne>=Te.length)return;const Ne=[...Te];Ne.splice(ne,1),e.queuedBySession={...e.queuedBySession,[ke]:Ne}}function Os(ne,ke){const Te=e.activeSessionId;if(!Te)return;const Ne=e.queuedBySession[Te]??[];if(ne===ke||ne<0||ne>=Ne.length||ke<0||ke>=Ne.length)return;const Qe=[...Ne],[ht]=Qe.splice(ne,1);ht!==void 0&&(Qe.splice(ke,0,ht),e.queuedBySession={...e.queuedBySession,[Te]:Qe})}async function Ta(ne){const ke=e.activeSessionId;if(!ke)return[];try{return(await Ct().listDirectory(ke,{path:ne,includeGitStatus:!0})).items}catch{return[]}}async function Wo(ne){const ke=e.activeSessionId;if(!ke)return null;try{const Ne=await Ct().readFile(ke,{path:ne});return{path:Ne.path,content:Ne.content,encoding:Ne.encoding,mime:Ne.mime,languageId:Ne.languageId,isBinary:Ne.isBinary,size:Ne.size,lineCount:Ne.lineCount}}catch(Te){return console.warn("[pythinker-web] readFileContent failed for",ne,Te),null}}const zi=10485760;function gs(ne){const ke=e.activeSessionId;return ke?Ct().getFileDownloadUrl(ke,ne):null}async function kl(ne,ke){const Te=e.activeSessionId;if(!Te)return!1;try{return await Ct().openFile(Te,{path:ne,line:ke}),!0}catch(Ne){return r("openFile",Ne,{sessionId:Te}),!1}}async function es(ne){const ke=e.activeSessionId;if(!ke)return;const Te=$.value.cwd||".";try{await Ct().openInApp(ke,ne,Te)}catch(Ne){r("openInApp",Ne,{sessionId:ke})}}async function Hs(ne){const ke=e.activeSessionId;if(!ke)return!1;try{return await Ct().revealFile(ke,{path:ne}),!0}catch(Te){return r("revealFile",Te,{sessionId:ke}),!1}}async function vs(ne,ke){const Te=e.activeSessionId;if(!Te)return!1;try{return await Ct().revealSavedPlan(Te,{agentId:ne,toolCallId:ke}),!0}catch(Ne){return r("revealSavedPlan",Ne,{sessionId:Te}),!1}}async function bl(ne){if(/^(https?:|data:|blob:)/i.test(ne))return ne;const ke=e.activeSessionId;if(!ke)return ne;let Te=ne;if(Te.startsWith("/")){const Ne=e.sessions.find(Qe=>Qe.id===ke)?.cwd;if(Ne&&(Te===Ne||Te.startsWith(Ne.endsWith("/")?Ne:`${Ne}/`))){if(Te=Te.slice(Ne.length).replace(/^\//,""),!Te)return ne}else return ne}try{const Qe=await Ct().readFile(ke,{path:Te,length:zi});return!Qe.isBinary||Qe.encoding!=="base64"||Qe.truncated?ne:`data:${Qe.mime};base64,${Qe.content}`}catch{return ne}}async function Ks(ne){const ke=e.sessions.find(Ne=>Ne.id===e.activeSessionId),Te=ke===void 0?e.activeWorkspaceId:C(ke);if(!Te)return[];try{return(await Ct().searchFiles(Te,{query:ne,limit:20})).items.map(ht=>({path:ht.path,name:ht.name}))}catch{return[]}}return{loadFileDiff:K,clearFileDiff:he,loadGitStatus:ye,checkAuth:ve,loadConfig:et,updateConfig:ge,loadSubagentModelPolicy:de,saveSubagentModelPolicy:Se,clearSubagentModelPolicy:je,listAllSessionsGlobal:kt,load:Nn,refreshServerMeta:Mn,loadWorkspaces:An,loadMoreSessions:Wn,loadAllSessions:Pn,selectWorkspace:Fn,openWorkspace:Qt,upsertWorkspacePreserveOrder:uo,applyWorkspaceEvent:Zn,clearActiveSession:Bo,openWorkspaceDraft:Un,startSessionAndSendPrompt:Io,startSessionAndActivateSkill:Rt,startSessionAndOpenSideChat:Jo,addWorkspaceByPath:Ls,browseFs:$e,getFsHome:Ge,writeSessionUrl:ot,fetchSessionIntoList:dt,onSessionRoutePopState:Mt,bindSessionRoute:Ut,selectSession:en,submitPromptInternal:tn,finishPromptLocal:cn,localTurnStartState:fxe,isLocalTurnSnapshotCurrent:hxe,afterLocalTurnStartsSettle:mxe,handleSessionSnapshot:So,sendPrompt:eo,steerPrompt:Do,steerQueued:st,uploadImage:Pe,enqueue:bt,unqueue:Qi,reorderQueue:Os,abortCurrentPrompt:Qo,respondApproval:pn,respondQuestion:Us,dismissQuestion:mi,pendingQuestionActions:c0,pendingApprovalActions:o4,cancelTask:ql,detachTask:oi,setPlanMode:vl,togglePlanMode:Zs,setDynamicWorkflowMode:yo,toggleDynamicWorkflowMode:Lo,setGoalMode:yl,toggleGoalMode:ms,createGoal:wl,controlGoal:gi,setPermission:si,dismissWarning:Ul,renameSession:Ni,generateSessionTitle:Ae,renameWorkspace:Ie,deleteWorkspace:At,archiveSession:lt,exportSession:mn,restoreSession:Kn,loadArchivedSessions:to,compact:Co,forkSession:no,undo:Vo,listDir:Ta,readFileContent:Wo,getFileDownloadUrl:gs,openWorkspaceFile:kl,openInApp:es,revealWorkspaceFile:Hs,revealSavedPlan:vs,resolveImageUrl:bl,searchFiles:Ks,loadOlderMessages:oe,refreshSessionSidecars:F,isStartingFirstPrompt:()=>br.size>0}}const rz=dn.starredModels,eM=new Error("profile persist failed");function vxe(){try{const e=ls(rz);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function yxe(e){try{Es(rz,JSON.stringify(e))}catch{}}function wxe(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:l,updateSessionMessages:r}=t,a=V([]),c=V(vxe()),u=V({}),d=V({}),f=V([]),p=V([]),h=V(null);function m(Z){if(!(Z==null||Z.length===0))return a.value.find(q=>q.id===Z)??a.value.find(q=>q.model===Z)}function k(){const Z=e.activeSessionId?e.sessions.find(te=>te.id===e.activeSessionId):void 0,q=Z===void 0?h.value??e.defaultModel:Z.model||e.defaultModel;return m(q)?.id??q??void 0}function x(Z){if(Z===void 0)return;const q=m(Z);return q===void 0?void 0:lf(q)}function y(Z,q){const te=Z==null?void 0:e.thinkingBySession[Z];return te!==void 0&&gbe(q,te)?te:lf(q)}function w(Z,q){if(q===void 0)return;const te=m(q);return te===void 0?void 0:y(Z,te)}async function _(Z,q){return Z!=null&&e.thinkingBySession[Z]===void 0&&await o(Z),w(Z,q)}function A(Z){e.thinking=Z;const q=e.activeSessionId;return Z!==void 0&&q!==null&&q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:Z}),Z}Ke([()=>e.activeSessionId,()=>k(),()=>{const Z=e.activeSessionId;return Z==null?void 0:e.thinkingBySession[Z]}],()=>{const Z=m(k());Z!==void 0&&(e.thinking=y(e.activeSessionId,Z))});function P(Z){Ct().setConfig({thinking:vbe(Z,m(k())?.supportEfforts)}).catch(q=>n("setConfig",q))}async function z(Z){try{const te=await Ct().listSkills(Z);u.value={...u.value,[Z]:te}}catch{}}async function L(Z){try{const te=await Ct().listSkillsForWorkspace(Z);d.value={...d.value,[Z]:te}}catch{}}async function E(){try{const Z=Ct();a.value=await Z.listModels();const q=m(k());q!==void 0&&(e.thinking=y(e.activeSessionId,q))}catch(Z){n("loadModels",Z)}}async function T(){try{const Z=Ct();f.value=await Z.listProviders()}catch(Z){n("loadProviders",Z)}}async function $(){try{const Z=Ct();p.value=await Z.listCatalogProviders()}catch(Z){n("loadCatalogProviders",Z)}}async function C(Z){const q=e.activeSessionId,te=m(Z),ee=e.thinking,J=q?e.sessions.find(me=>me.id===q)?.model:void 0,se=k()!==(te?.id??Z),Q=ybe(te,ee,se);if(!q)return h.value=Z,e.thinking=Q,Q!==ee&&Q!==void 0&&P(Q),!0;l(q,me=>({...me,model:Z})),Q!==ee&&(e.thinking=Q,Q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:Q}));try{await Ct().updateSession(q,{model:Z,thinking:Q!==ee?Q:void 0})}catch(me){return l(q,xe=>({...xe,model:J??xe.model})),Q!==ee&&(e.thinking=ee,ee!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:ee})),n("setModel",me,{sessionId:q}),!1}return Q!==ee&&Q!==void 0&&P(Q),await o(q),!0}function j(Z){const q=new Set(c.value);q.has(Z)?q.delete(Z):q.add(Z),c.value=Array.from(q),yxe(c.value)}async function H(Z,q,te){const ee=te??e.activeSessionId;if(!ee)return;const J=i.value==="idle"&&!e.inFlightBySession[ee],se=`msg_skill_opt_${Date.now().toString(36)}`,Q=J?V7(ee):void 0;if(J){e.inFlightBySession={...e.inFlightBySession,[ee]:!0};const me={id:se,sessionId:ee,role:"user",content:[{type:"text",text:`/${Z}${q?` ${q}`:""}`}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:Z,skillArgs:q}}};r(ee,xe=>[...xe,me])}try{const me=e.sessions.find(at=>at.id===ee)?.model,xe=(me&&me.length>0?me:e.defaultModel)??void 0;if(!await s({thinking:await _(ee,xe)??e.thinking},ee))throw eM;await Ct().activateSkill(ee,Z,q)}catch(me){J&&(e.inFlightBySession={...e.inFlightBySession,[ee]:!1},r(ee,xe=>xe.filter(Ye=>Ye.id!==se))),me!==eM&&n("activateSkill",me,{sessionId:ee})}finally{Q!==void 0&&W7(ee,Q)}}async function D(Z){try{await Ct().importCatalogProvider(Z),await Promise.all([T(),E()])}catch(q){n("importCatalogProvider",q)}}async function M(Z){try{await Ct().deleteProvider(Z),await Promise.all([T(),E()])}catch(q){n("deleteProvider",q)}}async function R(Z){try{const q=await Ct().refreshProvider(Z);for(const te of q.failed)n("refreshProvider",new Error(te.reason),{message:te.provider});await Promise.all([T(),E()])}catch(q){n("refreshProvider",q)}}async function O(){try{const Z=await Ct().refreshAllProviders();for(const q of Z.failed)n("refreshAllProviders",new Error(q.reason),{message:q.provider});await Promise.all([T(),E()])}catch(Z){n("refreshAllProviders",Z)}}function U(Z){const q=A(Z);s({thinking:q}),q!==void 0&&P(q)}return{models:a,starredModelIds:c,providers:f,catalogProviders:p,draftModel:h,skillsBySession:u,skillsByWorkspace:d,loadSkillsForSession:z,loadSkillsForWorkspace:L,loadModels:E,loadProviders:T,loadCatalogProviders:$,setModel:C,thinkingLevelForModelId:x,thinkingLevelForSessionId:w,resolveThinkingForPrompt:_,toggleStarModel:j,activateSkill:H,importCatalogProvider:D,addProvider:Z=>D({catalogId:Z.type,apiKey:Z.apiKey,baseUrl:Z.baseUrl}),deleteProvider:M,refreshProvider:R,refreshAllProviders:O,setThinking:U}}const kxe=/^read[_-]?media(?:file)?$/i,bxe=/^data:([^;]+);base64,(.*)$/s,_xe=/^<(image|video|audio)\s+path="([^"]+)">$/,xxe=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,Sxe=/Mime type:\s*([^.\s]+)/i,Cxe=/Size:\s*(\d+)\s*bytes/i,Mxe=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,Axe="Image compressed to fit model limits:",Txe=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function Exe(e){return e.includes(Axe)?e.replace(Txe,""):e}function Ixe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Lxe(e){const t=xxe.exec(e.trim());return t?{kind:t[1],path:Ixe(t[2])}:null}const az=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,$xe=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function Nxe(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return az.test(o)?o:void 0}const zxe=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function Bxe(e){const t=zxe.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=$xe.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&az.test(o)?o:void 0}}function Rxe(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function Pxe(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function Fxe(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const i=s.url;return typeof i=="string"?{kind:n,url:i}:null}function jxe(e,t){if(!kxe.test(e))return;const n=Pxe(t);if(n===null)return;let o,s,i,l,r,a=null;for(const u of n){if(typeof u!="object"||u===null)continue;const d=u;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,h=_xe.exec(p);h&&(s=h[1],o=h[2]);const m=Sxe.exec(p);m?.[1]&&(i=m[1]);const k=Cxe.exec(p);k?.[1]&&(l=Number(k[1]));const x=Mxe.exec(p);x?.[1]&&x[2]&&(r=`${x[1]}x${x[2]}`);continue}const f=Fxe(d);f&&(a=f)}if(a===null)return;const c=bxe.exec(a.url);return c?.[1]&&(i=c[1]),c?.[2]&&(l=Rxe(c[2])),{kind:a.kind??s??"image",url:a.url,path:o,mimeType:i,bytes:Number.isFinite(l)?l:void 0,dimensions:r}}function Oxe(e){if(e!=null){if(typeof e=="string")return e.split(` +`),ht)!=="rejected"||Ne.length===0))return;const Vt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[...Ne,...Vt]}}function st(ne){const ke=e.activeSessionId;if(!ke)return Promise.resolve();const Te=(e.queuedBySession[ke]??[])[ne];if(Te===void 0)return Promise.resolve();const Ne=Te.id??Te.text;return $s(ke,()=>Xe(ke,Ne))}async function Xe(ne,ke){const Te=e.queuedBySession[ne]??[],Ne=Te.findIndex(Wt=>(Wt.id??Wt.text)===ke),Qe=Ne>=0?Te[Ne]:void 0;if(Qe===void 0)return;const ht=Qe.attachments??[];if(Qe.text.trim().length===0&&ht.length===0)return;const jt=[...Te];if(jt.splice(Ne,1),e.queuedBySession={...e.queuedBySession,[ne]:jt},await qe(ne,Qe.text,ht)!=="rejected"||!e.sessions.some(Wt=>Wt.id===ne))return;const Vt=[...e.queuedBySession[ne]??[]];Vt.splice(Math.min(Ne,Vt.length),0,Qe),e.queuedBySession={...e.queuedBySession,[ne]:Vt}}async function qe(ne,ke,Te){if(a.value==="idle"&&!e.inFlightBySession[ne])return tn(ne,ke,Te);const Ne=[];ke&&Ne.push({type:"text",text:ke});for(const Zt of Te)Zt.kind==="video"?Ne.push({type:"video",source:{kind:"file",fileId:Zt.fileId}}):Zt.kind==="file"?Ne.push({type:"file",fileId:Zt.fileId,name:Zt.name??"",mediaType:Zt.mediaType||"application/octet-stream",size:Zt.size??0}):Ne.push({type:"image",source:{kind:"file",fileId:Zt.fileId}});const Qe=x(),ht={id:Qe,sessionId:ne,role:"user",content:Ne,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ne,Zt=>[...Zt,ht]);const jt=W7(ne);try{const Zt=Ct(),Vt=e.sessions.find(Vn=>Vn.id===ne),Wt=(Vt?.model&&Vt.model.length>0?Vt.model:e.defaultModel)??void 0,on=await Zt.submitPrompt(ne,{content:Ne,model:Wt,thinking:await l.resolveThinkingForPrompt(ne,Wt)??e.thinking,permissionMode:X(ne),planMode:e.planModeBySession[ne]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[ne]??!1});if(k(ne,Vn=>{const Ht=Vn.findIndex(zn=>zn.id===Qe);if(Ht===-1)return Vn;const Tn=[...Vn];return Tn[Ht]={...Tn[Ht],promptId:Tn[Ht].promptId??on.promptId},Tn}),on.status!=="queued")return e.promptIdBySession={...e.promptIdBySession,[ne]:on.promptId},y()?.bindNextPromptId(ne,on.promptId),"ok";try{await Zt.steerPrompts(ne,[on.promptId])}catch{return"ok"}return"ok"}catch(Zt){return k(ne,Vt=>Vt.filter(Wt=>Wt.id!==Qe)),r("steer",Zt,{sessionId:ne}),ol(Zt)?"rejected":"uncertain"}finally{q7(ne,jt)}}async function Pe(ne,ke){try{const Ne=await Ct().uploadFile({file:ne,name:ke});return{fileId:Ne.id,name:Ne.name,mediaType:Ne.mediaType}}catch(Te){return r("uploadImage",Te),null}}function bt(ne,ke){const Te=e.activeSessionId;if(!Te)return;const Ne=e.queuedBySession[Te]??[],Qe={text:ne,attachments:ke,id:dxe()};e.queuedBySession={...e.queuedBySession,[Te]:[...Ne,Qe]}}function Lt(ne){const[ke,...Te]=e.queuedBySession[ne]??[];ke!==void 0&&(e.queuedBySession={...e.queuedBySession,[ne]:Te},tn(ne,ke.text,ke.attachments).then(Ne=>{if(Ne==="ok"){p0.delete(ne);return}if(Ne==="uncertain"){p0.delete(ne);return}if(!e.sessions.some(Vt=>Vt.id===ne)){p0.delete(ne);return}const Qe=ke.id??ke.text,ht=p0.get(ne),jt=ht!==void 0&&ht.key===Qe?ht.count+1:1;if(jt>=uxe){p0.delete(ne),(e.queuedBySession[ne]?.length??0)>0&&Lt(ne);return}p0.set(ne,{key:Qe,count:jt});const Zt=e.queuedBySession[ne]??[];e.queuedBySession={...e.queuedBySession,[ne]:[ke,...Zt]}}))}function cn(ne,ke){const Te=e.inFlightBySession[ne]===!0;if(e.inFlightBySession={...e.inFlightBySession,[ne]:!1},e.promptIdBySession[ne]!==void 0){const Qe={...e.promptIdBySession};delete Qe[ne],e.promptIdBySession=Qe}return ne===e.activeSessionId&&te(),(Te||ke?.turnWasActive===!0||(e.turnActiveBySession[ne]??!1))&&Lt(ne),Te}function So(ne,ke){ke.inFlightTurn!==null&&ke.busy||cn(ne)}async function Qo(){const ne=e.activeSessionId;if(!ne)return;const ke=e.sessions.find(Qe=>Qe.id===ne);let Te=e.promptIdBySession[ne];if(Te===void 0){const Qe=ke?.currentPromptId;Qe!==void 0&&Qe.length>0&&!Qe.startsWith("pr_")&&(Te=Qe)}const Ne=Ct();if(Te!==void 0)try{if((await Ne.abortPrompt(ne,Te)).aborted)return;const ht={...e.promptIdBySession};delete ht[ne],e.promptIdBySession=ht}catch(Qe){if(ol(Qe)&&Qe.code===sxe){const ht={...e.promptIdBySession};delete ht[ne],e.promptIdBySession=ht}else{r("abortCurrentPrompt",Qe,{sessionId:ne});return}}try{await Ne.abortSession(ne)}catch(Qe){r("abortCurrentPrompt",Qe,{sessionId:ne})}}function Po(ne,ke){const Te=e.approvalsBySession[ne]??[];e.approvalsBySession={...e.approvalsBySession,[ne]:Te.filter(Ne=>Ne.approvalId!==ke)}}function Xn(ne,ke){const Te=e.questionsBySession[ne]??[];e.questionsBySession={...e.questionsBySession,[ne]:Te.filter(Ne=>Ne.questionId!==ke)}}async function pn(ne,ke){const Te=e.activeSessionId;if(Te&&!o4[ne]){o4[ne]=!0;try{const Ne=Ct(),Qe={decision:ke.decision,scope:ke.scope,feedback:ke.feedback,selectedLabel:ke.selectedLabel};await Ne.respondApproval(Te,ne,Qe),Po(Te,ne)}catch(Ne){Km(Ne)?Po(Te,ne):r("respondApproval",Ne,{sessionId:Te})}finally{delete o4[ne]}}}async function Us(ne,ke){const Te=e.activeSessionId;if(Te&&!c0[ne]){c0[ne]="answer";try{await Ct().respondQuestion(Te,ne,ke),Xn(Te,ne)}catch(Ne){Km(Ne)?Xn(Te,ne):r("respondQuestion",Ne,{sessionId:Te})}finally{delete c0[ne]}}}async function mi(ne){const ke=e.activeSessionId;if(ke&&!c0[ne]){c0[ne]="dismiss";try{await Ct().dismissQuestion(ke,ne),Xn(ke,ne)}catch(Te){Km(Te)?Xn(ke,ne):r("dismissQuestion",Te,{sessionId:ke})}finally{delete c0[ne]}}}async function oi(ne){const ke=e.activeSessionId;if(ke&&!Ym[ne]){Ym[ne]=!0;try{const Te=Ct(),Ne=Wt=>Wt.id===ne||Wt.parentToolCallId===ne;let Qe=(e.tasksBySession[ke]??[]).find(Ne),ht;if(Qe===void 0){let Wt;try{Wt=await Te.listTasks(ke)}catch(Vn){r("detachTask",Vn,{sessionId:ke});return}const on=Wt.find(Ne);if(on===void 0)return;Qe=on,ht=on.id}const jt=Qe;ht??=jt.backgroundTaskId??jt.id;const Zt=await Te.detachTask(ke,ht),Vt=e.tasksBySession[ke]??[];e.tasksBySession={...e.tasksBySession,[ke]:Vt.map(Wt=>Wt.id!==jt.id?Wt:Zt.status==="running"?{...Wt,runInBackground:!0}:{...Wt,status:Zt.status,completedAt:Wt.completedAt??new Date().toISOString(),completedAtEstimated:Wt.completedAt===void 0?!0:Wt.completedAtEstimated})}}catch(Te){QC(Te)||r("detachTask",Te,{sessionId:ke})}finally{delete Ym[ne]}}}async function ql(ne){const ke=e.activeSessionId;if(ke&&!Gm[ne]){Gm[ne]=!0;try{const Te=Ct(),Ne=(e.tasksBySession[ke]??[]).find(ht=>ht.id===ne)?.backgroundTaskId;await Te.cancelTask(ke,Ne??ne);const Qe=e.tasksBySession[ke]??[];e.tasksBySession={...e.tasksBySession,[ke]:Qe.map(ht=>ht.id===ne?{...ht,status:"cancelled"}:ht)}}catch(Te){QC(Te)||r("cancelTask",Te,{sessionId:ke})}finally{delete Gm[ne]}}}function vl(ne){const ke=e.activeSessionId;ke?(e.planModeBySession={...e.planModeBySession,[ke]:ne},H(),L({planMode:ne})):R.planMode=ne}function Zs(){const ne=e.activeSessionId,ke=ne?e.planModeBySession[ne]??!1:R.planMode;vl(!ke)}function yo(ne){const ke=e.activeSessionId;ke?(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[ke]:ne},D(),L({dynamicWorkflowMode:ne})):R.dynamicWorkflowMode=ne}async function Lo(){const ne=e.activeSessionId,Te=!(ne?e.dynamicWorkflowModeBySession[ne]??!1:R.dynamicWorkflowMode);Te&&e.permission==="manual"&&!await o({title:n("workspace.dynamicWorkflowEnableTitle"),message:n("workspace.dynamicWorkflowEnableConfirm"),variant:"primary"})||yo(Te)}function yl(ne){const ke=e.activeSessionId;ke?(e.goalModeBySession={...e.goalModeBySession,[ke]:ne},M()):R.goalMode=ne}function ms(){const ne=e.activeSessionId,ke=ne?e.goalModeBySession[ne]??!1:R.goalMode;yl(!ke)}async function wl(ne){const ke=ne.trim();if(!ke||e.permission==="manual"&&!await o({title:n("workspace.goalStartConfirm",{objective:ke}),variant:"primary"}))return;let Te=e.activeSessionId;if(!Te){const Ne=e.activeWorkspaceId,Qe=Ne&&I.value.some(ht=>ht.id===Ne)?Ne:I.value[0]?.id??null;if(!Qe)return;try{Te=await hs(Qe)??void 0}catch(ht){r("createGoal",ht);return}if(!Te)return}try{await Ct().updateSession(Te,{goalObjective:ke})}catch(Ne){r("createGoal",Ne,{sessionId:Te,message:q(Ne)});return}e.goalModeBySession[Te]&&(e.goalModeBySession={...e.goalModeBySession,[Te]:!1},M()),e.activeSessionId===Te?await eo(ke):await tn(Te,ke)}function gi(ne){const ke=e.activeSessionId;ke&&Promise.resolve(Ct().updateSession(ke,{goalControl:ne})).catch(Te=>{r("controlGoal",Te,{sessionId:ke,message:q(Te)})})}function si(ne){e.permission=ne;const ke=e.activeSessionId;ke&&(e.permissionBySession={...e.permissionBySession,[ke]:ne},L({permissionMode:ne},ke))}function Ul(ne){const ke=[...e.warnings];ke.splice(ne,1),e.warnings=ke}async function Ni(ne,ke){try{await Ct().updateSession(ne,{title:ke}),d(ne,Ne=>({...Ne,title:ke}))}catch(Te){r("renameSession",Te,{sessionId:ne})}}async function Ae(ne){try{const Te=await Ct().generateSessionTitle(ne,{force:!0,source:"digest"});return Te.title.length>0?Te.title:null}catch(ke){return console.warn("[pythinker-web] generateSessionTitle failed for",ne,ke),null}}async function Ie(ne,ke){const Te=e.workspaces.find(Qe=>Qe.id===ne)?.root,Ne=()=>{e.workspaces=e.workspaces.map(Qe=>Qe.id===ne?{...Qe,name:ke}:Qe)};try{if(await Ct().updateWorkspace(ne,{name:ke}),Te!==void 0){const Qe=g3();Te in Qe&&(delete Qe[Te],Sk(Qe))}Ne()}catch(Qe){if(Te!==void 0&&ol(Qe)&&Qe.code===ixe){Sk({...g3(),[Te]:ke}),Ne();return}r("renameWorkspace",Qe)}}async function At(ne){const ke=e.workspaces.find(ht=>ht.id===ne)?.root??T.value.find(ht=>ht.id===ne)?.root??ne,Te=e.activeSessionId?e.sessions.find(ht=>ht.id===e.activeSessionId):void 0,Ne=e.activeWorkspaceId===ne||e.activeWorkspaceId===ke,Qe=!!(Te&&(Te.cwd===ke||Te.workspaceId===ne||C(Te)===ne));ke&&!e.hiddenWorkspaceRoots.includes(ke)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,ke],Z(e.hiddenWorkspaceRoots));try{await Ct().deleteWorkspace(ne)}catch(ht){console.warn("[pythinker-web] deleteWorkspace registry cleanup failed for",ne,ht)}if(e.workspaces=e.workspaces.filter(ht=>ht.id!==ne&&ht.root!==ke),Ne||Qe){const ht=I.value[0]?.id??null;if(e.activeWorkspaceId=ht,ht)U(ht);else try{y1(dn.activeWorkspace)}catch{}}(Ne||Qe)&&(m(void 0),e.sessionLoading=!1,he(),ot(void 0,"replace"))}async function lt(ne){try{await Ct().archiveSession(ne),h(ne),i.clearSideChatForSession(ne);const{[ne]:Te,...Ne}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=Ne,e.activeSessionId===ne){const Qe=e.sessions[0];Qe?await en(Qe.id,{urlMode:"replace"}):(m(void 0),ot(void 0,"replace"))}}catch(ke){r("archiveSession",ke,{sessionId:ne})}}async function mn(ne){if(xe)return!1;const ke=ne??e.activeSessionId;if(!ke){const Ne=n("commands.export.noSession");return _s("export:failed",{status:"no-session"}),r("exportSession",new Error(Ne),{message:Ne}),!1}xe=!0;const Te=Date.now();_s("export:start",{sessionId:ke});try{const Ne=Ege(),{blob:Qe,fileName:ht}=await Ct().exportSession(ke,Ne);if(typeof document>"u")throw new Error("Document is unavailable");const jt=URL.createObjectURL(Qe);let Zt;try{Zt=document.createElement("a"),Zt.href=jt,Zt.download=ht,document.body.append(Zt),Zt.click()}finally{Zt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(jt)}catch{}},0)}return _s("export:accepted",{sessionId:ke,status:"accepted",zipBytes:Qe.size,durationMs:Date.now()-Te}),!0}catch(Ne){const Qe=typeof Ne=="object"&&Ne!==null?Ne:void 0;return _s("export:failed",{sessionId:ke,status:"failed",durationMs:Date.now()-Te,errorName:typeof Qe?.name=="string"?Qe.name:typeof Ne,errorCode:typeof Qe?.code=="number"?Qe.code:void 0,requestId:typeof Qe?.requestId=="string"?Qe.requestId:void 0,phase:typeof Qe?.phase=="string"?Qe.phase:void 0,httpStatus:typeof Qe?.status=="number"?Qe.status:void 0}),r("exportSession",Ne,{sessionId:ke}),!1}finally{xe=!1}}async function Kn(ne){try{const ke=await Ct().restoreSession(ne);return f(ke),!0}catch(ke){return r("restoreSession",ke,{sessionId:ne}),!1}}function to(ne){return Ct().listSessions({archivedOnly:!0,beforeId:ne?.beforeId,pageSize:ne?.pageSize??50})}function Co(ne){const ke=e.activeSessionId;ke&&Ct().compactSession(ke,ne).catch(Te=>{r("compact",Te,{sessionId:ke})})}async function no(ne){const ke=ne??e.activeSessionId;if(ke)try{const Te=await Ct().forkSession(ke);f(Te),await en(Te.id)}catch(Te){r("fork",Te,{sessionId:ke})}}async function Vo(ne=1){const ke=e.activeSessionId;if(!ke)return null;const Te=(()=>{const Ne=e.messagesBySession[ke]??[];for(let Qe=Ne.length-1;Qe>=0;Qe--){const ht=Ne[Qe];if(ht.role==="user"&&!(ht.metadata?.origin&&ht.metadata.origin.kind!=="user"))return ht.content.filter(jt=>jt.type==="text").map(jt=>jt.text).join(` +`)}return null})();try{return await Ct().undoSession(ke,ne),await w(ke),Te}catch(Ne){return r("undo",Ne,{sessionId:ke}),null}}function Qi(ne){const ke=e.activeSessionId;if(!ke)return;const Te=e.queuedBySession[ke]??[];if(ne<0||ne>=Te.length)return;const Ne=[...Te];Ne.splice(ne,1),e.queuedBySession={...e.queuedBySession,[ke]:Ne}}function Os(ne,ke){const Te=e.activeSessionId;if(!Te)return;const Ne=e.queuedBySession[Te]??[];if(ne===ke||ne<0||ne>=Ne.length||ke<0||ke>=Ne.length)return;const Qe=[...Ne],[ht]=Qe.splice(ne,1);ht!==void 0&&(Qe.splice(ke,0,ht),e.queuedBySession={...e.queuedBySession,[Te]:Qe})}async function Ta(ne){const ke=e.activeSessionId;if(!ke)return[];try{return(await Ct().listDirectory(ke,{path:ne,includeGitStatus:!0})).items}catch{return[]}}async function Wo(ne){const ke=e.activeSessionId;if(!ke)return null;try{const Ne=await Ct().readFile(ke,{path:ne});return{path:Ne.path,content:Ne.content,encoding:Ne.encoding,mime:Ne.mime,languageId:Ne.languageId,isBinary:Ne.isBinary,size:Ne.size,lineCount:Ne.lineCount}}catch(Te){return console.warn("[pythinker-web] readFileContent failed for",ne,Te),null}}const zi=10485760;function gs(ne){const ke=e.activeSessionId;return ke?Ct().getFileDownloadUrl(ke,ne):null}async function kl(ne,ke){const Te=e.activeSessionId;if(!Te)return!1;try{return await Ct().openFile(Te,{path:ne,line:ke}),!0}catch(Ne){return r("openFile",Ne,{sessionId:Te}),!1}}async function es(ne){const ke=e.activeSessionId;if(!ke)return;const Te=N.value.cwd||".";try{await Ct().openInApp(ke,ne,Te)}catch(Ne){r("openInApp",Ne,{sessionId:ke})}}async function Hs(ne){const ke=e.activeSessionId;if(!ke)return!1;try{return await Ct().revealFile(ke,{path:ne}),!0}catch(Te){return r("revealFile",Te,{sessionId:ke}),!1}}async function vs(ne,ke){const Te=e.activeSessionId;if(!Te)return!1;try{return await Ct().revealSavedPlan(Te,{agentId:ne,toolCallId:ke}),!0}catch(Ne){return r("revealSavedPlan",Ne,{sessionId:Te}),!1}}async function bl(ne){if(/^(https?:|data:|blob:)/i.test(ne))return ne;const ke=e.activeSessionId;if(!ke)return ne;let Te=ne;if(Te.startsWith("/")){const Ne=e.sessions.find(Qe=>Qe.id===ke)?.cwd;if(Ne&&(Te===Ne||Te.startsWith(Ne.endsWith("/")?Ne:`${Ne}/`))){if(Te=Te.slice(Ne.length).replace(/^\//,""),!Te)return ne}else return ne}try{const Qe=await Ct().readFile(ke,{path:Te,length:zi});return!Qe.isBinary||Qe.encoding!=="base64"||Qe.truncated?ne:`data:${Qe.mime};base64,${Qe.content}`}catch{return ne}}async function Ks(ne){const ke=e.sessions.find(Ne=>Ne.id===e.activeSessionId),Te=ke===void 0?e.activeWorkspaceId:C(ke);if(!Te)return[];try{return(await Ct().searchFiles(Te,{query:ne,limit:20})).items.map(ht=>({path:ht.path,name:ht.name}))}catch{return[]}}return{loadFileDiff:K,clearFileDiff:he,loadGitStatus:ye,checkAuth:ve,loadConfig:et,updateConfig:ge,loadSubagentModelPolicy:de,saveSubagentModelPolicy:Se,clearSubagentModelPolicy:je,listAllSessionsGlobal:kt,load:Nn,refreshServerMeta:Mn,loadWorkspaces:An,loadMoreSessions:Wn,loadAllSessions:Pn,selectWorkspace:Fn,openWorkspace:Qt,upsertWorkspacePreserveOrder:uo,applyWorkspaceEvent:Zn,clearActiveSession:Bo,openWorkspaceDraft:Un,startSessionAndSendPrompt:Io,startSessionAndActivateSkill:Rt,startSessionAndOpenSideChat:Jo,addWorkspaceByPath:Ls,browseFs:$e,getFsHome:Ge,writeSessionUrl:ot,fetchSessionIntoList:dt,onSessionRoutePopState:Mt,bindSessionRoute:Ut,selectSession:en,submitPromptInternal:tn,finishPromptLocal:cn,localTurnStartState:fxe,isLocalTurnSnapshotCurrent:hxe,afterLocalTurnStartsSettle:mxe,handleSessionSnapshot:So,sendPrompt:eo,steerPrompt:Do,steerQueued:st,uploadImage:Pe,enqueue:bt,unqueue:Qi,reorderQueue:Os,abortCurrentPrompt:Qo,respondApproval:pn,respondQuestion:Us,dismissQuestion:mi,pendingQuestionActions:c0,pendingApprovalActions:o4,cancelTask:ql,detachTask:oi,setPlanMode:vl,togglePlanMode:Zs,setDynamicWorkflowMode:yo,toggleDynamicWorkflowMode:Lo,setGoalMode:yl,toggleGoalMode:ms,createGoal:wl,controlGoal:gi,setPermission:si,dismissWarning:Ul,renameSession:Ni,generateSessionTitle:Ae,renameWorkspace:Ie,deleteWorkspace:At,archiveSession:lt,exportSession:mn,restoreSession:Kn,loadArchivedSessions:to,compact:Co,forkSession:no,undo:Vo,listDir:Ta,readFileContent:Wo,getFileDownloadUrl:gs,openWorkspaceFile:kl,openInApp:es,revealWorkspaceFile:Hs,revealSavedPlan:vs,resolveImageUrl:bl,searchFiles:Ks,loadOlderMessages:oe,refreshSessionSidecars:j,isStartingFirstPrompt:()=>br.size>0}}const az=dn.starredModels,tM=new Error("profile persist failed");function vxe(){try{const e=ls(az);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function yxe(e){try{Es(az,JSON.stringify(e))}catch{}}function wxe(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:l,updateSessionMessages:r}=t,a=V([]),c=V(vxe()),u=V({}),d=V({}),f=V([]),p=V([]),h=V(null);function m(Z){if(!(Z==null||Z.length===0))return a.value.find(q=>q.id===Z)??a.value.find(q=>q.model===Z)}function k(){const Z=e.activeSessionId?e.sessions.find(te=>te.id===e.activeSessionId):void 0,q=Z===void 0?h.value??e.defaultModel:Z.model||e.defaultModel;return m(q)?.id??q??void 0}function x(Z){if(Z===void 0)return;const q=m(Z);return q===void 0?void 0:lf(q)}function y(Z,q){const te=Z==null?void 0:e.thinkingBySession[Z];return te!==void 0&&vbe(q,te)?te:lf(q)}function w(Z,q){if(q===void 0)return;const te=m(q);return te===void 0?void 0:y(Z,te)}async function _(Z,q){return Z!=null&&e.thinkingBySession[Z]===void 0&&await o(Z),w(Z,q)}function A(Z){e.thinking=Z;const q=e.activeSessionId;return Z!==void 0&&q!==null&&q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:Z}),Z}Ke([()=>e.activeSessionId,()=>k(),()=>{const Z=e.activeSessionId;return Z==null?void 0:e.thinkingBySession[Z]}],()=>{const Z=m(k());Z!==void 0&&(e.thinking=y(e.activeSessionId,Z))});function P(Z){Ct().setConfig({thinking:ybe(Z,m(k())?.supportEfforts)}).catch(q=>n("setConfig",q))}async function z(Z){try{const te=await Ct().listSkills(Z);u.value={...u.value,[Z]:te}}catch{}}async function L(Z){try{const te=await Ct().listSkillsForWorkspace(Z);d.value={...d.value,[Z]:te}}catch{}}async function T(){try{const Z=Ct();a.value=await Z.listModels();const q=m(k());q!==void 0&&(e.thinking=y(e.activeSessionId,q))}catch(Z){n("loadModels",Z)}}async function I(){try{const Z=Ct();f.value=await Z.listProviders()}catch(Z){n("loadProviders",Z)}}async function N(){try{const Z=Ct();p.value=await Z.listCatalogProviders()}catch(Z){n("loadCatalogProviders",Z)}}async function C(Z){const q=e.activeSessionId,te=m(Z),ee=e.thinking,J=q?e.sessions.find(me=>me.id===q)?.model:void 0,se=k()!==(te?.id??Z),Q=wbe(te,ee,se);if(!q)return h.value=Z,e.thinking=Q,Q!==ee&&Q!==void 0&&P(Q),!0;l(q,me=>({...me,model:Z})),Q!==ee&&(e.thinking=Q,Q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:Q}));try{await Ct().updateSession(q,{model:Z,thinking:Q!==ee?Q:void 0})}catch(me){return l(q,xe=>({...xe,model:J??xe.model})),Q!==ee&&(e.thinking=ee,ee!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[q]:ee})),n("setModel",me,{sessionId:q}),!1}return Q!==ee&&Q!==void 0&&P(Q),await o(q),!0}function F(Z){const q=new Set(c.value);q.has(Z)?q.delete(Z):q.add(Z),c.value=Array.from(q),yxe(c.value)}async function H(Z,q,te){const ee=te??e.activeSessionId;if(!ee)return;const J=i.value==="idle"&&!e.inFlightBySession[ee],se=`msg_skill_opt_${Date.now().toString(36)}`,Q=J?W7(ee):void 0;if(J){e.inFlightBySession={...e.inFlightBySession,[ee]:!0};const me={id:se,sessionId:ee,role:"user",content:[{type:"text",text:`/${Z}${q?` ${q}`:""}`}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:Z,skillArgs:q}}};r(ee,xe=>[...xe,me])}try{const me=e.sessions.find(at=>at.id===ee)?.model,xe=(me&&me.length>0?me:e.defaultModel)??void 0;if(!await s({thinking:await _(ee,xe)??e.thinking},ee))throw tM;await Ct().activateSkill(ee,Z,q)}catch(me){J&&(e.inFlightBySession={...e.inFlightBySession,[ee]:!1},r(ee,xe=>xe.filter(Ye=>Ye.id!==se))),me!==tM&&n("activateSkill",me,{sessionId:ee})}finally{Q!==void 0&&q7(ee,Q)}}async function D(Z){try{await Ct().importCatalogProvider(Z),await Promise.all([I(),T()])}catch(q){n("importCatalogProvider",q)}}async function M(Z){try{await Ct().deleteProvider(Z),await Promise.all([I(),T()])}catch(q){n("deleteProvider",q)}}async function R(Z){try{const q=await Ct().refreshProvider(Z);for(const te of q.failed)n("refreshProvider",new Error(te.reason),{message:te.provider});await Promise.all([I(),T()])}catch(q){n("refreshProvider",q)}}async function O(){try{const Z=await Ct().refreshAllProviders();for(const q of Z.failed)n("refreshAllProviders",new Error(q.reason),{message:q.provider});await Promise.all([I(),T()])}catch(Z){n("refreshAllProviders",Z)}}function U(Z){const q=A(Z);s({thinking:q}),q!==void 0&&P(q)}return{models:a,starredModelIds:c,providers:f,catalogProviders:p,draftModel:h,skillsBySession:u,skillsByWorkspace:d,loadSkillsForSession:z,loadSkillsForWorkspace:L,loadModels:T,loadProviders:I,loadCatalogProviders:N,setModel:C,thinkingLevelForModelId:x,thinkingLevelForSessionId:w,resolveThinkingForPrompt:_,toggleStarModel:F,activateSkill:H,importCatalogProvider:D,addProvider:Z=>D({catalogId:Z.type,apiKey:Z.apiKey,baseUrl:Z.baseUrl}),deleteProvider:M,refreshProvider:R,refreshAllProviders:O,setThinking:U}}const kxe=/^read[_-]?media(?:file)?$/i,bxe=/^data:([^;]+);base64,(.*)$/s,_xe=/^<(image|video|audio)\s+path="([^"]+)">$/,xxe=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,Sxe=/Mime type:\s*([^.\s]+)/i,Cxe=/Size:\s*(\d+)\s*bytes/i,Mxe=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,Axe="Image compressed to fit model limits:",Txe=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function Exe(e){return e.includes(Axe)?e.replace(Txe,""):e}function Ixe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Lxe(e){const t=xxe.exec(e.trim());return t?{kind:t[1],path:Ixe(t[2])}:null}const cz=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,$xe=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function Nxe(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return cz.test(o)?o:void 0}const zxe=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function Bxe(e){const t=zxe.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=$xe.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&cz.test(o)?o:void 0}}function Rxe(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function Pxe(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function Fxe(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const i=s.url;return typeof i=="string"?{kind:n,url:i}:null}function jxe(e,t){if(!kxe.test(e))return;const n=Pxe(t);if(n===null)return;let o,s,i,l,r,a=null;for(const u of n){if(typeof u!="object"||u===null)continue;const d=u;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,h=_xe.exec(p);h&&(s=h[1],o=h[2]);const m=Sxe.exec(p);m?.[1]&&(i=m[1]);const k=Cxe.exec(p);k?.[1]&&(l=Number(k[1]));const x=Mxe.exec(p);x?.[1]&&x[2]&&(r=`${x[1]}x${x[2]}`);continue}const f=Fxe(d);f&&(a=f)}if(a===null)return;const c=bxe.exec(a.url);return c?.[1]&&(i=c[1]),c?.[2]&&(l=Rxe(c[2])),{kind:a.kind??s??"image",url:a.url,path:o,mimeType:i,bytes:Number.isFinite(l)?l:void 0,dimensions:r}}function Oxe(e){if(e!=null){if(typeof e=="string")return e.split(` `);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` `));else if(n&&typeof n=="object"){const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` `)):o.type==="think"&&typeof o.think=="string"?t.push(...o.think.split(` `)):o.type==="image_url"||o.type==="image"?t.push("[image]"):typeof o.type=="string"?t.push(`[${o.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function Hxe(e){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.subagentPhase??(e.status==="completed"?"completed":e.status==="failed"?"failed":"working"),status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,dynamicWorkflowIndex:e.dynamicWorkflowIndex}}function Dxe(e,t){const n=e.split(` `),o=t.split(` -`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function Vxe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:Dxe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command")return{kind:"shell",command:typeof t.command=="string"?t.command:e.action,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:void 0};if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}const cz={};function Wxe(e){const t=` +`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function Vxe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:Dxe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command")return{kind:"shell",command:typeof t.command=="string"?t.command:e.action,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:void 0};if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}const uz={};function Wxe(e){const t=` `,n=` `,o=e.indexOf(t),s=e.lastIndexOf(n);return o>=0&&s>=o+t.length?e.slice(o+t.length,s):qxe(e)}function qxe(e){const t=e.split(` `);return t.length>=2&&t[0]?.startsWith(""?t.slice(1,-1).join(` `):e}function Uxe(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function Zxe(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` -`);return Wxe(t)}function Kxe(e,t){const n=e.metadata?.origin??{},o=Zxe(e);return t==="cron_missed"?{text:o,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:o,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function Gxe(e,t,n){const{text:o,cron:s}=Kxe(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function Yxe(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function B9(e){return e.metadata?.origin?.kind==="compaction_summary"}function Xxe(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function Jxe(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function Qxe(e){let t="",n="";const o=[],s=[];for(const i of e)i.type==="text"?t+=i.text:i.type==="thinking"?n+=i.thinking:i.type==="toolUse"?o.push(i.toolCallId):s.push(JSON.stringify(i));return o.sort(),s.sort(),{text:t,thinking:n,toolIds:o,rest:s}}function eSe(e,t){return t.text!==""&&t.text!==e.text||t.thinking!==""&&t.thinking!==e.thinking?!1:t.toolIds.every(n=>e.toolIds.includes(n))&&t.rest.every(n=>e.rest.includes(n))}function M2(e,t,n,o=!0,s=cz){const i=[];let l=1;const r=new Map;for(const p of t)r.set(p.toolCallId,p);let a=null;function c(p=!1){if(!a)return;const h=a;if(a=null,!p||!o)for(let m=0;mw.kind==="tool"&&w.tool.id===x.id);y&&y.kind==="tool"&&(y.tool=x)}i.push({id:h.id,role:"assistant",no:l++,text:h.textParts.join(` +`);return Wxe(t)}function Kxe(e,t){const n=e.metadata?.origin??{},o=Zxe(e);return t==="cron_missed"?{text:o,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:o,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function Gxe(e,t,n){const{text:o,cron:s}=Kxe(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function Yxe(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function R9(e){return e.metadata?.origin?.kind==="compaction_summary"}function Xxe(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function Jxe(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function Qxe(e){let t="",n="";const o=[],s=[];for(const i of e)i.type==="text"?t+=i.text:i.type==="thinking"?n+=i.thinking:i.type==="toolUse"?o.push(i.toolCallId):s.push(JSON.stringify(i));return o.sort(),s.sort(),{text:t,thinking:n,toolIds:o,rest:s}}function eSe(e,t){return t.text!==""&&t.text!==e.text||t.thinking!==""&&t.thinking!==e.thinking?!1:t.toolIds.every(n=>e.toolIds.includes(n))&&t.rest.every(n=>e.rest.includes(n))}function M2(e,t,n,o=!0,s=uz){const i=[];let l=1;const r=new Map;for(const p of t)r.set(p.toolCallId,p);let a=null;function c(p=!1){if(!a)return;const h=a;if(a=null,!p||!o)for(let m=0;mw.kind==="tool"&&w.tool.id===x.id);y&&y.kind==="tool"&&(y.tool=x)}i.push({id:h.id,role:"assistant",no:l++,text:h.textParts.join(` `),thinking:h.thinkingParts.length>0?h.thinkingParts.join(` `):void 0,tools:h.tools.length>0?h.tools:void 0,blocks:h.blocks.length>0?h.blocks:void 0,approval:h.approval,approvalId:h.approvalId,durationMs:h.durationMs})}function u(p,h){for(const m of h)if(m.type==="text"){if(m.text){p.textParts.push(m.text);const k=p.blocks.at(-1);k&&k.kind==="text"?k.text+=` `+m.text:p.blocks.push({kind:"text",text:m.text})}}else if(m.type==="thinking"){if(m.thinking){p.thinkingParts.push(m.thinking);const k=p.blocks.at(-1);k&&k.kind==="thinking"?(k.thinking+=` -`+m.thinking,k.durationMs=m.durationMs):p.blocks.push({kind:"thinking",thinking:m.thinking,startedAt:m.startedAt,durationMs:m.durationMs})}}else if(m.type==="toolUse"){const k=r.get(m.toolCallId),x={id:m.toolCallId,name:m.toolName,arg:typeof m.input=="string"?m.input:JSON.stringify(m.input),status:"running",output:m.outputLines,planPath:m.toolName==="ExitPlanMode"?s[m.toolCallId]?.path:void 0};p.tools.push(x),p.blocks.push({kind:"tool",tool:x}),k&&(p.approval=Vxe(k),p.approvalId=k.approvalId)}else if(m.type==="toolResult"){const k=p.tools.findIndex(x=>x.id===m.toolCallId);if(k!==-1){const x=p.tools[k],y={...x,status:m.isError?"error":"ok",output:Oxe(m.output),media:m.isError?void 0:jxe(x.name,m.output)};y.name==="ExitPlanMode"&&!y.planPath&&(y.planPath=Jxe(y.output)),p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}}function d(p,h){for(const m of h){if(m.type!=="toolUse"||!m.outputLines?.length)continue;const k=p.tools.findIndex(_=>_.id===m.toolCallId);if(k===-1)continue;const x=p.tools[k];if(x.output!==void 0)continue;const y={...x,output:m.outputLines};p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}function f(p){if(p.type==="image"||p.type==="video"){const h=p.type,m=p.source;if(m.kind==="url")return{url:m.url,kind:h};if(m.kind==="base64")return{url:`data:${m.mediaType};base64,${m.data}`,kind:h};if(m.kind==="file"&&n)return{url:n(m.fileId),kind:h,fileId:m.fileId}}if(p.type==="file"&&n){if(p.mediaType.startsWith("image/"))return{url:n(p.fileId),kind:"image",fileId:p.fileId};if(p.mediaType.startsWith("video/"))return{url:n(p.fileId),kind:"video",fileId:p.fileId}}}for(const p of e){if(p.role==="system")continue;if(B9(p)){c();const y=p.metadata?.[B$];i.push({id:p.id,role:"compaction",no:l,text:p.content.filter(w=>w.type==="text").map(w=>w.text).join(` -`),compaction:{trigger:y?.trigger,tokensBefore:y?.tokensBefore,tokensAfter:y?.tokensAfter}});continue}if(p.role==="user"){const y=Uxe(p);if(y!==void 0){c(),i.push(Gxe(p,l++,y));continue}const w=p.metadata?.origin?.kind;if(w==="task"||w==="background_task"||w==="task_notification"){const E=p.content.filter(C=>C.type==="text").map(C=>C.text).join(` -`),T=U5e(p.metadata),$=T?[T]:$$(E);if($.length>0){a??={id:p.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[]};for(const C of $)a.blocks.push({kind:"notification",notification:{...C,createdAt:p.createdAt}})}continue}if(c(),!Yxe(p))continue;const _=p.metadata?.origin,A=_?.kind==="skill_activation"&&_?.trigger==="user-slash",P=_?.kind==="plugin_command"&&_?.trigger==="user-slash",z=[],L=[];for(const E of p.content){if(E.type==="text")if(A)z.push(_.skillArgs??"");else if(P)z.push(_.commandArgs??"");else{const $=Lxe(E.text);if($&&($.kind==="video"||$.kind==="image")&&n){const H=Nxe($.path);if(H){L.push({url:n(H),kind:$.kind,fileId:H});continue}}const C=Bxe(E.text);if(C){L.push({kind:"file",url:C.fileId&&n?n(C.fileId):"",fileId:C.fileId,name:C.name,mediaType:C.mediaType,size:C.size});continue}const j=Exe(E.text);if(j!==E.text&&j.trim().length===0)continue;z.push(j)}const T=f(E);if(T){L.push({url:T.url,kind:T.kind,name:E.type==="file"?E.name:void 0,fileId:T.fileId});continue}E.type==="file"&&n&&L.push({kind:"file",url:n(E.fileId),fileId:E.fileId,name:E.name,mediaType:E.mediaType||void 0,size:E.size})}i.push({id:p.id,role:"user",no:l++,text:z.join(` -`),attachments:L.length>0?L:void 0,skillActivation:A?{name:_.skillName,args:_.skillArgs}:void 0,pluginCommand:P?{pluginId:_.pluginId,commandName:_.commandName,args:_.commandArgs}:void 0,createdAt:p.createdAt});continue}if(p.role==="tool"){a&&u(a,p.content);continue}const h=p.promptId;Xxe(a,h)?a!==null&&a.promptId===void 0&&h!==void 0&&(a.promptId=h):(c(),a={id:p.id,promptId:h,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[],durationMs:p.durationMs});const k=a;if(k===null)continue;const x=Qxe(p.content);if(k.promptId!==void 0&&k.foldedSigs.some(y=>eSe(y,x))){d(k,p.content);continue}k.foldedSigs.push(x),u(k,p.content)}return c(!0),i}function tSe(e){if(B9(e))return!0;if(e.role!=="user")return!1;const t=e.metadata?.origin?.kind;return t!=="task"&&t!=="background_task"&&t!=="task_notification"}function nSe(e){for(let t=e.length-1;t>=0;t-=1)if(tSe(e[t]))return t;return 0}function oSe(){let e;return(t,n,o,s=!0,i=cz)=>{const l=t.at(-1),r=e!==void 0&&(e.approvals===n||e.approvals.length===0&&n.length===0)&&e.getFileUrl===o&&e.sessionActive===s&&e.planReviewByToolCallId===i;if(e!==void 0&&r&&e.messages===t&&e.messageCount===t.length){if(e.lastMessage===l)return e.turns;if(l?.role==="assistant"&&!B9(l)&&e.lastMessage?.role==="assistant"&&e.lastMessage.id===l.id){const d=M2(t.slice(e.boundaryIndex),n,o,s,i),f=e.prefixTurns.filter(k=>k.role!=="compaction").length,p=d.map(k=>({...k,no:k.no+f})),h=e.tailTurns;if(p.length===h.length&&p.every((k,x)=>k.id===h[x]?.id&&k.role===h[x]?.role)){for(let x=0;x{const T=e.activeSessionId;if(!T)return null;const $=r.value[T];return $?{parentId:T,agentId:$.agentId}:null}),c=B(()=>a.value?.parentId??null),u=B(()=>a.value!==null),d=B(()=>{const T=a.value;return T?!!e.sideChatSendingByAgent[T.agentId]:!1}),f=B(()=>{const T=a.value;return T?e.sideChatSendingByAgent[T.agentId]?!0:(e.tasksBySession[T.parentId]??[]).some($=>$.id===T.agentId&&$.status==="running"):!1}),p=B(()=>{const T=a.value;if(!T)return[];const $=e.sideChatMessagesByAgent[T.agentId]??[];return M2($,[],C=>Ct().getFileUrl(C),f.value)});function h(T,$){e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[T]:$(e.sideChatMessagesByAgent[T]??[])}}function m(T,$){h(T,C=>[...C,$])}function k(T){h(T,$=>{const C=[...$].reverse().findIndex(H=>H.role==="user");if(C===-1)return $;const j=$.length-1-C;return $.filter((H,D)=>D!==j)})}function x(T,$){h(T,C=>{const j=[...C];for(let H=j.length-1;H>=0;H-=1){const D=j[H];if(D.role==="user")return j[H]={...D,promptId:D.promptId??$},j}return C})}function y(T,$,C){C&&h(T,j=>{const H=j.at(-1);if(H?.role==="assistant"){const D=H.content[0],M=D?.type==="text"?D.text:"";return[...j.slice(0,-1),{...H,content:[{type:"text",text:`${M}${C}`}]}]}return[...j,{id:o(),sessionId:$,role:"assistant",content:[{type:"text",text:C}],createdAt:new Date().toISOString()}]})}function w(T,$,C){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[T]:!1},!C)return;const H=(e.sideChatMessagesByAgent[T]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||y(T,$,C)}async function _(T){const $=e.activeSessionId;$&&await A($,T)}async function A(T,$){if(!r.value[T]){let C;try{({agentId:C}=await Ct().startBtw(T))}catch(j){n("openSideChat",j,{sessionId:T});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[C]:e.sideChatMessagesByAgent[C]??[]},r.value={...r.value,[T]:{agentId:C}},s(),i()?.markSideChannelAgent(C)}$&&$.trim()&&await P(T,$.trim())}async function P(T,$){const C=r.value[T],j=$.trim();if(!C||!j)return;const H=T,D=C.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!0};const M={id:o(),sessionId:H,role:"user",content:[{type:"text",text:j}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};m(D,M);try{const R=e.sessions.find(Z=>Z.id===H),O=(R?.model&&R.model.length>0?R.model:e.defaultModel)??void 0,U=await Ct().submitPrompt(H,{content:[{type:"text",text:j}],agentId:D,model:O,thinking:await l(H,O)??e.thinking,permissionMode:e.permissionBySession[H]??e.permission,planMode:e.planModeBySession[H]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[H]??!1});x(D,U.promptId),e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[H]:[...e.sideChatUserMessageIdsBySession[H]??[],U.userMessageId]}}catch(R){n("sendSideChatPrompt",R,{sessionId:H}),k(D),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!1}}}function z(){const T=e.activeSessionId;if(!T)return;const{[T]:$,...C}=r.value;r.value=C}async function L(T){const $=a.value;$&&await P($.parentId,T)}function E(T){if(!r.value[T])return;const{[T]:$,...C}=r.value;r.value=C}return{sideChatTargetBySession:r,sideChatSessionId:c,sideChatVisible:u,sideChatSending:d,sideChatRunning:f,sideChatTurns:p,appendSideChatAssistantText:y,finishSideChatAgent:w,openSideChat:_,openSideChatOn:A,closeSideChat:z,sendSideChatPrompt:L,clearSideChatForSession:E}}const tM=20;class iSe{constructor(t,n,o,s,i){this.sessionId=t,this.agentId=n,this.fetchPage=o,this.onChange=s,this.onGap=i,this.transcript=new Xpe(n)}transcript;refreshPromise=null;buffered=[];agentsValue=[];seqValue;loadingOlderValue=!1;loadOlderErrorValue=!1;refreshErrorValue=!1;get snapshot(){return this.transcript.snapshot()}get agents(){return this.agentsValue}get seq(){return this.seqValue}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlderValue}get loadOlderError(){return this.loadOlderErrorValue}get refreshError(){return this.refreshErrorValue}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshErrorValue=!1;const t=this.fetchPage({pageSize:tM}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshErrorValue=!0,n}).finally(()=>{this.refreshPromise=null,this.flushBuffered(),this.onChange()});return this.refreshPromise=t,this.onChange(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seqValue=n),this.refreshErrorValue=!1,this.onChange()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlderValue)return this.buffered.push({ops:t,seq:n}),!1;if(n!==void 0&&this.seqValue!==void 0){if(n<=this.seqValue)return!0;if(n!==this.seqValue+1)return this.onGap(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seqValue=n),o.gap!==void 0&&this.onGap(),o.accepted.length>0&&this.onChange(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlderValue)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlderValue=!0,this.loadOlderErrorValue=!1,this.onChange();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:tM});this.applyPage(n,!1)}catch(n){throw this.loadOlderErrorValue=!0,n}finally{this.loadingOlderValue=!1,this.flushBuffered(),this.onChange()}}}applyPage(t,n){this.agentsValue=t.agents;const o=this.snapshot,s=n?t.snapshot:{...t.snapshot,items:lSe(t.snapshot.items,o.items),hasMoreOlder:t.snapshot.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}flushBuffered(){const t=this.buffered;this.buffered=[];for(const n of t)this.applyOps(n.ops,n.seq)}}function lSe(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=Mpe(s);n.has(i)||(n.add(i),o.push(s))}return o}function nM(e,t){return`${e}\0${t}`}function rSe(e){const t=new Map,n=new Map,o=new Map;function s(u){u.version.value+=1}function i(u,d,f){const p=e.getEventConnection();p!==null&&(p.subscribeTranscript(u,d,f),o.set(u,d))}function l(u,d){const f=nM(u,d),p=t.get(f);if(p!==void 0)return p;let h;return h={channel:new iSe(u,d,k=>e.api.getSessionTranscript(u,{...k,agentId:d}),()=>s(h),()=>void r(h)),version:Uo(0)},t.set(f,h),h}async function r(u){try{await u.channel.refresh(),n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId,u.channel.seq)}catch{n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId)}}function a(u,d){e.connectEventsIfNeeded(),n.set(u,d);const f=l(u,d);return f.channel.snapshot.items.length>0||f.channel.seq!==void 0?i(u,d,f.channel.seq):r(f),f}function c(u,d){if(n.get(u)!==d)return;n.delete(u);const f=o.get(u);f!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(u,[f]),o.delete(u))}return{getEntry(u,d){return t.get(nM(u,d))},activate:a,deactivate:c,receiveReset(u,d,f,p){if(n.get(u)!==d)return;l(u,d).channel.receiveReset(f,p)},applyOps(u,d,f,p){return n.get(u)!==d?!0:l(u,d).channel.applyOps(f,p)},forgetSession(u){const d=n.get(u);d!==void 0&&c(u,d);for(const f of t.keys())f.startsWith(`${u}\0`)&&t.delete(f)}}}const aSe="pythinkerWeb.optimisticUserMessage",oM="Sub Agent";function cSe(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},compactionBySession:{},warnings:[]}}function uSe(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function dSe(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Ym(e){return e.role==="user"&&e.metadata?.[aSe]===!0}function fSe(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function pSe(e,t){return JSON.stringify(e.content)===JSON.stringify(t.content)}function hSe(e,t){if(e.role!=="assistant"||t.role!=="assistant"||e.promptId===void 0||e.promptId!==t.promptId)return!1;const n=o=>JSON.stringify(o.content.map(s=>s.type==="thinking"?{type:s.type,thinking:s.thinking}:s.type==="toolUse"?{type:s.type,toolCallId:s.toolCallId,toolName:s.toolName,input:s.input}:s));return n(e)===n(t)}const mSe=/^<(image|video|audio)\s+path="[^"]+"><\/\1>$/;function sM(e){let t="",n=0;for(const o of e.content)o.type==="text"?mSe.test(o.text.trim())?n+=1:t+=o.text:(o.type==="image"||o.type==="video"||o.type==="file")&&(n+=1);return{text:t,media:n}}function gSe(e,t){const n=sM(e),o=sM(t);return n.text===o.text&&n.media===o.media}function vSe(e,t){const n=t.promptId;if(n!==void 0)for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ym(s)&&s.promptId===n)return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ym(s)&&pSe(s,t))return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ym(s)&&gSe(s,t))return o}return-1}function ySe(e,t,n){let o=!1;const s=e.map(i=>{let l=!1;const r=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(l=!0,{...a,outputLines:[...a.outputLines??[],n]}));return l?(o=!0,{...i,content:r}):i});return o?s:e}function tp(e,t,n=e.length){for(let o=0;os.id===t.messageId);return o===-1?!1:(e[o]=uz(e[o],t),!0)}const kSe={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function bSe(e){const t=Mo.global.t,n=[],o=(l,r)=>{typeof r=="number"||typeof r=="boolean"?n.push({label:l,value:String(r)}):typeof r=="string"&&r.length>0&&n.push({label:l,value:r})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[l,r]of Object.entries(s))l==="statusCode"||l==="requestId"||o(l,r);const i=(e.code!==void 0?kSe[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function _Se(e,t,n){const o=uSe(e);switch(dSe(o,n.sessionId,n.seq),t.type){case"sessionCreated":{o.sessions.some(i=>i.id===t.session.id)||(o.sessions=[t.session,...o.sessions]);break}case"sessionUpdated":{o.sessions=o.sessions.map(s=>s.id===t.session.id?t.session:s);break}case"sessionDeleted":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),delete o.messagesBySession[s],delete o.tasksBySession[s],delete o.goalBySession[s],delete o.approvalsBySession[s],delete o.questionsBySession[s],delete o.lastSeqBySession[s],delete o.turnActiveBySession[s],o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionArchived":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionWorkChanged":{o.sessions=o.sessions.map(s=>s.id!==t.sessionId?s:{...s,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?s.mainTurnActive:!1),pendingInteraction:t.pendingInteraction??s.pendingInteraction,lastTurnReason:t.lastTurnReason}),t.mainTurnActive===!0?o.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&delete o.turnActiveBySession[t.sessionId];break}case"sessionMetaUpdated":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,title:t.title??s.title,lastPrompt:t.lastPrompt??s.lastPrompt}:s);break}case"sessionUsageUpdated":{o.sessions=o.sessions.map(s=>{if(s.id!==t.sessionId)return s;const i=t.model&&t.model.length>0?t.model:s.model;return{...s,usage:t.usage,model:i}});break}case"historyCompacted":break;case"compactionStarted":{o.compactionBySession={...o.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const s=t.sessionId,i=o.compactionBySession[s],{[s]:l,...r}=o.compactionBySession;if(o.compactionBySession=r,Object.prototype.hasOwnProperty.call(o.messagesBySession,s)){const a=o.messagesBySession[s]??[],c=`compaction_${s}_${n.seq}`;if(!a.some(u=>u.id===c)){const u={trigger:i?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};o.messagesBySession[s]=[...a,{id:c,sessionId:s,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[B$]:u}}]}}break}case"compactionCancelled":{const{[t.sessionId]:s,...i}=o.compactionBySession;o.compactionBySession=i;break}case"messageCreated":{const s=t.message.sessionId,i=t.message.createdAt;o.sessions=o.sessions.map(a=>a.id===s&&i>a.updatedAt?{...a,updatedAt:i}:a);const l=o.messagesBySession[s]??[];if(!l.some(a=>a.id===t.message.id||hSe(a,t.message))){if(t.message.role==="user"&&!fSe(t.message)){const a=vSe(l,t.message);if(a!==-1){const c=[...l],u=c[a];c[a]={...t.message,id:u.id,promptId:t.message.promptId??u.promptId,metadata:{...t.message.metadata,...u.metadata}},o.messagesBySession[s]=c;break}}o.messagesBySession[s]=[...l,t.message]}break}case"messageUpdated":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(l=>{if(l.id!==t.messageId)return l;const r=t.content.map((c,u)=>{const d=l.content[u];return c.type==="thinking"&&d?.type==="thinking"?{...c,startedAt:d.startedAt,durationMs:d.durationMs}:c}),a=Date.now();return tp(r,a,r.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&tp(r,a),{...l,content:r,durationMs:t.durationMs??l.durationMs}});break}case"assistantDelta":{const s=t.sessionId,i=o.messagesBySession[s]??[],l=i.findIndex(r=>r.id===t.messageId);l!==-1&&(o.messagesBySession[s]=i.with(l,uz(i[l],t)));break}case"toolOutput":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=ySe(i,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const s=t.sessionId,i=o.approvalsBySession[s]??[];i.some(a=>a.approvalId===t.approval.approvalId)||(o.approvalsBySession[s]=[...i,t.approval]);const r=t.approval.display;r?.kind==="plan_review"&&typeof r.plan=="string"&&r.plan.length>0&&(o.planReviewByToolCallId={...o.planReviewByToolCallId,[t.approval.toolCallId]:{plan:r.plan,path:typeof r.path=="string"?r.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const s=t.sessionId,i=t.approvalId,l=o.approvalsBySession[s]??[];o.approvalsBySession[s]=l.filter(r=>r.approvalId!==i);break}case"questionRequested":{const s=t.sessionId,i=o.questionsBySession[s]??[];i.some(r=>r.questionId===t.question.questionId)||(o.questionsBySession[s]=[...i,t.question]);break}case"questionAnswered":case"questionDismissed":{const s=t.sessionId,i=t.questionId,l=o.questionsBySession[s]??[];o.questionsBySession[s]=l.filter(r=>r.questionId!==i);break}case"taskCreated":{const s=t.sessionId,i=o.tasksBySession[s]??[],l=i.findIndex(r=>r.id===t.task.id);if(l===-1)o.tasksBySession[s]=[...i,t.task];else{const r=[...i],a=i[l],c=a.kind==="subagent"&&(a.status==="completed"||a.status==="failed"||a.status==="cancelled")&&t.task.kind==="subagent"&&t.task.status==="running"&&t.task.subagentPhase==="queued",u=!c&&a.completedAt!==void 0&&a.completedAtEstimated!==!0&&t.task.completedAtEstimated===!0;r[l]={...t.task,outputLines:c?t.task.outputLines:a.outputLines,text:c?t.task.text:a.text,completedAt:u?a.completedAt:t.task.completedAt,completedAtEstimated:u?a.completedAtEstimated:t.task.completedAtEstimated,description:t.task.description===oM&&a.description!==oM?a.description:t.task.description,dynamicWorkflowIndex:t.task.dynamicWorkflowIndex??a.dynamicWorkflowIndex,parentToolCallId:t.task.parentToolCallId??a.parentToolCallId,subagentType:t.task.subagentType??a.subagentType,runInBackground:t.task.runInBackground??a.runInBackground,backgroundTaskId:t.task.backgroundTaskId??a.backgroundTaskId},o.tasksBySession[s]=r}break}case"taskProgress":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const r=l.outputLines??[];if(r.at(-1)===t.outputChunk)return l;const a=[...r,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?a:a.slice(-40)}});break}case"taskCompleted":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId&&l.backgroundTaskId!==t.taskId)return l;const r=l.status==="completed"||l.status==="failed"||l.status==="cancelled";return{...l,status:r?l.status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview??l.outputPreview,outputBytes:t.outputBytes??l.outputBytes}});break}case"goalUpdated":{const s=t.sessionId;o.goalVersionBySession[s]=(o.goalVersionBySession[s]??0)+1,t.goal===null||t.goal.status==="complete"?delete o.goalBySession[s]:o.goalBySession[s]=t.goal;break}case"configChanged":{o.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":case"promptAborted":break;case"turnActiveChanged":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,mainTurnActive:t.active}:s),t.active?o.turnActiveBySession[t.sessionId]=!0:delete o.turnActiveBySession[t.sessionId];break}case"unknown":{const s=t.raw;if(!(s&&s._noop===!0))if(s&&s._agentError)o.warnings=[...o.warnings,bSe(s)];else if(s&&s._agentWarning){const i=s.message??s.code??"agent warning";o.warnings=[...o.warnings,`${Mo.global.t("warnings.noteLabel")}: ${i}`]}else{const i=s?.type??"(unknown)";o.warnings=[...o.warnings,`Unhandled event: ${i}`]}break}}return o}function xSe(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function SSe(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type!=="toolUse"||pi(s.toolName)!=="todo")continue;let i=s.input;if(typeof i=="string")try{i=JSON.parse(i)}catch{continue}const l=i?.todos;if(Array.isArray(l))return l.flatMap(r=>{const a=r??{},c=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return c?[{title:c,status:xSe(a.status)}]:[]})}}return[]}const CSe=["queued","working","suspended","completed","failed","cancelled"];function dz(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function MSe(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function ASe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.dynamicWorkflowIndex===void 0)continue;const o=n.parentToolCallId??"dynamic-workflow",s=t.get(o)??[];s.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:dz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((l,r)=>l.dynamicWorkflowIndex-r.dynamicWorkflowIndex||l.id.localeCompare(r.id)),i=MSe();for(const l of s)i[l.phase]++;return{id:n,members:s,counts:i}}).filter(n=>n.members.length>1).toSorted((n,o)=>{const s=n.members.at(0)?.dynamicWorkflowIndex??0,i=o.members.at(0)?.dynamicWorkflowIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function TSe(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of CSe)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=o.counts[s])}return{done:t,total:n}}function ESe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const o=t.get(n.parentToolCallId)??[];o.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:dz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.dynamicWorkflowIndex-i.dynamicWorkflowIndex||s.id.localeCompare(i.id)));return t}const na=C9(),Mr=j_e(),cf=Z_e(),fz=dn.activeWorkspace,pz=dn.planMode,hz=dn.planArmed,mz=dn.dynamicWorkflowMode,gz=dn.goalMode,iM=40401,vz=dn.onboarded;y1(dn.codeFont);y1(dn.theme);y1(dn.thinking);y1(dn.permission);function s4(e){const t=ls(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const o={};for(const[s,i]of Object.entries(n))i===!0&&(o[s]=!0);return o}catch{return{}}}function u6(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);Es(e,JSON.stringify(n))}catch{}}function yz(){u6(pz,_e.planModeBySession)}function ISe(){u6(hz,_e.planArmedBySession)}function wz(){u6(mz,_e.dynamicWorkflowModeBySession)}function kz(){u6(gz,_e.goalModeBySession)}function LSe(){try{return ls(fz)}catch{return null}}const bz=dn.hiddenWorkspaces;function $Se(){try{const e=ls(bz);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function NSe(e){try{Es(bz,JSON.stringify(e))}catch{}}function zSe(e){try{Es(fz,e)}catch{}}function BSe(e,t){if(t&&e.startsWith(t)){const o=e.slice(t.length);return o?`~${o}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const _e=ds({...cSe(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlagStates:[],subagentModelPolicy:null,subagentModelPolicySaving:!1,workspaceName:"pythinker-web",connection:"disconnected",permission:"manual",permissionBySession:{},thinking:void 0,thinkingBySession:{},planModeBySession:s4(pz),planArmedBySession:s4(hz),dynamicWorkflowModeBySession:s4(mz),goalModeBySession:s4(gz),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:Rg(),authReady:!1,defaultModel:null,workspaces:[],activeWorkspaceId:LSe(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:$Se(),availableOpenInApps:[],serverCapabilities:{},config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1}),$f=ds({planMode:!1,dynamicWorkflowMode:!1,goalMode:!1});function RSe(){if(_e.activeSessionId)return;const e=_e.config?.defaultPermissionMode;(e==="auto"||e==="yolo"||e==="manual")&&(_e.permission=e)}function _z(e,t){return e===t||e.length===t.length&&e.every((n,o)=>n===t[o])}function xr(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every(s=>e[s]===t[s])}function xz(e){_z(_e.sessions,e)||(_e.sessions=e)}function d6(e,t){_e.sessions=_e.sessions.map(n=>n.id===e?t(n):n)}function PSe(e){_e.sessions=[e,..._e.sessions.filter(t=>t.id!==e.id)]}function FSe(e){_e.sessions=[..._e.sessions,e]}function jSe(e){_e.sessions=_e.sessions.filter(t=>t.id!==e)}function Sz(){const e=_e.activeSessionId;e&&_e.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(_e.unreadBySession={..._e.unreadBySession,[e]:!1},Pg({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===dn.unread&&(_e.unreadBySession=Rg(),Sz())});function q7(){if(ul===null||!ul.health().stale)return;_s("ws:stale-reconnect",{sessionId:_e.activeSessionId,status:"stale"}),ia("ws: stale socket on focus, reconnecting",{activeSessionId:_e.activeSessionId}),ul.reconnect();const e=_e.activeSessionId;e&&sp.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(Sz(),q7())});typeof window<"u"&&(window.addEventListener("focus",q7),window.addEventListener("online",q7));function R9(e){_e.activeSessionId=e}function OSe(e){xr(_e.messagesBySession,e)||(_e.messagesBySession=e)}function HSe(e,t){_e.messagesBySession={..._e.messagesBySession,[e]:t}}function Cz(e,t){_e.messagesBySession={..._e.messagesBySession,[e]:t(_e.messagesBySession[e]??[])}}function DSe(e){const{[e]:t,...n}=_e.messagesBySession;_e.messagesBySession=n}function Mz(e){ul?.unsubscribe(e),hCe(e),np.discard(({meta:t})=>t.sessionId===e),jSe(e),DSe(e),delete _e.approvalsBySession[e],delete _e.questionsBySession[e],delete _e.tasksBySession[e],delete _e.goalBySession[e],delete _e.gitStatusBySession[e],delete _e.lastSeqBySession[e],delete _e.compactionBySession[e],delete _e.messagesLoadingMoreBySession[e],delete _e.messagesHasMoreBySession[e],delete _e.messagesLoadMoreErrorBySession[e],delete Z7[e],op.delete(e),$4.delete(e),jz.delete(e),pxe(e),delete _e.queuedBySession[e],delete _e.promptIdBySession[e],delete _e.inFlightBySession[e],delete _e.turnActiveBySession[e],delete _e.planModeBySession[e],delete _e.planArmedBySession[e],delete _e.dynamicWorkflowModeBySession[e],delete _e.goalModeBySession[e],delete _e.thinkingBySession[e],yz(),ISe(),wz(),kz()}const Az=V(null),Tz=V([]),Ez=V(!1),f6=V(!1),Iz=V(null);async function Nf(e){let t;try{t=await Ct().getSessionStatus(e)}catch{return}d6(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),_e.dynamicWorkflowModeBySession={..._e.dynamicWorkflowModeBySession,[e]:t.dynamicWorkflowMode},_e.planModeBySession={..._e.planModeBySession,[e]:t.planMode},(t.permission==="auto"||t.permission==="yolo"||t.permission==="manual")&&(_e.permissionBySession={..._e.permissionBySession,[e]:t.permission},_e.activeSessionId===e&&(_e.permission=t.permission)),t.thinkingEffort.length>0&&(_e.thinkingBySession={..._e.thinkingBySession,[e]:t.thinkingEffort})}async function VSe(e){const t=_e.goalVersionBySession[e]??0;let n;try{n=await Ct().getSessionGoal(e)}catch{return}if((_e.goalVersionBySession[e]??0)!==t)return;const o={..._e.goalBySession};n===null||n.status==="complete"?delete o[e]:o[e]=n,_e.goalBySession=o}function Lz(e,t){const n=t??_e.activeSessionId;return n?Promise.resolve(Ct().updateSession(n,e)).then(()=>Nf(n)).then(()=>!0).catch(o=>(Y0("persistSessionProfile",o,{sessionId:n}),!1)):Promise.resolve(!1)}const $z=dn.conversationToc;function WSe(){try{const e=ls($z);return e===null?!0:e==="true"}catch{return!0}}function qSe(e){try{Es($z,e?"true":"false")}catch{}}const Nz=V(WSe());function USe(e){Nz.value=e,qSe(e)}function zz(e){try{return ls(e)!=="false"}catch{return!0}}function Bz(e,t){try{Es(e,t?"true":"false")}catch{}}const Rz=V(zz(dn.turnFolding));function ZSe(e){Rz.value=e,Bz(dn.turnFolding,e)}const Pz=V(zz(dn.activityRunFolding));function KSe(e){Pz.value=e,Bz(dn.activityRunFolding,e)}function GSe(e){try{return ls(e)??""}catch{return""}}const P9=V(GSe(vz)==="1");function YSe(e){P9.value=e;try{Es(vz,e?"1":"0")}catch{}}let ul=null;const U7=rSe({api:Ct(),connectEventsIfNeeded:F9,getEventConnection:()=>ul});let lM=0;function Fz(){return lM+=1,`msg_opt_${Date.now().toString(36)}_${lM}`}function XSe(e,t,n){if(e.type==="assistantDelta"){const l=_e.messagesBySession[e.sessionId]??[];if(l.at(-1)?.id===e.messageId){wSe(l,e);const r=_e.lastSeqBySession[t]??0;n>0&&n>r&&(_e.lastSeqBySession={..._e.lastSeqBySession,[t]:n});return}}const o={sessions:_e.sessions,activeSessionId:_e.activeSessionId,messagesBySession:_e.messagesBySession,approvalsBySession:_e.approvalsBySession,planReviewByToolCallId:_e.planReviewByToolCallId,questionsBySession:_e.questionsBySession,tasksBySession:_e.tasksBySession,goalBySession:_e.goalBySession,goalVersionBySession:_e.goalVersionBySession,lastSeqBySession:_e.lastSeqBySession,turnActiveBySession:_e.turnActiveBySession,compactionBySession:_e.compactionBySession,config:_e.config,warnings:_e.warnings},s=_Se(o,e,{sessionId:t,seq:n});xz(s.sessions),R9(s.activeSessionId),OSe(s.messagesBySession),xr(_e.approvalsBySession,s.approvalsBySession)||(_e.approvalsBySession=s.approvalsBySession),xr(_e.planReviewByToolCallId,s.planReviewByToolCallId)||(_e.planReviewByToolCallId=s.planReviewByToolCallId),xr(_e.questionsBySession,s.questionsBySession)||(_e.questionsBySession=s.questionsBySession),xr(_e.tasksBySession,s.tasksBySession)||(_e.tasksBySession=s.tasksBySession),xr(_e.goalBySession,s.goalBySession)||(_e.goalBySession=s.goalBySession),xr(_e.goalVersionBySession,s.goalVersionBySession)||(_e.goalVersionBySession=s.goalVersionBySession),xr(_e.lastSeqBySession,s.lastSeqBySession)||(_e.lastSeqBySession=s.lastSeqBySession),xr(_e.turnActiveBySession,s.turnActiveBySession)||(_e.turnActiveBySession=s.turnActiveBySession),xr(_e.compactionBySession,s.compactionBySession)||(_e.compactionBySession=s.compactionBySession);const i=s.config??null;_e.config!==i&&(_e.config=i),_z(_e.warnings,s.warnings)||(_e.warnings=s.warnings),e.type==="configChanged"&&(_e.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Eo.loadModels(),Eo.loadProviders()),e.type==="sessionUsageUpdated"&&(e.dynamicWorkflowMode!==void 0&&(_e.dynamicWorkflowModeBySession={..._e.dynamicWorkflowModeBySession,[e.sessionId]:e.dynamicWorkflowMode}),e.planMode!==void 0&&(_e.planModeBySession={..._e.planModeBySession,[e.sessionId]:e.planMode}),e.thinking!==void 0&&(_e.thinkingBySession={..._e.thinkingBySession,[e.sessionId]:e.thinking}))}function JSe(e,t){const n=_e.lastSeqBySession[t.sessionId]??0,o=_e.turnActiveBySession[t.sessionId]??!1;XSe(e,t.sessionId,t.seq);const s=Si.sideChatTargetBySession.value[t.sessionId];if(s){const{agentId:i}=s,l=t.sessionId;e.type==="agentDelta"&&e.agentId===i?e.delta.text&&Si.appendSideChatAssistantText(i,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===i?Si.finishSideChatAgent(i,l):e.type==="taskProgress"&&e.taskId===i?Si.appendSideChatAssistantText(i,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===i&&Si.finishSideChatAgent(i,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const i=e.message.sessionId;_e.promptIdBySession[i]!==e.message.promptId&&(_e.promptIdBySession={..._e.promptIdBySession,[i]:e.message.promptId})}if(e.type==="assistantDelta"&&t.sessionId===_e.activeSessionId&&na.recordMoonDelta((e.delta.text?.length??0)+(e.delta.thinking?.length??0)),e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const i=e.reason;WMe(e.sessionId,i==="cancelled"||i==="failed"||i==="blocked"?"aborted":"idle",o)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&VMe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&_e.promptIdBySession[e.sessionId]===e.promptId&&Bt.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&qMe(e.sessionId,e.question),e.type==="approvalRequested"&&UMe(e.sessionId,e.approval)}const np=l_e(({appEvent:e,meta:t})=>JSe(e,t),({appEvent:e})=>n_e(e),{coalesce:a_e});function F9(){if(ul!==null||typeof WebSocket>"u")return;_s("ws:connection",{status:"connecting"}),_e.connection="connecting",ul=Ct().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Bt.applyWorkspaceEvent(t);return}for(const o of r_e({appEvent:t,meta:n}))np(o)},onResync(t,n,o){_s("ws:resync",{sessionId:t,status:"required",seq:n}),np.flush(),op.add(t),sp.request(t)},onError(t,n,o){_s("ws:error",{status:"failed",errorCode:t,fatal:o}),j9({severity:"error",title:Mo.global.t("warnings.wsTitle"),message:n,details:[qo("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){_s("ws:connection",{status:t?"connected":"disconnected"}),_e.connected=t,_e.connection=t?"connected":"disconnected",t&&(lCe(),Bt.refreshServerMeta())},onTranscriptReset(t,n,o,s){U7.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return U7.applyOps(t,n,o,s)}})}const Z7={},op=new Set,$4=new Set,jz=new Set;function QSe(e){return ol(e)&&e.code===iM?!0:typeof e=="object"&&e!==null&&e.code===iM}function qo(e,t){if(!(t==null||t===""))return{label:Mo.global.t(`warnings.details.${e}`),value:Oz(t)}}function Oz(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function eCe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function tCe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function nCe(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function oCe(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function rM(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function sCe(e,t,n){const o=r9(t),s=ol(t),i=o||s?t.timestamp:void 0,l=o||s?t.durationMs:void 0,r=[qo("operation",e),qo("sessionId",n??_e.activeSessionId),qo("connection",_e.connection),qo("timestamp",oCe(i??Date.now()))];return o?r.push(qo("duration",rM(l)),qo("request",`${t.method} ${t.path}`),qo("endpoint",t.url),qo("requestId",t.requestId),qo("phase",t.phase),qo("timeout",`${t.timeoutMs}ms`),qo("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),qo("contentType",t.contentType),qo("responsePreview",t.bodyPreview),qo("cause",t.cause)):s?r.push(qo("duration",rM(l)),qo("code",t.code),qo("requestId",t.requestId),qo("message",t.message),qo("details",t.details)):r.push(qo("errorName",eCe(t)),qo("message",tCe(t)??Oz(t)),qo("stack",nCe(t))),r.filter(a=>a!==void 0)}function iCe(e,t,n={}){const o=r9(t),s=ol(t),i=n.title??(o?Mo.global.t("warnings.daemonNetworkTitle"):s?Mo.global.t("warnings.daemonApiTitle"):Mo.global.t("warnings.operationFailedTitle")),l=n.message??(o?Mo.global.t("warnings.daemonNetworkMessage"):s?t.message:Mo.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:l,details:sCe(e,t,n.sessionId)}}function j9(e){_e.warnings=[..._e.warnings,e]}function lCe(){const e=Mo.global.t("warnings.wsTitle"),t=_e.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==_e.warnings.length&&(_e.warnings=t)}function Y0(e,t,n){console.error(`[pythinker-web] operation failed: ${e}`,t);const o=ol(t),s=r9(t);_s("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:o?t.code:void 0,requestId:o||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),j9(iCe(e,t,n))}const rCe={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function aCe(e){if(!ol(e))return;const t=rCe[e.code];return t?Mo.global.t(t):void 0}async function cCe(e){if(Mz(e),_e.activeSessionId!==e)return;const t=_e.sessions[0];t?await Bt.selectSession(t.id,{urlMode:"replace"}):(R9(void 0),_e.sessionLoading=!1,Bt.writeSessionUrl(void 0,"replace"))}const aM=new Set;async function uCe(e){if(!aM.has(e)){aM.add(e);try{const t=await Ct().getSessionWarnings(e),n=Mo.global.t("warnings.noteLabel");for(const o of t)j9(`${n}: ${o.message}`)}catch{}}}async function O9(e){const t=Bt.localTurnStartState(e);try{const o=await Ct().getSessionSnapshot(e);if(!_e.sessions.some(a=>a.id===e))return"ok";np.flush();const s=_e.lastSeqBySession[e]??0,i=Z7[e];if(!(op.has(e)||ip.has(e))&&i!==void 0&&i===o.epoch&&s>o.asOfSeq)return $4.delete(e)||($4.add(e),sp.request(e)),"ok";if(!Bt.isLocalTurnSnapshotCurrent(e,t))return Bt.afterLocalTurnStartsSettle(e,()=>{sp.request(e)}),"ok";const r=T7(o.session.usage);d6(e,a=>({...o.session,model:o.session.model&&o.session.model.length>0?o.session.model:a.model,usage:r?a.usage:o.session.usage})),HSe(e,Xbe(_e.messagesBySession[e]??[],o.messages)),_e.tasksBySession={..._e.tasksBySession,[e]:Qbe(o.subagents,_e.tasksBySession[e]??[])},_e.messagesHasMoreBySession={..._e.messagesHasMoreBySession,[e]:o.hasMoreMessages},_e.approvalsBySession={..._e.approvalsBySession,[e]:o.pendingApprovals};for(const a of o.pendingApprovals){const c=a.display;c?.kind==="plan_review"&&typeof c.plan=="string"&&c.plan.length>0&&(_e.planReviewByToolCallId={..._e.planReviewByToolCallId,[a.toolCallId]:{plan:c.plan,path:typeof c.path=="string"?c.path:void 0}})}_e.questionsBySession={..._e.questionsBySession,[e]:o.pendingQuestions},_e.lastSeqBySession={..._e.lastSeqBySession,[e]:o.asOfSeq},Z7[e]=o.epoch,op.delete(e),$4.delete(e),Bt.handleSessionSnapshot(e,{inFlightTurn:o.inFlightTurn,busy:o.session.busy});{const a={..._e.turnActiveBySession};o.session.mainTurnActive??(o.inFlightTurn!==null&&o.session.busy)?a[e]=!0:delete a[e],_e.turnActiveBySession=a}return F9(),ul&&(ul.seedSnapshot(e,o),ul.subscribe(e,{seq:o.asOfSeq,epoch:o.epoch}),pCe(e)),ip.delete(e),r&&Nf(e),uCe(e),"ok"}catch(n){return QSe(n)?(await cCe(e),"not-found"):(Y0("getSessionSnapshot",n,{title:Mo.global.t("warnings.sessionSnapshotTitle"),message:Mo.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const sp=e_e(O9);function dCe(e){return Object.prototype.hasOwnProperty.call(_e.messagesBySession,e)}const fCe=4,oa=[],ip=new Set;function pCe(e){const t=oa.indexOf(e);for(t!==-1&&oa.splice(t,1),oa.unshift(e);oa.length>fCe;){let n=-1;for(let s=oa.length-1;s>=0;s--)if(oa[s]!==_e.activeSessionId){n=s;break}if(n===-1)break;const[o]=oa.splice(n,1);if(o===void 0)break;ul?.unsubscribe(o),ip.add(o)}}function hCe(e){const t=oa.indexOf(e);t!==-1&&oa.splice(t,1),ip.delete(e)}async function mCe(e){return O9(e)}function H9(e,t){return(_e.inFlightBySession[e]??!1)||(_e.turnActiveBySession[e]??!1)||(t??_e.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function D9(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return Mo.global.t("sessions.justNow");if(s<1)return`${Math.round(o/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const i=o/864e5;return i<7?`${Math.round(i)}d`:i<30?`${Math.round(i/7)}w`:i<365?`${Math.round(i/30)}mo`:`${Math.round(i/365)}y`}catch{return e}}const gCe=3e4,uf=V(0);let Xm=null;function vCe(){Xm===null&&(Xm=setInterval(()=>{uf.value=(uf.value+1)%Number.MAX_SAFE_INTEGER},gCe),Xm.unref?.())}function yCe(e,t){const n=e.split(` +`+m.thinking,k.durationMs=m.durationMs):p.blocks.push({kind:"thinking",thinking:m.thinking,startedAt:m.startedAt,durationMs:m.durationMs})}}else if(m.type==="toolUse"){const k=r.get(m.toolCallId),x={id:m.toolCallId,name:m.toolName,arg:typeof m.input=="string"?m.input:JSON.stringify(m.input),status:"running",output:m.outputLines,planPath:m.toolName==="ExitPlanMode"?s[m.toolCallId]?.path:void 0};p.tools.push(x),p.blocks.push({kind:"tool",tool:x}),k&&(p.approval=Vxe(k),p.approvalId=k.approvalId)}else if(m.type==="toolResult"){const k=p.tools.findIndex(x=>x.id===m.toolCallId);if(k!==-1){const x=p.tools[k],y={...x,status:m.isError?"error":"ok",output:Oxe(m.output),media:m.isError?void 0:jxe(x.name,m.output)};y.name==="ExitPlanMode"&&!y.planPath&&(y.planPath=Jxe(y.output)),p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}}function d(p,h){for(const m of h){if(m.type!=="toolUse"||!m.outputLines?.length)continue;const k=p.tools.findIndex(_=>_.id===m.toolCallId);if(k===-1)continue;const x=p.tools[k];if(x.output!==void 0)continue;const y={...x,output:m.outputLines};p.tools[k]=y;const w=p.blocks.find(_=>_.kind==="tool"&&_.tool.id===m.toolCallId);w&&w.kind==="tool"&&(w.tool=y)}}function f(p){if(p.type==="image"||p.type==="video"){const h=p.type,m=p.source;if(m.kind==="url")return{url:m.url,kind:h};if(m.kind==="base64")return{url:`data:${m.mediaType};base64,${m.data}`,kind:h};if(m.kind==="file"&&n)return{url:n(m.fileId),kind:h,fileId:m.fileId}}if(p.type==="file"&&n){if(p.mediaType.startsWith("image/"))return{url:n(p.fileId),kind:"image",fileId:p.fileId};if(p.mediaType.startsWith("video/"))return{url:n(p.fileId),kind:"video",fileId:p.fileId}}}for(const p of e){if(p.role==="system")continue;if(R9(p)){c();const y=p.metadata?.[R$];i.push({id:p.id,role:"compaction",no:l,text:p.content.filter(w=>w.type==="text").map(w=>w.text).join(` +`),compaction:{trigger:y?.trigger,tokensBefore:y?.tokensBefore,tokensAfter:y?.tokensAfter}});continue}if(p.role==="user"){const y=Uxe(p);if(y!==void 0){c(),i.push(Gxe(p,l++,y));continue}const w=p.metadata?.origin?.kind;if(w==="task"||w==="background_task"||w==="task_notification"){const T=p.content.filter(C=>C.type==="text").map(C=>C.text).join(` +`),I=Z5e(p.metadata),N=I?[I]:N$(T);if(N.length>0){a??={id:p.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[]};for(const C of N)a.blocks.push({kind:"notification",notification:{...C,createdAt:p.createdAt}})}continue}if(c(),!Yxe(p))continue;const _=p.metadata?.origin,A=_?.kind==="skill_activation"&&_?.trigger==="user-slash",P=_?.kind==="plugin_command"&&_?.trigger==="user-slash",z=[],L=[];for(const T of p.content){if(T.type==="text")if(A)z.push(_.skillArgs??"");else if(P)z.push(_.commandArgs??"");else{const N=Lxe(T.text);if(N&&(N.kind==="video"||N.kind==="image")&&n){const H=Nxe(N.path);if(H){L.push({url:n(H),kind:N.kind,fileId:H});continue}}const C=Bxe(T.text);if(C){L.push({kind:"file",url:C.fileId&&n?n(C.fileId):"",fileId:C.fileId,name:C.name,mediaType:C.mediaType,size:C.size});continue}const F=Exe(T.text);if(F!==T.text&&F.trim().length===0)continue;z.push(F)}const I=f(T);if(I){L.push({url:I.url,kind:I.kind,name:T.type==="file"?T.name:void 0,fileId:I.fileId});continue}T.type==="file"&&n&&L.push({kind:"file",url:n(T.fileId),fileId:T.fileId,name:T.name,mediaType:T.mediaType||void 0,size:T.size})}i.push({id:p.id,role:"user",no:l++,text:z.join(` +`),attachments:L.length>0?L:void 0,skillActivation:A?{name:_.skillName,args:_.skillArgs}:void 0,pluginCommand:P?{pluginId:_.pluginId,commandName:_.commandName,args:_.commandArgs}:void 0,createdAt:p.createdAt});continue}if(p.role==="tool"){a&&u(a,p.content);continue}const h=p.promptId;Xxe(a,h)?a!==null&&a.promptId===void 0&&h!==void 0&&(a.promptId=h):(c(),a={id:p.id,promptId:h,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[],durationMs:p.durationMs});const k=a;if(k===null)continue;const x=Qxe(p.content);if(k.promptId!==void 0&&k.foldedSigs.some(y=>eSe(y,x))){d(k,p.content);continue}k.foldedSigs.push(x),u(k,p.content)}return c(!0),i}function tSe(e){if(R9(e))return!0;if(e.role!=="user")return!1;const t=e.metadata?.origin?.kind;return t!=="task"&&t!=="background_task"&&t!=="task_notification"}function nSe(e){for(let t=e.length-1;t>=0;t-=1)if(tSe(e[t]))return t;return 0}function oSe(){let e;return(t,n,o,s=!0,i=uz)=>{const l=t.at(-1),r=e!==void 0&&(e.approvals===n||e.approvals.length===0&&n.length===0)&&e.getFileUrl===o&&e.sessionActive===s&&e.planReviewByToolCallId===i;if(e!==void 0&&r&&e.messages===t&&e.messageCount===t.length){if(e.lastMessage===l)return e.turns;if(l?.role==="assistant"&&!R9(l)&&e.lastMessage?.role==="assistant"&&e.lastMessage.id===l.id){const d=M2(t.slice(e.boundaryIndex),n,o,s,i),f=e.prefixTurns.filter(k=>k.role!=="compaction").length,p=d.map(k=>({...k,no:k.no+f})),h=e.tailTurns;if(p.length===h.length&&p.every((k,x)=>k.id===h[x]?.id&&k.role===h[x]?.role)){for(let x=0;x{const I=e.activeSessionId;if(!I)return null;const N=r.value[I];return N?{parentId:I,agentId:N.agentId}:null}),c=B(()=>a.value?.parentId??null),u=B(()=>a.value!==null),d=B(()=>{const I=a.value;return I?!!e.sideChatSendingByAgent[I.agentId]:!1}),f=B(()=>{const I=a.value;return I?e.sideChatSendingByAgent[I.agentId]?!0:(e.tasksBySession[I.parentId]??[]).some(N=>N.id===I.agentId&&N.status==="running"):!1}),p=B(()=>{const I=a.value;if(!I)return[];const N=e.sideChatMessagesByAgent[I.agentId]??[];return M2(N,[],C=>Ct().getFileUrl(C),f.value)});function h(I,N){e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[I]:N(e.sideChatMessagesByAgent[I]??[])}}function m(I,N){h(I,C=>[...C,N])}function k(I){h(I,N=>{const C=[...N].reverse().findIndex(H=>H.role==="user");if(C===-1)return N;const F=N.length-1-C;return N.filter((H,D)=>D!==F)})}function x(I,N){h(I,C=>{const F=[...C];for(let H=F.length-1;H>=0;H-=1){const D=F[H];if(D.role==="user")return F[H]={...D,promptId:D.promptId??N},F}return C})}function y(I,N,C){C&&h(I,F=>{const H=F.at(-1);if(H?.role==="assistant"){const D=H.content[0],M=D?.type==="text"?D.text:"";return[...F.slice(0,-1),{...H,content:[{type:"text",text:`${M}${C}`}]}]}return[...F,{id:o(),sessionId:N,role:"assistant",content:[{type:"text",text:C}],createdAt:new Date().toISOString()}]})}function w(I,N,C){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[I]:!1},!C)return;const H=(e.sideChatMessagesByAgent[I]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||y(I,N,C)}async function _(I){const N=e.activeSessionId;N&&await A(N,I)}async function A(I,N){if(!r.value[I]){let C;try{({agentId:C}=await Ct().startBtw(I))}catch(F){n("openSideChat",F,{sessionId:I});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[C]:e.sideChatMessagesByAgent[C]??[]},r.value={...r.value,[I]:{agentId:C}},s(),i()?.markSideChannelAgent(C)}N&&N.trim()&&await P(I,N.trim())}async function P(I,N){const C=r.value[I],F=N.trim();if(!C||!F)return;const H=I,D=C.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!0};const M={id:o(),sessionId:H,role:"user",content:[{type:"text",text:F}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};m(D,M);try{const R=e.sessions.find(Z=>Z.id===H),O=(R?.model&&R.model.length>0?R.model:e.defaultModel)??void 0,U=await Ct().submitPrompt(H,{content:[{type:"text",text:F}],agentId:D,model:O,thinking:await l(H,O)??e.thinking,permissionMode:e.permissionBySession[H]??e.permission,planMode:e.planModeBySession[H]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[H]??!1});x(D,U.promptId),e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[H]:[...e.sideChatUserMessageIdsBySession[H]??[],U.userMessageId]}}catch(R){n("sendSideChatPrompt",R,{sessionId:H}),k(D),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[D]:!1}}}function z(){const I=e.activeSessionId;if(!I)return;const{[I]:N,...C}=r.value;r.value=C}async function L(I){const N=a.value;N&&await P(N.parentId,I)}function T(I){if(!r.value[I])return;const{[I]:N,...C}=r.value;r.value=C}return{sideChatTargetBySession:r,sideChatSessionId:c,sideChatVisible:u,sideChatSending:d,sideChatRunning:f,sideChatTurns:p,appendSideChatAssistantText:y,finishSideChatAgent:w,openSideChat:_,openSideChatOn:A,closeSideChat:z,sendSideChatPrompt:L,clearSideChatForSession:T}}const nM=20;class iSe{constructor(t,n,o,s,i){this.sessionId=t,this.agentId=n,this.fetchPage=o,this.onChange=s,this.onGap=i,this.transcript=new Jpe(n)}transcript;refreshPromise=null;buffered=[];agentsValue=[];seqValue;loadingOlderValue=!1;loadOlderErrorValue=!1;refreshErrorValue=!1;get snapshot(){return this.transcript.snapshot()}get agents(){return this.agentsValue}get seq(){return this.seqValue}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlderValue}get loadOlderError(){return this.loadOlderErrorValue}get refreshError(){return this.refreshErrorValue}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshErrorValue=!1;const t=this.fetchPage({pageSize:nM}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshErrorValue=!0,n}).finally(()=>{this.refreshPromise=null,this.flushBuffered(),this.onChange()});return this.refreshPromise=t,this.onChange(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seqValue=n),this.refreshErrorValue=!1,this.onChange()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlderValue)return this.buffered.push({ops:t,seq:n}),!1;if(n!==void 0&&this.seqValue!==void 0){if(n<=this.seqValue)return!0;if(n!==this.seqValue+1)return this.onGap(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seqValue=n),o.gap!==void 0&&this.onGap(),o.accepted.length>0&&this.onChange(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlderValue)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlderValue=!0,this.loadOlderErrorValue=!1,this.onChange();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:nM});this.applyPage(n,!1)}catch(n){throw this.loadOlderErrorValue=!0,n}finally{this.loadingOlderValue=!1,this.flushBuffered(),this.onChange()}}}applyPage(t,n){this.agentsValue=t.agents;const o=this.snapshot,s=n?t.snapshot:{...t.snapshot,items:lSe(t.snapshot.items,o.items),hasMoreOlder:t.snapshot.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}flushBuffered(){const t=this.buffered;this.buffered=[];for(const n of t)this.applyOps(n.ops,n.seq)}}function lSe(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=Ape(s);n.has(i)||(n.add(i),o.push(s))}return o}function oM(e,t){return`${e}\0${t}`}function rSe(e){const t=new Map,n=new Map,o=new Map;function s(u){u.version.value+=1}function i(u,d,f){const p=e.getEventConnection();p!==null&&(p.subscribeTranscript(u,d,f),o.set(u,d))}function l(u,d){const f=oM(u,d),p=t.get(f);if(p!==void 0)return p;let h;return h={channel:new iSe(u,d,k=>e.api.getSessionTranscript(u,{...k,agentId:d}),()=>s(h),()=>void r(h)),version:Uo(0)},t.set(f,h),h}async function r(u){try{await u.channel.refresh(),n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId,u.channel.seq)}catch{n.get(u.channel.sessionId)===u.channel.agentId&&i(u.channel.sessionId,u.channel.agentId)}}function a(u,d){e.connectEventsIfNeeded(),n.set(u,d);const f=l(u,d);return f.channel.snapshot.items.length>0||f.channel.seq!==void 0?i(u,d,f.channel.seq):r(f),f}function c(u,d){if(n.get(u)!==d)return;n.delete(u);const f=o.get(u);f!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(u,[f]),o.delete(u))}return{getEntry(u,d){return t.get(oM(u,d))},activate:a,deactivate:c,receiveReset(u,d,f,p){if(n.get(u)!==d)return;l(u,d).channel.receiveReset(f,p)},applyOps(u,d,f,p){return n.get(u)!==d?!0:l(u,d).channel.applyOps(f,p)},forgetSession(u){const d=n.get(u);d!==void 0&&c(u,d);for(const f of t.keys())f.startsWith(`${u}\0`)&&t.delete(f)}}}const aSe="pythinkerWeb.optimisticUserMessage",sM="Sub Agent";function cSe(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},compactionBySession:{},warnings:[]}}function uSe(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function dSe(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Xm(e){return e.role==="user"&&e.metadata?.[aSe]===!0}function fSe(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function pSe(e,t){return JSON.stringify(e.content)===JSON.stringify(t.content)}function hSe(e,t){if(e.role!=="assistant"||t.role!=="assistant"||e.promptId===void 0||e.promptId!==t.promptId)return!1;const n=o=>JSON.stringify(o.content.map(s=>s.type==="thinking"?{type:s.type,thinking:s.thinking}:s.type==="toolUse"?{type:s.type,toolCallId:s.toolCallId,toolName:s.toolName,input:s.input}:s));return n(e)===n(t)}const mSe=/^<(image|video|audio)\s+path="[^"]+"><\/\1>$/;function iM(e){let t="",n=0;for(const o of e.content)o.type==="text"?mSe.test(o.text.trim())?n+=1:t+=o.text:(o.type==="image"||o.type==="video"||o.type==="file")&&(n+=1);return{text:t,media:n}}function gSe(e,t){const n=iM(e),o=iM(t);return n.text===o.text&&n.media===o.media}function vSe(e,t){const n=t.promptId;if(n!==void 0)for(let o=e.length-1;o>=0;o--){const s=e[o];if(Xm(s)&&s.promptId===n)return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Xm(s)&&pSe(s,t))return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Xm(s)&&gSe(s,t))return o}return-1}function ySe(e,t,n){let o=!1;const s=e.map(i=>{let l=!1;const r=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(l=!0,{...a,outputLines:[...a.outputLines??[],n]}));return l?(o=!0,{...i,content:r}):i});return o?s:e}function tp(e,t,n=e.length){for(let o=0;os.id===t.messageId);return o===-1?!1:(e[o]=dz(e[o],t),!0)}const kSe={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function bSe(e){const t=Mo.global.t,n=[],o=(l,r)=>{typeof r=="number"||typeof r=="boolean"?n.push({label:l,value:String(r)}):typeof r=="string"&&r.length>0&&n.push({label:l,value:r})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[l,r]of Object.entries(s))l==="statusCode"||l==="requestId"||o(l,r);const i=(e.code!==void 0?kSe[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function _Se(e,t,n){const o=uSe(e);switch(dSe(o,n.sessionId,n.seq),t.type){case"sessionCreated":{o.sessions.some(i=>i.id===t.session.id)||(o.sessions=[t.session,...o.sessions]);break}case"sessionUpdated":{o.sessions=o.sessions.map(s=>s.id===t.session.id?t.session:s);break}case"sessionDeleted":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),delete o.messagesBySession[s],delete o.tasksBySession[s],delete o.goalBySession[s],delete o.approvalsBySession[s],delete o.questionsBySession[s],delete o.lastSeqBySession[s],delete o.turnActiveBySession[s],o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionArchived":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionWorkChanged":{o.sessions=o.sessions.map(s=>s.id!==t.sessionId?s:{...s,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?s.mainTurnActive:!1),pendingInteraction:t.pendingInteraction??s.pendingInteraction,lastTurnReason:t.lastTurnReason}),t.mainTurnActive===!0?o.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&delete o.turnActiveBySession[t.sessionId];break}case"sessionMetaUpdated":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,title:t.title??s.title,lastPrompt:t.lastPrompt??s.lastPrompt}:s);break}case"sessionUsageUpdated":{o.sessions=o.sessions.map(s=>{if(s.id!==t.sessionId)return s;const i=t.model&&t.model.length>0?t.model:s.model;return{...s,usage:t.usage,model:i}});break}case"historyCompacted":break;case"compactionStarted":{o.compactionBySession={...o.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const s=t.sessionId,i=o.compactionBySession[s],{[s]:l,...r}=o.compactionBySession;if(o.compactionBySession=r,Object.prototype.hasOwnProperty.call(o.messagesBySession,s)){const a=o.messagesBySession[s]??[],c=`compaction_${s}_${n.seq}`;if(!a.some(u=>u.id===c)){const u={trigger:i?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};o.messagesBySession[s]=[...a,{id:c,sessionId:s,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[R$]:u}}]}}break}case"compactionCancelled":{const{[t.sessionId]:s,...i}=o.compactionBySession;o.compactionBySession=i;break}case"messageCreated":{const s=t.message.sessionId,i=t.message.createdAt;o.sessions=o.sessions.map(a=>a.id===s&&i>a.updatedAt?{...a,updatedAt:i}:a);const l=o.messagesBySession[s]??[];if(!l.some(a=>a.id===t.message.id||hSe(a,t.message))){if(t.message.role==="user"&&!fSe(t.message)){const a=vSe(l,t.message);if(a!==-1){const c=[...l],u=c[a];c[a]={...t.message,id:u.id,promptId:t.message.promptId??u.promptId,metadata:{...t.message.metadata,...u.metadata}},o.messagesBySession[s]=c;break}}o.messagesBySession[s]=[...l,t.message]}break}case"messageUpdated":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(l=>{if(l.id!==t.messageId)return l;const r=t.content.map((c,u)=>{const d=l.content[u];return c.type==="thinking"&&d?.type==="thinking"?{...c,startedAt:d.startedAt,durationMs:d.durationMs}:c}),a=Date.now();return tp(r,a,r.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&tp(r,a),{...l,content:r,durationMs:t.durationMs??l.durationMs}});break}case"assistantDelta":{const s=t.sessionId,i=o.messagesBySession[s]??[],l=i.findIndex(r=>r.id===t.messageId);l!==-1&&(o.messagesBySession[s]=i.with(l,dz(i[l],t)));break}case"toolOutput":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=ySe(i,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const s=t.sessionId,i=o.approvalsBySession[s]??[];i.some(a=>a.approvalId===t.approval.approvalId)||(o.approvalsBySession[s]=[...i,t.approval]);const r=t.approval.display;r?.kind==="plan_review"&&typeof r.plan=="string"&&r.plan.length>0&&(o.planReviewByToolCallId={...o.planReviewByToolCallId,[t.approval.toolCallId]:{plan:r.plan,path:typeof r.path=="string"?r.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const s=t.sessionId,i=t.approvalId,l=o.approvalsBySession[s]??[];o.approvalsBySession[s]=l.filter(r=>r.approvalId!==i);break}case"questionRequested":{const s=t.sessionId,i=o.questionsBySession[s]??[];i.some(r=>r.questionId===t.question.questionId)||(o.questionsBySession[s]=[...i,t.question]);break}case"questionAnswered":case"questionDismissed":{const s=t.sessionId,i=t.questionId,l=o.questionsBySession[s]??[];o.questionsBySession[s]=l.filter(r=>r.questionId!==i);break}case"taskCreated":{const s=t.sessionId,i=o.tasksBySession[s]??[],l=i.findIndex(r=>r.id===t.task.id);if(l===-1)o.tasksBySession[s]=[...i,t.task];else{const r=[...i],a=i[l],c=a.kind==="subagent"&&(a.status==="completed"||a.status==="failed"||a.status==="cancelled")&&t.task.kind==="subagent"&&t.task.status==="running"&&t.task.subagentPhase==="queued",u=!c&&a.completedAt!==void 0&&a.completedAtEstimated!==!0&&t.task.completedAtEstimated===!0;r[l]={...t.task,outputLines:c?t.task.outputLines:a.outputLines,text:c?t.task.text:a.text,completedAt:u?a.completedAt:t.task.completedAt,completedAtEstimated:u?a.completedAtEstimated:t.task.completedAtEstimated,description:t.task.description===sM&&a.description!==sM?a.description:t.task.description,dynamicWorkflowIndex:t.task.dynamicWorkflowIndex??a.dynamicWorkflowIndex,parentToolCallId:t.task.parentToolCallId??a.parentToolCallId,subagentType:t.task.subagentType??a.subagentType,runInBackground:t.task.runInBackground??a.runInBackground,backgroundTaskId:t.task.backgroundTaskId??a.backgroundTaskId},o.tasksBySession[s]=r}break}case"taskProgress":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const r=l.outputLines??[];if(r.at(-1)===t.outputChunk)return l;const a=[...r,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?a:a.slice(-40)}});break}case"taskCompleted":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(l=>{if(l.id!==t.taskId&&l.backgroundTaskId!==t.taskId)return l;const r=l.status==="completed"||l.status==="failed"||l.status==="cancelled";return{...l,status:r?l.status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview??l.outputPreview,outputBytes:t.outputBytes??l.outputBytes}});break}case"goalUpdated":{const s=t.sessionId;o.goalVersionBySession[s]=(o.goalVersionBySession[s]??0)+1,t.goal===null||t.goal.status==="complete"?delete o.goalBySession[s]:o.goalBySession[s]=t.goal;break}case"configChanged":{o.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":case"promptAborted":break;case"turnActiveChanged":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,mainTurnActive:t.active}:s),t.active?o.turnActiveBySession[t.sessionId]=!0:delete o.turnActiveBySession[t.sessionId];break}case"unknown":{const s=t.raw;if(!(s&&s._noop===!0))if(s&&s._agentError)o.warnings=[...o.warnings,bSe(s)];else if(s&&s._agentWarning){const i=s.message??s.code??"agent warning";o.warnings=[...o.warnings,`${Mo.global.t("warnings.noteLabel")}: ${i}`]}else{const i=s?.type??"(unknown)";o.warnings=[...o.warnings,`Unhandled event: ${i}`]}break}}return o}function xSe(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function SSe(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type!=="toolUse"||pi(s.toolName)!=="todo")continue;let i=s.input;if(typeof i=="string")try{i=JSON.parse(i)}catch{continue}const l=i?.todos;if(Array.isArray(l))return l.flatMap(r=>{const a=r??{},c=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return c?[{title:c,status:xSe(a.status)}]:[]})}}return[]}const CSe=["queued","working","suspended","completed","failed","cancelled"];function fz(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function MSe(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function ASe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.dynamicWorkflowIndex===void 0)continue;const o=n.parentToolCallId??"dynamic-workflow",s=t.get(o)??[];s.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:fz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((l,r)=>l.dynamicWorkflowIndex-r.dynamicWorkflowIndex||l.id.localeCompare(r.id)),i=MSe();for(const l of s)i[l.phase]++;return{id:n,members:s,counts:i}}).filter(n=>n.members.length>1).toSorted((n,o)=>{const s=n.members.at(0)?.dynamicWorkflowIndex??0,i=o.members.at(0)?.dynamicWorkflowIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function TSe(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of CSe)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=o.counts[s])}return{done:t,total:n}}function ESe(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const o=t.get(n.parentToolCallId)??[];o.push({id:n.id,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,routing:n.routing,currentRoutingEnvRevision:n.currentRoutingEnvRevision,startedAt:n.startedAt,completedAt:n.completedAt,phase:fz(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.dynamicWorkflowIndex-i.dynamicWorkflowIndex||s.id.localeCompare(i.id)));return t}const na=M9(),Mr=O_e(),cf=K_e(),pz=dn.activeWorkspace,hz=dn.planMode,mz=dn.planArmed,gz=dn.dynamicWorkflowMode,vz=dn.goalMode,lM=40401,yz=dn.onboarded;y1(dn.codeFont);y1(dn.theme);y1(dn.thinking);y1(dn.permission);function s4(e){const t=ls(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const o={};for(const[s,i]of Object.entries(n))i===!0&&(o[s]=!0);return o}catch{return{}}}function u6(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);Es(e,JSON.stringify(n))}catch{}}function wz(){u6(hz,_e.planModeBySession)}function ISe(){u6(mz,_e.planArmedBySession)}function kz(){u6(gz,_e.dynamicWorkflowModeBySession)}function bz(){u6(vz,_e.goalModeBySession)}function LSe(){try{return ls(pz)}catch{return null}}const _z=dn.hiddenWorkspaces;function $Se(){try{const e=ls(_z);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function NSe(e){try{Es(_z,JSON.stringify(e))}catch{}}function zSe(e){try{Es(pz,e)}catch{}}function BSe(e,t){if(t&&e.startsWith(t)){const o=e.slice(t.length);return o?`~${o}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const _e=ds({...cSe(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlagStates:[],subagentModelPolicy:null,subagentModelPolicySaving:!1,workspaceName:"pythinker-web",connection:"disconnected",permission:"manual",permissionBySession:{},thinking:void 0,thinkingBySession:{},planModeBySession:s4(hz),planArmedBySession:s4(mz),dynamicWorkflowModeBySession:s4(gz),goalModeBySession:s4(vz),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:Pg(),authReady:!1,defaultModel:null,workspaces:[],activeWorkspaceId:LSe(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:$Se(),availableOpenInApps:[],serverCapabilities:{},config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1}),$f=ds({planMode:!1,dynamicWorkflowMode:!1,goalMode:!1});function RSe(){if(_e.activeSessionId)return;const e=_e.config?.defaultPermissionMode;(e==="auto"||e==="yolo"||e==="manual")&&(_e.permission=e)}function xz(e,t){return e===t||e.length===t.length&&e.every((n,o)=>n===t[o])}function xr(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every(s=>e[s]===t[s])}function Sz(e){xz(_e.sessions,e)||(_e.sessions=e)}function d6(e,t){_e.sessions=_e.sessions.map(n=>n.id===e?t(n):n)}function PSe(e){_e.sessions=[e,..._e.sessions.filter(t=>t.id!==e.id)]}function FSe(e){_e.sessions=[..._e.sessions,e]}function jSe(e){_e.sessions=_e.sessions.filter(t=>t.id!==e)}function Cz(){const e=_e.activeSessionId;e&&_e.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(_e.unreadBySession={..._e.unreadBySession,[e]:!1},Fg({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===dn.unread&&(_e.unreadBySession=Pg(),Cz())});function U7(){if(ul===null||!ul.health().stale)return;_s("ws:stale-reconnect",{sessionId:_e.activeSessionId,status:"stale"}),ia("ws: stale socket on focus, reconnecting",{activeSessionId:_e.activeSessionId}),ul.reconnect();const e=_e.activeSessionId;e&&sp.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(Cz(),U7())});typeof window<"u"&&(window.addEventListener("focus",U7),window.addEventListener("online",U7));function P9(e){_e.activeSessionId=e}function OSe(e){xr(_e.messagesBySession,e)||(_e.messagesBySession=e)}function HSe(e,t){_e.messagesBySession={..._e.messagesBySession,[e]:t}}function Mz(e,t){_e.messagesBySession={..._e.messagesBySession,[e]:t(_e.messagesBySession[e]??[])}}function DSe(e){const{[e]:t,...n}=_e.messagesBySession;_e.messagesBySession=n}function Az(e){ul?.unsubscribe(e),hCe(e),np.discard(({meta:t})=>t.sessionId===e),jSe(e),DSe(e),delete _e.approvalsBySession[e],delete _e.questionsBySession[e],delete _e.tasksBySession[e],delete _e.goalBySession[e],delete _e.gitStatusBySession[e],delete _e.lastSeqBySession[e],delete _e.compactionBySession[e],delete _e.messagesLoadingMoreBySession[e],delete _e.messagesHasMoreBySession[e],delete _e.messagesLoadMoreErrorBySession[e],delete K7[e],op.delete(e),$4.delete(e),Oz.delete(e),pxe(e),delete _e.queuedBySession[e],delete _e.promptIdBySession[e],delete _e.inFlightBySession[e],delete _e.turnActiveBySession[e],delete _e.planModeBySession[e],delete _e.planArmedBySession[e],delete _e.dynamicWorkflowModeBySession[e],delete _e.goalModeBySession[e],delete _e.thinkingBySession[e],wz(),ISe(),kz(),bz()}const Tz=V(null),Ez=V([]),Iz=V(!1),f6=V(!1),Lz=V(null);async function Nf(e){let t;try{t=await Ct().getSessionStatus(e)}catch{return}d6(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),_e.dynamicWorkflowModeBySession={..._e.dynamicWorkflowModeBySession,[e]:t.dynamicWorkflowMode},_e.planModeBySession={..._e.planModeBySession,[e]:t.planMode},(t.permission==="auto"||t.permission==="yolo"||t.permission==="manual")&&(_e.permissionBySession={..._e.permissionBySession,[e]:t.permission},_e.activeSessionId===e&&(_e.permission=t.permission)),t.thinkingEffort.length>0&&(_e.thinkingBySession={..._e.thinkingBySession,[e]:t.thinkingEffort})}async function VSe(e){const t=_e.goalVersionBySession[e]??0;let n;try{n=await Ct().getSessionGoal(e)}catch{return}if((_e.goalVersionBySession[e]??0)!==t)return;const o={..._e.goalBySession};n===null||n.status==="complete"?delete o[e]:o[e]=n,_e.goalBySession=o}function $z(e,t){const n=t??_e.activeSessionId;return n?Promise.resolve(Ct().updateSession(n,e)).then(()=>Nf(n)).then(()=>!0).catch(o=>(Y0("persistSessionProfile",o,{sessionId:n}),!1)):Promise.resolve(!1)}const Nz=dn.conversationToc;function WSe(){try{const e=ls(Nz);return e===null?!0:e==="true"}catch{return!0}}function qSe(e){try{Es(Nz,e?"true":"false")}catch{}}const zz=V(WSe());function USe(e){zz.value=e,qSe(e)}function Bz(e){try{return ls(e)!=="false"}catch{return!0}}function Rz(e,t){try{Es(e,t?"true":"false")}catch{}}const Pz=V(Bz(dn.turnFolding));function ZSe(e){Pz.value=e,Rz(dn.turnFolding,e)}const Fz=V(Bz(dn.activityRunFolding));function KSe(e){Fz.value=e,Rz(dn.activityRunFolding,e)}function GSe(e){try{return ls(e)??""}catch{return""}}const F9=V(GSe(yz)==="1");function YSe(e){F9.value=e;try{Es(yz,e?"1":"0")}catch{}}let ul=null;const Z7=rSe({api:Ct(),connectEventsIfNeeded:j9,getEventConnection:()=>ul});let rM=0;function jz(){return rM+=1,`msg_opt_${Date.now().toString(36)}_${rM}`}function XSe(e,t,n){if(e.type==="assistantDelta"){const l=_e.messagesBySession[e.sessionId]??[];if(l.at(-1)?.id===e.messageId){wSe(l,e);const r=_e.lastSeqBySession[t]??0;n>0&&n>r&&(_e.lastSeqBySession={..._e.lastSeqBySession,[t]:n});return}}const o={sessions:_e.sessions,activeSessionId:_e.activeSessionId,messagesBySession:_e.messagesBySession,approvalsBySession:_e.approvalsBySession,planReviewByToolCallId:_e.planReviewByToolCallId,questionsBySession:_e.questionsBySession,tasksBySession:_e.tasksBySession,goalBySession:_e.goalBySession,goalVersionBySession:_e.goalVersionBySession,lastSeqBySession:_e.lastSeqBySession,turnActiveBySession:_e.turnActiveBySession,compactionBySession:_e.compactionBySession,config:_e.config,warnings:_e.warnings},s=_Se(o,e,{sessionId:t,seq:n});Sz(s.sessions),P9(s.activeSessionId),OSe(s.messagesBySession),xr(_e.approvalsBySession,s.approvalsBySession)||(_e.approvalsBySession=s.approvalsBySession),xr(_e.planReviewByToolCallId,s.planReviewByToolCallId)||(_e.planReviewByToolCallId=s.planReviewByToolCallId),xr(_e.questionsBySession,s.questionsBySession)||(_e.questionsBySession=s.questionsBySession),xr(_e.tasksBySession,s.tasksBySession)||(_e.tasksBySession=s.tasksBySession),xr(_e.goalBySession,s.goalBySession)||(_e.goalBySession=s.goalBySession),xr(_e.goalVersionBySession,s.goalVersionBySession)||(_e.goalVersionBySession=s.goalVersionBySession),xr(_e.lastSeqBySession,s.lastSeqBySession)||(_e.lastSeqBySession=s.lastSeqBySession),xr(_e.turnActiveBySession,s.turnActiveBySession)||(_e.turnActiveBySession=s.turnActiveBySession),xr(_e.compactionBySession,s.compactionBySession)||(_e.compactionBySession=s.compactionBySession);const i=s.config??null;_e.config!==i&&(_e.config=i),xz(_e.warnings,s.warnings)||(_e.warnings=s.warnings),e.type==="configChanged"&&(_e.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Eo.loadModels(),Eo.loadProviders()),e.type==="sessionUsageUpdated"&&(e.dynamicWorkflowMode!==void 0&&(_e.dynamicWorkflowModeBySession={..._e.dynamicWorkflowModeBySession,[e.sessionId]:e.dynamicWorkflowMode}),e.planMode!==void 0&&(_e.planModeBySession={..._e.planModeBySession,[e.sessionId]:e.planMode}),e.thinking!==void 0&&(_e.thinkingBySession={..._e.thinkingBySession,[e.sessionId]:e.thinking}))}function JSe(e,t){const n=_e.lastSeqBySession[t.sessionId]??0,o=_e.turnActiveBySession[t.sessionId]??!1;XSe(e,t.sessionId,t.seq);const s=Si.sideChatTargetBySession.value[t.sessionId];if(s){const{agentId:i}=s,l=t.sessionId;e.type==="agentDelta"&&e.agentId===i?e.delta.text&&Si.appendSideChatAssistantText(i,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===i?Si.finishSideChatAgent(i,l):e.type==="taskProgress"&&e.taskId===i?Si.appendSideChatAssistantText(i,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===i&&Si.finishSideChatAgent(i,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const i=e.message.sessionId;_e.promptIdBySession[i]!==e.message.promptId&&(_e.promptIdBySession={..._e.promptIdBySession,[i]:e.message.promptId})}if(e.type==="assistantDelta"&&t.sessionId===_e.activeSessionId&&na.recordMoonDelta((e.delta.text?.length??0)+(e.delta.thinking?.length??0)),e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const i=e.reason;WMe(e.sessionId,i==="cancelled"||i==="failed"||i==="blocked"?"aborted":"idle",o)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&VMe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&_e.promptIdBySession[e.sessionId]===e.promptId&&Bt.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&qMe(e.sessionId,e.question),e.type==="approvalRequested"&&UMe(e.sessionId,e.approval)}const np=r_e(({appEvent:e,meta:t})=>JSe(e,t),({appEvent:e})=>o_e(e),{coalesce:c_e});function j9(){if(ul!==null||typeof WebSocket>"u")return;_s("ws:connection",{status:"connecting"}),_e.connection="connecting",ul=Ct().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Bt.applyWorkspaceEvent(t);return}for(const o of a_e({appEvent:t,meta:n}))np(o)},onResync(t,n,o){_s("ws:resync",{sessionId:t,status:"required",seq:n}),np.flush(),op.add(t),sp.request(t)},onError(t,n,o){_s("ws:error",{status:"failed",errorCode:t,fatal:o}),O9({severity:"error",title:Mo.global.t("warnings.wsTitle"),message:n,details:[qo("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){_s("ws:connection",{status:t?"connected":"disconnected"}),_e.connected=t,_e.connection=t?"connected":"disconnected",t&&(lCe(),Bt.refreshServerMeta())},onTranscriptReset(t,n,o,s){Z7.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return Z7.applyOps(t,n,o,s)}})}const K7={},op=new Set,$4=new Set,Oz=new Set;function QSe(e){return ol(e)&&e.code===lM?!0:typeof e=="object"&&e!==null&&e.code===lM}function qo(e,t){if(!(t==null||t===""))return{label:Mo.global.t(`warnings.details.${e}`),value:Hz(t)}}function Hz(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function eCe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function tCe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function nCe(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function oCe(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function aM(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function sCe(e,t,n){const o=a9(t),s=ol(t),i=o||s?t.timestamp:void 0,l=o||s?t.durationMs:void 0,r=[qo("operation",e),qo("sessionId",n??_e.activeSessionId),qo("connection",_e.connection),qo("timestamp",oCe(i??Date.now()))];return o?r.push(qo("duration",aM(l)),qo("request",`${t.method} ${t.path}`),qo("endpoint",t.url),qo("requestId",t.requestId),qo("phase",t.phase),qo("timeout",`${t.timeoutMs}ms`),qo("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),qo("contentType",t.contentType),qo("responsePreview",t.bodyPreview),qo("cause",t.cause)):s?r.push(qo("duration",aM(l)),qo("code",t.code),qo("requestId",t.requestId),qo("message",t.message),qo("details",t.details)):r.push(qo("errorName",eCe(t)),qo("message",tCe(t)??Hz(t)),qo("stack",nCe(t))),r.filter(a=>a!==void 0)}function iCe(e,t,n={}){const o=a9(t),s=ol(t),i=n.title??(o?Mo.global.t("warnings.daemonNetworkTitle"):s?Mo.global.t("warnings.daemonApiTitle"):Mo.global.t("warnings.operationFailedTitle")),l=n.message??(o?Mo.global.t("warnings.daemonNetworkMessage"):s?t.message:Mo.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:l,details:sCe(e,t,n.sessionId)}}function O9(e){_e.warnings=[..._e.warnings,e]}function lCe(){const e=Mo.global.t("warnings.wsTitle"),t=_e.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==_e.warnings.length&&(_e.warnings=t)}function Y0(e,t,n){console.error(`[pythinker-web] operation failed: ${e}`,t);const o=ol(t),s=a9(t);_s("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:o?t.code:void 0,requestId:o||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),O9(iCe(e,t,n))}const rCe={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function aCe(e){if(!ol(e))return;const t=rCe[e.code];return t?Mo.global.t(t):void 0}async function cCe(e){if(Az(e),_e.activeSessionId!==e)return;const t=_e.sessions[0];t?await Bt.selectSession(t.id,{urlMode:"replace"}):(P9(void 0),_e.sessionLoading=!1,Bt.writeSessionUrl(void 0,"replace"))}const cM=new Set;async function uCe(e){if(!cM.has(e)){cM.add(e);try{const t=await Ct().getSessionWarnings(e),n=Mo.global.t("warnings.noteLabel");for(const o of t)O9(`${n}: ${o.message}`)}catch{}}}async function H9(e){const t=Bt.localTurnStartState(e);try{const o=await Ct().getSessionSnapshot(e);if(!_e.sessions.some(a=>a.id===e))return"ok";np.flush();const s=_e.lastSeqBySession[e]??0,i=K7[e];if(!(op.has(e)||ip.has(e))&&i!==void 0&&i===o.epoch&&s>o.asOfSeq)return $4.delete(e)||($4.add(e),sp.request(e)),"ok";if(!Bt.isLocalTurnSnapshotCurrent(e,t))return Bt.afterLocalTurnStartsSettle(e,()=>{sp.request(e)}),"ok";const r=E7(o.session.usage);d6(e,a=>({...o.session,model:o.session.model&&o.session.model.length>0?o.session.model:a.model,usage:r?a.usage:o.session.usage})),HSe(e,Jbe(_e.messagesBySession[e]??[],o.messages)),_e.tasksBySession={..._e.tasksBySession,[e]:e_e(o.subagents,_e.tasksBySession[e]??[])},_e.messagesHasMoreBySession={..._e.messagesHasMoreBySession,[e]:o.hasMoreMessages},_e.approvalsBySession={..._e.approvalsBySession,[e]:o.pendingApprovals};for(const a of o.pendingApprovals){const c=a.display;c?.kind==="plan_review"&&typeof c.plan=="string"&&c.plan.length>0&&(_e.planReviewByToolCallId={..._e.planReviewByToolCallId,[a.toolCallId]:{plan:c.plan,path:typeof c.path=="string"?c.path:void 0}})}_e.questionsBySession={..._e.questionsBySession,[e]:o.pendingQuestions},_e.lastSeqBySession={..._e.lastSeqBySession,[e]:o.asOfSeq},K7[e]=o.epoch,op.delete(e),$4.delete(e),Bt.handleSessionSnapshot(e,{inFlightTurn:o.inFlightTurn,busy:o.session.busy});{const a={..._e.turnActiveBySession};o.session.mainTurnActive??(o.inFlightTurn!==null&&o.session.busy)?a[e]=!0:delete a[e],_e.turnActiveBySession=a}return j9(),ul&&(ul.seedSnapshot(e,o),ul.subscribe(e,{seq:o.asOfSeq,epoch:o.epoch}),pCe(e)),ip.delete(e),r&&Nf(e),uCe(e),"ok"}catch(n){return QSe(n)?(await cCe(e),"not-found"):(Y0("getSessionSnapshot",n,{title:Mo.global.t("warnings.sessionSnapshotTitle"),message:Mo.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const sp=t_e(H9);function dCe(e){return Object.prototype.hasOwnProperty.call(_e.messagesBySession,e)}const fCe=4,oa=[],ip=new Set;function pCe(e){const t=oa.indexOf(e);for(t!==-1&&oa.splice(t,1),oa.unshift(e);oa.length>fCe;){let n=-1;for(let s=oa.length-1;s>=0;s--)if(oa[s]!==_e.activeSessionId){n=s;break}if(n===-1)break;const[o]=oa.splice(n,1);if(o===void 0)break;ul?.unsubscribe(o),ip.add(o)}}function hCe(e){const t=oa.indexOf(e);t!==-1&&oa.splice(t,1),ip.delete(e)}async function mCe(e){return H9(e)}function D9(e,t){return(_e.inFlightBySession[e]??!1)||(_e.turnActiveBySession[e]??!1)||(t??_e.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function V9(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return Mo.global.t("sessions.justNow");if(s<1)return`${Math.round(o/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const i=o/864e5;return i<7?`${Math.round(i)}d`:i<30?`${Math.round(i/7)}w`:i<365?`${Math.round(i/30)}mo`:`${Math.round(i/365)}y`}catch{return e}}const gCe=3e4,uf=V(0);let Jm=null;function vCe(){Jm===null&&(Jm=setInterval(()=>{uf.value=(uf.value+1)%Number.MAX_SAFE_INTEGER},gCe),Jm.unref?.())}function yCe(e,t){const n=e.split(` `),o=t.split(` -`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function wCe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:yCe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,i=typeof t.danger=="string"?t.danger:void 0;return{kind:"shell",command:o,cwd:s,danger:i}}if(n==="file_content"||n==="file"){const o=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",i=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:o,content:s,language:i}}if(n==="file_op"||n==="fileop"){const o=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:o,path:s,detail:i}}if(n==="url_fetch"||n==="url"){const o=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:o}}if(n==="search"){const o=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:o,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const o=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,i=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:o,name:s,description:i}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}function kCe(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel,otherDescription:t.otherDescription}))}}function bCe(e){const t=_e.messagesBySession[e.sessionId];if(!t||t.length===0)return;const n=new Map;for(const s of t)if(s.role==="assistant")for(const i of s.content){if(i.type!=="toolUse"||i.toolName!=="Bash"&&i.toolName!=="bash")continue;const l=i.input,r=l&&typeof l.command=="string"?l.command:void 0;r&&n.set(i.toolCallId,r)}if(n.size===0)return;const o=`task_id: ${e.id}`;for(const s of t)if(s.role==="tool")for(const i of s.content){if(i.type!=="toolResult")continue;if((typeof i.output=="string"?i.output:i.output!==void 0?JSON.stringify(i.output):"").includes(o)){const r=n.get(i.toolCallId);if(r)return r}}}function _Ce(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",o;if(e.status==="running"&&e.startedAt){o=Date.now()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3),a=Math.floor(r/60),c=r%60;n=Mo.global.t("tasks.timingRunning",{time:`${a}:${String(c).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){o=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3);n=Mo.global.t("tasks.timingDone",{sec:r})}else n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,i=e.command??bCe(e),l=e.kind==="bash"&&i?`$ ${i}`:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:o,meta:l,output:s,subagentType:e.subagentType,phase:e.subagentPhase,model:e.model,thinkingEffort:e.thinkingEffort,dynamicWorkflowIndex:e.dynamicWorkflowIndex,swarmIndex:e.swarmIndex,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,createdAt:e.createdAt,completedAt:e.completedAt}}const xCe=B(()=>{const e=_e.sessions.find(n=>n.id===_e.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:_e.workspaceName,branch:t}}),SCe=B(()=>(uf.value,_e.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:D9(e.updatedAt),busy:H9(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})))),CCe=B(()=>_e.activeSessionId??""),MCe=B(()=>{const e=_e.activeSessionId;if(e)return Eo.skillsBySession.value[e]??[];const t=h6.value;return t?Eo.skillsByWorkspace.value[t]??[]:[]}),n2=V({}),K7=V([]),G7=V(!1),t1=V([]),Y7=V(!1),Hc=V({}),ACe=B(()=>{const e=_e.activeSessionId;return e?Hc.value[e]??{}:{}});async function TCe(e){n2.value={...n2.value,[e]:!0};try{await Eo.loadSkillsForSession(e)}finally{n2.value={...n2.value,[e]:!1}}}async function ECe(){G7.value=!0;try{K7.value=await Ct().listConnectors()}catch{K7.value=[]}finally{G7.value=!1}}async function Hz(){Y7.value=!0;try{t1.value=await Ct().listPlugins()}catch{t1.value=[]}finally{Y7.value=!1}}async function ICe(e,t){const n=t1.value.find(o=>o.id===e)?.enabled;t1.value=t1.value.map(o=>o.id===e?{...o,enabled:t}:o);try{await Ct().setPluginEnabled(e,t)}catch(o){n!==void 0&&(t1.value=t1.value.map(s=>s.id===e?{...s,enabled:n}:s)),Y0("setPluginEnabled",o);return}await Hz()}async function LCe(e){await Promise.all([TCe(e),ECe(),Hz()])}async function $Ce(e){const t=_e.activeSessionId;if(!t)return;const n=Hc.value[t]??{};Hc.value={...Hc.value,[t]:{...n,...e}};try{await Ct().updateSession(t,e)}catch(o){throw Hc.value={...Hc.value,[t]:n},Y0("updateCapabilities",o,{sessionId:t}),o}}const V9=B(()=>{const e=_e.activeSessionId;return e?_e.inFlightBySession[e]??!1:!1}),NCe=B(()=>Bt.isStartingFirstPrompt()),Si=sSe(_e,{pushOperationFailure:Y0,nextOptimisticMsgId:Fz,connectEventsIfNeeded:F9,getEventConn:()=>ul,resolveThinkingForPrompt:(e,t)=>Eo.resolveThinkingForPrompt(e,t)}),$u=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Si.sideChatTargetBySession.value[e]?.agentId;return(_e.tasksBySession[e]??[]).filter(n=>n.id!==t)}),Dz=Q_e(_e,$u),zCe=oSe(),BCe=e=>Ct().getFileUrl(e),RCe=[],PCe=[],FCe=[];let cM;function jCe(e,t){if(t.length===0)return e;const n=e.at(-1),o=cM;if(o!==void 0&&o.source===e&&o.length===e.length&&o.hiddenIds===t){if(o.last===n)return o.result;const i=o.result.at(-1);if(n!==void 0&&i!==void 0&&o.last?.id===n.id&&i.id===n.id)return o.result[o.result.length-1]=n,o.last=n,o.result}const s=e.filter(i=>!t.includes(i.id));return cM={source:e,length:e.length,hiddenIds:t,last:n,result:s},s}const OCe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.sideChatUserMessageIdsBySession[e]??FCe,n=_e.messagesBySession[e]??PCe,o=jCe(n,t),s=_e.approvalsBySession[e]??RCe;return zCe(o,s,BCe,p6.value,_e.planReviewByToolCallId)}),p6=B(()=>{const e=_e.activeSessionId;return e?(_e.turnActiveBySession[e]??!1)||(_e.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),HCe=B(()=>V9.value||p6.value),uM=new Map,DCe=B(()=>{Dz.taskClock.value;const e=$u.value.filter(o=>o.kind==="subagent"&&o.runInBackground).toSorted((o,s)=>Date.parse(o.createdAt)-Date.parse(s.createdAt)),t=_e.activeSessionId??"__draft__",n=uM.get(t)??{indexes:new Map,next:1};uM.set(t,n);for(const o of e){const i=n.indexes.get(o.id)??(o.backgroundTaskId?n.indexes.get(o.backgroundTaskId):void 0)??n.next++;n.indexes.set(o.id,i),o.backgroundTaskId&&n.indexes.set(o.backgroundTaskId,i)}return $u.value.map(o=>{const s=_Ce(o);return o.kind==="subagent"&&o.runInBackground&&(s.dynamicWorkflowIndex=o.dynamicWorkflowIndex??n.indexes.get(o.id)),s})}),VCe=B(()=>{const e=_e.activeSessionId;if(!e)return{};const t={};for(const n of _e.messagesBySession[e]??[])for(const o of n.content){if(o.type!=="toolUse"||o.toolName!=="ExitPlanMode")continue;const s=o.input&&typeof o.input=="object"?o.input:{},i=_e.planReviewByToolCallId[o.toolCallId],l=i?.plan??(typeof s.plan=="string"?s.plan:void 0),r=i?.path??(typeof s.path=="string"?s.path:void 0)??(typeof s.planPath=="string"?s.planPath:void 0);t[o.toolCallId]={agentId:"main",toolCallId:o.toolCallId,turnId:n.id,source:"interaction",plan:l,path:r}}return t}),Vz=B(()=>ASe($u.value)),WCe=B(()=>ESe($u.value)),Dc=B(()=>{const e=_e.activeSessionId;return e?_e.goalBySession[e]??null:null}),qCe=B(()=>{const e=_e.activeSessionId;return e?SSe(_e.messagesBySession[e]??[]):[]}),UCe=B(()=>{const e=_e.activeSessionId;return e?_e.compactionBySession[e]??null:null}),ZCe=B(()=>_e.connection),KCe=B(()=>_e.loading),GCe=B(()=>_e.sessionLoading),YCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadingMoreBySession[e]??!1:!1}),XCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesHasMoreBySession[e]??!1:!1}),JCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadMoreErrorBySession[e]??!1:!1}),QCe=B(()=>_e.serverVersion),eMe=B(()=>_e.backend),tMe=B(()=>_e.experimentalFlagStates),nMe=B(()=>_e.subagentModelPolicy),oMe=B(()=>_e.subagentModelPolicySaving);function sMe(e){return _e.experimentalFlagStates.find(t=>t.id===e)}const iMe=B(()=>_e.dangerousBypassAuth);function lMe(){_e.dangerousBypassAuth=!1}const rMe=B(()=>_e.permission),aMe=B(()=>_e.thinking),Wz=B(()=>{const e=_e.activeSessionId;return e?_e.planModeBySession[e]??!1:$f.planMode}),cMe=B(()=>{const e=_e.activeSessionId;return e?_e.planArmedBySession[e]??!1:$f.planMode}),uMe=B(()=>{const e=_e.activeSessionId;return e?_e.dynamicWorkflowModeBySession[e]??!1:$f.dynamicWorkflowMode}),dMe=B(()=>{const e=_e.activeSessionId;return e?_e.goalModeBySession[e]??!1:$f.goalMode}),fMe=B(()=>{const e=TSe(Vz.value);return{plan:Wz.value,goal:Dc.value&&Dc.value.status!=="complete"?{status:Dc.value.status,turnsUsed:Dc.value.turnsUsed,elapsedMs:Dc.value.wallClockMs}:null,dynamicWorkflow:e.total>0?e:null}}),pMe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Ct();return(_e.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(o=>({fileId:o.fileId,kind:o.kind,url:t.getFileUrl(o.fileId),name:o.name}))}))}),hMe=B(()=>_e.warnings),mMe=B(()=>{const e=_e.activeSessionId;return e?(_e.questionsBySession[e]??[]).map(kCe):[]}),gMe=B(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:wCe(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),W9=B(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).length>0?"awaiting-approval":(_e.questionsBySession[e]??[]).length>0?"awaiting-question":V9.value||p6.value?"running":"idle":"idle"}),Eo=wxe(_e,{pushOperationFailure:Y0,refreshSessionStatus:Nf,persistSessionProfile:Lz,activity:W9,updateSession:d6,updateSessionMessages:Cz}),X7=B(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),vMe=B(()=>{const e=_e.activeSessionId;return e?_e.gitStatusBySession[e]?.pullRequest??null:null}),yMe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).toSorted((n,o)=>n.path.localeCompare(o.path)):[]}),wMe=B(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),qz=B(()=>{const e=_e.sessions.find(l=>l.id===_e.activeSessionId),t=X7.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Eo.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??_e.defaultModel)??"—",s=Eo.models.value.find(l=>l.id===o)??Eo.models.value.find(l=>l.model===o);return{model:s?.displayName||s?.model||(o.includes("/")?o.split("/").pop():o),modelId:s?.id??o,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:e?_e.permissionBySession[e.id]??_e.permission:_e.permission,branch:t,cwd:e?.cwd??"",isGitRepo:X7.value!==null}}),kMe=B(()=>Tz.value),bMe=B(()=>_e.sessions.find(t=>t.id===_e.activeSessionId)?.usage.totalCostUsd??0),q9=B(()=>_e.authReady),J7=V(null);Ke(f6,e=>{e&&J7.value===null&&(J7.value=q9.value)},{immediate:!0});const Uz=B(()=>Ube(P9.value,J7.value??!1)),_Me=B(()=>qbe({initialized:f6.value,onboardingCompleted:Uz.value,authReady:q9.value})),xMe=B(()=>_e.defaultModel),SMe=B(()=>_e.config),CMe=B(()=>{const e=_e.activeSessionId;if(!e)return{};const t=_e.gitStatusBySession[e];return t?{...t.entries}:{}});function Nu(e){const t=sl(e.cwd);return _e.workspaces.find(n=>sl(n.root)===t)?.id??e.workspaceId??e.cwd}const U9=B(()=>Ybe({workspaces:_e.workspaces,sessions:_e.sessions,hiddenWorkspaceRoots:_e.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:_e.sessionsHasMoreByWorkspace})),lp=V(hH()),zu=V(mH()==="manual"?"manual":"recent");function MMe(e){const t=Fu(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}const Er=V(MMe(dn.pinnedSessions)),N4=V(ls(dn.pinnedCollapsed)==="true");function AMe(e){Er.value=Er.value.includes(e)?Er.value.filter(t=>t!==e):[...Er.value,e],T1(dn.pinnedSessions,Er.value)}function TMe(e){const t=new Set(Er.value),n=e.filter(o=>t.has(o));Er.value=[...n,...Er.value.filter(o=>!n.includes(o))],T1(dn.pinnedSessions,Er.value)}function EMe(){N4.value=!N4.value,Es(dn.pinnedCollapsed,String(N4.value))}Ke(()=>[U9.value.map(e=>e.id).join("\0"),_e.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=gH(n,lp.value);o!==null&&(lp.value=o,HT(o))});const q0=B(()=>{const e=U9.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:BSe(t.root,_e.fsHome),sessionCount:t.sessionCount}));if(zu.value==="recent"){const t=new Map;for(const n of _e.sessions){if(n.parentSessionId)continue;const o=Nu(n),s=new Date(n.updatedAt).getTime();s>(t.get(o)??Number.NEGATIVE_INFINITY)&&t.set(o,s)}return wH(e,t)}return vH(e,lp.value)}),h6=B(()=>{const e=_e.activeWorkspaceId,t=q0.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ke(h6,e=>{e&&(Object.prototype.hasOwnProperty.call(Eo.skillsByWorkspace.value,e)||Eo.loadSkillsForWorkspace(e))},{immediate:!0});const IMe=B(()=>{const e=h6.value;return e?q0.value.find(t=>t.id===e)??null:null}),LMe=B(()=>{uf.value;const e=new Set(q0.value.map(n=>n.id)),t=new Map(q0.value.map(n=>[n.id,n.name]));return _e.sessions.filter(n=>!n.parentSessionId&&e.has(Nu(n))).map(n=>{const o=Nu(n);return{id:n.id,title:n.title,time:D9(n.updatedAt),busy:H9(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),$Me=B(()=>{uf.value;const e=new Map;for(const t of _e.sessions.toSorted((n,o)=>new Date(o.updatedAt).getTime()-new Date(n.updatedAt).getTime())){if(t.parentSessionId)continue;const n=Nu(t),o={id:t.id,title:t.title,time:D9(t.updatedAt),busy:H9(t.id,t.mainTurnActive),pendingInteraction:t.pendingInteraction,lastTurnReason:t.lastTurnReason,updatedAt:t.updatedAt},s=e.get(n)??[];s.push(o),e.set(n,s)}return q0.value.map(t=>({workspace:t,sessions:e.get(t.id)??[],hasMore:_e.sessionsHasMoreByWorkspace[t.id]??!1,loadingMore:_e.sessionsLoadingMoreByWorkspace[t.id]??!1,initialCount:_e.sessionsInitialCountByWorkspace[t.id]??f0}))});function NMe(e){lp.value=e,HT(e),zu.value!=="manual"&&(zu.value="manual",DT("manual"))}function zMe(e){zu.value!==e&&(zu.value=e,DT(e))}const Zz=B(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),BMe=B(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),RMe=B(()=>{const e={};for(const[t,n]of Object.entries(_e.unreadBySession))n&&(e[t]=!0);return e}),PMe=B(()=>{const e={},t=Zz.value;for(const n of _e.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Nu(n);e[s]=(e[s]??0)+o}return e}),FMe=B(()=>_e.recentRoots),jMe=B(()=>_e.availableOpenInApps),OMe=B(()=>_e.serverCapabilities.fs_write===!0),Bt=gxe(_e,{taskPoller:Dz,sideChat:Si,modelProvider:Eo,pushOperationFailure:Y0,activity:W9,sessionsKnownEmpty:jz,setSessions:xz,updateSession:d6,upsertSessionFront:PSe,appendSession:FSe,forgetSession:Mz,setActiveSessionId:R9,updateSessionMessages:Cz,nextOptimisticMsgId:Fz,getEventConn:()=>ul,syncSessionFromSnapshot:O9,reopenSession:mCe,hasLoadedMessages:dCe,refreshSessionStatus:Nf,refreshSessionGoal:VSe,persistSessionProfile:Lz,mergedWorkspaces:U9,workspacesView:q0,status:qz,workspaceIdForSession:Nu,seedPermissionFromDaemonDefault:RSe,savePlanModeToStorage:yz,saveDynamicWorkflowModeToStorage:wz,saveGoalModeToStorage:kz,draftModes:$f,saveUnread:Pg,saveActiveWorkspaceToStorage:zSe,saveHiddenWorkspacesToStorage:NSe,goalErrorMessage:aCe,resetFastMoon:na.resetFastMoon,initialized:f6,connectIssue:Iz,selectedDiffPath:Az,fileDiffLines:Tz,fileDiffLoading:Ez});async function HMe(){await Bt.loadConfig(),await Promise.all([Bt.checkAuth(),Eo.loadModels(),Eo.loadProviders()])}function DMe(e,t){const n=_e.sessions.find(o=>o.id===e);return n?Bt.renameSession(e,GT(t,n.title)):Promise.resolve()}function Z9(e){return e===_e.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function VMe(e){if(_e.turnActiveBySession[e]){const t={..._e.turnActiveBySession};delete t[e],_e.turnActiveBySession=t}_e.inFlightBySession[e]&&(_e.inFlightBySession={..._e.inFlightBySession,[e]:!1})}function WMe(e,t,n){const o=_e.promptIdBySession[e];Bt.finishPromptLocal(e,{turnWasActive:n}),e===_e.activeSessionId?(Bt.loadGitStatus(e),Nf(e)):t==="idle"&&(_e.unreadBySession={..._e.unreadBySession,[e]:!0},Pg({[e]:!0}));const s=(_e.approvalsBySession[e]??[]).length>0,i=(_e.questionsBySession[e]??[]).length>0;T_e(t,s,i)&&Mr.maybeNotifyCompletion(e,{isUserWatching:Z9(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",promptId:o,onClick:()=>{Bt.selectSession(e)}}),t==="idle"&&cf.maybePlayCompletionSound()}function qMe(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;Mr.maybeNotifyQuestion({isUserWatching:Z9(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{Bt.selectSession(e)}}),cf.maybePlayQuestionSound()}function UMe(e,t){Mr.maybeNotifyApproval({isUserWatching:Z9(e),sessionTitle:_e.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Bt.selectSession(e)}}),cf.maybePlayApprovalSound()}function R1(){return vCe(),{workspace:xCe,sessions:SCe,activeSessionId:CCe,workspacesView:q0,workspaceSortMode:zu,pinnedSessionIds:Er,pinnedCollapsed:N4,visibleWorkspace:IMe,activeWorkspaceId:h6,sessionsForView:LMe,workspaceGroups:$Me,attentionBySession:Zz,pendingBySession:BMe,attentionByWorkspace:PMe,unreadBySession:RMe,recentRoots:FMe,turns:OCe,tasks:DCe,activeAppTasks:$u,auxiliaryTranscripts:U7,todos:qCe,goal:Dc,dynamicWorkflows:Vz,dynamicWorkflowMembersByToolCallId:WCe,activationBadges:fMe,compaction:UCe,status:qz,sessionCost:bMe,fileDiff:kMe,selectedDiffPath:Az,fileDiffLoading:Ez,changes:yMe,gitInfo:X7,gitDiffStats:wMe,activePullRequest:vMe,changesByPath:CMe,pendingApprovals:gMe,availableOpenInApps:jMe,fsWriteSupported:OMe,connection:ZCe,loading:KCe,sessionLoading:GCe,loadingMoreMessages:YCe,hasMoreMessages:XCe,loadMoreMessagesError:JCe,serverVersion:QCe,backend:eMe,experimentalFlagStates:tMe,experimentalFlagState:sMe,subagentModelPolicy:nMe,subagentModelPolicySaving:oMe,saveSubagentModelPolicy:Bt.saveSubagentModelPolicy,clearSubagentModelPolicy:Bt.clearSubagentModelPolicy,reloadSubagentModelPolicy:Bt.loadSubagentModelPolicy,dangerousBypassAuth:iMe,clearDangerousBypassAuth:lMe,initialized:f6,connectIssue:Iz,permission:rMe,thinking:aMe,planMode:Wz,planArmed:cMe,sessionPlans:VCe,dynamicWorkflowMode:uMe,goalMode:dMe,queued:pMe,warnings:hMe,questions:mMe,activity:W9,turnActive:p6,inFlight:V9,working:HCe,isStartingFirstPrompt:NCe,fastMoon:na.fastMoon,models:Eo.models,starredModelIds:Eo.starredModelIds,providers:Eo.providers,uiFontSize:na.uiFontSize,setUiFontSize:na.setUiFontSize,conversationToc:Nz,setConversationToc:USe,turnFolding:Rz,setTurnFolding:ZSe,activityRunFolding:Pz,setActivityRunFolding:KSe,colorScheme:na.colorScheme,setColorScheme:na.setColorScheme,accent:na.accent,setAccent:na.setAccent,notifyOnComplete:Mr.notifyOnComplete,notifyOnQuestion:Mr.notifyOnQuestion,notifyOnApproval:Mr.notifyOnApproval,notifyPermission:Mr.notifyPermission,setNotifyOnComplete:Mr.setNotifyOnComplete,setNotifyOnQuestion:Mr.setNotifyOnQuestion,setNotifyOnApproval:Mr.setNotifyOnApproval,soundOnComplete:cf.soundOnComplete,setSoundOnComplete:cf.setSoundOnComplete,onboarded:P9,setOnboarded:YSe,onboardingCompleted:Uz,appState:_Me,load:Bt.load,selectSession:Bt.selectSession,clearActiveSession:Bt.clearActiveSession,loadOlderMessages:Bt.loadOlderMessages,loadWorkspaces:Bt.loadWorkspaces,loadMoreSessions:Bt.loadMoreSessions,loadAllSessions:Bt.loadAllSessions,selectWorkspace:Bt.selectWorkspace,openWorkspace:Bt.openWorkspace,openWorkspaceDraft:Bt.openWorkspaceDraft,startSessionAndSendPrompt:Bt.startSessionAndSendPrompt,startSessionAndActivateSkill:Bt.startSessionAndActivateSkill,startSessionAndOpenSideChat:Bt.startSessionAndOpenSideChat,addWorkspaceByPath:Bt.addWorkspaceByPath,browseFs:Bt.browseFs,getFsHome:Bt.getFsHome,sendPrompt:Bt.sendPrompt,steerPrompt:Bt.steerPrompt,steerQueued:Bt.steerQueued,sideChatVisible:Si.sideChatVisible,sideChatSessionId:Si.sideChatSessionId,sideChatTurns:Si.sideChatTurns,sideChatRunning:Si.sideChatRunning,sideChatSending:Si.sideChatSending,openSideChat:Si.openSideChat,closeSideChat:Si.closeSideChat,sendSideChatPrompt:Si.sendSideChatPrompt,uploadImage:Bt.uploadImage,abortCurrentPrompt:Bt.abortCurrentPrompt,respondApproval:Bt.respondApproval,respondQuestion:Bt.respondQuestion,dismissQuestion:Bt.dismissQuestion,pendingQuestionActions:Bt.pendingQuestionActions,pendingApprovalActions:Bt.pendingApprovalActions,cancelTask:Bt.cancelTask,detachTask:Bt.detachTask,setPermission:Bt.setPermission,setThinking:Eo.setThinking,setPlanMode:Bt.setPlanMode,togglePlanMode:Bt.togglePlanMode,setDynamicWorkflowMode:Bt.setDynamicWorkflowMode,toggleDynamicWorkflowMode:Bt.toggleDynamicWorkflowMode,setGoalMode:Bt.setGoalMode,toggleGoalMode:Bt.toggleGoalMode,createGoal:Bt.createGoal,controlGoal:Bt.controlGoal,enqueue:Bt.enqueue,dismissWarning:Bt.dismissWarning,renameSession:Bt.renameSession,renameWorkspace:Bt.renameWorkspace,deleteWorkspace:Bt.deleteWorkspace,reorderWorkspaces:NMe,setWorkspaceSortMode:zMe,togglePinnedSession:AMe,reorderPinnedSessions:TMe,togglePinnedCollapsed:EMe,setSessionEmoji:DMe,archiveSession:Bt.archiveSession,exportSession:Bt.exportSession,restoreSession:Bt.restoreSession,loadArchivedSessions:Bt.loadArchivedSessions,compact:Bt.compact,forkSession:Bt.forkSession,generateSessionTitle:Bt.generateSessionTitle,undo:Bt.undo,unqueue:Bt.unqueue,reorderQueue:Bt.reorderQueue,searchFiles:Bt.searchFiles,loadGitStatus:Bt.loadGitStatus,loadFileDiff:Bt.loadFileDiff,clearFileDiff:Bt.clearFileDiff,listDir:Bt.listDir,readFileContent:Bt.readFileContent,getFileDownloadUrl:Bt.getFileDownloadUrl,openWorkspaceFile:Bt.openWorkspaceFile,openInApp:Bt.openInApp,revealWorkspaceFile:Bt.revealWorkspaceFile,revealSavedPlan:Bt.revealSavedPlan,resolveImageUrl:Bt.resolveImageUrl,getFileUrl:e=>Ct().getFileUrl(e),loadModels:Eo.loadModels,loadProviders:Eo.loadProviders,skills:MCe,skillsLoadingBySession:n2,connectors:K7,connectorsLoading:G7,plugins:t1,pluginsLoading:Y7,activeSessionCapabilities:ACe,loadCapabilityData:LCe,updateCapabilities:$Ce,setPluginEnabled:ICe,activateSkill:Eo.activateSkill,setModel:Eo.setModel,toggleStarModel:Eo.toggleStarModel,addProvider:Eo.addProvider,deleteProvider:Eo.deleteProvider,refreshProvider:Eo.refreshProvider,refreshAllProviders:Eo.refreshAllProviders,authReady:q9,defaultModel:xMe,config:SMe,updateConfig:Bt.updateConfig,refreshServerMeta:Bt.refreshServerMeta,checkAuth:Bt.checkAuth,refreshRuntimeState:HMe}}const ZMe=["aria-expanded","aria-label"],KMe={class:"capability-trigger-label"},GMe={class:"capability-panel"},YMe={class:"capability-viewport"},XMe={class:"capability-view"},JMe={key:1,class:"capability-group"},QMe={class:"capability-group-title"},eAe={class:"capability-caption"},tAe={key:0,class:"capability-loading"},nAe={class:"capability-view capability-view-secondary"},oAe={class:"capability-caption"},sAe={key:0,class:"capability-loading"},iAe={class:"capability-caption"},lAe={key:0,class:"capability-loading"},rAe=Je({__name:"CapabilityMenu",props:{sessionId:{},triggerless:{type:Boolean}},setup(e,{expose:t}){const n=e,{t:o}=$t(),s=R1(),i=V(null),l=V(null),r=V(!1),a=V("root"),c=V([]),u=B(()=>n.sessionId===s.activeSessionId.value?s.skills.value:[]),d=B(()=>{const H=n.sessionId;return H?s.skillsLoadingBySession.value[H]===!0:!1}),f=B(()=>s.connectors.value),p=B(()=>s.connectorsLoading.value),h=B(()=>s.plugins.value),m=B(()=>s.pluginsLoading.value),k=B(()=>n.sessionId===s.activeSessionId.value?s.activeSessionCapabilities.value:{}),x=B(()=>d.value||u.value.length>0),y=B(()=>p.value||f.value.length>0),w=B(()=>m.value||h.value.length>0),_=B(()=>{switch(a.value){case"skills":return o("capabilityMenu.skills.title");case"plugins":return o("capabilityMenu.plugins.title");case"root":return""}}),A=B(()=>{switch(a.value){case"skills":return u.value.length;case"plugins":return h.value.length;case"root":return 0}});function P(){c.value=k.value.mcpServers!==void 0?[...k.value.mcpServers]:f.value.map(H=>H.id)}Ke([()=>n.sessionId,f,k],P,{immediate:!0}),Ke([u,d,h,m],()=>{a.value==="skills"&&!d.value&&u.value.length===0&&(a.value="root"),a.value==="plugins"&&!m.value&&h.value.length===0&&(a.value="root")});function z(){if(r.value=!r.value,!r.value){a.value="root";return}n.sessionId&&s.loadCapabilityData(n.sessionId)}t({toggleOpen:z});function L(){r.value=!1,a.value="root"}const E={tools:Promise.resolve(),mcpServers:Promise.resolve()},T={tools:0,mcpServers:0};function $(H,D,M){const R=++T[H],O=n.sessionId,U=E[H].then(async()=>{if(n.sessionId===O)try{await s.updateCapabilities({[H]:[...D.value]})}catch{R===T[H]&&n.sessionId===O&&(D.value=M)}});return E[H]=U,U}function C(H,D){const M=[...c.value],R=new Set(M);return D?R.add(H):R.delete(H),c.value=[...R],$("mcpServers",c,M)}function j(H,D){s.setPluginEnabled(H,D)}return(H,D)=>(g(),S("div",{ref_key:"rootRef",ref:i,class:"capability-control"},[n.triggerless?Y("",!0):(g(),S("button",{key:0,ref_key:"triggerRef",ref:l,type:"button",class:Be(["capability-trigger",{open:r.value}]),"aria-expanded":r.value,"aria-haspopup":"dialog","aria-label":v(o)("capabilityMenu.triggerLabel"),onClick:xt(z,["stop"])},[D[5]||(D[5]=L0('',1)),b("span",KMe,I(v(o)("capabilityMenu.trigger")),1)],10,ZMe)),W(JT,{anchor:n.triggerless?i.value:l.value,open:r.value,label:v(o)("capabilityMenu.triggerLabel"),onClose:L},{default:ae(()=>[b("div",GMe,[b("div",YMe,[b("div",{class:Be(["capability-track",{"is-drilled":a.value!=="root"}])},[b("div",XMe,[x.value?(g(),ue(zc,{key:0,count:u.value.length,onClick:D[0]||(D[0]=M=>a.value="skills")},{label:ae(()=>[He(I(v(o)("capabilityMenu.skills.title")),1)]),trailing:ae(()=>[...D[6]||(D[6]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0),y.value?(g(),S("div",JMe,[b("div",QMe,I(v(o)("capabilityMenu.mcp.title")),1),b("p",eAe,I(v(o)("capabilityMenu.mcp.caption")),1),p.value?(g(),S("div",tAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(f.value,M=>(g(),ue(zc,{key:M.id,class:"mcp-row",selected:c.value.includes(M.id),title:M.name,onClick:R=>void C(M.id,!c.value.includes(M.id))},{label:ae(()=>[He(I(M.name),1)]),trailing:ae(()=>[W(qC,{"model-value":c.value.includes(M.id),"aria-label":v(o)("capabilityMenu.mcp.toggle",{name:M.name}),onClick:D[1]||(D[1]=xt(()=>{},["stop"])),"onUpdate:modelValue":R=>void C(M.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))])):Y("",!0),w.value?(g(),ue(zc,{key:2,count:h.value.length,onClick:D[2]||(D[2]=M=>a.value="plugins")},{label:ae(()=>[He(I(v(o)("capabilityMenu.plugins.title")),1)]),trailing:ae(()=>[...D[7]||(D[7]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0)]),b("div",nAe,[a.value!=="root"?(g(),ue(zc,{key:0,class:"capability-back",count:A.value,onClick:D[3]||(D[3]=M=>a.value="root")},{leading:ae(()=>[...D[8]||(D[8]=[b("svg",{class:"back-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m10 3-5 5 5 5"})],-1)])]),label:ae(()=>[He(I(_.value||v(o)("capabilityMenu.back")),1)]),_:1},8,["count"])):Y("",!0),a.value==="skills"?(g(),S(Ce,{key:1},[b("p",oAe,I(v(o)("capabilityMenu.skills.caption")),1),d.value?(g(),S("div",sAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(u.value,M=>(g(),ue(zc,{key:M.name,class:"skill-row",disabled:"",title:M.description},{label:ae(()=>[He(I(M.name),1)]),_:2},1032,["title"]))),128))],64)):a.value==="plugins"?(g(),S(Ce,{key:2},[b("p",iAe,I(v(o)("capabilityMenu.plugins.caption")),1),m.value?(g(),S("div",lAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(h.value,M=>(g(),ue(zc,{key:M.id,class:"plugin-row",selected:M.enabled,title:M.displayName,onClick:R=>j(M.id,!M.enabled)},{label:ae(()=>[He(I(M.displayName),1)]),trailing:ae(()=>[W(qC,{"model-value":M.enabled,"aria-label":v(o)("capabilityMenu.plugins.toggle",{name:M.displayName}),onClick:D[4]||(D[4]=xt(()=>{},["stop"])),"onUpdate:modelValue":R=>j(M.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))],64)):Y("",!0)])],2)])])]),_:1},8,["anchor","open","label"])],512))}}),aAe=vt(rAe,[["__scopeId","data-v-ff3a96c4"]]);let Bd=0,Jm=null;function Kz(){function e(){typeof document>"u"||(Bd+=1,Bd===1&&(Jm=document.body.style.overflow,document.body.style.overflow="hidden"))}function t(){Bd<=0||(Bd-=1,Bd===0&&typeof document<"u"&&(document.body.style.overflow=Jm??"",Jm=null))}return{lock:e,unlock:t}}const cAe={key:0,class:"sheet-root"},uAe=["aria-label"],dAe=["aria-label"],fAe={key:0,class:"sheet-head"},pAe={class:"sheet-title"},hAe={class:"sheet-body"},mAe=Je({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{lock:i,unlock:l}=Kz();function r(){s("update:modelValue",!1),s("close")}function a(c){c.key==="Escape"&&o.closeOnEsc&&r()}return Ke(()=>o.modelValue,c=>{typeof document>"u"||(c?(i(),document.addEventListener("keydown",a)):(l(),document.removeEventListener("keydown",a)))},{immediate:!0}),En(()=>{typeof document<"u"&&(l(),document.removeEventListener("keydown",a))}),(c,u)=>(g(),ue(qi,{name:"sheet"},{default:ae(()=>[e.modelValue?(g(),S("div",cAe,[b("div",{class:"sheet-scrim",onClick:r}),b("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||v(n)("mobile.sheetLabel")},[b("button",{type:"button",class:"sheet-grab","aria-label":v(n)("mobile.closeSheet"),onClick:r},null,8,dAe),e.title?(g(),S("div",fAe,[b("span",pAe,I(e.title),1)])):Y("",!0),b("div",hAe,[jn(c.$slots,"default",{},void 0,!0)])],8,uAe)])):Y("",!0)]),_:3}))}}),wu=vt(mAe,[["__scopeId","data-v-92ecd88c"]]),gAe={class:"ui-toast__icon","aria-hidden":"true"},vAe={class:"ui-toast__body"},yAe={class:"ui-toast__title"},wAe={key:0,class:"ui-toast__msg"},kAe=Je({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-toast",`ui-toast--${e.variant}`])},[b("span",gAe,[jn(t.$slots,"icon",{},()=>[e.variant==="success"?(g(),ue(Ee,{key:0,name:"check"})):e.variant==="danger"?(g(),ue(Ee,{key:1,name:"close"})):e.variant==="warning"?(g(),ue(Ee,{key:2,name:"alert-triangle"})):(g(),ue(Ee,{key:3,name:"info"}))],!0)]),b("div",vAe,[b("div",yAe,I(e.title),1),e.message?(g(),S("div",wAe,I(e.message),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-toast__close",size:"sm",label:e.dismissLabel,onClick:n[0]||(n[0]=o=>t.$emit("dismiss"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),Gz=vt(kAe,[["__scopeId","data-v-44bc260b"]]),bAe={class:"att-lightbox-card"},_Ae=["src"],xAe=["src","alt"],SAe={class:"att-lightbox-name"},CAe=["aria-label"],MAe={class:"quote-copy"},AAe={key:0,class:"quote-source"},TAe={class:"quote-text"},EAe={key:1,class:"quote-comment"},IAe={key:1,class:"att-strip"},LAe={class:"att-scroll-content"},$Ae={key:1,class:"att-row"},NAe={key:0,class:"att-more"},zAe={class:"cin-wrap"},BAe=["onClick"],RAe={class:"am-icon"},PAe={class:"am-name"},FAe={key:0,class:"am-desc"},jAe={class:"input-row"},OAe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],HAe=["aria-label"],DAe={class:"toolbar-left"},VAe=["aria-label","onKeydown"],WAe={class:"perm-pill-label"},qAe=["onClick"],UAe={class:"pd-info"},ZAe={class:"pd-desc"},KAe={class:"pd-check"},GAe={key:1,class:"workflow-chip"},YAe={class:"workflow-label"},XAe=["aria-label"],JAe=["aria-expanded","aria-label"],QAe=["disabled","aria-expanded","aria-label","onKeydown"],eTe={class:"thinking-pill-label"},tTe=["aria-label"],nTe=["aria-label","disabled"],oTe={class:"md-list"},sTe={key:0,class:"md-section"},iTe=["onClick"],lTe={class:"md-check"},rTe={class:"md-name"},aTe={class:"md-provider"},cTe={key:1,class:"md-divider"},uTe={key:2,class:"md-section"},dTe=["onClick"],fTe={class:"md-check"},pTe={class:"md-name"},hTe={key:0,class:"md-divider"},mTe={class:"md-check md-more-icon"},gTe={class:"md-name"},vTe=["aria-label","onKeydown"],yTe={class:"thinking-dropdown-title"},wTe={class:"thinking-cache-note"},kTe={class:"drop-card"},bTe={key:0,class:"composer-warning-toast",role:"status","aria-live":"polite"},_Te={class:"msheet-search"},xTe={class:"msheet-search"},STe=["onClick"],CTe={class:"am-icon"},MTe={class:"am-name"},ATe={key:0,class:"am-desc"},dM=36,TTe=Je({__name:"Composer",props:{running:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},working:{type:Boolean,default:!1},goalMode:{type:Boolean},workflowActive:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean,default:!1}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel"],setup(e,{expose:t,emit:n}){const o=e,s=B(()=>o.starting?l("composer.starting"):o.running?l("composer.placeholderRunning"):o.goalMode?l("status.goalPlaceholder"):o.planArmed||o.planMode?l("status.planPlaceholder"):l("composer.placeholder")),i=n,{t:l,locale:r}=$t(),a=r6(),{text:c,textareaRef:u,autosize:d,loadForEdit:f,clearDraft:p}=xbe({sessionId:()=>o.sessionId}),h=V([]);let m=1;function k(Me){const it=Me.quote.trim();it&&(h.value.push({id:m++,text:it,comment:Me.comment?.trim()||void 0,source:Me.source?.trim()||void 0}),yt(bn))}function x(Me){h.value=h.value.filter(it=>it.id!==Me)}function y(Me){return[...h.value.map(ft=>{const yn=ft.text.split(` +`),s=[];return n.forEach((i,l)=>{s.push({kind:"rem",gutter:String(l+1),text:`- ${i}`})}),o.forEach((i,l)=>{s.push({kind:"add",gutter:String(l+1),text:`+ ${i}`})}),s}function wCe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:yCe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,i=typeof t.danger=="string"?t.danger:void 0;return{kind:"shell",command:o,cwd:s,danger:i}}if(n==="file_content"||n==="file"){const o=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",i=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:o,content:s,language:i}}if(n==="file_op"||n==="fileop"){const o=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:o,path:s,detail:i}}if(n==="url_fetch"||n==="url"){const o=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:o}}if(n==="search"){const o=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:o,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const o=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,i=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:o,name:s,description:i}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const l=i??{};return{title:typeof l.title=="string"?l.title:"",status:typeof l.status=="string"?l.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,l=(Array.isArray(t.options)?t.options:[]).map(r=>{const a=r??{},c=typeof a.label=="string"?a.label:"";if(!c)return null;const u=typeof a.description=="string"?a.description:void 0;return{label:c,description:u}}).filter(r=>r!==null);return{kind:"plan_review",plan:o,path:s,options:l.length>0?l:void 0}}return{kind:"generic",summary:e.action}}function kCe(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel,otherDescription:t.otherDescription}))}}function bCe(e){const t=_e.messagesBySession[e.sessionId];if(!t||t.length===0)return;const n=new Map;for(const s of t)if(s.role==="assistant")for(const i of s.content){if(i.type!=="toolUse"||i.toolName!=="Bash"&&i.toolName!=="bash")continue;const l=i.input,r=l&&typeof l.command=="string"?l.command:void 0;r&&n.set(i.toolCallId,r)}if(n.size===0)return;const o=`task_id: ${e.id}`;for(const s of t)if(s.role==="tool")for(const i of s.content){if(i.type!=="toolResult")continue;if((typeof i.output=="string"?i.output:i.output!==void 0?JSON.stringify(i.output):"").includes(o)){const r=n.get(i.toolCallId);if(r)return r}}}function _Ce(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",o;if(e.status==="running"&&e.startedAt){o=Date.now()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3),a=Math.floor(r/60),c=r%60;n=Mo.global.t("tasks.timingRunning",{time:`${a}:${String(c).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){o=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime();const r=Math.round(o/1e3);n=Mo.global.t("tasks.timingDone",{sec:r})}else n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,i=e.command??bCe(e),l=e.kind==="bash"&&i?`$ ${i}`:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:o,meta:l,output:s,subagentType:e.subagentType,phase:e.subagentPhase,model:e.model,thinkingEffort:e.thinkingEffort,dynamicWorkflowIndex:e.dynamicWorkflowIndex,swarmIndex:e.swarmIndex,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,createdAt:e.createdAt,completedAt:e.completedAt}}const xCe=B(()=>{const e=_e.sessions.find(n=>n.id===_e.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:_e.workspaceName,branch:t}}),SCe=B(()=>(uf.value,_e.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:V9(e.updatedAt),busy:D9(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})))),CCe=B(()=>_e.activeSessionId??""),MCe=B(()=>{const e=_e.activeSessionId;if(e)return Eo.skillsBySession.value[e]??[];const t=h6.value;return t?Eo.skillsByWorkspace.value[t]??[]:[]}),n2=V({}),G7=V([]),Y7=V(!1),t1=V([]),X7=V(!1),Hc=V({}),ACe=B(()=>{const e=_e.activeSessionId;return e?Hc.value[e]??{}:{}});async function TCe(e){n2.value={...n2.value,[e]:!0};try{await Eo.loadSkillsForSession(e)}finally{n2.value={...n2.value,[e]:!1}}}async function ECe(){Y7.value=!0;try{G7.value=await Ct().listConnectors()}catch{G7.value=[]}finally{Y7.value=!1}}async function Dz(){X7.value=!0;try{t1.value=await Ct().listPlugins()}catch{t1.value=[]}finally{X7.value=!1}}async function ICe(e,t){const n=t1.value.find(o=>o.id===e)?.enabled;t1.value=t1.value.map(o=>o.id===e?{...o,enabled:t}:o);try{await Ct().setPluginEnabled(e,t)}catch(o){n!==void 0&&(t1.value=t1.value.map(s=>s.id===e?{...s,enabled:n}:s)),Y0("setPluginEnabled",o);return}await Dz()}async function LCe(e){await Promise.all([TCe(e),ECe(),Dz()])}async function $Ce(e){const t=_e.activeSessionId;if(!t)return;const n=Hc.value[t]??{};Hc.value={...Hc.value,[t]:{...n,...e}};try{await Ct().updateSession(t,e)}catch(o){throw Hc.value={...Hc.value,[t]:n},Y0("updateCapabilities",o,{sessionId:t}),o}}const W9=B(()=>{const e=_e.activeSessionId;return e?_e.inFlightBySession[e]??!1:!1}),NCe=B(()=>Bt.isStartingFirstPrompt()),Si=sSe(_e,{pushOperationFailure:Y0,nextOptimisticMsgId:jz,connectEventsIfNeeded:j9,getEventConn:()=>ul,resolveThinkingForPrompt:(e,t)=>Eo.resolveThinkingForPrompt(e,t)}),$u=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Si.sideChatTargetBySession.value[e]?.agentId;return(_e.tasksBySession[e]??[]).filter(n=>n.id!==t)}),Vz=Q_e(_e,$u),zCe=oSe(),BCe=e=>Ct().getFileUrl(e),RCe=[],PCe=[],FCe=[];let uM;function jCe(e,t){if(t.length===0)return e;const n=e.at(-1),o=uM;if(o!==void 0&&o.source===e&&o.length===e.length&&o.hiddenIds===t){if(o.last===n)return o.result;const i=o.result.at(-1);if(n!==void 0&&i!==void 0&&o.last?.id===n.id&&i.id===n.id)return o.result[o.result.length-1]=n,o.last=n,o.result}const s=e.filter(i=>!t.includes(i.id));return uM={source:e,length:e.length,hiddenIds:t,last:n,result:s},s}const OCe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.sideChatUserMessageIdsBySession[e]??FCe,n=_e.messagesBySession[e]??PCe,o=jCe(n,t),s=_e.approvalsBySession[e]??RCe;return zCe(o,s,BCe,p6.value,_e.planReviewByToolCallId)}),p6=B(()=>{const e=_e.activeSessionId;return e?(_e.turnActiveBySession[e]??!1)||(_e.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),HCe=B(()=>W9.value||p6.value),dM=new Map,DCe=B(()=>{Vz.taskClock.value;const e=$u.value.filter(o=>o.kind==="subagent"&&o.runInBackground).toSorted((o,s)=>Date.parse(o.createdAt)-Date.parse(s.createdAt)),t=_e.activeSessionId??"__draft__",n=dM.get(t)??{indexes:new Map,next:1};dM.set(t,n);for(const o of e){const i=n.indexes.get(o.id)??(o.backgroundTaskId?n.indexes.get(o.backgroundTaskId):void 0)??n.next++;n.indexes.set(o.id,i),o.backgroundTaskId&&n.indexes.set(o.backgroundTaskId,i)}return $u.value.map(o=>{const s=_Ce(o);return o.kind==="subagent"&&o.runInBackground&&(s.dynamicWorkflowIndex=o.dynamicWorkflowIndex??n.indexes.get(o.id)),s})}),VCe=B(()=>{const e=_e.activeSessionId;if(!e)return{};const t={};for(const n of _e.messagesBySession[e]??[])for(const o of n.content){if(o.type!=="toolUse"||o.toolName!=="ExitPlanMode")continue;const s=o.input&&typeof o.input=="object"?o.input:{},i=_e.planReviewByToolCallId[o.toolCallId],l=i?.plan??(typeof s.plan=="string"?s.plan:void 0),r=i?.path??(typeof s.path=="string"?s.path:void 0)??(typeof s.planPath=="string"?s.planPath:void 0);t[o.toolCallId]={agentId:"main",toolCallId:o.toolCallId,turnId:n.id,source:"interaction",plan:l,path:r}}return t}),Wz=B(()=>ASe($u.value)),WCe=B(()=>ESe($u.value)),Dc=B(()=>{const e=_e.activeSessionId;return e?_e.goalBySession[e]??null:null}),qCe=B(()=>{const e=_e.activeSessionId;return e?SSe(_e.messagesBySession[e]??[]):[]}),UCe=B(()=>{const e=_e.activeSessionId;return e?_e.compactionBySession[e]??null:null}),ZCe=B(()=>_e.connection),KCe=B(()=>_e.loading),GCe=B(()=>_e.sessionLoading),YCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadingMoreBySession[e]??!1:!1}),XCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesHasMoreBySession[e]??!1:!1}),JCe=B(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadMoreErrorBySession[e]??!1:!1}),QCe=B(()=>_e.serverVersion),eMe=B(()=>_e.backend),tMe=B(()=>_e.experimentalFlagStates),nMe=B(()=>_e.subagentModelPolicy),oMe=B(()=>_e.subagentModelPolicySaving);function sMe(e){return _e.experimentalFlagStates.find(t=>t.id===e)}const iMe=B(()=>_e.dangerousBypassAuth);function lMe(){_e.dangerousBypassAuth=!1}const rMe=B(()=>_e.permission),aMe=B(()=>_e.thinking),qz=B(()=>{const e=_e.activeSessionId;return e?_e.planModeBySession[e]??!1:$f.planMode}),cMe=B(()=>{const e=_e.activeSessionId;return e?_e.planArmedBySession[e]??!1:$f.planMode}),uMe=B(()=>{const e=_e.activeSessionId;return e?_e.dynamicWorkflowModeBySession[e]??!1:$f.dynamicWorkflowMode}),dMe=B(()=>{const e=_e.activeSessionId;return e?_e.goalModeBySession[e]??!1:$f.goalMode}),fMe=B(()=>{const e=TSe(Wz.value);return{plan:qz.value,goal:Dc.value&&Dc.value.status!=="complete"?{status:Dc.value.status,turnsUsed:Dc.value.turnsUsed,elapsedMs:Dc.value.wallClockMs}:null,dynamicWorkflow:e.total>0?e:null}}),pMe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Ct();return(_e.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(o=>({fileId:o.fileId,kind:o.kind,url:t.getFileUrl(o.fileId),name:o.name}))}))}),hMe=B(()=>_e.warnings),mMe=B(()=>{const e=_e.activeSessionId;return e?(_e.questionsBySession[e]??[]).map(kCe):[]}),gMe=B(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:wCe(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),q9=B(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).length>0?"awaiting-approval":(_e.questionsBySession[e]??[]).length>0?"awaiting-question":W9.value||p6.value?"running":"idle":"idle"}),Eo=wxe(_e,{pushOperationFailure:Y0,refreshSessionStatus:Nf,persistSessionProfile:$z,activity:q9,updateSession:d6,updateSessionMessages:Mz}),J7=B(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),vMe=B(()=>{const e=_e.activeSessionId;return e?_e.gitStatusBySession[e]?.pullRequest??null:null}),yMe=B(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).toSorted((n,o)=>n.path.localeCompare(o.path)):[]}),wMe=B(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),Uz=B(()=>{const e=_e.sessions.find(l=>l.id===_e.activeSessionId),t=J7.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Eo.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??_e.defaultModel)??"—",s=Eo.models.value.find(l=>l.id===o)??Eo.models.value.find(l=>l.model===o);return{model:s?.displayName||s?.model||(o.includes("/")?o.split("/").pop():o),modelId:s?.id??o,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:e?_e.permissionBySession[e.id]??_e.permission:_e.permission,branch:t,cwd:e?.cwd??"",isGitRepo:J7.value!==null}}),kMe=B(()=>Ez.value),bMe=B(()=>_e.sessions.find(t=>t.id===_e.activeSessionId)?.usage.totalCostUsd??0),U9=B(()=>_e.authReady),Q7=V(null);Ke(f6,e=>{e&&Q7.value===null&&(Q7.value=U9.value)},{immediate:!0});const Zz=B(()=>Zbe(F9.value,Q7.value??!1)),_Me=B(()=>Ube({initialized:f6.value,onboardingCompleted:Zz.value,authReady:U9.value})),xMe=B(()=>_e.defaultModel),SMe=B(()=>_e.config),CMe=B(()=>{const e=_e.activeSessionId;if(!e)return{};const t=_e.gitStatusBySession[e];return t?{...t.entries}:{}});function Nu(e){const t=sl(e.cwd);return _e.workspaces.find(n=>sl(n.root)===t)?.id??e.workspaceId??e.cwd}const Z9=B(()=>Xbe({workspaces:_e.workspaces,sessions:_e.sessions,hiddenWorkspaceRoots:_e.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:_e.sessionsHasMoreByWorkspace})),lp=V(mH()),zu=V(gH()==="manual"?"manual":"recent");function MMe(e){const t=Fu(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}const Er=V(MMe(dn.pinnedSessions)),N4=V(ls(dn.pinnedCollapsed)==="true");function AMe(e){Er.value=Er.value.includes(e)?Er.value.filter(t=>t!==e):[...Er.value,e],T1(dn.pinnedSessions,Er.value)}function TMe(e){const t=new Set(Er.value),n=e.filter(o=>t.has(o));Er.value=[...n,...Er.value.filter(o=>!n.includes(o))],T1(dn.pinnedSessions,Er.value)}function EMe(){N4.value=!N4.value,Es(dn.pinnedCollapsed,String(N4.value))}Ke(()=>[Z9.value.map(e=>e.id).join("\0"),_e.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=vH(n,lp.value);o!==null&&(lp.value=o,DT(o))});const q0=B(()=>{const e=Z9.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:BSe(t.root,_e.fsHome),sessionCount:t.sessionCount}));if(zu.value==="recent"){const t=new Map;for(const n of _e.sessions){if(n.parentSessionId)continue;const o=Nu(n),s=new Date(n.updatedAt).getTime();s>(t.get(o)??Number.NEGATIVE_INFINITY)&&t.set(o,s)}return kH(e,t)}return yH(e,lp.value)}),h6=B(()=>{const e=_e.activeWorkspaceId,t=q0.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ke(h6,e=>{e&&(Object.prototype.hasOwnProperty.call(Eo.skillsByWorkspace.value,e)||Eo.loadSkillsForWorkspace(e))},{immediate:!0});const IMe=B(()=>{const e=h6.value;return e?q0.value.find(t=>t.id===e)??null:null}),LMe=B(()=>{uf.value;const e=new Set(q0.value.map(n=>n.id)),t=new Map(q0.value.map(n=>[n.id,n.name]));return _e.sessions.filter(n=>!n.parentSessionId&&e.has(Nu(n))).map(n=>{const o=Nu(n);return{id:n.id,title:n.title,time:V9(n.updatedAt),busy:D9(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),$Me=B(()=>{uf.value;const e=new Map;for(const t of _e.sessions.toSorted((n,o)=>new Date(o.updatedAt).getTime()-new Date(n.updatedAt).getTime())){if(t.parentSessionId)continue;const n=Nu(t),o={id:t.id,title:t.title,time:V9(t.updatedAt),busy:D9(t.id,t.mainTurnActive),pendingInteraction:t.pendingInteraction,lastTurnReason:t.lastTurnReason,updatedAt:t.updatedAt},s=e.get(n)??[];s.push(o),e.set(n,s)}return q0.value.map(t=>({workspace:t,sessions:e.get(t.id)??[],hasMore:_e.sessionsHasMoreByWorkspace[t.id]??!1,loadingMore:_e.sessionsLoadingMoreByWorkspace[t.id]??!1,initialCount:_e.sessionsInitialCountByWorkspace[t.id]??f0}))});function NMe(e){lp.value=e,DT(e),zu.value!=="manual"&&(zu.value="manual",VT("manual"))}function zMe(e){zu.value!==e&&(zu.value=e,VT(e))}const Kz=B(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),BMe=B(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),RMe=B(()=>{const e={};for(const[t,n]of Object.entries(_e.unreadBySession))n&&(e[t]=!0);return e}),PMe=B(()=>{const e={},t=Kz.value;for(const n of _e.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Nu(n);e[s]=(e[s]??0)+o}return e}),FMe=B(()=>_e.recentRoots),jMe=B(()=>_e.availableOpenInApps),OMe=B(()=>_e.serverCapabilities.fs_write===!0),Bt=gxe(_e,{taskPoller:Vz,sideChat:Si,modelProvider:Eo,pushOperationFailure:Y0,activity:q9,sessionsKnownEmpty:Oz,setSessions:Sz,updateSession:d6,upsertSessionFront:PSe,appendSession:FSe,forgetSession:Az,setActiveSessionId:P9,updateSessionMessages:Mz,nextOptimisticMsgId:jz,getEventConn:()=>ul,syncSessionFromSnapshot:H9,reopenSession:mCe,hasLoadedMessages:dCe,refreshSessionStatus:Nf,refreshSessionGoal:VSe,persistSessionProfile:$z,mergedWorkspaces:Z9,workspacesView:q0,status:Uz,workspaceIdForSession:Nu,seedPermissionFromDaemonDefault:RSe,savePlanModeToStorage:wz,saveDynamicWorkflowModeToStorage:kz,saveGoalModeToStorage:bz,draftModes:$f,saveUnread:Fg,saveActiveWorkspaceToStorage:zSe,saveHiddenWorkspacesToStorage:NSe,goalErrorMessage:aCe,resetFastMoon:na.resetFastMoon,initialized:f6,connectIssue:Lz,selectedDiffPath:Tz,fileDiffLines:Ez,fileDiffLoading:Iz});async function HMe(){await Bt.loadConfig(),await Promise.all([Bt.checkAuth(),Eo.loadModels(),Eo.loadProviders()])}function DMe(e,t){const n=_e.sessions.find(o=>o.id===e);return n?Bt.renameSession(e,YT(t,n.title)):Promise.resolve()}function K9(e){return e===_e.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function VMe(e){if(_e.turnActiveBySession[e]){const t={..._e.turnActiveBySession};delete t[e],_e.turnActiveBySession=t}_e.inFlightBySession[e]&&(_e.inFlightBySession={..._e.inFlightBySession,[e]:!1})}function WMe(e,t,n){const o=_e.promptIdBySession[e];Bt.finishPromptLocal(e,{turnWasActive:n}),e===_e.activeSessionId?(Bt.loadGitStatus(e),Nf(e)):t==="idle"&&(_e.unreadBySession={..._e.unreadBySession,[e]:!0},Fg({[e]:!0}));const s=(_e.approvalsBySession[e]??[]).length>0,i=(_e.questionsBySession[e]??[]).length>0;E_e(t,s,i)&&Mr.maybeNotifyCompletion(e,{isUserWatching:K9(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",promptId:o,onClick:()=>{Bt.selectSession(e)}}),t==="idle"&&cf.maybePlayCompletionSound()}function qMe(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;Mr.maybeNotifyQuestion({isUserWatching:K9(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{Bt.selectSession(e)}}),cf.maybePlayQuestionSound()}function UMe(e,t){Mr.maybeNotifyApproval({isUserWatching:K9(e),sessionTitle:_e.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Bt.selectSession(e)}}),cf.maybePlayApprovalSound()}function R1(){return vCe(),{workspace:xCe,sessions:SCe,activeSessionId:CCe,workspacesView:q0,workspaceSortMode:zu,pinnedSessionIds:Er,pinnedCollapsed:N4,visibleWorkspace:IMe,activeWorkspaceId:h6,sessionsForView:LMe,workspaceGroups:$Me,attentionBySession:Kz,pendingBySession:BMe,attentionByWorkspace:PMe,unreadBySession:RMe,recentRoots:FMe,turns:OCe,tasks:DCe,activeAppTasks:$u,auxiliaryTranscripts:Z7,todos:qCe,goal:Dc,dynamicWorkflows:Wz,dynamicWorkflowMembersByToolCallId:WCe,activationBadges:fMe,compaction:UCe,status:Uz,sessionCost:bMe,fileDiff:kMe,selectedDiffPath:Tz,fileDiffLoading:Iz,changes:yMe,gitInfo:J7,gitDiffStats:wMe,activePullRequest:vMe,changesByPath:CMe,pendingApprovals:gMe,availableOpenInApps:jMe,fsWriteSupported:OMe,connection:ZCe,loading:KCe,sessionLoading:GCe,loadingMoreMessages:YCe,hasMoreMessages:XCe,loadMoreMessagesError:JCe,serverVersion:QCe,backend:eMe,experimentalFlagStates:tMe,experimentalFlagState:sMe,subagentModelPolicy:nMe,subagentModelPolicySaving:oMe,saveSubagentModelPolicy:Bt.saveSubagentModelPolicy,clearSubagentModelPolicy:Bt.clearSubagentModelPolicy,reloadSubagentModelPolicy:Bt.loadSubagentModelPolicy,dangerousBypassAuth:iMe,clearDangerousBypassAuth:lMe,initialized:f6,connectIssue:Lz,permission:rMe,thinking:aMe,planMode:qz,planArmed:cMe,sessionPlans:VCe,dynamicWorkflowMode:uMe,goalMode:dMe,queued:pMe,warnings:hMe,questions:mMe,activity:q9,turnActive:p6,inFlight:W9,working:HCe,isStartingFirstPrompt:NCe,fastMoon:na.fastMoon,models:Eo.models,starredModelIds:Eo.starredModelIds,providers:Eo.providers,uiFontSize:na.uiFontSize,setUiFontSize:na.setUiFontSize,conversationToc:zz,setConversationToc:USe,turnFolding:Pz,setTurnFolding:ZSe,activityRunFolding:Fz,setActivityRunFolding:KSe,colorScheme:na.colorScheme,setColorScheme:na.setColorScheme,accent:na.accent,setAccent:na.setAccent,notifyOnComplete:Mr.notifyOnComplete,notifyOnQuestion:Mr.notifyOnQuestion,notifyOnApproval:Mr.notifyOnApproval,notifyPermission:Mr.notifyPermission,setNotifyOnComplete:Mr.setNotifyOnComplete,setNotifyOnQuestion:Mr.setNotifyOnQuestion,setNotifyOnApproval:Mr.setNotifyOnApproval,soundOnComplete:cf.soundOnComplete,setSoundOnComplete:cf.setSoundOnComplete,onboarded:F9,setOnboarded:YSe,onboardingCompleted:Zz,appState:_Me,load:Bt.load,selectSession:Bt.selectSession,clearActiveSession:Bt.clearActiveSession,loadOlderMessages:Bt.loadOlderMessages,loadWorkspaces:Bt.loadWorkspaces,loadMoreSessions:Bt.loadMoreSessions,loadAllSessions:Bt.loadAllSessions,selectWorkspace:Bt.selectWorkspace,openWorkspace:Bt.openWorkspace,openWorkspaceDraft:Bt.openWorkspaceDraft,startSessionAndSendPrompt:Bt.startSessionAndSendPrompt,startSessionAndActivateSkill:Bt.startSessionAndActivateSkill,startSessionAndOpenSideChat:Bt.startSessionAndOpenSideChat,addWorkspaceByPath:Bt.addWorkspaceByPath,browseFs:Bt.browseFs,getFsHome:Bt.getFsHome,sendPrompt:Bt.sendPrompt,steerPrompt:Bt.steerPrompt,steerQueued:Bt.steerQueued,sideChatVisible:Si.sideChatVisible,sideChatSessionId:Si.sideChatSessionId,sideChatTurns:Si.sideChatTurns,sideChatRunning:Si.sideChatRunning,sideChatSending:Si.sideChatSending,openSideChat:Si.openSideChat,closeSideChat:Si.closeSideChat,sendSideChatPrompt:Si.sendSideChatPrompt,uploadImage:Bt.uploadImage,abortCurrentPrompt:Bt.abortCurrentPrompt,respondApproval:Bt.respondApproval,respondQuestion:Bt.respondQuestion,dismissQuestion:Bt.dismissQuestion,pendingQuestionActions:Bt.pendingQuestionActions,pendingApprovalActions:Bt.pendingApprovalActions,cancelTask:Bt.cancelTask,detachTask:Bt.detachTask,setPermission:Bt.setPermission,setThinking:Eo.setThinking,setPlanMode:Bt.setPlanMode,togglePlanMode:Bt.togglePlanMode,setDynamicWorkflowMode:Bt.setDynamicWorkflowMode,toggleDynamicWorkflowMode:Bt.toggleDynamicWorkflowMode,setGoalMode:Bt.setGoalMode,toggleGoalMode:Bt.toggleGoalMode,createGoal:Bt.createGoal,controlGoal:Bt.controlGoal,enqueue:Bt.enqueue,dismissWarning:Bt.dismissWarning,renameSession:Bt.renameSession,renameWorkspace:Bt.renameWorkspace,deleteWorkspace:Bt.deleteWorkspace,reorderWorkspaces:NMe,setWorkspaceSortMode:zMe,togglePinnedSession:AMe,reorderPinnedSessions:TMe,togglePinnedCollapsed:EMe,setSessionEmoji:DMe,archiveSession:Bt.archiveSession,exportSession:Bt.exportSession,restoreSession:Bt.restoreSession,loadArchivedSessions:Bt.loadArchivedSessions,compact:Bt.compact,forkSession:Bt.forkSession,generateSessionTitle:Bt.generateSessionTitle,undo:Bt.undo,unqueue:Bt.unqueue,reorderQueue:Bt.reorderQueue,searchFiles:Bt.searchFiles,loadGitStatus:Bt.loadGitStatus,loadFileDiff:Bt.loadFileDiff,clearFileDiff:Bt.clearFileDiff,listDir:Bt.listDir,readFileContent:Bt.readFileContent,getFileDownloadUrl:Bt.getFileDownloadUrl,openWorkspaceFile:Bt.openWorkspaceFile,openInApp:Bt.openInApp,revealWorkspaceFile:Bt.revealWorkspaceFile,revealSavedPlan:Bt.revealSavedPlan,resolveImageUrl:Bt.resolveImageUrl,getFileUrl:e=>Ct().getFileUrl(e),loadModels:Eo.loadModels,loadProviders:Eo.loadProviders,skills:MCe,skillsLoadingBySession:n2,connectors:G7,connectorsLoading:Y7,plugins:t1,pluginsLoading:X7,activeSessionCapabilities:ACe,loadCapabilityData:LCe,updateCapabilities:$Ce,setPluginEnabled:ICe,activateSkill:Eo.activateSkill,setModel:Eo.setModel,toggleStarModel:Eo.toggleStarModel,addProvider:Eo.addProvider,deleteProvider:Eo.deleteProvider,refreshProvider:Eo.refreshProvider,refreshAllProviders:Eo.refreshAllProviders,authReady:U9,defaultModel:xMe,config:SMe,updateConfig:Bt.updateConfig,refreshServerMeta:Bt.refreshServerMeta,checkAuth:Bt.checkAuth,refreshRuntimeState:HMe}}const ZMe=["aria-expanded","aria-label"],KMe={class:"capability-trigger-label"},GMe={class:"capability-panel"},YMe={class:"capability-viewport"},XMe={class:"capability-view"},JMe={key:1,class:"capability-group"},QMe={class:"capability-group-title"},eAe={class:"capability-caption"},tAe={key:0,class:"capability-loading"},nAe={class:"capability-view capability-view-secondary"},oAe={class:"capability-caption"},sAe={key:0,class:"capability-loading"},iAe={class:"capability-caption"},lAe={key:0,class:"capability-loading"},rAe=Je({__name:"CapabilityMenu",props:{sessionId:{},triggerless:{type:Boolean}},setup(e,{expose:t}){const n=e,{t:o}=$t(),s=R1(),i=V(null),l=V(null),r=V(!1),a=V("root"),c=V([]),u=B(()=>n.sessionId===s.activeSessionId.value?s.skills.value:[]),d=B(()=>{const H=n.sessionId;return H?s.skillsLoadingBySession.value[H]===!0:!1}),f=B(()=>s.connectors.value),p=B(()=>s.connectorsLoading.value),h=B(()=>s.plugins.value),m=B(()=>s.pluginsLoading.value),k=B(()=>n.sessionId===s.activeSessionId.value?s.activeSessionCapabilities.value:{}),x=B(()=>d.value||u.value.length>0),y=B(()=>p.value||f.value.length>0),w=B(()=>m.value||h.value.length>0),_=B(()=>{switch(a.value){case"skills":return o("capabilityMenu.skills.title");case"plugins":return o("capabilityMenu.plugins.title");case"root":return""}}),A=B(()=>{switch(a.value){case"skills":return u.value.length;case"plugins":return h.value.length;case"root":return 0}});function P(){c.value=k.value.mcpServers!==void 0?[...k.value.mcpServers]:f.value.map(H=>H.id)}Ke([()=>n.sessionId,f,k],P,{immediate:!0}),Ke([u,d,h,m],()=>{a.value==="skills"&&!d.value&&u.value.length===0&&(a.value="root"),a.value==="plugins"&&!m.value&&h.value.length===0&&(a.value="root")});function z(){if(r.value=!r.value,!r.value){a.value="root";return}n.sessionId&&s.loadCapabilityData(n.sessionId)}t({toggleOpen:z});function L(){r.value=!1,a.value="root"}const T={tools:Promise.resolve(),mcpServers:Promise.resolve()},I={tools:0,mcpServers:0};function N(H,D,M){const R=++I[H],O=n.sessionId,U=T[H].then(async()=>{if(n.sessionId===O)try{await s.updateCapabilities({[H]:[...D.value]})}catch{R===I[H]&&n.sessionId===O&&(D.value=M)}});return T[H]=U,U}function C(H,D){const M=[...c.value],R=new Set(M);return D?R.add(H):R.delete(H),c.value=[...R],N("mcpServers",c,M)}function F(H,D){s.setPluginEnabled(H,D)}return(H,D)=>(g(),S("div",{ref_key:"rootRef",ref:i,class:"capability-control"},[n.triggerless?Y("",!0):(g(),S("button",{key:0,ref_key:"triggerRef",ref:l,type:"button",class:Be(["capability-trigger",{open:r.value}]),"aria-expanded":r.value,"aria-haspopup":"dialog","aria-label":v(o)("capabilityMenu.triggerLabel"),onClick:xt(z,["stop"])},[D[5]||(D[5]=L0('',1)),b("span",KMe,E(v(o)("capabilityMenu.trigger")),1)],10,ZMe)),W(QT,{anchor:n.triggerless?i.value:l.value,open:r.value,label:v(o)("capabilityMenu.triggerLabel"),onClose:L},{default:ae(()=>[b("div",GMe,[b("div",YMe,[b("div",{class:Be(["capability-track",{"is-drilled":a.value!=="root"}])},[b("div",XMe,[x.value?(g(),ue(zc,{key:0,count:u.value.length,onClick:D[0]||(D[0]=M=>a.value="skills")},{label:ae(()=>[He(E(v(o)("capabilityMenu.skills.title")),1)]),trailing:ae(()=>[...D[6]||(D[6]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0),y.value?(g(),S("div",JMe,[b("div",QMe,E(v(o)("capabilityMenu.mcp.title")),1),b("p",eAe,E(v(o)("capabilityMenu.mcp.caption")),1),p.value?(g(),S("div",tAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(f.value,M=>(g(),ue(zc,{key:M.id,class:"mcp-row",selected:c.value.includes(M.id),title:M.name,onClick:R=>void C(M.id,!c.value.includes(M.id))},{label:ae(()=>[He(E(M.name),1)]),trailing:ae(()=>[W(UC,{"model-value":c.value.includes(M.id),"aria-label":v(o)("capabilityMenu.mcp.toggle",{name:M.name}),onClick:D[1]||(D[1]=xt(()=>{},["stop"])),"onUpdate:modelValue":R=>void C(M.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))])):Y("",!0),w.value?(g(),ue(zc,{key:2,count:h.value.length,onClick:D[2]||(D[2]=M=>a.value="plugins")},{label:ae(()=>[He(E(v(o)("capabilityMenu.plugins.title")),1)]),trailing:ae(()=>[...D[7]||(D[7]=[b("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):Y("",!0)]),b("div",nAe,[a.value!=="root"?(g(),ue(zc,{key:0,class:"capability-back",count:A.value,onClick:D[3]||(D[3]=M=>a.value="root")},{leading:ae(()=>[...D[8]||(D[8]=[b("svg",{class:"back-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[b("path",{d:"m10 3-5 5 5 5"})],-1)])]),label:ae(()=>[He(E(_.value||v(o)("capabilityMenu.back")),1)]),_:1},8,["count"])):Y("",!0),a.value==="skills"?(g(),S(Ce,{key:1},[b("p",oAe,E(v(o)("capabilityMenu.skills.caption")),1),d.value?(g(),S("div",sAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(u.value,M=>(g(),ue(zc,{key:M.name,class:"skill-row",disabled:"",title:M.description},{label:ae(()=>[He(E(M.name),1)]),_:2},1032,["title"]))),128))],64)):a.value==="plugins"?(g(),S(Ce,{key:2},[b("p",iAe,E(v(o)("capabilityMenu.plugins.caption")),1),m.value?(g(),S("div",lAe,[W(qm,{label:v(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),S(Ce,{key:1},rt(h.value,M=>(g(),ue(zc,{key:M.id,class:"plugin-row",selected:M.enabled,title:M.displayName,onClick:R=>F(M.id,!M.enabled)},{label:ae(()=>[He(E(M.displayName),1)]),trailing:ae(()=>[W(UC,{"model-value":M.enabled,"aria-label":v(o)("capabilityMenu.plugins.toggle",{name:M.displayName}),onClick:D[4]||(D[4]=xt(()=>{},["stop"])),"onUpdate:modelValue":R=>F(M.id,R)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))],64)):Y("",!0)])],2)])])]),_:1},8,["anchor","open","label"])],512))}}),aAe=vt(rAe,[["__scopeId","data-v-ff3a96c4"]]);let Bd=0,Qm=null;function Gz(){function e(){typeof document>"u"||(Bd+=1,Bd===1&&(Qm=document.body.style.overflow,document.body.style.overflow="hidden"))}function t(){Bd<=0||(Bd-=1,Bd===0&&typeof document<"u"&&(document.body.style.overflow=Qm??"",Qm=null))}return{lock:e,unlock:t}}const cAe={key:0,class:"sheet-root"},uAe=["aria-label"],dAe=["aria-label"],fAe={key:0,class:"sheet-head"},pAe={class:"sheet-title"},hAe={class:"sheet-body"},mAe=Je({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{lock:i,unlock:l}=Gz();function r(){s("update:modelValue",!1),s("close")}function a(c){c.key==="Escape"&&o.closeOnEsc&&r()}return Ke(()=>o.modelValue,c=>{typeof document>"u"||(c?(i(),document.addEventListener("keydown",a)):(l(),document.removeEventListener("keydown",a)))},{immediate:!0}),En(()=>{typeof document<"u"&&(l(),document.removeEventListener("keydown",a))}),(c,u)=>(g(),ue(qi,{name:"sheet"},{default:ae(()=>[e.modelValue?(g(),S("div",cAe,[b("div",{class:"sheet-scrim",onClick:r}),b("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||v(n)("mobile.sheetLabel")},[b("button",{type:"button",class:"sheet-grab","aria-label":v(n)("mobile.closeSheet"),onClick:r},null,8,dAe),e.title?(g(),S("div",fAe,[b("span",pAe,E(e.title),1)])):Y("",!0),b("div",hAe,[jn(c.$slots,"default",{},void 0,!0)])],8,uAe)])):Y("",!0)]),_:3}))}}),wu=vt(mAe,[["__scopeId","data-v-92ecd88c"]]),gAe={class:"ui-toast__icon","aria-hidden":"true"},vAe={class:"ui-toast__body"},yAe={class:"ui-toast__title"},wAe={key:0,class:"ui-toast__msg"},kAe=Je({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-toast",`ui-toast--${e.variant}`])},[b("span",gAe,[jn(t.$slots,"icon",{},()=>[e.variant==="success"?(g(),ue(Ee,{key:0,name:"check"})):e.variant==="danger"?(g(),ue(Ee,{key:1,name:"close"})):e.variant==="warning"?(g(),ue(Ee,{key:2,name:"alert-triangle"})):(g(),ue(Ee,{key:3,name:"info"}))],!0)]),b("div",vAe,[b("div",yAe,E(e.title),1),e.message?(g(),S("div",wAe,E(e.message),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-toast__close",size:"sm",label:e.dismissLabel,onClick:n[0]||(n[0]=o=>t.$emit("dismiss"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),Yz=vt(kAe,[["__scopeId","data-v-44bc260b"]]),bAe={class:"att-lightbox-card"},_Ae=["src"],xAe=["src","alt"],SAe={class:"att-lightbox-name"},CAe=["aria-label"],MAe={class:"quote-copy"},AAe={key:0,class:"quote-source"},TAe={class:"quote-text"},EAe={key:1,class:"quote-comment"},IAe={key:1,class:"att-strip"},LAe={class:"att-scroll-content"},$Ae={key:1,class:"att-row"},NAe={key:0,class:"att-more"},zAe={class:"cin-wrap"},BAe=["onClick"],RAe={class:"am-icon"},PAe={class:"am-name"},FAe={key:0,class:"am-desc"},jAe={class:"input-row"},OAe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],HAe=["aria-label"],DAe={class:"toolbar-left"},VAe=["aria-label","onKeydown"],WAe={class:"perm-pill-label"},qAe=["onClick"],UAe={class:"pd-info"},ZAe={class:"pd-desc"},KAe={class:"pd-check"},GAe={key:1,class:"workflow-chip"},YAe={class:"workflow-label"},XAe=["aria-label"],JAe=["aria-expanded","aria-label"],QAe=["disabled","aria-expanded","aria-label","onKeydown"],eTe={class:"thinking-pill-label"},tTe=["aria-label"],nTe=["aria-label","disabled"],oTe={class:"md-list"},sTe={key:0,class:"md-section"},iTe=["onClick"],lTe={class:"md-check"},rTe={class:"md-name"},aTe={class:"md-provider"},cTe={key:1,class:"md-divider"},uTe={key:2,class:"md-section"},dTe=["onClick"],fTe={class:"md-check"},pTe={class:"md-name"},hTe={key:0,class:"md-divider"},mTe={class:"md-check md-more-icon"},gTe={class:"md-name"},vTe=["aria-label","onKeydown"],yTe={class:"thinking-dropdown-title"},wTe={class:"thinking-cache-note"},kTe={class:"drop-card"},bTe={key:0,class:"composer-warning-toast",role:"status","aria-live":"polite"},_Te={class:"msheet-search"},xTe={class:"msheet-search"},STe=["onClick"],CTe={class:"am-icon"},MTe={class:"am-name"},ATe={key:0,class:"am-desc"},fM=36,TTe=Je({__name:"Composer",props:{running:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},working:{type:Boolean,default:!1},goalMode:{type:Boolean},workflowActive:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean,default:!1}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel"],setup(e,{expose:t,emit:n}){const o=e,s=B(()=>o.starting?l("composer.starting"):o.running?l("composer.placeholderRunning"):o.goalMode?l("status.goalPlaceholder"):o.planArmed||o.planMode?l("status.planPlaceholder"):l("composer.placeholder")),i=n,{t:l,locale:r}=$t(),a=r6(),{text:c,textareaRef:u,autosize:d,loadForEdit:f,clearDraft:p}=Sbe({sessionId:()=>o.sessionId}),h=V([]);let m=1;function k(Me){const it=Me.quote.trim();it&&(h.value.push({id:m++,text:it,comment:Me.comment?.trim()||void 0,source:Me.source?.trim()||void 0}),yt(bn))}function x(Me){h.value=h.value.filter(it=>it.id!==Me)}function y(Me){return[...h.value.map(ft=>{const yn=ft.text.split(` `).map(Yt=>`> ${Yt}`).join(` `);return[ft.source?`From ${ft.source}:`:void 0,yn,ft.comment].filter(Yt=>!!Yt).join(` `)}),Me].filter(Boolean).join(` -`)}function w(){o.planArmed||o.planMode||(o.goalMode&&i("toggleGoal"),i("togglePlan"))}function _(){if(no.value){i("focusGoal");return}o.goalMode||((o.planArmed||o.planMode)&&i("togglePlan"),i("toggleGoal"))}const A=V(!1);function P(){A.value=!A.value,yt(()=>{d(),T(),u.value?.focus()})}function z(){A.value&&(A.value=!1,yt(d))}function L(Me){if(typeof getComputedStyle>"u")return dM;const it=Number.parseFloat(getComputedStyle(Me).minHeight);return Number.isFinite(it)&&it>0?it:dM}const E=V(!1);function T(){const Me=u.value;E.value=!!Me&&Me.scrollHeight>L(Me)}Ke(c,()=>{yt(T)}),Ke(()=>o.sessionId,()=>{A.value=!1,C.value=!1,R.value=!1,h.value=[]});const $=kbe({text:c,textareaRef:u,autosize:d,sessionId:()=>o.sessionId}),{open:C,items:j,active:H,update:D,select:M}=bbe({text:c,textareaRef:u,autosize:d,skills:()=>o.skills,emitCommand:Me=>{if(Me==="/plan"){w();return}if(Me==="/goal"){_();return}i("command",Me)},historyPush:Me=>$.push(Me),clearDraft:p}),{open:R,items:O,active:U,loading:Z,stale:q,update:te,select:ee,close:J,getMentionToken:se}=_be({text:c,textareaRef:u,autosize:d,searchFiles:()=>o.searchFiles}),Q=V(null),me=V(null),xe=V(null);function Ye(Me){u.value?.setSelectionRange(Me,Me)}const at=B({get:()=>c.value.startsWith("/")?c.value.slice(1):c.value,set:Me=>{c.value=`/${Me}`,yt(()=>{Ye(c.value.length),D()})}}),X=B({get:()=>{const Me=xe.value;return Me?c.value.slice(Me.start+1,Me.end):""},set:Me=>{const it=xe.value;if(!it)return;c.value=`${c.value.slice(0,it.start)}@${Me}${c.value.slice(it.end)}`;const ft=it.start+Me.length+1;xe.value={start:it.start,end:ft},yt(()=>{Ye(ft),te()})}});Ke([C,a],async([Me,it])=>{!Me||!it||(await yt(),Q.value?.focus())}),Ke([R,a],async([Me,it])=>{!Me||!it||(xe.value=se(),await yt(),me.value?.focus())});function oe(){C.value=!1,u.value?.focus()}function F(Me){Me||oe()}function K(){J(),xe.value=null,u.value?.focus()}function he(Me){Me||K()}function ye(){$.resetBrowsing(),D(),te()}const{attachments:ve,previewAttachment:ie,fileInputRef:de,isDragOver:be,removeAttachment:Se,openAttachmentPreview:je,closeAttachmentPreview:et,openFilePicker:le,handleFileInputChange:fe,handleDragOver:ge,handleDragLeave:Oe,handleDrop:Fe,clearAfterSubmit:pt,loadAttachments:kt}=Sbe({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId});function qt(){const Me=ve.value.map(it=>it.localId);for(const it of Me)Se(it)}const nn=B(()=>ve.value.filter(Me=>Me.kind!=="file")),Jt=B(()=>ve.value.filter(Me=>Me.kind==="file")),kn=V(null),Dn=V(null),xn=V(!1);let $n=null;function Hn(){const Me=kn.value;xn.value=Me!==null&&Me.scrollHeight>Me.clientHeight+1}Ke(kn,Me=>{$n?.disconnect(),$n=null,Me&&typeof ResizeObserver=="function"&&($n=new ResizeObserver(Hn),$n.observe(Me)),Hn()},{immediate:!0}),Ke(ve,()=>void yt(Hn),{deep:!0}),Ke(()=>[nn.value.length,Jt.value.length],([Me,it],[ft,yn])=>{Me<=ft&&it<=yn||yt(()=>{const Yt=kn.value;Yt&&(Yt.scrollTop=Me>ft&&Dn.value?Dn.value.offsetHeight-Yt.clientHeight:Yt.scrollHeight)})}),In(()=>{c.value&&yt(()=>{d(),T()})}),En(()=>{document.removeEventListener("click",oi,!0),$n?.disconnect(),ne?.disconnect(),Wo?.disconnect(),hs()});function bn(){u.value?.focus({preventScroll:!0})}function Wn(Me){kt(Me)}const Pn=B(()=>C.value||R.value||Ft.value||Ut.value||en.value||es.value),Mn=B(()=>c.value.trim().length===0&&ve.value.length===0&&h.value.length===0);t({loadForEdit:f,loadAttachmentsForEdit:Wn,insertQuote:k,focus:bn,anyPopupOpen:Pn,isEmpty:Mn});const Nn=V(null);let An=null;function Qn(Me){Nn.value=l("composer.noArgCommand",{cmd:Me}),An!==null&&clearTimeout(An),An=setTimeout(()=>{Nn.value=null,An=null},3e3)}En(()=>{An!==null&&clearTimeout(An)});function Fn(Me){return{fileId:Me.fileId,kind:Me.kind,name:Me.name,mediaType:Me.mediaType,size:Me.size}}function Qt(Me){if(Me.kind==="file"){Me.fileId!==void 0&&ON(Me.fileId,Me.name,Me.mediaType);return}je(Me)}function uo(){const Me=c.value.trim(),it=y(Me);if(ve.value.some(Yt=>Yt.uploading))return;const ft=ve.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!it&&ft.length===0)return;if(h.value.length===0&&Me==="/plan"){$.push(Me),c.value="",p(),C.value=!1,z(),w();return}if(h.value.length===0&&Me==="/goal"){$.push(Me),c.value="",p(),C.value=!1,z(),_();return}if(h.value.length===0&&Me){const Yt=fbe(Me),li=Yt?GN(o.skills).find(vi=>vi.name===Yt.cmd||vi.name===`/${Y5}${Yt.cmd.slice(1)}`):void 0;if(Yt&&li){if(Yt.arg.trim()&&li.acceptsInput!==!0){Qn(Yt.cmd);return}$.push(Me),c.value="",p(),C.value=!1,z(),i("command",Yt.arg?`${Yt.cmd} ${Yt.arg}`:Yt.cmd);return}}Me&&$.push(Me);const yn={text:it,attachments:ft.map(Yt=>Fn(Yt))};ie.value=null,pt(),c.value="",h.value=[],p(),C.value=!1,R.value=!1,z(),i("submit",yn)}function Zn(){if(!o.running||ve.value.some(Yt=>Yt.uploading))return;const Me=c.value.trim(),it=y(Me),ft=ve.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!it&&ft.length===0&&o.queued.length===0)return;const yn={text:it,attachments:ft.map(Yt=>Fn(Yt))};pt(),Me&&$.push(Me),c.value="",h.value=[],p(),C.value=!1,R.value=!1,z(),i("steer",yn)}let Bo=!1,Un=null;function hs(){Un!==null&&(clearTimeout(Un),Un=null)}function Io(){hs(),Bo=!0}function Rt(){hs(),Un=setTimeout(()=>{Un=null,Bo=!1},0)}function Jo(Me){return Bo||Me.isComposing||Me.keyCode===229}function Ls(Me){if(!Jo(Me)){if(Vo.value&&Me.key==="Backspace"&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const it=u.value;if(it&&it.selectionStart===0&&it.selectionEnd===0){Me.preventDefault(),zi();return}}if(Me.key==="Escape"){if(es.value){Me.preventDefault(),Ne();return}if(Ft.value){Me.preventDefault(),Xn();return}if(Ut.value){Me.preventDefault(),Po();return}if(en.value){Me.preventDefault(),Us();return}}if(C.value){if(Me.key==="Escape"){Me.preventDefault(),C.value=!1;return}if(Me.key==="Tab"&&j.value.length===0){C.value=!1;return}if(Me.key==="ArrowDown"){Me.preventDefault(),H.value=(H.value+1)%j.value.length;return}if(Me.key==="ArrowUp"){Me.preventDefault(),H.value=(H.value-1+j.value.length)%j.value.length;return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const it=j.value[H.value];it&&M(it);return}}if(R.value&&!Z.value){if(Me.key==="ArrowDown"){Me.preventDefault(),U.value=(U.value+1)%Math.max(1,O.value.length);return}if(Me.key==="ArrowUp"){Me.preventDefault(),U.value=(U.value-1+Math.max(1,O.value.length))%Math.max(1,O.value.length);return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const it=O.value[U.value];it&&ee(it);return}if(Me.key==="Escape"){Me.preventDefault(),R.value=!1;return}}if(Me.key==="s"&&(Me.ctrlKey||Me.metaKey)&&!Me.shiftKey&&!Me.altKey){o.running&&(Me.preventDefault(),Zn());return}if(!A.value&&!C.value&&!R.value&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const it=$.isBrowsing();if(Me.key==="ArrowUp"&&$.hasHistory()&&(it||$.caretAtTextStart())){Me.preventDefault(),$.recallOlder(),C.value=!1;return}if(Me.key==="ArrowDown"&&it){Me.preventDefault(),$.recallNewer(),C.value=!1;return}}if(Me.key==="Enter"&&!Me.shiftKey){if(A.value&&!(Me.metaKey||Me.ctrlKey))return;Me.preventDefault(),uo()}}}const $e=B(()=>l("composer.send")),Ge=B(()=>!!o.uploadImage),ot=B(()=>!ve.value.some(Me=>Me.uploading)&&(c.value.trim()!==""||h.value.length>0||ve.value.some(Me=>!Me.error&&Me.fileId))),dt=B(()=>{if(C.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),Mt=B(()=>{if(C.value&&j.value.length>0)return`composer-slash-option-${H.value}`;if(R.value&&O.value.length>0)return`composer-mention-option-${U.value}`}),Ft=V(!1),Ut=V(!1),en=V(!1),tn=V(null),eo=V(null),Ro=V(null),$s=V(null),Do=V(null),We=V(null),st=V(null),Xe=V(null);ca(We),ca(st),ca(Xe);const qe=V(""),Pe=V(""),bt=V(""),Lt=V(""),cn=V(!1);function So(){Ft.value=!Ft.value,Ft.value&&(vl(),Ut.value=!1,en.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Qo(){Ni.value||(Ut.value=!Ut.value,Ut.value&&(Zs(),Ft.value=!1,en.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0)))}function Po(){Ut.value=!1,mi()}function Xn(){Ft.value=!1,mi()}function pn(){en.value=!en.value,en.value&&(ql(),Ft.value=!1,Ut.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Us(){en.value=!1,mi()}function mi(){!Ft.value&&!Ut.value&&!en.value&&!es.value&&document.removeEventListener("click",oi,!0)}function oi(Me){const it=Me.target;tn.value?.contains(it)||Hs.value?.contains(it)||vs.value?.contains(it)||(Xn(),Po(),Us(),Ne())}function ql(){const Me=eo.value,it=tn.value;qe.value=Me&&it?`${Math.round(Me.getBoundingClientRect().left-it.getBoundingClientRect().left)}px`:""}function vl(){const Me=Ro.value,it=tn.value;Pe.value=Me&&it?`${Math.round(it.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}function Zs(){const Me=$s.value,it=tn.value;bt.value=Me&&it?`${Math.round(it.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}const yo=B(()=>{const Me=o.status?.ctxMax??0;return Me<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/Me*100)))}),Lo=B(()=>{const Me=ba(o.status?.ctxUsed??0),it=ba(o.status?.ctxMax??0);return l("status.ctxTooltip",{used:Me,max:it,pct:yo.value})}),yl=B(()=>yo.value>=80),ms=B(()=>o.models?.find(Me=>Me.id===o.status?.modelId)),wl=B(()=>i6(ms.value)),gi=B(()=>l6(ms.value)),si=B(()=>w9(ms.value,o.thinking)),Ul=B(()=>gi.value.includes(si.value)?si.value:""),Ni=B(()=>wl.value==="unsupported"||gi.value.length<=1),Ae=B(()=>{const Me=(ms.value?.supportEfforts?.length??0)>0,it=si.value;return Me&&it!=="on"&&it!=="off"?rf(it):lt(it)}),Ie=B(()=>l("composer.thinkingControl",{level:Ae.value}));function At(Me){Ni.value||(i("setThinking",XN(ms.value,Me)),Po())}function lt(Me){return Me==="on"?l("status.thinkingOn"):Me==="off"?l("status.thinkingOff"):rf(Me)}const mn=B(()=>gi.value.map(Me=>({value:Me,label:lt(Me)}))),Kn=B(()=>o.planArmed===!0||o.planMode===!0),to=B(()=>o.workflowActive===!0),Co=B(()=>o.goal?.status??o.activationBadges?.goal?.status??null),no=B(()=>Co.value!==null&&Co.value!=="complete"),Vo=B(()=>o.goalMode?"goal":o.planArmed?"plan":null),Qi=V(null),Os=V(""),Ta=B(()=>Os.value?{textIndent:Os.value}:void 0);let Wo=null;function zi(){Vo.value==="goal"?i("toggleGoal"):Vo.value==="plan"&&i("togglePlan")}function gs(){const Me=Qi.value;Os.value=Me?`calc(${Me.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ke(Vo,async Me=>{if(Wo?.disconnect(),Wo=null,!Me){Os.value="";return}await yt(),gs(),typeof ResizeObserver=="function"&&Qi.value&&(Wo=new ResizeObserver(gs),Wo.observe(Qi.value))},{immediate:!0});const kl=V(null),es=V(!1),Hs=V(null),vs=V(null);ca(Hs),ca(vs);const bl=V(null),Ks=V(null);let ne=null;const ke=B(()=>{const Me=[];return Ge.value&&Me.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Vt}),a.value&&Me.push({id:"slash",icon:"terminal",nameKey:"composer.addSlash",descKey:"composer.addSlashDesc",action:Wt},{id:"mention",icon:"link",nameKey:"composer.addMention",descKey:"composer.addMentionDesc",action:on}),Me.push({id:"capabilities",icon:"sliders",nameKey:"capabilityMenu.trigger",action:Vn},{id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:Ht},{id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:Tn},{id:"workflow",icon:"sparkles",nameKey:"status.dynamicWorkflowLabel",descKey:"composer.addWorkflowDesc",action:zn}),Me});function Te(){const Me=bl.value;if(!Me||Me.scrollHeight<=Me.clientHeight+1){Ks.value=null;return}const it=getComputedStyle(Me),ft=Number.parseFloat(it.getPropertyValue("--menu-scrollbar-track-inset"))||0,yn=Number.parseFloat(it.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Yt=Me.clientHeight-ft*2,li=Math.max(yn,Me.clientHeight/Me.scrollHeight*Yt),vi=Me.scrollHeight-Me.clientHeight;Ks.value={top:Me.offsetTop+ft+Me.scrollTop/vi*(Yt-li),height:li}}Ke(es,async Me=>{ne?.disconnect(),ne=null,Ks.value=null,Me&&(await yt(),Te(),typeof ResizeObserver=="function"&&bl.value&&(ne=new ResizeObserver(Te),ne.observe(bl.value)))});function Ne(){es.value=!1,mi()}function Qe(Me){Me||Ne()}function ht(){if(es.value){Ne();return}Xn(),Po(),Us(),C.value=!1,R.value=!1,es.value=!0,document.addEventListener("click",oi,!0),yt(()=>{(a.value?vs.value:Hs.value)?.querySelector(".am-row")?.focus()})}function jt(Me){Me.action(),a.value&&Me.id==="files"||u.value?.focus()}function Zt(Me){if(Me.key==="Escape"){Me.preventDefault(),Ne(),u.value?.focus();return}if(Me.key==="Tab"){Ne();return}if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;Me.preventDefault();const it=a.value?vs.value:Hs.value,ft=Array.from(it?.querySelectorAll(".am-row")??[]);if(ft.length===0)return;const yn=ft.indexOf(document.activeElement),Yt=Me.key==="ArrowDown"?(yn+1)%ft.length:(yn-1+ft.length)%ft.length;ft[Yt]?.focus()}function Vt(){Ne(),le()}function Wt(){Ne(),c.value="/",yt(()=>{Ye(1),D()})}function on(){Ne(),c.value="@",yt(()=>{Ye(1),te()})}function Vn(){Ne(),kl.value?.toggleOpen()}function Ht(){Ne(),o.goalMode||_()}function Tn(){Ne(),Kn.value||w()}function zn(){Ne(),to.value||i("toggleWorkflow")}const Ns=[{mode:"manual",icon:"fingerprint",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],rs=V(null),_l=V("");function X0(Me){const it={};return Me&&(it["--composer-menu-desc-width"]=Me),it}const J0=B(()=>{const Me=X0(_l.value);return qe.value&&(Me.left=qe.value),Me}),qu=B(()=>{const Me={};return Pe.value&&(Me.right=Pe.value),Lt.value&&(Me.maxHeight=Lt.value),Me}),hr=B(()=>{const Me={};return bt.value&&(Me.right=bt.value),Me});let ts=null;function Fr(Me){const it=Number.parseFloat(Me);return Number.isFinite(it)?it:0}function Uu(Me){return`${Me.fontStyle||"normal"} ${Me.fontWeight||"400"} ${Me.fontSize} ${Me.fontFamily}`}function Q0(Me){return Me.letterSpacing==="normal"?0:Fr(Me.letterSpacing)}function jr(Me,it){if(!Me)return 0;const ft=Oke(Me,Uu(it),{letterSpacing:Q0(it)});return Hke(ft)}function P1(){const Me=rs.value?.querySelector(".pd-desc");if(!Me)return;const it=getComputedStyle(Me),ft=Math.max(0,...Ns.map(yn=>jr(l(yn.descKey),it)));_l.value=ft>0?`${Math.ceil(ft)}px`:""}function F1(){typeof window>"u"||(ts!==null&&window.cancelAnimationFrame(ts),yt(()=>{ts=window.requestAnimationFrame(()=>{ts=null,P1()})}))}Ke(r,F1,{immediate:!0}),In(()=>{F1(),document.fonts?.ready.then(F1)}),En(()=>{ts!==null&&(window.cancelAnimationFrame(ts),ts=null)});function Re(Me){i("setPermission",Me),Us()}const pe=B(()=>Ns.find(Me=>Me.mode===o.status?.permission)),Le=B(()=>pe.value?l(pe.value.labelKey):""),Sn=B(()=>pe.value?.icon??"fingerprint"),ii=V(!1),el=V(!1),Ea=V(!1),Or=V(!1);let Hr=0,ec=0,j1=0,tc=0;const Zu=V(null);let O1=null;function Ku(Me,it,ft){const yn=Me.getPropertyValue(it).trim(),Yt=Number.parseFloat(yn);return Number.isFinite(Yt)?yn.endsWith("em")?Yt*Number.parseFloat(Me.fontSize):Yt:ft}function xl(Me){return Me.scrollWidth>Me.clientWidth+1||Me.clientWidth===0&&(Me.textContent?.length??0)>0}function zf(Me){const it=Me.getBoundingClientRect().left;for(const ft of Me.querySelectorAll(".compact-chip, .ctx-group, .model-pill, .stop, .send")){const yn=ft.getBoundingClientRect();if(yn.width>0&&yn.lefttc+yn&&(Or.value=!1,yt(Sl));return}if(Ea.value){if(Yt>j1+yn){Ea.value=!1,yt(Sl);return}li&&zf(li)&&(tc=Yt,Or.value=!0,yt(Sl));return}if(el.value){if(Yt>ec+yn){el.value=!1,yt(Sl);return}li&&zf(li)&&(yl.value?(j1=Yt,Ea.value=!0):(tc=Yt,Or.value=!0),yt(Sl));return}if(ii.value&&Yt>Hr+yn){ii.value=!1,yt(Sl);return}const vi=Do.value;!vi||!xl(vi)||vi.getBoundingClientRect().width>=ft||(ii.value?(ec=Yt,el.value=!0):(Hr=Yt,ii.value=!0),yt(Sl))}In(()=>{typeof ResizeObserver=="function"&&tn.value&&(O1=new ResizeObserver(Sl),O1.observe(tn.value)),document.fonts?.ready.then(Sl)}),Ke([Le,to,yl,Ae,()=>o.status?.model,()=>o.working,r],()=>{ii.value=!1,el.value=!1,Ea.value=!1,Or.value=!1,yt(Sl)}),En(()=>{O1?.disconnect(),O1=null});const H1=B(()=>ms.value?.provider??""),nc=B(()=>!H1.value||!o.models?.length?[]:o.models.filter(Me=>Me.provider===H1.value)),Zl=B(()=>new Set(o.starredIds??[]));function ys(Me){return Zl.value.has(Me)}const Dr=B(()=>o.models?.length?o.models.filter(Me=>ys(Me.id)&&Me.provider!==H1.value):[]);function Cl(){const Me=We.value,it=tn.value;if(!Me||!it)return;const ft=getComputedStyle(Me),yn=Fr(ft.getPropertyValue("--space-1"))||4,Yt=Fr(ft.getPropertyValue("--space-2"))||8,li=window.visualViewport,vi=li?.offsetTop??0,yi=vi+(li?.height??window.innerHeight),V1=it.getBoundingClientRect(),Ia=V1.top-vi-yn-Yt,Gu=yi-V1.bottom-yn-Yt;Me.offsetHeight>Ia&&Gu>Ia?(cn.value=!0,Lt.value=`${Math.max(Math.floor(Gu),0)}px`):(cn.value=!1,Lt.value=`${Math.max(Math.floor(Ia),0)}px`)}function Bi(){Xn()}function mr(){window.addEventListener("resize",Bi),window.visualViewport?.addEventListener("resize",Bi),window.visualViewport?.addEventListener("scroll",Bi)}function D1(){window.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("scroll",Bi)}Ke(Ft,async Me=>{if(!Me){D1();return}mr(),cn.value=!1,Lt.value="",await yt(),Cl(),(We.value?.querySelector(".md-row.is-current")??We.value?.querySelector(".md-row"))?.focus()}),En(D1);function Kl(Me){if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;const it=Array.from(We.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(it.length===0)return;Me.preventDefault();const ft=it.indexOf(document.activeElement),yn=Me.key==="ArrowDown"?(ft+1)%it.length:(ft-1+it.length)%it.length;it[yn]?.focus()}function Gl(Me){i("selectModel",Me),Xn()}return(Me,it)=>(g(),S("div",{class:Be(["composer",{"drag-over":v(be),expanded:A.value}]),onDragover:it[27]||(it[27]=(...ft)=>v(ge)&&v(ge)(...ft)),onDragleave:it[28]||(it[28]=(...ft)=>v(Oe)&&v(Oe)(...ft)),onDrop:it[29]||(it[29]=(...ft)=>v(Fe)&&v(Fe)(...ft))},[v(ie)?(g(),S("div",{key:0,class:"att-lightbox",onClick:it[1]||(it[1]=xt((...ft)=>v(et)&&v(et)(...ft),["self"]))},[b("div",bAe,[W(Cn,{text:v(l)("model.close")},{default:ae(()=>[b("button",{type:"button",class:"att-lightbox-close",onClick:it[0]||(it[0]=(...ft)=>v(et)&&v(et)(...ft))},"✕")]),_:1},8,["text"]),v(ie).kind==="video"?(g(),S("video",{key:0,class:"att-lightbox-media",src:v(ie).previewUrl,controls:"",playsinline:""},null,8,_Ae)):(g(),S("img",{key:1,class:"att-lightbox-media",src:v(ie).previewUrl,alt:v(ie).name},null,8,xAe)),b("div",SAe,I(v(ie).name),1)])])):Y("",!0),b("div",{class:Be(["composer-card",{"labels-collapsed":ii.value}])},[h.value.length>0?(g(),S("div",{key:0,class:"quote-strip","aria-label":v(l)("selection.quoteLabel")},[(g(!0),S(Ce,null,rt(h.value,ft=>(g(),S("div",{key:ft.id,class:"quote-chip"},[b("span",MAe,[ft.source?(g(),S("span",AAe,I(ft.source),1)):Y("",!0),b("span",TAe,I(ft.text),1),ft.comment?(g(),S("span",EAe,I(ft.comment),1)):Y("",!0)]),W(Dt,{size:"sm",label:v(l)("composer.removeNamed",{name:ft.text}),onClick:yn=>x(ft.id)},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])]))),128))],8,CAe)):Y("",!0),v(ve).length>0?(g(),S("div",IAe,[b("div",{ref_key:"attachmentScrollRef",ref:kn,class:Be(["att-scroll",{"is-overflowing":xn.value}])},[b("div",LAe,[nn.value.length>0?(g(),S("div",{key:0,ref_key:"attachmentMediaRowRef",ref:Dn,class:"att-row att-row-media"},[(g(!0),S(Ce,null,rt(nn.value,ft=>(g(),ue(P7,{key:ft.localId,kind:ft.kind,name:ft.name,url:ft.previewUrl,"file-id":ft.fileId,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["kind","name","url","file-id","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):Y("",!0),Jt.value.length>0?(g(),S("div",$Ae,[(g(!0),S(Ce,null,rt(Jt.value,ft=>(g(),ue(P7,{key:ft.localId,kind:"file",name:ft.name,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):Y("",!0)])],2),xn.value?(g(),S("span",NAe,I(v(l)("composer.attachmentCount",{n:v(ve).length})),1)):Y("",!0),v(ve).length>=2?(g(),ue(Cn,{key:1,text:v(l)("composer.clearAll")},{default:ae(()=>[W(Dt,{class:"att-clear",size:"sm",label:v(l)("composer.clearAll"),onClick:qt},{default:ae(()=>[W(Ee,{name:"trash"})]),_:1},8,["label"])]),_:1},8,["text"])):Y("",!0)])):Y("",!0),b("div",zAe,[v(C)&&!v(a)?(g(),ue(VC,{key:0,id:"composer-slash-menu",items:v(j),"active-index":v(H),onSelect:v(M),onHover:it[2]||(it[2]=ft=>H.value=ft)},null,8,["items","active-index","onSelect"])):Y("",!0),v(R)&&!v(a)?(g(),ue(WC,{key:1,id:"composer-mention-menu",items:v(O),"active-index":v(U),loading:v(Z),stale:v(q),onSelect:v(ee),onHover:it[3]||(it[3]=ft=>U.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[es.value&&!v(a)?(g(),S("div",{key:0,ref_key:"modesMenuRef",ref:Hs,class:"add-menu",onClick:it[5]||(it[5]=xt(()=>{},["stop"])),onKeydown:Zt},[b("div",{ref_key:"addMenuScrollRef",ref:bl,class:"am-scroll",role:"menu",onScroll:Te},[(g(!0),S(Ce,null,rt(ke.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:it[4]||(it[4]=xt(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",RAe,[W(Ee,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",PAe,I(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",FAe,I(v(l)(ft.descKey)),1)):Y("",!0)],40,BAe))),128))],544),Ks.value?(g(),S("div",{key:0,class:"scroll-thumb",style:Gt({top:`${Ks.value.top}px`,height:`${Ks.value.height}px`})},null,4)):Y("",!0)],544)):Y("",!0)]),_:1}),b("div",jAe,[Vo.value?(g(),S("span",{key:0,ref_key:"workModePillRef",ref:Qi,class:"wm-pill"},[W(Ee,{name:Vo.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),b("span",null,I(Vo.value==="goal"?v(l)("status.goalLabel"):v(l)("status.planLabel")),1),W(Dt,{class:"wm-x",size:"sm",label:v(l)("status.workModeDismiss"),onMousedown:it[6]||(it[6]=xt(()=>{},["prevent"])),onClick:zi},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],512)):Y("",!0),Jn(b("textarea",{ref_key:"textareaRef",ref:u,"onUpdate:modelValue":it[7]||(it[7]=ft=>ps(c)?c.value=ft:null),class:"ph",style:Gt(Ta.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!dt.value,"aria-controls":dt.value,"aria-activedescendant":Mt.value,onKeydown:Ls,onCompositionstart:Io,onCompositionend:Rt,onInput:ye,onBlur:it[8]||(it[8]=ft=>{v(a)||(C.value=!1,R.value=!1)})},null,44,OAe),[[js,v(c)]]),W(Cn,{text:A.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle")},{default:ae(()=>[A.value||E.value?(g(),S("button",{key:0,class:"expand-btn",type:"button","aria-label":A.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle"),onClick:P},[A.value?(g(),ue(Ee,{key:0,name:"collapse",size:"sm"})):(g(),ue(Ee,{key:1,name:"expand",size:"sm"}))],8,HAe)):Y("",!0)]),_:1},8,["text"])])]),Ge.value?(g(),S("input",{key:2,ref_key:"fileInputRef",ref:de,type:"file",multiple:"",class:"file-input-hidden",onChange:it[9]||(it[9]=(...ft)=>v(fe)&&v(fe)(...ft))},null,544)):Y("",!0),b("div",{ref_key:"toolbarRef",ref:tn,class:"toolbar"},[b("div",{ref_key:"menuMeasureRef",ref:rs,class:"menu-measure","aria-hidden":"true"},[...it[30]||(it[30]=[b("span",{class:"pd-desc"},null,-1)])],512),b("div",DAe,[W(Dt,{size:"md",class:"composer-attach",label:v(l)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":es.value,onMousedown:it[10]||(it[10]=xt(()=>{},["prevent"])),onClick:xt(ht,["stop"])},{default:ae(()=>[W(Ee,{name:"plus"})]),_:1},8,["label","aria-expanded"]),W(aAe,{ref_key:"capMenuRef",ref:kl,"session-id":e.sessionId,triggerless:""},null,8,["session-id"]),e.status?(g(),S("span",{key:0,ref_key:"permissionPillRef",ref:eo,class:Be(["perm-pill",["perm-"+e.status.permission,{open:en.value}]]),role:"button",tabindex:"0","aria-label":Le.value,onClick:xt(pn,["stop"]),onKeydown:[go(pn,["enter"]),go(xt(pn,["prevent"]),["space"])]},[W(Ee,{class:"perm-pill-icon",name:Sn.value,size:"md"},null,8,["name"]),b("span",WAe,I(Le.value),1)],42,VAe)):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[en.value&&e.status?(g(),S("div",{key:0,ref_key:"permDropdownRef",ref:Xe,class:"perm-dropdown",style:Gt(J0.value),role:"menu",onClick:it[11]||(it[11]=xt(()=>{},["stop"]))},[(g(),S(Ce,null,rt(Ns,ft=>b("button",{key:ft.mode,class:Be(["pd-row",{"is-current":ft.mode===e.status.permission}]),role:"menuitem",onClick:yn=>Re(ft.mode)},[b("span",{class:"pd-icon",style:Gt({color:ft.color})},[W(Ee,{name:ft.icon,size:"md"},null,8,["name"])],4),b("span",UAe,[b("span",{class:"pd-name",style:Gt({color:ft.color})},I(v(l)(ft.labelKey)),5),b("span",ZAe,I(v(l)(ft.descKey)),1)]),b("span",KAe,[ft.mode===e.status.permission?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)])],10,qAe)),64))],4)):Y("",!0)]),_:1}),to.value?(g(),S("span",GAe,[W(Ee,{class:"workflow-ic",name:"sparkles",size:"md"}),b("span",YAe,I(v(l)("status.dynamicWorkflowLabel")),1),W(Dt,{class:"workflow-x",size:"sm",label:v(l)("status.dynamicWorkflowDismiss"),onMousedown:it[12]||(it[12]=xt(()=>{},["prevent"])),onClick:it[13]||(it[13]=xt(ft=>i("toggleWorkflow"),["stop"]))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])])):Y("",!0)]),b("div",{ref_key:"toolbarRightRef",ref:Zu,class:"toolbar-right"},[yl.value?(g(),S("button",{key:0,class:Be(["compact-chip",{gone:Ea.value}]),onClick:it[14]||(it[14]=xt(ft=>i("compact"),["stop"]))},"/compact",2)):Y("",!0),W(Cn,{text:Lo.value},{default:ae(()=>[e.status&&!e.hideContext?(g(),S("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":Lo.value},[W(Ibe,{pct:yo.value},null,8,["pct"])],8,XAe)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:el.value?e.status?.model:null},{default:ae(()=>[e.status?(g(),S("button",{key:0,ref_key:"modelPillRef",ref:Ro,type:"button",class:Be(["model-pill",{open:Ft.value,"icon-only":el.value,"model-gone":Or.value}]),"aria-haspopup":"menu","aria-expanded":Ft.value,"aria-label":el.value?e.status.model:void 0,onClick:xt(So,["stop"])},[el.value?(g(),ue(Ee,{key:0,name:"cute-bot",size:"md"})):(g(),S(Ce,{key:1},[b("span",{ref_key:"modelNameRef",ref:Do,class:"mp-name"},I(e.status.model),513),W(Ee,{class:"cv",name:"chevron-down",size:"sm"})],64))],10,JAe)):Y("",!0)]),_:1},8,["text"]),e.status&&wl.value!=="unsupported"?(g(),ue(Cn,{key:1,text:Ie.value},{default:ae(()=>[b("button",{ref_key:"thinkingPillRef",ref:$s,type:"button",class:Be(["thinking-pill",{open:Ut.value}]),disabled:Ni.value,"aria-haspopup":"dialog","aria-expanded":Ut.value,"aria-label":Ie.value,onClick:xt(Qo,["stop"]),onKeydown:go(xt(Po,["prevent"]),["escape"])},[W(Ee,{name:"thinking",size:"sm"}),b("span",eTe,I(Ae.value),1),Ni.value?Y("",!0):(g(),ue(Ee,{key:0,class:"cv",name:"chevron-down",size:"sm"}))],42,QAe)]),_:1},8,["text"])):Y("",!0),e.working?(g(),ue(Cn,{key:2,text:v(l)("composer.interruptTitle")},{default:ae(()=>[b("button",{class:"stop","aria-label":v(l)("composer.interrupt"),onClick:it[15]||(it[15]=ft=>i("interrupt"))},[...it[31]||(it[31]=[b("span",{class:"stop-square","aria-hidden":"true"},null,-1)])],8,tTe)]),_:1},8,["text"])):Y("",!0),b("button",{class:Be(["send",{"is-starting":e.starting}]),"aria-label":$e.value,disabled:e.starting||!ot.value,onClick:it[16]||(it[16]=ft=>uo())},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(Ee,{key:1,name:"send",size:"sm"}))],10,nTe)],512),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ft.value&&e.status?(g(),S("div",{key:0,ref_key:"modelDropdownRef",ref:We,class:Be(["composer-dropdown model-dropdown",{"flip-down":cn.value}]),style:Gt(qu.value),role:"menu",onClick:it[18]||(it[18]=xt(()=>{},["stop"])),onKeydown:Kl},[b("div",oTe,[Dr.value.length>0?(g(),S("div",sTe,I(v(l)("status.starredModels")),1)):Y("",!0),(g(!0),S(Ce,null,rt(Dr.value,ft=>(g(),S("button",{key:ft.id,class:Be(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",lTe,[ft.id===e.status.modelId?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",rTe,I(ft.displayName??ft.model),1),b("span",aTe,I(ft.provider),1),W(Ee,{class:"md-star",name:"star",size:"sm"})],10,iTe))),128)),Dr.value.length>0?(g(),S("div",cTe)):Y("",!0),nc.value.length>0?(g(),S("div",uTe,I(H1.value),1)):Y("",!0),(g(!0),S(Ce,null,rt(nc.value,ft=>(g(),S("button",{key:ft.id,class:Be(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",fTe,[ft.id===e.status.modelId?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",pTe,I(ft.displayName??ft.model),1),ys(ft.id)?(g(),ue(Ee,{key:0,class:"md-star",name:"star",size:"sm"})):Y("",!0)],10,dTe))),128))]),nc.value.length>0?(g(),S("div",hTe)):Y("",!0),b("button",{class:"md-row md-row-more",role:"menuitem",onClick:it[17]||(it[17]=ft=>{Xn(),i("pickModel")})},[b("span",mTe,[W(Ee,{name:"list",size:"sm"})]),b("span",gTe,I(v(l)("status.moreModels")),1),W(Ee,{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],38)):Y("",!0)]),_:1}),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ut.value&&e.status?(g(),S("div",{key:0,ref_key:"thinkingDropdownRef",ref:st,class:"composer-dropdown thinking-dropdown",style:Gt(hr.value),role:"dialog","aria-label":v(l)("composer.thinkingMenuTitle"),onClick:it[19]||(it[19]=xt(()=>{},["stop"])),onKeydown:go(xt(Po,["prevent"]),["escape"])},[b("div",yTe,[W(Ee,{name:"thinking",size:"sm"}),b("span",null,I(v(l)("composer.thinkingMenuTitle")),1)]),W(di,{"model-value":Ul.value,options:mn.value,size:"sm","onUpdate:modelValue":At},null,8,["model-value","options"]),b("div",wTe,I(v(l)("status.cacheNote")),1)],44,vTe)):Y("",!0)]),_:1})],512)],2),b("div",{class:Be(["drop-overlay",{show:v(be)}]),"aria-hidden":"true"},[b("div",kTe,[W(Ee,{name:"file-plus",size:"lg"}),b("span",null,I(v(l)("composer.dropToAttach")),1)])],2),(g(),ue(hl,{to:"body"},[W(qi,{name:"composer-warning"},{default:ae(()=>[Nn.value?(g(),S("div",bTe,[W(Gz,{variant:"warning",title:Nn.value,"dismiss-label":v(l)("common.dismiss"),onDismiss:it[20]||(it[20]=ft=>Nn.value=null)},null,8,["title","dismiss-label"])])):Y("",!0)]),_:1}),W(wu,{"model-value":v(a)&&v(C),title:v(l)("composer.slashSheetTitle"),"onUpdate:modelValue":F},{default:ae(()=>[b("div",_Te,[W(us,{ref_key:"slashSheetSearchRef",ref:Q,modelValue:at.value,"onUpdate:modelValue":it[21]||(it[21]=ft=>at.value=ft),placeholder:v(l)("composer.slashSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:Ls},null,8,["modelValue","placeholder"])]),W(VC,{id:"composer-slash-menu",layout:"sheet",items:v(j),"active-index":v(H),query:at.value,onSelect:v(M),onHover:it[22]||(it[22]=ft=>H.value=ft)},null,8,["items","active-index","query","onSelect"])]),_:1},8,["model-value","title"]),W(wu,{"model-value":v(a)&&v(R),title:v(l)("composer.mentionSheetTitle"),"onUpdate:modelValue":he},{default:ae(()=>[b("div",xTe,[W(us,{ref_key:"mentionSheetSearchRef",ref:me,modelValue:X.value,"onUpdate:modelValue":it[23]||(it[23]=ft=>X.value=ft),placeholder:v(l)("composer.mentionSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:Ls},null,8,["modelValue","placeholder"])]),W(WC,{id:"composer-mention-menu",layout:"sheet",items:v(O),"active-index":v(U),loading:v(Z),stale:v(q),onSelect:v(ee),onHover:it[24]||(it[24]=ft=>U.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])]),_:1},8,["model-value","title"]),W(wu,{"model-value":v(a)&&es.value,"onUpdate:modelValue":Qe},{default:ae(()=>[b("div",{ref_key:"mobileModesMenuRef",ref:vs,class:"msheet-add",role:"menu",onClick:it[26]||(it[26]=xt(()=>{},["stop"])),onKeydown:Zt},[(g(!0),S(Ce,null,rt(ke.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:it[25]||(it[25]=xt(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",CTe,[W(Ee,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",MTe,I(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",ATe,I(v(l)(ft.descKey)),1)):Y("",!0)],40,STe))),128))],544)]),_:1},8,["model-value"])]))],34))}}),Yz=vt(TTe,[["__scopeId","data-v-203386fd"]]),ETe={class:"ah"},ITe={class:"akind"},LTe={class:"apath"},$Te={class:"ah-path"},NTe={class:"dg"},zTe={class:"dc"},BTe={key:2,class:"body-shell"},RTe={class:"shell-cmd"},PTe={key:0,class:"shell-cwd"},FTe={key:1,class:"shell-danger"},jTe={class:"file-bar"},OTe={class:"file-lang"},HTe={class:"file-ln"},DTe={class:"file-text"},VTe={key:4,class:"body-chip"},WTe={class:"chip-label"},qTe={class:"chip-value"},UTe={key:0,class:"chip-detail"},ZTe={key:5,class:"body-chip"},KTe={key:0,class:"chip-label"},GTe={class:"chip-value"},YTe={key:6,class:"body-chip"},XTe={class:"chip-label"},JTe={class:"chip-value"},QTe={key:0,class:"chip-detail"},eEe={key:7,class:"body-chip"},tEe={class:"chip-label"},nEe={class:"chip-value"},oEe={key:0,class:"chip-detail"},sEe={key:8,class:"body-todo"},iEe={class:"todo-glyph"},lEe={key:10,class:"body-generic"},rEe={class:"gen-text"},aEe={key:11,class:"feedback-wrap"},cEe=["placeholder"],uEe={class:"feedback-hint"},dEe={key:0,class:"plan-actions"},fEe={key:1,class:"abtn"},pEe=.4,hEe=Je({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=B(()=>{const oe=n.block;return oe.kind!=="plan_review"?null:{plan:oe.plan,path:oe.path,options:oe.options??[]}}),l=V(!1),r=V(!1),a=B(()=>["plan_review","diff","file"].includes(n.block.kind)),c=V(null),u=V(null),d=V(null),f=V({top:!1,bottom:!1}),p=V({top:!1,bottom:!1}),h=V({top:!1,bottom:!1});function m(oe){return F=>{const K=F.currentTarget;K instanceof HTMLElement&&(oe.value={top:K.scrollTop>0,bottom:K.scrollTop+K.clientHeight{const{top:F,bottom:K}=oe.value;if(!F&&!K)return;const he="var(--menu-scroll-fade)",ye=F&&K?`linear-gradient(to bottom, transparent 0, black ${he}, black calc(100% - ${he}), transparent 100%)`:F?`linear-gradient(to bottom, transparent, black ${he})`:`linear-gradient(to top, transparent, black ${he})`;return{maskImage:ye,WebkitMaskImage:ye}})}const _=w(f),A=w(p),P=w(h);function z(){const oe=[[c.value,f],[u.value,p],[d.value,h]];for(const[F,K]of oe)F&&(K.value={top:F.scrollTop>0,bottom:F.scrollTop+F.clientHeightvoid yt(z)),Ke(l,()=>void yt(z)),Ke(()=>n.block,()=>void yt(z));const L=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function E(){const oe=L.includes(n.block.kind)?n.block.kind:"generic";return s(`approval.title.${oe}`)}const T=V(!1),$=V(""),C=V(null);function j(){const oe=C.value;if(!oe)return;oe.style.height="auto";const K=(window.visualViewport?.height??window.innerHeight)*pEe,he=Math.min(oe.scrollHeight,K);oe.style.height=`${he}px`,oe.style.overflowY=oe.scrollHeight>K?"auto":"hidden"}let H=null,D=0;function M(){if(H?.disconnect(),H=null,typeof ResizeObserver>"u")return;const oe=C.value;oe&&(H=new ResizeObserver(F=>{const K=F[0]?.contentRect.width??0;K!==D&&(D=K,j())}),H.observe(oe))}Ke($,()=>void yt(j)),Ke(T,oe=>{if(!oe){H?.disconnect(),H=null;return}yt(()=>{j(),M()})}),Ke(l,oe=>{oe||yt(j)});const{uiFontSize:R}=C9();Ke(R,()=>void yt(j));function O(){n.busy||(T.value=!0,$.value="",setTimeout(()=>C.value?.focus(),0))}function U(){if(n.busy)return;const oe=$.value.trim();i.value?ee("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:oe||void 0}):ee("feedback",{decision:"rejected",feedback:oe||void 0}),T.value=!1,$.value=""}function Z(){T.value=!1,$.value=""}function q(oe){oe.key==="Enter"&&!oe.shiftKey?(oe.preventDefault(),U()):oe.key==="Escape"&&(oe.preventDefault(),Z())}const te=V(null);Ke(()=>n.busy,oe=>{oe||(te.value=null)});function ee(oe,F){n.busy||(te.value=oe,o("decide",F))}function J(){ee("approve",{decision:"approved"})}function se(){ee("approveSession",{decision:"approved",scope:"session"})}function Q(){ee("reject",{decision:"rejected"})}function me(){ee("approvePlan",{decision:"approved"})}function xe(oe){ee(`option:${oe}`,{decision:"approved",selectedLabel:oe})}function Ye(){n.busy||O()}function at(){ee("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function X(oe){const F=(document.activeElement?.tagName??"").toLowerCase();if(F==="input"||F==="textarea"||n.busy||l.value)return;const K=i.value;if(K){if(K.options.length===0){oe.key==="1"?(oe.preventDefault(),me()):oe.key==="2"?(oe.preventDefault(),Ye()):oe.key==="3"&&(oe.preventDefault(),at());return}oe.key==="1"&&K.options[0]?(oe.preventDefault(),xe(K.options[0].label)):oe.key==="2"&&K.options[1]?(oe.preventDefault(),xe(K.options[1].label)):oe.key==="3"&&K.options[2]&&(oe.preventDefault(),xe(K.options[2].label));return}oe.key==="1"?(oe.preventDefault(),J()):oe.key==="2"?(oe.preventDefault(),se()):oe.key==="3"?(oe.preventDefault(),Q()):oe.key==="4"&&(oe.preventDefault(),O())}return In(()=>{document.addEventListener("keydown",X),window.addEventListener("resize",j),window.visualViewport?.addEventListener("resize",j)}),En(()=>{document.removeEventListener("keydown",X),window.removeEventListener("resize",j),window.visualViewport?.removeEventListener("resize",j),H?.disconnect(),H=null}),(oe,F)=>(g(),ue(c9,{class:Be(["appr",{minimized:l.value}])},$2({head:ae(()=>[b("div",ETe,[F[6]||(F[6]=b("span",{class:"ah-ic"},"!",-1)),b("span",ITe,I(E()),1),b("span",LTe,[e.block.kind==="diff"||e.block.kind==="file"||e.block.kind==="fileop"?(g(),S(Ce,{key:0},[He(I(e.block.path),1)],64)):e.block.kind==="shell"?(g(),S(Ce,{key:1},[He(I(e.block.command),1)],64)):e.block.kind==="url"?(g(),S(Ce,{key:2},[He(I(e.block.url),1)],64)):e.block.kind==="search"?(g(),S(Ce,{key:3},[He(I(e.block.query),1)],64)):e.block.kind==="invocation"?(g(),S(Ce,{key:4},[He(I(e.block.name),1)],64)):e.block.kind==="generic"?(g(),S(Ce,{key:5},[He(I(e.block.summary),1)],64)):Y("",!0)]),e.agentName&&!l.value?(g(),ue(Fl,{key:0,variant:"neutral",size:"sm"},{default:ae(()=>[He(I(v(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):Y("",!0),l.value?Y("",!0):(g(),ue(Fl,{key:1,variant:"warning",size:"sm",class:"aw"},{default:ae(()=>[He(I(v(s)("approval.required")),1)]),_:1})),a.value&&!l.value?(g(),ue(Dt,{key:2,class:"aexpand",size:"sm",label:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),tooltip:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),onClick:F[0]||(F[0]=K=>r.value=!r.value)},{default:ae(()=>[W(Ee,{name:r.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):Y("",!0),W(Dt,{class:"amin",size:"sm",label:l.value?v(s)("question.expand"):v(s)("question.minimize"),onClick:F[1]||(F[1]=K=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ee,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ee,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[e.block.kind==="plan_review"&&e.block.path?(g(),ue(Cn,{key:0,text:e.block.path},{default:ae(()=>[b("div",$Te,I(e.block.path),1)]),_:1},8,["text"])):Y("",!0),e.block.kind==="diff"?(g(),S("div",{key:1,ref_key:"diffBodyRef",ref:c,class:Be(["diff",{expanded:r.value}]),style:Gt(v(_)),onScroll:F[2]||(F[2]=(...K)=>v(k)&&v(k)(...K))},[(g(!0),S(Ce,null,rt(e.block.diff,(K,he)=>(g(),S("div",{key:he,class:Be(["dl",K.kind==="add"?"add":K.kind==="rem"?"del":""])},[b("span",NTe,I(K.gutter),1),b("span",zTe,I(K.text),1)],2))),128))],38)):e.block.kind==="shell"?(g(),S("div",BTe,[b("div",RTe,[F[7]||(F[7]=b("span",{class:"shell-dollar"},"$",-1)),He(" "+I(e.block.command),1)]),e.block.cwd?(g(),S("div",PTe,"cwd: "+I(e.block.cwd),1)):Y("",!0),e.block.danger?(g(),S("div",FTe,I(v(s)("approval.danger",{detail:e.block.danger})),1)):Y("",!0)])):e.block.kind==="file"?(g(),S("div",{key:3,class:Be(["body-file",{expanded:r.value}])},[b("div",jTe,[b("span",OTe,I(e.block.language??""),1)]),b("div",{class:"file-content",ref_key:"fileBodyRef",ref:u,style:Gt(v(A)),onScroll:F[3]||(F[3]=(...K)=>v(x)&&v(x)(...K))},[(g(!0),S(Ce,null,rt(e.block.content.split(` -`),(K,he)=>(g(),S("div",{key:he,class:"file-line"},[b("span",HTe,I(he+1),1),b("span",DTe,I(K),1)]))),128))],36)],2)):e.block.kind==="fileop"?(g(),S("div",VTe,[b("span",WTe,I(e.block.op),1),b("span",qTe,I(e.block.path),1),e.block.detail?(g(),S("span",UTe,I(e.block.detail),1)):Y("",!0)])):e.block.kind==="url"?(g(),S("div",ZTe,[e.block.method?(g(),S("span",KTe,I(e.block.method),1)):Y("",!0),b("span",GTe,I(e.block.url),1)])):e.block.kind==="search"?(g(),S("div",YTe,[b("span",XTe,I(v(s)("approval.searchQueryLabel")),1),b("span",JTe,I(e.block.query),1),e.block.scope?(g(),S("span",QTe,I(v(s)("approval.searchScope",{scope:e.block.scope})),1)):Y("",!0)])):e.block.kind==="invocation"?(g(),S("div",eEe,[b("span",tEe,I(e.block.kind2),1),b("span",nEe,I(e.block.name),1),e.block.description?(g(),S("span",oEe,I(e.block.description),1)):Y("",!0)])):e.block.kind==="todo"?(g(),S("div",sEe,[(g(!0),S(Ce,null,rt(e.block.items,(K,he)=>(g(),S("div",{key:he,class:"todo-item"},[b("span",iEe,I(K.status==="done"||K.status==="completed"?"✓":"○"),1),b("span",{class:Be(["todo-title",{"todo-done":K.status==="done"||K.status==="completed"}])},I(K.title),3)]))),128))])):e.block.kind==="plan_review"?(g(),S("div",{key:9,ref_key:"planBodyRef",ref:d,class:Be(["body-plan",{expanded:r.value}]),style:Gt(v(P)),onScroll:F[4]||(F[4]=(...K)=>v(y)&&v(y)(...K))},[W(Br,{text:e.block.plan},null,8,["text"])],38)):(g(),S("div",lEe,[b("span",rEe,I(e.block.summary),1)])),T.value?(g(),S("div",aEe,[Jn(b("textarea",{ref_key:"feedbackRef",ref:C,"onUpdate:modelValue":F[5]||(F[5]=K=>$.value=K),class:"feedback-ta",placeholder:v(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:q},null,40,cEe),[[js,$.value]]),b("div",uEe,I(v(s)("approval.feedbackHint")),1)])):Y("",!0)]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[i.value?(g(),S("div",dEe,[i.value.options.length>0?(g(!0),S(Ce,{key:0},rt(i.value.options,(K,he)=>(g(),ue(Cn,{key:he,text:K.description},{default:ae(()=>[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value===`option:${K.label}`,disabled:e.busy,onClick:ye=>xe(K.label)},{default:ae(()=>[He(I(K.label),1),W(Yr,{class:"k",keys:[String(he+1)]},null,8,["keys"])]),_:2},1032,["loading","disabled","onClick"])]),_:2},1032,["text"]))),128)):(g(),ue(Nt,{key:1,class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approvePlan",disabled:e.busy,onClick:me},{default:ae(()=>[He(I(v(s)("approval.approvePlan")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"])),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:Ye},{default:ae(()=>[He(I(v(s)("approval.revise")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["2"]})):Y("",!0)]),_:1},8,["disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"danger-soft",loading:te.value==="rejectAndExit",disabled:e.busy,onClick:at},{default:ae(()=>[He(I(v(s)("approval.rejectAndExit")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["3"]})):Y("",!0)]),_:1},8,["loading","disabled"])])):(g(),S("div",fEe,[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approve",disabled:e.busy,onClick:J},{default:ae(()=>[He(I(v(s)("approval.approve")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="approveSession",disabled:e.busy,onClick:se},{default:ae(()=>[He(I(v(s)("approval.approveSession")),1),W(Yr,{class:"k",keys:["2"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="reject",disabled:e.busy,onClick:Q},{default:ae(()=>[He(I(v(s)("approval.reject")),1),W(Yr,{class:"k",keys:["3"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:O},{default:ae(()=>[He(I(v(s)("approval.feedback")),1),W(Yr,{class:"k",keys:["4"]})]),_:1},8,["disabled"])]))]),key:"1"}]),1032,["class"]))}}),mEe=vt(hEe,[["__scopeId","data-v-f7485122"]]),gEe={class:"goal-panel"},vEe={key:0,class:"goal-criterion"},yEe={class:"goal-criterion-label"},wEe=Je({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",gEe,[W(Br,{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(g(),S("div",vEe,[b("div",yEe,[W(Ee,{name:"check-list",size:"md"}),b("span",null,I(v(t)("status.goalDoneWhen")),1)]),W(Br,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):Y("",!0)]))}}),kEe=vt(wEe,[["__scopeId","data-v-81a928ba"]]),bEe={class:"plan-panel"},_Ee={key:0,class:"plan-review-row"},xEe={class:"plan-review-label"},SEe={key:1,class:"plan-review-row plan-review-feedback"},CEe={class:"plan-review-label"},MEe={key:3,class:"plan-path-only"},AEe={class:"plan-path-hint"},TEe={class:"plan-path"},EEe={key:4,class:"plan-empty"},IEe=Je({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",bEe,[e.plan?.selectedOption?(g(),S("div",_Ee,[b("span",xEe,I(v(t)("tools.plan.selectedOption")),1),b("span",null,I(e.plan.selectedOption),1)])):Y("",!0),e.plan?.feedback?(g(),S("div",SEe,[b("span",CEe,I(v(t)("tools.plan.feedback")),1),b("span",null,I(e.plan.feedback),1)])):Y("",!0),e.plan?.plan?(g(),ue(Br,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):e.plan?.path?(g(),S("div",MEe,[b("span",AEe,I(v(t)("tools.plan.pathOnlyHint")),1),b("span",TEe,I(e.plan.path),1),e.revealSavedPlan?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:o[0]||(o[0]=s=>void e.revealSavedPlan(e.plan.agentId,e.plan.toolCallId))},{default:ae(()=>[W(Ee,{name:"external-link",size:"sm"}),He(" "+I(v(t)("tools.plan.revealInFileManager")),1)]),_:1})):Y("",!0)])):(g(),S("div",EEe,[W(Ee,{class:"plan-empty-ico",name:"file-edit",size:"lg"}),b("span",null,I(v(t)(e.planModeOn?"status.planEmptyArmed":"status.planEmptyIdle")),1)]))]))}}),LEe=vt(IEe,[["__scopeId","data-v-2883948d"]]),$Ee={class:"qh"},NEe={class:"qtitle"},zEe={key:0,class:"qstep"},BEe={key:1,class:"qmin-peek"},REe={class:"qbody"},PEe=["aria-label"],FEe=["aria-selected","aria-label","onClick"],jEe={class:"qstep-num"},OEe={key:1,class:"qheader-chip"},HEe={class:"qtext"},DEe={class:"qopts"},VEe=["onClick"],WEe={class:"qopt-key"},qEe={class:"qopt-glyph"},UEe={key:0,class:"chk"},ZEe={key:1,class:"rad"},KEe={class:"qopt-text"},GEe={class:"qopt-label"},YEe={key:0,class:"qopt-desc"},XEe={class:"qopt-glyph"},JEe={key:0,class:"chk"},QEe={key:1,class:"rad"},eIe={class:"qopt-text qopt-text-other"},tIe={class:"qopt-label"},nIe={key:0,class:"qopt-desc"},oIe=["placeholder"],sIe={class:"qfoot"},iIe=Je({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=$t(),s=t,i=V(0),l=V(!1),r=B(()=>n.question.questions[i.value]),a=B(()=>n.question.questions.length);function c(){i.value>0&&i.value--}function u(){i.value=0&&M0:R.kind==="multiWithOther"?R.optionIds.length>0||R.otherText.trim().length>0:R.kind==="other"?R.text.trim().length>0:!0:!1}function p(){return f(r.value.id)}const h=V({});function m(M){return M.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${M.label} ${M.description??""}`.toLowerCase())}function k(){const M={...h.value};let R=!1;for(const O of n.question.questions){if(M[O.id])continue;const U=O.options.filter(m);U.length!==0&&(M[O.id]=O.multiSelect?{kind:"multi",optionIds:U.map(Z=>Z.id)}:{kind:"single",optionId:U[0].id},R=!0)}R&&(h.value=M)}Ke(()=>n.question.questionId,()=>{i.value=0,l.value=!1,h.value={},w.value={}}),Ke(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),k()},{immediate:!0,deep:!0});function x(M,R){const O=h.value[M];if(O&&O.kind==="single"&&O.optionId===R){const U={...h.value};delete U[M],h.value=U}else h.value={...h.value,[M]:{kind:"single",optionId:R}}}function y(M,R){const O=h.value[M],U=O&&(O.kind==="multi"||O.kind==="multiWithOther")?O.kind==="multi"?[...O.optionIds]:[...O.optionIds]:[],Z=U.indexOf(R);Z>=0?U.splice(Z,1):U.push(R);const q=h.value[M],te=q&&q.kind==="multiWithOther"?q.otherText:"";te?h.value={...h.value,[M]:{kind:"multiWithOther",optionIds:U,otherText:te}}:h.value={...h.value,[M]:{kind:"multi",optionIds:U}}}const w=V({}),_=V(null);function A(M){const R=n.question.questions.find(U=>U.id===M),O=w.value[M]??"";if(R.multiSelect){const U=h.value[M],Z=U&&(U.kind==="multi"||U.kind==="multiWithOther")?U.kind==="multi"?[...U.optionIds]:[...U.optionIds]:[];h.value={...h.value,[M]:{kind:"multiWithOther",optionIds:Z,otherText:O}}}else h.value={...h.value,[M]:{kind:"other",text:O}}}function P(M){A(M),yt(()=>_.value?.focus())}function z(M,R){const O=h.value[M];return O?O.kind==="single"?O.optionId===R:O.kind==="multi"||O.kind==="multiWithOther"?O.optionIds.includes(R):!1:!1}function L(M){const R=h.value[M];return!!(R&&(R.kind==="other"||R.kind==="multiWithOther"))}function E(){return n.question.questions.every(M=>f(M.id))}const T=B(()=>n.busyKind==="answer"),$=B(()=>n.busyKind==="dismiss"),C=B(()=>!!n.busyKind);function j(){if(C.value||!E())return;const M={answers:h.value,method:"click"};s("answer",n.question.questionId,M)}function H(){C.value||s("dismiss",n.question.questionId)}function D(M){const R=(document.activeElement?.tagName??"").toLowerCase(),O=R==="input"||R==="textarea";if(C.value)return;if(M.key==="Enter"){if(M.preventDefault(),l.value)return;i.value=1&&U<=9){M.preventDefault();const Z=r.value,q=U-1,te=Z.options[q];te&&(Z.multiSelect?y(Z.id,te.id):x(Z.id,te.id))}}return In(()=>document.addEventListener("keydown",D)),En(()=>document.removeEventListener("keydown",D)),(M,R)=>(g(),ue(c9,{class:Be(["qcard",{minimized:l.value}])},$2({head:ae(()=>[b("div",$Ee,[R[5]||(R[5]=b("span",{class:"qh-ic"},"?",-1)),b("span",NEe,I(v(o)("question.title")),1),a.value>1&&!l.value?(g(),S("span",zEe,I(v(o)("question.step",{current:i.value+1,total:a.value})),1)):Y("",!0),l.value?(g(),S("span",BEe,I(r.value.question),1)):Y("",!0),W(Dt,{class:"qmin",size:"sm",label:l.value?v(o)("question.expand"):v(o)("question.minimize"),onClick:R[0]||(R[0]=O=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ee,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ee,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[b("div",REe,[a.value>1?(g(),S("div",{key:0,class:"qsteps",role:"tablist","aria-label":v(o)("question.step",{current:i.value+1,total:a.value})},[(g(!0),S(Ce,null,rt(n.question.questions,(O,U)=>(g(),S("button",{key:O.id,type:"button",class:Be(["qstep-dot",{active:U===i.value,answered:f(O.id)}]),"aria-selected":U===i.value,"aria-label":v(o)("question.step",{current:U+1,total:a.value}),onClick:Z=>d(U)},[b("span",jEe,I(U+1),1)],10,FEe))),128))],8,PEe)):Y("",!0),r.value.header?(g(),S("div",OEe,[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[He(I(r.value.header),1)]),_:1})])):Y("",!0),b("div",HEe,I(r.value.question),1),r.value.body?(g(),ue(Br,{key:2,text:r.value.body,class:"qmdbody"},null,8,["text"])):Y("",!0),b("div",DEe,[(g(!0),S(Ce,null,rt(r.value.options,(O,U)=>(g(),S("label",{key:O.id,class:Be(["qopt",{selected:z(r.value.id,O.id)}]),onClick:xt(Z=>r.value.multiSelect?y(r.value.id,O.id):x(r.value.id,O.id),["prevent"])},[b("span",WEe,I(U+1),1),b("span",qEe,[r.value.multiSelect?(g(),S("span",UEe,I(z(r.value.id,O.id)?"■":"□"),1)):(g(),S("span",ZEe,I(z(r.value.id,O.id)?"●":"○"),1))]),b("span",KEe,[b("span",GEe,I(O.label),1),O.description?(g(),S("span",YEe,I(O.description),1)):Y("",!0)])],10,VEe))),128)),r.value.allowOther?(g(),S("label",{key:0,class:Be(["qopt",{selected:L(r.value.id)}]),onClick:R[4]||(R[4]=xt(O=>P(r.value.id),["prevent"]))},[R[6]||(R[6]=b("span",{class:"qopt-key"},null,-1)),b("span",XEe,[r.value.multiSelect?(g(),S("span",JEe,I(L(r.value.id)?"■":"□"),1)):(g(),S("span",QEe,I(L(r.value.id)?"●":"○"),1))]),b("span",eIe,[b("span",tIe,I(r.value.otherLabel??v(o)("question.otherDefault")),1),r.value.otherDescription?(g(),S("span",nIe,I(r.value.otherDescription),1)):Y("",!0)]),Jn(b("input",{ref_key:"otherInputEl",ref:_,"onUpdate:modelValue":R[1]||(R[1]=O=>w.value[r.value.id]=O),class:"other-input",type:"text",placeholder:r.value.otherLabel??v(o)("question.otherDefault"),onInput:R[2]||(R[2]=O=>A(r.value.id)),onFocus:R[3]||(R[3]=O=>A(r.value.id))},null,40,oIe),[[js,w.value[r.value.id]]])],2)):Y("",!0)])])]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[b("div",sIe,[i.value[He(I(v(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(g(),ue(Nt,{key:1,class:"qfoot-btn qfoot-main",size:"sm",variant:"primary",disabled:!E(),loading:T.value,onClick:j},{default:ae(()=>[He(I(v(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),a.value>1?(g(),ue(Nt,{key:2,class:"qfoot-btn",size:"sm",variant:"secondary",disabled:i.value===0||C.value,onClick:c},{default:ae(()=>[He(I(v(o)("question.back")),1)]),_:1},8,["disabled"])):Y("",!0),W(Nt,{class:"qfoot-btn",size:"sm",variant:"ghost",loading:$.value,disabled:C.value,onClick:H},{default:ae(()=>[He(I(v(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])])]),key:"1"}]),1032,["class"]))}}),lIe=vt(iIe,[["__scopeId","data-v-ce0bd159"]]),rIe=Je({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e,n={pending:"○",run:"●",done:"✓",fail:"✗"};return(o,s)=>(g(),S("span",{class:Be(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},I(n[t.status]),3))}}),rp=vt(rIe,[["__scopeId","data-v-f870866a"]]),aIe={key:0,class:"sg-empty"},cIe={key:1,class:"sg-grid"},uIe=["aria-label","onClick"],dIe={class:"sg-top"},fIe={class:"sg-num"},pIe={class:"sg-name"},hIe={key:1,class:"sg-desc"},mIe={class:"sg-foot"},gIe={key:0,class:"sg-model"},vIe={class:"sg-status"},yIe={class:"sg-state"},wIe={key:0,class:"sg-time"},kIe=Je({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(f){return f}function i(f){return f==="running"?"tasks.emptyRunning":f==="done"?"tasks.emptyDone":f==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}const l=fn("modelDisplay"),r=fn("subagentEffort");function a(f){const{model:p,thinkingEffort:h}=f;return[l?.(p)??p,r?.(h)].filter(Boolean).join(" · ")||void 0}function c(f){const p=f.state;return o(p==="done"?"tasks.stateDone":p==="fail"?"tasks.stateFail":p==="cancelled"?"tasks.stateCancelled":"tasks.running")}function u(f,p){return String(f.dynamicWorkflowIndex??p+1).padStart(2,"0")}function d(f){return!!(f.agentId||f.output?.length)}return(f,p)=>e.tasks.length===0?(g(),S("div",aIe,I(v(o)(i(e.filter))),1)):(g(),S("div",cIe,[(g(!0),S(Ce,null,rt(e.tasks,(h,m)=>(g(),S("article",{key:h.id,class:Be(["sg-card",[`s-${h.state}`,{openable:d(h)}]])},[d(h)?(g(),S("button",{key:0,class:"sg-open",type:"button","aria-label":h.name,onClick:k=>n("open",h.agentId??h.id)},null,8,uIe)):Y("",!0),b("div",dIe,[b("span",fIe,I(u(h,m)),1),b("span",pIe,I(h.name),1)]),h.meta?(g(),S("div",hIe,I(h.meta),1)):Y("",!0),b("div",mIe,[a(h)?(g(),S("div",gIe,[b("span",null,I(a(h)),1)])):Y("",!0),b("div",vIe,[b("span",yIe,[h.state==="run"?(g(),ue(rp,{key:0,status:"run"})):h.state==="done"?(g(),ue(Ee,{key:1,class:"sg-ic-done",name:"check",size:"sm"})):(g(),ue(Ee,{key:2,name:"close",size:"sm"})),He(" "+I(c(h)),1)]),h.timing?(g(),S("span",wIe,[W(Ee,{name:"clock",size:"sm"}),He(" "+I(h.timing),1)])):Y("",!0)])]),h.state==="run"?(g(),ue(Dt,{key:2,class:"sg-cancel",size:"sm",label:v(o)("tasks.stop"),onClick:xt(k=>n("cancel",h.id),["stop"])},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0)],2))),128))]))}}),bIe=vt(kIe,[["__scopeId","data-v-5945b343"]]),_Ie={class:"taskspane"},xIe={class:"tp-list"},SIe={key:0,class:"tp-empty"},CIe={class:"tp-main"},MIe=["aria-label","onClick"],AIe=["aria-label"],TIe={class:"tp-name"},EIe={key:1,class:"tp-meta"},IIe={key:2,class:"tp-model"},LIe={key:3,class:"tp-model"},$Ie={key:4,class:"tp-time"},NIe=Je({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(p){return p}function i(p){return p==="running"?"tasks.emptyRunning":p==="done"?"tasks.emptyDone":p==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function l(p){return p.kind==="subagent"||!!(p.output?.length||p.meta)}function r(p){l(p)&&n("open",p.agentId??p.id)}function a(p){const h=p.state;return o(h==="done"?"tasks.stateDone":h==="fail"?"tasks.stateFail":h==="cancelled"?"tasks.stateCancelled":"tasks.running")}const c=fn("modelDisplay"),u=fn("subagentEffort");function d(p){if(p.kind!=="subagent")return;const h=p.model;return c?.(h)??h}function f(p){if(p.kind==="subagent")return u?.(p.thinkingEffort)}return(p,h)=>(g(),S("div",_Ie,[b("div",xIe,[e.tasks.length===0?(g(),S("div",SIe,I(v(o)(i(e.filter))),1)):(g(!0),S(Ce,{key:1},rt(e.tasks,m=>(g(),S("div",{key:m.id,class:Be(["tp-row",{fail:m.state==="fail",expandable:l(m)}])},[b("div",CIe,[l(m)?(g(),S("button",{key:0,class:"tp-open",type:"button","aria-label":m.name,onClick:k=>r(m)},null,8,MIe)):Y("",!0),b("span",{class:"tp-glyph",role:"img","aria-label":a(m)},[m.state==="run"?(g(),ue(rp,{key:0,status:"run"})):m.state==="done"?(g(),ue(Ee,{key:1,class:"tp-done",name:"check",size:"sm"})):m.state==="cancelled"?(g(),ue(Ee,{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(g(),ue(Ee,{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,AIe),b("span",TIe,I(m.name),1),m.meta?(g(),S("span",EIe,I(m.meta),1)):Y("",!0),d(m)?(g(),S("span",IIe,I(d(m)),1)):Y("",!0),f(m)?(g(),S("span",LIe,I(f(m)),1)):Y("",!0),m.timing?(g(),S("span",$Ie,I(m.timing),1)):Y("",!0),m.state==="run"?(g(),ue(Dt,{key:5,class:"tp-stop",size:"sm",label:v(o)("tasks.stop"),onClick:xt(k=>n("cancel",m.id),["stop"])},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0),l(m)?(g(),ue(Ee,{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):Y("",!0)])],2))),128))])]))}}),zIe=vt(NIe,[["__scopeId","data-v-f4589f0b"]]),BIe={class:"todo-card"},RIe={key:0,class:"tc-empty"},PIe={class:"tc-name"},FIe=Je({__name:"TodoCard",props:{todos:{}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",BIe,[e.todos.length===0?(g(),S("div",RIe,[W(Ee,{class:"tc-empty-ico",name:"list",size:"lg"}),b("span",null,I(v(t)("tasks.emptyTodo")),1)])):(g(!0),S(Ce,{key:1},rt(e.todos,(s,i)=>(g(),S("div",{key:i,class:Be(["tc-row",`s-${s.status}`])},[b("span",{class:Be(["tc-glyph",`g-${s.status}`])},[s.status==="done"?(g(),ue(Ee,{key:0,name:"check",size:"md"})):s.status==="in_progress"?(g(),ue(Zo,{key:1,class:"tc-spin",size:"sm"})):Y("",!0)],2),b("span",PIe,I(s.title),1)],2))),128))]))}}),jIe=vt(FIe,[["__scopeId","data-v-4e4d0054"]]),OIe=["disabled","aria-pressed"],HIe=Je({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(g(),S("button",{key:0,class:Be(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[jn(t.$slots,"default",{},void 0,!0)],10,OIe)):(g(),S("span",{key:1,class:Be(["ui-pill",{"is-active":e.active}])},[jn(t.$slots,"default",{},void 0,!0)],2))}}),Xz=vt(HIe,[["__scopeId","data-v-0fb1a50d"]]),DIe={class:"fc-label"},VIe=Je({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=B(()=>n.options.find(T=>T.value===n.modelValue)),i=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",l=V(null),r=V(!1);let a=0,c=null;async function u(){const T=l.value?.closest(".dock-work-head");if(!T)return;const $=T.querySelector(".wp-head-tab"),C=getComputedStyle(T),j=(Number.parseFloat(C.columnGap)||0)*2,H=T.clientWidth-Number.parseFloat(C.paddingLeft)-Number.parseFloat(C.paddingRight)-j,D=$?.scrollWidth??0;if(!r.value){const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth)}const M=D+a>H;if(r.value=M,!M){await yt();const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth),r.value=D+a>H}}const d=V(!1),f=V(null),p=V(null),h=V({left:"0px",top:"0px"});function m(){return f.value?.$el??null}async function k(){if(d.value){x();return}d.value=!0,await yt(),y(),w(),window.addEventListener("mousedown",P,!0),window.addEventListener("keydown",z,!0),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0)}function x(T){d.value=!1,window.removeEventListener("mousedown",P,!0),window.removeEventListener("keydown",z,!0),window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0),T?.refocus&&m()?.focus()}function y(){const T=m();if(!T)return;const $=T.getBoundingClientRect(),C=p.value?.offsetHeight??0,j=getComputedStyle(document.documentElement),H=Number.parseFloat(j.getPropertyValue("--space-2"))||0,D=Number.parseFloat(j.getPropertyValue("--space-1"))||0,M=p.value?.offsetWidth??0,R=Math.min($.left,Math.max(H,window.innerWidth-M-H));$.bottom+D+C<=window.innerHeight-H?h.value={left:`${R}px`,top:`${$.bottom+D}px`}:h.value={left:`${R}px`,bottom:`${window.innerHeight-$.top+D}px`}}function w(){const T=p.value;if(!T)return;(T.querySelector(".ui-menu-item.is-active")??T.querySelector(".ui-menu-item"))?.focus()}function _(){d.value||k()}function A(T){const $=T.relatedTarget;$&&(p.value?.contains($)||m()?.contains($))||x()}function P(T){const $=T.target;if($){if(p.value?.contains($)){T.stopImmediatePropagation();return}m()?.contains($)||x()}}function z(T){T.key==="Escape"&&(T.preventDefault(),T.stopImmediatePropagation(),x({refocus:!0}))}function L(T){if(T.key!=="ArrowDown"&&T.key!=="ArrowUp")return;T.preventDefault();const $=Array.from(p.value?.querySelectorAll(".ui-menu-item")??[]);if($.length===0)return;const C=$.indexOf(document.activeElement),j=T.key==="ArrowDown"?(C+1)%$.length:(C-1+$.length)%$.length;$[j]?.focus()}function E(T){o("update:modelValue",T),x({refocus:!0})}return In(()=>{const T=l.value?.closest(".dock-work-head");!T||typeof ResizeObserver!="function"||(c=new ResizeObserver(()=>void u()),c.observe(T),u())}),Ke(r,T=>{!T&&d.value&&x()}),Ke(()=>n.options,async()=>{a=0,await yt(),await u()},{flush:"post"}),vo(()=>{c?.disconnect(),d.value&&x()}),(T,$)=>(g(),S("span",{ref_key:"root",ref:l,class:"filter-control"},[r.value?(g(),S(Ce,{key:0},[W(Xz,{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:k,onKeydown:[go(xt(_,["prevent"]),["down"]),go(xt(_,["prevent"]),["up"])],onFocusout:A},{default:ae(()=>[s.value?.icon?(g(),ue(Ee,{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):Y("",!0),b("span",null,I(s.value?.label),1),W(Ee,{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(g(),ue(hl,{to:"body"},[d.value?(g(),S("div",{key:0,ref_key:"menuBoxRef",ref:p,class:"fc-menu",style:Gt(h.value),onKeydown:L,onFocusout:A},[W(zr,null,{default:ae(()=>[(g(!0),S(Ce,null,rt(e.options,C=>(g(),ue(Bn,{key:C.value,role:"menuitemradio",active:C.value===e.modelValue,"aria-checked":C.value===e.modelValue,size:v(i),onClick:j=>E(C.value)},{default:ae(()=>[C.icon?(g(),ue(Ee,{key:0,name:C.icon,size:"sm","data-icon":C.icon},null,8,["name","data-icon"])):Y("",!0),b("span",DIe,I(C.label),1),C.value===e.modelValue?(g(),ue(Ee,{key:1,class:"fc-check",name:"check",size:"sm"})):Y("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):Y("",!0)]))],64)):(g(),ue(di,{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":$[0]||($[0]=C=>o("update:modelValue",C))},null,8,["model-value","options"]))],512))}}),fM=vt(VIe,[["__scopeId","data-v-658870b5"]]),WIe={class:"wp-head-tab"},qIe={key:0,class:"wp-head-meta"},UIe={key:0,class:"wp-head-actions"},ZIe=Je({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(g(),S(Ce,null,[b("span",WIe,[W(Ee,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,I(e.title),1),e.meta?(g(),S("span",qIe,I(e.meta),1)):Y("",!0)]),t.$slots.actions?(g(),S("span",UIe,[jn(t.$slots,"actions",{},void 0,!0)])):Y("",!0)],64))}}),Rd=vt(ZIe,[["__scopeId","data-v-408c4b07"]]),Pd=Je({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e){return(t,n)=>(g(),ue(Xz,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},{default:ae(()=>[W(Ee,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,[jn(t.$slots,"default")]),jn(t.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),KIe={class:"dock-work-head"},GIe={key:0,class:"dock-workbar"},YIe={class:"dw-running"},XIe={class:"dw-running"},JIe={class:"dw-count"},QIe=Je({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),{confirm:l,current:r}=z1(),a=V(null),c=V(null),u=V(null),d=V(null),f=V(!1),p=V(!1),h=V("50% 100%"),m=V("active"),k=V("active"),x=B(()=>Object.values(o.sessionPlans??{}).at(-1)),y=B(()=>a.value?.anyPopupOpen??!1),w=B(()=>[{value:"active",label:i("tasks.filterRecent"),icon:"clock"},{value:"running",label:i("tasks.filterRunning"),icon:"play"},{value:"done",label:i("tasks.filterDone"),icon:"circle-check"},{value:"all",label:i("tasks.filterAll"),icon:"list"}]),_=B(()=>(o.todos?.length??0)>0&&o.todoDoneCount===(o.todos?.length??0)),A=B(()=>o.goal?i(`status.goalStatus${o.goal.status[0].toUpperCase()}${o.goal.status.slice(1)}`):""),P=B(()=>{const te=Math.max(0,Math.round((o.goal?.wallClockMs??0)/1e3)),ee=Math.floor(te/3600),J=Math.floor(te%3600/60);return ee?`${ee}${i("status.timeUnitHour")} ${J}${i("status.timeUnitMinute")}`:J?`${J}${i("status.timeUnitMinute")} ${te%60}${i("status.timeUnitSecond")}`:`${te}${i("status.timeUnitSecond")}`}),z=B(()=>o.bashTasks.some(te=>te.kind==="tool")?i("tasks.dockTasks"):i("tasks.dockBash"));function L(te,ee){if(ee==="all")return te;if(ee==="running")return te.filter(Q=>Q.state==="run");if(ee==="done")return te.filter(Q=>Q.state!=="run");const J=te.filter(Q=>Q.state==="run"),se=te.filter(Q=>Q.state!=="run").toSorted((Q,me)=>Date.parse(me.completedAt??me.createdAt??"")-Date.parse(Q.completedAt??Q.createdAt??"")).slice(0,5);return[...J,...se]}const E=B(()=>L(o.bashTasks,m.value)),T=B(()=>L(o.subagentTasks,k.value));function $(te,ee){const J=ee.currentTarget,se=c.value;if(J&&se){const Q=J.getBoundingClientRect(),me=se.getBoundingClientRect();h.value=`${Q.left+Q.width/2-me.left}px 100%`}s("toggle-dock-panel",te)}function C(){p.value=(d.value?.scrollTop??0)>0}function j(te){if(!o.dockPanel)return;const ee=te.target;!ee||u.value?.contains(ee)||ee.closest(".ui-pill")||s("close-dock-panel")}function H(te){o.dockPanel&&(te.key!=="Escape"||te.repeat||te.isComposing||te.defaultPrevented||y.value||r.value||o.overlayOpen||(te.preventDefault(),te.stopImmediatePropagation(),s("close-dock-panel")))}async function D(){await l({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}function M(){const te=c.value;if(!te)return;document.documentElement.style.setProperty("--dock-h",`${te.offsetHeight}px`);const ee=Number.parseFloat(getComputedStyle(te).getPropertyValue("--p-bp-sm"))||640;f.value=te.offsetWidth{document.addEventListener("mousedown",j,!0),document.addEventListener("keydown",H,!0),typeof ResizeObserver=="function"&&c.value&&(R=new ResizeObserver(()=>{M(),C()}),R.observe(c.value),M())}),En(()=>{document.removeEventListener("mousedown",j,!0),document.removeEventListener("keydown",H,!0),R?.disconnect()}),Ke(()=>o.dockPanel,()=>{p.value=!1,yt(C)});function O(te){return a.value?.loadForEdit(te)??!1}function U(te){a.value?.loadAttachmentsForEdit(te)}function Z(){a.value?.focus()}function q(te){a.value?.insertQuote(te)}return t({loadForEdit:O,loadAttachmentsForEdit:U,insertQuote:q,focus:Z,anyPopupOpen:y,isEmpty:B(()=>a.value?.isEmpty??!0)}),(te,ee)=>(g(),S("div",{ref_key:"dockRef",ref:c,class:Be(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":y.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":f.value}]]),onClick:ee[36]||(ee[36]=xt(()=>{},["stop"]))},[W(qi,{name:"dock-panel"},{default:ae(()=>[e.dockPanel?(g(),S("div",{key:e.dockPanel,ref_key:"workPanelRef",ref:u,class:Be(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":p.value}]]),style:Gt({transformOrigin:h.value})},[b("div",KIe,[e.dockPanel==="bash"?(g(),ue(Rd,{key:0,icon:"terminal",title:z.value,meta:`${e.bashRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(fM,{modelValue:m.value,"onUpdate:modelValue":ee[0]||(ee[0]=J=>m.value=J),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(g(),ue(Rd,{key:1,icon:"sparkles",title:v(i)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(fM,{modelValue:k.value,"onUpdate:modelValue":ee[1]||(ee[1]=J=>k.value=J),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(g(),ue(Rd,{key:2,icon:_.value?"check-list":"list",title:v(i)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(g(),ue(Rd,{key:3,icon:"target",title:v(i)("status.goalLabel"),meta:P.value},{actions:ae(()=>[e.goal?.status==="active"?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("status.goalPause"),onClick:ee[2]||(ee[2]=J=>s("controlGoal","pause"))},{default:ae(()=>[W(Ee,{name:"pause",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.goalResume"),onClick:ee[3]||(ee[3]=J=>s("controlGoal","resume"))},{default:ae(()=>[W(Ee,{name:"play",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("status.goalCancel"),onClick:D},{default:ae(()=>[W(Ee,{name:"power",size:"sm"})]),_:1},8,["label"]),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:ee[4]||(ee[4]=J=>s("close-dock-panel"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"])):(g(),ue(Rd,{key:4,icon:"file-edit",title:v(i)("status.planLabel"),meta:x.value?.reviewState?v(i)(`tools.plan.review.${x.value.reviewState}`):""},{actions:ae(()=>[x.value?.path?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("tools.plan.revealInFileManager"),onClick:ee[5]||(ee[5]=J=>void e.revealSavedPlan?.(x.value.agentId,x.value.toolCallId))},{default:ae(()=>[W(Ee,{name:"external-link",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.planArmed||e.planMode?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.workModeDismiss"),onClick:ee[6]||(ee[6]=J=>s("togglePlan"))},{default:ae(()=>[W(Ee,{name:"power",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:ee[7]||(ee[7]=J=>s("close-dock-panel"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"]))]),b("div",{ref_key:"workBodyRef",ref:d,class:"dock-work-body",onScroll:C},[e.dockPanel==="bash"?(g(),ue(zIe,{key:0,tasks:E.value,filter:m.value,onCancel:ee[8]||(ee[8]=J=>s("cancelTask",J)),onOpen:ee[9]||(ee[9]=J=>s("openAgent",J))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(g(),ue(bIe,{key:1,tasks:T.value,filter:k.value,onCancel:ee[10]||(ee[10]=J=>s("cancelTask",J)),onOpen:ee[11]||(ee[11]=J=>s("openAgent",J))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(g(),ue(jIe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(g(),ue(kEe,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):(g(),ue(LEe,{key:4,plan:x.value,"plan-mode-on":e.planMode,"open-file":e.openFile,"reveal-saved-plan":e.revealSavedPlan},null,8,["plan","plan-mode-on","open-file","reveal-saved-plan"]))],544)],6)):Y("",!0)]),_:1}),e.hasDockWork||e.planMode||x.value?(g(),S("div",GIe,[e.goal?(g(),ue(Pd,{key:0,icon:"target",active:e.dockPanel==="goal",label:`${v(i)("status.goalLabel")} ${A.value}`,onClick:ee[12]||(ee[12]=J=>$("goal",J))},{meta:ae(()=>[b("span",{class:Be(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},I(A.value),3)]),default:ae(()=>[He(I(v(i)("status.goalLabel"))+" ",1)]),_:1},8,["active","label"])):Y("",!0),e.planMode||x.value?(g(),ue(Pd,{key:1,icon:"file-edit",active:e.dockPanel==="plan",label:v(i)("status.planLabel"),onClick:ee[13]||(ee[13]=J=>$("plan",J))},{default:ae(()=>[He(I(v(i)("status.planLabel")),1)]),_:1},8,["active","label"])):Y("",!0),e.bashTasks.length?(g(),ue(Pd,{key:2,icon:"terminal",active:e.dockPanel==="bash",label:z.value,onClick:ee[14]||(ee[14]=J=>$("bash",J))},$2({default:ae(()=>[He(I(z.value)+" ",1)]),_:2},[e.bashRunning?{name:"meta",fn:ae(()=>[b("span",YIe,[W(rp,{status:"run"}),He(I(e.bashRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.subagentTasks.length?(g(),ue(Pd,{key:3,icon:"sparkles",active:e.dockPanel==="subagent",label:v(i)("tasks.dockSubagent"),onClick:ee[15]||(ee[15]=J=>$("subagent",J))},$2({default:ae(()=>[He(I(v(i)("tasks.dockSubagent"))+" ",1)]),_:2},[e.subagentRunning?{name:"meta",fn:ae(()=>[b("span",XIe,[W(rp,{status:"run"}),He(I(e.subagentRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.todos?.length?(g(),ue(Pd,{key:4,icon:_.value?"check-list":"list",active:e.dockPanel==="todos",label:v(i)("tasks.todoProgressTitle"),onClick:ee[16]||(ee[16]=J=>$("todos",J))},{meta:ae(()=>[b("span",JIe,I(e.todoDoneCount)+"/"+I(e.todos?.length),1)]),default:ae(()=>[He(I(v(i)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","active","label"])):Y("",!0)])):Y("",!0),e.pendingQuestion?(g(),ue(lIe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:ee[17]||(ee[17]=(J,se)=>s("answer",J,se)),onDismiss:ee[18]||(ee[18]=J=>s("dismiss",J))},null,8,["question","busy-kind"])):e.pendingApproval?(g(),ue(mEe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:ee[19]||(ee[19]=J=>s("approval",e.pendingApproval.approvalId,J))},null,8,["block","agent-name","busy"])):(g(),ue(Yz,{key:3,ref_key:"composerRef",ref:a,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:ee[20]||(ee[20]=J=>s("submit",J)),onSteer:ee[21]||(ee[21]=J=>s("steer",J)),onCommand:ee[22]||(ee[22]=J=>s("command",J)),onInterrupt:ee[23]||(ee[23]=J=>s("interrupt")),onSetPermission:ee[24]||(ee[24]=J=>s("setPermission",J)),onSetThinking:ee[25]||(ee[25]=J=>s("setThinking",J)),onTogglePlan:ee[26]||(ee[26]=J=>s("togglePlan")),onToggleWorkflow:ee[27]||(ee[27]=J=>s("toggleWorkflow")),onToggleGoal:ee[28]||(ee[28]=J=>s("toggleGoal")),onOpenBtw:ee[29]||(ee[29]=J=>s("openBtw")),onCreateGoal:ee[30]||(ee[30]=J=>s("createGoal",J)),onControlGoal:ee[31]||(ee[31]=J=>s("controlGoal",J)),onFocusGoal:ee[32]||(ee[32]=J=>s("focusGoal")),onCompact:ee[33]||(ee[33]=J=>s("compact")),onPickModel:ee[34]||(ee[34]=J=>s("pickModel")),onSelectModel:ee[35]||(ee[35]=J=>s("selectModel",J))},null,8,["session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills"]))],2))}}),eLe=vt(QIe,[["__scopeId","data-v-e4431eaa"]]),tLe=["aria-label","aria-hidden"],nLe=["data-turn-id","tabindex","aria-current","aria-label","onMouseenter","onFocus","onKeydown","onClick"],oLe=["aria-label"],sLe={class:"toc-preview__prompt"},iLe={key:0,class:"toc-preview__response"},lLe=80,rLe=Je({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(null),a=V(!0);let c=null;function u(){const T=i.value,$=T?.offsetParent;if(!T||!$)return;const C=T.getBoundingClientRect(),j=$.getBoundingClientRect();a.value=C.left>=j.left&&C.right<=j.right}const d=B(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1),f=B(()=>l.value!==null&&n.items.some(T=>T.id===l.value)?l.value:n.activeTurnId!==null&&n.items.some(T=>T.id===n.activeTurnId)?n.activeTurnId:n.items[0]?.id??null),p=B(()=>r.value??l.value??n.activeTurnId),h=B(()=>{const T=r.value??l.value;return T===null?void 0:n.items.find($=>$.id===T)}),m=V(0);let k=null;function x(){k!==null&&clearTimeout(k),k=null}function y(){x(),k=setTimeout(()=>{r.value=null,k=null},lLe)}function w(){return i.value===null?[]:Array.from(i.value.querySelectorAll(".toc-row"))}function _(T,$){let C=T;if($.key==="ArrowDown")C=Math.min(n.items.length-1,T+1);else if($.key==="ArrowUp")C=Math.max(0,T-1);else if($.key==="Home")C=0;else if($.key==="End")C=n.items.length-1;else return;$.preventDefault(),w()[C]?.focus()}function A(T){const $=T??w().find(j=>j.dataset.turnId===h.value?.id),C=$?.parentElement;!$||!C||(m.value=$.offsetTop-C.scrollTop+$.offsetHeight/2)}function P(T,$){x(),r.value=T,A($.currentTarget)}function z(T,$){x(),l.value=T,A($.currentTarget)}function L(T){x();const $=document.activeElement;$ instanceof HTMLElement&&i.value?.contains($)&&$.blur(),r.value=null,l.value=null,o("select",T)}function E(T){const $=T.relatedTarget;(!($ instanceof Node)||!i.value?.contains($))&&(l.value=null)}return Ke(d,T=>{c?.disconnect(),c=null,T&&yt(()=>{const $=i.value,C=$?.offsetParent;!$||!C||(typeof ResizeObserver<"u"&&(c=new ResizeObserver(u),c.observe(C)),u())})},{immediate:!0}),Ke([()=>n.activeTurnId,d],([T,$])=>{!$||T===null||yt(()=>{const C=w().find(j=>j.dataset.turnId===T);typeof C?.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})})},{immediate:!0}),vo(()=>{x(),c?.disconnect(),c=null}),(T,$)=>d.value?(g(),S("nav",{key:0,ref_key:"navRef",ref:i,class:Be(["conversation-toc",{"toc-clipped":!a.value||e.occluded}]),"aria-label":v(s)("conversation.toc"),"aria-hidden":a.value&&!e.occluded?void 0:!0,onMouseenter:x,onMouseleave:y,onFocusout:E},[b("div",{class:"toc-scroll",onScroll:$[0]||($[0]=C=>A())},[(g(!0),S(Ce,null,rt(e.items,(C,j)=>(g(),S("button",{key:C.id,type:"button",class:Be(["toc-row",{active:e.activeTurnId===C.id,highlighted:p.value===C.id,previewing:r.value===C.id||l.value===C.id}]),"data-turn-id":C.id,tabindex:f.value===C.id?0:-1,"aria-current":e.activeTurnId===C.id?"location":void 0,"aria-label":C.title,onMouseenter:H=>P(C.id,H),onFocus:H=>z(C.id,H),onKeydown:H=>_(j,H),onClick:H=>L(C.id)},[...$[2]||($[2]=[b("span",{class:"toc-marker","aria-hidden":"true"},null,-1)])],42,nLe))),128))],32),h.value?(g(),S("button",{key:0,type:"button",class:"toc-preview",style:Gt({top:`${m.value}px`}),"aria-label":h.value.title,tabindex:"-1",onMouseenter:x,onClick:$[1]||($[1]=C=>L(h.value.id))},[b("span",sLe,I(h.value.title),1),h.value.preview?(g(),S("span",iLe,I(h.value.preview),1)):Y("",!0)],44,oLe)):Y("",!0)],42,tLe)):Y("",!0)}}),aLe=vt(rLe,[["__scopeId","data-v-8a1c40d2"]]),pM="script, style, noscript, template, [inert], .top-sentinel",Jz="pythinker-transcript-search",Q7="pythinker-transcript-search-current",cLe=1e3;function uLe(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function dLe(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(l,r)=>r)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let l=0;lhM(c.text)),o=[];let s="";for(let c=0;c0&&e[c].gapBefore&&(s+="\0"),o[c]=s.length,s+=n[c].folded;const i=pLe(hM(t).folded);if(i===null)return;const l=new RegExp(i,"g");function r(c){let u=0,d=o.length-1,f=0;for(;u<=d;){const p=u+d>>1;o[p]<=c?(f=p,u=p+1):d=p-1}return f}let a;for(;;){const c=l.exec(s);if(c===null)return;const u=c.index,d=u+c[0].length-1,f=r(u),p=r(d),h=n[f].map[u-o[f]],m=n[p].map[d-o[p]],k={startSegment:f,startOffset:h.start,endSegment:p,endOffset:m.start+m.length};(a?.startSegment!==k.startSegment||a.startOffset!==k.startOffset||a.endSegment!==k.endSegment||a.endOffset!==k.endOffset)&&(a=k,yield k)}}const mLe=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),gLe=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function vLe(e,t){const n=t.get(e);if(n!==void 0)return n;const o=mLe.has(e.tagName)||!gLe.has(getComputedStyle(e).display);return t.set(e,o),o}function yLe(e,t,n){let o=e.parentElement;for(;o!==null&&o!==t&&!vLe(o,n);)o=o.parentElement;return o??t}function wLe(e){const t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,o=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(a){if(a.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;const c=a;return c.matches(pM)?n.FILTER_REJECT:c.matches("br, hr, wbr")&&!c.closest(pM)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),s=new WeakMap,i=new WeakMap,l=[];let r=!1;for(let a=o.nextNode();a!==null;a=o.nextNode()){if(a.nodeType===Node.ELEMENT_NODE){r=!0;continue}const c=a.nodeValue??"";if(c.length===0)continue;const u=a.parentElement;if(u===null)continue;let d=i.get(u);d===void 0&&(d=uLe(getComputedStyle(u).whiteSpace),i.set(u,d));let{text:f,map:p}=dLe(c,d);if(f.length===0)continue;const h=yLe(a,e,s),m=l.at(-1),k=r||m===void 0||m.block!==h;!k&&m.text.endsWith(" ")&&f.startsWith(" ")&&(f=f.slice(1),p=p.slice(1),f.length===0)||(l.push({text:f,gapBefore:k,node:a,block:h,whitespaceMap:p}),r=!1)}return l}function kLe(e,t){if(t.length===0)return[];const n=wLe(e),o=[];for(const s of hLe(n,t)){const i=n[s.startSegment],l=n[s.endSegment],r=e.ownerDocument.createRange();r.setStart(i.node,i.whitespaceMap[s.startOffset]),r.setEnd(l.node,l.whitespaceMap[s.endOffset-1]+1),o.push(r)}return o}function bLe(e,t,n=o=>o.getClientRects().length!==0){const o=[];for(const s of kLe(e,t))if(n(s)){if(o.length>=cLe)return{ranges:o,truncated:!0};o.push(s)}return{ranges:o,truncated:!1}}function Qz(){return globalThis.CSS?.highlights??null}function mM(e,t){const n=Qz(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){z4();return}const s=new o;for(const l of e)s.add(l);n.set(Jz,s);const i=e[t];if(i){const l=new o;l.add(i),n.set(Q7,l)}else n.delete(Q7)}function z4(){const e=Qz();e?.delete(Jz),e?.delete(Q7)}const _Le={class:"tsearch-main"},xLe=["placeholder"],SLe=["inert"],CLe={class:"tsearch-foot"},MLe={class:"tsearch-count","aria-live":"polite"},ALe={class:"tsearch-rings"},TLe=Je({__name:"TranscriptSearch",props:{pane:{},mobile:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=r4("input"),l=Uo(""),r=Uo(!1),a=Uo([]),c=Uo(0),u=Uo(!1),d=Uo(!1),f=Uo([]),p=B(()=>a.value.length),h=B(()=>l.value.trim()!==""),m=B(()=>{if(r.value)return s("conversation.search.searching");if(!h.value)return"";if(p.value===0)return s("conversation.search.noResults");const O={current:c.value+1,total:p.value};return u.value?s("conversation.search.resultsCapped",O):s("conversation.search.results",O)});let k=null,x=null,y=null,w=null,_=null;function A(){return n.pane.querySelector(".chat")}function P(){const O=a.value[c.value];if(!O){f.value=[];return}const U=n.pane.getBoundingClientRect();f.value=Array.from(O.getClientRects(),Z=>({top:`${Z.top-U.top+n.pane.scrollTop}px`,left:`${Z.left-U.left}px`,width:`${Z.width}px`,height:`${Z.height}px`}))}function z(){f.value.length!==0&&(y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,P()},120))}function L(O){const U=n.pane.getBoundingClientRect().top,Z=O.findIndex(q=>{const te=q.getClientRects(),ee=te[te.length-1];return ee!==void 0&&ee.bottom>=U});return Z===-1?0:Z}function E(){const O=a.value[c.value];mM(a.value,c.value),(O?.startContainer instanceof Element?O.startContainer:O?.startContainer.parentElement)?.scrollIntoView({block:"center"}),P()}function T(O="first"){k!==null&&(clearTimeout(k),k=null),r.value=!1;const U=A(),Z=l.value.trim();if(!U||Z===""){a.value=[],u.value=!1,c.value=0,z4(),P();return}const q=a.value[c.value],te=q?.startContainer,ee=q?.startOffset,J=bLe(U,Z);if(a.value=J.ranges,u.value=J.truncated,J.ranges.length===0){c.value=0,z4(),P();return}if(O!==!1){const Q=L(J.ranges);c.value=O==="backward"?(Q-1+J.ranges.length)%J.ranges.length:Q,E();return}const se=J.ranges.findIndex(Q=>Q.startContainer===te&&Q.startOffset===ee);c.value=se>=0?se:L(J.ranges),mM(J.ranges,c.value),P()}function $(){if(k!==null&&clearTimeout(k),l.value.trim()===""){r.value=!1,T();return}r.value=!0,k=setTimeout(()=>T(),150)}function C(O){p.value!==0&&(c.value=(c.value+O+p.value)%p.value,E())}function j(O){if(!(O.key!=="Enter"||d.value||O.isComposing)){if(O.preventDefault(),k!==null){T(O.shiftKey?"backward":"first");return}C(O.shiftKey?-1:1)}}function H(O){O.key!=="Escape"||d.value||O.isComposing||(O.preventDefault(),O.stopPropagation(),o("close"))}function D(O){return O instanceof Element&&(O.classList.contains("tsearch-rings")||O.closest(".tsearch-rings")!==null)}function M(O){if(O.type==="attributes"&&O.target===n.pane||D(O.target))return!0;if(O.type!=="childList")return!1;const U=[...O.addedNodes,...O.removedNodes];return U.length>0&&U.every(D)}function R(O){l.value.trim()===""||O.every(M)||k!==null||(x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k===null&&T(!1)},150))}return In(()=>{if(yt(()=>i.value?.focus()),typeof MutationObserver=="function"&&(w=new MutationObserver(R),w.observe(n.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),n.pane.addEventListener("scroll",z,{passive:!0}),window.addEventListener("resize",z,{passive:!0}),typeof ResizeObserver=="function"){_=new ResizeObserver(P),_.observe(n.pane);const O=n.pane.querySelector(".content-wrap");O&&_.observe(O)}}),En(()=>{k!==null&&clearTimeout(k),x!==null&&clearTimeout(x),y!==null&&clearTimeout(y),w?.disconnect(),_?.disconnect(),n.pane.removeEventListener("scroll",z),window.removeEventListener("resize",z),z4()}),(O,U)=>(g(),S("div",{class:Be(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:H},[b("div",_Le,[W(Ee,{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Jn(b("input",{ref:"input","onUpdate:modelValue":U[0]||(U[0]=Z=>l.value=Z),type:"text",class:"tsearch-input",placeholder:v(s)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:$,onKeydown:j,onCompositionstart:U[1]||(U[1]=Z=>d.value=!0),onCompositionend:U[2]||(U[2]=Z=>d.value=!1)},null,40,xLe),[[js,l.value]]),r.value?(g(),ue(Zo,{key:0,class:"tsearch-spin",size:"sm",label:v(s)("conversation.search.searching")},null,8,["label"])):Y("",!0),U[6]||(U[6]=b("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),W(Dt,{class:"tsearch-close",size:"sm",label:v(s)("conversation.search.close"),onClick:U[3]||(U[3]=Z=>o("close"))},{default:ae(()=>[W(Ee,{name:"close"})]),_:1},8,["label"])]),b("div",{class:Be(["tsearch-foot-wrap",{open:h.value}]),inert:!h.value},[b("div",CLe,[W(Dt,{size:"sm",label:v(s)("conversation.search.previous"),disabled:p.value===0,onClick:U[4]||(U[4]=Z=>C(-1))},{default:ae(()=>[W(Ee,{name:"arrow-up"})]),_:1},8,["label","disabled"]),W(Dt,{size:"sm",label:v(s)("conversation.search.next"),disabled:p.value===0,onClick:U[5]||(U[5]=Z=>C(1))},{default:ae(()=>[W(Ee,{name:"arrow-down"})]),_:1},8,["label","disabled"]),b("span",MLe,I(m.value),1)])],10,SLe),(g(),ue(hl,{to:e.pane},[b("div",ALe,[(g(!0),S(Ce,null,rt(f.value,(Z,q)=>(g(),S("div",{key:q,class:"tsearch-ring",style:Gt(Z)},null,4))),128))])],8,["to"]))],34))}}),ELe=vt(TLe,[["__scopeId","data-v-d7187e08"]]);function ILe(e,t=2e4){const n=V(`${e}?r=0`);let o=0;const s=setInterval(()=>{o+=1,n.value=`${e}?r=${o}`},t);return En(()=>clearInterval(s)),n}const LLe=["src","alt","role"],$Le=Je({__name:"PythinkerLogo",props:{size:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:"Pythinker Code"},interactive:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=ILe("/brand/mascot-waving.png"),o=e,s=t;function i(){o.interactive&&s("click")}return(l,r)=>(g(),S("img",{src:e.animated?v(n):"/brand/icon.svg",class:Be(["pythinker-logo",[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?"button":"img",onClick:i},null,10,LLe))}}),df=vt($Le,[["__scopeId","data-v-58c4fde0"]]),NLe=5;function zLe(e,t,n,o=NLe){if(n||e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(l=>l.id===t);i&&(s[o-1]=i)}return s}const BLe={key:0,class:"recent"},RLe={class:"recent-caption"},PLe=["onClick"],FLe={class:"recent-title"},jLe={class:"recent-time"},OLe={class:"recent-foot"},HLe=Je({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["select","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>e.sessions.length?(g(),S("section",BLe,[b("h2",RLe,I(v(o)("sessions.recentSessions")),1),(g(!0),S(Ce,null,rt(e.sessions,l=>(g(),S("button",{key:l.id,type:"button",class:"recent-row",onClick:r=>n("select",l.id)},[b("span",{class:Be(["recent-ico",l.archived?"recent-ico--done":"recent-ico--open"])},[W(Ee,{name:l.archived?"circle-check":"circle-dashed",size:"sm"},null,8,["name"])],2),b("span",FLe,I(l.title),1),b("span",jLe,I(l.time),1)],8,PLe))),128)),b("div",OLe,[W(Cn,{text:v(o)("conversation.sessionAdminTooltip")},{default:ae(()=>[b("button",{type:"button",class:"recent-more",onClick:i[0]||(i[0]=l=>n("openSessionAdmin"))},[He(I(v(o)("conversation.viewMoreSessions"))+" ",1),W(Ee,{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])])):Y("",!0)}}),DLe=vt(HLe,[["__scopeId","data-v-cd5a729d"]]),VLe={class:"chat-layout"},WLe={class:"empty-hint"},qLe={key:0,class:"empty-hint-text"},ULe={key:1,class:"ws-pick"},ZLe={class:"ws-pick-name"},KLe={key:1,class:"ws-pick-menu"},GLe=["onClick"],YLe={class:"ws-pick-item-name"},XLe={class:"ws-pick-item-path"},JLe=["aria-label"],QLe={key:0,class:"abort-toast",role:"status","aria-live":"polite"},e$e={class:"abort-toast-text"},t$e=48,Qm=80,gM=1e3,n$e=420,o$e=3e3,s$e=Je({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{},revealSavedPlan:{type:Function},panelVisible:{type:Boolean},panelExpanded:{type:Boolean},activePanelType:{},togglePanel:{type:Function}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","steerQueued","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","openFile","openMedia","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","openChanges","refreshGitStatus","editMessage","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","restoreSession","selectSession","exportSession","togglePin","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),s=e,i=n,l=V(!1),r=V(!1),a=B(()=>s.workspaces?.find(Ie=>Ie.id===s.activeWorkspaceId)?.name??s.workspaceName??""),c=B(()=>(s.workspaces?.length??0)>0),u=B(()=>zLe(s.workspaces??[],s.activeWorkspaceId,r.value)),d=B(()=>(s.workspaces?.length??0)-u.value.length);Ke(l,Ae=>{Ae||(r.value=!1)});function f(Ae){l.value=!1,Ae!==s.activeWorkspaceId&&i("selectWorkspace",Ae)}y1(dn.contentAlign);const p=V(null),h=V(null),m=V(null),k=V(!1);let x=null;function y(Ae,Ie){const At=m.value??h.value;return!At||At.loadForEdit(Ae)===!1?!1:(At.loadAttachmentsForEdit(Ie??[]),!0)}function w(){k.value=!0,x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k.value=!1},2e3)}function _(){s.goal&&(M.value="goal")}const A=B(()=>s.tasks.filter(Ae=>Ae.kind==="bash"||Ae.kind==="tool"&&!Ae.id.startsWith("question-"))),P=B(()=>s.tasks.filter(Ae=>Ae.kind==="subagent"&&Ae.runInBackground)),z=B(()=>A.value.filter(Ae=>Ae.state==="run").length),L=B(()=>P.value.filter(Ae=>Ae.state==="run").length);function E(Ae){const Ie=s.tasks,At=Ie.find(mn=>mn.id===Ae)??Ie.find(mn=>mn.parentToolCallId===Ae);if(At)return At.id;const lt=Ie.filter(mn=>mn.kind==="subagent"&&!mn.parentToolCallId);if(lt.length===1)return lt[0].id}qn("resolveAgentTaskId",E);function T(Ae){const Ie=s.tasks.filter(At=>At.id===Ae||At.parentToolCallId===Ae);if(Ie.length!==0)return Ie.some(At=>At.state==="run"&&At.runInBackground!==!0)}qn("resolveDetachableTask",T);const $=fn("modelDisplay"),C=fn("subagentEffort");function j(Ae){const Ie=E(Ae);if(Ie===void 0)return;const At=s.tasks.find(Kn=>Kn.id===Ie||Kn.agentId===Ie),lt=$?.(At?.model),mn=C?.(At?.thinkingEffort);if(!(lt===void 0&&mn===void 0))return{display:lt,effort:mn}}qn("resolveAgentModel",j),qn("resolvePlan",Ae=>s.sessionPlans?.[Ae]),qn("revealSavedPlan",(Ae,Ie)=>s.revealSavedPlan?.(Ae,Ie)??Promise.resolve(!1)),qn("pinScroll",hs);const H=B(()=>(s.todos??[]).filter(Ae=>Ae.status==="done").length),D=B(()=>s.goal!==null&&s.goal!==void 0||A.value.length>0||P.value.length>0||(s.todos?.length??0)>0),M=V(null),R=B(()=>s.gitInfo?s.changes?.length??0:0);function O(Ae){M.value=M.value===Ae?null:Ae}function U(){M.value=null}Ke([M,()=>s.goal,A,P,()=>s.todos,()=>s.planMode,()=>s.sessionPlans],()=>{(M.value==="goal"&&!s.goal||M.value==="bash"&&A.value.length===0||M.value==="subagent"&&P.value.length===0||M.value==="todos"&&(s.todos?.length??0)===0||M.value==="plan"&&!s.planMode&&Object.keys(s.sessionPlans??{}).length===0)&&U()});function Z(Ae){if(Ae.role==="compaction")return o("conversation.compactedPlain");if(Ae.role==="user"){if(Ae.skillActivation)return`/${Ae.skillActivation.name}`;if(Ae.pluginCommand)return`/${Ae.pluginCommand.pluginId}:${Ae.pluginCommand.commandName}`;const At=Ae.text.trim().replaceAll(/\s+/g," ");return At.length>0?At:"user"}const Ie=(Ae.text||Ae.thinking||"").trim().replaceAll(/\s+/g," ");return Ie.length>0?Ie:(Ae.tools?.length??0)>0?`${Ae.tools.length} tools`:"pythinker"}function q(Ae){for(let Ie=Ae+1;Ie0)return lt}return""}const te=B(()=>{let Ae=0;return s.turns.flatMap((Ie,At)=>Ie.role!=="user"?[]:(Ae+=1,[{id:Ie.id,role:Ie.role,no:Ae,title:Z(Ie),preview:q(At)}]))}),ee=V(null);function J(){const Ae=F.value;if(!Ae)return;const Ie=Ae.querySelectorAll(".turn-anchor[data-turn-id]");if(Ie.length===0)return;const At=te.value;if(At.length===0)return;const lt=new Set(At.map(Co=>Co.id));if(le.value&&ge()<=Qm){ee.value=At[At.length-1].id;return}const mn=Ae.getBoundingClientRect(),Kn=mn.height/2;let to=null;Ie.forEach(Co=>{const no=Co.dataset.turnId;if(!no||!lt.has(no))return;Co.getBoundingClientRect().top-mn.top<=Kn&&(to=no)}),ee.value=to??At[0].id}const se=V(!1);let Q=0;function me(){Q||(Q=Qn(()=>{Q=0,xe()}))}function xe(){const Ae=F.value,Ie=!s.mobile&&s.conversationToc&&Ae?Ae.closest(".con")?.querySelector(".conversation-toc"):null,At=Ie?.querySelector(".toc-marker");let lt=!1;if(Ae&&Ie&&At){const mn=At.getBoundingClientRect(),Kn=Ie.getBoundingClientRect(),to=mn.left+mn.width/2;lt=Array.from(Ae.querySelectorAll(".table-node-wrapper")).some(Co=>{const no=Co.getBoundingClientRect();return no.left<=to&&to<=no.right&&no.topKn.top})}se.value!==lt&&(se.value=lt)}const Ye=B(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),at=B(()=>{const Ae=Ye.value;if(Ae)return s.pendingQuestionActions?.[Ae.questionId]}),X=B(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),oe=B(()=>{const Ae=X.value;return Ae?!!s.pendingApprovalActions?.[Ae.approvalId]:!1}),F=V(null),K=V(!1),he=V(null),ye=V(0),ve=V(0),ie=B(()=>({"--panes-scrollbar-width":`${ye.value}px`})),de=B(()=>({"--chat-dock-height":`${ve.value+t$e}px`}));function be(Ae){return Ae instanceof HTMLElement?Ae:Ae&&"$el"in Ae&&Ae.$el instanceof HTMLElement?Ae.$el:null}function Se(){const Ae=F.value;ye.value=Ae?Math.max(0,Ae.offsetWidth-Ae.clientWidth):0,ve.value=he.value?.offsetHeight??0}function je(Ae){const Ie=be(Ae);F.value=Ie,Ie&&ql()}function et(Ae){const Ie=be(Ae);he.value=Ie??null,Ae&&"loadForEdit"in Ae&&typeof Ae.loadForEdit=="function"&&"focus"in Ae&&typeof Ae.focus=="function"?m.value={loadForEdit:Ae.loadForEdit.bind(Ae),loadAttachmentsForEdit:"loadAttachmentsForEdit"in Ae&&typeof Ae.loadAttachmentsForEdit=="function"?Ae.loadAttachmentsForEdit.bind(Ae):()=>{},insertQuote:"insertQuote"in Ae&&typeof Ae.insertQuote=="function"?Ae.insertQuote.bind(Ae):()=>{},focus:Ae.focus.bind(Ae)}:m.value=null,oi()}const le=V(!0),fe=V(!1);function ge(){const Ae=F.value;return Ae?Ae.scrollHeight-Ae.scrollTop-Ae.clientHeight:0}let Oe=0,Fe=0,pt=0,kt=0,qt=0,nn=0;function Jt(){return Date.now()1?(le.value=!1,fe.value=!0):At<=Qm&&Ie>Oe+1&&(le.value=!0,fe.value=!1),Oe=Ie,J()}function Dn(Ae=!1){const Ie=F.value;le.value=!0,fe.value=!1,Ie&&(!Ae&&performance.now()({node:Kn,top:xn(Ae,Kn)})),lt=At.findIndex(Kn=>Kn.top>=Ie),mn=lt<0?Math.max(0,At.length-1):lt;return At.slice(mn,mn+2).flatMap(Kn=>{const to=Kn.node.dataset.scrollAnchorId,Co=to??Kn.node.dataset.turnId;return Co?[{kind:to?"tool":"turn",id:Co,top:Kn.top}]:[]})}const Hn=new Map;function bn(Ae,Ie){for(const At of Ie.anchors){const lt=At.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",mn=Ae.querySelector(`[${lt}="${Mn(At.id)}"]`);if(mn)return xn(Ae,mn)-At.top}return Ae.scrollHeight-Ie.oldHeight}function Wn(Ae,Ie,At=Ae.scrollTop){return Ae.scrollTop=At+bn(Ae,Ie),Oe=Ae.scrollTop,Ae.scrollTop}async function Pn(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Xe.value||!s.hasMoreMessages)return;const Ae=s.sessionId,Ie=F.value,At=Ie?.scrollTop??0,lt={anchors:Ie?$n(Ie,At):[],oldHeight:Ie?.scrollHeight??0};qe(Ae,!0),bt();try{if(await yt(),await s.loadOlderMessages(Ae),await yt(),s.sessionId!==Ae){Hn.set(Ae,lt);return}const mn=F.value;if(!mn)return;Wn(mn,lt),Hn.delete(Ae)}finally{qe(Ae,!1)}}function Mn(Ae){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(Ae):Ae.replaceAll(/["\\]/g,"\\$&")}function Nn(Ae){const Ie=F.value;if(!Ie)return;const At=Ie.querySelector(`.turn-anchor[data-turn-id="${Mn(Ae)}"]`);At&&(Lt(),le.value=!1,ee.value=Ae,fe.value=ge()>Qm,At.scrollIntoView({behavior:"smooth",block:"center"}))}function An(){const Ae=F.value;if(!Ae)return"none";const Ie=Ae.firstElementChild,At=Ie instanceof HTMLElement?Ie.offsetHeight:0,lt=he.value?.offsetHeight??0;return`${Ae.scrollHeight}:${Ae.clientHeight}:${At}:${lt}`}function Qn(Ae){return typeof requestAnimationFrame=="function"?requestAnimationFrame(Ae):setTimeout(Ae,16)}function Fn(Ae){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(Ae):clearTimeout(Ae)}let Qt=0,uo=0,Zn=null,Bo=0;function Un(){return performance.now(){if(uo=0,performance.now()>=Qt||!Zn){Zn=null;return}const mn=Zn.getBoundingClientRect().top-Bo;mn&&(At.scrollTop+=mn),uo=Qn(lt)};uo=Qn(lt)}function Io(Ae=36){if(!le.value&&!Jt())return;const Ie=++nn;let At="",lt=0,mn=0;qt&&(Fn(qt),qt=0);const Kn=()=>{if(qt=0,Ie!==nn||!le.value&&!Jt())return;Dn(!1);const to=An();lt=to===At?lt+1:0,At=to,mn++,lt<3&&mn0&&Ie.length>=Ae.length&&Ae.firstId!==Ie.firstId&&Ae.lastId===Ie.lastId&&Ae.lastTextLen===Ie.lastTextLen&&Ae.lastThinkingLen===Ie.lastThinkingLen&&Ae.lastToolsLen===Ie.lastToolsLen&&Ae.approvalIds===Ie.approvalIds}const Jo=B(()=>{const Ae=(s.approvals??[]).map(Kn=>Kn.approvalId).join(","),Ie=s.turns,At=Ie.at(-1),lt=At?.thinking?.length??0,mn=At?.tools?.reduce((Kn,to)=>Kn+to.name.length+(to.arg?.length??0)+(to.output?.join("").length??0),0)??0;return{length:Ie.length,firstId:Ie[0]?.id??"",lastId:At?.id??"",lastTextLen:At?.text.length??0,lastThinkingLen:lt,lastToolsLen:mn,approvalIds:Ae}});Ke(Jo,async(Ae,Ie)=>{if(Xe.value&&Rt(Ie,Ae)){J();return}await yt(),le.value||Jt()?Dn(Ae.length{oi()}),Ke(()=>s.mobile,async()=>{await yt(),Se()});const Ls=new Map;Ke(()=>s.fileReloadKey,async(Ae,Ie)=>{const At=F.value;Ie&&At&&Ls.set(String(Ie),{top:At.scrollTop,following:le.value}),Lt(),await yt();const lt=F.value,mn=Ae?Ls.get(String(Ae)):void 0;if(mn&<){const Kn=Hn.get(String(Ae)),to=Kn?Wn(lt,Kn,mn.top):mn.top;Kn&&Hn.delete(String(Ae)),le.value=mn.following,lt.scrollTop=to,Oe=lt.scrollTop,fe.value=!mn.following&&ge()>1,mn.following&&Io()}else le.value=!0,Oe=0,Dn(!1),Io();J()}),Ke(()=>s.sessionLoading,async(Ae,Ie)=>{Ae||!Ie||(le.value=!0,await yt(),Io(),J())}),Ke(()=>s.turnActive,async(Ae,Ie)=>{Ae||!Ie||!le.value&&!Jt()||(await yt(),Io(48),J())});function $e(){le.value=!0,fe.value=!1,Fe=Date.now()+gM,yt(()=>{Dn(!0),Io(16)})}function Ge(Ae){$e(),i("submit",Ae)}function ot(Ae){le.value=!0,fe.value=!1,Fe=Date.now()+gM,i("editMessage",Ae)}function dt(Ae){const Ie=s.queued?.[Ae],At=Ie?.text??"";y(At,Ie?.attachments)&&i("editQueued",Ae)}function Mt(Ae){i("reorderQueue",Ae)}function Ft(Ae,Ie){$e(),i("answer",Ae,Ie)}function Ut(Ae,Ie){!Ae||!Ie||i("approval",Ae,Ie)}let en=null,tn=null,eo=null,Ro=null,$s=0,Do=0,We=0;const st=V(new Set),Xe=B(()=>!!s.sessionId&&st.value.has(s.sessionId));function qe(Ae,Ie){const At=new Set(st.value);Ie?At.add(Ae):At.delete(Ae),st.value=At}function Pe(){Xe.value||We||(We=Qn(()=>{We=0,!Xe.value&&(Un()||(le.value||Jt())&&Dn(!1))}))}function bt(){nn++,qt&&(Fn(qt),qt=0),We&&(Fn(We),We=0)}function Lt(){const Ae=F.value;if(Fe=0,bt(),Qt=0,Zn=null,Ae){const Ie=Ae.scrollTop;typeof Ae.scrollTo=="function"?Ae.scrollTo({top:Ie,behavior:"auto"}):Ae.scrollTop=Ie}kt=0,pt=Number.NEGATIVE_INFINITY,Ae&&(Oe=Ae.scrollTop)}function cn(){const Ae=F.value;!Ae||Ae.scrollHeight-Ae.clientHeight<=1&&!s.hasMoreMessages||(le.value=!1,Lt(),Ae.scrollHeight-Ae.clientHeight>1&&(fe.value=!0))}function So(Ae){const Ie=F.value;if(!Ie)return!1;for(const At of Ae.composedPath()){if(At===Ie)return!1;if(At instanceof HTMLElement&&At.scrollHeight>At.clientHeight+1&&At.scrollTop>1)return!0}return!1}function Qo(Ae){Ae.defaultPrevented||Ae.ctrlKey||Ae.shiftKey||Ae.deltaY>=0||So(Ae)||cn()}function Po(Ae){const Ie=F.value;if(!Ie||Ae.defaultPrevented||Ae.button!==0||Ae.pointerType==="touch")return;const At=Ie.getBoundingClientRect(),lt=Ie.offsetWidth-Ie.clientWidth,mn=lt>0?lt:12;Ae.target===Ie&&Ae.clientX>=At.right-mn&&cn()}let Xn=null;function pn(Ae){Xn=Ae.touches.length===1?Ae.touches[0].clientY:null}function Us(Ae){const Ie=Ae.touches.length===1?Ae.touches[0].clientY:null;Ie!==null&&Xn!==null&&Ie>Xn+2&&!So(Ae)&&cn(),Xn=Ie}function mi(){if(!tn)return;const Ae=F.value?.firstElementChild??null;Ae!==eo&&(eo&&tn.unobserve(eo),eo=Ae,Ae&&tn.observe(Ae))}function oi(){if(!tn)return;const Ae=he.value;Ae!==Ro&&(Ro&&tn.unobserve(Ro),Ro=Ae,Ae&&tn.observe(Ae))}function ql(){const Ae=F.value;Se(),en&&(en.disconnect(),Ae&&en.observe(Ae,{childList:!0,subtree:!0,characterData:!0})),tn&&(tn.disconnect(),eo=null,Ro=null,Ae&&tn.observe(Ae),mi(),oi()),$s=Ae?.scrollHeight??0,Do=Ae?.clientHeight??0,me()}function vl(){mi(),Pe(),me()}function Zs(){typeof document>"u"||document.visibilityState==="visible"&&le.value&&Io()}const yo=V(!1);let Lo=null;function yl(){yo.value=!0,Lo!==null&&clearTimeout(Lo),Lo=setTimeout(()=>{yo.value=!1},o$e)}function ms(){yl(),i("interrupt")}function wl(Ae){if((Ae.metaKey||Ae.ctrlKey)&&Ae.key.toLowerCase()==="f"){if(s.overlayOpen)return;Ae.preventDefault(),K.value=!0,yt(()=>{F.value?.closest(".con")?.querySelector(".tsearch-input")?.focus()});return}Ae.key==="Escape"&&(s.running||s.working)&&(Ae.preventDefault(),ms())}function gi(){K.value=!1,yt(()=>F.value?.focus({preventScroll:!0}))}function si(){le.value&&Pe()}In(()=>{yt(()=>{typeof MutationObserver=="function"&&(en=new MutationObserver(vl)),typeof ResizeObserver=="function"&&(tn=new ResizeObserver(()=>{me(),Se();const Ae=F.value;if(!Ae)return;const{scrollHeight:Ie,clientHeight:At}=Ae,lt=Ie>$s+1,mn=At{en&&en.disconnect(),tn&&tn.disconnect(),We&&Fn(We),qt&&Fn(qt),uo&&Fn(uo),Q&&Fn(Q),Lo!==null&&clearTimeout(Lo),x!==null&&(clearTimeout(x),x=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Zs),document.removeEventListener("keydown",wl)),window.visualViewport?.removeEventListener("resize",si)});function Ul(){(m.value??h.value)?.focus()}function Ni(Ae){(m.value??h.value)?.insertQuote(Ae)}return t({loadComposerForEdit:y,focusComposer:Ul,insertComposerQuote:Ni}),(Ae,Ie)=>{const At=yg("IconButton");return g(),S("section",{class:Be(["con",{mobile:e.mobile,"toc-enabled":e.conversationToc}]),style:Gt(de.value)},[K.value&&F.value?(g(),ue(ELe,{key:0,pane:F.value,mobile:e.mobile,onClose:gi},null,8,["pane","mobile"])):Y("",!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(g(),ue(owe,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":R.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,"session-done":e.sessionDone,pinned:e.pinned,"panel-visible":e.panelVisible,onOpenChanges:Ie[0]||(Ie[0]=lt=>i("openChanges")),onCopyAll:Ie[1]||(Ie[1]=lt=>p.value?.copyConversation()),onCopyFinalSummary:Ie[2]||(Ie[2]=lt=>p.value?.copyFinalSummary()),onOpenPr:Ie[3]||(Ie[3]=lt=>e.pr&&i("openPr",e.pr.url)),onRenameSession:Ie[4]||(Ie[4]=(lt,mn)=>i("renameSession",lt,mn)),onForkSession:Ie[5]||(Ie[5]=lt=>i("forkSession",lt)),onTogglePin:Ie[6]||(Ie[6]=lt=>i("togglePin",lt)),onArchiveSession:Ie[7]||(Ie[7]=lt=>i("archiveSession",lt)),onRestoreSession:Ie[8]||(Ie[8]=lt=>i("restoreSession",lt)),onExportSession:Ie[9]||(Ie[9]=lt=>i("exportSession",lt)),onTogglePanel:Ie[10]||(Ie[10]=lt=>e.togglePanel?.())},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","session-done","pinned","panel-visible"])):Y("",!0),!e.mobile&&!e.panelVisible&&e.turns.length===0&&!e.sessionLoading?(g(),ue(At,{key:2,class:"empty-panel-btn",label:v(o)("panel.openPanel"),onClick:Ie[11]||(Ie[11]=lt=>e.togglePanel?.())},{default:ae(()=>[W(Ee,{name:"panel-expand-right"})]),_:1},8,["label"])):Y("",!0),e.conversationToc?(g(),ue(aLe,{key:3,items:te.value,"active-turn-id":ee.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:se.value,onSelect:Nn},null,8,["items","active-turn-id","mobile","session-loading","occluded"])):Y("",!0),b("div",VLe,[b("div",{ref:je,class:Be(["panes chat-scroll",{"is-following":le.value,"history-prepending":Xe.value}]),tabindex:"-1",onScrollPassive:kn,onWheelPassive:Qo,onPointerdownPassive:Po,onTouchstartPassive:pn,onTouchmovePassive:Us},[b("div",{class:Be(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(g(),S(Ce,{key:0},[Ie[64]||(Ie[64]=b("div",{class:"empty-spacer"},null,-1)),b("div",WLe,[b("span",{class:Be(["empty-hint-title",{"is-starting":e.starting}])},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(df,{key:1,size:"md",label:"","aria-hidden":"true"})),b("span",null,I(e.starting?v(o)("conversation.starting"):v(o)("composer.emptyConversationTitle")),1)],2),e.starting?Y("",!0):(g(),S("span",qLe,I(v(o)("composer.emptyConversation")),1)),c.value&&!e.starting?(g(),S("div",ULe,[W(Cn,{text:v(o)("conversation.switchWorkspace")},{default:ae(()=>[b("button",{type:"button",class:"ws-pick-btn",onClick:Ie[12]||(Ie[12]=xt(lt=>l.value=!l.value,["stop"]))},[W(Ee,{name:"folder",size:"sm"}),b("span",ZLe,I(a.value),1),W(Ee,{class:Be(["ws-pick-chev",{open:l.value}]),name:"chevron-down",size:"sm"},null,8,["class"])])]),_:1},8,["text"]),l.value?(g(),S("div",{key:0,class:"ws-pick-backdrop",onClick:Ie[13]||(Ie[13]=lt=>l.value=!1)})):Y("",!0),l.value?(g(),S("div",KLe,[(g(!0),S(Ce,null,rt(u.value,lt=>(g(),S("button",{key:lt.id,type:"button",class:Be(["ws-pick-item",{on:lt.id===e.activeWorkspaceId}]),onClick:xt(mn=>f(lt.id),["stop"])},[b("span",YLe,I(lt.name),1),b("span",XLe,I(lt.shortPath),1)],10,GLe))),128)),d.value>0?(g(),S("button",{key:0,type:"button",class:"ws-pick-item ws-pick-more",onClick:Ie[14]||(Ie[14]=xt(lt=>r.value=!r.value,["stop"]))},[b("span",null,I(v(o)("conversation.moreWorkspaces",{count:d.value})),1)])):Y("",!0),Ie[63]||(Ie[63]=b("div",{class:"ws-pick-divider"},null,-1)),b("button",{type:"button",class:"ws-pick-action",onClick:Ie[15]||(Ie[15]=xt(lt=>{l.value=!1,i("addWorkspace")},["stop"]))},[W(Ee,{name:"plus",size:"sm"}),b("span",null,I(v(o)("conversation.addWorkspace")),1)])])):Y("",!0)])):e.starting?Y("",!0):(g(),S("button",{key:2,type:"button",class:"empty-add-workspace",onClick:Ie[16]||(Ie[16]=lt=>i("addWorkspace"))},[W(Ee,{name:"folder-plus",size:"sm"}),b("span",null,I(v(o)("conversation.addWorkspace")),1)]))]),e.sessionId?Y("",!0):(g(),ue(DLe,{key:0,sessions:e.recentSessions??[],onSelect:Ie[17]||(Ie[17]=lt=>i("selectSession",lt)),onOpenSessionAdmin:Ie[18]||(Ie[18]=lt=>i("openSessionAdmin"))},null,8,["sessions"])),W(Yz,{ref_key:"emptyComposerRef",ref:h,class:"empty-composer","session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:Ge,onSteer:Ie[19]||(Ie[19]=lt=>i("steer",lt)),onCommand:Ie[20]||(Ie[20]=lt=>i("command",lt)),onInterrupt:ms,onUnqueue:Ie[21]||(Ie[21]=lt=>i("unqueue",lt)),onEditQueued:Ie[22]||(Ie[22]=lt=>i("editQueued",lt)),onSetPermission:Ie[23]||(Ie[23]=lt=>i("setPermission",lt)),onSetThinking:Ie[24]||(Ie[24]=lt=>i("setThinking",lt)),onTogglePlan:Ie[25]||(Ie[25]=lt=>i("togglePlan")),onToggleWorkflow:Ie[26]||(Ie[26]=lt=>i("toggleWorkflow")),onToggleGoal:Ie[27]||(Ie[27]=lt=>i("toggleGoal")),onOpenBtw:Ie[28]||(Ie[28]=lt=>i("command","/btw")),onCreateGoal:Ie[29]||(Ie[29]=lt=>i("createGoal",lt)),onControlGoal:Ie[30]||(Ie[30]=lt=>i("controlGoal",lt)),onFocusGoal:_,onCompact:Ie[31]||(Ie[31]=lt=>i("compact")),onPickModel:Ie[32]||(Ie[32]=lt=>i("pickModel")),onSelectModel:Ie[33]||(Ie[33]=lt=>i("selectModel",lt))},null,8,["session-id","running","queued","search-files","upload-image","status","thinking","plan-mode","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills","starting"]),Ie[65]||(Ie[65]=b("div",{class:"empty-spacer"},null,-1))],64)):(g(),ue(d9,{ref_key:"chatPaneRef",ref:p,key:e.fileReloadKey??"no-session",turns:e.turns,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":le.value,"tool-diff-panel":!0,"turn-folding":e.turnFolding??!0,"activity-run-folding":e.activityRunFolding??!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:Ie[34]||(Ie[34]=lt=>i("openFile",lt)),onOpenMedia:Ie[35]||(Ie[35]=lt=>i("openMedia",lt)),onCopyConversationCopied:w,onOpenCompaction:Ie[36]||(Ie[36]=lt=>i("openCompaction",lt)),onOpenAgent:Ie[37]||(Ie[37]=lt=>i("openAgent",lt)),onDetachTask:Ie[38]||(Ie[38]=lt=>i("detachTask",lt)),onOpenToolDiff:Ie[39]||(Ie[39]=lt=>i("openToolDiff",lt)),onOpenTurnDiff:Ie[40]||(Ie[40]=lt=>i("openTurnDiff",lt)),onEditMessage:ot,onLoadOlderMessages:Pn,onUnqueue:Ie[41]||(Ie[41]=lt=>i("unqueue",lt)),onEditQueued:dt,onReorderQueue:Mt,onSteerQueued:Ie[42]||(Ie[42]=lt=>i("steerQueued",lt)),onContinueTurn:Ie[43]||(Ie[43]=lt=>Ge({text:lt,attachments:[]}))},null,8,["turns","approvals","questions","turn-active","working","fast-moon","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","cwd","queued"]))],2)],34),(g(),ue(hl,{defer:"",to:".pfc-host",disabled:!e.panelExpanded||e.activePanelType==="btw"},[e.turns.length===0&&!e.sessionLoading?Y("",!0):(g(),ue(eLe,{key:0,ref:et,style:Gt(ie.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":lt=>i("openFile",lt),"reveal-saved-plan":e.revealSavedPlan,"dock-panel":M.value,"bash-tasks":A.value,"subagent-tasks":P.value,"bash-running":z.value,"subagent-running":L.value,"todo-done-count":H.value,"has-dock-work":D.value,todos:e.todos,"pending-question":Ye.value,"question-busy-kind":at.value,"pending-approval":X.value,"approval-busy":oe.value,mobile:e.mobile,onToggleDockPanel:Ie[44]||(Ie[44]=lt=>O(lt)),onCloseDockPanel:Ie[45]||(Ie[45]=lt=>U()),onOpenAgent:Ie[46]||(Ie[46]=lt=>i("openAgent",lt)),onAnswer:Ft,onDismiss:Ie[47]||(Ie[47]=lt=>i("dismiss",lt)),onApproval:Ut,onCancelTask:Ie[48]||(Ie[48]=lt=>i("cancelTask",lt)),onControlGoal:Ie[49]||(Ie[49]=lt=>i("controlGoal",lt)),onSubmit:Ge,onSteer:Ie[50]||(Ie[50]=lt=>i("steer",lt)),onCommand:Ie[51]||(Ie[51]=lt=>i("command",lt)),onInterrupt:ms,onSetPermission:Ie[52]||(Ie[52]=lt=>i("setPermission",lt)),onSetThinking:Ie[53]||(Ie[53]=lt=>i("setThinking",lt)),onTogglePlan:Ie[54]||(Ie[54]=lt=>i("togglePlan")),onToggleWorkflow:Ie[55]||(Ie[55]=lt=>i("toggleWorkflow")),onToggleGoal:Ie[56]||(Ie[56]=lt=>i("toggleGoal")),onOpenBtw:Ie[57]||(Ie[57]=lt=>i("command","/btw")),onCreateGoal:Ie[58]||(Ie[58]=lt=>i("createGoal",lt)),onFocusGoal:_,onCompact:Ie[59]||(Ie[59]=lt=>i("compact")),onPickModel:Ie[60]||(Ie[60]=lt=>i("pickModel")),onSelectModel:Ie[61]||(Ie[61]=lt=>i("selectModel",lt))},null,8,["style","session-id","running","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","working","goal-mode","dynamic-workflow-mode","activation-badges","models","starred-ids","skills","goal","session-plans","overlay-open","open-file","reveal-saved-plan","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile"]))],8,["disabled"]))]),W(qi,{name:"pill"},{default:ae(()=>[fe.value?(g(),S("button",{key:0,class:"newmsg-pill",style:Gt({bottom:`${ve.value+12}px`}),"aria-label":v(o)("conversation.jumpToLatestAria"),onClick:Ie[62]||(Ie[62]=lt=>Dn(!0))},[W(Ee,{class:"pill-chevron",name:"chevron-down",size:"md"}),He(" "+I(v(o)("conversation.newMessages")),1)],12,JLe)):Y("",!0)]),_:1}),W(qi,{name:"abort-toast"},{default:ae(()=>[yo.value?(g(),S("div",QLe,[b("span",e$e,I(v(o)("conversation.manuallyAborted")),1)])):Y("",!0)]),_:1})],6)}}}),i$e=vt(s$e,[["__scopeId","data-v-0a30b1ee"]]),l$e=["role","aria-label"],r$e={key:0,class:"sab-comment"},a$e=["placeholder"],c$e=["disabled"],u$e=Je({__name:"SelectionActionBar",props:{enabled:{type:Boolean},panelSource:{}},emits:["add"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(!1),l=V(!1),r=V(""),a=V(""),c=V(),u=V({}),d=V(null),f=V(null);let p=0;function h(){i.value=!1,l.value=!1,r.value=""}function m(L){const E=L.commonAncestorContainer;return E.nodeType===Node.ELEMENT_NODE?E:E.parentElement}function k(){if(p=0,!n.enabled||l.value&&d.value?.contains(document.activeElement))return;const L=window.getSelection();if(!L||L.rangeCount===0||L.isCollapsed){h();return}const E=L.getRangeAt(0),T=m(E),$=T?.closest(".con, .pt-body");if(!T||!$||T.closest('.sab, input, textarea, button, [contenteditable="true"]')){h();return}const C=L.toString().trim(),j=E.getBoundingClientRect();if(!C||j.width===0&&j.height===0){h();return}a.value=C,c.value=$.classList.contains("pt-body")?n.panelSource:void 0;const H=220,D=Math.min(window.innerWidth-H-8,Math.max(8,j.left+j.width/2-H/2)),M=j.bottom+8;u.value={left:`${Math.round(D)}px`,top:`${Math.round(M)}px`,width:`${H}px`},i.value=!0,l.value=!1}function x(){p&&cancelAnimationFrame(p),p=requestAnimationFrame(k)}function y(){window.getSelection()?.removeAllRanges()}function w(L){const E=a.value.trim();if(!E)return;const T=L?.trim();o("add",{quote:E,comment:T||void 0,source:c.value}),y(),h()}function _(){l.value=!0,yt(()=>f.value?.focus())}function A(L){if(l.value||L.key!=="ArrowDown"&&L.key!=="ArrowUp")return;L.preventDefault();const E=Array.from(d.value?.querySelectorAll(".sab-action")??[]),T=E.indexOf(document.activeElement),$=L.key==="ArrowDown"?(T+1)%E.length:(T-1+E.length)%E.length;E[$]?.focus()}function P(L){!i.value||d.value?.contains(L.target)||h()}function z(L){L.key==="Escape"&&i.value&&(L.preventDefault(),L.stopImmediatePropagation(),h())}return In(()=>{document.addEventListener("selectionchange",x),document.addEventListener("pointerdown",P,!0),document.addEventListener("keydown",z,!0)}),En(()=>{p&&cancelAnimationFrame(p),document.removeEventListener("selectionchange",x),document.removeEventListener("pointerdown",P,!0),document.removeEventListener("keydown",z,!0)}),(L,E)=>(g(),ue(hl,{to:"body"},[i.value?(g(),S("div",{key:0,ref_key:"barRef",ref:d,class:"sab",style:Gt(u.value),role:l.value?"dialog":"menu","aria-label":l.value?v(s)("selection.comment"):void 0,onPointerdown:E[4]||(E[4]=xt(()=>{},["prevent"])),onKeydown:A},[l.value?(g(),S("div",r$e,[Jn(b("input",{ref_key:"commentInputRef",ref:f,"onUpdate:modelValue":E[0]||(E[0]=T=>r.value=T),placeholder:v(s)("selection.commentPlaceholder"),onKeydown:E[1]||(E[1]=go(xt(T=>w(r.value),["prevent"]),["enter"]))},null,40,a$e),[[js,r.value]]),b("button",{type:"button",disabled:!r.value.trim(),onClick:E[2]||(E[2]=T=>w(r.value))},I(v(s)("selection.confirm")),9,c$e)])):(g(),S(Ce,{key:1},[b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:_},[W(Ee,{name:"message",size:"sm"}),b("span",null,I(v(s)("selection.comment")),1)]),b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:E[3]||(E[3]=T=>w())},[W(Ee,{name:"plus",size:"sm"}),b("span",null,I(v(s)("selection.addToChat")),1)])],64))],44,l$e)):Y("",!0)]))}}),d$e=vt(u$e,[["__scopeId","data-v-d37e8069"]]),f$e=["aria-label"],p$e={class:"media-lightbox-card"},h$e=["src","alt"],m$e=["src"],g$e={key:0,class:"media-preview-caption"},v$e=Je({__name:"MediaLightbox",props:{media:{},src:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),i=r4("overlay"),l=r4("close"),r=r4("image"),a=B(()=>n.media.kind==="image"),c=B(()=>n.media.path??(a.value?"Image preview":"Video preview")),u=Uo(1),d=Uo(0),f=Uo(0),p=Uo(!1),h=B(()=>({transform:`translate(${d.value}px, ${f.value}px) scale(${u.value})`,cursor:u.value>1?p.value?"grabbing":"grab":"zoom-in"}));let m=null,k=null,x=0,y=0,w=0,_=0;const{lock:A,unlock:P}=Kz();function z(){u.value=1,d.value=0,f.value=0}function L(H){if(!a.value)return;H.preventDefault();const D=Math.min(8,Math.max(1,u.value*(H.deltaY<0?1.1:.9)));u.value=D,D===1&&(d.value=0,f.value=0)}function E(){if(u.value!==1){z();return}const H=r.value;H&&(u.value=Math.min(8,Math.max(1,H.naturalWidth/H.clientWidth)))}function T(H){u.value<=1||(k=H.pointerId,x=H.clientX,y=H.clientY,w=d.value,_=f.value,p.value=!0,r.value?.setPointerCapture(H.pointerId))}function $(H){k===H.pointerId&&(d.value=w+H.clientX-x,f.value=_+H.clientY-y)}function C(H){k===H.pointerId&&(r.value?.releasePointerCapture(H.pointerId),k=null,p.value=!1)}function j(H){if(H.key==="Escape"){H.preventDefault(),H.stopPropagation(),o("close");return}if(H.key!=="Tab"||!i.value)return;const D=i.value.querySelectorAll(s),M=D[0],R=D[D.length-1];!M||!R||(i.value.contains(document.activeElement)?H.shiftKey&&document.activeElement===M?(H.preventDefault(),R.focus()):!H.shiftKey&&document.activeElement===R&&(H.preventDefault(),M.focus()):(H.preventDefault(),(H.shiftKey?R:M).focus()))}return In(()=>{A(),m=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener("keydown",j),l.value?.focus()}),En(()=>{P(),window.removeEventListener("keydown",j),m?.focus()}),(H,D)=>(g(),ue(hl,{to:"body"},[b("div",{ref:"overlay",class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":c.value,onMousedown:D[1]||(D[1]=xt(M=>o("close"),["self"]))},[b("button",{ref:"close",type:"button",class:"media-lightbox-close","aria-label":"Close",onClick:D[0]||(D[0]=M=>o("close"))},[W(Ee,{name:"close",size:"sm"})],512),b("div",p$e,[b("div",{class:"media-lightbox-frame",onWheel:L},[a.value?(g(),S("img",{key:0,ref:"image",class:"media-lightbox-media",src:e.src,alt:e.media.path??"",draggable:"false",style:Gt(h.value),onDblclick:E,onPointerdown:T,onPointermove:$,onPointerup:C,onPointercancel:C},null,44,h$e)):(g(),S("video",{key:1,class:"media-lightbox-media",src:e.src,controls:"",autoplay:""},null,8,m$e))],32)]),e.media.path?(g(),S("div",g$e,I(e.media.path),1)):Y("",!0)],40,f$e)]))}}),y$e=vt(v$e,[["__scopeId","data-v-a5036dce"]]),w$e={class:"ui-panel-header__main"},k$e={class:"ui-panel-header__title"},b$e={key:0,class:"ui-panel-header__sub"},_$e=Je({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:"Close"},wrap:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-panel-header",{wrap:e.wrap}])},[b("div",w$e,[b("span",k$e,I(e.title),1),W(Cn,{text:e.subtitle},{default:ae(()=>[e.subtitle?(g(),S("span",b$e,I(e.subtitle),1)):Y("",!0)]),_:1},8,["text"]),jn(t.$slots,"default",{},void 0,!0)]),e.closable?(g(),ue(Dt,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel,onClick:n[0]||(n[0]=o=>t.$emit("close"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])):Y("",!0)],2))}}),Ca=vt(_$e,[["__scopeId","data-v-47211810"]]),x$e={key:0,class:"fp-empty fp-error"},S$e={key:1,class:"fp-empty"},C$e={key:2,class:"fp-loading"},M$e={class:"fp-path"},A$e={class:"fp-meta"},T$e={key:0,class:"fp-lines"},E$e={class:"fp-size"},I$e={key:3,class:"fp-search"},L$e=["placeholder"],$$e={key:0,class:"fp-search-count"},N$e={key:1,class:"fp-code"},z$e={class:"fp-line-table"},B$e=["data-line"],R$e={class:"fp-gutter"},P$e=["innerHTML"],F$e={key:1,class:"fp-body fp-code"},j$e={class:"fp-line-table"},O$e=["data-line"],H$e={class:"fp-gutter"},D$e=["innerHTML"],V$e={key:2,class:"fp-body"},W$e=["srcdoc","title"],q$e={key:1,class:"fp-code"},U$e={class:"fp-line-table"},Z$e=["data-line"],K$e={class:"fp-gutter"},G$e=["innerHTML"],Y$e={key:3,class:"fp-body fp-pdf-wrap"},X$e=["src","title"],J$e={key:1,class:"fp-binary-card"},Q$e={class:"fp-binary-label"},eNe={key:4,class:"fp-body fp-table-wrap"},tNe={class:"fp-table"},nNe=["data-line"],oNe={key:5,class:"fp-body fp-image-wrap"},sNe=["src","alt"],iNe={key:1,class:"fp-binary-card"},lNe={class:"fp-binary-icon"},rNe={class:"fp-binary-label"},aNe={key:6,class:"fp-body fp-image-wrap"},cNe=["src"],uNe={key:1,class:"fp-binary-card"},dNe={class:"fp-binary-icon"},fNe={class:"fp-binary-label"},pNe={key:7,class:"fp-body fp-code"},hNe={class:"fp-line-table"},mNe=["data-line"],gNe={class:"fp-gutter"},vNe=["innerHTML"],yNe={key:8,class:"fp-body fp-binary-wrap"},wNe={class:"fp-binary-card"},kNe={class:"fp-binary-icon"},bNe={class:"fp-binary-label"},_Ne=Je({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},editable:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal","openEditor"],setup(e,{emit:t}){const{t:n}=$t();function o(X,oe){const F=oe?oe.split("/").filter(Boolean):[];for(const K of X.split("/"))K===""||K==="."||(K===".."?F.pop():F.push(K));return F.join("/")}const s=fn("resolveImage",async X=>X),i=B(()=>{const X=c.file?.path??"",oe=X.lastIndexOf("/");return oe>0?X.slice(0,oe):""});function l(X){if(/^(https?:|data:|blob:)/i.test(X)||X.startsWith("/"))return X;const oe=i.value;return oe?o(X,oe):X}async function r(X){const oe=l(X);return s?s(oe):oe}qn("resolveImage",r);function a(X){let oe=X.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(oe)||oe.startsWith("/"))return X;for(const K of["#","?"]){const he=oe.indexOf(K);he!==-1&&(oe=oe.slice(0,he))}const F=i.value;return{...X,path:o(oe,F)}}const c=e,u=B(()=>{const X=c.file;return X!==null&&!X.isBinary}),d=t;function f(X){c.openFile?.(a(X))}const p=V(null),h=B(()=>{const X=c.file;if(!X)return"binary";const oe=X.mime??"",F=X.languageId??"",K=X.path.toLowerCase();return oe==="text/markdown"||F==="markdown"||F==="md"||K.endsWith(".mdx")?"markdown":oe==="application/json"||F==="json"?"json":oe==="text/html"||F==="html"||K.endsWith(".html")||K.endsWith(".htm")?"html":oe==="application/pdf"||K.endsWith(".pdf")?"pdf":oe==="text/csv"||F==="csv"||K.endsWith(".csv")?"csv":oe.startsWith("image/")?"image":oe.startsWith("video/")?"video":X.isBinary?"binary":oe.startsWith("text/")||F!==""?"text":"binary"});function m(X){const oe=atob(X),F=Uint8Array.from(oe,K=>K.charCodeAt(0));return new TextDecoder().decode(F)}const k=B(()=>{const X=c.file;if(!X)return"";if(X.encoding==="base64")try{return m(X.content)}catch{return X.content}return X.content}),x=B(()=>{if(h.value!=="json"||!c.file)return"";try{return JSON.stringify(JSON.parse(k.value),null,2)}catch{return k.value}}),y=B(()=>c.file?(h.value==="json"?x.value:k.value).split(` -`):[]),w=B(()=>c.file?h.value==="json"?x.value:k.value:""),_=V(""),A=V(0),P=B(()=>{const X=_.value.trim().toLowerCase();if(!X)return[];const oe=[];return y.value.forEach((F,K)=>{F.toLowerCase().includes(X)&&oe.push(K+1)}),oe});Ke(_,()=>{A.value=0});function z(X,oe=!1){X&&yt(()=>{const F=p.value?.querySelector(".fp-body"),K=F?.querySelector(`[data-line="${X}"]`);if(!F||!K)return;oe&&(F.scrollTop=0);const he=F.getBoundingClientRect(),ye=K.getBoundingClientRect(),ve=ye.top-he.top+F.scrollTop;F.scrollTop=ve-F.clientHeight/2+ye.height/2})}Ke(()=>[c.file?.path,c.line],()=>z(c.line,!0),{immediate:!0});function L(X){const oe=P.value;oe.length!==0&&(A.value=(A.value+X+oe.length)%oe.length,z(oe[A.value]))}function E(X){const oe=P.value;return{target:c.line===X,hit:oe.includes(X),active:oe[A.value]===X}}function T(X){return X<1024?`${X} B`:X<1024*1024?`${(X/1024).toFixed(1)} KB`:`${(X/(1024*1024)).toFixed(1)} MB`}const $=V(!1),C=V(!1);function j(){c.file&&fs(w.value).then(X=>{X&&($.value=!0,setTimeout(()=>{$.value=!1},1400))})}function H(){c.file&&fs(c.file.path).then(X=>{X&&(C.value=!0,setTimeout(()=>{C.value=!1},1400))})}const D=V("preview"),M=V("preview"),R=V("fit");function O(X){D.value=X}function U(X){M.value=X}function Z(X){R.value=X}Ke(h,X=>{D.value=X==="html"?"preview":"source",M.value="preview",R.value="fit"});const q=B(()=>{const X=c.file;return!X||h.value!=="image"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:X.mime==="image/svg+xml"?`data:${X.mime};charset=utf-8,${encodeURIComponent(X.content)}`:null}),te=B(()=>{const X=c.file;return!X||h.value!=="video"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),ee=B(()=>{const X=c.file;return!X||h.value!=="pdf"?null:c.downloadUrl?c.downloadUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),J=B(()=>c.file?["",'',``,k.value].join(""):"");function se(X){const oe=[];let F="",K=!1;for(let he=0;hey.value.slice(0,200).map(se));function me(X){return X.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function xe(){const X=c.file;if(!X)return"";const oe=X.languageId?.toLowerCase();return oe||(X.path.split(".").pop()?.toLowerCase()??"")}function Ye(X){const oe=xe();let F=me(X);return h.value==="json"||oe==="json"||oe==="jsonc"?(F=F.replace(/("[^&]*?")(\s*:)/g,'$1$2'),F=F.replace(/(:\s*)("[^&]*?")/g,'$1$2'),F=F.replace(/\b(true|false|null)\b/g,'$1'),F=F.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,'$1$2'),F):h.value==="html"||oe==="html"||oe==="xml"||oe==="svg"?(F=F.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,' $1$2'),F=F.replace(/(".*?")/g,'$1'),F=F.replace(/(<\/?)([A-Za-z][\w:-]*)/g,'$1$2'),F):(F=F.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,'$1'),F=F.replace(/(".*?"|'.*?')/g,'$1'),F=F.replace(/(\/\/.*)$/g,'$1'),F)}function at(X,oe=55){return!X||X.length<=oe?X:"…"+X.slice(X.length-oe+1)}return(X,oe)=>(g(),S("div",{ref_key:"rootRef",ref:p,class:"file-preview"},[e.error&&!e.loading?(g(),S("div",x$e,[b("span",null,I(e.error),1),e.closable?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:oe[0]||(oe[0]=F=>d("close"))},{default:ae(()=>[He(I(v(n)("filePreview.close")),1)]),_:1})):Y("",!0)])):!e.file&&!e.loading?(g(),S("div",S$e,I(v(n)("filePreview.empty")),1)):e.loading?(g(),S("div",C$e,[oe[8]||(oe[8]=b("span",{class:"spinner"},null,-1)),b("span",null,I(v(n)("filePreview.loading")),1)])):e.file?(g(),S(Ce,{key:3},[W(Ca,{wrap:"",title:v(n)("common.preview"),closable:e.closable,"close-label":v(n)("filePreview.close"),onClose:oe[7]||(oe[7]=F=>d("close"))},{default:ae(()=>[W(Cn,{text:e.file.path},{default:ae(()=>[b("span",M$e,I(at(e.file.path)),1)]),_:1},8,["text"]),b("span",A$e,[e.file.lineCount?(g(),S("span",T$e,I(v(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):Y("",!0),b("span",E$e,I(T(e.file.size)),1)]),h.value==="html"?(g(),ue(di,{key:0,"model-value":D.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":O},null,8,["model-value","options"])):Y("",!0),h.value==="markdown"?(g(),ue(di,{key:1,"model-value":M.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":U},null,8,["model-value","options"])):Y("",!0),h.value==="image"?(g(),ue(di,{key:2,"model-value":R.value,size:"sm",options:[{value:"fit",label:v(n)("filePreview.fit")},{value:"actual",label:v(n)("filePreview.actual")}],"onUpdate:modelValue":Z},null,8,["model-value","options"])):Y("",!0),h.value==="text"||h.value==="json"||h.value==="html"||h.value==="csv"?(g(),S("div",I$e,[Jn(b("input",{"onUpdate:modelValue":oe[1]||(oe[1]=F=>_.value=F),class:"fp-search-input",type:"search",placeholder:v(n)("filePreview.search")},null,8,L$e),[[js,_.value]]),_.value.trim()?(g(),S("span",$$e,I(P.value.length),1)):Y("",!0),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.prevMatch"),onClick:oe[2]||(oe[2]=F=>L(-1))},{default:ae(()=>[W(Ee,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.nextMatch"),onClick:oe[3]||(oe[3]=F=>L(1))},{default:ae(()=>[W(Ee,{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):Y("",!0),W(Dt,{size:"sm",class:Be({copied:C.value}),label:C.value?v(n)("filePreview.copied"):v(n)("filePreview.copyPath"),onClick:H},{default:ae(()=>[C.value?(g(),ue(Ee,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ee,{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.editable&&u.value&&e.file!==null?(g(),ue(Dt,{key:4,size:"sm",label:v(n)("editor.title"),onClick:oe[4]||(oe[4]=F=>d("openEditor",e.file.path))},{default:ae(()=>[W(Ee,{name:"pencil",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:5,size:"sm",label:v(n)("filePreview.openInEditor"),onClick:oe[5]||(oe[5]=F=>d("openExternal"))},{default:ae(()=>[W(Ee,{name:"external-link",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:6,size:"sm",label:v(n)("filePreview.reveal"),onClick:oe[6]||(oe[6]=F=>d("reveal"))},{default:ae(()=>[W(Ee,{name:"folder",size:"md"})]),_:1},8,["label"])):Y("",!0),!e.file.isBinary&&h.value!=="image"?(g(),ue(Dt,{key:7,size:"sm",class:Be({copied:$.value}),label:$.value?v(n)("filePreview.copied"):v(n)("filePreview.copy"),onClick:j},{default:ae(()=>[$.value?(g(),ue(Ee,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ee,{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):Y("",!0)]),_:1},8,["title","closable","close-label"]),h.value==="markdown"?(g(),S("div",{key:0,class:Be(["fp-body",{"fp-markdown":M.value==="preview"}])},[M.value==="preview"?(g(),ue(Br,{key:0,text:k.value,"open-file":c.openFile?f:void 0},null,8,["text","open-file"])):(g(),S("div",N$e,[b("div",z$e,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",R$e,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,P$e)],10,B$e))),128))])]))],2)):h.value==="json"?(g(),S("div",F$e,[b("div",j$e,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",H$e,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,D$e)],10,O$e))),128))])])):h.value==="html"?(g(),S("div",V$e,[D.value==="preview"?(g(),S("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:J.value,title:e.file.path},null,8,W$e)):(g(),S("div",q$e,[b("div",U$e,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",K$e,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,G$e)],10,Z$e))),128))])]))])):h.value==="pdf"?(g(),S("div",Y$e,[ee.value?(g(),S("iframe",{key:0,class:"fp-pdf-frame",src:ee.value,title:e.file.path},null,8,X$e)):(g(),S("div",J$e,[b("span",Q$e,I(v(n)("filePreview.pdfNoPreview")),1)]))])):h.value==="csv"?(g(),S("div",eNe,[b("table",tNe,[b("tbody",null,[(g(!0),S(Ce,null,rt(Q.value,(F,K)=>(g(),S("tr",{key:K,class:Be(E(K+1)),"data-line":K+1},[b("th",null,I(K+1),1),(g(!0),S(Ce,null,rt(F,(he,ye)=>(g(),S("td",{key:ye},I(he),1))),128))],10,nNe))),128))])])])):h.value==="image"?(g(),S("div",oNe,[q.value?(g(),S("img",{key:0,src:q.value,alt:e.file.path,class:Be(["fp-image",{actual:R.value==="actual"}])},null,10,sNe)):(g(),S("div",iNe,[b("span",lNe,[W(Ee,{name:"image-off",size:"lg"})]),b("span",rNe,I(v(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:T(e.file.size)})),1)]))])):h.value==="video"?(g(),S("div",aNe,[te.value?(g(),S("video",{key:0,src:te.value,class:"fp-image",controls:"",playsinline:"",preload:"metadata"},null,8,cNe)):(g(),S("div",uNe,[b("span",dNe,[W(Ee,{name:"image-off",size:"lg"})]),b("span",fNe,I(v(n)("filePreview.videoNoPreview",{mime:e.file.mime,size:T(e.file.size)})),1)]))])):h.value==="text"?(g(),S("div",pNe,[b("div",hNe,[(g(!0),S(Ce,null,rt(y.value,(F,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",E(K+1)]),"data-line":K+1},[b("span",gNe,I(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(F)},null,8,vNe)],10,mNe))),128))])])):(g(),S("div",yNe,[b("div",wNe,[b("span",kNe,[W(Ee,{name:"file-off",size:"lg"})]),b("span",bNe,I(v(n)("filePreview.binaryNoPreview",{mime:e.file.mime||v(n)("filePreview.unknownType"),size:T(e.file.size)})),1)])]))],64)):Y("",!0)],512))}}),xNe=vt(_Ne,[["__scopeId","data-v-97c52e24"]]),SNe={class:"ui-banner__icon","aria-hidden":"true"},CNe={class:"ui-banner__text"},MNe=Je({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[b("span",SNe,[jn(t.$slots,"icon",{},()=>[e.variant==="info"?(g(),ue(Ee,{key:0,name:"info",size:"md"})):(g(),ue(Ee,{key:1,name:"alert-triangle",size:"md"}))],!0)]),b("span",CNe,[jn(t.$slots,"default",{},void 0,!0)])],2))}}),K9=vt(MNe,[["__scopeId","data-v-566a0ac8"]]),B4=Mo.global.t,ANe=40928,TNe=10485760,gn=ds({open:!1,path:null,loading:!1,saving:!1,loadError:null,savingError:null,conflict:!1,dirty:!1,savedAt:null,languageId:void 0});let i1=null,ua=0,ap=null;const eB={getContent:null};function vM(e){eB.getContent=e}function ENe(){return gn}function INe(){ua+=1,gn.path=null,gn.loading=!1,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,i1=null,ap=null}async function tB(e){const t=BNe();if(!t){ua+=1,gn.open=!0,gn.path=e.path,gn.loading=!1,gn.loadError=B4("editor.readOnlyWhileMissingSession"),gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,gn.saving=!1,i1=null,ap=null;return}const n=++ua;gn.open=!0,gn.path=e.path,gn.loading=!0,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,i1=null,ap=t;try{const o=await Ct().readFile(t,{path:e.path,length:TNe,encoding:"utf-8"});if(n!==ua)return;if(o.isBinary||o.encoding!=="utf-8"){gn.loadError=B4("editor.binaryNotEditable");return}i1=o.etag,gn.languageId=o.languageId,R4=o.content,eg=e.line,nB+=1}catch(o){if(n!==ua)return;i1=null,gn.loadError=o instanceof Error&&o.message.length>0?o.message:B4("editor.loadFailed")}finally{n===ua&&(gn.loading=!1)}}let R4,eg,nB=0;function LNe(){if(R4===void 0)return null;const e={content:R4,line:eg,revision:nB};return R4=void 0,eg=void 0,e}function $Ne(){gn.dirty||(gn.dirty=!0,gn.savedAt=null),gn.savingError!==null&&(gn.savingError=null)}function tg(){INe(),gn.open=!1}async function NNe(){gn.path!==null&&await tB({path:gn.path})}async function ng(e){const t=ap,n=gn.path;if(!t||!n||gn.saving||gn.loading||gn.conflict)return;const o=eB.getContent;if(!o)return;const s=++ua;gn.saving=!0,gn.savingError=null;try{const i=await Ct().writeFile(t,{path:n,content:o(),...e?.force===!0||i1===null?{}:{baseEtag:i1}});if(s!==ua)return;i1=i.etag,gn.dirty=!1,gn.conflict=!1,gn.savedAt=Date.now()}catch(i){if(s!==ua)return;if(ol(i)&&i.code===ANe){gn.conflict=!0;return}gn.savingError=i instanceof Error&&i.message.length>0?i.message:B4("editor.loadFailed")}finally{gn.saving=!1}}async function zNe(){gn.conflict=!1,await ng({force:!0})}function BNe(){return oB?.()??null}let oB=null;function RNe(e){oB=e}const G9="pythinker-light",Y9="pythinker-dark";function PNe(e,t){const n=e.trim();if(/^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n))return n;if(/^#[0-9a-f]{3,4}$/i.test(n))return`#${Array.from(n.slice(1),a=>a+a).join("")}`;const o=/^rgba?\(([^)]*)\)$/i.exec(n);if(o===null)return t;const s=o[1].split(/[\s,/]+/).filter(a=>a.length>0);if(s.length<3||s.length>4)return t;const i=s.slice(0,3).map(a=>yM(a,255)),l=s.length===4?yM(s[3],1):255;return i.some(a=>a===null)||l===null?t:`#${[...i,l===255?null:l].filter(a=>a!==null).map(a=>a.toString(16).padStart(2,"0")).join("")}`}function yM(e,t){const n=e.endsWith("%"),o=Number(n?e.slice(0,-1):e);if(!Number.isFinite(o))return null;const s=n?o/100:o/t;return Math.max(0,Math.min(255,Math.round(s*255)))}function Ql(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return PNe(n.length>0?n:t,t)}function FNe(){return{bg:Ql("--p-bg","#ffffff"),surface:Ql("--color-surface","#fafbfc"),text:Ql("--color-text","#14171c"),textMuted:Ql("--color-text-muted","#6b7280"),line:Ql("--color-line","#e7eaee"),accent:Ql("--color-accent","#1783ff"),accentSoft:Ql("--p-accent-soft","#1783ff24"),selection:Ql("--p-selection","#1783ff2e"),danger:Ql("--color-danger","#c0392b"),warning:Ql("--color-warning","#a9610a"),success:Ql("--color-success","#0e7a38")}}function Fd(e){return e.slice(1,7)}function jNe(e,t){const n=FNe();e.editor.defineTheme(t?Y9:G9,{base:t?"vs-dark":"vs",inherit:!0,rules:[{token:"comment",foreground:Fd(n.textMuted),fontStyle:"italic"},{token:"string",foreground:Fd(n.success)},{token:"keyword",foreground:Fd(n.accent)},{token:"number",foreground:Fd(n.warning)},{token:"type",foreground:Fd(n.accent)}],colors:{"editor.background":n.bg,"editor.foreground":n.text,"editorLineNumber.foreground":n.textMuted,"editorLineNumber.activeForeground":n.text,"editor.selectionBackground":n.selection,"editor.lineHighlightBackground":n.surface,"editorCursor.foreground":n.accent,"editorIndentGuide.background1":n.line,"editorIndentGuide.activeBackground1":n.textMuted,"editorWidget.background":n.surface,"editorWidget.border":n.line,"editorError.foreground":n.danger,"editorWarning.foreground":n.warning,"scrollbarSlider.background":n.accentSoft,"scrollbarSlider.hoverBackground":n.accentSoft,"scrollbarSlider.activeBackground":n.accent}})}function wM(e,t){jNe(e,t),e.editor.setTheme(t?Y9:G9)}const P4=Ip();let kM=null;function ONe(){return kM??=Cs(()=>import("./editor.main-yCrGDkyO.js").then(e=>e.b),__vite__mapDeps([10,5,11])).then(e=>{wM(e,P4.value),Ke(P4,()=>wM(e,P4.value))}),kM}function HNe(){return P4.value?Y9:G9}function DNe(){return ONe()}const VNe={class:"monaco-pane"},WNe={key:0,class:"monaco-pane__boot"},qNe=Je({__name:"MonacoPane",props:{path:{},languageId:{}},setup(e){const t=V(null),n=V(!0);let o=null,s=null,i=null,l=null;function r(){window.MonacoEnvironment===void 0&&Cs(()=>import("./editor.worker-CNGv4jKH.js"),[]).then(d=>{window.MonacoEnvironment={getWorker:()=>new d.default}})}function a(d){if(d!==void 0&&new Set(["typescript","javascript","json","css","html","markdown","python","rust","go","yaml"]).has(d))return d;if(d==="typescriptreact"||d==="javascriptreact")return d.replace("react","");if(d==="shellscript")return"shell"}async function c(){if(o===null||s===null)return;const d=LNe(),f=u.path;if(f===null)return;const p=o.Uri.parse(`pythinker://session/${encodeURIComponent(f)}`),h=o.editor.getModel(p);if(l?.dispose(),l=null,i!==null&&i!==h&&i.dispose(),h===null)i=o.editor.createModel(d?.content??"",a(u.languageId),p);else{i=h,d!==null&&i.setValue(d.content);const m=a(u.languageId);m!==void 0&&o.editor.setModelLanguage(i,m)}l=i.onDidChangeContent(()=>$Ne()),s.setModel(i),vM(()=>i?.getValue()??""),d?.line!==void 0&&d.line>0&&(s.revealLineInCenter(d.line),s.setPosition({lineNumber:d.line,column:1}))}In(async()=>{r(),await DNe(),t.value!==null&&(o=await Cs(()=>import("./editor.main-yCrGDkyO.js").then(d=>d.b),__vite__mapDeps([10,5,11])),t.value!==null&&(s=o.editor.create(t.value,{model:null,theme:HNe(),automaticLayout:!0,fontSize:12.5,fontFamily:'"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace',minimap:{enabled:!1},scrollBeyondLastLine:!1,renderLineHighlight:"line",padding:{top:8}}),n.value=!1,await c()))}),En(()=>{vM(null),l?.dispose(),i?.dispose(),s?.dispose(),i=null,l=null,s=null,o=null});const u=e;return Ke(()=>[u.path,u.languageId],async()=>{s!==null&&await c()}),(d,f)=>(g(),S("div",VNe,[n.value?(g(),S("div",WNe,[W(Zo,{size:"sm"})])):Y("",!0),b("div",{ref_key:"rootRef",ref:t,class:"monaco-pane__host"},null,512)]))}}),UNe=vt(qNe,[["__scopeId","data-v-cb5f64f3"]]),ZNe={class:"editor-panel"},KNe={class:"ed-path"},GNe={key:1,class:"ed-saved"},YNe={key:1,class:"ed-saving"},XNe={key:0,class:"editor-panel__empty"},JNe={class:"editor-panel__conflict-actions"},QNe={key:1,class:"editor-panel__save-error"},eze=Je({__name:"EditorPanel",emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=ENe(),s=t;function i(){tg(),s("close")}function l(c){const u=c.split("/").at(-1)??c;return u.length>0?u:c}const r=B(()=>o.savedAt===null||o.dirty?!1:Date.now()-o.savedAt<2e3);function a(c){(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()==="s"&&(c.preventDefault(),ng())}return window.addEventListener("keydown",a),En(()=>window.removeEventListener("keydown",a)),Ke(()=>o.open,c=>{c||s("close")}),(c,u)=>(g(),S("div",ZNe,[W(Ca,{wrap:"",title:v(n)("editor.title"),closable:"","close-label":v(n)("editor.closeEditor"),onClose:i},{default:ae(()=>[v(o).path!==null?(g(),S(Ce,{key:0},[W(Cn,{text:v(o).path},{default:ae(()=>[b("span",KNe,I(l(v(o).path)),1)]),_:1},8,["text"]),v(o).dirty?(g(),ue(Cn,{key:0,text:v(n)("editor.unsavedDot")},{default:ae(()=>[...u[3]||(u[3]=[b("span",{class:"ed-dirty"},null,-1)])]),_:1},8,["text"])):Y("",!0),r.value?(g(),S("span",GNe,I(v(n)("editor.saved")),1)):Y("",!0)],64)):Y("",!0),v(o).path!==null&&v(o).loadError===null?(g(),S(Ce,{key:1},[v(o).conflict?Y("",!0):(g(),ue(Dt,{key:0,size:"sm",label:v(n)("editor.save"),disabled:!v(o).dirty||v(o).saving,onClick:u[0]||(u[0]=d=>v(ng)())},{default:ae(()=>[W(Ee,{name:"check",size:"sm"})]),_:1},8,["label","disabled"])),v(o).saving?(g(),S("span",YNe,[W(Zo,{size:"sm"})])):Y("",!0)],64)):Y("",!0)]),_:1},8,["title","close-label"]),v(o).loadError!==null?(g(),S("div",XNe,[W(jg,null,{default:ae(()=>[b("span",null,I(v(o).loadError),1),W(Nt,{variant:"secondary",size:"sm",onClick:i},{default:ae(()=>[He(I(v(n)("filePreview.close")),1)]),_:1})]),_:1})])):(g(),S(Ce,{key:1},[v(o).conflict?(g(),ue(K9,{key:0,variant:"warning",class:"editor-panel__conflict"},{default:ae(()=>[b("span",null,I(v(n)("editor.conflictText")),1),b("span",JNe,[W(Nt,{variant:"secondary",size:"sm",onClick:u[1]||(u[1]=d=>v(NNe)())},{default:ae(()=>[He(I(v(n)("editor.conflictReload")),1)]),_:1}),W(Nt,{variant:"danger",size:"sm",disabled:v(o).saving,onClick:u[2]||(u[2]=d=>v(zNe)())},{default:ae(()=>[He(I(v(n)("editor.conflictOverwrite")),1)]),_:1},8,["disabled"])])]),_:1})):Y("",!0),v(o).savingError!==null?(g(),S("p",QNe,I(v(o).savingError),1)):Y("",!0),v(o).path!==null?(g(),ue(UNe,{key:2,path:v(o).path,"language-id":v(o).languageId},null,8,["path","language-id"])):Y("",!0)],64))]))}}),tze=vt(eze,[["__scopeId","data-v-579cb4a1"]]),nze={class:"tp"},oze=Je({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);return Ke(()=>n.text,()=>{const l=i.value;!l||!(l.scrollHeight-l.scrollTop-l.clientHeight<24)||yt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(l,r)=>(g(),S("div",nze,[W(Ca,{title:v(s)("common.preview"),subtitle:e.subtitle??v(s)("thinking.panelTitle"),"close-label":v(s)("thinking.close"),onClose:r[0]||(r[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),b("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},I(e.text),513)]))}}),sze=vt(oze,[["__scopeId","data-v-e1ad626c"]]),ize={class:"agent-panel"},lze={key:0,class:"agent-meta"},rze={class:"agent-meta-text"},aze={key:1,class:"agent-prompt"},cze={class:"agent-prompt-bubble"},uze=["aria-expanded"],dze={class:"agent-transcript-inner"},fze={key:0,class:"agent-fallback"},pze={key:0,class:"agent-error"},hze={key:1,class:"fallback-lines"},mze=Je({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=r6(),l=B(()=>i.value?"lg":"sm"),r=V(null),a=V(null),c=V(!0),u=V(!1);let d=null,f=0;const p=B(()=>{const M=new Set,R=[],O=n.member.prompt?.trim(),U=O?`$ ${O}`:void 0;for(const Z of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` +`)}function w(){o.planArmed||o.planMode||(o.goalMode&&i("toggleGoal"),i("togglePlan"))}function _(){if(no.value){i("focusGoal");return}o.goalMode||((o.planArmed||o.planMode)&&i("togglePlan"),i("toggleGoal"))}const A=V(!1);function P(){A.value=!A.value,yt(()=>{d(),I(),u.value?.focus()})}function z(){A.value&&(A.value=!1,yt(d))}function L(Me){if(typeof getComputedStyle>"u")return fM;const it=Number.parseFloat(getComputedStyle(Me).minHeight);return Number.isFinite(it)&&it>0?it:fM}const T=V(!1);function I(){const Me=u.value;T.value=!!Me&&Me.scrollHeight>L(Me)}Ke(c,()=>{yt(I)}),Ke(()=>o.sessionId,()=>{A.value=!1,C.value=!1,R.value=!1,h.value=[]});const N=bbe({text:c,textareaRef:u,autosize:d,sessionId:()=>o.sessionId}),{open:C,items:F,active:H,update:D,select:M}=_be({text:c,textareaRef:u,autosize:d,skills:()=>o.skills,emitCommand:Me=>{if(Me==="/plan"){w();return}if(Me==="/goal"){_();return}i("command",Me)},historyPush:Me=>N.push(Me),clearDraft:p}),{open:R,items:O,active:U,loading:Z,stale:q,update:te,select:ee,close:J,getMentionToken:se}=xbe({text:c,textareaRef:u,autosize:d,searchFiles:()=>o.searchFiles}),Q=V(null),me=V(null),xe=V(null);function Ye(Me){u.value?.setSelectionRange(Me,Me)}const at=B({get:()=>c.value.startsWith("/")?c.value.slice(1):c.value,set:Me=>{c.value=`/${Me}`,yt(()=>{Ye(c.value.length),D()})}}),X=B({get:()=>{const Me=xe.value;return Me?c.value.slice(Me.start+1,Me.end):""},set:Me=>{const it=xe.value;if(!it)return;c.value=`${c.value.slice(0,it.start)}@${Me}${c.value.slice(it.end)}`;const ft=it.start+Me.length+1;xe.value={start:it.start,end:ft},yt(()=>{Ye(ft),te()})}});Ke([C,a],async([Me,it])=>{!Me||!it||(await yt(),Q.value?.focus())}),Ke([R,a],async([Me,it])=>{!Me||!it||(xe.value=se(),await yt(),me.value?.focus())});function oe(){C.value=!1,u.value?.focus()}function j(Me){Me||oe()}function K(){J(),xe.value=null,u.value?.focus()}function he(Me){Me||K()}function ye(){N.resetBrowsing(),D(),te()}const{attachments:ve,previewAttachment:ie,fileInputRef:de,isDragOver:be,removeAttachment:Se,openAttachmentPreview:je,closeAttachmentPreview:et,openFilePicker:le,handleFileInputChange:fe,handleDragOver:ge,handleDragLeave:Oe,handleDrop:Fe,clearAfterSubmit:pt,loadAttachments:kt}=Cbe({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId});function qt(){const Me=ve.value.map(it=>it.localId);for(const it of Me)Se(it)}const nn=B(()=>ve.value.filter(Me=>Me.kind!=="file")),Jt=B(()=>ve.value.filter(Me=>Me.kind==="file")),kn=V(null),Dn=V(null),xn=V(!1);let $n=null;function Hn(){const Me=kn.value;xn.value=Me!==null&&Me.scrollHeight>Me.clientHeight+1}Ke(kn,Me=>{$n?.disconnect(),$n=null,Me&&typeof ResizeObserver=="function"&&($n=new ResizeObserver(Hn),$n.observe(Me)),Hn()},{immediate:!0}),Ke(ve,()=>void yt(Hn),{deep:!0}),Ke(()=>[nn.value.length,Jt.value.length],([Me,it],[ft,yn])=>{Me<=ft&&it<=yn||yt(()=>{const Yt=kn.value;Yt&&(Yt.scrollTop=Me>ft&&Dn.value?Dn.value.offsetHeight-Yt.clientHeight:Yt.scrollHeight)})}),In(()=>{c.value&&yt(()=>{d(),I()})}),En(()=>{document.removeEventListener("click",oi,!0),$n?.disconnect(),ne?.disconnect(),Wo?.disconnect(),hs()});function bn(){u.value?.focus({preventScroll:!0})}function Wn(Me){kt(Me)}const Pn=B(()=>C.value||R.value||Ft.value||Ut.value||en.value||es.value),Mn=B(()=>c.value.trim().length===0&&ve.value.length===0&&h.value.length===0);t({loadForEdit:f,loadAttachmentsForEdit:Wn,insertQuote:k,focus:bn,anyPopupOpen:Pn,isEmpty:Mn});const Nn=V(null);let An=null;function Qn(Me){Nn.value=l("composer.noArgCommand",{cmd:Me}),An!==null&&clearTimeout(An),An=setTimeout(()=>{Nn.value=null,An=null},3e3)}En(()=>{An!==null&&clearTimeout(An)});function Fn(Me){return{fileId:Me.fileId,kind:Me.kind,name:Me.name,mediaType:Me.mediaType,size:Me.size}}function Qt(Me){if(Me.kind==="file"){Me.fileId!==void 0&&HN(Me.fileId,Me.name,Me.mediaType);return}je(Me)}function uo(){const Me=c.value.trim(),it=y(Me);if(ve.value.some(Yt=>Yt.uploading))return;const ft=ve.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!it&&ft.length===0)return;if(h.value.length===0&&Me==="/plan"){N.push(Me),c.value="",p(),C.value=!1,z(),w();return}if(h.value.length===0&&Me==="/goal"){N.push(Me),c.value="",p(),C.value=!1,z(),_();return}if(h.value.length===0&&Me){const Yt=pbe(Me),li=Yt?YN(o.skills).find(vi=>vi.name===Yt.cmd||vi.name===`/${Y5}${Yt.cmd.slice(1)}`):void 0;if(Yt&&li){if(Yt.arg.trim()&&li.acceptsInput!==!0){Qn(Yt.cmd);return}N.push(Me),c.value="",p(),C.value=!1,z(),i("command",Yt.arg?`${Yt.cmd} ${Yt.arg}`:Yt.cmd);return}}Me&&N.push(Me);const yn={text:it,attachments:ft.map(Yt=>Fn(Yt))};ie.value=null,pt(),c.value="",h.value=[],p(),C.value=!1,R.value=!1,z(),i("submit",yn)}function Zn(){if(!o.running||ve.value.some(Yt=>Yt.uploading))return;const Me=c.value.trim(),it=y(Me),ft=ve.value.filter(Yt=>!Yt.uploading&&!Yt.error&&Yt.fileId);if(!it&&ft.length===0&&o.queued.length===0)return;const yn={text:it,attachments:ft.map(Yt=>Fn(Yt))};pt(),Me&&N.push(Me),c.value="",h.value=[],p(),C.value=!1,R.value=!1,z(),i("steer",yn)}let Bo=!1,Un=null;function hs(){Un!==null&&(clearTimeout(Un),Un=null)}function Io(){hs(),Bo=!0}function Rt(){hs(),Un=setTimeout(()=>{Un=null,Bo=!1},0)}function Jo(Me){return Bo||Me.isComposing||Me.keyCode===229}function Ls(Me){if(!Jo(Me)){if(Vo.value&&Me.key==="Backspace"&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const it=u.value;if(it&&it.selectionStart===0&&it.selectionEnd===0){Me.preventDefault(),zi();return}}if(Me.key==="Escape"){if(es.value){Me.preventDefault(),Ne();return}if(Ft.value){Me.preventDefault(),Xn();return}if(Ut.value){Me.preventDefault(),Po();return}if(en.value){Me.preventDefault(),Us();return}}if(C.value){if(Me.key==="Escape"){Me.preventDefault(),C.value=!1;return}if(Me.key==="Tab"&&F.value.length===0){C.value=!1;return}if(Me.key==="ArrowDown"){Me.preventDefault(),H.value=(H.value+1)%F.value.length;return}if(Me.key==="ArrowUp"){Me.preventDefault(),H.value=(H.value-1+F.value.length)%F.value.length;return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const it=F.value[H.value];it&&M(it);return}}if(R.value&&!Z.value){if(Me.key==="ArrowDown"){Me.preventDefault(),U.value=(U.value+1)%Math.max(1,O.value.length);return}if(Me.key==="ArrowUp"){Me.preventDefault(),U.value=(U.value-1+Math.max(1,O.value.length))%Math.max(1,O.value.length);return}if(Me.key==="Enter"||Me.key==="Tab"){Me.preventDefault();const it=O.value[U.value];it&&ee(it);return}if(Me.key==="Escape"){Me.preventDefault(),R.value=!1;return}}if(Me.key==="s"&&(Me.ctrlKey||Me.metaKey)&&!Me.shiftKey&&!Me.altKey){o.running&&(Me.preventDefault(),Zn());return}if(!A.value&&!C.value&&!R.value&&!Me.shiftKey&&!Me.altKey&&!Me.metaKey&&!Me.ctrlKey){const it=N.isBrowsing();if(Me.key==="ArrowUp"&&N.hasHistory()&&(it||N.caretAtTextStart())){Me.preventDefault(),N.recallOlder(),C.value=!1;return}if(Me.key==="ArrowDown"&&it){Me.preventDefault(),N.recallNewer(),C.value=!1;return}}if(Me.key==="Enter"&&!Me.shiftKey){if(A.value&&!(Me.metaKey||Me.ctrlKey))return;Me.preventDefault(),uo()}}}const $e=B(()=>l("composer.send")),Ge=B(()=>!!o.uploadImage),ot=B(()=>!ve.value.some(Me=>Me.uploading)&&(c.value.trim()!==""||h.value.length>0||ve.value.some(Me=>!Me.error&&Me.fileId))),dt=B(()=>{if(C.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),Mt=B(()=>{if(C.value&&F.value.length>0)return`composer-slash-option-${H.value}`;if(R.value&&O.value.length>0)return`composer-mention-option-${U.value}`}),Ft=V(!1),Ut=V(!1),en=V(!1),tn=V(null),eo=V(null),Ro=V(null),$s=V(null),Do=V(null),We=V(null),st=V(null),Xe=V(null);ca(We),ca(st),ca(Xe);const qe=V(""),Pe=V(""),bt=V(""),Lt=V(""),cn=V(!1);function So(){Ft.value=!Ft.value,Ft.value&&(vl(),Ut.value=!1,en.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Qo(){Ni.value||(Ut.value=!Ut.value,Ut.value&&(Zs(),Ft.value=!1,en.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0)))}function Po(){Ut.value=!1,mi()}function Xn(){Ft.value=!1,mi()}function pn(){en.value=!en.value,en.value&&(ql(),Ft.value=!1,Ut.value=!1,Ne(),C.value=!1,R.value=!1,document.addEventListener("click",oi,!0))}function Us(){en.value=!1,mi()}function mi(){!Ft.value&&!Ut.value&&!en.value&&!es.value&&document.removeEventListener("click",oi,!0)}function oi(Me){const it=Me.target;tn.value?.contains(it)||Hs.value?.contains(it)||vs.value?.contains(it)||(Xn(),Po(),Us(),Ne())}function ql(){const Me=eo.value,it=tn.value;qe.value=Me&&it?`${Math.round(Me.getBoundingClientRect().left-it.getBoundingClientRect().left)}px`:""}function vl(){const Me=Ro.value,it=tn.value;Pe.value=Me&&it?`${Math.round(it.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}function Zs(){const Me=$s.value,it=tn.value;bt.value=Me&&it?`${Math.round(it.getBoundingClientRect().right-Me.getBoundingClientRect().right)}px`:""}const yo=B(()=>{const Me=o.status?.ctxMax??0;return Me<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/Me*100)))}),Lo=B(()=>{const Me=ba(o.status?.ctxUsed??0),it=ba(o.status?.ctxMax??0);return l("status.ctxTooltip",{used:Me,max:it,pct:yo.value})}),yl=B(()=>yo.value>=80),ms=B(()=>o.models?.find(Me=>Me.id===o.status?.modelId)),wl=B(()=>i6(ms.value)),gi=B(()=>l6(ms.value)),si=B(()=>k9(ms.value,o.thinking)),Ul=B(()=>gi.value.includes(si.value)?si.value:""),Ni=B(()=>wl.value==="unsupported"||gi.value.length<=1),Ae=B(()=>{const Me=(ms.value?.supportEfforts?.length??0)>0,it=si.value;return Me&&it!=="on"&&it!=="off"?rf(it):lt(it)}),Ie=B(()=>l("composer.thinkingControl",{level:Ae.value}));function At(Me){Ni.value||(i("setThinking",JN(ms.value,Me)),Po())}function lt(Me){return Me==="on"?l("status.thinkingOn"):Me==="off"?l("status.thinkingOff"):rf(Me)}const mn=B(()=>gi.value.map(Me=>({value:Me,label:lt(Me)}))),Kn=B(()=>o.planArmed===!0||o.planMode===!0),to=B(()=>o.workflowActive===!0),Co=B(()=>o.goal?.status??o.activationBadges?.goal?.status??null),no=B(()=>Co.value!==null&&Co.value!=="complete"),Vo=B(()=>o.goalMode?"goal":o.planArmed?"plan":null),Qi=V(null),Os=V(""),Ta=B(()=>Os.value?{textIndent:Os.value}:void 0);let Wo=null;function zi(){Vo.value==="goal"?i("toggleGoal"):Vo.value==="plan"&&i("togglePlan")}function gs(){const Me=Qi.value;Os.value=Me?`calc(${Me.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ke(Vo,async Me=>{if(Wo?.disconnect(),Wo=null,!Me){Os.value="";return}await yt(),gs(),typeof ResizeObserver=="function"&&Qi.value&&(Wo=new ResizeObserver(gs),Wo.observe(Qi.value))},{immediate:!0});const kl=V(null),es=V(!1),Hs=V(null),vs=V(null);ca(Hs),ca(vs);const bl=V(null),Ks=V(null);let ne=null;const ke=B(()=>{const Me=[];return Ge.value&&Me.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Vt}),a.value&&Me.push({id:"slash",icon:"terminal",nameKey:"composer.addSlash",descKey:"composer.addSlashDesc",action:Wt},{id:"mention",icon:"link",nameKey:"composer.addMention",descKey:"composer.addMentionDesc",action:on}),Me.push({id:"capabilities",icon:"sliders",nameKey:"capabilityMenu.trigger",action:Vn},{id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:Ht},{id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:Tn},{id:"workflow",icon:"sparkles",nameKey:"status.dynamicWorkflowLabel",descKey:"composer.addWorkflowDesc",action:zn}),Me});function Te(){const Me=bl.value;if(!Me||Me.scrollHeight<=Me.clientHeight+1){Ks.value=null;return}const it=getComputedStyle(Me),ft=Number.parseFloat(it.getPropertyValue("--menu-scrollbar-track-inset"))||0,yn=Number.parseFloat(it.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Yt=Me.clientHeight-ft*2,li=Math.max(yn,Me.clientHeight/Me.scrollHeight*Yt),vi=Me.scrollHeight-Me.clientHeight;Ks.value={top:Me.offsetTop+ft+Me.scrollTop/vi*(Yt-li),height:li}}Ke(es,async Me=>{ne?.disconnect(),ne=null,Ks.value=null,Me&&(await yt(),Te(),typeof ResizeObserver=="function"&&bl.value&&(ne=new ResizeObserver(Te),ne.observe(bl.value)))});function Ne(){es.value=!1,mi()}function Qe(Me){Me||Ne()}function ht(){if(es.value){Ne();return}Xn(),Po(),Us(),C.value=!1,R.value=!1,es.value=!0,document.addEventListener("click",oi,!0),yt(()=>{(a.value?vs.value:Hs.value)?.querySelector(".am-row")?.focus()})}function jt(Me){Me.action(),a.value&&Me.id==="files"||u.value?.focus()}function Zt(Me){if(Me.key==="Escape"){Me.preventDefault(),Ne(),u.value?.focus();return}if(Me.key==="Tab"){Ne();return}if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;Me.preventDefault();const it=a.value?vs.value:Hs.value,ft=Array.from(it?.querySelectorAll(".am-row")??[]);if(ft.length===0)return;const yn=ft.indexOf(document.activeElement),Yt=Me.key==="ArrowDown"?(yn+1)%ft.length:(yn-1+ft.length)%ft.length;ft[Yt]?.focus()}function Vt(){Ne(),le()}function Wt(){Ne(),c.value="/",yt(()=>{Ye(1),D()})}function on(){Ne(),c.value="@",yt(()=>{Ye(1),te()})}function Vn(){Ne(),kl.value?.toggleOpen()}function Ht(){Ne(),o.goalMode||_()}function Tn(){Ne(),Kn.value||w()}function zn(){Ne(),to.value||i("toggleWorkflow")}const Ns=[{mode:"manual",icon:"fingerprint",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],rs=V(null),_l=V("");function X0(Me){const it={};return Me&&(it["--composer-menu-desc-width"]=Me),it}const J0=B(()=>{const Me=X0(_l.value);return qe.value&&(Me.left=qe.value),Me}),qu=B(()=>{const Me={};return Pe.value&&(Me.right=Pe.value),Lt.value&&(Me.maxHeight=Lt.value),Me}),hr=B(()=>{const Me={};return bt.value&&(Me.right=bt.value),Me});let ts=null;function Fr(Me){const it=Number.parseFloat(Me);return Number.isFinite(it)?it:0}function Uu(Me){return`${Me.fontStyle||"normal"} ${Me.fontWeight||"400"} ${Me.fontSize} ${Me.fontFamily}`}function Q0(Me){return Me.letterSpacing==="normal"?0:Fr(Me.letterSpacing)}function jr(Me,it){if(!Me)return 0;const ft=Hke(Me,Uu(it),{letterSpacing:Q0(it)});return Dke(ft)}function P1(){const Me=rs.value?.querySelector(".pd-desc");if(!Me)return;const it=getComputedStyle(Me),ft=Math.max(0,...Ns.map(yn=>jr(l(yn.descKey),it)));_l.value=ft>0?`${Math.ceil(ft)}px`:""}function F1(){typeof window>"u"||(ts!==null&&window.cancelAnimationFrame(ts),yt(()=>{ts=window.requestAnimationFrame(()=>{ts=null,P1()})}))}Ke(r,F1,{immediate:!0}),In(()=>{F1(),document.fonts?.ready.then(F1)}),En(()=>{ts!==null&&(window.cancelAnimationFrame(ts),ts=null)});function Re(Me){i("setPermission",Me),Us()}const pe=B(()=>Ns.find(Me=>Me.mode===o.status?.permission)),Le=B(()=>pe.value?l(pe.value.labelKey):""),Sn=B(()=>pe.value?.icon??"fingerprint"),ii=V(!1),el=V(!1),Ea=V(!1),Or=V(!1);let Hr=0,ec=0,j1=0,tc=0;const Zu=V(null);let O1=null;function Ku(Me,it,ft){const yn=Me.getPropertyValue(it).trim(),Yt=Number.parseFloat(yn);return Number.isFinite(Yt)?yn.endsWith("em")?Yt*Number.parseFloat(Me.fontSize):Yt:ft}function xl(Me){return Me.scrollWidth>Me.clientWidth+1||Me.clientWidth===0&&(Me.textContent?.length??0)>0}function zf(Me){const it=Me.getBoundingClientRect().left;for(const ft of Me.querySelectorAll(".compact-chip, .ctx-group, .model-pill, .stop, .send")){const yn=ft.getBoundingClientRect();if(yn.width>0&&yn.lefttc+yn&&(Or.value=!1,yt(Sl));return}if(Ea.value){if(Yt>j1+yn){Ea.value=!1,yt(Sl);return}li&&zf(li)&&(tc=Yt,Or.value=!0,yt(Sl));return}if(el.value){if(Yt>ec+yn){el.value=!1,yt(Sl);return}li&&zf(li)&&(yl.value?(j1=Yt,Ea.value=!0):(tc=Yt,Or.value=!0),yt(Sl));return}if(ii.value&&Yt>Hr+yn){ii.value=!1,yt(Sl);return}const vi=Do.value;!vi||!xl(vi)||vi.getBoundingClientRect().width>=ft||(ii.value?(ec=Yt,el.value=!0):(Hr=Yt,ii.value=!0),yt(Sl))}In(()=>{typeof ResizeObserver=="function"&&tn.value&&(O1=new ResizeObserver(Sl),O1.observe(tn.value)),document.fonts?.ready.then(Sl)}),Ke([Le,to,yl,Ae,()=>o.status?.model,()=>o.working,r],()=>{ii.value=!1,el.value=!1,Ea.value=!1,Or.value=!1,yt(Sl)}),En(()=>{O1?.disconnect(),O1=null});const H1=B(()=>ms.value?.provider??""),nc=B(()=>!H1.value||!o.models?.length?[]:o.models.filter(Me=>Me.provider===H1.value)),Zl=B(()=>new Set(o.starredIds??[]));function ys(Me){return Zl.value.has(Me)}const Dr=B(()=>o.models?.length?o.models.filter(Me=>ys(Me.id)&&Me.provider!==H1.value):[]);function Cl(){const Me=We.value,it=tn.value;if(!Me||!it)return;const ft=getComputedStyle(Me),yn=Fr(ft.getPropertyValue("--space-1"))||4,Yt=Fr(ft.getPropertyValue("--space-2"))||8,li=window.visualViewport,vi=li?.offsetTop??0,yi=vi+(li?.height??window.innerHeight),V1=it.getBoundingClientRect(),Ia=V1.top-vi-yn-Yt,Gu=yi-V1.bottom-yn-Yt;Me.offsetHeight>Ia&&Gu>Ia?(cn.value=!0,Lt.value=`${Math.max(Math.floor(Gu),0)}px`):(cn.value=!1,Lt.value=`${Math.max(Math.floor(Ia),0)}px`)}function Bi(){Xn()}function mr(){window.addEventListener("resize",Bi),window.visualViewport?.addEventListener("resize",Bi),window.visualViewport?.addEventListener("scroll",Bi)}function D1(){window.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("resize",Bi),window.visualViewport?.removeEventListener("scroll",Bi)}Ke(Ft,async Me=>{if(!Me){D1();return}mr(),cn.value=!1,Lt.value="",await yt(),Cl(),(We.value?.querySelector(".md-row.is-current")??We.value?.querySelector(".md-row"))?.focus()}),En(D1);function Kl(Me){if(Me.key!=="ArrowDown"&&Me.key!=="ArrowUp")return;const it=Array.from(We.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(it.length===0)return;Me.preventDefault();const ft=it.indexOf(document.activeElement),yn=Me.key==="ArrowDown"?(ft+1)%it.length:(ft-1+it.length)%it.length;it[yn]?.focus()}function Gl(Me){i("selectModel",Me),Xn()}return(Me,it)=>(g(),S("div",{class:Be(["composer",{"drag-over":v(be),expanded:A.value}]),onDragover:it[27]||(it[27]=(...ft)=>v(ge)&&v(ge)(...ft)),onDragleave:it[28]||(it[28]=(...ft)=>v(Oe)&&v(Oe)(...ft)),onDrop:it[29]||(it[29]=(...ft)=>v(Fe)&&v(Fe)(...ft))},[v(ie)?(g(),S("div",{key:0,class:"att-lightbox",onClick:it[1]||(it[1]=xt((...ft)=>v(et)&&v(et)(...ft),["self"]))},[b("div",bAe,[W(Cn,{text:v(l)("model.close")},{default:ae(()=>[b("button",{type:"button",class:"att-lightbox-close",onClick:it[0]||(it[0]=(...ft)=>v(et)&&v(et)(...ft))},"✕")]),_:1},8,["text"]),v(ie).kind==="video"?(g(),S("video",{key:0,class:"att-lightbox-media",src:v(ie).previewUrl,controls:"",playsinline:""},null,8,_Ae)):(g(),S("img",{key:1,class:"att-lightbox-media",src:v(ie).previewUrl,alt:v(ie).name},null,8,xAe)),b("div",SAe,E(v(ie).name),1)])])):Y("",!0),b("div",{class:Be(["composer-card",{"labels-collapsed":ii.value}])},[h.value.length>0?(g(),S("div",{key:0,class:"quote-strip","aria-label":v(l)("selection.quoteLabel")},[(g(!0),S(Ce,null,rt(h.value,ft=>(g(),S("div",{key:ft.id,class:"quote-chip"},[b("span",MAe,[ft.source?(g(),S("span",AAe,E(ft.source),1)):Y("",!0),b("span",TAe,E(ft.text),1),ft.comment?(g(),S("span",EAe,E(ft.comment),1)):Y("",!0)]),W(Dt,{size:"sm",label:v(l)("composer.removeNamed",{name:ft.text}),onClick:yn=>x(ft.id)},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])]))),128))],8,CAe)):Y("",!0),v(ve).length>0?(g(),S("div",IAe,[b("div",{ref_key:"attachmentScrollRef",ref:kn,class:Be(["att-scroll",{"is-overflowing":xn.value}])},[b("div",LAe,[nn.value.length>0?(g(),S("div",{key:0,ref_key:"attachmentMediaRowRef",ref:Dn,class:"att-row att-row-media"},[(g(!0),S(Ce,null,rt(nn.value,ft=>(g(),ue(F7,{key:ft.localId,kind:ft.kind,name:ft.name,url:ft.previewUrl,"file-id":ft.fileId,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["kind","name","url","file-id","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):Y("",!0),Jt.value.length>0?(g(),S("div",$Ae,[(g(!0),S(Ce,null,rt(Jt.value,ft=>(g(),ue(F7,{key:ft.localId,kind:"file",name:ft.name,"media-type":ft.mediaType,size:ft.size,uploading:ft.uploading,error:ft.error,removable:"","remove-label":v(l)("composer.removeNamed",{name:ft.name}),onActivate:yn=>Qt(ft),onRemove:yn=>v(Se)(ft.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):Y("",!0)])],2),xn.value?(g(),S("span",NAe,E(v(l)("composer.attachmentCount",{n:v(ve).length})),1)):Y("",!0),v(ve).length>=2?(g(),ue(Cn,{key:1,text:v(l)("composer.clearAll")},{default:ae(()=>[W(Dt,{class:"att-clear",size:"sm",label:v(l)("composer.clearAll"),onClick:qt},{default:ae(()=>[W(Ee,{name:"trash"})]),_:1},8,["label"])]),_:1},8,["text"])):Y("",!0)])):Y("",!0),b("div",zAe,[v(C)&&!v(a)?(g(),ue(WC,{key:0,id:"composer-slash-menu",items:v(F),"active-index":v(H),onSelect:v(M),onHover:it[2]||(it[2]=ft=>H.value=ft)},null,8,["items","active-index","onSelect"])):Y("",!0),v(R)&&!v(a)?(g(),ue(qC,{key:1,id:"composer-mention-menu",items:v(O),"active-index":v(U),loading:v(Z),stale:v(q),onSelect:v(ee),onHover:it[3]||(it[3]=ft=>U.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[es.value&&!v(a)?(g(),S("div",{key:0,ref_key:"modesMenuRef",ref:Hs,class:"add-menu",onClick:it[5]||(it[5]=xt(()=>{},["stop"])),onKeydown:Zt},[b("div",{ref_key:"addMenuScrollRef",ref:bl,class:"am-scroll",role:"menu",onScroll:Te},[(g(!0),S(Ce,null,rt(ke.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:it[4]||(it[4]=xt(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",RAe,[W(Ee,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",PAe,E(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",FAe,E(v(l)(ft.descKey)),1)):Y("",!0)],40,BAe))),128))],544),Ks.value?(g(),S("div",{key:0,class:"scroll-thumb",style:Gt({top:`${Ks.value.top}px`,height:`${Ks.value.height}px`})},null,4)):Y("",!0)],544)):Y("",!0)]),_:1}),b("div",jAe,[Vo.value?(g(),S("span",{key:0,ref_key:"workModePillRef",ref:Qi,class:"wm-pill"},[W(Ee,{name:Vo.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),b("span",null,E(Vo.value==="goal"?v(l)("status.goalLabel"):v(l)("status.planLabel")),1),W(Dt,{class:"wm-x",size:"sm",label:v(l)("status.workModeDismiss"),onMousedown:it[6]||(it[6]=xt(()=>{},["prevent"])),onClick:zi},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],512)):Y("",!0),Jn(b("textarea",{ref_key:"textareaRef",ref:u,"onUpdate:modelValue":it[7]||(it[7]=ft=>ps(c)?c.value=ft:null),class:"ph",style:Gt(Ta.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!dt.value,"aria-controls":dt.value,"aria-activedescendant":Mt.value,onKeydown:Ls,onCompositionstart:Io,onCompositionend:Rt,onInput:ye,onBlur:it[8]||(it[8]=ft=>{v(a)||(C.value=!1,R.value=!1)})},null,44,OAe),[[js,v(c)]]),W(Cn,{text:A.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle")},{default:ae(()=>[A.value||T.value?(g(),S("button",{key:0,class:"expand-btn",type:"button","aria-label":A.value?v(l)("composer.collapseTitle"):v(l)("composer.expandTitle"),onClick:P},[A.value?(g(),ue(Ee,{key:0,name:"collapse",size:"sm"})):(g(),ue(Ee,{key:1,name:"expand",size:"sm"}))],8,HAe)):Y("",!0)]),_:1},8,["text"])])]),Ge.value?(g(),S("input",{key:2,ref_key:"fileInputRef",ref:de,type:"file",multiple:"",class:"file-input-hidden",onChange:it[9]||(it[9]=(...ft)=>v(fe)&&v(fe)(...ft))},null,544)):Y("",!0),b("div",{ref_key:"toolbarRef",ref:tn,class:"toolbar"},[b("div",{ref_key:"menuMeasureRef",ref:rs,class:"menu-measure","aria-hidden":"true"},[...it[30]||(it[30]=[b("span",{class:"pd-desc"},null,-1)])],512),b("div",DAe,[W(Dt,{size:"md",class:"composer-attach",label:v(l)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":es.value,onMousedown:it[10]||(it[10]=xt(()=>{},["prevent"])),onClick:xt(ht,["stop"])},{default:ae(()=>[W(Ee,{name:"plus"})]),_:1},8,["label","aria-expanded"]),W(aAe,{ref_key:"capMenuRef",ref:kl,"session-id":e.sessionId,triggerless:""},null,8,["session-id"]),e.status?(g(),S("span",{key:0,ref_key:"permissionPillRef",ref:eo,class:Be(["perm-pill",["perm-"+e.status.permission,{open:en.value}]]),role:"button",tabindex:"0","aria-label":Le.value,onClick:xt(pn,["stop"]),onKeydown:[go(pn,["enter"]),go(xt(pn,["prevent"]),["space"])]},[W(Ee,{class:"perm-pill-icon",name:Sn.value,size:"md"},null,8,["name"]),b("span",WAe,E(Le.value),1)],42,VAe)):Y("",!0),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[en.value&&e.status?(g(),S("div",{key:0,ref_key:"permDropdownRef",ref:Xe,class:"perm-dropdown",style:Gt(J0.value),role:"menu",onClick:it[11]||(it[11]=xt(()=>{},["stop"]))},[(g(),S(Ce,null,rt(Ns,ft=>b("button",{key:ft.mode,class:Be(["pd-row",{"is-current":ft.mode===e.status.permission}]),role:"menuitem",onClick:yn=>Re(ft.mode)},[b("span",{class:"pd-icon",style:Gt({color:ft.color})},[W(Ee,{name:ft.icon,size:"md"},null,8,["name"])],4),b("span",UAe,[b("span",{class:"pd-name",style:Gt({color:ft.color})},E(v(l)(ft.labelKey)),5),b("span",ZAe,E(v(l)(ft.descKey)),1)]),b("span",KAe,[ft.mode===e.status.permission?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)])],10,qAe)),64))],4)):Y("",!0)]),_:1}),to.value?(g(),S("span",GAe,[W(Ee,{class:"workflow-ic",name:"sparkles",size:"md"}),b("span",YAe,E(v(l)("status.dynamicWorkflowLabel")),1),W(Dt,{class:"workflow-x",size:"sm",label:v(l)("status.dynamicWorkflowDismiss"),onMousedown:it[12]||(it[12]=xt(()=>{},["prevent"])),onClick:it[13]||(it[13]=xt(ft=>i("toggleWorkflow"),["stop"]))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])])):Y("",!0)]),b("div",{ref_key:"toolbarRightRef",ref:Zu,class:"toolbar-right"},[yl.value?(g(),S("button",{key:0,class:Be(["compact-chip",{gone:Ea.value}]),onClick:it[14]||(it[14]=xt(ft=>i("compact"),["stop"]))},"/compact",2)):Y("",!0),W(Cn,{text:Lo.value},{default:ae(()=>[e.status&&!e.hideContext?(g(),S("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":Lo.value},[W(Lbe,{pct:yo.value},null,8,["pct"])],8,XAe)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:el.value?e.status?.model:null},{default:ae(()=>[e.status?(g(),S("button",{key:0,ref_key:"modelPillRef",ref:Ro,type:"button",class:Be(["model-pill",{open:Ft.value,"icon-only":el.value,"model-gone":Or.value}]),"aria-haspopup":"menu","aria-expanded":Ft.value,"aria-label":el.value?e.status.model:void 0,onClick:xt(So,["stop"])},[el.value?(g(),ue(Ee,{key:0,name:"cute-bot",size:"md"})):(g(),S(Ce,{key:1},[b("span",{ref_key:"modelNameRef",ref:Do,class:"mp-name"},E(e.status.model),513),W(Ee,{class:"cv",name:"chevron-down",size:"sm"})],64))],10,JAe)):Y("",!0)]),_:1},8,["text"]),e.status&&wl.value!=="unsupported"?(g(),ue(Cn,{key:1,text:Ie.value},{default:ae(()=>[b("button",{ref_key:"thinkingPillRef",ref:$s,type:"button",class:Be(["thinking-pill",{open:Ut.value}]),disabled:Ni.value,"aria-haspopup":"dialog","aria-expanded":Ut.value,"aria-label":Ie.value,onClick:xt(Qo,["stop"]),onKeydown:go(xt(Po,["prevent"]),["escape"])},[W(Ee,{name:"thinking",size:"sm"}),b("span",eTe,E(Ae.value),1),Ni.value?Y("",!0):(g(),ue(Ee,{key:0,class:"cv",name:"chevron-down",size:"sm"}))],42,QAe)]),_:1},8,["text"])):Y("",!0),e.working?(g(),ue(Cn,{key:2,text:v(l)("composer.interruptTitle")},{default:ae(()=>[b("button",{class:"stop","aria-label":v(l)("composer.interrupt"),onClick:it[15]||(it[15]=ft=>i("interrupt"))},[...it[31]||(it[31]=[b("span",{class:"stop-square","aria-hidden":"true"},null,-1)])],8,tTe)]),_:1},8,["text"])):Y("",!0),b("button",{class:Be(["send",{"is-starting":e.starting}]),"aria-label":$e.value,disabled:e.starting||!ot.value,onClick:it[16]||(it[16]=ft=>uo())},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(Ee,{key:1,name:"send",size:"sm"}))],10,nTe)],512),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ft.value&&e.status?(g(),S("div",{key:0,ref_key:"modelDropdownRef",ref:We,class:Be(["composer-dropdown model-dropdown",{"flip-down":cn.value}]),style:Gt(qu.value),role:"menu",onClick:it[18]||(it[18]=xt(()=>{},["stop"])),onKeydown:Kl},[b("div",oTe,[Dr.value.length>0?(g(),S("div",sTe,E(v(l)("status.starredModels")),1)):Y("",!0),(g(!0),S(Ce,null,rt(Dr.value,ft=>(g(),S("button",{key:ft.id,class:Be(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",lTe,[ft.id===e.status.modelId?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",rTe,E(ft.displayName??ft.model),1),b("span",aTe,E(ft.provider),1),W(Ee,{class:"md-star",name:"star",size:"sm"})],10,iTe))),128)),Dr.value.length>0?(g(),S("div",cTe)):Y("",!0),nc.value.length>0?(g(),S("div",uTe,E(H1.value),1)):Y("",!0),(g(!0),S(Ce,null,rt(nc.value,ft=>(g(),S("button",{key:ft.id,class:Be(["md-row",{"is-current":ft.id===e.status.modelId}]),role:"menuitem",onClick:yn=>Gl(ft.id)},[b("span",fTe,[ft.id===e.status.modelId?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",pTe,E(ft.displayName??ft.model),1),ys(ft.id)?(g(),ue(Ee,{key:0,class:"md-star",name:"star",size:"sm"})):Y("",!0)],10,dTe))),128))]),nc.value.length>0?(g(),S("div",hTe)):Y("",!0),b("button",{class:"md-row md-row-more",role:"menuitem",onClick:it[17]||(it[17]=ft=>{Xn(),i("pickModel")})},[b("span",mTe,[W(Ee,{name:"list",size:"sm"})]),b("span",gTe,E(v(l)("status.moreModels")),1),W(Ee,{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],38)):Y("",!0)]),_:1}),W(qi,{name:"composer-menu-pop"},{default:ae(()=>[Ut.value&&e.status?(g(),S("div",{key:0,ref_key:"thinkingDropdownRef",ref:st,class:"composer-dropdown thinking-dropdown",style:Gt(hr.value),role:"dialog","aria-label":v(l)("composer.thinkingMenuTitle"),onClick:it[19]||(it[19]=xt(()=>{},["stop"])),onKeydown:go(xt(Po,["prevent"]),["escape"])},[b("div",yTe,[W(Ee,{name:"thinking",size:"sm"}),b("span",null,E(v(l)("composer.thinkingMenuTitle")),1)]),W(di,{"model-value":Ul.value,options:mn.value,size:"sm","onUpdate:modelValue":At},null,8,["model-value","options"]),b("div",wTe,E(v(l)("status.cacheNote")),1)],44,vTe)):Y("",!0)]),_:1})],512)],2),b("div",{class:Be(["drop-overlay",{show:v(be)}]),"aria-hidden":"true"},[b("div",kTe,[W(Ee,{name:"file-plus",size:"lg"}),b("span",null,E(v(l)("composer.dropToAttach")),1)])],2),(g(),ue(hl,{to:"body"},[W(qi,{name:"composer-warning"},{default:ae(()=>[Nn.value?(g(),S("div",bTe,[W(Yz,{variant:"warning",title:Nn.value,"dismiss-label":v(l)("common.dismiss"),onDismiss:it[20]||(it[20]=ft=>Nn.value=null)},null,8,["title","dismiss-label"])])):Y("",!0)]),_:1}),W(wu,{"model-value":v(a)&&v(C),title:v(l)("composer.slashSheetTitle"),"onUpdate:modelValue":j},{default:ae(()=>[b("div",_Te,[W(us,{ref_key:"slashSheetSearchRef",ref:Q,modelValue:at.value,"onUpdate:modelValue":it[21]||(it[21]=ft=>at.value=ft),placeholder:v(l)("composer.slashSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:Ls},null,8,["modelValue","placeholder"])]),W(WC,{id:"composer-slash-menu",layout:"sheet",items:v(F),"active-index":v(H),query:at.value,onSelect:v(M),onHover:it[22]||(it[22]=ft=>H.value=ft)},null,8,["items","active-index","query","onSelect"])]),_:1},8,["model-value","title"]),W(wu,{"model-value":v(a)&&v(R),title:v(l)("composer.mentionSheetTitle"),"onUpdate:modelValue":he},{default:ae(()=>[b("div",xTe,[W(us,{ref_key:"mentionSheetSearchRef",ref:me,modelValue:X.value,"onUpdate:modelValue":it[23]||(it[23]=ft=>X.value=ft),placeholder:v(l)("composer.mentionSearchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:Ls},null,8,["modelValue","placeholder"])]),W(qC,{id:"composer-mention-menu",layout:"sheet",items:v(O),"active-index":v(U),loading:v(Z),stale:v(q),onSelect:v(ee),onHover:it[24]||(it[24]=ft=>U.value=ft)},null,8,["items","active-index","loading","stale","onSelect"])]),_:1},8,["model-value","title"]),W(wu,{"model-value":v(a)&&es.value,"onUpdate:modelValue":Qe},{default:ae(()=>[b("div",{ref_key:"mobileModesMenuRef",ref:vs,class:"msheet-add",role:"menu",onClick:it[26]||(it[26]=xt(()=>{},["stop"])),onKeydown:Zt},[(g(!0),S(Ce,null,rt(ke.value,ft=>(g(),S("button",{key:ft.id,type:"button",class:"am-row",role:"menuitem",onMousedown:it[25]||(it[25]=xt(()=>{},["prevent"])),onClick:yn=>jt(ft)},[b("span",CTe,[W(Ee,{name:ft.icon,size:"sm"},null,8,["name"])]),b("span",MTe,E(v(l)(ft.nameKey)),1),ft.descKey?(g(),S("span",ATe,E(v(l)(ft.descKey)),1)):Y("",!0)],40,STe))),128))],544)]),_:1},8,["model-value"])]))],34))}}),Xz=vt(TTe,[["__scopeId","data-v-203386fd"]]),ETe={class:"ah"},ITe={class:"akind"},LTe={class:"apath"},$Te={class:"ah-path"},NTe={class:"dg"},zTe={class:"dc"},BTe={key:2,class:"body-shell"},RTe={class:"shell-cmd"},PTe={key:0,class:"shell-cwd"},FTe={key:1,class:"shell-danger"},jTe={class:"file-bar"},OTe={class:"file-lang"},HTe={class:"file-ln"},DTe={class:"file-text"},VTe={key:4,class:"body-chip"},WTe={class:"chip-label"},qTe={class:"chip-value"},UTe={key:0,class:"chip-detail"},ZTe={key:5,class:"body-chip"},KTe={key:0,class:"chip-label"},GTe={class:"chip-value"},YTe={key:6,class:"body-chip"},XTe={class:"chip-label"},JTe={class:"chip-value"},QTe={key:0,class:"chip-detail"},eEe={key:7,class:"body-chip"},tEe={class:"chip-label"},nEe={class:"chip-value"},oEe={key:0,class:"chip-detail"},sEe={key:8,class:"body-todo"},iEe={class:"todo-glyph"},lEe={key:10,class:"body-generic"},rEe={class:"gen-text"},aEe={key:11,class:"feedback-wrap"},cEe=["placeholder"],uEe={class:"feedback-hint"},dEe={key:0,class:"plan-actions"},fEe={key:1,class:"abtn"},pEe=.4,hEe=Je({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=B(()=>{const oe=n.block;return oe.kind!=="plan_review"?null:{plan:oe.plan,path:oe.path,options:oe.options??[]}}),l=V(!1),r=V(!1),a=B(()=>["plan_review","diff","file"].includes(n.block.kind)),c=V(null),u=V(null),d=V(null),f=V({top:!1,bottom:!1}),p=V({top:!1,bottom:!1}),h=V({top:!1,bottom:!1});function m(oe){return j=>{const K=j.currentTarget;K instanceof HTMLElement&&(oe.value={top:K.scrollTop>0,bottom:K.scrollTop+K.clientHeight{const{top:j,bottom:K}=oe.value;if(!j&&!K)return;const he="var(--menu-scroll-fade)",ye=j&&K?`linear-gradient(to bottom, transparent 0, black ${he}, black calc(100% - ${he}), transparent 100%)`:j?`linear-gradient(to bottom, transparent, black ${he})`:`linear-gradient(to top, transparent, black ${he})`;return{maskImage:ye,WebkitMaskImage:ye}})}const _=w(f),A=w(p),P=w(h);function z(){const oe=[[c.value,f],[u.value,p],[d.value,h]];for(const[j,K]of oe)j&&(K.value={top:j.scrollTop>0,bottom:j.scrollTop+j.clientHeightvoid yt(z)),Ke(l,()=>void yt(z)),Ke(()=>n.block,()=>void yt(z));const L=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function T(){const oe=L.includes(n.block.kind)?n.block.kind:"generic";return s(`approval.title.${oe}`)}const I=V(!1),N=V(""),C=V(null);function F(){const oe=C.value;if(!oe)return;oe.style.height="auto";const K=(window.visualViewport?.height??window.innerHeight)*pEe,he=Math.min(oe.scrollHeight,K);oe.style.height=`${he}px`,oe.style.overflowY=oe.scrollHeight>K?"auto":"hidden"}let H=null,D=0;function M(){if(H?.disconnect(),H=null,typeof ResizeObserver>"u")return;const oe=C.value;oe&&(H=new ResizeObserver(j=>{const K=j[0]?.contentRect.width??0;K!==D&&(D=K,F())}),H.observe(oe))}Ke(N,()=>void yt(F)),Ke(I,oe=>{if(!oe){H?.disconnect(),H=null;return}yt(()=>{F(),M()})}),Ke(l,oe=>{oe||yt(F)});const{uiFontSize:R}=M9();Ke(R,()=>void yt(F));function O(){n.busy||(I.value=!0,N.value="",setTimeout(()=>C.value?.focus(),0))}function U(){if(n.busy)return;const oe=N.value.trim();i.value?ee("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:oe||void 0}):ee("feedback",{decision:"rejected",feedback:oe||void 0}),I.value=!1,N.value=""}function Z(){I.value=!1,N.value=""}function q(oe){oe.key==="Enter"&&!oe.shiftKey?(oe.preventDefault(),U()):oe.key==="Escape"&&(oe.preventDefault(),Z())}const te=V(null);Ke(()=>n.busy,oe=>{oe||(te.value=null)});function ee(oe,j){n.busy||(te.value=oe,o("decide",j))}function J(){ee("approve",{decision:"approved"})}function se(){ee("approveSession",{decision:"approved",scope:"session"})}function Q(){ee("reject",{decision:"rejected"})}function me(){ee("approvePlan",{decision:"approved"})}function xe(oe){ee(`option:${oe}`,{decision:"approved",selectedLabel:oe})}function Ye(){n.busy||O()}function at(){ee("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function X(oe){const j=(document.activeElement?.tagName??"").toLowerCase();if(j==="input"||j==="textarea"||n.busy||l.value)return;const K=i.value;if(K){if(K.options.length===0){oe.key==="1"?(oe.preventDefault(),me()):oe.key==="2"?(oe.preventDefault(),Ye()):oe.key==="3"&&(oe.preventDefault(),at());return}oe.key==="1"&&K.options[0]?(oe.preventDefault(),xe(K.options[0].label)):oe.key==="2"&&K.options[1]?(oe.preventDefault(),xe(K.options[1].label)):oe.key==="3"&&K.options[2]&&(oe.preventDefault(),xe(K.options[2].label));return}oe.key==="1"?(oe.preventDefault(),J()):oe.key==="2"?(oe.preventDefault(),se()):oe.key==="3"?(oe.preventDefault(),Q()):oe.key==="4"&&(oe.preventDefault(),O())}return In(()=>{document.addEventListener("keydown",X),window.addEventListener("resize",F),window.visualViewport?.addEventListener("resize",F)}),En(()=>{document.removeEventListener("keydown",X),window.removeEventListener("resize",F),window.visualViewport?.removeEventListener("resize",F),H?.disconnect(),H=null}),(oe,j)=>(g(),ue(u9,{class:Be(["appr",{minimized:l.value}])},$2({head:ae(()=>[b("div",ETe,[j[6]||(j[6]=b("span",{class:"ah-ic"},"!",-1)),b("span",ITe,E(T()),1),b("span",LTe,[e.block.kind==="diff"||e.block.kind==="file"||e.block.kind==="fileop"?(g(),S(Ce,{key:0},[He(E(e.block.path),1)],64)):e.block.kind==="shell"?(g(),S(Ce,{key:1},[He(E(e.block.command),1)],64)):e.block.kind==="url"?(g(),S(Ce,{key:2},[He(E(e.block.url),1)],64)):e.block.kind==="search"?(g(),S(Ce,{key:3},[He(E(e.block.query),1)],64)):e.block.kind==="invocation"?(g(),S(Ce,{key:4},[He(E(e.block.name),1)],64)):e.block.kind==="generic"?(g(),S(Ce,{key:5},[He(E(e.block.summary),1)],64)):Y("",!0)]),e.agentName&&!l.value?(g(),ue(Fl,{key:0,variant:"neutral",size:"sm"},{default:ae(()=>[He(E(v(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):Y("",!0),l.value?Y("",!0):(g(),ue(Fl,{key:1,variant:"warning",size:"sm",class:"aw"},{default:ae(()=>[He(E(v(s)("approval.required")),1)]),_:1})),a.value&&!l.value?(g(),ue(Dt,{key:2,class:"aexpand",size:"sm",label:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),tooltip:r.value?v(s)("approval.collapsePlan"):v(s)("approval.expandPlan"),onClick:j[0]||(j[0]=K=>r.value=!r.value)},{default:ae(()=>[W(Ee,{name:r.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):Y("",!0),W(Dt,{class:"amin",size:"sm",label:l.value?v(s)("question.expand"):v(s)("question.minimize"),onClick:j[1]||(j[1]=K=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ee,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ee,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[e.block.kind==="plan_review"&&e.block.path?(g(),ue(Cn,{key:0,text:e.block.path},{default:ae(()=>[b("div",$Te,E(e.block.path),1)]),_:1},8,["text"])):Y("",!0),e.block.kind==="diff"?(g(),S("div",{key:1,ref_key:"diffBodyRef",ref:c,class:Be(["diff",{expanded:r.value}]),style:Gt(v(_)),onScroll:j[2]||(j[2]=(...K)=>v(k)&&v(k)(...K))},[(g(!0),S(Ce,null,rt(e.block.diff,(K,he)=>(g(),S("div",{key:he,class:Be(["dl",K.kind==="add"?"add":K.kind==="rem"?"del":""])},[b("span",NTe,E(K.gutter),1),b("span",zTe,E(K.text),1)],2))),128))],38)):e.block.kind==="shell"?(g(),S("div",BTe,[b("div",RTe,[j[7]||(j[7]=b("span",{class:"shell-dollar"},"$",-1)),He(" "+E(e.block.command),1)]),e.block.cwd?(g(),S("div",PTe,"cwd: "+E(e.block.cwd),1)):Y("",!0),e.block.danger?(g(),S("div",FTe,E(v(s)("approval.danger",{detail:e.block.danger})),1)):Y("",!0)])):e.block.kind==="file"?(g(),S("div",{key:3,class:Be(["body-file",{expanded:r.value}])},[b("div",jTe,[b("span",OTe,E(e.block.language??""),1)]),b("div",{class:"file-content",ref_key:"fileBodyRef",ref:u,style:Gt(v(A)),onScroll:j[3]||(j[3]=(...K)=>v(x)&&v(x)(...K))},[(g(!0),S(Ce,null,rt(e.block.content.split(` +`),(K,he)=>(g(),S("div",{key:he,class:"file-line"},[b("span",HTe,E(he+1),1),b("span",DTe,E(K),1)]))),128))],36)],2)):e.block.kind==="fileop"?(g(),S("div",VTe,[b("span",WTe,E(e.block.op),1),b("span",qTe,E(e.block.path),1),e.block.detail?(g(),S("span",UTe,E(e.block.detail),1)):Y("",!0)])):e.block.kind==="url"?(g(),S("div",ZTe,[e.block.method?(g(),S("span",KTe,E(e.block.method),1)):Y("",!0),b("span",GTe,E(e.block.url),1)])):e.block.kind==="search"?(g(),S("div",YTe,[b("span",XTe,E(v(s)("approval.searchQueryLabel")),1),b("span",JTe,E(e.block.query),1),e.block.scope?(g(),S("span",QTe,E(v(s)("approval.searchScope",{scope:e.block.scope})),1)):Y("",!0)])):e.block.kind==="invocation"?(g(),S("div",eEe,[b("span",tEe,E(e.block.kind2),1),b("span",nEe,E(e.block.name),1),e.block.description?(g(),S("span",oEe,E(e.block.description),1)):Y("",!0)])):e.block.kind==="todo"?(g(),S("div",sEe,[(g(!0),S(Ce,null,rt(e.block.items,(K,he)=>(g(),S("div",{key:he,class:"todo-item"},[b("span",iEe,E(K.status==="done"||K.status==="completed"?"✓":"○"),1),b("span",{class:Be(["todo-title",{"todo-done":K.status==="done"||K.status==="completed"}])},E(K.title),3)]))),128))])):e.block.kind==="plan_review"?(g(),S("div",{key:9,ref_key:"planBodyRef",ref:d,class:Be(["body-plan",{expanded:r.value}]),style:Gt(v(P)),onScroll:j[4]||(j[4]=(...K)=>v(y)&&v(y)(...K))},[W(Br,{text:e.block.plan},null,8,["text"])],38)):(g(),S("div",lEe,[b("span",rEe,E(e.block.summary),1)])),I.value?(g(),S("div",aEe,[Jn(b("textarea",{ref_key:"feedbackRef",ref:C,"onUpdate:modelValue":j[5]||(j[5]=K=>N.value=K),class:"feedback-ta",placeholder:v(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:q},null,40,cEe),[[js,N.value]]),b("div",uEe,E(v(s)("approval.feedbackHint")),1)])):Y("",!0)]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[i.value?(g(),S("div",dEe,[i.value.options.length>0?(g(!0),S(Ce,{key:0},rt(i.value.options,(K,he)=>(g(),ue(Cn,{key:he,text:K.description},{default:ae(()=>[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value===`option:${K.label}`,disabled:e.busy,onClick:ye=>xe(K.label)},{default:ae(()=>[He(E(K.label),1),W(Yr,{class:"k",keys:[String(he+1)]},null,8,["keys"])]),_:2},1032,["loading","disabled","onClick"])]),_:2},1032,["text"]))),128)):(g(),ue(Nt,{key:1,class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approvePlan",disabled:e.busy,onClick:me},{default:ae(()=>[He(E(v(s)("approval.approvePlan")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"])),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:Ye},{default:ae(()=>[He(E(v(s)("approval.revise")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["2"]})):Y("",!0)]),_:1},8,["disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"danger-soft",loading:te.value==="rejectAndExit",disabled:e.busy,onClick:at},{default:ae(()=>[He(E(v(s)("approval.rejectAndExit")),1),i.value.options.length===0?(g(),ue(Yr,{key:0,class:"k",keys:["3"]})):Y("",!0)]),_:1},8,["loading","disabled"])])):(g(),S("div",fEe,[W(Nt,{class:"kbtn",size:"sm",variant:"primary",loading:te.value==="approve",disabled:e.busy,onClick:J},{default:ae(()=>[He(E(v(s)("approval.approve")),1),W(Yr,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="approveSession",disabled:e.busy,onClick:se},{default:ae(()=>[He(E(v(s)("approval.approveSession")),1),W(Yr,{class:"k",keys:["2"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",loading:te.value==="reject",disabled:e.busy,onClick:Q},{default:ae(()=>[He(E(v(s)("approval.reject")),1),W(Yr,{class:"k",keys:["3"]})]),_:1},8,["loading","disabled"]),W(Nt,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:O},{default:ae(()=>[He(E(v(s)("approval.feedback")),1),W(Yr,{class:"k",keys:["4"]})]),_:1},8,["disabled"])]))]),key:"1"}]),1032,["class"]))}}),mEe=vt(hEe,[["__scopeId","data-v-f7485122"]]),gEe={class:"goal-panel"},vEe={key:0,class:"goal-criterion"},yEe={class:"goal-criterion-label"},wEe=Je({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",gEe,[W(Br,{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(g(),S("div",vEe,[b("div",yEe,[W(Ee,{name:"check-list",size:"md"}),b("span",null,E(v(t)("status.goalDoneWhen")),1)]),W(Br,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):Y("",!0)]))}}),kEe=vt(wEe,[["__scopeId","data-v-81a928ba"]]),bEe={class:"plan-panel"},_Ee={key:0,class:"plan-review-row"},xEe={class:"plan-review-label"},SEe={key:1,class:"plan-review-row plan-review-feedback"},CEe={class:"plan-review-label"},MEe={key:3,class:"plan-path-only"},AEe={class:"plan-path-hint"},TEe={class:"plan-path"},EEe={key:4,class:"plan-empty"},IEe=Je({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",bEe,[e.plan?.selectedOption?(g(),S("div",_Ee,[b("span",xEe,E(v(t)("tools.plan.selectedOption")),1),b("span",null,E(e.plan.selectedOption),1)])):Y("",!0),e.plan?.feedback?(g(),S("div",SEe,[b("span",CEe,E(v(t)("tools.plan.feedback")),1),b("span",null,E(e.plan.feedback),1)])):Y("",!0),e.plan?.plan?(g(),ue(Br,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):e.plan?.path?(g(),S("div",MEe,[b("span",AEe,E(v(t)("tools.plan.pathOnlyHint")),1),b("span",TEe,E(e.plan.path),1),e.revealSavedPlan?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:o[0]||(o[0]=s=>void e.revealSavedPlan(e.plan.agentId,e.plan.toolCallId))},{default:ae(()=>[W(Ee,{name:"external-link",size:"sm"}),He(" "+E(v(t)("tools.plan.revealInFileManager")),1)]),_:1})):Y("",!0)])):(g(),S("div",EEe,[W(Ee,{class:"plan-empty-ico",name:"file-edit",size:"lg"}),b("span",null,E(v(t)(e.planModeOn?"status.planEmptyArmed":"status.planEmptyIdle")),1)]))]))}}),LEe=vt(IEe,[["__scopeId","data-v-2883948d"]]),$Ee={class:"qh"},NEe={class:"qtitle"},zEe={key:0,class:"qstep"},BEe={key:1,class:"qmin-peek"},REe={class:"qbody"},PEe=["aria-label"],FEe=["aria-selected","aria-label","onClick"],jEe={class:"qstep-num"},OEe={key:1,class:"qheader-chip"},HEe={class:"qtext"},DEe={class:"qopts"},VEe=["onClick"],WEe={class:"qopt-key"},qEe={class:"qopt-glyph"},UEe={key:0,class:"chk"},ZEe={key:1,class:"rad"},KEe={class:"qopt-text"},GEe={class:"qopt-label"},YEe={key:0,class:"qopt-desc"},XEe={class:"qopt-glyph"},JEe={key:0,class:"chk"},QEe={key:1,class:"rad"},eIe={class:"qopt-text qopt-text-other"},tIe={class:"qopt-label"},nIe={key:0,class:"qopt-desc"},oIe=["placeholder"],sIe={class:"qfoot"},iIe=Je({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=$t(),s=t,i=V(0),l=V(!1),r=B(()=>n.question.questions[i.value]),a=B(()=>n.question.questions.length);function c(){i.value>0&&i.value--}function u(){i.value=0&&M0:R.kind==="multiWithOther"?R.optionIds.length>0||R.otherText.trim().length>0:R.kind==="other"?R.text.trim().length>0:!0:!1}function p(){return f(r.value.id)}const h=V({});function m(M){return M.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${M.label} ${M.description??""}`.toLowerCase())}function k(){const M={...h.value};let R=!1;for(const O of n.question.questions){if(M[O.id])continue;const U=O.options.filter(m);U.length!==0&&(M[O.id]=O.multiSelect?{kind:"multi",optionIds:U.map(Z=>Z.id)}:{kind:"single",optionId:U[0].id},R=!0)}R&&(h.value=M)}Ke(()=>n.question.questionId,()=>{i.value=0,l.value=!1,h.value={},w.value={}}),Ke(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),k()},{immediate:!0,deep:!0});function x(M,R){const O=h.value[M];if(O&&O.kind==="single"&&O.optionId===R){const U={...h.value};delete U[M],h.value=U}else h.value={...h.value,[M]:{kind:"single",optionId:R}}}function y(M,R){const O=h.value[M],U=O&&(O.kind==="multi"||O.kind==="multiWithOther")?O.kind==="multi"?[...O.optionIds]:[...O.optionIds]:[],Z=U.indexOf(R);Z>=0?U.splice(Z,1):U.push(R);const q=h.value[M],te=q&&q.kind==="multiWithOther"?q.otherText:"";te?h.value={...h.value,[M]:{kind:"multiWithOther",optionIds:U,otherText:te}}:h.value={...h.value,[M]:{kind:"multi",optionIds:U}}}const w=V({}),_=V(null);function A(M){const R=n.question.questions.find(U=>U.id===M),O=w.value[M]??"";if(R.multiSelect){const U=h.value[M],Z=U&&(U.kind==="multi"||U.kind==="multiWithOther")?U.kind==="multi"?[...U.optionIds]:[...U.optionIds]:[];h.value={...h.value,[M]:{kind:"multiWithOther",optionIds:Z,otherText:O}}}else h.value={...h.value,[M]:{kind:"other",text:O}}}function P(M){A(M),yt(()=>_.value?.focus())}function z(M,R){const O=h.value[M];return O?O.kind==="single"?O.optionId===R:O.kind==="multi"||O.kind==="multiWithOther"?O.optionIds.includes(R):!1:!1}function L(M){const R=h.value[M];return!!(R&&(R.kind==="other"||R.kind==="multiWithOther"))}function T(){return n.question.questions.every(M=>f(M.id))}const I=B(()=>n.busyKind==="answer"),N=B(()=>n.busyKind==="dismiss"),C=B(()=>!!n.busyKind);function F(){if(C.value||!T())return;const M={answers:h.value,method:"click"};s("answer",n.question.questionId,M)}function H(){C.value||s("dismiss",n.question.questionId)}function D(M){const R=(document.activeElement?.tagName??"").toLowerCase(),O=R==="input"||R==="textarea";if(C.value)return;if(M.key==="Enter"){if(M.preventDefault(),l.value)return;i.value=1&&U<=9){M.preventDefault();const Z=r.value,q=U-1,te=Z.options[q];te&&(Z.multiSelect?y(Z.id,te.id):x(Z.id,te.id))}}return In(()=>document.addEventListener("keydown",D)),En(()=>document.removeEventListener("keydown",D)),(M,R)=>(g(),ue(u9,{class:Be(["qcard",{minimized:l.value}])},$2({head:ae(()=>[b("div",$Ee,[R[5]||(R[5]=b("span",{class:"qh-ic"},"?",-1)),b("span",NEe,E(v(o)("question.title")),1),a.value>1&&!l.value?(g(),S("span",zEe,E(v(o)("question.step",{current:i.value+1,total:a.value})),1)):Y("",!0),l.value?(g(),S("span",BEe,E(r.value.question),1)):Y("",!0),W(Dt,{class:"qmin",size:"sm",label:l.value?v(o)("question.expand"):v(o)("question.minimize"),onClick:R[0]||(R[0]=O=>l.value=!l.value)},{default:ae(()=>[l.value?(g(),ue(Ee,{key:0,name:"chevron-up",size:"md"})):(g(),ue(Ee,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[l.value?void 0:{name:"default",fn:ae(()=>[b("div",REe,[a.value>1?(g(),S("div",{key:0,class:"qsteps",role:"tablist","aria-label":v(o)("question.step",{current:i.value+1,total:a.value})},[(g(!0),S(Ce,null,rt(n.question.questions,(O,U)=>(g(),S("button",{key:O.id,type:"button",class:Be(["qstep-dot",{active:U===i.value,answered:f(O.id)}]),"aria-selected":U===i.value,"aria-label":v(o)("question.step",{current:U+1,total:a.value}),onClick:Z=>d(U)},[b("span",jEe,E(U+1),1)],10,FEe))),128))],8,PEe)):Y("",!0),r.value.header?(g(),S("div",OEe,[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[He(E(r.value.header),1)]),_:1})])):Y("",!0),b("div",HEe,E(r.value.question),1),r.value.body?(g(),ue(Br,{key:2,text:r.value.body,class:"qmdbody"},null,8,["text"])):Y("",!0),b("div",DEe,[(g(!0),S(Ce,null,rt(r.value.options,(O,U)=>(g(),S("label",{key:O.id,class:Be(["qopt",{selected:z(r.value.id,O.id)}]),onClick:xt(Z=>r.value.multiSelect?y(r.value.id,O.id):x(r.value.id,O.id),["prevent"])},[b("span",WEe,E(U+1),1),b("span",qEe,[r.value.multiSelect?(g(),S("span",UEe,E(z(r.value.id,O.id)?"■":"□"),1)):(g(),S("span",ZEe,E(z(r.value.id,O.id)?"●":"○"),1))]),b("span",KEe,[b("span",GEe,E(O.label),1),O.description?(g(),S("span",YEe,E(O.description),1)):Y("",!0)])],10,VEe))),128)),r.value.allowOther?(g(),S("label",{key:0,class:Be(["qopt",{selected:L(r.value.id)}]),onClick:R[4]||(R[4]=xt(O=>P(r.value.id),["prevent"]))},[R[6]||(R[6]=b("span",{class:"qopt-key"},null,-1)),b("span",XEe,[r.value.multiSelect?(g(),S("span",JEe,E(L(r.value.id)?"■":"□"),1)):(g(),S("span",QEe,E(L(r.value.id)?"●":"○"),1))]),b("span",eIe,[b("span",tIe,E(r.value.otherLabel??v(o)("question.otherDefault")),1),r.value.otherDescription?(g(),S("span",nIe,E(r.value.otherDescription),1)):Y("",!0)]),Jn(b("input",{ref_key:"otherInputEl",ref:_,"onUpdate:modelValue":R[1]||(R[1]=O=>w.value[r.value.id]=O),class:"other-input",type:"text",placeholder:r.value.otherLabel??v(o)("question.otherDefault"),onInput:R[2]||(R[2]=O=>A(r.value.id)),onFocus:R[3]||(R[3]=O=>A(r.value.id))},null,40,oIe),[[js,w.value[r.value.id]]])],2)):Y("",!0)])])]),key:"0"},l.value?void 0:{name:"foot",fn:ae(()=>[b("div",sIe,[i.value[He(E(v(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(g(),ue(Nt,{key:1,class:"qfoot-btn qfoot-main",size:"sm",variant:"primary",disabled:!T(),loading:I.value,onClick:F},{default:ae(()=>[He(E(v(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),a.value>1?(g(),ue(Nt,{key:2,class:"qfoot-btn",size:"sm",variant:"secondary",disabled:i.value===0||C.value,onClick:c},{default:ae(()=>[He(E(v(o)("question.back")),1)]),_:1},8,["disabled"])):Y("",!0),W(Nt,{class:"qfoot-btn",size:"sm",variant:"ghost",loading:N.value,disabled:C.value,onClick:H},{default:ae(()=>[He(E(v(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])])]),key:"1"}]),1032,["class"]))}}),lIe=vt(iIe,[["__scopeId","data-v-ce0bd159"]]),rIe=Je({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e,n={pending:"○",run:"●",done:"✓",fail:"✗"};return(o,s)=>(g(),S("span",{class:Be(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},E(n[t.status]),3))}}),rp=vt(rIe,[["__scopeId","data-v-f870866a"]]),aIe={key:0,class:"sg-empty"},cIe={key:1,class:"sg-grid"},uIe=["aria-label","onClick"],dIe={class:"sg-top"},fIe={class:"sg-num"},pIe={class:"sg-name"},hIe={key:1,class:"sg-desc"},mIe={class:"sg-foot"},gIe={key:0,class:"sg-model"},vIe={class:"sg-status"},yIe={class:"sg-state"},wIe={key:0,class:"sg-time"},kIe=Je({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(f){return f}function i(f){return f==="running"?"tasks.emptyRunning":f==="done"?"tasks.emptyDone":f==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}const l=fn("modelDisplay"),r=fn("subagentEffort");function a(f){const{model:p,thinkingEffort:h}=f;return[l?.(p)??p,r?.(h)].filter(Boolean).join(" · ")||void 0}function c(f){const p=f.state;return o(p==="done"?"tasks.stateDone":p==="fail"?"tasks.stateFail":p==="cancelled"?"tasks.stateCancelled":"tasks.running")}function u(f,p){return String(f.dynamicWorkflowIndex??p+1).padStart(2,"0")}function d(f){return!!(f.agentId||f.output?.length)}return(f,p)=>e.tasks.length===0?(g(),S("div",aIe,E(v(o)(i(e.filter))),1)):(g(),S("div",cIe,[(g(!0),S(Ce,null,rt(e.tasks,(h,m)=>(g(),S("article",{key:h.id,class:Be(["sg-card",[`s-${h.state}`,{openable:d(h)}]])},[d(h)?(g(),S("button",{key:0,class:"sg-open",type:"button","aria-label":h.name,onClick:k=>n("open",h.agentId??h.id)},null,8,uIe)):Y("",!0),b("div",dIe,[b("span",fIe,E(u(h,m)),1),b("span",pIe,E(h.name),1)]),h.meta?(g(),S("div",hIe,E(h.meta),1)):Y("",!0),b("div",mIe,[a(h)?(g(),S("div",gIe,[b("span",null,E(a(h)),1)])):Y("",!0),b("div",vIe,[b("span",yIe,[h.state==="run"?(g(),ue(rp,{key:0,status:"run"})):h.state==="done"?(g(),ue(Ee,{key:1,class:"sg-ic-done",name:"check",size:"sm"})):(g(),ue(Ee,{key:2,name:"close",size:"sm"})),He(" "+E(c(h)),1)]),h.timing?(g(),S("span",wIe,[W(Ee,{name:"clock",size:"sm"}),He(" "+E(h.timing),1)])):Y("",!0)])]),h.state==="run"?(g(),ue(Dt,{key:2,class:"sg-cancel",size:"sm",label:v(o)("tasks.stop"),onClick:xt(k=>n("cancel",h.id),["stop"])},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0)],2))),128))]))}}),bIe=vt(kIe,[["__scopeId","data-v-5945b343"]]),_Ie={class:"taskspane"},xIe={class:"tp-list"},SIe={key:0,class:"tp-empty"},CIe={class:"tp-main"},MIe=["aria-label","onClick"],AIe=["aria-label"],TIe={class:"tp-name"},EIe={key:1,class:"tp-meta"},IIe={key:2,class:"tp-model"},LIe={key:3,class:"tp-model"},$Ie={key:4,class:"tp-time"},NIe=Je({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(p){return p}function i(p){return p==="running"?"tasks.emptyRunning":p==="done"?"tasks.emptyDone":p==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function l(p){return p.kind==="subagent"||!!(p.output?.length||p.meta)}function r(p){l(p)&&n("open",p.agentId??p.id)}function a(p){const h=p.state;return o(h==="done"?"tasks.stateDone":h==="fail"?"tasks.stateFail":h==="cancelled"?"tasks.stateCancelled":"tasks.running")}const c=fn("modelDisplay"),u=fn("subagentEffort");function d(p){if(p.kind!=="subagent")return;const h=p.model;return c?.(h)??h}function f(p){if(p.kind==="subagent")return u?.(p.thinkingEffort)}return(p,h)=>(g(),S("div",_Ie,[b("div",xIe,[e.tasks.length===0?(g(),S("div",SIe,E(v(o)(i(e.filter))),1)):(g(!0),S(Ce,{key:1},rt(e.tasks,m=>(g(),S("div",{key:m.id,class:Be(["tp-row",{fail:m.state==="fail",expandable:l(m)}])},[b("div",CIe,[l(m)?(g(),S("button",{key:0,class:"tp-open",type:"button","aria-label":m.name,onClick:k=>r(m)},null,8,MIe)):Y("",!0),b("span",{class:"tp-glyph",role:"img","aria-label":a(m)},[m.state==="run"?(g(),ue(rp,{key:0,status:"run"})):m.state==="done"?(g(),ue(Ee,{key:1,class:"tp-done",name:"check",size:"sm"})):m.state==="cancelled"?(g(),ue(Ee,{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(g(),ue(Ee,{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,AIe),b("span",TIe,E(m.name),1),m.meta?(g(),S("span",EIe,E(m.meta),1)):Y("",!0),d(m)?(g(),S("span",IIe,E(d(m)),1)):Y("",!0),f(m)?(g(),S("span",LIe,E(f(m)),1)):Y("",!0),m.timing?(g(),S("span",$Ie,E(m.timing),1)):Y("",!0),m.state==="run"?(g(),ue(Dt,{key:5,class:"tp-stop",size:"sm",label:v(o)("tasks.stop"),onClick:xt(k=>n("cancel",m.id),["stop"])},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):Y("",!0),l(m)?(g(),ue(Ee,{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):Y("",!0)])],2))),128))])]))}}),zIe=vt(NIe,[["__scopeId","data-v-f4589f0b"]]),BIe={class:"todo-card"},RIe={key:0,class:"tc-empty"},PIe={class:"tc-name"},FIe=Je({__name:"TodoCard",props:{todos:{}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",BIe,[e.todos.length===0?(g(),S("div",RIe,[W(Ee,{class:"tc-empty-ico",name:"list",size:"lg"}),b("span",null,E(v(t)("tasks.emptyTodo")),1)])):(g(!0),S(Ce,{key:1},rt(e.todos,(s,i)=>(g(),S("div",{key:i,class:Be(["tc-row",`s-${s.status}`])},[b("span",{class:Be(["tc-glyph",`g-${s.status}`])},[s.status==="done"?(g(),ue(Ee,{key:0,name:"check",size:"md"})):s.status==="in_progress"?(g(),ue(Zo,{key:1,class:"tc-spin",size:"sm"})):Y("",!0)],2),b("span",PIe,E(s.title),1)],2))),128))]))}}),jIe=vt(FIe,[["__scopeId","data-v-4e4d0054"]]),OIe=["disabled","aria-pressed"],HIe=Je({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(g(),S("button",{key:0,class:Be(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[jn(t.$slots,"default",{},void 0,!0)],10,OIe)):(g(),S("span",{key:1,class:Be(["ui-pill",{"is-active":e.active}])},[jn(t.$slots,"default",{},void 0,!0)],2))}}),Jz=vt(HIe,[["__scopeId","data-v-0fb1a50d"]]),DIe={class:"fc-label"},VIe=Je({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=B(()=>n.options.find(I=>I.value===n.modelValue)),i=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",l=V(null),r=V(!1);let a=0,c=null;async function u(){const I=l.value?.closest(".dock-work-head");if(!I)return;const N=I.querySelector(".wp-head-tab"),C=getComputedStyle(I),F=(Number.parseFloat(C.columnGap)||0)*2,H=I.clientWidth-Number.parseFloat(C.paddingLeft)-Number.parseFloat(C.paddingRight)-F,D=N?.scrollWidth??0;if(!r.value){const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth)}const M=D+a>H;if(r.value=M,!M){await yt();const R=l.value?.querySelector(".ui-seg");R&&R.offsetWidth>0&&(a=R.offsetWidth),r.value=D+a>H}}const d=V(!1),f=V(null),p=V(null),h=V({left:"0px",top:"0px"});function m(){return f.value?.$el??null}async function k(){if(d.value){x();return}d.value=!0,await yt(),y(),w(),window.addEventListener("mousedown",P,!0),window.addEventListener("keydown",z,!0),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0)}function x(I){d.value=!1,window.removeEventListener("mousedown",P,!0),window.removeEventListener("keydown",z,!0),window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0),I?.refocus&&m()?.focus()}function y(){const I=m();if(!I)return;const N=I.getBoundingClientRect(),C=p.value?.offsetHeight??0,F=getComputedStyle(document.documentElement),H=Number.parseFloat(F.getPropertyValue("--space-2"))||0,D=Number.parseFloat(F.getPropertyValue("--space-1"))||0,M=p.value?.offsetWidth??0,R=Math.min(N.left,Math.max(H,window.innerWidth-M-H));N.bottom+D+C<=window.innerHeight-H?h.value={left:`${R}px`,top:`${N.bottom+D}px`}:h.value={left:`${R}px`,bottom:`${window.innerHeight-N.top+D}px`}}function w(){const I=p.value;if(!I)return;(I.querySelector(".ui-menu-item.is-active")??I.querySelector(".ui-menu-item"))?.focus()}function _(){d.value||k()}function A(I){const N=I.relatedTarget;N&&(p.value?.contains(N)||m()?.contains(N))||x()}function P(I){const N=I.target;if(N){if(p.value?.contains(N)){I.stopImmediatePropagation();return}m()?.contains(N)||x()}}function z(I){I.key==="Escape"&&(I.preventDefault(),I.stopImmediatePropagation(),x({refocus:!0}))}function L(I){if(I.key!=="ArrowDown"&&I.key!=="ArrowUp")return;I.preventDefault();const N=Array.from(p.value?.querySelectorAll(".ui-menu-item")??[]);if(N.length===0)return;const C=N.indexOf(document.activeElement),F=I.key==="ArrowDown"?(C+1)%N.length:(C-1+N.length)%N.length;N[F]?.focus()}function T(I){o("update:modelValue",I),x({refocus:!0})}return In(()=>{const I=l.value?.closest(".dock-work-head");!I||typeof ResizeObserver!="function"||(c=new ResizeObserver(()=>void u()),c.observe(I),u())}),Ke(r,I=>{!I&&d.value&&x()}),Ke(()=>n.options,async()=>{a=0,await yt(),await u()},{flush:"post"}),vo(()=>{c?.disconnect(),d.value&&x()}),(I,N)=>(g(),S("span",{ref_key:"root",ref:l,class:"filter-control"},[r.value?(g(),S(Ce,{key:0},[W(Jz,{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:k,onKeydown:[go(xt(_,["prevent"]),["down"]),go(xt(_,["prevent"]),["up"])],onFocusout:A},{default:ae(()=>[s.value?.icon?(g(),ue(Ee,{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):Y("",!0),b("span",null,E(s.value?.label),1),W(Ee,{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(g(),ue(hl,{to:"body"},[d.value?(g(),S("div",{key:0,ref_key:"menuBoxRef",ref:p,class:"fc-menu",style:Gt(h.value),onKeydown:L,onFocusout:A},[W(zr,null,{default:ae(()=>[(g(!0),S(Ce,null,rt(e.options,C=>(g(),ue(Bn,{key:C.value,role:"menuitemradio",active:C.value===e.modelValue,"aria-checked":C.value===e.modelValue,size:v(i),onClick:F=>T(C.value)},{default:ae(()=>[C.icon?(g(),ue(Ee,{key:0,name:C.icon,size:"sm","data-icon":C.icon},null,8,["name","data-icon"])):Y("",!0),b("span",DIe,E(C.label),1),C.value===e.modelValue?(g(),ue(Ee,{key:1,class:"fc-check",name:"check",size:"sm"})):Y("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):Y("",!0)]))],64)):(g(),ue(di,{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":N[0]||(N[0]=C=>o("update:modelValue",C))},null,8,["model-value","options"]))],512))}}),pM=vt(VIe,[["__scopeId","data-v-658870b5"]]),WIe={class:"wp-head-tab"},qIe={key:0,class:"wp-head-meta"},UIe={key:0,class:"wp-head-actions"},ZIe=Je({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(g(),S(Ce,null,[b("span",WIe,[W(Ee,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,E(e.title),1),e.meta?(g(),S("span",qIe,E(e.meta),1)):Y("",!0)]),t.$slots.actions?(g(),S("span",UIe,[jn(t.$slots,"actions",{},void 0,!0)])):Y("",!0)],64))}}),Rd=vt(ZIe,[["__scopeId","data-v-408c4b07"]]),Pd=Je({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e){return(t,n)=>(g(),ue(Jz,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},{default:ae(()=>[W(Ee,{name:e.icon,size:"md"},null,8,["name"]),b("span",null,[jn(t.$slots,"default")]),jn(t.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),KIe={class:"dock-work-head"},GIe={key:0,class:"dock-workbar"},YIe={class:"dw-running"},XIe={class:"dw-running"},JIe={class:"dw-count"},QIe=Je({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),{confirm:l,current:r}=z1(),a=V(null),c=V(null),u=V(null),d=V(null),f=V(!1),p=V(!1),h=V("50% 100%"),m=V("active"),k=V("active"),x=B(()=>Object.values(o.sessionPlans??{}).at(-1)),y=B(()=>a.value?.anyPopupOpen??!1),w=B(()=>[{value:"active",label:i("tasks.filterRecent"),icon:"clock"},{value:"running",label:i("tasks.filterRunning"),icon:"play"},{value:"done",label:i("tasks.filterDone"),icon:"circle-check"},{value:"all",label:i("tasks.filterAll"),icon:"list"}]),_=B(()=>(o.todos?.length??0)>0&&o.todoDoneCount===(o.todos?.length??0)),A=B(()=>o.goal?i(`status.goalStatus${o.goal.status[0].toUpperCase()}${o.goal.status.slice(1)}`):""),P=B(()=>{const te=Math.max(0,Math.round((o.goal?.wallClockMs??0)/1e3)),ee=Math.floor(te/3600),J=Math.floor(te%3600/60);return ee?`${ee}${i("status.timeUnitHour")} ${J}${i("status.timeUnitMinute")}`:J?`${J}${i("status.timeUnitMinute")} ${te%60}${i("status.timeUnitSecond")}`:`${te}${i("status.timeUnitSecond")}`}),z=B(()=>o.bashTasks.some(te=>te.kind==="tool")?i("tasks.dockTasks"):i("tasks.dockBash"));function L(te,ee){if(ee==="all")return te;if(ee==="running")return te.filter(Q=>Q.state==="run");if(ee==="done")return te.filter(Q=>Q.state!=="run");const J=te.filter(Q=>Q.state==="run"),se=te.filter(Q=>Q.state!=="run").toSorted((Q,me)=>Date.parse(me.completedAt??me.createdAt??"")-Date.parse(Q.completedAt??Q.createdAt??"")).slice(0,5);return[...J,...se]}const T=B(()=>L(o.bashTasks,m.value)),I=B(()=>L(o.subagentTasks,k.value));function N(te,ee){const J=ee.currentTarget,se=c.value;if(J&&se){const Q=J.getBoundingClientRect(),me=se.getBoundingClientRect();h.value=`${Q.left+Q.width/2-me.left}px 100%`}s("toggle-dock-panel",te)}function C(){p.value=(d.value?.scrollTop??0)>0}function F(te){if(!o.dockPanel)return;const ee=te.target;!ee||u.value?.contains(ee)||ee.closest(".ui-pill")||s("close-dock-panel")}function H(te){o.dockPanel&&(te.key!=="Escape"||te.repeat||te.isComposing||te.defaultPrevented||y.value||r.value||o.overlayOpen||(te.preventDefault(),te.stopImmediatePropagation(),s("close-dock-panel")))}async function D(){await l({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}function M(){const te=c.value;if(!te)return;document.documentElement.style.setProperty("--dock-h",`${te.offsetHeight}px`);const ee=Number.parseFloat(getComputedStyle(te).getPropertyValue("--p-bp-sm"))||640;f.value=te.offsetWidth{document.addEventListener("mousedown",F,!0),document.addEventListener("keydown",H,!0),typeof ResizeObserver=="function"&&c.value&&(R=new ResizeObserver(()=>{M(),C()}),R.observe(c.value),M())}),En(()=>{document.removeEventListener("mousedown",F,!0),document.removeEventListener("keydown",H,!0),R?.disconnect()}),Ke(()=>o.dockPanel,()=>{p.value=!1,yt(C)});function O(te){return a.value?.loadForEdit(te)??!1}function U(te){a.value?.loadAttachmentsForEdit(te)}function Z(){a.value?.focus()}function q(te){a.value?.insertQuote(te)}return t({loadForEdit:O,loadAttachmentsForEdit:U,insertQuote:q,focus:Z,anyPopupOpen:y,isEmpty:B(()=>a.value?.isEmpty??!0)}),(te,ee)=>(g(),S("div",{ref_key:"dockRef",ref:c,class:Be(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":y.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":f.value}]]),onClick:ee[36]||(ee[36]=xt(()=>{},["stop"]))},[W(qi,{name:"dock-panel"},{default:ae(()=>[e.dockPanel?(g(),S("div",{key:e.dockPanel,ref_key:"workPanelRef",ref:u,class:Be(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":p.value}]]),style:Gt({transformOrigin:h.value})},[b("div",KIe,[e.dockPanel==="bash"?(g(),ue(Rd,{key:0,icon:"terminal",title:z.value,meta:`${e.bashRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(pM,{modelValue:m.value,"onUpdate:modelValue":ee[0]||(ee[0]=J=>m.value=J),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(g(),ue(Rd,{key:1,icon:"sparkles",title:v(i)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${v(i)("tasks.running")}`},{actions:ae(()=>[W(pM,{modelValue:k.value,"onUpdate:modelValue":ee[1]||(ee[1]=J=>k.value=J),options:w.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(g(),ue(Rd,{key:2,icon:_.value?"check-list":"list",title:v(i)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(g(),ue(Rd,{key:3,icon:"target",title:v(i)("status.goalLabel"),meta:P.value},{actions:ae(()=>[e.goal?.status==="active"?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("status.goalPause"),onClick:ee[2]||(ee[2]=J=>s("controlGoal","pause"))},{default:ae(()=>[W(Ee,{name:"pause",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.goalResume"),onClick:ee[3]||(ee[3]=J=>s("controlGoal","resume"))},{default:ae(()=>[W(Ee,{name:"play",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("status.goalCancel"),onClick:D},{default:ae(()=>[W(Ee,{name:"power",size:"sm"})]),_:1},8,["label"]),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:ee[4]||(ee[4]=J=>s("close-dock-panel"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"])):(g(),ue(Rd,{key:4,icon:"file-edit",title:v(i)("status.planLabel"),meta:x.value?.reviewState?v(i)(`tools.plan.review.${x.value.reviewState}`):""},{actions:ae(()=>[x.value?.path?(g(),ue(Dt,{key:0,size:"sm",label:v(i)("tools.plan.revealInFileManager"),onClick:ee[5]||(ee[5]=J=>void e.revealSavedPlan?.(x.value.agentId,x.value.toolCallId))},{default:ae(()=>[W(Ee,{name:"external-link",size:"sm"})]),_:1},8,["label"])):Y("",!0),e.planArmed||e.planMode?(g(),ue(Dt,{key:1,size:"sm",label:v(i)("status.workModeDismiss"),onClick:ee[6]||(ee[6]=J=>s("togglePlan"))},{default:ae(()=>[W(Ee,{name:"power",size:"sm"})]),_:1},8,["label"])):Y("",!0),W(Dt,{size:"sm",label:v(i)("tasks.closePanel"),onClick:ee[7]||(ee[7]=J=>s("close-dock-panel"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"]))]),b("div",{ref_key:"workBodyRef",ref:d,class:"dock-work-body",onScroll:C},[e.dockPanel==="bash"?(g(),ue(zIe,{key:0,tasks:T.value,filter:m.value,onCancel:ee[8]||(ee[8]=J=>s("cancelTask",J)),onOpen:ee[9]||(ee[9]=J=>s("openAgent",J))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(g(),ue(bIe,{key:1,tasks:I.value,filter:k.value,onCancel:ee[10]||(ee[10]=J=>s("cancelTask",J)),onOpen:ee[11]||(ee[11]=J=>s("openAgent",J))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(g(),ue(jIe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(g(),ue(kEe,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):(g(),ue(LEe,{key:4,plan:x.value,"plan-mode-on":e.planMode,"open-file":e.openFile,"reveal-saved-plan":e.revealSavedPlan},null,8,["plan","plan-mode-on","open-file","reveal-saved-plan"]))],544)],6)):Y("",!0)]),_:1}),e.hasDockWork||e.planMode||x.value?(g(),S("div",GIe,[e.goal?(g(),ue(Pd,{key:0,icon:"target",active:e.dockPanel==="goal",label:`${v(i)("status.goalLabel")} ${A.value}`,onClick:ee[12]||(ee[12]=J=>N("goal",J))},{meta:ae(()=>[b("span",{class:Be(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},E(A.value),3)]),default:ae(()=>[He(E(v(i)("status.goalLabel"))+" ",1)]),_:1},8,["active","label"])):Y("",!0),e.planMode||x.value?(g(),ue(Pd,{key:1,icon:"file-edit",active:e.dockPanel==="plan",label:v(i)("status.planLabel"),onClick:ee[13]||(ee[13]=J=>N("plan",J))},{default:ae(()=>[He(E(v(i)("status.planLabel")),1)]),_:1},8,["active","label"])):Y("",!0),e.bashTasks.length?(g(),ue(Pd,{key:2,icon:"terminal",active:e.dockPanel==="bash",label:z.value,onClick:ee[14]||(ee[14]=J=>N("bash",J))},$2({default:ae(()=>[He(E(z.value)+" ",1)]),_:2},[e.bashRunning?{name:"meta",fn:ae(()=>[b("span",YIe,[W(rp,{status:"run"}),He(E(e.bashRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.subagentTasks.length?(g(),ue(Pd,{key:3,icon:"sparkles",active:e.dockPanel==="subagent",label:v(i)("tasks.dockSubagent"),onClick:ee[15]||(ee[15]=J=>N("subagent",J))},$2({default:ae(()=>[He(E(v(i)("tasks.dockSubagent"))+" ",1)]),_:2},[e.subagentRunning?{name:"meta",fn:ae(()=>[b("span",XIe,[W(rp,{status:"run"}),He(E(e.subagentRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):Y("",!0),e.todos?.length?(g(),ue(Pd,{key:4,icon:_.value?"check-list":"list",active:e.dockPanel==="todos",label:v(i)("tasks.todoProgressTitle"),onClick:ee[16]||(ee[16]=J=>N("todos",J))},{meta:ae(()=>[b("span",JIe,E(e.todoDoneCount)+"/"+E(e.todos?.length),1)]),default:ae(()=>[He(E(v(i)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","active","label"])):Y("",!0)])):Y("",!0),e.pendingQuestion?(g(),ue(lIe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:ee[17]||(ee[17]=(J,se)=>s("answer",J,se)),onDismiss:ee[18]||(ee[18]=J=>s("dismiss",J))},null,8,["question","busy-kind"])):e.pendingApproval?(g(),ue(mEe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:ee[19]||(ee[19]=J=>s("approval",e.pendingApproval.approvalId,J))},null,8,["block","agent-name","busy"])):(g(),ue(Xz,{key:3,ref_key:"composerRef",ref:a,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:ee[20]||(ee[20]=J=>s("submit",J)),onSteer:ee[21]||(ee[21]=J=>s("steer",J)),onCommand:ee[22]||(ee[22]=J=>s("command",J)),onInterrupt:ee[23]||(ee[23]=J=>s("interrupt")),onSetPermission:ee[24]||(ee[24]=J=>s("setPermission",J)),onSetThinking:ee[25]||(ee[25]=J=>s("setThinking",J)),onTogglePlan:ee[26]||(ee[26]=J=>s("togglePlan")),onToggleWorkflow:ee[27]||(ee[27]=J=>s("toggleWorkflow")),onToggleGoal:ee[28]||(ee[28]=J=>s("toggleGoal")),onOpenBtw:ee[29]||(ee[29]=J=>s("openBtw")),onCreateGoal:ee[30]||(ee[30]=J=>s("createGoal",J)),onControlGoal:ee[31]||(ee[31]=J=>s("controlGoal",J)),onFocusGoal:ee[32]||(ee[32]=J=>s("focusGoal")),onCompact:ee[33]||(ee[33]=J=>s("compact")),onPickModel:ee[34]||(ee[34]=J=>s("pickModel")),onSelectModel:ee[35]||(ee[35]=J=>s("selectModel",J))},null,8,["session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills"]))],2))}}),eLe=vt(QIe,[["__scopeId","data-v-e4431eaa"]]),tLe=["aria-label","aria-hidden"],nLe=["data-turn-id","tabindex","aria-current","aria-label","onMouseenter","onFocus","onKeydown","onClick"],oLe=["aria-label"],sLe={class:"toc-preview__prompt"},iLe={key:0,class:"toc-preview__response"},lLe=80,rLe=Je({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(null),a=V(!0);let c=null;function u(){const I=i.value,N=I?.offsetParent;if(!I||!N)return;const C=I.getBoundingClientRect(),F=N.getBoundingClientRect();a.value=C.left>=F.left&&C.right<=F.right}const d=B(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1),f=B(()=>l.value!==null&&n.items.some(I=>I.id===l.value)?l.value:n.activeTurnId!==null&&n.items.some(I=>I.id===n.activeTurnId)?n.activeTurnId:n.items[0]?.id??null),p=B(()=>r.value??l.value??n.activeTurnId),h=B(()=>{const I=r.value??l.value;return I===null?void 0:n.items.find(N=>N.id===I)}),m=V(0);let k=null;function x(){k!==null&&clearTimeout(k),k=null}function y(){x(),k=setTimeout(()=>{r.value=null,k=null},lLe)}function w(){return i.value===null?[]:Array.from(i.value.querySelectorAll(".toc-row"))}function _(I,N){let C=I;if(N.key==="ArrowDown")C=Math.min(n.items.length-1,I+1);else if(N.key==="ArrowUp")C=Math.max(0,I-1);else if(N.key==="Home")C=0;else if(N.key==="End")C=n.items.length-1;else return;N.preventDefault(),w()[C]?.focus()}function A(I){const N=I??w().find(F=>F.dataset.turnId===h.value?.id),C=N?.parentElement;!N||!C||(m.value=N.offsetTop-C.scrollTop+N.offsetHeight/2)}function P(I,N){x(),r.value=I,A(N.currentTarget)}function z(I,N){x(),l.value=I,A(N.currentTarget)}function L(I){x();const N=document.activeElement;N instanceof HTMLElement&&i.value?.contains(N)&&N.blur(),r.value=null,l.value=null,o("select",I)}function T(I){const N=I.relatedTarget;(!(N instanceof Node)||!i.value?.contains(N))&&(l.value=null)}return Ke(d,I=>{c?.disconnect(),c=null,I&&yt(()=>{const N=i.value,C=N?.offsetParent;!N||!C||(typeof ResizeObserver<"u"&&(c=new ResizeObserver(u),c.observe(C)),u())})},{immediate:!0}),Ke([()=>n.activeTurnId,d],([I,N])=>{!N||I===null||yt(()=>{const C=w().find(F=>F.dataset.turnId===I);typeof C?.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})})},{immediate:!0}),vo(()=>{x(),c?.disconnect(),c=null}),(I,N)=>d.value?(g(),S("nav",{key:0,ref_key:"navRef",ref:i,class:Be(["conversation-toc",{"toc-clipped":!a.value||e.occluded}]),"aria-label":v(s)("conversation.toc"),"aria-hidden":a.value&&!e.occluded?void 0:!0,onMouseenter:x,onMouseleave:y,onFocusout:T},[b("div",{class:"toc-scroll",onScroll:N[0]||(N[0]=C=>A())},[(g(!0),S(Ce,null,rt(e.items,(C,F)=>(g(),S("button",{key:C.id,type:"button",class:Be(["toc-row",{active:e.activeTurnId===C.id,highlighted:p.value===C.id,previewing:r.value===C.id||l.value===C.id}]),"data-turn-id":C.id,tabindex:f.value===C.id?0:-1,"aria-current":e.activeTurnId===C.id?"location":void 0,"aria-label":C.title,onMouseenter:H=>P(C.id,H),onFocus:H=>z(C.id,H),onKeydown:H=>_(F,H),onClick:H=>L(C.id)},[...N[2]||(N[2]=[b("span",{class:"toc-marker","aria-hidden":"true"},null,-1)])],42,nLe))),128))],32),h.value?(g(),S("button",{key:0,type:"button",class:"toc-preview",style:Gt({top:`${m.value}px`}),"aria-label":h.value.title,tabindex:"-1",onMouseenter:x,onClick:N[1]||(N[1]=C=>L(h.value.id))},[b("span",sLe,E(h.value.title),1),h.value.preview?(g(),S("span",iLe,E(h.value.preview),1)):Y("",!0)],44,oLe)):Y("",!0)],42,tLe)):Y("",!0)}}),aLe=vt(rLe,[["__scopeId","data-v-8a1c40d2"]]),hM="script, style, noscript, template, [inert], .top-sentinel",Qz="pythinker-transcript-search",eg="pythinker-transcript-search-current",cLe=1e3;function uLe(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function dLe(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(l,r)=>r)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let l=0;lmM(c.text)),o=[];let s="";for(let c=0;c0&&e[c].gapBefore&&(s+="\0"),o[c]=s.length,s+=n[c].folded;const i=pLe(mM(t).folded);if(i===null)return;const l=new RegExp(i,"g");function r(c){let u=0,d=o.length-1,f=0;for(;u<=d;){const p=u+d>>1;o[p]<=c?(f=p,u=p+1):d=p-1}return f}let a;for(;;){const c=l.exec(s);if(c===null)return;const u=c.index,d=u+c[0].length-1,f=r(u),p=r(d),h=n[f].map[u-o[f]],m=n[p].map[d-o[p]],k={startSegment:f,startOffset:h.start,endSegment:p,endOffset:m.start+m.length};(a?.startSegment!==k.startSegment||a.startOffset!==k.startOffset||a.endSegment!==k.endSegment||a.endOffset!==k.endOffset)&&(a=k,yield k)}}const mLe=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),gLe=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function vLe(e,t){const n=t.get(e);if(n!==void 0)return n;const o=mLe.has(e.tagName)||!gLe.has(getComputedStyle(e).display);return t.set(e,o),o}function yLe(e,t,n){let o=e.parentElement;for(;o!==null&&o!==t&&!vLe(o,n);)o=o.parentElement;return o??t}function wLe(e){const t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,o=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(a){if(a.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;const c=a;return c.matches(hM)?n.FILTER_REJECT:c.matches("br, hr, wbr")&&!c.closest(hM)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),s=new WeakMap,i=new WeakMap,l=[];let r=!1;for(let a=o.nextNode();a!==null;a=o.nextNode()){if(a.nodeType===Node.ELEMENT_NODE){r=!0;continue}const c=a.nodeValue??"";if(c.length===0)continue;const u=a.parentElement;if(u===null)continue;let d=i.get(u);d===void 0&&(d=uLe(getComputedStyle(u).whiteSpace),i.set(u,d));let{text:f,map:p}=dLe(c,d);if(f.length===0)continue;const h=yLe(a,e,s),m=l.at(-1),k=r||m===void 0||m.block!==h;!k&&m.text.endsWith(" ")&&f.startsWith(" ")&&(f=f.slice(1),p=p.slice(1),f.length===0)||(l.push({text:f,gapBefore:k,node:a,block:h,whitespaceMap:p}),r=!1)}return l}function kLe(e,t){if(t.length===0)return[];const n=wLe(e),o=[];for(const s of hLe(n,t)){const i=n[s.startSegment],l=n[s.endSegment],r=e.ownerDocument.createRange();r.setStart(i.node,i.whitespaceMap[s.startOffset]),r.setEnd(l.node,l.whitespaceMap[s.endOffset-1]+1),o.push(r)}return o}function bLe(e,t,n=o=>o.getClientRects().length!==0){const o=[];for(const s of kLe(e,t))if(n(s)){if(o.length>=cLe)return{ranges:o,truncated:!0};o.push(s)}return{ranges:o,truncated:!1}}function eB(){return globalThis.CSS?.highlights??null}function gM(e,t){const n=eB(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){z4();return}const s=new o;for(const l of e)s.add(l);n.set(Qz,s);const i=e[t];if(i){const l=new o;l.add(i),n.set(eg,l)}else n.delete(eg)}function z4(){const e=eB();e?.delete(Qz),e?.delete(eg)}const _Le={class:"tsearch-main"},xLe=["placeholder"],SLe=["inert"],CLe={class:"tsearch-foot"},MLe={class:"tsearch-count","aria-live":"polite"},ALe={class:"tsearch-rings"},TLe=Je({__name:"TranscriptSearch",props:{pane:{},mobile:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=r4("input"),l=Uo(""),r=Uo(!1),a=Uo([]),c=Uo(0),u=Uo(!1),d=Uo(!1),f=Uo([]),p=B(()=>a.value.length),h=B(()=>l.value.trim()!==""),m=B(()=>{if(r.value)return s("conversation.search.searching");if(!h.value)return"";if(p.value===0)return s("conversation.search.noResults");const O={current:c.value+1,total:p.value};return u.value?s("conversation.search.resultsCapped",O):s("conversation.search.results",O)});let k=null,x=null,y=null,w=null,_=null;function A(){return n.pane.querySelector(".chat")}function P(){const O=a.value[c.value];if(!O){f.value=[];return}const U=n.pane.getBoundingClientRect();f.value=Array.from(O.getClientRects(),Z=>({top:`${Z.top-U.top+n.pane.scrollTop}px`,left:`${Z.left-U.left}px`,width:`${Z.width}px`,height:`${Z.height}px`}))}function z(){f.value.length!==0&&(y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,P()},120))}function L(O){const U=n.pane.getBoundingClientRect().top,Z=O.findIndex(q=>{const te=q.getClientRects(),ee=te[te.length-1];return ee!==void 0&&ee.bottom>=U});return Z===-1?0:Z}function T(){const O=a.value[c.value];gM(a.value,c.value),(O?.startContainer instanceof Element?O.startContainer:O?.startContainer.parentElement)?.scrollIntoView({block:"center"}),P()}function I(O="first"){k!==null&&(clearTimeout(k),k=null),r.value=!1;const U=A(),Z=l.value.trim();if(!U||Z===""){a.value=[],u.value=!1,c.value=0,z4(),P();return}const q=a.value[c.value],te=q?.startContainer,ee=q?.startOffset,J=bLe(U,Z);if(a.value=J.ranges,u.value=J.truncated,J.ranges.length===0){c.value=0,z4(),P();return}if(O!==!1){const Q=L(J.ranges);c.value=O==="backward"?(Q-1+J.ranges.length)%J.ranges.length:Q,T();return}const se=J.ranges.findIndex(Q=>Q.startContainer===te&&Q.startOffset===ee);c.value=se>=0?se:L(J.ranges),gM(J.ranges,c.value),P()}function N(){if(k!==null&&clearTimeout(k),l.value.trim()===""){r.value=!1,I();return}r.value=!0,k=setTimeout(()=>I(),150)}function C(O){p.value!==0&&(c.value=(c.value+O+p.value)%p.value,T())}function F(O){if(!(O.key!=="Enter"||d.value||O.isComposing)){if(O.preventDefault(),k!==null){I(O.shiftKey?"backward":"first");return}C(O.shiftKey?-1:1)}}function H(O){O.key!=="Escape"||d.value||O.isComposing||(O.preventDefault(),O.stopPropagation(),o("close"))}function D(O){return O instanceof Element&&(O.classList.contains("tsearch-rings")||O.closest(".tsearch-rings")!==null)}function M(O){if(O.type==="attributes"&&O.target===n.pane||D(O.target))return!0;if(O.type!=="childList")return!1;const U=[...O.addedNodes,...O.removedNodes];return U.length>0&&U.every(D)}function R(O){l.value.trim()===""||O.every(M)||k!==null||(x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k===null&&I(!1)},150))}return In(()=>{if(yt(()=>i.value?.focus()),typeof MutationObserver=="function"&&(w=new MutationObserver(R),w.observe(n.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),n.pane.addEventListener("scroll",z,{passive:!0}),window.addEventListener("resize",z,{passive:!0}),typeof ResizeObserver=="function"){_=new ResizeObserver(P),_.observe(n.pane);const O=n.pane.querySelector(".content-wrap");O&&_.observe(O)}}),En(()=>{k!==null&&clearTimeout(k),x!==null&&clearTimeout(x),y!==null&&clearTimeout(y),w?.disconnect(),_?.disconnect(),n.pane.removeEventListener("scroll",z),window.removeEventListener("resize",z),z4()}),(O,U)=>(g(),S("div",{class:Be(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:H},[b("div",_Le,[W(Ee,{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Jn(b("input",{ref:"input","onUpdate:modelValue":U[0]||(U[0]=Z=>l.value=Z),type:"text",class:"tsearch-input",placeholder:v(s)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:N,onKeydown:F,onCompositionstart:U[1]||(U[1]=Z=>d.value=!0),onCompositionend:U[2]||(U[2]=Z=>d.value=!1)},null,40,xLe),[[js,l.value]]),r.value?(g(),ue(Zo,{key:0,class:"tsearch-spin",size:"sm",label:v(s)("conversation.search.searching")},null,8,["label"])):Y("",!0),U[6]||(U[6]=b("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),W(Dt,{class:"tsearch-close",size:"sm",label:v(s)("conversation.search.close"),onClick:U[3]||(U[3]=Z=>o("close"))},{default:ae(()=>[W(Ee,{name:"close"})]),_:1},8,["label"])]),b("div",{class:Be(["tsearch-foot-wrap",{open:h.value}]),inert:!h.value},[b("div",CLe,[W(Dt,{size:"sm",label:v(s)("conversation.search.previous"),disabled:p.value===0,onClick:U[4]||(U[4]=Z=>C(-1))},{default:ae(()=>[W(Ee,{name:"arrow-up"})]),_:1},8,["label","disabled"]),W(Dt,{size:"sm",label:v(s)("conversation.search.next"),disabled:p.value===0,onClick:U[5]||(U[5]=Z=>C(1))},{default:ae(()=>[W(Ee,{name:"arrow-down"})]),_:1},8,["label","disabled"]),b("span",MLe,E(m.value),1)])],10,SLe),(g(),ue(hl,{to:e.pane},[b("div",ALe,[(g(!0),S(Ce,null,rt(f.value,(Z,q)=>(g(),S("div",{key:q,class:"tsearch-ring",style:Gt(Z)},null,4))),128))])],8,["to"]))],34))}}),ELe=vt(TLe,[["__scopeId","data-v-d7187e08"]]);function ILe(e,t=2e4){const n=V(`${e}?r=0`);let o=0;const s=setInterval(()=>{o+=1,n.value=`${e}?r=${o}`},t);return En(()=>clearInterval(s)),n}const LLe=["src","alt","role"],$Le=Je({__name:"PythinkerLogo",props:{size:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:"Pythinker Code"},interactive:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=ILe("/brand/mascot-waving.png"),o=e,s=t;function i(){o.interactive&&s("click")}return(l,r)=>(g(),S("img",{src:e.animated?v(n):"/brand/icon.svg",class:Be(["pythinker-logo",[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?"button":"img",onClick:i},null,10,LLe))}}),df=vt($Le,[["__scopeId","data-v-58c4fde0"]]),NLe=5;function zLe(e,t,n,o=NLe){if(n||e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(l=>l.id===t);i&&(s[o-1]=i)}return s}const BLe={key:0,class:"recent"},RLe={class:"recent-caption"},PLe=["onClick"],FLe={class:"recent-title"},jLe={class:"recent-time"},OLe={class:"recent-foot"},HLe=Je({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["select","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>e.sessions.length?(g(),S("section",BLe,[b("h2",RLe,E(v(o)("sessions.recentSessions")),1),(g(!0),S(Ce,null,rt(e.sessions,l=>(g(),S("button",{key:l.id,type:"button",class:"recent-row",onClick:r=>n("select",l.id)},[b("span",{class:Be(["recent-ico",l.archived?"recent-ico--done":"recent-ico--open"])},[W(Ee,{name:l.archived?"circle-check":"circle-dashed",size:"sm"},null,8,["name"])],2),b("span",FLe,E(l.title),1),b("span",jLe,E(l.time),1)],8,PLe))),128)),b("div",OLe,[W(Cn,{text:v(o)("conversation.sessionAdminTooltip")},{default:ae(()=>[b("button",{type:"button",class:"recent-more",onClick:i[0]||(i[0]=l=>n("openSessionAdmin"))},[He(E(v(o)("conversation.viewMoreSessions"))+" ",1),W(Ee,{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])])):Y("",!0)}}),DLe=vt(HLe,[["__scopeId","data-v-cd5a729d"]]),VLe={class:"chat-layout"},WLe={class:"empty-hint"},qLe={key:0,class:"empty-hint-text"},ULe={key:1,class:"ws-pick"},ZLe={class:"ws-pick-name"},KLe={key:1,class:"ws-pick-menu"},GLe=["onClick"],YLe={class:"ws-pick-item-name"},XLe={class:"ws-pick-item-path"},JLe=["aria-label"],QLe={key:0,class:"abort-toast",role:"status","aria-live":"polite"},e$e={class:"abort-toast-text"},t$e=48,e8=80,vM=1e3,n$e=420,o$e=3e3,s$e=Je({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{},revealSavedPlan:{type:Function},panelVisible:{type:Boolean},panelExpanded:{type:Boolean},activePanelType:{},togglePanel:{type:Function}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","steerQueued","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","openFile","openMedia","openCompaction","openAgent","detachTask","openToolDiff","openTurnDiff","openChanges","refreshGitStatus","editMessage","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","restoreSession","selectSession","exportSession","togglePin","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),s=e,i=n,l=V(!1),r=V(!1),a=B(()=>s.workspaces?.find(Ie=>Ie.id===s.activeWorkspaceId)?.name??s.workspaceName??""),c=B(()=>(s.workspaces?.length??0)>0),u=B(()=>zLe(s.workspaces??[],s.activeWorkspaceId,r.value)),d=B(()=>(s.workspaces?.length??0)-u.value.length);Ke(l,Ae=>{Ae||(r.value=!1)});function f(Ae){l.value=!1,Ae!==s.activeWorkspaceId&&i("selectWorkspace",Ae)}y1(dn.contentAlign);const p=V(null),h=V(null),m=V(null),k=V(!1);let x=null;function y(Ae,Ie){const At=m.value??h.value;return!At||At.loadForEdit(Ae)===!1?!1:(At.loadAttachmentsForEdit(Ie??[]),!0)}function w(){k.value=!0,x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,k.value=!1},2e3)}function _(){s.goal&&(M.value="goal")}const A=B(()=>s.tasks.filter(Ae=>Ae.kind==="bash"||Ae.kind==="tool"&&!Ae.id.startsWith("question-"))),P=B(()=>s.tasks.filter(Ae=>Ae.kind==="subagent"&&Ae.runInBackground)),z=B(()=>A.value.filter(Ae=>Ae.state==="run").length),L=B(()=>P.value.filter(Ae=>Ae.state==="run").length);function T(Ae){const Ie=s.tasks,At=Ie.find(mn=>mn.id===Ae)??Ie.find(mn=>mn.parentToolCallId===Ae);if(At)return At.id;const lt=Ie.filter(mn=>mn.kind==="subagent"&&!mn.parentToolCallId);if(lt.length===1)return lt[0].id}qn("resolveAgentTaskId",T);function I(Ae){const Ie=s.tasks.filter(At=>At.id===Ae||At.parentToolCallId===Ae);if(Ie.length!==0)return Ie.some(At=>At.state==="run"&&At.runInBackground!==!0)}qn("resolveDetachableTask",I);const N=fn("modelDisplay"),C=fn("subagentEffort");function F(Ae){const Ie=T(Ae);if(Ie===void 0)return;const At=s.tasks.find(Kn=>Kn.id===Ie||Kn.agentId===Ie),lt=N?.(At?.model),mn=C?.(At?.thinkingEffort);if(!(lt===void 0&&mn===void 0))return{display:lt,effort:mn}}qn("resolveAgentModel",F),qn("resolvePlan",Ae=>s.sessionPlans?.[Ae]),qn("revealSavedPlan",(Ae,Ie)=>s.revealSavedPlan?.(Ae,Ie)??Promise.resolve(!1)),qn("pinScroll",hs);const H=B(()=>(s.todos??[]).filter(Ae=>Ae.status==="done").length),D=B(()=>s.goal!==null&&s.goal!==void 0||A.value.length>0||P.value.length>0||(s.todos?.length??0)>0),M=V(null),R=B(()=>s.gitInfo?s.changes?.length??0:0);function O(Ae){M.value=M.value===Ae?null:Ae}function U(){M.value=null}Ke([M,()=>s.goal,A,P,()=>s.todos,()=>s.planMode,()=>s.sessionPlans],()=>{(M.value==="goal"&&!s.goal||M.value==="bash"&&A.value.length===0||M.value==="subagent"&&P.value.length===0||M.value==="todos"&&(s.todos?.length??0)===0||M.value==="plan"&&!s.planMode&&Object.keys(s.sessionPlans??{}).length===0)&&U()});function Z(Ae){if(Ae.role==="compaction")return o("conversation.compactedPlain");if(Ae.role==="user"){if(Ae.skillActivation)return`/${Ae.skillActivation.name}`;if(Ae.pluginCommand)return`/${Ae.pluginCommand.pluginId}:${Ae.pluginCommand.commandName}`;const At=Ae.text.trim().replaceAll(/\s+/g," ");return At.length>0?At:"user"}const Ie=(Ae.text||Ae.thinking||"").trim().replaceAll(/\s+/g," ");return Ie.length>0?Ie:(Ae.tools?.length??0)>0?`${Ae.tools.length} tools`:"pythinker"}function q(Ae){for(let Ie=Ae+1;Ie0)return lt}return""}const te=B(()=>{let Ae=0;return s.turns.flatMap((Ie,At)=>Ie.role!=="user"?[]:(Ae+=1,[{id:Ie.id,role:Ie.role,no:Ae,title:Z(Ie),preview:q(At)}]))}),ee=V(null);function J(){const Ae=j.value;if(!Ae)return;const Ie=Ae.querySelectorAll(".turn-anchor[data-turn-id]");if(Ie.length===0)return;const At=te.value;if(At.length===0)return;const lt=new Set(At.map(Co=>Co.id));if(le.value&&ge()<=e8){ee.value=At[At.length-1].id;return}const mn=Ae.getBoundingClientRect(),Kn=mn.height/2;let to=null;Ie.forEach(Co=>{const no=Co.dataset.turnId;if(!no||!lt.has(no))return;Co.getBoundingClientRect().top-mn.top<=Kn&&(to=no)}),ee.value=to??At[0].id}const se=V(!1);let Q=0;function me(){Q||(Q=Qn(()=>{Q=0,xe()}))}function xe(){const Ae=j.value,Ie=!s.mobile&&s.conversationToc&&Ae?Ae.closest(".con")?.querySelector(".conversation-toc"):null,At=Ie?.querySelector(".toc-marker");let lt=!1;if(Ae&&Ie&&At){const mn=At.getBoundingClientRect(),Kn=Ie.getBoundingClientRect(),to=mn.left+mn.width/2;lt=Array.from(Ae.querySelectorAll(".table-node-wrapper")).some(Co=>{const no=Co.getBoundingClientRect();return no.left<=to&&to<=no.right&&no.topKn.top})}se.value!==lt&&(se.value=lt)}const Ye=B(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),at=B(()=>{const Ae=Ye.value;if(Ae)return s.pendingQuestionActions?.[Ae.questionId]}),X=B(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),oe=B(()=>{const Ae=X.value;return Ae?!!s.pendingApprovalActions?.[Ae.approvalId]:!1}),j=V(null),K=V(!1),he=V(null),ye=V(0),ve=V(0),ie=B(()=>({"--panes-scrollbar-width":`${ye.value}px`})),de=B(()=>({"--chat-dock-height":`${ve.value+t$e}px`}));function be(Ae){return Ae instanceof HTMLElement?Ae:Ae&&"$el"in Ae&&Ae.$el instanceof HTMLElement?Ae.$el:null}function Se(){const Ae=j.value;ye.value=Ae?Math.max(0,Ae.offsetWidth-Ae.clientWidth):0,ve.value=he.value?.offsetHeight??0}function je(Ae){const Ie=be(Ae);j.value=Ie,Ie&&ql()}function et(Ae){const Ie=be(Ae);he.value=Ie??null,Ae&&"loadForEdit"in Ae&&typeof Ae.loadForEdit=="function"&&"focus"in Ae&&typeof Ae.focus=="function"?m.value={loadForEdit:Ae.loadForEdit.bind(Ae),loadAttachmentsForEdit:"loadAttachmentsForEdit"in Ae&&typeof Ae.loadAttachmentsForEdit=="function"?Ae.loadAttachmentsForEdit.bind(Ae):()=>{},insertQuote:"insertQuote"in Ae&&typeof Ae.insertQuote=="function"?Ae.insertQuote.bind(Ae):()=>{},focus:Ae.focus.bind(Ae)}:m.value=null,oi()}const le=V(!0),fe=V(!1);function ge(){const Ae=j.value;return Ae?Ae.scrollHeight-Ae.scrollTop-Ae.clientHeight:0}let Oe=0,Fe=0,pt=0,kt=0,qt=0,nn=0;function Jt(){return Date.now()1?(le.value=!1,fe.value=!0):At<=e8&&Ie>Oe+1&&(le.value=!0,fe.value=!1),Oe=Ie,J()}function Dn(Ae=!1){const Ie=j.value;le.value=!0,fe.value=!1,Ie&&(!Ae&&performance.now()({node:Kn,top:xn(Ae,Kn)})),lt=At.findIndex(Kn=>Kn.top>=Ie),mn=lt<0?Math.max(0,At.length-1):lt;return At.slice(mn,mn+2).flatMap(Kn=>{const to=Kn.node.dataset.scrollAnchorId,Co=to??Kn.node.dataset.turnId;return Co?[{kind:to?"tool":"turn",id:Co,top:Kn.top}]:[]})}const Hn=new Map;function bn(Ae,Ie){for(const At of Ie.anchors){const lt=At.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",mn=Ae.querySelector(`[${lt}="${Mn(At.id)}"]`);if(mn)return xn(Ae,mn)-At.top}return Ae.scrollHeight-Ie.oldHeight}function Wn(Ae,Ie,At=Ae.scrollTop){return Ae.scrollTop=At+bn(Ae,Ie),Oe=Ae.scrollTop,Ae.scrollTop}async function Pn(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Xe.value||!s.hasMoreMessages)return;const Ae=s.sessionId,Ie=j.value,At=Ie?.scrollTop??0,lt={anchors:Ie?$n(Ie,At):[],oldHeight:Ie?.scrollHeight??0};qe(Ae,!0),bt();try{if(await yt(),await s.loadOlderMessages(Ae),await yt(),s.sessionId!==Ae){Hn.set(Ae,lt);return}const mn=j.value;if(!mn)return;Wn(mn,lt),Hn.delete(Ae)}finally{qe(Ae,!1)}}function Mn(Ae){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(Ae):Ae.replaceAll(/["\\]/g,"\\$&")}function Nn(Ae){const Ie=j.value;if(!Ie)return;const At=Ie.querySelector(`.turn-anchor[data-turn-id="${Mn(Ae)}"]`);At&&(Lt(),le.value=!1,ee.value=Ae,fe.value=ge()>e8,At.scrollIntoView({behavior:"smooth",block:"center"}))}function An(){const Ae=j.value;if(!Ae)return"none";const Ie=Ae.firstElementChild,At=Ie instanceof HTMLElement?Ie.offsetHeight:0,lt=he.value?.offsetHeight??0;return`${Ae.scrollHeight}:${Ae.clientHeight}:${At}:${lt}`}function Qn(Ae){return typeof requestAnimationFrame=="function"?requestAnimationFrame(Ae):setTimeout(Ae,16)}function Fn(Ae){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(Ae):clearTimeout(Ae)}let Qt=0,uo=0,Zn=null,Bo=0;function Un(){return performance.now(){if(uo=0,performance.now()>=Qt||!Zn){Zn=null;return}const mn=Zn.getBoundingClientRect().top-Bo;mn&&(At.scrollTop+=mn),uo=Qn(lt)};uo=Qn(lt)}function Io(Ae=36){if(!le.value&&!Jt())return;const Ie=++nn;let At="",lt=0,mn=0;qt&&(Fn(qt),qt=0);const Kn=()=>{if(qt=0,Ie!==nn||!le.value&&!Jt())return;Dn(!1);const to=An();lt=to===At?lt+1:0,At=to,mn++,lt<3&&mn0&&Ie.length>=Ae.length&&Ae.firstId!==Ie.firstId&&Ae.lastId===Ie.lastId&&Ae.lastTextLen===Ie.lastTextLen&&Ae.lastThinkingLen===Ie.lastThinkingLen&&Ae.lastToolsLen===Ie.lastToolsLen&&Ae.approvalIds===Ie.approvalIds}const Jo=B(()=>{const Ae=(s.approvals??[]).map(Kn=>Kn.approvalId).join(","),Ie=s.turns,At=Ie.at(-1),lt=At?.thinking?.length??0,mn=At?.tools?.reduce((Kn,to)=>Kn+to.name.length+(to.arg?.length??0)+(to.output?.join("").length??0),0)??0;return{length:Ie.length,firstId:Ie[0]?.id??"",lastId:At?.id??"",lastTextLen:At?.text.length??0,lastThinkingLen:lt,lastToolsLen:mn,approvalIds:Ae}});Ke(Jo,async(Ae,Ie)=>{if(Xe.value&&Rt(Ie,Ae)){J();return}await yt(),le.value||Jt()?Dn(Ae.length{oi()}),Ke(()=>s.mobile,async()=>{await yt(),Se()});const Ls=new Map;Ke(()=>s.fileReloadKey,async(Ae,Ie)=>{const At=j.value;Ie&&At&&Ls.set(String(Ie),{top:At.scrollTop,following:le.value}),Lt(),await yt();const lt=j.value,mn=Ae?Ls.get(String(Ae)):void 0;if(mn&<){const Kn=Hn.get(String(Ae)),to=Kn?Wn(lt,Kn,mn.top):mn.top;Kn&&Hn.delete(String(Ae)),le.value=mn.following,lt.scrollTop=to,Oe=lt.scrollTop,fe.value=!mn.following&&ge()>1,mn.following&&Io()}else le.value=!0,Oe=0,Dn(!1),Io();J()}),Ke(()=>s.sessionLoading,async(Ae,Ie)=>{Ae||!Ie||(le.value=!0,await yt(),Io(),J())}),Ke(()=>s.turnActive,async(Ae,Ie)=>{Ae||!Ie||!le.value&&!Jt()||(await yt(),Io(48),J())});function $e(){le.value=!0,fe.value=!1,Fe=Date.now()+vM,yt(()=>{Dn(!0),Io(16)})}function Ge(Ae){$e(),i("submit",Ae)}function ot(Ae){le.value=!0,fe.value=!1,Fe=Date.now()+vM,i("editMessage",Ae)}function dt(Ae){const Ie=s.queued?.[Ae],At=Ie?.text??"";y(At,Ie?.attachments)&&i("editQueued",Ae)}function Mt(Ae){i("reorderQueue",Ae)}function Ft(Ae,Ie){$e(),i("answer",Ae,Ie)}function Ut(Ae,Ie){!Ae||!Ie||i("approval",Ae,Ie)}let en=null,tn=null,eo=null,Ro=null,$s=0,Do=0,We=0;const st=V(new Set),Xe=B(()=>!!s.sessionId&&st.value.has(s.sessionId));function qe(Ae,Ie){const At=new Set(st.value);Ie?At.add(Ae):At.delete(Ae),st.value=At}function Pe(){Xe.value||We||(We=Qn(()=>{We=0,!Xe.value&&(Un()||(le.value||Jt())&&Dn(!1))}))}function bt(){nn++,qt&&(Fn(qt),qt=0),We&&(Fn(We),We=0)}function Lt(){const Ae=j.value;if(Fe=0,bt(),Qt=0,Zn=null,Ae){const Ie=Ae.scrollTop;typeof Ae.scrollTo=="function"?Ae.scrollTo({top:Ie,behavior:"auto"}):Ae.scrollTop=Ie}kt=0,pt=Number.NEGATIVE_INFINITY,Ae&&(Oe=Ae.scrollTop)}function cn(){const Ae=j.value;!Ae||Ae.scrollHeight-Ae.clientHeight<=1&&!s.hasMoreMessages||(le.value=!1,Lt(),Ae.scrollHeight-Ae.clientHeight>1&&(fe.value=!0))}function So(Ae){const Ie=j.value;if(!Ie)return!1;for(const At of Ae.composedPath()){if(At===Ie)return!1;if(At instanceof HTMLElement&&At.scrollHeight>At.clientHeight+1&&At.scrollTop>1)return!0}return!1}function Qo(Ae){Ae.defaultPrevented||Ae.ctrlKey||Ae.shiftKey||Ae.deltaY>=0||So(Ae)||cn()}function Po(Ae){const Ie=j.value;if(!Ie||Ae.defaultPrevented||Ae.button!==0||Ae.pointerType==="touch")return;const At=Ie.getBoundingClientRect(),lt=Ie.offsetWidth-Ie.clientWidth,mn=lt>0?lt:12;Ae.target===Ie&&Ae.clientX>=At.right-mn&&cn()}let Xn=null;function pn(Ae){Xn=Ae.touches.length===1?Ae.touches[0].clientY:null}function Us(Ae){const Ie=Ae.touches.length===1?Ae.touches[0].clientY:null;Ie!==null&&Xn!==null&&Ie>Xn+2&&!So(Ae)&&cn(),Xn=Ie}function mi(){if(!tn)return;const Ae=j.value?.firstElementChild??null;Ae!==eo&&(eo&&tn.unobserve(eo),eo=Ae,Ae&&tn.observe(Ae))}function oi(){if(!tn)return;const Ae=he.value;Ae!==Ro&&(Ro&&tn.unobserve(Ro),Ro=Ae,Ae&&tn.observe(Ae))}function ql(){const Ae=j.value;Se(),en&&(en.disconnect(),Ae&&en.observe(Ae,{childList:!0,subtree:!0,characterData:!0})),tn&&(tn.disconnect(),eo=null,Ro=null,Ae&&tn.observe(Ae),mi(),oi()),$s=Ae?.scrollHeight??0,Do=Ae?.clientHeight??0,me()}function vl(){mi(),Pe(),me()}function Zs(){typeof document>"u"||document.visibilityState==="visible"&&le.value&&Io()}const yo=V(!1);let Lo=null;function yl(){yo.value=!0,Lo!==null&&clearTimeout(Lo),Lo=setTimeout(()=>{yo.value=!1},o$e)}function ms(){yl(),i("interrupt")}function wl(Ae){if((Ae.metaKey||Ae.ctrlKey)&&Ae.key.toLowerCase()==="f"){if(s.overlayOpen)return;Ae.preventDefault(),K.value=!0,yt(()=>{j.value?.closest(".con")?.querySelector(".tsearch-input")?.focus()});return}Ae.key==="Escape"&&(s.running||s.working)&&(Ae.preventDefault(),ms())}function gi(){K.value=!1,yt(()=>j.value?.focus({preventScroll:!0}))}function si(){le.value&&Pe()}In(()=>{yt(()=>{typeof MutationObserver=="function"&&(en=new MutationObserver(vl)),typeof ResizeObserver=="function"&&(tn=new ResizeObserver(()=>{me(),Se();const Ae=j.value;if(!Ae)return;const{scrollHeight:Ie,clientHeight:At}=Ae,lt=Ie>$s+1,mn=At{en&&en.disconnect(),tn&&tn.disconnect(),We&&Fn(We),qt&&Fn(qt),uo&&Fn(uo),Q&&Fn(Q),Lo!==null&&clearTimeout(Lo),x!==null&&(clearTimeout(x),x=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Zs),document.removeEventListener("keydown",wl)),window.visualViewport?.removeEventListener("resize",si)});function Ul(){(m.value??h.value)?.focus()}function Ni(Ae){(m.value??h.value)?.insertQuote(Ae)}return t({loadComposerForEdit:y,focusComposer:Ul,insertComposerQuote:Ni}),(Ae,Ie)=>{const At=wg("IconButton");return g(),S("section",{class:Be(["con",{mobile:e.mobile,"toc-enabled":e.conversationToc}]),style:Gt(de.value)},[K.value&&j.value?(g(),ue(ELe,{key:0,pane:j.value,mobile:e.mobile,onClose:gi},null,8,["pane","mobile"])):Y("",!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(g(),ue(swe,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":R.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,"session-done":e.sessionDone,pinned:e.pinned,"panel-visible":e.panelVisible,onOpenChanges:Ie[0]||(Ie[0]=lt=>i("openChanges")),onCopyAll:Ie[1]||(Ie[1]=lt=>p.value?.copyConversation()),onCopyFinalSummary:Ie[2]||(Ie[2]=lt=>p.value?.copyFinalSummary()),onOpenPr:Ie[3]||(Ie[3]=lt=>e.pr&&i("openPr",e.pr.url)),onRenameSession:Ie[4]||(Ie[4]=(lt,mn)=>i("renameSession",lt,mn)),onForkSession:Ie[5]||(Ie[5]=lt=>i("forkSession",lt)),onTogglePin:Ie[6]||(Ie[6]=lt=>i("togglePin",lt)),onArchiveSession:Ie[7]||(Ie[7]=lt=>i("archiveSession",lt)),onRestoreSession:Ie[8]||(Ie[8]=lt=>i("restoreSession",lt)),onExportSession:Ie[9]||(Ie[9]=lt=>i("exportSession",lt)),onTogglePanel:Ie[10]||(Ie[10]=lt=>e.togglePanel?.())},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","session-done","pinned","panel-visible"])):Y("",!0),!e.mobile&&!e.panelVisible&&e.turns.length===0&&!e.sessionLoading?(g(),ue(At,{key:2,class:"empty-panel-btn",label:v(o)("panel.openPanel"),onClick:Ie[11]||(Ie[11]=lt=>e.togglePanel?.())},{default:ae(()=>[W(Ee,{name:"panel-expand-right"})]),_:1},8,["label"])):Y("",!0),e.conversationToc?(g(),ue(aLe,{key:3,items:te.value,"active-turn-id":ee.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:se.value,onSelect:Nn},null,8,["items","active-turn-id","mobile","session-loading","occluded"])):Y("",!0),b("div",VLe,[b("div",{ref:je,class:Be(["panes chat-scroll",{"is-following":le.value,"history-prepending":Xe.value}]),tabindex:"-1",onScrollPassive:kn,onWheelPassive:Qo,onPointerdownPassive:Po,onTouchstartPassive:pn,onTouchmovePassive:Us},[b("div",{class:Be(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(g(),S(Ce,{key:0},[Ie[64]||(Ie[64]=b("div",{class:"empty-spacer"},null,-1)),b("div",WLe,[b("span",{class:Be(["empty-hint-title",{"is-starting":e.starting}])},[e.starting?(g(),ue(Zo,{key:0,size:"sm"})):(g(),ue(df,{key:1,size:"md",label:"","aria-hidden":"true"})),b("span",null,E(e.starting?v(o)("conversation.starting"):v(o)("composer.emptyConversationTitle")),1)],2),e.starting?Y("",!0):(g(),S("span",qLe,E(v(o)("composer.emptyConversation")),1)),c.value&&!e.starting?(g(),S("div",ULe,[W(Cn,{text:v(o)("conversation.switchWorkspace")},{default:ae(()=>[b("button",{type:"button",class:"ws-pick-btn",onClick:Ie[12]||(Ie[12]=xt(lt=>l.value=!l.value,["stop"]))},[W(Ee,{name:"folder",size:"sm"}),b("span",ZLe,E(a.value),1),W(Ee,{class:Be(["ws-pick-chev",{open:l.value}]),name:"chevron-down",size:"sm"},null,8,["class"])])]),_:1},8,["text"]),l.value?(g(),S("div",{key:0,class:"ws-pick-backdrop",onClick:Ie[13]||(Ie[13]=lt=>l.value=!1)})):Y("",!0),l.value?(g(),S("div",KLe,[(g(!0),S(Ce,null,rt(u.value,lt=>(g(),S("button",{key:lt.id,type:"button",class:Be(["ws-pick-item",{on:lt.id===e.activeWorkspaceId}]),onClick:xt(mn=>f(lt.id),["stop"])},[b("span",YLe,E(lt.name),1),b("span",XLe,E(lt.shortPath),1)],10,GLe))),128)),d.value>0?(g(),S("button",{key:0,type:"button",class:"ws-pick-item ws-pick-more",onClick:Ie[14]||(Ie[14]=xt(lt=>r.value=!r.value,["stop"]))},[b("span",null,E(v(o)("conversation.moreWorkspaces",{count:d.value})),1)])):Y("",!0),Ie[63]||(Ie[63]=b("div",{class:"ws-pick-divider"},null,-1)),b("button",{type:"button",class:"ws-pick-action",onClick:Ie[15]||(Ie[15]=xt(lt=>{l.value=!1,i("addWorkspace")},["stop"]))},[W(Ee,{name:"plus",size:"sm"}),b("span",null,E(v(o)("conversation.addWorkspace")),1)])])):Y("",!0)])):e.starting?Y("",!0):(g(),S("button",{key:2,type:"button",class:"empty-add-workspace",onClick:Ie[16]||(Ie[16]=lt=>i("addWorkspace"))},[W(Ee,{name:"folder-plus",size:"sm"}),b("span",null,E(v(o)("conversation.addWorkspace")),1)]))]),e.sessionId?Y("",!0):(g(),ue(DLe,{key:0,sessions:e.recentSessions??[],onSelect:Ie[17]||(Ie[17]=lt=>i("selectSession",lt)),onOpenSessionAdmin:Ie[18]||(Ie[18]=lt=>i("openSessionAdmin"))},null,8,["sessions"])),W(Xz,{ref_key:"emptyComposerRef",ref:h,class:"empty-composer","session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:Ge,onSteer:Ie[19]||(Ie[19]=lt=>i("steer",lt)),onCommand:Ie[20]||(Ie[20]=lt=>i("command",lt)),onInterrupt:ms,onUnqueue:Ie[21]||(Ie[21]=lt=>i("unqueue",lt)),onEditQueued:Ie[22]||(Ie[22]=lt=>i("editQueued",lt)),onSetPermission:Ie[23]||(Ie[23]=lt=>i("setPermission",lt)),onSetThinking:Ie[24]||(Ie[24]=lt=>i("setThinking",lt)),onTogglePlan:Ie[25]||(Ie[25]=lt=>i("togglePlan")),onToggleWorkflow:Ie[26]||(Ie[26]=lt=>i("toggleWorkflow")),onToggleGoal:Ie[27]||(Ie[27]=lt=>i("toggleGoal")),onOpenBtw:Ie[28]||(Ie[28]=lt=>i("command","/btw")),onCreateGoal:Ie[29]||(Ie[29]=lt=>i("createGoal",lt)),onControlGoal:Ie[30]||(Ie[30]=lt=>i("controlGoal",lt)),onFocusGoal:_,onCompact:Ie[31]||(Ie[31]=lt=>i("compact")),onPickModel:Ie[32]||(Ie[32]=lt=>i("pickModel")),onSelectModel:Ie[33]||(Ie[33]=lt=>i("selectModel",lt))},null,8,["session-id","running","queued","search-files","upload-image","status","thinking","plan-mode","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills","starting"]),Ie[65]||(Ie[65]=b("div",{class:"empty-spacer"},null,-1))],64)):(g(),ue(f9,{ref_key:"chatPaneRef",ref:p,key:e.fileReloadKey??"no-session",turns:e.turns,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":le.value,"tool-diff-panel":!0,"turn-folding":e.turnFolding??!0,"activity-run-folding":e.activityRunFolding??!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:Ie[34]||(Ie[34]=lt=>i("openFile",lt)),onOpenMedia:Ie[35]||(Ie[35]=lt=>i("openMedia",lt)),onCopyConversationCopied:w,onOpenCompaction:Ie[36]||(Ie[36]=lt=>i("openCompaction",lt)),onOpenAgent:Ie[37]||(Ie[37]=lt=>i("openAgent",lt)),onDetachTask:Ie[38]||(Ie[38]=lt=>i("detachTask",lt)),onOpenToolDiff:Ie[39]||(Ie[39]=lt=>i("openToolDiff",lt)),onOpenTurnDiff:Ie[40]||(Ie[40]=lt=>i("openTurnDiff",lt)),onEditMessage:ot,onLoadOlderMessages:Pn,onUnqueue:Ie[41]||(Ie[41]=lt=>i("unqueue",lt)),onEditQueued:dt,onReorderQueue:Mt,onSteerQueued:Ie[42]||(Ie[42]=lt=>i("steerQueued",lt)),onContinueTurn:Ie[43]||(Ie[43]=lt=>Ge({text:lt,attachments:[]}))},null,8,["turns","approvals","questions","turn-active","working","fast-moon","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","cwd","queued"]))],2)],34),(g(),ue(hl,{defer:"",to:".pfc-host",disabled:!e.panelExpanded||e.activePanelType==="btw"},[e.turns.length===0&&!e.sessionLoading?Y("",!0):(g(),ue(eLe,{key:0,ref:et,style:Gt(ie.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":lt=>i("openFile",lt),"reveal-saved-plan":e.revealSavedPlan,"dock-panel":M.value,"bash-tasks":A.value,"subagent-tasks":P.value,"bash-running":z.value,"subagent-running":L.value,"todo-done-count":H.value,"has-dock-work":D.value,todos:e.todos,"pending-question":Ye.value,"question-busy-kind":at.value,"pending-approval":X.value,"approval-busy":oe.value,mobile:e.mobile,onToggleDockPanel:Ie[44]||(Ie[44]=lt=>O(lt)),onCloseDockPanel:Ie[45]||(Ie[45]=lt=>U()),onOpenAgent:Ie[46]||(Ie[46]=lt=>i("openAgent",lt)),onAnswer:Ft,onDismiss:Ie[47]||(Ie[47]=lt=>i("dismiss",lt)),onApproval:Ut,onCancelTask:Ie[48]||(Ie[48]=lt=>i("cancelTask",lt)),onControlGoal:Ie[49]||(Ie[49]=lt=>i("controlGoal",lt)),onSubmit:Ge,onSteer:Ie[50]||(Ie[50]=lt=>i("steer",lt)),onCommand:Ie[51]||(Ie[51]=lt=>i("command",lt)),onInterrupt:ms,onSetPermission:Ie[52]||(Ie[52]=lt=>i("setPermission",lt)),onSetThinking:Ie[53]||(Ie[53]=lt=>i("setThinking",lt)),onTogglePlan:Ie[54]||(Ie[54]=lt=>i("togglePlan")),onToggleWorkflow:Ie[55]||(Ie[55]=lt=>i("toggleWorkflow")),onToggleGoal:Ie[56]||(Ie[56]=lt=>i("toggleGoal")),onOpenBtw:Ie[57]||(Ie[57]=lt=>i("command","/btw")),onCreateGoal:Ie[58]||(Ie[58]=lt=>i("createGoal",lt)),onFocusGoal:_,onCompact:Ie[59]||(Ie[59]=lt=>i("compact")),onPickModel:Ie[60]||(Ie[60]=lt=>i("pickModel")),onSelectModel:Ie[61]||(Ie[61]=lt=>i("selectModel",lt))},null,8,["style","session-id","running","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","working","goal-mode","dynamic-workflow-mode","activation-badges","models","starred-ids","skills","goal","session-plans","overlay-open","open-file","reveal-saved-plan","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile"]))],8,["disabled"]))]),W(qi,{name:"pill"},{default:ae(()=>[fe.value?(g(),S("button",{key:0,class:"newmsg-pill",style:Gt({bottom:`${ve.value+12}px`}),"aria-label":v(o)("conversation.jumpToLatestAria"),onClick:Ie[62]||(Ie[62]=lt=>Dn(!0))},[W(Ee,{class:"pill-chevron",name:"chevron-down",size:"md"}),He(" "+E(v(o)("conversation.newMessages")),1)],12,JLe)):Y("",!0)]),_:1}),W(qi,{name:"abort-toast"},{default:ae(()=>[yo.value?(g(),S("div",QLe,[b("span",e$e,E(v(o)("conversation.manuallyAborted")),1)])):Y("",!0)]),_:1})],6)}}}),i$e=vt(s$e,[["__scopeId","data-v-0a30b1ee"]]),l$e=["role","aria-label"],r$e={key:0,class:"sab-comment"},a$e=["placeholder"],c$e=["disabled"],u$e=Je({__name:"SelectionActionBar",props:{enabled:{type:Boolean},panelSource:{}},emits:["add"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(!1),l=V(!1),r=V(""),a=V(""),c=V(),u=V({}),d=V(null),f=V(null);let p=0;function h(){i.value=!1,l.value=!1,r.value=""}function m(L){const T=L.commonAncestorContainer;return T.nodeType===Node.ELEMENT_NODE?T:T.parentElement}function k(){if(p=0,!n.enabled||l.value&&d.value?.contains(document.activeElement))return;const L=window.getSelection();if(!L||L.rangeCount===0||L.isCollapsed){h();return}const T=L.getRangeAt(0),I=m(T),N=I?.closest(".con, .pt-body");if(!I||!N||I.closest('.sab, input, textarea, button, [contenteditable="true"]')){h();return}const C=L.toString().trim(),F=T.getBoundingClientRect();if(!C||F.width===0&&F.height===0){h();return}a.value=C,c.value=N.classList.contains("pt-body")?n.panelSource:void 0;const H=220,D=Math.min(window.innerWidth-H-8,Math.max(8,F.left+F.width/2-H/2)),M=F.bottom+8;u.value={left:`${Math.round(D)}px`,top:`${Math.round(M)}px`,width:`${H}px`},i.value=!0,l.value=!1}function x(){p&&cancelAnimationFrame(p),p=requestAnimationFrame(k)}function y(){window.getSelection()?.removeAllRanges()}function w(L){const T=a.value.trim();if(!T)return;const I=L?.trim();o("add",{quote:T,comment:I||void 0,source:c.value}),y(),h()}function _(){l.value=!0,yt(()=>f.value?.focus())}function A(L){if(l.value||L.key!=="ArrowDown"&&L.key!=="ArrowUp")return;L.preventDefault();const T=Array.from(d.value?.querySelectorAll(".sab-action")??[]),I=T.indexOf(document.activeElement),N=L.key==="ArrowDown"?(I+1)%T.length:(I-1+T.length)%T.length;T[N]?.focus()}function P(L){!i.value||d.value?.contains(L.target)||h()}function z(L){L.key==="Escape"&&i.value&&(L.preventDefault(),L.stopImmediatePropagation(),h())}return In(()=>{document.addEventListener("selectionchange",x),document.addEventListener("pointerdown",P,!0),document.addEventListener("keydown",z,!0)}),En(()=>{p&&cancelAnimationFrame(p),document.removeEventListener("selectionchange",x),document.removeEventListener("pointerdown",P,!0),document.removeEventListener("keydown",z,!0)}),(L,T)=>(g(),ue(hl,{to:"body"},[i.value?(g(),S("div",{key:0,ref_key:"barRef",ref:d,class:"sab",style:Gt(u.value),role:l.value?"dialog":"menu","aria-label":l.value?v(s)("selection.comment"):void 0,onPointerdown:T[4]||(T[4]=xt(()=>{},["prevent"])),onKeydown:A},[l.value?(g(),S("div",r$e,[Jn(b("input",{ref_key:"commentInputRef",ref:f,"onUpdate:modelValue":T[0]||(T[0]=I=>r.value=I),placeholder:v(s)("selection.commentPlaceholder"),onKeydown:T[1]||(T[1]=go(xt(I=>w(r.value),["prevent"]),["enter"]))},null,40,a$e),[[js,r.value]]),b("button",{type:"button",disabled:!r.value.trim(),onClick:T[2]||(T[2]=I=>w(r.value))},E(v(s)("selection.confirm")),9,c$e)])):(g(),S(Ce,{key:1},[b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:_},[W(Ee,{name:"message",size:"sm"}),b("span",null,E(v(s)("selection.comment")),1)]),b("button",{type:"button",class:"sab-action",role:"menuitem",onClick:T[3]||(T[3]=I=>w())},[W(Ee,{name:"plus",size:"sm"}),b("span",null,E(v(s)("selection.addToChat")),1)])],64))],44,l$e)):Y("",!0)]))}}),d$e=vt(u$e,[["__scopeId","data-v-d37e8069"]]),f$e=["aria-label"],p$e={class:"media-lightbox-card"},h$e=["src","alt"],m$e=["src"],g$e={key:0,class:"media-preview-caption"},v$e=Je({__name:"MediaLightbox",props:{media:{},src:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),i=r4("overlay"),l=r4("close"),r=r4("image"),a=B(()=>n.media.kind==="image"),c=B(()=>n.media.path??(a.value?"Image preview":"Video preview")),u=Uo(1),d=Uo(0),f=Uo(0),p=Uo(!1),h=B(()=>({transform:`translate(${d.value}px, ${f.value}px) scale(${u.value})`,cursor:u.value>1?p.value?"grabbing":"grab":"zoom-in"}));let m=null,k=null,x=0,y=0,w=0,_=0;const{lock:A,unlock:P}=Gz();function z(){u.value=1,d.value=0,f.value=0}function L(H){if(!a.value)return;H.preventDefault();const D=Math.min(8,Math.max(1,u.value*(H.deltaY<0?1.1:.9)));u.value=D,D===1&&(d.value=0,f.value=0)}function T(){if(u.value!==1){z();return}const H=r.value;H&&(u.value=Math.min(8,Math.max(1,H.naturalWidth/H.clientWidth)))}function I(H){u.value<=1||(k=H.pointerId,x=H.clientX,y=H.clientY,w=d.value,_=f.value,p.value=!0,r.value?.setPointerCapture(H.pointerId))}function N(H){k===H.pointerId&&(d.value=w+H.clientX-x,f.value=_+H.clientY-y)}function C(H){k===H.pointerId&&(r.value?.releasePointerCapture(H.pointerId),k=null,p.value=!1)}function F(H){if(H.key==="Escape"){H.preventDefault(),H.stopPropagation(),o("close");return}if(H.key!=="Tab"||!i.value)return;const D=i.value.querySelectorAll(s),M=D[0],R=D[D.length-1];!M||!R||(i.value.contains(document.activeElement)?H.shiftKey&&document.activeElement===M?(H.preventDefault(),R.focus()):!H.shiftKey&&document.activeElement===R&&(H.preventDefault(),M.focus()):(H.preventDefault(),(H.shiftKey?R:M).focus()))}return In(()=>{A(),m=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener("keydown",F),l.value?.focus()}),En(()=>{P(),window.removeEventListener("keydown",F),m?.focus()}),(H,D)=>(g(),ue(hl,{to:"body"},[b("div",{ref:"overlay",class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":c.value,onMousedown:D[1]||(D[1]=xt(M=>o("close"),["self"]))},[b("button",{ref:"close",type:"button",class:"media-lightbox-close","aria-label":"Close",onClick:D[0]||(D[0]=M=>o("close"))},[W(Ee,{name:"close",size:"sm"})],512),b("div",p$e,[b("div",{class:"media-lightbox-frame",onWheel:L},[a.value?(g(),S("img",{key:0,ref:"image",class:"media-lightbox-media",src:e.src,alt:e.media.path??"",draggable:"false",style:Gt(h.value),onDblclick:T,onPointerdown:I,onPointermove:N,onPointerup:C,onPointercancel:C},null,44,h$e)):(g(),S("video",{key:1,class:"media-lightbox-media",src:e.src,controls:"",autoplay:""},null,8,m$e))],32)]),e.media.path?(g(),S("div",g$e,E(e.media.path),1)):Y("",!0)],40,f$e)]))}}),y$e=vt(v$e,[["__scopeId","data-v-a5036dce"]]),w$e={class:"ui-panel-header__main"},k$e={class:"ui-panel-header__title"},b$e={key:0,class:"ui-panel-header__sub"},_$e=Je({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:"Close"},wrap:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-panel-header",{wrap:e.wrap}])},[b("div",w$e,[b("span",k$e,E(e.title),1),W(Cn,{text:e.subtitle},{default:ae(()=>[e.subtitle?(g(),S("span",b$e,E(e.subtitle),1)):Y("",!0)]),_:1},8,["text"]),jn(t.$slots,"default",{},void 0,!0)]),e.closable?(g(),ue(Dt,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel,onClick:n[0]||(n[0]=o=>t.$emit("close"))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])):Y("",!0)],2))}}),Ca=vt(_$e,[["__scopeId","data-v-47211810"]]),x$e={key:0,class:"fp-empty fp-error"},S$e={key:1,class:"fp-empty"},C$e={key:2,class:"fp-loading"},M$e={class:"fp-path"},A$e={class:"fp-meta"},T$e={key:0,class:"fp-lines"},E$e={class:"fp-size"},I$e={key:3,class:"fp-search"},L$e=["placeholder"],$$e={key:0,class:"fp-search-count"},N$e={key:1,class:"fp-code"},z$e={class:"fp-line-table"},B$e=["data-line"],R$e={class:"fp-gutter"},P$e=["innerHTML"],F$e={key:1,class:"fp-body fp-code"},j$e={class:"fp-line-table"},O$e=["data-line"],H$e={class:"fp-gutter"},D$e=["innerHTML"],V$e={key:2,class:"fp-body"},W$e=["srcdoc","title"],q$e={key:1,class:"fp-code"},U$e={class:"fp-line-table"},Z$e=["data-line"],K$e={class:"fp-gutter"},G$e=["innerHTML"],Y$e={key:3,class:"fp-body fp-pdf-wrap"},X$e=["src","title"],J$e={key:1,class:"fp-binary-card"},Q$e={class:"fp-binary-label"},eNe={key:4,class:"fp-body fp-table-wrap"},tNe={class:"fp-table"},nNe=["data-line"],oNe={key:5,class:"fp-body fp-image-wrap"},sNe=["src","alt"],iNe={key:1,class:"fp-binary-card"},lNe={class:"fp-binary-icon"},rNe={class:"fp-binary-label"},aNe={key:6,class:"fp-body fp-image-wrap"},cNe=["src"],uNe={key:1,class:"fp-binary-card"},dNe={class:"fp-binary-icon"},fNe={class:"fp-binary-label"},pNe={key:7,class:"fp-body fp-code"},hNe={class:"fp-line-table"},mNe=["data-line"],gNe={class:"fp-gutter"},vNe=["innerHTML"],yNe={key:8,class:"fp-body fp-binary-wrap"},wNe={class:"fp-binary-card"},kNe={class:"fp-binary-icon"},bNe={class:"fp-binary-label"},_Ne=Je({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},editable:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal","openEditor"],setup(e,{emit:t}){const{t:n}=$t();function o(X,oe){const j=oe?oe.split("/").filter(Boolean):[];for(const K of X.split("/"))K===""||K==="."||(K===".."?j.pop():j.push(K));return j.join("/")}const s=fn("resolveImage",async X=>X),i=B(()=>{const X=c.file?.path??"",oe=X.lastIndexOf("/");return oe>0?X.slice(0,oe):""});function l(X){if(/^(https?:|data:|blob:)/i.test(X)||X.startsWith("/"))return X;const oe=i.value;return oe?o(X,oe):X}async function r(X){const oe=l(X);return s?s(oe):oe}qn("resolveImage",r);function a(X){let oe=X.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(oe)||oe.startsWith("/"))return X;for(const K of["#","?"]){const he=oe.indexOf(K);he!==-1&&(oe=oe.slice(0,he))}const j=i.value;return{...X,path:o(oe,j)}}const c=e,u=B(()=>{const X=c.file;return X!==null&&!X.isBinary}),d=t;function f(X){c.openFile?.(a(X))}const p=V(null),h=B(()=>{const X=c.file;if(!X)return"binary";const oe=X.mime??"",j=X.languageId??"",K=X.path.toLowerCase();return oe==="text/markdown"||j==="markdown"||j==="md"||K.endsWith(".mdx")?"markdown":oe==="application/json"||j==="json"?"json":oe==="text/html"||j==="html"||K.endsWith(".html")||K.endsWith(".htm")?"html":oe==="application/pdf"||K.endsWith(".pdf")?"pdf":oe==="text/csv"||j==="csv"||K.endsWith(".csv")?"csv":oe.startsWith("image/")?"image":oe.startsWith("video/")?"video":X.isBinary?"binary":oe.startsWith("text/")||j!==""?"text":"binary"});function m(X){const oe=atob(X),j=Uint8Array.from(oe,K=>K.charCodeAt(0));return new TextDecoder().decode(j)}const k=B(()=>{const X=c.file;if(!X)return"";if(X.encoding==="base64")try{return m(X.content)}catch{return X.content}return X.content}),x=B(()=>{if(h.value!=="json"||!c.file)return"";try{return JSON.stringify(JSON.parse(k.value),null,2)}catch{return k.value}}),y=B(()=>c.file?(h.value==="json"?x.value:k.value).split(` +`):[]),w=B(()=>c.file?h.value==="json"?x.value:k.value:""),_=V(""),A=V(0),P=B(()=>{const X=_.value.trim().toLowerCase();if(!X)return[];const oe=[];return y.value.forEach((j,K)=>{j.toLowerCase().includes(X)&&oe.push(K+1)}),oe});Ke(_,()=>{A.value=0});function z(X,oe=!1){X&&yt(()=>{const j=p.value?.querySelector(".fp-body"),K=j?.querySelector(`[data-line="${X}"]`);if(!j||!K)return;oe&&(j.scrollTop=0);const he=j.getBoundingClientRect(),ye=K.getBoundingClientRect(),ve=ye.top-he.top+j.scrollTop;j.scrollTop=ve-j.clientHeight/2+ye.height/2})}Ke(()=>[c.file?.path,c.line],()=>z(c.line,!0),{immediate:!0});function L(X){const oe=P.value;oe.length!==0&&(A.value=(A.value+X+oe.length)%oe.length,z(oe[A.value]))}function T(X){const oe=P.value;return{target:c.line===X,hit:oe.includes(X),active:oe[A.value]===X}}function I(X){return X<1024?`${X} B`:X<1024*1024?`${(X/1024).toFixed(1)} KB`:`${(X/(1024*1024)).toFixed(1)} MB`}const N=V(!1),C=V(!1);function F(){c.file&&fs(w.value).then(X=>{X&&(N.value=!0,setTimeout(()=>{N.value=!1},1400))})}function H(){c.file&&fs(c.file.path).then(X=>{X&&(C.value=!0,setTimeout(()=>{C.value=!1},1400))})}const D=V("preview"),M=V("preview"),R=V("fit");function O(X){D.value=X}function U(X){M.value=X}function Z(X){R.value=X}Ke(h,X=>{D.value=X==="html"?"preview":"source",M.value="preview",R.value="fit"});const q=B(()=>{const X=c.file;return!X||h.value!=="image"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:X.mime==="image/svg+xml"?`data:${X.mime};charset=utf-8,${encodeURIComponent(X.content)}`:null}),te=B(()=>{const X=c.file;return!X||h.value!=="video"?null:X.sourceUrl?X.sourceUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),ee=B(()=>{const X=c.file;return!X||h.value!=="pdf"?null:c.downloadUrl?c.downloadUrl:X.encoding==="base64"?`data:${X.mime};base64,${X.content}`:null}),J=B(()=>c.file?["",'',``,k.value].join(""):"");function se(X){const oe=[];let j="",K=!1;for(let he=0;hey.value.slice(0,200).map(se));function me(X){return X.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function xe(){const X=c.file;if(!X)return"";const oe=X.languageId?.toLowerCase();return oe||(X.path.split(".").pop()?.toLowerCase()??"")}function Ye(X){const oe=xe();let j=me(X);return h.value==="json"||oe==="json"||oe==="jsonc"?(j=j.replace(/("[^&]*?")(\s*:)/g,'$1$2'),j=j.replace(/(:\s*)("[^&]*?")/g,'$1$2'),j=j.replace(/\b(true|false|null)\b/g,'$1'),j=j.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,'$1$2'),j):h.value==="html"||oe==="html"||oe==="xml"||oe==="svg"?(j=j.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,' $1$2'),j=j.replace(/(".*?")/g,'$1'),j=j.replace(/(<\/?)([A-Za-z][\w:-]*)/g,'$1$2'),j):(j=j.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,'$1'),j=j.replace(/(".*?"|'.*?')/g,'$1'),j=j.replace(/(\/\/.*)$/g,'$1'),j)}function at(X,oe=55){return!X||X.length<=oe?X:"…"+X.slice(X.length-oe+1)}return(X,oe)=>(g(),S("div",{ref_key:"rootRef",ref:p,class:"file-preview"},[e.error&&!e.loading?(g(),S("div",x$e,[b("span",null,E(e.error),1),e.closable?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:oe[0]||(oe[0]=j=>d("close"))},{default:ae(()=>[He(E(v(n)("filePreview.close")),1)]),_:1})):Y("",!0)])):!e.file&&!e.loading?(g(),S("div",S$e,E(v(n)("filePreview.empty")),1)):e.loading?(g(),S("div",C$e,[oe[8]||(oe[8]=b("span",{class:"spinner"},null,-1)),b("span",null,E(v(n)("filePreview.loading")),1)])):e.file?(g(),S(Ce,{key:3},[W(Ca,{wrap:"",title:v(n)("common.preview"),closable:e.closable,"close-label":v(n)("filePreview.close"),onClose:oe[7]||(oe[7]=j=>d("close"))},{default:ae(()=>[W(Cn,{text:e.file.path},{default:ae(()=>[b("span",M$e,E(at(e.file.path)),1)]),_:1},8,["text"]),b("span",A$e,[e.file.lineCount?(g(),S("span",T$e,E(v(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):Y("",!0),b("span",E$e,E(I(e.file.size)),1)]),h.value==="html"?(g(),ue(di,{key:0,"model-value":D.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":O},null,8,["model-value","options"])):Y("",!0),h.value==="markdown"?(g(),ue(di,{key:1,"model-value":M.value,size:"sm",options:[{value:"preview",label:v(n)("filePreview.preview")},{value:"source",label:v(n)("filePreview.source")}],"onUpdate:modelValue":U},null,8,["model-value","options"])):Y("",!0),h.value==="image"?(g(),ue(di,{key:2,"model-value":R.value,size:"sm",options:[{value:"fit",label:v(n)("filePreview.fit")},{value:"actual",label:v(n)("filePreview.actual")}],"onUpdate:modelValue":Z},null,8,["model-value","options"])):Y("",!0),h.value==="text"||h.value==="json"||h.value==="html"||h.value==="csv"?(g(),S("div",I$e,[Jn(b("input",{"onUpdate:modelValue":oe[1]||(oe[1]=j=>_.value=j),class:"fp-search-input",type:"search",placeholder:v(n)("filePreview.search")},null,8,L$e),[[js,_.value]]),_.value.trim()?(g(),S("span",$$e,E(P.value.length),1)):Y("",!0),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.prevMatch"),onClick:oe[2]||(oe[2]=j=>L(-1))},{default:ae(()=>[W(Ee,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),W(Dt,{size:"sm",disabled:P.value.length===0,label:v(n)("filePreview.nextMatch"),onClick:oe[3]||(oe[3]=j=>L(1))},{default:ae(()=>[W(Ee,{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):Y("",!0),W(Dt,{size:"sm",class:Be({copied:C.value}),label:C.value?v(n)("filePreview.copied"):v(n)("filePreview.copyPath"),onClick:H},{default:ae(()=>[C.value?(g(),ue(Ee,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ee,{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.editable&&u.value&&e.file!==null?(g(),ue(Dt,{key:4,size:"sm",label:v(n)("editor.title"),onClick:oe[4]||(oe[4]=j=>d("openEditor",e.file.path))},{default:ae(()=>[W(Ee,{name:"pencil",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:5,size:"sm",label:v(n)("filePreview.openInEditor"),onClick:oe[5]||(oe[5]=j=>d("openExternal"))},{default:ae(()=>[W(Ee,{name:"external-link",size:"md"})]),_:1},8,["label"])):Y("",!0),e.externalActions?(g(),ue(Dt,{key:6,size:"sm",label:v(n)("filePreview.reveal"),onClick:oe[6]||(oe[6]=j=>d("reveal"))},{default:ae(()=>[W(Ee,{name:"folder",size:"md"})]),_:1},8,["label"])):Y("",!0),!e.file.isBinary&&h.value!=="image"?(g(),ue(Dt,{key:7,size:"sm",class:Be({copied:N.value}),label:N.value?v(n)("filePreview.copied"):v(n)("filePreview.copy"),onClick:F},{default:ae(()=>[N.value?(g(),ue(Ee,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),ue(Ee,{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):Y("",!0)]),_:1},8,["title","closable","close-label"]),h.value==="markdown"?(g(),S("div",{key:0,class:Be(["fp-body",{"fp-markdown":M.value==="preview"}])},[M.value==="preview"?(g(),ue(Br,{key:0,text:k.value,"open-file":c.openFile?f:void 0},null,8,["text","open-file"])):(g(),S("div",N$e,[b("div",z$e,[(g(!0),S(Ce,null,rt(y.value,(j,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",T(K+1)]),"data-line":K+1},[b("span",R$e,E(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(j)},null,8,P$e)],10,B$e))),128))])]))],2)):h.value==="json"?(g(),S("div",F$e,[b("div",j$e,[(g(!0),S(Ce,null,rt(y.value,(j,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",T(K+1)]),"data-line":K+1},[b("span",H$e,E(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(j)},null,8,D$e)],10,O$e))),128))])])):h.value==="html"?(g(),S("div",V$e,[D.value==="preview"?(g(),S("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:J.value,title:e.file.path},null,8,W$e)):(g(),S("div",q$e,[b("div",U$e,[(g(!0),S(Ce,null,rt(y.value,(j,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",T(K+1)]),"data-line":K+1},[b("span",K$e,E(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(j)},null,8,G$e)],10,Z$e))),128))])]))])):h.value==="pdf"?(g(),S("div",Y$e,[ee.value?(g(),S("iframe",{key:0,class:"fp-pdf-frame",src:ee.value,title:e.file.path},null,8,X$e)):(g(),S("div",J$e,[b("span",Q$e,E(v(n)("filePreview.pdfNoPreview")),1)]))])):h.value==="csv"?(g(),S("div",eNe,[b("table",tNe,[b("tbody",null,[(g(!0),S(Ce,null,rt(Q.value,(j,K)=>(g(),S("tr",{key:K,class:Be(T(K+1)),"data-line":K+1},[b("th",null,E(K+1),1),(g(!0),S(Ce,null,rt(j,(he,ye)=>(g(),S("td",{key:ye},E(he),1))),128))],10,nNe))),128))])])])):h.value==="image"?(g(),S("div",oNe,[q.value?(g(),S("img",{key:0,src:q.value,alt:e.file.path,class:Be(["fp-image",{actual:R.value==="actual"}])},null,10,sNe)):(g(),S("div",iNe,[b("span",lNe,[W(Ee,{name:"image-off",size:"lg"})]),b("span",rNe,E(v(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:I(e.file.size)})),1)]))])):h.value==="video"?(g(),S("div",aNe,[te.value?(g(),S("video",{key:0,src:te.value,class:"fp-image",controls:"",playsinline:"",preload:"metadata"},null,8,cNe)):(g(),S("div",uNe,[b("span",dNe,[W(Ee,{name:"image-off",size:"lg"})]),b("span",fNe,E(v(n)("filePreview.videoNoPreview",{mime:e.file.mime,size:I(e.file.size)})),1)]))])):h.value==="text"?(g(),S("div",pNe,[b("div",hNe,[(g(!0),S(Ce,null,rt(y.value,(j,K)=>(g(),S("div",{key:K,class:Be(["fp-line-row",T(K+1)]),"data-line":K+1},[b("span",gNe,E(K+1),1),b("span",{class:"fp-line-text",innerHTML:Ye(j)},null,8,vNe)],10,mNe))),128))])])):(g(),S("div",yNe,[b("div",wNe,[b("span",kNe,[W(Ee,{name:"file-off",size:"lg"})]),b("span",bNe,E(v(n)("filePreview.binaryNoPreview",{mime:e.file.mime||v(n)("filePreview.unknownType"),size:I(e.file.size)})),1)])]))],64)):Y("",!0)],512))}}),xNe=vt(_Ne,[["__scopeId","data-v-97c52e24"]]),SNe={class:"ui-banner__icon","aria-hidden":"true"},CNe={class:"ui-banner__text"},MNe=Je({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[b("span",SNe,[jn(t.$slots,"icon",{},()=>[e.variant==="info"?(g(),ue(Ee,{key:0,name:"info",size:"md"})):(g(),ue(Ee,{key:1,name:"alert-triangle",size:"md"}))],!0)]),b("span",CNe,[jn(t.$slots,"default",{},void 0,!0)])],2))}}),G9=vt(MNe,[["__scopeId","data-v-566a0ac8"]]),B4=Mo.global.t,ANe=40928,TNe=10485760,gn=ds({open:!1,path:null,loading:!1,saving:!1,loadError:null,savingError:null,conflict:!1,dirty:!1,savedAt:null,languageId:void 0});let i1=null,ua=0,ap=null;const tB={getContent:null};function yM(e){tB.getContent=e}function ENe(){return gn}function INe(){ua+=1,gn.path=null,gn.loading=!1,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,i1=null,ap=null}async function nB(e){const t=BNe();if(!t){ua+=1,gn.open=!0,gn.path=e.path,gn.loading=!1,gn.loadError=B4("editor.readOnlyWhileMissingSession"),gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,gn.saving=!1,i1=null,ap=null;return}const n=++ua;gn.open=!0,gn.path=e.path,gn.loading=!0,gn.saving=!1,gn.loadError=null,gn.savingError=null,gn.conflict=!1,gn.dirty=!1,gn.savedAt=null,gn.languageId=void 0,i1=null,ap=t;try{const o=await Ct().readFile(t,{path:e.path,length:TNe,encoding:"utf-8"});if(n!==ua)return;if(o.isBinary||o.encoding!=="utf-8"){gn.loadError=B4("editor.binaryNotEditable");return}i1=o.etag,gn.languageId=o.languageId,R4=o.content,tg=e.line,oB+=1}catch(o){if(n!==ua)return;i1=null,gn.loadError=o instanceof Error&&o.message.length>0?o.message:B4("editor.loadFailed")}finally{n===ua&&(gn.loading=!1)}}let R4,tg,oB=0;function LNe(){if(R4===void 0)return null;const e={content:R4,line:tg,revision:oB};return R4=void 0,tg=void 0,e}function $Ne(){gn.dirty||(gn.dirty=!0,gn.savedAt=null),gn.savingError!==null&&(gn.savingError=null)}function ng(){INe(),gn.open=!1}async function NNe(){gn.path!==null&&await nB({path:gn.path})}async function og(e){const t=ap,n=gn.path;if(!t||!n||gn.saving||gn.loading||gn.conflict)return;const o=tB.getContent;if(!o)return;const s=++ua;gn.saving=!0,gn.savingError=null;try{const i=await Ct().writeFile(t,{path:n,content:o(),...e?.force===!0||i1===null?{}:{baseEtag:i1}});if(s!==ua)return;i1=i.etag,gn.dirty=!1,gn.conflict=!1,gn.savedAt=Date.now()}catch(i){if(s!==ua)return;if(ol(i)&&i.code===ANe){gn.conflict=!0;return}gn.savingError=i instanceof Error&&i.message.length>0?i.message:B4("editor.loadFailed")}finally{gn.saving=!1}}async function zNe(){gn.conflict=!1,await og({force:!0})}function BNe(){return sB?.()??null}let sB=null;function RNe(e){sB=e}const Y9="pythinker-light",X9="pythinker-dark";function PNe(e,t){const n=e.trim();if(/^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n))return n;if(/^#[0-9a-f]{3,4}$/i.test(n))return`#${Array.from(n.slice(1),a=>a+a).join("")}`;const o=/^rgba?\(([^)]*)\)$/i.exec(n);if(o===null)return t;const s=o[1].split(/[\s,/]+/).filter(a=>a.length>0);if(s.length<3||s.length>4)return t;const i=s.slice(0,3).map(a=>wM(a,255)),l=s.length===4?wM(s[3],1):255;return i.some(a=>a===null)||l===null?t:`#${[...i,l===255?null:l].filter(a=>a!==null).map(a=>a.toString(16).padStart(2,"0")).join("")}`}function wM(e,t){const n=e.endsWith("%"),o=Number(n?e.slice(0,-1):e);if(!Number.isFinite(o))return null;const s=n?o/100:o/t;return Math.max(0,Math.min(255,Math.round(s*255)))}function Ql(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return PNe(n.length>0?n:t,t)}function FNe(){return{bg:Ql("--p-bg","#ffffff"),surface:Ql("--color-surface","#fafbfc"),text:Ql("--color-text","#14171c"),textMuted:Ql("--color-text-muted","#6b7280"),line:Ql("--color-line","#e7eaee"),accent:Ql("--color-accent","#1783ff"),accentSoft:Ql("--p-accent-soft","#1783ff24"),selection:Ql("--p-selection","#1783ff2e"),danger:Ql("--color-danger","#c0392b"),warning:Ql("--color-warning","#a9610a"),success:Ql("--color-success","#0e7a38")}}function Fd(e){return e.slice(1,7)}function jNe(e,t){const n=FNe();e.editor.defineTheme(t?X9:Y9,{base:t?"vs-dark":"vs",inherit:!0,rules:[{token:"comment",foreground:Fd(n.textMuted),fontStyle:"italic"},{token:"string",foreground:Fd(n.success)},{token:"keyword",foreground:Fd(n.accent)},{token:"number",foreground:Fd(n.warning)},{token:"type",foreground:Fd(n.accent)}],colors:{"editor.background":n.bg,"editor.foreground":n.text,"editorLineNumber.foreground":n.textMuted,"editorLineNumber.activeForeground":n.text,"editor.selectionBackground":n.selection,"editor.lineHighlightBackground":n.surface,"editorCursor.foreground":n.accent,"editorIndentGuide.background1":n.line,"editorIndentGuide.activeBackground1":n.textMuted,"editorWidget.background":n.surface,"editorWidget.border":n.line,"editorError.foreground":n.danger,"editorWarning.foreground":n.warning,"scrollbarSlider.background":n.accentSoft,"scrollbarSlider.hoverBackground":n.accentSoft,"scrollbarSlider.activeBackground":n.accent}})}function kM(e,t){jNe(e,t),e.editor.setTheme(t?X9:Y9)}const P4=Ip();let bM=null;function ONe(){return bM??=Cs(()=>import("./editor.main-28ipUIqH.js").then(e=>e.b),__vite__mapDeps([10,5,11])).then(e=>{kM(e,P4.value),Ke(P4,()=>kM(e,P4.value))}),bM}function HNe(){return P4.value?X9:Y9}function DNe(){return ONe()}const VNe={class:"monaco-pane"},WNe={key:0,class:"monaco-pane__boot"},qNe=Je({__name:"MonacoPane",props:{path:{},languageId:{}},setup(e){const t=V(null),n=V(!0);let o=null,s=null,i=null,l=null;function r(){window.MonacoEnvironment===void 0&&Cs(()=>import("./editor.worker-CNGv4jKH.js"),[]).then(d=>{window.MonacoEnvironment={getWorker:()=>new d.default}})}function a(d){if(d!==void 0&&new Set(["typescript","javascript","json","css","html","markdown","python","rust","go","yaml"]).has(d))return d;if(d==="typescriptreact"||d==="javascriptreact")return d.replace("react","");if(d==="shellscript")return"shell"}async function c(){if(o===null||s===null)return;const d=LNe(),f=u.path;if(f===null)return;const p=o.Uri.parse(`pythinker://session/${encodeURIComponent(f)}`),h=o.editor.getModel(p);if(l?.dispose(),l=null,i!==null&&i!==h&&i.dispose(),h===null)i=o.editor.createModel(d?.content??"",a(u.languageId),p);else{i=h,d!==null&&i.setValue(d.content);const m=a(u.languageId);m!==void 0&&o.editor.setModelLanguage(i,m)}l=i.onDidChangeContent(()=>$Ne()),s.setModel(i),yM(()=>i?.getValue()??""),d?.line!==void 0&&d.line>0&&(s.revealLineInCenter(d.line),s.setPosition({lineNumber:d.line,column:1}))}In(async()=>{r(),await DNe(),t.value!==null&&(o=await Cs(()=>import("./editor.main-28ipUIqH.js").then(d=>d.b),__vite__mapDeps([10,5,11])),t.value!==null&&(s=o.editor.create(t.value,{model:null,theme:HNe(),automaticLayout:!0,fontSize:12.5,fontFamily:'"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace',minimap:{enabled:!1},scrollBeyondLastLine:!1,renderLineHighlight:"line",padding:{top:8}}),n.value=!1,await c()))}),En(()=>{yM(null),l?.dispose(),i?.dispose(),s?.dispose(),i=null,l=null,s=null,o=null});const u=e;return Ke(()=>[u.path,u.languageId],async()=>{s!==null&&await c()}),(d,f)=>(g(),S("div",VNe,[n.value?(g(),S("div",WNe,[W(Zo,{size:"sm"})])):Y("",!0),b("div",{ref_key:"rootRef",ref:t,class:"monaco-pane__host"},null,512)]))}}),UNe=vt(qNe,[["__scopeId","data-v-cb5f64f3"]]),ZNe={class:"editor-panel"},KNe={class:"ed-path"},GNe={key:1,class:"ed-saved"},YNe={key:1,class:"ed-saving"},XNe={key:0,class:"editor-panel__empty"},JNe={class:"editor-panel__conflict-actions"},QNe={key:1,class:"editor-panel__save-error"},eze=Je({__name:"EditorPanel",emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=ENe(),s=t;function i(){ng(),s("close")}function l(c){const u=c.split("/").at(-1)??c;return u.length>0?u:c}const r=B(()=>o.savedAt===null||o.dirty?!1:Date.now()-o.savedAt<2e3);function a(c){(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()==="s"&&(c.preventDefault(),og())}return window.addEventListener("keydown",a),En(()=>window.removeEventListener("keydown",a)),Ke(()=>o.open,c=>{c||s("close")}),(c,u)=>(g(),S("div",ZNe,[W(Ca,{wrap:"",title:v(n)("editor.title"),closable:"","close-label":v(n)("editor.closeEditor"),onClose:i},{default:ae(()=>[v(o).path!==null?(g(),S(Ce,{key:0},[W(Cn,{text:v(o).path},{default:ae(()=>[b("span",KNe,E(l(v(o).path)),1)]),_:1},8,["text"]),v(o).dirty?(g(),ue(Cn,{key:0,text:v(n)("editor.unsavedDot")},{default:ae(()=>[...u[3]||(u[3]=[b("span",{class:"ed-dirty"},null,-1)])]),_:1},8,["text"])):Y("",!0),r.value?(g(),S("span",GNe,E(v(n)("editor.saved")),1)):Y("",!0)],64)):Y("",!0),v(o).path!==null&&v(o).loadError===null?(g(),S(Ce,{key:1},[v(o).conflict?Y("",!0):(g(),ue(Dt,{key:0,size:"sm",label:v(n)("editor.save"),disabled:!v(o).dirty||v(o).saving,onClick:u[0]||(u[0]=d=>v(og)())},{default:ae(()=>[W(Ee,{name:"check",size:"sm"})]),_:1},8,["label","disabled"])),v(o).saving?(g(),S("span",YNe,[W(Zo,{size:"sm"})])):Y("",!0)],64)):Y("",!0)]),_:1},8,["title","close-label"]),v(o).loadError!==null?(g(),S("div",XNe,[W(Og,null,{default:ae(()=>[b("span",null,E(v(o).loadError),1),W(Nt,{variant:"secondary",size:"sm",onClick:i},{default:ae(()=>[He(E(v(n)("filePreview.close")),1)]),_:1})]),_:1})])):(g(),S(Ce,{key:1},[v(o).conflict?(g(),ue(G9,{key:0,variant:"warning",class:"editor-panel__conflict"},{default:ae(()=>[b("span",null,E(v(n)("editor.conflictText")),1),b("span",JNe,[W(Nt,{variant:"secondary",size:"sm",onClick:u[1]||(u[1]=d=>v(NNe)())},{default:ae(()=>[He(E(v(n)("editor.conflictReload")),1)]),_:1}),W(Nt,{variant:"danger",size:"sm",disabled:v(o).saving,onClick:u[2]||(u[2]=d=>v(zNe)())},{default:ae(()=>[He(E(v(n)("editor.conflictOverwrite")),1)]),_:1},8,["disabled"])])]),_:1})):Y("",!0),v(o).savingError!==null?(g(),S("p",QNe,E(v(o).savingError),1)):Y("",!0),v(o).path!==null?(g(),ue(UNe,{key:2,path:v(o).path,"language-id":v(o).languageId},null,8,["path","language-id"])):Y("",!0)],64))]))}}),tze=vt(eze,[["__scopeId","data-v-579cb4a1"]]),nze={class:"tp"},oze=Je({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);return Ke(()=>n.text,()=>{const l=i.value;!l||!(l.scrollHeight-l.scrollTop-l.clientHeight<24)||yt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(l,r)=>(g(),S("div",nze,[W(Ca,{title:v(s)("common.preview"),subtitle:e.subtitle??v(s)("thinking.panelTitle"),"close-label":v(s)("thinking.close"),onClose:r[0]||(r[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),b("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},E(e.text),513)]))}}),sze=vt(oze,[["__scopeId","data-v-e1ad626c"]]),ize={class:"agent-panel"},lze={key:0,class:"agent-meta"},rze={class:"agent-meta-text"},aze={key:1,class:"agent-prompt"},cze={class:"agent-prompt-bubble"},uze=["aria-expanded"],dze={class:"agent-transcript-inner"},fze={key:0,class:"agent-fallback"},pze={key:0,class:"agent-error"},hze={key:1,class:"fallback-lines"},mze=Je({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=r6(),l=B(()=>i.value?"lg":"sm"),r=V(null),a=V(null),c=V(!0),u=V(!1);let d=null,f=0;const p=B(()=>{const M=new Set,R=[],O=n.member.prompt?.trim(),U=O?`$ ${O}`:void 0;for(const Z of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` `),n.member.summary]){const q=Z?.trim();!q||M.has(q)||q===U||(M.add(q),R.push(q))}return R}),h=B(()=>p.value.filter(M=>M!==n.member.prompt?.trim()).join(` `)),m=fn("modelDisplay"),k=fn("subagentEffort"),x=B(()=>[n.member.subagentType,m?.(n.member.model),k?.(n.member.thinkingEffort)].filter(Boolean).join(" · ")||void 0),y=B(()=>n.member.prompt?.trim()??""),w=B(()=>y.value.startsWith("/")&&!y.value.includes(` -`)),_=B(()=>n.turns.length===0&&!n.loading&&(n.loadError||p.value.length>0)),A=V(null),P=V(!0),z=V(!1);function L(){const M=A.value;if(!M){z.value=!1;return}z.value=M.scrollHeight>M.clientHeight+1}function E(){P.value=!P.value,yt(L)}Ke(()=>[n.member.id,y.value],()=>{P.value=!0,yt(L)},{immediate:!0});function T(){const M=r.value;M&&(c.value=M.scrollHeight-M.scrollTop-M.clientHeight<24)}function $(){yt(()=>{const M=r.value;M&&(M.scrollTop=M.scrollHeight)})}function C(){c.value=!0,$()}qn("pinScroll",M=>{const R=r.value;if(!R)return;const O=M.getBoundingClientRect().top;requestAnimationFrame(()=>{R.scrollTop+=M.getBoundingClientRect().top-O})}),Ke(()=>{const M=n.turns.at(-1);return`${n.member.id}:${n.turns.length}:${M?.text.length??0}:${M?.tools?.length??0}`},()=>{c.value&&$()},{immediate:!0});function j(M){const R=M[0].toUpperCase()+M.slice(1);return s(`tools.dynamic_workflow.phase${R}`)}function H(){d!==null&&clearTimeout(d),u.value=!0,d=setTimeout(()=>{d=null,u.value=!1},1400)}async function D(){if(!_.value&&n.turns.length>0){a.value?.copyConversation();return}const M=[n.member.prompt?.trim(),h.value].filter(Boolean).join(` +`)),_=B(()=>n.turns.length===0&&!n.loading&&(n.loadError||p.value.length>0)),A=V(null),P=V(!0),z=V(!1);function L(){const M=A.value;if(!M){z.value=!1;return}z.value=M.scrollHeight>M.clientHeight+1}function T(){P.value=!P.value,yt(L)}Ke(()=>[n.member.id,y.value],()=>{P.value=!0,yt(L)},{immediate:!0});function I(){const M=r.value;M&&(c.value=M.scrollHeight-M.scrollTop-M.clientHeight<24)}function N(){yt(()=>{const M=r.value;M&&(M.scrollTop=M.scrollHeight)})}function C(){c.value=!0,N()}qn("pinScroll",M=>{const R=r.value;if(!R)return;const O=M.getBoundingClientRect().top;requestAnimationFrame(()=>{R.scrollTop+=M.getBoundingClientRect().top-O})}),Ke(()=>{const M=n.turns.at(-1);return`${n.member.id}:${n.turns.length}:${M?.text.length??0}:${M?.tools?.length??0}`},()=>{c.value&&N()},{immediate:!0});function F(M){const R=M[0].toUpperCase()+M.slice(1);return s(`tools.dynamic_workflow.phase${R}`)}function H(){d!==null&&clearTimeout(d),u.value=!0,d=setTimeout(()=>{d=null,u.value=!1},1400)}async function D(){if(!_.value&&n.turns.length>0){a.value?.copyConversation();return}const M=[n.member.prompt?.trim(),h.value].filter(Boolean).join(` -`);if(!M)return;const R=++f;!await fs(M)||R!==f||H()}return Ke(()=>n.member.id,()=>{f+=1,d!==null&&clearTimeout(d),d=null,u.value=!1}),En(()=>{d!==null&&clearTimeout(d)}),(M,R)=>(g(),S("div",ize,[W(Ca,{title:e.member.name,"close-label":v(s)("thinking.close"),onClose:R[0]||(R[0]=O=>o("close"))},{default:ae(()=>[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[He(I(j(e.member.phase)),1)]),_:1}),e.member.prompt||h.value||e.turns.length>0?(g(),ue(Dt,{key:0,size:l.value,label:v(s)("tasks.copy"),onClick:D},{default:ae(()=>[W(Ee,{name:u.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","label"])):Y("",!0)]),_:1},8,["title","close-label"]),x.value?(g(),S("div",lze,[b("span",rze,I(x.value),1)])):Y("",!0),y.value?(g(),S("div",aze,[b("div",cze,[b("div",{class:Be(["agent-prompt-wrap",{"is-clamped":P.value}])},[b("div",{ref_key:"promptTextEl",ref:A,class:Be(["agent-prompt-text",{"is-command":w.value}])},[w.value?(g(),S(Ce,{key:0},[He(I(y.value),1)],64)):(g(),ue(Br,{key:1,text:y.value,"open-file":O=>o("openFile",O)},null,8,["text","open-file"]))],2),z.value||!P.value?(g(),S("button",{key:0,type:"button",class:"agent-prompt-toggle","aria-expanded":!P.value,onClick:E},[b("span",null,I(P.value?v(s)("tasks.expand"):v(s)("tasks.collapse")),1),W(Ee,{class:Be(["agent-prompt-toggle-car",{open:!P.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])],8,uze)):Y("",!0)],2)])])):Y("",!0),b("div",{ref_key:"bodyEl",ref:r,class:"agent-transcript",onScrollPassive:T},[b("div",dze,[_.value?(g(),S("div",fze,[e.loadError?(g(),S("div",pze,I(v(s)("tasks.transcriptLoadError")),1)):Y("",!0),p.value.length>0?(g(),S("pre",hze,I(p.value.join(` -`)),1)):Y("",!0)])):(g(),ue(d9,{key:1,ref_key:"chatPaneRef",ref:a,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":c.value,"read-only":"",inspector:"",onLoadOlderMessages:R[1]||(R[1]=O=>o("loadOlderMessages")),onOpenAgent:R[2]||(R[2]=O=>o("openAgent",O)),onOpenFile:R[3]||(R[3]=O=>o("openFile",O)),onOpenMedia:R[4]||(R[4]=O=>o("openMedia",O)),onOpenTurnDiff:R[5]||(R[5]=O=>o("openTurnDiff",O)),onCopyConversationCopied:H},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))]),W(qi,{name:"agent-jump"},{default:ae(()=>[c.value?Y("",!0):(g(),S("button",{key:0,type:"button",class:"agent-jump-btn",onClick:C},[W(Ee,{class:"agent-jump-car",name:"arrow-down",size:"sm","aria-hidden":"true"}),b("span",null,I(v(s)("conversation.backToBottom")),1)]))]),_:1})],544)]))}}),gze=vt(mze,[["__scopeId","data-v-9ea90d44"]]),vze={class:"tdp"},yze={class:"tdp-body"},wze={key:1,class:"tdp-output"},kze={key:2,class:"tdp-empty"},bze=Je({__name:"ToolDiffPanel",props:{target:{}},emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>(g(),S("div",vze,[W(Ca,{title:e.target.title,subtitle:e.target.path,"close-label":v(o)("thinking.close"),onClose:i[0]||(i[0]=l=>n("close"))},null,8,["title","subtitle","close-label"]),b("div",yze,[e.target.lines&&e.target.lines.length>0?(g(),ue(lE,{key:0,lines:e.target.lines},null,8,["lines"])):e.target.output&&e.target.output.length>0?(g(),S("div",wze,[(g(!0),S(Ce,null,rt(e.target.output,(l,r)=>(g(),S("div",{key:r},I(l),1))),128))])):(g(),S("div",kze,I(v(o)("diff.noDiff")),1))])]))}}),_ze=vt(bze,[["__scopeId","data-v-8b9af3ab"]]),xze={class:"hl-body"},Sze={key:0,class:"hl-gutter"},Cze={class:"hl-sign"},Mze={class:"hl-text"},Aze=["data-line"],Tze={key:0,class:"hl-gutter"},Eze={class:"hl-text"},Ize=200,Lze=Je({__name:"HighlightedCode",props:{code:{},lines:{},path:{},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{},responsiveWrap:{type:Boolean,default:!1}},setup(e){const t={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},n={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function o(D){const M=D?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!M)return;const R=n[M];if(R)return R;const O=M.lastIndexOf(".");if(!(O<=0))return t[M.slice(O+1)]}function s(D){return D.split(/\r?\n/)}function i(D){const M={};D.color&&(M.color=D.color);const R=D.fontStyle??0;return R&1&&(M.fontStyle="italic"),R&2&&(M.fontWeight="var(--weight-semibold)"),R&4&&(M.textDecoration="underline"),M}const l=e,r=Ip(),a=B(()=>l.lines!==void 0),c=B(()=>(l.lines??[]).some(D=>D.oldNo!==void 0)),u=B(()=>(l.lines??[]).some(D=>D.newNo!==void 0)),d=B(()=>l.lineNumbers===!0&&a.value),f=B(()=>Array.isArray(l.lineNumbers)?l.lineNumbers:null),p=B(()=>d.value?Number(c.value)+Number(u.value):f.value===null?0:1),h=B(()=>Array.isArray(l.code)?l.code:s(l.code??"")),m=B(()=>{const D=l.lines;return D?l.fullTexts?l.fullTexts:{before:D.filter(M=>M.oldNo!==void 0).map(M=>M.text).join(` +`);if(!M)return;const R=++f;!await fs(M)||R!==f||H()}return Ke(()=>n.member.id,()=>{f+=1,d!==null&&clearTimeout(d),d=null,u.value=!1}),En(()=>{d!==null&&clearTimeout(d)}),(M,R)=>(g(),S("div",ize,[W(Ca,{title:e.member.name,"close-label":v(s)("thinking.close"),onClose:R[0]||(R[0]=O=>o("close"))},{default:ae(()=>[W(Fl,{variant:"neutral",size:"sm"},{default:ae(()=>[He(E(F(e.member.phase)),1)]),_:1}),e.member.prompt||h.value||e.turns.length>0?(g(),ue(Dt,{key:0,size:l.value,label:v(s)("tasks.copy"),onClick:D},{default:ae(()=>[W(Ee,{name:u.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","label"])):Y("",!0)]),_:1},8,["title","close-label"]),x.value?(g(),S("div",lze,[b("span",rze,E(x.value),1)])):Y("",!0),y.value?(g(),S("div",aze,[b("div",cze,[b("div",{class:Be(["agent-prompt-wrap",{"is-clamped":P.value}])},[b("div",{ref_key:"promptTextEl",ref:A,class:Be(["agent-prompt-text",{"is-command":w.value}])},[w.value?(g(),S(Ce,{key:0},[He(E(y.value),1)],64)):(g(),ue(Br,{key:1,text:y.value,"open-file":O=>o("openFile",O)},null,8,["text","open-file"]))],2),z.value||!P.value?(g(),S("button",{key:0,type:"button",class:"agent-prompt-toggle","aria-expanded":!P.value,onClick:T},[b("span",null,E(P.value?v(s)("tasks.expand"):v(s)("tasks.collapse")),1),W(Ee,{class:Be(["agent-prompt-toggle-car",{open:!P.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])],8,uze)):Y("",!0)],2)])])):Y("",!0),b("div",{ref_key:"bodyEl",ref:r,class:"agent-transcript",onScrollPassive:I},[b("div",dze,[_.value?(g(),S("div",fze,[e.loadError?(g(),S("div",pze,E(v(s)("tasks.transcriptLoadError")),1)):Y("",!0),p.value.length>0?(g(),S("pre",hze,E(p.value.join(` +`)),1)):Y("",!0)])):(g(),ue(f9,{key:1,ref_key:"chatPaneRef",ref:a,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":c.value,"read-only":"",inspector:"",onLoadOlderMessages:R[1]||(R[1]=O=>o("loadOlderMessages")),onOpenAgent:R[2]||(R[2]=O=>o("openAgent",O)),onOpenFile:R[3]||(R[3]=O=>o("openFile",O)),onOpenMedia:R[4]||(R[4]=O=>o("openMedia",O)),onOpenTurnDiff:R[5]||(R[5]=O=>o("openTurnDiff",O)),onCopyConversationCopied:H},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))]),W(qi,{name:"agent-jump"},{default:ae(()=>[c.value?Y("",!0):(g(),S("button",{key:0,type:"button",class:"agent-jump-btn",onClick:C},[W(Ee,{class:"agent-jump-car",name:"arrow-down",size:"sm","aria-hidden":"true"}),b("span",null,E(v(s)("conversation.backToBottom")),1)]))]),_:1})],544)]))}}),gze=vt(mze,[["__scopeId","data-v-9ea90d44"]]),vze={class:"tdp"},yze={class:"tdp-body"},wze={key:1,class:"tdp-output"},kze={key:2,class:"tdp-empty"},bze=Je({__name:"ToolDiffPanel",props:{target:{}},emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>(g(),S("div",vze,[W(Ca,{title:e.target.title,subtitle:e.target.path,"close-label":v(o)("thinking.close"),onClose:i[0]||(i[0]=l=>n("close"))},null,8,["title","subtitle","close-label"]),b("div",yze,[e.target.lines&&e.target.lines.length>0?(g(),ue(rE,{key:0,lines:e.target.lines},null,8,["lines"])):e.target.output&&e.target.output.length>0?(g(),S("div",wze,[(g(!0),S(Ce,null,rt(e.target.output,(l,r)=>(g(),S("div",{key:r},E(l),1))),128))])):(g(),S("div",kze,E(v(o)("diff.noDiff")),1))])]))}}),_ze=vt(bze,[["__scopeId","data-v-8b9af3ab"]]),xze={class:"hl-body"},Sze={key:0,class:"hl-gutter"},Cze={class:"hl-sign"},Mze={class:"hl-text"},Aze=["data-line"],Tze={key:0,class:"hl-gutter"},Eze={class:"hl-text"},Ize=200,Lze=Je({__name:"HighlightedCode",props:{code:{},lines:{},path:{},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{},responsiveWrap:{type:Boolean,default:!1}},setup(e){const t={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},n={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function o(D){const M=D?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!M)return;const R=n[M];if(R)return R;const O=M.lastIndexOf(".");if(!(O<=0))return t[M.slice(O+1)]}function s(D){return D.split(/\r?\n/)}function i(D){const M={};D.color&&(M.color=D.color);const R=D.fontStyle??0;return R&1&&(M.fontStyle="italic"),R&2&&(M.fontWeight="var(--weight-semibold)"),R&4&&(M.textDecoration="underline"),M}const l=e,r=Ip(),a=B(()=>l.lines!==void 0),c=B(()=>(l.lines??[]).some(D=>D.oldNo!==void 0)),u=B(()=>(l.lines??[]).some(D=>D.newNo!==void 0)),d=B(()=>l.lineNumbers===!0&&a.value),f=B(()=>Array.isArray(l.lineNumbers)?l.lineNumbers:null),p=B(()=>d.value?Number(c.value)+Number(u.value):f.value===null?0:1),h=B(()=>Array.isArray(l.code)?l.code:s(l.code??"")),m=B(()=>{const D=l.lines;return D?l.fullTexts?l.fullTexts:{before:D.filter(M=>M.oldNo!==void 0).map(M=>M.text).join(` `),after:D.filter(M=>M.newNo!==void 0).map(M=>M.text).join(` -`)}:null}),k=V(null),x=V(null),y=V(null);function w(){k.value=null,x.value=null,y.value=null}let _=0,A=0,P=null,z=null;async function L(){const D=++_;A=Date.now();const M=o(l.path);if(!M){D===_&&w();return}try{z??=Cs(()=>import("./index-C_5a8vkb.js").then(Z=>Z.i),[]).then(Z=>Z.codeToTokens);const R=await z,O=r.value?"github-dark":"github-light",U=m.value;if(U){const[Z,q]=await Promise.all([U.before?R(U.before,{lang:M,theme:O}):null,U.after?R(U.after,{lang:M,theme:O}):null]);if(D!==_)return;x.value=Z?.tokens??null,y.value=q?.tokens??null}else{const Z=h.value.length>0?await R(h.value.join(` -`),{lang:M,theme:O}):null;if(D!==_)return;k.value=Z?.tokens??null}}catch{D===_&&w()}}function E(){if(P!==null)return;const D=Math.max(0,Ize-(Date.now()-A));P=setTimeout(()=>{P=null,L()},D)}Ke([()=>h.value.join(` -`),()=>m.value?.before??null,()=>m.value?.after??null],E),Ke([()=>l.path,r,()=>l.fullTexts],()=>{_++,w(),E()}),In(()=>void L()),vo(()=>{_++,P!==null&&clearTimeout(P)});const T=B(()=>{const D=new Map;let M=0;for(const R of l.lines??[])R.oldNo!==void 0&&D.set(R.oldNo,M++);return D}),$=B(()=>{const D=new Map;let M=0;for(const R of l.lines??[])R.newNo!==void 0&&D.set(R.newNo,M++);return D});function C(D){if(D.type==="del"){if(D.oldNo===void 0)return null;const R=l.fullTexts?D.oldNo-1:T.value.get(D.oldNo);return R===void 0?null:x.value?.[R]??null}if(D.newNo===void 0)return null;const M=l.fullTexts?D.newNo-1:$.value.get(D.newNo);return M===void 0?null:y.value?.[M]??null}function j(D){return D.type==="add"?"+":D.type==="del"?"-":" "}const H=B(()=>{let D=0;if(f.value)for(const M of f.value)M>D&&(D=M);else for(const M of l.lines??[])M.oldNo!==void 0&&M.oldNo>D&&(D=M.oldNo),M.newNo!==void 0&&M.newNo>D&&(D=M.newNo);return Math.max(4,String(D).length)});return(D,M)=>(g(),S("div",{class:Be(["hl-code",{gutter:d.value,"plain-pad":!a.value&&f.value===null,framed:e.framed,"responsive-wrap":e.responsiveWrap,"one-gutter":p.value===1,"two-gutters":p.value===2}]),style:Gt({"--gutter-ch":`${H.value}ch`})},[b("div",xze,[a.value?(g(!0),S(Ce,{key:0},rt(e.lines,(R,O)=>(g(),S("div",{key:O,class:Be(["hl-row",`row-${R.type}`])},[d.value?(g(),S(Ce,{key:0},[c.value?(g(),S("span",Sze,I(R.oldNo??""),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Be(["hl-gutter new",{offset:c.value}])},I(R.newNo??""),3)):Y("",!0)],64)):Y("",!0),b("span",Cze,I(j(R)),1),b("span",Mze,[C(R)?(g(!0),S(Ce,{key:0},rt(C(R),(U,Z)=>(g(),S("span",{key:Z,style:Gt(i(U))},I(U.content),5))),128)):(g(),S(Ce,{key:1},[He(I(R.text),1)],64))])],2))),128)):(g(!0),S(Ce,{key:1},rt(h.value,(R,O)=>(g(),S("div",{key:O,class:Be(["hl-row",e.lineClass?e.lineClass(f.value?.[O]??-1):void 0]),"data-line":f.value?f.value[O]:void 0},[f.value?(g(),S("span",Tze,I(f.value[O]??""),1)):Y("",!0),b("span",Eze,[k.value&&k.value[O]?(g(!0),S(Ce,{key:0},rt(k.value[O],(U,Z)=>(g(),S("span",{key:Z,style:Gt(i(U))},I(U.content),5))),128)):(g(),S(Ce,{key:1},[He(I(R),1)],64))])],10,Aze))),128))])],6))}}),sB=vt(Lze,[["__scopeId","data-v-4b6e3ce1"]]),$ze={class:"turn-diff-panel"},Nze={class:"tdp-body"},zze={class:"tdp-file-head"},Bze={class:"tdp-path"},Rze={key:0,class:"tdp-diff"},Pze={key:1,class:"tdp-unavailable"},Fze=Je({__name:"TurnDiffPanel",props:{changes:{},cwd:{}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(a,c){if(!c)return null;const u=y=>y.replaceAll("\\","/"),d=u(a);let f=u(c);f.length>1&&(f=f.replace(/\/+$/,""));const p=/^[a-z]:\//i.test(f)||/^[a-z]:\//i.test(d)||f.startsWith("//")||d.startsWith("//"),h=p?f.toLowerCase():f,m=p?d.toLowerCase():d,k=h.endsWith("/")?h:`${h}/`;if(m!==h&&!m.startsWith(k))return null;const x=m===h?"":d.slice(k.length);return x.split("/").includes("..")?null:x||null}function l(a,c=48){return!a||a.length<=c?a:"…"+a.slice(a.length-c+1)}function r(a){return i(a.path,n.cwd)??a.path}return(a,c)=>(g(),S("div",$ze,[W(Ca,{title:v(s)("conversation.turnFiles.diffTitle"),onClose:c[0]||(c[0]=u=>o("close"))},null,8,["title"]),b("div",Nze,[(g(!0),S(Ce,null,rt(e.changes,u=>(g(),S("section",{key:u.path,class:"tdp-file"},[b("div",zze,[W(Cn,{text:u.path},{default:ae(()=>[b("span",Bze,I(l(r(u))),1)]),_:2},1032,["text"]),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[He(I(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]),u.diff?(g(),S("div",Rze,[W(sB,{lines:u.diff,path:u.path,framed:!1},null,8,["lines","path"])])):(g(),S("div",Pze,[b("p",null,I(v(s)("conversation.turnFiles.diffUnavailable")),1),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[He(I(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]))]))),128))])]))}}),jze=vt(Fze,[["__scopeId","data-v-67a3cc7e"]]),Oze=["aria-label"],Hze=Je({__name:"ThinkingIndicator",props:{size:{default:"md"},fast:{type:Boolean},label:{default:"Waiting for response…"}},setup(e){const t=af.length*yu;function n(o){return{"--thinking-frame-delay":`${o*yu-t}ms`,"--thinking-frame-fast-delay":`${o*(yu/2)-t/2}ms`}}return(o,s)=>(g(),S("span",{class:Be(["ui-thinking-indicator",[`ui-thinking-indicator--${e.size}`,{"ui-thinking-indicator--fast":e.fast}]]),"aria-label":e.label,role:"status"},[(g(!0),S(Ce,null,rt(v(af),(i,l)=>(g(),S("span",{key:i,class:"ui-thinking-indicator__frame",style:Gt(n(l)),"aria-hidden":"true"},I(i),5))),128))],10,Oze))}}),Dze=vt(Hze,[["__scopeId","data-v-ed8aef9e"]]),Vze={class:"sc"},Wze={key:0,class:"sc-empty"},qze={key:2,class:"sc-loading","aria-hidden":"true"},Uze={class:"sc-composer"},Zze=["placeholder"],Kze=["disabled"],Gze=Je({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),l=B(()=>o.turns.find(_=>_.role==="user")?.text?.trim()??""),r=B(()=>o.title?.trim()||i("sideChat.title")),a=B(()=>o.subtitle?.trim()?o.subtitle.trim():l.value||i("sideChat.subtitle")),c=V(""),u=V(null),d=V(null);function f(){const w=c.value.trim();w&&(s("send",w),c.value="",yt(()=>{u.value&&(u.value.style.height="auto"),p()}))}function p(){const w=d.value;w&&(w.scrollTop=w.scrollHeight)}const h=B(()=>{const w=o.turns;if(w.length===0)return"0";const _=w.at(-1),A=_.thinking?.length??0,P=_.tools?.reduce((z,L)=>z+L.name.length+(L.arg?.length??0)+(L.output?.join("").length??0),0)??0;return`${w.length}:${_.text.length}:${A}:${P}`});Ke(h,async()=>{!o.running&&!o.sending||(await yt(),p())});const m=B(()=>o.sending?o.turns.at(-1)?.role==="user":!1);function k(w){w.key==="Enter"&&!w.shiftKey&&!w.isComposing&&(w.preventDefault(),f())}function x(){const w=u.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}function y(){u.value?.focus()}return t({focusInput:y}),(w,_)=>(g(),S("div",Vze,[W(Ca,{title:r.value,subtitle:a.value,"close-label":v(i)("thinking.close"),onClose:_[0]||(_[0]=A=>s("close"))},null,8,["title","subtitle","close-label"]),b("div",{ref_key:"bodyRef",ref:d,class:"sc-body"},[e.turns.length===0?(g(),S("div",Wze,I(v(i)("sideChat.empty")),1)):(g(),ue(d9,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running},null,8,["turns","turn-active","working"])),m.value?(g(),S("div",qze,[W(Dze)])):Y("",!0)],512),b("div",Uze,[Jn(b("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":_[1]||(_[1]=A=>c.value=A),class:"sc-input",rows:"1",placeholder:v(i)("sideChat.placeholder"),onInput:x,onKeydown:k},null,40,Zze),[[js,c.value]]),W(Cn,{text:v(i)("sideChat.send")},{default:ae(()=>[b("button",{type:"button",class:"sc-send",disabled:!c.value.trim(),onClick:f},[W(Ee,{name:"arrow-right",size:"sm"})],8,Kze)]),_:1},8,["text"])])]))}}),Yze=vt(Gze,[["__scopeId","data-v-130e8cd2"]]),Xze={class:"changes-pane"},Jze={class:"dv-path"},Qze={class:"diff-head"},eBe={class:"back-label"},tBe={key:"loading",class:"empty-state diff-loading"},nBe={key:"empty",class:"empty-state"},oBe={class:"dv-change-count"},sBe={class:"ch-head"},iBe={class:"br-label"},lBe={class:"br-name"},rBe={key:0,class:"sync-info"},aBe={key:0,class:"ahead"},cBe={key:0,class:"behind"},uBe={key:1,class:"empty-head"},dBe={key:0,class:"ch-list"},fBe=["onClick"],pBe={class:"fpath"},hBe={key:1,class:"ch-list ch-tree"},mBe={class:"tree-list"},gBe=["onClick"],vBe={class:"tree-name"},yBe=["onClick"],wBe={class:"tree-name"},kBe={key:2,class:"empty-state"},bBe={key:3,class:"empty-state"},_Be=Je({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{default:null},emptyFile:{type:Boolean,default:!1},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(C){const j=C.toLowerCase();return j==="modified"?"modified":j==="added"?"added":j==="deleted"?"deleted":j==="renamed"?"renamed":j==="untracked"?"untracked":j==="conflicted"?"conflicted":j==="ignored"?"ignored":j==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function r(C){return l[i(C)]??"?"}function a(C,j=60){return C.length<=j?C:"…"+C.slice(C.length-j+1)}const c=B(()=>o.gitInfo!==null),u=B(()=>o.changes.length>0),d=B(()=>(o.selectedDiffPath??null)!==null),f=B(()=>o.mode==="detail"||o.mode==="full"&&d.value),p=B(()=>o.fileDiff??[]),h=B(()=>o.fileDiffLoading===!0),m=V(null);Ke([()=>o.selectedDiffPath,h],([,C])=>{!C&&m.value&&(m.value.scrollLeft=0)},{flush:"post"});function k(C){s("open",C)}function x(){s("back")}function y(){s("close")}const w=V("list");function _(C){w.value=C}function A(C){const j={children:[]},H=[...C].sort((D,M)=>D.path.localeCompare(M.path));for(const D of H){const M=D.path.split("/");let R=j;for(let O=0;Oee.name===U&&ee.kind===(Z?"file":"folder"));te||(te={name:U,path:q,kind:Z?"file":"folder",status:Z?D.status:void 0,children:[]},R.children.push(te)),R=te}}return j.children}const P=B(()=>A(o.changes)),z=V(new Set);function L(C){return!z.value.has(C)}const E=B(()=>{const C=[];function j(H,D){for(const M of H)C.push({node:M,depth:D}),M.kind==="folder"&&L(M.path)&&j(M.children,D+1)}return j(P.value,0),C});function T(C){const j=new Set(z.value);j.has(C.path)?j.delete(C.path):j.add(C.path),z.value=j}function $(C){return`${16+C*16}px`}return(C,j)=>(g(),S("div",Xze,[f.value?(g(),S(Ce,{key:0},[W(Ca,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[W(Cn,{text:e.selectedDiffPath??""},{default:ae(()=>[b("span",Jze,I(a(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),b("div",Qze,[e.hideBack?Y("",!0):(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:x},{default:ae(()=>[j[0]||(j[0]=b("span",{"aria-hidden":"true"},"←",-1)),b("span",eBe,I(v(n)("diff.back")),1)]),_:1}))]),W(qi,{name:"diff-content",mode:"out-in"},{default:ae(()=>[h.value?(g(),S("div",tBe,[W(Zo,{size:"md"}),b("span",null,I(v(n)("diff.loading")),1)])):p.value.length>0?(g(),S("div",{key:"lines",ref_key:"diffScrollRef",ref:m,class:"dv-lines-wrap"},[W(sB,{lines:p.value,path:e.selectedDiffPath??void 0,"line-numbers":!0,framed:!1,"full-texts":e.fullTexts,"responsive-wrap":""},null,8,["lines","path","full-texts"])],512)):(g(),S("div",nBe,I(e.emptyFile?v(n)("diff.emptyFile"):v(n)("diff.noDiff")),1))]),_:1})],64)):(g(),S(Ce,{key:1},[W(Ca,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[b("span",oBe,I(v(n)(e.changes.length===1?"diff.fileCountOne":"diff.fileCountOther",{number:e.changes.length})),1),W(di,{"model-value":w.value,size:"sm",options:[{value:"list",label:v(n)("diff.list")},{value:"tree",label:v(n)("diff.tree")}],"onUpdate:modelValue":_},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),b("div",sBe,[c.value?(g(),S(Ce,{key:0},[b("span",iBe,I(v(n)("diff.branch")),1),b("span",lBe,I(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(g(),S("span",rBe,[W(Cn,{text:v(n)("diff.aheadTitle")},{default:ae(()=>[e.gitInfo.ahead>0?(g(),S("span",aBe,"↑"+I(e.gitInfo.ahead),1)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:v(n)("diff.behindTitle")},{default:ae(()=>[e.gitInfo.behind>0?(g(),S("span",cBe,"↓"+I(e.gitInfo.behind),1)):Y("",!0)]),_:1},8,["text"])])):Y("",!0)],64)):(g(),S("span",uBe,I(v(n)("diff.empty")),1))]),u.value&&w.value==="list"?(g(),S("div",dBe,[(g(!0),S(Ce,null,rt(e.changes,H=>(g(),ue(Cn,{key:H.path,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"ch-row",onClick:D=>k(H.path)},[b("span",{class:Be(["badge",i(H.status)])},I(r(H.status)),3),b("span",pBe,I(a(H.path)),1)],8,fBe)]),_:2},1032,["text"]))),128))])):u.value&&w.value==="tree"?(g(),S("div",hBe,[b("ul",mBe,[(g(!0),S(Ce,null,rt(E.value,({node:H,depth:D})=>(g(),S("li",{key:H.path,class:"tree-node"},[H.kind==="folder"?(g(),S("button",{key:0,type:"button",class:"tree-row tree-folder",style:Gt({paddingLeft:$(D)}),onClick:M=>T(H)},[W(Ee,{class:"tree-icon",name:"folder-solid",size:"sm"}),b("span",vBe,I(H.name),1)],12,gBe)):(g(),ue(Cn,{key:1,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"tree-row tree-file",style:Gt({paddingLeft:$(D)}),onClick:M=>k(H.path)},[b("span",{class:Be(["badge",i(H.status)])},I(r(H.status)),3),b("span",wBe,I(H.name),1)],12,yBe)]),_:2},1032,["text"]))]))),128))])])):c.value?(g(),S("div",kBe,I(v(n)("diff.clean")),1)):(g(),S("div",bBe,I(v(n)("diff.empty")),1))],64))]))}}),xBe=vt(_Be,[["__scopeId","data-v-811473b6"]]),SBe={class:"panel-tab-bar"},CBe=["data-tab-id"],MBe=["aria-selected","tabindex","title","onClick","onKeydown"],ABe={class:"ptb-t"},TBe=["aria-label","onClick"],EBe={class:"ptb-tail"},IBe=["disabled"],LBe=["disabled"],$Be=Je({__name:"PanelTabBar",props:{tabs:{},activeId:{},expanded:{type:Boolean},mobile:{type:Boolean},canOpenDiff:{type:Boolean},canOpenSideChat:{type:Boolean}},emits:["activate","close","toggleExpanded","hide","openDiff","openSideChat"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(null),a=V(!1);Ke(()=>n.activeId,async m=>{if(!m)return;await yt(),Array.from(i.value?.querySelectorAll("[data-tab-id]")??[]).find(x=>x.dataset.tabId===m)?.scrollIntoView?.({inline:"nearest",block:"nearest"})});function c(m){Array.from(i.value?.querySelectorAll(".ptb-tab-main")??[])[m]?.focus()}function u(m,k){if(n.tabs.length===0)return;let x;m.key==="ArrowRight"?x=(k+1)%n.tabs.length:m.key==="ArrowLeft"?x=(k-1+n.tabs.length)%n.tabs.length:m.key==="Home"?x=0:m.key==="End"&&(x=n.tabs.length-1),x!==void 0&&(m.preventDefault(),o("activate",n.tabs[x].id),yt(()=>c(x)))}function d(){a.value=!1,document.removeEventListener("pointerdown",f,!0)}function f(m){const k=m.target;r.value?.contains(k)||l.value?.el?.contains(k)||d()}function p(){if(a.value){d();return}a.value=!0,document.addEventListener("pointerdown",f,!0),yt(()=>r.value?.querySelector("button:not(:disabled)")?.focus())}function h(m){d(),o(m==="diff"?"openDiff":"openSideChat")}return En(d),(m,k)=>(g(),S("header",SBe,[b("div",{ref_key:"tabsRef",ref:i,class:"ptb-tabs",role:"tablist"},[(g(!0),S(Ce,null,rt(e.tabs,(x,y)=>(g(),S("div",{key:x.id,class:Be(["ptb-tab",{on:x.id===e.activeId}]),"data-tab-id":x.id},[b("button",{type:"button",class:"ptb-tab-main",role:"tab","aria-selected":x.id===e.activeId,tabindex:x.id===e.activeId?0:-1,title:x.title,onClick:w=>o("activate",x.id),onKeydown:w=>u(w,y)},[W(Ee,{name:x.icon,size:"sm"},null,8,["name"]),b("span",ABe,I(x.title),1)],40,MBe),W(Cn,{text:v(s)("panel.closeTab")},{default:ae(()=>[b("button",{type:"button",class:"ptb-x","aria-label":v(s)("panel.closeTab"),onClick:xt(w=>o("close",x.id),["stop"])},[W(Ee,{name:"close",size:"sm"})],8,TBe)]),_:2},1032,["text"])],10,CBe))),128))],512),b("div",EBe,[W(Dt,{ref_key:"addButtonRef",ref:l,size:"sm",label:v(s)("panel.newTab"),"aria-haspopup":"menu","aria-expanded":a.value,onClick:p,onKeydown:[go(xt(p,["prevent"]),["down"]),go(xt(p,["prevent"]),["up"])]},{default:ae(()=>[W(Ee,{name:"plus",size:"sm"})]),_:1},8,["label","aria-expanded","onKeydown"]),e.tabs.length>0&&!e.mobile?(g(),ue(Dt,{key:0,size:"sm",label:e.expanded?v(s)("panel.collapse"):v(s)("panel.expand"),onClick:k[0]||(k[0]=x=>o("toggleExpanded"))},{default:ae(()=>[W(Ee,{name:e.expanded?"collapse":"expand",size:"sm"},null,8,["name"])]),_:1},8,["label"])):Y("",!0),W(Dt,{class:"ptb-hide",size:"sm",label:v(s)("panel.hide"),onClick:k[1]||(k[1]=x=>o("hide"))},{default:ae(()=>[W(Ee,{name:e.mobile?"close":"panel-collapse-right",size:"sm"},null,8,["name"])]),_:1},8,["label"]),a.value?(g(),S("div",{key:1,ref_key:"addMenuRef",ref:r,class:"panel-add-menu",role:"menu",onKeydown:k[4]||(k[4]=go(xt(x=>{d(),l.value?.el?.focus()},["prevent"]),["esc"]))},[b("button",{type:"button",role:"menuitem",disabled:!e.canOpenSideChat,onClick:k[2]||(k[2]=x=>h("sideChat"))},[W(Ee,{name:"message",size:"sm"}),b("span",null,I(v(s)("sideChat.title")),1)],8,IBe),b("button",{type:"button",role:"menuitem",disabled:!e.canOpenDiff,onClick:k[3]||(k[3]=x=>h("diff"))},[W(Ee,{name:"git-fork",size:"sm"}),b("span",null,I(v(s)("panel.tabs.diff")),1)],8,LBe)],544)):Y("",!0)])]))}}),NBe=vt($Be,[["__scopeId","data-v-da364eda"]]);function iB(e,t){let n=null;In(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,yt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),vo(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const zBe={class:"search-wrap"},BBe={key:0,class:"tab-strip"},RBe={key:1,class:"state-row"},PBe={key:2,class:"state-row unavail"},FBe={key:3,class:"model-list"},jBe=["aria-selected","onClick","onMouseenter"],OBe={class:"check"},HBe={class:"model-main"},DBe={class:"model-name"},VBe={class:"model-id"},WBe={key:0,class:"caps"},qBe={class:"model-provider"},UBe={class:"model-ctx"},ZBe={key:0,class:"empty"},KBe={class:"footer-hint"},GBe=Je({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=$t(),o=r6(),s=B(()=>o.value?wu:Z0),i=B(()=>o.value?{modelValue:!0,title:n("model.title"),closeOnEsc:!1}:{open:!0,title:n("model.title"),closeOnEsc:!1,size:"xl",height:"fixed"}),l=e,r=t,a=B(()=>new Set(l.starredIds??[]));function c(L){return a.value.has(L)}const u=V(""),d=V(null),f=V(null),p=V("all");iB(f,d);const h=B(()=>{const L=new Set,E=[{id:"all",label:n("model.allTab")}];for(const T of l.models)L.has(T.provider)||(L.add(T.provider),E.push({id:T.provider,label:T.provider}));return E}),m=B(()=>{const L=u.value.toLowerCase().trim(),E=l.models.filter(T=>{if(p.value!=="all"&&T.provider!==p.value)return!1;const $=(T.displayName??T.model).toLowerCase().includes(L),C=T.provider.toLowerCase().includes(L),j=T.id.toLowerCase().includes(L);return!L||$||C||j});return p.value!=="all"?E:E.sort((T,$)=>{const C=c(T.id)?1:0;return(c($.id)?1:0)-C})}),k=B(()=>m.value),x=V(0);Ke([u,p],()=>{x.value=0}),Ke(h,L=>{L.some(E=>E.id===p.value)||(p.value="all")}),Ke(k,L=>{x.value=Math.min(x.value,Math.max(L.length-1,0))});function y(L){if(L.key==="Escape"){r("close");return}if(L.key==="ArrowDown")L.preventDefault(),x.value=Math.min(x.value+1,k.value.length-1);else if(L.key==="ArrowUp")L.preventDefault(),x.value=Math.max(x.value-1,0);else if(L.key==="Enter"){const E=k.value[x.value];E&&r("select",E.id)}}In(()=>{document.addEventListener("keydown",y)}),En(()=>{document.removeEventListener("keydown",y)});function w(L){r("select",L)}function _(L){return k.value.indexOf(L)}function A(L){p.value=L}const P={image_in:"imageIn",imageIn:"imageIn",image_out:"imageOut",imageOut:"imageOut",vision:"vision",video_in:"videoIn",videoIn:"videoIn",audio_in:"audioIn",audioIn:"audioIn",audio_out:"audioOut",audioOut:"audioOut",thinking:"thinking",always_thinking:"alwaysThinking",alwaysThinking:"alwaysThinking",adaptive_thinking:"adaptiveThinking",adaptiveThinking:"adaptiveThinking",tool_use:"toolUse",toolUse:"toolUse",fast_mode:"fastMode",fastMode:"fastMode"};function z(L){const E=P[L];return E?n(`model.capabilities.${E}`):n("model.capabilities.unknown",{capability:L})}return(L,E)=>(g(),ue(cs(s.value),io(i.value,{onClose:E[1]||(E[1]=T=>r("close"))}),{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:f,class:Be(["mp",{"mp--sheet":v(o)}])},[b("div",zBe,[W(us,{ref_key:"searchRef",ref:d,modelValue:u.value,"onUpdate:modelValue":E[0]||(E[0]=T=>u.value=T),placeholder:v(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:""},null,8,["modelValue","placeholder"])]),h.value.length>1?(g(),S("div",BBe,[(g(!0),S(Ce,null,rt(h.value,T=>(g(),ue(Nt,{key:T.id,variant:T.id===p.value?"secondary":"ghost",size:"sm",onClick:$=>A(T.id)},{default:ae(()=>[He(I(T.label),1)]),_:2},1032,["variant","onClick"]))),128))])):Y("",!0),e.loading?(g(),S("div",RBe,[W(Zo,{size:"sm"}),b("span",null,I(v(n)("model.loading")),1)])):e.unavailable?(g(),S("div",PBe,[W(Ee,{name:"alert-triangle",size:"lg"}),b("span",null,I(v(n)("model.unavailable")),1)])):(g(),S("div",FBe,[(g(!0),S(Ce,null,rt(k.value,T=>(g(),S("div",{key:T.id,class:Be(["model-row",{"is-current":T.id===e.current,"is-selected":_(T)===x.value}]),role:"option","aria-selected":T.id===e.current,onClick:$=>w(T.id),onMouseenter:$=>x.value=_(T)},[b("span",OBe,[T.id===e.current?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",HBe,[b("span",DBe,I(T.displayName??T.model),1),b("span",VBe,I(T.id),1),T.capabilities&&T.capabilities.length>0?(g(),S("span",WBe,[(g(!0),S(Ce,null,rt(T.capabilities,$=>(g(),ue(Fl,{key:$,variant:"info",size:"sm"},{default:ae(()=>[He(I(z($)),1)]),_:2},1024))),128))])):Y("",!0)]),b("span",qBe,I(T.provider),1),b("span",UBe,I(v(n)("model.contextSuffix",{size:v(ba)(T.maxContextSize)})),1),W(Dt,{size:"sm",label:c(T.id)?v(n)("model.unstarTitle"):v(n)("model.starTitle"),onClick:xt($=>r("toggle-star",T.id),["stop"])},{default:ae(()=>[c(T.id)?(g(),ue(Ee,{key:0,name:"star",size:"md"})):(g(),ue(Ee,{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["label","onClick"])],42,jBe))),128)),k.value.length===0&&!e.loading&&!e.unavailable?(g(),S("div",ZBe,I(l.models.length===0?v(n)("model.emptyNoModels"):v(n)("model.emptyNoMatch")),1)):Y("",!0)])),b("div",KBe,I(v(n)("model.footerHint")),1)],2)]),_:1},16))}}),YBe=vt(GBe,[["__scopeId","data-v-466b8fec"]]),XBe=["aria-checked","aria-label","disabled"],JBe=Je({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("button",{class:Be(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[b("span",{class:"ui-switch__thumb"},null,-1)])],10,XBe))}}),wi=vt(JBe,[["__scopeId","data-v-d7337ade"]]),QBe=["value","disabled"],eRe=Je({__name:"Select",props:{modelValue:{},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(s){n("update:modelValue",s.target.value)}return(s,i)=>(g(),S("select",{class:Be(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error}]]),value:e.modelValue,disabled:e.disabled,onChange:o},[jn(s.$slots,"default",{},void 0,!0)],42,QBe))}}),F4=vt(eRe,[["__scopeId","data-v-77d887db"]]),tRe=["pythinker","openai","openai_responses","anthropic","google-genai","vertexai"],nRe=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function og(){return{model:"",maxContextSize:"",displayName:""}}function bM(){return{id:"",type:"openai",apiKey:"",baseUrl:"",models:[og()]}}function lB(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:""})}return n}function oRe(e,t={}){const n={models:{}},o=e.id.trim();return o===""?n.id="idRequired":nRe.test(o)||(n.id="idInvalid"),t.apiKey===!0&&e.apiKey.trim()===""&&(n.apiKey="apiKeyRequired"),t.baseUrl===!0&&e.baseUrl.trim()===""&&(n.baseUrl="baseUrlRequired"),e.models.length===0&&(n.modelsEmpty="modelRequired"),e.models.forEach((s,i)=>{const l={};s.model.trim()===""&&(l.model="modelRequired");const r=s.maxContextSize.trim(),a=Number(r);r===""?l.maxContextSize="contextSizeRequired":(!/^\d+$/.test(r)||!Number.isSafeInteger(a)||a<1)&&(l.maxContextSize="contextSizeInvalid"),(l.model!==void 0||l.maxContextSize!==void 0)&&(n.models[i]=l)}),n}function sRe(e){return e.id!==void 0||e.apiKey!==void 0||e.baseUrl!==void 0||e.modelsEmpty!==void 0||Object.keys(e.models).length>0}function rB(e){return e.map(t=>({model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),displayName:t.displayName.trim()||void 0}))}function iRe(e){return{id:e.id.trim(),type:e.type,apiKey:e.apiKey.trim()||void 0,baseUrl:e.baseUrl.trim()||void 0,models:rB(e.models)}}function lRe(e,t,n,o){const s=rB(e.models),i=o?.includes("/")?o.slice(o.indexOf("/")+1):o;return{newId:e.id.trim()!==t.id?e.id.trim():void 0,type:e.type,apiKey:e.apiKey.trim()||(n?"":void 0),baseUrl:e.baseUrl.trim()||void 0,defaultModel:i&&s.some(l=>l.model===i)?i:void 0,models:s}}const rRe=Je({__name:"Skeleton",props:{width:{},height:{},circle:{type:Boolean}},setup(e){return(t,n)=>(g(),S("span",{class:Be(["ui-skeleton",{"is-circle":e.circle}]),style:Gt({width:e.width??"100%",height:e.height??"12px"}),"aria-hidden":"true"},null,6))}}),_M=vt(rRe,[["__scopeId","data-v-f4989189"]]),aRe={key:0,class:"ui-field__label"},cRe={key:1,class:"ui-field__error"},uRe={key:2,class:"ui-field__hint"},dRe=Je({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-field",{"has-error":!!e.error}])},[e.label?(g(),S("label",aRe,I(e.label),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0),e.error?(g(),S("span",cRe,I(e.error),1)):e.hint?(g(),S("span",uRe,I(e.hint),1)):Y("",!0)],2))}}),Ir=vt(dRe,[["__scopeId","data-v-bd93f701"]]),fRe={class:"provider-form__fields"},pRe=["value"],hRe={class:"provider-form__key"},mRe={class:"provider-form__models-head"},gRe={class:"provider-form__models"},vRe={class:"provider-form__model provider-form__model--head"},yRe={key:0,class:"provider-form__row-error",role:"alert"},wRe={key:0,class:"provider-form__error",role:"alert"},kRe={class:"provider-form__actions"},bRe=Je({__name:"ProviderForm",props:{mode:{},provider:{},config:{}},emits:["dirtyChange","saved","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=bM(),l=ds(i),r=V({models:{}}),a=V(""),c=V(!1),u=V(!1),d=V(!1),f=V(!1),p=B(()=>tRe.map(L=>({value:L,label:s(`providers.types.${L}`)})));function h(){const L=n.provider;if(n.mode==="edit"&&L!==void 0){l.id=L.id,l.type=L.type,l.apiKey="",l.baseUrl=L.baseUrl??"";const E=lB(L,n.config?.models);l.models=E.length>0?E:[og()]}else Object.assign(l,bM());r.value={models:{}},a.value="",o("dirtyChange",!1)}function m(L){const E=r.value[L];return E===void 0?"":s(`providers.error.${E}`)}function k(L,E){const T=r.value.models[L]?.[E];return T===void 0?"":s(`providers.error.${T}`)}function x(L){if(r.value[L]===void 0)return;const{[L]:E,...T}=r.value;r.value={...T,models:r.value.models}}function y(L,E){const T=r.value.models[L];if(T?.[E]===void 0)return;const{[E]:$,...C}=T,{[L]:j,...H}=r.value.models;r.value={...r.value,models:Object.keys(C).length>0?{...H,[L]:C}:H}}async function w(){const L=n.provider;if(!(n.mode!=="edit"||L===void 0||!L.hasApiKey))try{const E=await Ct().getProvider(L.id);E.apiKey&&!f.value&&(l.apiKey=E.apiKey,d.value=!0)}catch{d.value=!1}}function _(){o("dirtyChange",!0)}function A(){l.models.push(og()),_()}function P(L){l.models.length<=1||(l.models.splice(L,1),r.value={...r.value,models:{}},_())}async function z(){if(c.value)return;const L=oRe(l,{apiKey:n.mode==="add",baseUrl:n.mode==="add"});if(r.value=L,sRe(L)){a.value=L.modelsEmpty===void 0?"":s(`providers.error.${L.modelsEmpty}`);return}c.value=!0,a.value="";try{if(n.mode==="add"){const $=await Ct().addProvider(iRe(l));o("dirtyChange",!1),o("saved",$.id);return}const E=n.provider;if(E===void 0)return;const T=await Ct().updateProvider(E.id,lRe(l,E,d.value,n.config?.providers[E.id]?.defaultModel));o("dirtyChange",!1),o("saved",T.provider.id)}catch{a.value=s("providers.saveFailed")}finally{c.value=!1}}return In(()=>{h(),w()}),(L,E)=>(g(),S("form",{class:"provider-form",onSubmit:xt(z,["prevent"]),onInput:_},[b("div",fRe,[W(Ir,{label:v(s)("providers.fieldId"),error:m("id")},{default:ae(()=>[W(us,{modelValue:l.id,"onUpdate:modelValue":[E[0]||(E[0]=T=>l.id=T),E[1]||(E[1]=T=>x("id"))],autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),_:1},8,["label","error"]),W(Ir,{label:v(s)("providers.fieldType")},{default:ae(()=>[W(F4,{modelValue:l.type,"onUpdate:modelValue":E[2]||(E[2]=T=>l.type=T)},{default:ae(()=>[(g(!0),S(Ce,null,rt(p.value,T=>(g(),S("option",{key:T.value,value:T.value},I(T.label),9,pRe))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey"),error:m("apiKey")},{default:ae(()=>[b("div",hRe,[W(us,{modelValue:l.apiKey,"onUpdate:modelValue":[E[3]||(E[3]=T=>l.apiKey=T),E[4]||(E[4]=T=>{f.value=!0,x("apiKey")})],type:u.value?"text":"password",placeholder:e.provider?.hasApiKey?v(s)("providers.apiKeySet"):"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),W(Dt,{class:"provider-form__eye",size:"sm",label:u.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:E[5]||(E[5]=T=>u.value=!u.value)},{default:ae(()=>[W(Ee,{name:u.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label","error"]),W(Ir,{label:v(s)("providers.fieldBaseUrl"),error:m("baseUrl")},{default:ae(()=>[W(us,{modelValue:l.baseUrl,"onUpdate:modelValue":[E[6]||(E[6]=T=>l.baseUrl=T),E[7]||(E[7]=T=>x("baseUrl"))],placeholder:v(s)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label","error"])]),b("div",mRe,[b("strong",null,I(v(s)("providers.fieldModels")),1),W(Nt,{type:"button",size:"sm",variant:"secondary",onClick:A},{default:ae(()=>[W(Ee,{name:"plus",size:"sm"}),He(I(v(s)("providers.addModel")),1)]),_:1})]),b("div",gRe,[b("div",vRe,[b("span",null,I(v(s)("providers.colModelId")),1),b("span",null,I(v(s)("providers.colContext")),1),b("span",null,I(v(s)("providers.colDisplayName")),1),E[9]||(E[9]=b("span",null,null,-1))]),(g(!0),S(Ce,null,rt(l.models,(T,$)=>(g(),S(Ce,{key:$},[b("div",{class:Be(["provider-form__model",{"has-error":!!r.value.models[$]}])},[W(us,{modelValue:T.model,"onUpdate:modelValue":[C=>T.model=C,C=>y($,"model")],placeholder:v(s)("providers.modelIdPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:T.maxContextSize,"onUpdate:modelValue":[C=>T.maxContextSize=C,C=>y($,"maxContextSize")],inputmode:"numeric",placeholder:v(s)("providers.modelContextPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:T.displayName,"onUpdate:modelValue":C=>T.displayName=C,placeholder:v(s)("providers.modelNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(Dt,{size:"sm",disabled:l.models.length<=1,label:v(s)("providers.removeModel"),onClick:C=>P($)},{default:ae(()=>[W(Ee,{name:"trash",size:"sm"})]),_:1},8,["disabled","label","onClick"])],2),r.value.models[$]?(g(),S("div",yRe,I([k($,"model"),k($,"maxContextSize")].filter(Boolean).join(" · ")),1)):Y("",!0)],64))),128))]),a.value?(g(),S("div",wRe,I(a.value),1)):Y("",!0),b("div",kRe,[W(Nt,{type:"button",variant:"secondary",onClick:E[8]||(E[8]=T=>o("cancel"))},{default:ae(()=>[He(I(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:c.value},{default:ae(()=>[He(I(v(s)("providers.save")),1)]),_:1},8,["loading"])])],32))}}),aB=vt(bRe,[["__scopeId","data-v-66e70e30"]]),_Re={class:"add-provider-flow"},xRe={key:0,class:"add-provider-flow__section"},SRe={key:0,class:"add-provider-flow__state"},CRe={key:1,class:"add-provider-flow__state"},MRe={class:"add-provider-flow__catalog"},ARe=["disabled","onClick"],TRe={class:"add-provider-flow__name"},ERe={key:0,class:"add-provider-flow__empty"},IRe={class:"add-provider-flow__key"},LRe={key:1,class:"add-provider-flow__warning"},$Re={class:"add-provider-flow__note"},NRe={key:2,class:"add-provider-flow__error",role:"alert"},zRe={class:"add-provider-flow__actions"},BRe={class:"add-provider-flow__note"},RRe={class:"add-provider-flow__key"},PRe={key:0,class:"add-provider-flow__error",role:"alert"},FRe={class:"add-provider-flow__actions"},jRe={key:2,class:"add-provider-flow__section"},ORe=Je({__name:"AddProviderFlow",props:{config:{},initialSource:{}},emits:["dirtyChange","added","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(n.initialSource??"catalog"),l=B(()=>[{value:"catalog",label:s("providers.catalog.sourceCatalog")},{value:"registry",label:s("providers.catalog.sourceRegistry")},{value:"manual",label:s("providers.catalog.sourceManual")}]),r=V([]),a=V("loading"),c=V(""),u=V(null),d=ds({id:"",apiKey:"",baseUrl:""}),f=V(""),p=V(!1),h=V(!1),m=ds({url:"",apiKey:""}),k=V(""),x=V(!1),y=V(!1),w=B(()=>{const $=c.value.trim().toLowerCase();return $===""?r.value:r.value.filter(C=>C.name.toLowerCase().includes($)||C.id.toLowerCase().includes($))}),_=B(()=>Object.hasOwn(n.config?.providers??{},d.id.trim()));async function A(){a.value="loading";try{r.value=await Ct().listCatalogProviders(),a.value="ready";const $=r.value.filter(C=>!C.rejected);$.length===1&&u.value===null&&z($[0])}catch{a.value="error"}}function P($){const C=$.rejectReason===null?"":`providers.catalog.rejectReason.${$.rejectReason}`;return C!==""&&s(C)!==C?s(C):s("providers.catalog.rejected")}function z($){$.rejected||(u.value=$,d.id=$.id,d.apiKey="",d.baseUrl="",f.value="")}function L(){o("dirtyChange",!0)}async function E(){const $=u.value;if($===null||p.value)return;const C=d.id.trim();if(C===""){f.value=s("providers.error.idRequired");return}if(d.apiKey.trim()===""){f.value=s("providers.error.apiKeyRequired");return}if($.needsBaseUrl&&d.baseUrl.trim()===""){f.value=s("providers.error.baseUrlRequired");return}p.value=!0,f.value="";try{await Ct().importCatalogProvider({catalogId:$.id,id:C===$.id?void 0:C,apiKey:d.apiKey.trim(),baseUrl:d.baseUrl.trim()||void 0}),o("dirtyChange",!1),o("added",C)}catch{f.value=s("providers.addFailed")}finally{p.value=!1}}async function T(){if(x.value)return;const $=m.url.trim();if($===""){k.value=s("providers.error.registryUrlRequired");return}x.value=!0,k.value="";try{const C=await Ct().importCustomRegistry({url:$,apiKey:m.apiKey.trim()||void 0});o("dirtyChange",!1);const j=C.providers[0];j===void 0?o("cancel"):o("added",j.id)}catch{k.value=s("providers.addFailed")}finally{x.value=!1}}return In(A),($,C)=>(g(),S("div",_Re,[W(di,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=j=>i.value=j),size:"sm",options:l.value},null,8,["modelValue","options"]),i.value==="catalog"?(g(),S("section",xRe,[a.value==="loading"?(g(),S("div",SRe,[W(Zo,{size:"sm"}),He(I(v(s)("providers.catalog.loading")),1)])):a.value==="error"?(g(),S("div",CRe,[b("span",null,I(v(s)("providers.catalog.loadError")),1),W(Nt,{size:"sm",variant:"secondary",onClick:A},{default:ae(()=>[He(I(v(s)("providers.catalog.retry")),1)]),_:1})])):u.value===null?(g(),S(Ce,{key:2},[W(us,{modelValue:c.value,"onUpdate:modelValue":C[1]||(C[1]=j=>c.value=j),placeholder:v(s)("providers.catalog.searchPlaceholder"),autocomplete:"off"},null,8,["modelValue","placeholder"]),b("div",MRe,[(g(!0),S(Ce,null,rt(w.value,j=>(g(),S("button",{key:j.id,type:"button",class:"add-provider-flow__entry",disabled:j.rejected,onClick:H=>z(j)},[b("span",TRe,I(j.name),1),j.wireType?(g(),ue(Fl,{key:0,size:"sm",variant:"neutral"},{default:ae(()=>[He(I(j.wireType),1)]),_:2},1024)):Y("",!0),C[15]||(C[15]=b("span",{class:"add-provider-flow__grow"},null,-1)),b("span",null,I(j.rejected?P(j):v(s)("providers.modelCount",{count:j.models.length})),1)],8,ARe))),128)),w.value.length===0?(g(),S("div",ERe,I(v(s)("providers.catalog.empty")),1)):Y("",!0)])],64)):(g(),S("form",{key:3,class:"add-provider-flow__form",onSubmit:xt(E,["prevent"]),onInput:L},[b("button",{type:"button",class:"add-provider-flow__back",onClick:C[2]||(C[2]=j=>u.value=null)},[W(Ee,{class:"add-provider-flow__back-icon",name:"chevron-right",size:"sm"}),He(I(v(s)("providers.catalog.backToList")),1)]),W(Ir,{label:v(s)("providers.fieldId")},{default:ae(()=>[W(us,{modelValue:d.id,"onUpdate:modelValue":C[3]||(C[3]=j=>d.id=j),autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",IRe,[W(us,{modelValue:d.apiKey,"onUpdate:modelValue":C[4]||(C[4]=j=>d.apiKey=j),type:h.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:h.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[5]||(C[5]=j=>h.value=!h.value)},{default:ae(()=>[W(Ee,{name:h.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),u.value.needsBaseUrl?(g(),ue(Ir,{key:0,label:v(s)("providers.fieldBaseUrl")},{default:ae(()=>[W(us,{modelValue:d.baseUrl,"onUpdate:modelValue":C[6]||(C[6]=j=>d.baseUrl=j),placeholder:v(s)("providers.baseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):Y("",!0),_.value?(g(),S("div",LRe,I(v(s)("providers.catalog.overwriteWarning")),1)):Y("",!0),b("div",$Re,I(v(s)("providers.catalog.willImport",{count:u.value.models.length})),1),f.value?(g(),S("div",NRe,I(f.value),1)):Y("",!0),b("div",zRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[7]||(C[7]=j=>o("cancel"))},{default:ae(()=>[He(I(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:p.value},{default:ae(()=>[He(I(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32))])):i.value==="registry"?(g(),S("form",{key:1,class:"add-provider-flow__section add-provider-flow__form",onSubmit:xt(T,["prevent"]),onInput:L},[b("p",BRe,I(v(s)("providers.catalog.registryHint")),1),W(Ir,{label:v(s)("providers.catalog.registryUrlLabel")},{default:ae(()=>[W(us,{modelValue:m.url,"onUpdate:modelValue":C[8]||(C[8]=j=>m.url=j),placeholder:"https://example.com/api.json",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",RRe,[W(us,{modelValue:m.apiKey,"onUpdate:modelValue":C[9]||(C[9]=j=>m.apiKey=j),type:y.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:y.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[10]||(C[10]=j=>y.value=!y.value)},{default:ae(()=>[W(Ee,{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),k.value?(g(),S("div",PRe,I(k.value),1)):Y("",!0),b("div",FRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[11]||(C[11]=j=>o("cancel"))},{default:ae(()=>[He(I(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:x.value},{default:ae(()=>[He(I(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32)):(g(),S("div",jRe,[W(aB,{mode:"add",config:e.config,onDirtyChange:C[12]||(C[12]=j=>o("dirtyChange",j)),onSaved:C[13]||(C[13]=j=>o("added",j)),onCancel:C[14]||(C[14]=j=>o("cancel"))},null,8,["config"])]))]))}}),cB=vt(ORe,[["__scopeId","data-v-01edc4ef"]]),HRe={class:"providers-panel"},DRe={class:"providers-panel__heading"},VRe={key:1,class:"providers-panel__split"},WRe=["aria-label"],qRe={class:"providers-pane-label"},URe=["aria-label"],ZRe=["data-testid","aria-current","onClick"],KRe=["aria-label"],GRe={"aria-hidden":"true"},YRe={class:"providers-panel__row-name"},XRe={class:"providers-pane-label"},JRe=["aria-current"],QRe={class:"providers-panel__add-icon"},ePe={class:"providers-panel__row-name"},tPe={class:"providers-panel__detail"},nPe={class:"providers-detail__head"},oPe={class:"providers-detail__tile","aria-hidden":"true"},sPe={class:"providers-detail__identity"},iPe={class:"providers-detail__name-row"},lPe={class:"providers-detail__meta"},rPe={class:"mono"},aPe={class:"providers-detail__sec"},cPe={class:"providers-detail__sec-head"},uPe={class:"providers-pane-label"},dPe={class:"providers-detail__count"},fPe={key:0,class:"providers-model-card"},pPe={key:0,class:"providers-model-name"},hPe={key:1,class:"providers-detail__empty"},mPe={class:"providers-detail__sec"},gPe={class:"providers-detail__foot"},xM="$add",vPe=Je({__name:"ProvidersPanel",props:{discardToken:{default:0}},emits:["dirtyChange"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{confirm:s}=z1(),i=R1(),l=V([]),r=V(null),a=V(!1),c=V(!1),u=V(null),d=V(!1),f=B(()=>l.value.toSorted((E,T)=>E.id.localeCompare(T.id))),p=B(()=>u.value===xM),h=B(()=>f.value.find(E=>E.id===u.value)??null),m=B(()=>{const E=h.value;if(!E?.models?.length)return[];const T=new Map(lB(E,r.value?.models).map($=>[$.model,$.maxContextSize]));return E.models.map($=>{const C=T.get($)?.trim()??"";return{id:$,contextBadge:k(C)}})});function k(E){if(!E||!/^\d+$/.test(E))return;const T=Number(E);if(!(!Number.isFinite(T)||T<=0))return T>=1e6?`${x(T/1e6)}M`:T>=1e3?`${x(T/1e3)}K`:String(T)}function x(E){return String(Number(E.toFixed(1)))}function y(E){return E==="connected"?"ok":E==="error"?"error":"idle"}function w(E){return(E.trim()[0]??"?").toUpperCase()}Ke(d,E=>n("dirtyChange",E),{immediate:!0}),Ke(()=>e.discardToken,()=>{d.value=!1,u.value=f.value[0]?.id??null});async function _(){await i.refreshRuntimeState(),await A()}async function A(){a.value=!0,c.value=!1;try{l.value=await Ct().listProviders(),f.value.some(E=>E.id===u.value)||(u.value=f.value[0]?.id??null)}catch{l.value=[],c.value=!0}try{r.value=await Ct().getConfig()}catch{r.value=null}finally{a.value=!1}}function P(E){d.value||(u.value=E)}async function z(E){d.value=!1,await _(),u.value=E}async function L(E){await s({title:o("providers.deleteProvider"),message:o("providers.deleteConfirm",{id:E.id,count:E.models?.length??0}),confirmLabel:o("providers.deleteConfirmYes"),cancelLabel:o("common.cancel"),variant:"danger",action:async()=>{await Ct().deleteProvider(E.id),u.value=null,d.value=!1,await _()}})}return In(A),(E,T)=>(g(),S("section",HRe,[b("div",DRe,[b("div",null,[b("h3",null,I(v(o)("providers.title")),1),b("p",null,I(v(o)("providers.description")),1)]),!a.value&&!c.value?(g(),ue(Dt,{key:0,size:"sm",label:v(o)("providers.refresh"),"data-testid":"providers-refresh",onClick:T[0]||(T[0]=$=>_())},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"})]),_:1},8,["label"])):Y("",!0)]),c.value?(g(),ue(K9,{key:0,variant:"warning"},{default:ae(()=>[He(I(v(o)("providers.unavailable")),1)]),_:1})):(g(),S("div",VRe,[b("nav",{class:"providers-panel__list","aria-label":v(o)("providers.title")},[b("div",qRe,I(v(o)("settings.tabs.providers")),1),a.value?(g(),S(Ce,{key:0},rt(3,$=>b("div",{key:$,class:"providers-panel__row providers-panel__row--skeleton",role:"status","aria-label":v(o)("providers.loading")},[W(_M,{width:"26px",height:"26px",circle:""}),W(_M,{width:`${52-$*6}%`,height:"11px"},null,8,["width"])],8,URe)),64)):(g(),S(Ce,{key:1},[(g(!0),S(Ce,null,rt(f.value,$=>(g(),S("button",{key:$.id,type:"button",class:Be(["providers-panel__row",{"is-selected":u.value===$.id}]),"data-testid":`provider-${$.id}-toggle`,"aria-current":u.value===$.id,onClick:C=>P($.id)},[W(Cn,{text:v(o)(`providers.status.${$.status}`)},{default:ae(()=>[b("span",{class:Be(["providers-panel__tile",`is-${y($.status)}`]),role:"img","aria-label":v(o)(`providers.status.${$.status}`)},[b("span",GRe,I(w($.type)),1)],10,KRe)]),_:2},1032,["text"]),b("span",YRe,I($.id),1),b("span",{class:Be(["providers-panel__row-dot",`is-${y($.status)}`]),"aria-hidden":"true"},null,2)],10,ZRe))),128)),b("div",XRe,I(v(o)("providers.customProviders")),1),b("button",{type:"button",class:Be(["providers-panel__row providers-panel__row--add",{"is-selected":p.value}]),"aria-current":p.value,onClick:T[1]||(T[1]=$=>P(xM))},[b("span",QRe,[W(Ee,{name:"plus",size:"sm"})]),b("span",ePe,I(v(o)("providers.addProvider")),1)],10,JRe)],64))],8,WRe),b("div",tPe,[p.value?(g(),ue(cB,{key:0,config:r.value,onDirtyChange:T[2]||(T[2]=$=>d.value=$),onAdded:z,onCancel:T[3]||(T[3]=$=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["config"])):h.value?(g(),S(Ce,{key:1},[b("header",nPe,[b("span",oPe,I(w(h.value.type)),1),b("div",sPe,[b("div",iPe,[b("h4",null,I(h.value.id),1),W(Fl,{variant:h.value.status==="connected"?"success":h.value.status==="error"?"danger":"neutral",size:"md"},{default:ae(()=>[He(I(v(o)(`providers.status.${h.value.status}`)),1)]),_:1},8,["variant"])]),b("p",lPe,[b("span",null,I(h.value.type),1),h.value.baseUrl?(g(),S(Ce,{key:0},[T[7]||(T[7]=b("span",{"aria-hidden":"true"},"·",-1)),b("span",rPe,I(h.value.baseUrl),1)],64)):Y("",!0)])])]),b("section",aPe,[b("div",cPe,[b("span",uPe,I(v(o)("providers.fieldModels")),1),b("span",dPe,I(v(o)("providers.modelCount",{count:h.value.models?.length??0})),1)]),m.value.length>0?(g(),S("div",fPe,[(g(!0),S(Ce,null,rt(m.value,$=>(g(),S("div",{key:$.id,class:"providers-model-row"},[b("code",null,I($.id),1),$.displayName?(g(),S("span",pPe,I($.displayName),1)):Y("",!0),T[8]||(T[8]=b("span",{class:"providers-model-grow"},null,-1)),$.contextBadge?(g(),ue(Fl,{key:1,variant:"neutral",size:"sm"},{default:ae(()=>[He(I($.contextBadge),1)]),_:2},1024)):Y("",!0)]))),128))])):(g(),S("p",hPe,I(v(o)("providers.noModels")),1))]),b("section",mPe,[W(aB,{mode:"edit",provider:h.value,config:r.value,onDirtyChange:T[4]||(T[4]=$=>d.value=$),onSaved:z,onCancel:T[5]||(T[5]=$=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["provider","config"])]),b("footer",gPe,[W(Nt,{variant:"danger-soft",size:"sm","data-testid":`provider-${h.value.id}-delete`,onClick:T[6]||(T[6]=$=>L(h.value))},{default:ae(()=>[W(Ee,{name:"trash",size:"sm"}),He(I(v(o)("providers.deleteProvider")),1)]),_:1},8,["data-testid"])])],64)):l.value.length===0&&!a.value?(g(),ue(jg,{key:2,title:v(o)("providers.empty"),hint:v(o)("providers.emptyHint")},{icon:ae(()=>[W(Ee,{name:"bolt"})]),_:1},8,["title","hint"])):Y("",!0)])]))]))}}),yPe=vt(vPe,[["__scopeId","data-v-66a5ed6a"]]),wPe=["aria-expanded","aria-label","disabled"],kPe=["aria-label"],bPe=["aria-label"],_Pe=["aria-selected"],xPe={class:"sm-picker__option-label"},SPe={class:"sm-picker__group"},CPe=["aria-selected","onMouseenter","onClick"],MPe={class:"sm-picker__option-label"},APe=["aria-label"],TPe={class:"sm-picker__group"},EPe=["aria-selected","onMouseenter","onClick"],IPe={class:"sm-picker__option-label"},LPe=250,$Pe=188,NPe=Je({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{},disabled:{type:Boolean}},emits:["inherit","select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=`sm-picker-${Math.random().toString(36).slice(2,9)}`,l=V(null),r=V(null),a=V(null),c=V(!1),u=V(!1),d=V({}),f=V(null),p=V(""),h=V(0),m=V("models"),k=V(0),x=V(0),y=V("right"),w=new Map;let _=null;const A=B(()=>[{id:"",label:s("settings.noSecondaryModel")},...n.groups.flatMap(X=>X.options)]),P=B(()=>n.modelValue?A.value.find(X=>X.id===n.modelValue)?.label??n.modelValue:""),z=B(()=>n.modelValue?n.effort?`${P.value} · ${n.effort}`:P.value:s("settings.noSecondaryModel")),L=B(()=>{const X=f.value;if(X===null||X==="")return[];const oe=l6(n.modelInfoById[X]),F=n.effort===""?[null,...oe]:[...oe];return n.modelValue===X&&n.effort!==""&&!oe.includes(n.effort)&&F.push(n.effort),F});function E(X){return n.modelValue!==f.value?!1:X===null?n.effort==="":n.effort===X}function T(){const X=L.value.findIndex(E);return X>=0?X:0}function $(X,oe){X instanceof HTMLElement?w.set(oe,X):w.delete(oe)}function C(){_!==null&&(clearTimeout(_),_=null)}function j(){C(),_=setTimeout(()=>{f.value=null,m.value==="efforts"&&(m.value="models")},LPe)}function H(X){X!==p.value&&(p.value=X,h.value=Math.max(0,A.value.findIndex(oe=>oe.id===X)))}function D(){const X=l.value,oe=r.value;if(!X||!oe)return;const F=X.getBoundingClientRect(),K=oe.offsetHeight,he=window.innerHeight-F.bottom;u.value=heK;const ye=Math.max(8,window.innerWidth-F.right);d.value=u.value?{right:`${ye}px`,bottom:`${window.innerHeight-F.top+4}px`,top:"auto"}:{right:`${ye}px`,top:`${F.bottom+4}px`,bottom:"auto"}}function M(){const X=r.value,oe=f.value===null?void 0:w.get(f.value);if(!X||!oe)return;const F=X.getBoundingClientRect(),K=oe.getBoundingClientRect(),he=a.value?.offsetHeight??0,ye=Math.max(0,window.innerHeight-8-he-F.top);x.value=Math.max(0,Math.min(K.top-F.top-4,X.offsetHeight-40,ye));const ve=window.innerWidth-F.right;y.value=ve>=$Pe||ve>=F.left?"right":"left"}function R(){c.value||n.disabled||(c.value=!0,p.value=n.modelValue||A.value[0]?.id||"",h.value=Math.max(0,A.value.findIndex(X=>X.id===p.value)),f.value=null,m.value="models",yt(D))}function O({restoreFocus:X=!1}={}){c.value&&(C(),c.value=!1,f.value=null,X&&yt(()=>l.value?.focus()))}function U(){c.value?O({restoreFocus:!0}):R()}function Z(){f.value=null,m.value="models"}function q(X,{moveFocus:oe=!1}={}){if(H(X),C(),X===""){f.value=null,m.value="models";return}f.value=X,yt(M),oe&&(m.value="efforts",k.value=T())}function te(X){const oe=f.value;if(oe===null)return;const F={model:oe,...X===null?{}:{effort:X}};(F.model!==n.modelValue||(F.effort??"")!==n.effort)&&o("select",F),O({restoreFocus:!0})}function ee(){o("inherit"),O({restoreFocus:!0})}function J(){yt(()=>{r.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function se(X){const oe=A.value;if(oe.length===0)return;const F=oe[(h.value+X+oe.length)%oe.length];H(F.id),f.value!==null&&q(F.id),J()}function Q(X){const oe=L.value;oe.length!==0&&(k.value=(k.value+X+oe.length)%oe.length,J())}function me(X){if(!c.value){(X.key==="Enter"||X.key===" "||X.key==="ArrowDown")&&(X.preventDefault(),R());return}if(X.key==="ArrowDown")X.preventDefault(),m.value==="models"?se(1):Q(1);else if(X.key==="ArrowUp")X.preventDefault(),m.value==="models"?se(-1):Q(-1);else if(X.key==="ArrowRight")X.preventDefault(),p.value!==""&&q(p.value,{moveFocus:!0});else if(X.key==="ArrowLeft")X.preventDefault(),f.value!==null&&Z();else if(X.key==="Enter"||X.key===" ")X.preventDefault(),m.value==="models"&&p.value===""?ee():m.value==="models"?q(p.value,{moveFocus:!0}):te(L.value[k.value]??null);else if(X.key==="Home"||X.key==="End"){X.preventDefault();const oe=X.key==="Home";if(m.value==="models"){const F=A.value;if(F.length===0)return;const K=(oe?F[0]:F.at(-1)).id;H(K),f.value!==null&&q(K)}else k.value=oe?0:L.value.length-1;J()}else X.key==="Escape"&&(X.preventDefault(),O({restoreFocus:!0}))}function xe(X){const oe=X.target;oe instanceof Node&&(l.value?.contains(oe)||r.value?.contains(oe)||O())}function Ye(X){if(c.value){if(r.value?.contains(X.target instanceof Node?X.target:null)){M();return}O(),D()}}function at(){c.value&&D()}return In(()=>{document.addEventListener("pointerdown",xe),document.addEventListener("scroll",Ye,!0),window.addEventListener("resize",at)}),En(()=>{document.removeEventListener("pointerdown",xe),document.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",at),C()}),(X,oe)=>(g(),S("div",{class:Be(["sm-picker",{"is-open":c.value}])},[b("button",{ref_key:"triggerRef",ref:l,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":i,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":v(s)("settings.secondaryModel"),disabled:e.disabled,onClick:U,onKeydown:me},[b("span",{class:Be(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[b("span",null,I(z.value),1)],2),W(Ee,{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,wPe),(g(),ue(hl,{to:"body"},[c.value?(g(),S("div",{key:0,id:i,ref_key:"menuRef",ref:r,class:Be(["sm-picker__menu",{"sm-picker__menu--up":u.value}]),style:Gt(d.value),role:"dialog","aria-label":v(s)("settings.secondaryModel")},[b("div",{class:"sm-picker__models",role:"listbox","aria-label":v(s)("settings.secondaryModel")},[b("button",{ref:F=>$(F,""),type:"button",class:Be(["sm-picker__option",{"is-selected":e.modelValue==="","is-active":p.value==="","is-kb-active":m.value==="models"&&p.value===""}]),role:"option","aria-selected":e.modelValue==="",onMouseenter:oe[0]||(oe[0]=F=>q("")),onClick:ee},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",xPe,I(v(s)("settings.noSecondaryModel")),1)],42,_Pe),oe[1]||(oe[1]=b("div",{class:"sm-picker__divider"},null,-1)),(g(!0),S(Ce,null,rt(e.groups,F=>(g(),S(Ce,{key:F.provider},[b("div",SPe,I(F.provider),1),(g(!0),S(Ce,null,rt(F.options,K=>(g(),S("button",{key:K.id,ref_for:!0,ref:he=>$(he,K.id),type:"button",class:Be(["sm-picker__option",{"is-selected":K.id===e.modelValue,"is-active":K.id===p.value,"is-kb-active":m.value==="models"&&K.id===p.value}]),role:"option","aria-selected":K.id===e.modelValue,onMouseenter:he=>q(K.id),onMouseleave:j,onClick:he=>q(K.id,{moveFocus:!0})},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",MPe,I(K.label),1),W(Ee,{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,CPe))),128))],64))),128))],8,bPe),f.value!==null?(g(),S("div",{key:0,ref_key:"flyoutRef",ref:a,class:Be(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:Gt({top:`${x.value}px`}),role:"listbox","aria-label":v(s)("settings.secondaryModelEffort"),onMouseenter:C,onMouseleave:j},[b("div",TPe,I(v(s)("settings.secondaryModelEffort")),1),(g(!0),S(Ce,null,rt(L.value,(F,K)=>(g(),S("button",{key:F??"__default__",type:"button",class:Be(["sm-picker__option",{"is-selected":E(F),"is-kb-active":m.value==="efforts"&&K===k.value,"is-muted":F===null}]),role:"option","aria-selected":E(F),onMouseenter:he=>{m.value="efforts",k.value=K},onClick:he=>te(F)},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",IPe,I(F??v(s)("settings.secondaryModelEffortAuto")),1)],42,EPe))),128))],46,APe)):Y("",!0)],14,kPe)):Y("",!0)]))],2))}}),zPe=vt(NPe,[["__scopeId","data-v-5b749db7"]]),BPe=["aria-label"],RPe=["aria-selected","onClick"],PPe={class:"body"},FPe={class:"panel"},jPe={class:"sec"},OPe={class:"sec-title"},HPe={class:"row"},DPe={class:"rlabel"},VPe={class:"row"},WPe={class:"rlabel"},qPe={class:"row"},UPe={class:"rlabel"},ZPe={class:"sec"},KPe={class:"sec-title"},GPe={class:"row"},YPe={class:"rlabel"},XPe={class:"hint"},JPe={class:"row"},QPe={class:"rlabel"},eFe={class:"hint"},tFe={class:"sec"},nFe={class:"sec-title"},oFe={class:"row"},sFe={class:"rlabel"},iFe={key:0,class:"hint"},lFe={class:"row"},rFe={class:"rlabel"},aFe={key:0,class:"hint"},cFe={class:"row"},uFe={class:"rlabel"},dFe={key:0,class:"hint"},fFe={class:"row"},pFe={class:"rlabel"},hFe={class:"panel"},mFe={class:"sec"},gFe={class:"sec-title"},vFe={class:"row"},yFe={class:"rlabel"},wFe={key:0,class:"rvalue"},kFe={class:"actions"},bFe={class:"panel"},_Fe={class:"panel"},xFe={class:"sec"},SFe={class:"sec-head"},CFe={class:"sec-title"},MFe={key:0,class:"saving"},AFe={class:"row"},TFe={class:"rlabel"},EFe={class:"hint"},IFe={key:0,class:"select-wrap"},LFe={key:0,value:"",disabled:""},$Fe=["label"],NFe=["value"],zFe={key:1,class:"rvalue mono"},BFe={key:0,class:"sec","data-testid":"subagent-routing"},RFe={class:"sec-title"},PFe=["aria-label"],FFe=["value","checked","disabled","onChange"],jFe={class:"routing-mode-title"},OFe={class:"hint"},HFe={key:0,class:"row"},DFe={class:"rlabel"},VFe={class:"hint"},WFe={key:1,class:"rvalue"},qFe={key:1,class:"row routing-pool"},UFe={class:"rlabel"},ZFe={class:"hint"},KFe={class:"pool-list","data-testid":"routing-pool"},GFe=["value","checked","disabled","onChange"],YFe={class:"pool-name"},XFe=["disabled","onClick"],JFe={class:"row routing-effective","data-testid":"effective-routing"},QFe={class:"rlabel"},eje={class:"rvalue mono","data-testid":"saved-policy"},tje={class:"rlabel"},nje={class:"rvalue mono","data-testid":"effective-policy"},oje={key:0,class:"hint","data-testid":"feature-disabled"},sje={class:"row"},ije={class:"rlabel"},lje={class:"hint"},rje={class:"row"},aje={class:"rlabel"},cje={class:"hint"},uje={class:"row"},dje={class:"rlabel"},fje={class:"hint"},pje={class:"row"},hje={class:"rlabel"},mje={class:"hint"},gje={key:1,class:"empty-config"},vje={class:"panel"},yje={class:"sec"},wje={class:"sec-title"},kje={class:"row"},bje={class:"rlabel"},_je={class:"hint"},xje={class:"rvalue mono"},Sje={class:"row"},Cje={class:"rlabel"},Mje={class:"hint"},Aje={class:"value-wrap"},Tje={class:"rvalue mono"},Eje={class:"row"},Ije={class:"rlabel"},Lje={class:"hint"},$je={class:"value-wrap"},Nje={class:"rvalue mono"},zje={class:"row"},Bje={class:"rlabel"},Rje={class:"rvalue mono"},Pje={key:0,class:"sec"},Fje={key:0,class:"row"},jje={class:"rlabel"},Oje={class:"hint"},Hje={class:"hint"},Dje={class:"sec"},Vje={class:"sec-title"},Wje={class:"row"},qje={class:"rlabel"},Uje={key:0,class:"hint"},Zje={class:"row"},Kje={class:"rlabel"},Gje={class:"panel"},Yje={key:0,class:"sec"},Xje={class:"sec-title"},Jje={"data-testid":"desktop-update-controls",class:"desktop-update-card"},Qje={class:"desktop-update-row desktop-update-summary"},eOe={class:"desktop-update-summary-copy"},tOe={class:"desktop-update-icon","aria-hidden":"true"},nOe={class:"rlabel"},oOe={class:"desktop-update-title","aria-live":"polite"},sOe={class:"hint"},iOe={class:"desktop-update-row"},lOe={class:"rlabel"},rOe={class:"hint"},aOe={class:"select-wrap desktop-update-select"},cOe=["value"],uOe={class:"desktop-update-row"},dOe={class:"rlabel"},fOe={class:"hint"},pOe={class:"desktop-update-row"},hOe={class:"rlabel"},mOe={class:"hint"},gOe={key:0,class:"desktop-update-detail"},vOe={key:0,class:"desktop-update-progress"},yOe=["aria-label"],wOe=["value","aria-label"],kOe={"data-testid":"settings-update-progress-detail"},bOe={class:"desktop-update-actions"},_Oe={class:"panel"},xOe={class:"sec"},SOe={class:"sec-title"},COe={class:"row"},MOe={class:"rlabel"},AOe={class:"hint"},TOe={class:"row"},EOe={class:"rlabel"},IOe={class:"hint"},LOe={key:0,class:"flag-chip"},$Oe={key:1,class:"flag-chip flag-chip--warn"},NOe={class:"row"},zOe={class:"rlabel"},BOe={class:"hint"},ROe={key:0,class:"flag-chip"},POe={key:1,class:"flag-chip flag-chip--warn"},FOe={key:1,class:"empty-config"},jOe={class:"panel"},OOe={class:"panel-head"},HOe={class:"panel-title"},DOe={class:"panel-desc"},VOe={class:"archive-toolbar"},WOe={class:"archive-search"},qOe=["placeholder"],UOe={value:"all"},ZOe=["value"],KOe={key:0,class:"archive-empty"},GOe={key:0,class:"archive-list"},YOe={class:"archive-workspace"},XOe={class:"path"},JOe={class:"count"},QOe={class:"setting-card"},eHe={class:"archive-meta"},tHe={class:"archive-name"},nHe={class:"archive-time"},oHe={key:1,class:"archive-empty"},sHe=100,iHe=Je({__name:"SettingsDialog",props:{colorScheme:{},accent:{},uiFontSize:{},authReady:{type:Boolean},accountModel:{},notify:{type:Boolean},notifyQuestion:{type:Boolean},notifyApproval:{type:Boolean},notifyPermission:{},sound:{type:Boolean},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},backend:{},experimentalFlagStates:{},subagentModelPolicy:{},subagentModelPolicySaving:{type:Boolean},initialTab:{}},emits:["setColorScheme","setAccent","setUiFontSize","setNotify","setNotifyQuestion","setNotifyApproval","setSound","setConversationToc","setTurnFolding","setActivityRunFolding","openOnboarding","updateConfig","saveSubagentModelPolicy","clearSubagentModelPolicy","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(o.initialTab??"general"),l=B(()=>b9(o.uiFontSize)),r=typeof window>"u"?void 0:window.pythinkerDesktop,a=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"cute-bot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"},...r===void 0?[]:[{id:"update",labelKey:"settings.tabs.update",icon:"update-available"}],{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"}],c=z$().serverHttpUrl,u="0.1.2".trim()?"0.1.2":"0.0.0-dev",d=V(),f=V(!1),p=V();let h;const m=B(()=>d.value?.installedVersion??u),k=V(null),x=B(()=>k.value?.serverVersion||o.serverVersion||"-"),y=B(()=>k.value?.backend??o.backend??"v1"),w=B(()=>y.value==="v2"?"agent-gateway":"server"),_=V(!1),A=V(!1),P=V(0),{confirm:z,current:L}=z1(),E=["manual","yolo","auto"],T={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},$=V(null);iB($);function C(We){We.key==="Escape"&&L.value===null&&pt()}In(()=>{document.addEventListener("keydown",C),F(),r!==void 0&&(h=r.onUpdateState(We=>{d.value=We}),r.getUpdateState().then(We=>{d.value=We}))}),En(()=>{document.removeEventListener("keydown",C),h?.(),kn!==null&&clearTimeout(kn)});const j=B(()=>{const We=d.value;if(We===void 0)return n("settings.desktop.loading");switch(We.status){case"disabled":return n("settings.desktop.disabled");case"checking":return n("settings.desktop.checking");case"available":return n("settings.desktop.available",{version:We.availableVersion});case"downloading":return n("settings.desktop.downloading",{version:We.availableVersion});case"downloaded":return n("settings.desktop.downloaded",{version:We.availableVersion});case"skipped":return n("settings.desktop.skipped",{version:We.skippedVersion??We.availableVersion});case"error":return We.message??n("settings.desktop.errorGeneric");default:return n("settings.desktop.upToDate")}}),H=B(()=>{const We=d.value?.percent;return We===void 0||!Number.isFinite(We)?void 0:Math.min(100,Math.max(0,We))}),D=["stable","beta","nightly"],M=B(()=>{const We=d.value?.status;return f.value||We===void 0||We==="checking"||We==="downloading"||We==="downloaded"}),R=B(()=>{const We=d.value?.status;return f.value||We===void 0||We==="disabled"||We==="checking"||We==="downloading"||We==="downloaded"}),O=B(()=>{const We=d.value?.lastCheckedAt;if(We===void 0)return n("settings.desktop.neverChecked");const st=new Date(We);return Number.isNaN(st.getTime())?n("settings.desktop.neverChecked"):n("settings.desktop.lastChecked",{time:new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"}).format(st)})});function U(We){const st=["B","KB","MB","GB"];let Xe=Math.max(0,We),qe=0;for(;Xe>=1024&&qe{const We=d.value;if(We?.status!=="downloading")return"";const st=[];return H.value!==void 0&&st.push(`${Math.round(H.value)}%`),We.transferred!==void 0&&We.total!==void 0?st.push(n("settings.desktop.bytesOfTotal",{transferred:U(We.transferred),total:U(We.total)})):We.transferred!==void 0&&st.push(U(We.transferred)),We.bytesPerSecond!==void 0&&st.push(`${U(We.bytesPerSecond)}/s`),st.join(" · ")}),q=B(()=>p.value!==void 0?p.value:d.value?.status==="error"?j.value:void 0);async function te(We){if(!f.value){f.value=!0,p.value=void 0;try{d.value=await We()}catch(st){p.value=st instanceof Error?st.message:String(st)}finally{f.value=!1}}}function ee(We){r!==void 0&&te(()=>r.setAutoUpdate(We))}function J(We){r!==void 0&&D.includes(We)&&te(()=>r.setUpdateChannel(We))}function se(We){r!==void 0&&te(()=>r.setNotifyUpdate(We))}function Q(){r!==void 0&&te(()=>r.checkForUpdates())}function me(){r!==void 0&&te(()=>r.downloadUpdate())}function xe(){const We=d.value?.availableVersion;r!==void 0&&We!==void 0&&te(()=>r.skipUpdate(We))}function Ye(){r!==void 0&&te(()=>r.undoSkippedUpdate())}function at(){const We=d.value?.availableVersion;r!==void 0&&We!==void 0&&te(()=>r.openUpdateReleaseNotes(We))}function X(){r!==void 0&&te(()=>r.restartToUpdate())}let oe=0;async function F(){const We=++oe;let st;try{st=await Ct().getMeta()}catch{st=null}We===oe&&(k.value=st)}Ke(()=>o.config,()=>{F()});function K(){EN()}const he=B(()=>{const We=new Map;for(const st of o.models??[])We.set(st.id,{id:st.id,label:st.displayName??st.model??st.id,provider:st.provider});for(const[st,Xe]of Object.entries(o.config?.models??{})){if(We.has(st))continue;const qe=ie(Xe);We.set(st,{id:st,label:de(st,Xe,qe),provider:qe??st})}return Array.from(We.values())}),ye=B(()=>{const We=new Map;for(const st of he.value){const Xe=We.get(st.provider)??[];Xe.push(st),We.set(st.provider,Xe)}for(const[st,Xe]of We)We.set(st,Xe.toSorted((qe,Pe)=>qe.label.localeCompare(Pe.label)));return Array.from(We.entries()).toSorted(([st],[Xe])=>st.localeCompare(Xe)).map(([st,Xe])=>({provider:st,options:Xe}))}),ve=B(()=>{const We=o.config?.defaultPermissionMode;return We==="auto"||We==="yolo"||We==="manual"?We:"manual"});function ie(We){if(!We||typeof We!="object")return;const st=We;return typeof st.provider=="string"?st.provider:void 0}function de(We,st,Xe){if(!st||typeof st!="object")return We;const qe=st,Pe=typeof qe.model=="string"?qe.model:void 0,bt=Xe??ie(st);return Pe&&bt?`${We} (${bt}/${Pe})`:Pe?`${We} (${Pe})`:We}function be(We){return We===!0}function Se(We){!We||We===o.config?.defaultModel||s("updateConfig",{defaultModel:We})}function je(We){We!==ve.value&&s("updateConfig",{defaultPermissionMode:We})}function et(We){const st=o.config?.[We];s("updateConfig",{[We]:!be(st)})}function le(){const We=o.config?.thinking;return!We||typeof We!="object"?!0:We.enabled!==!1}function fe(){s("updateConfig",{thinking:{enabled:!le()}})}function ge(){const We=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!We})}async function Oe(We){We!==i.value&&await Fe()&&(i.value=We)}async function Fe(){if(!A.value)return!0;const We=await z({title:n("providers.unsavedTitle"),message:n("providers.unsavedBody"),confirmLabel:n("providers.unsavedDiscard"),cancelLabel:n("providers.unsavedStay"),variant:"danger"});return We&&(A.value=!1,P.value+=1),We}async function pt(){await Fe()&&s("close")}function kt(){return[`App version: ${m.value}`,`Server version: ${x.value}`,`Backend: ${y.value}`,`Server address: ${c}`,`Server ID: ${k.value?.serverId||"-"}`,`User agent: ${typeof navigator>"u"?"-":navigator.userAgent}`].join(` -`)}async function qt(){_.value=await fs(kt())}const nn=V(!1),Jt=V(!1);let kn=null;function Dn(){kn!==null&&clearTimeout(kn),kn=setTimeout(()=>{nn.value=!1,Jt.value=!1,kn=null},1500)}async function xn(){await fs(x.value)&&(nn.value=!0,Dn())}async function $n(){await fs(c)&&(Jt.value=!0,Dn())}const Hn=B(()=>Object.fromEntries((o.models??[]).map(We=>[We.id,We])));function bn(We){return o.config?.experimental?.[We]===!0}function Wn(We){return k.value?.experimentalFlagStates?.find(Xe=>Xe.id===We)??o.experimentalFlagStates?.find(Xe=>Xe.id===We)}function Pn(We,st){const Xe={...o.config?.experimental,[We]:st};s("updateConfig",{experimental:Xe})}const Mn=["inherit","default","pool","force"],Nn=V("inherit"),An=V(""),Qn=V(""),Fn=V(new Set);function Qt(We){Nn.value=We?.mode??"inherit",An.value=We!==void 0&&We.mode!=="inherit"?We.defaultModel:"",Qn.value=We!==void 0&&We.mode!=="inherit"?We.defaultEffort??"":"",Fn.value=new Set(We?.mode==="pool"?Object.keys(We.models):[])}Ke(()=>o.subagentModelPolicy?.policy,Qt,{immediate:!0,deep:!0});function uo(){const We=Qn.value||void 0;switch(Nn.value){case"inherit":return{mode:"inherit"};case"default":case"force":return An.value?{mode:Nn.value,defaultModel:An.value,defaultEffort:We}:void 0;case"pool":{if(Fn.value.size===0||!Fn.value.has(An.value))return;const st=Object.fromEntries([...Fn.value].map(Xe=>[Xe,""]));return{mode:"pool",defaultModel:An.value,models:st,defaultEffort:We}}}}function Zn(){const We=uo();if(We!==void 0){if(We.mode==="inherit"){o.subagentModelPolicy?.policy.mode!=="inherit"&&s("clearSubagentModelPolicy");return}s("saveSubagentModelPolicy",We)}}function Bo(We){Nn.value!==We&&(Nn.value=We,We==="pool"&&Fn.value.size===0&&An.value&&(Fn.value=new Set([An.value])),Zn())}function Un(We){An.value=We.model,Qn.value=We.effort??"",Zn()}function hs(We){const st=new Set(Fn.value);st.has(We)?st.delete(We):st.add(We),Fn.value=st,st.has(An.value)||(An.value=[...st][0]??""),Zn()}function Io(We){!Fn.value.has(We)||An.value===We||(An.value=We,Zn())}function Rt(We){return he.value.find(st=>st.id===We)?.label??We}function Jo(We){switch(We.mode){case"inherit":return n("settings.subagentRouting.summaryInherit");case"pool":return`${n("settings.subagentRouting.mode.pool")} · ${n("settings.subagentRouting.summaryPool",{count:Object.keys(We.models).length,model:Rt(We.defaultModel)})}`;default:{const st=We.defaultEffort?` · ${We.defaultEffort}`:"";return`${n(`settings.subagentRouting.mode.${We.mode}`)} · ${Rt(We.defaultModel)}${st}`}}}function Ls(We){const st=oz(We);st!==void 0&&s("setUiFontSize",st)}const $e=R1(),Ge=V([]),ot=V(!1),dt=V(!1),Mt=V(""),Ft=V("all"),Ut=V("archived-desc");async function en(){if(!(ot.value||dt.value)){ot.value=!0;try{const We=[];let st;for(;;){const Xe=await $e.loadArchivedSessions({beforeId:st,pageSize:sHe});if(We.push(...Xe.items),!Xe.hasMore||Xe.items.length===0)break;const qe=Xe.items.at(-1)?.id;if(qe===void 0)break;st=qe}Ge.value=We,dt.value=!0}catch(We){console.warn("loadAllArchived failed",We)}finally{ot.value=!1}}}Ke(i,We=>{We==="archived"&&!dt.value&&en()});const tn=B(()=>{const We=new Set;for(const st of Ge.value)We.add(st.cwd);return Array.from(We).toSorted((st,Xe)=>st.localeCompare(Xe))}),eo=B(()=>{const We=Mt.value.trim().toLowerCase();let st=Ge.value.filter(Xe=>Xe.archived===!0);return Ft.value!=="all"&&(st=st.filter(Xe=>Xe.cwd===Ft.value)),We&&(st=st.filter(Xe=>Xe.title.toLowerCase().includes(We))),Ut.value==="archived-desc"?st.toSorted((Xe,qe)=>qe.updatedAt.localeCompare(Xe.updatedAt)):Ut.value==="created-desc"?st.toSorted((Xe,qe)=>qe.createdAt.localeCompare(Xe.createdAt)):st.toSorted((Xe,qe)=>Xe.title.localeCompare(qe.title,"en"))}),Ro=B(()=>{const We=new Map;for(const st of eo.value){const Xe=We.get(st.cwd)??[];Xe.push(st),We.set(st.cwd,Xe)}return Array.from(We.entries()).map(([st,Xe])=>({cwd:st,items:Xe}))});async function $s(We){await $e.restoreSession(We)&&(Ge.value=Ge.value.filter(Xe=>Xe.id!==We))}function Do(We){const st=new Date(We);if(Number.isNaN(st.getTime()))return We;const Xe=qe=>String(qe).padStart(2,"0");return`${st.getFullYear()}-${Xe(st.getMonth()+1)}-${Xe(st.getDate())} ${Xe(st.getHours())}:${Xe(st.getMinutes())}`}return(We,st)=>(g(),ue(Z0,{open:!0,"close-on-esc":!1,title:v(n)("settings.title"),size:"xl",height:"fixed",padded:!1,onClose:pt},{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:$,class:"sd"},[b("nav",{class:"settings-tabs",role:"tablist","aria-label":v(n)("settings.title")},[(g(),S(Ce,null,rt(a,Xe=>b("button",{key:Xe.id,type:"button",class:Be(["tab",{on:i.value===Xe.id}]),role:"tab","aria-selected":i.value===Xe.id,onClick:qe=>Oe(Xe.id)},[W(Ee,{name:Xe.icon,size:"sm"},null,8,["name"]),He(" "+I(v(n)(Xe.labelKey)),1)],10,RPe)),64))],8,BPe),b("div",PPe,[Jn(b("section",FPe,[b("section",jPe,[b("h3",OPe,I(v(n)("settings.appearance")),1),b("div",HPe,[b("span",DPe,I(v(n)("theme.colorSchemeLabel")),1),W(di,{"model-value":e.colorScheme,options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":st[0]||(st[0]=Xe=>s("setColorScheme",Xe))},null,8,["model-value","options"])]),b("div",VPe,[b("span",WPe,I(v(n)("theme.accentLabel")),1),W(di,{"model-value":e.accent,options:[{value:"blue",label:v(n)("theme.accentBlue")},{value:"mono",label:v(n)("theme.accentBlack")}],"onUpdate:modelValue":st[1]||(st[1]=Xe=>s("setAccent",Xe))},null,8,["model-value","options"])]),b("div",qPe,[b("span",UPe,I(v(n)("settings.uiFontSize")),1),W(di,{"model-value":l.value,options:v(QN),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":Ls},null,8,["model-value","options","aria-label"])])]),b("section",ZPe,[b("h3",KPe,I(v(n)("settings.messageFolding")),1),b("div",GPe,[b("span",YPe,[He(I(v(n)("settings.turnFolding"))+" ",1),b("span",XPe,I(v(n)("settings.turnFoldingHint")),1)]),W(wi,{"model-value":e.turnFolding??!0,label:v(n)("settings.turnFolding"),"onUpdate:modelValue":st[2]||(st[2]=Xe=>s("setTurnFolding",Xe))},null,8,["model-value","label"])]),b("div",JPe,[b("span",QPe,[He(I(v(n)("settings.activityRunFolding"))+" ",1),b("span",eFe,I(v(n)("settings.activityRunFoldingHint")),1)]),W(wi,{"model-value":e.activityRunFolding??!0,label:v(n)("settings.activityRunFolding"),"onUpdate:modelValue":st[3]||(st[3]=Xe=>s("setActivityRunFolding",Xe))},null,8,["model-value","label"])])]),b("section",tFe,[b("h3",nFe,I(v(n)("settings.notifications")),1),b("div",oFe,[b("span",sFe,[He(I(v(n)("settings.notifyOnComplete"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",iFe,I(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnComplete"),"onUpdate:modelValue":st[4]||(st[4]=Xe=>s("setNotify",Xe))},null,8,["model-value","disabled","label"])]),b("div",lFe,[b("span",rFe,[He(I(v(n)("settings.notifyOnQuestion"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",aFe,I(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyQuestion,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnQuestion"),"onUpdate:modelValue":st[5]||(st[5]=Xe=>s("setNotifyQuestion",Xe))},null,8,["model-value","disabled","label"])]),b("div",cFe,[b("span",uFe,[He(I(v(n)("settings.notifyOnApproval"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",dFe,I(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyApproval,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnApproval"),"onUpdate:modelValue":st[6]||(st[6]=Xe=>s("setNotifyApproval",Xe))},null,8,["model-value","disabled","label"])]),b("div",fFe,[b("span",pFe,I(v(n)("settings.soundOnComplete")),1),W(wi,{"model-value":e.sound,label:v(n)("settings.soundOnComplete"),"onUpdate:modelValue":st[7]||(st[7]=Xe=>s("setSound",Xe))},null,8,["model-value","label"])])])],512),[[_i,i.value==="general"]]),Jn(b("section",hFe,[b("section",mFe,[b("h3",gFe,I(v(n)("settings.account")),1),b("div",vFe,[b("span",yFe,I(e.authReady?v(n)("settings.providers"):v(n)("sidebar.notSignedIn")),1),W(Cn,{text:e.accountModel},{default:ae(()=>[e.authReady&&e.accountModel?(g(),S("span",wFe,I(e.accountModel),1)):Y("",!0)]),_:1},8,["text"])]),b("div",kFe,[W(Nt,{variant:"secondary",size:"sm",onClick:st[8]||(st[8]=Xe=>{s("openOnboarding"),s("close")})},{default:ae(()=>[He(I(v(n)("onboarding.reopen")),1)]),_:1}),W(Nt,{variant:"primary",size:"sm",onClick:st[9]||(st[9]=Xe=>Oe("providers"))},{default:ae(()=>[He(I(v(n)("settings.manageProviders")),1)]),_:1})])])],512),[[_i,i.value==="account"]]),Jn(b("section",bFe,[W(yPe,{"discard-token":P.value,onDirtyChange:st[10]||(st[10]=Xe=>A.value=Xe)},null,8,["discard-token"])],512),[[_i,i.value==="providers"]]),Jn(b("section",_Fe,[b("section",xFe,[b("div",SFe,[b("h3",CFe,I(v(n)("settings.agentDefaults")),1),e.configSaving?(g(),S("span",MFe,I(v(n)("settings.saving")),1)):Y("",!0)]),e.config?(g(),S(Ce,{key:0},[b("div",AFe,[b("span",TFe,[He(I(v(n)("settings.defaultModel"))+" ",1),b("span",EFe,I(v(n)("settings.defaultModelHint")),1)]),ye.value.length>0?(g(),S("div",IFe,[W(F4,{"model-value":e.config.defaultModel??"",disabled:e.configSaving,"aria-label":v(n)("settings.defaultModel"),"onUpdate:modelValue":Se},{default:ae(()=>[e.config.defaultModel?Y("",!0):(g(),S("option",LFe,I(v(n)("settings.noDefaultModel")),1)),(g(!0),S(Ce,null,rt(ye.value,Xe=>(g(),S("optgroup",{key:Xe.provider,label:Xe.provider},[(g(!0),S(Ce,null,rt(Xe.options,qe=>(g(),S("option",{key:qe.id,value:qe.id},I(qe.label),9,NFe))),128))],8,$Fe))),128))]),_:1},8,["model-value","disabled","aria-label"])])):(g(),S("span",zFe,I(e.config.defaultModel??v(n)("settings.noDefaultModel")),1))]),e.subagentModelPolicy?(g(),S("section",BFe,[b("h3",RFe,I(v(n)("settings.subagentRouting.title")),1),b("div",{class:"routing-modes",role:"radiogroup","aria-label":v(n)("settings.subagentRouting.title")},[(g(),S(Ce,null,rt(Mn,Xe=>b("label",{key:Xe,class:Be(["routing-mode",{on:Nn.value===Xe}])},[b("input",{type:"radio",name:"subagent-routing-mode",value:Xe,checked:Nn.value===Xe,disabled:e.subagentModelPolicySaving,onChange:qe=>Bo(Xe)},null,40,FFe),b("span",jFe,I(v(n)(`settings.subagentRouting.mode.${Xe}`)),1),b("span",OFe,I(v(n)(`settings.subagentRouting.modeHint.${Xe}`)),1)],2)),64))],8,PFe),Nn.value==="default"||Nn.value==="force"?(g(),S("div",HFe,[b("span",DFe,[He(I(v(n)("settings.subagentRouting.model"))+" ",1),b("span",VFe,I(v(n)("settings.subagentRouting.modelHint")),1)]),ye.value.length>0?(g(),ue(zPe,{key:0,"model-value":An.value,effort:Qn.value,groups:ye.value,"model-info-by-id":Hn.value,disabled:e.subagentModelPolicySaving,onInherit:st[11]||(st[11]=Xe=>Bo("inherit")),onSelect:Un},null,8,["model-value","effort","groups","model-info-by-id","disabled"])):(g(),S("span",WFe,I(v(n)("settings.noSecondaryModel")),1))])):Nn.value==="pool"?(g(),S("div",qFe,[b("span",UFe,[He(I(v(n)("settings.subagentRouting.pool"))+" ",1),b("span",ZFe,I(v(n)("settings.subagentRouting.poolHint")),1)]),b("div",KFe,[(g(!0),S(Ce,null,rt(he.value,Xe=>(g(),S("label",{key:Xe.id,class:"pool-item"},[b("input",{type:"checkbox",value:Xe.id,checked:Fn.value.has(Xe.id),disabled:e.subagentModelPolicySaving,onChange:qe=>hs(Xe.id)},null,40,GFe),b("span",YFe,I(Xe.label),1),b("button",{type:"button",class:Be(["pool-default",{on:An.value===Xe.id}]),disabled:!Fn.value.has(Xe.id)||e.subagentModelPolicySaving,onClick:qe=>Io(Xe.id)},I(An.value===Xe.id?v(n)("settings.subagentRouting.poolDefault"):v(n)("settings.subagentRouting.makeDefault")),11,XFe)]))),128))])])):Y("",!0),b("div",JFe,[b("span",QFe,[He(I(v(n)("settings.subagentRouting.saved"))+" ",1),b("span",eje,I(Jo(e.subagentModelPolicy.configuredPolicy)),1)]),b("span",tje,[He(I(v(n)("settings.subagentRouting.effective"))+" ",1),b("span",nje,I(Jo(e.subagentModelPolicy.effectivePolicy)),1)]),e.subagentModelPolicy.feature.enabled?Y("",!0):(g(),S("span",oje,I(v(n)("settings.subagentRouting.featureDisabled")),1))])])):Y("",!0),b("div",sje,[b("span",ije,[He(I(v(n)("settings.defaultPermission"))+" ",1),b("span",lje,I(v(n)("settings.defaultPermissionHint")),1)]),W(di,{"model-value":ve.value,options:E.map(Xe=>({value:Xe,label:v(n)(T[Xe])})),"onUpdate:modelValue":st[12]||(st[12]=Xe=>je(Xe))},null,8,["model-value","options"])]),b("div",rje,[b("span",aje,[He(I(v(n)("settings.defaultThinking"))+" ",1),b("span",cje,I(v(n)("settings.defaultThinkingHint")),1)]),W(wi,{"model-value":le(),disabled:e.configSaving,label:v(n)("settings.defaultThinking"),"onUpdate:modelValue":st[13]||(st[13]=Xe=>fe())},null,8,["model-value","disabled","label"])]),b("div",uje,[b("span",dje,[He(I(v(n)("settings.defaultPlanMode"))+" ",1),b("span",fje,I(v(n)("settings.defaultPlanModeHint")),1)]),W(wi,{"model-value":be(e.config.defaultPlanMode),disabled:e.configSaving,label:v(n)("settings.defaultPlanMode"),"onUpdate:modelValue":st[14]||(st[14]=Xe=>et("defaultPlanMode"))},null,8,["model-value","disabled","label"])]),b("div",pje,[b("span",hje,[He(I(v(n)("settings.mergeSkills"))+" ",1),b("span",mje,I(v(n)("settings.mergeSkillsHint")),1)]),W(wi,{"model-value":be(e.config.mergeAllAvailableSkills),disabled:e.configSaving,label:v(n)("settings.mergeSkills"),"onUpdate:modelValue":st[15]||(st[15]=Xe=>et("mergeAllAvailableSkills"))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",gje,I(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="agent"]]),Jn(b("section",vje,[b("section",yje,[b("h3",wje,I(v(n)("settings.versionAndUpdates")),1),b("div",kje,[b("span",bje,[He(I(v(n)("settings.appVersion"))+" ",1),b("span",_je,I(v(n)("settings.appVersionHint")),1)]),b("span",xje,I(m.value),1)]),b("div",Sje,[b("span",Cje,[He(I(v(n)("settings.serverVersion"))+" ",1),b("span",Mje,I(v(n)("settings.serverVersionHint")),1)]),b("span",Aje,[b("span",Tje,I(x.value),1),W(Dt,{size:"sm",label:nn.value?v(n)("settings.copied"):v(n)("settings.copyServerVersion"),"data-testid":"copy-server-version",onClick:xn},{default:ae(()=>[W(Ee,{name:nn.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",Eje,[b("span",Ije,[He(I(v(n)("settings.serverAddress"))+" ",1),b("span",Lje,I(v(n)("settings.serverAddressHint")),1)]),b("span",$je,[b("span",Nje,I(v(c)),1),W(Dt,{size:"sm",label:Jt.value?v(n)("settings.copied"):v(n)("settings.copyServerAddress"),"data-testid":"copy-server-address",onClick:$n},{default:ae(()=>[W(Ee,{name:Jt.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",zje,[b("span",Bje,I(v(n)("settings.backend")),1),b("span",Rje,I(w.value),1)])]),e.config?(g(),S("section",Pje,[e.config?(g(),S("div",Fje,[b("span",jje,[He(I(v(n)("settings.telemetry"))+" ",1),b("span",Oje,I(v(n)("settings.telemetryHint")),1),b("span",Hje,I(v(n)("settings.telemetryRestartHint")),1)]),W(wi,{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:v(n)("settings.telemetry"),"onUpdate:modelValue":st[16]||(st[16]=Xe=>ge())},null,8,["model-value","disabled","label"])])):Y("",!0)])):Y("",!0),b("section",Dje,[b("h3",Vje,I(v(n)("settings.diagnostics")),1),b("div",Wje,[b("span",qje,[He(I(v(n)("settings.exportLog"))+" ",1),v(pr)()?Y("",!0):(g(),S("span",Uje,I(v(n)("settings.logHint")),1))]),W(Nt,{variant:"secondary",size:"sm",onClick:K},{default:ae(()=>[He(I(v(n)("settings.exportLogBtn")),1)]),_:1})]),b("div",Zje,[b("span",Kje,I(v(n)("settings.copyDetails")),1),W(Nt,{"data-testid":"copy-diagnostics",variant:"secondary",size:"sm",onClick:qt},{default:ae(()=>[He(I(_.value?v(n)("settings.copied"):v(n)("settings.copyDetails")),1)]),_:1})])])],512),[[_i,i.value==="advanced"]]),Jn(b("section",Gje,[v(r)?(g(),S("section",Yje,[b("h3",Xje,I(v(n)("settings.tabs.update")),1),b("div",Jje,[b("div",Qje,[b("div",eOe,[b("span",tOe,[W(Ee,{name:"download",size:"md"})]),b("span",nOe,[b("span",oOe,I(j.value),1),b("span",sOe,I(O.value),1)])]),W(Nt,{"data-testid":"settings-check-update",variant:"secondary",size:"sm",loading:d.value?.status==="checking",disabled:R.value,onClick:Q},{default:ae(()=>[He(I(v(n)("settings.desktop.checkNow")),1)]),_:1},8,["loading","disabled"])]),b("div",iOe,[b("span",lOe,[He(I(v(n)("settings.desktop.updateChannel"))+" ",1),b("span",rOe,I(v(n)("settings.desktop.updateChannelHint")),1)]),b("div",aOe,[W(F4,{"data-testid":"desktop-update-channel",size:"sm","model-value":d.value?.channel??"stable",disabled:M.value,"aria-label":v(n)("settings.desktop.updateChannel"),"onUpdate:modelValue":J},{default:ae(()=>[(g(),S(Ce,null,rt(D,Xe=>b("option",{key:Xe,value:Xe},I(v(n)(`settings.desktop.channels.${Xe}`)),9,cOe)),64))]),_:1},8,["model-value","disabled","aria-label"])])]),b("div",uOe,[b("span",dOe,[He(I(v(n)("settings.desktop.automaticChecks"))+" ",1),b("span",fOe,I(v(n)("settings.desktop.automaticChecksHint")),1)]),W(wi,{"data-testid":"automatic-update-checks","model-value":d.value?.autoUpdate??!1,disabled:f.value||d.value===void 0||d.value.status==="disabled",label:v(n)("settings.desktop.automaticChecks"),"onUpdate:modelValue":ee},null,8,["model-value","disabled","label"])]),b("div",pOe,[b("span",hOe,[He(I(v(n)("settings.desktop.notifyUpdates"))+" ",1),b("span",mOe,I(v(n)("settings.desktop.notifyUpdatesHint")),1)]),W(wi,{"data-testid":"update-notifications","model-value":d.value?.notifyUpdate??!0,disabled:f.value||d.value===void 0,label:v(n)("settings.desktop.notifyUpdates"),"onUpdate:modelValue":se},null,8,["model-value","disabled","label"])]),d.value?.status==="downloading"||q.value||d.value?.availableVersion?(g(),S("div",gOe,[d.value?.status==="downloading"?(g(),S("div",vOe,[H.value===void 0?(g(),S("progress",{key:0,"data-testid":"settings-update-progress",max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,yOe)):(g(),S("progress",{key:1,"data-testid":"settings-update-progress",value:H.value,max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,wOe)),b("span",kOe,I(Z.value||v(n)("settings.desktop.fetching")),1)])):Y("",!0),q.value?(g(),ue(K9,{key:1,variant:"danger"},{default:ae(()=>[He(I(q.value),1)]),_:1})):Y("",!0),b("div",bOe,[d.value?.availableVersion?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",disabled:f.value,onClick:at},{default:ae(()=>[He(I(v(n)("settings.desktop.viewNotes")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"?(g(),ue(Nt,{key:1,variant:"ghost",size:"sm",disabled:f.value,onClick:xe},{default:ae(()=>[He(I(v(n)("settings.desktop.skip")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"||d.value?.status==="error"&&d.value.availableVersion?(g(),ue(Nt,{key:2,"data-testid":"settings-download-update",size:"sm",loading:f.value,onClick:me},{default:ae(()=>[He(I(d.value?.status==="error"?v(n)("settings.desktop.retryDownload"):v(n)("settings.desktop.download")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="skipped"?(g(),ue(Nt,{key:3,size:"sm",loading:f.value,onClick:Ye},{default:ae(()=>[He(I(v(n)("settings.desktop.undoSkip")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="downloaded"?(g(),ue(Nt,{key:4,"data-testid":"settings-restart-update",size:"sm",loading:f.value,onClick:X},{default:ae(()=>[He(I(v(n)("settings.desktop.restartToUpdate")),1)]),_:1},8,["loading"])):Y("",!0)])])):Y("",!0)])])):Y("",!0)],512),[[_i,i.value==="update"]]),Jn(b("section",_Oe,[b("section",xOe,[b("h3",SOe,I(v(n)("settings.tabs.lab")),1),b("div",COe,[b("span",MOe,[He(I(v(n)("settings.conversationToc"))+" ",1),b("span",AOe,I(v(n)("settings.conversationTocHint")),1)]),W(wi,{"model-value":e.conversationToc??!0,label:v(n)("settings.conversationToc"),"onUpdate:modelValue":st[17]||(st[17]=Xe=>s("setConversationToc",Xe))},null,8,["model-value","label"])]),e.config?(g(),S(Ce,{key:0},[b("div",TOe,[b("span",EOe,[He(I(v(n)("settings.lab.sidebarTabs"))+" ",1),b("span",IOe,I(v(n)("settings.lab.sidebarTabsHint")),1),Wn("sidebarTabs")?.externallyControlled?(g(),S("span",LOe,I(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("sidebarTabs")?.overridden?(g(),S("span",$Oe,I(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("sidebarTabs"),disabled:e.configSaving,label:v(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":st[18]||(st[18]=Xe=>Pn("sidebarTabs",Xe))},null,8,["model-value","disabled","label"])]),b("div",NOe,[b("span",zOe,[He(I(v(n)("settings.lab.secondaryModel"))+" ",1),b("span",BOe,I(v(n)("settings.lab.secondaryModelHint")),1),Wn("secondary-model")?.externallyControlled?(g(),S("span",ROe,I(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("secondary-model")?.overridden?(g(),S("span",POe,I(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("secondary-model"),disabled:e.configSaving,label:v(n)("settings.lab.secondaryModel"),"onUpdate:modelValue":st[19]||(st[19]=Xe=>Pn("secondary-model",Xe))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",FOe,I(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="lab"]]),Jn(b("section",jOe,[b("div",OOe,[st[23]||(st[23]=b("div",{class:"panel-kicker"},"Archived sessions",-1)),b("h4",HOe,I(v(n)("settings.archivedTitle")),1),b("p",DOe,I(v(n)("settings.archivedDesc")),1)]),b("div",VOe,[b("label",WOe,[st[24]||(st[24]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("circle",{cx:"11",cy:"11",r:"7"}),b("path",{d:"m21 21-4.3-4.3"})],-1)),Jn(b("input",{"onUpdate:modelValue":st[20]||(st[20]=Xe=>Mt.value=Xe),placeholder:v(n)("settings.archivedSearch")},null,8,qOe),[[js,Mt.value]])]),W(F4,{"model-value":Ft.value,size:"sm","aria-label":v(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":st[21]||(st[21]=Xe=>Ft.value=Xe)},{default:ae(()=>[b("option",UOe,I(v(n)("settings.archivedAllWorkspaces")),1),(g(!0),S(Ce,null,rt(tn.value,Xe=>(g(),S("option",{key:Xe,value:Xe},I(Xe),9,ZOe))),128))]),_:1},8,["model-value","aria-label"]),W(di,{size:"sm","model-value":Ut.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":st[22]||(st[22]=Xe=>Ut.value=Xe)},null,8,["model-value","options"])]),ot.value?(g(),S("div",KOe,I(v(n)("settings.archivedLoadingAll")),1)):(g(),S(Ce,{key:1},[Ro.value.length>0?(g(),S("div",GOe,[(g(!0),S(Ce,null,rt(Ro.value,Xe=>(g(),S("section",{key:Xe.cwd,class:"archive-card"},[b("div",YOe,[st[25]||(st[25]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("path",{d:"M3 7h6l2 2h10v9H3z"}),b("path",{d:"M3 7V5h6l2 2"})],-1)),b("span",XOe,I(Xe.cwd),1),b("span",JOe,I(v(n)("settings.archivedSessionsCount",{count:Xe.items.length})),1)]),b("div",QOe,[(g(!0),S(Ce,null,rt(Xe.items,qe=>(g(),S("div",{key:qe.id,class:"archive-row"},[b("div",eHe,[b("div",tHe,I(qe.title),1),b("div",nHe,I(v(n)("settings.archivedAt",{time:Do(qe.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Pe=>$s(qe.id)},{default:ae(()=>[He(I(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(g(),S("div",oHe,I(Ge.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))],512),[[_i,i.value==="archived"]])])],512)]),_:1},8,["title"]))}}),lHe=vt(iHe,[["__scopeId","data-v-c89555a1"]]),rHe=/^(?:\/|~(?:\/|$)|[A-Za-z]:[\\/]|\\\\)/,uB=/^[A-Za-z]:[\\/]/,aHe=/^\/\/(?!\/)/;function e8(e){return rHe.test(e.trim())}function cHe(e,t){return e==="~"?t||e:e.startsWith("~/")?(t||"~")+e.slice(1):e}function uHe(e){return aHe.test(e)?`//${e.slice(2).replaceAll(/\/{2,}/g,"/")}`:e.replaceAll(/\/{2,}/g,"/")}function dHe(e){return uB.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function fHe(e){return uB.test(e)?3:e.startsWith("\\\\")||e.startsWith("//")?2:e.startsWith("/")?1:0}function sg(e,t){let n=uHe(cHe(e.trim(),t));const o=dHe(n),s=n==="/"||n==="//"||n==="\\\\"||/^[A-Za-z]:[\\/]$/.test(n),i=o?/[\\/]$/.test(n):n.endsWith("/");!s&&i&&(n=n.slice(0,-1));const l=n.lastIndexOf("/"),r=o?n.lastIndexOf("\\"):-1,a=Math.max(l,r),c=r>l?"\\":"/",u=fHe(n),d=ad.value.trim().length>0);let m=0,k=null;const x=B(()=>e8(d.value)),y=V("idle"),w=V(""),_=V("/"),A=V([]),P=V(""),z=V(null),L=V(null),E=B(()=>y.value!=="valid"?null:hHe(d.value,P.value,L.value));let T=0,$=null;function C(se,Q){const me=se.toLowerCase(),xe=Q.toLowerCase();let Ye=0;for(let at=0;at0&&X=SM))break;oe.depth+1{k&&clearTimeout(k),$&&clearTimeout($),T++,y.value="idle",A.value=[],L.value=null;const Q=se.trim();if(Q===""){m++,p.value=[],f.value=!1;return}if(e8(Q)){if(m++,p.value=[],f.value=!1,r.value)return;y.value="checking",$=setTimeout(()=>void H(Q),150);return}k=setTimeout(()=>void j(se),220)});async function H(se){const Q=++T;y.value="checking",L.value=null;const me=sg(se,P.value),{target:xe}=me;try{const at=await o.browseFs(xe);if(Q!==T)return;if(at.path){y.value="valid",A.value=[],L.value=xe,a.value=at.path,c.value=at.parent,u.value=at.entries,r.value=!1;return}}catch{}if(Q!==T)return;const Ye=me.base.toLowerCase();w.value=me.parent,_.value=me.separator;try{const at=await o.browseFs(me.parent);if(Q!==T)return;if(at.path){A.value=at.entries.filter(X=>X.isDir&&X.name.toLowerCase().startsWith(Ye)),y.value="not-found";return}}catch{}Q===T&&(A.value=[],y.value="bad-parent")}function D(se){d.value=pHe(w.value,se,_.value),z.value?.focus()}const M=B(()=>r.value?n("workspace.degradedPlaceholder"):n("workspace.searchPlaceholder")),R=B(()=>r.value?n("workspace.degradedHint"):x.value&&y.value==="valid"?n("workspace.pathFollowHint"):n("workspace.browseHint"));function O(se){if(se.key==="Escape"){d.value?d.value="":s("close");return}if(se.key!=="Enter")return;const Q=d.value.trim();if(e8(Q)){if(se.preventDefault(),r.value){const{target:me}=sg(Q,P.value);me&&s("add",me);return}y.value==="valid"?J():y.value==="not-found"&&A.value[0]&&D(A.value[0].name)}}const U=B(()=>{const se=a.value;if(!se)return[];const Q=se.split("/").filter(Boolean),me=[{label:"/",path:"/"}];let xe="";for(const Ye of Q)xe+=`/${Ye}`,me.push({label:Ye,path:xe});return me}),Z=B(()=>!(a.value.length===0||x.value&&E.value===null));async function q(se){l.value=!0;try{const Q=await o.browseFs(se);if(!Q.path){r.value=!0;return}a.value=Q.path,c.value=Q.parent,u.value=Q.entries,d.value="",r.value=!1}catch{r.value=!0}finally{l.value=!1}}function te(se){se.isDir&&q(se.path)}function ee(){c.value&&q(c.value)}function J(){Z.value&&s("add",E.value??a.value)}return In(async()=>{l.value=!0;try{const se=await o.getFsHome().catch(()=>({home:"",recentRoots:[]}));if(se.home&&(P.value=se.home),o.defaultPath&&(await q(o.defaultPath),!r.value))return;P.value?await q(P.value):r.value=!0}catch{r.value=!0}finally{l.value=!1}}),En(()=>{k&&clearTimeout(k),$&&clearTimeout($)}),(se,Q)=>(g(),ue(Z0,{open:i.value,"onUpdate:open":Q[2]||(Q[2]=me=>i.value=me),title:v(n)("workspace.addTitle"),size:"lg",height:"fixed",onClose:Q[3]||(Q[3]=me=>s("close"))},{default:ae(()=>[b("div",mHe,[r.value?Y("",!0):(g(),S("div",gHe,[W(Dt,{size:"sm",disabled:!c.value,label:v(n)("workspace.up"),onClick:ee},{default:ae(()=>[W(Ee,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),b("div",vHe,[(g(!0),S(Ce,null,rt(U.value,(me,xe)=>(g(),S(Ce,{key:me.path},[xe>1?(g(),S("span",yHe,"/")):Y("",!0),b("button",{class:Be(["crumb",{last:xe===U.value.length-1}]),onClick:Ye=>q(me.path)},I(me.label),11,wHe)],64))),128))])])),!l.value||r.value?(g(),S("div",{key:1,class:Be(["filterbar",{"has-error":y.value==="not-found"||y.value==="bad-parent"}])},[W(Ee,{class:"filter-icon",name:"search",size:"md"}),Jn(b("input",{ref_key:"filterEl",ref:z,"onUpdate:modelValue":Q[0]||(Q[0]=me=>d.value=me),class:"filter-input",type:"text",placeholder:M.value,autocomplete:"off",spellcheck:"false",onKeydown:xt(O,["stop"])},null,40,kHe),[[js,d.value]]),f.value||y.value==="checking"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0)],2)):Y("",!0),r.value?(g(),S("div",RHe,I(v(n)("workspace.degradedHint")),1)):(g(),S("div",bHe,[l.value?(g(),S("div",_He,I(v(n)("workspace.browsing")),1)):x.value&&y.value!=="valid"?(g(),S(Ce,{key:1},[y.value==="checking"?(g(),S("div",xHe,I(v(n)("workspace.checkingPath")),1)):y.value==="not-found"?(g(),S(Ce,{key:1},[A.value.length>0?(g(),S("div",SHe,I(v(n)("workspace.pathPickHint")),1)):Y("",!0),(g(!0),S(Ce,null,rt(A.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>D(me.name)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",MHe,I(me.name),1)],8,CHe))),128)),A.value.length===0?(g(),S("div",AHe,I(v(n)("workspace.noPathMatch",{parent:w.value})),1)):Y("",!0)],64)):y.value==="bad-parent"?(g(),S("div",THe,I(v(n)("workspace.badParent",{parent:w.value})),1)):Y("",!0)],64)):h.value&&!x.value?(g(),S(Ce,{key:2},[(g(!0),S(Ce,null,rt(p.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>q(me.path)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",IHe,I(me.rel),1)],8,EHe))),128)),!f.value&&p.value.length===0?(g(),S("div",LHe,I(v(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(g(),S("div",$He,I(v(n)("workspace.searching")),1)):Y("",!0)],64)):(g(),S(Ce,{key:3},[(g(!0),S(Ce,null,rt(u.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>te(me)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",zHe,I(me.name),1)],8,NHe))),128)),u.value.length===0?(g(),S("div",BHe,I(v(n)("workspace.noSubfolders")),1)):Y("",!0)],64))])),e.error?(g(),S("div",PHe,I(e.error),1)):Y("",!0),b("div",FHe,[W(Cn,{text:a.value},{default:ae(()=>[r.value?Y("",!0):(g(),ue(Nt,{key:0,variant:"primary",disabled:!Z.value,onClick:J},{default:ae(()=>[He(I(v(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),W(Nt,{variant:"secondary",onClick:Q[1]||(Q[1]=me=>s("close"))},{default:ae(()=>[He(I(v(n)("workspace.cancel")),1)]),_:1})]),b("div",jHe,I(R.value),1)])]),_:1},8,["open","title"]))}}),VHe=vt(DHe,[["__scopeId","data-v-09b74e91"]]),WHe={key:0,class:"confirm-dialog__message"},qHe=Je({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(){n.loading||(o("update:open",!1),o("cancel"))}function l(r){if(r.key!=="Enter"||!n.open||n.loading)return;const a=r.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(r.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",l),vo(()=>{typeof window<"u"&&window.removeEventListener("keydown",l)}),(r,a)=>(g(),ue(Z0,{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=c=>o("update:open",c)),onClose:i},{foot:ae(()=>[W(Nt,{variant:"secondary",disabled:e.loading,onClick:i},{default:ae(()=>[He(I(e.cancelLabel??v(s)("common.cancel")),1)]),_:1},8,["disabled"]),W(Nt,{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=c=>o("confirm"))},{default:ae(()=>[He(I(e.confirmLabel??v(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:ae(()=>[e.message?(g(),S("p",WHe,I(e.message),1)):Y("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),UHe=vt(qHe,[["__scopeId","data-v-074405fe"]]),ZHe=Je({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=z1();function i(){s()}return(l,r)=>(g(),ue(UHe,{open:v(t)!==null,title:v(t)?.title??"",message:v(t)?.message,"confirm-label":v(t)?.confirmLabel,"cancel-label":v(t)?.cancelLabel,variant:v(t)?.variant,loading:v(n),onConfirm:i,onCancel:r[0]||(r[0]=a=>v(o)(!1))},null,8,["open","title","message","confirm-label","cancel-label","variant","loading"]))}}),KHe={class:"rows"},GHe={class:"row"},YHe={class:"row"},XHe={class:"row"},JHe={class:"row"},QHe={class:"row"},eDe={class:"row"},tDe={class:"ctx-text"},nDe={key:0,class:"bar"},oDe={class:"row"},sDe=Je({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(!0),l=B(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),r=B(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:ba(o.status.ctxUsed),max:ba(o.status.ctxMax),pct:l.value}):n("status.statusNone"));function a(h){return n(h==="yolo"?"status.permissionYolo":h==="auto"?"status.permissionAuto":"status.permissionManual")}const c=B(()=>{const h=o.status.permission;return h==="yolo"?"var(--color-warning)":h==="auto"?"var(--color-danger)":"var(--color-text)"}),u=B(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=B(()=>o.dynamicWorkflowMode?n("status.dynamicWorkflowOn"):n("status.dynamicWorkflowOff")),f=B(()=>typeof o.costUsd=="number"&&o.costUsd>0),p=B(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(h,m)=>(g(),ue(Z0,{open:i.value,"onUpdate:open":m[0]||(m[0]=k=>i.value=k),title:v(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=k=>s("close"))},{default:ae(()=>[b("dl",KHe,[b("div",GHe,[b("dt",null,I(v(n)("status.statusModel")),1),b("dd",null,I(e.status.model),1)]),b("div",YHe,[b("dt",null,I(v(n)("status.statusThinking")),1),b("dd",null,I(e.thinking),1)]),b("div",XHe,[b("dt",null,I(v(n)("status.statusPermission")),1),b("dd",{style:Gt({color:c.value})},I(a(e.status.permission)),5)]),b("div",JHe,[b("dt",null,I(v(n)("status.statusPlanMode")),1),b("dd",{class:Be({"plan-on":e.planMode})},I(u.value),3)]),b("div",QHe,[b("dt",null,I(v(n)("status.statusDynamicWorkflowMode")),1),b("dd",{class:Be({"workflow-on":e.dynamicWorkflowMode})},I(d.value),3)]),b("div",eDe,[b("dt",null,I(v(n)("status.statusContext")),1),b("dd",null,[b("span",tDe,I(r.value),1),e.status.ctxMax>0?(g(),S("span",nDe,[b("i",{style:Gt({width:l.value+"%"})},null,4)])):Y("",!0)])]),b("div",oDe,[b("dt",null,I(v(n)("status.statusCost")),1),b("dd",null,I(p.value),1)])])]),_:1},8,["open","title"]))}}),iDe=vt(sDe,[["__scopeId","data-v-7992546c"]]),lDe={key:0,class:"actions"},rDe=["onClick"],aDe=["onClick"],cDe={key:1,class:"details"},uDe=Je({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(E){return typeof E=="object"&&E!==null}function l(E){return i(E)?E.title:E}function r(E){return i(E)?E.message??"":""}function a(E){return i(E)?E.details:void 0}function c(E){return i(E)?E.severity==="error":E.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|failed/i.test(E)}function u(E){if(!i(E))return c(E)?"danger":"warning";switch(E.severity){case"error":case"danger":return"danger";case"success":return"success";case"info":return"info";default:return"warning"}}function d(E){return i(E)?`notice:${E.severity}:${E.title}:${E.message??""}:${JSON.stringify(E.details??[])}`:`text:${E}`}function f(E){if(!i(E))return E;const T=[E.title];E.message&&T.push(E.message);const $=E.details??[];if($.length>0){T.push("",`${s("warnings.diagnostics")}:`);for(const C of $)T.push(`${C.label}: ${C.value}`)}return T.join(` -`)}let p=1;const h=V([]),m=new Map,k=new Map;function x(E){const T=c(E)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?T+5e3:T}function y(E,T){const $=m.get(E)??{handle:null,deadline:0,remaining:0};$.handle=setTimeout(()=>L(E),T),$.deadline=Date.now()+T,m.set(E,$)}function w(E){const T=m.get(E);T&&T.handle!==null&&clearTimeout(T.handle),m.delete(E)}function _(E){const T=m.get(E);!T||T.handle===null||(clearTimeout(T.handle),T.handle=null,T.remaining=Math.max(0,T.deadline-Date.now()))}function A(E){if(h.value.find(C=>C.id===E)?.detailsOpen)return;const $=m.get(E);!$||$.handle!==null||y(E,$.remaining)}function P(E){E.detailsOpen=!E.detailsOpen,E.detailsOpen?_(E.id):A(E.id)}async function z(E){if(!await fs(f(E.warning)))return;E.copied=!0;const $=k.get(E.id);$&&clearTimeout($),k.set(E.id,setTimeout(()=>{E.copied=!1,k.delete(E.id)},1400))}function L(E){w(E);const T=k.get(E);T&&clearTimeout(T),k.delete(E);const $=h.value.findIndex(C=>C.id===E);$!==-1&&(h.value=h.value.filter(C=>C.id!==E),o("dismiss",$))}return Ke(()=>n.warnings,E=>{const T=[...h.value];h.value=E.map($=>{const C=d($),j=T.findIndex(M=>M.key===C),H=j===-1?void 0:T.splice(j,1)[0];if(H)return H.warning=$,H;const D={id:p++,key:C,warning:$,detailsOpen:!1,copied:!1};return y(D.id,x($)),D});for(const $ of T){w($.id);const C=k.get($.id);C&&clearTimeout(C),k.delete($.id)}},{immediate:!0,flush:"post"}),En(()=>{m.forEach(E=>{E.handle!==null&&clearTimeout(E.handle)}),m.clear(),k.forEach(E=>clearTimeout(E)),k.clear()}),(E,T)=>(g(),ue(FF,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:ae(()=>[(g(!0),S(Ce,null,rt(h.value,$=>(g(),ue(Gz,{key:$.id,variant:u($.warning),title:l($.warning),message:r($.warning),"dismiss-label":v(s)("warnings.dismiss"),onDismiss:C=>L($.id),onPointerenter:C=>_($.id),onPointerleave:C=>A($.id)},{default:ae(()=>[a($.warning)?.length?(g(),S("div",lDe,[b("button",{class:"link",type:"button",onClick:C=>P($)},I($.detailsOpen?v(s)("warnings.hideDetails"):v(s)("warnings.showDetails")),9,rDe),b("button",{class:"link",type:"button",onClick:C=>z($)},I($.copied?v(s)("warnings.copied"):v(s)("warnings.copyDetails")),9,aDe)])):Y("",!0),$.detailsOpen&&a($.warning)?.length?(g(),S("dl",cDe,[(g(!0),S(Ce,null,rt(a($.warning),C=>(g(),S("div",{key:`${C.label}:${C.value}`,class:"detail-row"},[b("dt",null,I(C.label),1),b("dd",null,I(C.value),1)]))),128))])):Y("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),dDe=vt(uDe,[["__scopeId","data-v-6d8f28b8"]]),fDe={class:"update-dialog__head"},pDe={class:"update-dialog__brand","data-testid":"update-dialog-brand"},hDe={class:"update-dialog__titles"},mDe={class:"update-dialog__title","data-testid":"update-dialog-title"},gDe={key:0,class:"update-dialog__date","data-testid":"update-dialog-date"},vDe={key:0,class:"update-dialog__progress"},yDe={class:"update-dialog__progress-row"},wDe={class:"update-dialog__progress-label"},kDe={class:"update-dialog__progress-meta","data-testid":"update-dialog-progress-meta"},bDe={key:0,"data-testid":"update-dialog-bytes"},_De={key:1},xDe=["aria-label"],SDe=["value","aria-label"],CDe={key:2,class:"update-dialog__message","data-testid":"update-dialog-message"},MDe=Je({__name:"UpdateDialog",setup(e){const{t}=$t(),n=eE();In(()=>n.subscribe()),En(()=>n.unsubscribe());const o=B(()=>n.availableVersion.value??""),s=B(()=>n.status.value==="downloading"?t("update.dialogDownloading",{version:o.value}):n.status.value==="downloaded"?t("update.dialogReady",{version:o.value}):n.status.value==="error"?t("update.failed"):t("update.dialogAvailable",{version:o.value})),i=B(()=>{const d=n.state.value?.releaseDate;if(d===void 0)return"";const f=new Date(d);return Number.isNaN(f.getTime())?"":new Intl.DateTimeFormat(void 0,{dateStyle:"long"}).format(f)}),l=B(()=>{const d=n.state.value?.transferred;return d===void 0?void 0:Uk(d)}),r=B(()=>{const d=n.state.value?.total;return d===void 0?void 0:Uk(d)}),a=B(()=>n.status.value==="error"?n.state.value?.message??t("update.failedMessage"):n.status.value==="downloaded"?t("update.restart"):t("update.prompt")),c=B(()=>n.status.value!=="downloading");function u(){c.value&&n.closeDialog()}return(d,f)=>(g(),ue(Z0,{open:v(n).dialogOpen.value,title:s.value,description:i.value||void 0,"close-on-overlay":c.value,"close-on-esc":c.value,"show-close":!1,size:"md-wide",onClose:u},{head:ae(()=>[b("div",fDe,[b("span",pDe,[W(df,{size:"sm",animated:!1})]),b("div",hDe,[b("div",mDe,I(s.value),1),i.value?(g(),S("div",gDe,[W(Ee,{name:"calendar-schedule",size:"sm","aria-hidden":"true"}),b("span",null,I(i.value),1)])):Y("",!0)])])]),foot:ae(()=>[v(n).status.value==="downloading"?(g(),ue(Nt,{key:0,"data-testid":"cancel-update-download",variant:"secondary",loading:v(n).busy.value,onClick:f[1]||(f[1]=p=>void v(n).cancelDownload())},{default:ae(()=>[He(I(v(t)("update.cancelDownload")),1)]),_:1},8,["loading"])):v(n).status.value==="downloaded"?(g(),S(Ce,{key:1},[W(Nt,{"data-testid":"later-update",variant:"ghost",onClick:u},{default:ae(()=>[He(I(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"restart-to-update",loading:v(n).busy.value,onClick:f[2]||(f[2]=p=>void v(n).restart())},{default:ae(()=>[He(I(v(t)("update.restartAction")),1)]),_:1},8,["loading"])],64)):v(n).status.value==="error"?(g(),S(Ce,{key:2},[W(Nt,{"data-testid":"dismiss-update",variant:"ghost",onClick:u},{default:ae(()=>[He(I(v(t)("update.dismiss")),1)]),_:1}),W(Nt,{"data-testid":"retry-update",loading:v(n).busy.value,onClick:f[3]||(f[3]=p=>void v(n).retry())},{default:ae(()=>[He(I(v(t)("update.retryDownload")),1)]),_:1},8,["loading"])],64)):(g(),S(Ce,{key:3},[W(Nt,{"data-testid":"skip-update",variant:"secondary",onClick:f[4]||(f[4]=p=>void v(n).skip())},{default:ae(()=>[He(I(v(t)("update.skip")),1)]),_:1}),f[6]||(f[6]=b("span",{class:"update-dialog__foot-spacer"},null,-1)),W(Nt,{"data-testid":"later-update",variant:"secondary",onClick:u},{default:ae(()=>[He(I(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"download-update",loading:v(n).busy.value,onClick:f[5]||(f[5]=p=>void v(n).download())},{default:ae(()=>[He(I(v(t)("update.download")),1)]),_:1},8,["loading"])],64))]),default:ae(()=>[v(n).status.value==="downloading"?(g(),S("div",vDe,[b("div",yDe,[b("span",wDe,I(v(t)("update.downloadProgress")),1),b("span",kDe,[l.value&&r.value?(g(),S("span",bDe,I(v(t)("update.bytesProgress",{transferred:l.value,total:r.value})),1)):(g(),S("span",_De,I(v(t)("update.fetching")),1))])]),v(n).percent.value===void 0?(g(),S("progress",{key:0,"data-testid":"update-dialog-progress",max:"100","aria-label":v(t)("update.progressLabel")},null,8,xDe)):(g(),S("progress",{key:1,"data-testid":"update-dialog-progress",value:v(n).percent.value,max:"100","aria-label":v(t)("update.progressLabel")},null,8,SDe))])):v(n).status.value==="available"?(g(),ue(D2,{key:1,"data-testid":"automatic-update-preference","model-value":v(n).state.value?.autoUpdate??!1,disabled:v(n).busy.value,"onUpdate:modelValue":f[0]||(f[0]=p=>void v(n).setAutomaticChecks(p))},{default:ae(()=>[He(I(v(t)("update.automaticChecks")),1)]),_:1},8,["model-value","disabled"])):(g(),S("p",CDe,I(a.value),1))]),_:1},8,["open","title","description","close-on-overlay","close-on-esc"]))}}),ADe=vt(MDe,[["__scopeId","data-v-13aac9b0"]]),TDe={class:"ui-action-toast-host"},EDe={class:"ui-action-toast__body"},IDe=Je({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t();let s=null,i=0,l=e.duration;function r(u){if(u<=0){n("dismiss",e.dismissToken);return}s=setTimeout(()=>n("dismiss",e.dismissToken),u),i=Date.now()+u}function a(){s!==null&&(clearTimeout(s),s=null,l=Math.max(0,i-Date.now()))}function c(){s===null&&r(l)}return r(e.duration),En(()=>{s!==null&&clearTimeout(s)}),(u,d)=>(g(),S("div",TDe,[b("div",{class:"ui-action-toast",role:"status",onPointerenter:a,onPointerleave:c},[b("span",EDe,[jn(u.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??v(o)("common.dismiss"),onClick:d[0]||(d[0]=f=>n("dismiss",e.dismissToken))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),t8=vt(IDe,[["__scopeId","data-v-9efa207b"]]),LDe={key:0,class:"window-controls"},$De=["aria-label"],NDe=["aria-label"],zDe=["aria-label"],BDe=Je({__name:"WindowControls",setup(e){const{t}=$t(),n=B(()=>window.pythinkerDesktop?.platform==="win32");function o(){window.pythinkerDesktop?.minimizeWindow()}function s(){window.pythinkerDesktop?.toggleMaximizeWindow()}function i(){window.pythinkerDesktop?.closeWindow()}return(l,r)=>n.value?(g(),S("div",LDe,[b("button",{type:"button",class:"wc wc-min","aria-label":v(t)("app.minimizeWindow"),onClick:o},[...r[0]||(r[0]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M2.5 5h5"})],-1)])],8,$De),b("button",{type:"button",class:"wc wc-max","aria-label":v(t)("app.maximizeWindow"),onClick:s},[...r[1]||(r[1]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round","aria-hidden":"true"},[b("rect",{x:"2.4",y:"2.4",width:"5.2",height:"5.2",rx:"1"})],-1)])],8,NDe),b("button",{type:"button",class:"wc wc-close","aria-label":v(t)("app.closeWindow"),onClick:i},[...r[2]||(r[2]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M3 3l4 4M7 3l-4 4"})],-1)])],8,zDe)])):Y("",!0)}}),RDe=vt(BDe,[["__scopeId","data-v-768f9703"]]),PDe={class:"topbar"},FDe={class:"wsq"},jDe=["aria-label"],ODe={class:"tb-path"},HDe={class:"ws"},DDe={class:"se"},VDe={class:"tb-sub"},WDe=Je({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=B(()=>{const a=o.workspace,u=(a?.name||a?.root||"").trim().charAt(0);return u?u.toUpperCase():"K"}),l=B(()=>o.workspace?.name??n("workspace.noWorkspace")),r=B(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,c)=>(g(),S("div",PDe,[b("span",FDe,I(i.value),1),b("button",{type:"button",class:"tb-mid","aria-label":v(n)("mobile.openSwitcher"),onClick:c[0]||(c[0]=u=>s("openSwitcher"))},[b("span",ODe,[b("span",HDe,I(l.value),1),e.sessionTitle?(g(),S(Ce,{key:0},[c[2]||(c[2]=b("span",{class:"sl"},"/",-1)),b("span",DDe,I(e.sessionTitle),1)],64)):Y("",!0),c[3]||(c[3]=b("span",{class:"cv"},"⌄",-1))]),b("span",VDe,[b("span",{class:Be(["rd",{on:e.running}])},null,2),b("span",null,I(r.value),1),e.branch?(g(),S(Ce,{key:0},[He(" · "+I(e.branch),1)],64)):Y("",!0),e.sessionCount>0?(g(),S(Ce,{key:1},[He(" · "+I(v(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):Y("",!0)])],8,jDe),W(Dt,{size:"lg",label:v(n)("mobile.openSettings"),onClick:c[1]||(c[1]=u=>s("openSettings"))},{default:ae(()=>[W(Ee,{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),qDe=vt(WDe,[["__scopeId","data-v-27a83eb2"]]),UDe={class:"mlist"},ZDe={key:0,class:"mempty"},KDe=["onClick"],GDe={class:"mgh-main"},YDe={class:"mgh-name"},XDe={class:"mgh-path"},JDe={key:2,class:"att"},QDe={key:0,class:"mempty small"},eVe=["onClick"],tVe={class:"m"},nVe={class:"s"},oVe={key:0,class:"att"},sVe=["disabled","onClick"],iVe=["onClick"],lVe=Je({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(){s("update:modelValue",!1)}function l($){s("select",$),i()}function r($){s("createInWorkspace",$),i()}function a(){s("create"),i()}function c(){s("addWorkspace"),i()}const u=V(new Set);function d($){return u.value.has($)}function f($){const C=new Set(u.value);C.has($)?C.delete($):C.add($),u.value=C,w.value=null,z.value=null}const p=V(new Set);function h($){return p.value.has($)}function m($){const C=new Set(p.value);C.has($)?C.delete($):C.add($),p.value=C}function k($){if(h($.workspace.id))return $.sessions;const C=$.sessions.slice(0,$.initialCount);if(o.activeId&&!C.some(j=>j.id===o.activeId)){const j=$.sessions.find(H=>H.id===o.activeId);if(j)return[...C,j]}return C}function x($){if(!p.value.has($)){const C=new Set(p.value);C.add($),p.value=C}s("loadMore",$)}function y($){return o.attentionByWorkspace[$]??0}const w=V(null);function _($){w.value=w.value===$?null:$,z.value=null}function A($){w.value=null;const j=(typeof window<"u"?window.prompt(n("sidebar.rename"),$.title):null)?.trim();j&&s("rename",$.id,j)}function P($){w.value=null,s("archive",$)}const z=V(null);function L($){z.value=z.value===$?null:$,w.value=null}function E($){fs($.root),z.value=null}function T($){z.value=null,s("deleteWorkspace",$.id)}return($,C)=>(g(),ue(wu,{"model-value":e.modelValue,"onUpdate:modelValue":C[2]||(C[2]=j=>s("update:modelValue",j))},{default:ae(()=>[b("button",{type:"button",class:"newrow",onClick:a},[W(Ee,{name:"message",size:"sm"}),He(" "+I(v(n)("sidebar.newChat")),1)]),b("button",{type:"button",class:"newrow secondary",onClick:c},[W(Ee,{name:"folder",size:"sm"}),He(" "+I(v(n)("sidebar.newWorkspace")),1)]),b("div",UDe,[e.groups.length===0?(g(),S("div",ZDe,I(v(n)("workspace.noWorkspace")),1)):Y("",!0),(g(!0),S(Ce,null,rt(e.groups,j=>(g(),S("div",{key:j.workspace.id,class:"mgroup"},[b("div",{class:Be(["mgh",{on:j.workspace.id===e.activeWorkspaceId}]),onClick:H=>f(j.workspace.id)},[d(j.workspace.id)?(g(),ue(Ee,{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(g(),ue(Ee,{key:1,class:"mgh-folder",name:"folder",size:"sm"})),b("div",GDe,[b("span",YDe,I(j.workspace.name),1),W(Cn,{text:j.workspace.root},{default:ae(()=>[b("span",XDe,I(j.workspace.shortPath),1)]),_:2},1032,["text"])]),d(j.workspace.id)&&y(j.workspace.id)>0?(g(),S("span",JDe,I(y(j.workspace.id)),1)):Y("",!0),W(Dt,{size:"lg",class:"mgh-more",label:v(n)("sidebar.options"),onClick:xt(H=>L(j.workspace.id),["stop"])},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),W(Dt,{size:"lg",class:"mgh-add",label:v(n)("workspace.newInGroup"),onClick:xt(H=>r(j.workspace.id),["stop"])},{default:ae(()=>[W(Ee,{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),z.value===j.workspace.id?(g(),ue(zr,{key:3,class:"kmenu wsmenu",onClick:C[0]||(C[0]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:H=>E(j.workspace)},{default:ae(()=>[He(I(v(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:H=>T(j.workspace)},{default:ae(()=>[He(I(v(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,KDe),Jn(b("div",null,[j.sessions.length===0?(g(),S("div",QDe,I(v(n)("sidebar.noSessions")),1)):Y("",!0),(g(!0),S(Ce,null,rt(k(j),H=>(g(),S("div",{key:H.id,class:Be(["srow",{cur:H.id===e.activeId}]),onClick:D=>l(H.id)},[b("div",tVe,[b("div",{class:Be(["t",{run:H.busy,aborted:!H.busy&&(e.attentionBySession[H.id]??0)===0&&(H.lastTurnReason==="cancelled"||H.lastTurnReason==="failed")}])},I(H.title),3),b("div",nVe,I(H.time),1)]),(e.attentionBySession[H.id]??0)>0?(g(),S("span",oVe,I(e.attentionBySession[H.id]),1)):Y("",!0),W(Dt,{size:"lg",class:"kb",label:v(n)("sidebar.options"),onClick:xt(D=>_(H.id),["stop"])},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),w.value===H.id?(g(),ue(zr,{key:1,class:"kmenu",onClick:C[1]||(C[1]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:D=>A(H)},{default:ae(()=>[He(I(v(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:D=>P(H.id)},{default:ae(()=>[He(I(v(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,eVe))),128)),j.hasMore||j.loadingMore?(g(),S("button",{key:1,type:"button",class:"mshow-more",disabled:j.loadingMore,onClick:xt(H=>x(j.workspace.id),["stop"])},I(j.loadingMore?v(n)("sidebar.loadingMore"):v(n)("sidebar.showMore",{count:Math.max(0,j.workspace.sessionCount-j.sessions.length)})),9,sVe)):Y("",!0),j.sessions.length>j.initialCount?(g(),S("button",{key:2,type:"button",class:"mshow-more",onClick:xt(H=>m(j.workspace.id),["stop"])},I(h(j.workspace.id)?v(n)("sidebar.showLess"):v(n)("sidebar.showAll",{count:j.sessions.length-j.initialCount})),9,iVe)):Y("",!0)],512),[[_i,!d(j.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),rVe=vt(lVe,[["__scopeId","data-v-4c7bceaf"]]),aVe={class:"group-title"},cVe={class:"srow-main"},uVe={class:"srow-label"},dVe={class:"srow-sub"},fVe={class:"srow read-only"},pVe={class:"srow-main"},hVe={class:"srow-label"},mVe={key:0,class:"srow-sub"},gVe={class:"cache-note"},vVe={class:"srow-main"},yVe={class:"srow-label"},wVe={class:"srow-sub"},kVe=["aria-checked"],bVe={key:0,class:"srow read-only"},_Ve={class:"srow-main"},xVe={class:"srow-label"},SVe={class:"srow-sub"},CVe={class:"goal-actions"},MVe=["aria-checked"],AVe={class:"srow-main"},TVe={class:"srow-label"},EVe={class:"srow-sub"},IVe=["aria-checked"],LVe={class:"srow-main"},$Ve={class:"srow-label"},NVe={class:"srow-sub"},zVe={class:"srow-main"},BVe={class:"srow-label"},RVe={class:"srow read-only"},PVe={class:"srow-main"},FVe={class:"srow-label"},jVe={class:"srow-sub"},OVe=["aria-label"],HVe={class:"group-title"},DVe={class:"srow-main"},VVe={class:"srow-label"},WVe={class:"srow-sub"},qVe={class:"srow read-only pref"},UVe={class:"srow-main"},ZVe={class:"srow-label"},KVe={class:"srow read-only pref"},GVe={class:"srow-main"},YVe={class:"srow-label"},XVe={class:"srow-main"},JVe={class:"srow-label"},QVe={class:"srow-sub"},eWe=["aria-checked"],tWe={class:"srow-main"},nWe={class:"srow-label"},oWe={key:2,class:"srow read-only"},sWe={class:"srow-main"},iWe={class:"srow-label"},lWe={class:"srow-val dim"},rWe={class:"arch-subhead"},aWe={class:"arch-count"},cWe={class:"arch-tools"},uWe={key:0,class:"arch-empty"},dWe={class:"arch-meta"},fWe={class:"arch-name"},pWe={class:"arch-time"},hWe={key:2,class:"arch-empty"},mWe=100,gWe=Je({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goal:{default:null},dynamicWorkflowMode:{type:Boolean},colorScheme:{default:"system"},uiFontSize:{default:14},conversationToc:{type:Boolean},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleWorkflow","toggleGoal","controlGoal","setPermission","setColorScheme","setUiFontSize","setConversationToc","login"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{confirm:i}=z1();function l(Q){s("setColorScheme",Q)}const r=["manual","yolo","auto"],a=B(()=>o.models?.find(Q=>Q.id===o.status?.modelId)),c=B(()=>i6(a.value)),u=B(()=>l6(a.value)),d=B(()=>w9(a.value,o.thinking)),f=B(()=>u.value.includes(d.value)?d.value:""),p=B(()=>u.value.map(Q=>({value:Q,label:rf(Q)}))),h=B(()=>o.planMode===!0),m=B(()=>o.goalMode===!0),k=B(()=>o.goal!==null&&["active","paused","blocked"].includes(o.goal?.status??"")),x=B(()=>{const Q=o.goal?.status;return Q?n(`status.goalStatus${Q[0].toUpperCase()}${Q.slice(1)}`):""});async function y(){await i({title:n("status.goalCancel"),message:n("status.goalCancelConfirm"),confirmLabel:n("status.goalCancelConfirmYes"),cancelLabel:n("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const w=B(()=>b9(o.uiFontSize));function _(Q){const me=oz(Q);me!==void 0&&s("setUiFontSize",me)}const A=B(()=>{const Q=o.status.permission;return Q==="yolo"?"var(--color-warning)":Q==="auto"?"var(--color-danger)":"var(--color-text-muted)"}),P=B(()=>{const Q=o.status.permission,me=n(Q==="yolo"?"mobile.permYoloSub":Q==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${Q} · ${me}`}),z=B(()=>o.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100))):0),L=B(()=>o.status.ctxMax>0?`${ba(o.status.ctxUsed)}/${ba(o.status.ctxMax)}`:n("status.statusNone"));function E(Q){s("setThinking",XN(a.value,Q))}function T(){const Q=r.indexOf(o.status.permission),me=r[(Q+1)%r.length];s("setPermission",me)}function $(){s("pickModel"),s("update:modelValue",!1)}function C(){s("login"),s("update:modelValue",!1)}const j=R1(),H=V("main"),D=V([]),M=V(!1),R=V(!1),O=V(""),U=V("archived-desc");async function Z(){if(!M.value){M.value=!0,R.value=!1;try{const Q=[];let me;for(;;){const xe=await j.loadArchivedSessions({beforeId:me,pageSize:mWe});if(Q.push(...xe.items),!xe.hasMore||xe.items.length===0)break;const Ye=xe.items.at(-1)?.id;if(Ye===void 0)break;me=Ye}D.value=Q,R.value=!0}catch(Q){console.warn("loadAllArchived failed",Q)}finally{M.value=!1}}}function q(){H.value="archived",O.value="",Z()}function te(){H.value="main"}const ee=B(()=>{const Q=O.value.trim().toLowerCase();let me=D.value.filter(xe=>xe.archived===!0);return Q&&(me=me.filter(xe=>xe.title.toLowerCase().includes(Q))),me=me.slice(),U.value==="archived-desc"?me.sort((xe,Ye)=>Ye.updatedAt.localeCompare(xe.updatedAt)):U.value==="created-desc"?me.sort((xe,Ye)=>Ye.createdAt.localeCompare(xe.createdAt)):me.sort((xe,Ye)=>xe.title.localeCompare(Ye.title,"en")),me});async function J(Q){await j.restoreSession(Q)&&(D.value=D.value.filter(xe=>xe.id!==Q))}function se(Q){const me=new Date(Q);if(Number.isNaN(me.getTime()))return Q;const xe=Ye=>String(Ye).padStart(2,"0");return`${me.getFullYear()}-${xe(me.getMonth()+1)}-${xe(me.getDate())} ${xe(me.getHours())}:${xe(me.getMinutes())}`}return Ke(()=>o.modelValue,Q=>{Q||(H.value="main")}),(Q,me)=>(g(),ue(wu,{"model-value":e.modelValue,title:v(n)("mobile.settingsTitle"),"onUpdate:modelValue":me[8]||(me[8]=xe=>s("update:modelValue",xe))},{default:ae(()=>[H.value==="main"?(g(),S(Ce,{key:0},[b("div",aVe,I(v(n)("mobile.groupSession")),1),b("button",{type:"button",class:"srow",onClick:$},[b("span",cVe,[b("span",uVe,I(v(n)("status.statusModel")),1),b("span",dVe,I(e.status.model),1)]),me[9]||(me[9]=b("span",{class:"chev"},"›",-1))]),b("div",fVe,[b("span",pVe,[b("span",hVe,I(v(n)("status.statusThinking")),1),c.value==="unsupported"?(g(),S("span",mVe,I(v(n)("status.modeNotSupported")),1)):Y("",!0)]),u.value.length>1?(g(),ue(di,{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":E},null,8,["model-value","options"])):(g(),S("span",{key:1,class:Be(["srow-val",{dim:d.value==="off"}])},I(d.value==="off"?v(n)("status.planOff"):v(rf)(d.value)),3))]),b("div",gVe,I(v(n)("status.cacheNote")),1),b("button",{type:"button",class:"srow",onClick:me[0]||(me[0]=xe=>s("togglePlan"))},[b("span",vVe,[b("span",yVe,I(v(n)("status.statusPlanMode")),1),b("span",wVe,I(v(n)("mobile.planModeSub")),1)]),b("span",{class:Be(["toggle",{on:h.value}]),role:"switch","aria-checked":h.value},null,10,kVe)]),k.value?(g(),S("div",bVe,[b("span",_Ve,[b("span",xVe,I(v(n)("status.goalLabel")),1),b("span",SVe,I(x.value),1)]),b("span",CVe,[e.goal?.status==="active"?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:me[1]||(me[1]=xe=>s("controlGoal","pause"))},{default:ae(()=>[He(I(v(n)("status.goalPause")),1)]),_:1})):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Nt,{key:1,variant:"secondary",size:"sm",onClick:me[2]||(me[2]=xe=>s("controlGoal","resume"))},{default:ae(()=>[He(I(v(n)("status.goalResume")),1)]),_:1})):Y("",!0),W(Nt,{variant:"ghost",size:"sm",onClick:y},{default:ae(()=>[He(I(v(n)("status.goalCancel")),1)]),_:1})])])):(g(),S("button",{key:1,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:me[3]||(me[3]=xe=>s("toggleGoal"))},[b("span",AVe,[b("span",TVe,I(v(n)("status.goalLabel")),1),b("span",EVe,I(v(n)("mobile.goalModeSub")),1)]),b("span",{class:Be(["toggle",{on:m.value}])},null,2)],8,MVe)),b("button",{type:"button",class:"srow",role:"switch","aria-checked":e.dynamicWorkflowMode,onClick:me[4]||(me[4]=xe=>s("toggleWorkflow"))},[b("span",LVe,[b("span",$Ve,I(v(n)("status.statusDynamicWorkflowMode")),1),b("span",NVe,I(v(n)("mobile.workflowModeSub")),1)]),b("span",{class:Be(["toggle",{on:e.dynamicWorkflowMode}])},null,2)],8,IVe),b("button",{type:"button",class:"srow",onClick:T},[b("span",zVe,[b("span",BVe,I(v(n)("status.statusPermission")),1),b("span",{class:"srow-sub",style:Gt({color:A.value})},I(P.value),5)]),me[10]||(me[10]=b("span",{class:"chev"},"›",-1))]),b("div",RVe,[b("span",PVe,[b("span",FVe,I(v(n)("status.statusContext")),1),b("span",jVe,I(L.value),1)]),b("span",{class:"ctx-meter","aria-label":L.value},[b("i",{style:Gt({width:z.value+"%"})},null,4)],8,OVe)]),b("div",HVe,I(v(n)("mobile.groupApp")),1),b("button",{type:"button",class:"srow",onClick:q},[b("span",DVe,[b("span",VVe,I(v(n)("mobile.archivedSessions")),1),b("span",WVe,I(v(n)("mobile.archivedSessionsSub")),1)]),me[11]||(me[11]=b("span",{class:"chev"},"›",-1))]),b("div",qVe,[b("span",UVe,[b("span",ZVe,I(v(n)("theme.colorSchemeLabel")),1)]),W(di,{"model-value":e.colorScheme??"system",options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":l},null,8,["model-value","options"])]),b("div",KVe,[b("span",GVe,[b("span",YVe,I(v(n)("settings.uiFontSize")),1)]),W(di,{"model-value":w.value,options:v(QN),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":_},null,8,["model-value","options","aria-label"])]),b("button",{type:"button",class:"srow",onClick:me[5]||(me[5]=xe=>s("setConversationToc",!e.conversationToc))},[b("span",XVe,[b("span",JVe,I(v(n)("settings.conversationToc")),1),b("span",QVe,I(v(n)("settings.conversationTocHint")),1)]),b("span",{class:Be(["toggle",{on:e.conversationToc}]),role:"switch","aria-checked":e.conversationToc},null,10,eWe)]),b("button",{type:"button",class:"srow acct in",onClick:C},[b("span",tWe,[b("span",nWe,I(v(n)("settings.manageProviders")),1)])]),e.serverVersion?(g(),S("div",oWe,[b("span",sWe,[b("span",iWe,I(v(n)("settings.serverVersion")),1)]),b("span",lWe,I(e.serverVersion),1)])):Y("",!0)],64)):(g(),S(Ce,{key:1},[b("div",rWe,[b("button",{type:"button",class:"arch-back",onClick:te},[me[12]||(me[12]=b("span",{class:"chev back"},"‹",-1)),He(" "+I(v(n)("mobile.archivedBack")),1)]),b("span",aWe,I(v(n)("mobile.sessionCount",{n:ee.value.length})),1)]),b("div",cWe,[W(us,{class:"arch-search-input","model-value":O.value,size:"sm",placeholder:v(n)("settings.archivedSearch"),"onUpdate:modelValue":me[6]||(me[6]=xe=>O.value=xe)},null,8,["model-value","placeholder"]),W(di,{size:"sm","model-value":U.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":me[7]||(me[7]=xe=>U.value=xe)},null,8,["model-value","options"])]),M.value?(g(),S("div",uWe,I(v(n)("settings.archivedLoadingAll")),1)):ee.value.length>0?(g(!0),S(Ce,{key:1},rt(ee.value,xe=>(g(),S("div",{key:xe.id,class:"arch-row"},[b("div",dWe,[b("div",fWe,I(xe.title),1),b("div",pWe,I(v(n)("settings.archivedAt",{time:se(xe.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Ye=>J(xe.id)},{default:ae(()=>[He(I(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(g(),S("div",hWe,I(D.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title"]))}}),vWe=vt(gWe,[["__scopeId","data-v-bcda0873"]]),yWe=["role","aria-modal","aria-label"],wWe={class:"wiz-rail"},kWe={class:"rail-inner"},bWe={class:"eyebrow-pill"},_We={class:"wiz-title"},xWe={class:"wiz-sub"},SWe={class:"pref-group"},CWe={class:"pref-label"},MWe={class:"theme-cards"},AWe=["onClick"],TWe={class:"opt-label"},EWe={class:"pref-group"},IWe={class:"pref-label"},LWe={class:"accent-cards"},$We=["onClick"],NWe={class:"opt-label"},zWe={key:1,class:"wiz-actions"},BWe={key:2,class:"wiz-hint"},RWe={key:0,class:"wiz-hero","aria-hidden":"true"},PWe={class:"hero-inner"},FWe={class:"hero-tagline"},jWe={class:"hero-sub"},OWe={class:"frost-stage"},HWe={class:"frost-card"},DWe={class:"frost-card"},VWe=Je({__name:"Onboarding",props:{embedded:{type:Boolean,default:!1}},emits:["complete","skip"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{colorScheme:s,accent:i,setColorScheme:l,setAccent:r}=C9(),a=[{value:"system",label:o("theme.system")},{value:"light",label:o("theme.light")},{value:"dark",label:o("theme.dark")}],c=[{value:"blue",label:o("theme.accentBlue")},{value:"mono",label:o("theme.accentBlack")}];return(u,d)=>(g(),S("div",{class:Be(["wizard",{"is-embedded":e.embedded}]),role:e.embedded?void 0:"dialog","aria-modal":e.embedded?void 0:"true","aria-label":e.embedded?void 0:v(o)("onboarding.title")},[b("div",wWe,[b("div",kWe,[e.embedded?Y("",!0):(g(),S(Ce,{key:0},[b("span",bWe,I(v(o)("onboarding.eyebrow")),1),W(df,{class:"brand-mark",size:"lg",animated:!1,label:"Pythinker Code"}),b("h1",_We,I(v(o)("onboarding.title")),1),b("p",xWe,I(v(o)("onboarding.subtitle")),1)],64)),b("div",SWe,[b("div",CWe,I(v(o)("theme.colorSchemeLabel")),1),b("div",MWe,[(g(),S(Ce,null,rt(a,f=>b("button",{key:f.value,type:"button",class:Be(["opt-card theme-card",{selected:v(s)===f.value}]),onClick:p=>v(l)(f.value)},[b("span",{class:Be(["theme-preview",`theme-preview--${f.value}`]),"aria-hidden":"true"},[f.value==="system"?(g(),S(Ce,{key:0},[d[2]||(d[2]=L0('',2))],64)):(g(),S(Ce,{key:1},[d[3]||(d[3]=b("span",{class:"theme-side"},null,-1)),d[4]||(d[4]=b("span",{class:"theme-lines"},[b("span"),b("span"),b("span")],-1))],64))],2),b("span",TWe,I(f.label),1)],10,AWe)),64))])]),b("div",EWe,[b("div",IWe,I(v(o)("theme.accentLabel")),1),b("div",LWe,[(g(),S(Ce,null,rt(c,f=>b("button",{key:f.value,type:"button",class:Be(["opt-card accent-card",{selected:v(i)===f.value}]),onClick:p=>v(r)(f.value)},[b("span",{class:Be(["opt-radio",{on:v(i)===f.value}])},null,2),b("span",{class:Be(["accent-swatch",`accent-swatch--${f.value}`]),"aria-hidden":"true"},null,2),b("span",NWe,I(f.label),1)],10,$We)),64))])]),e.embedded?Y("",!0):(g(),S("div",zWe,[W(Nt,{variant:"primary",size:"lg",class:"wiz-action","data-testid":"onboarding-complete",onClick:d[0]||(d[0]=f=>n("complete"))},{default:ae(()=>[b("span",null,I(v(o)("onboarding.start")),1),W(Ee,{name:"arrow-right",size:"sm"})]),_:1}),W(Nt,{variant:"secondary",size:"lg",class:"wiz-action","data-testid":"onboarding-skip",onClick:d[1]||(d[1]=f=>n("skip"))},{default:ae(()=>[b("span",null,I(v(o)("onboarding.skip")),1),W(Ee,{name:"arrow-right",size:"sm"})]),_:1})])),e.embedded?Y("",!0):(g(),S("p",BWe,I(v(o)("onboarding.hint")),1))])]),e.embedded?Y("",!0):(g(),S("aside",RWe,[d[7]||(d[7]=b("div",{class:"hero-ambient"},[b("span",{class:"orb orb-a"}),b("span",{class:"orb orb-b"}),b("span",{class:"orb orb-c"})],-1)),b("div",PWe,[W(df,{size:"hero",animated:!1,label:""}),b("p",FWe,I(v(o)("onboarding.heroTitle")),1),b("p",jWe,I(v(o)("onboarding.heroSub")),1),b("div",OWe,[b("figure",HWe,[d[5]||(d[5]=L0('',2)),b("figcaption",null,I(v(o)("onboarding.platformMac")),1)]),b("figure",DWe,[d[6]||(d[6]=L0('',2)),b("figcaption",null,I(v(o)("onboarding.platformWindows")),1)])])])]))],10,yWe))}}),dB=vt(VWe,[["__scopeId","data-v-2c24b7cb"]]),WWe=2e3;function qWe(e){const t=V("idle"),n=V(void 0),o=V(void 0),s=V(!1),i=V(!0),l=V(""),r=B(()=>t.value==="starting"||t.value==="exchanging"||t.value==="loading_models");let a,c,u=!1,d=!1;function f(){return t.value==="waiting_for_browser"||t.value==="waiting_for_code"}function p(){a!==void 0&&(clearInterval(a),a=void 0)}function h(){n.value=void 0,o.value=void 0,s.value=!1}function m(){c?.close(),c=void 0}function k(L){u||(l.value=L,t.value="failed",p(),m(),h())}async function x(L,E){if(u||n.value!==L||!f()&&t.value!=="exchanging"||E.state==="pending")return;if(p(),E.state==="failed"){k(E.message??"");return}if(E.state==="cancelled"){t.value="cancelled",m(),h();return}c=void 0,t.value="loading_models";let T=!0;try{T=await e?.()??!0}catch($){k($ instanceof Error?$.message:String($));return}finally{h()}u||(T?t.value="connected":k(""))}async function y(){if(u||d||!f())return;const L=n.value;if(L!==void 0){d=!0;try{await x(L,await Ct().getCodexLoginStatus(L))}catch{}finally{d=!1}}}function w(){y()}function _(){document.visibilityState==="visible"&&y()}async function A(){if(u||r.value||f())return;t.value="starting",l.value="",h();let L=null;try{L=typeof window>"u"?null:window.open("about:blank","_blank"),L!==null&&(L.opener=null,c=L)}catch{L?.close(),L=null}s.value=L===null;try{const E=Ct(),T=await E.startCodexLogin();if(u){m(),E.cancelCodexLogin(T.loginId).catch(()=>{});return}if(n.value=T.loginId,o.value=T.authorizeUrl,i.value=T.loopback,L!==null)try{L.location.href=T.authorizeUrl}catch{m(),s.value=!0}t.value=T.loopback?"waiting_for_browser":"waiting_for_code",p(),a=setInterval(()=>void y(),WWe)}catch(E){m(),k(E instanceof Error?E.message:String(E))}}async function P(L){const E=n.value;if(u||r.value||!f()||E===void 0)return;const T=t.value;t.value="exchanging",l.value="";try{await x(E,await Ct().submitCodexLoginRedirect(E,L)),!u&&t.value==="exchanging"&&(t.value=T)}catch($){u||(l.value=$ instanceof Error?$.message:String($),t.value=T)}}async function z(){const L=n.value;if(p(),m(),h(),t.value="cancelled",l.value="",L!==void 0)try{await Ct().cancelCodexLogin(L)}catch{}}return In(()=>{window.addEventListener("focus",w),document.addEventListener("visibilitychange",_)}),En(()=>{u=!0,window.removeEventListener("focus",w),document.removeEventListener("visibilitychange",_),p(),m();const L=n.value;L!==void 0&&f()&&Ct().cancelCodexLogin(L).catch(()=>{})}),{phase:zl(t),busy:r,loginId:zl(n),authorizeUrl:zl(o),popupBlocked:zl(s),loopback:zl(i),error:zl(l),start:A,submitRedirect:P,cancel:z}}const UWe={class:"codex-signin"},ZWe={key:0,class:"codex-signin__denied",role:"status"},KWe={key:1,class:"codex-signin__ok",role:"status"},GWe={class:"codex-signin__status",role:"status"},YWe={key:0,class:"codex-signin__hint"},XWe=["href"],JWe={class:"codex-signin__hint"},QWe={key:2,class:"codex-signin__error",role:"alert"},eqe={class:"codex-signin__actions"},tqe=Je({__name:"CodexSignIn",emits:["connected"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=V(""),l=qWe(async()=>{await s.refreshRuntimeState();const a=s.authReady.value;return a&&n("connected"),a});async function r(){const a=i.value.trim();a!==""&&(await l.submitRedirect(a),i.value="")}return(a,c)=>(g(),S("div",UWe,[v(l).phase.value==="idle"||v(l).phase.value==="cancelled"?(g(),S(Ce,{key:0},[v(l).phase.value==="cancelled"?(g(),S("p",ZWe,I(v(o)("login.deniedTitle")),1)):Y("",!0),W(Nt,{variant:"primary","data-testid":"codex-signin-start",onClick:c[0]||(c[0]=u=>v(l).start())},{default:ae(()=>[W(Ee,{name:"log-in",size:"sm"}),b("span",null,I(v(o)("codexLogin.signIn")),1)]),_:1})],64)):v(l).phase.value==="connected"?(g(),S("p",KWe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,I(v(o)("codexLogin.connected")),1)])):(g(),S(Ce,{key:2},[b("p",GWe,[v(l).busy.value||v(l).phase.value!=="failed"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),b("span",null,I(v(o)(`codexLogin.phase.${v(l).phase.value}`)),1)]),v(l).authorizeUrl.value?(g(),S("p",YWe,[He(I(v(o)("codexLogin.openLinkHint"))+" ",1),b("a",{href:v(l).authorizeUrl.value,target:"_blank",rel:"noreferrer noopener"},I(v(o)("codexLogin.openLink")),9,XWe)])):Y("",!0),v(l).phase.value==="waiting_for_code"||v(l).phase.value==="exchanging"?(g(),S("form",{key:1,class:"codex-signin__paste",onSubmit:xt(r,["prevent"])},[b("p",JWe,I(v(o)("codexLogin.pasteHint")),1),W(Ir,{label:v(o)("codexLogin.pasteLabel")},{default:ae(()=>[W(us,{modelValue:i.value,"onUpdate:modelValue":c[1]||(c[1]=u=>i.value=u),placeholder:v(o)("codexLogin.pastePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),W(Nt,{type:"submit",variant:"primary",loading:v(l).busy.value},{default:ae(()=>[He(I(v(o)("codexLogin.submit")),1)]),_:1},8,["loading"])],32)):Y("",!0),v(l).error.value?(g(),S("p",QWe,I(v(o)("codexLogin.failed",{message:v(l).error.value})),1)):Y("",!0),b("div",eqe,[v(l).phase.value==="failed"?(g(),ue(Nt,{key:0,variant:"primary",onClick:c[2]||(c[2]=u=>v(l).start())},{default:ae(()=>[He(I(v(o)("codexLogin.retry")),1)]),_:1})):(g(),ue(Nt,{key:1,variant:"secondary",onClick:c[3]||(c[3]=u=>v(l).cancel())},{default:ae(()=>[He(I(v(o)("codexLogin.cancel")),1)]),_:1}))])],64))]))}}),nqe=vt(tqe,[["__scopeId","data-v-3bd16f58"]]),oqe=["aria-label"],sqe={class:"first-run__panel"},iqe={class:"first-run__steps"},lqe={class:"first-run__dot"},rqe={key:0,class:"first-run__body"},aqe={class:"first-run__sub"},cqe={key:0,class:"first-run__options"},uqe={class:"first-run__option-main"},dqe={class:"first-run__option-name"},fqe={class:"first-run__option-desc"},pqe={class:"first-run__badge"},hqe={class:"first-run__option-main"},mqe={class:"first-run__option-name"},gqe={class:"first-run__option-desc"},vqe={class:"first-run__option-main"},yqe={class:"first-run__option-name"},wqe={class:"first-run__option-desc"},kqe={key:1,class:"first-run__route"},bqe={class:"first-run__actions"},_qe={key:2,class:"first-run__skip-hint"},xqe={key:1,class:"first-run__body"},Sqe={class:"first-run__sub"},Cqe={key:0,class:"first-run__empty"},Mqe={key:1,class:"first-run__models"},Aqe=["data-testid","onClick"],Tqe={class:"first-run__model-id"},Eqe={key:0,class:"first-run__badge"},Iqe={class:"first-run__model-ctx"},Lqe={class:"first-run__actions"},$qe={key:2,class:"first-run__body"},Nqe={class:"first-run__sub"},zqe={class:"first-run__ready"},Bqe={class:"first-run__actions"},Rqe=Je({__name:"FirstRun",emits:["complete"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=V("connect"),l=V(null),r=V(null),a=V(!1),c=V(!1),u=["connect","model","appearance"],d=B(()=>u.indexOf(i.value)),f=B(()=>(s.models.value??[]).filter(E=>E.capabilities===void 0||E.capabilities.length===0||E.capabilities.some(T=>T.trim().toLowerCase()==="tool_use"))),p=B(()=>s.defaultModel.value??void 0),h=B(()=>{const E=p.value;return f.value.toSorted((T,$)=>T.id===E?-1:$.id===E?1:$.maxContextSize-T.maxContextSize||T.id.localeCompare($.id))}),m=B(()=>a.value?h.value:h.value.slice(0,5)),k=B(()=>(s.providers.value??[])[0]?.id??""),x=B(()=>s.authReady.value&&f.value.length>0),y=B(()=>r.value!==null);Ke([p,f],()=>{r.value===null&&(r.value=p.value??f.value[0]?.id??null)},{immediate:!0});function w(){x.value&&(i.value="model")}async function _(){const E=r.value;if(!(E===null||c.value)){c.value=!0;try{E!==s.defaultModel.value&&await s.updateConfig({defaultModel:E}),await s.refreshRuntimeState(),s.authReady.value&&(i.value="appearance")}finally{c.value=!1}}}function A(){s.setOnboarded(!0),n("complete")}function P(){A()}function z(E){l.value=E}async function L(){await s.refreshRuntimeState(),x.value&&w()}return(E,T)=>(g(),S("div",{class:"first-run",role:"dialog","aria-modal":"true","aria-label":v(o)("firstRun.connect.title")},[b("div",sqe,[b("ol",iqe,[(g(),S(Ce,null,rt(u,($,C)=>b("li",{key:$,class:Be(["first-run__step",{"is-current":C===d.value,"is-done":Cz("codex"))},[b("span",uqe,[b("span",dqe,I(v(o)("firstRun.connect.codexName")),1),b("span",fqe,I(v(o)("firstRun.connect.codexDesc")),1)]),b("span",pqe,I(v(o)("firstRun.connect.codexBadge")),1)]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-catalog",onClick:T[1]||(T[1]=$=>z("catalog"))},[b("span",hqe,[b("span",mqe,I(v(o)("firstRun.connect.catalogName")),1),b("span",gqe,I(v(o)("firstRun.connect.catalogDesc")),1)]),W(Ee,{name:"chevron-right",size:"sm"})]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-manual",onClick:T[2]||(T[2]=$=>z("manual"))},[b("span",vqe,[b("span",yqe,I(v(o)("firstRun.connect.manualName")),1),b("span",wqe,I(v(o)("firstRun.connect.manualDesc")),1)]),W(Ee,{name:"chevron-right",size:"sm"})])])):(g(),S("div",kqe,[l.value==="codex"?(g(),ue(nqe,{key:0,onConnected:L})):(g(),ue(cB,{key:1,config:v(s).config.value,"initial-source":l.value==="manual"?"manual":"catalog",onAdded:L,onCancel:T[3]||(T[3]=$=>l.value=null)},null,8,["config","initial-source"])),W(Nt,{variant:"ghost",size:"sm",onClick:T[4]||(T[4]=$=>l.value=null)},{default:ae(()=>[He(I(v(o)("firstRun.connect.back")),1)]),_:1})])),b("div",bqe,[W(Nt,{variant:"ghost","data-testid":"first-run-skip",onClick:P},{default:ae(()=>[He(I(v(o)("firstRun.connect.skip")),1)]),_:1}),T[8]||(T[8]=b("span",{class:"first-run__spacer"},null,-1)),x.value?(g(),ue(Nt,{key:0,variant:"primary","data-testid":"first-run-connect-continue",onClick:w},{default:ae(()=>[He(I(v(o)("firstRun.continue")),1)]),_:1})):Y("",!0)]),l.value===null?(g(),S("p",_qe,I(v(o)("firstRun.connect.skipHint")),1)):Y("",!0)])):i.value==="model"?(g(),S("section",xqe,[b("h1",null,I(v(o)("firstRun.model.title")),1),b("p",Sqe,I(v(o)("firstRun.model.connected",{provider:k.value,count:f.value.length},f.value.length))+" "+I(v(o)("firstRun.model.subtitle")),1),f.value.length===0?(g(),S("p",Cqe,I(v(o)("firstRun.model.none")),1)):(g(),S("ul",Mqe,[(g(!0),S(Ce,null,rt(m.value,$=>(g(),S("li",{key:$.id},[b("button",{type:"button",class:Be(["first-run__model",{"is-selected":r.value===$.id}]),"data-testid":`first-run-model-${$.id}`,onClick:C=>r.value=$.id},[T[9]||(T[9]=b("span",{class:"first-run__radio","aria-hidden":"true"},null,-1)),b("span",Tqe,I($.id),1),$.id===p.value?(g(),S("span",Eqe,I(v(o)("firstRun.model.recommended")),1)):Y("",!0),b("span",Iqe,I(Math.round($.maxContextSize/1e3))+"K",1)],10,Aqe)]))),128))])),h.value.length>5?(g(),ue(Nt,{key:2,variant:"ghost",size:"sm",onClick:T[5]||(T[5]=$=>a.value=!a.value)},{default:ae(()=>[He(I(a.value?v(o)("firstRun.model.showFewer"):v(o)("firstRun.model.showAll",{count:h.value.length})),1)]),_:1})):Y("",!0),b("div",Lqe,[W(Nt,{variant:"secondary",onClick:T[6]||(T[6]=$=>i.value="connect")},{default:ae(()=>[He(I(v(o)("firstRun.back")),1)]),_:1}),T[10]||(T[10]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary",loading:c.value,disabled:!y.value,"data-testid":"first-run-model-continue",onClick:_},{default:ae(()=>[He(I(v(o)("firstRun.continue")),1)]),_:1},8,["loading","disabled"])])])):(g(),S("section",$qe,[b("h1",null,I(v(o)("firstRun.appearance.title")),1),b("p",Nqe,I(v(o)("firstRun.appearance.subtitle")),1),W(dB,{embedded:"",onComplete:A,onSkip:A}),b("p",zqe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,I(v(o)("firstRun.appearance.ready",{model:r.value??""})),1)]),b("div",Bqe,[W(Nt,{variant:"secondary",onClick:T[7]||(T[7]=$=>i.value="model")},{default:ae(()=>[He(I(v(o)("firstRun.back")),1)]),_:1}),T[11]||(T[11]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary","data-testid":"first-run-finish",onClick:A},{default:ae(()=>[He(I(v(o)("firstRun.appearance.finish")),1)]),_:1})])]))])],8,oqe))}}),Pqe=vt(Rqe,[["__scopeId","data-v-23e77d0d"]]),Fqe={class:"recovery"},jqe={class:"recovery__inner"},Oqe={class:"recovery__mark","aria-hidden":"true"},Hqe={class:"recovery__copy"},Dqe={class:"recovery__options"},Vqe={class:"recovery__option-name"},Wqe={class:"recovery__option-desc"},qqe={class:"recovery__option-name"},Uqe={class:"recovery__option-desc"},Zqe={class:"recovery__actions"},Kqe=Je({__name:"Recovery",emits:["openProviders","dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=B(()=>s.providers.value??[]),l=B(()=>i.value[0]),r=B(()=>i.value.length===0?"noProvider":i.value.some(u=>u.status==="connected")?"noModel":"credential"),a=B(()=>r.value==="noProvider"?o("recovery.noProvider"):o(`recovery.${r.value}`,{provider:l.value?.id??""}));async function c(){await s.refreshRuntimeState()}return(u,d)=>(g(),S("section",Fqe,[b("div",jqe,[b("span",Oqe,[W(Ee,{name:"alert-triangle",size:"md"})]),b("div",Hqe,[b("h1",null,I(v(o)("recovery.title")),1),b("p",null,I(a.value),1)]),b("div",Dqe,[r.value!=="noProvider"?(g(),S("button",{key:0,type:"button",class:"recovery__option is-primary","data-testid":"recovery-open-providers",onClick:d[0]||(d[0]=f=>n("openProviders"))},[b("span",Vqe,I(v(o)("recovery.fixProvider")),1),b("span",Wqe,I(v(o)("recovery.fixProviderDesc")),1)])):Y("",!0),b("button",{type:"button",class:Be(["recovery__option",{"is-primary":r.value==="noProvider"}]),"data-testid":"recovery-add-provider",onClick:d[1]||(d[1]=f=>n("openProviders"))},[b("span",qqe,I(v(o)("recovery.addProvider")),1),b("span",Uqe,I(v(o)("recovery.addProviderDesc")),1)],2)]),b("div",Zqe,[W(Nt,{variant:"secondary","data-testid":"recovery-retry",onClick:c},{default:ae(()=>[He(I(v(o)("recovery.retry")),1)]),_:1}),W(Nt,{variant:"ghost","data-testid":"recovery-dismiss",onClick:d[2]||(d[2]=f=>n("dismiss"))},{default:ae(()=>[He(I(v(o)("recovery.dismiss")),1)]),_:1})])])]))}}),Gqe=vt(Kqe,[["__scopeId","data-v-68311778"]]),Yqe="/logo.png",Xqe=["aria-label"],Jqe={class:"gload-box"},Qqe={class:"gload-text"},eUe={key:0,class:"gload-issue"},tUe={class:"gload-issue-detail"},nUe=Je({__name:"GlobalLoading",props:{issue:{}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",{class:"gload",role:"status","aria-label":v(t)("app.connecting")},[b("div",Jqe,[o[0]||(o[0]=b("img",{class:"gload-logo",src:Yqe,alt:"Pythinker",width:"120",height:"120"},null,-1)),W(Zo,{size:"md",label:v(t)("app.connecting")},null,8,["label"]),b("div",Qqe,I(v(t)("app.connecting")),1),e.issue?(g(),S("div",eUe,[b("div",null,I(v(t)("app.connectRetrying")),1),b("div",tUe,I(e.issue),1)])):Y("",!0)])],8,Xqe))}}),oUe=vt(nUe,[["__scopeId","data-v-2468172e"]]),sUe={class:"kap-root"},iUe={class:"kap-head"},lUe={class:"kap-count"},rUe={class:"kap-head-actions"},aUe={class:"kap-filters"},cUe=["value"],uUe={class:"kap-check"},dUe={class:"kap-check"},fUe={class:"kap-view-toggle",role:"group"},pUe={key:0,class:"kap-empty"},hUe=["onClick"],mUe={class:"kap-ts"},gUe={class:"kap-label"},vUe={key:0,class:"kap-detail"},yUe={class:"kap-detail-actions"},wUe=["onClick"],kUe={key:1,class:"kap-agg"},bUe={class:"mono"},_Ue={class:"mono"},xUe={class:"num"},SUe={class:"num"},CUe={key:0},MUe={class:"mono"},AUe={class:"num"},TUe={class:"num"},EUe={key:0},IUe=Je({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=V("all"),s=V(""),i=V(""),l=V(!1),r=V("timeline"),a=B(()=>(i9.value,[...yge()])),c=B(()=>{const E=new Set;for(const T of a.value)T.sessionId&&E.add(T.sessionId);return[...E].sort()});function u(E){return E.kind==="rest:error"||E.code!==void 0&&E.code!==0||E.eventType==="error"||E.eventType==="parse-error"}const d=B(()=>{const E=s.value.trim().toLowerCase();return a.value.filter(T=>!(o.value!=="all"&&T.source!==o.value||i.value&&T.sessionId!==i.value||l.value&&!u(T)||E&&!`${T.label} ${T.kind} ${T.eventType??""} ${T.sessionId??""} ${T.requestId??""}`.toLowerCase().includes(E)))}),f=B(()=>{const E=new Map;for(const T of d.value){if(T.kind!=="ws:in"&&T.kind!=="ws:out")continue;const $=T.kind==="ws:in"?"←":"→",C=`${$} ${T.eventType??"?"} @ ${T.sessionId??"-"}`,j=E.get(C)??{key:C,sessionId:T.sessionId??"-",eventType:T.eventType??"?",dir:$,count:0};j.count++,T.seq!==void 0&&(j.lastSeq=T.seq),E.set(C,j)}return[...E.values()].sort((T,$)=>$.count-T.count)}),p=B(()=>{const E=new Map;for(const T of d.value){if(T.source!=="rest"||T.kind==="rest:request")continue;const $=`${T.method??"?"} ${T.path??"?"}`,C=E.get($)??{count:0,errors:0,totalMs:0,timed:0};C.count++,u(T)&&C.errors++,T.durationMs!==void 0&&(C.totalMs+=T.durationMs,C.timed++),E.set($,C)}return[...E.entries()].map(([T,$])=>({key:T,count:$.count,errors:$.errors,avgMs:$.timed>0?Math.round($.totalMs/$.timed):0})).sort((T,$)=>$.count-T.count)}),h=V(null),m=V(!0),k=V(null),x=V(null);Ke(()=>d.value.length,async()=>{if(!m.value||r.value!=="timeline")return;await yt();const E=k.value;E&&(E.scrollTop=E.scrollHeight)});function y(E){h.value=h.value===E?null:E}function w(E){const T=new Date(E),$=(C,j=2)=>String(C).padStart(j,"0");return`${$(T.getHours())}:${$(T.getMinutes())}:${$(T.getSeconds())}.${$(T.getMilliseconds(),3)}`}function _(E){return JSON.stringify(E,null,2)}async function A(E){await fs(_(E))&&(x.value=E.id,setTimeout(()=>{x.value===E.id&&(x.value=null)},1500))}function P(){EN(d.value)}function z(E){return u(E)||E.source==="client"?"b-err":E.source==="rest"?"b-rest":E.kind==="ws:lifecycle"?"b-life":E.kind==="ws:out"?"b-out":"b-in"}function L(E){return E.source==="rest"?"REST":E.source==="client"?"APP":"WS"}return(E,T)=>(g(),S("section",sUe,[b("header",iUe,[T[11]||(T[11]=b("strong",null,"KAP debug",-1)),b("span",lUe,I(d.value.length)+"/"+I(a.value.length),1),b("div",rUe,[b("button",{type:"button",class:Be({on:v(e2)}),onClick:T[0]||(T[0]=$=>e2.value=!v(e2))},I(v(e2)?"resume":"pause"),3),b("button",{type:"button",onClick:T[1]||(T[1]=$=>v(wge)())},"clear"),b("button",{type:"button",onClick:T[2]||(T[2]=$=>P())},"export jsonl"),W(Cn,{text:"Close window"},{default:ae(()=>[b("button",{type:"button",onClick:T[3]||(T[3]=$=>n("close"))},"✕")]),_:1})])]),b("div",aUe,[Jn(b("select",{"onUpdate:modelValue":T[4]||(T[4]=$=>o.value=$),"aria-label":"Source filter"},[...T[12]||(T[12]=[b("option",{value:"all"},"rest + ws + app",-1),b("option",{value:"rest"},"rest",-1),b("option",{value:"ws"},"ws",-1),b("option",{value:"client"},"app errors",-1)])],512),[[b8,o.value]]),Jn(b("select",{"onUpdate:modelValue":T[5]||(T[5]=$=>i.value=$),"aria-label":"Session filter"},[T[13]||(T[13]=b("option",{value:""},"all sessions",-1)),(g(!0),S(Ce,null,rt(c.value,$=>(g(),S("option",{key:$,value:$},I($),9,cUe))),128))],512),[[b8,i.value]]),Jn(b("input",{"onUpdate:modelValue":T[6]||(T[6]=$=>s.value=$),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[js,s.value]]),b("label",uUe,[Jn(b("input",{"onUpdate:modelValue":T[7]||(T[7]=$=>l.value=$),type:"checkbox"},null,512),[[n5,l.value]]),T[14]||(T[14]=He(" errors",-1))]),b("label",dUe,[Jn(b("input",{"onUpdate:modelValue":T[8]||(T[8]=$=>m.value=$),type:"checkbox"},null,512),[[n5,m.value]]),T[15]||(T[15]=He(" follow",-1))]),b("div",fUe,[b("button",{type:"button",class:Be({on:r.value==="timeline"}),onClick:T[9]||(T[9]=$=>r.value="timeline")},"timeline",2),b("button",{type:"button",class:Be({on:r.value==="aggregate"}),onClick:T[10]||(T[10]=$=>r.value="aggregate")},"aggregate",2)])]),r.value==="timeline"?(g(),S("div",{key:0,ref_key:"listRef",ref:k,class:"kap-list"},[d.value.length===0?(g(),S("div",pUe," No trace entries yet. REST calls and WS frames will appear here. ")):Y("",!0),(g(!0),S(Ce,null,rt(d.value,$=>(g(),S("div",{key:$.id,class:"kap-row-wrap"},[b("button",{type:"button",class:Be(["kap-row",{expanded:h.value===$.id}]),onClick:C=>y($.id)},[b("span",mUe,I(w($.ts)),1),b("span",{class:Be(["kap-badge",z($)])},I(L($)),3),b("span",gUe,I($.label),1)],10,hUe),h.value===$.id?(g(),S("div",vUe,[b("div",yUe,[b("button",{type:"button",onClick:C=>A($)},I(x.value===$.id?"copied ✓":"copy json"),9,wUe)]),b("pre",null,I(_($)),1)])):Y("",!0)]))),128))],512)):(g(),S("div",kUe,[T[20]||(T[20]=b("h4",null,"WS frames by session / type",-1)),b("table",null,[T[17]||(T[17]=b("thead",null,[b("tr",null,[b("th",null,"dir"),b("th",null,"type"),b("th",null,"session"),b("th",null,"count"),b("th",null,"last seq")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,rt(f.value,$=>(g(),S("tr",{key:$.key},[b("td",null,I($.dir),1),b("td",bUe,I($.eventType),1),b("td",_Ue,I($.sessionId),1),b("td",xUe,I($.count),1),b("td",SUe,I($.lastSeq??"—"),1)]))),128)),f.value.length===0?(g(),S("tr",CUe,[...T[16]||(T[16]=[b("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):Y("",!0)])]),T[21]||(T[21]=b("h4",null,"REST by endpoint",-1)),b("table",null,[T[19]||(T[19]=b("thead",null,[b("tr",null,[b("th",null,"endpoint"),b("th",null,"count"),b("th",null,"errors"),b("th",null,"avg ms")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,rt(p.value,$=>(g(),S("tr",{key:$.key},[b("td",MUe,I($.key),1),b("td",AUe,I($.count),1),b("td",{class:Be(["num",{err:$.errors>0}])},I($.errors),3),b("td",TUe,I($.avgMs),1)]))),128)),p.value.length===0?(g(),S("tr",EUe,[...T[18]||(T[18]=[b("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):Y("",!0)])])]))]))}}),LUe=vt(IUe,[["__scopeId","data-v-7bab00af"]]),$Ue=Je({__name:"DebugPanel",setup(e){const t=V(!1);let n=null,o=null,s=null;const i=["data-color-scheme","data-accent"];function l(u){const d=document.documentElement,f=u.documentElement;for(const p of i){const h=d.getAttribute(p);h!==null?f.setAttribute(p,h):f.removeAttribute(p)}}function r(u){const d=u.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const h of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(h.cloneNode(!0));l(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function c(){if(n&&!n.closed){n.focus();return}const u=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!u)return;n=u;const d=r(u),f=o5(LUe,{onClose:()=>u.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&l(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),u.addEventListener("pagehide",a),u.addEventListener("beforeunload",a)}return In(()=>{c()}),vo(()=>{n&&!n.closed&&n.close(),a()}),(u,d)=>(g(),ue(Cn,{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:ae(()=>[b("button",{class:"kap-fab",type:"button",onClick:c}," KAP ")]),_:1},8,["text"]))}}),NUe=vt($Ue,[["__scopeId","data-v-992ae84c"]]);function zUe({client:e}){const t=B(()=>e.appState.value==="first-run"||e.appState.value==="recovery"),n="/login",o=V(null);function s(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function i(l){typeof window>"u"||window.history.replaceState(window.history.state,"",l)}return Ke(t,l=>{if(!(typeof window>"u")){if(l){window.location.pathname!==n&&(o.value=s(),i(n));return}window.location.pathname===n&&(i(o.value??"/"),o.value=null)}},{immediate:!0}),{showAuthGate:t}}function BUe({running:e,showAuthGate:t}){const{t:n}=$t(),o=B(()=>{const s=e.value?`${af[0]} `:"";return t.value?`${s}${n("app.authPageTitle")} - Pythinker Code Web`:`${s}Pythinker Code Web`});sA(()=>{typeof document<"u"&&(document.title=o.value)})}function RUe(e,t,n){const o=new Map(e.attachments.map(a=>[a.attachmentId,a])),s=new Map(e.tasks.map(a=>[a.taskId,a])),i=e.items.find(a=>a.kind==="turn"),l=e.items.findLast(a=>a.kind==="turn"),r=e.items.flatMap(a=>a.kind==="turn"?PUe(a,o,s,{...n,startedAt:a.turnId===i?.turnId?t?.createdAt:void 0,endedAt:a.turnId===l?.turnId?t?.disposedAt:void 0}):[]);return M2(r,[],a=>n.getFileUrl(a),e.meta.activity==="turn")}function PUe(e,t,n,o){const s=[],i=HUe([e.startedAt,...e.steps.map(c=>c.startedAt),o.startedAt]),l=jd(e.endedAt)??jd(o.endedAt),r=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const c=[{type:"text",text:e.prompt}];for(const u of e.attachmentIds??[]){const d=jUe(t.get(u));d!==void 0&&c.push(d)}s.push({id:`${e.turnId}:input`,sessionId:o.sessionId,role:"user",content:c,createdAt:i,promptId:r,metadata:{origin:e.origin}})}for(const c of e.steps){const u=jd(c.startedAt)??i;for(const d of c.frames){if(d.kind==="text"){if(d.text.length===0||d.role==="user"&&d.taskId===void 0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:d.role,content:[{type:"text",text:d.text}],createdAt:u,promptId:r,metadata:d.taskId===void 0?void 0:{origin:{kind:"task",taskId:d.taskId},task:n.get(d.taskId),[L$]:FUe(d.taskId,d.text,n.get(d.taskId))}});continue}if(d.kind==="thinking"){if(d.text.length===0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:"assistant",content:[{type:"thinking",thinking:d.text,startedAt:u,durationMs:CM(u,jd(c.endedAt))}],createdAt:u,promptId:r});continue}d.kind==="tool"&&(s.push({id:`${d.frameId}:call`,sessionId:o.sessionId,role:"assistant",content:[{type:"toolUse",toolCallId:d.toolCallId,toolName:d.name,input:d.input??d.display??{},outputLines:d.state==="running"?OUe(d.output):void 0}],createdAt:u,promptId:r}),d.state!=="running"&&s.push({id:`${d.frameId}:result`,sessionId:o.sessionId,role:"tool",content:[{type:"toolResult",toolCallId:d.toolCallId,output:d.output??d.error??"",isError:d.state==="error"}],createdAt:jd(c.endedAt)??u,promptId:r}))}}const a=e.durationMs??CM(i,l);if(a!==void 0){const c=s.findLastIndex(u=>u.role==="assistant");c>=0&&(s[c]={...s[c],durationMs:a})}return s}function FUe(e,t,n){if($$(t).length>0)return;const[o="",...s]=t.split(` +`)}:null}),k=V(null),x=V(null),y=V(null);function w(){k.value=null,x.value=null,y.value=null}let _=0,A=0,P=null,z=null;async function L(){const D=++_;A=Date.now();const M=o(l.path);if(!M){D===_&&w();return}try{z??=Cs(()=>import("./index-RD9RRwLM.js").then(Z=>Z.i),[]).then(Z=>Z.codeToTokens);const R=await z,O=r.value?"github-dark":"github-light",U=m.value;if(U){const[Z,q]=await Promise.all([U.before?R(U.before,{lang:M,theme:O}):null,U.after?R(U.after,{lang:M,theme:O}):null]);if(D!==_)return;x.value=Z?.tokens??null,y.value=q?.tokens??null}else{const Z=h.value.length>0?await R(h.value.join(` +`),{lang:M,theme:O}):null;if(D!==_)return;k.value=Z?.tokens??null}}catch{D===_&&w()}}function T(){if(P!==null)return;const D=Math.max(0,Ize-(Date.now()-A));P=setTimeout(()=>{P=null,L()},D)}Ke([()=>h.value.join(` +`),()=>m.value?.before??null,()=>m.value?.after??null],T),Ke([()=>l.path,r,()=>l.fullTexts],()=>{_++,w(),T()}),In(()=>void L()),vo(()=>{_++,P!==null&&clearTimeout(P)});const I=B(()=>{const D=new Map;let M=0;for(const R of l.lines??[])R.oldNo!==void 0&&D.set(R.oldNo,M++);return D}),N=B(()=>{const D=new Map;let M=0;for(const R of l.lines??[])R.newNo!==void 0&&D.set(R.newNo,M++);return D});function C(D){if(D.type==="del"){if(D.oldNo===void 0)return null;const R=l.fullTexts?D.oldNo-1:I.value.get(D.oldNo);return R===void 0?null:x.value?.[R]??null}if(D.newNo===void 0)return null;const M=l.fullTexts?D.newNo-1:N.value.get(D.newNo);return M===void 0?null:y.value?.[M]??null}function F(D){return D.type==="add"?"+":D.type==="del"?"-":" "}const H=B(()=>{let D=0;if(f.value)for(const M of f.value)M>D&&(D=M);else for(const M of l.lines??[])M.oldNo!==void 0&&M.oldNo>D&&(D=M.oldNo),M.newNo!==void 0&&M.newNo>D&&(D=M.newNo);return Math.max(4,String(D).length)});return(D,M)=>(g(),S("div",{class:Be(["hl-code",{gutter:d.value,"plain-pad":!a.value&&f.value===null,framed:e.framed,"responsive-wrap":e.responsiveWrap,"one-gutter":p.value===1,"two-gutters":p.value===2}]),style:Gt({"--gutter-ch":`${H.value}ch`})},[b("div",xze,[a.value?(g(!0),S(Ce,{key:0},rt(e.lines,(R,O)=>(g(),S("div",{key:O,class:Be(["hl-row",`row-${R.type}`])},[d.value?(g(),S(Ce,{key:0},[c.value?(g(),S("span",Sze,E(R.oldNo??""),1)):Y("",!0),u.value?(g(),S("span",{key:1,class:Be(["hl-gutter new",{offset:c.value}])},E(R.newNo??""),3)):Y("",!0)],64)):Y("",!0),b("span",Cze,E(F(R)),1),b("span",Mze,[C(R)?(g(!0),S(Ce,{key:0},rt(C(R),(U,Z)=>(g(),S("span",{key:Z,style:Gt(i(U))},E(U.content),5))),128)):(g(),S(Ce,{key:1},[He(E(R.text),1)],64))])],2))),128)):(g(!0),S(Ce,{key:1},rt(h.value,(R,O)=>(g(),S("div",{key:O,class:Be(["hl-row",e.lineClass?e.lineClass(f.value?.[O]??-1):void 0]),"data-line":f.value?f.value[O]:void 0},[f.value?(g(),S("span",Tze,E(f.value[O]??""),1)):Y("",!0),b("span",Eze,[k.value&&k.value[O]?(g(!0),S(Ce,{key:0},rt(k.value[O],(U,Z)=>(g(),S("span",{key:Z,style:Gt(i(U))},E(U.content),5))),128)):(g(),S(Ce,{key:1},[He(E(R),1)],64))])],10,Aze))),128))])],6))}}),iB=vt(Lze,[["__scopeId","data-v-4b6e3ce1"]]),$ze={class:"turn-diff-panel"},Nze={class:"tdp-body"},zze={class:"tdp-file-head"},Bze={class:"tdp-path"},Rze={key:0,class:"tdp-diff"},Pze={key:1,class:"tdp-unavailable"},Fze=Je({__name:"TurnDiffPanel",props:{changes:{},cwd:{}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(a,c){if(!c)return null;const u=y=>y.replaceAll("\\","/"),d=u(a);let f=u(c);f.length>1&&(f=f.replace(/\/+$/,""));const p=/^[a-z]:\//i.test(f)||/^[a-z]:\//i.test(d)||f.startsWith("//")||d.startsWith("//"),h=p?f.toLowerCase():f,m=p?d.toLowerCase():d,k=h.endsWith("/")?h:`${h}/`;if(m!==h&&!m.startsWith(k))return null;const x=m===h?"":d.slice(k.length);return x.split("/").includes("..")?null:x||null}function l(a,c=48){return!a||a.length<=c?a:"…"+a.slice(a.length-c+1)}function r(a){return i(a.path,n.cwd)??a.path}return(a,c)=>(g(),S("div",$ze,[W(Ca,{title:v(s)("conversation.turnFiles.diffTitle"),onClose:c[0]||(c[0]=u=>o("close"))},null,8,["title"]),b("div",Nze,[(g(!0),S(Ce,null,rt(e.changes,u=>(g(),S("section",{key:u.path,class:"tdp-file"},[b("div",zze,[W(Cn,{text:u.path},{default:ae(()=>[b("span",Bze,E(l(r(u))),1)]),_:2},1032,["text"]),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[He(E(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]),u.diff?(g(),S("div",Rze,[W(iB,{lines:u.diff,path:u.path,framed:!1},null,8,["lines","path"])])):(g(),S("div",Pze,[b("p",null,E(v(s)("conversation.turnFiles.diffUnavailable")),1),W(Nt,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:u.path})},{default:ae(()=>[He(E(v(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]))]))),128))])]))}}),jze=vt(Fze,[["__scopeId","data-v-67a3cc7e"]]),Oze=["aria-label"],Hze=Je({__name:"ThinkingIndicator",props:{size:{default:"md"},fast:{type:Boolean},label:{default:"Waiting for response…"}},setup(e){const t=af.length*yu;function n(o){return{"--thinking-frame-delay":`${o*yu-t}ms`,"--thinking-frame-fast-delay":`${o*(yu/2)-t/2}ms`}}return(o,s)=>(g(),S("span",{class:Be(["ui-thinking-indicator",[`ui-thinking-indicator--${e.size}`,{"ui-thinking-indicator--fast":e.fast}]]),"aria-label":e.label,role:"status"},[(g(!0),S(Ce,null,rt(v(af),(i,l)=>(g(),S("span",{key:i,class:"ui-thinking-indicator__frame",style:Gt(n(l)),"aria-hidden":"true"},E(i),5))),128))],10,Oze))}}),Dze=vt(Hze,[["__scopeId","data-v-ed8aef9e"]]),Vze={class:"sc"},Wze={key:0,class:"sc-empty"},qze={key:2,class:"sc-loading","aria-hidden":"true"},Uze={class:"sc-composer"},Zze=["placeholder"],Kze=["disabled"],Gze=Je({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),l=B(()=>o.turns.find(_=>_.role==="user")?.text?.trim()??""),r=B(()=>o.title?.trim()||i("sideChat.title")),a=B(()=>o.subtitle?.trim()?o.subtitle.trim():l.value||i("sideChat.subtitle")),c=V(""),u=V(null),d=V(null);function f(){const w=c.value.trim();w&&(s("send",w),c.value="",yt(()=>{u.value&&(u.value.style.height="auto"),p()}))}function p(){const w=d.value;w&&(w.scrollTop=w.scrollHeight)}const h=B(()=>{const w=o.turns;if(w.length===0)return"0";const _=w.at(-1),A=_.thinking?.length??0,P=_.tools?.reduce((z,L)=>z+L.name.length+(L.arg?.length??0)+(L.output?.join("").length??0),0)??0;return`${w.length}:${_.text.length}:${A}:${P}`});Ke(h,async()=>{!o.running&&!o.sending||(await yt(),p())});const m=B(()=>o.sending?o.turns.at(-1)?.role==="user":!1);function k(w){w.key==="Enter"&&!w.shiftKey&&!w.isComposing&&(w.preventDefault(),f())}function x(){const w=u.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}function y(){u.value?.focus()}return t({focusInput:y}),(w,_)=>(g(),S("div",Vze,[W(Ca,{title:r.value,subtitle:a.value,"close-label":v(i)("thinking.close"),onClose:_[0]||(_[0]=A=>s("close"))},null,8,["title","subtitle","close-label"]),b("div",{ref_key:"bodyRef",ref:d,class:"sc-body"},[e.turns.length===0?(g(),S("div",Wze,E(v(i)("sideChat.empty")),1)):(g(),ue(f9,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running},null,8,["turns","turn-active","working"])),m.value?(g(),S("div",qze,[W(Dze)])):Y("",!0)],512),b("div",Uze,[Jn(b("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":_[1]||(_[1]=A=>c.value=A),class:"sc-input",rows:"1",placeholder:v(i)("sideChat.placeholder"),onInput:x,onKeydown:k},null,40,Zze),[[js,c.value]]),W(Cn,{text:v(i)("sideChat.send")},{default:ae(()=>[b("button",{type:"button",class:"sc-send",disabled:!c.value.trim(),onClick:f},[W(Ee,{name:"arrow-right",size:"sm"})],8,Kze)]),_:1},8,["text"])])]))}}),Yze=vt(Gze,[["__scopeId","data-v-130e8cd2"]]),Xze={class:"changes-pane"},Jze={class:"dv-path"},Qze={class:"diff-head"},eBe={class:"back-label"},tBe={key:"loading",class:"empty-state diff-loading"},nBe={key:"empty",class:"empty-state"},oBe={class:"dv-change-count"},sBe={class:"ch-head"},iBe={class:"br-label"},lBe={class:"br-name"},rBe={key:0,class:"sync-info"},aBe={key:0,class:"ahead"},cBe={key:0,class:"behind"},uBe={key:1,class:"empty-head"},dBe={key:0,class:"ch-list"},fBe=["onClick"],pBe={class:"fpath"},hBe={key:1,class:"ch-list ch-tree"},mBe={class:"tree-list"},gBe=["onClick"],vBe={class:"tree-name"},yBe=["onClick"],wBe={class:"tree-name"},kBe={key:2,class:"empty-state"},bBe={key:3,class:"empty-state"},_Be=Je({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{default:null},emptyFile:{type:Boolean,default:!1},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(C){const F=C.toLowerCase();return F==="modified"?"modified":F==="added"?"added":F==="deleted"?"deleted":F==="renamed"?"renamed":F==="untracked"?"untracked":F==="conflicted"?"conflicted":F==="ignored"?"ignored":F==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function r(C){return l[i(C)]??"?"}function a(C,F=60){return C.length<=F?C:"…"+C.slice(C.length-F+1)}const c=B(()=>o.gitInfo!==null),u=B(()=>o.changes.length>0),d=B(()=>(o.selectedDiffPath??null)!==null),f=B(()=>o.mode==="detail"||o.mode==="full"&&d.value),p=B(()=>o.fileDiff??[]),h=B(()=>o.fileDiffLoading===!0),m=V(null);Ke([()=>o.selectedDiffPath,h],([,C])=>{!C&&m.value&&(m.value.scrollLeft=0)},{flush:"post"});function k(C){s("open",C)}function x(){s("back")}function y(){s("close")}const w=V("list");function _(C){w.value=C}function A(C){const F={children:[]},H=[...C].sort((D,M)=>D.path.localeCompare(M.path));for(const D of H){const M=D.path.split("/");let R=F;for(let O=0;Oee.name===U&&ee.kind===(Z?"file":"folder"));te||(te={name:U,path:q,kind:Z?"file":"folder",status:Z?D.status:void 0,children:[]},R.children.push(te)),R=te}}return F.children}const P=B(()=>A(o.changes)),z=V(new Set);function L(C){return!z.value.has(C)}const T=B(()=>{const C=[];function F(H,D){for(const M of H)C.push({node:M,depth:D}),M.kind==="folder"&&L(M.path)&&F(M.children,D+1)}return F(P.value,0),C});function I(C){const F=new Set(z.value);F.has(C.path)?F.delete(C.path):F.add(C.path),z.value=F}function N(C){return`${16+C*16}px`}return(C,F)=>(g(),S("div",Xze,[f.value?(g(),S(Ce,{key:0},[W(Ca,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[W(Cn,{text:e.selectedDiffPath??""},{default:ae(()=>[b("span",Jze,E(a(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),b("div",Qze,[e.hideBack?Y("",!0):(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",onClick:x},{default:ae(()=>[F[0]||(F[0]=b("span",{"aria-hidden":"true"},"←",-1)),b("span",eBe,E(v(n)("diff.back")),1)]),_:1}))]),W(qi,{name:"diff-content",mode:"out-in"},{default:ae(()=>[h.value?(g(),S("div",tBe,[W(Zo,{size:"md"}),b("span",null,E(v(n)("diff.loading")),1)])):p.value.length>0?(g(),S("div",{key:"lines",ref_key:"diffScrollRef",ref:m,class:"dv-lines-wrap"},[W(iB,{lines:p.value,path:e.selectedDiffPath??void 0,"line-numbers":!0,framed:!1,"full-texts":e.fullTexts,"responsive-wrap":""},null,8,["lines","path","full-texts"])],512)):(g(),S("div",nBe,E(e.emptyFile?v(n)("diff.emptyFile"):v(n)("diff.noDiff")),1))]),_:1})],64)):(g(),S(Ce,{key:1},[W(Ca,{title:v(n)("diff.title"),closable:e.closable,"close-label":v(n)("diff.close"),onClose:y},{default:ae(()=>[b("span",oBe,E(v(n)(e.changes.length===1?"diff.fileCountOne":"diff.fileCountOther",{number:e.changes.length})),1),W(di,{"model-value":w.value,size:"sm",options:[{value:"list",label:v(n)("diff.list")},{value:"tree",label:v(n)("diff.tree")}],"onUpdate:modelValue":_},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),b("div",sBe,[c.value?(g(),S(Ce,{key:0},[b("span",iBe,E(v(n)("diff.branch")),1),b("span",lBe,E(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(g(),S("span",rBe,[W(Cn,{text:v(n)("diff.aheadTitle")},{default:ae(()=>[e.gitInfo.ahead>0?(g(),S("span",aBe,"↑"+E(e.gitInfo.ahead),1)):Y("",!0)]),_:1},8,["text"]),W(Cn,{text:v(n)("diff.behindTitle")},{default:ae(()=>[e.gitInfo.behind>0?(g(),S("span",cBe,"↓"+E(e.gitInfo.behind),1)):Y("",!0)]),_:1},8,["text"])])):Y("",!0)],64)):(g(),S("span",uBe,E(v(n)("diff.empty")),1))]),u.value&&w.value==="list"?(g(),S("div",dBe,[(g(!0),S(Ce,null,rt(e.changes,H=>(g(),ue(Cn,{key:H.path,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"ch-row",onClick:D=>k(H.path)},[b("span",{class:Be(["badge",i(H.status)])},E(r(H.status)),3),b("span",pBe,E(a(H.path)),1)],8,fBe)]),_:2},1032,["text"]))),128))])):u.value&&w.value==="tree"?(g(),S("div",hBe,[b("ul",mBe,[(g(!0),S(Ce,null,rt(T.value,({node:H,depth:D})=>(g(),S("li",{key:H.path,class:"tree-node"},[H.kind==="folder"?(g(),S("button",{key:0,type:"button",class:"tree-row tree-folder",style:Gt({paddingLeft:N(D)}),onClick:M=>I(H)},[W(Ee,{class:"tree-icon",name:"folder-solid",size:"sm"}),b("span",vBe,E(H.name),1)],12,gBe)):(g(),ue(Cn,{key:1,text:H.path},{default:ae(()=>[b("button",{type:"button",class:"tree-row tree-file",style:Gt({paddingLeft:N(D)}),onClick:M=>k(H.path)},[b("span",{class:Be(["badge",i(H.status)])},E(r(H.status)),3),b("span",wBe,E(H.name),1)],12,yBe)]),_:2},1032,["text"]))]))),128))])])):c.value?(g(),S("div",kBe,E(v(n)("diff.clean")),1)):(g(),S("div",bBe,E(v(n)("diff.empty")),1))],64))]))}}),xBe=vt(_Be,[["__scopeId","data-v-811473b6"]]),SBe={class:"panel-tab-bar"},CBe=["data-tab-id"],MBe=["aria-selected","tabindex","title","onClick","onKeydown"],ABe={class:"ptb-t"},TBe=["aria-label","onClick"],EBe={class:"ptb-tail"},IBe=["disabled"],LBe=["disabled"],$Be=Je({__name:"PanelTabBar",props:{tabs:{},activeId:{},expanded:{type:Boolean},mobile:{type:Boolean},canOpenDiff:{type:Boolean},canOpenSideChat:{type:Boolean}},emits:["activate","close","toggleExpanded","hide","openDiff","openSideChat"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),l=V(null),r=V(null),a=V(!1);Ke(()=>n.activeId,async m=>{if(!m)return;await yt(),Array.from(i.value?.querySelectorAll("[data-tab-id]")??[]).find(x=>x.dataset.tabId===m)?.scrollIntoView?.({inline:"nearest",block:"nearest"})});function c(m){Array.from(i.value?.querySelectorAll(".ptb-tab-main")??[])[m]?.focus()}function u(m,k){if(n.tabs.length===0)return;let x;m.key==="ArrowRight"?x=(k+1)%n.tabs.length:m.key==="ArrowLeft"?x=(k-1+n.tabs.length)%n.tabs.length:m.key==="Home"?x=0:m.key==="End"&&(x=n.tabs.length-1),x!==void 0&&(m.preventDefault(),o("activate",n.tabs[x].id),yt(()=>c(x)))}function d(){a.value=!1,document.removeEventListener("pointerdown",f,!0)}function f(m){const k=m.target;r.value?.contains(k)||l.value?.el?.contains(k)||d()}function p(){if(a.value){d();return}a.value=!0,document.addEventListener("pointerdown",f,!0),yt(()=>r.value?.querySelector("button:not(:disabled)")?.focus())}function h(m){d(),o(m==="diff"?"openDiff":"openSideChat")}return En(d),(m,k)=>(g(),S("header",SBe,[b("div",{ref_key:"tabsRef",ref:i,class:"ptb-tabs",role:"tablist"},[(g(!0),S(Ce,null,rt(e.tabs,(x,y)=>(g(),S("div",{key:x.id,class:Be(["ptb-tab",{on:x.id===e.activeId}]),"data-tab-id":x.id},[b("button",{type:"button",class:"ptb-tab-main",role:"tab","aria-selected":x.id===e.activeId,tabindex:x.id===e.activeId?0:-1,title:x.title,onClick:w=>o("activate",x.id),onKeydown:w=>u(w,y)},[W(Ee,{name:x.icon,size:"sm"},null,8,["name"]),b("span",ABe,E(x.title),1)],40,MBe),W(Cn,{text:v(s)("panel.closeTab")},{default:ae(()=>[b("button",{type:"button",class:"ptb-x","aria-label":v(s)("panel.closeTab"),onClick:xt(w=>o("close",x.id),["stop"])},[W(Ee,{name:"close",size:"sm"})],8,TBe)]),_:2},1032,["text"])],10,CBe))),128))],512),b("div",EBe,[W(Dt,{ref_key:"addButtonRef",ref:l,size:"sm",label:v(s)("panel.newTab"),"aria-haspopup":"menu","aria-expanded":a.value,onClick:p,onKeydown:[go(xt(p,["prevent"]),["down"]),go(xt(p,["prevent"]),["up"])]},{default:ae(()=>[W(Ee,{name:"plus",size:"sm"})]),_:1},8,["label","aria-expanded","onKeydown"]),e.tabs.length>0&&!e.mobile?(g(),ue(Dt,{key:0,size:"sm",label:e.expanded?v(s)("panel.collapse"):v(s)("panel.expand"),onClick:k[0]||(k[0]=x=>o("toggleExpanded"))},{default:ae(()=>[W(Ee,{name:e.expanded?"collapse":"expand",size:"sm"},null,8,["name"])]),_:1},8,["label"])):Y("",!0),W(Dt,{class:"ptb-hide",size:"sm",label:v(s)("panel.hide"),onClick:k[1]||(k[1]=x=>o("hide"))},{default:ae(()=>[W(Ee,{name:e.mobile?"close":"panel-collapse-right",size:"sm"},null,8,["name"])]),_:1},8,["label"]),a.value?(g(),S("div",{key:1,ref_key:"addMenuRef",ref:r,class:"panel-add-menu",role:"menu",onKeydown:k[4]||(k[4]=go(xt(x=>{d(),l.value?.el?.focus()},["prevent"]),["esc"]))},[b("button",{type:"button",role:"menuitem",disabled:!e.canOpenSideChat,onClick:k[2]||(k[2]=x=>h("sideChat"))},[W(Ee,{name:"message",size:"sm"}),b("span",null,E(v(s)("sideChat.title")),1)],8,IBe),b("button",{type:"button",role:"menuitem",disabled:!e.canOpenDiff,onClick:k[3]||(k[3]=x=>h("diff"))},[W(Ee,{name:"git-fork",size:"sm"}),b("span",null,E(v(s)("panel.tabs.diff")),1)],8,LBe)],544)):Y("",!0)])]))}}),NBe=vt($Be,[["__scopeId","data-v-da364eda"]]);function lB(e,t){let n=null;In(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,yt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),vo(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const zBe={class:"search-wrap"},BBe={key:0,class:"tab-strip"},RBe={key:1,class:"state-row"},PBe={key:2,class:"state-row unavail"},FBe={key:3,class:"model-list"},jBe=["aria-selected","onClick","onMouseenter"],OBe={class:"check"},HBe={class:"model-main"},DBe={class:"model-name"},VBe={class:"model-id"},WBe={key:0,class:"caps"},qBe={class:"model-provider"},UBe={class:"model-ctx"},ZBe={key:0,class:"empty"},KBe={class:"footer-hint"},GBe=Je({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=$t(),o=r6(),s=B(()=>o.value?wu:Z0),i=B(()=>o.value?{modelValue:!0,title:n("model.title"),closeOnEsc:!1}:{open:!0,title:n("model.title"),closeOnEsc:!1,size:"xl",height:"fixed"}),l=e,r=t,a=B(()=>new Set(l.starredIds??[]));function c(L){return a.value.has(L)}const u=V(""),d=V(null),f=V(null),p=V("all");lB(f,d);const h=B(()=>{const L=new Set,T=[{id:"all",label:n("model.allTab")}];for(const I of l.models)L.has(I.provider)||(L.add(I.provider),T.push({id:I.provider,label:I.provider}));return T}),m=B(()=>{const L=u.value.toLowerCase().trim(),T=l.models.filter(I=>{if(p.value!=="all"&&I.provider!==p.value)return!1;const N=(I.displayName??I.model).toLowerCase().includes(L),C=I.provider.toLowerCase().includes(L),F=I.id.toLowerCase().includes(L);return!L||N||C||F});return p.value!=="all"?T:T.sort((I,N)=>{const C=c(I.id)?1:0;return(c(N.id)?1:0)-C})}),k=B(()=>m.value),x=V(0);Ke([u,p],()=>{x.value=0}),Ke(h,L=>{L.some(T=>T.id===p.value)||(p.value="all")}),Ke(k,L=>{x.value=Math.min(x.value,Math.max(L.length-1,0))});function y(L){if(L.key==="Escape"){r("close");return}if(L.key==="ArrowDown")L.preventDefault(),x.value=Math.min(x.value+1,k.value.length-1);else if(L.key==="ArrowUp")L.preventDefault(),x.value=Math.max(x.value-1,0);else if(L.key==="Enter"){const T=k.value[x.value];T&&r("select",T.id)}}In(()=>{document.addEventListener("keydown",y)}),En(()=>{document.removeEventListener("keydown",y)});function w(L){r("select",L)}function _(L){return k.value.indexOf(L)}function A(L){p.value=L}const P={image_in:"imageIn",imageIn:"imageIn",image_out:"imageOut",imageOut:"imageOut",vision:"vision",video_in:"videoIn",videoIn:"videoIn",audio_in:"audioIn",audioIn:"audioIn",audio_out:"audioOut",audioOut:"audioOut",thinking:"thinking",always_thinking:"alwaysThinking",alwaysThinking:"alwaysThinking",adaptive_thinking:"adaptiveThinking",adaptiveThinking:"adaptiveThinking",tool_use:"toolUse",toolUse:"toolUse",fast_mode:"fastMode",fastMode:"fastMode"};function z(L){const T=P[L];return T?n(`model.capabilities.${T}`):n("model.capabilities.unknown",{capability:L})}return(L,T)=>(g(),ue(cs(s.value),io(i.value,{onClose:T[1]||(T[1]=I=>r("close"))}),{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:f,class:Be(["mp",{"mp--sheet":v(o)}])},[b("div",zBe,[W(us,{ref_key:"searchRef",ref:d,modelValue:u.value,"onUpdate:modelValue":T[0]||(T[0]=I=>u.value=I),placeholder:v(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:""},null,8,["modelValue","placeholder"])]),h.value.length>1?(g(),S("div",BBe,[(g(!0),S(Ce,null,rt(h.value,I=>(g(),ue(Nt,{key:I.id,variant:I.id===p.value?"secondary":"ghost",size:"sm",onClick:N=>A(I.id)},{default:ae(()=>[He(E(I.label),1)]),_:2},1032,["variant","onClick"]))),128))])):Y("",!0),e.loading?(g(),S("div",RBe,[W(Zo,{size:"sm"}),b("span",null,E(v(n)("model.loading")),1)])):e.unavailable?(g(),S("div",PBe,[W(Ee,{name:"alert-triangle",size:"lg"}),b("span",null,E(v(n)("model.unavailable")),1)])):(g(),S("div",FBe,[(g(!0),S(Ce,null,rt(k.value,I=>(g(),S("div",{key:I.id,class:Be(["model-row",{"is-current":I.id===e.current,"is-selected":_(I)===x.value}]),role:"option","aria-selected":I.id===e.current,onClick:N=>w(I.id),onMouseenter:N=>x.value=_(I)},[b("span",OBe,[I.id===e.current?(g(),ue(Ee,{key:0,name:"check",size:"sm"})):Y("",!0)]),b("span",HBe,[b("span",DBe,E(I.displayName??I.model),1),b("span",VBe,E(I.id),1),I.capabilities&&I.capabilities.length>0?(g(),S("span",WBe,[(g(!0),S(Ce,null,rt(I.capabilities,N=>(g(),ue(Fl,{key:N,variant:"info",size:"sm"},{default:ae(()=>[He(E(z(N)),1)]),_:2},1024))),128))])):Y("",!0)]),b("span",qBe,E(I.provider),1),b("span",UBe,E(v(n)("model.contextSuffix",{size:v(ba)(I.maxContextSize)})),1),W(Dt,{size:"sm",label:c(I.id)?v(n)("model.unstarTitle"):v(n)("model.starTitle"),onClick:xt(N=>r("toggle-star",I.id),["stop"])},{default:ae(()=>[c(I.id)?(g(),ue(Ee,{key:0,name:"star",size:"md"})):(g(),ue(Ee,{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["label","onClick"])],42,jBe))),128)),k.value.length===0&&!e.loading&&!e.unavailable?(g(),S("div",ZBe,E(l.models.length===0?v(n)("model.emptyNoModels"):v(n)("model.emptyNoMatch")),1)):Y("",!0)])),b("div",KBe,E(v(n)("model.footerHint")),1)],2)]),_:1},16))}}),YBe=vt(GBe,[["__scopeId","data-v-466b8fec"]]),XBe=["aria-checked","aria-label","disabled"],JBe=Je({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),S("button",{class:Be(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[b("span",{class:"ui-switch__thumb"},null,-1)])],10,XBe))}}),wi=vt(JBe,[["__scopeId","data-v-d7337ade"]]),QBe=["value","disabled"],eRe=Je({__name:"Select",props:{modelValue:{},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(s){n("update:modelValue",s.target.value)}return(s,i)=>(g(),S("select",{class:Be(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error}]]),value:e.modelValue,disabled:e.disabled,onChange:o},[jn(s.$slots,"default",{},void 0,!0)],42,QBe))}}),F4=vt(eRe,[["__scopeId","data-v-77d887db"]]),tRe=["pythinker","openai","openai_responses","anthropic","google-genai","vertexai"],nRe=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function sg(){return{model:"",maxContextSize:"",displayName:""}}function _M(){return{id:"",type:"openai",apiKey:"",baseUrl:"",models:[sg()]}}function rB(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:""})}return n}function oRe(e,t={}){const n={models:{}},o=e.id.trim();return o===""?n.id="idRequired":nRe.test(o)||(n.id="idInvalid"),t.apiKey===!0&&e.apiKey.trim()===""&&(n.apiKey="apiKeyRequired"),t.baseUrl===!0&&e.baseUrl.trim()===""&&(n.baseUrl="baseUrlRequired"),e.models.length===0&&(n.modelsEmpty="modelRequired"),e.models.forEach((s,i)=>{const l={};s.model.trim()===""&&(l.model="modelRequired");const r=s.maxContextSize.trim(),a=Number(r);r===""?l.maxContextSize="contextSizeRequired":(!/^\d+$/.test(r)||!Number.isSafeInteger(a)||a<1)&&(l.maxContextSize="contextSizeInvalid"),(l.model!==void 0||l.maxContextSize!==void 0)&&(n.models[i]=l)}),n}function sRe(e){return e.id!==void 0||e.apiKey!==void 0||e.baseUrl!==void 0||e.modelsEmpty!==void 0||Object.keys(e.models).length>0}function aB(e){return e.map(t=>({model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),displayName:t.displayName.trim()||void 0}))}function iRe(e){return{id:e.id.trim(),type:e.type,apiKey:e.apiKey.trim()||void 0,baseUrl:e.baseUrl.trim()||void 0,models:aB(e.models)}}function lRe(e,t,n,o){const s=aB(e.models),i=o?.includes("/")?o.slice(o.indexOf("/")+1):o;return{newId:e.id.trim()!==t.id?e.id.trim():void 0,type:e.type,apiKey:e.apiKey.trim()||(n?"":void 0),baseUrl:e.baseUrl.trim()||void 0,defaultModel:i&&s.some(l=>l.model===i)?i:void 0,models:s}}const rRe=Je({__name:"Skeleton",props:{width:{},height:{},circle:{type:Boolean}},setup(e){return(t,n)=>(g(),S("span",{class:Be(["ui-skeleton",{"is-circle":e.circle}]),style:Gt({width:e.width??"100%",height:e.height??"12px"}),"aria-hidden":"true"},null,6))}}),xM=vt(rRe,[["__scopeId","data-v-f4989189"]]),aRe={key:0,class:"ui-field__label"},cRe={key:1,class:"ui-field__error"},uRe={key:2,class:"ui-field__hint"},dRe=Je({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(g(),S("div",{class:Be(["ui-field",{"has-error":!!e.error}])},[e.label?(g(),S("label",aRe,E(e.label),1)):Y("",!0),jn(t.$slots,"default",{},void 0,!0),e.error?(g(),S("span",cRe,E(e.error),1)):e.hint?(g(),S("span",uRe,E(e.hint),1)):Y("",!0)],2))}}),Ir=vt(dRe,[["__scopeId","data-v-bd93f701"]]),fRe={class:"provider-form__fields"},pRe=["value"],hRe={class:"provider-form__key"},mRe={class:"provider-form__models-head"},gRe={class:"provider-form__models"},vRe={class:"provider-form__model provider-form__model--head"},yRe={key:0,class:"provider-form__row-error",role:"alert"},wRe={key:0,class:"provider-form__error",role:"alert"},kRe={class:"provider-form__actions"},bRe=Je({__name:"ProviderForm",props:{mode:{},provider:{},config:{}},emits:["dirtyChange","saved","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=_M(),l=ds(i),r=V({models:{}}),a=V(""),c=V(!1),u=V(!1),d=V(!1),f=V(!1),p=B(()=>tRe.map(L=>({value:L,label:s(`providers.types.${L}`)})));function h(){const L=n.provider;if(n.mode==="edit"&&L!==void 0){l.id=L.id,l.type=L.type,l.apiKey="",l.baseUrl=L.baseUrl??"";const T=rB(L,n.config?.models);l.models=T.length>0?T:[sg()]}else Object.assign(l,_M());r.value={models:{}},a.value="",o("dirtyChange",!1)}function m(L){const T=r.value[L];return T===void 0?"":s(`providers.error.${T}`)}function k(L,T){const I=r.value.models[L]?.[T];return I===void 0?"":s(`providers.error.${I}`)}function x(L){if(r.value[L]===void 0)return;const{[L]:T,...I}=r.value;r.value={...I,models:r.value.models}}function y(L,T){const I=r.value.models[L];if(I?.[T]===void 0)return;const{[T]:N,...C}=I,{[L]:F,...H}=r.value.models;r.value={...r.value,models:Object.keys(C).length>0?{...H,[L]:C}:H}}async function w(){const L=n.provider;if(!(n.mode!=="edit"||L===void 0||!L.hasApiKey))try{const T=await Ct().getProvider(L.id);T.apiKey&&!f.value&&(l.apiKey=T.apiKey,d.value=!0)}catch{d.value=!1}}function _(){o("dirtyChange",!0)}function A(){l.models.push(sg()),_()}function P(L){l.models.length<=1||(l.models.splice(L,1),r.value={...r.value,models:{}},_())}async function z(){if(c.value)return;const L=oRe(l,{apiKey:n.mode==="add",baseUrl:n.mode==="add"});if(r.value=L,sRe(L)){a.value=L.modelsEmpty===void 0?"":s(`providers.error.${L.modelsEmpty}`);return}c.value=!0,a.value="";try{if(n.mode==="add"){const N=await Ct().addProvider(iRe(l));o("dirtyChange",!1),o("saved",N.id);return}const T=n.provider;if(T===void 0)return;const I=await Ct().updateProvider(T.id,lRe(l,T,d.value,n.config?.providers[T.id]?.defaultModel));o("dirtyChange",!1),o("saved",I.provider.id)}catch{a.value=s("providers.saveFailed")}finally{c.value=!1}}return In(()=>{h(),w()}),(L,T)=>(g(),S("form",{class:"provider-form",onSubmit:xt(z,["prevent"]),onInput:_},[b("div",fRe,[W(Ir,{label:v(s)("providers.fieldId"),error:m("id")},{default:ae(()=>[W(us,{modelValue:l.id,"onUpdate:modelValue":[T[0]||(T[0]=I=>l.id=I),T[1]||(T[1]=I=>x("id"))],autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),_:1},8,["label","error"]),W(Ir,{label:v(s)("providers.fieldType")},{default:ae(()=>[W(F4,{modelValue:l.type,"onUpdate:modelValue":T[2]||(T[2]=I=>l.type=I)},{default:ae(()=>[(g(!0),S(Ce,null,rt(p.value,I=>(g(),S("option",{key:I.value,value:I.value},E(I.label),9,pRe))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey"),error:m("apiKey")},{default:ae(()=>[b("div",hRe,[W(us,{modelValue:l.apiKey,"onUpdate:modelValue":[T[3]||(T[3]=I=>l.apiKey=I),T[4]||(T[4]=I=>{f.value=!0,x("apiKey")})],type:u.value?"text":"password",placeholder:e.provider?.hasApiKey?v(s)("providers.apiKeySet"):"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),W(Dt,{class:"provider-form__eye",size:"sm",label:u.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:T[5]||(T[5]=I=>u.value=!u.value)},{default:ae(()=>[W(Ee,{name:u.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label","error"]),W(Ir,{label:v(s)("providers.fieldBaseUrl"),error:m("baseUrl")},{default:ae(()=>[W(us,{modelValue:l.baseUrl,"onUpdate:modelValue":[T[6]||(T[6]=I=>l.baseUrl=I),T[7]||(T[7]=I=>x("baseUrl"))],placeholder:v(s)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label","error"])]),b("div",mRe,[b("strong",null,E(v(s)("providers.fieldModels")),1),W(Nt,{type:"button",size:"sm",variant:"secondary",onClick:A},{default:ae(()=>[W(Ee,{name:"plus",size:"sm"}),He(E(v(s)("providers.addModel")),1)]),_:1})]),b("div",gRe,[b("div",vRe,[b("span",null,E(v(s)("providers.colModelId")),1),b("span",null,E(v(s)("providers.colContext")),1),b("span",null,E(v(s)("providers.colDisplayName")),1),T[9]||(T[9]=b("span",null,null,-1))]),(g(!0),S(Ce,null,rt(l.models,(I,N)=>(g(),S(Ce,{key:N},[b("div",{class:Be(["provider-form__model",{"has-error":!!r.value.models[N]}])},[W(us,{modelValue:I.model,"onUpdate:modelValue":[C=>I.model=C,C=>y(N,"model")],placeholder:v(s)("providers.modelIdPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:I.maxContextSize,"onUpdate:modelValue":[C=>I.maxContextSize=C,C=>y(N,"maxContextSize")],inputmode:"numeric",placeholder:v(s)("providers.modelContextPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(us,{modelValue:I.displayName,"onUpdate:modelValue":C=>I.displayName=C,placeholder:v(s)("providers.modelNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),W(Dt,{size:"sm",disabled:l.models.length<=1,label:v(s)("providers.removeModel"),onClick:C=>P(N)},{default:ae(()=>[W(Ee,{name:"trash",size:"sm"})]),_:1},8,["disabled","label","onClick"])],2),r.value.models[N]?(g(),S("div",yRe,E([k(N,"model"),k(N,"maxContextSize")].filter(Boolean).join(" · ")),1)):Y("",!0)],64))),128))]),a.value?(g(),S("div",wRe,E(a.value),1)):Y("",!0),b("div",kRe,[W(Nt,{type:"button",variant:"secondary",onClick:T[8]||(T[8]=I=>o("cancel"))},{default:ae(()=>[He(E(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:c.value},{default:ae(()=>[He(E(v(s)("providers.save")),1)]),_:1},8,["loading"])])],32))}}),cB=vt(bRe,[["__scopeId","data-v-66e70e30"]]),_Re={class:"add-provider-flow"},xRe={key:0,class:"add-provider-flow__section"},SRe={key:0,class:"add-provider-flow__state"},CRe={key:1,class:"add-provider-flow__state"},MRe={class:"add-provider-flow__catalog"},ARe=["disabled","onClick"],TRe={class:"add-provider-flow__name"},ERe={key:0,class:"add-provider-flow__empty"},IRe={class:"add-provider-flow__key"},LRe={key:1,class:"add-provider-flow__warning"},$Re={class:"add-provider-flow__note"},NRe={key:2,class:"add-provider-flow__error",role:"alert"},zRe={class:"add-provider-flow__actions"},BRe={class:"add-provider-flow__note"},RRe={class:"add-provider-flow__key"},PRe={key:0,class:"add-provider-flow__error",role:"alert"},FRe={class:"add-provider-flow__actions"},jRe={key:2,class:"add-provider-flow__section"},ORe=Je({__name:"AddProviderFlow",props:{config:{},initialSource:{}},emits:["dirtyChange","added","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(n.initialSource??"catalog"),l=B(()=>[{value:"catalog",label:s("providers.catalog.sourceCatalog")},{value:"registry",label:s("providers.catalog.sourceRegistry")},{value:"manual",label:s("providers.catalog.sourceManual")}]),r=V([]),a=V("loading"),c=V(""),u=V(null),d=ds({id:"",apiKey:"",baseUrl:""}),f=V(""),p=V(!1),h=V(!1),m=ds({url:"",apiKey:""}),k=V(""),x=V(!1),y=V(!1),w=B(()=>{const N=c.value.trim().toLowerCase();return N===""?r.value:r.value.filter(C=>C.name.toLowerCase().includes(N)||C.id.toLowerCase().includes(N))}),_=B(()=>Object.hasOwn(n.config?.providers??{},d.id.trim()));async function A(){a.value="loading";try{r.value=await Ct().listCatalogProviders(),a.value="ready";const N=r.value.filter(C=>!C.rejected);N.length===1&&u.value===null&&z(N[0])}catch{a.value="error"}}function P(N){const C=N.rejectReason===null?"":`providers.catalog.rejectReason.${N.rejectReason}`;return C!==""&&s(C)!==C?s(C):s("providers.catalog.rejected")}function z(N){N.rejected||(u.value=N,d.id=N.id,d.apiKey="",d.baseUrl="",f.value="")}function L(){o("dirtyChange",!0)}async function T(){const N=u.value;if(N===null||p.value)return;const C=d.id.trim();if(C===""){f.value=s("providers.error.idRequired");return}if(d.apiKey.trim()===""){f.value=s("providers.error.apiKeyRequired");return}if(N.needsBaseUrl&&d.baseUrl.trim()===""){f.value=s("providers.error.baseUrlRequired");return}p.value=!0,f.value="";try{await Ct().importCatalogProvider({catalogId:N.id,id:C===N.id?void 0:C,apiKey:d.apiKey.trim(),baseUrl:d.baseUrl.trim()||void 0}),o("dirtyChange",!1),o("added",C)}catch{f.value=s("providers.addFailed")}finally{p.value=!1}}async function I(){if(x.value)return;const N=m.url.trim();if(N===""){k.value=s("providers.error.registryUrlRequired");return}x.value=!0,k.value="";try{const C=await Ct().importCustomRegistry({url:N,apiKey:m.apiKey.trim()||void 0});o("dirtyChange",!1);const F=C.providers[0];F===void 0?o("cancel"):o("added",F.id)}catch{k.value=s("providers.addFailed")}finally{x.value=!1}}return In(A),(N,C)=>(g(),S("div",_Re,[W(di,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=F=>i.value=F),size:"sm",options:l.value},null,8,["modelValue","options"]),i.value==="catalog"?(g(),S("section",xRe,[a.value==="loading"?(g(),S("div",SRe,[W(Zo,{size:"sm"}),He(E(v(s)("providers.catalog.loading")),1)])):a.value==="error"?(g(),S("div",CRe,[b("span",null,E(v(s)("providers.catalog.loadError")),1),W(Nt,{size:"sm",variant:"secondary",onClick:A},{default:ae(()=>[He(E(v(s)("providers.catalog.retry")),1)]),_:1})])):u.value===null?(g(),S(Ce,{key:2},[W(us,{modelValue:c.value,"onUpdate:modelValue":C[1]||(C[1]=F=>c.value=F),placeholder:v(s)("providers.catalog.searchPlaceholder"),autocomplete:"off"},null,8,["modelValue","placeholder"]),b("div",MRe,[(g(!0),S(Ce,null,rt(w.value,F=>(g(),S("button",{key:F.id,type:"button",class:"add-provider-flow__entry",disabled:F.rejected,onClick:H=>z(F)},[b("span",TRe,E(F.name),1),F.wireType?(g(),ue(Fl,{key:0,size:"sm",variant:"neutral"},{default:ae(()=>[He(E(F.wireType),1)]),_:2},1024)):Y("",!0),C[15]||(C[15]=b("span",{class:"add-provider-flow__grow"},null,-1)),b("span",null,E(F.rejected?P(F):v(s)("providers.modelCount",{count:F.models.length})),1)],8,ARe))),128)),w.value.length===0?(g(),S("div",ERe,E(v(s)("providers.catalog.empty")),1)):Y("",!0)])],64)):(g(),S("form",{key:3,class:"add-provider-flow__form",onSubmit:xt(T,["prevent"]),onInput:L},[b("button",{type:"button",class:"add-provider-flow__back",onClick:C[2]||(C[2]=F=>u.value=null)},[W(Ee,{class:"add-provider-flow__back-icon",name:"chevron-right",size:"sm"}),He(E(v(s)("providers.catalog.backToList")),1)]),W(Ir,{label:v(s)("providers.fieldId")},{default:ae(()=>[W(us,{modelValue:d.id,"onUpdate:modelValue":C[3]||(C[3]=F=>d.id=F),autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",IRe,[W(us,{modelValue:d.apiKey,"onUpdate:modelValue":C[4]||(C[4]=F=>d.apiKey=F),type:h.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:h.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[5]||(C[5]=F=>h.value=!h.value)},{default:ae(()=>[W(Ee,{name:h.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),u.value.needsBaseUrl?(g(),ue(Ir,{key:0,label:v(s)("providers.fieldBaseUrl")},{default:ae(()=>[W(us,{modelValue:d.baseUrl,"onUpdate:modelValue":C[6]||(C[6]=F=>d.baseUrl=F),placeholder:v(s)("providers.baseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):Y("",!0),_.value?(g(),S("div",LRe,E(v(s)("providers.catalog.overwriteWarning")),1)):Y("",!0),b("div",$Re,E(v(s)("providers.catalog.willImport",{count:u.value.models.length})),1),f.value?(g(),S("div",NRe,E(f.value),1)):Y("",!0),b("div",zRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[7]||(C[7]=F=>o("cancel"))},{default:ae(()=>[He(E(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:p.value},{default:ae(()=>[He(E(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32))])):i.value==="registry"?(g(),S("form",{key:1,class:"add-provider-flow__section add-provider-flow__form",onSubmit:xt(I,["prevent"]),onInput:L},[b("p",BRe,E(v(s)("providers.catalog.registryHint")),1),W(Ir,{label:v(s)("providers.catalog.registryUrlLabel")},{default:ae(()=>[W(us,{modelValue:m.url,"onUpdate:modelValue":C[8]||(C[8]=F=>m.url=F),placeholder:"https://example.com/api.json",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),W(Ir,{label:v(s)("providers.fieldApiKey")},{default:ae(()=>[b("div",RRe,[W(us,{modelValue:m.apiKey,"onUpdate:modelValue":C[9]||(C[9]=F=>m.apiKey=F),type:y.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),W(Dt,{class:"add-provider-flow__eye",size:"sm",label:y.value?v(s)("providers.hideApiKey"):v(s)("providers.showApiKey"),onClick:C[10]||(C[10]=F=>y.value=!y.value)},{default:ae(()=>[W(Ee,{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),k.value?(g(),S("div",PRe,E(k.value),1)):Y("",!0),b("div",FRe,[W(Nt,{type:"button",variant:"secondary",onClick:C[11]||(C[11]=F=>o("cancel"))},{default:ae(()=>[He(E(v(s)("common.cancel")),1)]),_:1}),W(Nt,{type:"submit",variant:"primary",loading:x.value},{default:ae(()=>[He(E(v(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32)):(g(),S("div",jRe,[W(cB,{mode:"add",config:e.config,onDirtyChange:C[12]||(C[12]=F=>o("dirtyChange",F)),onSaved:C[13]||(C[13]=F=>o("added",F)),onCancel:C[14]||(C[14]=F=>o("cancel"))},null,8,["config"])]))]))}}),uB=vt(ORe,[["__scopeId","data-v-01edc4ef"]]),HRe={class:"providers-panel"},DRe={class:"providers-panel__heading"},VRe={key:1,class:"providers-panel__split"},WRe=["aria-label"],qRe={class:"providers-pane-label"},URe=["aria-label"],ZRe=["data-testid","aria-current","onClick"],KRe=["aria-label"],GRe={"aria-hidden":"true"},YRe={class:"providers-panel__row-name"},XRe={class:"providers-pane-label"},JRe=["aria-current"],QRe={class:"providers-panel__add-icon"},ePe={class:"providers-panel__row-name"},tPe={class:"providers-panel__detail"},nPe={class:"providers-detail__head"},oPe={class:"providers-detail__tile","aria-hidden":"true"},sPe={class:"providers-detail__identity"},iPe={class:"providers-detail__name-row"},lPe={class:"providers-detail__meta"},rPe={class:"mono"},aPe={class:"providers-detail__sec"},cPe={class:"providers-detail__sec-head"},uPe={class:"providers-pane-label"},dPe={class:"providers-detail__count"},fPe={key:0,class:"providers-model-card"},pPe={key:0,class:"providers-model-name"},hPe={key:1,class:"providers-detail__empty"},mPe={class:"providers-detail__sec"},gPe={class:"providers-detail__foot"},SM="$add",vPe=Je({__name:"ProvidersPanel",props:{discardToken:{default:0}},emits:["dirtyChange"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{confirm:s}=z1(),i=R1(),l=V([]),r=V(null),a=V(!1),c=V(!1),u=V(null),d=V(!1),f=B(()=>l.value.toSorted((T,I)=>T.id.localeCompare(I.id))),p=B(()=>u.value===SM),h=B(()=>f.value.find(T=>T.id===u.value)??null),m=B(()=>{const T=h.value;if(!T?.models?.length)return[];const I=new Map(rB(T,r.value?.models).map(N=>[N.model,N.maxContextSize]));return T.models.map(N=>{const C=I.get(N)?.trim()??"";return{id:N,contextBadge:k(C)}})});function k(T){if(!T||!/^\d+$/.test(T))return;const I=Number(T);if(!(!Number.isFinite(I)||I<=0))return I>=1e6?`${x(I/1e6)}M`:I>=1e3?`${x(I/1e3)}K`:String(I)}function x(T){return String(Number(T.toFixed(1)))}function y(T){return T==="connected"?"ok":T==="error"?"error":"idle"}function w(T){return(T.trim()[0]??"?").toUpperCase()}Ke(d,T=>n("dirtyChange",T),{immediate:!0}),Ke(()=>e.discardToken,()=>{d.value=!1,u.value=f.value[0]?.id??null});async function _(){await i.refreshRuntimeState(),await A()}async function A(){a.value=!0,c.value=!1;try{l.value=await Ct().listProviders(),f.value.some(T=>T.id===u.value)||(u.value=f.value[0]?.id??null)}catch{l.value=[],c.value=!0}try{r.value=await Ct().getConfig()}catch{r.value=null}finally{a.value=!1}}function P(T){d.value||(u.value=T)}async function z(T){d.value=!1,await _(),u.value=T}async function L(T){await s({title:o("providers.deleteProvider"),message:o("providers.deleteConfirm",{id:T.id,count:T.models?.length??0}),confirmLabel:o("providers.deleteConfirmYes"),cancelLabel:o("common.cancel"),variant:"danger",action:async()=>{await Ct().deleteProvider(T.id),u.value=null,d.value=!1,await _()}})}return In(A),(T,I)=>(g(),S("section",HRe,[b("div",DRe,[b("div",null,[b("h3",null,E(v(o)("providers.title")),1),b("p",null,E(v(o)("providers.description")),1)]),!a.value&&!c.value?(g(),ue(Dt,{key:0,size:"sm",label:v(o)("providers.refresh"),"data-testid":"providers-refresh",onClick:I[0]||(I[0]=N=>_())},{default:ae(()=>[W(Ee,{name:"undo",size:"sm"})]),_:1},8,["label"])):Y("",!0)]),c.value?(g(),ue(G9,{key:0,variant:"warning"},{default:ae(()=>[He(E(v(o)("providers.unavailable")),1)]),_:1})):(g(),S("div",VRe,[b("nav",{class:"providers-panel__list","aria-label":v(o)("providers.title")},[b("div",qRe,E(v(o)("settings.tabs.providers")),1),a.value?(g(),S(Ce,{key:0},rt(3,N=>b("div",{key:N,class:"providers-panel__row providers-panel__row--skeleton",role:"status","aria-label":v(o)("providers.loading")},[W(xM,{width:"26px",height:"26px",circle:""}),W(xM,{width:`${52-N*6}%`,height:"11px"},null,8,["width"])],8,URe)),64)):(g(),S(Ce,{key:1},[(g(!0),S(Ce,null,rt(f.value,N=>(g(),S("button",{key:N.id,type:"button",class:Be(["providers-panel__row",{"is-selected":u.value===N.id}]),"data-testid":`provider-${N.id}-toggle`,"aria-current":u.value===N.id,onClick:C=>P(N.id)},[W(Cn,{text:v(o)(`providers.status.${N.status}`)},{default:ae(()=>[b("span",{class:Be(["providers-panel__tile",`is-${y(N.status)}`]),role:"img","aria-label":v(o)(`providers.status.${N.status}`)},[b("span",GRe,E(w(N.type)),1)],10,KRe)]),_:2},1032,["text"]),b("span",YRe,E(N.id),1),b("span",{class:Be(["providers-panel__row-dot",`is-${y(N.status)}`]),"aria-hidden":"true"},null,2)],10,ZRe))),128)),b("div",XRe,E(v(o)("providers.customProviders")),1),b("button",{type:"button",class:Be(["providers-panel__row providers-panel__row--add",{"is-selected":p.value}]),"aria-current":p.value,onClick:I[1]||(I[1]=N=>P(SM))},[b("span",QRe,[W(Ee,{name:"plus",size:"sm"})]),b("span",ePe,E(v(o)("providers.addProvider")),1)],10,JRe)],64))],8,WRe),b("div",tPe,[p.value?(g(),ue(uB,{key:0,config:r.value,onDirtyChange:I[2]||(I[2]=N=>d.value=N),onAdded:z,onCancel:I[3]||(I[3]=N=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["config"])):h.value?(g(),S(Ce,{key:1},[b("header",nPe,[b("span",oPe,E(w(h.value.type)),1),b("div",sPe,[b("div",iPe,[b("h4",null,E(h.value.id),1),W(Fl,{variant:h.value.status==="connected"?"success":h.value.status==="error"?"danger":"neutral",size:"md"},{default:ae(()=>[He(E(v(o)(`providers.status.${h.value.status}`)),1)]),_:1},8,["variant"])]),b("p",lPe,[b("span",null,E(h.value.type),1),h.value.baseUrl?(g(),S(Ce,{key:0},[I[7]||(I[7]=b("span",{"aria-hidden":"true"},"·",-1)),b("span",rPe,E(h.value.baseUrl),1)],64)):Y("",!0)])])]),b("section",aPe,[b("div",cPe,[b("span",uPe,E(v(o)("providers.fieldModels")),1),b("span",dPe,E(v(o)("providers.modelCount",{count:h.value.models?.length??0})),1)]),m.value.length>0?(g(),S("div",fPe,[(g(!0),S(Ce,null,rt(m.value,N=>(g(),S("div",{key:N.id,class:"providers-model-row"},[b("code",null,E(N.id),1),N.displayName?(g(),S("span",pPe,E(N.displayName),1)):Y("",!0),I[8]||(I[8]=b("span",{class:"providers-model-grow"},null,-1)),N.contextBadge?(g(),ue(Fl,{key:1,variant:"neutral",size:"sm"},{default:ae(()=>[He(E(N.contextBadge),1)]),_:2},1024)):Y("",!0)]))),128))])):(g(),S("p",hPe,E(v(o)("providers.noModels")),1))]),b("section",mPe,[W(cB,{mode:"edit",provider:h.value,config:r.value,onDirtyChange:I[4]||(I[4]=N=>d.value=N),onSaved:z,onCancel:I[5]||(I[5]=N=>{u.value=f.value[0]?.id??null,d.value=!1})},null,8,["provider","config"])]),b("footer",gPe,[W(Nt,{variant:"danger-soft",size:"sm","data-testid":`provider-${h.value.id}-delete`,onClick:I[6]||(I[6]=N=>L(h.value))},{default:ae(()=>[W(Ee,{name:"trash",size:"sm"}),He(E(v(o)("providers.deleteProvider")),1)]),_:1},8,["data-testid"])])],64)):l.value.length===0&&!a.value?(g(),ue(Og,{key:2,title:v(o)("providers.empty"),hint:v(o)("providers.emptyHint")},{icon:ae(()=>[W(Ee,{name:"bolt"})]),_:1},8,["title","hint"])):Y("",!0)])]))]))}}),yPe=vt(vPe,[["__scopeId","data-v-66a5ed6a"]]),wPe=["aria-expanded","aria-label","disabled"],kPe=["aria-label"],bPe=["aria-label"],_Pe=["aria-selected"],xPe={class:"sm-picker__option-label"},SPe={class:"sm-picker__group"},CPe=["aria-selected","onMouseenter","onClick"],MPe={class:"sm-picker__option-label"},APe=["aria-label"],TPe={class:"sm-picker__group"},EPe=["aria-selected","onMouseenter","onClick"],IPe={class:"sm-picker__option-label"},LPe=250,$Pe=188,NPe=Je({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{},disabled:{type:Boolean}},emits:["inherit","select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=`sm-picker-${Math.random().toString(36).slice(2,9)}`,l=V(null),r=V(null),a=V(null),c=V(!1),u=V(!1),d=V({}),f=V(null),p=V(""),h=V(0),m=V("models"),k=V(0),x=V(0),y=V("right"),w=new Map;let _=null;const A=B(()=>[{id:"",label:s("settings.noSecondaryModel")},...n.groups.flatMap(X=>X.options)]),P=B(()=>n.modelValue?A.value.find(X=>X.id===n.modelValue)?.label??n.modelValue:""),z=B(()=>n.modelValue?n.effort?`${P.value} · ${n.effort}`:P.value:s("settings.noSecondaryModel")),L=B(()=>{const X=f.value;if(X===null||X==="")return[];const oe=l6(n.modelInfoById[X]),j=n.effort===""?[null,...oe]:[...oe];return n.modelValue===X&&n.effort!==""&&!oe.includes(n.effort)&&j.push(n.effort),j});function T(X){return n.modelValue!==f.value?!1:X===null?n.effort==="":n.effort===X}function I(){const X=L.value.findIndex(T);return X>=0?X:0}function N(X,oe){X instanceof HTMLElement?w.set(oe,X):w.delete(oe)}function C(){_!==null&&(clearTimeout(_),_=null)}function F(){C(),_=setTimeout(()=>{f.value=null,m.value==="efforts"&&(m.value="models")},LPe)}function H(X){X!==p.value&&(p.value=X,h.value=Math.max(0,A.value.findIndex(oe=>oe.id===X)))}function D(){const X=l.value,oe=r.value;if(!X||!oe)return;const j=X.getBoundingClientRect(),K=oe.offsetHeight,he=window.innerHeight-j.bottom;u.value=heK;const ye=Math.max(8,window.innerWidth-j.right);d.value=u.value?{right:`${ye}px`,bottom:`${window.innerHeight-j.top+4}px`,top:"auto"}:{right:`${ye}px`,top:`${j.bottom+4}px`,bottom:"auto"}}function M(){const X=r.value,oe=f.value===null?void 0:w.get(f.value);if(!X||!oe)return;const j=X.getBoundingClientRect(),K=oe.getBoundingClientRect(),he=a.value?.offsetHeight??0,ye=Math.max(0,window.innerHeight-8-he-j.top);x.value=Math.max(0,Math.min(K.top-j.top-4,X.offsetHeight-40,ye));const ve=window.innerWidth-j.right;y.value=ve>=$Pe||ve>=j.left?"right":"left"}function R(){c.value||n.disabled||(c.value=!0,p.value=n.modelValue||A.value[0]?.id||"",h.value=Math.max(0,A.value.findIndex(X=>X.id===p.value)),f.value=null,m.value="models",yt(D))}function O({restoreFocus:X=!1}={}){c.value&&(C(),c.value=!1,f.value=null,X&&yt(()=>l.value?.focus()))}function U(){c.value?O({restoreFocus:!0}):R()}function Z(){f.value=null,m.value="models"}function q(X,{moveFocus:oe=!1}={}){if(H(X),C(),X===""){f.value=null,m.value="models";return}f.value=X,yt(M),oe&&(m.value="efforts",k.value=I())}function te(X){const oe=f.value;if(oe===null)return;const j={model:oe,...X===null?{}:{effort:X}};(j.model!==n.modelValue||(j.effort??"")!==n.effort)&&o("select",j),O({restoreFocus:!0})}function ee(){o("inherit"),O({restoreFocus:!0})}function J(){yt(()=>{r.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function se(X){const oe=A.value;if(oe.length===0)return;const j=oe[(h.value+X+oe.length)%oe.length];H(j.id),f.value!==null&&q(j.id),J()}function Q(X){const oe=L.value;oe.length!==0&&(k.value=(k.value+X+oe.length)%oe.length,J())}function me(X){if(!c.value){(X.key==="Enter"||X.key===" "||X.key==="ArrowDown")&&(X.preventDefault(),R());return}if(X.key==="ArrowDown")X.preventDefault(),m.value==="models"?se(1):Q(1);else if(X.key==="ArrowUp")X.preventDefault(),m.value==="models"?se(-1):Q(-1);else if(X.key==="ArrowRight")X.preventDefault(),p.value!==""&&q(p.value,{moveFocus:!0});else if(X.key==="ArrowLeft")X.preventDefault(),f.value!==null&&Z();else if(X.key==="Enter"||X.key===" ")X.preventDefault(),m.value==="models"&&p.value===""?ee():m.value==="models"?q(p.value,{moveFocus:!0}):te(L.value[k.value]??null);else if(X.key==="Home"||X.key==="End"){X.preventDefault();const oe=X.key==="Home";if(m.value==="models"){const j=A.value;if(j.length===0)return;const K=(oe?j[0]:j.at(-1)).id;H(K),f.value!==null&&q(K)}else k.value=oe?0:L.value.length-1;J()}else X.key==="Escape"&&(X.preventDefault(),O({restoreFocus:!0}))}function xe(X){const oe=X.target;oe instanceof Node&&(l.value?.contains(oe)||r.value?.contains(oe)||O())}function Ye(X){if(c.value){if(r.value?.contains(X.target instanceof Node?X.target:null)){M();return}O(),D()}}function at(){c.value&&D()}return In(()=>{document.addEventListener("pointerdown",xe),document.addEventListener("scroll",Ye,!0),window.addEventListener("resize",at)}),En(()=>{document.removeEventListener("pointerdown",xe),document.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",at),C()}),(X,oe)=>(g(),S("div",{class:Be(["sm-picker",{"is-open":c.value}])},[b("button",{ref_key:"triggerRef",ref:l,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":i,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":v(s)("settings.secondaryModel"),disabled:e.disabled,onClick:U,onKeydown:me},[b("span",{class:Be(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[b("span",null,E(z.value),1)],2),W(Ee,{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,wPe),(g(),ue(hl,{to:"body"},[c.value?(g(),S("div",{key:0,id:i,ref_key:"menuRef",ref:r,class:Be(["sm-picker__menu",{"sm-picker__menu--up":u.value}]),style:Gt(d.value),role:"dialog","aria-label":v(s)("settings.secondaryModel")},[b("div",{class:"sm-picker__models",role:"listbox","aria-label":v(s)("settings.secondaryModel")},[b("button",{ref:j=>N(j,""),type:"button",class:Be(["sm-picker__option",{"is-selected":e.modelValue==="","is-active":p.value==="","is-kb-active":m.value==="models"&&p.value===""}]),role:"option","aria-selected":e.modelValue==="",onMouseenter:oe[0]||(oe[0]=j=>q("")),onClick:ee},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",xPe,E(v(s)("settings.noSecondaryModel")),1)],42,_Pe),oe[1]||(oe[1]=b("div",{class:"sm-picker__divider"},null,-1)),(g(!0),S(Ce,null,rt(e.groups,j=>(g(),S(Ce,{key:j.provider},[b("div",SPe,E(j.provider),1),(g(!0),S(Ce,null,rt(j.options,K=>(g(),S("button",{key:K.id,ref_for:!0,ref:he=>N(he,K.id),type:"button",class:Be(["sm-picker__option",{"is-selected":K.id===e.modelValue,"is-active":K.id===p.value,"is-kb-active":m.value==="models"&&K.id===p.value}]),role:"option","aria-selected":K.id===e.modelValue,onMouseenter:he=>q(K.id),onMouseleave:F,onClick:he=>q(K.id,{moveFocus:!0})},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",MPe,E(K.label),1),W(Ee,{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,CPe))),128))],64))),128))],8,bPe),f.value!==null?(g(),S("div",{key:0,ref_key:"flyoutRef",ref:a,class:Be(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:Gt({top:`${x.value}px`}),role:"listbox","aria-label":v(s)("settings.secondaryModelEffort"),onMouseenter:C,onMouseleave:F},[b("div",TPe,E(v(s)("settings.secondaryModelEffort")),1),(g(!0),S(Ce,null,rt(L.value,(j,K)=>(g(),S("button",{key:j??"__default__",type:"button",class:Be(["sm-picker__option",{"is-selected":T(j),"is-kb-active":m.value==="efforts"&&K===k.value,"is-muted":j===null}]),role:"option","aria-selected":T(j),onMouseenter:he=>{m.value="efforts",k.value=K},onClick:he=>te(j)},[W(Ee,{class:"sm-picker__check",name:"check",size:"sm"}),b("span",IPe,E(j??v(s)("settings.secondaryModelEffortAuto")),1)],42,EPe))),128))],46,APe)):Y("",!0)],14,kPe)):Y("",!0)]))],2))}}),zPe=vt(NPe,[["__scopeId","data-v-5b749db7"]]),BPe=["aria-label"],RPe=["aria-selected","onClick"],PPe={class:"body"},FPe={class:"panel"},jPe={class:"sec"},OPe={class:"sec-title"},HPe={class:"row"},DPe={class:"rlabel"},VPe={class:"row"},WPe={class:"rlabel"},qPe={class:"row"},UPe={class:"rlabel"},ZPe={class:"sec"},KPe={class:"sec-title"},GPe={class:"row"},YPe={class:"rlabel"},XPe={class:"hint"},JPe={class:"row"},QPe={class:"rlabel"},eFe={class:"hint"},tFe={class:"sec"},nFe={class:"sec-title"},oFe={class:"row"},sFe={class:"rlabel"},iFe={key:0,class:"hint"},lFe={class:"row"},rFe={class:"rlabel"},aFe={key:0,class:"hint"},cFe={class:"row"},uFe={class:"rlabel"},dFe={key:0,class:"hint"},fFe={class:"row"},pFe={class:"rlabel"},hFe={class:"panel"},mFe={class:"sec"},gFe={class:"sec-title"},vFe={class:"row"},yFe={class:"rlabel"},wFe={key:0,class:"rvalue"},kFe={class:"actions"},bFe={class:"panel"},_Fe={class:"panel"},xFe={class:"sec"},SFe={class:"sec-head"},CFe={class:"sec-title"},MFe={key:0,class:"saving"},AFe={class:"row"},TFe={class:"rlabel"},EFe={class:"hint"},IFe={key:0,class:"select-wrap"},LFe={key:0,value:"",disabled:""},$Fe=["label"],NFe=["value"],zFe={key:1,class:"rvalue mono"},BFe={key:0,class:"sec","data-testid":"subagent-routing"},RFe={class:"sec-title"},PFe=["aria-label"],FFe=["value","checked","disabled","onChange"],jFe={class:"routing-mode-title"},OFe={class:"hint"},HFe={key:0,class:"row"},DFe={class:"rlabel"},VFe={class:"hint"},WFe={key:1,class:"rvalue"},qFe={key:1,class:"row routing-pool"},UFe={class:"rlabel"},ZFe={class:"hint"},KFe={class:"pool-list","data-testid":"routing-pool"},GFe=["value","checked","disabled","onChange"],YFe={class:"pool-name"},XFe=["disabled","onClick"],JFe={class:"row routing-effective","data-testid":"effective-routing"},QFe={class:"rlabel"},eje={class:"rvalue mono","data-testid":"saved-policy"},tje={class:"rlabel"},nje={class:"rvalue mono","data-testid":"effective-policy"},oje={key:0,class:"hint","data-testid":"feature-disabled"},sje={class:"row"},ije={class:"rlabel"},lje={class:"hint"},rje={class:"row"},aje={class:"rlabel"},cje={class:"hint"},uje={class:"row"},dje={class:"rlabel"},fje={class:"hint"},pje={class:"row"},hje={class:"rlabel"},mje={class:"hint"},gje={key:1,class:"empty-config"},vje={class:"panel"},yje={class:"sec"},wje={class:"sec-title"},kje={class:"row"},bje={class:"rlabel"},_je={class:"hint"},xje={class:"rvalue mono"},Sje={class:"row"},Cje={class:"rlabel"},Mje={class:"hint"},Aje={class:"value-wrap"},Tje={class:"rvalue mono"},Eje={class:"row"},Ije={class:"rlabel"},Lje={class:"hint"},$je={class:"value-wrap"},Nje={class:"rvalue mono"},zje={class:"row"},Bje={class:"rlabel"},Rje={class:"rvalue mono"},Pje={key:0,class:"sec"},Fje={key:0,class:"row"},jje={class:"rlabel"},Oje={class:"hint"},Hje={class:"hint"},Dje={class:"sec"},Vje={class:"sec-title"},Wje={class:"row"},qje={class:"rlabel"},Uje={key:0,class:"hint"},Zje={class:"row"},Kje={class:"rlabel"},Gje={class:"panel"},Yje={key:0,class:"sec"},Xje={class:"sec-title"},Jje={"data-testid":"desktop-update-controls",class:"desktop-update-card"},Qje={class:"desktop-update-row desktop-update-summary"},eOe={class:"desktop-update-summary-copy"},tOe={class:"desktop-update-icon","aria-hidden":"true"},nOe={class:"rlabel"},oOe={class:"desktop-update-title","aria-live":"polite"},sOe={class:"hint"},iOe={class:"desktop-update-row"},lOe={class:"rlabel"},rOe={class:"hint"},aOe={class:"select-wrap desktop-update-select"},cOe=["value"],uOe={class:"desktop-update-row"},dOe={class:"rlabel"},fOe={class:"hint"},pOe={class:"desktop-update-row"},hOe={class:"rlabel"},mOe={class:"hint"},gOe={key:0,class:"desktop-update-detail"},vOe={key:0,class:"desktop-update-progress"},yOe=["aria-label"],wOe=["value","aria-label"],kOe={"data-testid":"settings-update-progress-detail"},bOe={class:"desktop-update-actions"},_Oe={class:"panel"},xOe={class:"sec"},SOe={class:"sec-title"},COe={class:"row"},MOe={class:"rlabel"},AOe={class:"hint"},TOe={class:"row"},EOe={class:"rlabel"},IOe={class:"hint"},LOe={key:0,class:"flag-chip"},$Oe={key:1,class:"flag-chip flag-chip--warn"},NOe={class:"row"},zOe={class:"rlabel"},BOe={class:"hint"},ROe={key:0,class:"flag-chip"},POe={key:1,class:"flag-chip flag-chip--warn"},FOe={key:1,class:"empty-config"},jOe={class:"panel"},OOe={class:"panel-head"},HOe={class:"panel-title"},DOe={class:"panel-desc"},VOe={class:"archive-toolbar"},WOe={class:"archive-search"},qOe=["placeholder"],UOe={value:"all"},ZOe=["value"],KOe={key:0,class:"archive-empty"},GOe={key:0,class:"archive-list"},YOe={class:"archive-workspace"},XOe={class:"path"},JOe={class:"count"},QOe={class:"setting-card"},eHe={class:"archive-meta"},tHe={class:"archive-name"},nHe={class:"archive-time"},oHe={key:1,class:"archive-empty"},sHe=100,iHe=Je({__name:"SettingsDialog",props:{colorScheme:{},accent:{},uiFontSize:{},authReady:{type:Boolean},accountModel:{},notify:{type:Boolean},notifyQuestion:{type:Boolean},notifyApproval:{type:Boolean},notifyPermission:{},sound:{type:Boolean},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},backend:{},experimentalFlagStates:{},subagentModelPolicy:{},subagentModelPolicySaving:{type:Boolean},initialTab:{}},emits:["setColorScheme","setAccent","setUiFontSize","setNotify","setNotifyQuestion","setNotifyApproval","setSound","setConversationToc","setTurnFolding","setActivityRunFolding","openOnboarding","updateConfig","saveSubagentModelPolicy","clearSubagentModelPolicy","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(o.initialTab??"general"),l=B(()=>_9(o.uiFontSize)),r=typeof window>"u"?void 0:window.pythinkerDesktop,a=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"cute-bot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"},...r===void 0?[]:[{id:"update",labelKey:"settings.tabs.update",icon:"update-available"}],{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"}],c=B$().serverHttpUrl,u="0.1.2".trim()?"0.1.2":"0.0.0-dev",d=V(),f=V(!1),p=V();let h;const m=B(()=>d.value?.installedVersion??u),k=V(null),x=B(()=>k.value?.serverVersion||o.serverVersion||"-"),y=B(()=>k.value?.backend??o.backend??"v1"),w=B(()=>y.value==="v2"?"agent-gateway":"server"),_=V(!1),A=V(!1),P=V(0),{confirm:z,current:L}=z1(),T=["manual","yolo","auto"],I={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},N=V(null);lB(N);function C(We){We.key==="Escape"&&L.value===null&&pt()}In(()=>{document.addEventListener("keydown",C),j(),r!==void 0&&(h=r.onUpdateState(We=>{d.value=We}),r.getUpdateState().then(We=>{d.value=We}))}),En(()=>{document.removeEventListener("keydown",C),h?.(),kn!==null&&clearTimeout(kn)});const F=B(()=>{const We=d.value;if(We===void 0)return n("settings.desktop.loading");switch(We.status){case"disabled":return n("settings.desktop.disabled");case"checking":return n("settings.desktop.checking");case"available":return n("settings.desktop.available",{version:We.availableVersion});case"downloading":return n("settings.desktop.downloading",{version:We.availableVersion});case"downloaded":return n("settings.desktop.downloaded",{version:We.availableVersion});case"skipped":return n("settings.desktop.skipped",{version:We.skippedVersion??We.availableVersion});case"error":return We.message??n("settings.desktop.errorGeneric");default:return n("settings.desktop.upToDate")}}),H=B(()=>{const We=d.value?.percent;return We===void 0||!Number.isFinite(We)?void 0:Math.min(100,Math.max(0,We))}),D=["stable","beta","nightly"],M=B(()=>{const We=d.value?.status;return f.value||We===void 0||We==="checking"||We==="downloading"||We==="downloaded"}),R=B(()=>{const We=d.value?.status;return f.value||We===void 0||We==="disabled"||We==="checking"||We==="downloading"||We==="downloaded"}),O=B(()=>{const We=d.value?.lastCheckedAt;if(We===void 0)return n("settings.desktop.neverChecked");const st=new Date(We);return Number.isNaN(st.getTime())?n("settings.desktop.neverChecked"):n("settings.desktop.lastChecked",{time:new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"}).format(st)})});function U(We){const st=["B","KB","MB","GB"];let Xe=Math.max(0,We),qe=0;for(;Xe>=1024&&qe{const We=d.value;if(We?.status!=="downloading")return"";const st=[];return H.value!==void 0&&st.push(`${Math.round(H.value)}%`),We.transferred!==void 0&&We.total!==void 0?st.push(n("settings.desktop.bytesOfTotal",{transferred:U(We.transferred),total:U(We.total)})):We.transferred!==void 0&&st.push(U(We.transferred)),We.bytesPerSecond!==void 0&&st.push(`${U(We.bytesPerSecond)}/s`),st.join(" · ")}),q=B(()=>p.value!==void 0?p.value:d.value?.status==="error"?F.value:void 0);async function te(We){if(!f.value){f.value=!0,p.value=void 0;try{d.value=await We()}catch(st){p.value=st instanceof Error?st.message:String(st)}finally{f.value=!1}}}function ee(We){r!==void 0&&te(()=>r.setAutoUpdate(We))}function J(We){r!==void 0&&D.includes(We)&&te(()=>r.setUpdateChannel(We))}function se(We){r!==void 0&&te(()=>r.setNotifyUpdate(We))}function Q(){r!==void 0&&te(()=>r.checkForUpdates())}function me(){r!==void 0&&te(()=>r.downloadUpdate())}function xe(){const We=d.value?.availableVersion;r!==void 0&&We!==void 0&&te(()=>r.skipUpdate(We))}function Ye(){r!==void 0&&te(()=>r.undoSkippedUpdate())}function at(){const We=d.value?.availableVersion;r!==void 0&&We!==void 0&&te(()=>r.openUpdateReleaseNotes(We))}function X(){r!==void 0&&te(()=>r.restartToUpdate())}let oe=0;async function j(){const We=++oe;let st;try{st=await Ct().getMeta()}catch{st=null}We===oe&&(k.value=st)}Ke(()=>o.config,()=>{j()});function K(){IN()}const he=B(()=>{const We=new Map;for(const st of o.models??[])We.set(st.id,{id:st.id,label:st.displayName??st.model??st.id,provider:st.provider});for(const[st,Xe]of Object.entries(o.config?.models??{})){if(We.has(st))continue;const qe=ie(Xe);We.set(st,{id:st,label:de(st,Xe,qe),provider:qe??st})}return Array.from(We.values())}),ye=B(()=>{const We=new Map;for(const st of he.value){const Xe=We.get(st.provider)??[];Xe.push(st),We.set(st.provider,Xe)}for(const[st,Xe]of We)We.set(st,Xe.toSorted((qe,Pe)=>qe.label.localeCompare(Pe.label)));return Array.from(We.entries()).toSorted(([st],[Xe])=>st.localeCompare(Xe)).map(([st,Xe])=>({provider:st,options:Xe}))}),ve=B(()=>{const We=o.config?.defaultPermissionMode;return We==="auto"||We==="yolo"||We==="manual"?We:"manual"});function ie(We){if(!We||typeof We!="object")return;const st=We;return typeof st.provider=="string"?st.provider:void 0}function de(We,st,Xe){if(!st||typeof st!="object")return We;const qe=st,Pe=typeof qe.model=="string"?qe.model:void 0,bt=Xe??ie(st);return Pe&&bt?`${We} (${bt}/${Pe})`:Pe?`${We} (${Pe})`:We}function be(We){return We===!0}function Se(We){!We||We===o.config?.defaultModel||s("updateConfig",{defaultModel:We})}function je(We){We!==ve.value&&s("updateConfig",{defaultPermissionMode:We})}function et(We){const st=o.config?.[We];s("updateConfig",{[We]:!be(st)})}function le(){const We=o.config?.thinking;return!We||typeof We!="object"?!0:We.enabled!==!1}function fe(){s("updateConfig",{thinking:{enabled:!le()}})}function ge(){const We=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!We})}async function Oe(We){We!==i.value&&await Fe()&&(i.value=We)}async function Fe(){if(!A.value)return!0;const We=await z({title:n("providers.unsavedTitle"),message:n("providers.unsavedBody"),confirmLabel:n("providers.unsavedDiscard"),cancelLabel:n("providers.unsavedStay"),variant:"danger"});return We&&(A.value=!1,P.value+=1),We}async function pt(){await Fe()&&s("close")}function kt(){return[`App version: ${m.value}`,`Server version: ${x.value}`,`Backend: ${y.value}`,`Server address: ${c}`,`Server ID: ${k.value?.serverId||"-"}`,`User agent: ${typeof navigator>"u"?"-":navigator.userAgent}`].join(` +`)}async function qt(){_.value=await fs(kt())}const nn=V(!1),Jt=V(!1);let kn=null;function Dn(){kn!==null&&clearTimeout(kn),kn=setTimeout(()=>{nn.value=!1,Jt.value=!1,kn=null},1500)}async function xn(){await fs(x.value)&&(nn.value=!0,Dn())}async function $n(){await fs(c)&&(Jt.value=!0,Dn())}const Hn=B(()=>Object.fromEntries((o.models??[]).map(We=>[We.id,We])));function bn(We){return o.config?.experimental?.[We]===!0}function Wn(We){return k.value?.experimentalFlagStates?.find(Xe=>Xe.id===We)??o.experimentalFlagStates?.find(Xe=>Xe.id===We)}function Pn(We,st){const Xe={...o.config?.experimental,[We]:st};s("updateConfig",{experimental:Xe})}const Mn=["inherit","default","pool","force"],Nn=V("inherit"),An=V(""),Qn=V(""),Fn=V(new Set);function Qt(We){Nn.value=We?.mode??"inherit",An.value=We!==void 0&&We.mode!=="inherit"?We.defaultModel:"",Qn.value=We!==void 0&&We.mode!=="inherit"?We.defaultEffort??"":"",Fn.value=new Set(We?.mode==="pool"?Object.keys(We.models):[])}Ke(()=>o.subagentModelPolicy?.policy,Qt,{immediate:!0,deep:!0});function uo(){const We=Qn.value||void 0;switch(Nn.value){case"inherit":return{mode:"inherit"};case"default":case"force":return An.value?{mode:Nn.value,defaultModel:An.value,defaultEffort:We}:void 0;case"pool":{if(Fn.value.size===0||!Fn.value.has(An.value))return;const st=Object.fromEntries([...Fn.value].map(Xe=>[Xe,""]));return{mode:"pool",defaultModel:An.value,models:st,defaultEffort:We}}}}function Zn(){const We=uo();if(We!==void 0){if(We.mode==="inherit"){o.subagentModelPolicy?.policy.mode!=="inherit"&&s("clearSubagentModelPolicy");return}s("saveSubagentModelPolicy",We)}}function Bo(We){Nn.value!==We&&(Nn.value=We,We==="pool"&&Fn.value.size===0&&An.value&&(Fn.value=new Set([An.value])),Zn())}function Un(We){An.value=We.model,Qn.value=We.effort??"",Zn()}function hs(We){const st=new Set(Fn.value);st.has(We)?st.delete(We):st.add(We),Fn.value=st,st.has(An.value)||(An.value=[...st][0]??""),Zn()}function Io(We){!Fn.value.has(We)||An.value===We||(An.value=We,Zn())}function Rt(We){return he.value.find(st=>st.id===We)?.label??We}function Jo(We){switch(We.mode){case"inherit":return n("settings.subagentRouting.summaryInherit");case"pool":return`${n("settings.subagentRouting.mode.pool")} · ${n("settings.subagentRouting.summaryPool",{count:Object.keys(We.models).length,model:Rt(We.defaultModel)})}`;default:{const st=We.defaultEffort?` · ${We.defaultEffort}`:"";return`${n(`settings.subagentRouting.mode.${We.mode}`)} · ${Rt(We.defaultModel)}${st}`}}}function Ls(We){const st=sz(We);st!==void 0&&s("setUiFontSize",st)}const $e=R1(),Ge=V([]),ot=V(!1),dt=V(!1),Mt=V(""),Ft=V("all"),Ut=V("archived-desc");async function en(){if(!(ot.value||dt.value)){ot.value=!0;try{const We=[];let st;for(;;){const Xe=await $e.loadArchivedSessions({beforeId:st,pageSize:sHe});if(We.push(...Xe.items),!Xe.hasMore||Xe.items.length===0)break;const qe=Xe.items.at(-1)?.id;if(qe===void 0)break;st=qe}Ge.value=We,dt.value=!0}catch(We){console.warn("loadAllArchived failed",We)}finally{ot.value=!1}}}Ke(i,We=>{We==="archived"&&!dt.value&&en()});const tn=B(()=>{const We=new Set;for(const st of Ge.value)We.add(st.cwd);return Array.from(We).toSorted((st,Xe)=>st.localeCompare(Xe))}),eo=B(()=>{const We=Mt.value.trim().toLowerCase();let st=Ge.value.filter(Xe=>Xe.archived===!0);return Ft.value!=="all"&&(st=st.filter(Xe=>Xe.cwd===Ft.value)),We&&(st=st.filter(Xe=>Xe.title.toLowerCase().includes(We))),Ut.value==="archived-desc"?st.toSorted((Xe,qe)=>qe.updatedAt.localeCompare(Xe.updatedAt)):Ut.value==="created-desc"?st.toSorted((Xe,qe)=>qe.createdAt.localeCompare(Xe.createdAt)):st.toSorted((Xe,qe)=>Xe.title.localeCompare(qe.title,"en"))}),Ro=B(()=>{const We=new Map;for(const st of eo.value){const Xe=We.get(st.cwd)??[];Xe.push(st),We.set(st.cwd,Xe)}return Array.from(We.entries()).map(([st,Xe])=>({cwd:st,items:Xe}))});async function $s(We){await $e.restoreSession(We)&&(Ge.value=Ge.value.filter(Xe=>Xe.id!==We))}function Do(We){const st=new Date(We);if(Number.isNaN(st.getTime()))return We;const Xe=qe=>String(qe).padStart(2,"0");return`${st.getFullYear()}-${Xe(st.getMonth()+1)}-${Xe(st.getDate())} ${Xe(st.getHours())}:${Xe(st.getMinutes())}`}return(We,st)=>(g(),ue(Z0,{open:!0,"close-on-esc":!1,title:v(n)("settings.title"),size:"xl",height:"fixed",padded:!1,onClose:pt},{default:ae(()=>[b("div",{ref_key:"dialogRef",ref:N,class:"sd"},[b("nav",{class:"settings-tabs",role:"tablist","aria-label":v(n)("settings.title")},[(g(),S(Ce,null,rt(a,Xe=>b("button",{key:Xe.id,type:"button",class:Be(["tab",{on:i.value===Xe.id}]),role:"tab","aria-selected":i.value===Xe.id,onClick:qe=>Oe(Xe.id)},[W(Ee,{name:Xe.icon,size:"sm"},null,8,["name"]),He(" "+E(v(n)(Xe.labelKey)),1)],10,RPe)),64))],8,BPe),b("div",PPe,[Jn(b("section",FPe,[b("section",jPe,[b("h3",OPe,E(v(n)("settings.appearance")),1),b("div",HPe,[b("span",DPe,E(v(n)("theme.colorSchemeLabel")),1),W(di,{"model-value":e.colorScheme,options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":st[0]||(st[0]=Xe=>s("setColorScheme",Xe))},null,8,["model-value","options"])]),b("div",VPe,[b("span",WPe,E(v(n)("theme.accentLabel")),1),W(di,{"model-value":e.accent,options:[{value:"blue",label:v(n)("theme.accentBlue")},{value:"mono",label:v(n)("theme.accentBlack")}],"onUpdate:modelValue":st[1]||(st[1]=Xe=>s("setAccent",Xe))},null,8,["model-value","options"])]),b("div",qPe,[b("span",UPe,E(v(n)("settings.uiFontSize")),1),W(di,{"model-value":l.value,options:v(ez),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":Ls},null,8,["model-value","options","aria-label"])])]),b("section",ZPe,[b("h3",KPe,E(v(n)("settings.messageFolding")),1),b("div",GPe,[b("span",YPe,[He(E(v(n)("settings.turnFolding"))+" ",1),b("span",XPe,E(v(n)("settings.turnFoldingHint")),1)]),W(wi,{"model-value":e.turnFolding??!0,label:v(n)("settings.turnFolding"),"onUpdate:modelValue":st[2]||(st[2]=Xe=>s("setTurnFolding",Xe))},null,8,["model-value","label"])]),b("div",JPe,[b("span",QPe,[He(E(v(n)("settings.activityRunFolding"))+" ",1),b("span",eFe,E(v(n)("settings.activityRunFoldingHint")),1)]),W(wi,{"model-value":e.activityRunFolding??!0,label:v(n)("settings.activityRunFolding"),"onUpdate:modelValue":st[3]||(st[3]=Xe=>s("setActivityRunFolding",Xe))},null,8,["model-value","label"])])]),b("section",tFe,[b("h3",nFe,E(v(n)("settings.notifications")),1),b("div",oFe,[b("span",sFe,[He(E(v(n)("settings.notifyOnComplete"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",iFe,E(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnComplete"),"onUpdate:modelValue":st[4]||(st[4]=Xe=>s("setNotify",Xe))},null,8,["model-value","disabled","label"])]),b("div",lFe,[b("span",rFe,[He(E(v(n)("settings.notifyOnQuestion"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",aFe,E(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyQuestion,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnQuestion"),"onUpdate:modelValue":st[5]||(st[5]=Xe=>s("setNotifyQuestion",Xe))},null,8,["model-value","disabled","label"])]),b("div",cFe,[b("span",uFe,[He(E(v(n)("settings.notifyOnApproval"))+" ",1),e.notifyPermission==="denied"?(g(),S("span",dFe,E(v(n)("settings.notifyDenied")),1)):Y("",!0)]),W(wi,{"model-value":e.notifyApproval,disabled:e.notifyPermission==="denied",label:v(n)("settings.notifyOnApproval"),"onUpdate:modelValue":st[6]||(st[6]=Xe=>s("setNotifyApproval",Xe))},null,8,["model-value","disabled","label"])]),b("div",fFe,[b("span",pFe,E(v(n)("settings.soundOnComplete")),1),W(wi,{"model-value":e.sound,label:v(n)("settings.soundOnComplete"),"onUpdate:modelValue":st[7]||(st[7]=Xe=>s("setSound",Xe))},null,8,["model-value","label"])])])],512),[[_i,i.value==="general"]]),Jn(b("section",hFe,[b("section",mFe,[b("h3",gFe,E(v(n)("settings.account")),1),b("div",vFe,[b("span",yFe,E(e.authReady?v(n)("settings.providers"):v(n)("sidebar.notSignedIn")),1),W(Cn,{text:e.accountModel},{default:ae(()=>[e.authReady&&e.accountModel?(g(),S("span",wFe,E(e.accountModel),1)):Y("",!0)]),_:1},8,["text"])]),b("div",kFe,[W(Nt,{variant:"secondary",size:"sm",onClick:st[8]||(st[8]=Xe=>{s("openOnboarding"),s("close")})},{default:ae(()=>[He(E(v(n)("onboarding.reopen")),1)]),_:1}),W(Nt,{variant:"primary",size:"sm",onClick:st[9]||(st[9]=Xe=>Oe("providers"))},{default:ae(()=>[He(E(v(n)("settings.manageProviders")),1)]),_:1})])])],512),[[_i,i.value==="account"]]),Jn(b("section",bFe,[W(yPe,{"discard-token":P.value,onDirtyChange:st[10]||(st[10]=Xe=>A.value=Xe)},null,8,["discard-token"])],512),[[_i,i.value==="providers"]]),Jn(b("section",_Fe,[b("section",xFe,[b("div",SFe,[b("h3",CFe,E(v(n)("settings.agentDefaults")),1),e.configSaving?(g(),S("span",MFe,E(v(n)("settings.saving")),1)):Y("",!0)]),e.config?(g(),S(Ce,{key:0},[b("div",AFe,[b("span",TFe,[He(E(v(n)("settings.defaultModel"))+" ",1),b("span",EFe,E(v(n)("settings.defaultModelHint")),1)]),ye.value.length>0?(g(),S("div",IFe,[W(F4,{"model-value":e.config.defaultModel??"",disabled:e.configSaving,"aria-label":v(n)("settings.defaultModel"),"onUpdate:modelValue":Se},{default:ae(()=>[e.config.defaultModel?Y("",!0):(g(),S("option",LFe,E(v(n)("settings.noDefaultModel")),1)),(g(!0),S(Ce,null,rt(ye.value,Xe=>(g(),S("optgroup",{key:Xe.provider,label:Xe.provider},[(g(!0),S(Ce,null,rt(Xe.options,qe=>(g(),S("option",{key:qe.id,value:qe.id},E(qe.label),9,NFe))),128))],8,$Fe))),128))]),_:1},8,["model-value","disabled","aria-label"])])):(g(),S("span",zFe,E(e.config.defaultModel??v(n)("settings.noDefaultModel")),1))]),e.subagentModelPolicy?(g(),S("section",BFe,[b("h3",RFe,E(v(n)("settings.subagentRouting.title")),1),b("div",{class:"routing-modes",role:"radiogroup","aria-label":v(n)("settings.subagentRouting.title")},[(g(),S(Ce,null,rt(Mn,Xe=>b("label",{key:Xe,class:Be(["routing-mode",{on:Nn.value===Xe}])},[b("input",{type:"radio",name:"subagent-routing-mode",value:Xe,checked:Nn.value===Xe,disabled:e.subagentModelPolicySaving,onChange:qe=>Bo(Xe)},null,40,FFe),b("span",jFe,E(v(n)(`settings.subagentRouting.mode.${Xe}`)),1),b("span",OFe,E(v(n)(`settings.subagentRouting.modeHint.${Xe}`)),1)],2)),64))],8,PFe),Nn.value==="default"||Nn.value==="force"?(g(),S("div",HFe,[b("span",DFe,[He(E(v(n)("settings.subagentRouting.model"))+" ",1),b("span",VFe,E(v(n)("settings.subagentRouting.modelHint")),1)]),ye.value.length>0?(g(),ue(zPe,{key:0,"model-value":An.value,effort:Qn.value,groups:ye.value,"model-info-by-id":Hn.value,disabled:e.subagentModelPolicySaving,onInherit:st[11]||(st[11]=Xe=>Bo("inherit")),onSelect:Un},null,8,["model-value","effort","groups","model-info-by-id","disabled"])):(g(),S("span",WFe,E(v(n)("settings.noSecondaryModel")),1))])):Nn.value==="pool"?(g(),S("div",qFe,[b("span",UFe,[He(E(v(n)("settings.subagentRouting.pool"))+" ",1),b("span",ZFe,E(v(n)("settings.subagentRouting.poolHint")),1)]),b("div",KFe,[(g(!0),S(Ce,null,rt(he.value,Xe=>(g(),S("label",{key:Xe.id,class:"pool-item"},[b("input",{type:"checkbox",value:Xe.id,checked:Fn.value.has(Xe.id),disabled:e.subagentModelPolicySaving,onChange:qe=>hs(Xe.id)},null,40,GFe),b("span",YFe,E(Xe.label),1),b("button",{type:"button",class:Be(["pool-default",{on:An.value===Xe.id}]),disabled:!Fn.value.has(Xe.id)||e.subagentModelPolicySaving,onClick:qe=>Io(Xe.id)},E(An.value===Xe.id?v(n)("settings.subagentRouting.poolDefault"):v(n)("settings.subagentRouting.makeDefault")),11,XFe)]))),128))])])):Y("",!0),b("div",JFe,[b("span",QFe,[He(E(v(n)("settings.subagentRouting.saved"))+" ",1),b("span",eje,E(Jo(e.subagentModelPolicy.configuredPolicy)),1)]),b("span",tje,[He(E(v(n)("settings.subagentRouting.effective"))+" ",1),b("span",nje,E(Jo(e.subagentModelPolicy.effectivePolicy)),1)]),e.subagentModelPolicy.feature.enabled?Y("",!0):(g(),S("span",oje,E(v(n)("settings.subagentRouting.featureDisabled")),1))])])):Y("",!0),b("div",sje,[b("span",ije,[He(E(v(n)("settings.defaultPermission"))+" ",1),b("span",lje,E(v(n)("settings.defaultPermissionHint")),1)]),W(di,{"model-value":ve.value,options:T.map(Xe=>({value:Xe,label:v(n)(I[Xe])})),"onUpdate:modelValue":st[12]||(st[12]=Xe=>je(Xe))},null,8,["model-value","options"])]),b("div",rje,[b("span",aje,[He(E(v(n)("settings.defaultThinking"))+" ",1),b("span",cje,E(v(n)("settings.defaultThinkingHint")),1)]),W(wi,{"model-value":le(),disabled:e.configSaving,label:v(n)("settings.defaultThinking"),"onUpdate:modelValue":st[13]||(st[13]=Xe=>fe())},null,8,["model-value","disabled","label"])]),b("div",uje,[b("span",dje,[He(E(v(n)("settings.defaultPlanMode"))+" ",1),b("span",fje,E(v(n)("settings.defaultPlanModeHint")),1)]),W(wi,{"model-value":be(e.config.defaultPlanMode),disabled:e.configSaving,label:v(n)("settings.defaultPlanMode"),"onUpdate:modelValue":st[14]||(st[14]=Xe=>et("defaultPlanMode"))},null,8,["model-value","disabled","label"])]),b("div",pje,[b("span",hje,[He(E(v(n)("settings.mergeSkills"))+" ",1),b("span",mje,E(v(n)("settings.mergeSkillsHint")),1)]),W(wi,{"model-value":be(e.config.mergeAllAvailableSkills),disabled:e.configSaving,label:v(n)("settings.mergeSkills"),"onUpdate:modelValue":st[15]||(st[15]=Xe=>et("mergeAllAvailableSkills"))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",gje,E(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="agent"]]),Jn(b("section",vje,[b("section",yje,[b("h3",wje,E(v(n)("settings.versionAndUpdates")),1),b("div",kje,[b("span",bje,[He(E(v(n)("settings.appVersion"))+" ",1),b("span",_je,E(v(n)("settings.appVersionHint")),1)]),b("span",xje,E(m.value),1)]),b("div",Sje,[b("span",Cje,[He(E(v(n)("settings.serverVersion"))+" ",1),b("span",Mje,E(v(n)("settings.serverVersionHint")),1)]),b("span",Aje,[b("span",Tje,E(x.value),1),W(Dt,{size:"sm",label:nn.value?v(n)("settings.copied"):v(n)("settings.copyServerVersion"),"data-testid":"copy-server-version",onClick:xn},{default:ae(()=>[W(Ee,{name:nn.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",Eje,[b("span",Ije,[He(E(v(n)("settings.serverAddress"))+" ",1),b("span",Lje,E(v(n)("settings.serverAddressHint")),1)]),b("span",$je,[b("span",Nje,E(v(c)),1),W(Dt,{size:"sm",label:Jt.value?v(n)("settings.copied"):v(n)("settings.copyServerAddress"),"data-testid":"copy-server-address",onClick:$n},{default:ae(()=>[W(Ee,{name:Jt.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),b("div",zje,[b("span",Bje,E(v(n)("settings.backend")),1),b("span",Rje,E(w.value),1)])]),e.config?(g(),S("section",Pje,[e.config?(g(),S("div",Fje,[b("span",jje,[He(E(v(n)("settings.telemetry"))+" ",1),b("span",Oje,E(v(n)("settings.telemetryHint")),1),b("span",Hje,E(v(n)("settings.telemetryRestartHint")),1)]),W(wi,{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:v(n)("settings.telemetry"),"onUpdate:modelValue":st[16]||(st[16]=Xe=>ge())},null,8,["model-value","disabled","label"])])):Y("",!0)])):Y("",!0),b("section",Dje,[b("h3",Vje,E(v(n)("settings.diagnostics")),1),b("div",Wje,[b("span",qje,[He(E(v(n)("settings.exportLog"))+" ",1),v(pr)()?Y("",!0):(g(),S("span",Uje,E(v(n)("settings.logHint")),1))]),W(Nt,{variant:"secondary",size:"sm",onClick:K},{default:ae(()=>[He(E(v(n)("settings.exportLogBtn")),1)]),_:1})]),b("div",Zje,[b("span",Kje,E(v(n)("settings.copyDetails")),1),W(Nt,{"data-testid":"copy-diagnostics",variant:"secondary",size:"sm",onClick:qt},{default:ae(()=>[He(E(_.value?v(n)("settings.copied"):v(n)("settings.copyDetails")),1)]),_:1})])])],512),[[_i,i.value==="advanced"]]),Jn(b("section",Gje,[v(r)?(g(),S("section",Yje,[b("h3",Xje,E(v(n)("settings.tabs.update")),1),b("div",Jje,[b("div",Qje,[b("div",eOe,[b("span",tOe,[W(Ee,{name:"download",size:"md"})]),b("span",nOe,[b("span",oOe,E(F.value),1),b("span",sOe,E(O.value),1)])]),W(Nt,{"data-testid":"settings-check-update",variant:"secondary",size:"sm",loading:d.value?.status==="checking",disabled:R.value,onClick:Q},{default:ae(()=>[He(E(v(n)("settings.desktop.checkNow")),1)]),_:1},8,["loading","disabled"])]),b("div",iOe,[b("span",lOe,[He(E(v(n)("settings.desktop.updateChannel"))+" ",1),b("span",rOe,E(v(n)("settings.desktop.updateChannelHint")),1)]),b("div",aOe,[W(F4,{"data-testid":"desktop-update-channel",size:"sm","model-value":d.value?.channel??"stable",disabled:M.value,"aria-label":v(n)("settings.desktop.updateChannel"),"onUpdate:modelValue":J},{default:ae(()=>[(g(),S(Ce,null,rt(D,Xe=>b("option",{key:Xe,value:Xe},E(v(n)(`settings.desktop.channels.${Xe}`)),9,cOe)),64))]),_:1},8,["model-value","disabled","aria-label"])])]),b("div",uOe,[b("span",dOe,[He(E(v(n)("settings.desktop.automaticChecks"))+" ",1),b("span",fOe,E(v(n)("settings.desktop.automaticChecksHint")),1)]),W(wi,{"data-testid":"automatic-update-checks","model-value":d.value?.autoUpdate??!1,disabled:f.value||d.value===void 0||d.value.status==="disabled",label:v(n)("settings.desktop.automaticChecks"),"onUpdate:modelValue":ee},null,8,["model-value","disabled","label"])]),b("div",pOe,[b("span",hOe,[He(E(v(n)("settings.desktop.notifyUpdates"))+" ",1),b("span",mOe,E(v(n)("settings.desktop.notifyUpdatesHint")),1)]),W(wi,{"data-testid":"update-notifications","model-value":d.value?.notifyUpdate??!0,disabled:f.value||d.value===void 0,label:v(n)("settings.desktop.notifyUpdates"),"onUpdate:modelValue":se},null,8,["model-value","disabled","label"])]),d.value?.status==="downloading"||q.value||d.value?.availableVersion?(g(),S("div",gOe,[d.value?.status==="downloading"?(g(),S("div",vOe,[H.value===void 0?(g(),S("progress",{key:0,"data-testid":"settings-update-progress",max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,yOe)):(g(),S("progress",{key:1,"data-testid":"settings-update-progress",value:H.value,max:"100","aria-label":v(n)("settings.desktop.progressLabel")},null,8,wOe)),b("span",kOe,E(Z.value||v(n)("settings.desktop.fetching")),1)])):Y("",!0),q.value?(g(),ue(G9,{key:1,variant:"danger"},{default:ae(()=>[He(E(q.value),1)]),_:1})):Y("",!0),b("div",bOe,[d.value?.availableVersion?(g(),ue(Nt,{key:0,variant:"ghost",size:"sm",disabled:f.value,onClick:at},{default:ae(()=>[He(E(v(n)("settings.desktop.viewNotes")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"?(g(),ue(Nt,{key:1,variant:"ghost",size:"sm",disabled:f.value,onClick:xe},{default:ae(()=>[He(E(v(n)("settings.desktop.skip")),1)]),_:1},8,["disabled"])):Y("",!0),d.value?.status==="available"||d.value?.status==="error"&&d.value.availableVersion?(g(),ue(Nt,{key:2,"data-testid":"settings-download-update",size:"sm",loading:f.value,onClick:me},{default:ae(()=>[He(E(d.value?.status==="error"?v(n)("settings.desktop.retryDownload"):v(n)("settings.desktop.download")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="skipped"?(g(),ue(Nt,{key:3,size:"sm",loading:f.value,onClick:Ye},{default:ae(()=>[He(E(v(n)("settings.desktop.undoSkip")),1)]),_:1},8,["loading"])):Y("",!0),d.value?.status==="downloaded"?(g(),ue(Nt,{key:4,"data-testid":"settings-restart-update",size:"sm",loading:f.value,onClick:X},{default:ae(()=>[He(E(v(n)("settings.desktop.restartToUpdate")),1)]),_:1},8,["loading"])):Y("",!0)])])):Y("",!0)])])):Y("",!0)],512),[[_i,i.value==="update"]]),Jn(b("section",_Oe,[b("section",xOe,[b("h3",SOe,E(v(n)("settings.tabs.lab")),1),b("div",COe,[b("span",MOe,[He(E(v(n)("settings.conversationToc"))+" ",1),b("span",AOe,E(v(n)("settings.conversationTocHint")),1)]),W(wi,{"model-value":e.conversationToc??!0,label:v(n)("settings.conversationToc"),"onUpdate:modelValue":st[17]||(st[17]=Xe=>s("setConversationToc",Xe))},null,8,["model-value","label"])]),e.config?(g(),S(Ce,{key:0},[b("div",TOe,[b("span",EOe,[He(E(v(n)("settings.lab.sidebarTabs"))+" ",1),b("span",IOe,E(v(n)("settings.lab.sidebarTabsHint")),1),Wn("sidebarTabs")?.externallyControlled?(g(),S("span",LOe,E(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("sidebarTabs")?.overridden?(g(),S("span",$Oe,E(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("sidebarTabs"),disabled:e.configSaving,label:v(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":st[18]||(st[18]=Xe=>Pn("sidebarTabs",Xe))},null,8,["model-value","disabled","label"])]),b("div",NOe,[b("span",zOe,[He(E(v(n)("settings.lab.secondaryModel"))+" ",1),b("span",BOe,E(v(n)("settings.lab.secondaryModelHint")),1),Wn("secondary-model")?.externallyControlled?(g(),S("span",ROe,E(v(n)("settings.lab.environmentControlled")),1)):Y("",!0),Wn("secondary-model")?.overridden?(g(),S("span",POe,E(v(n)("settings.lab.savedSettingOverridden")),1)):Y("",!0)]),W(wi,{"model-value":bn("secondary-model"),disabled:e.configSaving,label:v(n)("settings.lab.secondaryModel"),"onUpdate:modelValue":st[19]||(st[19]=Xe=>Pn("secondary-model",Xe))},null,8,["model-value","disabled","label"])])],64)):(g(),S("div",FOe,E(v(n)("settings.configUnavailable")),1))])],512),[[_i,i.value==="lab"]]),Jn(b("section",jOe,[b("div",OOe,[st[23]||(st[23]=b("div",{class:"panel-kicker"},"Archived sessions",-1)),b("h4",HOe,E(v(n)("settings.archivedTitle")),1),b("p",DOe,E(v(n)("settings.archivedDesc")),1)]),b("div",VOe,[b("label",WOe,[st[24]||(st[24]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("circle",{cx:"11",cy:"11",r:"7"}),b("path",{d:"m21 21-4.3-4.3"})],-1)),Jn(b("input",{"onUpdate:modelValue":st[20]||(st[20]=Xe=>Mt.value=Xe),placeholder:v(n)("settings.archivedSearch")},null,8,qOe),[[js,Mt.value]])]),W(F4,{"model-value":Ft.value,size:"sm","aria-label":v(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":st[21]||(st[21]=Xe=>Ft.value=Xe)},{default:ae(()=>[b("option",UOe,E(v(n)("settings.archivedAllWorkspaces")),1),(g(!0),S(Ce,null,rt(tn.value,Xe=>(g(),S("option",{key:Xe,value:Xe},E(Xe),9,ZOe))),128))]),_:1},8,["model-value","aria-label"]),W(di,{size:"sm","model-value":Ut.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":st[22]||(st[22]=Xe=>Ut.value=Xe)},null,8,["model-value","options"])]),ot.value?(g(),S("div",KOe,E(v(n)("settings.archivedLoadingAll")),1)):(g(),S(Ce,{key:1},[Ro.value.length>0?(g(),S("div",GOe,[(g(!0),S(Ce,null,rt(Ro.value,Xe=>(g(),S("section",{key:Xe.cwd,class:"archive-card"},[b("div",YOe,[st[25]||(st[25]=b("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[b("path",{d:"M3 7h6l2 2h10v9H3z"}),b("path",{d:"M3 7V5h6l2 2"})],-1)),b("span",XOe,E(Xe.cwd),1),b("span",JOe,E(v(n)("settings.archivedSessionsCount",{count:Xe.items.length})),1)]),b("div",QOe,[(g(!0),S(Ce,null,rt(Xe.items,qe=>(g(),S("div",{key:qe.id,class:"archive-row"},[b("div",eHe,[b("div",tHe,E(qe.title),1),b("div",nHe,E(v(n)("settings.archivedAt",{time:Do(qe.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Pe=>$s(qe.id)},{default:ae(()=>[He(E(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(g(),S("div",oHe,E(Ge.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))],512),[[_i,i.value==="archived"]])])],512)]),_:1},8,["title"]))}}),lHe=vt(iHe,[["__scopeId","data-v-c89555a1"]]),rHe=/^(?:\/|~(?:\/|$)|[A-Za-z]:[\\/]|\\\\)/,dB=/^[A-Za-z]:[\\/]/,aHe=/^\/\/(?!\/)/;function t8(e){return rHe.test(e.trim())}function cHe(e,t){return e==="~"?t||e:e.startsWith("~/")?(t||"~")+e.slice(1):e}function uHe(e){return aHe.test(e)?`//${e.slice(2).replaceAll(/\/{2,}/g,"/")}`:e.replaceAll(/\/{2,}/g,"/")}function dHe(e){return dB.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function fHe(e){return dB.test(e)?3:e.startsWith("\\\\")||e.startsWith("//")?2:e.startsWith("/")?1:0}function ig(e,t){let n=uHe(cHe(e.trim(),t));const o=dHe(n),s=n==="/"||n==="//"||n==="\\\\"||/^[A-Za-z]:[\\/]$/.test(n),i=o?/[\\/]$/.test(n):n.endsWith("/");!s&&i&&(n=n.slice(0,-1));const l=n.lastIndexOf("/"),r=o?n.lastIndexOf("\\"):-1,a=Math.max(l,r),c=r>l?"\\":"/",u=fHe(n),d=ad.value.trim().length>0);let m=0,k=null;const x=B(()=>t8(d.value)),y=V("idle"),w=V(""),_=V("/"),A=V([]),P=V(""),z=V(null),L=V(null),T=B(()=>y.value!=="valid"?null:hHe(d.value,P.value,L.value));let I=0,N=null;function C(se,Q){const me=se.toLowerCase(),xe=Q.toLowerCase();let Ye=0;for(let at=0;at0&&X=CM))break;oe.depth+1{k&&clearTimeout(k),N&&clearTimeout(N),I++,y.value="idle",A.value=[],L.value=null;const Q=se.trim();if(Q===""){m++,p.value=[],f.value=!1;return}if(t8(Q)){if(m++,p.value=[],f.value=!1,r.value)return;y.value="checking",N=setTimeout(()=>void H(Q),150);return}k=setTimeout(()=>void F(se),220)});async function H(se){const Q=++I;y.value="checking",L.value=null;const me=ig(se,P.value),{target:xe}=me;try{const at=await o.browseFs(xe);if(Q!==I)return;if(at.path){y.value="valid",A.value=[],L.value=xe,a.value=at.path,c.value=at.parent,u.value=at.entries,r.value=!1;return}}catch{}if(Q!==I)return;const Ye=me.base.toLowerCase();w.value=me.parent,_.value=me.separator;try{const at=await o.browseFs(me.parent);if(Q!==I)return;if(at.path){A.value=at.entries.filter(X=>X.isDir&&X.name.toLowerCase().startsWith(Ye)),y.value="not-found";return}}catch{}Q===I&&(A.value=[],y.value="bad-parent")}function D(se){d.value=pHe(w.value,se,_.value),z.value?.focus()}const M=B(()=>r.value?n("workspace.degradedPlaceholder"):n("workspace.searchPlaceholder")),R=B(()=>r.value?n("workspace.degradedHint"):x.value&&y.value==="valid"?n("workspace.pathFollowHint"):n("workspace.browseHint"));function O(se){if(se.key==="Escape"){d.value?d.value="":s("close");return}if(se.key!=="Enter")return;const Q=d.value.trim();if(t8(Q)){if(se.preventDefault(),r.value){const{target:me}=ig(Q,P.value);me&&s("add",me);return}y.value==="valid"?J():y.value==="not-found"&&A.value[0]&&D(A.value[0].name)}}const U=B(()=>{const se=a.value;if(!se)return[];const Q=se.split("/").filter(Boolean),me=[{label:"/",path:"/"}];let xe="";for(const Ye of Q)xe+=`/${Ye}`,me.push({label:Ye,path:xe});return me}),Z=B(()=>!(a.value.length===0||x.value&&T.value===null));async function q(se){l.value=!0;try{const Q=await o.browseFs(se);if(!Q.path){r.value=!0;return}a.value=Q.path,c.value=Q.parent,u.value=Q.entries,d.value="",r.value=!1}catch{r.value=!0}finally{l.value=!1}}function te(se){se.isDir&&q(se.path)}function ee(){c.value&&q(c.value)}function J(){Z.value&&s("add",T.value??a.value)}return In(async()=>{l.value=!0;try{const se=await o.getFsHome().catch(()=>({home:"",recentRoots:[]}));if(se.home&&(P.value=se.home),o.defaultPath&&(await q(o.defaultPath),!r.value))return;P.value?await q(P.value):r.value=!0}catch{r.value=!0}finally{l.value=!1}}),En(()=>{k&&clearTimeout(k),N&&clearTimeout(N)}),(se,Q)=>(g(),ue(Z0,{open:i.value,"onUpdate:open":Q[2]||(Q[2]=me=>i.value=me),title:v(n)("workspace.addTitle"),size:"lg",height:"fixed",onClose:Q[3]||(Q[3]=me=>s("close"))},{default:ae(()=>[b("div",mHe,[r.value?Y("",!0):(g(),S("div",gHe,[W(Dt,{size:"sm",disabled:!c.value,label:v(n)("workspace.up"),onClick:ee},{default:ae(()=>[W(Ee,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),b("div",vHe,[(g(!0),S(Ce,null,rt(U.value,(me,xe)=>(g(),S(Ce,{key:me.path},[xe>1?(g(),S("span",yHe,"/")):Y("",!0),b("button",{class:Be(["crumb",{last:xe===U.value.length-1}]),onClick:Ye=>q(me.path)},E(me.label),11,wHe)],64))),128))])])),!l.value||r.value?(g(),S("div",{key:1,class:Be(["filterbar",{"has-error":y.value==="not-found"||y.value==="bad-parent"}])},[W(Ee,{class:"filter-icon",name:"search",size:"md"}),Jn(b("input",{ref_key:"filterEl",ref:z,"onUpdate:modelValue":Q[0]||(Q[0]=me=>d.value=me),class:"filter-input",type:"text",placeholder:M.value,autocomplete:"off",spellcheck:"false",onKeydown:xt(O,["stop"])},null,40,kHe),[[js,d.value]]),f.value||y.value==="checking"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0)],2)):Y("",!0),r.value?(g(),S("div",RHe,E(v(n)("workspace.degradedHint")),1)):(g(),S("div",bHe,[l.value?(g(),S("div",_He,E(v(n)("workspace.browsing")),1)):x.value&&y.value!=="valid"?(g(),S(Ce,{key:1},[y.value==="checking"?(g(),S("div",xHe,E(v(n)("workspace.checkingPath")),1)):y.value==="not-found"?(g(),S(Ce,{key:1},[A.value.length>0?(g(),S("div",SHe,E(v(n)("workspace.pathPickHint")),1)):Y("",!0),(g(!0),S(Ce,null,rt(A.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>D(me.name)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",MHe,E(me.name),1)],8,CHe))),128)),A.value.length===0?(g(),S("div",AHe,E(v(n)("workspace.noPathMatch",{parent:w.value})),1)):Y("",!0)],64)):y.value==="bad-parent"?(g(),S("div",THe,E(v(n)("workspace.badParent",{parent:w.value})),1)):Y("",!0)],64)):h.value&&!x.value?(g(),S(Ce,{key:2},[(g(!0),S(Ce,null,rt(p.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>q(me.path)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",IHe,E(me.rel),1)],8,EHe))),128)),!f.value&&p.value.length===0?(g(),S("div",LHe,E(v(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(g(),S("div",$He,E(v(n)("workspace.searching")),1)):Y("",!0)],64)):(g(),S(Ce,{key:3},[(g(!0),S(Ce,null,rt(u.value,me=>(g(),S("button",{key:me.path,class:"folder-row",onClick:xe=>te(me)},[W(Ee,{class:"dir-icon",name:"folder-closed",size:"sm"}),b("span",zHe,E(me.name),1)],8,NHe))),128)),u.value.length===0?(g(),S("div",BHe,E(v(n)("workspace.noSubfolders")),1)):Y("",!0)],64))])),e.error?(g(),S("div",PHe,E(e.error),1)):Y("",!0),b("div",FHe,[W(Cn,{text:a.value},{default:ae(()=>[r.value?Y("",!0):(g(),ue(Nt,{key:0,variant:"primary",disabled:!Z.value,onClick:J},{default:ae(()=>[He(E(v(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),W(Nt,{variant:"secondary",onClick:Q[1]||(Q[1]=me=>s("close"))},{default:ae(()=>[He(E(v(n)("workspace.cancel")),1)]),_:1})]),b("div",jHe,E(R.value),1)])]),_:1},8,["open","title"]))}}),VHe=vt(DHe,[["__scopeId","data-v-09b74e91"]]),WHe={key:0,class:"confirm-dialog__message"},qHe=Je({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(){n.loading||(o("update:open",!1),o("cancel"))}function l(r){if(r.key!=="Enter"||!n.open||n.loading)return;const a=r.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(r.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",l),vo(()=>{typeof window<"u"&&window.removeEventListener("keydown",l)}),(r,a)=>(g(),ue(Z0,{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=c=>o("update:open",c)),onClose:i},{foot:ae(()=>[W(Nt,{variant:"secondary",disabled:e.loading,onClick:i},{default:ae(()=>[He(E(e.cancelLabel??v(s)("common.cancel")),1)]),_:1},8,["disabled"]),W(Nt,{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=c=>o("confirm"))},{default:ae(()=>[He(E(e.confirmLabel??v(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:ae(()=>[e.message?(g(),S("p",WHe,E(e.message),1)):Y("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),UHe=vt(qHe,[["__scopeId","data-v-074405fe"]]),ZHe=Je({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=z1();function i(){s()}return(l,r)=>(g(),ue(UHe,{open:v(t)!==null,title:v(t)?.title??"",message:v(t)?.message,"confirm-label":v(t)?.confirmLabel,"cancel-label":v(t)?.cancelLabel,variant:v(t)?.variant,loading:v(n),onConfirm:i,onCancel:r[0]||(r[0]=a=>v(o)(!1))},null,8,["open","title","message","confirm-label","cancel-label","variant","loading"]))}}),KHe={class:"rows"},GHe={class:"row"},YHe={class:"row"},XHe={class:"row"},JHe={class:"row"},QHe={class:"row"},eDe={class:"row"},tDe={class:"ctx-text"},nDe={key:0,class:"bar"},oDe={class:"row"},sDe=Je({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(!0),l=B(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),r=B(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:ba(o.status.ctxUsed),max:ba(o.status.ctxMax),pct:l.value}):n("status.statusNone"));function a(h){return n(h==="yolo"?"status.permissionYolo":h==="auto"?"status.permissionAuto":"status.permissionManual")}const c=B(()=>{const h=o.status.permission;return h==="yolo"?"var(--color-warning)":h==="auto"?"var(--color-danger)":"var(--color-text)"}),u=B(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=B(()=>o.dynamicWorkflowMode?n("status.dynamicWorkflowOn"):n("status.dynamicWorkflowOff")),f=B(()=>typeof o.costUsd=="number"&&o.costUsd>0),p=B(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(h,m)=>(g(),ue(Z0,{open:i.value,"onUpdate:open":m[0]||(m[0]=k=>i.value=k),title:v(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=k=>s("close"))},{default:ae(()=>[b("dl",KHe,[b("div",GHe,[b("dt",null,E(v(n)("status.statusModel")),1),b("dd",null,E(e.status.model),1)]),b("div",YHe,[b("dt",null,E(v(n)("status.statusThinking")),1),b("dd",null,E(e.thinking),1)]),b("div",XHe,[b("dt",null,E(v(n)("status.statusPermission")),1),b("dd",{style:Gt({color:c.value})},E(a(e.status.permission)),5)]),b("div",JHe,[b("dt",null,E(v(n)("status.statusPlanMode")),1),b("dd",{class:Be({"plan-on":e.planMode})},E(u.value),3)]),b("div",QHe,[b("dt",null,E(v(n)("status.statusDynamicWorkflowMode")),1),b("dd",{class:Be({"workflow-on":e.dynamicWorkflowMode})},E(d.value),3)]),b("div",eDe,[b("dt",null,E(v(n)("status.statusContext")),1),b("dd",null,[b("span",tDe,E(r.value),1),e.status.ctxMax>0?(g(),S("span",nDe,[b("i",{style:Gt({width:l.value+"%"})},null,4)])):Y("",!0)])]),b("div",oDe,[b("dt",null,E(v(n)("status.statusCost")),1),b("dd",null,E(p.value),1)])])]),_:1},8,["open","title"]))}}),iDe=vt(sDe,[["__scopeId","data-v-7992546c"]]),lDe={key:0,class:"actions"},rDe=["onClick"],aDe=["onClick"],cDe={key:1,class:"details"},uDe=Je({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(T){return typeof T=="object"&&T!==null}function l(T){return i(T)?T.title:T}function r(T){return i(T)?T.message??"":""}function a(T){return i(T)?T.details:void 0}function c(T){return i(T)?T.severity==="error":T.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|failed/i.test(T)}function u(T){if(!i(T))return c(T)?"danger":"warning";switch(T.severity){case"error":case"danger":return"danger";case"success":return"success";case"info":return"info";default:return"warning"}}function d(T){return i(T)?`notice:${T.severity}:${T.title}:${T.message??""}:${JSON.stringify(T.details??[])}`:`text:${T}`}function f(T){if(!i(T))return T;const I=[T.title];T.message&&I.push(T.message);const N=T.details??[];if(N.length>0){I.push("",`${s("warnings.diagnostics")}:`);for(const C of N)I.push(`${C.label}: ${C.value}`)}return I.join(` +`)}let p=1;const h=V([]),m=new Map,k=new Map;function x(T){const I=c(T)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?I+5e3:I}function y(T,I){const N=m.get(T)??{handle:null,deadline:0,remaining:0};N.handle=setTimeout(()=>L(T),I),N.deadline=Date.now()+I,m.set(T,N)}function w(T){const I=m.get(T);I&&I.handle!==null&&clearTimeout(I.handle),m.delete(T)}function _(T){const I=m.get(T);!I||I.handle===null||(clearTimeout(I.handle),I.handle=null,I.remaining=Math.max(0,I.deadline-Date.now()))}function A(T){if(h.value.find(C=>C.id===T)?.detailsOpen)return;const N=m.get(T);!N||N.handle!==null||y(T,N.remaining)}function P(T){T.detailsOpen=!T.detailsOpen,T.detailsOpen?_(T.id):A(T.id)}async function z(T){if(!await fs(f(T.warning)))return;T.copied=!0;const N=k.get(T.id);N&&clearTimeout(N),k.set(T.id,setTimeout(()=>{T.copied=!1,k.delete(T.id)},1400))}function L(T){w(T);const I=k.get(T);I&&clearTimeout(I),k.delete(T);const N=h.value.findIndex(C=>C.id===T);N!==-1&&(h.value=h.value.filter(C=>C.id!==T),o("dismiss",N))}return Ke(()=>n.warnings,T=>{const I=[...h.value];h.value=T.map(N=>{const C=d(N),F=I.findIndex(M=>M.key===C),H=F===-1?void 0:I.splice(F,1)[0];if(H)return H.warning=N,H;const D={id:p++,key:C,warning:N,detailsOpen:!1,copied:!1};return y(D.id,x(N)),D});for(const N of I){w(N.id);const C=k.get(N.id);C&&clearTimeout(C),k.delete(N.id)}},{immediate:!0,flush:"post"}),En(()=>{m.forEach(T=>{T.handle!==null&&clearTimeout(T.handle)}),m.clear(),k.forEach(T=>clearTimeout(T)),k.clear()}),(T,I)=>(g(),ue(jF,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:ae(()=>[(g(!0),S(Ce,null,rt(h.value,N=>(g(),ue(Yz,{key:N.id,variant:u(N.warning),title:l(N.warning),message:r(N.warning),"dismiss-label":v(s)("warnings.dismiss"),onDismiss:C=>L(N.id),onPointerenter:C=>_(N.id),onPointerleave:C=>A(N.id)},{default:ae(()=>[a(N.warning)?.length?(g(),S("div",lDe,[b("button",{class:"link",type:"button",onClick:C=>P(N)},E(N.detailsOpen?v(s)("warnings.hideDetails"):v(s)("warnings.showDetails")),9,rDe),b("button",{class:"link",type:"button",onClick:C=>z(N)},E(N.copied?v(s)("warnings.copied"):v(s)("warnings.copyDetails")),9,aDe)])):Y("",!0),N.detailsOpen&&a(N.warning)?.length?(g(),S("dl",cDe,[(g(!0),S(Ce,null,rt(a(N.warning),C=>(g(),S("div",{key:`${C.label}:${C.value}`,class:"detail-row"},[b("dt",null,E(C.label),1),b("dd",null,E(C.value),1)]))),128))])):Y("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),dDe=vt(uDe,[["__scopeId","data-v-6d8f28b8"]]),fDe={class:"update-dialog__head"},pDe={class:"update-dialog__brand","data-testid":"update-dialog-brand"},hDe={class:"update-dialog__titles"},mDe={class:"update-dialog__title","data-testid":"update-dialog-title"},gDe={key:0,class:"update-dialog__date","data-testid":"update-dialog-date"},vDe={key:0,class:"update-dialog__progress"},yDe={class:"update-dialog__progress-row"},wDe={class:"update-dialog__progress-label"},kDe={class:"update-dialog__progress-meta","data-testid":"update-dialog-progress-meta"},bDe={key:0,"data-testid":"update-dialog-bytes"},_De={key:1},xDe=["aria-label"],SDe=["value","aria-label"],CDe={key:2,class:"update-dialog__message","data-testid":"update-dialog-message"},MDe=Je({__name:"UpdateDialog",setup(e){const{t}=$t(),n=tE();In(()=>n.subscribe()),En(()=>n.unsubscribe());const o=B(()=>n.availableVersion.value??""),s=B(()=>n.status.value==="downloading"?t("update.dialogDownloading",{version:o.value}):n.status.value==="downloaded"?t("update.dialogReady",{version:o.value}):n.status.value==="error"?t("update.failed"):t("update.dialogAvailable",{version:o.value})),i=B(()=>{const d=n.state.value?.releaseDate;if(d===void 0)return"";const f=new Date(d);return Number.isNaN(f.getTime())?"":new Intl.DateTimeFormat(void 0,{dateStyle:"long"}).format(f)}),l=B(()=>{const d=n.state.value?.transferred;return d===void 0?void 0:Zk(d)}),r=B(()=>{const d=n.state.value?.total;return d===void 0?void 0:Zk(d)}),a=B(()=>n.status.value==="error"?n.state.value?.message??t("update.failedMessage"):n.status.value==="downloaded"?t("update.restart"):t("update.prompt")),c=B(()=>n.status.value!=="downloading");function u(){c.value&&n.closeDialog()}return(d,f)=>(g(),ue(Z0,{open:v(n).dialogOpen.value,title:s.value,description:i.value||void 0,"close-on-overlay":c.value,"close-on-esc":c.value,"show-close":!1,size:"md-wide",onClose:u},{head:ae(()=>[b("div",fDe,[b("span",pDe,[W(df,{size:"sm",animated:!1})]),b("div",hDe,[b("div",mDe,E(s.value),1),i.value?(g(),S("div",gDe,[W(Ee,{name:"calendar-schedule",size:"sm","aria-hidden":"true"}),b("span",null,E(i.value),1)])):Y("",!0)])])]),foot:ae(()=>[v(n).status.value==="downloading"?(g(),ue(Nt,{key:0,"data-testid":"cancel-update-download",variant:"secondary",loading:v(n).busy.value,onClick:f[1]||(f[1]=p=>void v(n).cancelDownload())},{default:ae(()=>[He(E(v(t)("update.cancelDownload")),1)]),_:1},8,["loading"])):v(n).status.value==="downloaded"?(g(),S(Ce,{key:1},[W(Nt,{"data-testid":"later-update",variant:"ghost",onClick:u},{default:ae(()=>[He(E(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"restart-to-update",loading:v(n).busy.value,onClick:f[2]||(f[2]=p=>void v(n).restart())},{default:ae(()=>[He(E(v(t)("update.restartAction")),1)]),_:1},8,["loading"])],64)):v(n).status.value==="error"?(g(),S(Ce,{key:2},[W(Nt,{"data-testid":"dismiss-update",variant:"ghost",onClick:u},{default:ae(()=>[He(E(v(t)("update.dismiss")),1)]),_:1}),W(Nt,{"data-testid":"retry-update",loading:v(n).busy.value,onClick:f[3]||(f[3]=p=>void v(n).retry())},{default:ae(()=>[He(E(v(t)("update.retryDownload")),1)]),_:1},8,["loading"])],64)):(g(),S(Ce,{key:3},[W(Nt,{"data-testid":"skip-update",variant:"secondary",onClick:f[4]||(f[4]=p=>void v(n).skip())},{default:ae(()=>[He(E(v(t)("update.skip")),1)]),_:1}),f[6]||(f[6]=b("span",{class:"update-dialog__foot-spacer"},null,-1)),W(Nt,{"data-testid":"later-update",variant:"secondary",onClick:u},{default:ae(()=>[He(E(v(t)("update.later")),1)]),_:1}),W(Nt,{"data-testid":"download-update",loading:v(n).busy.value,onClick:f[5]||(f[5]=p=>void v(n).download())},{default:ae(()=>[He(E(v(t)("update.download")),1)]),_:1},8,["loading"])],64))]),default:ae(()=>[v(n).status.value==="downloading"?(g(),S("div",vDe,[b("div",yDe,[b("span",wDe,E(v(t)("update.downloadProgress")),1),b("span",kDe,[l.value&&r.value?(g(),S("span",bDe,E(v(t)("update.bytesProgress",{transferred:l.value,total:r.value})),1)):(g(),S("span",_De,E(v(t)("update.fetching")),1))])]),v(n).percent.value===void 0?(g(),S("progress",{key:0,"data-testid":"update-dialog-progress",max:"100","aria-label":v(t)("update.progressLabel")},null,8,xDe)):(g(),S("progress",{key:1,"data-testid":"update-dialog-progress",value:v(n).percent.value,max:"100","aria-label":v(t)("update.progressLabel")},null,8,SDe))])):v(n).status.value==="available"?(g(),ue(D2,{key:1,"data-testid":"automatic-update-preference","model-value":v(n).state.value?.autoUpdate??!1,disabled:v(n).busy.value,"onUpdate:modelValue":f[0]||(f[0]=p=>void v(n).setAutomaticChecks(p))},{default:ae(()=>[He(E(v(t)("update.automaticChecks")),1)]),_:1},8,["model-value","disabled"])):(g(),S("p",CDe,E(a.value),1))]),_:1},8,["open","title","description","close-on-overlay","close-on-esc"]))}}),ADe=vt(MDe,[["__scopeId","data-v-13aac9b0"]]),TDe={class:"ui-action-toast-host"},EDe={class:"ui-action-toast__body"},IDe=Je({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t();let s=null,i=0,l=e.duration;function r(u){if(u<=0){n("dismiss",e.dismissToken);return}s=setTimeout(()=>n("dismiss",e.dismissToken),u),i=Date.now()+u}function a(){s!==null&&(clearTimeout(s),s=null,l=Math.max(0,i-Date.now()))}function c(){s===null&&r(l)}return r(e.duration),En(()=>{s!==null&&clearTimeout(s)}),(u,d)=>(g(),S("div",TDe,[b("div",{class:"ui-action-toast",role:"status",onPointerenter:a,onPointerleave:c},[b("span",EDe,[jn(u.$slots,"default",{},void 0,!0)]),W(Dt,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??v(o)("common.dismiss"),onClick:d[0]||(d[0]=f=>n("dismiss",e.dismissToken))},{default:ae(()=>[W(Ee,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),n8=vt(IDe,[["__scopeId","data-v-9efa207b"]]),LDe={key:0,class:"window-controls"},$De=["aria-label"],NDe=["aria-label"],zDe=["aria-label"],BDe=Je({__name:"WindowControls",setup(e){const{t}=$t(),n=B(()=>window.pythinkerDesktop?.platform==="win32");function o(){window.pythinkerDesktop?.minimizeWindow()}function s(){window.pythinkerDesktop?.toggleMaximizeWindow()}function i(){window.pythinkerDesktop?.closeWindow()}return(l,r)=>n.value?(g(),S("div",LDe,[b("button",{type:"button",class:"wc wc-min","aria-label":v(t)("app.minimizeWindow"),onClick:o},[...r[0]||(r[0]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M2.5 5h5"})],-1)])],8,$De),b("button",{type:"button",class:"wc wc-max","aria-label":v(t)("app.maximizeWindow"),onClick:s},[...r[1]||(r[1]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round","aria-hidden":"true"},[b("rect",{x:"2.4",y:"2.4",width:"5.2",height:"5.2",rx:"1"})],-1)])],8,NDe),b("button",{type:"button",class:"wc wc-close","aria-label":v(t)("app.closeWindow"),onClick:i},[...r[2]||(r[2]=[b("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[b("path",{d:"M3 3l4 4M7 3l-4 4"})],-1)])],8,zDe)])):Y("",!0)}}),RDe=vt(BDe,[["__scopeId","data-v-768f9703"]]),PDe={class:"topbar"},FDe={class:"wsq"},jDe=["aria-label"],ODe={class:"tb-path"},HDe={class:"ws"},DDe={class:"se"},VDe={class:"tb-sub"},WDe=Je({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=B(()=>{const a=o.workspace,u=(a?.name||a?.root||"").trim().charAt(0);return u?u.toUpperCase():"K"}),l=B(()=>o.workspace?.name??n("workspace.noWorkspace")),r=B(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,c)=>(g(),S("div",PDe,[b("span",FDe,E(i.value),1),b("button",{type:"button",class:"tb-mid","aria-label":v(n)("mobile.openSwitcher"),onClick:c[0]||(c[0]=u=>s("openSwitcher"))},[b("span",ODe,[b("span",HDe,E(l.value),1),e.sessionTitle?(g(),S(Ce,{key:0},[c[2]||(c[2]=b("span",{class:"sl"},"/",-1)),b("span",DDe,E(e.sessionTitle),1)],64)):Y("",!0),c[3]||(c[3]=b("span",{class:"cv"},"⌄",-1))]),b("span",VDe,[b("span",{class:Be(["rd",{on:e.running}])},null,2),b("span",null,E(r.value),1),e.branch?(g(),S(Ce,{key:0},[He(" · "+E(e.branch),1)],64)):Y("",!0),e.sessionCount>0?(g(),S(Ce,{key:1},[He(" · "+E(v(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):Y("",!0)])],8,jDe),W(Dt,{size:"lg",label:v(n)("mobile.openSettings"),onClick:c[1]||(c[1]=u=>s("openSettings"))},{default:ae(()=>[W(Ee,{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),qDe=vt(WDe,[["__scopeId","data-v-27a83eb2"]]),UDe={class:"mlist"},ZDe={key:0,class:"mempty"},KDe=["onClick"],GDe={class:"mgh-main"},YDe={class:"mgh-name"},XDe={class:"mgh-path"},JDe={key:2,class:"att"},QDe={key:0,class:"mempty small"},eVe=["onClick"],tVe={class:"m"},nVe={class:"s"},oVe={key:0,class:"att"},sVe=["disabled","onClick"],iVe=["onClick"],lVe=Je({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(){s("update:modelValue",!1)}function l(N){s("select",N),i()}function r(N){s("createInWorkspace",N),i()}function a(){s("create"),i()}function c(){s("addWorkspace"),i()}const u=V(new Set);function d(N){return u.value.has(N)}function f(N){const C=new Set(u.value);C.has(N)?C.delete(N):C.add(N),u.value=C,w.value=null,z.value=null}const p=V(new Set);function h(N){return p.value.has(N)}function m(N){const C=new Set(p.value);C.has(N)?C.delete(N):C.add(N),p.value=C}function k(N){if(h(N.workspace.id))return N.sessions;const C=N.sessions.slice(0,N.initialCount);if(o.activeId&&!C.some(F=>F.id===o.activeId)){const F=N.sessions.find(H=>H.id===o.activeId);if(F)return[...C,F]}return C}function x(N){if(!p.value.has(N)){const C=new Set(p.value);C.add(N),p.value=C}s("loadMore",N)}function y(N){return o.attentionByWorkspace[N]??0}const w=V(null);function _(N){w.value=w.value===N?null:N,z.value=null}function A(N){w.value=null;const F=(typeof window<"u"?window.prompt(n("sidebar.rename"),N.title):null)?.trim();F&&s("rename",N.id,F)}function P(N){w.value=null,s("archive",N)}const z=V(null);function L(N){z.value=z.value===N?null:N,w.value=null}function T(N){fs(N.root),z.value=null}function I(N){z.value=null,s("deleteWorkspace",N.id)}return(N,C)=>(g(),ue(wu,{"model-value":e.modelValue,"onUpdate:modelValue":C[2]||(C[2]=F=>s("update:modelValue",F))},{default:ae(()=>[b("button",{type:"button",class:"newrow",onClick:a},[W(Ee,{name:"message",size:"sm"}),He(" "+E(v(n)("sidebar.newChat")),1)]),b("button",{type:"button",class:"newrow secondary",onClick:c},[W(Ee,{name:"folder",size:"sm"}),He(" "+E(v(n)("sidebar.newWorkspace")),1)]),b("div",UDe,[e.groups.length===0?(g(),S("div",ZDe,E(v(n)("workspace.noWorkspace")),1)):Y("",!0),(g(!0),S(Ce,null,rt(e.groups,F=>(g(),S("div",{key:F.workspace.id,class:"mgroup"},[b("div",{class:Be(["mgh",{on:F.workspace.id===e.activeWorkspaceId}]),onClick:H=>f(F.workspace.id)},[d(F.workspace.id)?(g(),ue(Ee,{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(g(),ue(Ee,{key:1,class:"mgh-folder",name:"folder",size:"sm"})),b("div",GDe,[b("span",YDe,E(F.workspace.name),1),W(Cn,{text:F.workspace.root},{default:ae(()=>[b("span",XDe,E(F.workspace.shortPath),1)]),_:2},1032,["text"])]),d(F.workspace.id)&&y(F.workspace.id)>0?(g(),S("span",JDe,E(y(F.workspace.id)),1)):Y("",!0),W(Dt,{size:"lg",class:"mgh-more",label:v(n)("sidebar.options"),onClick:xt(H=>L(F.workspace.id),["stop"])},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),W(Dt,{size:"lg",class:"mgh-add",label:v(n)("workspace.newInGroup"),onClick:xt(H=>r(F.workspace.id),["stop"])},{default:ae(()=>[W(Ee,{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),z.value===F.workspace.id?(g(),ue(zr,{key:3,class:"kmenu wsmenu",onClick:C[0]||(C[0]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:H=>T(F.workspace)},{default:ae(()=>[He(E(v(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:H=>I(F.workspace)},{default:ae(()=>[He(E(v(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,KDe),Jn(b("div",null,[F.sessions.length===0?(g(),S("div",QDe,E(v(n)("sidebar.noSessions")),1)):Y("",!0),(g(!0),S(Ce,null,rt(k(F),H=>(g(),S("div",{key:H.id,class:Be(["srow",{cur:H.id===e.activeId}]),onClick:D=>l(H.id)},[b("div",tVe,[b("div",{class:Be(["t",{run:H.busy,aborted:!H.busy&&(e.attentionBySession[H.id]??0)===0&&(H.lastTurnReason==="cancelled"||H.lastTurnReason==="failed")}])},E(H.title),3),b("div",nVe,E(H.time),1)]),(e.attentionBySession[H.id]??0)>0?(g(),S("span",oVe,E(e.attentionBySession[H.id]),1)):Y("",!0),W(Dt,{size:"lg",class:"kb",label:v(n)("sidebar.options"),onClick:xt(D=>_(H.id),["stop"])},{default:ae(()=>[W(Ee,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),w.value===H.id?(g(),ue(zr,{key:1,class:"kmenu",onClick:C[1]||(C[1]=xt(()=>{},["stop"]))},{default:ae(()=>[W(Bn,{size:"lg",onClick:D=>A(H)},{default:ae(()=>[He(E(v(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),W(Bn,{size:"lg",danger:"",onClick:D=>P(H.id)},{default:ae(()=>[He(E(v(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):Y("",!0)],10,eVe))),128)),F.hasMore||F.loadingMore?(g(),S("button",{key:1,type:"button",class:"mshow-more",disabled:F.loadingMore,onClick:xt(H=>x(F.workspace.id),["stop"])},E(F.loadingMore?v(n)("sidebar.loadingMore"):v(n)("sidebar.showMore",{count:Math.max(0,F.workspace.sessionCount-F.sessions.length)})),9,sVe)):Y("",!0),F.sessions.length>F.initialCount?(g(),S("button",{key:2,type:"button",class:"mshow-more",onClick:xt(H=>m(F.workspace.id),["stop"])},E(h(F.workspace.id)?v(n)("sidebar.showLess"):v(n)("sidebar.showAll",{count:F.sessions.length-F.initialCount})),9,iVe)):Y("",!0)],512),[[_i,!d(F.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),rVe=vt(lVe,[["__scopeId","data-v-4c7bceaf"]]),aVe={class:"group-title"},cVe={class:"srow-main"},uVe={class:"srow-label"},dVe={class:"srow-sub"},fVe={class:"srow read-only"},pVe={class:"srow-main"},hVe={class:"srow-label"},mVe={key:0,class:"srow-sub"},gVe={class:"cache-note"},vVe={class:"srow-main"},yVe={class:"srow-label"},wVe={class:"srow-sub"},kVe=["aria-checked"],bVe={key:0,class:"srow read-only"},_Ve={class:"srow-main"},xVe={class:"srow-label"},SVe={class:"srow-sub"},CVe={class:"goal-actions"},MVe=["aria-checked"],AVe={class:"srow-main"},TVe={class:"srow-label"},EVe={class:"srow-sub"},IVe=["aria-checked"],LVe={class:"srow-main"},$Ve={class:"srow-label"},NVe={class:"srow-sub"},zVe={class:"srow-main"},BVe={class:"srow-label"},RVe={class:"srow read-only"},PVe={class:"srow-main"},FVe={class:"srow-label"},jVe={class:"srow-sub"},OVe=["aria-label"],HVe={class:"group-title"},DVe={class:"srow-main"},VVe={class:"srow-label"},WVe={class:"srow-sub"},qVe={class:"srow read-only pref"},UVe={class:"srow-main"},ZVe={class:"srow-label"},KVe={class:"srow read-only pref"},GVe={class:"srow-main"},YVe={class:"srow-label"},XVe={class:"srow-main"},JVe={class:"srow-label"},QVe={class:"srow-sub"},eWe=["aria-checked"],tWe={class:"srow-main"},nWe={class:"srow-label"},oWe={key:2,class:"srow read-only"},sWe={class:"srow-main"},iWe={class:"srow-label"},lWe={class:"srow-val dim"},rWe={class:"arch-subhead"},aWe={class:"arch-count"},cWe={class:"arch-tools"},uWe={key:0,class:"arch-empty"},dWe={class:"arch-meta"},fWe={class:"arch-name"},pWe={class:"arch-time"},hWe={key:2,class:"arch-empty"},mWe=100,gWe=Je({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goal:{default:null},dynamicWorkflowMode:{type:Boolean},colorScheme:{default:"system"},uiFontSize:{default:14},conversationToc:{type:Boolean},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleWorkflow","toggleGoal","controlGoal","setPermission","setColorScheme","setUiFontSize","setConversationToc","login"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{confirm:i}=z1();function l(Q){s("setColorScheme",Q)}const r=["manual","yolo","auto"],a=B(()=>o.models?.find(Q=>Q.id===o.status?.modelId)),c=B(()=>i6(a.value)),u=B(()=>l6(a.value)),d=B(()=>k9(a.value,o.thinking)),f=B(()=>u.value.includes(d.value)?d.value:""),p=B(()=>u.value.map(Q=>({value:Q,label:rf(Q)}))),h=B(()=>o.planMode===!0),m=B(()=>o.goalMode===!0),k=B(()=>o.goal!==null&&["active","paused","blocked"].includes(o.goal?.status??"")),x=B(()=>{const Q=o.goal?.status;return Q?n(`status.goalStatus${Q[0].toUpperCase()}${Q.slice(1)}`):""});async function y(){await i({title:n("status.goalCancel"),message:n("status.goalCancelConfirm"),confirmLabel:n("status.goalCancelConfirmYes"),cancelLabel:n("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const w=B(()=>_9(o.uiFontSize));function _(Q){const me=sz(Q);me!==void 0&&s("setUiFontSize",me)}const A=B(()=>{const Q=o.status.permission;return Q==="yolo"?"var(--color-warning)":Q==="auto"?"var(--color-danger)":"var(--color-text-muted)"}),P=B(()=>{const Q=o.status.permission,me=n(Q==="yolo"?"mobile.permYoloSub":Q==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${Q} · ${me}`}),z=B(()=>o.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100))):0),L=B(()=>o.status.ctxMax>0?`${ba(o.status.ctxUsed)}/${ba(o.status.ctxMax)}`:n("status.statusNone"));function T(Q){s("setThinking",JN(a.value,Q))}function I(){const Q=r.indexOf(o.status.permission),me=r[(Q+1)%r.length];s("setPermission",me)}function N(){s("pickModel"),s("update:modelValue",!1)}function C(){s("login"),s("update:modelValue",!1)}const F=R1(),H=V("main"),D=V([]),M=V(!1),R=V(!1),O=V(""),U=V("archived-desc");async function Z(){if(!M.value){M.value=!0,R.value=!1;try{const Q=[];let me;for(;;){const xe=await F.loadArchivedSessions({beforeId:me,pageSize:mWe});if(Q.push(...xe.items),!xe.hasMore||xe.items.length===0)break;const Ye=xe.items.at(-1)?.id;if(Ye===void 0)break;me=Ye}D.value=Q,R.value=!0}catch(Q){console.warn("loadAllArchived failed",Q)}finally{M.value=!1}}}function q(){H.value="archived",O.value="",Z()}function te(){H.value="main"}const ee=B(()=>{const Q=O.value.trim().toLowerCase();let me=D.value.filter(xe=>xe.archived===!0);return Q&&(me=me.filter(xe=>xe.title.toLowerCase().includes(Q))),me=me.slice(),U.value==="archived-desc"?me.sort((xe,Ye)=>Ye.updatedAt.localeCompare(xe.updatedAt)):U.value==="created-desc"?me.sort((xe,Ye)=>Ye.createdAt.localeCompare(xe.createdAt)):me.sort((xe,Ye)=>xe.title.localeCompare(Ye.title,"en")),me});async function J(Q){await F.restoreSession(Q)&&(D.value=D.value.filter(xe=>xe.id!==Q))}function se(Q){const me=new Date(Q);if(Number.isNaN(me.getTime()))return Q;const xe=Ye=>String(Ye).padStart(2,"0");return`${me.getFullYear()}-${xe(me.getMonth()+1)}-${xe(me.getDate())} ${xe(me.getHours())}:${xe(me.getMinutes())}`}return Ke(()=>o.modelValue,Q=>{Q||(H.value="main")}),(Q,me)=>(g(),ue(wu,{"model-value":e.modelValue,title:v(n)("mobile.settingsTitle"),"onUpdate:modelValue":me[8]||(me[8]=xe=>s("update:modelValue",xe))},{default:ae(()=>[H.value==="main"?(g(),S(Ce,{key:0},[b("div",aVe,E(v(n)("mobile.groupSession")),1),b("button",{type:"button",class:"srow",onClick:N},[b("span",cVe,[b("span",uVe,E(v(n)("status.statusModel")),1),b("span",dVe,E(e.status.model),1)]),me[9]||(me[9]=b("span",{class:"chev"},"›",-1))]),b("div",fVe,[b("span",pVe,[b("span",hVe,E(v(n)("status.statusThinking")),1),c.value==="unsupported"?(g(),S("span",mVe,E(v(n)("status.modeNotSupported")),1)):Y("",!0)]),u.value.length>1?(g(),ue(di,{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":T},null,8,["model-value","options"])):(g(),S("span",{key:1,class:Be(["srow-val",{dim:d.value==="off"}])},E(d.value==="off"?v(n)("status.planOff"):v(rf)(d.value)),3))]),b("div",gVe,E(v(n)("status.cacheNote")),1),b("button",{type:"button",class:"srow",onClick:me[0]||(me[0]=xe=>s("togglePlan"))},[b("span",vVe,[b("span",yVe,E(v(n)("status.statusPlanMode")),1),b("span",wVe,E(v(n)("mobile.planModeSub")),1)]),b("span",{class:Be(["toggle",{on:h.value}]),role:"switch","aria-checked":h.value},null,10,kVe)]),k.value?(g(),S("div",bVe,[b("span",_Ve,[b("span",xVe,E(v(n)("status.goalLabel")),1),b("span",SVe,E(x.value),1)]),b("span",CVe,[e.goal?.status==="active"?(g(),ue(Nt,{key:0,variant:"secondary",size:"sm",onClick:me[1]||(me[1]=xe=>s("controlGoal","pause"))},{default:ae(()=>[He(E(v(n)("status.goalPause")),1)]),_:1})):Y("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),ue(Nt,{key:1,variant:"secondary",size:"sm",onClick:me[2]||(me[2]=xe=>s("controlGoal","resume"))},{default:ae(()=>[He(E(v(n)("status.goalResume")),1)]),_:1})):Y("",!0),W(Nt,{variant:"ghost",size:"sm",onClick:y},{default:ae(()=>[He(E(v(n)("status.goalCancel")),1)]),_:1})])])):(g(),S("button",{key:1,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:me[3]||(me[3]=xe=>s("toggleGoal"))},[b("span",AVe,[b("span",TVe,E(v(n)("status.goalLabel")),1),b("span",EVe,E(v(n)("mobile.goalModeSub")),1)]),b("span",{class:Be(["toggle",{on:m.value}])},null,2)],8,MVe)),b("button",{type:"button",class:"srow",role:"switch","aria-checked":e.dynamicWorkflowMode,onClick:me[4]||(me[4]=xe=>s("toggleWorkflow"))},[b("span",LVe,[b("span",$Ve,E(v(n)("status.statusDynamicWorkflowMode")),1),b("span",NVe,E(v(n)("mobile.workflowModeSub")),1)]),b("span",{class:Be(["toggle",{on:e.dynamicWorkflowMode}])},null,2)],8,IVe),b("button",{type:"button",class:"srow",onClick:I},[b("span",zVe,[b("span",BVe,E(v(n)("status.statusPermission")),1),b("span",{class:"srow-sub",style:Gt({color:A.value})},E(P.value),5)]),me[10]||(me[10]=b("span",{class:"chev"},"›",-1))]),b("div",RVe,[b("span",PVe,[b("span",FVe,E(v(n)("status.statusContext")),1),b("span",jVe,E(L.value),1)]),b("span",{class:"ctx-meter","aria-label":L.value},[b("i",{style:Gt({width:z.value+"%"})},null,4)],8,OVe)]),b("div",HVe,E(v(n)("mobile.groupApp")),1),b("button",{type:"button",class:"srow",onClick:q},[b("span",DVe,[b("span",VVe,E(v(n)("mobile.archivedSessions")),1),b("span",WVe,E(v(n)("mobile.archivedSessionsSub")),1)]),me[11]||(me[11]=b("span",{class:"chev"},"›",-1))]),b("div",qVe,[b("span",UVe,[b("span",ZVe,E(v(n)("theme.colorSchemeLabel")),1)]),W(di,{"model-value":e.colorScheme??"system",options:[{value:"light",label:v(n)("theme.light")},{value:"dark",label:v(n)("theme.dark")},{value:"system",label:v(n)("theme.system")}],"onUpdate:modelValue":l},null,8,["model-value","options"])]),b("div",KVe,[b("span",GVe,[b("span",YVe,E(v(n)("settings.uiFontSize")),1)]),W(di,{"model-value":w.value,options:v(ez),"aria-label":v(n)("settings.uiFontSize"),"onUpdate:modelValue":_},null,8,["model-value","options","aria-label"])]),b("button",{type:"button",class:"srow",onClick:me[5]||(me[5]=xe=>s("setConversationToc",!e.conversationToc))},[b("span",XVe,[b("span",JVe,E(v(n)("settings.conversationToc")),1),b("span",QVe,E(v(n)("settings.conversationTocHint")),1)]),b("span",{class:Be(["toggle",{on:e.conversationToc}]),role:"switch","aria-checked":e.conversationToc},null,10,eWe)]),b("button",{type:"button",class:"srow acct in",onClick:C},[b("span",tWe,[b("span",nWe,E(v(n)("settings.manageProviders")),1)])]),e.serverVersion?(g(),S("div",oWe,[b("span",sWe,[b("span",iWe,E(v(n)("settings.serverVersion")),1)]),b("span",lWe,E(e.serverVersion),1)])):Y("",!0)],64)):(g(),S(Ce,{key:1},[b("div",rWe,[b("button",{type:"button",class:"arch-back",onClick:te},[me[12]||(me[12]=b("span",{class:"chev back"},"‹",-1)),He(" "+E(v(n)("mobile.archivedBack")),1)]),b("span",aWe,E(v(n)("mobile.sessionCount",{n:ee.value.length})),1)]),b("div",cWe,[W(us,{class:"arch-search-input","model-value":O.value,size:"sm",placeholder:v(n)("settings.archivedSearch"),"onUpdate:modelValue":me[6]||(me[6]=xe=>O.value=xe)},null,8,["model-value","placeholder"]),W(di,{size:"sm","model-value":U.value,options:[{value:"archived-desc",label:v(n)("settings.archivedSortArchived")},{value:"created-desc",label:v(n)("settings.archivedSortCreated")},{value:"name-asc",label:v(n)("settings.archivedSortName")}],"onUpdate:modelValue":me[7]||(me[7]=xe=>U.value=xe)},null,8,["model-value","options"])]),M.value?(g(),S("div",uWe,E(v(n)("settings.archivedLoadingAll")),1)):ee.value.length>0?(g(!0),S(Ce,{key:1},rt(ee.value,xe=>(g(),S("div",{key:xe.id,class:"arch-row"},[b("div",dWe,[b("div",fWe,E(xe.title),1),b("div",pWe,E(v(n)("settings.archivedAt",{time:se(xe.updatedAt)})),1)]),W(Nt,{variant:"secondary",size:"sm",onClick:Ye=>J(xe.id)},{default:ae(()=>[He(E(v(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(g(),S("div",hWe,E(D.value.length===0?v(n)("settings.archivedEmpty"):v(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title"]))}}),vWe=vt(gWe,[["__scopeId","data-v-bcda0873"]]),yWe=["role","aria-modal","aria-label"],wWe={class:"wiz-rail"},kWe={class:"rail-inner"},bWe={class:"eyebrow-pill"},_We={class:"wiz-title"},xWe={class:"wiz-sub"},SWe={class:"pref-group"},CWe={class:"pref-label"},MWe={class:"theme-cards"},AWe=["onClick"],TWe={class:"opt-label"},EWe={class:"pref-group"},IWe={class:"pref-label"},LWe={class:"accent-cards"},$We=["onClick"],NWe={class:"opt-label"},zWe={key:1,class:"wiz-actions"},BWe={key:2,class:"wiz-hint"},RWe={key:0,class:"wiz-hero","aria-hidden":"true"},PWe={class:"hero-inner"},FWe={class:"hero-tagline"},jWe={class:"hero-sub"},OWe={class:"frost-stage"},HWe={class:"frost-card"},DWe={class:"frost-card"},VWe=Je({__name:"Onboarding",props:{embedded:{type:Boolean,default:!1}},emits:["complete","skip"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{colorScheme:s,accent:i,setColorScheme:l,setAccent:r}=M9(),a=[{value:"system",label:o("theme.system")},{value:"light",label:o("theme.light")},{value:"dark",label:o("theme.dark")}],c=[{value:"blue",label:o("theme.accentBlue")},{value:"mono",label:o("theme.accentBlack")}];return(u,d)=>(g(),S("div",{class:Be(["wizard",{"is-embedded":e.embedded}]),role:e.embedded?void 0:"dialog","aria-modal":e.embedded?void 0:"true","aria-label":e.embedded?void 0:v(o)("onboarding.title")},[b("div",wWe,[b("div",kWe,[e.embedded?Y("",!0):(g(),S(Ce,{key:0},[b("span",bWe,E(v(o)("onboarding.eyebrow")),1),W(df,{class:"brand-mark",size:"lg",animated:!1,label:"Pythinker Code"}),b("h1",_We,E(v(o)("onboarding.title")),1),b("p",xWe,E(v(o)("onboarding.subtitle")),1)],64)),b("div",SWe,[b("div",CWe,E(v(o)("theme.colorSchemeLabel")),1),b("div",MWe,[(g(),S(Ce,null,rt(a,f=>b("button",{key:f.value,type:"button",class:Be(["opt-card theme-card",{selected:v(s)===f.value}]),onClick:p=>v(l)(f.value)},[b("span",{class:Be(["theme-preview",`theme-preview--${f.value}`]),"aria-hidden":"true"},[f.value==="system"?(g(),S(Ce,{key:0},[d[2]||(d[2]=L0('',2))],64)):(g(),S(Ce,{key:1},[d[3]||(d[3]=b("span",{class:"theme-side"},null,-1)),d[4]||(d[4]=b("span",{class:"theme-lines"},[b("span"),b("span"),b("span")],-1))],64))],2),b("span",TWe,E(f.label),1)],10,AWe)),64))])]),b("div",EWe,[b("div",IWe,E(v(o)("theme.accentLabel")),1),b("div",LWe,[(g(),S(Ce,null,rt(c,f=>b("button",{key:f.value,type:"button",class:Be(["opt-card accent-card",{selected:v(i)===f.value}]),onClick:p=>v(r)(f.value)},[b("span",{class:Be(["opt-radio",{on:v(i)===f.value}])},null,2),b("span",{class:Be(["accent-swatch",`accent-swatch--${f.value}`]),"aria-hidden":"true"},null,2),b("span",NWe,E(f.label),1)],10,$We)),64))])]),e.embedded?Y("",!0):(g(),S("div",zWe,[W(Nt,{variant:"primary",size:"lg",class:"wiz-action","data-testid":"onboarding-complete",onClick:d[0]||(d[0]=f=>n("complete"))},{default:ae(()=>[b("span",null,E(v(o)("onboarding.start")),1),W(Ee,{name:"arrow-right",size:"sm"})]),_:1}),W(Nt,{variant:"secondary",size:"lg",class:"wiz-action","data-testid":"onboarding-skip",onClick:d[1]||(d[1]=f=>n("skip"))},{default:ae(()=>[b("span",null,E(v(o)("onboarding.skip")),1),W(Ee,{name:"arrow-right",size:"sm"})]),_:1})])),e.embedded?Y("",!0):(g(),S("p",BWe,E(v(o)("onboarding.hint")),1))])]),e.embedded?Y("",!0):(g(),S("aside",RWe,[d[7]||(d[7]=b("div",{class:"hero-ambient"},[b("span",{class:"orb orb-a"}),b("span",{class:"orb orb-b"}),b("span",{class:"orb orb-c"})],-1)),b("div",PWe,[W(df,{size:"hero",animated:!1,label:""}),b("p",FWe,E(v(o)("onboarding.heroTitle")),1),b("p",jWe,E(v(o)("onboarding.heroSub")),1),b("div",OWe,[b("figure",HWe,[d[5]||(d[5]=L0('',2)),b("figcaption",null,E(v(o)("onboarding.platformMac")),1)]),b("figure",DWe,[d[6]||(d[6]=L0('',2)),b("figcaption",null,E(v(o)("onboarding.platformWindows")),1)])])])]))],10,yWe))}}),fB=vt(VWe,[["__scopeId","data-v-2c24b7cb"]]),WWe=2e3;function qWe(e){const t=V("idle"),n=V(void 0),o=V(void 0),s=V(!1),i=V(!0),l=V(""),r=B(()=>t.value==="starting"||t.value==="exchanging"||t.value==="loading_models");let a,c,u=!1,d=!1;function f(){return t.value==="waiting_for_browser"||t.value==="waiting_for_code"}function p(){a!==void 0&&(clearInterval(a),a=void 0)}function h(){n.value=void 0,o.value=void 0,s.value=!1}function m(){c?.close(),c=void 0}function k(L){u||(l.value=L,t.value="failed",p(),m(),h())}async function x(L,T){if(u||n.value!==L||!f()&&t.value!=="exchanging"||T.state==="pending")return;if(p(),T.state==="failed"){k(T.message??"");return}if(T.state==="cancelled"){t.value="cancelled",m(),h();return}c=void 0,t.value="loading_models";let I=!0;try{I=await e?.()??!0}catch(N){k(N instanceof Error?N.message:String(N));return}finally{h()}u||(I?t.value="connected":k(""))}async function y(){if(u||d||!f())return;const L=n.value;if(L!==void 0){d=!0;try{await x(L,await Ct().getCodexLoginStatus(L))}catch{}finally{d=!1}}}function w(){y()}function _(){document.visibilityState==="visible"&&y()}async function A(){if(u||r.value||f())return;t.value="starting",l.value="",h();let L=null;try{L=typeof window>"u"?null:window.open("about:blank","_blank"),L!==null&&(L.opener=null,c=L)}catch{L?.close(),L=null}s.value=L===null;try{const T=Ct(),I=await T.startCodexLogin();if(u){m(),T.cancelCodexLogin(I.loginId).catch(()=>{});return}if(n.value=I.loginId,o.value=I.authorizeUrl,i.value=I.loopback,L!==null)try{L.location.href=I.authorizeUrl}catch{m(),s.value=!0}t.value=I.loopback?"waiting_for_browser":"waiting_for_code",p(),a=setInterval(()=>void y(),WWe)}catch(T){m(),k(T instanceof Error?T.message:String(T))}}async function P(L){const T=n.value;if(u||r.value||!f()||T===void 0)return;const I=t.value;t.value="exchanging",l.value="";try{await x(T,await Ct().submitCodexLoginRedirect(T,L)),!u&&t.value==="exchanging"&&(t.value=I)}catch(N){u||(l.value=N instanceof Error?N.message:String(N),t.value=I)}}async function z(){const L=n.value;if(p(),m(),h(),t.value="cancelled",l.value="",L!==void 0)try{await Ct().cancelCodexLogin(L)}catch{}}return In(()=>{window.addEventListener("focus",w),document.addEventListener("visibilitychange",_)}),En(()=>{u=!0,window.removeEventListener("focus",w),document.removeEventListener("visibilitychange",_),p(),m();const L=n.value;L!==void 0&&f()&&Ct().cancelCodexLogin(L).catch(()=>{})}),{phase:zl(t),busy:r,loginId:zl(n),authorizeUrl:zl(o),popupBlocked:zl(s),loopback:zl(i),error:zl(l),start:A,submitRedirect:P,cancel:z}}const UWe={class:"codex-signin"},ZWe={key:0,class:"codex-signin__denied",role:"status"},KWe={key:1,class:"codex-signin__ok",role:"status"},GWe={class:"codex-signin__status",role:"status"},YWe={key:0,class:"codex-signin__hint"},XWe=["href"],JWe={class:"codex-signin__hint"},QWe={key:2,class:"codex-signin__error",role:"alert"},eqe={class:"codex-signin__actions"},tqe=Je({__name:"CodexSignIn",emits:["connected"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=V(""),l=qWe(async()=>{await s.refreshRuntimeState();const a=s.authReady.value;return a&&n("connected"),a});async function r(){const a=i.value.trim();a!==""&&(await l.submitRedirect(a),i.value="")}return(a,c)=>(g(),S("div",UWe,[v(l).phase.value==="idle"||v(l).phase.value==="cancelled"?(g(),S(Ce,{key:0},[v(l).phase.value==="cancelled"?(g(),S("p",ZWe,E(v(o)("login.deniedTitle")),1)):Y("",!0),W(Nt,{variant:"primary","data-testid":"codex-signin-start",onClick:c[0]||(c[0]=u=>v(l).start())},{default:ae(()=>[W(Ee,{name:"log-in",size:"sm"}),b("span",null,E(v(o)("codexLogin.signIn")),1)]),_:1})],64)):v(l).phase.value==="connected"?(g(),S("p",KWe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,E(v(o)("codexLogin.connected")),1)])):(g(),S(Ce,{key:2},[b("p",GWe,[v(l).busy.value||v(l).phase.value!=="failed"?(g(),ue(Zo,{key:0,size:"sm"})):Y("",!0),b("span",null,E(v(o)(`codexLogin.phase.${v(l).phase.value}`)),1)]),v(l).authorizeUrl.value?(g(),S("p",YWe,[He(E(v(o)("codexLogin.openLinkHint"))+" ",1),b("a",{href:v(l).authorizeUrl.value,target:"_blank",rel:"noreferrer noopener"},E(v(o)("codexLogin.openLink")),9,XWe)])):Y("",!0),v(l).phase.value==="waiting_for_code"||v(l).phase.value==="exchanging"?(g(),S("form",{key:1,class:"codex-signin__paste",onSubmit:xt(r,["prevent"])},[b("p",JWe,E(v(o)("codexLogin.pasteHint")),1),W(Ir,{label:v(o)("codexLogin.pasteLabel")},{default:ae(()=>[W(us,{modelValue:i.value,"onUpdate:modelValue":c[1]||(c[1]=u=>i.value=u),placeholder:v(o)("codexLogin.pastePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),W(Nt,{type:"submit",variant:"primary",loading:v(l).busy.value},{default:ae(()=>[He(E(v(o)("codexLogin.submit")),1)]),_:1},8,["loading"])],32)):Y("",!0),v(l).error.value?(g(),S("p",QWe,E(v(o)("codexLogin.failed",{message:v(l).error.value})),1)):Y("",!0),b("div",eqe,[v(l).phase.value==="failed"?(g(),ue(Nt,{key:0,variant:"primary",onClick:c[2]||(c[2]=u=>v(l).start())},{default:ae(()=>[He(E(v(o)("codexLogin.retry")),1)]),_:1})):(g(),ue(Nt,{key:1,variant:"secondary",onClick:c[3]||(c[3]=u=>v(l).cancel())},{default:ae(()=>[He(E(v(o)("codexLogin.cancel")),1)]),_:1}))])],64))]))}}),nqe=vt(tqe,[["__scopeId","data-v-3bd16f58"]]),oqe=["aria-label"],sqe={class:"first-run__panel"},iqe={class:"first-run__steps"},lqe={class:"first-run__dot"},rqe={key:0,class:"first-run__body"},aqe={class:"first-run__sub"},cqe={key:0,class:"first-run__options"},uqe={class:"first-run__option-main"},dqe={class:"first-run__option-name"},fqe={class:"first-run__option-desc"},pqe={class:"first-run__badge"},hqe={class:"first-run__option-main"},mqe={class:"first-run__option-name"},gqe={class:"first-run__option-desc"},vqe={class:"first-run__option-main"},yqe={class:"first-run__option-name"},wqe={class:"first-run__option-desc"},kqe={key:1,class:"first-run__route"},bqe={class:"first-run__actions"},_qe={key:2,class:"first-run__skip-hint"},xqe={key:1,class:"first-run__body"},Sqe={class:"first-run__sub"},Cqe={key:0,class:"first-run__empty"},Mqe={key:1,class:"first-run__models"},Aqe=["data-testid","onClick"],Tqe={class:"first-run__model-id"},Eqe={key:0,class:"first-run__badge"},Iqe={class:"first-run__model-ctx"},Lqe={class:"first-run__actions"},$qe={key:2,class:"first-run__body"},Nqe={class:"first-run__sub"},zqe={class:"first-run__ready"},Bqe={class:"first-run__actions"},Rqe=Je({__name:"FirstRun",emits:["complete"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=V("connect"),l=V(null),r=V(null),a=V(!1),c=V(!1),u=["connect","model","appearance"],d=B(()=>u.indexOf(i.value)),f=B(()=>(s.models.value??[]).filter(T=>T.capabilities===void 0||T.capabilities.length===0||T.capabilities.some(I=>I.trim().toLowerCase()==="tool_use"))),p=B(()=>s.defaultModel.value??void 0),h=B(()=>{const T=p.value;return f.value.toSorted((I,N)=>I.id===T?-1:N.id===T?1:N.maxContextSize-I.maxContextSize||I.id.localeCompare(N.id))}),m=B(()=>a.value?h.value:h.value.slice(0,5)),k=B(()=>(s.providers.value??[])[0]?.id??""),x=B(()=>s.authReady.value&&f.value.length>0),y=B(()=>r.value!==null);Ke([p,f],()=>{r.value===null&&(r.value=p.value??f.value[0]?.id??null)},{immediate:!0});function w(){x.value&&(i.value="model")}async function _(){const T=r.value;if(!(T===null||c.value)){c.value=!0;try{T!==s.defaultModel.value&&await s.updateConfig({defaultModel:T}),await s.refreshRuntimeState(),s.authReady.value&&(i.value="appearance")}finally{c.value=!1}}}function A(){s.setOnboarded(!0),n("complete")}function P(){A()}function z(T){l.value=T}async function L(){await s.refreshRuntimeState(),x.value&&w()}return(T,I)=>(g(),S("div",{class:"first-run",role:"dialog","aria-modal":"true","aria-label":v(o)("firstRun.connect.title")},[b("div",sqe,[b("ol",iqe,[(g(),S(Ce,null,rt(u,(N,C)=>b("li",{key:N,class:Be(["first-run__step",{"is-current":C===d.value,"is-done":Cz("codex"))},[b("span",uqe,[b("span",dqe,E(v(o)("firstRun.connect.codexName")),1),b("span",fqe,E(v(o)("firstRun.connect.codexDesc")),1)]),b("span",pqe,E(v(o)("firstRun.connect.codexBadge")),1)]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-catalog",onClick:I[1]||(I[1]=N=>z("catalog"))},[b("span",hqe,[b("span",mqe,E(v(o)("firstRun.connect.catalogName")),1),b("span",gqe,E(v(o)("firstRun.connect.catalogDesc")),1)]),W(Ee,{name:"chevron-right",size:"sm"})]),b("button",{type:"button",class:"first-run__option","data-testid":"first-run-route-manual",onClick:I[2]||(I[2]=N=>z("manual"))},[b("span",vqe,[b("span",yqe,E(v(o)("firstRun.connect.manualName")),1),b("span",wqe,E(v(o)("firstRun.connect.manualDesc")),1)]),W(Ee,{name:"chevron-right",size:"sm"})])])):(g(),S("div",kqe,[l.value==="codex"?(g(),ue(nqe,{key:0,onConnected:L})):(g(),ue(uB,{key:1,config:v(s).config.value,"initial-source":l.value==="manual"?"manual":"catalog",onAdded:L,onCancel:I[3]||(I[3]=N=>l.value=null)},null,8,["config","initial-source"])),W(Nt,{variant:"ghost",size:"sm",onClick:I[4]||(I[4]=N=>l.value=null)},{default:ae(()=>[He(E(v(o)("firstRun.connect.back")),1)]),_:1})])),b("div",bqe,[W(Nt,{variant:"ghost","data-testid":"first-run-skip",onClick:P},{default:ae(()=>[He(E(v(o)("firstRun.connect.skip")),1)]),_:1}),I[8]||(I[8]=b("span",{class:"first-run__spacer"},null,-1)),x.value?(g(),ue(Nt,{key:0,variant:"primary","data-testid":"first-run-connect-continue",onClick:w},{default:ae(()=>[He(E(v(o)("firstRun.continue")),1)]),_:1})):Y("",!0)]),l.value===null?(g(),S("p",_qe,E(v(o)("firstRun.connect.skipHint")),1)):Y("",!0)])):i.value==="model"?(g(),S("section",xqe,[b("h1",null,E(v(o)("firstRun.model.title")),1),b("p",Sqe,E(v(o)("firstRun.model.connected",{provider:k.value,count:f.value.length},f.value.length))+" "+E(v(o)("firstRun.model.subtitle")),1),f.value.length===0?(g(),S("p",Cqe,E(v(o)("firstRun.model.none")),1)):(g(),S("ul",Mqe,[(g(!0),S(Ce,null,rt(m.value,N=>(g(),S("li",{key:N.id},[b("button",{type:"button",class:Be(["first-run__model",{"is-selected":r.value===N.id}]),"data-testid":`first-run-model-${N.id}`,onClick:C=>r.value=N.id},[I[9]||(I[9]=b("span",{class:"first-run__radio","aria-hidden":"true"},null,-1)),b("span",Tqe,E(N.id),1),N.id===p.value?(g(),S("span",Eqe,E(v(o)("firstRun.model.recommended")),1)):Y("",!0),b("span",Iqe,E(Math.round(N.maxContextSize/1e3))+"K",1)],10,Aqe)]))),128))])),h.value.length>5?(g(),ue(Nt,{key:2,variant:"ghost",size:"sm",onClick:I[5]||(I[5]=N=>a.value=!a.value)},{default:ae(()=>[He(E(a.value?v(o)("firstRun.model.showFewer"):v(o)("firstRun.model.showAll",{count:h.value.length})),1)]),_:1})):Y("",!0),b("div",Lqe,[W(Nt,{variant:"secondary",onClick:I[6]||(I[6]=N=>i.value="connect")},{default:ae(()=>[He(E(v(o)("firstRun.back")),1)]),_:1}),I[10]||(I[10]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary",loading:c.value,disabled:!y.value,"data-testid":"first-run-model-continue",onClick:_},{default:ae(()=>[He(E(v(o)("firstRun.continue")),1)]),_:1},8,["loading","disabled"])])])):(g(),S("section",$qe,[b("h1",null,E(v(o)("firstRun.appearance.title")),1),b("p",Nqe,E(v(o)("firstRun.appearance.subtitle")),1),W(fB,{embedded:"",onComplete:A,onSkip:A}),b("p",zqe,[W(Ee,{name:"circle-check",size:"sm"}),b("span",null,E(v(o)("firstRun.appearance.ready",{model:r.value??""})),1)]),b("div",Bqe,[W(Nt,{variant:"secondary",onClick:I[7]||(I[7]=N=>i.value="model")},{default:ae(()=>[He(E(v(o)("firstRun.back")),1)]),_:1}),I[11]||(I[11]=b("span",{class:"first-run__spacer"},null,-1)),W(Nt,{variant:"primary","data-testid":"first-run-finish",onClick:A},{default:ae(()=>[He(E(v(o)("firstRun.appearance.finish")),1)]),_:1})])]))])],8,oqe))}}),Pqe=vt(Rqe,[["__scopeId","data-v-23e77d0d"]]),Fqe={class:"recovery"},jqe={class:"recovery__inner"},Oqe={class:"recovery__mark","aria-hidden":"true"},Hqe={class:"recovery__copy"},Dqe={class:"recovery__options"},Vqe={class:"recovery__option-name"},Wqe={class:"recovery__option-desc"},qqe={class:"recovery__option-name"},Uqe={class:"recovery__option-desc"},Zqe={class:"recovery__actions"},Kqe=Je({__name:"Recovery",emits:["openProviders","dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=R1(),i=B(()=>s.providers.value??[]),l=B(()=>i.value[0]),r=B(()=>i.value.length===0?"noProvider":i.value.some(u=>u.status==="connected")?"noModel":"credential"),a=B(()=>r.value==="noProvider"?o("recovery.noProvider"):o(`recovery.${r.value}`,{provider:l.value?.id??""}));async function c(){await s.refreshRuntimeState()}return(u,d)=>(g(),S("section",Fqe,[b("div",jqe,[b("span",Oqe,[W(Ee,{name:"alert-triangle",size:"md"})]),b("div",Hqe,[b("h1",null,E(v(o)("recovery.title")),1),b("p",null,E(a.value),1)]),b("div",Dqe,[r.value!=="noProvider"?(g(),S("button",{key:0,type:"button",class:"recovery__option is-primary","data-testid":"recovery-open-providers",onClick:d[0]||(d[0]=f=>n("openProviders"))},[b("span",Vqe,E(v(o)("recovery.fixProvider")),1),b("span",Wqe,E(v(o)("recovery.fixProviderDesc")),1)])):Y("",!0),b("button",{type:"button",class:Be(["recovery__option",{"is-primary":r.value==="noProvider"}]),"data-testid":"recovery-add-provider",onClick:d[1]||(d[1]=f=>n("openProviders"))},[b("span",qqe,E(v(o)("recovery.addProvider")),1),b("span",Uqe,E(v(o)("recovery.addProviderDesc")),1)],2)]),b("div",Zqe,[W(Nt,{variant:"secondary","data-testid":"recovery-retry",onClick:c},{default:ae(()=>[He(E(v(o)("recovery.retry")),1)]),_:1}),W(Nt,{variant:"ghost","data-testid":"recovery-dismiss",onClick:d[2]||(d[2]=f=>n("dismiss"))},{default:ae(()=>[He(E(v(o)("recovery.dismiss")),1)]),_:1})])])]))}}),Gqe=vt(Kqe,[["__scopeId","data-v-68311778"]]),Yqe="/logo.png",Xqe=["aria-label"],Jqe={class:"gload-box"},Qqe={class:"gload-text"},eUe={key:0,class:"gload-issue"},tUe={class:"gload-issue-detail"},nUe=Je({__name:"GlobalLoading",props:{issue:{}},setup(e){const{t}=$t();return(n,o)=>(g(),S("div",{class:"gload",role:"status","aria-label":v(t)("app.connecting")},[b("div",Jqe,[o[0]||(o[0]=b("img",{class:"gload-logo",src:Yqe,alt:"Pythinker",width:"120",height:"120"},null,-1)),W(Zo,{size:"md",label:v(t)("app.connecting")},null,8,["label"]),b("div",Qqe,E(v(t)("app.connecting")),1),e.issue?(g(),S("div",eUe,[b("div",null,E(v(t)("app.connectRetrying")),1),b("div",tUe,E(e.issue),1)])):Y("",!0)])],8,Xqe))}}),oUe=vt(nUe,[["__scopeId","data-v-2468172e"]]),sUe={class:"kap-root"},iUe={class:"kap-head"},lUe={class:"kap-count"},rUe={class:"kap-head-actions"},aUe={class:"kap-filters"},cUe=["value"],uUe={class:"kap-check"},dUe={class:"kap-check"},fUe={class:"kap-view-toggle",role:"group"},pUe={key:0,class:"kap-empty"},hUe=["onClick"],mUe={class:"kap-ts"},gUe={class:"kap-label"},vUe={key:0,class:"kap-detail"},yUe={class:"kap-detail-actions"},wUe=["onClick"],kUe={key:1,class:"kap-agg"},bUe={class:"mono"},_Ue={class:"mono"},xUe={class:"num"},SUe={class:"num"},CUe={key:0},MUe={class:"mono"},AUe={class:"num"},TUe={class:"num"},EUe={key:0},IUe=Je({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=V("all"),s=V(""),i=V(""),l=V(!1),r=V("timeline"),a=B(()=>(l9.value,[...wge()])),c=B(()=>{const T=new Set;for(const I of a.value)I.sessionId&&T.add(I.sessionId);return[...T].sort()});function u(T){return T.kind==="rest:error"||T.code!==void 0&&T.code!==0||T.eventType==="error"||T.eventType==="parse-error"}const d=B(()=>{const T=s.value.trim().toLowerCase();return a.value.filter(I=>!(o.value!=="all"&&I.source!==o.value||i.value&&I.sessionId!==i.value||l.value&&!u(I)||T&&!`${I.label} ${I.kind} ${I.eventType??""} ${I.sessionId??""} ${I.requestId??""}`.toLowerCase().includes(T)))}),f=B(()=>{const T=new Map;for(const I of d.value){if(I.kind!=="ws:in"&&I.kind!=="ws:out")continue;const N=I.kind==="ws:in"?"←":"→",C=`${N} ${I.eventType??"?"} @ ${I.sessionId??"-"}`,F=T.get(C)??{key:C,sessionId:I.sessionId??"-",eventType:I.eventType??"?",dir:N,count:0};F.count++,I.seq!==void 0&&(F.lastSeq=I.seq),T.set(C,F)}return[...T.values()].sort((I,N)=>N.count-I.count)}),p=B(()=>{const T=new Map;for(const I of d.value){if(I.source!=="rest"||I.kind==="rest:request")continue;const N=`${I.method??"?"} ${I.path??"?"}`,C=T.get(N)??{count:0,errors:0,totalMs:0,timed:0};C.count++,u(I)&&C.errors++,I.durationMs!==void 0&&(C.totalMs+=I.durationMs,C.timed++),T.set(N,C)}return[...T.entries()].map(([I,N])=>({key:I,count:N.count,errors:N.errors,avgMs:N.timed>0?Math.round(N.totalMs/N.timed):0})).sort((I,N)=>N.count-I.count)}),h=V(null),m=V(!0),k=V(null),x=V(null);Ke(()=>d.value.length,async()=>{if(!m.value||r.value!=="timeline")return;await yt();const T=k.value;T&&(T.scrollTop=T.scrollHeight)});function y(T){h.value=h.value===T?null:T}function w(T){const I=new Date(T),N=(C,F=2)=>String(C).padStart(F,"0");return`${N(I.getHours())}:${N(I.getMinutes())}:${N(I.getSeconds())}.${N(I.getMilliseconds(),3)}`}function _(T){return JSON.stringify(T,null,2)}async function A(T){await fs(_(T))&&(x.value=T.id,setTimeout(()=>{x.value===T.id&&(x.value=null)},1500))}function P(){IN(d.value)}function z(T){return u(T)||T.source==="client"?"b-err":T.source==="rest"?"b-rest":T.kind==="ws:lifecycle"?"b-life":T.kind==="ws:out"?"b-out":"b-in"}function L(T){return T.source==="rest"?"REST":T.source==="client"?"APP":"WS"}return(T,I)=>(g(),S("section",sUe,[b("header",iUe,[I[11]||(I[11]=b("strong",null,"KAP debug",-1)),b("span",lUe,E(d.value.length)+"/"+E(a.value.length),1),b("div",rUe,[b("button",{type:"button",class:Be({on:v(e2)}),onClick:I[0]||(I[0]=N=>e2.value=!v(e2))},E(v(e2)?"resume":"pause"),3),b("button",{type:"button",onClick:I[1]||(I[1]=N=>v(kge)())},"clear"),b("button",{type:"button",onClick:I[2]||(I[2]=N=>P())},"export jsonl"),W(Cn,{text:"Close window"},{default:ae(()=>[b("button",{type:"button",onClick:I[3]||(I[3]=N=>n("close"))},"✕")]),_:1})])]),b("div",aUe,[Jn(b("select",{"onUpdate:modelValue":I[4]||(I[4]=N=>o.value=N),"aria-label":"Source filter"},[...I[12]||(I[12]=[b("option",{value:"all"},"rest + ws + app",-1),b("option",{value:"rest"},"rest",-1),b("option",{value:"ws"},"ws",-1),b("option",{value:"client"},"app errors",-1)])],512),[[_8,o.value]]),Jn(b("select",{"onUpdate:modelValue":I[5]||(I[5]=N=>i.value=N),"aria-label":"Session filter"},[I[13]||(I[13]=b("option",{value:""},"all sessions",-1)),(g(!0),S(Ce,null,rt(c.value,N=>(g(),S("option",{key:N,value:N},E(N),9,cUe))),128))],512),[[_8,i.value]]),Jn(b("input",{"onUpdate:modelValue":I[6]||(I[6]=N=>s.value=N),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[js,s.value]]),b("label",uUe,[Jn(b("input",{"onUpdate:modelValue":I[7]||(I[7]=N=>l.value=N),type:"checkbox"},null,512),[[n5,l.value]]),I[14]||(I[14]=He(" errors",-1))]),b("label",dUe,[Jn(b("input",{"onUpdate:modelValue":I[8]||(I[8]=N=>m.value=N),type:"checkbox"},null,512),[[n5,m.value]]),I[15]||(I[15]=He(" follow",-1))]),b("div",fUe,[b("button",{type:"button",class:Be({on:r.value==="timeline"}),onClick:I[9]||(I[9]=N=>r.value="timeline")},"timeline",2),b("button",{type:"button",class:Be({on:r.value==="aggregate"}),onClick:I[10]||(I[10]=N=>r.value="aggregate")},"aggregate",2)])]),r.value==="timeline"?(g(),S("div",{key:0,ref_key:"listRef",ref:k,class:"kap-list"},[d.value.length===0?(g(),S("div",pUe," No trace entries yet. REST calls and WS frames will appear here. ")):Y("",!0),(g(!0),S(Ce,null,rt(d.value,N=>(g(),S("div",{key:N.id,class:"kap-row-wrap"},[b("button",{type:"button",class:Be(["kap-row",{expanded:h.value===N.id}]),onClick:C=>y(N.id)},[b("span",mUe,E(w(N.ts)),1),b("span",{class:Be(["kap-badge",z(N)])},E(L(N)),3),b("span",gUe,E(N.label),1)],10,hUe),h.value===N.id?(g(),S("div",vUe,[b("div",yUe,[b("button",{type:"button",onClick:C=>A(N)},E(x.value===N.id?"copied ✓":"copy json"),9,wUe)]),b("pre",null,E(_(N)),1)])):Y("",!0)]))),128))],512)):(g(),S("div",kUe,[I[20]||(I[20]=b("h4",null,"WS frames by session / type",-1)),b("table",null,[I[17]||(I[17]=b("thead",null,[b("tr",null,[b("th",null,"dir"),b("th",null,"type"),b("th",null,"session"),b("th",null,"count"),b("th",null,"last seq")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,rt(f.value,N=>(g(),S("tr",{key:N.key},[b("td",null,E(N.dir),1),b("td",bUe,E(N.eventType),1),b("td",_Ue,E(N.sessionId),1),b("td",xUe,E(N.count),1),b("td",SUe,E(N.lastSeq??"—"),1)]))),128)),f.value.length===0?(g(),S("tr",CUe,[...I[16]||(I[16]=[b("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):Y("",!0)])]),I[21]||(I[21]=b("h4",null,"REST by endpoint",-1)),b("table",null,[I[19]||(I[19]=b("thead",null,[b("tr",null,[b("th",null,"endpoint"),b("th",null,"count"),b("th",null,"errors"),b("th",null,"avg ms")])],-1)),b("tbody",null,[(g(!0),S(Ce,null,rt(p.value,N=>(g(),S("tr",{key:N.key},[b("td",MUe,E(N.key),1),b("td",AUe,E(N.count),1),b("td",{class:Be(["num",{err:N.errors>0}])},E(N.errors),3),b("td",TUe,E(N.avgMs),1)]))),128)),p.value.length===0?(g(),S("tr",EUe,[...I[18]||(I[18]=[b("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):Y("",!0)])])]))]))}}),LUe=vt(IUe,[["__scopeId","data-v-7bab00af"]]),$Ue=Je({__name:"DebugPanel",setup(e){const t=V(!1);let n=null,o=null,s=null;const i=["data-color-scheme","data-accent"];function l(u){const d=document.documentElement,f=u.documentElement;for(const p of i){const h=d.getAttribute(p);h!==null?f.setAttribute(p,h):f.removeAttribute(p)}}function r(u){const d=u.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const h of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(h.cloneNode(!0));l(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function c(){if(n&&!n.closed){n.focus();return}const u=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!u)return;n=u;const d=r(u),f=o5(LUe,{onClose:()=>u.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&l(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),u.addEventListener("pagehide",a),u.addEventListener("beforeunload",a)}return In(()=>{c()}),vo(()=>{n&&!n.closed&&n.close(),a()}),(u,d)=>(g(),ue(Cn,{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:ae(()=>[b("button",{class:"kap-fab",type:"button",onClick:c}," KAP ")]),_:1},8,["text"]))}}),NUe=vt($Ue,[["__scopeId","data-v-992ae84c"]]);function zUe({client:e}){const t=B(()=>e.appState.value==="first-run"||e.appState.value==="recovery"),n="/login",o=V(null);function s(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function i(l){typeof window>"u"||window.history.replaceState(window.history.state,"",l)}return Ke(t,l=>{if(!(typeof window>"u")){if(l){window.location.pathname!==n&&(o.value=s(),i(n));return}window.location.pathname===n&&(i(o.value??"/"),o.value=null)}},{immediate:!0}),{showAuthGate:t}}function BUe({running:e,showAuthGate:t}){const{t:n}=$t(),o=B(()=>{const s=e.value?`${af[0]} `:"";return t.value?`${s}${n("app.authPageTitle")} - Pythinker Code Web`:`${s}Pythinker Code Web`});iA(()=>{typeof document<"u"&&(document.title=o.value)})}function RUe(e,t,n){const o=new Map(e.attachments.map(a=>[a.attachmentId,a])),s=new Map(e.tasks.map(a=>[a.taskId,a])),i=e.items.find(a=>a.kind==="turn"),l=e.items.findLast(a=>a.kind==="turn"),r=e.items.flatMap(a=>a.kind==="turn"?PUe(a,o,s,{...n,startedAt:a.turnId===i?.turnId?t?.createdAt:void 0,endedAt:a.turnId===l?.turnId?t?.disposedAt:void 0}):[]);return M2(r,[],a=>n.getFileUrl(a),e.meta.activity==="turn")}function PUe(e,t,n,o){const s=[],i=HUe([e.startedAt,...e.steps.map(c=>c.startedAt),o.startedAt]),l=jd(e.endedAt)??jd(o.endedAt),r=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const c=[{type:"text",text:e.prompt}];for(const u of e.attachmentIds??[]){const d=jUe(t.get(u));d!==void 0&&c.push(d)}s.push({id:`${e.turnId}:input`,sessionId:o.sessionId,role:"user",content:c,createdAt:i,promptId:r,metadata:{origin:e.origin}})}for(const c of e.steps){const u=jd(c.startedAt)??i;for(const d of c.frames){if(d.kind==="text"){if(d.text.length===0||d.role==="user"&&d.taskId===void 0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:d.role,content:[{type:"text",text:d.text}],createdAt:u,promptId:r,metadata:d.taskId===void 0?void 0:{origin:{kind:"task",taskId:d.taskId},task:n.get(d.taskId),[$$]:FUe(d.taskId,d.text,n.get(d.taskId))}});continue}if(d.kind==="thinking"){if(d.text.length===0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:"assistant",content:[{type:"thinking",thinking:d.text,startedAt:u,durationMs:MM(u,jd(c.endedAt))}],createdAt:u,promptId:r});continue}d.kind==="tool"&&(s.push({id:`${d.frameId}:call`,sessionId:o.sessionId,role:"assistant",content:[{type:"toolUse",toolCallId:d.toolCallId,toolName:d.name,input:d.input??d.display??{},outputLines:d.state==="running"?OUe(d.output):void 0}],createdAt:u,promptId:r}),d.state!=="running"&&s.push({id:`${d.frameId}:result`,sessionId:o.sessionId,role:"tool",content:[{type:"toolResult",toolCallId:d.toolCallId,output:d.output??d.error??"",isError:d.state==="error"}],createdAt:jd(c.endedAt)??u,promptId:r}))}}const a=e.durationMs??MM(i,l);if(a!==void 0){const c=s.findLastIndex(u=>u.role==="assistant");c>=0&&(s[c]={...s[c],durationMs:a})}return s}function FUe(e,t,n){if(N$(t).length>0)return;const[o="",...s]=t.split(` `),i=n?.state??"info";return{id:`task:${e}:${i}`,category:"task",type:`task.${i}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:o.trim(),severity:i==="completed"?"info":"warning",body:s.join(` `).trim(),raw:t}}function jUe(e){if(e?.source===void 0)return;const t=e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId};if(e.mediaType.startsWith("image/"))return{type:"image",source:t};if(e.mediaType.startsWith("video/"))return{type:"video",source:t};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}function OUe(e){if(e==null)return;if(typeof e=="string")return e.split(` `);if(!Array.isArray(e))return[JSON.stringify(e)];const t=[];for(const n of e){if(typeof n=="string"){t.push(...n.split(` `));continue}if(n===null||typeof n!="object")continue;const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` `)):o.type==="think"&&typeof o.think=="string"&&t.push(...o.think.split(` -`))}return t.length>0?t:void 0}function jd(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function HUe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const fB=V(typeof window>"u"?0:window.innerWidth);let i4=0,cp=!1;function ig(){fB.value=window.innerWidth}function DUe(){cp||typeof window>"u"||(window.addEventListener("resize",ig),cp=!0,ig())}function VUe(){!cp||typeof window>"u"||(window.removeEventListener("resize",ig),cp=!1)}function pB(e,t,n){return Math.max(t,e-n)}function lg(e,t,n){return Math.min(n,Math.max(t,e))}function hB(){return In(()=>{i4+=1,DUe()}),vo(()=>{i4=Math.max(0,i4-1),i4===0&&VUe()}),{viewportWidth:fB}}const WUe="pythinker-web.file-preview-width",Vc=320;function qUe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=hB(),i=B(()=>Math.max(0,s.value-t.value)),l=B(()=>pB(i.value,Vc,Vc));function r(F){return lg(Math.round(F),Vc,l.value)}function a(){return r(i.value/2)}const c=B(()=>a()),u=V(c.value),d=B(()=>lg(u.value,Vc,l.value)),f=V(null),p=B(()=>{const F=f.value;if(!F)return null;const K=e.turns.value.find(he=>he.id===F.turnId);return K?.role==="compaction"&&K.text?K.text:null}),h=B(()=>p.value!==null);function m(F){n.value="compaction",f.value=F}function k(){f.value=null,n.value==="compaction"&&(n.value=null)}const x=V(null),y=B(()=>{const F=x.value;if(!F)return{entry:void 0,version:0};const K=e.auxiliaryTranscripts.getEntry(F.sessionId,F.subagentId);return{entry:K,version:K?.version.value??0}});function w(F){const K=e.activeAppTasks.value.find(he=>he.agentId===F||he.id===F||he.backgroundTaskId===F||he.parentToolCallId===F);return K?.agentId??K?.id??F}const _=B(()=>{const F=x.value;if(!F)return null;const K=e.activeAppTasks.value.find(et=>et.agentId===F.subagentId||et.id===F.subagentId||et.backgroundTaskId===F.subagentId);if(K)return Hxe(K);const he=y.value.entry?.channel;if(!he)return null;const ye=he.agents.find(et=>et.agentId===F.subagentId),ve=he.snapshot.items.findLast(et=>et.kind==="turn"),ie=he.snapshot.meta.activity==="turn",de=he.loading,be=ve?.kind==="turn"&&ve.state==="failed",Se=ve?.kind==="turn"&&ve.state==="cancelled",je=he.refreshError&&ve===void 0;return{id:F.subagentId,name:ye?.label??F.subagentId,subagentType:ye?.type==="sub"?"subagent":ye?.type,phase:ie?"working":Se?"cancelled":be||je?"failed":de?"queued":"completed",status:ie||de?"running":Se?"cancelled":be||je?"failed":"completed"}}),A=B(()=>{const F=x.value,K=y.value.entry?.channel;if(!F||!K)return[];const he=K.agents.find(ye=>ye.agentId===F.subagentId);return RUe(K.snapshot,he,{sessionId:F.sessionId,getFileUrl:ye=>e.getFileUrl(ye)})}),P=B(()=>y.value.entry?.channel.loading??!1),z=B(()=>y.value.entry?.channel.refreshError??!1),L=B(()=>y.value.entry?.channel.loadingOlder??!1),E=B(()=>y.value.entry?.channel.loadOlderError??!1),T=B(()=>y.value.entry?.channel.snapshot.hasMoreOlder??!1),$=B(()=>y.value.entry?.channel.snapshot.meta.activity==="turn"),C=B(()=>_.value!==null);function j(F){const K=e.activeSessionId.value;if(!F||!K)return;const he=w(F),ye=x.value;ye&&ye.subagentId!==he&&e.auxiliaryTranscripts.deactivate(ye.sessionId,ye.subagentId),x.value={sessionId:K,subagentId:he},n.value="agent",e.auxiliaryTranscripts.activate(K,he)}function H(){const F=x.value;F&&e.auxiliaryTranscripts.deactivate(F.sessionId,F.subagentId),x.value=null,n.value==="agent"&&(n.value=null)}Ke(n,(F,K)=>{if(K!=="agent"||F==="agent")return;const he=x.value;he&&e.auxiliaryTranscripts.deactivate(he.sessionId,he.subagentId)});function D(){y.value.entry?.channel.loadOlder().catch(()=>{})}const M=V(null),R=B(()=>{const F=M.value;if(!F)return null;const K=tee(e.turns.value,F);return K?{id:F,title:ni(K.name),path:Hg(K.arg),lines:K.status==="error"?null:Og(K),output:K.output}:null}),O=B(()=>R.value!==null);function U(F){n.value="toolDiff",M.value=F}function Z(){M.value=null,n.value==="toolDiff"&&(n.value=null)}const q=V("list"),te=V(null);function ee(){n.value="diff",q.value="list",te.value=null,e.loadGitStatus(e.activeSessionId.value)}function J(){n.value==="diff"&&(n.value=null),q.value="list",te.value=null,e.clearFileDiff()}async function se(F){q.value="detail",te.value=F,await e.loadFileDiff(F)}async function Q(F){!e.activeSessionId.value&&e.activeWorkspaceId.value?await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,F):await e.openSideChat(F),n.value="btw"}function me(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function xe(){n.value==="btw"&&(n.value=null)}const Ye=B(()=>e.sideChatVisible.value),at=B(()=>n.value!==null&&(n.value!=="compaction"||h.value)&&(n.value!=="agent"||C.value)&&(n.value!=="toolDiff"||O.value)&&(n.value!=="btw"||Ye.value)),X=V(!1);function oe(){return n.value==="compaction"&&h.value?(k(),!0):n.value==="agent"&&C.value?(H(),!0):n.value==="toolDiff"&&O.value?(Z(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(J(),!0):n.value==="btw"?(me(),!0):!1}return Ke(e.activeSessionId,()=>{o(),k(),H(),Z(),J(),xe()}),{PREVIEW_WIDTH_KEY:WUe,PREVIEW_MIN:Vc,previewDefaultWidth:c,previewMax:l,previewWidth:u,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:h,openCompactionPanel:m,closeCompactionPanel:k,agentPanelMember:_,agentPanelTurns:A,agentPanelLoading:P,agentPanelLoadError:z,agentPanelLoadingMore:L,agentPanelLoadMoreError:E,agentPanelHasMore:T,agentPanelRunning:$,agentPanelVisible:C,openAgentPanel:j,closeAgentPanel:H,loadOlderAgentMessages:D,toolDiffTarget:R,toolDiffVisible:O,openToolDiff:U,closeToolDiff:Z,detailDiffMode:q,detailDiffPath:te,openDiffDetail:ee,closeDiffDetail:J,selectDiffFile:se,btwVisible:Ye,openSideChatTab:Q,closeSideChat:me,hideSideChatPanel:xe,sidePanelVisible:at,panelDragging:X,closeOpenSidePanel:oe}}const UUe=dn.sidebarWidth,MM=dn.sidebarCollapsed,AM=270,n8=170,ZUe=480,KUe=320;function GUe(e={}){const{viewportWidth:t}=hB(),n=V(AM),o=V(!1),s=V(!1),i=B(()=>{const u=KUe+(l8(e.previewOpen)?Vc:0);return Math.min(ZUe,pB(t.value,n8,u))}),l=B(()=>lg(n.value,n8,i.value));function r(){try{o.value=ls(MM)==="true"}catch{o.value=!1}}function a(){try{Es(MM,String(o.value))}catch{}}function c(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:UUe,SIDEBAR_DEFAULT:AM,SIDEBAR_MIN:n8,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:l,loadSidebarCollapsed:r,toggleSidebarCollapse:c}}async function YUe(e){if(!e.fileId)return{url:e.url};try{const t=await Ct().getFileBlob(e.fileId),n=URL.createObjectURL(t);return{url:n,revoke:()=>URL.revokeObjectURL(n)}}catch{return{url:e.url}}}function XUe({client:e,detailTarget:t}){const{t:n}=$t(),o=V(null),s=V(null),i=V(!1),l=V(null),r=V(null);let a=0;const c=B(()=>{const w=r.value;return w?e.getFileDownloadUrl(w):null}),u=B(()=>o.value!==null);function d(w){return w.length>1?w.replace(/\/+$/,""):w}function f(w){const _=[];for(const A of w.split(/[\\/]+/))if(!(!A||A===".")){if(A===".."){_.pop();continue}_.push(A)}return _.join("/")}function p(w){const _=w.trim();if(!_)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(_))return{error:n("filePreview.errors.unsupportedPath")};if(_.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const A=d(e.status.value.cwd);if(_.startsWith("/")){if(!A||_!==A&&!_.startsWith(`${A}/`))return{error:n("filePreview.errors.outsideWorkspace")};const z=_===A?"":_.slice(A.length+1);if(z.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const L=f(z);return L?{path:L}:{error:n("filePreview.errors.isDirectory")}}if(_.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const P=f(_);return P?{path:P}:{error:n("filePreview.errors.emptyPath")}}async function h(w){const _=++a;t.value="file",s.value=null,l.value=null,i.value=!0,o.value=w,r.value=null;const A=p(w.path);if("error"in A){i.value=!1,l.value=A.error;return}r.value=A.path;try{const P=await e.readFileContent(A.path);if(_!==a)return;P?s.value={...P,path:P.path||A.path}:l.value=n("filePreview.errors.loadFailed")}catch(P){if(_!==a)return;l.value=P instanceof Error?P.message:n("filePreview.errors.loadFailed")}finally{_===a&&(i.value=!1)}}function m(){a+=1,o.value=null,r.value=null,s.value=null,l.value=null,i.value=!1}function k(){m(),t.value==="file"&&(t.value=null)}Ke(t,(w,_)=>{_==="file"&&w!=="file"&&m()});function x(){const w=s.value?.path??o.value?.path;w&&e.openWorkspaceFile(w,o.value?.line)}function y(){const w=s.value?.path??o.value?.path;w&&e.revealWorkspaceFile(w)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:l,previewDownloadUrl:c,previewExternalActions:u,openFilePreview:h,closeFilePreview:k,openPreviewInEditor:x,revealPreviewFile:y}}const JUe=new Set(["agent","compaction","btw"]);function QUe(e){const t=V([]),n=V(null),o=V(!1),s=V(!1),i=new Map;let l=0;const r=B(()=>t.value.find(k=>k.id===n.value)??null);function a(k){const x=k.always?void 0:t.value.find(w=>w.type===k.type&&w.key===k.key);if(x)return x.title=k.title,x.payload=k.payload,n.value=x.id,o.value=!0,x;const y={...k,id:`panel-tab-${++l}`};return t.value=[...t.value,y],n.value=y.id,o.value=!0,y}function c(k){t.value.some(x=>x.id===k)&&(n.value=k,o.value=!0)}function u(k){const x=t.value.findIndex(w=>w.id===k);if(x<0)return null;const[y]=t.value.splice(x,1);if(t.value=[...t.value],n.value===k){const w=t.value[Math.min(x,t.value.length-1)];n.value=w?.id??null}return t.value.length===0&&(o.value=!1,s.value=!1),y??null}function d(){return o.value?(o.value=!1,s.value=!1,!0):!1}function f(){o.value=!o.value,o.value||(s.value=!1)}function p(){r.value!==null&&(s.value=!s.value,s.value&&(o.value=!0))}function h(k){const x=t.value.filter(w=>JUe.has(w.type)),y=Math.max(0,x.findIndex(w=>w.id===n.value));if(x.length===0){i.delete(k);return}i.set(k,{tabs:x.map(({id:w,..._})=>({..._})),activeIndex:y,visible:o.value})}function m(k){const x=i.get(k);t.value=x?.tabs.map(y=>({...y,id:`panel-tab-${++l}`}))??[],n.value=t.value[x?.activeIndex??0]?.id??null,o.value=x?.visible===!0&&t.value.length>0,s.value=!1}return Ke(e,(k,x)=>{h(x),m(k)}),{tabs:t,activeTabId:n,activeTab:r,visible:o,expanded:s,openTab:a,activateTab:c,closeTab:u,hidePanel:d,togglePanel:f,toggleExpanded:p}}const eZe={class:"server-auth-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"server-auth-title"},tZe={class:"server-auth-card"},nZe={class:"server-auth-body"},oZe={class:"server-auth-foot"},sZe=Je({__name:"ServerAuthDialog",setup(e){const t=V(""),n=V(null),o=V(!1);In(()=>{yt(()=>n.value?.focus())});function s(){const l=t.value;!l||o.value||(o.value=!0,PN(l),window.location.reload())}function i(l){l.key==="Enter"&&(l.preventDefault(),s())}return(l,r)=>(g(),S("div",eZe,[b("div",tZe,[r[1]||(r[1]=b("div",{class:"server-auth-head"},[b("h1",{id:"server-auth-title",class:"server-auth-title"},"Server token required"),b("p",{class:"server-auth-hint"},[He(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),b("code",null,"PYTHINKER_CODE_PASSWORD"),He("). ")])],-1)),b("div",nZe,[W(us,{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),b("div",oZe,[W(Nt,{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:ae(()=>[He(I(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])])])]))}}),iZe=vt(sZe,[["__scopeId","data-v-82dad292"]]),lZe={class:"app-shell"},rZe={key:2,class:"offline-strip",role:"status"},aZe=["aria-label","aria-hidden"],cZe={class:"pt-shell"},uZe={class:"pt-body"},dZe=["aria-label"],fZe=["disabled"],pZe=["disabled"],hZe={class:"action-toast-stack"},mZe=Je({__name:"App",setup(e){xve();const t=V(!1);let n=null;const o=R1(),s=V([]),i=V(!1),l=V(null),r=V(null),a=V(null);let c=null;const u=B(()=>{const Re=o.activeWorkspaceId.value;return Re?[...o.sessionsForView.value,...s.value].filter(pe=>pe.workspaceId===Re).toSorted((pe,Le)=>new Date(Le.updatedAt??0).getTime()-new Date(pe.updatedAt??0).getTime()).slice(0,6):[]});function d(Re){return{id:Re.id,title:Re.title,time:new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,Math.floor((Date.now()-new Date(Re.updatedAt).getTime())/864e5)),"day"),busy:!1,updatedAt:Re.updatedAt,workspaceId:Re.workspaceId,archived:!0}}async function f(){try{const Re=[];let pe;for(;;){const Le=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Re.push(...Le.items),!Le.hasMore||Le.items.length===0||(pe=Le.items.at(-1)?.id,pe===void 0))break}s.value=Re.map(d)}catch(Re){console.warn("loadDoneSessions failed",Re)}}const p=B(()=>{const Re=new Map(o.workspaceGroups.value.flatMap(pe=>pe.sessions.map(Le=>[Le.id,Le.updatedAt])));return o.sessionsForView.value.map(pe=>({id:pe.id,title:pe.title,workspaceId:pe.workspaceId??"",workspaceName:pe.workspaceName??"-",lastPrompt:pe.lastPrompt,updatedAt:pe.updatedAt??Re.get(pe.id)??new Date(0).toISOString(),archived:!1}))});async function h(){const Re=[];let pe;for(;;){const Sn=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Re.push(...Sn.items),!Sn.hasMore||Sn.items.length===0||(pe=Sn.items.at(-1)?.id,pe===void 0))break}const Le=o.workspacesView.value;return Re.filter(Sn=>!Sn.parentSessionId).map(Sn=>{const ii=Le.find(el=>el.id===Sn.workspaceId||el.root===Sn.cwd);return{id:Sn.id,title:Sn.title,workspaceId:ii?.id??Sn.workspaceId??Sn.cwd,workspaceName:ii?.name??Sn.cwd.split("/").filter(Boolean).at(-1)??"-",lastPrompt:Sn.lastPrompt,updatedAt:Sn.updatedAt,archived:!0}})}function m(){i.value=!0,o.loadAllSessions()}function k(Re,pe){l.value={kind:Re,ids:Array.isArray(pe)?pe:[pe]}}const x=B(()=>!o.dangerousBypassAuth.value&&t.value);qn("resolveImage",o.resolveImageUrl),qn("modelDisplay",Re=>{if(Re===void 0||Re.length===0)return;const pe=o.models.value.find(Le=>Le.id===Re)??o.models.value.find(Le=>Le.model===Re);return pe?.displayName||pe?.model||(Re.includes("/")?Re.split("/").pop():Re)}),qn("subagentEffort",Re=>Re!==void 0&&Re.length>0&&Re!=="off"&&Re!=="on"?rf(Re):void 0),qn("resolveDynamicWorkflowMembers",Re=>o.dynamicWorkflowMembersByToolCallId.value.get(Re)??[]),qn("mainModelBinding",()=>{const Re=o.status.value.modelId;if(Re)return{model:Re,effort:o.thinking.value}}),qn("openAgentSettings",()=>{Ks("agent")});const{t:y}=$t(),{confirm:w}=z1(),_=pr(),A=r6(),P=V(!1),z=V(!1),L=B(()=>{const Re=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Re)?.title??s.value.find(pe=>pe.id===Re)?.title??""}),E=B(()=>{const Re=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Re)?.lastTurnReason}),T=B(()=>{const Re=o.activeSessionId.value;if(Re)return tve(Re)}),$=B(()=>s.value.some(Re=>Re.id===o.activeSessionId.value)),C=B(()=>o.visibleWorkspace.value?.sessionCount??0),j=B(()=>o.activity.value!=="idle"),{showAuthGate:H}=zUe({client:o});BUe({running:j,showAuthGate:H});const D=B(()=>{const Re=o.models.value.find(pe=>pe.id===o.status.value.modelId);return w9(Re,o.thinking.value)}),M=V(!1),R=B(()=>o.appState.value==="first-run"),O=B(()=>o.appState.value==="recovery"&&!M.value),U=B(()=>o.appState.value==="recovery"&&M.value);Ke(()=>o.appState.value,Re=>{Re!=="recovery"&&(M.value=!1)});function Z(){M.value=!1}const q=V(!1);function te(){o.setOnboarded(!0),q.value=!1}function ee(){q.value=!0}let J=0;function se(){const Re=window.visualViewport,pe=document.documentElement.style;pe.setProperty("--app-height",`${Re?.height??window.innerHeight}px`),pe.setProperty("--app-top",`${Re?.offsetTop??0}px`)}function Q(){J||(J=requestAnimationFrame(()=>{J=0,se()}))}In(()=>{n=Mve(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),hs(),se(),window.visualViewport?.addEventListener("resize",Q),window.visualViewport?.addEventListener("scroll",Q),window.addEventListener("resize",Q),document.addEventListener("keydown",me,!0)}),En(()=>{Mn(),document.removeEventListener("keydown",me,!0),window.visualViewport?.removeEventListener("resize",Q),window.visualViewport?.removeEventListener("scroll",Q),window.removeEventListener("resize",Q),J&&(cancelAnimationFrame(J),J=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function me(Re){Re.key!=="Escape"||Re.isComposing||kl.value||de()&&(Re.stopPropagation(),Re.preventDefault())}const xe=V(null),Ye=V(null),at=B(()=>o.activeSessionId.value??`__draft__:${o.activeWorkspaceId.value??"none"}`),{tabs:X,activeTabId:oe,activeTab:F,visible:K,expanded:he,openTab:ye,activateTab:ve,closeTab:ie,hidePanel:de,togglePanel:be,toggleExpanded:Se}=QUe(at);function je(Re){Ye.value=Re,xe.value="turnDiff"}function et(){Ye.value=null,xe.value==="turnDiff"&&(xe.value=null)}const le=V(!1);Ke(o.activeSessionId,()=>{et(),le.value=!0,yt(()=>{le.value=!1})});const{previewTarget:fe,previewFile:ge,previewLoading:Oe,previewError:Fe,previewDownloadUrl:pt,previewExternalActions:kt,openFilePreview:qt,closeFilePreview:nn,openPreviewInEditor:Jt,revealPreviewFile:kn}=XUe({client:o,detailTarget:xe});RNe(()=>o.activeSessionId.value);function Dn(Re){xe.value="editor",tB({path:Re,line:fe.value?.line})}function xn(){xe.value==="editor"&&(xe.value=null),tg()}Ke(xe,(Re,pe)=>{pe==="editor"&&Re!=="editor"&&tg()});const $n=V(null),Hn=V(null);let bn=0,Wn;async function Pn(Re){if(Re.kind!=="image"&&Re.kind!=="video")return;const pe=++bn;Wn?.(),Wn=void 0,$n.value=null,Hn.value=null;const Le=await YUe(Re);if(pe!==bn){Le.revoke?.();return}Wn=Le.revoke,$n.value=Re,Hn.value=Le.url}function Mn(){bn+=1,Wn?.(),Wn=void 0,$n.value=null,Hn.value=null}const Nn=B(()=>K.value),{SIDEBAR_WIDTH_KEY:An,SIDEBAR_DEFAULT:Qn,SIDEBAR_MIN:Fn,sidebarMax:Qt,sessionColWidth:uo,sidebarCollapsed:Zn,sidebarDragging:Bo,sideWidth:Un,loadSidebarCollapsed:hs,toggleSidebarCollapse:Io}=GUe({previewOpen:Nn}),{PREVIEW_WIDTH_KEY:Rt,PREVIEW_MIN:Jo,previewDefaultWidth:Ls,previewMax:$e,previewWidth:Ge,previewPanelWidth:ot,compactionPanelText:dt,compactionPanelVisible:Mt,openCompactionPanel:Ft,closeCompactionPanel:Ut,agentPanelMember:en,agentPanelTurns:tn,agentPanelLoading:eo,agentPanelLoadError:Ro,agentPanelLoadingMore:$s,agentPanelLoadMoreError:Do,agentPanelHasMore:We,agentPanelRunning:st,openAgentPanel:Xe,closeAgentPanel:qe,loadOlderAgentMessages:Pe,toolDiffTarget:bt,openToolDiff:Lt,closeToolDiff:cn,detailDiffMode:So,detailDiffPath:Qo,openDiffDetail:Po,closeDiffDetail:Xn,selectDiffFile:pn,btwVisible:Us,openSideChatTab:mi,closeSideChat:oi,hideSideChatPanel:ql,panelDragging:vl}=qUe({client:o,sideWidth:Un,detailTarget:xe,closeFilePreview:nn});function Zs(Re){return Re.split(/[\\/]/).filter(Boolean).at(-1)??Re}function yo(Re){ye({type:"file",key:Re.path,title:Zs(Re.path),icon:"file-text",payload:Re})}function Lo(Re){ye({type:"editor",key:Re,title:Zs(Re),icon:"file-edit",payload:{path:Re}})}function yl(Re){ye({type:"compaction",key:Re.turnId,title:y("panel.tabs.compaction"),icon:"thinking",payload:Re})}function ms(Re){const pe=o.activeAppTasks.value.find(Le=>Le.agentId===Re||Le.id===Re||Le.backgroundTaskId===Re||Le.parentToolCallId===Re);ye({type:"agent",key:pe?.agentId??pe?.id??Re,title:pe?.description||y("panel.tabs.agent"),icon:"robot",payload:{target:Re}})}Ke(o.activeAppTasks,Re=>{for(const pe of X.value){if(pe.type!=="agent")continue;const Le=pe.payload?.target??pe.key,Sn=Re.find(ii=>ii.agentId===Le||ii.id===Le||ii.backgroundTaskId===Le||ii.parentToolCallId===Le);Sn?.description&&(pe.title=Sn.description)}});function wl(Re){Lt(Re);const pe=bt.value;ye({type:"toolDiff",key:Re,title:pe?.path?Zs(pe.path):pe?.title??y("panel.tabs.diff"),icon:"file-edit",payload:{id:Re}})}function gi(){ye({type:"diff",key:"workspace",title:y("panel.tabs.diff"),icon:"git-fork"})}function si(Re){const pe=X.value.find(Le=>Le.type==="turnDiff"&&Le.key===Re.turnId);if(pe?.id===oe.value){Ie(pe.id);return}ye({type:"turnDiff",key:Re.turnId,title:y("panel.tabs.turnDiff"),icon:"git-fork",payload:Re})}async function Ul(Re){await mi(Re),ye({type:"btw",key:"side-chat",title:y("sideChat.title"),icon:"message",payload:{prompt:Re}})}function Ni(Re){Re.type==="file"?nn():Re.type==="editor"?xn():Re.type==="compaction"?Ut():Re.type==="agent"?qe():Re.type==="toolDiff"?cn():Re.type==="diff"?Xn():Re.type==="turnDiff"?et():Re.type==="btw"&&ql()}function Ae(Re){if(Re===null){xe.value=null;return}Re.type==="file"?qt(Re.payload):Re.type==="editor"?Dn(Re.payload.path):Re.type==="compaction"?Ft(Re.payload):Re.type==="agent"?Xe(Re.payload.target):Re.type==="toolDiff"?Lt(Re.payload.id):Re.type==="diff"?Po():Re.type==="turnDiff"?je(Re.payload):Re.type==="btw"&&(xe.value="btw")}Ke(F,(Re,pe)=>{pe&&pe.id!==Re?.id&&Ni(pe),Ae(Re)},{flush:"post"});function Ie(Re){X.value.find(Le=>Le.id===Re)?.type==="btw"&&oi(),ie(Re)}function At(){oe.value&&Ie(oe.value)}const lt=V(null),mn=V(null);function Kn(){let Re=!1;const pe=Le=>{Le instanceof KeyboardEvent&&Le.repeat||(Re=!0)};return document.addEventListener("pointerdown",pe,!0),document.addEventListener("keydown",pe,!0),window.addEventListener("blur",pe),document.addEventListener("visibilitychange",pe),()=>{yt(()=>{document.removeEventListener("pointerdown",pe,!0),document.removeEventListener("keydown",pe,!0),window.removeEventListener("blur",pe),document.removeEventListener("visibilitychange",pe),!Re&&document.hasFocus()&&mn.value?.focusInput()})}}const to=V(!1),Co=V(!1),no=V(!1),Vo=V(!1),Qi=V("general"),Os=B(()=>m0.value>0||to.value||Co.value||no.value||Vo.value||P.value||z.value||$n.value!==null),Ta=B(()=>F.value?.title);function Wo(Re){lt.value?.insertComposerQuote(Re),A.value&&K.value&&de()}const zi=V(null),gs=V(null),kl=B(()=>m0.value>0||to.value||Co.value||no.value||Vo.value||q.value||P.value||z.value||$n.value!==null),es=V(!1),Hs=V(!1),vs=V(!1);async function bl(){es.value=!0,Hs.value=!1,to.value=!0;try{await o.refreshAllProviders()}catch{Hs.value=!0}finally{es.value=!1}}function Ks(Re="general"){Qi.value=Re,Vo.value=!0}function ne(){Ks("providers")}function ke(){ne()}async function Te(Re){to.value=!1,await Ne(Re)}async function Ne(Re){await o.setModel(Re)&&Re!==o.defaultModel.value&&o.updateConfig({defaultModel:Re})}async function Qe(Re){await o.archiveSession(Re),await f(),k("done",Re)}async function ht(Re){await o.restoreSession(Re)&&(s.value=s.value.filter(pe=>pe.id!==Re),k("open",Re))}async function jt(Re,pe){await o.renameSession(Re,pe),s.value.some(Le=>Le.id===Re)&&await f()}async function Zt(Re,pe){const Le=s.value.find(Sn=>Sn.id===Re);if(!Le){await o.setSessionEmoji(Re,pe);return}await jt(Re,GT(pe,Le.title))}async function Vt(Re,pe){const Le=Re.map(Sn=>Sn.id);for(const Sn of Le)pe==="archive"?await o.archiveSession(Sn):await o.restoreSession(Sn);await f(),k(pe==="archive"?"done":"open",Le)}async function Wt(){const Re=l.value;if(Re){l.value=null;for(const pe of Re.ids)Re.kind==="done"?await o.restoreSession(pe):await o.archiveSession(pe);await f()}}async function on(Re){const pe=Re??o.activeSessionId.value;if(!pe)return;r.value={state:"running",sessionId:pe};const Le=await o.exportSession(pe);r.value=Le?{state:"done",sessionId:pe}:null}async function Vn(Re){const pe=o.workspacesView.value.find(Le=>Le.id===Re)?.name??Re;await w({title:y("sidebar.removeWorkspace"),message:y("workspace.removeWorkspaceConfirm",{name:pe}),variant:"danger",action:()=>o.deleteWorkspace(Re)})}async function Ht(Re){vs.value=!0;try{await o.updateConfig(Re)&&await Promise.all([o.refreshRuntimeState(),o.refreshServerMeta()])}finally{vs.value=!1}}async function Tn(Re){await o.undo(1),await yt(),lt.value?.loadComposerForEdit(Re.text,Re.attachments)}function zn(Re){if(Re==="/compact"||Re.startsWith("/compact ")){o.compact(Re.slice(8).trim()||void 0);return}if(Re==="/dynamic_workflow"||Re.startsWith("/dynamic_workflow ")){const pe=Re.slice(17).trim();pe==="on"?o.setDynamicWorkflowMode(!0):pe==="off"?o.setDynamicWorkflowMode(!1):pe?(o.setDynamicWorkflowMode(!0),o.sendPrompt(pe)):o.toggleDynamicWorkflowMode();return}if(Re==="/goal"||Re.startsWith("/goal ")){const pe=Re.slice(5).trim();pe==="pause"||pe==="resume"||pe==="cancel"?o.controlGoal(pe):pe?o.createGoal(pe):o.toggleGoalMode();return}if(Re==="/btw"||Re.startsWith("/btw ")){const pe=Re.slice(4).trim();if(!pe&&F.value?.type==="btw")At();else{const Le=Kn();Ul(pe||void 0).then(Le,Le)}return}switch(Re){case"/new":case"/clear":jr();break;case"/fork":o.forkSession();break;case"/export":on();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/status":no.value=!0;break;case"/login":ke();break;default:{const pe=Re.indexOf(" "),Le=pbe((pe===-1?Re:Re.slice(0,pe)).slice(1)),Sn=pe===-1?void 0:Re.slice(pe+1).trim()||void 0;if(!Le)break;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,Le,Sn):o.activateSkill(Le,Sn);break}}}function Ns(Re){o.unqueue(Re)}function rs(Re){o.unqueue(Re)}function _l(Re){o.reorderQueue(Re.from,Re.to)}function X0(Re){o.steerQueued(Re)}async function J0(Re){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Re.text,Re.attachments);return}if(!o.activeSessionId.value&&!pe){zi.value=Re,Co.value=!0;return}o.sendPrompt(Re.text,Re.attachments)}async function qu(Re){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Re,[]);return}o.activeSessionId.value&&o.sendPrompt(Re)}async function hr(Re){if(gs.value=null,!await o.addWorkspaceByPath(Re)){gs.value=y("workspace.addFailed");return}Co.value=!1;const Le=zi.value;zi.value=null;const Sn=o.activeWorkspaceId.value;Le&&Sn&&await o.startSessionAndSendPrompt(Sn,Le.text,Le.attachments)}function ts(){zi.value=null,gs.value=null,Co.value=!1}async function Fr(Re){for(const pe of Re)if(gs.value=null,!await o.addWorkspaceByPath(pe)){gs.value=y("workspace.addFailed"),Co.value=!0;return}}async function Uu(Re,pe){const Le=await o.generateSessionTitle(Re);Le===null&&(a.value=y("sidebar.genTitleUnavailable"),c!==null&&clearTimeout(c),c=setTimeout(()=>{a.value=null,c=null},5e3)),pe(Le)}function Q0(){yt(()=>{lt.value?.focusComposer()})}function jr(){const Re=o.activeWorkspaceId.value;Re?o.openWorkspaceDraft(Re):o.clearActiveSession(),Q0()}function P1(Re){o.openWorkspaceDraft(Re),Q0()}function F1(Re){Re&&window.open(Re,"_blank","noopener")}return(Re,pe)=>(g(),S("div",lZe,[W(RDe),x.value?(g(),ue(iZe,{key:0})):Y("",!0),O.value?(g(),ue(Gqe,{key:1,onOpenProviders:pe[0]||(pe[0]=()=>{M.value=!0,ne()}),onDismiss:pe[1]||(pe[1]=Le=>M.value=!0)})):Y("",!0),U.value?(g(),S("div",rZe,[b("span",null,I(v(y)("recovery.offlineNotice")),1),b("button",{type:"button","data-testid":"offline-strip-reconnect",onClick:pe[2]||(pe[2]=Le=>M.value=!1)},I(v(y)("recovery.addProvider")),1)])):Y("",!0),O.value?Y("",!0):(g(),S("div",{key:3,class:Be(["app",{mobile:v(A),"sidebar-collapsed":v(Zn)&&!v(A),"macos-desktop":v(Fg),"panel-expanded":v(he)}]),style:Gt({"--preview-w":v(ot)+"px"})},[v(A)?(g(),ue(qDe,{key:1,workspace:v(o).visibleWorkspace.value,"session-title":L.value,running:j.value,branch:v(o).status.value.branch,"session-count":C.value,onOpenSwitcher:pe[23]||(pe[23]=Le=>P.value=!0),onOpenSettings:pe[24]||(pe[24]=Le=>z.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(g(),S(Ce,{key:0},[W(cX,{collapsed:v(Zn),dragging:v(Bo),"col-width":v(Un),"active-workspace":v(o).visibleWorkspace.value,"active-workspace-id":v(o).activeWorkspaceId.value,sessions:v(o).sessionsForView.value,"archived-sessions":s.value,"pinned-ids":v(o).pinnedSessionIds.value,"pinned-collapsed":v(o).pinnedCollapsed.value,groups:v(o).workspaceGroups.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"pending-by-session":v(o).pendingBySession.value,"unread-by-session":v(o).unreadBySession.value,"workspace-sort-mode":v(o).workspaceSortMode.value,workspaces:v(o).workspacesView.value,"tabs-enabled":v(o).config.value?.experimental?.sidebarTabs===!0,onSelect:pe[3]||(pe[3]=Le=>v(o).selectSession(Le)),onCreate:jr,onCreateInWorkspace:pe[4]||(pe[4]=Le=>P1(Le)),onSelectWorkspace:pe[5]||(pe[5]=Le=>v(o).openWorkspace(Le)),onAddWorkspace:pe[6]||(pe[6]=Le=>Co.value=!0),onAddWorkspacePaths:Fr,onRename:jt,onGenerateTitle:Uu,onArchive:pe[7]||(pe[7]=Le=>Qe(Le)),onRestore:pe[8]||(pe[8]=Le=>ht(Le)),onPin:pe[9]||(pe[9]=Le=>v(o).togglePinnedSession(Le)),onReorderPins:pe[10]||(pe[10]=Le=>v(o).reorderPinnedSessions(Le)),onTogglePinnedCollapsed:pe[11]||(pe[11]=Le=>v(o).togglePinnedCollapsed()),onSetSessionEmoji:Zt,onLoadDoneSessions:f,onFork:pe[12]||(pe[12]=Le=>v(o).forkSession(Le)),onExport:pe[13]||(pe[13]=Le=>on(Le)),onRenameWorkspace:pe[14]||(pe[14]=(Le,Sn)=>v(o).renameWorkspace(Le,Sn)),onDeleteWorkspace:pe[15]||(pe[15]=Le=>Vn(Le)),onReorderWorkspaces:pe[16]||(pe[16]=Le=>v(o).reorderWorkspaces(Le)),onSetWorkspaceSortMode:pe[17]||(pe[17]=Le=>v(o).setWorkspaceSortMode(Le)),onLoadMoreSessions:pe[18]||(pe[18]=Le=>void v(o).loadMoreSessions(Le)),onLoadAllSessions:pe[19]||(pe[19]=Le=>void v(o).loadAllSessions()),onOpenSettings:pe[20]||(pe[20]=Le=>Ks()),onOpenSessionAdmin:m,onCollapse:v(Io)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","archived-sessions","pinned-ids","pinned-collapsed","groups","active-id","attention-by-session","pending-by-session","unread-by-session","workspace-sort-mode","workspaces","tabs-enabled","onCollapse"]),Jn(W(Zk,{class:"side-handle","storage-key":v(An),"default-width":v(Qn),min:v(Fn),max:v(Qt),"onUpdate:width":pe[21]||(pe[21]=Le=>uo.value=Le),"onUpdate:dragging":pe[22]||(pe[22]=Le=>Bo.value=Le)},null,8,["storage-key","default-width","min","max"]),[[_i,!v(Zn)]])],64)),i.value?(g(),ue(iJ,{key:2,"open-sessions":p.value,workspaces:v(o).workspacesView.value,"load-archived":h,"archive-session":Qe,"restore-session":ht,"run-batch":Vt,onOpen:pe[25]||(pe[25]=Le=>{i.value=!1,v(o).selectSession(Le)}),onRename:pe[26]||(pe[26]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onFork:pe[27]||(pe[27]=Le=>v(o).forkSession(Le)),onExport:pe[28]||(pe[28]=Le=>on(Le)),onBack:pe[29]||(pe[29]=Le=>i.value=!1)},null,8,["open-sessions","workspaces"])):(g(),ue(i$e,{key:3,ref_key:"conversationPaneRef",ref:lt,mobile:v(A),turns:v(o).turns.value,"session-id":v(o).activeSessionId.value,approvals:v(o).pendingApprovals.value,changes:v(o).changes.value,"git-info":v(o).gitInfo.value,tasks:v(o).tasks.value,todos:v(o).todos.value,goal:v(o).goal.value,"activation-badges":v(o).activationBadges.value,status:v(o).status.value,thinking:v(o).thinking.value,"plan-mode":v(o).planMode.value,"plan-armed":v(o).planArmed.value,"session-plans":v(o).sessionPlans.value,"reveal-saved-plan":v(o).revealSavedPlan,"overlay-open":Os.value,"goal-mode":v(o).goalMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,models:v(o).models.value,"starred-ids":v(o).starredModelIds.value,skills:v(o).skills.value,questions:v(o).questions.value,"pending-question-actions":v(o).pendingQuestionActions,"pending-approval-actions":v(o).pendingApprovalActions,running:j.value,"turn-active":v(o).turnActive.value,queued:v(o).queued.value,"search-files":v(o).searchFiles,"upload-image":v(o).uploadImage,working:v(o).working.value,starting:v(o).isStartingFirstPrompt.value,"fast-moon":v(o).fastMoon.value,"file-reload-key":v(o).activeSessionId.value,"session-loading":v(o).sessionLoading.value,compaction:v(o).compaction.value,"has-more-messages":v(o).hasMoreMessages.value,"loading-more":v(o).loadingMoreMessages.value,"loading-more-error":v(o).loadMoreMessagesError.value,"load-older-messages":v(o).loadOlderMessages,"workspace-name":v(o).visibleWorkspace.value?.name,"workspace-root":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,"git-diff-stats":v(o).gitDiffStats.value,workspaces:v(o).workspacesView.value,"active-workspace-id":v(o).activeWorkspaceId.value,"session-title":L.value,pr:v(o).activePullRequest.value,"panel-visible":v(K),"panel-expanded":v(he),"active-panel-type":v(F)?.type,"toggle-panel":v(be),"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,"last-turn-reason":E.value,"turn-error-kind":T.value?.reason==="max_steps"?"max_steps":void 0,"turn-error-message":T.value?.message,"session-done":$.value,pinned:v(o).pinnedSessionIds.value.includes(v(o).activeSessionId.value??""),"recent-sessions":u.value,onOpenChanges:pe[30]||(pe[30]=Le=>gi()),onSelectWorkspace:pe[31]||(pe[31]=Le=>P1(Le)),onAddWorkspace:pe[32]||(pe[32]=Le=>Co.value=!0),onOpenPr:F1,onSubmit:pe[33]||(pe[33]=Le=>J0(Le)),onSteer:pe[34]||(pe[34]=Le=>v(o).steerPrompt(Le.text,Le.attachments)),onApproval:pe[35]||(pe[35]=(Le,Sn)=>v(o).respondApproval(Le,Sn)),onCancelTask:pe[36]||(pe[36]=Le=>v(o).cancelTask(Le)),onAnswer:pe[37]||(pe[37]=(Le,Sn)=>v(o).respondQuestion(Le,Sn)),onDismiss:pe[38]||(pe[38]=Le=>v(o).dismissQuestion(Le)),onCommand:zn,onInterrupt:pe[39]||(pe[39]=Le=>v(o).abortCurrentPrompt()),onUnqueue:Ns,onEditQueued:rs,onReorderQueue:_l,onSteerQueued:X0,onSetPermission:pe[40]||(pe[40]=Le=>v(o).setPermission(Le)),onSetThinking:pe[41]||(pe[41]=Le=>v(o).setThinking(Le)),onTogglePlan:pe[42]||(pe[42]=Le=>v(o).togglePlanMode()),onToggleWorkflow:pe[43]||(pe[43]=Le=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[44]||(pe[44]=Le=>v(o).toggleGoalMode()),onCreateGoal:pe[45]||(pe[45]=Le=>v(o).createGoal(Le)),onControlGoal:pe[46]||(pe[46]=Le=>v(o).controlGoal(Le)),onRefreshGitStatus:pe[47]||(pe[47]=Le=>v(o).activeSessionId.value&&v(o).loadGitStatus(v(o).activeSessionId.value)),onRenameSession:pe[48]||(pe[48]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onForkSession:pe[49]||(pe[49]=Le=>v(o).forkSession(Le)),onArchiveSession:pe[50]||(pe[50]=Le=>Qe(Le)),onRestoreSession:pe[51]||(pe[51]=Le=>ht(Le)),onSelectSession:pe[52]||(pe[52]=Le=>v(o).selectSession(Le)),onTogglePin:pe[53]||(pe[53]=Le=>v(o).togglePinnedSession(Le)),onOpenSessionAdmin:m,onExportSession:pe[54]||(pe[54]=Le=>on(Le)),onCompact:pe[55]||(pe[55]=Le=>v(o).compact()),onPickModel:pe[56]||(pe[56]=Le=>bl()),onSelectModel:pe[57]||(pe[57]=Le=>Ne(Le)),onOpenFile:pe[58]||(pe[58]=Le=>yo(Le)),onOpenMedia:pe[59]||(pe[59]=Le=>Pn(Le)),onOpenCompaction:pe[60]||(pe[60]=Le=>yl(Le)),onOpenAgent:pe[61]||(pe[61]=Le=>ms(Le)),onDetachTask:pe[62]||(pe[62]=Le=>v(o).detachTask(Le)),onOpenToolDiff:pe[63]||(pe[63]=Le=>wl(Le)),onOpenTurnDiff:pe[64]||(pe[64]=Le=>si(Le)),onEditMessage:Tn,onContinueTurn:qu},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","plan-armed","session-plans","reveal-saved-plan","overlay-open","goal-mode","dynamic-workflow-mode","models","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","turn-active","queued","search-files","upload-image","working","starting","fast-moon","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr","panel-visible","panel-expanded","active-panel-type","toggle-panel","conversation-toc","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","session-done","pinned","recent-sessions"])),!v(A)&&v(Zn)?(g(),ue(Dt,{key:4,class:"sidebar-toggle-btn",size:"sm",label:v(Zn)?v(y)("sidebar.expandSidebar"):v(y)("sidebar.collapseSidebar"),onClick:v(Io)},{default:ae(()=>[W(Ee,{name:v(Zn)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):Y("",!0),!v(A)&&v(Zn)?(g(),ue(Dt,{key:5,class:"new-chat-btn",size:"sm",label:v(y)("sidebar.newChat"),onClick:jr},{default:ae(()=>[W(Ee,{name:"chat-new"})]),_:1},8,["label"])):Y("",!0),!i.value&&(!v(A)||v(K))?(g(),S("aside",{key:6,class:Be(["global-preview",{open:v(K),mobile:v(A),expanded:v(he),"no-anim":v(vl)||le.value}]),role:"complementary","aria-label":v(y)("layout.detailPanelAria"),"aria-hidden":!v(K)},[b("div",cZe,[v(K)&&!v(A)&&!v(he)?(g(),ue(Zk,{key:0,class:"panel-resize","storage-key":v(Rt),"default-width":v(Ls),min:v(Jo),max:v($e),reverse:"","aria-label":v(y)("layout.resizePreviewAria"),"onUpdate:width":pe[65]||(pe[65]=Le=>Ge.value=Le),"onUpdate:dragging":pe[66]||(pe[66]=Le=>vl.value=Le)},null,8,["storage-key","default-width","min","max","aria-label"])):Y("",!0),W(NBe,{tabs:v(X),"active-id":v(oe),expanded:v(he),mobile:v(A),"can-open-diff":v(o).status.value.isGitRepo&&v(o).activeSessionId.value!==null,"can-open-side-chat":!!v(o).activeWorkspaceId.value,onActivate:v(ve),onClose:Ie,onToggleExpanded:v(Se),onHide:v(de),onOpenDiff:gi,onOpenSideChat:pe[67]||(pe[67]=Le=>Ul())},null,8,["tabs","active-id","expanded","mobile","can-open-diff","can-open-side-chat","onActivate","onToggleExpanded","onHide"]),b("div",uZe,[v(F)===null?(g(),S("div",{key:0,class:"panel-launcher",role:"group","aria-label":v(y)("panel.launcherAria")},[b("button",{type:"button",disabled:!v(o).status.value.isGitRepo||v(o).activeSessionId.value===null,onClick:gi},[W(Ee,{name:"git-fork"}),b("span",null,I(v(y)("panel.tabs.diff")),1)],8,fZe),b("button",{type:"button",disabled:!v(o).activeWorkspaceId.value,onClick:pe[68]||(pe[68]=Le=>Ul())},[W(Ee,{name:"message"}),b("span",null,I(v(y)("sideChat.title")),1)],8,pZe)],8,dZe)):xe.value==="compaction"&&v(Mt)?(g(),ue(sze,{key:1,text:v(dt)??"",subtitle:v(y)("conversation.summaryTitle"),onClose:At},null,8,["text","subtitle"])):xe.value==="agent"&&v(en)?(g(),ue(gze,{key:2,member:v(en),turns:v(tn),running:v(st),loading:v(eo),"load-error":v(Ro),"has-more":v(We),"loading-more":v($s),"load-more-error":v(Do),onClose:At,onLoadOlderMessages:v(Pe),onOpenFile:pe[69]||(pe[69]=Le=>yo(Le)),onOpenMedia:pe[70]||(pe[70]=Le=>Pn(Le)),onOpenAgent:pe[71]||(pe[71]=Le=>ms(Le)),onOpenTurnDiff:pe[72]||(pe[72]=Le=>si(Le))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onLoadOlderMessages"])):xe.value==="btw"&&v(Us)?(g(),ue(Yze,{key:3,ref_key:"sideChatPanelRef",ref:mn,turns:v(o).sideChatTurns.value,running:v(o).sideChatRunning.value,sending:v(o).sideChatSending.value,onSend:pe[73]||(pe[73]=Le=>v(o).sendSideChatPrompt(Le)),onClose:At},null,8,["turns","running","sending"])):xe.value==="diff"?(g(),ue(xBe,{key:4,mode:v(So),changes:v(o).changes.value,"git-info":v(o).gitInfo.value,"file-diff":v(o).fileDiff.value,"selected-diff-path":v(o).selectedDiffPath.value,"file-diff-loading":v(o).fileDiffLoading.value,closable:"",onOpen:v(pn),onBack:pe[74]||(pe[74]=Le=>{So.value="list",Qo.value=null,v(o).clearFileDiff()}),onClose:At},null,8,["mode","changes","git-info","file-diff","selected-diff-path","file-diff-loading","onOpen"])):xe.value==="toolDiff"&&v(bt)?(g(),ue(_ze,{key:5,target:v(bt),onClose:At},null,8,["target"])):xe.value==="turnDiff"&&Ye.value?(g(),ue(jze,{key:6,changes:Ye.value.changes,cwd:v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,onOpenFile:pe[75]||(pe[75]=Le=>yo(Le)),onClose:At},null,8,["changes","cwd"])):xe.value==="editor"?(g(),ue(tze,{key:7,onClose:At})):xe.value==="file"?(g(),ue(xNe,{key:8,file:v(ge),loading:v(Oe),error:v(Fe),line:v(fe)?.line,"download-url":v(pt),closable:"","external-actions":v(kt),editable:v(o).fsWriteSupported.value&&v(o).activeSessionId.value!==null,"open-file":yo,onClose:At,onOpenExternal:v(Jt),onReveal:v(kn),onOpenEditor:pe[76]||(pe[76]=Le=>Lo(Le))},null,8,["file","loading","error","line","download-url","external-actions","editable","onOpenExternal","onReveal"])):Y("",!0)]),pe[120]||(pe[120]=b("div",{class:"pfc-host"},null,-1))])],10,aZe)):Y("",!0),$n.value&&Hn.value?(g(),ue(y$e,{key:7,media:$n.value,src:Hn.value,onClose:Mn},null,8,["media","src"])):Y("",!0),W(d$e,{enabled:!Os.value,"panel-source":Ta.value,onAdd:Wo},null,8,["enabled","panel-source"]),to.value?(g(),ue(YBe,{key:8,models:v(o).models.value,current:v(o).status.value.modelId,"starred-ids":v(o).starredModelIds.value,loading:es.value,unavailable:Hs.value,onSelect:pe[77]||(pe[77]=Le=>Te(Le)),onToggleStar:pe[78]||(pe[78]=Le=>v(o).toggleStarModel(Le)),onClose:pe[79]||(pe[79]=Le=>to.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):Y("",!0),no.value?(g(),ue(iDe,{key:9,status:v(o).status.value,thinking:D.value,"plan-mode":v(o).planMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"cost-usd":v(o).sessionCost.value,onClose:pe[80]||(pe[80]=Le=>no.value=!1)},null,8,["status","thinking","plan-mode","dynamic-workflow-mode","cost-usd"])):Y("",!0),Co.value?(g(),ue(VHe,{key:10,"browse-fs":v(o).browseFs,"get-fs-home":v(o).getFsHome,"default-path":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,error:gs.value,onAdd:pe[81]||(pe[81]=Le=>hr(Le)),onClose:ts},null,8,["browse-fs","get-fs-home","default-path","error"])):Y("",!0),W(qi,{name:"gload-fade"},{default:ae(()=>[v(o).initialized.value?Y("",!0):(g(),ue(oUe,{key:0,issue:v(o).connectIssue.value},null,8,["issue"]))]),_:1}),R.value?(g(),ue(Pqe,{key:11,onComplete:Z})):q.value?(g(),ue(dB,{key:12,onComplete:te,onSkip:te})):Y("",!0),W(dDe,{warnings:v(o).warnings.value,onDismiss:v(o).dismissWarning},null,8,["warnings","onDismiss"]),W(ADe),b("div",hZe,[l.value?(g(),ue(t8,{key:`${l.value.kind}:${l.value.ids.join(",")}`,duration:8e3,onDismiss:pe[82]||(pe[82]=Le=>l.value=null)},{default:ae(()=>[b("span",null,I(v(y)(l.value.kind==="done"?"admin.actionArchived":"admin.actionRestored",{n:l.value.ids.length})),1),b("button",{type:"button",class:"session-action-undo",onClick:Wt},I(v(y)("sidebar.archiveToastUndo")),1)]),_:1})):Y("",!0),r.value?(g(),ue(t8,{key:`${r.value.sessionId}:${r.value.state}`,duration:r.value.state==="running"?6e4:4e3,onDismiss:pe[83]||(pe[83]=Le=>r.value=null)},{default:ae(()=>[He(I(v(y)(r.value.state==="running"?"admin.exporting":"admin.exported")),1)]),_:1},8,["duration"])):Y("",!0),a.value?(g(),ue(t8,{key:a.value,duration:5e3,onDismiss:pe[84]||(pe[84]=Le=>a.value=null)},{default:ae(()=>[He(I(a.value),1)]),_:1})):Y("",!0)]),v(_)?(g(),ue(NUe,{key:13})):Y("",!0),v(A)?(g(),ue(rVe,{key:14,modelValue:P.value,"onUpdate:modelValue":pe[85]||(pe[85]=Le=>P.value=Le),groups:v(o).workspaceGroups.value,"active-workspace-id":v(o).activeWorkspaceId.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"attention-by-workspace":v(o).attentionByWorkspace.value,onSelect:pe[86]||(pe[86]=Le=>v(o).selectSession(Le)),onCreate:jr,onCreateInWorkspace:pe[87]||(pe[87]=Le=>P1(Le)),onAddWorkspace:pe[88]||(pe[88]=Le=>Co.value=!0),onRename:pe[89]||(pe[89]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onArchive:pe[90]||(pe[90]=Le=>Qe(Le)),onDeleteWorkspace:pe[91]||(pe[91]=Le=>Vn(Le)),onLoadMore:pe[92]||(pe[92]=Le=>void v(o).loadMoreSessions(Le))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):Y("",!0),v(A)?(g(),ue(vWe,{key:15,modelValue:z.value,"onUpdate:modelValue":pe[93]||(pe[93]=Le=>z.value=Le),status:v(o).status.value,thinking:v(o).thinking.value,models:v(o).models.value,"plan-mode":v(o).planMode.value,"goal-mode":v(o).goalMode.value,goal:v(o).goal.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"color-scheme":v(o).colorScheme.value,"ui-font-size":v(o).uiFontSize.value,"conversation-toc":v(o).conversationToc.value,"server-version":v(o).serverVersion.value,onPickModel:pe[94]||(pe[94]=Le=>bl()),onSetThinking:pe[95]||(pe[95]=Le=>v(o).setThinking(Le)),onTogglePlan:pe[96]||(pe[96]=Le=>v(o).togglePlanMode()),onToggleWorkflow:pe[97]||(pe[97]=Le=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[98]||(pe[98]=Le=>v(o).toggleGoalMode()),onControlGoal:pe[99]||(pe[99]=Le=>v(o).controlGoal(Le)),onSetPermission:pe[100]||(pe[100]=Le=>v(o).setPermission(Le)),onSetColorScheme:pe[101]||(pe[101]=Le=>v(o).setColorScheme(Le)),onSetUiFontSize:pe[102]||(pe[102]=Le=>v(o).setUiFontSize(Le)),onSetConversationToc:pe[103]||(pe[103]=Le=>v(o).setConversationToc(Le)),onLogin:pe[104]||(pe[104]=()=>{z.value=!1,ke()})},null,8,["modelValue","status","thinking","models","plan-mode","goal-mode","goal","dynamic-workflow-mode","color-scheme","ui-font-size","conversation-toc","server-version"])):Y("",!0)],6)),Vo.value?(g(),ue(lHe,{key:4,"color-scheme":v(o).colorScheme.value,accent:v(o).accent.value,"ui-font-size":v(o).uiFontSize.value,"auth-ready":v(o).authReady.value,"account-model":v(o).defaultModel.value,notify:v(o).notifyOnComplete.value,"notify-question":v(o).notifyOnQuestion.value,"notify-approval":v(o).notifyOnApproval.value,"notify-permission":v(o).notifyPermission.value,sound:v(o).soundOnComplete.value,"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,config:v(o).config.value,models:v(o).models.value,"config-saving":vs.value,"server-version":v(o).serverVersion.value,backend:v(o).backend.value,"experimental-flag-states":v(o).experimentalFlagStates.value,"subagent-model-policy":v(o).subagentModelPolicy.value,"subagent-model-policy-saving":v(o).subagentModelPolicySaving.value,onSaveSubagentModelPolicy:pe[105]||(pe[105]=Le=>void v(o).saveSubagentModelPolicy(Le)),onClearSubagentModelPolicy:pe[106]||(pe[106]=Le=>void v(o).clearSubagentModelPolicy()),"initial-tab":Qi.value,onSetColorScheme:pe[107]||(pe[107]=Le=>v(o).setColorScheme(Le)),onSetAccent:pe[108]||(pe[108]=Le=>v(o).setAccent(Le)),onSetUiFontSize:pe[109]||(pe[109]=Le=>v(o).setUiFontSize(Le)),onSetNotify:pe[110]||(pe[110]=Le=>v(o).setNotifyOnComplete(Le)),onSetNotifyQuestion:pe[111]||(pe[111]=Le=>v(o).setNotifyOnQuestion(Le)),onSetNotifyApproval:pe[112]||(pe[112]=Le=>v(o).setNotifyOnApproval(Le)),onSetSound:pe[113]||(pe[113]=Le=>v(o).setSoundOnComplete(Le)),onSetConversationToc:pe[114]||(pe[114]=Le=>v(o).setConversationToc(Le)),onSetTurnFolding:pe[115]||(pe[115]=Le=>v(o).setTurnFolding(Le)),onSetActivityRunFolding:pe[116]||(pe[116]=Le=>v(o).setActivityRunFolding(Le)),onUpdateConfig:pe[117]||(pe[117]=Le=>Ht(Le)),onOpenOnboarding:pe[118]||(pe[118]=()=>{Vo.value=!1,ee()}),onClose:pe[119]||(pe[119]=Le=>Vo.value=!1)},null,8,["color-scheme","accent","ui-font-size","auth-ready","account-model","notify","notify-question","notify-approval","notify-permission","sound","conversation-toc","turn-folding","activity-run-folding","config","models","config-saving","server-version","backend","experimental-flag-states","subagent-model-policy","subagent-model-policy-saving","initial-tab"])):Y("",!0),W(ZHe)]))}}),gZe=vt(mZe,[["__scopeId","data-v-628646c9"]]);Cge();o5(gZe).use(Mo).mount("#app");export{kR as $,$2 as A,uP as B,xs as C,fKe as D,zM as E,Ce as F,L0 as G,He as H,W as I,WR as J,PZe as K,Rl as L,Je as M,NF as N,HZe as O,DZe as P,qZe as Q,O4 as R,lu as S,hl as T,VZe as U,Mg as V,OZe as W,hKe as X,WZe as Y,rKe as Z,vZe as _,cA as a,cs as a$,Ts as a0,cg as a1,SZe as a2,hg as a3,OA as a4,vn as a5,Ru as a6,IZe as a7,vKe as a8,NZe as a9,hA as aA,bP as aB,mA as aC,In as aD,MP as aE,CP as aF,pf as aG,SP as aH,En as aI,gg as aJ,GR as aK,g as aL,IF as aM,TZe as aN,qn as aO,XM as aP,AZe as aQ,W4 as aR,ds as aS,zl as aT,V as aU,tKe as aV,GF as aW,rt as aX,jn as aY,yg as aZ,FZe as a_,RZe as aa,BZe as ab,zZe as ac,oKe as ad,yKe as ae,fn as af,cF as ag,xp as ah,l1 as ai,ya as aj,ps as ak,nKe as al,il as am,g1 as an,It as ao,KZe as ap,GZe as aq,io as ar,yt as as,hF as at,Be as au,mR as av,Gt as aw,kP as ax,xP as ay,vo as az,MZe as b,O2e as b$,uKe as b0,L2 as b1,Y4 as b2,aKe as b3,m1 as b4,jR as b5,wZe as b6,Uo as b7,nP as b8,cKe as b9,js as bA,_i as bB,uF as bC,iKe as bD,Ke as bE,sA as bF,LZe as bG,sP as bH,XZe as bI,ae as bJ,UZe as bK,Jn as bL,go as bM,sKe as bN,xt as bO,EZe as bP,ho as bQ,Cs as bR,SKe as bS,CKe as bT,UL as bU,MKe as bV,i2e as bW,qL as bX,s7 as bY,IKe as bZ,V2e as b_,yZe as ba,I as bb,l4 as bc,jZe as bd,so as be,bZe as bf,kZe as bg,l8 as bh,eKe as bi,HR as bj,v as bk,vf as bl,gKe as bm,pKe as bn,BF as bo,$Ze as bp,JZe as bq,oP as br,mKe as bs,ZZe as bt,r4 as bu,aA as bv,n5 as bw,WF as bx,nT as by,b8 as bz,lKe as c,Ev as c0,Av as c1,Tv as c2,$Ke as c3,$5 as c4,Kc as c5,I5 as c6,R2e as c7,P2e as c8,NKe as c9,vt as cA,LKe as ca,bKe as cb,zKe as cc,Wp as cd,Di as ce,Q2e as cf,J2e as cg,Jde as ch,xKe as ci,Kde as cj,Gde as ck,_Ke as cl,Iv as cm,efe as cn,Ix as co,ux as cp,r2e as cq,L5 as cr,E5 as cs,AKe as ct,EKe as cu,kKe as cv,TKe as cw,Ee as cx,wKe as cy,Dze as cz,QZe as d,r1 as e,_Ze as f,qi as g,FF as h,xZe as i,CZe as j,Dl as k,hf as l,Fs as m,mp as n,wa as o,dKe as p,B as q,o5 as r,ue as s,Y as t,S as u,b as v,GP as w,YZe as x,KP as y,YF as z}; +`))}return t.length>0?t:void 0}function jd(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function HUe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const pB=V(typeof window>"u"?0:window.innerWidth);let i4=0,cp=!1;function lg(){pB.value=window.innerWidth}function DUe(){cp||typeof window>"u"||(window.addEventListener("resize",lg),cp=!0,lg())}function VUe(){!cp||typeof window>"u"||(window.removeEventListener("resize",lg),cp=!1)}function hB(e,t,n){return Math.max(t,e-n)}function rg(e,t,n){return Math.min(n,Math.max(t,e))}function mB(){return In(()=>{i4+=1,DUe()}),vo(()=>{i4=Math.max(0,i4-1),i4===0&&VUe()}),{viewportWidth:pB}}const WUe="pythinker-web.file-preview-width",Vc=320;function qUe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=mB(),i=B(()=>Math.max(0,s.value-t.value)),l=B(()=>hB(i.value,Vc,Vc));function r(j){return rg(Math.round(j),Vc,l.value)}function a(){return r(i.value/2)}const c=B(()=>a()),u=V(c.value),d=B(()=>rg(u.value,Vc,l.value)),f=V(null),p=B(()=>{const j=f.value;if(!j)return null;const K=e.turns.value.find(he=>he.id===j.turnId);return K?.role==="compaction"&&K.text?K.text:null}),h=B(()=>p.value!==null);function m(j){n.value="compaction",f.value=j}function k(){f.value=null,n.value==="compaction"&&(n.value=null)}const x=V(null),y=B(()=>{const j=x.value;if(!j)return{entry:void 0,version:0};const K=e.auxiliaryTranscripts.getEntry(j.sessionId,j.subagentId);return{entry:K,version:K?.version.value??0}});function w(j){const K=e.activeAppTasks.value.find(he=>he.agentId===j||he.id===j||he.backgroundTaskId===j||he.parentToolCallId===j);return K?.agentId??K?.id??j}const _=B(()=>{const j=x.value;if(!j)return null;const K=e.activeAppTasks.value.find(et=>et.agentId===j.subagentId||et.id===j.subagentId||et.backgroundTaskId===j.subagentId);if(K)return Hxe(K);const he=y.value.entry?.channel;if(!he)return null;const ye=he.agents.find(et=>et.agentId===j.subagentId),ve=he.snapshot.items.findLast(et=>et.kind==="turn"),ie=he.snapshot.meta.activity==="turn",de=he.loading,be=ve?.kind==="turn"&&ve.state==="failed",Se=ve?.kind==="turn"&&ve.state==="cancelled",je=he.refreshError&&ve===void 0;return{id:j.subagentId,name:ye?.label??j.subagentId,subagentType:ye?.type==="sub"?"subagent":ye?.type,phase:ie?"working":Se?"cancelled":be||je?"failed":de?"queued":"completed",status:ie||de?"running":Se?"cancelled":be||je?"failed":"completed"}}),A=B(()=>{const j=x.value,K=y.value.entry?.channel;if(!j||!K)return[];const he=K.agents.find(ye=>ye.agentId===j.subagentId);return RUe(K.snapshot,he,{sessionId:j.sessionId,getFileUrl:ye=>e.getFileUrl(ye)})}),P=B(()=>y.value.entry?.channel.loading??!1),z=B(()=>y.value.entry?.channel.refreshError??!1),L=B(()=>y.value.entry?.channel.loadingOlder??!1),T=B(()=>y.value.entry?.channel.loadOlderError??!1),I=B(()=>y.value.entry?.channel.snapshot.hasMoreOlder??!1),N=B(()=>y.value.entry?.channel.snapshot.meta.activity==="turn"),C=B(()=>_.value!==null);function F(j){const K=e.activeSessionId.value;if(!j||!K)return;const he=w(j),ye=x.value;ye&&ye.subagentId!==he&&e.auxiliaryTranscripts.deactivate(ye.sessionId,ye.subagentId),x.value={sessionId:K,subagentId:he},n.value="agent",e.auxiliaryTranscripts.activate(K,he)}function H(){const j=x.value;j&&e.auxiliaryTranscripts.deactivate(j.sessionId,j.subagentId),x.value=null,n.value==="agent"&&(n.value=null)}Ke(n,(j,K)=>{if(K!=="agent"||j==="agent")return;const he=x.value;he&&e.auxiliaryTranscripts.deactivate(he.sessionId,he.subagentId)});function D(){y.value.entry?.channel.loadOlder().catch(()=>{})}const M=V(null),R=B(()=>{const j=M.value;if(!j)return null;const K=nee(e.turns.value,j);return K?{id:j,title:ni(K.name),path:Dg(K.arg),lines:K.status==="error"?null:Hg(K),output:K.output}:null}),O=B(()=>R.value!==null);function U(j){n.value="toolDiff",M.value=j}function Z(){M.value=null,n.value==="toolDiff"&&(n.value=null)}const q=V("list"),te=V(null);function ee(){n.value="diff",q.value="list",te.value=null,e.loadGitStatus(e.activeSessionId.value)}function J(){n.value==="diff"&&(n.value=null),q.value="list",te.value=null,e.clearFileDiff()}async function se(j){q.value="detail",te.value=j,await e.loadFileDiff(j)}async function Q(j){!e.activeSessionId.value&&e.activeWorkspaceId.value?await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,j):await e.openSideChat(j),n.value="btw"}function me(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function xe(){n.value==="btw"&&(n.value=null)}const Ye=B(()=>e.sideChatVisible.value),at=B(()=>n.value!==null&&(n.value!=="compaction"||h.value)&&(n.value!=="agent"||C.value)&&(n.value!=="toolDiff"||O.value)&&(n.value!=="btw"||Ye.value)),X=V(!1);function oe(){return n.value==="compaction"&&h.value?(k(),!0):n.value==="agent"&&C.value?(H(),!0):n.value==="toolDiff"&&O.value?(Z(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(J(),!0):n.value==="btw"?(me(),!0):!1}return Ke(e.activeSessionId,()=>{o(),k(),H(),Z(),J(),xe()}),{PREVIEW_WIDTH_KEY:WUe,PREVIEW_MIN:Vc,previewDefaultWidth:c,previewMax:l,previewWidth:u,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:h,openCompactionPanel:m,closeCompactionPanel:k,agentPanelMember:_,agentPanelTurns:A,agentPanelLoading:P,agentPanelLoadError:z,agentPanelLoadingMore:L,agentPanelLoadMoreError:T,agentPanelHasMore:I,agentPanelRunning:N,agentPanelVisible:C,openAgentPanel:F,closeAgentPanel:H,loadOlderAgentMessages:D,toolDiffTarget:R,toolDiffVisible:O,openToolDiff:U,closeToolDiff:Z,detailDiffMode:q,detailDiffPath:te,openDiffDetail:ee,closeDiffDetail:J,selectDiffFile:se,btwVisible:Ye,openSideChatTab:Q,closeSideChat:me,hideSideChatPanel:xe,sidePanelVisible:at,panelDragging:X,closeOpenSidePanel:oe}}const UUe=dn.sidebarWidth,AM=dn.sidebarCollapsed,TM=270,o8=170,ZUe=480,KUe=320;function GUe(e={}){const{viewportWidth:t}=mB(),n=V(TM),o=V(!1),s=V(!1),i=B(()=>{const u=KUe+(r8(e.previewOpen)?Vc:0);return Math.min(ZUe,hB(t.value,o8,u))}),l=B(()=>rg(n.value,o8,i.value));function r(){try{o.value=ls(AM)==="true"}catch{o.value=!1}}function a(){try{Es(AM,String(o.value))}catch{}}function c(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:UUe,SIDEBAR_DEFAULT:TM,SIDEBAR_MIN:o8,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:l,loadSidebarCollapsed:r,toggleSidebarCollapse:c}}async function YUe(e){if(!e.fileId)return{url:e.url};try{const t=await Ct().getFileBlob(e.fileId),n=URL.createObjectURL(t);return{url:n,revoke:()=>URL.revokeObjectURL(n)}}catch{return{url:e.url}}}function XUe({client:e,detailTarget:t}){const{t:n}=$t(),o=V(null),s=V(null),i=V(!1),l=V(null),r=V(null);let a=0;const c=B(()=>{const w=r.value;return w?e.getFileDownloadUrl(w):null}),u=B(()=>o.value!==null);function d(w){return w.length>1?w.replace(/\/+$/,""):w}function f(w){const _=[];for(const A of w.split(/[\\/]+/))if(!(!A||A===".")){if(A===".."){_.pop();continue}_.push(A)}return _.join("/")}function p(w){const _=w.trim();if(!_)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(_))return{error:n("filePreview.errors.unsupportedPath")};if(_.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const A=d(e.status.value.cwd);if(_.startsWith("/")){if(!A||_!==A&&!_.startsWith(`${A}/`))return{error:n("filePreview.errors.outsideWorkspace")};const z=_===A?"":_.slice(A.length+1);if(z.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const L=f(z);return L?{path:L}:{error:n("filePreview.errors.isDirectory")}}if(_.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const P=f(_);return P?{path:P}:{error:n("filePreview.errors.emptyPath")}}async function h(w){const _=++a;t.value="file",s.value=null,l.value=null,i.value=!0,o.value=w,r.value=null;const A=p(w.path);if("error"in A){i.value=!1,l.value=A.error;return}r.value=A.path;try{const P=await e.readFileContent(A.path);if(_!==a)return;P?s.value={...P,path:P.path||A.path}:l.value=n("filePreview.errors.loadFailed")}catch(P){if(_!==a)return;l.value=P instanceof Error?P.message:n("filePreview.errors.loadFailed")}finally{_===a&&(i.value=!1)}}function m(){a+=1,o.value=null,r.value=null,s.value=null,l.value=null,i.value=!1}function k(){m(),t.value==="file"&&(t.value=null)}Ke(t,(w,_)=>{_==="file"&&w!=="file"&&m()});function x(){const w=s.value?.path??o.value?.path;w&&e.openWorkspaceFile(w,o.value?.line)}function y(){const w=s.value?.path??o.value?.path;w&&e.revealWorkspaceFile(w)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:l,previewDownloadUrl:c,previewExternalActions:u,openFilePreview:h,closeFilePreview:k,openPreviewInEditor:x,revealPreviewFile:y}}const JUe=new Set(["agent","compaction","btw"]);function QUe(e){const t=V([]),n=V(null),o=V(!1),s=V(!1),i=new Map;let l=0;const r=B(()=>t.value.find(k=>k.id===n.value)??null);function a(k){const x=k.always?void 0:t.value.find(w=>w.type===k.type&&w.key===k.key);if(x)return x.title=k.title,x.payload=k.payload,n.value=x.id,o.value=!0,x;const y={...k,id:`panel-tab-${++l}`};return t.value=[...t.value,y],n.value=y.id,o.value=!0,y}function c(k){t.value.some(x=>x.id===k)&&(n.value=k,o.value=!0)}function u(k){const x=t.value.findIndex(w=>w.id===k);if(x<0)return null;const[y]=t.value.splice(x,1);if(t.value=[...t.value],n.value===k){const w=t.value[Math.min(x,t.value.length-1)];n.value=w?.id??null}return t.value.length===0&&(o.value=!1,s.value=!1),y??null}function d(){return o.value?(o.value=!1,s.value=!1,!0):!1}function f(){o.value=!o.value,o.value||(s.value=!1)}function p(){r.value!==null&&(s.value=!s.value,s.value&&(o.value=!0))}function h(k){const x=t.value.filter(w=>JUe.has(w.type)),y=Math.max(0,x.findIndex(w=>w.id===n.value));if(x.length===0){i.delete(k);return}i.set(k,{tabs:x.map(({id:w,..._})=>({..._})),activeIndex:y,visible:o.value})}function m(k){const x=i.get(k);t.value=x?.tabs.map(y=>({...y,id:`panel-tab-${++l}`}))??[],n.value=t.value[x?.activeIndex??0]?.id??null,o.value=x?.visible===!0&&t.value.length>0,s.value=!1}return Ke(e,(k,x)=>{h(x),m(k)}),{tabs:t,activeTabId:n,activeTab:r,visible:o,expanded:s,openTab:a,activateTab:c,closeTab:u,hidePanel:d,togglePanel:f,toggleExpanded:p}}const eZe={class:"server-auth-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"server-auth-title"},tZe={class:"server-auth-card"},nZe={class:"server-auth-body"},oZe={class:"server-auth-foot"},sZe=Je({__name:"ServerAuthDialog",setup(e){const t=V(""),n=V(null),o=V(!1);In(()=>{yt(()=>n.value?.focus())});function s(){const l=t.value;!l||o.value||(o.value=!0,FN(l),window.location.reload())}function i(l){l.key==="Enter"&&(l.preventDefault(),s())}return(l,r)=>(g(),S("div",eZe,[b("div",tZe,[r[1]||(r[1]=b("div",{class:"server-auth-head"},[b("h1",{id:"server-auth-title",class:"server-auth-title"},"Server token required"),b("p",{class:"server-auth-hint"},[He(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),b("code",null,"PYTHINKER_CODE_PASSWORD"),He("). ")])],-1)),b("div",nZe,[W(us,{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),b("div",oZe,[W(Nt,{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:ae(()=>[He(E(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])])])]))}}),iZe=vt(sZe,[["__scopeId","data-v-82dad292"]]),lZe={class:"app-shell"},rZe={key:2,class:"offline-strip",role:"status"},aZe=["aria-label","aria-hidden"],cZe={class:"pt-shell"},uZe={class:"pt-body"},dZe=["aria-label"],fZe=["disabled"],pZe=["disabled"],hZe={class:"action-toast-stack"},mZe=Je({__name:"App",setup(e){Sve();const t=V(!1);let n=null;const o=R1(),s=V([]),i=V(!1),l=V(null),r=V(null),a=V(null);let c=null;const u=B(()=>{const Re=o.activeWorkspaceId.value;return Re?[...o.sessionsForView.value,...s.value].filter(pe=>pe.workspaceId===Re).toSorted((pe,Le)=>new Date(Le.updatedAt??0).getTime()-new Date(pe.updatedAt??0).getTime()).slice(0,6):[]});function d(Re){return{id:Re.id,title:Re.title,time:new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,Math.floor((Date.now()-new Date(Re.updatedAt).getTime())/864e5)),"day"),busy:!1,updatedAt:Re.updatedAt,workspaceId:Re.workspaceId,archived:!0}}async function f(){try{const Re=[];let pe;for(;;){const Le=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Re.push(...Le.items),!Le.hasMore||Le.items.length===0||(pe=Le.items.at(-1)?.id,pe===void 0))break}s.value=Re.map(d)}catch(Re){console.warn("loadDoneSessions failed",Re)}}const p=B(()=>{const Re=new Map(o.workspaceGroups.value.flatMap(pe=>pe.sessions.map(Le=>[Le.id,Le.updatedAt])));return o.sessionsForView.value.map(pe=>({id:pe.id,title:pe.title,workspaceId:pe.workspaceId??"",workspaceName:pe.workspaceName??"-",lastPrompt:pe.lastPrompt,updatedAt:pe.updatedAt??Re.get(pe.id)??new Date(0).toISOString(),archived:!1}))});async function h(){const Re=[];let pe;for(;;){const Sn=await o.loadArchivedSessions({beforeId:pe,pageSize:100});if(Re.push(...Sn.items),!Sn.hasMore||Sn.items.length===0||(pe=Sn.items.at(-1)?.id,pe===void 0))break}const Le=o.workspacesView.value;return Re.filter(Sn=>!Sn.parentSessionId).map(Sn=>{const ii=Le.find(el=>el.id===Sn.workspaceId||el.root===Sn.cwd);return{id:Sn.id,title:Sn.title,workspaceId:ii?.id??Sn.workspaceId??Sn.cwd,workspaceName:ii?.name??Sn.cwd.split("/").filter(Boolean).at(-1)??"-",lastPrompt:Sn.lastPrompt,updatedAt:Sn.updatedAt,archived:!0}})}function m(){i.value=!0,o.loadAllSessions()}function k(Re,pe){l.value={kind:Re,ids:Array.isArray(pe)?pe:[pe]}}const x=B(()=>!o.dangerousBypassAuth.value&&t.value);qn("resolveImage",o.resolveImageUrl),qn("modelDisplay",Re=>{if(Re===void 0||Re.length===0)return;const pe=o.models.value.find(Le=>Le.id===Re)??o.models.value.find(Le=>Le.model===Re);return pe?.displayName||pe?.model||(Re.includes("/")?Re.split("/").pop():Re)}),qn("subagentEffort",Re=>Re!==void 0&&Re.length>0&&Re!=="off"&&Re!=="on"?rf(Re):void 0),qn("resolveDynamicWorkflowMembers",Re=>o.dynamicWorkflowMembersByToolCallId.value.get(Re)??[]),qn("mainModelBinding",()=>{const Re=o.status.value.modelId;if(Re)return{model:Re,effort:o.thinking.value}}),qn("openAgentSettings",()=>{Ks("agent")});const{t:y}=$t(),{confirm:w}=z1(),_=pr(),A=r6(),P=V(!1),z=V(!1),L=B(()=>{const Re=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Re)?.title??s.value.find(pe=>pe.id===Re)?.title??""}),T=B(()=>{const Re=o.activeSessionId.value;return o.sessions.value.find(pe=>pe.id===Re)?.lastTurnReason}),I=B(()=>{const Re=o.activeSessionId.value;if(Re)return nve(Re)}),N=B(()=>s.value.some(Re=>Re.id===o.activeSessionId.value)),C=B(()=>o.visibleWorkspace.value?.sessionCount??0),F=B(()=>o.activity.value!=="idle"),{showAuthGate:H}=zUe({client:o});BUe({running:F,showAuthGate:H});const D=B(()=>{const Re=o.models.value.find(pe=>pe.id===o.status.value.modelId);return k9(Re,o.thinking.value)}),M=V(!1),R=B(()=>o.appState.value==="first-run"),O=B(()=>o.appState.value==="recovery"&&!M.value),U=B(()=>o.appState.value==="recovery"&&M.value);Ke(()=>o.appState.value,Re=>{Re!=="recovery"&&(M.value=!1)});function Z(){M.value=!1}const q=V(!1);function te(){o.setOnboarded(!0),q.value=!1}function ee(){q.value=!0}let J=0;function se(){const Re=window.visualViewport,pe=document.documentElement.style;pe.setProperty("--app-height",`${Re?.height??window.innerHeight}px`),pe.setProperty("--app-top",`${Re?.offsetTop??0}px`)}function Q(){J||(J=requestAnimationFrame(()=>{J=0,se()}))}In(()=>{n=Ave(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),hs(),se(),window.visualViewport?.addEventListener("resize",Q),window.visualViewport?.addEventListener("scroll",Q),window.addEventListener("resize",Q),document.addEventListener("keydown",me,!0)}),En(()=>{Mn(),document.removeEventListener("keydown",me,!0),window.visualViewport?.removeEventListener("resize",Q),window.visualViewport?.removeEventListener("scroll",Q),window.removeEventListener("resize",Q),J&&(cancelAnimationFrame(J),J=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function me(Re){Re.key!=="Escape"||Re.isComposing||kl.value||de()&&(Re.stopPropagation(),Re.preventDefault())}const xe=V(null),Ye=V(null),at=B(()=>o.activeSessionId.value??`__draft__:${o.activeWorkspaceId.value??"none"}`),{tabs:X,activeTabId:oe,activeTab:j,visible:K,expanded:he,openTab:ye,activateTab:ve,closeTab:ie,hidePanel:de,togglePanel:be,toggleExpanded:Se}=QUe(at);function je(Re){Ye.value=Re,xe.value="turnDiff"}function et(){Ye.value=null,xe.value==="turnDiff"&&(xe.value=null)}const le=V(!1);Ke(o.activeSessionId,()=>{et(),le.value=!0,yt(()=>{le.value=!1})});const{previewTarget:fe,previewFile:ge,previewLoading:Oe,previewError:Fe,previewDownloadUrl:pt,previewExternalActions:kt,openFilePreview:qt,closeFilePreview:nn,openPreviewInEditor:Jt,revealPreviewFile:kn}=XUe({client:o,detailTarget:xe});RNe(()=>o.activeSessionId.value);function Dn(Re){xe.value="editor",nB({path:Re,line:fe.value?.line})}function xn(){xe.value==="editor"&&(xe.value=null),ng()}Ke(xe,(Re,pe)=>{pe==="editor"&&Re!=="editor"&&ng()});const $n=V(null),Hn=V(null);let bn=0,Wn;async function Pn(Re){if(Re.kind!=="image"&&Re.kind!=="video")return;const pe=++bn;Wn?.(),Wn=void 0,$n.value=null,Hn.value=null;const Le=await YUe(Re);if(pe!==bn){Le.revoke?.();return}Wn=Le.revoke,$n.value=Re,Hn.value=Le.url}function Mn(){bn+=1,Wn?.(),Wn=void 0,$n.value=null,Hn.value=null}const Nn=B(()=>K.value),{SIDEBAR_WIDTH_KEY:An,SIDEBAR_DEFAULT:Qn,SIDEBAR_MIN:Fn,sidebarMax:Qt,sessionColWidth:uo,sidebarCollapsed:Zn,sidebarDragging:Bo,sideWidth:Un,loadSidebarCollapsed:hs,toggleSidebarCollapse:Io}=GUe({previewOpen:Nn}),{PREVIEW_WIDTH_KEY:Rt,PREVIEW_MIN:Jo,previewDefaultWidth:Ls,previewMax:$e,previewWidth:Ge,previewPanelWidth:ot,compactionPanelText:dt,compactionPanelVisible:Mt,openCompactionPanel:Ft,closeCompactionPanel:Ut,agentPanelMember:en,agentPanelTurns:tn,agentPanelLoading:eo,agentPanelLoadError:Ro,agentPanelLoadingMore:$s,agentPanelLoadMoreError:Do,agentPanelHasMore:We,agentPanelRunning:st,openAgentPanel:Xe,closeAgentPanel:qe,loadOlderAgentMessages:Pe,toolDiffTarget:bt,openToolDiff:Lt,closeToolDiff:cn,detailDiffMode:So,detailDiffPath:Qo,openDiffDetail:Po,closeDiffDetail:Xn,selectDiffFile:pn,btwVisible:Us,openSideChatTab:mi,closeSideChat:oi,hideSideChatPanel:ql,panelDragging:vl}=qUe({client:o,sideWidth:Un,detailTarget:xe,closeFilePreview:nn});function Zs(Re){return Re.split(/[\\/]/).filter(Boolean).at(-1)??Re}function yo(Re){ye({type:"file",key:Re.path,title:Zs(Re.path),icon:"file-text",payload:Re})}function Lo(Re){ye({type:"editor",key:Re,title:Zs(Re),icon:"file-edit",payload:{path:Re}})}function yl(Re){ye({type:"compaction",key:Re.turnId,title:y("panel.tabs.compaction"),icon:"thinking",payload:Re})}function ms(Re){const pe=o.activeAppTasks.value.find(Le=>Le.agentId===Re||Le.id===Re||Le.backgroundTaskId===Re||Le.parentToolCallId===Re);ye({type:"agent",key:pe?.agentId??pe?.id??Re,title:pe?.description||y("panel.tabs.agent"),icon:"robot",payload:{target:Re}})}Ke(o.activeAppTasks,Re=>{for(const pe of X.value){if(pe.type!=="agent")continue;const Le=pe.payload?.target??pe.key,Sn=Re.find(ii=>ii.agentId===Le||ii.id===Le||ii.backgroundTaskId===Le||ii.parentToolCallId===Le);Sn?.description&&(pe.title=Sn.description)}});function wl(Re){Lt(Re);const pe=bt.value;ye({type:"toolDiff",key:Re,title:pe?.path?Zs(pe.path):pe?.title??y("panel.tabs.diff"),icon:"file-edit",payload:{id:Re}})}function gi(){ye({type:"diff",key:"workspace",title:y("panel.tabs.diff"),icon:"git-fork"})}function si(Re){const pe=X.value.find(Le=>Le.type==="turnDiff"&&Le.key===Re.turnId);if(pe?.id===oe.value){Ie(pe.id);return}ye({type:"turnDiff",key:Re.turnId,title:y("panel.tabs.turnDiff"),icon:"git-fork",payload:Re})}async function Ul(Re){await mi(Re),ye({type:"btw",key:"side-chat",title:y("sideChat.title"),icon:"message",payload:{prompt:Re}})}function Ni(Re){Re.type==="file"?nn():Re.type==="editor"?xn():Re.type==="compaction"?Ut():Re.type==="agent"?qe():Re.type==="toolDiff"?cn():Re.type==="diff"?Xn():Re.type==="turnDiff"?et():Re.type==="btw"&&ql()}function Ae(Re){if(Re===null){xe.value=null;return}Re.type==="file"?qt(Re.payload):Re.type==="editor"?Dn(Re.payload.path):Re.type==="compaction"?Ft(Re.payload):Re.type==="agent"?Xe(Re.payload.target):Re.type==="toolDiff"?Lt(Re.payload.id):Re.type==="diff"?Po():Re.type==="turnDiff"?je(Re.payload):Re.type==="btw"&&(xe.value="btw")}Ke(j,(Re,pe)=>{pe&&pe.id!==Re?.id&&Ni(pe),Ae(Re)},{flush:"post"});function Ie(Re){X.value.find(Le=>Le.id===Re)?.type==="btw"&&oi(),ie(Re)}function At(){oe.value&&Ie(oe.value)}const lt=V(null),mn=V(null);function Kn(){let Re=!1;const pe=Le=>{Le instanceof KeyboardEvent&&Le.repeat||(Re=!0)};return document.addEventListener("pointerdown",pe,!0),document.addEventListener("keydown",pe,!0),window.addEventListener("blur",pe),document.addEventListener("visibilitychange",pe),()=>{yt(()=>{document.removeEventListener("pointerdown",pe,!0),document.removeEventListener("keydown",pe,!0),window.removeEventListener("blur",pe),document.removeEventListener("visibilitychange",pe),!Re&&document.hasFocus()&&mn.value?.focusInput()})}}const to=V(!1),Co=V(!1),no=V(!1),Vo=V(!1),Qi=V("general"),Os=B(()=>m0.value>0||to.value||Co.value||no.value||Vo.value||P.value||z.value||$n.value!==null),Ta=B(()=>j.value?.title);function Wo(Re){lt.value?.insertComposerQuote(Re),A.value&&K.value&&de()}const zi=V(null),gs=V(null),kl=B(()=>m0.value>0||to.value||Co.value||no.value||Vo.value||q.value||P.value||z.value||$n.value!==null),es=V(!1),Hs=V(!1),vs=V(!1);async function bl(){es.value=!0,Hs.value=!1,to.value=!0;try{await o.refreshAllProviders()}catch{Hs.value=!0}finally{es.value=!1}}function Ks(Re="general"){Qi.value=Re,Vo.value=!0}function ne(){Ks("providers")}function ke(){ne()}async function Te(Re){to.value=!1,await Ne(Re)}async function Ne(Re){await o.setModel(Re)&&Re!==o.defaultModel.value&&o.updateConfig({defaultModel:Re})}async function Qe(Re){await o.archiveSession(Re),await f(),k("done",Re)}async function ht(Re){await o.restoreSession(Re)&&(s.value=s.value.filter(pe=>pe.id!==Re),k("open",Re))}async function jt(Re,pe){await o.renameSession(Re,pe),s.value.some(Le=>Le.id===Re)&&await f()}async function Zt(Re,pe){const Le=s.value.find(Sn=>Sn.id===Re);if(!Le){await o.setSessionEmoji(Re,pe);return}await jt(Re,YT(pe,Le.title))}async function Vt(Re,pe){const Le=Re.map(Sn=>Sn.id);for(const Sn of Le)pe==="archive"?await o.archiveSession(Sn):await o.restoreSession(Sn);await f(),k(pe==="archive"?"done":"open",Le)}async function Wt(){const Re=l.value;if(Re){l.value=null;for(const pe of Re.ids)Re.kind==="done"?await o.restoreSession(pe):await o.archiveSession(pe);await f()}}async function on(Re){const pe=Re??o.activeSessionId.value;if(!pe)return;r.value={state:"running",sessionId:pe};const Le=await o.exportSession(pe);r.value=Le?{state:"done",sessionId:pe}:null}async function Vn(Re){const pe=o.workspacesView.value.find(Le=>Le.id===Re)?.name??Re;await w({title:y("sidebar.removeWorkspace"),message:y("workspace.removeWorkspaceConfirm",{name:pe}),variant:"danger",action:()=>o.deleteWorkspace(Re)})}async function Ht(Re){vs.value=!0;try{await o.updateConfig(Re)&&await Promise.all([o.refreshRuntimeState(),o.refreshServerMeta()])}finally{vs.value=!1}}async function Tn(Re){await o.undo(1),await yt(),lt.value?.loadComposerForEdit(Re.text,Re.attachments)}function zn(Re){if(Re==="/compact"||Re.startsWith("/compact ")){o.compact(Re.slice(8).trim()||void 0);return}if(Re==="/dynamic_workflow"||Re.startsWith("/dynamic_workflow ")){const pe=Re.slice(17).trim();pe==="on"?o.setDynamicWorkflowMode(!0):pe==="off"?o.setDynamicWorkflowMode(!1):pe?(o.setDynamicWorkflowMode(!0),o.sendPrompt(pe)):o.toggleDynamicWorkflowMode();return}if(Re==="/goal"||Re.startsWith("/goal ")){const pe=Re.slice(5).trim();pe==="pause"||pe==="resume"||pe==="cancel"?o.controlGoal(pe):pe?o.createGoal(pe):o.toggleGoalMode();return}if(Re==="/btw"||Re.startsWith("/btw ")){const pe=Re.slice(4).trim();if(!pe&&j.value?.type==="btw")At();else{const Le=Kn();Ul(pe||void 0).then(Le,Le)}return}switch(Re){case"/new":case"/clear":jr();break;case"/fork":o.forkSession();break;case"/export":on();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/status":no.value=!0;break;case"/login":ke();break;default:{const pe=Re.indexOf(" "),Le=hbe((pe===-1?Re:Re.slice(0,pe)).slice(1)),Sn=pe===-1?void 0:Re.slice(pe+1).trim()||void 0;if(!Le)break;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,Le,Sn):o.activateSkill(Le,Sn);break}}}function Ns(Re){o.unqueue(Re)}function rs(Re){o.unqueue(Re)}function _l(Re){o.reorderQueue(Re.from,Re.to)}function X0(Re){o.steerQueued(Re)}async function J0(Re){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Re.text,Re.attachments);return}if(!o.activeSessionId.value&&!pe){zi.value=Re,Co.value=!0;return}o.sendPrompt(Re.text,Re.attachments)}async function qu(Re){const pe=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&pe){await o.startSessionAndSendPrompt(pe,Re,[]);return}o.activeSessionId.value&&o.sendPrompt(Re)}async function hr(Re){if(gs.value=null,!await o.addWorkspaceByPath(Re)){gs.value=y("workspace.addFailed");return}Co.value=!1;const Le=zi.value;zi.value=null;const Sn=o.activeWorkspaceId.value;Le&&Sn&&await o.startSessionAndSendPrompt(Sn,Le.text,Le.attachments)}function ts(){zi.value=null,gs.value=null,Co.value=!1}async function Fr(Re){for(const pe of Re)if(gs.value=null,!await o.addWorkspaceByPath(pe)){gs.value=y("workspace.addFailed"),Co.value=!0;return}}async function Uu(Re,pe){const Le=await o.generateSessionTitle(Re);Le===null&&(a.value=y("sidebar.genTitleUnavailable"),c!==null&&clearTimeout(c),c=setTimeout(()=>{a.value=null,c=null},5e3)),pe(Le)}function Q0(){yt(()=>{lt.value?.focusComposer()})}function jr(){const Re=o.activeWorkspaceId.value;Re?o.openWorkspaceDraft(Re):o.clearActiveSession(),Q0()}function P1(Re){o.openWorkspaceDraft(Re),Q0()}function F1(Re){Re&&window.open(Re,"_blank","noopener")}return(Re,pe)=>(g(),S("div",lZe,[W(RDe),x.value?(g(),ue(iZe,{key:0})):Y("",!0),O.value?(g(),ue(Gqe,{key:1,onOpenProviders:pe[0]||(pe[0]=()=>{M.value=!0,ne()}),onDismiss:pe[1]||(pe[1]=Le=>M.value=!0)})):Y("",!0),U.value?(g(),S("div",rZe,[b("span",null,E(v(y)("recovery.offlineNotice")),1),b("button",{type:"button","data-testid":"offline-strip-reconnect",onClick:pe[2]||(pe[2]=Le=>M.value=!1)},E(v(y)("recovery.addProvider")),1)])):Y("",!0),O.value?Y("",!0):(g(),S("div",{key:3,class:Be(["app",{mobile:v(A),"sidebar-collapsed":v(Zn)&&!v(A),"macos-desktop":v(jg),"panel-expanded":v(he)}]),style:Gt({"--preview-w":v(ot)+"px"})},[v(A)?(g(),ue(qDe,{key:1,workspace:v(o).visibleWorkspace.value,"session-title":L.value,running:F.value,branch:v(o).status.value.branch,"session-count":C.value,onOpenSwitcher:pe[23]||(pe[23]=Le=>P.value=!0),onOpenSettings:pe[24]||(pe[24]=Le=>z.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(g(),S(Ce,{key:0},[W(uX,{collapsed:v(Zn),dragging:v(Bo),"col-width":v(Un),"active-workspace":v(o).visibleWorkspace.value,"active-workspace-id":v(o).activeWorkspaceId.value,sessions:v(o).sessionsForView.value,"archived-sessions":s.value,"pinned-ids":v(o).pinnedSessionIds.value,"pinned-collapsed":v(o).pinnedCollapsed.value,groups:v(o).workspaceGroups.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"pending-by-session":v(o).pendingBySession.value,"unread-by-session":v(o).unreadBySession.value,"workspace-sort-mode":v(o).workspaceSortMode.value,workspaces:v(o).workspacesView.value,"tabs-enabled":v(o).config.value?.experimental?.sidebarTabs===!0,onSelect:pe[3]||(pe[3]=Le=>v(o).selectSession(Le)),onCreate:jr,onCreateInWorkspace:pe[4]||(pe[4]=Le=>P1(Le)),onSelectWorkspace:pe[5]||(pe[5]=Le=>v(o).openWorkspace(Le)),onAddWorkspace:pe[6]||(pe[6]=Le=>Co.value=!0),onAddWorkspacePaths:Fr,onRename:jt,onGenerateTitle:Uu,onArchive:pe[7]||(pe[7]=Le=>Qe(Le)),onRestore:pe[8]||(pe[8]=Le=>ht(Le)),onPin:pe[9]||(pe[9]=Le=>v(o).togglePinnedSession(Le)),onReorderPins:pe[10]||(pe[10]=Le=>v(o).reorderPinnedSessions(Le)),onTogglePinnedCollapsed:pe[11]||(pe[11]=Le=>v(o).togglePinnedCollapsed()),onSetSessionEmoji:Zt,onLoadDoneSessions:f,onFork:pe[12]||(pe[12]=Le=>v(o).forkSession(Le)),onExport:pe[13]||(pe[13]=Le=>on(Le)),onRenameWorkspace:pe[14]||(pe[14]=(Le,Sn)=>v(o).renameWorkspace(Le,Sn)),onDeleteWorkspace:pe[15]||(pe[15]=Le=>Vn(Le)),onReorderWorkspaces:pe[16]||(pe[16]=Le=>v(o).reorderWorkspaces(Le)),onSetWorkspaceSortMode:pe[17]||(pe[17]=Le=>v(o).setWorkspaceSortMode(Le)),onLoadMoreSessions:pe[18]||(pe[18]=Le=>void v(o).loadMoreSessions(Le)),onLoadAllSessions:pe[19]||(pe[19]=Le=>void v(o).loadAllSessions()),onOpenSettings:pe[20]||(pe[20]=Le=>Ks()),onOpenSessionAdmin:m,onCollapse:v(Io)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","archived-sessions","pinned-ids","pinned-collapsed","groups","active-id","attention-by-session","pending-by-session","unread-by-session","workspace-sort-mode","workspaces","tabs-enabled","onCollapse"]),Jn(W(Kk,{class:"side-handle","storage-key":v(An),"default-width":v(Qn),min:v(Fn),max:v(Qt),"onUpdate:width":pe[21]||(pe[21]=Le=>uo.value=Le),"onUpdate:dragging":pe[22]||(pe[22]=Le=>Bo.value=Le)},null,8,["storage-key","default-width","min","max"]),[[_i,!v(Zn)]])],64)),i.value?(g(),ue(lJ,{key:2,"open-sessions":p.value,workspaces:v(o).workspacesView.value,"load-archived":h,"archive-session":Qe,"restore-session":ht,"run-batch":Vt,onOpen:pe[25]||(pe[25]=Le=>{i.value=!1,v(o).selectSession(Le)}),onRename:pe[26]||(pe[26]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onFork:pe[27]||(pe[27]=Le=>v(o).forkSession(Le)),onExport:pe[28]||(pe[28]=Le=>on(Le)),onBack:pe[29]||(pe[29]=Le=>i.value=!1)},null,8,["open-sessions","workspaces"])):(g(),ue(i$e,{key:3,ref_key:"conversationPaneRef",ref:lt,mobile:v(A),turns:v(o).turns.value,"session-id":v(o).activeSessionId.value,approvals:v(o).pendingApprovals.value,changes:v(o).changes.value,"git-info":v(o).gitInfo.value,tasks:v(o).tasks.value,todos:v(o).todos.value,goal:v(o).goal.value,"activation-badges":v(o).activationBadges.value,status:v(o).status.value,thinking:v(o).thinking.value,"plan-mode":v(o).planMode.value,"plan-armed":v(o).planArmed.value,"session-plans":v(o).sessionPlans.value,"reveal-saved-plan":v(o).revealSavedPlan,"overlay-open":Os.value,"goal-mode":v(o).goalMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,models:v(o).models.value,"starred-ids":v(o).starredModelIds.value,skills:v(o).skills.value,questions:v(o).questions.value,"pending-question-actions":v(o).pendingQuestionActions,"pending-approval-actions":v(o).pendingApprovalActions,running:F.value,"turn-active":v(o).turnActive.value,queued:v(o).queued.value,"search-files":v(o).searchFiles,"upload-image":v(o).uploadImage,working:v(o).working.value,starting:v(o).isStartingFirstPrompt.value,"fast-moon":v(o).fastMoon.value,"file-reload-key":v(o).activeSessionId.value,"session-loading":v(o).sessionLoading.value,compaction:v(o).compaction.value,"has-more-messages":v(o).hasMoreMessages.value,"loading-more":v(o).loadingMoreMessages.value,"loading-more-error":v(o).loadMoreMessagesError.value,"load-older-messages":v(o).loadOlderMessages,"workspace-name":v(o).visibleWorkspace.value?.name,"workspace-root":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,"git-diff-stats":v(o).gitDiffStats.value,workspaces:v(o).workspacesView.value,"active-workspace-id":v(o).activeWorkspaceId.value,"session-title":L.value,pr:v(o).activePullRequest.value,"panel-visible":v(K),"panel-expanded":v(he),"active-panel-type":v(j)?.type,"toggle-panel":v(be),"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,"last-turn-reason":T.value,"turn-error-kind":I.value?.reason==="max_steps"?"max_steps":void 0,"turn-error-message":I.value?.message,"session-done":N.value,pinned:v(o).pinnedSessionIds.value.includes(v(o).activeSessionId.value??""),"recent-sessions":u.value,onOpenChanges:pe[30]||(pe[30]=Le=>gi()),onSelectWorkspace:pe[31]||(pe[31]=Le=>P1(Le)),onAddWorkspace:pe[32]||(pe[32]=Le=>Co.value=!0),onOpenPr:F1,onSubmit:pe[33]||(pe[33]=Le=>J0(Le)),onSteer:pe[34]||(pe[34]=Le=>v(o).steerPrompt(Le.text,Le.attachments)),onApproval:pe[35]||(pe[35]=(Le,Sn)=>v(o).respondApproval(Le,Sn)),onCancelTask:pe[36]||(pe[36]=Le=>v(o).cancelTask(Le)),onAnswer:pe[37]||(pe[37]=(Le,Sn)=>v(o).respondQuestion(Le,Sn)),onDismiss:pe[38]||(pe[38]=Le=>v(o).dismissQuestion(Le)),onCommand:zn,onInterrupt:pe[39]||(pe[39]=Le=>v(o).abortCurrentPrompt()),onUnqueue:Ns,onEditQueued:rs,onReorderQueue:_l,onSteerQueued:X0,onSetPermission:pe[40]||(pe[40]=Le=>v(o).setPermission(Le)),onSetThinking:pe[41]||(pe[41]=Le=>v(o).setThinking(Le)),onTogglePlan:pe[42]||(pe[42]=Le=>v(o).togglePlanMode()),onToggleWorkflow:pe[43]||(pe[43]=Le=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[44]||(pe[44]=Le=>v(o).toggleGoalMode()),onCreateGoal:pe[45]||(pe[45]=Le=>v(o).createGoal(Le)),onControlGoal:pe[46]||(pe[46]=Le=>v(o).controlGoal(Le)),onRefreshGitStatus:pe[47]||(pe[47]=Le=>v(o).activeSessionId.value&&v(o).loadGitStatus(v(o).activeSessionId.value)),onRenameSession:pe[48]||(pe[48]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onForkSession:pe[49]||(pe[49]=Le=>v(o).forkSession(Le)),onArchiveSession:pe[50]||(pe[50]=Le=>Qe(Le)),onRestoreSession:pe[51]||(pe[51]=Le=>ht(Le)),onSelectSession:pe[52]||(pe[52]=Le=>v(o).selectSession(Le)),onTogglePin:pe[53]||(pe[53]=Le=>v(o).togglePinnedSession(Le)),onOpenSessionAdmin:m,onExportSession:pe[54]||(pe[54]=Le=>on(Le)),onCompact:pe[55]||(pe[55]=Le=>v(o).compact()),onPickModel:pe[56]||(pe[56]=Le=>bl()),onSelectModel:pe[57]||(pe[57]=Le=>Ne(Le)),onOpenFile:pe[58]||(pe[58]=Le=>yo(Le)),onOpenMedia:pe[59]||(pe[59]=Le=>Pn(Le)),onOpenCompaction:pe[60]||(pe[60]=Le=>yl(Le)),onOpenAgent:pe[61]||(pe[61]=Le=>ms(Le)),onDetachTask:pe[62]||(pe[62]=Le=>v(o).detachTask(Le)),onOpenToolDiff:pe[63]||(pe[63]=Le=>wl(Le)),onOpenTurnDiff:pe[64]||(pe[64]=Le=>si(Le)),onEditMessage:Tn,onContinueTurn:qu},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","plan-armed","session-plans","reveal-saved-plan","overlay-open","goal-mode","dynamic-workflow-mode","models","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","turn-active","queued","search-files","upload-image","working","starting","fast-moon","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr","panel-visible","panel-expanded","active-panel-type","toggle-panel","conversation-toc","turn-folding","activity-run-folding","last-turn-reason","turn-error-kind","turn-error-message","session-done","pinned","recent-sessions"])),!v(A)&&v(Zn)?(g(),ue(Dt,{key:4,class:"sidebar-toggle-btn",size:"sm",label:v(Zn)?v(y)("sidebar.expandSidebar"):v(y)("sidebar.collapseSidebar"),onClick:v(Io)},{default:ae(()=>[W(Ee,{name:v(Zn)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):Y("",!0),!v(A)&&v(Zn)?(g(),ue(Dt,{key:5,class:"new-chat-btn",size:"sm",label:v(y)("sidebar.newChat"),onClick:jr},{default:ae(()=>[W(Ee,{name:"chat-new"})]),_:1},8,["label"])):Y("",!0),!i.value&&(!v(A)||v(K))?(g(),S("aside",{key:6,class:Be(["global-preview",{open:v(K),mobile:v(A),expanded:v(he),"no-anim":v(vl)||le.value}]),role:"complementary","aria-label":v(y)("layout.detailPanelAria"),"aria-hidden":!v(K)},[b("div",cZe,[v(K)&&!v(A)&&!v(he)?(g(),ue(Kk,{key:0,class:"panel-resize","storage-key":v(Rt),"default-width":v(Ls),min:v(Jo),max:v($e),reverse:"","aria-label":v(y)("layout.resizePreviewAria"),"onUpdate:width":pe[65]||(pe[65]=Le=>Ge.value=Le),"onUpdate:dragging":pe[66]||(pe[66]=Le=>vl.value=Le)},null,8,["storage-key","default-width","min","max","aria-label"])):Y("",!0),W(NBe,{tabs:v(X),"active-id":v(oe),expanded:v(he),mobile:v(A),"can-open-diff":v(o).status.value.isGitRepo&&v(o).activeSessionId.value!==null,"can-open-side-chat":!!v(o).activeWorkspaceId.value,onActivate:v(ve),onClose:Ie,onToggleExpanded:v(Se),onHide:v(de),onOpenDiff:gi,onOpenSideChat:pe[67]||(pe[67]=Le=>Ul())},null,8,["tabs","active-id","expanded","mobile","can-open-diff","can-open-side-chat","onActivate","onToggleExpanded","onHide"]),b("div",uZe,[v(j)===null?(g(),S("div",{key:0,class:"panel-launcher",role:"group","aria-label":v(y)("panel.launcherAria")},[b("button",{type:"button",disabled:!v(o).status.value.isGitRepo||v(o).activeSessionId.value===null,onClick:gi},[W(Ee,{name:"git-fork"}),b("span",null,E(v(y)("panel.tabs.diff")),1)],8,fZe),b("button",{type:"button",disabled:!v(o).activeWorkspaceId.value,onClick:pe[68]||(pe[68]=Le=>Ul())},[W(Ee,{name:"message"}),b("span",null,E(v(y)("sideChat.title")),1)],8,pZe)],8,dZe)):xe.value==="compaction"&&v(Mt)?(g(),ue(sze,{key:1,text:v(dt)??"",subtitle:v(y)("conversation.summaryTitle"),onClose:At},null,8,["text","subtitle"])):xe.value==="agent"&&v(en)?(g(),ue(gze,{key:2,member:v(en),turns:v(tn),running:v(st),loading:v(eo),"load-error":v(Ro),"has-more":v(We),"loading-more":v($s),"load-more-error":v(Do),onClose:At,onLoadOlderMessages:v(Pe),onOpenFile:pe[69]||(pe[69]=Le=>yo(Le)),onOpenMedia:pe[70]||(pe[70]=Le=>Pn(Le)),onOpenAgent:pe[71]||(pe[71]=Le=>ms(Le)),onOpenTurnDiff:pe[72]||(pe[72]=Le=>si(Le))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onLoadOlderMessages"])):xe.value==="btw"&&v(Us)?(g(),ue(Yze,{key:3,ref_key:"sideChatPanelRef",ref:mn,turns:v(o).sideChatTurns.value,running:v(o).sideChatRunning.value,sending:v(o).sideChatSending.value,onSend:pe[73]||(pe[73]=Le=>v(o).sendSideChatPrompt(Le)),onClose:At},null,8,["turns","running","sending"])):xe.value==="diff"?(g(),ue(xBe,{key:4,mode:v(So),changes:v(o).changes.value,"git-info":v(o).gitInfo.value,"file-diff":v(o).fileDiff.value,"selected-diff-path":v(o).selectedDiffPath.value,"file-diff-loading":v(o).fileDiffLoading.value,closable:"",onOpen:v(pn),onBack:pe[74]||(pe[74]=Le=>{So.value="list",Qo.value=null,v(o).clearFileDiff()}),onClose:At},null,8,["mode","changes","git-info","file-diff","selected-diff-path","file-diff-loading","onOpen"])):xe.value==="toolDiff"&&v(bt)?(g(),ue(_ze,{key:5,target:v(bt),onClose:At},null,8,["target"])):xe.value==="turnDiff"&&Ye.value?(g(),ue(jze,{key:6,changes:Ye.value.changes,cwd:v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,onOpenFile:pe[75]||(pe[75]=Le=>yo(Le)),onClose:At},null,8,["changes","cwd"])):xe.value==="editor"?(g(),ue(tze,{key:7,onClose:At})):xe.value==="file"?(g(),ue(xNe,{key:8,file:v(ge),loading:v(Oe),error:v(Fe),line:v(fe)?.line,"download-url":v(pt),closable:"","external-actions":v(kt),editable:v(o).fsWriteSupported.value&&v(o).activeSessionId.value!==null,"open-file":yo,onClose:At,onOpenExternal:v(Jt),onReveal:v(kn),onOpenEditor:pe[76]||(pe[76]=Le=>Lo(Le))},null,8,["file","loading","error","line","download-url","external-actions","editable","onOpenExternal","onReveal"])):Y("",!0)]),pe[120]||(pe[120]=b("div",{class:"pfc-host"},null,-1))])],10,aZe)):Y("",!0),$n.value&&Hn.value?(g(),ue(y$e,{key:7,media:$n.value,src:Hn.value,onClose:Mn},null,8,["media","src"])):Y("",!0),W(d$e,{enabled:!Os.value,"panel-source":Ta.value,onAdd:Wo},null,8,["enabled","panel-source"]),to.value?(g(),ue(YBe,{key:8,models:v(o).models.value,current:v(o).status.value.modelId,"starred-ids":v(o).starredModelIds.value,loading:es.value,unavailable:Hs.value,onSelect:pe[77]||(pe[77]=Le=>Te(Le)),onToggleStar:pe[78]||(pe[78]=Le=>v(o).toggleStarModel(Le)),onClose:pe[79]||(pe[79]=Le=>to.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):Y("",!0),no.value?(g(),ue(iDe,{key:9,status:v(o).status.value,thinking:D.value,"plan-mode":v(o).planMode.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"cost-usd":v(o).sessionCost.value,onClose:pe[80]||(pe[80]=Le=>no.value=!1)},null,8,["status","thinking","plan-mode","dynamic-workflow-mode","cost-usd"])):Y("",!0),Co.value?(g(),ue(VHe,{key:10,"browse-fs":v(o).browseFs,"get-fs-home":v(o).getFsHome,"default-path":v(o).visibleWorkspace.value?.root??v(o).status.value.cwd,error:gs.value,onAdd:pe[81]||(pe[81]=Le=>hr(Le)),onClose:ts},null,8,["browse-fs","get-fs-home","default-path","error"])):Y("",!0),W(qi,{name:"gload-fade"},{default:ae(()=>[v(o).initialized.value?Y("",!0):(g(),ue(oUe,{key:0,issue:v(o).connectIssue.value},null,8,["issue"]))]),_:1}),R.value?(g(),ue(Pqe,{key:11,onComplete:Z})):q.value?(g(),ue(fB,{key:12,onComplete:te,onSkip:te})):Y("",!0),W(dDe,{warnings:v(o).warnings.value,onDismiss:v(o).dismissWarning},null,8,["warnings","onDismiss"]),W(ADe),b("div",hZe,[l.value?(g(),ue(n8,{key:`${l.value.kind}:${l.value.ids.join(",")}`,duration:8e3,onDismiss:pe[82]||(pe[82]=Le=>l.value=null)},{default:ae(()=>[b("span",null,E(v(y)(l.value.kind==="done"?"admin.actionArchived":"admin.actionRestored",{n:l.value.ids.length})),1),b("button",{type:"button",class:"session-action-undo",onClick:Wt},E(v(y)("sidebar.archiveToastUndo")),1)]),_:1})):Y("",!0),r.value?(g(),ue(n8,{key:`${r.value.sessionId}:${r.value.state}`,duration:r.value.state==="running"?6e4:4e3,onDismiss:pe[83]||(pe[83]=Le=>r.value=null)},{default:ae(()=>[He(E(v(y)(r.value.state==="running"?"admin.exporting":"admin.exported")),1)]),_:1},8,["duration"])):Y("",!0),a.value?(g(),ue(n8,{key:a.value,duration:5e3,onDismiss:pe[84]||(pe[84]=Le=>a.value=null)},{default:ae(()=>[He(E(a.value),1)]),_:1})):Y("",!0)]),v(_)?(g(),ue(NUe,{key:13})):Y("",!0),v(A)?(g(),ue(rVe,{key:14,modelValue:P.value,"onUpdate:modelValue":pe[85]||(pe[85]=Le=>P.value=Le),groups:v(o).workspaceGroups.value,"active-workspace-id":v(o).activeWorkspaceId.value,"active-id":v(o).activeSessionId.value,"attention-by-session":v(o).attentionBySession.value,"attention-by-workspace":v(o).attentionByWorkspace.value,onSelect:pe[86]||(pe[86]=Le=>v(o).selectSession(Le)),onCreate:jr,onCreateInWorkspace:pe[87]||(pe[87]=Le=>P1(Le)),onAddWorkspace:pe[88]||(pe[88]=Le=>Co.value=!0),onRename:pe[89]||(pe[89]=(Le,Sn)=>v(o).renameSession(Le,Sn)),onArchive:pe[90]||(pe[90]=Le=>Qe(Le)),onDeleteWorkspace:pe[91]||(pe[91]=Le=>Vn(Le)),onLoadMore:pe[92]||(pe[92]=Le=>void v(o).loadMoreSessions(Le))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):Y("",!0),v(A)?(g(),ue(vWe,{key:15,modelValue:z.value,"onUpdate:modelValue":pe[93]||(pe[93]=Le=>z.value=Le),status:v(o).status.value,thinking:v(o).thinking.value,models:v(o).models.value,"plan-mode":v(o).planMode.value,"goal-mode":v(o).goalMode.value,goal:v(o).goal.value,"dynamic-workflow-mode":v(o).dynamicWorkflowMode.value,"color-scheme":v(o).colorScheme.value,"ui-font-size":v(o).uiFontSize.value,"conversation-toc":v(o).conversationToc.value,"server-version":v(o).serverVersion.value,onPickModel:pe[94]||(pe[94]=Le=>bl()),onSetThinking:pe[95]||(pe[95]=Le=>v(o).setThinking(Le)),onTogglePlan:pe[96]||(pe[96]=Le=>v(o).togglePlanMode()),onToggleWorkflow:pe[97]||(pe[97]=Le=>v(o).toggleDynamicWorkflowMode()),onToggleGoal:pe[98]||(pe[98]=Le=>v(o).toggleGoalMode()),onControlGoal:pe[99]||(pe[99]=Le=>v(o).controlGoal(Le)),onSetPermission:pe[100]||(pe[100]=Le=>v(o).setPermission(Le)),onSetColorScheme:pe[101]||(pe[101]=Le=>v(o).setColorScheme(Le)),onSetUiFontSize:pe[102]||(pe[102]=Le=>v(o).setUiFontSize(Le)),onSetConversationToc:pe[103]||(pe[103]=Le=>v(o).setConversationToc(Le)),onLogin:pe[104]||(pe[104]=()=>{z.value=!1,ke()})},null,8,["modelValue","status","thinking","models","plan-mode","goal-mode","goal","dynamic-workflow-mode","color-scheme","ui-font-size","conversation-toc","server-version"])):Y("",!0)],6)),Vo.value?(g(),ue(lHe,{key:4,"color-scheme":v(o).colorScheme.value,accent:v(o).accent.value,"ui-font-size":v(o).uiFontSize.value,"auth-ready":v(o).authReady.value,"account-model":v(o).defaultModel.value,notify:v(o).notifyOnComplete.value,"notify-question":v(o).notifyOnQuestion.value,"notify-approval":v(o).notifyOnApproval.value,"notify-permission":v(o).notifyPermission.value,sound:v(o).soundOnComplete.value,"conversation-toc":v(o).conversationToc.value,"turn-folding":v(o).turnFolding.value,"activity-run-folding":v(o).activityRunFolding.value,config:v(o).config.value,models:v(o).models.value,"config-saving":vs.value,"server-version":v(o).serverVersion.value,backend:v(o).backend.value,"experimental-flag-states":v(o).experimentalFlagStates.value,"subagent-model-policy":v(o).subagentModelPolicy.value,"subagent-model-policy-saving":v(o).subagentModelPolicySaving.value,onSaveSubagentModelPolicy:pe[105]||(pe[105]=Le=>void v(o).saveSubagentModelPolicy(Le)),onClearSubagentModelPolicy:pe[106]||(pe[106]=Le=>void v(o).clearSubagentModelPolicy()),"initial-tab":Qi.value,onSetColorScheme:pe[107]||(pe[107]=Le=>v(o).setColorScheme(Le)),onSetAccent:pe[108]||(pe[108]=Le=>v(o).setAccent(Le)),onSetUiFontSize:pe[109]||(pe[109]=Le=>v(o).setUiFontSize(Le)),onSetNotify:pe[110]||(pe[110]=Le=>v(o).setNotifyOnComplete(Le)),onSetNotifyQuestion:pe[111]||(pe[111]=Le=>v(o).setNotifyOnQuestion(Le)),onSetNotifyApproval:pe[112]||(pe[112]=Le=>v(o).setNotifyOnApproval(Le)),onSetSound:pe[113]||(pe[113]=Le=>v(o).setSoundOnComplete(Le)),onSetConversationToc:pe[114]||(pe[114]=Le=>v(o).setConversationToc(Le)),onSetTurnFolding:pe[115]||(pe[115]=Le=>v(o).setTurnFolding(Le)),onSetActivityRunFolding:pe[116]||(pe[116]=Le=>v(o).setActivityRunFolding(Le)),onUpdateConfig:pe[117]||(pe[117]=Le=>Ht(Le)),onOpenOnboarding:pe[118]||(pe[118]=()=>{Vo.value=!1,ee()}),onClose:pe[119]||(pe[119]=Le=>Vo.value=!1)},null,8,["color-scheme","accent","ui-font-size","auth-ready","account-model","notify","notify-question","notify-approval","notify-permission","sound","conversation-toc","turn-folding","activity-run-folding","config","models","config-saving","server-version","backend","experimental-flag-states","subagent-model-policy","subagent-model-policy-saving","initial-tab"])):Y("",!0),W(ZHe)]))}}),gZe=vt(mZe,[["__scopeId","data-v-628646c9"]]);Mge();o5(gZe).use(Mo).mount("#app");export{bR as $,$2 as A,dP as B,xs as C,fKe as D,BM as E,Ce as F,L0 as G,He as H,W as I,qR as J,PZe as K,Rl as L,Je as M,zF as N,HZe as O,DZe as P,qZe as Q,O4 as R,lu as S,hl as T,VZe as U,Ag as V,OZe as W,hKe as X,WZe as Y,rKe as Z,vZe as _,uA as a,cs as a$,Ts as a0,ug as a1,SZe as a2,mg as a3,HA as a4,vn as a5,Ru as a6,IZe as a7,vKe as a8,NZe as a9,mA as aA,_P as aB,gA as aC,In as aD,AP as aE,MP as aF,pf as aG,CP as aH,En as aI,vg as aJ,YR as aK,g as aL,LF as aM,TZe as aN,qn as aO,JM as aP,AZe as aQ,W4 as aR,ds as aS,zl as aT,V as aU,tKe as aV,YF as aW,rt as aX,jn as aY,wg as aZ,FZe as a_,RZe as aa,BZe as ab,zZe as ac,oKe as ad,yKe as ae,fn as af,uF as ag,xp as ah,l1 as ai,ya as aj,ps as ak,nKe as al,il as am,g1 as an,It as ao,KZe as ap,GZe as aq,io as ar,yt as as,mF as at,Be as au,gR as av,Gt as aw,bP as ax,SP as ay,vo as az,MZe as b,H2e as b$,uKe as b0,L2 as b1,Y4 as b2,aKe as b3,m1 as b4,OR as b5,wZe as b6,Uo as b7,oP as b8,cKe as b9,js as bA,_i as bB,dF as bC,iKe as bD,Ke as bE,iA as bF,LZe as bG,iP as bH,XZe as bI,ae as bJ,UZe as bK,Jn as bL,go as bM,sKe as bN,xt as bO,EZe as bP,ho as bQ,Cs as bR,SKe as bS,CKe as bT,ZL as bU,MKe as bV,l2e as bW,UL as bX,i7 as bY,IKe as bZ,W2e as b_,yZe as ba,E as bb,l4 as bc,jZe as bd,so as be,bZe as bf,kZe as bg,r8 as bh,eKe as bi,DR as bj,v as bk,vf as bl,gKe as bm,pKe as bn,RF as bo,$Ze as bp,JZe as bq,sP as br,mKe as bs,ZZe as bt,r4 as bu,cA as bv,n5 as bw,qF as bx,oT as by,_8 as bz,lKe as c,Iv as c0,Tv as c1,Ev as c2,$Ke as c3,$5 as c4,Kc as c5,I5 as c6,P2e as c7,F2e as c8,NKe as c9,vt as cA,LKe as ca,bKe as cb,zKe as cc,Wp as cd,Di as ce,efe as cf,Q2e as cg,Qde as ch,xKe as ci,Gde as cj,Yde as ck,_Ke as cl,Lv as cm,tfe as cn,Lx as co,dx as cp,a2e as cq,L5 as cr,E5 as cs,AKe as ct,EKe as cu,kKe as cv,TKe as cw,Ee as cx,wKe as cy,Dze as cz,QZe as d,r1 as e,_Ze as f,qi as g,jF as h,xZe as i,CZe as j,Dl as k,hf as l,Fs as m,mp as n,wa as o,dKe as p,B as q,o5 as r,ue as s,Y as t,S as u,b as v,YP as w,YZe as x,GP as y,XF as z}; diff --git a/apps/pythinker-code/dist-web/assets/index-BM4AkXWz.js b/apps/pythinker-code/dist-web/assets/index-DUbYfe-Q.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-BM4AkXWz.js rename to apps/pythinker-code/dist-web/assets/index-DUbYfe-Q.js index 67d0a64d7..61dbcc326 100644 --- a/apps/pythinker-code/dist-web/assets/index-BM4AkXWz.js +++ b/apps/pythinker-code/dist-web/assets/index-DUbYfe-Q.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-0QXixtol.js","assets/index-C_5a8vkb.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css"])))=>i.map(i=>d[i]); -import{bR as Q}from"./index-BZ9wqq8Z.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-0QXixtol.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D_x7p5rd.js","assets/index-RD9RRwLM.js","assets/index-Ct7MGS7v.js","assets/index-CgbqiNuj.css"])))=>i.map(i=>d[i]); +import{bR as Q}from"./index-Ct7MGS7v.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-D_x7p5rd.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` `),n=i.split(` `);let r=0;for(;r` ${a}`),...t.slice(r,t.length-o).map(a=>`- ${a}`),...n.slice(r,n.length-o).map(a=>`+ ${a}`),...t.slice(t.length-o).map(a=>` ${a}`)].join(` `)}function he(e){return new G(e)}function ue(e={}){let i,t,n,r,o,a="text",d="",p="",h,c=0,g="system",S=U(e),T=q(e);const L={disableLineNumbers:e.lineNumbers===!1,overflow:e.wordWrap==="on"?"wrap":"scroll",enableLineSelection:e.enableLineSelection},M=()=>({...L,theme:S,themeType:g});async function H(s,l,u){k();const w=c;if(N(s,e),h=s,a=R(u),_(l))return V(s,l,a);if(e.stream===!1)return O(s,l,a);const f=new K({...M(),...F(e),fileName:`code.${a}`,language:a,maxHeight:e.MAX_HEIGHT,autoScroll:e.autoScrollOnUpdate===!1?"never":"near-bottom",autoScrollThresholdPx:e.autoScrollThresholdPx,workerManager:e.workerManager});if(i=f,f.append(l),await f.mount(s),w!==c||i!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>f.getText(),s,()=>f.getFinalizedSurface(),m=>f.onDidRender(m)),r}async function I(s,l,u,w){k();const f=c;N(s,e),h=s,a=R(w),d=l,p=u;let m,v;if(e.stream===!1){if(m=x({kind:"diff",oldFile:y(l),newFile:y(u),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),...F(e)}}),n=m,await m.mount(s),f!==c||n!==m||h!==s)throw m.dispose(),new Error("Editor creation was cancelled");e.onController?.(m)}else{if(v=new G({...M(),...F(e),fileName:`code.${a}`,language:a,diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),maxHeight:e.MAX_HEIGHT,wrap:e.wordWrap==="on",workerManager:e.workerManager}),t=v,await v.mount(s,l,u),f!==c||t!==v||h!==s)throw v.dispose(),new Error("Editor creation was cancelled");e.onController?.(v)}return o=oe(()=>d,()=>p,s,()=>m??v?.getFinalizedSurface()),o}async function X(s,l=a){const u=R(l);if(_(s)){n?.getInput().kind==="merge-conflict"?(a=u,await n.updateMergeConflict(y(s),e.lineAnnotations)):h&&await V(h,s,u);return}if(e.stream===!1){n?.getInput().kind==="file"?(a=u,await n.updateFile(y(s),e.lineAnnotations)):h&&await O(h,s,u);return}if(!i){h&&await H(h,s,u);return}if(i.getState()==="finalized"){s!==i.getText()&&await i.reset(s);return}if(u!==a){a=u,await i.setLanguage(u),s!==i.getText()&&await i.reset(s);return}const w=i.getText();s.startsWith(w)?i.append(s.slice(w.length)):await i.reset(s)}async function P(s,l,u=a){if(d=s,p=l,a=R(u),t){await t.update(s,l);return}if(!n){h&&await I(h,s,l,u);return}await n.updateDiff(y(s),y(l))}function k(){c++,i?.dispose(),t?.dispose(),t||n?.dispose(),i=void 0,t=void 0,n=void 0,r=void 0,o=void 0,h=void 0}async function O(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"file",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}async function V(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"merge-conflict",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}function _(s){return e.mergeConflict===!1?!1:/^<<<<<<< .+$/m.test(s)&&/^=======$/m.test(s)&&/^>>>>>>> .+$/m.test(s)}async function J(s){if(s){if(typeof s=="string"){const l=e.themes;if(l?.[0]===s){await W(),g="dark",i?.setThemeType("dark"),t?.setThemeType("dark"),n?.setThemeType("dark");return}if(l?.[1]===s){await W(),g="light",i?.setThemeType("light"),t?.setThemeType("light"),n?.setThemeType("light");return}}T=void 0,S=s,await j(s)}}async function W(){const s=q(e);!s||s===T||(T=s,S=U(e),await j(S))}async function j(s){await i?.setTheme(s),await t?.setTheme(s),await n?.setTheme(s)}function y(s){return E(`code.${a||"txt"}`,s,a)}return{runtimeKind:"stream-diffs",createEditor:H,createDiffEditor:I,updateCode:X,appendCode(s){i?.append(s)},async finalizeCode(){if(!i||i.getState()==="finalized")return i?.getFinalizedSurface();const s=F(e);return delete s.lineAnnotations,await i.finalize({view:"file",...s,theme:S,themeType:g,annotations:e.lineAnnotations,workerManager:e.workerManager}),i.getFinalizedSurface()},async finalizeDiff(){return t&&(n=await t.finalize(e.lineAnnotations)),n},updateDiff:P,updateOriginal(s,l=a){return P(s,p,l)},updateModified(s,l=a){return P(d,s,l)},appendOriginal(s,l=a){return P(d+s,p,l)},appendModified(s,l=a){return P(d,p+s,l)},cleanupEditor:k,safeClean:k,setTheme:J,async setLanguage(s){if(a=R(s),await i?.setLanguage(a),await t?.setLanguage(a),n&&!t){const l=n.getInput();l.kind==="file"||l.kind==="merge-conflict"?await n.update({...l,file:{...l.file,lang:a}}):l.kind==="diff"&&"oldFile"in l&&await n.update({...l,oldFile:{...l.oldFile,lang:a},newFile:{...l.newFile,lang:a}})}},getCurrentTheme:()=>S,getEditor:()=>le,getEditorView:()=>r??null,getDiffEditorView:()=>o??null,getDiffModels:()=>({original:D(()=>d),modified:D(()=>n?.getResolvedFile()?.contents??t?.getModified()??p)}),getCode:()=>{const s=n?.getInput();return s?.kind==="diff"||s?.kind==="patch"?{original:d,modified:n?.getResolvedFile()?.contents??p}:s?.kind==="file"||s?.kind==="merge-conflict"?s.file.contents:t?{original:t.getOriginal(),modified:t.getModified()}:i?.getText()??null},refreshDiffPresentation:()=>n?.update(n.getInput()),whenVisualReady:async()=>{const s=h,l=c,u=n??i?.getFinalizedSurface()??t?.getFinalizedSurface();return!u||!await u.whenVisualReady()?!1:ne(s,()=>l===c&&s===h&&u===(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()),()=>se(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()))}}}async function ne(e,i,t){if(!e||typeof window>"u")return!1;let n="",r,o=0;for(let a=0;a<120;a+=1){if(!i())return!1;const d=e.querySelector(".stream-diffs-shell"),p=d?.querySelector("diffs-container")?.shadowRoot?.querySelector("pre"),h=d?.getBoundingClientRect(),c=p?.textContent??"";if(h&&h.width>0&&h.height>0&&p&&t()){const g=`${Math.round(h.width)}:${Math.round(h.height)}:${p.scrollWidth}:${p.scrollHeight}:${c.length}`;if(o=p===r&&g===n?o+1:1,r=p,n=g,o>=2)return!0}else n="",r=void 0,o=0;await ae()}return!1}function se(e){if(!e)return!0;const i=e.getNativeInstance(),t=i?.fileRenderer??i?.hunksRenderer;if(!t)return!0;const n=t.renderCache;if(!n?.result)return!1;if(n.highlighted===!0)return!0;const r=e.getInput();if(R(r.kind==="file"||r.kind==="merge-conflict"?r.file.lang:"oldFile"in r?r.oldFile.lang??r.newFile.lang:e.getDiff()?.lang)==="text")return!0;const o=Number(t.getTokenizeMaxLength?.()??1e5);if(r.kind==="file"||r.kind==="merge-conflict")return re(r.file.contents)>o;const a=e.getDiff();return!!a&&Math.max(a.additionLines.length,a.deletionLines.length)>o}function R(e){return!e||/^(?:text|txt|plain|plaintext)$/i.test(e)?"text":e}function re(e){if(!e)return 0;let i=1;for(let t=0;t{let i=!1;const t=()=>{i||(i=!0,window.clearTimeout(r),window.cancelAnimationFrame(n),e())},n=window.requestAnimationFrame(t),r=window.setTimeout(t,50)})}function U(e){return e.themes?.length&&typeof e.themes[0]=="string"&&typeof e.themes[1]=="string"?{dark:e.themes[0],light:e.themes[1]}:e.theme??void 0}function q(e){if(!(typeof e.themes?.[0]!="string"||typeof e.themes?.[1]!="string"))return`${e.themes[0]} diff --git a/apps/pythinker-code/dist-web/assets/index-0QXixtol.js b/apps/pythinker-code/dist-web/assets/index-D_x7p5rd.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-0QXixtol.js rename to apps/pythinker-code/dist-web/assets/index-D_x7p5rd.js index b959fd1d0..df6c1d8f0 100644 --- a/apps/pythinker-code/dist-web/assets/index-0QXixtol.js +++ b/apps/pythinker-code/dist-web/assets/index-D_x7p5rd.js @@ -1,4 +1,4 @@ -import{t as ee,b as Jn,n as Do,c as Po,a as _o,d as Fo,s as Oo,g as No,e as zo}from"./index-C_5a8vkb.js";import{f as Rc}from"./index-C_5a8vkb.js";import{bR as w}from"./index-BZ9wqq8Z.js";const ur="diffs-container",Uo=(()=>{try{return!1}catch{return!1}})(),Vo=/(?=^From [a-f0-9]+ .+$)/m,fr=/(?=^diff --git)/gm,$h=/(?=^---\s+\S)/gm,Wh=/(?=^@@ )/gm,Bo=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,$o=/(?<=\n)/,Wo=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Go=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,jo=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,qo=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gh=/^<{7,}(?:\s.*)?$/,jh=/^\|{7,}(?:\s.*)?$/,qh=/^={7,}$/,Kh=/^>{7,}(?:\s.*)?$/,Hn="header-prefix",Mn="header-filename-suffix",Dn="header-metadata",Pn="header-custom",O={dark:"pierre-dark",light:"pierre-light"},pr="data-theme-css",gr="data-unsafe-css",Ko="data-core-css",Yo="data-diffs-scrollbar-measure",Xo="data-diffs-code-view-header",Qo="data-diffs-code-view-footer",mr="--diffs-scrollbar-gutter-measured",Yh=1,Zo=1e5,_n={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},et={..._n,hunkLineCount:1},Jo={paddingTop:8,paddingBottom:8,gap:8},es={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ts=Object.freeze({fromStart:0,fromEnd:0}),Xe={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},vr={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Oe=new Set;let we=null;function G(e){Oe.add(e),we??=requestAnimationFrame(Cr)}function ze(e){Oe.delete(e)&&Oe.size===0&&we!=null&&(cancelAnimationFrame(we),we=null)}function Xh(){Oe.clear(),we!=null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(we),we=null}function Cr(e){const t=new Set(Oe);Oe.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Oe.size>0?we=requestAnimationFrame(Cr):we=null}function Qe(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Je(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Fn(e,t){const n=e?.theme??O,i=t?.theme??O,r=ei(e),o=ei(t);return Je(n,i)&&Qe(e,t,["theme","parseDiffOptions"])&&Qe(r,o)}function ei(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function _t(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function cn({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const d=Math.max(e-r,0),c=Math.min(e+l,t);return{top:d,bottom:Math.max(c,d)}}let a=e+n/2-s/2,h=a+s;return a<0&&(a=0),h>t&&(h=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(h,t),a))}}function Te(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const ns=new TextEncoder,is=new TextDecoder("utf-8",{ignoreBOM:!0}),rs=/[\uD800-\uDFFF]/,un=1024;let qe=new Uint8Array(un);function Sr(){qe.length!==un&&(qe=new Uint8Array(un))}function B(e){if(e.length===0)return e;if(rs.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;qe.length0&&r.deletions>0||o.type!=="context")continue;const s=r.additions>0,l=s?t.additionLines:t.deletionLines,a=s?r.additionLineIndex:r.deletionLineIndex,h=s?r.additions:r.deletions,d=l[a]??"";if(d.trim()!=="")continue;let c=!0;for(let C=1;Cos)return null;const a=[];for(let g=0;gn;let c=0,u=-1;for(let g=0;g<=l;g++){let C=0;for(let m=0;mu&&(u=C,c=g)}if(c===0)return null;const f=[],p=(g,C,m,v)=>{(g>0||C>0)&&f.push({type:"change",deletions:g,additions:C,deletionLineIndex:m,additionLineIndex:v})};return d?(p(0,c,r,o),p(s,s,r,o+c),p(0,i-s-c,r+s,o+c+s)):(p(c,0,r,o),p(s,s,r+c,o),p(n-s-c,0,r+c+s,o+s)),f}const hs=/\s+/g;function ti(e){return e.replace(hs,"")}function cs(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let r=0;for(;r0&&(f[f.length-1]===` +import{t as ee,b as Jn,n as Do,c as Po,a as _o,d as Fo,s as Oo,g as No,e as zo}from"./index-RD9RRwLM.js";import{f as Rc}from"./index-RD9RRwLM.js";import{bR as w}from"./index-Ct7MGS7v.js";const ur="diffs-container",Uo=(()=>{try{return!1}catch{return!1}})(),Vo=/(?=^From [a-f0-9]+ .+$)/m,fr=/(?=^diff --git)/gm,$h=/(?=^---\s+\S)/gm,Wh=/(?=^@@ )/gm,Bo=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,$o=/(?<=\n)/,Wo=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Go=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,jo=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,qo=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gh=/^<{7,}(?:\s.*)?$/,jh=/^\|{7,}(?:\s.*)?$/,qh=/^={7,}$/,Kh=/^>{7,}(?:\s.*)?$/,Hn="header-prefix",Mn="header-filename-suffix",Dn="header-metadata",Pn="header-custom",O={dark:"pierre-dark",light:"pierre-light"},pr="data-theme-css",gr="data-unsafe-css",Ko="data-core-css",Yo="data-diffs-scrollbar-measure",Xo="data-diffs-code-view-header",Qo="data-diffs-code-view-footer",mr="--diffs-scrollbar-gutter-measured",Yh=1,Zo=1e5,_n={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},et={..._n,hunkLineCount:1},Jo={paddingTop:8,paddingBottom:8,gap:8},es={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ts=Object.freeze({fromStart:0,fromEnd:0}),Xe={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},vr={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Oe=new Set;let we=null;function G(e){Oe.add(e),we??=requestAnimationFrame(Cr)}function ze(e){Oe.delete(e)&&Oe.size===0&&we!=null&&(cancelAnimationFrame(we),we=null)}function Xh(){Oe.clear(),we!=null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(we),we=null}function Cr(e){const t=new Set(Oe);Oe.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Oe.size>0?we=requestAnimationFrame(Cr):we=null}function Qe(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Je(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Fn(e,t){const n=e?.theme??O,i=t?.theme??O,r=ei(e),o=ei(t);return Je(n,i)&&Qe(e,t,["theme","parseDiffOptions"])&&Qe(r,o)}function ei(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function _t(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function cn({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const d=Math.max(e-r,0),c=Math.min(e+l,t);return{top:d,bottom:Math.max(c,d)}}let a=e+n/2-s/2,h=a+s;return a<0&&(a=0),h>t&&(h=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(h,t),a))}}function Te(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const ns=new TextEncoder,is=new TextDecoder("utf-8",{ignoreBOM:!0}),rs=/[\uD800-\uDFFF]/,un=1024;let qe=new Uint8Array(un);function Sr(){qe.length!==un&&(qe=new Uint8Array(un))}function B(e){if(e.length===0)return e;if(rs.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;qe.length0&&r.deletions>0||o.type!=="context")continue;const s=r.additions>0,l=s?t.additionLines:t.deletionLines,a=s?r.additionLineIndex:r.deletionLineIndex,h=s?r.additions:r.deletions,d=l[a]??"";if(d.trim()!=="")continue;let c=!0;for(let C=1;Cos)return null;const a=[];for(let g=0;gn;let c=0,u=-1;for(let g=0;g<=l;g++){let C=0;for(let m=0;mu&&(u=C,c=g)}if(c===0)return null;const f=[],p=(g,C,m,v)=>{(g>0||C>0)&&f.push({type:"change",deletions:g,additions:C,deletionLineIndex:m,additionLineIndex:v})};return d?(p(0,c,r,o),p(s,s,r,o+c),p(0,i-s-c,r+s,o+c+s)):(p(c,0,r,o),p(s,s,r+c,o),p(n-s-c,0,r+c+s,o+s)),f}const hs=/\s+/g;function ti(e){return e.replace(hs,"")}function cs(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let r=0;for(;r0&&(f[f.length-1]===` `||f[f.length-1]==="\r"||f[f.length-1]===`\r `||f[f.length-1]==="");)f.pop();const{additionStart:y,deletionStart:S}=g;d=h?d:S-1,c=h?c:y-1;const L={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:g.additionCount,additionStart:y,additionLines:C,deletionCount:g.deletionCount,deletionStart:S,deletionLines:m,deletionLineIndex:d,additionLineIndex:c,hunkContent:[],hunkContext:oi(g.hunkContext),hunkSpecs:B(p),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let x=0,E=0;for(let k=1;k=L.additionCount&&E>=L.deletionCount&&!R.startsWith("\\")){if(o&&bs(R)&&!ys(R))throw Error("parsePatchContent: hunk has more lines than expected");break}const F=R[0];if(F!=="+"&&F!=="-"&&F!==" "&&F!=="\\"){if(o)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${F}", full line: "${R}"`),console.error("processFile: invalid rawLine:",R);continue}const T=ks(F);if(T==="addition"){if(o&&x>=L.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const I=Kt(R);(v==null||v.type!=="change")&&(v=Yt("change",d,c),L.hunkContent.push(v)),c++,x++,h&&a.additionLines.push(I),v.additions++,C++,b="addition"}else if(T==="deletion"){if(o&&E>=L.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const I=Kt(R);(v==null||v.type!=="change")&&(v=Yt("change",d,c),L.hunkContent.push(v)),d++,E++,h&&a.deletionLines.push(I),v.deletions++,m++,b="deletion"}else if(T==="context"){if(o&&(E>=L.deletionCount||x>=L.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const I=Kt(R);(v==null||v.type!=="context")&&(v=Yt("context",d,c),L.hunkContent.push(v)),c++,d++,x++,E++,h&&(a.deletionLines.push(I),a.additionLines.push(I)),v.lines++,b="context"}else if(T==="metadata"&&v!=null){if(v.type==="context"?(L.noEOFCRAdditions=!0,L.noEOFCRDeletions=!0):b==="deletion"?L.noEOFCRDeletions=!0:b==="addition"&&(L.noEOFCRAdditions=!0),h&&(b==="addition"||b==="context")){const I=a.additionLines.length-1;I>=0&&(a.additionLines[I]=Te(a.additionLines[I]))}if(h&&(b==="deletion"||b==="context")){const I=a.deletionLines.length-1;I>=0&&(a.deletionLines[I]=Te(a.deletionLines[I]))}}}if(o&&(x!==L.additionCount||E!==L.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");L.additionLines=C,L.deletionLines=m,L.collapsedBefore=Math.max(oe(L.additionStart,L.additionCount)-s,0),a.hunks.push(L),s=W(L.additionStart,L.additionCount);for(const k of L.hunkContent)k.type==="context"?(L.splitLineCount+=k.lines,L.unifiedLineCount+=k.lines):(L.splitLineCount+=Math.max(k.additions,k.deletions),L.unifiedLineCount+=k.deletions+k.additions);L.splitLineStart=a.splitLineCount+L.collapsedBefore,L.unifiedLineStart=a.unifiedLineCount+L.collapsedBefore,a.splitLineCount+=L.collapsedBefore+L.splitLineCount,a.unifiedLineCount+=L.collapsedBefore+L.unifiedLineCount}if(a!=null){if(o&&h&&!n&&a.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(a.hunks.length>0&&!h&&a.additionLines.length>0&&a.deletionLines.length>0){const u=a.hunks[a.hunks.length-1],f=W(u.additionStart,u.additionCount),p=a.additionLines.length,g=Math.max(p-f,0);a.splitLineCount+=g,a.unifiedLineCount+=g}return n||(a.prevName!=null&&a.name!==a.prevName?a.hunks.length>0?a.type="rename-changed":a.type="rename-pure":(i==null||i.contents==="")&&r!=null&&r.contents!==""?a.type="new":i!=null&&i.contents!==""&&(r==null||r.contents==="")&&(a.type="deleted")),a.type!=="rename-pure"&&a.type!=="rename-changed"&&(a.prevName=void 0),as(a),a}}function gs(e,t,n=!1){const i=[],r=ms(e)?e.split(Vo):[e];for(const o of r)try{i.push(us(o,t!=null?`${t}-${i.length}`:void 0,n))}catch(s){if(n)throw s;console.error(s)}return i}function ms(e){return e.startsWith("From ")||e.includes(` From `)}function ni(e){const t=yr(e);for(let n=0;ni.map(i=>d[i]); -import{bR as c}from"./index-BZ9wqq8Z.js";var Dt=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Wi=Object.getOwnPropertyNames,zi=Object.prototype.hasOwnProperty,qi=(e,t)=>{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new vt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Gt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Uo=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Cr(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Sn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Or(e,t,n,r,i,o,s,a){const l=t.content.length;let u=!1,p=-1;if(s){const h=Fo(e,t,n,r,i,o);i=h.stack,r=h.linePos,n=h.isFirstLine,p=h.anchorPosition}const d=Date.now();for(;!u;){if(a!==0&&Date.now()-d>a)return new Sn(i,!0);f()}return new Sn(i,!1);function f(){const h=jo(e,t,n,r,i,p);if(!h){o.produce(i,l),u=!0;return}const m=h.captureIndices,E=h.matchedRuleId,b=m&&m.length>0?m[0].end>r:!1;if(E===$o){const g=i.getRule(e);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ce(e,t,n,i,o,g.endCaptures,m),o.produce(i,m[0].end);const _=i;if(i=i.parent,p=_.getAnchorPos(),!b&&_.getEnterPos()===r){i=_,o.produce(i,l),u=!0;return}}else{const g=e.getRule(E);o.produce(i,m[0].start);const _=i,w=g.getName(t.content,m),A=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(E,r,p,m[0].end===l,null,A,A),g instanceof Mt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.endHasBackReferences&&(i=i.withEndRule(k.getEndWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(g instanceof et){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.whileHasBackReferences&&(i=i.withEndRule(k.getWhileWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(Ce(e,t,n,i,o,g.captures,m),o.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,l),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function Fo(e,t,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(e);u instanceof et&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=zo(l.rule,e,l.stack.endRule,n,r===s),d=u.findNextMatchSync(t,r,p);if(d){if(d.ruleId!==Ir){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Ce(e,t,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function jo(e,t,n,r,i,o){const s=Ho(e,t,n,r,i,o),a=e.getInjections();if(a.length===0)return s;const l=Wo(a,e,t,n,r,i,o);if(!l)return s;if(!s)return l;const u=s.captureIndices[0].start,p=l.captureIndices[0].start;return p=a)&&(a=w,l=_.captureIndices,u=_.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function xr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function zo(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ce(e,t,n,r,i,o,s){if(o.length===0)return;const a=t.content,l=Math.min(o.length,s.length),u=[],p=s[0].end;for(let d=0;dp)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),f.retokenizeCapturedWithRuleId){const E=f.getName(a,s),b=r.contentNameScopesList.pushAttributed(E,e),g=f.getContentName(a,s),_=b.pushAttributed(g,e),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,_),A=e.createOnigString(a.substring(0,h.end));Or(e,A,n&&h.start===0,h.start,w,i,!1,0),Lr(A);continue}const m=f.getName(a,s);if(m!==null){const b=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new qo(b,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var qo=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Xo(e,t,n,r,i,o,s,a){return new Qo(e,t,n,r,i,o,s,a)}function Ln(e,t,n,r,i){const o=Ye(t,tt),s=Tr.getCompiledRuleId(n,r,i.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function tt(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var Qo=class{constructor(e,t,n,r,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Bo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Rn(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Ye(l,tt);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)Ln(t,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&Ln(t,l,a,this,a)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Rn(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Tr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Bt.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=le.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Ae.createRootAndLookUpScopeName(f,d,this):h=Ae.createRoot("unknown",d),t=new Bt(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+` `;const o=this.createOnigString(e),s=o.content.length,a=new Yo(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Or(this,o,i,0,t,a,!0,r);return Lr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Rn(e,t){return e=mo(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ae=class K{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=wt.push(i,o.scopeNames),r=new K(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new K(null,new wt(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new wt(null,t),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(n,i,s);return new K(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return K.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),le.set(t,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return K._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=K._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(t.tokenAttributes,i,s);return new K(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Bt=class ie{constructor(t,n,r,i,o,s,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new ie(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:ie._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ae.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ie._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,s,a){return new ie(this,t,n,r,i,o,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ie(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ae.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new ie(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ae.fromExtension(r,n.contentNameScopesList))}},Jo=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ye(n,tt).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ye(n,tt).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Yo=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=le.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=le.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Ut=Bt.NULL;function Ie(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function ee(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Dr(e){return Array.isArray(e)?e:[e]}async function nn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Ve(e){return!e||["plaintext","txt","text","plain"].includes(e)}function rn(e){return e==="ansi"||Ve(e)}function $e(e){return e==="none"}function on(e){return $e(e)}const ts=/(\r?\n)/g;function Me(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(ts);let r=0;const i=[];for(let o=0;o!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?In.light:In.dark),n||(n=t.type==="light"?Tn.light:Tn.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function s(a){if(o.has(a))return o.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?s(a):(o.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!u)return a;const p={...a,settings:{...a.settings}};if(l){const d=s(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,p.settings.foreground=d}if(u){const d=s(a.settings.background);t.colorReplacements[d]=a.settings.background,p.settings.background=d}return p});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=s(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,Pn,{enumerable:!1,writable:!1,value:!0}),t}async function Nr(e){return[...new Set((await Promise.all(e.filter(t=>!rn(t)).map(async t=>await nn(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Vr(e){return(await Promise.all(e.map(async t=>on(t)?null:lt(await nn(t))))).filter(t=>!!t)}function $r(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var ns=class extends es{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=lt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Je.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=$r(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(s=>n.map(([a])=>a).includes(s)):!1).filter(i=>!n.includes(i));throw new S(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},rs=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let ve=0;function ut(e){ve+=1,e.warnings!==!1&&ve>=10&&ve%10===0&&console.warn(`[Shiki] ${ve} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new S("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(lt),i=new ns(new rs(e.engine,n),r,n,e.langAlias);let o;function s(_){return $r(_,e.langAlias)}function a(_){b();const w=i.getGrammar(typeof _=="string"?_:_.name);if(!w)throw new S(`Language \`${_}\` not found, you may need to load it first`);return w}function l(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=i.getTheme(_);if(!w)throw new S(`Theme \`${_}\` not found, you may need to load it first`);return w}function u(_){b();const w=l(_);return o!==_&&(i.setTheme(w),o=_),{theme:w,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function f(..._){b(),i.loadLanguages(_.flat(1))}async function h(..._){return f(await Nr(_))}function m(..._){b();for(const w of _.flat(1))i.loadTheme(w)}async function E(..._){return b(),m(await Vr(_))}function b(){if(t)throw new S("Shiki instance has been disposed")}function g(){t||(t=!0,i.dispose(),ve-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:s,loadLanguage:h,loadLanguageSync:f,loadTheme:E,loadThemeSync:m,dispose:g,[Symbol.dispose]:g}}const is=ut;async function sn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Vr(e.themes||[]),Nr(e.langs||[]),e.engine]);return ut({...e,themes:t,langs:n,engine:r})}const os=sn,Mr=new WeakMap;function ct(e,t){Mr.set(e,t)}function Te(e){return Mr.get(e)}var dt=class Gr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Gr(Object.fromEntries(Dr(n).map(r=>[r,Ut])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return ss(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ss(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function as(e,t){if(!(e instanceof dt))throw new S("Invalid grammar state");return e.getInternalStack(t)}const ls=/,/,us=/ /;function Br(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Ve(e.resolveLangAlias(n.lang||"text"))||$e(r))return Me(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Fr(t,s,i,o,n)}function Ur(...e){if(e.length===2)return Te(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(Ve(i)||$e(o))throw new S("Plain language does not have grammar state");if(i==="ansi")throw new S("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new dt(an(n,l,s,a,r).stateStack,l.name,s.name)}function Fr(e,t,n,r,i){const o=an(e,t,n,r,i),s=new dt(o.stateStack,t.name,n.name);return ct(o.tokens,s),o.tokens}function an(e,t,n,r,i){const o=Ie(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=i,u=Me(e);let p=i.grammarState?as(i.grammarState,n.name)??Ut:i.grammarContextCode!=null?an(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ut,d=[];const f=[];for(let h=0,m=u.length;h0&&E.length>=s){d=[],f.push([{content:E,offset:b,color:"",fontStyle:0}]);continue}let g,_,w;l&&l!=="tokenType"&&(g=t.tokenizeLine(E,p,a),_=g.tokens,w=0);const A=t.tokenizeLine2(E,p,a),k=A.tokens.length/2;for(let I=0;Iyt.trim());break;case"object":pe=Q.scope;break;default:continue}En.push({settings:Q,selectors:pe.map(yt=>yt.split(us))})}q.explanation=[];let bn=0;for(;M+bn({scopeName:t}))}function ds(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)On(e[r],n[i])&&(r-=1),i-=1;return r===-1}function hs(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(ps(s,t,n)){r.push(o);break}return r}function ln(e,t,n,r=Br){const i=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=i.map(u=>{const p=r(e,t,{...n,theme:u.theme});return{tokens:p,state:Te(p),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),s=fs(...o.map(u=>u.tokens)),a=s[0].map((u,p)=>u.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),s.forEach((m,E)=>{const{content:b,explanation:g,offset:_,...w}=m[p][f];h.variants[i[E].color]=w}),h})),l=o[0].state?new dt(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return l&&ct(a,l),a}function fs(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;rl[r]),o=t.map(()=>[]);t.forEach((l,u)=>l.push(o[u]));const s=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u4&&n.slice(0,4)==="data"&&bs.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Dn,Cs);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Dn.test(o)){let s=o.replace(Es,vs);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=un}return new i(r,t)}function vs(e){return"-"+e.toLowerCase()}function Cs(e){return e.charAt(1).toUpperCase()}const As=jr([Hr,_s,qr,Xr,Kr],"html"),Qr=jr([Hr,ys,qr,Xr,Kr],"svg"),Nn={}.hasOwnProperty;function ks(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Nn.call(i,e)){const l=String(i[e]);s=Nn.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ss=/["&'<>`]/g,Ls=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rs=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Is=/[|\\{}()[\]^$+*?.]/g,Vn=new WeakMap;function Ts(e,t){if(e=e.replace(t.subset?Ps(t.subset):Ss,r),t.subset||t.escapeOnly)return e;return e.replace(Ls,n).replace(Rs,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Ps(e){let t=Vn.get(e);return t||(t=Os(e),Vn.set(e,t)),t}function Os(e){const t=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Ms=["cent","copy","divide","gt","lt","not","para","times"],Jr={}.hasOwnProperty,Wt={};let je;for(je in At)Jr.call(At,je)&&(Wt[At[je]]=je);const Gs=/[^\dA-Za-z]/;function Bs(e,t,n,r){const i=String.fromCharCode(e);if(Jr.call(Wt,i)){const o=Wt[i],s="&"+o;return n&&$s.includes(o)&&!Ms.includes(o)&&(!r||t&&t!==61&&Gs.test(String.fromCharCode(t)))?s:s+";"}return""}function Us(e,t,n){let r=Ds(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Bs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Vs(e,t,n.omitOptionalSemicolons);o.length|^->||--!>|"],Hs=["<",">"];function Ws(e,t,n,r){return r.settings.bogusComments?"":"";function i(o){return ye(o,Object.assign({},r.settings.characterReferences,{subset:Hs}))}}function zs(e,t,n,r){return""}function $n(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qs(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Xs(e){return e.join(" ").trim()}const Ks=/[ \t\n\f\r]/g;function cn(e){return typeof e=="object"?e.type==="text"?Mn(e.value):!1:Mn(e)}function Mn(e){return e.replace(Ks,"")===""}const x=Zr(1),Yr=Zr(-1),Qs=[];function Zr(e){return t;function t(n,r,i){const o=n?n.children:Qs;let s=(r||0)+e,a=o[s];if(!i)for(;a&&cn(a);)s+=e,a=o[s];return a}}const Js={}.hasOwnProperty;function ei(e){return t;function t(n,r,i){return Js.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const dn=ei({body:Zs,caption:kt,colgroup:kt,dd:ra,dt:na,head:kt,html:Ys,li:ta,optgroup:ia,option:oa,p:ea,rp:Gn,rt:Gn,tbody:aa,td:Bn,tfoot:la,th:Bn,thead:sa,tr:ua});function kt(e,t,n){const r=x(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&cn(r.value.charAt(0)))}function Ys(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function Zs(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function ea(e,t,n){const r=x(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ta(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="li"}function na(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ra(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Gn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ia(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function oa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function sa(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function aa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function la(e,t,n){return!x(n,t)}function ua(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Bn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ca=ei({body:ha,colgroup:fa,head:pa,html:da,tbody:ma});function da(e){const t=x(e,-1);return!t||t.type!=="comment"}function pa(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function ha(e){const t=x(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&cn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function fa(e,t,n){const r=Yr(n,t),i=x(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ma(e,t,n){const r=Yr(n,t),i=x(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const He={name:[[` \f\r &/=>`.split(""),` diff --git a/apps/pythinker-code/dist-web/assets/index10-DRKt26_3.js b/apps/pythinker-code/dist-web/assets/index10-C3bfH63E.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index10-DRKt26_3.js rename to apps/pythinker-code/dist-web/assets/index10-C3bfH63E.js index 9b1661dad..670a80e5a 100644 --- a/apps/pythinker-code/dist-web/assets/index10-DRKt26_3.js +++ b/apps/pythinker-code/dist-web/assets/index10-C3bfH63E.js @@ -1,2 +1,2 @@ -import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-BZ9wqq8Z.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`
        Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}
        `)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(` +import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-Ct7MGS7v.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`
        Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}
        `)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(` `)},null,8,C1),e[21]||(e[21]=t("span",{class:"infographic-label font-medium font-mono truncate"},"Infographic",-1))])),n.$slots["header-center"]?(r(),u("div",k1,[ge(n.$slots,"header-center",{},void 0,!0)])):l.showModeToggle?(r(),u("div",x1,[t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"":"is-active",Ee.value?"opacity-50 cursor-not-allowed":""]]),disabled:Ee.value,onClick:e[0]||(e[0]=()=>He("preview")),onMouseenter:e[1]||(e[1]=o=>h(o,s(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>h(o,s(a)("common.preview")||"Preview")),onMouseleave:v,onBlur:v},[t("div",b1,[e[22]||(e[22]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,X(s(a)("common.preview")||"Preview"),1)])],42,y1),t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>He("source")),onMouseenter:e[4]||(e[4]=o=>h(o,s(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>h(o,s(a)("common.source")||"Source")),onMouseleave:v,onBlur:v},[t("div",M1,[e[23]||(e[23]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),t("span",null,X(s(a)("common.source")||"Source"),1)])],34)])):F("",!0),n.$slots["header-right"]?(r(),u("div",B1,[ge(n.$slots,"header-right",{},void 0,!0)])):(r(),u("div",F1,[l.showCollapseButton?(r(),u("button",{key:0,class:b(se),"aria-pressed":c.value,onClick:e[6]||(e[6]=o=>c.value=!c.value),onMouseenter:e[7]||(e[7]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onMouseleave:v,onBlur:v},[(r(),u("svg",{style:Ce({rotate:c.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[24]||(e[24]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,T1)):F("",!0),l.showCopyButton?(r(),u("button",{key:1,class:b(se),onClick:_e,onMouseenter:e[9]||(e[9]=o=>Te(o)),onFocus:e[10]||(e[10]=o=>Te(o)),onMouseleave:v,onBlur:v},[H.value?(r(),u("svg",$1,[...e[26]||(e[26]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(r(),u("svg",H1,[...e[25]||(e[25]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):F("",!0),l.showExportButton?(r(),u("button",{key:2,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Ie,onMouseenter:e[11]||(e[11]=o=>h(o,s(a)("common.export")||"Export")),onFocus:e[12]||(e[12]=o=>h(o,s(a)("common.export")||"Export")),onMouseleave:v,onBlur:v},[...e[27]||(e[27]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,j1)):F("",!0),l.showFullscreenButton?(r(),u("button",{key:3,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Oe,onMouseenter:e[13]||(e[13]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onFocus:e[14]||(e[14]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onMouseleave:v,onBlur:v},[j.value?(r(),u("svg",E1,[...e[29]||(e[29]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(r(),u("svg",P1,[...e[28]||(e[28]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,L1)):F("",!0)]))])):F("",!0),t1(t("div",null,[k.value?(r(),u("div",z1,[t("pre",S1,X(z.value),1)])):(r(),u("div",Z1,[l.showZoomControls?(r(),u("div",V1,[t("div",D1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e,onMouseenter:e[15]||(e[15]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onMouseleave:v,onBlur:v},[...e[30]||(e[30]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je,onMouseenter:e[17]||(e[17]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onMouseleave:v,onBlur:v},[...e[31]||(e[31]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le,onMouseenter:e[19]||(e[19]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onMouseleave:v,onBlur:v},X(Math.round(100*M.value))+"% ",33)])])):F("",!0),t("div",{class:"infographic-preview relative transition-all overflow-hidden block",style:Ce({height:ce.value}),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},[L.value||S.value?F("",!0):(r(),u("pre",N1,X(z.value),1)),t("div",{class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":_.value}]),style:Ce(ze.value)},[t("div",{ref_key:"infographicContainer",ref:p,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],36)]))],512),[[l1,!c.value]]),(r(),a1(c1,{to:"body"},[t("div",{class:b(["markstream-vue",{dark:l.isDark}])},[i1(u1,{name:"infographic-dialog",appear:""},{default:r1(()=>[j.value?(r(),u("div",{key:0,class:"infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:s1(ve,["self"])},[t("div",Y1,[t("div",_1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e},[...e[32]||(e[32]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je},[...e[33]||(e[33]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le},X(Math.round(100*M.value))+"% ",1),t("button",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",onClick:ve},[...e[34]||(e[34]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),t("div",{ref_key:"modalContent",ref:D,class:b(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!_.value,"cursor-grabbing":_.value}]),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},null,34)])])):F("",!0)]),_:1})],2)]))],10,p1))}}),[["__scopeId","data-v-de34ec4b"]]);ke.install=R=>{R.component(ke.__name,ke)};export{ke as default}; diff --git a/apps/pythinker-code/dist-web/assets/index11-BtnGHbJw.js b/apps/pythinker-code/dist-web/assets/index11-DJqeKSQb.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index11-BtnGHbJw.js rename to apps/pythinker-code/dist-web/assets/index11-DJqeKSQb.js index 252a96062..da97fc630 100644 --- a/apps/pythinker-code/dist-web/assets/index11-BtnGHbJw.js +++ b/apps/pythinker-code/dist-web/assets/index11-DJqeKSQb.js @@ -1,4 +1,4 @@ -import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as f,bl as Wn,af as Xn,bY as Vn,bE as I,az as Un,c8 as wn,aD as Zn,as as Y,aI as Kn,aL as M,u as C,aY as Rt,v as u,bk as w,bb as Ke,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-BZ9wqq8Z.js";import{i as At}from"./safeRaf-DGuzXxDK.js";function vl(d,m){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,m-12),m))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function fl(d){const m=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(m)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(m)}function ml(d){if(!d.includes(";"))return d;const m=d.indexOf(":");if(m===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,m))return d;const y=d.slice(0,m+1),z=d.slice(m+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||fl($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function Lt(d){if(_t(d)!=="sequencediagram")return d;const m=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;zm in d?hl(d,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[m]=y,Tn=(d,m)=>{for(var y in m||(m={}))wl.call(m,y)&&Mn(d,y,m[y]);if(bn)for(var y of bn(m))yl.call(m,y)&&Mn(d,y,m[y]);return d},T=(d,m,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,m)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Al=["aria-label","disabled"],Ll={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:m}){var y,z;const a=d,$=m,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=f(!1),P=f(typeof window>"u"),ee=Nn(),Ht=In(),Le=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Le.value,dompurifyConfig:Le.value==="strict"?Q:void 0,flowchart:Le.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var X;for(const J of W)(X=J.parentNode)==null||X.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ge(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Je=f(!1),V=f(!1),Qe=f(),Z=f(),v=f(),se=f(),et=f(null),En=qn(),je=f(null),xe=f(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,tt=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,tt+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++tt;yield Y(),t===tt&&((function(n=Nt.value){n&&Qe.value&&te?.reportHeight(n,Qe.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,tt+=1,te?.markSettled(e))}const Yt=f(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Le.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% +import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as f,bl as Wn,af as Xn,bY as Vn,bE as I,az as Un,c8 as wn,aD as Zn,as as Y,aI as Kn,aL as M,u as C,aY as Rt,v as u,bk as w,bb as Ke,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-Ct7MGS7v.js";import{i as At}from"./safeRaf-DGuzXxDK.js";function vl(d,m){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,m-12),m))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function fl(d){const m=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(m)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(m)}function ml(d){if(!d.includes(";"))return d;const m=d.indexOf(":");if(m===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,m))return d;const y=d.slice(0,m+1),z=d.slice(m+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||fl($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function Lt(d){if(_t(d)!=="sequencediagram")return d;const m=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;zm in d?hl(d,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[m]=y,Tn=(d,m)=>{for(var y in m||(m={}))wl.call(m,y)&&Mn(d,y,m[y]);if(bn)for(var y of bn(m))yl.call(m,y)&&Mn(d,y,m[y]);return d},T=(d,m,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,m)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Al=["aria-label","disabled"],Ll={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:m}){var y,z;const a=d,$=m,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=f(!1),P=f(typeof window>"u"),ee=Nn(),Ht=In(),Le=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Le.value,dompurifyConfig:Le.value==="strict"?Q:void 0,flowchart:Le.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var X;for(const J of W)(X=J.parentNode)==null||X.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ge(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Je=f(!1),V=f(!1),Qe=f(),Z=f(),v=f(),se=f(),et=f(null),En=qn(),je=f(null),xe=f(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,tt=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,tt+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++tt;yield Y(),t===tt&&((function(n=Nt.value){n&&Qe.value&&te?.reportHeight(n,Qe.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,tt+=1,te?.markSettled(e))}const Yt=f(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Le.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% `;return n.trim().startsWith("%%{")?n:r+n}function qt(){var e;return(function(t){const n=(function(){var r;const o=Z.value?getComputedStyle(Z.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=zt(o))!=null?r:360})(),l=un();return ol(t,n,l)})((e=zt(a.estimatedPreviewHeightPx))!=null?e:al(D.value))}function Wt(){return`${qt()}px`}const _e=f(null);function kt(){var e;return!!((e=v.value)!=null&&e.querySelector("svg"))}function Xt(){return a.loading!==!1&&(kt()||!!_e.value)}const B=f(1),_=f(0),H=f(0),nt=f(!1),lt=f({x:0,y:0}),x=f(!0),rt=f(!1),re=f(!1),de=f(null);let xt="",bt=!1,ve="";const ot=f(0),Mt=f(!1),$n=F(()=>{var e;return Math.max(0,(e=a.renderDebounceMs)!=null?e:300)}),Pn=F(()=>{var e;return Math.max(0,(e=a.contentStableDelayMs)!=null?e:500)}),He=F(()=>{var e;return Math.max(120,(e=a.previewPollDelayMs)!=null?e:800)}),Dn=F(()=>{var e;return Math.max(He.value,(e=a.previewPollMaxDelayMs)!=null?e:4e3)}),Vt=F(()=>{var e;return Math.max(1,Math.trunc((e=a.previewPollMaxAttempts)!=null?e:12))}),fe=F(()=>a.loading!==!1);let Ne=null,Ie=null,Oe=null,Se=null,Ye=0;const Ut=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Zt=(z=globalThis.cancelIdleCallback)!=null?z:e=>clearTimeout(e);function b(e=ke){return!ue&&e===ke}function A(){return b()&&xe.value&&!V.value}function Tt(){Oe!=null&&(globalThis.clearTimeout(Oe),Oe=null),Se!=null&&(Zt(Se),Se=null)}function qe(){ue||Oe==null&&Se==null&&(Oe=globalThis.setTimeout(()=>{Oe=null,A()&&(Se=Ut(()=>{Se=null,A()&&gn()},{timeout:500}))},$n.value))}function We(){Ie!=null&&(globalThis.clearTimeout(Ie),Ie=null)}function Kt(e=600){if(typeof globalThis>"u"||ue)return;const t=Math.max(0,e);We(),Ie=globalThis.setTimeout(()=>{if(Ie=null,!ue){if(a.loading||re.value||!A())return void Kt(Math.min(1200,Math.max(300,1.2*t)));qe()}},t)}const q=f(Wt()),at=f(q.value);let $e=null;const O=f(!1),K=f(!1),me=f({}),he=f(0);let U=null,Pe=null;const N=f(!1),Rn=F(()=>{var e,t;return!(V.value||x.value||P.value&&!re.value&&!de.value&&(O.value||N.value&&((t=(e=v.value)==null?void 0:e.textContent)!=null&&t.trim())))}),Me=f({zoom:1,translateX:0,translateY:0,containerHeight:q.value}),Gt=F(()=>a.enableWheelZoom?{wheel:Fn}:{}),G=F(()=>{var e,t,n,l;return{worker:(e=a.workerTimeoutMs)!=null?e:1400,parse:(t=a.parseTimeoutMs)!=null?t:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}});let De=null,it=null,Re=!1,Te=He.value,ne=null,ut=0,Ct=!0,st=0;function Ce(e,t){const n=t?.timeoutMs,l=t?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,c=null;return new Promise((h,i)=>{const s=()=>{r!=null&&clearTimeout(r),c&&l&&l.removeEventListener("abort",c)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,s(),i(new Error("Operation timed out")))},n)),l&&(c=()=>{o||(o=!0,s(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",c)),e().then(p=>{o||(o=!0,s(),h(p))}).catch(p=>{o||(o=!0,s(),i(p))})})}function Jt(e){if(typeof document>"u"||!v.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(e,D.value,v.value)===!0)return N.value=!0,void L();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),we(v.value),v.value.appendChild(t);const l=v.value?getComputedStyle(v.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";q.value=l||"360px",at.value=q.value,N.value=!0,L()}function Qt(e){const t=typeof e=="string"?e:typeof e?.message=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function en(e){return e?.name==="AbortError"}function Bt(e){return!Qt(e)&&!en(e)}typeof window<"u"&&I([()=>Qe.value,ee],([e,t])=>{var n;if((n=je.value)==null||n.destroy(),je.value=null,!t||xe.value)return void(xe.value=!0);if(!e)return void(xe.value=!1);const l=En(e,{rootMargin:Ht?.value.heavyBlockMargin,allowIdle:!1});je.value=l,xe.value=l.isVisible.value,l.whenVisible.then(()=>{xe.value=!0})},{immediate:!0}),Un(()=>{var e;ue=!0,ke+=1,he.value+=1,(e=je.value)==null||e.destroy(),je.value=null,It(),Tt()});const ct=F(()=>a.showTooltips!==!1);function tn(e){return!e||e.disabled}function R(e,t,n="top"){if(!ct.value||tn(e.currentTarget))return;const l=e,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;xn(e.currentTarget,t,n,!1,r,a.isDark)}function S(){ct.value&&wn()}function nn(e){if(!ct.value||tn(e.currentTarget))return;const t=Je.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;xn(e.currentTarget,t,"top",!1,l,a.isDark)}function ln(e,t){const n={theme:t==="dark"?"dark":"default"};Le.value==="strict"&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%% `;return e.trimStart().startsWith("%%{")?e:l+e}function dt(){return Ct&&!x.value&&!O.value&&!N.value}function rn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Et(e){if(_t(e)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(rn(o))break;r.pop()}else r.pop()}return r.some(rn)?r.join(` `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const n=t[t.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;t.pop()}else t.pop()}return t.join(` diff --git a/apps/pythinker-code/dist-web/assets/index5-DRYrcfDq.js b/apps/pythinker-code/dist-web/assets/index5-BBtmbjGn.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/index5-DRYrcfDq.js rename to apps/pythinker-code/dist-web/assets/index5-BBtmbjGn.js index eaa15b58c..c5e97faa2 100644 --- a/apps/pythinker-code/dist-web/assets/index5-DRYrcfDq.js +++ b/apps/pythinker-code/dist-web/assets/index5-BBtmbjGn.js @@ -1 +1 @@ -import c from"./CodeBlockNode-D4cpL5UZ.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-BZ9wqq8Z.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; +import c from"./CodeBlockNode-D5JTfsXt.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-Ct7MGS7v.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; diff --git a/apps/pythinker-code/dist-web/assets/index6-rJ6wldFa.js b/apps/pythinker-code/dist-web/assets/index6-BYfcWmNm.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/index6-rJ6wldFa.js rename to apps/pythinker-code/dist-web/assets/index6-BYfcWmNm.js index 19676d649..637f8738b 100644 --- a/apps/pythinker-code/dist-web/assets/index6-rJ6wldFa.js +++ b/apps/pythinker-code/dist-web/assets/index6-BYfcWmNm.js @@ -1 +1 @@ -import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-BZ9wqq8Z.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; +import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-Ct7MGS7v.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; diff --git a/apps/pythinker-code/dist-web/assets/index7-BEZwnfMu.js b/apps/pythinker-code/dist-web/assets/index7-BEEN1sEQ.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/index7-BEZwnfMu.js rename to apps/pythinker-code/dist-web/assets/index7-BEEN1sEQ.js index 330fb8bfb..a7d5062d8 100644 --- a/apps/pythinker-code/dist-web/assets/index7-BEZwnfMu.js +++ b/apps/pythinker-code/dist-web/assets/index7-BEEN1sEQ.js @@ -1 +1 @@ -import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-BZ9wqq8Z.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; +import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-Ct7MGS7v.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; diff --git a/apps/pythinker-code/dist-web/assets/index8-Cir0nNuz.js b/apps/pythinker-code/dist-web/assets/index8-C1u-nZQS.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index8-Cir0nNuz.js rename to apps/pythinker-code/dist-web/assets/index8-C1u-nZQS.js index f602b7c65..ffe461512 100644 --- a/apps/pythinker-code/dist-web/assets/index8-Cir0nNuz.js +++ b/apps/pythinker-code/dist-web/assets/index8-C1u-nZQS.js @@ -1 +1 @@ -import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-BZ9wqq8Z.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; +import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-Ct7MGS7v.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; diff --git a/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-Cn4b9A5u.js b/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-CCm7qy3M.js similarity index 68% rename from apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-Cn4b9A5u.js rename to apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-CCm7qy3M.js index 5bcf3542e..cc3f18b6e 100644 --- a/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-Cn4b9A5u.js +++ b/apps/pythinker-code/dist-web/assets/infoDiagram-RXCK75RN-CCm7qy3M.js @@ -1,2 +1,2 @@ -import{_ as e,l as s,G as n,d as i}from"./mermaid.core-BusHtpbx.js";import{p}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},d={version:"11.17.0"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,o)=>{s.debug(`rendering info diagram +import{_ as e,l as s,G as n,d as i}from"./mermaid.core-CwGP16Dm.js";import{p}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},d={version:"11.17.0"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,o)=>{s.debug(`rendering info diagram `+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},w={parser:g,db:m,renderer:l};export{w as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-n_fK3Ljm.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js rename to apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-n_fK3Ljm.js index 8133ffc96..fc6d6e53b 100644 --- a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js +++ b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-n_fK3Ljm.js @@ -1,4 +1,4 @@ -import{_ as l,c as lt,a2 as ct,G as ut,am as dt,r as yt,k as ft,p as et,a as pt,b as gt,g as kt,s as mt,q as wt,d as _t}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[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],D={trace:l(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:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,W,N,Y,F={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: +import{_ as l,c as lt,a2 as ct,G as ut,am as dt,r as yt,k as ft,p as et,a as pt,b as gt,g as kt,s as mt,q as wt,d as _t}from"./mermaid.core-CwGP16Dm.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[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],D={trace:l(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:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,W,N,Y,F={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: `+b.showPosition()+` Expecting `+U.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:U})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:i.push(M),f.push(b.yytext),r.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[N[1]][1],F.$=f[f.length-V],F._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},H&&(F._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(F,[w,$,I,S.yy,N[1],f,r].concat(C)),typeof Y<"u")return Y;V&&(i=i.slice(0,-1*V*2),f=f.slice(0,-1*V),r=r.slice(0,-1*V)),i.push(this.productions_[N[1]][0]),f.push(F.$),r.push(F._$),tt=v[i[i.length-2]][i[i.length-1]],i.push(tt);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(e,s){return this.yy=s||this.yy||{},this._input=e,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:l(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var s=e.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),e},"input"),unput:l(function(e){var s=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var h=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===h.length?this.yylloc.first_column:0)+h[h.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:l(function(){return this._more=!0,this},"more"),reject:l(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),s=new Array(e.length+1).join("-");return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/javascript-C1Bl1QAn.js b/apps/pythinker-code/dist-web/assets/javascript-BwGz2yH9.js similarity index 85% rename from apps/pythinker-code/dist-web/assets/javascript-C1Bl1QAn.js rename to apps/pythinker-code/dist-web/assets/javascript-BwGz2yH9.js index b3e38eca0..896cf2f03 100644 --- a/apps/pythinker-code/dist-web/assets/javascript-C1Bl1QAn.js +++ b/apps/pythinker-code/dist-web/assets/javascript-BwGz2yH9.js @@ -1 +1 @@ -import{conf as t,language as e}from"./typescript-DeFWR0Bj.js";import"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const n=t,a={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{n as conf,a as language}; +import{conf as t,language as e}from"./typescript-vzwxO8Um.js";import"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const n=t,a={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{n as conf,a as language}; diff --git a/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-Bznj053h.js b/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-e0ZGdUvr.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-Bznj053h.js rename to apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-e0ZGdUvr.js index 93a6823f4..56a11d59b 100644 --- a/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-Bznj053h.js +++ b/apps/pythinker-code/dist-web/assets/journeyDiagram-EYS64GPL-e0ZGdUvr.js @@ -1,4 +1,4 @@ -import{g as gt}from"./chunk-5VM5RSS4-BX7DTcSO.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-F27PBJKO-CGsciVEq.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,j as X,d as $t,r as Mt}from"./mermaid.core-BusHtpbx.js";import{d as it}from"./arc-B8osaoVd.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.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)+`: +import{g as gt}from"./chunk-5VM5RSS4-Ny2gwX65.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-F27PBJKO-pJCmv4XH.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,j as X,d as $t,r as Mt}from"./mermaid.core-CwGP16Dm.js";import{d as it}from"./arc-CPa230_j.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.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)+`: `+_.showPosition()+` 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). `+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()+` diff --git a/apps/pythinker-code/dist-web/assets/jsonMode-B4lkE7Oy.js b/apps/pythinker-code/dist-web/assets/jsonMode-BXAq7Usw.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/jsonMode-B4lkE7Oy.js rename to apps/pythinker-code/dist-web/assets/jsonMode-BXAq7Usw.js index 58f0aacca..63bbae13f 100644 --- a/apps/pythinker-code/dist-web/assets/jsonMode-B4lkE7Oy.js +++ b/apps/pythinker-code/dist-web/assets/jsonMode-BXAq7Usw.js @@ -1,4 +1,4 @@ -import{c as P,l as _,e as B}from"./editor.main-yCrGDkyO.js";import{f as Q,g as y,C as J,H as Y,b as G,d as X,F as Z,S as $,e as K}from"./lspLanguageFeatures-Dzr62Jjp.js";import{a as Ie,D as Ne,h as Ee,R as Le,c as Ue,i as De,j as Be,t as Re,k as Fe}from"./lspLanguageFeatures-Dzr62Jjp.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const x=120*1e3;class C{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=P({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL("/assets/json.worker-MyEhrfQg.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let t;return this._getClient().then(n=>{t=n}).then(n=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(n=>t)}}function ee(e,i=!1){const t=e.length;let n=0,o="",p=0,l=16,u=0,g=0,w=0,v=0,c=0;function O(s,m){let a=0,r=0;for(;a=48&&f<=57)r=r*16+f-48;else if(f>=65&&f<=70)r=r*16+f-65+10;else if(f>=97&&f<=102)r=r*16+f-97+10;else break;n++,a++}return a=t){s+=e.substring(m,n),c=2;break}const a=e.charCodeAt(n);if(a===34){s+=e.substring(m,n),n++;break}if(a===92){if(s+=e.substring(m,n),n++,n>=t){c=2;break}switch(e.charCodeAt(n++)){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=` +import{c as P,l as _,e as B}from"./editor.main-28ipUIqH.js";import{f as Q,g as y,C as J,H as Y,b as G,d as X,F as Z,S as $,e as K}from"./lspLanguageFeatures-CjNYtcpt.js";import{a as Ie,D as Ne,h as Ee,R as Le,c as Ue,i as De,j as Be,t as Re,k as Fe}from"./lspLanguageFeatures-CjNYtcpt.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const x=120*1e3;class C{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=P({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL("/assets/json.worker-MyEhrfQg.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let t;return this._getClient().then(n=>{t=n}).then(n=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(n=>t)}}function ee(e,i=!1){const t=e.length;let n=0,o="",p=0,l=16,u=0,g=0,w=0,v=0,c=0;function O(s,m){let a=0,r=0;for(;a=48&&f<=57)r=r*16+f-48;else if(f>=65&&f<=70)r=r*16+f-65+10;else if(f>=97&&f<=102)r=r*16+f-97+10;else break;n++,a++}return a=t){s+=e.substring(m,n),c=2;break}const a=e.charCodeAt(n);if(a===34){s+=e.substring(m,n),n++;break}if(a===92){if(s+=e.substring(m,n),n++,n>=t){c=2;break}switch(e.charCodeAt(n++)){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=` `;break;case 114:s+="\r";break;case 116:s+=" ";break;case 117:const f=O(4);f>=0?s+=String.fromCharCode(f):c=4;break;default:c=5}m=n;continue}if(a>=0&&a<=31)if(I(a)){s+=e.substring(m,n),c=2;break}else c=6;n++}return s}function D(){if(o="",c=0,p=n,g=u,v=w,n>=t)return p=t,l=17;let s=e.charCodeAt(n);if(L(s)){do n++,o+=String.fromCharCode(s),s=e.charCodeAt(n);while(L(s));return l=15}if(I(s))return n++,o+=String.fromCharCode(s),s===13&&e.charCodeAt(n)===10&&(n++,o+=` `),u++,w=n,l=14;switch(s){case 123:return n++,l=1;case 125:return n++,l=2;case 91:return n++,l=3;case 93:return n++,l=4;case 58:return n++,l=6;case 44:return n++,l=5;case 34:return n++,o=q(),l=10;case 47:const m=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&s<=15);return s}return{setPosition:U,getPosition:()=>n,scan:i?z:D,getToken:()=>l,getTokenValue:()=>o,getTokenOffset:()=>p,getTokenLength:()=>n-p,getTokenStartLine:()=>g,getTokenStartCharacter:()=>p-v,getTokenError:()=>c}}function L(e){return e===32||e===9}function I(e){return e===10||e===13}function T(e){return e>=48&&e<=57}var R;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(R||(R={}));new Array(20).fill(0).map((e,i)=>" ".repeat(i));const A=200;new Array(A).fill(0).map((e,i)=>` `+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>"\r"+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>`\r diff --git a/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-gEE7iVwG.js b/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-C__sss0o.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-gEE7iVwG.js rename to apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-C__sss0o.js index 3bd5059e4..43de902b6 100644 --- a/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-gEE7iVwG.js +++ b/apps/pythinker-code/dist-web/assets/kanban-definition-3QL26DDD-C__sss0o.js @@ -1,4 +1,4 @@ -import{_ as o,l as te,c as H,G as fe,ag as ye,ah as be,ai as me,ae as Ee,E as K,i as j,Z as _e,$ as ke,ab as Se,ac as ce,ad as le}from"./mermaid.core-BusHtpbx.js";import{g as Ne}from"./chunk-5VM5RSS4-BX7DTcSO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],E=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],_=[6,7,11],F=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"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:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];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:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(_,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(_,[2,19]),e(_,[2,21],{15:30,24:F}),e(_,[2,22]),e(_,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(_,[2,16],{15:37,24:F}),e(_,[2,17]),e(_,[2,18]),e(_,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(_,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.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(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var k,P,x,q,G={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((k===null||typeof k>"u")&&(k=ae()),x=U[P]&&U[P][k]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: +import{_ as o,l as te,c as H,G as fe,ag as ye,ah as be,ai as me,ae as Ee,E as K,i as j,Z as _e,$ as ke,ab as Se,ac as ce,ad as le}from"./mermaid.core-CwGP16Dm.js";import{g as Ne}from"./chunk-5VM5RSS4-Ny2gwX65.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],E=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],_=[6,7,11],F=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"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:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];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:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(_,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(_,[2,19]),e(_,[2,21],{15:30,24:F}),e(_,[2,22]),e(_,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(_,[2,16],{15:37,24:F}),e(_,[2,17]),e(_,[2,18]),e(_,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(_,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.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(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var k,P,x,q,G={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((k===null||typeof k>"u")&&(k=ae()),x=U[P]&&U[P][k]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: `+b.showPosition()+` Expecting `+X.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Q="Parse error on line "+(W+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:Z,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+k);switch(x[0]){case 1:r.push(k),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),k=null,se=b.yyleng,c=b.yytext,W=b.yylineno,Z=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],G.$=u[u.length-C],G._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(G._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),q=this.performAction.apply(G,[c,se,W,R.yy,x[1],u,t].concat(ge)),typeof q<"u")return q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(G.$),t.push(G._$),oe=U[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(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:o(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:o(function(i){var n=i.length,r=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 a=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[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: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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(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:o(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:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/layout-CRsCkvth.js b/apps/pythinker-code/dist-web/assets/layout-TrTUIUgx.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/layout-CRsCkvth.js rename to apps/pythinker-code/dist-web/assets/layout-TrTUIUgx.js index 6229894a8..565fb5ec5 100644 --- a/apps/pythinker-code/dist-web/assets/layout-CRsCkvth.js +++ b/apps/pythinker-code/dist-web/assets/layout-TrTUIUgx.js @@ -1 +1 @@ -import{bn as B,bo as y,bp as ye,bq as V,br as U,bs as Ue,bt as oe,bu as We,bv as In,bw as qe,bx as _n,by as kn,bz as jn,bA as ue,bB as An,bC as Mn,bD as xe,bE as Oe,bF as fe,bG as de,bH as G,bI as Xe,bJ as He,bK as Rn,bL as T,bM as Sn,bN as $n,bO as Fn,bP as Ee,bQ as Bn,bR as Ke,bS as N,bT as Gn,bU as Dn,bV as Yn,bW as S,bX as ze,bY as Je,bZ as Vn,b_ as se,b$ as Ze,c0 as Un,c1 as Qe,c2 as Wn,c3 as qn,a7 as x,c4 as c,c5 as Xn,c6 as m,c7 as M,c8 as P,c9 as W}from"./mermaid.core-BusHtpbx.js";var Hn=/\s/;function Kn(e){for(var n=e.length;n--&&Hn.test(e.charAt(n)););return n}var zn=/^\s+/;function Jn(e){return e&&e.slice(0,Kn(e)+1).replace(zn,"")}var Te=NaN,Zn=/^[-+]0x[0-9a-f]+$/i,Qn=/^0b[01]+$/i,er=/^0o[0-7]+$/i,nr=parseInt;function rr(e){if(typeof e=="number")return e;if(B(e))return Te;if(y(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=y(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Jn(e);var r=Qn.test(e);return r||er.test(e)?nr(e.slice(2),r?2:8):Zn.test(e)?Te:+e}var Pe=1/0,tr=17976931348623157e292;function $(e){if(!e)return e===0?e:0;if(e=rr(e),e===Pe||e===-Pe){var n=e<0?-1:1;return n*tr}return e===e?e:0}function ir(e){var n=$(e),r=n%1;return n===n?r?n-r:n:0}var Le=Object.create,ar=(function(){function e(){}return function(n){if(!y(n))return{};if(Le)return Le(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function or(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&k(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),n=Object(n);++t2?n[2]:void 0;for(i&&k(n[0],n[1],i)&&(t=1);++r-1?i[o?n[a]:a]:void 0}}var Mt=Math.max;function Rt(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:ir(r);return i<0&&(i=Mt(t+i,0)),Dn(e,N(n),i)}var le=At(Rt);function ln(e,n){var r=-1,t=U(e)?Array(e.length):[];return Yn(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function g(e,n){var r=T(e)?S:ln;return r(e,N(n))}function St(e,n){return e==null?e:Ke(e,ze(n),H)}function $t(e,n){return e&&Je(e,ze(n))}function Ft(e,n){return e>n}var Bt=Object.prototype,Gt=Bt.hasOwnProperty;function Dt(e,n){return e!=null&&Gt.call(e,n)}function hn(e,n){return e!=null&&Vn(e,n,Dt)}function vn(e,n){return en||o&&a&&f&&!u&&!d||t&&a&&f||!r&&f||!i)return 1;if(!t&&!o&&!d&&e=u)return f;var d=r[t];return f*(d=="desc"?-1:1)}}return e.index-n.index}function Xt(e,n,r){n.length?n=S(n,function(o){return T(o)?function(a){return Qe(a,o.length===1?o[0]:o)}:o}):n=[se];var t=-1;n=S(n,de(N));var i=ln(e,function(o,a,u){var f=S(n,function(d){return d(o)});return{criteria:f,index:++t,value:o}});return Ut(i,function(o,a){return qt(o,a,r)})}function Ht(e,n){return Vt(e,n,function(r,t){return Wn(e,t)})}var Y=pr(function(e,n){return e==null?{}:Ht(e,n)}),Kt=Math.ceil,zt=Math.max;function Jt(e,n,r,t){for(var i=-1,o=zt(Kt((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function Zt(e){return function(n,r,t){return t&&typeof t!="number"&&k(n,r,t)&&(r=t=void 0),n=$(n),r===void 0?(r=n,n=0):r=$(r),t=t===void 0?n1&&k(e,n[0],n[1])?n=[]:r>2&&k(n[0],n[1],n[2])&&(n=[n[0]]),Xt(e,qe(n),[])}),Qt=0;function pe(e){var n=++Qt;return qn(e)+n}function ei(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t0;--u)if(a=n[u].dequeue(),a){t=t.concat(J(e,n,r,a,!0));break}}}return t}function J(e,n,r,t,i){var o=i?[]:void 0;return c(e.inEdges(t.v),function(a){var u=e.edge(a),f=e.node(a.v);i&&o.push({v:a.v,w:a.w}),f.out-=u,ae(n,r,f)}),c(e.outEdges(t.v),function(a){var u=e.edge(a),f=a.w,d=e.node(f);d.in-=u,ae(n,r,d)}),e.removeNode(t.v),o}function ui(e,n){var r=new x,t=0,i=0;c(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(e.edges(),function(u){var f=r.edge(u.v,u.w)||0,d=n(u),s=f+d;r.setEdge(u.v,u.w,s),i=Math.max(i,r.node(u.v).out+=d),t=Math.max(t,r.node(u.w).in+=d)});var o=L(i+t+3).map(function(){return new ri}),a=t+1;return c(r.nodes(),function(u){ae(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function ae(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function fi(e){var n=e.graph().acyclicer==="greedy"?ai(e,r(e)):di(e);c(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,pe("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function di(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,c(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return c(e.nodes(),i),n}function si(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function I(e,n,r,t){var i;do i=pe(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function ci(e){var n=new x().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function pn(e){var n=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Re(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var f,d;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),f=u*i/o,d=u):(i<0&&(a=-a),f=a,d=a*o/i),{x:r+f,y:t+d}}function z(e){var n=g(L(bn(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function li(e){var n=j(g(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);hn(t,"rank")&&(t.rank-=n)})}function hi(e){var n=j(g(e.nodes(),function(o){return e.node(o).rank})),r=[];c(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;c(r,function(o,a){m(o)&&a%i!==0?--t:t&&c(o,function(u){e.node(u).rank+=t})})}function Se(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),I(e,"border",i,n)}function bn(e){return O(g(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function vi(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function pi(e,n){return n()}function bi(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;oa.lim&&(u=a,f=!0);var d=M(n.edges(),function(s){return f===Be(e,e.node(s.v),u)&&f!==Be(e,e.node(s.w),u)});return ve(d,function(s){return A(n,s)})}function Pn(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ge(e),we(e,n),ki(e,n)}function ki(e,n){var r=le(e.nodes(),function(i){return!n.node(i).parent}),t=Ii(e,r);t=t.slice(1),c(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function ji(e,n,r){return e.hasEdge(n,r)}function Be(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Ai(e){switch(e.graph().ranker){case"network-simplex":Ge(e);break;case"tight-tree":Ri(e);break;case"longest-path":Mi(e);break;default:Ge(e)}}var Mi=be;function Ri(e){be(e),gn(e)}function Ge(e){E(e)}function Si(e){var n=I(e,"root",{},"_root"),r=$i(e),t=O(P(r))-1,i=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(a){e.edge(a).minlen*=i});var o=Fi(e)+1;c(e.children(),function(a){Ln(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Ln(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var f=Se(e,"_bt"),d=Se(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,c(u,function(l){Ln(e,n,r,t,i,o,l);var h=e.node(l),p=h.borderTop?h.borderTop:l,v=h.borderBottom?h.borderBottom:l,w=h.borderTop?t:2*t,_=p!==v?1:i-o[a]+1;e.setEdge(f,p,{weight:w,minlen:_,nestingEdge:!0}),e.setEdge(v,d,{weight:w,minlen:_,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+o[a]})}function $i(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&c(o,function(a){r(a,i+1)}),n[t]=i}return c(e.children(),function(t){r(t,1)}),n}function Fi(e){return W(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Bi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Gi(e,n,r){var t={},i;c(r,function(o){for(var a=e.parent(o),u,f;a;){if(u=e.parent(a),u?(f=t[u],t[u]=a):(f=i,i=a),f&&f!==a){n.setEdge(f,a);return}a=u}})}function Di(e,n,r){var t=Yi(e),i=new x({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return c(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),c(e[r](o),function(f){var d=f.v===o?f.w:f.v,s=i.edge(d,o),l=m(s)?0:s.weight;i.setEdge(d,o,{weight:e.edge(f).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Yi(e){for(var n;e.hasNode(n=pe("_root")););return n}function Vi(e,n){for(var r=0,t=1;t0;)s%2&&(l+=u[s+1]),s=s-1>>1,u[s]+=d.weight;f+=d.weight*l})),f}function Wi(e){var n={},r=M(e.nodes(),function(u){return!e.children(u).length}),t=O(g(r,function(u){return e.node(u).rank})),i=g(L(t+1),function(){return[]});function o(u){if(!hn(n,u)){n[u]=!0;var f=e.node(u);i[f.rank].push(u),c(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return c(a,o),i}function qi(e,n){return g(n,function(r){var t=e.inEdges(r);if(t.length){var i=W(t,function(o,a){var u=e.edge(a),f=e.node(a.v);return{sum:o.sum+u.weight*f.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xi(e,n){var r={};c(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),c(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=M(r,function(i){return!i.indegree});return Hi(t)}function Hi(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Ki(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return g(M(n,function(o){return!o.merged}),function(o){return Y(o,["vs","i","barycenter","weight"])})}function Ki(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function zi(e,n){var r=vi(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),t=r.lhs,i=R(r.rhs,function(s){return-s.i}),o=[],a=0,u=0,f=0;t.sort(Ji(!!n)),f=De(o,i,f),c(t,function(s){f+=s.vs.length,o.push(s.vs),a+=s.barycenter*s.weight,u+=s.weight,f=De(o,i,f)});var d={vs:C(o)};return u&&(d.barycenter=a/u,d.weight=u),d}function De(e,n,r){for(var t;n.length&&(t=D(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ji(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function Nn(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,f={};a&&(i=M(i,function(v){return v!==a&&v!==u}));var d=qi(e,i);c(d,function(v){if(e.children(v.v).length){var w=Nn(e,v.v,r,t);f[v.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&Qi(v,w)}});var s=Xi(d,r);Zi(s,f);var l=zi(s,t);if(a&&(l.vs=C([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+p.order)/(l.weight+2),l.weight+=2}return l}function Zi(e,n){c(e,function(r){r.vs=C(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Qi(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function ea(e){var n=bn(e),r=Ye(e,L(1,n+1),"inEdges"),t=Ye(e,L(n-1,-1,-1),"outEdges"),i=Wi(e);Ve(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,f=0;f<4;++u,++f){na(u%2?r:t,u%4>=2),i=z(e);var d=Vi(e,i);da||u>n[f].lim));for(d=f,f=t;(f=e.parent(f))!==d;)o.push(f);return{path:i.concat(o.reverse()),lca:d}}function ia(e){var n={},r=0;function t(i){var o=r;c(e.children(i),t),n[i]={low:o,lim:r++}}return c(e.children(),t),n}function aa(e,n){var r={};function t(i,o){var a=0,u=0,f=i.length,d=D(o);return c(o,function(s,l){var h=ua(e,s),p=h?e.node(h).order:f;(h||s===d)&&(c(o.slice(u,l+1),function(v){c(e.predecessors(v),function(w){var _=e.node(w),me=_.order;(med)&&Cn(r,h,s)})})}function i(o,a){var u=-1,f,d=0;return c(a,function(s,l){if(e.node(s).dummy==="border"){var h=e.predecessors(s);h.length&&(f=e.node(h[0]).order,t(a,d,l,u,f),d=l,u=f)}t(a,d,a.length,f,o.length)}),a}return W(n,i),r}function ua(e,n){if(e.node(n).dummy)return le(e.predecessors(n),function(r){return e.node(r).dummy})}function Cn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function fa(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function da(e,n,r,t){var i={},o={},a={};return c(n,function(u){c(u,function(f,d){i[f]=f,o[f]=f,a[f]=d})}),c(n,function(u){var f=-1;c(u,function(d){var s=t(d);if(s.length){s=R(s,function(w){return a[w]});for(var l=(s.length-1)/2,h=Math.floor(l),p=Math.ceil(l);h<=p;++h){var v=s[h];o[d]===d&&f{var t=r(" buildLayoutGraph",()=>_a(e));r(" runLayout",()=>ya(t,r)),r(" updateInputGraph",()=>xa(e,t))})}function ya(e,n){n(" makeSpaceForEdgeLabels",()=>ka(e)),n(" removeSelfEdges",()=>Ga(e)),n(" acyclic",()=>fi(e)),n(" nestingGraph.run",()=>Si(e)),n(" rank",()=>Ai(pn(e))),n(" injectEdgeLabelProxies",()=>ja(e)),n(" removeEmptyRanks",()=>hi(e)),n(" nestingGraph.cleanup",()=>Bi(e)),n(" normalizeRanks",()=>li(e)),n(" assignRankMinMax",()=>Aa(e)),n(" removeEdgeLabelProxies",()=>Ma(e)),n(" normalize.run",()=>xi(e)),n(" parentDummyChains",()=>ra(e)),n(" addBorderSegments",()=>bi(e)),n(" order",()=>ea(e)),n(" insertSelfEdges",()=>Da(e)),n(" adjustCoordinateSystem",()=>wi(e)),n(" position",()=>ga(e)),n(" positionSelfEdges",()=>Ya(e)),n(" removeBorderNodes",()=>Ba(e)),n(" normalize.undo",()=>Ei(e)),n(" fixupEdgeLabelCoords",()=>$a(e)),n(" undoCoordinateSystem",()=>gi(e)),n(" translateGraph",()=>Ra(e)),n(" assignNodeIntersects",()=>Sa(e)),n(" reversePoints",()=>Fa(e)),n(" acyclic.undo",()=>si(e))}function xa(e,n){c(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),c(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Oa=["nodesep","edgesep","ranksep","marginx","marginy"],Ea={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ta=["acyclicer","ranker","rankdir","align"],Pa=["width","height"],La={width:0,height:0},Na=["minlen","weight","width","height","labeloffset"],Ca={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ia=["labelpos"];function _a(e){var n=new x({multigraph:!0,compound:!0}),r=ne(e.graph());return n.setGraph(ie({},Ea,ee(r,Oa),Y(r,Ta))),c(e.nodes(),function(t){var i=ne(e.node(t));n.setNode(t,_t(ee(i,Pa),La)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var i=ne(e.edge(t));n.setEdge(t,ie({},Ca,ee(i,Na),Y(i,Ia)))}),n}function ka(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function ja(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};I(e,"edge-proxy",o,"_ep")}})}function Aa(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=O(n,t.maxRank))}),e.graph().maxRank=n}function Ma(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Ra(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function f(d){var s=d.x,l=d.y,h=d.width,p=d.height;n=Math.min(n,s-h/2),r=Math.max(r,s+h/2),t=Math.min(t,l-p/2),i=Math.max(i,l+p/2)}c(e.nodes(),function(d){f(e.node(d))}),c(e.edges(),function(d){var s=e.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&f(s)}),n-=a,t-=u,c(e.nodes(),function(d){var s=e.node(d);s.x-=n,s.y-=t}),c(e.edges(),function(d){var s=e.edge(d);c(s.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Sa(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(Re(t,o)),r.points.push(Re(i,a))})}function $a(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Fa(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ba(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(D(r.borderLeft)),a=e.node(D(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Ga(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Da(e){var n=z(e);c(n,function(r){var t=0;c(r,function(i,o){var a=e.node(i);a.order=o+t,c(a.selfEdges,function(u){I(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Ya(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function ee(e,n){return K(Y(e,n),Number)}function ne(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Ua as l}; +import{bn as B,bo as y,bp as ye,bq as V,br as U,bs as Ue,bt as oe,bu as We,bv as In,bw as qe,bx as _n,by as kn,bz as jn,bA as ue,bB as An,bC as Mn,bD as xe,bE as Oe,bF as fe,bG as de,bH as G,bI as Xe,bJ as He,bK as Rn,bL as T,bM as Sn,bN as $n,bO as Fn,bP as Ee,bQ as Bn,bR as Ke,bS as N,bT as Gn,bU as Dn,bV as Yn,bW as S,bX as ze,bY as Je,bZ as Vn,b_ as se,b$ as Ze,c0 as Un,c1 as Qe,c2 as Wn,c3 as qn,a7 as x,c4 as c,c5 as Xn,c6 as m,c7 as M,c8 as P,c9 as W}from"./mermaid.core-CwGP16Dm.js";var Hn=/\s/;function Kn(e){for(var n=e.length;n--&&Hn.test(e.charAt(n)););return n}var zn=/^\s+/;function Jn(e){return e&&e.slice(0,Kn(e)+1).replace(zn,"")}var Te=NaN,Zn=/^[-+]0x[0-9a-f]+$/i,Qn=/^0b[01]+$/i,er=/^0o[0-7]+$/i,nr=parseInt;function rr(e){if(typeof e=="number")return e;if(B(e))return Te;if(y(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=y(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Jn(e);var r=Qn.test(e);return r||er.test(e)?nr(e.slice(2),r?2:8):Zn.test(e)?Te:+e}var Pe=1/0,tr=17976931348623157e292;function $(e){if(!e)return e===0?e:0;if(e=rr(e),e===Pe||e===-Pe){var n=e<0?-1:1;return n*tr}return e===e?e:0}function ir(e){var n=$(e),r=n%1;return n===n?r?n-r:n:0}var Le=Object.create,ar=(function(){function e(){}return function(n){if(!y(n))return{};if(Le)return Le(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function or(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&k(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),n=Object(n);++t2?n[2]:void 0;for(i&&k(n[0],n[1],i)&&(t=1);++r-1?i[o?n[a]:a]:void 0}}var Mt=Math.max;function Rt(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:ir(r);return i<0&&(i=Mt(t+i,0)),Dn(e,N(n),i)}var le=At(Rt);function ln(e,n){var r=-1,t=U(e)?Array(e.length):[];return Yn(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function g(e,n){var r=T(e)?S:ln;return r(e,N(n))}function St(e,n){return e==null?e:Ke(e,ze(n),H)}function $t(e,n){return e&&Je(e,ze(n))}function Ft(e,n){return e>n}var Bt=Object.prototype,Gt=Bt.hasOwnProperty;function Dt(e,n){return e!=null&&Gt.call(e,n)}function hn(e,n){return e!=null&&Vn(e,n,Dt)}function vn(e,n){return en||o&&a&&f&&!u&&!d||t&&a&&f||!r&&f||!i)return 1;if(!t&&!o&&!d&&e=u)return f;var d=r[t];return f*(d=="desc"?-1:1)}}return e.index-n.index}function Xt(e,n,r){n.length?n=S(n,function(o){return T(o)?function(a){return Qe(a,o.length===1?o[0]:o)}:o}):n=[se];var t=-1;n=S(n,de(N));var i=ln(e,function(o,a,u){var f=S(n,function(d){return d(o)});return{criteria:f,index:++t,value:o}});return Ut(i,function(o,a){return qt(o,a,r)})}function Ht(e,n){return Vt(e,n,function(r,t){return Wn(e,t)})}var Y=pr(function(e,n){return e==null?{}:Ht(e,n)}),Kt=Math.ceil,zt=Math.max;function Jt(e,n,r,t){for(var i=-1,o=zt(Kt((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function Zt(e){return function(n,r,t){return t&&typeof t!="number"&&k(n,r,t)&&(r=t=void 0),n=$(n),r===void 0?(r=n,n=0):r=$(r),t=t===void 0?n1&&k(e,n[0],n[1])?n=[]:r>2&&k(n[0],n[1],n[2])&&(n=[n[0]]),Xt(e,qe(n),[])}),Qt=0;function pe(e){var n=++Qt;return qn(e)+n}function ei(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t0;--u)if(a=n[u].dequeue(),a){t=t.concat(J(e,n,r,a,!0));break}}}return t}function J(e,n,r,t,i){var o=i?[]:void 0;return c(e.inEdges(t.v),function(a){var u=e.edge(a),f=e.node(a.v);i&&o.push({v:a.v,w:a.w}),f.out-=u,ae(n,r,f)}),c(e.outEdges(t.v),function(a){var u=e.edge(a),f=a.w,d=e.node(f);d.in-=u,ae(n,r,d)}),e.removeNode(t.v),o}function ui(e,n){var r=new x,t=0,i=0;c(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(e.edges(),function(u){var f=r.edge(u.v,u.w)||0,d=n(u),s=f+d;r.setEdge(u.v,u.w,s),i=Math.max(i,r.node(u.v).out+=d),t=Math.max(t,r.node(u.w).in+=d)});var o=L(i+t+3).map(function(){return new ri}),a=t+1;return c(r.nodes(),function(u){ae(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function ae(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function fi(e){var n=e.graph().acyclicer==="greedy"?ai(e,r(e)):di(e);c(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,pe("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function di(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,c(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return c(e.nodes(),i),n}function si(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function I(e,n,r,t){var i;do i=pe(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function ci(e){var n=new x().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function pn(e){var n=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Re(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var f,d;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),f=u*i/o,d=u):(i<0&&(a=-a),f=a,d=a*o/i),{x:r+f,y:t+d}}function z(e){var n=g(L(bn(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function li(e){var n=j(g(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);hn(t,"rank")&&(t.rank-=n)})}function hi(e){var n=j(g(e.nodes(),function(o){return e.node(o).rank})),r=[];c(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;c(r,function(o,a){m(o)&&a%i!==0?--t:t&&c(o,function(u){e.node(u).rank+=t})})}function Se(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),I(e,"border",i,n)}function bn(e){return O(g(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function vi(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function pi(e,n){return n()}function bi(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;oa.lim&&(u=a,f=!0);var d=M(n.edges(),function(s){return f===Be(e,e.node(s.v),u)&&f!==Be(e,e.node(s.w),u)});return ve(d,function(s){return A(n,s)})}function Pn(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ge(e),we(e,n),ki(e,n)}function ki(e,n){var r=le(e.nodes(),function(i){return!n.node(i).parent}),t=Ii(e,r);t=t.slice(1),c(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function ji(e,n,r){return e.hasEdge(n,r)}function Be(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Ai(e){switch(e.graph().ranker){case"network-simplex":Ge(e);break;case"tight-tree":Ri(e);break;case"longest-path":Mi(e);break;default:Ge(e)}}var Mi=be;function Ri(e){be(e),gn(e)}function Ge(e){E(e)}function Si(e){var n=I(e,"root",{},"_root"),r=$i(e),t=O(P(r))-1,i=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(a){e.edge(a).minlen*=i});var o=Fi(e)+1;c(e.children(),function(a){Ln(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Ln(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var f=Se(e,"_bt"),d=Se(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,c(u,function(l){Ln(e,n,r,t,i,o,l);var h=e.node(l),p=h.borderTop?h.borderTop:l,v=h.borderBottom?h.borderBottom:l,w=h.borderTop?t:2*t,_=p!==v?1:i-o[a]+1;e.setEdge(f,p,{weight:w,minlen:_,nestingEdge:!0}),e.setEdge(v,d,{weight:w,minlen:_,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+o[a]})}function $i(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&c(o,function(a){r(a,i+1)}),n[t]=i}return c(e.children(),function(t){r(t,1)}),n}function Fi(e){return W(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Bi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Gi(e,n,r){var t={},i;c(r,function(o){for(var a=e.parent(o),u,f;a;){if(u=e.parent(a),u?(f=t[u],t[u]=a):(f=i,i=a),f&&f!==a){n.setEdge(f,a);return}a=u}})}function Di(e,n,r){var t=Yi(e),i=new x({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return c(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),c(e[r](o),function(f){var d=f.v===o?f.w:f.v,s=i.edge(d,o),l=m(s)?0:s.weight;i.setEdge(d,o,{weight:e.edge(f).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Yi(e){for(var n;e.hasNode(n=pe("_root")););return n}function Vi(e,n){for(var r=0,t=1;t0;)s%2&&(l+=u[s+1]),s=s-1>>1,u[s]+=d.weight;f+=d.weight*l})),f}function Wi(e){var n={},r=M(e.nodes(),function(u){return!e.children(u).length}),t=O(g(r,function(u){return e.node(u).rank})),i=g(L(t+1),function(){return[]});function o(u){if(!hn(n,u)){n[u]=!0;var f=e.node(u);i[f.rank].push(u),c(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return c(a,o),i}function qi(e,n){return g(n,function(r){var t=e.inEdges(r);if(t.length){var i=W(t,function(o,a){var u=e.edge(a),f=e.node(a.v);return{sum:o.sum+u.weight*f.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xi(e,n){var r={};c(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),c(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=M(r,function(i){return!i.indegree});return Hi(t)}function Hi(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Ki(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return g(M(n,function(o){return!o.merged}),function(o){return Y(o,["vs","i","barycenter","weight"])})}function Ki(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function zi(e,n){var r=vi(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),t=r.lhs,i=R(r.rhs,function(s){return-s.i}),o=[],a=0,u=0,f=0;t.sort(Ji(!!n)),f=De(o,i,f),c(t,function(s){f+=s.vs.length,o.push(s.vs),a+=s.barycenter*s.weight,u+=s.weight,f=De(o,i,f)});var d={vs:C(o)};return u&&(d.barycenter=a/u,d.weight=u),d}function De(e,n,r){for(var t;n.length&&(t=D(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ji(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function Nn(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,f={};a&&(i=M(i,function(v){return v!==a&&v!==u}));var d=qi(e,i);c(d,function(v){if(e.children(v.v).length){var w=Nn(e,v.v,r,t);f[v.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&Qi(v,w)}});var s=Xi(d,r);Zi(s,f);var l=zi(s,t);if(a&&(l.vs=C([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+p.order)/(l.weight+2),l.weight+=2}return l}function Zi(e,n){c(e,function(r){r.vs=C(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Qi(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function ea(e){var n=bn(e),r=Ye(e,L(1,n+1),"inEdges"),t=Ye(e,L(n-1,-1,-1),"outEdges"),i=Wi(e);Ve(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,f=0;f<4;++u,++f){na(u%2?r:t,u%4>=2),i=z(e);var d=Vi(e,i);da||u>n[f].lim));for(d=f,f=t;(f=e.parent(f))!==d;)o.push(f);return{path:i.concat(o.reverse()),lca:d}}function ia(e){var n={},r=0;function t(i){var o=r;c(e.children(i),t),n[i]={low:o,lim:r++}}return c(e.children(),t),n}function aa(e,n){var r={};function t(i,o){var a=0,u=0,f=i.length,d=D(o);return c(o,function(s,l){var h=ua(e,s),p=h?e.node(h).order:f;(h||s===d)&&(c(o.slice(u,l+1),function(v){c(e.predecessors(v),function(w){var _=e.node(w),me=_.order;(med)&&Cn(r,h,s)})})}function i(o,a){var u=-1,f,d=0;return c(a,function(s,l){if(e.node(s).dummy==="border"){var h=e.predecessors(s);h.length&&(f=e.node(h[0]).order,t(a,d,l,u,f),d=l,u=f)}t(a,d,a.length,f,o.length)}),a}return W(n,i),r}function ua(e,n){if(e.node(n).dummy)return le(e.predecessors(n),function(r){return e.node(r).dummy})}function Cn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function fa(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function da(e,n,r,t){var i={},o={},a={};return c(n,function(u){c(u,function(f,d){i[f]=f,o[f]=f,a[f]=d})}),c(n,function(u){var f=-1;c(u,function(d){var s=t(d);if(s.length){s=R(s,function(w){return a[w]});for(var l=(s.length-1)/2,h=Math.floor(l),p=Math.ceil(l);h<=p;++h){var v=s[h];o[d]===d&&f{var t=r(" buildLayoutGraph",()=>_a(e));r(" runLayout",()=>ya(t,r)),r(" updateInputGraph",()=>xa(e,t))})}function ya(e,n){n(" makeSpaceForEdgeLabels",()=>ka(e)),n(" removeSelfEdges",()=>Ga(e)),n(" acyclic",()=>fi(e)),n(" nestingGraph.run",()=>Si(e)),n(" rank",()=>Ai(pn(e))),n(" injectEdgeLabelProxies",()=>ja(e)),n(" removeEmptyRanks",()=>hi(e)),n(" nestingGraph.cleanup",()=>Bi(e)),n(" normalizeRanks",()=>li(e)),n(" assignRankMinMax",()=>Aa(e)),n(" removeEdgeLabelProxies",()=>Ma(e)),n(" normalize.run",()=>xi(e)),n(" parentDummyChains",()=>ra(e)),n(" addBorderSegments",()=>bi(e)),n(" order",()=>ea(e)),n(" insertSelfEdges",()=>Da(e)),n(" adjustCoordinateSystem",()=>wi(e)),n(" position",()=>ga(e)),n(" positionSelfEdges",()=>Ya(e)),n(" removeBorderNodes",()=>Ba(e)),n(" normalize.undo",()=>Ei(e)),n(" fixupEdgeLabelCoords",()=>$a(e)),n(" undoCoordinateSystem",()=>gi(e)),n(" translateGraph",()=>Ra(e)),n(" assignNodeIntersects",()=>Sa(e)),n(" reversePoints",()=>Fa(e)),n(" acyclic.undo",()=>si(e))}function xa(e,n){c(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),c(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Oa=["nodesep","edgesep","ranksep","marginx","marginy"],Ea={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ta=["acyclicer","ranker","rankdir","align"],Pa=["width","height"],La={width:0,height:0},Na=["minlen","weight","width","height","labeloffset"],Ca={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ia=["labelpos"];function _a(e){var n=new x({multigraph:!0,compound:!0}),r=ne(e.graph());return n.setGraph(ie({},Ea,ee(r,Oa),Y(r,Ta))),c(e.nodes(),function(t){var i=ne(e.node(t));n.setNode(t,_t(ee(i,Pa),La)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var i=ne(e.edge(t));n.setEdge(t,ie({},Ca,ee(i,Na),Y(i,Ia)))}),n}function ka(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function ja(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};I(e,"edge-proxy",o,"_ep")}})}function Aa(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=O(n,t.maxRank))}),e.graph().maxRank=n}function Ma(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Ra(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function f(d){var s=d.x,l=d.y,h=d.width,p=d.height;n=Math.min(n,s-h/2),r=Math.max(r,s+h/2),t=Math.min(t,l-p/2),i=Math.max(i,l+p/2)}c(e.nodes(),function(d){f(e.node(d))}),c(e.edges(),function(d){var s=e.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&f(s)}),n-=a,t-=u,c(e.nodes(),function(d){var s=e.node(d);s.x-=n,s.y-=t}),c(e.edges(),function(d){var s=e.edge(d);c(s.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Sa(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(Re(t,o)),r.points.push(Re(i,a))})}function $a(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Fa(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ba(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(D(r.borderLeft)),a=e.node(D(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Ga(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Da(e){var n=z(e);c(n,function(r){var t=0;c(r,function(i,o){var a=e.node(i);a.order=o+t,c(a.selfEdges,function(u){I(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Ya(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function ee(e,n){return K(Y(e,n),Number)}function ne(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Ua as l}; diff --git a/apps/pythinker-code/dist-web/assets/linear-Be-oTS5b.js b/apps/pythinker-code/dist-web/assets/linear-Dzo12Me2.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/linear-Be-oTS5b.js rename to apps/pythinker-code/dist-web/assets/linear-Dzo12Me2.js index d15b0383a..3623cf2a2 100644 --- a/apps/pythinker-code/dist-web/assets/linear-Be-oTS5b.js +++ b/apps/pythinker-code/dist-web/assets/linear-Dzo12Me2.js @@ -1 +1 @@ -import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-BusHtpbx.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; +import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-CwGP16Dm.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; diff --git a/apps/pythinker-code/dist-web/assets/liquid-OhilcA0U.js b/apps/pythinker-code/dist-web/assets/liquid-DaGOgzgc.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/liquid-OhilcA0U.js rename to apps/pythinker-code/dist-web/assets/liquid-DaGOgzgc.js index 61f7112e1..146217414 100644 --- a/apps/pythinker-code/dist-web/assets/liquid-OhilcA0U.js +++ b/apps/pythinker-code/dist-web/assets/liquid-DaGOgzgc.js @@ -1 +1 @@ -import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},l={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{r as conf,l as language}; +import{l as e}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},l={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{r as conf,l as language}; diff --git a/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-Dzr62Jjp.js b/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-CjNYtcpt.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/lspLanguageFeatures-Dzr62Jjp.js rename to apps/pythinker-code/dist-web/assets/lspLanguageFeatures-CjNYtcpt.js index e3acdc454..56fc9c906 100644 --- a/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-Dzr62Jjp.js +++ b/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-CjNYtcpt.js @@ -1,4 +1,4 @@ -import{R as Ge,l as x,e as w,U as Je,M as R}from"./editor.main-yCrGDkyO.js";var T;(function(e){function n(i){return typeof i=="string"}e.is=n})(T||(T={}));var O;(function(e){function n(i){return typeof i=="string"}e.is=n})(O||(O={}));var K;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(K||(K={}));var j;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(j||(j={}));var _;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=j.MAX_VALUE),t===Number.MAX_VALUE&&(t=j.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&o.uinteger(t.line)&&o.uinteger(t.character)}e.is=i})(_||(_={}));var h;(function(e){function n(r,t,a,u){if(o.uinteger(r)&&o.uinteger(t)&&o.uinteger(a)&&o.uinteger(u))return{start:_.create(r,t),end:_.create(a,u)};if(_.is(r)&&_.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${a}, ${u}]`)}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&_.is(t.start)&&_.is(t.end)}e.is=i})(h||(h={}));var N;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(o.string(t.uri)||o.undefined(t.uri))}e.is=i})(N||(N={}));var ee;(function(e){function n(r,t,a,u){return{targetUri:r,targetRange:t,targetSelectionRange:a,originSelectionRange:u}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.targetRange)&&o.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||o.undefined(t.originSelectionRange))}e.is=i})(ee||(ee={}));var S;(function(e){function n(r,t,a,u){return{red:r,green:t,blue:a,alpha:u}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.numberRange(t.red,0,1)&&o.numberRange(t.green,0,1)&&o.numberRange(t.blue,0,1)&&o.numberRange(t.alpha,0,1)}e.is=i})(S||(S={}));var te;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&h.is(t.range)&&S.is(t.color)}e.is=i})(te||(te={}));var ne;(function(e){function n(r,t,a){return{label:r,textEdit:t,additionalTextEdits:a}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.undefined(t.textEdit)||L.is(t))&&(o.undefined(t.additionalTextEdits)||o.typedArray(t.additionalTextEdits,L.is))}e.is=i})(ne||(ne={}));var M;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(M||(M={}));var re;(function(e){function n(r,t,a,u,s,f){const l={startLine:r,endLine:t};return o.defined(a)&&(l.startCharacter=a),o.defined(u)&&(l.endCharacter=u),o.defined(s)&&(l.kind=s),o.defined(f)&&(l.collapsedText=f),l}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.uinteger(t.startLine)&&o.uinteger(t.startLine)&&(o.undefined(t.startCharacter)||o.uinteger(t.startCharacter))&&(o.undefined(t.endCharacter)||o.uinteger(t.endCharacter))&&(o.undefined(t.kind)||o.string(t.kind))}e.is=i})(re||(re={}));var H;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&N.is(t.location)&&o.string(t.message)}e.is=i})(H||(H={}));var A;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(A||(A={}));var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||(ie={}));var ae;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&o.string(r.href)}e.is=n})(ae||(ae={}));var P;(function(e){function n(r,t,a,u,s,f){let l={range:r,message:t};return o.defined(a)&&(l.severity=a),o.defined(u)&&(l.code=u),o.defined(s)&&(l.source=s),o.defined(f)&&(l.relatedInformation=f),l}e.create=n;function i(r){var t;let a=r;return o.defined(a)&&h.is(a.range)&&o.string(a.message)&&(o.number(a.severity)||o.undefined(a.severity))&&(o.integer(a.code)||o.string(a.code)||o.undefined(a.code))&&(o.undefined(a.codeDescription)||o.string((t=a.codeDescription)===null||t===void 0?void 0:t.href))&&(o.string(a.source)||o.undefined(a.source))&&(o.undefined(a.relatedInformation)||o.typedArray(a.relatedInformation,H.is))}e.is=i})(P||(P={}));var E;(function(e){function n(r,t,...a){let u={title:r,command:t};return o.defined(a)&&a.length>0&&(u.arguments=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.title)&&o.string(t.command)}e.is=i})(E||(E={}));var L;(function(e){function n(a,u){return{range:a,newText:u}}e.replace=n;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const u=a;return o.objectLiteral(u)&&o.string(u.newText)&&h.is(u.range)}e.is=t})(L||(L={}));var W;(function(e){function n(r,t,a){const u={label:r};return t!==void 0&&(u.needsConfirmation=t),a!==void 0&&(u.description=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(o.string(t.description)||t.description===void 0)}e.is=i})(W||(W={}));var I;(function(e){function n(i){const r=i;return o.string(r)}e.is=n})(I||(I={}));var oe;(function(e){function n(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=n;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function t(a){const u=a;return L.is(u)&&(W.is(u.annotationId)||I.is(u.annotationId))}e.is=t})(oe||(oe={}));var X;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,a){let u={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&o.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(r,t,a,u){let s={kind:"rename",oldUri:r,newUri:t};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&o.string(t.oldUri)&&o.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(z||(z={}));var B;(function(e){function n(r,t,a){let u={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&o.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||o.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||o.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(B||(B={}));var q;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>o.string(t.kind)?$.is(t)||z.is(t)||B.is(t):X.is(t)))}e.is=n})(q||(q={}));var ue;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)}e.is=i})(ue||(ue={}));var se;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.integer(t.version)}e.is=i})(se||(se={}));var Q;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&(t.version===null||o.integer(t.version))}e.is=i})(Q||(Q={}));var ce;(function(e){function n(r,t,a,u){return{uri:r,languageId:t,version:a,text:u}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.string(t.languageId)&&o.integer(t.version)&&o.string(t.text)}e.is=i})(ce||(ce={}));var G;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(G||(G={}));var F;(function(e){function n(i){const r=i;return o.objectLiteral(i)&&G.is(r.kind)&&o.string(r.value)}e.is=n})(F||(F={}));var p;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(p||(p={}));var J;(function(e){e.PlainText=1,e.Snippet=2})(J||(J={}));var de;(function(e){e.Deprecated=1})(de||(de={}));var fe;(function(e){function n(r,t,a){return{newText:r,insert:t,replace:a}}e.create=n;function i(r){const t=r;return t&&o.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(fe||(fe={}));var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||(le={}));var ge;(function(e){function n(i){const r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=n})(ge||(ge={}));var he;(function(e){function n(i){return{label:i}}e.create=n})(he||(he={}));var pe;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(pe||(pe={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return o.string(t)||o.objectLiteral(t)&&o.string(t.language)&&o.string(t.value)}e.is=i})(y||(y={}));var me;(function(e){function n(i){let r=i;return!!r&&o.objectLiteral(r)&&(F.is(r.contents)||y.is(r.contents)||o.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(me||(me={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var be;(function(e){function n(i,r,...t){let a={label:i};return o.defined(r)&&(a.documentation=r),o.defined(t)?a.parameters=t:a.parameters=[],a}e.create=n})(be||(be={}));var D;(function(e){e.Text=1,e.Read=2,e.Write=3})(D||(D={}));var _e;(function(e){function n(i,r){let t={range:i};return o.number(r)&&(t.kind=r),t}e.create=n})(_e||(_e={}));var m;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(m||(m={}));var xe;(function(e){e.Deprecated=1})(xe||(xe={}));var we;(function(e){function n(i,r,t,a,u){let s={name:i,kind:r,location:{uri:a,range:t}};return u&&(s.containerName=u),s}e.create=n})(we||(we={}));var ke;(function(e){function n(i,r,t,a){return a!==void 0?{name:i,kind:r,location:{uri:t,range:a}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(ke||(ke={}));var Ae;(function(e){function n(r,t,a,u,s,f){let l={name:r,detail:t,kind:a,range:u,selectionRange:s};return f!==void 0&&(l.children=f),l}e.create=n;function i(r){let t=r;return t&&o.string(t.name)&&o.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||o.string(t.detail))&&(t.deprecated===void 0||o.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Ae||(Ae={}));var Ee;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Ee||(Ee={}));var V;(function(e){e.Invoked=1,e.Automatic=2})(V||(V={}));var Le;(function(e){function n(r,t,a){let u={diagnostics:r};return t!=null&&(u.only=t),a!=null&&(u.triggerKind=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.typedArray(t.diagnostics,P.is)&&(t.only===void 0||o.typedArray(t.only,o.string))&&(t.triggerKind===void 0||t.triggerKind===V.Invoked||t.triggerKind===V.Automatic)}e.is=i})(Le||(Le={}));var Ie;(function(e){function n(r,t,a){let u={title:r},s=!0;return typeof t=="string"?(s=!1,u.kind=t):E.is(t)?u.command=t:u.edit=t,s&&a!==void 0&&(u.kind=a),u}e.create=n;function i(r){let t=r;return t&&o.string(t.title)&&(t.diagnostics===void 0||o.typedArray(t.diagnostics,P.is))&&(t.kind===void 0||o.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||E.is(t.command))&&(t.isPreferred===void 0||o.boolean(t.isPreferred))&&(t.edit===void 0||q.is(t.edit))}e.is=i})(Ie||(Ie={}));var Re;(function(e){function n(r,t){let a={range:r};return o.defined(t)&&(a.data=t),a}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.command)||E.is(t.command))}e.is=i})(Re||(Re={}));var Me;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.uinteger(t.tabSize)&&o.boolean(t.insertSpaces)}e.is=i})(Me||(Me={}));var De;(function(e){function n(r,t,a){return{range:r,target:t,data:a}}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.target)||o.string(t.target))}e.is=i})(De||(De={}));var Fe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Fe||(Fe={}));var Ce;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Ce||(Ce={}));var je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(je||(je={}));var Ne;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ne||(Ne={}));var Pe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.string(t.text)}e.is=i})(Pe||(Pe={}));var ye;(function(e){function n(r,t,a){return{range:r,variableName:t,caseSensitiveLookup:a}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.boolean(t.caseSensitiveLookup)&&(o.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var Ve;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(o.string(t.expression)||t.expression===void 0)}e.is=i})(Ve||(Ve={}));var Ue;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return o.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ue||(Ue={}));var Y;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(Y||(Y={}));var Z;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.location===void 0||N.is(t.location))&&(t.command===void 0||E.is(t.command))}e.is=i})(Z||(Z={}));var Oe;(function(e){function n(r,t,a){const u={position:r,label:t};return a!==void 0&&(u.kind=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&_.is(t.position)&&(o.string(t.label)||o.typedArray(t.label,Z.is))&&(t.kind===void 0||Y.is(t.kind))&&t.textEdits===void 0||o.typedArray(t.textEdits,L.is)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.paddingLeft===void 0||o.boolean(t.paddingLeft))&&(t.paddingRight===void 0||o.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var He;(function(e){function n(i,r,t,a){return{insertText:i,filterText:r,range:t,command:a}}e.create=n})(He||(He={}));var We;(function(e){function n(i){return{items:i}}e.create=n})(We||(We={}));var Xe;(function(e){e.Invoked=0,e.Automatic=1})(Xe||(Xe={}));var $e;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})($e||($e={}));var ze;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(ze||(ze={}));var Be;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&O.is(r.uri)&&o.string(r.name)}e.is=n})(Be||(Be={}));var qe;(function(e){function n(a,u,s,f){return new nt(a,u,s,f)}e.create=n;function i(a){let u=a;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}e.is=i;function r(a,u){let s=a.getText(),f=t(u,(d,g)=>{let b=d.range.start.line-g.range.start.line;return b===0?d.range.start.character-g.range.start.character:b}),l=s.length;for(let d=f.length-1;d>=0;d--){let g=f[d],b=a.offsetAt(g.range.start),c=a.offsetAt(g.range.end);if(c<=l)s=s.substring(0,b)+g.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}e.applyEdits=r;function t(a,u){if(a.length<=1)return a;const s=a.length/2|0,f=a.slice(0,s),l=a.slice(s);t(f,u),t(l,u);let d=0,g=0,b=0;for(;d0&&(u.arguments=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.title)&&o.string(t.command)}e.is=i})(E||(E={}));var L;(function(e){function n(a,u){return{range:a,newText:u}}e.replace=n;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const u=a;return o.objectLiteral(u)&&o.string(u.newText)&&h.is(u.range)}e.is=t})(L||(L={}));var W;(function(e){function n(r,t,a){const u={label:r};return t!==void 0&&(u.needsConfirmation=t),a!==void 0&&(u.description=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(o.string(t.description)||t.description===void 0)}e.is=i})(W||(W={}));var I;(function(e){function n(i){const r=i;return o.string(r)}e.is=n})(I||(I={}));var oe;(function(e){function n(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=n;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function t(a){const u=a;return L.is(u)&&(W.is(u.annotationId)||I.is(u.annotationId))}e.is=t})(oe||(oe={}));var X;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,a){let u={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&o.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(r,t,a,u){let s={kind:"rename",oldUri:r,newUri:t};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&o.string(t.oldUri)&&o.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(z||(z={}));var B;(function(e){function n(r,t,a){let u={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&o.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||o.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||o.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(B||(B={}));var q;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>o.string(t.kind)?$.is(t)||z.is(t)||B.is(t):X.is(t)))}e.is=n})(q||(q={}));var ue;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)}e.is=i})(ue||(ue={}));var se;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.integer(t.version)}e.is=i})(se||(se={}));var Q;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&(t.version===null||o.integer(t.version))}e.is=i})(Q||(Q={}));var ce;(function(e){function n(r,t,a,u){return{uri:r,languageId:t,version:a,text:u}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.string(t.languageId)&&o.integer(t.version)&&o.string(t.text)}e.is=i})(ce||(ce={}));var G;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(G||(G={}));var F;(function(e){function n(i){const r=i;return o.objectLiteral(i)&&G.is(r.kind)&&o.string(r.value)}e.is=n})(F||(F={}));var p;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(p||(p={}));var J;(function(e){e.PlainText=1,e.Snippet=2})(J||(J={}));var de;(function(e){e.Deprecated=1})(de||(de={}));var fe;(function(e){function n(r,t,a){return{newText:r,insert:t,replace:a}}e.create=n;function i(r){const t=r;return t&&o.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(fe||(fe={}));var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||(le={}));var ge;(function(e){function n(i){const r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=n})(ge||(ge={}));var he;(function(e){function n(i){return{label:i}}e.create=n})(he||(he={}));var pe;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(pe||(pe={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return o.string(t)||o.objectLiteral(t)&&o.string(t.language)&&o.string(t.value)}e.is=i})(y||(y={}));var me;(function(e){function n(i){let r=i;return!!r&&o.objectLiteral(r)&&(F.is(r.contents)||y.is(r.contents)||o.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(me||(me={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var be;(function(e){function n(i,r,...t){let a={label:i};return o.defined(r)&&(a.documentation=r),o.defined(t)?a.parameters=t:a.parameters=[],a}e.create=n})(be||(be={}));var D;(function(e){e.Text=1,e.Read=2,e.Write=3})(D||(D={}));var _e;(function(e){function n(i,r){let t={range:i};return o.number(r)&&(t.kind=r),t}e.create=n})(_e||(_e={}));var m;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(m||(m={}));var xe;(function(e){e.Deprecated=1})(xe||(xe={}));var we;(function(e){function n(i,r,t,a,u){let s={name:i,kind:r,location:{uri:a,range:t}};return u&&(s.containerName=u),s}e.create=n})(we||(we={}));var ke;(function(e){function n(i,r,t,a){return a!==void 0?{name:i,kind:r,location:{uri:t,range:a}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(ke||(ke={}));var Ae;(function(e){function n(r,t,a,u,s,f){let l={name:r,detail:t,kind:a,range:u,selectionRange:s};return f!==void 0&&(l.children=f),l}e.create=n;function i(r){let t=r;return t&&o.string(t.name)&&o.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||o.string(t.detail))&&(t.deprecated===void 0||o.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Ae||(Ae={}));var Ee;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Ee||(Ee={}));var V;(function(e){e.Invoked=1,e.Automatic=2})(V||(V={}));var Le;(function(e){function n(r,t,a){let u={diagnostics:r};return t!=null&&(u.only=t),a!=null&&(u.triggerKind=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.typedArray(t.diagnostics,P.is)&&(t.only===void 0||o.typedArray(t.only,o.string))&&(t.triggerKind===void 0||t.triggerKind===V.Invoked||t.triggerKind===V.Automatic)}e.is=i})(Le||(Le={}));var Ie;(function(e){function n(r,t,a){let u={title:r},s=!0;return typeof t=="string"?(s=!1,u.kind=t):E.is(t)?u.command=t:u.edit=t,s&&a!==void 0&&(u.kind=a),u}e.create=n;function i(r){let t=r;return t&&o.string(t.title)&&(t.diagnostics===void 0||o.typedArray(t.diagnostics,P.is))&&(t.kind===void 0||o.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||E.is(t.command))&&(t.isPreferred===void 0||o.boolean(t.isPreferred))&&(t.edit===void 0||q.is(t.edit))}e.is=i})(Ie||(Ie={}));var Re;(function(e){function n(r,t){let a={range:r};return o.defined(t)&&(a.data=t),a}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.command)||E.is(t.command))}e.is=i})(Re||(Re={}));var Me;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.uinteger(t.tabSize)&&o.boolean(t.insertSpaces)}e.is=i})(Me||(Me={}));var De;(function(e){function n(r,t,a){return{range:r,target:t,data:a}}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.target)||o.string(t.target))}e.is=i})(De||(De={}));var Fe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Fe||(Fe={}));var Ce;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Ce||(Ce={}));var je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(je||(je={}));var Ne;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ne||(Ne={}));var Pe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.string(t.text)}e.is=i})(Pe||(Pe={}));var ye;(function(e){function n(r,t,a){return{range:r,variableName:t,caseSensitiveLookup:a}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.boolean(t.caseSensitiveLookup)&&(o.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var Ve;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(o.string(t.expression)||t.expression===void 0)}e.is=i})(Ve||(Ve={}));var Ue;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return o.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ue||(Ue={}));var Y;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(Y||(Y={}));var Z;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.location===void 0||N.is(t.location))&&(t.command===void 0||E.is(t.command))}e.is=i})(Z||(Z={}));var Oe;(function(e){function n(r,t,a){const u={position:r,label:t};return a!==void 0&&(u.kind=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&_.is(t.position)&&(o.string(t.label)||o.typedArray(t.label,Z.is))&&(t.kind===void 0||Y.is(t.kind))&&t.textEdits===void 0||o.typedArray(t.textEdits,L.is)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.paddingLeft===void 0||o.boolean(t.paddingLeft))&&(t.paddingRight===void 0||o.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var He;(function(e){function n(i,r,t,a){return{insertText:i,filterText:r,range:t,command:a}}e.create=n})(He||(He={}));var We;(function(e){function n(i){return{items:i}}e.create=n})(We||(We={}));var Xe;(function(e){e.Invoked=0,e.Automatic=1})(Xe||(Xe={}));var $e;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})($e||($e={}));var ze;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(ze||(ze={}));var Be;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&O.is(r.uri)&&o.string(r.name)}e.is=n})(Be||(Be={}));var qe;(function(e){function n(a,u,s,f){return new nt(a,u,s,f)}e.create=n;function i(a){let u=a;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}e.is=i;function r(a,u){let s=a.getText(),f=t(u,(d,g)=>{let b=d.range.start.line-g.range.start.line;return b===0?d.range.start.character-g.range.start.character:b}),l=s.length;for(let d=f.length-1;d>=0;d--){let g=f[d],b=a.offsetAt(g.range.start),c=a.offsetAt(g.range.end);if(c<=l)s=s.substring(0,b)+g.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}e.applyEdits=r;function t(a,u){if(a.length<=1)return a;const s=a.length/2|0,f=a.slice(0,s),l=a.slice(s);t(f,u),t(l,u);let d=0,g=0,b=0;for(;d0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets}positionAt(n){n=Math.max(Math.min(n,this._content.length),0);let i=this.getLineOffsets(),r=0,t=i.length;if(t===0)return _.create(0,n);for(;rn?t=u:r=u+1}let a=r-1;return _.create(a,n-i[a])}offsetAt(n){let i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;let r=i[n.line],t=n.line+1"u"}e.undefined=r;function t(c){return c===!0||c===!1}e.boolean=t;function a(c){return n.call(c)==="[object String]"}e.string=a;function u(c){return n.call(c)==="[object Number]"}e.number=u;function s(c,U,tt){return n.call(c)==="[object Number]"&&U<=c&&c<=tt}e.numberRange=s;function f(c){return n.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}e.integer=f;function l(c){return n.call(c)==="[object Number]"&&0<=c&&c<=2147483647}e.uinteger=l;function d(c){return n.call(c)==="[object Function]"}e.func=d;function g(c){return c!==null&&typeof c=="object"}e.objectLiteral=g;function b(c,U){return Array.isArray(c)&&c.every(U)}e.typedArray=b})(o||(o={}));class pt{constructor(n,i,r){this._languageId=n,this._worker=i,this._disposables=[],this._listener=Object.create(null);const t=u=>{let s=u.getLanguageId();if(s!==this._languageId)return;let f;this._listener[u.uri.toString()]=u.onDidChangeContent(()=>{window.clearTimeout(f),f=window.setTimeout(()=>this._doValidate(u.uri,s),500)}),this._doValidate(u.uri,s)},a=u=>{w.setModelMarkers(u,this._languageId,[]);let s=u.uri.toString(),f=this._listener[s];f&&(f.dispose(),delete this._listener[s])};this._disposables.push(w.onDidCreateModel(t)),this._disposables.push(w.onWillDisposeModel(a)),this._disposables.push(w.onDidChangeModelLanguage(u=>{a(u.model),t(u.model)})),this._disposables.push(r(u=>{w.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(a(s),t(s))})})),this._disposables.push({dispose:()=>{w.getModels().forEach(a);for(let u in this._listener)this._listener[u].dispose()}}),w.getModels().forEach(t)}dispose(){this._disposables.forEach(n=>n&&n.dispose()),this._disposables.length=0}_doValidate(n,i){this._worker(n).then(r=>r.doValidation(n.toString())).then(r=>{const t=r.map(u=>it(n,u));let a=w.getModel(n);a&&a.getLanguageId()===i&&w.setModelMarkers(a,i,t)}).then(void 0,r=>{console.error(r)})}}function rt(e){switch(e){case A.Error:return R.Error;case A.Warning:return R.Warning;case A.Information:return R.Info;case A.Hint:return R.Hint;default:return R.Info}}function it(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:rt(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}class mt{constructor(n,i){this._worker=n,this._triggerCharacters=i}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doComplete(a.toString(),k(i))).then(u=>{if(!u)return;const s=n.getWordUntilPosition(i),f=new Ge(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=u.items.map(d=>{const g={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:ut(d.command),range:f,kind:ot(d.kind)};return d.textEdit&&(at(d.textEdit)?g.range={insert:v(d.textEdit.insert),replace:v(d.textEdit.replace)}:g.range=v(d.textEdit.range),g.insertText=d.textEdit.newText),d.additionalTextEdits&&(g.additionalTextEdits=d.additionalTextEdits.map(C)),d.insertTextFormat===J.Snippet&&(g.insertTextRules=x.CompletionItemInsertTextRule.InsertAsSnippet),g});return{isIncomplete:u.isIncomplete,suggestions:l}})}}function k(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function Ye(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function v(e){if(e)return new Ge(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function at(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function ot(e){const n=x.CompletionItemKind;switch(e){case p.Text:return n.Text;case p.Method:return n.Method;case p.Function:return n.Function;case p.Constructor:return n.Constructor;case p.Field:return n.Field;case p.Variable:return n.Variable;case p.Class:return n.Class;case p.Interface:return n.Interface;case p.Module:return n.Module;case p.Property:return n.Property;case p.Unit:return n.Unit;case p.Value:return n.Value;case p.Enum:return n.Enum;case p.Keyword:return n.Keyword;case p.Snippet:return n.Snippet;case p.Color:return n.Color;case p.File:return n.File;case p.Reference:return n.Reference}return n.Property}function C(e){if(e)return{range:v(e.range),text:e.newText}}function ut(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}class vt{constructor(n){this._worker=n}provideHover(n,i,r){let t=n.uri;return this._worker(t).then(a=>a.doHover(t.toString(),k(i))).then(a=>{if(a)return{range:v(a.range),contents:ct(a.contents)}})}}function st(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Qe(e){return typeof e=="string"?{value:e}:st(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function ct(e){if(e)return Array.isArray(e)?e.map(Qe):[Qe(e)]}class bt{constructor(n){this._worker=n}provideDocumentHighlights(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDocumentHighlights(t.toString(),k(i))).then(a=>{if(a)return a.map(u=>({range:v(u.range),kind:dt(u.kind)}))})}}function dt(e){switch(e){case D.Read:return x.DocumentHighlightKind.Read;case D.Write:return x.DocumentHighlightKind.Write;case D.Text:return x.DocumentHighlightKind.Text}return x.DocumentHighlightKind.Text}class _t{constructor(n){this._worker=n}provideDefinition(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDefinition(t.toString(),k(i))).then(a=>{if(a)return[Ze(a)]})}}function Ze(e){return{uri:Je.parse(e.uri),range:v(e.range)}}class xt{constructor(n){this._worker=n}provideReferences(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.findReferences(a.toString(),k(i))).then(u=>{if(u)return u.map(Ze)})}}class wt{constructor(n){this._worker=n}provideRenameEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doRename(a.toString(),k(i),r)).then(u=>ft(u))}}function ft(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=Je.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:v(t.range),text:t.newText}})}return{edits:n}}class kt{constructor(n){this._worker=n}provideDocumentSymbols(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentSymbols(r.toString())).then(t=>{if(t)return t.map(a=>lt(a)?Te(a):{name:a.name,detail:"",containerName:a.containerName,kind:Ke(a.kind),range:v(a.location.range),selectionRange:v(a.location.range),tags:[]})})}}function lt(e){return"children"in e}function Te(e){return{name:e.name,detail:e.detail??"",kind:Ke(e.kind),range:v(e.range),selectionRange:v(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(n=>Te(n))}}function Ke(e){let n=x.SymbolKind;switch(e){case m.File:return n.File;case m.Module:return n.Module;case m.Namespace:return n.Namespace;case m.Package:return n.Package;case m.Class:return n.Class;case m.Method:return n.Method;case m.Property:return n.Property;case m.Field:return n.Field;case m.Constructor:return n.Constructor;case m.Enum:return n.Enum;case m.Interface:return n.Interface;case m.Function:return n.Function;case m.Variable:return n.Variable;case m.Constant:return n.Constant;case m.String:return n.String;case m.Number:return n.Number;case m.Boolean:return n.Boolean;case m.Array:return n.Array}return n.Function}class At{constructor(n){this._worker=n}provideLinks(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentLinks(r.toString())).then(t=>{if(t)return{links:t.map(a=>({range:v(a.range),url:a.target}))}})}}class Et{constructor(n){this._worker=n}provideDocumentFormattingEdits(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.format(t.toString(),null,et(i)).then(u=>{if(!(!u||u.length===0))return u.map(C)}))}}class Lt{constructor(n){this._worker=n,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.format(a.toString(),Ye(i),et(r)).then(s=>{if(!(!s||s.length===0))return s.map(C)}))}}function et(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}class It{constructor(n){this._worker=n}provideDocumentColors(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentColors(r.toString())).then(t=>{if(t)return t.map(a=>({color:a.color,range:v(a.range)}))})}provideColorPresentations(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getColorPresentations(t.toString(),i.color,Ye(i.range))).then(a=>{if(a)return a.map(u=>{let s={label:u.label};return u.textEdit&&(s.textEdit=C(u.textEdit)),u.additionalTextEdits&&(s.additionalTextEdits=u.additionalTextEdits.map(C)),s})})}}class Rt{constructor(n){this._worker=n}provideFoldingRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getFoldingRanges(t.toString(),i)).then(a=>{if(a)return a.map(u=>{const s={start:u.startLine+1,end:u.endLine+1};return typeof u.kind<"u"&&(s.kind=gt(u.kind)),s})})}}function gt(e){switch(e){case M.Comment:return x.FoldingRangeKind.Comment;case M.Imports:return x.FoldingRangeKind.Imports;case M.Region:return x.FoldingRangeKind.Region}}class Mt{constructor(n){this._worker=n}provideSelectionRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getSelectionRanges(t.toString(),i.map(k))).then(a=>{if(a)return a.map(u=>{const s=[];for(;u;)s.push({range:v(u.range)}),u=u.parent;return s})})}}export{mt as C,bt as D,Rt as F,vt as H,xt as R,Mt as S,_t as a,kt as b,wt as c,It as d,pt as e,Et as f,Lt as g,At as h,k as i,Ye as j,C as k,v as t}; diff --git a/apps/pythinker-code/dist-web/assets/mdx-BNW26XnD.js b/apps/pythinker-code/dist-web/assets/mdx-DmjCAV2z.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/mdx-BNW26XnD.js rename to apps/pythinker-code/dist-web/assets/mdx-DmjCAV2z.js index f746cefc6..d7782bd5c 100644 --- a/apps/pythinker-code/dist-web/assets/mdx-BNW26XnD.js +++ b/apps/pythinker-code/dist-web/assets/mdx-DmjCAV2z.js @@ -1 +1 @@ -import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const r={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(n,t)=>({beforeText:new RegExp(`^${t}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${t+1}. `}}))]},d={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};export{r as conf,d as language}; +import{l as e}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const r={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(n,t)=>({beforeText:new RegExp(`^${t}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${t+1}. `}}))]},d={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};export{r as conf,d as language}; diff --git a/apps/pythinker-code/dist-web/assets/mermaid.core-BusHtpbx.js b/apps/pythinker-code/dist-web/assets/mermaid.core-CwGP16Dm.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/mermaid.core-BusHtpbx.js rename to apps/pythinker-code/dist-web/assets/mermaid.core-CwGP16Dm.js index e611c8098..e26fe4d82 100644 --- a/apps/pythinker-code/dist-web/assets/mermaid.core-BusHtpbx.js +++ b/apps/pythinker-code/dist-web/assets/mermaid.core-CwGP16Dm.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-CSVjY38-.js","assets/index-BZ9wqq8Z.js","assets/index-CgbqiNuj.css","assets/purify.es-5AjVNlXF.js","assets/dagre-3AP2YEHR-DNRBAAmc.js","assets/layout-CRsCkvth.js","assets/swimlanes-XN3QIQJK-D3OEEV8W.js","assets/cose-bilkent-JH36ORCC-Du_KHUbL.js","assets/cytoscape.esm-CNiYdHpY.js","assets/c4Diagram-UCG6FXSJ-BZuC3xtH.js","assets/chunk-F27PBJKO-CGsciVEq.js","assets/flowDiagram-A5DVABFB-D6_Z_lfU.js","assets/chunk-5VM5RSS4-BX7DTcSO.js","assets/chunk-XXDRQBXY-DaNzL58C.js","assets/chunk-POPQ4Y6H-BpzExJjb.js","assets/channel-DZ2XEbLN.js","assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js","assets/erDiagram-SSCWMZ5O-DzkblHwz.js","assets/gitGraphDiagram-WWUBYQGX-t2_RmnTi.js","assets/chunk-2Q5K7J3B-CPFb-YMA.js","assets/chunk-JWPE2WC7-D9ICAwD_.js","assets/cynefin-OW5HDTMX-BlED4Rd3.js","assets/ganttDiagram-EL5Y4UJY-DcpRnqwp.js","assets/linear-Be-oTS5b.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-RXCK75RN-Cn4b9A5u.js","assets/pieDiagram-E7YTZNPT-CSu4VKw9.js","assets/arc-B8osaoVd.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js","assets/xychartDiagram-S5SC5T6Z-Dqif0X1Z.js","assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js","assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js","assets/classDiagram-DTDB5LWJ-D8QxhnwF.js","assets/chunk-LCL6LL3I-Bvdjn-Qn.js","assets/classDiagram-v2-JRS7N3AN-D8QxhnwF.js","assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js","assets/chunk-G27WJ6UU-CIn6rVI9.js","assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js","assets/journeyDiagram-EYS64GPL-Bznj053h.js","assets/timeline-definition-24CTP7MA-S237vnu4.js","assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js","assets/kanban-definition-3QL26DDD-gEE7iVwG.js","assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js","assets/diagram-Z3DM3KII-DnTJZ40O.js","assets/diagram-UQ7AKVKN-DqI3S6m6.js","assets/blockDiagram-NRAW4CY4-BNGA-QWb.js","assets/diagram-S7CK7UJ4-95PLVM0c.js","assets/architectureDiagram-5GKGNRK7-BvF0UgoH.js","assets/diagram-VSXAHHWV-Cps0EaEU.js","assets/ishikawaDiagram-5VMMS53U-CZhPeyom.js","assets/vennDiagram-4TSXK5OY-BElDUyH9.js","assets/diagram-VX7I27RA-TJJN2czJ.js","assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js","assets/cynefinDiagram-5FMLGOSQ-BfZ2WMeD.js","assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js","assets/chunk-SVP7TREG-D3M7Gbkt.js","assets/ebnfDiagram-PWID7BFC-CG3VCHMu.js","assets/abnfDiagram-VCTEODGH-DEfrkFuI.js","assets/pegDiagram-XKGWAZYB-COpW3oto.js"])))=>i.map(i=>d[i]); -import{bR as _t}from"./index-BZ9wqq8Z.js";import{p as Hr}from"./purify.es-5AjVNlXF.js";var cd=Object.defineProperty,g=(e,t)=>cd(e,"name",{value:t,configurable:!0}),Qy=(e,t)=>{for(var r in t)cd(e,r,{get:t[r],enumerable:!0})};function an(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ps={exports:{}},Jy=ps.exports,Dl;function tm(){return Dl||(Dl=1,(function(e,t){(function(r,i){e.exports=i()})(Jy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",u="quarter",f="year",y="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var O=["th","st","nd","rd"],v=E%100;return"["+E+(O[(v-20)%10]||O[v]||O[0])+"]"}},S=function(E,O,v){var R=String(E);return!R||R.length>=O?E:""+Array(O+1-R.length).join(v)+E},T={s:S,z:function(E){var O=-E.utcOffset(),v=Math.abs(O),R=Math.floor(v/60),$=v%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S($,2,"0")},m:function E(O,v){if(O.date()1)return E(Z[0])}else{var ut=O.name;L[ut]=O,$=ut}return!R&&$&&(_=$),$||!R&&_},z=function(E,O){if(B(E))return E.clone();var v=typeof O=="object"?O:{};return v.date=E,v.args=arguments,new et(v)},I=T;I.l=X,I.i=B,I.w=function(E,O){return z(E,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var et=(function(){function E(v){this.$L=X(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[M]=!0}var O=E.prototype;return O.parse=function(v){this.$d=(function(R){var $=R.date,J=R.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Z=$.match(x);if(Z){var ut=Z[2]-1||0,Ct=(Z[7]||"0").substring(0,3);return J?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)}}return new Date($)})(v),this.init()},O.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},O.$utils=function(){return I},O.isValid=function(){return this.$d.toString()!==m},O.isSame=function(v,R){var $=z(v);return this.startOf(R)<=$&&$<=this.endOf(R)},O.isAfter=function(v,R){return z(v){},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},nn=g(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Pe.fatal&&(P.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Pe.error&&(P.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Pe.warn&&(P.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Pe.info&&(P.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Pe.debug&&(P.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Pe.trace&&(P.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=g(e=>`%c${rm().format("ss.SSS")} : ${e} : `,"format");const ys={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return ys.hue2rgb(o,s,e+1/3)*255;case"g":return ys.hue2rgb(o,s,e)*255;case"b":return ys.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},sm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},bt={channel:ys,lang:im,unit:sm},Ze={};for(let e=0;e<=255;e++)Ze[e]=bt.unit.dec2hex(e);const Xt={ALL:0,RGB:1,HSL:2};let om=class{constructor(){this.type=Xt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Xt.ALL}is(t){return this.type===t}};class am{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new om}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=bt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=bt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=bt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=bt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=bt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=bt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const eo=new am({r:0,g:0,b:0,a:0},"transparent"),qr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(qr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return eo.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(s*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return bt.channel.clamp.h(parseFloat(r)*.9);case"rad":return bt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return bt.channel.clamp.h(parseFloat(r)*360)}}return bt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(cr.re);if(!r)return;const[,i,s,o,a,n]=r;return eo.set({h:cr._hue2deg(i),s:bt.channel.clamp.s(parseFloat(s)),l:bt.channel.clamp.l(parseFloat(o)),a:a?bt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%, ${s})`:`hsl(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%)`}},Li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Li.colors[e];if(t)return qr.parse(t)},stringify:e=>{const t=qr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},xi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(xi.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return eo.set({r:bt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:bt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:bt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?bt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)}, ${bt.lang.round(s)})`:`rgb(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)})`}},Fe={format:{keyword:Li,hex:qr,rgb:xi,rgba:xi,hsl:cr,hsla:cr},parse:e=>{if(typeof e!="string")return e;const t=qr.parse(e)||xi.parse(e)||cr.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xt.HSL)||e.data.r===void 0?cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?xi.stringify(e):qr.stringify(e)},dd=(e,t)=>{const r=Fe.parse(e);for(const i in t)r[i]=bt.channel.clamp[i](t[i]);return Fe.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return dd(e,{a:t});const s=eo.set({r:bt.channel.clamp.r(e),g:bt.channel.clamp.g(t),b:bt.channel.clamp.b(r),a:bt.channel.clamp.a(i)});return Fe.stringify(s)},nm=e=>{const{r:t,g:r,b:i}=Fe.parse(e),s=.2126*bt.channel.toLinear(t)+.7152*bt.channel.toLinear(r)+.0722*bt.channel.toLinear(i);return bt.lang.round(s)},lm=e=>nm(e)>=.5,xe=e=>!lm(e),ud=(e,t,r)=>{const i=Fe.parse(e),s=i[t],o=bt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Fe.stringify(i)},q=(e,t)=>ud(e,"l",t),N=(e,t)=>ud(e,"l",-t),b=(e,t)=>{const r=Fe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return dd(e,i)},hm=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Fe.parse(e),{r:n,g:l,b:c,a:h}=Fe.parse(t),d=r/100,u=d*2-1,f=a-h,m=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,x=1-m,C=i*m+n*x,k=s*m+l*x,S=o*m+c*x,T=a*d+h*(1-d);return tr(C,k,S,T)},F=(e,t=100)=>{const r=Fe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,hm(r,e,t)};var ma=g((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ma(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=ma(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Yt=ma,Ae="#ffffff",Ee="#f2f2f2",mt=g((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),cm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},dm=g(e=>{const t=new cm;return t.calculate(e),t},"getThemeVariables"),um=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=tr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=q(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=q(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=q(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},fm=g(e=>{const t=new um;return t.calculate(e),t},"getThemeVariables"),gm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=tr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},pm=g(e=>{const t=new gm;return t.calculate(e),t},"getThemeVariables"),ym=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=q("#cde498",10),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=N(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},mm=g(e=>{const t=new ym;return t.calculate(e),t},"getThemeVariables"),xm=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Cm=g(e=>{const t=new xm;return t.calculate(e),t},"getThemeVariables"),bm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||b(e,{h:30}),this.cScale4=this.cScale4||b(e,{h:60}),this.cScale5=this.cScale5||b(e,{h:90}),this.cScale6=this.cScale6||b(e,{h:120}),this.cScale7=this.cScale7||b(e,{h:150}),this.cScale8=this.cScale8||b(e,{h:210,l:150}),this.cScale9=this.cScale9||b(e,{h:270}),this.cScale10=this.cScale10||b(e,{h:300}),this.cScale11=this.cScale11||b(e,{h:330}),this.darkMode)for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},km=g(e=>{const t=new bm;return t.calculate(e),t},"getThemeVariables"),wm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Sm=g(e=>{const t=new wm;return t.calculate(e),t},"getThemeVariables"),Tm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},_m=g(e=>{const t=new Tm;return t.calculate(e),t},"getThemeVariables"),vm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Bm=g(e=>{const t=new vm;return t.calculate(e),t},"getThemeVariables"),Lm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Fm=g(e=>{const t=new Lm;return t.calculate(e),t},"getThemeVariables"),Mm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Am=g(e=>{const t=new Mm;return t.calculate(e),t},"getThemeVariables"),We={base:{getThemeVariables:dm},dark:{getThemeVariables:fm},default:{getThemeVariables:pm},forest:{getThemeVariables:mm},neutral:{getThemeVariables:Cm},neo:{getThemeVariables:km},"neo-dark":{getThemeVariables:Sm},redux:{getThemeVariables:_m},"redux-dark":{getThemeVariables:Bm},"redux-color":{getThemeVariables:Fm},"redux-dark-color":{getThemeVariables:Am}},jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},fd={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:We.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},eventmodeling:{...jt.eventmodeling},treeView:{...jt.treeView,useWidth:void 0},radar:{...jt.radar},railroad:{...jt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...jt.ishikawa},sankey:{...jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...jt.venn},cynefin:{...jt.cynefin}},gd=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...gd(e[i],"")]:[...r,t+i],[]),"keyify"),Em=new Set(gd(fd,"")),pd=fd,$m={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Om=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(P.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ls=g(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ls(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Em.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=$m[t];i?Om(e[t],i):(P.debug("sanitizing object",t),Ls(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=yd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),yd=g(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),re=Yt({},Yr),Fs,gr=[],Fi=Yt({},Yr),Ui=g((e,t)=>{let r=Yt({},e),i={};for(const s of t)Cd(s),i=Yt(i,s);if(r=Yt(r,i),i.theme&&i.theme in We){const s=Yt({},Fs),o=Yt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in We&&(r.themeVariables=We[r.theme].getThemeVariables(o))}return Fi=r,Nm(Fi),Fi},"updateCurrentConfig"),Dm=g(e=>(re=Yt({},Yr),re=Yt(re,e),e.theme&&We[e.theme]&&(re.themeVariables=We[e.theme].getThemeVariables(e.themeVariables)),Ui(re,gr),re),"setSiteConfig"),Pm=g(e=>{Fs=Yt({},e)},"saveConfigFromInitialize"),Im=g(e=>(re=Yt(re,e),Ui(re,gr),re),"updateSiteConfig"),md=g(()=>Yt({},re),"getSiteConfig"),xd=g(e=>(Ui(Fi,[e]),Rt()),"setConfig"),Rt=g(()=>Yt({},Fi),"getConfig"),Cd=g(e=>{e&&(["secure",...re.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Cd(e[t])}))},"sanitize"),Rm=g(e=>{Ls(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gr.push(e),Ui(re,gr)},"addDirective"),Ms=g((e=re)=>{gr=[],Ui(e,gr)},"reset"),qm={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Pl={},bd=g(e=>{Pl[e]||(P.warn(qm[e]),Pl[e]=!0)},"issueWarning"),Nm=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&bd("LAZY_LOAD_DEPRECATED")},"checkConfig"),O5=g(()=>{let e={};Fs&&(e=Yt(e,Fs));for(const t of gr)e=Yt(e,t);return e},"getUserDefinedConfig"),Kt=g(e=>(e.flowchart?.htmlLabels!=null&&bd("FLOWCHART_HTML_LABELS_DEPRECATED"),$e(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),kd=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wm=/\s*%%.*\n/gm,wd=class extends Error{static{g(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},pr={},ln=g(function(e,t){e=e.replace(kd,"").replace(Mi,"").replace(Wm,` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-CqWuzQOK.js","assets/index-Ct7MGS7v.js","assets/index-CgbqiNuj.css","assets/purify.es-5AjVNlXF.js","assets/dagre-3AP2YEHR-CVrHKexT.js","assets/layout-TrTUIUgx.js","assets/swimlanes-XN3QIQJK-WLKrEsDC.js","assets/cose-bilkent-JH36ORCC-CaAJcdLC.js","assets/cytoscape.esm-CNiYdHpY.js","assets/c4Diagram-UCG6FXSJ-QbPQAL-O.js","assets/chunk-F27PBJKO-pJCmv4XH.js","assets/flowDiagram-A5DVABFB-SicbxN4x.js","assets/chunk-5VM5RSS4-Ny2gwX65.js","assets/chunk-XXDRQBXY-HOEikrp0.js","assets/chunk-POPQ4Y6H-BFcN0waq.js","assets/channel-BpqL3HJE.js","assets/swimlanesDiagram-VK2B7HYN-BUZY9pzv.js","assets/erDiagram-SSCWMZ5O-C3PUpvmO.js","assets/gitGraphDiagram-WWUBYQGX-Cd9HyqpC.js","assets/chunk-2Q5K7J3B-ZQItsBh7.js","assets/chunk-JWPE2WC7-C_cClkrQ.js","assets/cynefin-OW5HDTMX-D3VomulX.js","assets/ganttDiagram-EL5Y4UJY-B_T2-DEq.js","assets/linear-Dzo12Me2.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-RXCK75RN-CCm7qy3M.js","assets/pieDiagram-E7YTZNPT-DR6Erb3T.js","assets/arc-CPa230_j.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-BqYig9Zo.js","assets/xychartDiagram-S5SC5T6Z-CxT0FOrZ.js","assets/requirementDiagram-EFPCY7ZU-CpeOGSGj.js","assets/sequenceDiagram-WJ2MYXX4-Bztsclzi.js","assets/classDiagram-DTDB5LWJ-BKsHmBx6.js","assets/chunk-LCL6LL3I-JwRtGJJ3.js","assets/classDiagram-v2-JRS7N3AN-BKsHmBx6.js","assets/stateDiagram-HBIQ2CUA-BqDrFizO.js","assets/chunk-G27WJ6UU-CPa57YXh.js","assets/stateDiagram-v2-4QOOHH4V-Acd38TZq.js","assets/journeyDiagram-EYS64GPL-e0ZGdUvr.js","assets/timeline-definition-24CTP7MA-CC8ieJMY.js","assets/mindmap-definition-FBJOCRG2-CZjuUsix.js","assets/kanban-definition-3QL26DDD-C__sss0o.js","assets/sankeyDiagram-P5KCCOFB-CgeqPevU.js","assets/diagram-Z3DM3KII-CBgIPUY9.js","assets/diagram-UQ7AKVKN-VTf2WASr.js","assets/blockDiagram-NRAW4CY4-SpTDtKeh.js","assets/diagram-S7CK7UJ4-XBWXrjhn.js","assets/architectureDiagram-5GKGNRK7-inn9CBk7.js","assets/diagram-VSXAHHWV-ddvmuFzh.js","assets/ishikawaDiagram-5VMMS53U-n_fK3Ljm.js","assets/vennDiagram-4TSXK5OY-BY_8Roc7.js","assets/diagram-VX7I27RA-DI4JODbF.js","assets/wardleyDiagram-VM6X3IG4-BiZ0eogf.js","assets/cynefinDiagram-5FMLGOSQ-D3Bm7jhm.js","assets/railroadDiagram-O6MQD6OU-Bm_RO43s.js","assets/chunk-SVP7TREG-CWyh6gIW.js","assets/ebnfDiagram-PWID7BFC-DFLgXYEm.js","assets/abnfDiagram-VCTEODGH--reuoLL3.js","assets/pegDiagram-XKGWAZYB-WlReJ65k.js"])))=>i.map(i=>d[i]); +import{bR as _t}from"./index-Ct7MGS7v.js";import{p as Hr}from"./purify.es-5AjVNlXF.js";var cd=Object.defineProperty,g=(e,t)=>cd(e,"name",{value:t,configurable:!0}),Qy=(e,t)=>{for(var r in t)cd(e,r,{get:t[r],enumerable:!0})};function an(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ps={exports:{}},Jy=ps.exports,Dl;function tm(){return Dl||(Dl=1,(function(e,t){(function(r,i){e.exports=i()})(Jy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",u="quarter",f="year",y="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var O=["th","st","nd","rd"],v=E%100;return"["+E+(O[(v-20)%10]||O[v]||O[0])+"]"}},S=function(E,O,v){var R=String(E);return!R||R.length>=O?E:""+Array(O+1-R.length).join(v)+E},T={s:S,z:function(E){var O=-E.utcOffset(),v=Math.abs(O),R=Math.floor(v/60),$=v%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S($,2,"0")},m:function E(O,v){if(O.date()1)return E(Z[0])}else{var ut=O.name;L[ut]=O,$=ut}return!R&&$&&(_=$),$||!R&&_},z=function(E,O){if(B(E))return E.clone();var v=typeof O=="object"?O:{};return v.date=E,v.args=arguments,new et(v)},I=T;I.l=X,I.i=B,I.w=function(E,O){return z(E,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var et=(function(){function E(v){this.$L=X(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[M]=!0}var O=E.prototype;return O.parse=function(v){this.$d=(function(R){var $=R.date,J=R.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Z=$.match(x);if(Z){var ut=Z[2]-1||0,Ct=(Z[7]||"0").substring(0,3);return J?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,Ct)}}return new Date($)})(v),this.init()},O.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},O.$utils=function(){return I},O.isValid=function(){return this.$d.toString()!==m},O.isSame=function(v,R){var $=z(v);return this.startOf(R)<=$&&$<=this.endOf(R)},O.isAfter=function(v,R){return z(v){},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},nn=g(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Pe.fatal&&(P.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Pe.error&&(P.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Pe.warn&&(P.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Pe.info&&(P.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Pe.debug&&(P.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Pe.trace&&(P.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=g(e=>`%c${rm().format("ss.SSS")} : ${e} : `,"format");const ys={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return ys.hue2rgb(o,s,e+1/3)*255;case"g":return ys.hue2rgb(o,s,e)*255;case"b":return ys.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},sm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},bt={channel:ys,lang:im,unit:sm},Ze={};for(let e=0;e<=255;e++)Ze[e]=bt.unit.dec2hex(e);const Xt={ALL:0,RGB:1,HSL:2};let om=class{constructor(){this.type=Xt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Xt.ALL}is(t){return this.type===t}};class am{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new om}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=bt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=bt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=bt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=bt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=bt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=bt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const eo=new am({r:0,g:0,b:0,a:0},"transparent"),qr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(qr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return eo.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(s*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return bt.channel.clamp.h(parseFloat(r)*.9);case"rad":return bt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return bt.channel.clamp.h(parseFloat(r)*360)}}return bt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(cr.re);if(!r)return;const[,i,s,o,a,n]=r;return eo.set({h:cr._hue2deg(i),s:bt.channel.clamp.s(parseFloat(s)),l:bt.channel.clamp.l(parseFloat(o)),a:a?bt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%, ${s})`:`hsl(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%)`}},Li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Li.colors[e];if(t)return qr.parse(t)},stringify:e=>{const t=qr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},xi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(xi.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return eo.set({r:bt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:bt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:bt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?bt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)}, ${bt.lang.round(s)})`:`rgb(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)})`}},Fe={format:{keyword:Li,hex:qr,rgb:xi,rgba:xi,hsl:cr,hsla:cr},parse:e=>{if(typeof e!="string")return e;const t=qr.parse(e)||xi.parse(e)||cr.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xt.HSL)||e.data.r===void 0?cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?xi.stringify(e):qr.stringify(e)},dd=(e,t)=>{const r=Fe.parse(e);for(const i in t)r[i]=bt.channel.clamp[i](t[i]);return Fe.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return dd(e,{a:t});const s=eo.set({r:bt.channel.clamp.r(e),g:bt.channel.clamp.g(t),b:bt.channel.clamp.b(r),a:bt.channel.clamp.a(i)});return Fe.stringify(s)},nm=e=>{const{r:t,g:r,b:i}=Fe.parse(e),s=.2126*bt.channel.toLinear(t)+.7152*bt.channel.toLinear(r)+.0722*bt.channel.toLinear(i);return bt.lang.round(s)},lm=e=>nm(e)>=.5,xe=e=>!lm(e),ud=(e,t,r)=>{const i=Fe.parse(e),s=i[t],o=bt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Fe.stringify(i)},q=(e,t)=>ud(e,"l",t),N=(e,t)=>ud(e,"l",-t),b=(e,t)=>{const r=Fe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return dd(e,i)},hm=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Fe.parse(e),{r:n,g:l,b:c,a:h}=Fe.parse(t),d=r/100,u=d*2-1,f=a-h,m=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,x=1-m,C=i*m+n*x,k=s*m+l*x,S=o*m+c*x,T=a*d+h*(1-d);return tr(C,k,S,T)},F=(e,t=100)=>{const r=Fe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,hm(r,e,t)};var ma=g((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ma(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=ma(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Yt=ma,Ae="#ffffff",Ee="#f2f2f2",mt=g((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),cm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},dm=g(e=>{const t=new cm;return t.calculate(e),t},"getThemeVariables"),um=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=tr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=q(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=q(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=q(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},fm=g(e=>{const t=new um;return t.calculate(e),t},"getThemeVariables"),gm=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=tr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},pm=g(e=>{const t=new gm;return t.calculate(e),t},"getThemeVariables"),ym=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=q("#cde498",10),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=N(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},mm=g(e=>{const t=new ym;return t.calculate(e),t},"getThemeVariables"),xm=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Cm=g(e=>{const t=new xm;return t.calculate(e),t},"getThemeVariables"),bm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||b(e,{h:30}),this.cScale4=this.cScale4||b(e,{h:60}),this.cScale5=this.cScale5||b(e,{h:90}),this.cScale6=this.cScale6||b(e,{h:120}),this.cScale7=this.cScale7||b(e,{h:150}),this.cScale8=this.cScale8||b(e,{h:210,l:150}),this.cScale9=this.cScale9||b(e,{h:270}),this.cScale10=this.cScale10||b(e,{h:300}),this.cScale11=this.cScale11||b(e,{h:330}),this.darkMode)for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},km=g(e=>{const t=new bm;return t.calculate(e),t},"getThemeVariables"),wm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Sm=g(e=>{const t=new wm;return t.calculate(e),t},"getThemeVariables"),Tm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},_m=g(e=>{const t=new Tm;return t.calculate(e),t},"getThemeVariables"),vm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Bm=g(e=>{const t=new vm;return t.calculate(e),t},"getThemeVariables"),Lm=class{static{g(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||q(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Fm=g(e=>{const t=new Lm;return t.calculate(e),t},"getThemeVariables"),Mm=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Am=g(e=>{const t=new Mm;return t.calculate(e),t},"getThemeVariables"),We={base:{getThemeVariables:dm},dark:{getThemeVariables:fm},default:{getThemeVariables:pm},forest:{getThemeVariables:mm},neutral:{getThemeVariables:Cm},neo:{getThemeVariables:km},"neo-dark":{getThemeVariables:Sm},redux:{getThemeVariables:_m},"redux-dark":{getThemeVariables:Bm},"redux-color":{getThemeVariables:Fm},"redux-dark-color":{getThemeVariables:Am}},jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},fd={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:We.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},eventmodeling:{...jt.eventmodeling},treeView:{...jt.treeView,useWidth:void 0},radar:{...jt.radar},railroad:{...jt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...jt.ishikawa},sankey:{...jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...jt.venn},cynefin:{...jt.cynefin}},gd=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...gd(e[i],"")]:[...r,t+i],[]),"keyify"),Em=new Set(gd(fd,"")),pd=fd,$m={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Om=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(P.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ls=g(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ls(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Em.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=$m[t];i?Om(e[t],i):(P.debug("sanitizing object",t),Ls(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=yd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),yd=g(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),re=Yt({},Yr),Fs,gr=[],Fi=Yt({},Yr),Ui=g((e,t)=>{let r=Yt({},e),i={};for(const s of t)Cd(s),i=Yt(i,s);if(r=Yt(r,i),i.theme&&i.theme in We){const s=Yt({},Fs),o=Yt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in We&&(r.themeVariables=We[r.theme].getThemeVariables(o))}return Fi=r,Nm(Fi),Fi},"updateCurrentConfig"),Dm=g(e=>(re=Yt({},Yr),re=Yt(re,e),e.theme&&We[e.theme]&&(re.themeVariables=We[e.theme].getThemeVariables(e.themeVariables)),Ui(re,gr),re),"setSiteConfig"),Pm=g(e=>{Fs=Yt({},e)},"saveConfigFromInitialize"),Im=g(e=>(re=Yt(re,e),Ui(re,gr),re),"updateSiteConfig"),md=g(()=>Yt({},re),"getSiteConfig"),xd=g(e=>(Ui(Fi,[e]),Rt()),"setConfig"),Rt=g(()=>Yt({},Fi),"getConfig"),Cd=g(e=>{e&&(["secure",...re.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Cd(e[t])}))},"sanitize"),Rm=g(e=>{Ls(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gr.push(e),Ui(re,gr)},"addDirective"),Ms=g((e=re)=>{gr=[],Ui(e,gr)},"reset"),qm={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Pl={},bd=g(e=>{Pl[e]||(P.warn(qm[e]),Pl[e]=!0)},"issueWarning"),Nm=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&bd("LAZY_LOAD_DEPRECATED")},"checkConfig"),O5=g(()=>{let e={};Fs&&(e=Yt(e,Fs));for(const t of gr)e=Yt(e,t);return e},"getUserDefinedConfig"),Kt=g(e=>(e.flowchart?.htmlLabels!=null&&bd("FLOWCHART_HTML_LABELS_DEPRECATED"),$e(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),kd=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wm=/\s*%%.*\n/gm,wd=class extends Error{static{g(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},pr={},ln=g(function(e,t){e=e.replace(kd,"").replace(Mi,"").replace(Wm,` `);for(const[r,{detector:i}]of Object.entries(pr))if(i(e,t))return r;throw new wd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),xa=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Sd(t,r,i)},"registerLazyLoadedDiagrams"),Sd=g((e,t,r)=>{pr[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),pr[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),zm=g(e=>pr[e].loader,"getDiagramLoader"),Gi=//gi,Hm=g(e=>e?vd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ym=(()=>{let e=!1;return()=>{e||(Td(),e=!0)}})();function Td(){const e="data-temp-href-target";Hr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Hr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(Td,"setupDompurifyHooks");var _d=g(e=>(Ym(),Hr.sanitize(e)),"removeScript"),Il=g((e,t)=>{if(Kt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=_d(e):r!=="loose"&&(e=vd(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=Xm(e))}return e},"sanitizeMore"),le=g((e,t)=>e&&(t.dompurifyConfig?e=Hr.sanitize(Il(e,t),t.dompurifyConfig).toString():e=Hr.sanitize(Il(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),jm=g((e,t)=>typeof e=="string"?le(e,t):e.flat().map(r=>le(r,t)),"sanitizeTextOrArray"),Um=g(e=>Gi.test(e),"hasBreaks"),Gm=g(e=>e.split(Gi),"splitBreaks"),Xm=g(e=>e.replace(/#br#/g,"
        "),"placeholderToBreak"),vd=g(e=>e.replace(Gi,"#br#"),"breakToPlaceholder"),Vm=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Zm=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Km=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Rl=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),Qm=g((e,t)=>{const r=Ca(e,"~"),i=Ca(t,"~");return r===1&&i===1},"shouldCombineSets"),Jm=g(e=>{const t=Ca(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ql=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ba=/\$\$(.*?)\$\$/g,Di=g(e=>(e.match(ba)?.length??0)>0,"hasKatex"),D5=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Bd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),t0=g(async(e,t)=>{if(!Di(e))return e;if(!(ql()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ba,"MathML is unsupported in this environment.");{const{default:r}=await _t(async()=>{const{default:s}=await import("./katex-HP8lGamR.js");return{default:s}},[]),i=t.forceLegacyMathML||!ql()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Gi).map(s=>Di(s)?`
        ${s}
        `:`
        ${s}
        `).join("").replace(ba,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Bd=g(async(e,t)=>le(await t0(e,t),t),"renderKatexSanitized"),Xi={getRows:Hm,sanitizeText:le,sanitizeTextOrArray:jm,hasBreaks:Um,splitBreaks:Gm,lineBreakRegex:Gi,removeScript:_d,getUrl:Vm,evaluate:$e,getMax:Zm,getMin:Km},e0=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),r0=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ld=g(function(e,t,r,i){const s=r0(t,r,i);e0(e,s)},"configureSvgSize"),i0=g(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;P.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;P.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,P.info(`Calculated bounds: ${n}x${l}`),Ld(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ms={};function ka(e){return[...e.cssRules].map(t=>t.cssText).join(` `)}g(ka,"cssStyleSheetToString");var s0=g((e,t,r,i)=>{let s="";return e in ms&&ms[e]?s=ms[e]({...r,svgId:i}):P.warn(`No theme found for ${e}`),`& { font-family: ${r.fontFamily}; @@ -265,7 +265,7 @@ ${s.join(` L0,20`)},"requirement_arrow"),jw=g((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Uw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Gw=g((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),Xw={extension:vw,composition:Bw,aggregation:Lw,dependency:Fw,lollipop:Mw,point:Aw,circle:Ew,cross:$w,barb:Ow,barbNeo:Dw,only_one:Pw,zero_or_one:Iw,one_or_more:Rw,zero_or_more:qw,only_one_neo:Nw,zero_or_one_neo:Ww,one_or_more_neo:zw,zero_or_more_neo:Hw,requirement_arrow:Yw,requirement_contains:Uw,requirement_arrow_neo:jw,requirement_contains_neo:Gw},rp=_w,ip=typeof global=="object"&&global&&global.Object===Object&&global,Vw=typeof self=="object"&&self&&self.Object===Object&&self,Ue=ip||Vw||Function("return this")(),Me=Ue.Symbol,sp=Object.prototype,Zw=sp.hasOwnProperty,Kw=sp.toString,mi=Me?Me.toStringTag:void 0;function Qw(e){var t=Zw.call(e,mi),r=e[mi];try{e[mi]=void 0;var i=!0}catch{}var s=Kw.call(e);return i&&(t?e[mi]=r:delete e[mi]),s}var Jw=Object.prototype,tS=Jw.toString;function eS(e){return tS.call(e)}var rS="[object Null]",iS="[object Undefined]",sc=Me?Me.toStringTag:void 0;function Qr(e){return e==null?e===void 0?iS:rS:sc&&sc in Object(e)?Qw(e):eS(e)}function Cr(e){return e!=null&&typeof e=="object"}var sS="[object Symbol]";function el(e){return typeof e=="symbol"||Cr(e)&&Qr(e)==sS}function op(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r0){if(++t>=SS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function vi(e){return function(){return e}}var lc=(function(){try{var e=_r(Object,"defineProperty");return e({},"",{}),e}catch{}})(),BS=lc?function(e,t){return lc(e,"toString",{configurable:!0,enumerable:!1,value:vi(t),writable:!0})}:yo,LS=vS(BS);function FS(e,t){for(var r=-1,i=e==null?0:e.length;++r-1}var DS=9007199254740991,PS=/^(?:0|[1-9]\d*)$/;function np(e,t){var r=typeof e;return t=t??DS,!!t&&(r=="number"||r!="symbol"&&PS.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=qS}function mo(e){return e!=null&&il(e.length)&&!Ks(e)}var NS=Object.prototype;function hp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||NS;return e===r}function WS(e,t){for(var r=-1,i=Array(e);++r-1}function GT(e,t){var r=this.__data__,i=Co(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tn))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,f=r&$_?new zi:void 0;for(o.set(e,t),o.set(t,e);++d=Ev){var c=Av(e);if(c)return nl(c);a=!1,s=xp,l=new zi}else l=n;t:for(;++i1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=nr,this._children[t]={},this._children[nr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ar(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ar(ve(this._in[t]),r),delete this._in[t],delete this._preds[t],ar(ve(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ir(r))r=nr;else{r+="";for(var i=r;!Ir(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==nr)return r}}children(t){if(Ir(t)&&(t=nr),this._isCompound){var r=this._children[t];if(r)return ve(r)}else{if(t===nr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return ve(r)}successors(t){var r=this._sucs[t];if(r)return ve(r)}neighbors(t){var r=this.predecessors(t);if(r)return Ov(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ar(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),ar(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&ar(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return Ks(t)||(t=vi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return jo(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return Fv(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,Ir(i)||(i=""+i);var n=Bi(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!Ir(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=Pv(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Mc(this._preds[r],t),Mc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Ac(this._preds[r],t),Ac(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=jo(i);return r?us(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=jo(i);return r?us(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}wo.prototype._nodeCount=0;wo.prototype._edgeCount=0;function Mc(e,t){e[t]?e[t]++:e[t]=1}function Ac(e,t){--e[t]||delete e[t]}function Bi(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Fc+o+Fc+(Ir(i)?Dv:i)}function Pv(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function Uo(e,t){return Bi(e,t.v,t.w,t.name)}function Sp(e,{edgePathsClass:t="edges edgePath"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}g(Sp,"createLayoutElementGroups");async function Tp(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}g(Tp,"measureGroupLabel");async function _p(e,t,r){const i=await Jn(e,t,r),s=i.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,i}g(_p,"insertMeasuredNode");async function vp(e,t){const r=new wo({multigraph:!0,compound:!0}),i=[...t.edges],s=vt(),o=Sp(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Tp(n,h),r.setNode(h.id,{...h});else{if(c){const d=await _p(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&Kg(h)&&await tl(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(u=>u.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await _t(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-X5ZJPWSS-CSVjY38-.js");return{captureNodeSizes:d}},__vite__mapDeps([0,1,2,3]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}g(vp,"createGraphWithElements");var Ft=new Map,ur=new Map,Bp=new Map,Iv=g(()=>{ur.clear(),Bp.clear(),Ft.clear()},"clear"),Hi=g((e,t)=>{const r=ur.get(t)||[];return P.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Rv=g((e,t)=>{const r=ur.get(t)||[];return P.info("Descendants of ",t," is ",r),P.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Hi(e.v,t)||Hi(e.w,t)||r.includes(e.w):(P.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Lp=g((e,t,r,i)=>{P.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),P.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Lp(o,t,r,i);else{const a=t.node(o);P.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(P.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(P.debug("Setting parent",o,e),r.setParent(o,e)):(P.info("In copy ",e,"root",i,"data",t.node(e),i),P.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);P.debug("Copying Edges",n),n.forEach(l=>{P.info("Edge",l);const c=t.edge(l.v,l.w,l.name);P.info("Edge data",c,i);try{Rv(l,i)?(P.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),P.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):P.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){P.error(h)}})}P.debug("Removing node",o),t.removeNode(o)})},"copy"),Fp=g((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)Bp.set(s,e),i=[...i,...Fp(s,t)];return i},"extractDescendants"),qv=g((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Js=g((e,t,r)=>{const i=t.children(e);if(P.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=Js(o,t,r),n=qv(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Ec=g(e=>!Ft.has(e)||!Ft.get(e).externalConnections?e:Ft.has(e)?Ft.get(e).id:e,"getAnchorId"),rM=g((e,t)=>{if(!e||t>10){P.debug("Opting out, no graph ");return}else P.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(P.debug("Cluster identified",r," Replacement id in edges: ",Js(r,e,r)),ur.set(r,Fp(r,e)),Ft.set(r,{id:Js(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),s=e.edges();i.length>0?(P.debug("Cluster identified",r,ur),s.forEach(o=>{const a=Hi(o.v,r),n=Hi(o.w,r);a^n&&(P.debug("Edge: ",o," leaves cluster ",r),P.debug("Descendants of XXX ",r,": ",ur.get(r)),Ft.get(r).externalConnections=!0)})):P.debug("Not a cluster ",r,ur)});for(let r of Ft.keys()){const i=Ft.get(r).id,s=e.parent(i);s!==r&&Ft.has(s)&&!Ft.get(s).externalConnections&&(Ft.get(r).id=s);const o=e.edges().some(a=>a.v===r);if(i&&Ft.get(r)?.externalConnections&&o&&Ep(e,i,r)){const a=Nv(e,r,e.parent(i));a&&(Ft.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let s=r.v,o=r.w;if(P.debug("Fix XXX",Ft,"ids:",r.v,r.w,"Translating: ",Ft.get(r.v)," --- ",Ft.get(r.w)),Ft.get(r.v)||Ft.get(r.w)){if(P.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),s=Ec(r.v),o=Ec(r.w),e.removeEdge(r.v,r.w,r.name),s!==r.v){const a=e.parent(s);Ft.get(a).externalConnections=!0,i.fromCluster=r.v}if(o!==r.w){const a=e.parent(o);Ft.get(a).externalConnections=!0,i.toCluster=r.w}P.debug("Fix Replacing with XXX",s,o,r.name),e.setEdge(s,o,i,r.name)}}),Mp(e,0),P.trace(Ft)},"adjustClustersAndEdges"),Mp=g((e,t)=>{if(t>10){P.error("Bailing out");return}let r=e.nodes(),i=!1;for(const s of r){const o=e.children(s);i=i||o.length>0}if(!i){P.debug("Done, no node has children",e.nodes());return}P.debug("Nodes = ",r,t);for(const s of r)if(P.debug("Extracting node",s,Ft,Ft.has(s)&&!Ft.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!Ft.has(s))P.debug("Not a cluster",s,t);else if(!Ft.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){P.debug("Cluster without external connections, without a parent and with children",s,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Ft.get(s)?.clusterData?.dir&&(a=Ft.get(s).clusterData.dir,P.debug("Fixing dir",Ft.get(s).clusterData.dir,a));const n=new wo({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Lp(s,e,n,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:Ft.get(s).clusterData,label:Ft.get(s).label,graph:n})}else P.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!Ft.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),P.debug(Ft);r=e.nodes(),P.debug("New list of nodes",r);for(const s of r){const o=e.node(s);P.debug(" Now next level",s,o),o?.clusterNode&&Mp(o.graph,t+1)}},"extractor"),Ap=g((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=Ap(e,s);r=[...r,...o]}),r},"sorter"),iM=g(e=>Ap(e,e.children()),"sortNodesByHierarchy"),Ep=g((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ft.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Nv=g((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Hi(s,r))continue;const o=Js(s,e,t);if(o&&!Ep(e,o,t))return o}return null},"findSafeAnchorNode");function $p({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??dl;return g(async function(l,c,h,d){const u=c.select("g");rp(u,l.markers,l.type,l.diagramId),cl();const f={element:u,helpers:h,options:d};f.preparedLayout=await e?.(l,f);const y=await a(l,f),m=await r(l,f),x={...f,measure:y};i?await i(l,x,m):await ul(l,x,o),await s?.(l,x,m)},"render")}g($p,"createCommonLayoutRenderer");function cl(){sw(),xw(),uw(),Iv()}g(cl,"clearLayoutRenderState");async function dl(e,{element:t}){return await vp(t,e)}g(dl,"defaultMeasureLayout");async function ul(e,t,r={}){const{measure:i}=t,{groups:s}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await Op(s,a,t,r);const o=Pp(e.nodes);for(const a of e.edges)Ip(a,r)||await Rp(s,a,o,e,r,t)}g(ul,"paintLayoutData");async function Op(e,t,r,i){t.clusterNode?Jh(t):Dp(t,r,i)?await Zg(e.clusters,t):Jh(t)}g(Op,"paintLayoutNode");function Dp(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}g(Dp,"shouldPaintAsCluster");function Pp(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}g(Pp,"buildNodeLookup");function Ip(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}g(Ip,"shouldSkipPaintEdge");async function Rp(e,t,r,i,s,o){const a=Jg(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Qa(t.start,t,r,o,s),Qa(t.end,t,r,o,s),i.diagramId,qp(t,s));Kg(t)&&(Gr.has(t.id)||await tl(e.edgeLabels,t),Np(t,a))}g(Rp,"paintLayoutEdge");function Qa(e,t,r,i,s){return s.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}g(Qa,"getRenderedNode");function qp(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}g(qp,"shouldSkipIntersect");function Np(e,t){const r=t?.updatedPath??t?.originalPath,i=Rt(),{subGraphTitleTotalMargin:s}=go({flowchart:i.flowchart??{}});if(e.label){const o=Gr.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e?.startLabelLeft){const o=Nt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Nt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Nt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Nt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}g(Np,"positionRenderedEdgeLabel");function Wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}g(Wp,"getDefaultExportFromCjs");var Gt={},fs={},Ve={},$c;function Jr(){if($c)return Ve;$c=1;function e(a){return typeof a>"u"||a===null}g(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}g(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}g(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Gw=g((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),Xw={extension:vw,composition:Bw,aggregation:Lw,dependency:Fw,lollipop:Mw,point:Aw,circle:Ew,cross:$w,barb:Ow,barbNeo:Dw,only_one:Pw,zero_or_one:Iw,one_or_more:Rw,zero_or_more:qw,only_one_neo:Nw,zero_or_one_neo:Ww,one_or_more_neo:zw,zero_or_more_neo:Hw,requirement_arrow:Yw,requirement_contains:Uw,requirement_arrow_neo:jw,requirement_contains_neo:Gw},rp=_w,ip=typeof global=="object"&&global&&global.Object===Object&&global,Vw=typeof self=="object"&&self&&self.Object===Object&&self,Ue=ip||Vw||Function("return this")(),Me=Ue.Symbol,sp=Object.prototype,Zw=sp.hasOwnProperty,Kw=sp.toString,mi=Me?Me.toStringTag:void 0;function Qw(e){var t=Zw.call(e,mi),r=e[mi];try{e[mi]=void 0;var i=!0}catch{}var s=Kw.call(e);return i&&(t?e[mi]=r:delete e[mi]),s}var Jw=Object.prototype,tS=Jw.toString;function eS(e){return tS.call(e)}var rS="[object Null]",iS="[object Undefined]",sc=Me?Me.toStringTag:void 0;function Qr(e){return e==null?e===void 0?iS:rS:sc&&sc in Object(e)?Qw(e):eS(e)}function Cr(e){return e!=null&&typeof e=="object"}var sS="[object Symbol]";function el(e){return typeof e=="symbol"||Cr(e)&&Qr(e)==sS}function op(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r0){if(++t>=SS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function vi(e){return function(){return e}}var lc=(function(){try{var e=_r(Object,"defineProperty");return e({},"",{}),e}catch{}})(),BS=lc?function(e,t){return lc(e,"toString",{configurable:!0,enumerable:!1,value:vi(t),writable:!0})}:yo,LS=vS(BS);function FS(e,t){for(var r=-1,i=e==null?0:e.length;++r-1}var DS=9007199254740991,PS=/^(?:0|[1-9]\d*)$/;function np(e,t){var r=typeof e;return t=t??DS,!!t&&(r=="number"||r!="symbol"&&PS.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=qS}function mo(e){return e!=null&&il(e.length)&&!Ks(e)}var NS=Object.prototype;function hp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||NS;return e===r}function WS(e,t){for(var r=-1,i=Array(e);++r-1}function GT(e,t){var r=this.__data__,i=Co(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tn))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,f=r&$_?new zi:void 0;for(o.set(e,t),o.set(t,e);++d=Ev){var c=Av(e);if(c)return nl(c);a=!1,s=xp,l=new zi}else l=n;t:for(;++i1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=nr,this._children[t]={},this._children[nr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ar(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ar(ve(this._in[t]),r),delete this._in[t],delete this._preds[t],ar(ve(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ir(r))r=nr;else{r+="";for(var i=r;!Ir(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==nr)return r}}children(t){if(Ir(t)&&(t=nr),this._isCompound){var r=this._children[t];if(r)return ve(r)}else{if(t===nr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return ve(r)}successors(t){var r=this._sucs[t];if(r)return ve(r)}neighbors(t){var r=this.predecessors(t);if(r)return Ov(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ar(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),ar(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&ar(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return Ks(t)||(t=vi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return jo(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return Fv(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,Ir(i)||(i=""+i);var n=Bi(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!Ir(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=Pv(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Mc(this._preds[r],t),Mc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Uo(this._isDirected,arguments[0]):Bi(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Ac(this._preds[r],t),Ac(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=jo(i);return r?us(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=jo(i);return r?us(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}wo.prototype._nodeCount=0;wo.prototype._edgeCount=0;function Mc(e,t){e[t]?e[t]++:e[t]=1}function Ac(e,t){--e[t]||delete e[t]}function Bi(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Fc+o+Fc+(Ir(i)?Dv:i)}function Pv(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function Uo(e,t){return Bi(e,t.v,t.w,t.name)}function Sp(e,{edgePathsClass:t="edges edgePath"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}g(Sp,"createLayoutElementGroups");async function Tp(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}g(Tp,"measureGroupLabel");async function _p(e,t,r){const i=await Jn(e,t,r),s=i.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,i}g(_p,"insertMeasuredNode");async function vp(e,t){const r=new wo({multigraph:!0,compound:!0}),i=[...t.edges],s=vt(),o=Sp(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Tp(n,h),r.setNode(h.id,{...h});else{if(c){const d=await _p(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&Kg(h)&&await tl(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(u=>u.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await _t(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-X5ZJPWSS-CqWuzQOK.js");return{captureNodeSizes:d}},__vite__mapDeps([0,1,2,3]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}g(vp,"createGraphWithElements");var Ft=new Map,ur=new Map,Bp=new Map,Iv=g(()=>{ur.clear(),Bp.clear(),Ft.clear()},"clear"),Hi=g((e,t)=>{const r=ur.get(t)||[];return P.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Rv=g((e,t)=>{const r=ur.get(t)||[];return P.info("Descendants of ",t," is ",r),P.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Hi(e.v,t)||Hi(e.w,t)||r.includes(e.w):(P.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Lp=g((e,t,r,i)=>{P.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),P.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Lp(o,t,r,i);else{const a=t.node(o);P.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(P.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(P.debug("Setting parent",o,e),r.setParent(o,e)):(P.info("In copy ",e,"root",i,"data",t.node(e),i),P.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);P.debug("Copying Edges",n),n.forEach(l=>{P.info("Edge",l);const c=t.edge(l.v,l.w,l.name);P.info("Edge data",c,i);try{Rv(l,i)?(P.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),P.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):P.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){P.error(h)}})}P.debug("Removing node",o),t.removeNode(o)})},"copy"),Fp=g((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)Bp.set(s,e),i=[...i,...Fp(s,t)];return i},"extractDescendants"),qv=g((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Js=g((e,t,r)=>{const i=t.children(e);if(P.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=Js(o,t,r),n=qv(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Ec=g(e=>!Ft.has(e)||!Ft.get(e).externalConnections?e:Ft.has(e)?Ft.get(e).id:e,"getAnchorId"),rM=g((e,t)=>{if(!e||t>10){P.debug("Opting out, no graph ");return}else P.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(P.debug("Cluster identified",r," Replacement id in edges: ",Js(r,e,r)),ur.set(r,Fp(r,e)),Ft.set(r,{id:Js(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),s=e.edges();i.length>0?(P.debug("Cluster identified",r,ur),s.forEach(o=>{const a=Hi(o.v,r),n=Hi(o.w,r);a^n&&(P.debug("Edge: ",o," leaves cluster ",r),P.debug("Descendants of XXX ",r,": ",ur.get(r)),Ft.get(r).externalConnections=!0)})):P.debug("Not a cluster ",r,ur)});for(let r of Ft.keys()){const i=Ft.get(r).id,s=e.parent(i);s!==r&&Ft.has(s)&&!Ft.get(s).externalConnections&&(Ft.get(r).id=s);const o=e.edges().some(a=>a.v===r);if(i&&Ft.get(r)?.externalConnections&&o&&Ep(e,i,r)){const a=Nv(e,r,e.parent(i));a&&(Ft.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),P.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let s=r.v,o=r.w;if(P.debug("Fix XXX",Ft,"ids:",r.v,r.w,"Translating: ",Ft.get(r.v)," --- ",Ft.get(r.w)),Ft.get(r.v)||Ft.get(r.w)){if(P.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),s=Ec(r.v),o=Ec(r.w),e.removeEdge(r.v,r.w,r.name),s!==r.v){const a=e.parent(s);Ft.get(a).externalConnections=!0,i.fromCluster=r.v}if(o!==r.w){const a=e.parent(o);Ft.get(a).externalConnections=!0,i.toCluster=r.w}P.debug("Fix Replacing with XXX",s,o,r.name),e.setEdge(s,o,i,r.name)}}),Mp(e,0),P.trace(Ft)},"adjustClustersAndEdges"),Mp=g((e,t)=>{if(t>10){P.error("Bailing out");return}let r=e.nodes(),i=!1;for(const s of r){const o=e.children(s);i=i||o.length>0}if(!i){P.debug("Done, no node has children",e.nodes());return}P.debug("Nodes = ",r,t);for(const s of r)if(P.debug("Extracting node",s,Ft,Ft.has(s)&&!Ft.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!Ft.has(s))P.debug("Not a cluster",s,t);else if(!Ft.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){P.debug("Cluster without external connections, without a parent and with children",s,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Ft.get(s)?.clusterData?.dir&&(a=Ft.get(s).clusterData.dir,P.debug("Fixing dir",Ft.get(s).clusterData.dir,a));const n=new wo({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Lp(s,e,n,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:Ft.get(s).clusterData,label:Ft.get(s).label,graph:n})}else P.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!Ft.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),P.debug(Ft);r=e.nodes(),P.debug("New list of nodes",r);for(const s of r){const o=e.node(s);P.debug(" Now next level",s,o),o?.clusterNode&&Mp(o.graph,t+1)}},"extractor"),Ap=g((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=Ap(e,s);r=[...r,...o]}),r},"sorter"),iM=g(e=>Ap(e,e.children()),"sortNodesByHierarchy"),Ep=g((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ft.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Nv=g((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Hi(s,r))continue;const o=Js(s,e,t);if(o&&!Ep(e,o,t))return o}return null},"findSafeAnchorNode");function $p({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??dl;return g(async function(l,c,h,d){const u=c.select("g");rp(u,l.markers,l.type,l.diagramId),cl();const f={element:u,helpers:h,options:d};f.preparedLayout=await e?.(l,f);const y=await a(l,f),m=await r(l,f),x={...f,measure:y};i?await i(l,x,m):await ul(l,x,o),await s?.(l,x,m)},"render")}g($p,"createCommonLayoutRenderer");function cl(){sw(),xw(),uw(),Iv()}g(cl,"clearLayoutRenderState");async function dl(e,{element:t}){return await vp(t,e)}g(dl,"defaultMeasureLayout");async function ul(e,t,r={}){const{measure:i}=t,{groups:s}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await Op(s,a,t,r);const o=Pp(e.nodes);for(const a of e.edges)Ip(a,r)||await Rp(s,a,o,e,r,t)}g(ul,"paintLayoutData");async function Op(e,t,r,i){t.clusterNode?Jh(t):Dp(t,r,i)?await Zg(e.clusters,t):Jh(t)}g(Op,"paintLayoutNode");function Dp(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}g(Dp,"shouldPaintAsCluster");function Pp(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}g(Pp,"buildNodeLookup");function Ip(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}g(Ip,"shouldSkipPaintEdge");async function Rp(e,t,r,i,s,o){const a=Jg(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Qa(t.start,t,r,o,s),Qa(t.end,t,r,o,s),i.diagramId,qp(t,s));Kg(t)&&(Gr.has(t.id)||await tl(e.edgeLabels,t),Np(t,a))}g(Rp,"paintLayoutEdge");function Qa(e,t,r,i,s){return s.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}g(Qa,"getRenderedNode");function qp(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}g(qp,"shouldSkipIntersect");function Np(e,t){const r=t?.updatedPath??t?.originalPath,i=Rt(),{subGraphTitleTotalMargin:s}=go({flowchart:i.flowchart??{}});if(e.label){const o=Gr.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e?.startLabelLeft){const o=Nt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Nt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Nt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Nt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}g(Np,"positionRenderedEdgeLabel");function Wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}g(Wp,"getDefaultExportFromCjs");var Gt={},fs={},Ve={},$c;function Jr(){if($c)return Ve;$c=1;function e(a){return typeof a>"u"||a===null}g(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}g(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}g(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;cd&&(c=" ... ",o=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}g(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}g(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const u=Math.min(s.line+o.linesAfter,l.length).toString().length,f=o.maxLength-(o.indent+u+3);for(let m=1;m<=o.linesBefore&&!(h-m<0);m++){const x=t(s.buffer,n[h-m],l[h-m],s.position-(n[h]-n[h-m]),f);d=e.repeat(" ",o.indent)+r((s.line-m+1).toString(),u)+" | "+x.str+` `+d}const y=t(s.buffer,n[h],l[h],s.position,f);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),u)+" | "+y.str+` @@ -296,8 +296,8 @@ ${s.join(` `+w.slice(U,Q),U=Q+1),V=lt;return ot+=` `,w.length-U>D&&V>U?ot+=w.slice(U,V)+` `+w.slice(V+1):ot+=w.slice(U),ot.slice(1)}g(ue,"foldLine");function ai(w){let D="",K=0;for(let j=0;j=65536?j+=2:j++){K=Ot(w,j);const U=E[K];!U&&ht(K)?(D+=w[j],K>=65536&&(D+=w[j+1])):D+=U||$(K)}return D}g(ai,"escapeString");function Fr(w,D,K){let j="";const U=w.tag;for(let Q=0,V=K.length;Q"u"&&Y(w,D,null,!1,!1))&&(j!==""&&(j+=","+(w.condenseFlow?"":" ")),j+=w.dump)}w.tag=U,w.dump="["+j+"]"}g(Fr,"writeFlowSequence");function Mr(w,D,K,j){let U="";const Q=w.tag;for(let V=0,lt=K.length;V"u"&&Y(w,D+1,null,!0,!0,!1,!0))&&((!j||U!=="")&&(U+=xt(w,D)),w.dump&&n===w.dump.charCodeAt(0)?U+="-":U+="- ",U+=w.dump)}w.tag=Q,w.dump=U||"[]"}g(Mr,"writeBlockSequence");function ni(w,D,K){let j="";const U=w.tag,Q=Object.keys(K);for(let V=0,lt=Q.length;V1024&&(ot+="? "),ot+=w.dump+(w.condenseFlow?'"':"")+":"+(w.condenseFlow?"":" "),Y(w,D,gt,!1,!1)&&(ot+=w.dump,j+=ot))}w.tag=U,w.dump="{"+j+"}"}g(ni,"writeFlowMapping");function p(w,D,K,j){let U="";const Q=w.tag,V=Object.keys(K);if(w.sortKeys===!0)V.sort();else if(typeof w.sortKeys=="function")V.sort(w.sortKeys);else if(w.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let lt=0,ot=V.length;lt1024;Dt&&(w.dump&&n===w.dump.charCodeAt(0)?ft+="?":ft+="? "),ft+=w.dump,Dt&&(ft+=xt(w,D)),Y(w,D+1,Lt,!0,Dt)&&(w.dump&&n===w.dump.charCodeAt(0)?ft+=":":ft+=": ",ft+=w.dump,U+=ft)}w.tag=Q,w.dump=U||"{}"}g(p,"writeBlockMapping");function A(w,D,K){const j=K?w.explicitTypes:w.implicitTypes;for(let U=0,Q=j.length;U tag resolver accepts not "'+lt+'" style');w.dump=ot}return!0}}return!1}g(A,"detectType");function Y(w,D,K,j,U,Q,V){w.tag=null,w.dump=K,A(w,K,!1)||A(w,K,!0);const lt=i.call(w.dump),ot=j;j&&(j=w.flowLevel<0||w.flowLevel>D);const ft=lt==="[object Object]"||lt==="[object Array]";let gt,Lt;if(ft&&(gt=w.duplicates.indexOf(K),Lt=gt!==-1),(w.tag!==null&&w.tag!=="?"||Lt||w.indent!==2&&D>0)&&(U=!1),Lt&&w.usedDuplicates[gt])w.dump="*ref_"+gt;else{if(ft&&Lt&&!w.usedDuplicates[gt]&&(w.usedDuplicates[gt]=!0),lt==="[object Object]")j&&Object.keys(w.dump).length!==0?(p(w,D,w.dump,U),Lt&&(w.dump="&ref_"+gt+w.dump)):(ni(w,D,w.dump),Lt&&(w.dump="&ref_"+gt+" "+w.dump));else if(lt==="[object Array]")j&&w.dump.length!==0?(w.noArrayIndent&&!V&&D>0?Mr(w,D-1,w.dump,U):Mr(w,D,w.dump,U),Lt&&(w.dump="&ref_"+gt+w.dump)):(Fr(w,D,w.dump),Lt&&(w.dump="&ref_"+gt+" "+w.dump));else if(lt==="[object String]")w.tag!=="?"&&si(w,w.dump,D,Q,ot);else{if(lt==="[object Undefined]")return!1;if(w.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+lt)}if(w.tag!==null&&w.tag!=="?"){let Dt=encodeURI(w.tag[0]==="!"?w.tag.slice(1):w.tag).replace(/!/g,"%21");w.tag[0]==="!"?Dt="!"+Dt:Dt.slice(0,18)==="tag:yaml.org,2002:"?Dt="!!"+Dt.slice(18):Dt="!<"+Dt+">",w.dump=Dt+" "+w.dump}}return!0}g(Y,"writeNode");function G(w,D){const K=[],j=[];W(w,K,j);const U=j.length;for(let Q=0;Q{for(const t of e)Yi[t.name]=t},"registerLayoutLoaders"),Uv=g(()=>{Up([{name:"dagre",loader:g(async()=>await _t(()=>import("./dagre-3AP2YEHR-DNRBAAmc.js"),__vite__mapDeps([4,5,1,2,3])),"loader")},{name:"swimlane",loader:g(async()=>await _t(()=>import("./swimlanes-XN3QIQJK-D3OEEV8W.js"),__vite__mapDeps([6,1,2,3])),"loader")},{name:"cose-bilkent",loader:g(async()=>await _t(()=>import("./cose-bilkent-JH36ORCC-Du_KHUbL.js"),__vite__mapDeps([7,8,1,2,3])),"loader")}])},"registerDefaultLayoutLoaders");Uv();var yM=g(async(e,t)=>{if(!(e.layoutAlgorithm in Yi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Yi[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,jv,{algorithm:r.algorithm})},"render"),mM=g((e="",{fallback:t="dagre"}={})=>{if(e in Yi)return e;if(t in Yi)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ml="comm",Gp="rule",Xp="decl",Gv="@media",Xv="@import",Vv="@supports",Zv="@namespace",Ja="@keyframes",Vp="@layer",Kv="@scope",Qv=Math.abs,Oi=String.fromCharCode;function Zp(e){return e.trim()}function tn(e,t,r){return e.replace(t,r)}function zr(e,t){return e.charCodeAt(t)|0}function Xr(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function Kp(e){return e.length}function gs(e,t){return t.push(e),e}var To=1,Vr=1,Qp=0,he=0,Wt=0,ei="";function Al(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:To,column:Vr,length:a,return:"",siblings:n}}function Jv(){return Wt}function tB(){return Wt=he>0?zr(ei,--he):0,Vr--,Wt===10&&(Vr=1,To--),Wt}function me(){return Wt=he2||ji(Wt)>3?"":" "}function sB(e,t){for(;--t&&me()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return _o(e,vs()+(t<6&&Je()==32&&me()==32))}function en(e){for(;me();)switch(Wt){case e:return he;case 34:case 39:e!==34&&e!==39&&en(Wt);break;case 40:e===41&&en(e);break;case 92:me();break}return he}function oB(e,t){for(;me()&&e+Wt!==57;)if(e+Wt===84&&Je()===47)break;return"/*"+_o(t,he-1)+"*"+Oi(e===47?e:me())}function aB(e){for(;!ji(Je());)me();return _o(e,he)}function nB(e){return rB(Bs("",null,null,null,[""],e=eB(e),0,[0],e))}function Bs(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,u=0,f=0,y=0,m=1,x=1,C=1,k=0,S=0,T="",_=s,L=o,M=i,B=T;x;)switch(y=S,S=me()){case 40:y!=108&&zr(B,d-1)==58?(k++,B+="("):B+=pa(S);break;case 41:k--,B+=")";break;case 34:case 39:case 91:B+=pa(S);break;case 9:case 10:case 13:case 32:if(k>0){B+=Oi(S);break}B+=iB(y);break;case 92:B+=sB(vs()-1,7);continue;case 47:switch(Je()){case 42:case 47:gs(lB(oB(me(),vs()),t,r,l),l),(ji(y||1)==5||ji(Je()||1)==5)&&_e(B)&&Xr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=_e(B)*C;case 125*m:case 59:case 0:if(k>0&&S){B+=Oi(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(B=tn(B,/\f/g,"")),f>0&&(_e(B)-d||m===0)&&gs(f>32?od(B+";",i,r,d-1,l):od(tn(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(gs(M=sd(B,t,r,c,h,s,n,T,_=[],L=[],d,o),o),S===123)if(h===0)Bs(B,t,M,M,_,o,d,n,L);else{switch(u){case 99:if(zr(B,3)===110)break;case 108:if(zr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Bs(e,M,M,i&&gs(sd(e,M,M,0,0,s,n,T,s,_=[],d,L),L),s,L,d,n,i?_:L):Bs(B,M,M,M,[""],L,0,n,L)}}c=h=f=0,m=C=1,T=B="",d=a;break;case 58:d=1+_e(B),f=y;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&tB()==125)continue}switch(B+=Oi(S),S*m){case 38:C=h>0?1:(B+="\f",-1);break;case 44:if(k>0)break;n[c++]=(_e(B)-1)*C,C=1;break;case 64:Je()===45&&(B+=pa(me())),u=Je(),h=d=_e(T=B+=aB(vs())),S++;break;case 45:y===45&&_e(B)==2&&(m=0)}}return o}function sd(e,t,r,i,s,o,a,n,l,c,h,d){for(var u=s-1,f=s===0?o:[""],y=Kp(f),m=0,x=0,C=0;m0?f[k]+" "+S:tn(S,/&\f/g,f[k])))&&(l[C++]=T);return Al(e,t,r,s===0?Gp:n,l,c,h,d)}function lB(e,t,r,i){return Al(e,t,r,Ml,Oi(Jv()),Xr(e,2,-2),0,i)}function od(e,t,r,i,s){return Al(e,t,r,Xp,Xr(e,0,i),Xr(e,i+1,-1),i,s)}function rn(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),uB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./c4Diagram-UCG6FXSJ-BZuC3xtH.js");return{diagram:t}},__vite__mapDeps([9,10,1,2,3]));return{id:Jp,diagram:e}},"loader"),fB={id:Jp,detector:dB,loader:uB},gB=fB,ty="flowchart",pB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),yB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-D6_Z_lfU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ty,diagram:e}},"loader"),mB={id:ty,detector:pB,loader:yB},xB=mB,ey="flowchart-v2",CB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),bB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-D6_Z_lfU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ey,diagram:e}},"loader"),kB={id:ey,detector:CB,loader:bB},wB=kB,ry="swimlane",SB=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),TB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VK2B7HYN-DsX8zbP8.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,3,15,1,2]));return{id:ry,diagram:e}},"loader"),_B={id:ry,detector:SB,loader:TB},vB=_B,iy="er",BB=g(e=>/^\s*erDiagram/.test(e),"detector"),LB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./erDiagram-SSCWMZ5O-DzkblHwz.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,1,2,3]));return{id:iy,diagram:e}},"loader"),FB={id:iy,detector:BB,loader:LB},MB=FB,sy="gitGraph",AB=g(e=>/^\s*gitGraph/.test(e),"detector"),EB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-t2_RmnTi.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,1,2,3]));return{id:sy,diagram:e}},"loader"),$B={id:sy,detector:AB,loader:EB},OB=$B,oy="gantt",DB=g(e=>/^\s*gantt/.test(e),"detector"),PB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-DcpRnqwp.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,1,2,3]));return{id:oy,diagram:e}},"loader"),IB={id:oy,detector:DB,loader:PB},RB=IB,ay="info",qB=g(e=>/^\s*info/.test(e),"detector"),NB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./infoDiagram-RXCK75RN-Cn4b9A5u.js");return{diagram:t}},__vite__mapDeps([26,21,1,2,3]));return{id:ay,diagram:e}},"loader"),WB={id:ay,detector:qB,loader:NB},ny="pie",zB=g(e=>/^\s*pie/.test(e),"detector"),HB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-CSu4VKw9.js");return{diagram:t}},__vite__mapDeps([27,20,21,1,2,28,29,24,3]));return{id:ny,diagram:e}},"loader"),YB={id:ny,detector:zB,loader:HB},ly="quadrantChart",jB=g(e=>/^\s*quadrantChart/.test(e),"detector"),UB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-DwlY00_z.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,1,2,3]));return{id:ly,diagram:e}},"loader"),GB={id:ly,detector:jB,loader:UB},XB=GB,hy="xychart",VB=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),ZB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-Dqif0X1Z.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,1,2,3]));return{id:hy,diagram:e}},"loader"),KB={id:hy,detector:VB,loader:ZB},QB=KB,cy="requirement",JB=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),tL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./requirementDiagram-EFPCY7ZU-CGyZBZTB.js");return{diagram:t}},__vite__mapDeps([32,13,14,1,2,3]));return{id:cy,diagram:e}},"loader"),eL={id:cy,detector:JB,loader:tL},rL=eL,dy="sequence",iL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),sL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-DTAyNeme.js");return{diagram:t}},__vite__mapDeps([33,19,10,1,2,3]));return{id:dy,diagram:e}},"loader"),oL={id:dy,detector:iL,loader:sL},aL=oL,uy="class",nL=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),lL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-DTDB5LWJ-D8QxhnwF.js");return{diagram:t}},__vite__mapDeps([34,35,12,13,14,10,3,1,2]));return{id:uy,diagram:e}},"loader"),hL={id:uy,detector:nL,loader:lL},cL=hL,fy="classDiagram",dL=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),uL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-v2-JRS7N3AN-D8QxhnwF.js");return{diagram:t}},__vite__mapDeps([36,35,12,13,14,10,3,1,2]));return{id:fy,diagram:e}},"loader"),fL={id:fy,detector:dL,loader:uL},gL=fL,gy="state",pL=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),yL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-HBIQ2CUA-C3_d9P6D.js");return{diagram:t}},__vite__mapDeps([37,38,13,14,10,3,5,1,2]));return{id:gy,diagram:e}},"loader"),mL={id:gy,detector:pL,loader:yL},xL=mL,py="stateDiagram",CL=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),bL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4QOOHH4V-BoO7sp2R.js");return{diagram:t}},__vite__mapDeps([39,38,13,14,10,3,1,2]));return{id:py,diagram:e}},"loader"),kL={id:py,detector:CL,loader:bL},wL=kL,yy="journey",SL=g(e=>/^\s*journey/.test(e),"detector"),TL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./journeyDiagram-EYS64GPL-Bznj053h.js");return{diagram:t}},__vite__mapDeps([40,12,10,28,1,2,3]));return{id:yy,diagram:e}},"loader"),_L={id:yy,detector:SL,loader:TL},vL=_L,BL=g((e,t,r)=>{P.debug(`rendering svg for syntax error -`);const i=Xb(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ld(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),my={draw:BL},LL=my,FL={db:{},renderer:my,parser:{parse:g(()=>{},"parse")}},ML=FL,xy="flowchart-elk",AL=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),EL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-D6_Z_lfU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:xy,diagram:e}},"loader"),$L={id:xy,detector:AL,loader:EL},OL=$L,Cy="timeline",DL=g(e=>/^\s*timeline/.test(e),"detector"),PL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-S237vnu4.js");return{diagram:t}},__vite__mapDeps([41,28,1,2,3]));return{id:Cy,diagram:e}},"loader"),IL={id:Cy,detector:DL,loader:PL},RL=IL,by="mindmap",qL=g(e=>/^\s*mindmap/.test(e),"detector"),NL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./mindmap-definition-FBJOCRG2-OFTg7WuH.js");return{diagram:t}},__vite__mapDeps([42,13,14,1,2,3]));return{id:by,diagram:e}},"loader"),WL={id:by,detector:qL,loader:NL},zL=WL,ky="kanban",HL=g(e=>/^\s*kanban/.test(e),"detector"),YL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./kanban-definition-3QL26DDD-gEE7iVwG.js");return{diagram:t}},__vite__mapDeps([43,12,1,2,3]));return{id:ky,diagram:e}},"loader"),jL={id:ky,detector:HL,loader:YL},UL=jL,wy="sankey",GL=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),XL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-Djxn8nYX.js");return{diagram:t}},__vite__mapDeps([44,29,24,1,2,3]));return{id:wy,diagram:e}},"loader"),VL={id:wy,detector:GL,loader:XL},ZL=VL,Sy="packet",KL=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),QL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-DnTJZ40O.js");return{diagram:t}},__vite__mapDeps([45,20,21,1,2,3]));return{id:Sy,diagram:e}},"loader"),JL={id:Sy,detector:KL,loader:QL},Ty="radar",tF=g(e=>/^\s*radar-beta/.test(e),"detector"),eF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-DqI3S6m6.js");return{diagram:t}},__vite__mapDeps([46,20,21,1,2,3]));return{id:Ty,diagram:e}},"loader"),rF={id:Ty,detector:tF,loader:eF},_y="block",iF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),sF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./blockDiagram-NRAW4CY4-BNGA-QWb.js");return{diagram:t}},__vite__mapDeps([47,12,15,1,2,3]));return{id:_y,diagram:e}},"loader"),oF={id:_y,detector:iF,loader:sF},aF=oF,vy="treeView",nF=g(e=>/^\s*treeView-beta/.test(e),"detector"),lF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-95PLVM0c.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,1,2,3]));return{id:vy,diagram:e}},"loader"),hF={id:vy,detector:nF,loader:lF},cF=hF,By="architecture",dF=g(e=>/^\s*architecture/.test(e),"detector"),uF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-BvF0UgoH.js");return{diagram:t}},__vite__mapDeps([49,20,21,1,2,8,3]));return{id:By,diagram:e}},"loader"),fF={id:By,detector:dF,loader:uF},gF=fF,Ly="eventmodeling",pF=g(e=>/^\s*eventmodeling/.test(e),"detector"),yF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-Cps0EaEU.js");return{diagram:t}},__vite__mapDeps([50,20,21,1,2,3]));return{id:Ly,diagram:e}},"loader"),mF={id:Ly,detector:pF,loader:yF},xF=mF,Fy="ishikawa",CF=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),bF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-CZhPeyom.js");return{diagram:t}},__vite__mapDeps([51,1,2,3]));return{id:Fy,diagram:e}},"loader"),kF={id:Fy,detector:CF,loader:bF},My="venn",wF=g(e=>/^\s*venn-beta/.test(e),"detector"),SF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-BElDUyH9.js");return{diagram:t}},__vite__mapDeps([52,1,2,3]));return{id:My,diagram:e}},"loader"),TF={id:My,detector:wF,loader:SF},_F=TF,Ay="treemap",vF=g(e=>/^\s*treemap/.test(e),"detector"),BF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-TJJN2czJ.js");return{diagram:t}},__vite__mapDeps([53,20,14,21,1,2,25,29,24,3]));return{id:Ay,diagram:e}},"loader"),LF={id:Ay,detector:vF,loader:BF},Ey="wardley",FF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),MF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-C5SVPYNO.js");return{diagram:t}},__vite__mapDeps([54,20,21,1,2,3]));return{id:Ey,diagram:e}},"loader"),AF={id:Ey,detector:FF,loader:MF},EF=AF,$y="cynefin",$F=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),OF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-BfZ2WMeD.js");return{diagram:t}},__vite__mapDeps([55,20,21,1,2,3]));return{id:$y,diagram:e}},"loader"),DF={id:$y,detector:$F,loader:OF},Oy="railroad",PF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),IF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-E1VZdf0g.js");return{diagram:t}},__vite__mapDeps([56,57,20,21,1,2,3]));return{id:Oy,diagram:e}},"loader"),RF={id:Oy,detector:PF,loader:IF},Dy="railroadEbnf",qF=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),NF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-CG3VCHMu.js");return{diagram:t}},__vite__mapDeps([58,57,20,21,1,2,3]));return{id:Dy,diagram:e}},"loader"),WF={id:Dy,detector:qF,loader:NF},Py="railroadAbnf",zF=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),HF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-DEfrkFuI.js");return{diagram:t}},__vite__mapDeps([59,57,20,21,1,2,3]));return{id:Py,diagram:e}},"loader"),YF={id:Py,detector:zF,loader:HF},Iy="railroadPeg",jF=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),UF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-COpW3oto.js");return{diagram:t}},__vite__mapDeps([60,57,20,21,1,2,3]));return{id:Iy,diagram:e}},"loader"),GF={id:Iy,detector:jF,loader:UF},ad=!1,vo=g(()=>{ad||(ad=!0,Es("error",ML,e=>e.toLowerCase().trim()==="error"),Es("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xa(OL,zL,gF),xa(gB,UL,gL,cL,MB,RB,WB,YB,rL,aL,vB,wB,xB,RL,OB,wL,xL,vL,XB,ZL,JL,QB,aF,xF,cF,rF,kF,LF,RF,WF,YF,GF,_F,EF,DF))},"addDiagrams"),XF=g(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(pr).map(async([r,{detector:i,loader:s}])=>{if(s)try{wa(r)}catch{try{const{diagram:o,id:a}=await s();Es(a,o,i)}catch(o){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete pr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),VF="graphics-document document";function Ry(e,t){e.attr("role",VF),t!==""&&e.attr("aria-roledescription",t)}g(Ry,"setA11yDiagramInfo");function qy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(qy,"addSVGa11yTitleDescription");var sn=class Ny{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static{g(this,"Diagram")}static async fromText(t,r={}){const i=Rt(),s=ln(t,i);t=yk(t)+` +`:""}return g(tt,"dump2"),ga.dump=tt,ga}g(Yp,"requireDumper");var id;function jp(){if(id)return Gt;id=1;const e=Hp(),t=Yp();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return g(r,"renamed"),Gt.Type=Qt(),Gt.Schema=fl(),Gt.FAILSAFE_SCHEMA=ml(),Gt.JSON_SCHEMA=wl(),Gt.CORE_SCHEMA=Sl(),Gt.DEFAULT_SCHEMA=So(),Gt.load=e.load,Gt.loadAll=e.loadAll,Gt.dump=t.dump,Gt.YAMLException=ti(),Gt.types={binary:vl(),float:kl(),map:yl(),null:xl(),pairs:Ll(),set:Fl(),timestamp:Tl(),bool:Cl(),int:bl(),merge:_l(),omap:Bl(),seq:pl(),str:gl()},Gt.safeLoad=r("safeLoad","load"),Gt.safeLoadAll=r("safeLoadAll","loadAll"),Gt.safeDump=r("safeDump","dump"),Gt}g(jp,"requireJsYaml");var Wv=jp(),zv=Wp(Wv),{Type:sM,Schema:oM,FAILSAFE_SCHEMA:aM,JSON_SCHEMA:Hv,CORE_SCHEMA:nM,DEFAULT_SCHEMA:lM,load:Yv,loadAll:hM,dump:cM,YAMLException:dM,types:uM,safeLoad:fM,safeLoadAll:gM,safeDump:pM}=zv,jv={common:Xi,getConfig:Rt,insertCluster:Zg,insertEdge:Jg,insertEdgeLabel:tl,insertMarkers:rp,insertNode:Jn,interpolateToCurve:Mn,labelHelper:ct,log:P,positionEdgeLabel:Cw},Yi={},Up=g(e=>{for(const t of e)Yi[t.name]=t},"registerLayoutLoaders"),Uv=g(()=>{Up([{name:"dagre",loader:g(async()=>await _t(()=>import("./dagre-3AP2YEHR-CVrHKexT.js"),__vite__mapDeps([4,5,1,2,3])),"loader")},{name:"swimlane",loader:g(async()=>await _t(()=>import("./swimlanes-XN3QIQJK-WLKrEsDC.js"),__vite__mapDeps([6,1,2,3])),"loader")},{name:"cose-bilkent",loader:g(async()=>await _t(()=>import("./cose-bilkent-JH36ORCC-CaAJcdLC.js"),__vite__mapDeps([7,8,1,2,3])),"loader")}])},"registerDefaultLayoutLoaders");Uv();var yM=g(async(e,t)=>{if(!(e.layoutAlgorithm in Yi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Yi[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,jv,{algorithm:r.algorithm})},"render"),mM=g((e="",{fallback:t="dagre"}={})=>{if(e in Yi)return e;if(t in Yi)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ml="comm",Gp="rule",Xp="decl",Gv="@media",Xv="@import",Vv="@supports",Zv="@namespace",Ja="@keyframes",Vp="@layer",Kv="@scope",Qv=Math.abs,Oi=String.fromCharCode;function Zp(e){return e.trim()}function tn(e,t,r){return e.replace(t,r)}function zr(e,t){return e.charCodeAt(t)|0}function Xr(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function Kp(e){return e.length}function gs(e,t){return t.push(e),e}var To=1,Vr=1,Qp=0,he=0,Wt=0,ei="";function Al(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:To,column:Vr,length:a,return:"",siblings:n}}function Jv(){return Wt}function tB(){return Wt=he>0?zr(ei,--he):0,Vr--,Wt===10&&(Vr=1,To--),Wt}function me(){return Wt=he2||ji(Wt)>3?"":" "}function sB(e,t){for(;--t&&me()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return _o(e,vs()+(t<6&&Je()==32&&me()==32))}function en(e){for(;me();)switch(Wt){case e:return he;case 34:case 39:e!==34&&e!==39&&en(Wt);break;case 40:e===41&&en(e);break;case 92:me();break}return he}function oB(e,t){for(;me()&&e+Wt!==57;)if(e+Wt===84&&Je()===47)break;return"/*"+_o(t,he-1)+"*"+Oi(e===47?e:me())}function aB(e){for(;!ji(Je());)me();return _o(e,he)}function nB(e){return rB(Bs("",null,null,null,[""],e=eB(e),0,[0],e))}function Bs(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,u=0,f=0,y=0,m=1,x=1,C=1,k=0,S=0,T="",_=s,L=o,M=i,B=T;x;)switch(y=S,S=me()){case 40:y!=108&&zr(B,d-1)==58?(k++,B+="("):B+=pa(S);break;case 41:k--,B+=")";break;case 34:case 39:case 91:B+=pa(S);break;case 9:case 10:case 13:case 32:if(k>0){B+=Oi(S);break}B+=iB(y);break;case 92:B+=sB(vs()-1,7);continue;case 47:switch(Je()){case 42:case 47:gs(lB(oB(me(),vs()),t,r,l),l),(ji(y||1)==5||ji(Je()||1)==5)&&_e(B)&&Xr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=_e(B)*C;case 125*m:case 59:case 0:if(k>0&&S){B+=Oi(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(B=tn(B,/\f/g,"")),f>0&&(_e(B)-d||m===0)&&gs(f>32?od(B+";",i,r,d-1,l):od(tn(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(gs(M=sd(B,t,r,c,h,s,n,T,_=[],L=[],d,o),o),S===123)if(h===0)Bs(B,t,M,M,_,o,d,n,L);else{switch(u){case 99:if(zr(B,3)===110)break;case 108:if(zr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Bs(e,M,M,i&&gs(sd(e,M,M,0,0,s,n,T,s,_=[],d,L),L),s,L,d,n,i?_:L):Bs(B,M,M,M,[""],L,0,n,L)}}c=h=f=0,m=C=1,T=B="",d=a;break;case 58:d=1+_e(B),f=y;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&tB()==125)continue}switch(B+=Oi(S),S*m){case 38:C=h>0?1:(B+="\f",-1);break;case 44:if(k>0)break;n[c++]=(_e(B)-1)*C,C=1;break;case 64:Je()===45&&(B+=pa(me())),u=Je(),h=d=_e(T=B+=aB(vs())),S++;break;case 45:y===45&&_e(B)==2&&(m=0)}}return o}function sd(e,t,r,i,s,o,a,n,l,c,h,d){for(var u=s-1,f=s===0?o:[""],y=Kp(f),m=0,x=0,C=0;m0?f[k]+" "+S:tn(S,/&\f/g,f[k])))&&(l[C++]=T);return Al(e,t,r,s===0?Gp:n,l,c,h,d)}function lB(e,t,r,i){return Al(e,t,r,Ml,Oi(Jv()),Xr(e,2,-2),0,i)}function od(e,t,r,i,s){return Al(e,t,r,Xp,Xr(e,0,i),Xr(e,i+1,-1),i,s)}function rn(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),uB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./c4Diagram-UCG6FXSJ-QbPQAL-O.js");return{diagram:t}},__vite__mapDeps([9,10,1,2,3]));return{id:Jp,diagram:e}},"loader"),fB={id:Jp,detector:dB,loader:uB},gB=fB,ty="flowchart",pB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),yB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-SicbxN4x.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ty,diagram:e}},"loader"),mB={id:ty,detector:pB,loader:yB},xB=mB,ey="flowchart-v2",CB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),bB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-SicbxN4x.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:ey,diagram:e}},"loader"),kB={id:ey,detector:CB,loader:bB},wB=kB,ry="swimlane",SB=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),TB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VK2B7HYN-BUZY9pzv.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,3,15,1,2]));return{id:ry,diagram:e}},"loader"),_B={id:ry,detector:SB,loader:TB},vB=_B,iy="er",BB=g(e=>/^\s*erDiagram/.test(e),"detector"),LB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./erDiagram-SSCWMZ5O-C3PUpvmO.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,1,2,3]));return{id:iy,diagram:e}},"loader"),FB={id:iy,detector:BB,loader:LB},MB=FB,sy="gitGraph",AB=g(e=>/^\s*gitGraph/.test(e),"detector"),EB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-Cd9HyqpC.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,1,2,3]));return{id:sy,diagram:e}},"loader"),$B={id:sy,detector:AB,loader:EB},OB=$B,oy="gantt",DB=g(e=>/^\s*gantt/.test(e),"detector"),PB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-B_T2-DEq.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,1,2,3]));return{id:oy,diagram:e}},"loader"),IB={id:oy,detector:DB,loader:PB},RB=IB,ay="info",qB=g(e=>/^\s*info/.test(e),"detector"),NB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./infoDiagram-RXCK75RN-CCm7qy3M.js");return{diagram:t}},__vite__mapDeps([26,21,1,2,3]));return{id:ay,diagram:e}},"loader"),WB={id:ay,detector:qB,loader:NB},ny="pie",zB=g(e=>/^\s*pie/.test(e),"detector"),HB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-DR6Erb3T.js");return{diagram:t}},__vite__mapDeps([27,20,21,1,2,28,29,24,3]));return{id:ny,diagram:e}},"loader"),YB={id:ny,detector:zB,loader:HB},ly="quadrantChart",jB=g(e=>/^\s*quadrantChart/.test(e),"detector"),UB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-BqYig9Zo.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,1,2,3]));return{id:ly,diagram:e}},"loader"),GB={id:ly,detector:jB,loader:UB},XB=GB,hy="xychart",VB=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),ZB=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-CxT0FOrZ.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,1,2,3]));return{id:hy,diagram:e}},"loader"),KB={id:hy,detector:VB,loader:ZB},QB=KB,cy="requirement",JB=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),tL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./requirementDiagram-EFPCY7ZU-CpeOGSGj.js");return{diagram:t}},__vite__mapDeps([32,13,14,1,2,3]));return{id:cy,diagram:e}},"loader"),eL={id:cy,detector:JB,loader:tL},rL=eL,dy="sequence",iL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),sL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-Bztsclzi.js");return{diagram:t}},__vite__mapDeps([33,19,10,1,2,3]));return{id:dy,diagram:e}},"loader"),oL={id:dy,detector:iL,loader:sL},aL=oL,uy="class",nL=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),lL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-DTDB5LWJ-BKsHmBx6.js");return{diagram:t}},__vite__mapDeps([34,35,12,13,14,10,3,1,2]));return{id:uy,diagram:e}},"loader"),hL={id:uy,detector:nL,loader:lL},cL=hL,fy="classDiagram",dL=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),uL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-v2-JRS7N3AN-BKsHmBx6.js");return{diagram:t}},__vite__mapDeps([36,35,12,13,14,10,3,1,2]));return{id:fy,diagram:e}},"loader"),fL={id:fy,detector:dL,loader:uL},gL=fL,gy="state",pL=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),yL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-HBIQ2CUA-BqDrFizO.js");return{diagram:t}},__vite__mapDeps([37,38,13,14,10,3,5,1,2]));return{id:gy,diagram:e}},"loader"),mL={id:gy,detector:pL,loader:yL},xL=mL,py="stateDiagram",CL=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),bL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4QOOHH4V-Acd38TZq.js");return{diagram:t}},__vite__mapDeps([39,38,13,14,10,3,1,2]));return{id:py,diagram:e}},"loader"),kL={id:py,detector:CL,loader:bL},wL=kL,yy="journey",SL=g(e=>/^\s*journey/.test(e),"detector"),TL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./journeyDiagram-EYS64GPL-e0ZGdUvr.js");return{diagram:t}},__vite__mapDeps([40,12,10,28,1,2,3]));return{id:yy,diagram:e}},"loader"),_L={id:yy,detector:SL,loader:TL},vL=_L,BL=g((e,t,r)=>{P.debug(`rendering svg for syntax error +`);const i=Xb(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ld(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),my={draw:BL},LL=my,FL={db:{},renderer:my,parser:{parse:g(()=>{},"parse")}},ML=FL,xy="flowchart-elk",AL=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),EL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-SicbxN4x.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,3,15]));return{id:xy,diagram:e}},"loader"),$L={id:xy,detector:AL,loader:EL},OL=$L,Cy="timeline",DL=g(e=>/^\s*timeline/.test(e),"detector"),PL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-CC8ieJMY.js");return{diagram:t}},__vite__mapDeps([41,28,1,2,3]));return{id:Cy,diagram:e}},"loader"),IL={id:Cy,detector:DL,loader:PL},RL=IL,by="mindmap",qL=g(e=>/^\s*mindmap/.test(e),"detector"),NL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./mindmap-definition-FBJOCRG2-CZjuUsix.js");return{diagram:t}},__vite__mapDeps([42,13,14,1,2,3]));return{id:by,diagram:e}},"loader"),WL={id:by,detector:qL,loader:NL},zL=WL,ky="kanban",HL=g(e=>/^\s*kanban/.test(e),"detector"),YL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./kanban-definition-3QL26DDD-C__sss0o.js");return{diagram:t}},__vite__mapDeps([43,12,1,2,3]));return{id:ky,diagram:e}},"loader"),jL={id:ky,detector:HL,loader:YL},UL=jL,wy="sankey",GL=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),XL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-CgeqPevU.js");return{diagram:t}},__vite__mapDeps([44,29,24,1,2,3]));return{id:wy,diagram:e}},"loader"),VL={id:wy,detector:GL,loader:XL},ZL=VL,Sy="packet",KL=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),QL=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-CBgIPUY9.js");return{diagram:t}},__vite__mapDeps([45,20,21,1,2,3]));return{id:Sy,diagram:e}},"loader"),JL={id:Sy,detector:KL,loader:QL},Ty="radar",tF=g(e=>/^\s*radar-beta/.test(e),"detector"),eF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-VTf2WASr.js");return{diagram:t}},__vite__mapDeps([46,20,21,1,2,3]));return{id:Ty,diagram:e}},"loader"),rF={id:Ty,detector:tF,loader:eF},_y="block",iF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),sF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./blockDiagram-NRAW4CY4-SpTDtKeh.js");return{diagram:t}},__vite__mapDeps([47,12,15,1,2,3]));return{id:_y,diagram:e}},"loader"),oF={id:_y,detector:iF,loader:sF},aF=oF,vy="treeView",nF=g(e=>/^\s*treeView-beta/.test(e),"detector"),lF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-XBWXrjhn.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,1,2,3]));return{id:vy,diagram:e}},"loader"),hF={id:vy,detector:nF,loader:lF},cF=hF,By="architecture",dF=g(e=>/^\s*architecture/.test(e),"detector"),uF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-inn9CBk7.js");return{diagram:t}},__vite__mapDeps([49,20,21,1,2,8,3]));return{id:By,diagram:e}},"loader"),fF={id:By,detector:dF,loader:uF},gF=fF,Ly="eventmodeling",pF=g(e=>/^\s*eventmodeling/.test(e),"detector"),yF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-ddvmuFzh.js");return{diagram:t}},__vite__mapDeps([50,20,21,1,2,3]));return{id:Ly,diagram:e}},"loader"),mF={id:Ly,detector:pF,loader:yF},xF=mF,Fy="ishikawa",CF=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),bF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-n_fK3Ljm.js");return{diagram:t}},__vite__mapDeps([51,1,2,3]));return{id:Fy,diagram:e}},"loader"),kF={id:Fy,detector:CF,loader:bF},My="venn",wF=g(e=>/^\s*venn-beta/.test(e),"detector"),SF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-BY_8Roc7.js");return{diagram:t}},__vite__mapDeps([52,1,2,3]));return{id:My,diagram:e}},"loader"),TF={id:My,detector:wF,loader:SF},_F=TF,Ay="treemap",vF=g(e=>/^\s*treemap/.test(e),"detector"),BF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-DI4JODbF.js");return{diagram:t}},__vite__mapDeps([53,20,14,21,1,2,25,29,24,3]));return{id:Ay,diagram:e}},"loader"),LF={id:Ay,detector:vF,loader:BF},Ey="wardley",FF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),MF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-BiZ0eogf.js");return{diagram:t}},__vite__mapDeps([54,20,21,1,2,3]));return{id:Ey,diagram:e}},"loader"),AF={id:Ey,detector:FF,loader:MF},EF=AF,$y="cynefin",$F=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),OF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-D3Bm7jhm.js");return{diagram:t}},__vite__mapDeps([55,20,21,1,2,3]));return{id:$y,diagram:e}},"loader"),DF={id:$y,detector:$F,loader:OF},Oy="railroad",PF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),IF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-Bm_RO43s.js");return{diagram:t}},__vite__mapDeps([56,57,20,21,1,2,3]));return{id:Oy,diagram:e}},"loader"),RF={id:Oy,detector:PF,loader:IF},Dy="railroadEbnf",qF=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),NF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-DFLgXYEm.js");return{diagram:t}},__vite__mapDeps([58,57,20,21,1,2,3]));return{id:Dy,diagram:e}},"loader"),WF={id:Dy,detector:qF,loader:NF},Py="railroadAbnf",zF=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),HF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH--reuoLL3.js");return{diagram:t}},__vite__mapDeps([59,57,20,21,1,2,3]));return{id:Py,diagram:e}},"loader"),YF={id:Py,detector:zF,loader:HF},Iy="railroadPeg",jF=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),UF=g(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-WlReJ65k.js");return{diagram:t}},__vite__mapDeps([60,57,20,21,1,2,3]));return{id:Iy,diagram:e}},"loader"),GF={id:Iy,detector:jF,loader:UF},ad=!1,vo=g(()=>{ad||(ad=!0,Es("error",ML,e=>e.toLowerCase().trim()==="error"),Es("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xa(OL,zL,gF),xa(gB,UL,gL,cL,MB,RB,WB,YB,rL,aL,vB,wB,xB,RL,OB,wL,xL,vL,XB,ZL,JL,QB,aF,xF,cF,rF,kF,LF,RF,WF,YF,GF,_F,EF,DF))},"addDiagrams"),XF=g(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(pr).map(async([r,{detector:i,loader:s}])=>{if(s)try{wa(r)}catch{try{const{diagram:o,id:a}=await s();Es(a,o,i)}catch(o){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete pr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),VF="graphics-document document";function Ry(e,t){e.attr("role",VF),t!==""&&e.attr("aria-roledescription",t)}g(Ry,"setA11yDiagramInfo");function qy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(qy,"addSVGa11yTitleDescription");var sn=class Ny{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static{g(this,"Diagram")}static async fromText(t,r={}){const i=Rt(),s=ln(t,i);t=yk(t)+` `;try{wa(s)}catch{const c=zm(s);if(!c)throw new wd(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();Es(h,d)}const{db:o,parser:a,renderer:n,init:l}=wa(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new Ny(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},nd=[],ZF=g(()=>{nd.forEach(e=>{e()}),nd=[]},"attachFunctions"),KF=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Wy(e){const t=e.match(kd);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(` `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(` `):t[2];let s=Yv(i,{schema:Hv})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}g(Wy,"extractFrontMatter");var QF=g(e=>e.replace(/\r\n?/g,` diff --git a/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js b/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-CZjuUsix.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js rename to apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-CZjuUsix.js index b092aeb62..5d4b74034 100644 --- a/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-OFTg7WuH.js +++ b/apps/pythinker-code/dist-web/assets/mindmap-definition-FBJOCRG2-CZjuUsix.js @@ -1,4 +1,4 @@ -import{g as oe}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as ae}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as l,l as C,x as ce,y as le,A as he,E as G,c as B,i as F,b3 as de,ab as ge,ac as ue,ad as pe}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},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,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,z,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: +import{g as oe}from"./chunk-XXDRQBXY-HOEikrp0.js";import{s as ae}from"./chunk-POPQ4Y6H-BFcN0waq.js";import{_ as l,l as C,x as ce,y as le,A as he,E as G,c as B,i as F,b3 as de,ab as ge,ac as ue,ad as pe}from"./mermaid.core-CwGP16Dm.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},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,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,z,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: `+y.showPosition()+` Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(M+1)+": Unexpected "+(b==Q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:W,expected:V})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(S[0]){case 1:o.push(b),p.push(y.yytext),r.push(y.yylloc),o.push(S[1]),b=null,K=y.yyleng,u=y.yytext,M=y.yylineno,W=y.yylloc;break;case 2:if(x=this.productions_[S[1]][1],O.$=p[p.length-x],O._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},se&&(O._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),z=this.performAction.apply(O,[u,K,M,L.yy,S[1],p,r].concat(ie)),typeof z<"u")return z;x&&(o=o.slice(0,-1*x*2),p=p.slice(0,-1*x),r=r.slice(0,-1*x)),o.push(this.productions_[S[1]][0]),p.push(O.$),r.push(O._$),ee=$[o[o.length-2]][o[o.length-1]],o.push(ee);break;case 3:return!0}}return!0},"parse")},te=(function(){var D={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||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:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(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:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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),o.length-1&&(this.yylineno-=o.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:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(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:l(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:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-COpW3oto.js b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-WlReJ65k.js similarity index 87% rename from apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-COpW3oto.js rename to apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-WlReJ65k.js index d6b26f522..908ade3ae 100644 --- a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-COpW3oto.js +++ b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-WlReJ65k.js @@ -1 +1 @@ -import{g as l,r as m,d as a}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as t,l as o}from"./mermaid.core-BusHtpbx.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; +import{g as l,r as m,d as a}from"./chunk-SVP7TREG-CWyh6gIW.js";import{p}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{_ as t,l as o}from"./mermaid.core-CwGP16Dm.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CSu4VKw9.js b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-DR6Erb3T.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CSu4VKw9.js rename to apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-DR6Erb3T.js index 661d1c6f9..add68caf1 100644 --- a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-CSu4VKw9.js +++ b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-DR6Erb3T.js @@ -1,4 +1,4 @@ -import{p as at}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{S as T,K as P,b2 as rt,g as nt,s as it,a as ot,b as st,q as lt,p as ct,_ as g,l as B,c as ut,D as dt,G as gt,a2 as pt,d as ht,r as ft,E as mt}from"./mermaid.core-BusHtpbx.js";import{p as vt}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import{d as X}from"./arc-B8osaoVd.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function St(t,n){return nt?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(P),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),z=Math.min(P,Math.max(-P,l.apply(this,arguments)-D)),k,L=Math.min(Math.abs(z)/s,p.apply(this,arguments)),u=L*(z<0?-1:1),A;for(r=0;r0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(z-s*u)/$:0;r0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:L};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},F=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{F=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);F.has(t)||(F.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>F,"getSections"),kt=g(t=>{V=t},"setShowData"),Et=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:Et},zt=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);B.debug(n),zt(n,Z)},"parse")},Rt=g(t=>` +import{p as at}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{S as T,K as P,b2 as rt,g as nt,s as it,a as ot,b as st,q as lt,p as ct,_ as g,l as B,c as ut,D as dt,G as gt,a2 as pt,d as ht,r as ft,E as mt}from"./mermaid.core-CwGP16Dm.js";import{p as vt}from"./cynefin-OW5HDTMX-D3VomulX.js";import{d as X}from"./arc-CPa230_j.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function St(t,n){return nt?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(P),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),z=Math.min(P,Math.max(-P,l.apply(this,arguments)-D)),k,L=Math.min(Math.abs(z)/s,p.apply(this,arguments)),u=L*(z<0?-1:1),A;for(r=0;r0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(z-s*u)/$:0;r0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:L};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},F=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{F=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);F.has(t)||(F.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>F,"getSections"),kt=g(t=>{V=t},"setShowData"),Et=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:Et},zt=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);B.debug(n),zt(n,Z)},"parse")},Rt=g(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/python-BeBGma8p.js b/apps/pythinker-code/dist-web/assets/python-In1HHoJC.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/python-BeBGma8p.js rename to apps/pythinker-code/dist-web/assets/python-In1HHoJC.js index 55ce29852..5471b60ae 100644 --- a/apps/pythinker-code/dist-web/assets/python-BeBGma8p.js +++ b/apps/pythinker-code/dist-web/assets/python-In1HHoJC.js @@ -1 +1 @@ -import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const i={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{i as conf,r as language}; +import{l as e}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const i={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{i as conf,r as language}; diff --git a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-BqYig9Zo.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js rename to apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-BqYig9Zo.js index 7bd14f5ec..c1b3ee712 100644 --- a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DwlY00_z.js +++ b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-BqYig9Zo.js @@ -1,4 +1,4 @@ -import{s as Se,g as _e,q as ee,p as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,j as vt,d as Pe,r as ve,E as z,i as Ce,X as Le}from"./mermaid.core-BusHtpbx.js";import{l as te}from"./linear-Be-oTS5b.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Xt=[1,73],Ht=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: +import{s as Se,g as _e,q as ee,p as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,j as vt,d as Pe,r as ve,E as z,i as Ce,X as Le}from"./mermaid.core-CwGP16Dm.js";import{l as te}from"./linear-Dzo12Me2.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Xt=[1,73],Ht=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Xt,12:Ht,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:X,10:y,12:T,13:q,14:g,15:k,18:H,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: `+D.showPosition()+` Expecting `+yt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Pt="Parse error on line "+(gt+1)+": Unexpected "+(B==Zt?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Pt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:kt,expected:yt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:u.push(B),A.push(D.yytext),e.push(D.yylloc),u.push(W[1]),B=null,Kt=D.yyleng,n=D.yytext,gt=D.yylineno,kt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=A[A.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},me&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(rt,[n,Kt,gt,j.yy,W[1],A,e].concat(qe)),typeof Ft<"u")return Ft;M&&(u=u.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),u.push(this.productions_[W[1]][0]),A.push(rt.$),e.push(rt._$),$t=ht[u[u.length-2]][u[u.length-1]],u.push($t);break;case 3:return!0}}return!0},"parse")},ye=(function(){var Y={EOF:1,parseError:r(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:r(function(s,l){return this.yy=l||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:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.match(/(?:\r\n?|\n).*/g);return l?(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:r(function(s){var l=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),u.length-1&&(this.yylineno-=u.length-1);var A=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(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:r(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:r(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-Bm_RO43s.js similarity index 84% rename from apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js rename to apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-Bm_RO43s.js index 7ee2388d9..f7dac1e2b 100644 --- a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-E1VZdf0g.js +++ b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-Bm_RO43s.js @@ -1 +1 @@ -import{g as s,r as l,d as t}from"./chunk-SVP7TREG-D3M7Gbkt.js";import{p as m}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{_ as n,l as i}from"./mermaid.core-BusHtpbx.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; +import{g as s,r as l,d as t}from"./chunk-SVP7TREG-CWyh6gIW.js";import{p as m}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{_ as n,l as i}from"./mermaid.core-CwGP16Dm.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/razor-L05JTUrE.js b/apps/pythinker-code/dist-web/assets/razor-VEmNVnW2.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/razor-L05JTUrE.js rename to apps/pythinker-code/dist-web/assets/razor-VEmNVnW2.js index e6044a49a..680580509 100644 --- a/apps/pythinker-code/dist-web/assets/razor-L05JTUrE.js +++ b/apps/pythinker-code/dist-web/assets/razor-VEmNVnW2.js @@ -1 +1 @@ -import{l as t}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const e=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{i as conf,n as language}; +import{l as t}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const e=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{i as conf,n as language}; diff --git a/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js b/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CpeOGSGj.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js rename to apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CpeOGSGj.js index 578d9d36d..7cc6b4319 100644 --- a/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CGyZBZTB.js +++ b/apps/pythinker-code/dist-web/assets/requirementDiagram-EFPCY7ZU-CpeOGSGj.js @@ -1,4 +1,4 @@ -import{g as ze}from"./chunk-XXDRQBXY-DaNzL58C.js";import{s as Ge}from"./chunk-POPQ4Y6H-BpzExJjb.js";import{_ as u,A as Ye,b as Xe,a as Je,s as Ze,g as et,p as tt,q as st,c as Te,l as Ne,r as it,v as rt,x as nt,y as at,z as lt}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var qe=(function(){var e=u(function($,r,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=r);return n},"o"),f=[1,3],h=[1,4],o=[1,5],i=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(r,n,l,s,m,t,me){var a=t.length-1;switch(m){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:f,9:h,11:o,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:f,9:h,11:o,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:f,9:h,11:o,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:u(function(r){var n=this,l=[0],s=[],m=[null],t=[],me=this.table,a="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){l.length=l.length-2*I,m.length=m.length-I,t.length=t.length-I}u(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=n.symbols_[I]||I),I}u(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=l[l.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: +import{g as ze}from"./chunk-XXDRQBXY-HOEikrp0.js";import{s as Ge}from"./chunk-POPQ4Y6H-BFcN0waq.js";import{_ as u,A as Ye,b as Xe,a as Je,s as Ze,g as et,p as tt,q as st,c as Te,l as Ne,r as it,v as rt,x as nt,y as at,z as lt}from"./mermaid.core-CwGP16Dm.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var qe=(function(){var e=u(function($,r,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=r);return n},"o"),f=[1,3],h=[1,4],o=[1,5],i=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(r,n,l,s,m,t,me){var a=t.length-1;switch(m){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:f,9:h,11:o,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:f,9:h,11:o,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:f,9:h,11:o,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:h,11:o,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:u(function(r){var n=this,l=[0],s=[],m=[null],t=[],me=this.table,a="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){l.length=l.length-2*I,m.length=m.length-I,t.length=t.length-I}u(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=n.symbols_[I]||I),I}u(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=l[l.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: `+y.showPosition()+` Expecting `+ye.join(", ")+", got '"+(this.terminals_[b]||b)+"'":ke="Parse error on line "+(Re+1)+": Unexpected "+(b==$e?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(ke,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:be,expected:ye})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+b);switch(N[0]){case 1:l.push(b),m.push(y.yytext),t.push(y.yylloc),l.push(N[1]),b=null,Fe=y.yyleng,a=y.yytext,Re=y.yylineno,be=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=m[m.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Ie=this.performAction.apply(J,[a,Fe,Re,z.yy,N[1],m,t].concat(Ke)),typeof Ie<"u")return Ie;F&&(l=l.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[N[1]][0]),m.push(J.$),t.push(J._$),Ue=me[l[l.length-2]][l[l.length-1]],l.push(Ue);break;case 3:return!0}}return!0},"parse")},Qe=(function(){var $={EOF:1,parseError:u(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:u(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:u(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:u(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 s=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 m=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===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(r){this.unput(this.match.slice(r))},"less"),pastInput:u(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:u(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:u(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CgeqPevU.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js rename to apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CgeqPevU.js index d2874123d..9869249e8 100644 --- a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-Djxn8nYX.js +++ b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CgeqPevU.js @@ -1,4 +1,4 @@ -import{p as kt,q as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b7 as St,j as G,ae as wt,r as Lt,k as Et}from"./mermaid.core-BusHtpbx.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function jt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function Dt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=jt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;rc.length)-1)),$(f);for(let c=0;c0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function j(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function D({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;d.push(j);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function D(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(D,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=D()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: +import{p as kt,q as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b7 as St,j as G,ae as wt,r as Lt,k as Et}from"./mermaid.core-CwGP16Dm.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function jt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function Dt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=jt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;rc.length)-1)),$(f);for(let c=0;c0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,D(b)}a===void 0&&p.sort(q),j(p,c)}}function j(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function D({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;d.push(j);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function D(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(D,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=D()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: `+S.showPosition()+` Expecting `+p.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:j,expected:p})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),d.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,j=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:d[d.length-(e||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(e||1)].first_column,last_column:d[d.length-1].last_column},R&&(f._$.range=[d[d.length-(e||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,d].concat($)),typeof n<"u")return n;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),d=d.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),d.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:y(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:y(function(o,a){return this.yy=a||this.yy||{},this._input=o,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:y(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:y(function(o){var a=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var m=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),h.length-1&&(this.yylineno-=h.length-1);var _=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:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(o){this.unput(this.match.slice(o))},"less"),pastInput:y(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-Bztsclzi.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js rename to apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-Bztsclzi.js index 49f1c8285..dbadb1fab 100644 --- a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DTAyNeme.js +++ b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-Bztsclzi.js @@ -1,4 +1,4 @@ -import{I as tr}from"./chunk-2Q5K7J3B-CPFb-YMA.js";import{_ as x,Y as er,c as $,j as Vt,l as at,o as Ce,d as rr,e as ar,k as N,b as ke,s as sr,p as ir,a as nr,g as or,q as cr,Z as lr,$ as hr,r as dr,i as Yt,z as Z,a0 as Q,a1 as Pt,a2 as Me,a3 as Tr,A as Kt,a4 as pr,a5 as Be}from"./mermaid.core-BusHtpbx.js";import{a as Er,g as ae,b as dt,d as ur,c as se,e as ie}from"./chunk-F27PBJKO-CGsciVEq.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: +import{I as tr}from"./chunk-2Q5K7J3B-ZQItsBh7.js";import{_ as x,Y as er,c as $,j as Vt,l as at,o as Ce,d as rr,e as ar,k as N,b as ke,s as sr,p as ir,a as nr,g as or,q as cr,Z as lr,$ as hr,r as dr,i as Yt,z as Z,a0 as Q,a1 as Pt,a2 as Me,a3 as Tr,A as Kt,a4 as pr,a5 as Be}from"./mermaid.core-CwGP16Dm.js";import{a as Er,g as ae,b as dt,d as ur,c as se,e as ie}from"./chunk-F27PBJKO-pJCmv4XH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: `+J.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":$t="Parse error on line "+(Ct+1)+": Unexpected "+(rt==we?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError($t,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Zt,expected:Bt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+rt);switch(ct[0]){case 1:P.push(rt),z.push(J.yytext),c.push(J.yylloc),P.push(ct[1]),rt=null,Se=J.yyleng,h=J.yytext,Ct=J.yylineno,Zt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Lt.$=z[z.length-Tt],Lt._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},$e&&(Lt._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),Qt=this.performAction.apply(Lt,[h,Se,Ct,gt.yy,ct[1],z,c].concat(Qe)),typeof Qt<"u")return Qt;Tt&&(P=P.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),P.push(this.productions_[ct[1]][0]),z.push(Lt.$),c.push(Lt._$),Pe=wt[P[P.length-2]][P[P.length-1]],P.push(Pe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var ut={EOF:1,parseError:x(function(v,P){if(this.yy.parser)this.yy.parser.parseError(v,P);else throw new Error(v)},"parseError"),setInput:x(function(S,v){return this.yy=v||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:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var v=S.match(/(?:\r\n?|\n).*/g);return v?(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:x(function(S){var v=S.length,P=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;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),P.length-1&&(this.yylineno-=P.length-1);var z=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:P?(P.length===y.length?this.yylloc.first_column:0)+y[y.length-P.length].length-P[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(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:x(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:x(function(){var S=this.pastInput(),v=new Array(S.length+1).join("-");return S+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CSVjY38-.js b/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CqWuzQOK.js similarity index 86% rename from apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CSVjY38-.js rename to apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CqWuzQOK.js index 10314710a..ffe1df826 100644 --- a/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CSVjY38-.js +++ b/apps/pythinker-code/dist-web/assets/sizeCapture-X5ZJPWSS-CqWuzQOK.js @@ -1 +1 @@ -import{_ as o}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; +import{_ as o}from"./mermaid.core-CwGP16Dm.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js b/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-BqDrFizO.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js rename to apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-BqDrFizO.js index a23a87b8b..37993a99e 100644 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-C3_d9P6D.js +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-HBIQ2CUA-BqDrFizO.js @@ -1 +1 @@ -import{s as R,a as W,S as N}from"./chunk-G27WJ6UU-CIn6rVI9.js";import{_ as f,c as t,j as H,l as S,d as P,a7 as _,k as z,a8 as U,a9 as C,a4 as F,z as O}from"./mermaid.core-BusHtpbx.js";import{l as J}from"./layout-CRsCkvth.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
        ");p=p.replace(/\n/g,"
        ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(C),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=F(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=O.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram}; +import{s as R,a as W,S as N}from"./chunk-G27WJ6UU-CPa57YXh.js";import{_ as f,c as t,j as H,l as S,d as P,a7 as _,k as z,a8 as U,a9 as C,a4 as F,z as O}from"./mermaid.core-CwGP16Dm.js";import{l as J}from"./layout-TrTUIUgx.js";import"./chunk-XXDRQBXY-HOEikrp0.js";import"./chunk-POPQ4Y6H-BFcN0waq.js";import"./chunk-F27PBJKO-pJCmv4XH.js";import"./purify.es-5AjVNlXF.js";import"./index-Ct7MGS7v.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
        ");p=p.replace(/\n/g,"
        ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(C),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=F(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=O.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-Acd38TZq.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-Acd38TZq.js new file mode 100644 index 000000000..d14ce69bb --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-Acd38TZq.js @@ -0,0 +1 @@ +import{s as r,b as e,a,S as s}from"./chunk-G27WJ6UU-CPa57YXh.js";import{_ as i}from"./mermaid.core-CwGP16Dm.js";import"./chunk-XXDRQBXY-HOEikrp0.js";import"./chunk-POPQ4Y6H-BFcN0waq.js";import"./chunk-F27PBJKO-pJCmv4XH.js";import"./purify.es-5AjVNlXF.js";import"./index-Ct7MGS7v.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js deleted file mode 100644 index 4c6515aa6..000000000 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-BoO7sp2R.js +++ /dev/null @@ -1 +0,0 @@ -import{s as r,b as e,a,S as s}from"./chunk-G27WJ6UU-CIn6rVI9.js";import{_ as i}from"./mermaid.core-BusHtpbx.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./index-BZ9wqq8Z.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-D3OEEV8W.js b/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-WLKrEsDC.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-D3OEEV8W.js rename to apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-WLKrEsDC.js index 35dbf42d7..d70fbf9be 100644 --- a/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-D3OEEV8W.js +++ b/apps/pythinker-code/dist-web/assets/swimlanes-XN3QIQJK-WLKrEsDC.js @@ -1 +1 @@ -import{ap as Cr,l as In,_ as d,aA as To}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var Ao=5,Xe=1e-5,Ye=1e-6;function Ue(t){const e=[];for(let n=0;n=1-Ye||C<=Ye||C>=1-Ye?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:C}}d(Bo,"segmentIntersection");function Sn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(Sn,"isHorizontalSeg");function ko(t){const e=[];for(let n=0;n=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Fo,"getArcSweepFlag");var vr=.001;function _o(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&To[e.arrowTypeStart];if(o){const r=t[0],a=t[1],l=Math.atan2(a.y-r.y,a.x-r.x);n[0].x=r.x+o*Math.cos(l),n[0].y=r.y+o*Math.sin(l)}const s=e.arrowTypeEnd&&To[e.arrowTypeEnd];if(s){const r=t.length,a=t[r-2],l=t[r-1],f=Math.atan2(l.y-a.y,l.x-a.x);n[r-1].x=l.x-s*Math.cos(f),n[r-1].y=l.y-s*Math.sin(f)}return n}d(_o,"applyMarkerOffsets");function Do(t,e,n,o,s){const r=t.point.x,a=t.point.y,l={x:r-e*t.r,y:a-n*t.r},f={x:r+e*t.r,y:a+n*t.r},i=[`L${Ae(l)}`];return s==="arc"?i.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${Ae(f)}`):i.push(`M${Ae(f)}`),i}d(Do,"emitJump");function Cn(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=n.x-e.x,l=n.y-e.y,f=Math.hypot(s,r),i=Math.hypot(a,l);if(f0){const E=Cn(s[i-1],s[i],s[i+1]??s[i],Ao);E&&(c=E.cutLen)}let y=x,v=null;r&&iE.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-c,y-E.d);for(let E=0;ET){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r=2?o:null}catch{return null}}d(Go,"decodeDataPoints");function $o(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const i of e)s.set(i.id,i);const r=[],a=new Map;for(const i of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(i.id):i.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;a.set(i.id,x);const h=Go(x.getAttribute("data-points"))??i.points;r.push({...i,points:h})}const l=ko(r);if(l.length===0)return;const f=new Map;for(const i of l){const g=f.get(i.jumpEdgeId)??[];g.push(i),f.set(i.jumpEdgeId,g)}for(const i of r){const g=f.get(i.id);if(!g||g.length===0)continue;const C=s.get(i.id)?.curve;if(C!==void 0&&!Yo(C))continue;const h=a.get(i.id);if(!h)continue;if(C===void 0){const E=h.getAttribute("d")??"";if(!Xo(E))continue}const p=h.getAttribute("style")??"",c=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=c?Number.parseFloat(c[1]):null,v=c?Number.parseFloat(c[2]):null,M=Ho(i,g,n);if(h.setAttribute("d",M),y!==null&&v!==null&&typeof h.getTotalLength=="function"){const E=h.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,I=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");h.setAttribute("style",I)}}}d($o,"applyLineJumpsToSvg");function zo(t,{measure:e}){const n=t.config?.swimlane?.lineHops;if(n===!1)return;const o=n==="gap"?"gap":"arc",s=t.edges.filter(r=>Array.isArray(r.points)&&r.points.length>=2).map(r=>({id:r.id,points:r.points,curve:r.curve,arrowTypeStart:r.arrowTypeStart,arrowTypeEnd:r.arrowTypeEnd}));$o(e.groups.edgePaths,s,{enabled:!0,jumpRadius:6,jumpStyle:o})}d(zo,"applySwimlaneLineJumps");var yn="__swimlane_default__",Lr=21,wo=20;function vn(t){return Math.max(t.padding??wo,wo)}d(vn,"topLaneHorizontalPadding");function Vo(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const a=n-s/2,l=Math.min(r,n+s/2),f=Math.min(Lr,Math.max(0,l-a)),i=a+f;if(i<=a){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:a,bottom:i}}d(Vo,"assignTopLaneTitleRect");function jo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===yn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:yn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=yn}d(jo,"prepareLayoutForSwimlanes");function Uo(t){const e=new Map;for(const f of t.nodes??[])e.set(f.id,f);const n=[];for(const f of t.edges??[]){const i=typeof f.start=="string"?f.start:void 0,g=typeof f.end=="string"?f.end:void 0;!i||!g||f.labelNodeId||n.push({id:f.id,src:i,dst:g,ref:f})}const o=t.nodes??[],s=o.filter(f=>f.isGroup),r=o.filter(f=>!f.isGroup);return{nodes:[...[...s].reverse(),...r].map(f=>f.id),edges:n,layout:t,nodeById:e}}d(Uo,"toGraphView");function Wo(t,e,n,o){const{layout:s}=t,r=t.nodeById,a=o?.layerGap??100,l=o?.nodeGap??40;let f=0;for(const C of e.layers){let h=0;for(const p of C){const c=r.get(p);if(!c){h++;continue}c.layer=f,c.order=h;const y=n.x[p]??h*l,v=n.y[p]??f*a;c.x=y,c.y=v,h++}f++}const i=s.nodes??[],g=new Map,x=[];for(const C of i){if(!C?.isGroup)continue;C.parentId||x.push(C);const h=i.filter(M=>M.parentId===C.id);let p=1/0,c=-1/0,y=1/0,v=-1/0;for(const M of h){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,I=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),c=Math.max(c,E+m/2),y=Math.min(y,T-I/2),v=Math.max(v,T+I/2))}if(p===1/0||y===1/0)C.x=C.x??0,C.y=C.y??0,C.width=C.width??0,C.height=C.height??0;else{const M=C.padding??20,E=C.parentId?M:2*vn(C),T=M,m=Math.max(0,c-p)+E,I=Math.max(0,v-y)+T,w=(p+c)/2,R=(y+v)/2;C.x=w,C.y=R,C.width=m,C.height=I,g.set(C.id,{minX:p,maxX:c,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let C=1/0,h=-1/0,p=0;for(const c of x){const y=c.padding??20;y>p&&(p=y);const v=g.get(c.id);v&&(C=Math.min(C,v.minY),h=Math.max(h,v.maxY))}if(C!==1/0&&h!==-1/0){const c=Math.max(0,h-C),v=Math.max(p,36),M=c+2*v,E=(C+h)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=C;const T=[...x].sort((k,O)=>{const F=k.x??0,H=O.x??0;return F-H}),m=[],I=[],w=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const F=Math.max(0,O.maxX-O.minX)+2*vn(k),H=(O.minX+O.maxX)/2;m.push(k.id),I.push(H),w.push(F)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],w[0]);else{const O=[];for(let j=0;j0&&s>0?{cx:e,cy:n,rect:we(e,n,o,s)}:void 0}d(eo,"measuredNodeRect");function no(t){if(t.isGroup)return;const e=eo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(no,"nodeBoundsInfoFor");function oe(t,e,n=_t){return Math.abs(t.x-e.x)n}d(Tt,"isHorizontalSegment");function At(t,e,n=_t){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(At,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=_t){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=_t){const n=[];for(let o=0;o0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function oo(t,e=_t){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&At(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:At(n,o,e)&&Tt(o,s,e)&&At(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(oo,"classifyThreeSegmentRoute");function on(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),a=Math.min(t.y,e.y),l=Math.max(t.y,e.y);return r>n.left-o&&sn.top-o&&ae.left+n&&t.xe.top+n&&t.y=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(qo,"rectContainsRect");function We(t,e){return t.lefte.left&&t.tope.top}d(We,"rectsOverlap");function Ln(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Ln,"inflateRect");function we(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(we,"rectFromCenterSize");function qt(t){return eo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function ro(t,e,n,o,s,r=_t){const a=e==="left"||e==="right",l=o==="left"||o==="right";if(a&&l){if(e==="right"&&o==="left"&&t.xn.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!a&&!l){if(e===o){if(ft(t,n,r))return;const C=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:C},{x:n.x,y:C},n]}if(!(e==="bottom"&&o==="top"&&t.yn.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(a&&!l){const g=e==="right"&&n.x>t.x||e==="left"&&n.xn.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const f=e==="bottom"&&n.y>t.y||e==="top"&&n.yn.x;return f&&i?[t,{x:t.x,y:n.y},n]:void 0}d(ro,"buildOrthogonalPortPath");function io(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(io,"buildSameSideTrackPath");function sn(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=no(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(sn,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=no(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function Jo(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,a=o.width??0,l=o.height??0;n.push({nodeId:o.id,...we(s,r,a,l)})}return n}d(Jo,"collectLayoutNodeRects");function co(t,e,n=_t){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),a=e.get(s);if(!(!r||!a))return{srcId:o,dstId:s,srcInfo:r,dstInfo:a,collinearX:Math.abs(r.cx-a.cx)p||Cv)return!1;const M=Math.abs(c-g.a.x)s:r&&l&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(Zo,"sameAxisSegmentsOverlap");function Ke(t,e,n,o,{epsilon:s=_t,skipDegenerateOther:r=!1}={}){for(const a of n){if(a===o||a.isLayoutOnly)continue;const l=a.points;if(!(!l||l.length<2))for(let f=0;fC+s&&pc+s&&xo+_t&&t=2?e[e.length-2]:void 0,f=(a?ft(a,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(f)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ts(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Tr=.5,Ro=4;function lo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length=0&&s=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const a=es(t[s],t[r],e);return n?[a,...t.slice(s)]:[...t.slice(0,s+1),a]}d(Tn,"clipEndpoint");function ns(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Tn(s,o.srcRect,!0)),o.dstRect&&(s=Tn(s,o.dstRect,!1)),s=ae(qe(s)),s=fo(s,o.srcRect,o.dstRect),o.edge.points=ae(qe(s))}}d(ns,"clipEdgeEndpointsToNodeBoundaries");function An(t,e,n,o=!1){if(ht(t,e,nt)){if(e.yn.bottom+nt)return e;if(o){if(t.xn.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.xn.right+nt)return e;if(o){if(t.yn.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(An,"snapEndpointToBoundary");function Je(t,e,n){const o=t[e];for(let s=e+n;s>=0&&so.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(os,"intersectRanges");function Rn(t,e){return e==="left"||e==="right"?Ze(t.top,t.bottom):Ze(t.left,t.right)}d(Rn,"clearanceRangeForSide");function Qe(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)0?os(r):void 0}d(ss,"straightClearanceRange");function Nn(t,e,n,o,s){const r=ss(t,e,n,o,s);if(!r)return;const a=s?t.y:t.x,l=Math.min(r.hi,Math.max(r.lo,a));if(!(Math.abs(l-a)({...l}));for(let l=e;l>=0&&l=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)o.bottom+nt;case"left":return ht(e,n,nt)&&n.xo.right+nt}}d(Bn,"leavesOutward");function kn(t,e,n){if(t.length<3)return t;if(n){const r=Pn(t[0],t[1],e);return r&&Bn(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Pn(t[o-1],t[o],e);return s&&Bn(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(kn,"collapseOwnBorderStub");function cs(t,e,n){let o=t;if(e){const r=Je(o,0,1);if(r){const a=An(r,o[0],e);a!==o[0]&&(o=[a,...o.slice(1)])}o=kn(o,e,!0)}if(n){const r=o.length-1,a=Je(o,r,-1);if(a){const l=An(a,o[r],n,!0);l!==o[r]&&(o=[...o.slice(0,r),l])}o=kn(o,n,!1)}const s=fo(o,e,n);return s!==o||o.length===2?s:(e&&(o=On(o,e,!0)),n&&(o=On(o,n,!1)),o)}d(cs,"snapAndCollapseEndpoints");function Fn(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=cs(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const a=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=a}}d(Fn,"prepareEdgeEndpointsForRenderer");function uo(t){return new Map(t.map(e=>[e.id,e]))}d(uo,"buildNodeMap");function as(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(as,"resolveTopLevelGroupId");function _n(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(_n,"groupDepth");function ho(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const a=r.x,l=r.y;if(typeof a!="number"||typeof l!="number")continue;const f=r.width??0,i=r.height??0;e=Math.min(e,a-f/2),n=Math.max(n,a+f/2),o=Math.min(o,l-i/2),s=Math.max(s,l+i/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(ho,"boundsForChildren");function ls(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(ls,"applyGroupBounds");function fs(t){const e=uo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>_n(s,e)-_n(o,e));for(const o of n){const s=t.filter(a=>a.parentId===o.id),r=ho(s);r&&ls(o,r)}}d(fs,"recomputeNestedGroupBounds");function tn(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(f=>!f.isGroup);let r=1/0,a=-1/0;for(const f of s){const i=f[e];typeof i=="number"&&(r=Math.min(r,i),a=Math.max(a,i))}if(!Number.isFinite(r)||!Number.isFinite(a))return!1;const l=d(f=>r+a-f,"mirror");for(const f of n){const i=f[e];typeof i=="number"&&(f[e]=l(i));const g=f.groupTitleRect;g&&(f.groupTitleRect=e==="x"?{...g,left:l(g.right),right:l(g.left)}:{...g,top:l(g.bottom),bottom:l(g.top)})}for(const f of o)for(const i of f.points??[])i[e]=l(i[e]);return!0}d(tn,"mirrorAxis");function ds(t){return(t.nodes??[]).some(n=>!n.isGroup)?tn(t,"y"):!0}d(ds,"applyBtDirectionTransform");function us(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,a=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-a)*C+l,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-a)*C+l,mt=j-r;G.x=dt,G.y=mt}fs(n);const h=n.filter(P=>P.isGroup&&!P.parentId);if(h.length===0)return e==="RL"&&tn(t,"x"),!0;const p=uo(n),c=new Map;for(const P of n){if(P.isGroup)continue;const G=as(P,p);if(!G)continue;const j=c.get(G)??[];j.push(P),c.set(G,j)}let y=0;for(const P of h){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of h){const G=c.get(P.id)??[],j=ho(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),I=T+2*m,w=l+I,O=(M+E)/2-I/2-l,F=O+w/2,H=Math.max(y,l);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;PC.cy?v.bottom:v.top,H=C.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:F},T={x:H,y:l.y},m={x:l.x,y:l.y}}else{const F=h.cx>C.cx?v.right:v.left,H=C.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:F,y:H},T={x:l.x,y:H},m={x:l.x,y:l.y}}const I=oe(E,T,se),w=oe(T,m,se);if(I&&w||!I&&wt(E,T,o,[g],1)||!w&&wt(T,m,o,[x],1))continue;const R=!I&&Ke(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!w&&Ke(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){I?y=[T,m]:w?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(hs,"portSwapToLShape");function gs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values());for(const l of t){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<4)continue;const i=pt(f,.001);if(i.length<4)continue;const g=i.length-1,x=i[g],C=i[g-1],h=i[g-2],p=x.x-C.x,c=x.y-C.y,y=Math.hypot(p,c);if(y>=10||y<.001)continue;const v=C.x-h.x,M=C.y-h.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(C,x,.001),m=At(C,x,.001),I=Tt(h,C,.001),w=At(h,C,.001);if(!(T&&w||m&&I))continue;const R=l.end,k=l.start,O=R?e.get(R):void 0;if(!O)continue;const F=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(w){const W=M<0;G={x:F,y:h.y},j={x:F,y:W?P.bottom:P.top}}else{const W=v>0;G={x:h.x,y:H},j={x:W?P.right:P.left,y:H}}if(wt(G,j,r,R?[R]:[],-2)||wt(G,j,a,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&so(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W{for(const at of t){if(at===l||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt=0){const W=i[g-3],et=[k,R].filter(at=>!!at);if(wt(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...i.slice(0,g-2),G,j];l.points=Pt;const Q=l.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(gs,"collapseShortTerminalStub");var Z=.001,Ft=8,it=Re,xn=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function ps(t,e){const s=d((h,p)=>{const c=h.x??0,y=h.y??0,v=p.x-c,M=p.y-y;let E=(h.width??0)/2,T=(h.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:c+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:c+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((h,p)=>{const c=pt(h.points??[]);if(c.length<2)return;const y=p?h.start:h.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?c[0]:c[c.length-1],T=p?c[1]:c[c.length-2],m=s(v,E);let I=E;if(xn(T,m)&&(I=T),ft(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,I.y),max:Math.max(m.y,I.y),boundary:m,railEnd:I,rect:M};if(ht(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,I.x),max:Math.max(m.x,I.x),boundary:m,railEnd:I,rect:M}},"terminalLaneFor"),a=d((h,p)=>Math.max(0,Math.min(h.max,p.max)-Math.max(h.min,p.min)),"projectedOverlapLength"),l=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:h.orientation==="H"?(Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1)&&ft(h.boundary,p.boundary,1):(Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1)&&ht(h.boundary,p.boundary,1),"sameTerminalFace"),f=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:a(h,p)>=Ft&&Math.abs(h.coord-p.coord)<.5,"exactTerminalLaneConflict"),i=d((h,p)=>{if(h.nodeId!==p.nodeId||h.orientation!==p.orientation||h.orientation!=="H"||h.atStart===p.atStart)return!1;const c=a(h,p);if(c2*y?!1:l(h,p)&&Math.abs(h.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((h,p)=>{const c=pt(h.edge.points??[]);if(c.length<2)return;const y=h.orientation==="V"?{x:h.boundary.x+p,y:h.boundary.y}:{x:h.boundary.x,y:h.boundary.y+p},v=h.orientation==="V"?{x:h.railEnd.x+p,y:h.railEnd.y}:{x:h.railEnd.x,y:h.railEnd.y+p};if(!d(()=>Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1?ht(y,h.boundary,Z)&&y.x>=h.rect.left+1&&y.x<=h.rect.right-1:Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1?ft(y,h.boundary,Z)&&y.y>=h.rect.top+1&&y.y<=h.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(h.atStart){const I=c.length>1&&oe(c[1],h.railEnd,Z),w=c.slice(I?2:1),R=w[0];return R&&!xn(R,v)?void 0:[y,v,...w]}const E=c.length>1&&oe(c[c.length-2],h.railEnd,Z),T=c.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!xn(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(h=>{const p=h.edge,c=pt(p.points??[]);if(c.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,I=E.x??0,w=E.y??0,[R,k]=c;return ht(R,k,Z)&&Math.abs(m-w)<1&&Math.abs(T-I)>1||ft(R,k,Z)&&Math.abs(T-I)<1&&Math.abs(m-w)>1},"laneIsStraightCollinearConnector"),C=[-7,7,-14,14,-21,21];for(let h=0;h<8;h++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let c=!1;for(let y=0;y{const R=x(I),k=x(w);return R!==k?Number(R)-Number(k):+!w.atStart-+!I.atStart});for(const I of m){for(const w of C){const R=g(I,w);if(!R)continue;const k=r({...I.edge,points:R},I.atStart);if(!(!k||p.some(O=>O.edge!==I.edge&&(f(k,O)||T&&i(k,O))))){I.edge.points=R,c=!0;break}}if(c)break}}if(!c)return}}d(ps,"separateSharedRenderedTerminalLanes");function ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((l,f)=>{const i=l.start,g=l.end,x=it(f);if(x.length!==f.length-1)return!1;const C=[i,g].filter(h=>!!h);for(const h of x)if(wt(h.a,h.b,o,C,-2)||wt(h.a,h.b,s,[],-2))return!1;for(const h of t){if(h===l||h.isLayoutOnly)continue;const p=h.points;if(!(!p||p.length<2)){for(const c of x)for(const y of it(pt(p)))if(ce(c,y,.5)>=Ft||le(c.a,c.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),a=d((l,f)=>{if(f+4>=l.length)return;const i=l[f],g=l[f+1],x=l[f+2],C=l[f+3],h=l[f+4],p=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&ft(i,C,Z)&&ft(i,h,Z)&&ft(g,x,Z)&&(g.x-i.x)*(C.x-x.x)<0,c=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&ht(i,C,Z)&&ht(i,h,Z)&&ht(g,x,Z)&&(g.y-i.y)*(C.y-x.y)<0;if(p||c)return pt([...l.slice(0,f+1),h,...l.slice(f+5)]);if(f+5>=l.length)return;const y=l[f+5],v=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&At(h,y)&&ft(i,h,Z)&&ft(i,y,Z)&&ft(x,C,Z)&&(x.x-g.x)*(h.x-C.x)<0,M=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&Tt(h,y)&&ht(i,h,Z)&&ht(i,y,Z)&&ht(x,C,Z)&&(x.y-g.y)*(h.y-C.y)<0;if(!(!v&&!M))return pt([...l.slice(0,f+1),y,...l.slice(f+6)])},"withoutDogleg");for(let l=0;l<8;l++){let f=!1;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(let x=0;x<=g.length-5;x++){const C=a(g,x);if(!(!C||!r(i,C))){i.points=C,f=!0;break}}if(f)break}if(!f)return}}d(ms,"collapseRedundantRectangularDoglegs");function Dn(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(p=>!p.isLayoutOnly),f=d((p,c,y)=>pt(p===c?y??[]:p.points??[]),"pointsFor"),i=d((p,c)=>{let y=0;for(let v=0;v{const c=it(p);if(c.length!==3)return;const y=c[1];if(!(c[0].horizontal===y.horizontal||c[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return c.horizontal?zt(c.a.x,c.b.x,M.left,M.right)>=Ft&&c.a.y>=M.top-2&&c.a.y<=M.bottom+2:zt(c.a.y,c.b.y,M.top,M.bottom)>=Ft&&c.a.x>=M.left-2&&c.a.x<=M.right+2})},"blockingRectsFor"),C=d((p,c,y)=>{const v=p.map(E=>({...E}));if(c.horizontal)v[c.index].y=y,v[c.index+1].y=y;else if(c.vertical)v[c.index].x=y,v[c.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),h=d((p,c,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(c);if(M.length!==c.length-1)return!1;for(const E of M)if(wt(E.a,E.b,r,v,-2)||wt(E.a,E.b,a,[],-2))return!1;for(const E of l)if(E!==p){for(const T of M)for(const m of it(f(E)))if(ce(T,m,.5)>=Ft)return!1}return i(p,c)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const c=i();let y=!1;for(const v of l){const M=f(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(I=>I.rect.top))-20,Math.max(...T.map(I=>I.rect.bottom))+20]:[Math.min(...T.map(I=>I.rect.left))-20,Math.max(...T.map(I=>I.rect.right))+20];for(const I of m){const w=C(M,E.segment,I);if(!(!w||!h(v,w,c))){v.points=w,y=!0;break}}if(y)break}if(!y)return}}d(Dn,"liftObstacleHuggingSameSideRails");function Hn(t,e){const o=d(f=>{const i=f.groupTitleRect;if(!(!i||typeof i.left!="number"||typeof i.right!="number"||typeof i.top!="number"||typeof i.bottom!="number"||!Number.isFinite(i.left)||!Number.isFinite(i.right)||!Number.isFinite(i.top)||!Number.isFinite(i.bottom)||i.right<=i.left||i.bottom<=i.top))return{left:i.left,right:i.right,top:i.top,bottom:i.bottom}},"validTitleRect"),s=d(f=>{if(!f.isGroup||f.parentId)return;const i=f.direction,g=typeof i=="string"?i.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(f),C=f.y,h=f.height;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(c<=0||p{if(!f.horizontal)return!1;const g=f.a.y;return g<=i.top+Z||g>=i.bottom-Z?!1:zt(f.a.x,f.b.x,i.left,i.right)>=Ft},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(f=>!!f);if(a.length===0)return;let l=0;for(const f of t){if(f.isLayoutOnly)continue;const i=pt(f.points??[]);for(const g of it(i))for(const x of a)r(g,x.rect)&&(l=Math.max(l,x.rect.bottom-g.a.y+4))}if(!(l<=Z))for(const f of a){const i=f.node.y,g=f.node.height;typeof i!="number"||typeof g!="number"||!Number.isFinite(i)||!Number.isFinite(g)||g<=0||(f.node.y=i-l/2,f.node.height=g+l,f.node.groupTitleRect={...f.rect,top:f.rect.top-l,bottom:f.rect.bottom-l})}}d(Hn,"liftTopLaneTitleBandsAboveRails");function Xn(t,e){const o=d(i=>{const g=i.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(i=>{if(!i.isGroup||i.parentId||i.direction!=="LR")return;const x=o(i),C=i.x,h=i.width;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(p<=0||c{if(!i.vertical)return!1;const x=i.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(i.a.y,i.b.y,g.top,g.bottom)>=Ft},"verticalSegmentIntersectsTitle"),a=d((i,g)=>{if(!i.horizontal)return!1;const x=i.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(i.a.x,i.b.x,g.left,g.right)>=Ft},"horizontalSegmentIntersectsTitle"),l=[...e.values()].map(s).filter(i=>!!i);if(l.length===0)return;let f=0;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(const x of it(g))for(const C of l)if(r(x,C.rect))f=Math.max(f,C.rect.right-x.a.x+4);else if(a(x,C.rect)){const h=Math.min(x.a.x,x.b.x);f=Math.max(f,C.rect.right-h+4)}}if(!(f<=Z))for(const i of l){const g=i.node.x,x=i.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(i.node.x=g-f/2,i.node.width=x+f,i.node.groupTitleRect={...i.rect,left:i.rect.left-f,right:i.rect.right-f})}}d(Xn,"shiftLeftLaneTitleBandsLeftOfRails");function ys(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,c=new Map)=>pt(c.get(p)??p.points??[]),"replacementPointsFor"),a=d((p=new Map)=>{let c=0;for(let y=0;ys.reduce((c,y)=>c+Qt(r(y,p)),0),"totalBends"),f=d(p=>{const c=r(p);if(c.length<4)return;const y=c[c.length-2],v=c[c.length-1];if(!(!Tt(y,v,Z)&&!At(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),i=d((p,c)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:c.tailStart.y};else if(At(v,M,Z))E={x:c.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,c.tailStart,c.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(c))if(wt(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,c,y)=>{for(const v of s)if(v!==p){for(const M of it(c))for(const E of it(r(v,y)))if(ce(M,E,.5)>=Ft)return!0}return!1},"pathHasSharedTrack"),C=d((p,c,y)=>!g(p,c)&&!x(p,c,y),"candidateIsSafe"),h=d(()=>{const p=new Map;for(const c of s){const y=c.end;if(!y||!e.has(y)||r(c).length<4)continue;const M=p.get(y)??[];M.push(c),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const c=a();if(c===0)return;const y=l();let v,M=c,E=y;for(const T of h().values())for(let m=0;m=c||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(ys,"swapDestinationTerminalTailsToReduceCrossings");function xs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(T=>!T.isLayoutOnly),f=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),i=d((T=new Map)=>{let m=0;for(let I=0;Il.reduce((m,I)=>m+Qt(f(I,T)),0),"totalBends"),x=d(T=>{const m=T.start,I=T.end,w=m?e.get(m):void 0,R=I?e.get(I):void 0,k=w?qt(w):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),C=d((T,m,I)=>{if(I.index<=0||I.index+1>=m.length-1)return;const w=x(T);if(w){if(I.vertical){const R=I.a.x,k=Math.min(w.src.left,w.dst.left),O=Math.max(w.src.right,w.dst.right),F=RO+Z?"right":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"vertical",side:F,coord:R,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const R=I.a.y,k=Math.min(w.src.top,w.dst.top),O=Math.max(w.src.bottom,w.dst.bottom),F=RO+Z?"bottom":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"horizontal",side:F,coord:R,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),h=d(()=>{const T=[];for(const m of l){const I=f(m);for(const w of it(I)){const R=C(m,I,w);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=Ft,"railsInteract"),c=d(T=>{const m=[],I=new Set;for(const w of T){if(I.has(w))continue;const R=[w],k=[];for(I.add(w);R.length>0;){const O=R.pop();k.push(O);for(const F of T)!I.has(F)&&p(O,F)&&(I.add(F),R.push(F))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const I of T)m.some(w=>Math.abs(w-I.coord){const m=T.map(R=>R.coord),I=y(T),w=[];if(T.length<=6){const R=new Array(I.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((F,H)=>Math.abs(F-m[H])>=Z)&&w.push([...k]);return}for(const[F,H]of I.entries())R[F]||(R[F]=!0,k.push(H),O(),k.pop(),R[F]=!1)},"visit");return O(),w}for(let R=0;R{const I=new Map;for(const[R,k]of T.entries()){const O=m[R],F=I.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(F[k.segmentIndex].x=O,F[k.segmentIndex+1].x=O):(F[k.segmentIndex].y=O,F[k.segmentIndex+1].y=O),I.set(k.edge,F)}const w=new Map;for(const[R,k]of I){const O=ae(pt(k));if(it(O).length!==O.length-1)return;w.set(R,O)}return w},"replacementsForAssignment"),E=d(T=>{for(const[m,I]of T){const w=[m.start,m.end].filter(R=>!!R);for(const R of it(I))if(wt(R.a,R.b,r,w,-2)||wt(R.a,R.b,a,[],-2))return!1}for(let m=0;m=Ft)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=i();if(m===0)return;let I,w=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of c(h()))for(const F of v(O)){const H=M(O,F);if(!H||!E(H))continue;const P=i(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(F[mt]-dt.coord),0);P>w||P===w&&(G>R||G===R&&j>=k)||(I=H,w=P,R=G,k=j)}if(!I)return;for(const[O,F]of I)O.points=F}}d(xs,"reassignCrossingExternalRailChannels");function bs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(h=>!h.isLayoutOnly),a=d((h,p,c)=>pt(h===p?c??[]:h.points??[]),"pointsFor"),l=d(h=>it(h).reduce((p,c)=>{const y=c.a.x-c.b.x,v=c.a.y-c.b.y;return p+Math.hypot(y,v)},0),"pathLength"),f=d((h,p)=>{let c=0;for(let y=0;y{if(h.horizontal){const c=h.a.y;return(Math.abs(c-p.top)<1||Math.abs(c-p.bottom)<1)&&zt(h.a.x,h.b.x,p.left,p.right)>=Ft}if(h.vertical){const c=h.a.x;return(Math.abs(c-p.left)<1||Math.abs(c-p.right)<1)&&zt(h.a.y,h.b.y,p.top,p.bottom)>=Ft}return!1},"segmentRunsAlongRectBorder"),g=d(h=>{const p=[h.start,h.end].filter(y=>!!y),c=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&c.push(M)}return c},"endpointRectsFor"),x=d((h,p)=>{if(p+3>=h.length)return[];const c=h[p],y=h[p+1],v=h[p+2],M=h[p+3],E=Tt(c,y,Z)&&At(y,v,Z)&&Tt(v,M,Z),T=At(c,y,Z)&&Tt(y,v,Z)&&At(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-c.x)!==Math.sign(M.x-v.x):Math.sign(y.y-c.y)!==Math.sign(M.y-v.y)))return[];const I=ft(c,M,Z)||ht(c,M,Z)?[]:[{x:c.x,y:M.y},{x:M.x,y:c.y}],w=I.length===0?[[...h.slice(0,p+1),...h.slice(p+3)]]:I.map(k=>[...h.slice(0,p+1),k,...h.slice(p+3)]),R=new Set;return w.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(F=>oe(F,M,Z)))return!1;const O=k.map(F=>`${F.x.toFixed(3)},${F.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),C=d((h,p,c)=>{const y=[h.start,h.end].filter(M=>!!M),v=g(h);for(const M of it(p))if(wt(M.a,M.b,o,y,-2)||wt(M.a,M.b,s,[],-2)||v.some(E=>i(M,E)))return!1;for(const M of r)if(M!==h){for(const E of it(p))for(const T of it(a(M)))if(ce(E,T,.5)>=Ft)return!1}return f(h,p)<=c},"candidateIsSafe");for(let h=0;h<8;h++){const p=f();let c,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=a(T),I=Qt(m,Z),w=l(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),F=l(k);if(!(Ov||P===v&&(O>M||O===M&&F>=E)||(c=T,y=k,v=P,M=O,E=F)}}if(!c||!y)return;c.points=y}}d(bs,"shortcutRedundantOrthogonalJogs");function Ms(t,e){const a=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const _=N.x??0,D=N.y??0,V=qt(N);V&&a.push({id:String(N.id??""),cx:_,cy:D,rect:V})}if(a.length===0)return;const l=new Map(a.map(N=>[N.id,N])),f=a.map(N=>({id:N.id,rect:N.rect})),i=["top","bottom","left","right"],g={top:Math.min(...a.map(N=>N.rect.top))-20,bottom:Math.max(...a.map(N=>N.rect.bottom))+20,left:Math.min(...a.map(N=>N.rect.left))-20,right:Math.max(...a.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),C=new Map(x.map((N,_)=>[N,_])),h=d(N=>{const _=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+_*20*V);return D},"outwardTracksForSide"),p=d((N,_=new Map)=>pt(_.get(N)??N.points??[]),"replacementPointsFor"),c=d((N,_)=>{let D=0;for(const V of N)for(const u of _)le(V.a,V.b,u.a,u.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,_)=>c(it(N),it(_)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let _=0;const D=[],V=new Set,u=[],b=d(S=>{V.has(S)||(V.add(S),u.push(S))},"addEdge");for(let S=0;S0&&(_+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return u.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),{count:_,pairs:D,edgeSet:V,edges:u}},"crossingSnapshot"),M=d((N,_)=>{const D=new Set(_.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let u=0;for(let b=0;b{const _=new Map;for(const u of N.pairs){const b=_.get(u.first)??new Set;b.add(u.second),_.set(u.first,b);const S=_.get(u.second)??new Set;S.add(u.first),_.set(u.second,S)}const D=[],V=new Set;for(const u of N.edges){if(V.has(u))continue;const b=[u],S=[];for(V.add(u);b.length>0;){const L=b.pop();S.push(L);for(const A of _.get(L)??[])V.has(A)||(V.add(A),b.push(A))}S.sort((L,A)=>(C.get(L)??0)-(C.get(A)??0)),S.length>1&&D.push(S)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(_=>!!_),"endpointIdsFor"),m=d(N=>{const _=[];for(const D of E(N)){const V=new Set(D),u=new Set(D.flatMap(S=>T(S))),b=[...D];for(const S of x)V.has(S)||T(S).some(L=>u.has(L))&&b.push(S);b.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),_.push(b)}return _},"pairSearchGroups"),I=d((N,_,D)=>M(N,new Map([[_,D]])),"crossingCountWithSingleReplacement"),w=d(N=>{const _=new Map;for(const D of N.pairs)_.set(D.first,(_.get(D.first)??0)+D.count),_.set(D.second,(_.get(D.second)??0)+D.count);return _},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((_,D,V)=>{const u=N[V];return _+Math.abs(D.x-u.x)+Math.abs(D.y-u.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((_,D)=>_+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((_,D)=>_+R(p(D,N)),0),"totalLength"),F=d((N,_,D=new Map)=>{const V=it(_);for(const u of x)if(u!==N){for(const b of V)for(const S of it(p(u,D)))if(ce(b,S,.5)>=Ft)return!0}return!1},"pathHasSegmentConflict"),H=d((N,_)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(_))if(wt(V.a,V.b,f,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,_)=>{const D=ae(pt(_));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,_,D)=>{switch(_){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,_,D,V)=>{const u=D==="left"||D==="top"?-1:1,b=[j(_,D,V),g[D]];for(const S of b)for(let L=0;L<=2;L++)P(N,io(_,D,V,S+u*20*L))},"addSameSideCandidates"),dt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:b,y:_.y},{x:b,y:S},{x:V.x,y:S},V])},"addHorizontalToVerticalCandidates"),mt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:_.x,y:b},{x:S,y:b},{x:S,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,_,D,V,u)=>{const b=[...h("top"),...h("bottom")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:S,y:_.y},{x:S,y:A},{x:L,y:A},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,_,D,V,u)=>{const b=[...h("left"),...h("right")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:_.x,y:S},{x:A,y:S},{x:A,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const _=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(u=>`${u.x.toFixed(3)},${u.y.toFixed(3)}`).join("|");return _.has(V)||D.length<2?!1:(_.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,_,D,V)=>{const u=[],b=ro(N,_,D,V,20,Z);b&&P(u,b),_===V&&J(u,N,_,D);const S=G(_),L=G(V);return S&&!L?dt(u,N,_,D,V):!S&&L?mt(u,N,_,D,V):S?kt(u,N,_,D,V):Pt(u,N,_,D,V),Q(u)},"buildCandidatesForSides"),et=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="top"||S==="bottom"?h(S):b;for(const B of u){P(N,[_,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of A)P(N,[_,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="left"||S==="right"?h(S):u;for(const B of b){P(N,[_,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of A)P(N,[_,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const _=N.start,D=N.end,V=D?l.get(D):void 0;if(!_||!V)return[];const u=pt(N.points??[]);if(u.length<4)return[];const b=u[0],S=u[1],L=[];return At(b,S,Z)?et(L,b,S,V):Tt(b,S,Z)&&at(L,b,S,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const _=N.start,D=N.end,V=_?l.get(_):void 0,u=D?l.get(D):void 0;if(!V||!u)return[];const b=[];for(const S of i){const L=Ie(V,S);for(const A of i)b.push(...W(L,S,Ie(u,A),A))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,_,D)=>{const V=new Set;for(const u of x){if(u===N)continue;const b=D.get(u)??it(p(u));_.some(S=>b.some(L=>ce(S,L,.5)>=Ft))&&V.add(u)}return V},"sharedTrackConflictsFor"),jt=d((N,_,D,V)=>{const u=new Set;return xt(N).map(S=>ae(pt(S))).filter(S=>{if(H(N,S))return!1;const L=S.map(A=>`${A.x.toFixed(3)},${A.y.toFixed(3)}`).join("|");return u.has(L)||S.length<2?!1:(u.add(L),!0)}).map(S=>{const L=it(S);let A=0;for(const B of x)B!==N&&(A+=c(L,D.get(B)??it(p(B))));return{candidate:S,candidateSegments:L,crossings:_.count-(V.get(N)??0)+A,bends:Qt(S,Z),totalBends:Qt(S),length:R(S)}}).filter(({crossings:S})=>S<=_.count).sort((S,L)=>S.crossings-L.crossings||S.bends-L.bends||S.length-L.length).slice(0,48).map(S=>({path:S.candidate,segments:S.candidateSegments,sharedTrackConflicts:Vt(N,S.candidateSegments,D),totalBends:S.totalBends,length:S.length}))},"pairCandidatesFor"),Ut=d((N,_,D,V,u,b)=>{let S=0;for(const A of N.pairs)(A.first===_||A.second===_||A.first===V||A.second===V)&&(S+=A.count);let L=c(D.segments,u.segments);for(const A of x){if(A===_||A===V)continue;const B=b.get(A)??it(p(A));L+=c(D.segments,B)+c(u.segments,B)}return N.count-S+L},"pairCrossingCount"),te=d((N,_)=>{for(const D of N.sharedTrackConflicts)if(D!==_)return!1;return!0},"conflictsOnlyWith"),Se=d((N,_)=>N.segments.some(D=>_.segments.some(V=>ce(D,V,.5)>=Ft)),"candidatesShareTrack"),de=d((N,_,D,V)=>te(_,D.edge)&&te(V,N.edge)&&!Se(_,V),"pairCandidatesAreCompatible"),Ce=d((N,_,D,V,u)=>{const b=Ut(N.current,_.edge,D,V.edge,u,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[_.edge,D.path],[V.edge,u.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(_.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+u.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(_.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+u.length}},"scorePairReplacement"),an=d((N,_)=>N.crossings<_.crossings||N.crossings===_.crossings&&(N.bends<_.bends||N.bends===_.bends&&N.length<_.length),"pairScoreIsBetter"),ln=d((N,_,D,V)=>{let u=V;for(const b of _.candidates)for(const S of D.candidates){if(!de(_,b,D,S))continue;const L=Ce(N,_,b,D,S);L&&an(L,u)&&(u=L)}return u},"bestScoreForOptionPair"),fn=d(N=>{const _=k(),D=O(),V=vt(),u=w(N),b=new Map(x.map(q=>[q,Qt(p(q))])),S=new Map(x.map(q=>[q,R(p(q))])),L=new Map,A=m(N);for(const q of A)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,u);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:_,length:D};const U={current:N,currentBends:_,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:S,baseSegments:V};for(const q of A){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const _=v(),D=_.count;if(D===0)return;let V,u,b=D,S=Number.POSITIVE_INFINITY;for(const A of _.edges){const B=Qt(p(A),Z);for(const U of xt(A)){const q=H(A,U),z=!q&&F(A,U),Y=I(_,A,U),ot=Qt(U,Z);q||z||!(Yb||Y===b&&ot>=S||(V=A,u=U,b=Y,S=ot)}}if(V&&u){V.points=u;continue}const L=fn(_);if(!L)return;for(const[A,B]of L)A.points=B}}d(Ms,"resolveRenderedOrthogonalCrossings");var pe=.001,Rr=8;function Is(t,e){const{nodeInfoById:n,realNodeRects:o}=sn(e),s=["top","bottom","left","right"],r=20,a={top:Math.min(...o.map(c=>c.rect.top))-r,bottom:Math.max(...o.map(c=>c.rect.bottom))+r,left:Math.min(...o.map(c=>c.rect.left))-r,right:Math.max(...o.map(c=>c.rect.right))+r},l=d((c,y,v,M)=>{const E=[],T=ro(c,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(io(c,y,v,a[y])),E},"buildOrthogonalPathCandidates"),f=d((c,y)=>{for(let v=0;v{let M=0;const E=Re(c,pe),T=y.start,m=y.end;for(const I of t){if(I===y||I.isLayoutOnly)continue;const w=I.start,R=I.end;if(!v&&T&&m&&(w===T||w===m||R===T||R===m))continue;const k=I.points;if(!(!k||k.length<2))for(const O of E)for(const F of Re(k,pe)){if(ao(O.a,O.b,F.a,F.b,pe,pe)){M++;continue}ce(O,F,pe)>=Rr&&M++}}return M},"pathConflictCount"),g=4,x=d((c,y)=>{const v=Math.abs(c.y-y.rect.top),M=Math.abs(c.y-y.rect.bottom),E=Math.abs(c.x-y.rect.left),T=Math.abs(c.x-y.rect.right);let m="top",I=v;return M{const M=C.get(c)??[];M.push({side:y,edgeId:v}),C.set(c,M)},"addFaceClaim");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points??[];if(y.length<1)continue;const v=c.id??"",M=c.start,E=c.end;if(M){const T=n.get(M);T&&h(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&h(E,x(y[y.length-1],T),v)}}const p=d((c,y,v)=>C.get(c)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v0){const mt=i(J,c,!0);if(mt>O||mt===O&&dt>=F)continue;O=mt,F=dt,k=J;continue}i(J,c)>R||dtG.edgeId!==I));const P=C.get(E);P&&C.set(E,P.filter(G=>G.edgeId!==I)),h(M,x(k[0],T),I),h(E,x(k[k.length-1],m),I)}}}d(Is,"simplifyDetouredEdges");var Kt=.001,No=10,$e=7;function Yn(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const a=r.x-s.x,l=r.y-s.y;if(!(Math.abs(a)+Math.abs(l)r&&We(t,Ss(r)))}d(Gn,"labelOverlapsOwnMarker");function Ve(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const c=p.points;if(!(!c||c.length<2))for(let y=0;y{const y=Ln(c,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&We(y,M))return!0;return!1},"labelOverlapsForeignNode"),i=d((p,c)=>{const y=Ln(c,r);for(const v of n)if(v.edgeId!==p&&on(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,c,y)=>f(p,y)||i(c,y),"labelOverlapsAnything"),x=[],C=d(p=>{for(const{id:c,rect:y}of s)if(qo(y,p))return c},"findContainingLane"),h=d((p,c)=>x.some(y=>y.labelId!==p&&We(c,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const c=p.labelNodeId;if(!c)continue;const y=e.get(c);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx0?m:T,w=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===w,gt=et.orientation===w;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],F=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=we(Q.midX,Q.midY,M,E),et=C(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+a,xt=at.rect.right-M/2-a,vt=at.rect.top+E/2+a,Vt=at.rect.bottom-E/2-a;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=we(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+l;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt{const W=R(Q);for(const et of W)for(const at of F){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!Gn(xt.rect,v)&&!h(c,xt.rect)&&!g(c,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!Gn(vt.rect,v)&&!h(c,vt.rect)&&!f(c,vt.rect)&&(et||!i(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(I)??(I.lengthet.labelId===c);W>=0?x[W]={labelId:c,rect:Q}:x.push({labelId:c,rect:Q})}}}d(Ve,"anchorLabelsToPolyline");var bn=1e-6,Nr=8,Oo=Nr/2,Or=3;function $n(t,e){return t{const g=$n(l,f);let x=0;const C=d(h=>{if(!h)return;const p=s.get(h);if(!p)return;const c=i==="x"?p.w/2:p.h/2;c>x&&(x=c)},"consider");C(a.labelNodeId);for(const h of t){if(h===a||h.isLayoutOnly)continue;const p=h.start,c=h.end;!p||!c||$n(p,c)===g&&C(h.labelNodeId)}return x>0?x+Or:0},"labelClearanceFor");for(const a of t){if(a.isLayoutOnly)continue;const l=a.points;if(!oo(l,bn))continue;const f=co(a,n,bn);if(!f)continue;const{srcId:i,dstId:g,srcInfo:x,dstInfo:C,collinearX:h,collinearY:p}=f;if(h===p)continue;let c,y;if(h){const m=C.cy>x.cy;c={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:C.cx,y:m?C.rect.top:C.rect.bottom}}else{const m=C.cx>x.cx;c={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?C.rect.left:C.rect.right,y:C.cy}}if(wt(c,y,o,[i,g],1))continue;const M=r(a,i,g,h?"x":"y"),E=M>Oo?M:Oo,T=[0,E,-E];for(const m of T){const I={...c},w={...y};if(h){if(I.x+=m,w.x+=m,I.x<=x.rect.left||I.x>=x.rect.right||w.x<=C.rect.left||w.x>=C.rect.right)continue}else if(I.y+=m,w.y+=m,I.y<=x.rect.top||I.y>=x.rect.bottom||w.y<=C.rect.top||w.y>=C.rect.bottom)continue;if(!wt(I,w,o,[i,g],1)&&!Ke(I,w,t,a,{epsilon:bn})){a.points=[I,w];break}}}}d(Cs,"straightenCollinearSiblingDetours");function zn(t,e){const{realNodeRects:f,labelNodeRects:i}=me(e.values()),g=d((m,I)=>Re(I,.001).map(w=>({...w,edge:m,interior:w.index>=1&&w.index<=I.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const I of t){if(I.isLayoutOnly)continue;const w=I.points;!w||w.length<2||m.push(...g(I,pt(w)))}return m},"allSegments"),C=d((m,I)=>m.horizontal&&I.horizontal?zt(m.a.x,m.b.x,I.a.x,I.b.x)>=8&&Math.abs(m.a.y-I.a.y)<7:m.vertical&&I.vertical?zt(m.a.y,m.b.y,I.a.y,I.b.y)>=8&&Math.abs(m.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),h=d((m,I)=>{const w=m.start,R=m.end,k=g(m,I);if(k.length!==I.length-1)return!1;const O=[w,R].filter(H=>!!H),F=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(wt(H.a,H.b,f,O,-2)||wt(H.a,H.b,i,F,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(C(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,I)=>{const w=pt(m.edge.points??[]);if(w.length<4||m.index>=w.length-1)return;const R=w.map(k=>({...k}));if(m.horizontal)R[m.index].y+=I,R[m.index+1].y+=I;else if(m.vertical)R[m.index].x+=I,R[m.index+1].x+=I;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),c=d((m,I)=>({x:m.x??(I.left+I.right)/2,y:m.y??(I.top+I.bottom)/2}),"nodeCenter"),y=d(m=>{const I=m.edge,w=pt(I.points??[]);if(w.length!==4||m.index!==1)return;const R=I.start?e.get(I.start):void 0,k=I.end?e.get(I.end):void 0,O=R?qt(R):void 0,F=k?qt(k):void 0,H=w.slice(m.index+2);if(!(!R||!k||!O||!F||H.length===0))return{sourceCenter:c(R,O),targetCenter:c(k,F),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,I,w,R,k,O)=>{const F=R.y>=w.y,H=F?k.bottom:k.top,P=H+(F?20:-20);if(F&&m.b.y<=P+.001||!F&&m.b.y>=P-.001)return;const G=m.a.x+I;return pt([{x:w.x,y:H},{x:w.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,I,w,R,k,O)=>{const F=R.x>=w.x,H=F?k.right:k.left,P=H+(F?20:-20);if(F&&m.b.x<=P+.001||!F&&m.b.x>=P-.001)return;const G=m.a.y+I;return pt([{x:H,y:w.y},{x:P,y:w.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,I)=>{const w=y(m);if(w){if(m.vertical)return v(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail);if(m.horizontal)return M(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const I=x();let w=!1;for(let R=0;RP.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&h(P.edge,j)){P.edge.points=j,w=!0;break}const J=E(P,G);if(J&&h(P.edge,J)){P.edge.points=J,w=!0;break}}if(w)break}}if(!w)return}}d(zn,"nudgeSharedInteriorSubpaths");function vs(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=o.x-n.x,l=o.y-n.y,f=s*l-r*a;if(Math.abs(f)<1e-10)return!1;const i=n.x-t.x,g=n.y-t.y,x=(i*l-g*a)/f,C=(i*r-g*s)/f,h=.01;return x>h&&x<1-h&&C>h&&C<1-h}d(vs,"segmentsIntersect");function Ls(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=Jo(e),r=[];for(const l of n){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<2)continue;const i=l.start,g=l.end,x=l.labelNodeId,C=l.id??`${i}->${g}`;for(const h of s)if(!(h.nodeId===i||h.nodeId===g)&&!(x&&h.nodeId===x)){for(let p=0;p0){const l=o.filter(i=>i.type==="edge-node-overlap").length,f=o.filter(i=>i.type==="edge-edge-crossing").length;In.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${l} edge-node overlap(s), ${f} edge crossing(s)`);for(const i of o)In.warn(`[SWIMLANE_VALIDATE] ${i.type}: ${i.detail}`)}return o}d(Ls,"validateSwimlanesLayout");function Es(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(l=>!l.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!us(t,e)||e==="BT"&&s.length>0&&!ds(t))return;for(const l of o){if(l.isLayoutOnly)continue;const f=l.points;!f||f.length<2||(l.points=ae(qe(f)))}Is(o,n),Cs(o,n),hs(o,n);const r=new Map;for(const l of n)r.set(String(l.id),l);Ve(o,r),ns(o,r),gs(o,r),zn(o,r),ps(o,r),ms(o,r),Dn(o,r),ys(o,r);const a=d(()=>{Ms(o,r),xs(o,r),bs(o,r),Ve(o,r),Fn(o,r),Dn(o,r),Ve(o,r),Fn(o,r)},"finalizeRenderedEdges");a(),zn(o,r),a(),Hn(o,r),Xn(o,r),Hn(o,r),Xn(o,r)}d(Es,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const a=`${r.id}:${r.src}->${r.dst}`;n.has(a)||(n.add(a),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function go(t,e){return t.edges.filter(n=>n.dst===e)}d(go,"incoming");function Ts(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ts,"buildSuccessorMap");function po(t){const e=Ts(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(po,"buildSortedSuccessorMap");function mo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(mo,"buildInDegreeMap");function yo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(yo,"sortedZeroInDegreeNodes");function rn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(rn,"buildPredecessorSuccessorMaps");function xo(t,e,n,o){let s=0;for(const a of t.nodes)o?.skipGroups&&t.nodeById.get(a)?.isGroup||(s=Math.max(s,n[a]??0));const r=Array.from({length:s+1},()=>[]);for(const a of e)o?.skipGroups&&t.nodeById.get(a)?.isGroup||r[Math.max(0,n[a]??0)].push(a);return r}d(xo,"buildLayersFromRanks");function Pe(t){const e=mo(t),n=yo(e),o=[],s=po(t);for(;n.length;){const r=n.shift();o.push(r);for(const a of s.get(r)??[])if(e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0){let l=0;for(;l{if(s-o<=1)return 0;const r=o+s>>1;let a=n(o,r)+n(r,s),l=o,f=r,i=o;for(;l=s||lx.dst===C.dst?x.id.localeCompare(C.id):x.dst.localeCompare(C.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const C=x.dst;o[C]===0?r(C):o[C]===1&&s.push(x)}o[g]=2},"dfs"),a=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of a)o[g]===0&&r(g);const l=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),f=e.edges.map(g=>l.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:f,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(As,"removeCycles_DFS");function ws(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const l=n(r)??r;return e.set(o,l),l},"resolve");for(const o of t.nodes)n(o);return e}d(ws,"buildTopLaneMap");function fe(t){const e=ws(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function cn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(cn,"buildTopLaneOrder");function Mo(t,e){const n=cn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const a of e)!o.has(a)||s.has(a)||(s.add(a),r.push(a));for(const a of n)s.has(a)||r.push(a);return r}d(Mo,"resolveTopLaneOrder");var Pr={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Po={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Rs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=rn(n);for(const m of r.values())m.sort((I,w)=>I.localeCompare(w));const a=Pe(n)??[...n.nodes].sort((m,I)=>m.localeCompare(I)),l=new Map;for(const[m,I]of a.entries())l.set(I,m);const f=new Map,i=new Map;for(const m of n.nodes)i.set(m,[]);for(const m of a){const I=(r.get(m)??[]).filter(w=>f.has(w));if(I.length>0){const w=Ns(m,I,{laneOf:o,rankHint:s,topoIndex:l});f.set(m,w),i.get(w).push(m)}else f.has(m)||f.set(m,null)}for(const m of n.nodes)f.has(m)||f.set(m,null);const g=new Set;for(const m of n.nodes)(f.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,I)=>{const w=l.get(m)??0,R=l.get(I)??0;return w===R?m.localeCompare(I):w-R}),C=Os(n),h=new Map;for(const[m,I]of C.entries())h.set(m,[...I].sort((w,R)=>w.localeCompare(R)));const p=Ps(h),c=Bs(h),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of c)for(const I of m.nodes){const w=y.get(I);w?w.push(m.id):y.set(I,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const I of i.get(m)??[])T(I);M.push(m)}},"walk");for(const m of x)T(m);for(const m of a)T(m);return{parent:f,children:i,roots:x,componentOf:p,blocks:c,nodeBlocks:y,adjacency:h,preorder:v,postorder:M,topologicalOrder:a}}d(Rs,"buildDrivingTree");function Ns(t,e,n){const o=n.laneOf(t);return[...e].sort((r,a)=>{const l=n.laneOf(r),f=n.laneOf(a),i=l!=null&&l===o,g=f!=null&&f===o;if(i!==g)return i?-1:1;const x=n.rankHint?.[r],C=n.rankHint?.[a];if(x!=null&&C!=null&&x!==C)return C-x;const h=n.topoIndex.get(r)??0,p=n.topoIndex.get(a)??0;return h!==p?h-p:r.localeCompare(a)})[0]}d(Ns,"chooseParent");function Os(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(Os,"buildAdjacency");function Ps(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const a of t.get(r)??[])e.has(a)||s.push(a)}}n++}return e}d(Ps,"assignComponents");function Bs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const a=d((l,f)=>{e.set(l,++r),n.set(l,r);for(const i of t.get(l)??[])i!==f&&(e.has(i)?(e.get(i)??0)<(e.get(l)??0)&&(o.push([l,i]),n.set(l,Math.min(n.get(l)??r,e.get(i)??r))):(o.push([l,i]),a(i,l),n.set(l,Math.min(n.get(l)??r,n.get(i)??r)),(n.get(i)??0)>=(e.get(l)??0)&&s.push(ks(l,i,o,s.length))))},"visit");for(const l of t.keys())e.has(l)||a(l,null);return s}d(Bs,"computeBlocks");function ks(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const a=n.pop();if(s.push(a),r.add(a[0]),r.add(a[1]),a[0]===t&&a[1]===e||a[0]===e&&a[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(ks,"popBlock");function Fs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,a=new Array(r).fill(-1),l=new Array(r).fill(0),f=[],i=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(a[T]=-1,l[T]=0,i.has(M)||(i.add(M),f.push(M)))}for(;f.length>0;){const M=f.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(i.has(m))continue;const I=s.get(m);I!=null&&(a[I]=E,l[I]=l[E]+1,i.add(m),f.push(m))}}for(const M of o){if(i.has(M))continue;const E=s.get(M);E!=null&&(a[E]=-1,l[E]=0,i.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M{if(M===-1||E===-1)return-1;l[M]>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const I=x[m][M],w=x[m][E];I===-1||w===-1||I!==w&&(M=I,E=w)}return x[0][M]},"lcaIndex"),h=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],I=e[T];if(m==null||I==null||(m>I&&([E,T]=[T,E],[m,I]=[I,m]),m==null||I==null||m===I))continue;const w=s.get(E),R=s.get(T);if(w==null||R==null)continue;const k=C(w,R);if(k===-1)continue;const O=h[k];for(let F=m;F{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:h[E],m=T?new Map(T):new Map,I=n.children.get(M)??[];for(const w of I){const R=v(w),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let F=R.get(k)??0;const H=e[w];H!=null&&H>k&&(F+=1),O.set(w,F)}c(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Fs,"computeSubtreeCrossCounts");function _s(t,e,n){const o=new Map,s=d(r=>{let a=n[r]??0;const l=[...e.get(r)??[]];l.sort(Io(n));for(const f of l){s(f);const i=o.get(f);i!=null&&(a=Math.min(a,i))}o.set(r,a)},"annotate");for(const r of t)s(r);return o}d(_s,"annotateMinimumLayers");function Io(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Io,"compareByRankThenId");function Ds(t,e,n,o){let s=0;for(const f of e){const i=n[f]??0;i>s&&(s=i)}const r=Array.from({length:s+1},()=>[]),a=new Set,l=d(f=>{if(a.has(f))return;a.add(f);const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f);for(const g of o(f))l(g)},"emit");for(const f of t)l(f);for(const f of e)if(!a.has(f)){const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f),a.add(f)}return r}d(Ds,"emitNodesInTreeOrder");function Hs(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d(Hs,"deduplicateLayers");function Xs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const a=e[s]??0,l=[],f=[],i=n.get(s);for(const g of r){const x=o.get(g)??a;x>a?l.push({child:g,min:x}):f.push(g)}return l.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),f.sort((g,x)=>{const C=i?.get(g)??0,h=i?.get(x)??0;if(C!==h)return C-h;const p=o.get(g)??a,c=o.get(x)??a;return p!==c?p-c:g.localeCompare(x)}),[...l.map(g=>g.child),...f]}}d(Xs,"createChildOrderer");function nn(t,e,n){const o=Rs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const a=Fs(t,e,o),l=[...r].sort(Io(e)),f=_s(l,s,e),i=Xs(s,e,a,f);let g=Ds(l,t.nodes,e,i);return g=Hs(g),g}d(nn,"buildMultitreeLayerOrder");function Ys(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),a=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&a.push(r.get(l.dst));return bo(a)}d(Ys,"countCrossingsBetweenAdjacent");function Vn(t,e,n){const o=[];for(const r of e){const a=n[r.src],l=n[r.dst];if(a==null||l==null||a===l)continue;let f=r.src,i=r.dst,g=a,x=l;a>l&&(f=r.dst,i=r.src,g=l,x=a);for(let C=g;C(n[C]??0)-(n[x]??0));for(const x of g){const C=n[x]??0;if(C===0)continue;let h=0;for(const v of o.get(x)??[])h=Math.max(h,(n[v]??0)+1);if(h>=C)continue;const p=C;n[x]=h;const c=nn(t,n,s),y=Vn(c,t.edges,n);y(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const a=t.edges.filter(c=>c.src===s);if(a.length===0)continue;let l=!1,f=0;for(const c of a){const y=n(c.dst);y==null||y===r?l=!0:f++}if(f===0||l)continue;let i=0,g=!1;for(const c of t.edges){if(c.dst!==s)continue;const y=n(c.src);y&&(y===r?g=!0:i++)}if(i>0||!g)continue;const x=e[s]??0,C=x+f;let h=0;for(const c of t.edges)c.dst===s&&(h=Math.max(h,(e[c.src]??0)+1));const p=Math.max(x,h,C);p!==x&&(e[s]=p)}}d($s,"adjustCrossLaneSources");function zs(t,e){const n=ye(t),o=Pe(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let a=Object.create(null);for(const f of o){const i=go(n,f),g=e?.ignoreCrossLaneEdges?i.filter(x=>{const C=r(x.src),h=r(f);return!C||!h?!0:C===h}):i;if(g.length===0)a[f]=0;else if(s&&g.length===1){const x=g[0].src,C=r(x),h=r(f);C!==h?a[f]=a[x]??0:a[f]=(a[x]??0)+1}else{let x=-1/0;for(const C of g)x=Math.max(x,(a[C.src]??0)+1);a[f]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(a=Gs(n,a)),e?.ignoreCrossLaneEdges&&$s(n,a),{layers:nn(n,a,r),rankOf:a,dummy:new Set}}d(zs,"assignLayers_LongestPath");function Vs(t,e){const n=ye(t),s={...zs(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:a,succs:l}=rn(n,p=>{if(e?.ignoreCrossLaneEdges){const c=r(p.src),y=r(p.dst);if(c&&y&&c!==y)return!1}return!0}),f=Pe(n)??[...n.nodes],i=[...f].reverse(),g=d((p,c)=>{let y=0;for(const E of a.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=l.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,c)),Math.min(Math.max(c,y),v)},"clampFeasible"),x=en.GRAVITY_ITERATIONS,C=d(p=>{let c=!1;for(const y of p){const v=a.get(y)??[],M=l.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((w,R)=>w+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((w,R)=>w+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),I=g(y,m);I!==s[y]&&(s[y]=I,c=!0)}return c},"relaxOrder");for(let p=0;p0){const y=Math.min(...c.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:xo(n,f,s),rankOf:s,dummy:new Set}}d(Vs,"assignLayers_Gravity");function js(t){const e=mo(t),n=po(t);let o=yo(e);const s=[];for(;o.length>0;){const r=[];for(const a of o){s.push(a);for(const l of n.get(a)??[])e.set(l,(e.get(l)??0)-1),(e.get(l)??0)===0&&r.push(l)}o=r.sort((a,l)=>a.localeCompare(l))}return s.length===t.nodes.length?s:null}d(js,"topoSortByGenerationIfAcyclic");function Us(t,e){const n=ye(t),o=e?.direction==="LR"?js(n)??[...n.nodes].sort():Pe(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),a=Object.create(null),l=new Map,f=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const C=go(n,g);let h=0;if(C.length>0)for(const v of C){const M=v.src,E=a[M]??0;h=Math.max(h,E+f(M,g))}const p=r(g),c=l.get(p)??0,y=Math.max(h,c);a[g]=y,l.set(p,y+1)}return{layers:xo(n,o,a,{skipGroups:!0}),rankOf:a,dummy:new Set}}d(Us,"assignLayers_LaneAwareCompact");function Ws(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(h=>[...h]),r=new Set(t.dummy?[...t.dummy]:[]);let a=0;const l=new Map(n.nodeById),f=d(h=>{const p=`placeholder-${a++}`,c={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(p,c),r.add(p);s.length<=h;)s.push([]);return s[h].push(p),o[p]=h,p},"addDummyAt"),i=[...n.edges].sort((h,p)=>h.id===p.id?h.src===p.src?h.dst.localeCompare(p.dst):h.src.localeCompare(p.src):h.id.localeCompare(p.id)),g=[];for(const h of i){const p=o[h.src]??0,c=o[h.dst]??0;if(c-p<=1){g.push(h);continue}let y=h.src;for(let M=p+1,E=0;M!n.nodes.includes(h))],edges:g,layout:n.layout,nodeById:l};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:C}}d(Ws,"makeProperLayering");function jn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(jn,"median");function Un(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Un,"barycenter");function Ks(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Ks,"neighborPositionsFor");function qs(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(qs,"currentOrderTieBreak");function Wn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),a=Ne(e),l=[];for(const i of n)o.has(i.src)&&s.has(i.dst)&&l.push({u:r.get(i.src),v:a.get(i.dst)});l.sort((i,g)=>i.u===g.u?i.v-g.v:i.u-g.u);const f=l.map(i=>i.v);return bo(f)}d(Wn,"countCrossingsBetweenAdjacent");function je(t,e,n){return[...t].sort((o,s)=>{const r=jn(e.get(o)??[]),a=jn(e.get(s)??[]);return r===a?qs(o,s,n):isFinite(r)?isFinite(a)?r-a:-1:1})}d(je,"sortByHeuristic");function Kn(t,e,n,o,s,r){const a=Ne(t),l=Ne(e),f=Ks(e,a,n,o);if(!s||!r||r.length===0)return je(e,f,l);const i=new Map;for(const C of e){const h=s(C),p=i.get(h)??[];p.push(C),i.set(h,p)}const g=[];for(const C of r){const h=i.get(C);if(!h||h.length===0)continue;const p=je(h,f,l);g.push(...p)}const x=i.get(null);if(x&&x.length>0){const C=je(x,f,l);for(const h of C){const p=Un(f.get(h)??[]);let c=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Un(f.get(v)??[]);if(pa.has(c.src)&&l.has(c.dst)),g=f?n.filter(c=>l.has(c.src)&&f.has(c.dst)):void 0,x=d(c=>{let y=Wn(t,c,i);return g&&o&&(y+=Wn(c,o,g)),y},"crossingScore"),C=s?new Map:null;if(s&&C)for(const c of e)C.set(c,s(c));let h=!0,p=x(r);for(;h;){h=!1;for(let c=0;c+1[...l]),s=e.edges,r=fe(e),a=Mo(e,n?.laneOrder);for(let l=0;l<3;l++){for(let f=1;f=0;f--)o[f]=Kn(o[f+1],o[f],s,"up",r,a),o[f]=qn(o[f+1],o[f],s,o[f-1],r)}return{layers:o}}d(Js,"orderLayers");function Zs(t,e,n){const o=n?.layerGap??Po.DEFAULT_LAYER_GAP,s=n?.nodeGap??Po.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,a=n?.direction??"TB",l=a==="LR"||a==="RL",f=t.layers,i=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),C=d(O=>x(O)?.width??0,"getWidth"),h=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),c=Mo(e,n?.laneOrder),y=f.map(O=>O.reduce((F,H)=>Math.max(F,h(H)),0)),v=[];if(l)for(let O=0;O+1Math.max(mt,C(kt)),0),H=f[O+1].reduce((mt,kt)=>Math.max(mt,C(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(F+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of f)for(const F of O)M.add(p(F));const E=M.has(null),T=c.filter(O=>M.has(O)),m=[...E?[null]:[],...T],I=Object.create(null);for(const O of T)I[O]=0;E&&(I.null=0);for(const O of f){const F=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(F[G]||=[]).push(P)}for(const[P,G]of Object.entries(F)){const j=G.reduce((J,dt)=>J+C(dt),0)+s*Math.max(0,G.length-1);I[P]=Math.max(I[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+C(j),0)+s*Math.max(0,H.length-1);I.null=Math.max(I.null??0,P)}}const w=new Map;{const O=m.map(P=>(P===null?I.null:I[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;PC(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];i[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const F=O.ref.id;k.has(F)||k.set(F,[]),k.get(F).push(O)}for(const[,O]of k){if(O.length===0)continue;const F=O[0].ref,H=F.start,P=F.end;if(H==null||P==null)continue;const G=Math.round(((i[H]??0)+(i[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(i[J]=G)}}return{x:i,y:g}}d(Zs,"assignCoordinates");var Qs=8;function tr(t){let e=2166136261;for(let n=0;n>>0}d(tr,"hashString");function er(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(er,"mulberry32");function nr(t,e){const n=[...t],o=er(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(nr,"deterministicShuffle");function or(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(or,"sourceDistance");function Jn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:a}of e){const l=n.get(s),f=n.get(r);l==null||f==null||(o+=a*Math.abs(l-f))}return o}d(Jn,"laneArrangementCost");function sr(t){const e=cn(t);if(e.length<2)return[];const n=new Map(e.map((r,a)=>[r,a])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const a=typeof r.start=="string"?r.start:void 0,l=typeof r.end=="string"?r.end:void 0;if(!a||!l||!t.nodeById.has(a)||!t.nodeById.has(l))continue;const f=o(a),i=o(l);if(!f||!i||f===i)continue;const g=n.get(f),x=n.get(i);if(g==null||x==null)continue;const[C,h]=g<=x?[f,i]:[i,f],p=`${C}\0${h}`,c=s.get(p);c?c.weight++:s.set(p,{a:C,b:h,weight:1})}return[...s.values()]}d(sr,"buildWeightedLaneEdges");function Zn(t,e,n){const o=[...t];let s=Jn(o,e),r=!0,a=0;const l=Math.max(1,o.length);for(;r&&as.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:a})=>`${s}:${r}:${a}`).join("|");return tr(`${t.join("|")}#${o}#${n}`)}d(ir,"seedForRestart");function cr(t,e={}){const n=cn(t);if(n.length<2)return n;const o=sr(t);if(o.length===0)return n;const s=new Map(n.map((l,f)=>[l,f]));let r=Zn(n,o,s);const a=Math.max(0,e.restarts??Qs);for(let l=0;lct&&f*3>=l?a>0?"bottom":"top":l>ct?r>0?"right":"left":n}d(Qn,"chooseOrthogonalSide");function to(t,e){return Math.abs(t.to-e.from)u.isGroup&&!u.parentId);for(const u of i){const b={id:u.id},S=d(L=>{a.set(L.id,b),n.filter(A=>A.parentId===L.id).forEach(S)},"assignLane");S(u)}const g=n.filter(u=>!u.isGroup&&!u.isEdgeLabel).map(u=>{const b=u.width??10,S=u.height??10,L=u.x??0,A=u.y??0,B=Br;return{nodeId:u.id,minX:L-b/2-B,maxX:L+b/2+B,minY:A-S/2-B,maxY:A+S/2+B,visualXHalfExtent:f?S/2+B:b/2+B}}),x=d((u,b,S,L)=>{let A=l.find(B=>B.orientation===u&&Math.abs(B.coord-b)<1);return A||(A={id:`pipe-${u}-${b.toFixed(0)}`,orientation:u,coord:b,spanMin:S,spanMax:L,tracks:[]},l.push(A)),A.spanMin=Math.min(A.spanMin,S),A.spanMax=Math.max(A.spanMax,L),A},"getOrAddPipe"),C=d((u,b)=>{const S=u.width??10,L=u.height??10,A=u.x??0,B=u.y??0;switch(b){case"top":return{x:A,y:B-L/2};case"bottom":return{x:A,y:B+L/2};case"left":return{x:A-S/2,y:B};case"right":return{x:A+S/2,y:B}}},"portForSide"),h=d((u,b,S)=>C(u,Qn(u,b,S?"bottom":"top")),"getOrthogonalPort"),p=[],c=[],y=new Set,v=1e3,M=d((u,b,S)=>{if(p.length===0)return 0;const L=Math.abs(b.y-S.y)z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(A){const U=b.x,q=Math.min(b.y,S.y)-ct,z=Math.max(b.y,S.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===u||Y.orientation!=="horizontal"||Y.pipe.coordz||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((u,b)=>{if(!u.start||!u.end)return{idx:b,crossLane:0,dx:0,dy:0};const S=r.get(u.start),L=r.get(u.end),A=a.get(u.start),B=a.get(u.end),U=A&&B&&A.id!==B.id?1:0,q=S&&L?Math.abs((L.x??0)-(S.x??0)):0,z=S&&L?Math.abs((L.y??0)-(S.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((u,b)=>{if(u.crossLane!==b.crossLane)return b.crossLane-u.crossLane;const S=u.dx+u.dy,L=b.dx+b.dy;return Math.abs(S-L)>1?S-L:u.idx-b.idx}).map(u=>u.idx),T=d((u,b,S,L)=>{const A=Math.min(u.x,b.x),B=Math.max(u.x,b.x),U=Math.min(u.y,b.y),q=Math.max(u.y,b.y);return!!g.find(Y=>S&&Y.nodeId===S||L&&Y.nodeId===L?!1:Math.abs(u.x-b.x)>ct?Y.minYu.y&&Y.maxX>A&&Y.minXu.x&&Y.maxY>U&&Y.minYQn(u,b,"bottom"),"determineSide"),R=new Map;for(const[u,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const A=(L.x??0)-(S.x??0),B=(L.y??0)-(S.y??0);R.set(u,{edgeIdx:u,srcId:b.start,dstId:b.end,srcSide:w(S,{x:L.x??0,y:L.y??0}),dstSide:w(L,{x:S.x??0,y:S.y??0}),absDx:Math.abs(A),absDy:Math.abs(B),dxSign:Math.sign(A),dySign:Math.sign(B)})}const k=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.absDx===0?1/0:u.absDy/u.absDx:u.absDy===0?1/0:u.absDx/u.absDy,"preferenceStrength"),O=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.dxSign>=0?"right":"left":u.dySign>=0?"bottom":"top","secondarySide"),F=new Map;for(const u of R.values()){const b=`${u.srcId}:${u.srcSide}`;F.has(b)||F.set(b,[]),F.get(b).push(u)}const H=new Map,P=d((u,b)=>`${u}:${b}`,"loadKey");for(const u of R.values())H.set(P(u.srcId,u.srcSide),(H.get(P(u.srcId,u.srcSide))??0)+1),H.set(P(u.dstId,u.dstSide),(H.get(P(u.dstId,u.dstSide))??0)+1);for(const u of F.values())if(!(u.length<2)){u.sort((b,S)=>{const L=k(b),A=k(S);return Math.abs(L-A)>1e-9?A-L:b.edgeIdx-S.edgeIdx});for(let b=1;b=A||(H.set(P(S.srcId,S.srcSide),A-1),H.set(P(S.srcId,L),B+1),S.srcSide=L)}}const G=d(u=>{const b=u?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const u of R.values())j.has(u.dstId)||j.set(u.dstId,new Set),j.get(u.dstId).add(u.dstSide);for(const u of R.values()){if(!G(r.get(u.srcId)))continue;const b=j.get(u.srcId);if(!b?.has(u.srcSide))continue;const S=O(u);if(b.has(S)||(H.get(P(u.srcId,S))??0)>0)continue;const L=H.get(P(u.srcId,u.srcSide))??0;H.set(P(u.srcId,u.srcSide),Math.max(0,L-1)),H.set(P(u.srcId,S),1),u.srcSide=S}for(const u of R.values()){const{edgeIdx:b,srcId:S,dstId:L,srcSide:A,dstSide:B}=u,U=r.get(S),q=r.get(L),z=`${S}:${A}:src`,Y=A==="top"||A==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[u,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const S=u.split(":"),L=S.slice(0,-2).join(":"),A=S[S.length-2],B=S[S.length-1],U=r.get(L);if(!U)continue;const z=A==="left"||A==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,dn=`${Dt.edgeIdx}:${B}`;J.set(dn,Jt)}}const mt=d(u=>!!s[u]?.labelNodeId,"edgeHasLabelNode"),kt=d((u,b)=>u?(m.get(`${u}:${b}:src`)??[]).some(({edgeIdx:S})=>mt(S))||(m.get(`${u}:${b}:dst`)??[]).some(({edgeIdx:S})=>mt(S)):!1,"faceHasLabelNode"),Pt=d((u,b,S)=>b==="top"||b==="bottom"?{x:u.x+S,y:u.y}:{x:u.x,y:u.y+S},"applyPortOffset"),Q=d((u,b,S)=>{const L=R.get(u),A={x:S.x??0,y:S.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??w(b,A),q=L?.dstSide??w(S,B);let z=L?C(b,L.srcSide):h(b,A,!0),Y=L?C(S,L.dstSide):h(S,B,!1);const ot=J.get(`${u}:src`),rt=J.get(`${u}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const u of E){const b=s[u];if(c[u]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const{pSrcPort:A,pDstPort:B,srcSide:U,dstSide:q}=Q(u,S,L),z={...A},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=A.y>(S.y??0);z.y=X?A.y+ne:A.y-ne}else{const X=A.x>(S.x??0);z.x=X?A.x+ne:A.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.xK.minY&&X.y{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(A,S,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,A.y+ne):Math.max(X.maxY+2,A.y-ne);yt=[{x:A.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(A,S,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,A.x+ne):Math.max(X.maxX+2,A.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:A.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,S,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,S,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)1||bt>1,Nt=I.get(b.start??"")??0,ut=I.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(A,B,b.start,b.end)){b.points=[{...A},{...z},{...Y},{...B}],y.add(u);const Mt=K?"horizontal":"vertical",$t=K?A.y:A.x,It=K?Math.min(A.x,B.x):Math.min(A.y,B.y),St=K?Math.max(A.x,B.x):Math.max(A.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${u}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:u,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const dn=x("vertical",z.x,z.y,z.y);z.x=dn.coord;const hr=x("vertical",Y.x,Y.y,Y.y);Y.x=hr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX$&&X.minYlt&&(ue=Math.min(ue,X.minX-ze),he=Math.max(he,X.maxX+ze),ve=Math.min(ve,X.minY-ze),Le=Math.max(Le,X.maxY+ze))}for(const X of g){if(X.maxXhe||X.maxYLe)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const gr=l.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),pr=l.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),Be=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),ke=Be(z.x,z.y),So=Be(Y.x,Y.y),Fe=new Map,un=new Map,hn=new Map,_e=new Set,xe=[];Fe.set(ke,0),hn.set(ke,"n"),xe.push({key:ke,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),_e.add(ke);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),gn={x:Y.x,y:z.y},mr=ge(z,gn),yr=ge(gn,Y),xr=mr||yr,pn={x:z.x,y:Y.y},br=ge(z,pn),Mr=ge(pn,Y);if(xr?br||Mr||(Math.abs(z.x-Y.x)0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(_e.delete(X.key),X.key===So){let ut=So,Yt=Y;for(Ht=[Yt];un.has(ut);){const ee=un.get(ut);Ht.unshift(ee),Yt=ee,ut=Be(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=pr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=gr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&EtZt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minYK&&Zt.maxX>Yt&&Zt.minX$&&Zt.maxY>Bt&&Zt.minY10&&mn<-5||Ee<-10&&mn>5)&&(St=Math.abs(mn)*100),(Wt>10&&De<-5||Wt<-10&&De>5)&&(St+=Math.abs(De)*50);let Co=0;const vo=hn.get(X.key)??"n",Lo=Math.abs(De)>ct?"h":"v";vo!=="n"&&vo!==Lo&&(Co=50);const Ir=$t+It+St+Co,He=(Fe.get(X.key)??1/0)+Ir,Eo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(He<(Fe.get(Mt)??1/0))if(un.set(Mt,X.pt),Fe.set(Mt,He),hn.set(Mt,Lo),!_e.has(Mt))xe.push({key:Mt,f:He+Eo,pt:ut}),_e.add(Mt);else{const Zt=xe.findIndex(Sr=>Sr.key===Mt);Zt!==-1&&(xe[Zt].f=He+Eo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=KIt.minXGt&&It.minYOt);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minXMath.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)It.minX,Wt=Math.min(X.y,$.y)It.minY;return St&&Wt});let Mt=Ot;if(f&&Ot.length>0){const It=Ot.filter(St=>St.minXBt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;Xu.from{const A=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,u)),B=!S.segments.some(U=>(U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex)&&W(U,b));return A&&B?(u.trackIndex=L.index,b.trackIndex=S.index,S.segments=[...S.segments.filter(U=>U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(u=>{const b=u.tracks.length;return u.tracks[b]={index:b,coord:u.coord,segments:[]},b},"createNewTrack"),gt=d((u,b)=>{const S=u.pipe.tracks[u.trackIndex];S.segments=S.segments.filter(A=>A.edgeIndex!==u.edgeIndex||A.segmentIndex!==u.segmentIndex),u.trackIndex=b,u.pipe.tracks[b].segments.push({edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to})},"moveSegmentToTrack"),xt=d((u,b)=>{const S=c[u.edgeIndex];for(const L of S){const A=p[L];A.pipe===u.pipe&>(A,b)}},"moveSegmentChainToTrack"),vt=d(u=>{const b=c[u.edgeIndex],S=b.indexOf(p.indexOf(u)),L=[];return S>0&&L.push(p[b[S-1]]),S{if(u.orientation===b.orientation)return!1;const S=u.orientation==="horizontal"?u:b,L=u.orientation==="horizontal"?b:u;return L.pipe.coord>S.from&&L.pipe.coordL.from&&S.pipe.coord{for(const S of u.tracks)if(!S.segments.some(A=>(A.edgeIndex!==b.edgeIndex||A.segmentIndex!==b.segmentIndex)&&W(A,b)))return S.index;return-1},"findAvailableTrack"),Ut=d((u,b)=>{if(u.trackIndex===b.trackIndex)return W(u,b);const S=vt(u),L=vt(b);return S.some(A=>L.some(B=>Vt(A,B)))},"segmentsConflict"),te=d((u,b,S)=>{if(et(u,b,u.pipe.tracks[u.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(u.pipe,b);S(b,L!==-1?L:at(u.pipe))},"resolveTrackConflict"),Se=d(u=>{let b=0;for(let S=0;S{if(de.has(u))return de.get(u);const b=c[u];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(u,q),q}const L=p[b[0]].pipe.coord;let A=L;for(let q=1;qMath.abs(ot-L)?Y:ot;break}}const B=Math.abs(A-L),U={dest:A,deviation:B,base:L,delta:A-L};return de.set(u,U),U},"getDestInfo"),an=d(()=>{let u=0;const b=new Map;for(const[L,A]of s.entries())c[L].length!==0&&A.start&&(b.has(A.start)||b.set(A.start,[]),b.get(A.start).push(L));const S=d(L=>{const A=s[L];if(!A.start||!A.end)return 0;const B=r.get(A.start),U=r.get(A.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=S(B),ot=S(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=c[B].length,st=c[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=c[B][0],yt=c[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const A=L.map(B=>p[c[B][0]]);u+=Se(A)}return u},"fixSourceHandleCrossings"),ln=d(()=>{let u=0;const b=new Map;for(const[S,L]of s.entries())c[S].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(S));for(const S of b.values()){S.sort((A,B)=>{const U=d(Y=>{const ot=c[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(A),z=U(B);return Math.abs(q-z)>.1?q-z:A-B});const L=S.map(A=>p[c[A][c[A].length-1]]);u+=Se(L)}return u},"fixTargetHandleCrossings"),fn=d(()=>{let u=0;for(const b of l){const S=[];for(const L of b.tracks)for(const A of L.segments){const B=c[A.edgeIndex].find(U=>p[U].segmentIndex===A.segmentIndex);B!==void 0&&S.push(p[B])}S.sort((L,A)=>L.edgeIndex-A.edgeIndex||L.segmentIndex-A.segmentIndex);for(let L=0;L{L.segments.forEach(A=>{b.push({edgeIndex:A.edgeIndex,segmentIndex:A.segmentIndex,trackIndex:L.index,from:A.from,to:A.to})})}),b.sort((L,A)=>L.from-A.from);const S=[];if(b.length>0){let L=[b[0]],A=b[0].to;for(let B=1;BA.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...A].filter(tt=>(B.get(tt)??0)<-1),q=[...A].filter(tt=>(B.get(tt)??0)>1),z=[...A].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?u.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,u.coord-ot*Mn);if(z.length===0&&A.size>0){const tt=[...A].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,u.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,u.coord+yt*Rt*Mn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,u.coord+st*Mn)}}for(const[u,b]of s.entries()){const S=c[u]??[];if(S.length===0)continue;const L=[],A=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(u,A,B),z=S.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rtct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:to(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,to(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rtct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const u of s){const b=u.__originalEdge;b&&u.points&&(b.points=u.points)}t.edges=(t.edges??[]).filter(u=>!u.isLayoutOnly);const V=d((u,b)=>{const S=b.x??0,L=b.y??0,A=b.width??0,B=b.height??0;if(A<=0||B<=0)return u;const U=S-A/2,q=S+A/2,z=L-B/2,Y=L+B/2;if(u.xq||u.yY)return u;const ot=u.x-U,rt=q-u.x,st=u.y-z,tt=Y-u.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:u.y}:yt===rt?{x:q,y:u.y}:yt===st?{x:u.x,y:z}:{x:u.x,y:Y}},"nodeBoundaryClamp");for(const u of t.edges){const b=u.points;if(!b||b.length<2)continue;const S=u.start,L=u.end,A=S?r.get(S):void 0,B=L?r.get(L):void 0;A&&(b[0]=V(b[0],A)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(lr,"routeEdgesOrthogonal");function fr(t){return t.direction??"TB"}d(fr,"getSwimlaneDirection");function dr(t){const e=Uo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,a=t.config.swimlane?.automaticLaneOrdering??!1,l=fr(t),{ordered:f,coordinates:i}=ar(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:a,direction:l});Wo(e,f,i,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;lr(t,l);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Es(t,l),Ls(t),l}d(dr,"runSwimlaneLayoutCore");function ur(t){jo(t);const e=Ko(t);t.nodes=e.nodes,t.edges=e.edges}d(ur,"prepareSwimlaneLayout");var Hr=Cr({prepareLayout:ur,runLayoutCore:dr,afterPaint:zo});export{Hr as render}; +import{ap as Cr,l as In,_ as d,aA as To}from"./mermaid.core-CwGP16Dm.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var Ao=5,Xe=1e-5,Ye=1e-6;function Ue(t){const e=[];for(let n=0;n=1-Ye||C<=Ye||C>=1-Ye?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:C}}d(Bo,"segmentIntersection");function Sn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(Sn,"isHorizontalSeg");function ko(t){const e=[];for(let n=0;n=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Fo,"getArcSweepFlag");var vr=.001;function _o(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&To[e.arrowTypeStart];if(o){const r=t[0],a=t[1],l=Math.atan2(a.y-r.y,a.x-r.x);n[0].x=r.x+o*Math.cos(l),n[0].y=r.y+o*Math.sin(l)}const s=e.arrowTypeEnd&&To[e.arrowTypeEnd];if(s){const r=t.length,a=t[r-2],l=t[r-1],f=Math.atan2(l.y-a.y,l.x-a.x);n[r-1].x=l.x-s*Math.cos(f),n[r-1].y=l.y-s*Math.sin(f)}return n}d(_o,"applyMarkerOffsets");function Do(t,e,n,o,s){const r=t.point.x,a=t.point.y,l={x:r-e*t.r,y:a-n*t.r},f={x:r+e*t.r,y:a+n*t.r},i=[`L${Ae(l)}`];return s==="arc"?i.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${Ae(f)}`):i.push(`M${Ae(f)}`),i}d(Do,"emitJump");function Cn(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=n.x-e.x,l=n.y-e.y,f=Math.hypot(s,r),i=Math.hypot(a,l);if(f0){const E=Cn(s[i-1],s[i],s[i+1]??s[i],Ao);E&&(c=E.cutLen)}let y=x,v=null;r&&iE.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-c,y-E.d);for(let E=0;ET){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r=2?o:null}catch{return null}}d(Go,"decodeDataPoints");function $o(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const i of e)s.set(i.id,i);const r=[],a=new Map;for(const i of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(i.id):i.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;a.set(i.id,x);const h=Go(x.getAttribute("data-points"))??i.points;r.push({...i,points:h})}const l=ko(r);if(l.length===0)return;const f=new Map;for(const i of l){const g=f.get(i.jumpEdgeId)??[];g.push(i),f.set(i.jumpEdgeId,g)}for(const i of r){const g=f.get(i.id);if(!g||g.length===0)continue;const C=s.get(i.id)?.curve;if(C!==void 0&&!Yo(C))continue;const h=a.get(i.id);if(!h)continue;if(C===void 0){const E=h.getAttribute("d")??"";if(!Xo(E))continue}const p=h.getAttribute("style")??"",c=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=c?Number.parseFloat(c[1]):null,v=c?Number.parseFloat(c[2]):null,M=Ho(i,g,n);if(h.setAttribute("d",M),y!==null&&v!==null&&typeof h.getTotalLength=="function"){const E=h.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,I=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");h.setAttribute("style",I)}}}d($o,"applyLineJumpsToSvg");function zo(t,{measure:e}){const n=t.config?.swimlane?.lineHops;if(n===!1)return;const o=n==="gap"?"gap":"arc",s=t.edges.filter(r=>Array.isArray(r.points)&&r.points.length>=2).map(r=>({id:r.id,points:r.points,curve:r.curve,arrowTypeStart:r.arrowTypeStart,arrowTypeEnd:r.arrowTypeEnd}));$o(e.groups.edgePaths,s,{enabled:!0,jumpRadius:6,jumpStyle:o})}d(zo,"applySwimlaneLineJumps");var yn="__swimlane_default__",Lr=21,wo=20;function vn(t){return Math.max(t.padding??wo,wo)}d(vn,"topLaneHorizontalPadding");function Vo(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const a=n-s/2,l=Math.min(r,n+s/2),f=Math.min(Lr,Math.max(0,l-a)),i=a+f;if(i<=a){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:a,bottom:i}}d(Vo,"assignTopLaneTitleRect");function jo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===yn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:yn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=yn}d(jo,"prepareLayoutForSwimlanes");function Uo(t){const e=new Map;for(const f of t.nodes??[])e.set(f.id,f);const n=[];for(const f of t.edges??[]){const i=typeof f.start=="string"?f.start:void 0,g=typeof f.end=="string"?f.end:void 0;!i||!g||f.labelNodeId||n.push({id:f.id,src:i,dst:g,ref:f})}const o=t.nodes??[],s=o.filter(f=>f.isGroup),r=o.filter(f=>!f.isGroup);return{nodes:[...[...s].reverse(),...r].map(f=>f.id),edges:n,layout:t,nodeById:e}}d(Uo,"toGraphView");function Wo(t,e,n,o){const{layout:s}=t,r=t.nodeById,a=o?.layerGap??100,l=o?.nodeGap??40;let f=0;for(const C of e.layers){let h=0;for(const p of C){const c=r.get(p);if(!c){h++;continue}c.layer=f,c.order=h;const y=n.x[p]??h*l,v=n.y[p]??f*a;c.x=y,c.y=v,h++}f++}const i=s.nodes??[],g=new Map,x=[];for(const C of i){if(!C?.isGroup)continue;C.parentId||x.push(C);const h=i.filter(M=>M.parentId===C.id);let p=1/0,c=-1/0,y=1/0,v=-1/0;for(const M of h){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,I=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),c=Math.max(c,E+m/2),y=Math.min(y,T-I/2),v=Math.max(v,T+I/2))}if(p===1/0||y===1/0)C.x=C.x??0,C.y=C.y??0,C.width=C.width??0,C.height=C.height??0;else{const M=C.padding??20,E=C.parentId?M:2*vn(C),T=M,m=Math.max(0,c-p)+E,I=Math.max(0,v-y)+T,w=(p+c)/2,R=(y+v)/2;C.x=w,C.y=R,C.width=m,C.height=I,g.set(C.id,{minX:p,maxX:c,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let C=1/0,h=-1/0,p=0;for(const c of x){const y=c.padding??20;y>p&&(p=y);const v=g.get(c.id);v&&(C=Math.min(C,v.minY),h=Math.max(h,v.maxY))}if(C!==1/0&&h!==-1/0){const c=Math.max(0,h-C),v=Math.max(p,36),M=c+2*v,E=(C+h)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=C;const T=[...x].sort((k,O)=>{const F=k.x??0,H=O.x??0;return F-H}),m=[],I=[],w=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const F=Math.max(0,O.maxX-O.minX)+2*vn(k),H=(O.minX+O.maxX)/2;m.push(k.id),I.push(H),w.push(F)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],w[0]);else{const O=[];for(let j=0;j0&&s>0?{cx:e,cy:n,rect:we(e,n,o,s)}:void 0}d(eo,"measuredNodeRect");function no(t){if(t.isGroup)return;const e=eo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(no,"nodeBoundsInfoFor");function oe(t,e,n=_t){return Math.abs(t.x-e.x)n}d(Tt,"isHorizontalSegment");function At(t,e,n=_t){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(At,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=_t){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=_t){const n=[];for(let o=0;o0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function oo(t,e=_t){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&At(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:At(n,o,e)&&Tt(o,s,e)&&At(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(oo,"classifyThreeSegmentRoute");function on(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),a=Math.min(t.y,e.y),l=Math.max(t.y,e.y);return r>n.left-o&&sn.top-o&&ae.left+n&&t.xe.top+n&&t.y=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(qo,"rectContainsRect");function We(t,e){return t.lefte.left&&t.tope.top}d(We,"rectsOverlap");function Ln(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Ln,"inflateRect");function we(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(we,"rectFromCenterSize");function qt(t){return eo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function ro(t,e,n,o,s,r=_t){const a=e==="left"||e==="right",l=o==="left"||o==="right";if(a&&l){if(e==="right"&&o==="left"&&t.xn.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!a&&!l){if(e===o){if(ft(t,n,r))return;const C=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:C},{x:n.x,y:C},n]}if(!(e==="bottom"&&o==="top"&&t.yn.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(a&&!l){const g=e==="right"&&n.x>t.x||e==="left"&&n.xn.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const f=e==="bottom"&&n.y>t.y||e==="top"&&n.yn.x;return f&&i?[t,{x:t.x,y:n.y},n]:void 0}d(ro,"buildOrthogonalPortPath");function io(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(io,"buildSameSideTrackPath");function sn(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=no(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(sn,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=no(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function Jo(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,a=o.width??0,l=o.height??0;n.push({nodeId:o.id,...we(s,r,a,l)})}return n}d(Jo,"collectLayoutNodeRects");function co(t,e,n=_t){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),a=e.get(s);if(!(!r||!a))return{srcId:o,dstId:s,srcInfo:r,dstInfo:a,collinearX:Math.abs(r.cx-a.cx)p||Cv)return!1;const M=Math.abs(c-g.a.x)s:r&&l&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(Zo,"sameAxisSegmentsOverlap");function Ke(t,e,n,o,{epsilon:s=_t,skipDegenerateOther:r=!1}={}){for(const a of n){if(a===o||a.isLayoutOnly)continue;const l=a.points;if(!(!l||l.length<2))for(let f=0;fC+s&&pc+s&&xo+_t&&t=2?e[e.length-2]:void 0,f=(a?ft(a,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(f)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ts(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Tr=.5,Ro=4;function lo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length=0&&s=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const a=es(t[s],t[r],e);return n?[a,...t.slice(s)]:[...t.slice(0,s+1),a]}d(Tn,"clipEndpoint");function ns(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Tn(s,o.srcRect,!0)),o.dstRect&&(s=Tn(s,o.dstRect,!1)),s=ae(qe(s)),s=fo(s,o.srcRect,o.dstRect),o.edge.points=ae(qe(s))}}d(ns,"clipEdgeEndpointsToNodeBoundaries");function An(t,e,n,o=!1){if(ht(t,e,nt)){if(e.yn.bottom+nt)return e;if(o){if(t.xn.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.xn.right+nt)return e;if(o){if(t.yn.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(An,"snapEndpointToBoundary");function Je(t,e,n){const o=t[e];for(let s=e+n;s>=0&&so.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(os,"intersectRanges");function Rn(t,e){return e==="left"||e==="right"?Ze(t.top,t.bottom):Ze(t.left,t.right)}d(Rn,"clearanceRangeForSide");function Qe(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)0?os(r):void 0}d(ss,"straightClearanceRange");function Nn(t,e,n,o,s){const r=ss(t,e,n,o,s);if(!r)return;const a=s?t.y:t.x,l=Math.min(r.hi,Math.max(r.lo,a));if(!(Math.abs(l-a)({...l}));for(let l=e;l>=0&&l=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)o.bottom+nt;case"left":return ht(e,n,nt)&&n.xo.right+nt}}d(Bn,"leavesOutward");function kn(t,e,n){if(t.length<3)return t;if(n){const r=Pn(t[0],t[1],e);return r&&Bn(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Pn(t[o-1],t[o],e);return s&&Bn(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(kn,"collapseOwnBorderStub");function cs(t,e,n){let o=t;if(e){const r=Je(o,0,1);if(r){const a=An(r,o[0],e);a!==o[0]&&(o=[a,...o.slice(1)])}o=kn(o,e,!0)}if(n){const r=o.length-1,a=Je(o,r,-1);if(a){const l=An(a,o[r],n,!0);l!==o[r]&&(o=[...o.slice(0,r),l])}o=kn(o,n,!1)}const s=fo(o,e,n);return s!==o||o.length===2?s:(e&&(o=On(o,e,!0)),n&&(o=On(o,n,!1)),o)}d(cs,"snapAndCollapseEndpoints");function Fn(t,e){for(const n of t){const o=lo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=cs(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const a=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=a}}d(Fn,"prepareEdgeEndpointsForRenderer");function uo(t){return new Map(t.map(e=>[e.id,e]))}d(uo,"buildNodeMap");function as(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(as,"resolveTopLevelGroupId");function _n(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(_n,"groupDepth");function ho(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const a=r.x,l=r.y;if(typeof a!="number"||typeof l!="number")continue;const f=r.width??0,i=r.height??0;e=Math.min(e,a-f/2),n=Math.max(n,a+f/2),o=Math.min(o,l-i/2),s=Math.max(s,l+i/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(ho,"boundsForChildren");function ls(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(ls,"applyGroupBounds");function fs(t){const e=uo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>_n(s,e)-_n(o,e));for(const o of n){const s=t.filter(a=>a.parentId===o.id),r=ho(s);r&&ls(o,r)}}d(fs,"recomputeNestedGroupBounds");function tn(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(f=>!f.isGroup);let r=1/0,a=-1/0;for(const f of s){const i=f[e];typeof i=="number"&&(r=Math.min(r,i),a=Math.max(a,i))}if(!Number.isFinite(r)||!Number.isFinite(a))return!1;const l=d(f=>r+a-f,"mirror");for(const f of n){const i=f[e];typeof i=="number"&&(f[e]=l(i));const g=f.groupTitleRect;g&&(f.groupTitleRect=e==="x"?{...g,left:l(g.right),right:l(g.left)}:{...g,top:l(g.bottom),bottom:l(g.top)})}for(const f of o)for(const i of f.points??[])i[e]=l(i[e]);return!0}d(tn,"mirrorAxis");function ds(t){return(t.nodes??[]).some(n=>!n.isGroup)?tn(t,"y"):!0}d(ds,"applyBtDirectionTransform");function us(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,a=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-a)*C+l,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-a)*C+l,mt=j-r;G.x=dt,G.y=mt}fs(n);const h=n.filter(P=>P.isGroup&&!P.parentId);if(h.length===0)return e==="RL"&&tn(t,"x"),!0;const p=uo(n),c=new Map;for(const P of n){if(P.isGroup)continue;const G=as(P,p);if(!G)continue;const j=c.get(G)??[];j.push(P),c.set(G,j)}let y=0;for(const P of h){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of h){const G=c.get(P.id)??[],j=ho(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),I=T+2*m,w=l+I,O=(M+E)/2-I/2-l,F=O+w/2,H=Math.max(y,l);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;PC.cy?v.bottom:v.top,H=C.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:F},T={x:H,y:l.y},m={x:l.x,y:l.y}}else{const F=h.cx>C.cx?v.right:v.left,H=C.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:F,y:H},T={x:l.x,y:H},m={x:l.x,y:l.y}}const I=oe(E,T,se),w=oe(T,m,se);if(I&&w||!I&&wt(E,T,o,[g],1)||!w&&wt(T,m,o,[x],1))continue;const R=!I&&Ke(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!w&&Ke(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){I?y=[T,m]:w?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(hs,"portSwapToLShape");function gs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values());for(const l of t){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<4)continue;const i=pt(f,.001);if(i.length<4)continue;const g=i.length-1,x=i[g],C=i[g-1],h=i[g-2],p=x.x-C.x,c=x.y-C.y,y=Math.hypot(p,c);if(y>=10||y<.001)continue;const v=C.x-h.x,M=C.y-h.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(C,x,.001),m=At(C,x,.001),I=Tt(h,C,.001),w=At(h,C,.001);if(!(T&&w||m&&I))continue;const R=l.end,k=l.start,O=R?e.get(R):void 0;if(!O)continue;const F=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(w){const W=M<0;G={x:F,y:h.y},j={x:F,y:W?P.bottom:P.top}}else{const W=v>0;G={x:h.x,y:H},j={x:W?P.right:P.left,y:H}}if(wt(G,j,r,R?[R]:[],-2)||wt(G,j,a,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&so(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W{for(const at of t){if(at===l||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt=0){const W=i[g-3],et=[k,R].filter(at=>!!at);if(wt(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...i.slice(0,g-2),G,j];l.points=Pt;const Q=l.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(gs,"collapseShortTerminalStub");var Z=.001,Ft=8,it=Re,xn=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function ps(t,e){const s=d((h,p)=>{const c=h.x??0,y=h.y??0,v=p.x-c,M=p.y-y;let E=(h.width??0)/2,T=(h.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:c+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:c+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((h,p)=>{const c=pt(h.points??[]);if(c.length<2)return;const y=p?h.start:h.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?c[0]:c[c.length-1],T=p?c[1]:c[c.length-2],m=s(v,E);let I=E;if(xn(T,m)&&(I=T),ft(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,I.y),max:Math.max(m.y,I.y),boundary:m,railEnd:I,rect:M};if(ht(m,I,Z))return{edge:h,edgeId:String(h.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,I.x),max:Math.max(m.x,I.x),boundary:m,railEnd:I,rect:M}},"terminalLaneFor"),a=d((h,p)=>Math.max(0,Math.min(h.max,p.max)-Math.max(h.min,p.min)),"projectedOverlapLength"),l=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:h.orientation==="H"?(Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1)&&ft(h.boundary,p.boundary,1):(Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1)&&ht(h.boundary,p.boundary,1),"sameTerminalFace"),f=d((h,p)=>h.nodeId!==p.nodeId||h.orientation!==p.orientation?!1:a(h,p)>=Ft&&Math.abs(h.coord-p.coord)<.5,"exactTerminalLaneConflict"),i=d((h,p)=>{if(h.nodeId!==p.nodeId||h.orientation!==p.orientation||h.orientation!=="H"||h.atStart===p.atStart)return!1;const c=a(h,p);if(c2*y?!1:l(h,p)&&Math.abs(h.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((h,p)=>{const c=pt(h.edge.points??[]);if(c.length<2)return;const y=h.orientation==="V"?{x:h.boundary.x+p,y:h.boundary.y}:{x:h.boundary.x,y:h.boundary.y+p},v=h.orientation==="V"?{x:h.railEnd.x+p,y:h.railEnd.y}:{x:h.railEnd.x,y:h.railEnd.y+p};if(!d(()=>Math.abs(h.boundary.y-h.rect.top)<1||Math.abs(h.boundary.y-h.rect.bottom)<1?ht(y,h.boundary,Z)&&y.x>=h.rect.left+1&&y.x<=h.rect.right-1:Math.abs(h.boundary.x-h.rect.left)<1||Math.abs(h.boundary.x-h.rect.right)<1?ft(y,h.boundary,Z)&&y.y>=h.rect.top+1&&y.y<=h.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(h.atStart){const I=c.length>1&&oe(c[1],h.railEnd,Z),w=c.slice(I?2:1),R=w[0];return R&&!xn(R,v)?void 0:[y,v,...w]}const E=c.length>1&&oe(c[c.length-2],h.railEnd,Z),T=c.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!xn(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(h=>{const p=h.edge,c=pt(p.points??[]);if(c.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,I=E.x??0,w=E.y??0,[R,k]=c;return ht(R,k,Z)&&Math.abs(m-w)<1&&Math.abs(T-I)>1||ft(R,k,Z)&&Math.abs(T-I)<1&&Math.abs(m-w)>1},"laneIsStraightCollinearConnector"),C=[-7,7,-14,14,-21,21];for(let h=0;h<8;h++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let c=!1;for(let y=0;y{const R=x(I),k=x(w);return R!==k?Number(R)-Number(k):+!w.atStart-+!I.atStart});for(const I of m){for(const w of C){const R=g(I,w);if(!R)continue;const k=r({...I.edge,points:R},I.atStart);if(!(!k||p.some(O=>O.edge!==I.edge&&(f(k,O)||T&&i(k,O))))){I.edge.points=R,c=!0;break}}if(c)break}}if(!c)return}}d(ps,"separateSharedRenderedTerminalLanes");function ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((l,f)=>{const i=l.start,g=l.end,x=it(f);if(x.length!==f.length-1)return!1;const C=[i,g].filter(h=>!!h);for(const h of x)if(wt(h.a,h.b,o,C,-2)||wt(h.a,h.b,s,[],-2))return!1;for(const h of t){if(h===l||h.isLayoutOnly)continue;const p=h.points;if(!(!p||p.length<2)){for(const c of x)for(const y of it(pt(p)))if(ce(c,y,.5)>=Ft||le(c.a,c.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),a=d((l,f)=>{if(f+4>=l.length)return;const i=l[f],g=l[f+1],x=l[f+2],C=l[f+3],h=l[f+4],p=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&ft(i,C,Z)&&ft(i,h,Z)&&ft(g,x,Z)&&(g.x-i.x)*(C.x-x.x)<0,c=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&ht(i,C,Z)&&ht(i,h,Z)&&ht(g,x,Z)&&(g.y-i.y)*(C.y-x.y)<0;if(p||c)return pt([...l.slice(0,f+1),h,...l.slice(f+5)]);if(f+5>=l.length)return;const y=l[f+5],v=At(i,g)&&Tt(g,x)&&At(x,C)&&Tt(C,h)&&At(h,y)&&ft(i,h,Z)&&ft(i,y,Z)&&ft(x,C,Z)&&(x.x-g.x)*(h.x-C.x)<0,M=Tt(i,g)&&At(g,x)&&Tt(x,C)&&At(C,h)&&Tt(h,y)&&ht(i,h,Z)&&ht(i,y,Z)&&ht(x,C,Z)&&(x.y-g.y)*(h.y-C.y)<0;if(!(!v&&!M))return pt([...l.slice(0,f+1),y,...l.slice(f+6)])},"withoutDogleg");for(let l=0;l<8;l++){let f=!1;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(let x=0;x<=g.length-5;x++){const C=a(g,x);if(!(!C||!r(i,C))){i.points=C,f=!0;break}}if(f)break}if(!f)return}}d(ms,"collapseRedundantRectangularDoglegs");function Dn(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(p=>!p.isLayoutOnly),f=d((p,c,y)=>pt(p===c?y??[]:p.points??[]),"pointsFor"),i=d((p,c)=>{let y=0;for(let v=0;v{const c=it(p);if(c.length!==3)return;const y=c[1];if(!(c[0].horizontal===y.horizontal||c[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return c.horizontal?zt(c.a.x,c.b.x,M.left,M.right)>=Ft&&c.a.y>=M.top-2&&c.a.y<=M.bottom+2:zt(c.a.y,c.b.y,M.top,M.bottom)>=Ft&&c.a.x>=M.left-2&&c.a.x<=M.right+2})},"blockingRectsFor"),C=d((p,c,y)=>{const v=p.map(E=>({...E}));if(c.horizontal)v[c.index].y=y,v[c.index+1].y=y;else if(c.vertical)v[c.index].x=y,v[c.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),h=d((p,c,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(c);if(M.length!==c.length-1)return!1;for(const E of M)if(wt(E.a,E.b,r,v,-2)||wt(E.a,E.b,a,[],-2))return!1;for(const E of l)if(E!==p){for(const T of M)for(const m of it(f(E)))if(ce(T,m,.5)>=Ft)return!1}return i(p,c)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const c=i();let y=!1;for(const v of l){const M=f(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(I=>I.rect.top))-20,Math.max(...T.map(I=>I.rect.bottom))+20]:[Math.min(...T.map(I=>I.rect.left))-20,Math.max(...T.map(I=>I.rect.right))+20];for(const I of m){const w=C(M,E.segment,I);if(!(!w||!h(v,w,c))){v.points=w,y=!0;break}}if(y)break}if(!y)return}}d(Dn,"liftObstacleHuggingSameSideRails");function Hn(t,e){const o=d(f=>{const i=f.groupTitleRect;if(!(!i||typeof i.left!="number"||typeof i.right!="number"||typeof i.top!="number"||typeof i.bottom!="number"||!Number.isFinite(i.left)||!Number.isFinite(i.right)||!Number.isFinite(i.top)||!Number.isFinite(i.bottom)||i.right<=i.left||i.bottom<=i.top))return{left:i.left,right:i.right,top:i.top,bottom:i.bottom}},"validTitleRect"),s=d(f=>{if(!f.isGroup||f.parentId)return;const i=f.direction,g=typeof i=="string"?i.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(f),C=f.y,h=f.height;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(c<=0||p{if(!f.horizontal)return!1;const g=f.a.y;return g<=i.top+Z||g>=i.bottom-Z?!1:zt(f.a.x,f.b.x,i.left,i.right)>=Ft},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(f=>!!f);if(a.length===0)return;let l=0;for(const f of t){if(f.isLayoutOnly)continue;const i=pt(f.points??[]);for(const g of it(i))for(const x of a)r(g,x.rect)&&(l=Math.max(l,x.rect.bottom-g.a.y+4))}if(!(l<=Z))for(const f of a){const i=f.node.y,g=f.node.height;typeof i!="number"||typeof g!="number"||!Number.isFinite(i)||!Number.isFinite(g)||g<=0||(f.node.y=i-l/2,f.node.height=g+l,f.node.groupTitleRect={...f.rect,top:f.rect.top-l,bottom:f.rect.bottom-l})}}d(Hn,"liftTopLaneTitleBandsAboveRails");function Xn(t,e){const o=d(i=>{const g=i.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(i=>{if(!i.isGroup||i.parentId||i.direction!=="LR")return;const x=o(i),C=i.x,h=i.width;if(!x||typeof C!="number"||typeof h!="number"||!Number.isFinite(C)||!Number.isFinite(h)||h<=0)return;const p=x.right-x.left,c=x.bottom-x.top;if(!(p<=0||c{if(!i.vertical)return!1;const x=i.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(i.a.y,i.b.y,g.top,g.bottom)>=Ft},"verticalSegmentIntersectsTitle"),a=d((i,g)=>{if(!i.horizontal)return!1;const x=i.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(i.a.x,i.b.x,g.left,g.right)>=Ft},"horizontalSegmentIntersectsTitle"),l=[...e.values()].map(s).filter(i=>!!i);if(l.length===0)return;let f=0;for(const i of t){if(i.isLayoutOnly)continue;const g=pt(i.points??[]);for(const x of it(g))for(const C of l)if(r(x,C.rect))f=Math.max(f,C.rect.right-x.a.x+4);else if(a(x,C.rect)){const h=Math.min(x.a.x,x.b.x);f=Math.max(f,C.rect.right-h+4)}}if(!(f<=Z))for(const i of l){const g=i.node.x,x=i.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(i.node.x=g-f/2,i.node.width=x+f,i.node.groupTitleRect={...i.rect,left:i.rect.left-f,right:i.rect.right-f})}}d(Xn,"shiftLeftLaneTitleBandsLeftOfRails");function ys(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,c=new Map)=>pt(c.get(p)??p.points??[]),"replacementPointsFor"),a=d((p=new Map)=>{let c=0;for(let y=0;ys.reduce((c,y)=>c+Qt(r(y,p)),0),"totalBends"),f=d(p=>{const c=r(p);if(c.length<4)return;const y=c[c.length-2],v=c[c.length-1];if(!(!Tt(y,v,Z)&&!At(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),i=d((p,c)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:c.tailStart.y};else if(At(v,M,Z))E={x:c.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,c.tailStart,c.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,c)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(c))if(wt(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,c,y)=>{for(const v of s)if(v!==p){for(const M of it(c))for(const E of it(r(v,y)))if(ce(M,E,.5)>=Ft)return!0}return!1},"pathHasSharedTrack"),C=d((p,c,y)=>!g(p,c)&&!x(p,c,y),"candidateIsSafe"),h=d(()=>{const p=new Map;for(const c of s){const y=c.end;if(!y||!e.has(y)||r(c).length<4)continue;const M=p.get(y)??[];M.push(c),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const c=a();if(c===0)return;const y=l();let v,M=c,E=y;for(const T of h().values())for(let m=0;m=c||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(ys,"swapDestinationTerminalTailsToReduceCrossings");function xs(t,e){const{realNodeRects:r,labelNodeRects:a}=me(e.values()),l=t.filter(T=>!T.isLayoutOnly),f=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),i=d((T=new Map)=>{let m=0;for(let I=0;Il.reduce((m,I)=>m+Qt(f(I,T)),0),"totalBends"),x=d(T=>{const m=T.start,I=T.end,w=m?e.get(m):void 0,R=I?e.get(I):void 0,k=w?qt(w):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),C=d((T,m,I)=>{if(I.index<=0||I.index+1>=m.length-1)return;const w=x(T);if(w){if(I.vertical){const R=I.a.x,k=Math.min(w.src.left,w.dst.left),O=Math.max(w.src.right,w.dst.right),F=RO+Z?"right":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"vertical",side:F,coord:R,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const R=I.a.y,k=Math.min(w.src.top,w.dst.top),O=Math.max(w.src.bottom,w.dst.bottom),F=RO+Z?"bottom":void 0;return F?{edge:T,points:m,segmentIndex:I.index,axis:"horizontal",side:F,coord:R,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),h=d(()=>{const T=[];for(const m of l){const I=f(m);for(const w of it(I)){const R=C(m,I,w);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=Ft,"railsInteract"),c=d(T=>{const m=[],I=new Set;for(const w of T){if(I.has(w))continue;const R=[w],k=[];for(I.add(w);R.length>0;){const O=R.pop();k.push(O);for(const F of T)!I.has(F)&&p(O,F)&&(I.add(F),R.push(F))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const I of T)m.some(w=>Math.abs(w-I.coord){const m=T.map(R=>R.coord),I=y(T),w=[];if(T.length<=6){const R=new Array(I.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((F,H)=>Math.abs(F-m[H])>=Z)&&w.push([...k]);return}for(const[F,H]of I.entries())R[F]||(R[F]=!0,k.push(H),O(),k.pop(),R[F]=!1)},"visit");return O(),w}for(let R=0;R{const I=new Map;for(const[R,k]of T.entries()){const O=m[R],F=I.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(F[k.segmentIndex].x=O,F[k.segmentIndex+1].x=O):(F[k.segmentIndex].y=O,F[k.segmentIndex+1].y=O),I.set(k.edge,F)}const w=new Map;for(const[R,k]of I){const O=ae(pt(k));if(it(O).length!==O.length-1)return;w.set(R,O)}return w},"replacementsForAssignment"),E=d(T=>{for(const[m,I]of T){const w=[m.start,m.end].filter(R=>!!R);for(const R of it(I))if(wt(R.a,R.b,r,w,-2)||wt(R.a,R.b,a,[],-2))return!1}for(let m=0;m=Ft)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=i();if(m===0)return;let I,w=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of c(h()))for(const F of v(O)){const H=M(O,F);if(!H||!E(H))continue;const P=i(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(F[mt]-dt.coord),0);P>w||P===w&&(G>R||G===R&&j>=k)||(I=H,w=P,R=G,k=j)}if(!I)return;for(const[O,F]of I)O.points=F}}d(xs,"reassignCrossingExternalRailChannels");function bs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(h=>!h.isLayoutOnly),a=d((h,p,c)=>pt(h===p?c??[]:h.points??[]),"pointsFor"),l=d(h=>it(h).reduce((p,c)=>{const y=c.a.x-c.b.x,v=c.a.y-c.b.y;return p+Math.hypot(y,v)},0),"pathLength"),f=d((h,p)=>{let c=0;for(let y=0;y{if(h.horizontal){const c=h.a.y;return(Math.abs(c-p.top)<1||Math.abs(c-p.bottom)<1)&&zt(h.a.x,h.b.x,p.left,p.right)>=Ft}if(h.vertical){const c=h.a.x;return(Math.abs(c-p.left)<1||Math.abs(c-p.right)<1)&&zt(h.a.y,h.b.y,p.top,p.bottom)>=Ft}return!1},"segmentRunsAlongRectBorder"),g=d(h=>{const p=[h.start,h.end].filter(y=>!!y),c=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&c.push(M)}return c},"endpointRectsFor"),x=d((h,p)=>{if(p+3>=h.length)return[];const c=h[p],y=h[p+1],v=h[p+2],M=h[p+3],E=Tt(c,y,Z)&&At(y,v,Z)&&Tt(v,M,Z),T=At(c,y,Z)&&Tt(y,v,Z)&&At(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-c.x)!==Math.sign(M.x-v.x):Math.sign(y.y-c.y)!==Math.sign(M.y-v.y)))return[];const I=ft(c,M,Z)||ht(c,M,Z)?[]:[{x:c.x,y:M.y},{x:M.x,y:c.y}],w=I.length===0?[[...h.slice(0,p+1),...h.slice(p+3)]]:I.map(k=>[...h.slice(0,p+1),k,...h.slice(p+3)]),R=new Set;return w.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(F=>oe(F,M,Z)))return!1;const O=k.map(F=>`${F.x.toFixed(3)},${F.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),C=d((h,p,c)=>{const y=[h.start,h.end].filter(M=>!!M),v=g(h);for(const M of it(p))if(wt(M.a,M.b,o,y,-2)||wt(M.a,M.b,s,[],-2)||v.some(E=>i(M,E)))return!1;for(const M of r)if(M!==h){for(const E of it(p))for(const T of it(a(M)))if(ce(E,T,.5)>=Ft)return!1}return f(h,p)<=c},"candidateIsSafe");for(let h=0;h<8;h++){const p=f();let c,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=a(T),I=Qt(m,Z),w=l(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),F=l(k);if(!(Ov||P===v&&(O>M||O===M&&F>=E)||(c=T,y=k,v=P,M=O,E=F)}}if(!c||!y)return;c.points=y}}d(bs,"shortcutRedundantOrthogonalJogs");function Ms(t,e){const a=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const _=N.x??0,D=N.y??0,V=qt(N);V&&a.push({id:String(N.id??""),cx:_,cy:D,rect:V})}if(a.length===0)return;const l=new Map(a.map(N=>[N.id,N])),f=a.map(N=>({id:N.id,rect:N.rect})),i=["top","bottom","left","right"],g={top:Math.min(...a.map(N=>N.rect.top))-20,bottom:Math.max(...a.map(N=>N.rect.bottom))+20,left:Math.min(...a.map(N=>N.rect.left))-20,right:Math.max(...a.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),C=new Map(x.map((N,_)=>[N,_])),h=d(N=>{const _=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+_*20*V);return D},"outwardTracksForSide"),p=d((N,_=new Map)=>pt(_.get(N)??N.points??[]),"replacementPointsFor"),c=d((N,_)=>{let D=0;for(const V of N)for(const u of _)le(V.a,V.b,u.a,u.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,_)=>c(it(N),it(_)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let _=0;const D=[],V=new Set,u=[],b=d(S=>{V.has(S)||(V.add(S),u.push(S))},"addEdge");for(let S=0;S0&&(_+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return u.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),{count:_,pairs:D,edgeSet:V,edges:u}},"crossingSnapshot"),M=d((N,_)=>{const D=new Set(_.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let u=0;for(let b=0;b{const _=new Map;for(const u of N.pairs){const b=_.get(u.first)??new Set;b.add(u.second),_.set(u.first,b);const S=_.get(u.second)??new Set;S.add(u.first),_.set(u.second,S)}const D=[],V=new Set;for(const u of N.edges){if(V.has(u))continue;const b=[u],S=[];for(V.add(u);b.length>0;){const L=b.pop();S.push(L);for(const A of _.get(L)??[])V.has(A)||(V.add(A),b.push(A))}S.sort((L,A)=>(C.get(L)??0)-(C.get(A)??0)),S.length>1&&D.push(S)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(_=>!!_),"endpointIdsFor"),m=d(N=>{const _=[];for(const D of E(N)){const V=new Set(D),u=new Set(D.flatMap(S=>T(S))),b=[...D];for(const S of x)V.has(S)||T(S).some(L=>u.has(L))&&b.push(S);b.sort((S,L)=>(C.get(S)??0)-(C.get(L)??0)),_.push(b)}return _},"pairSearchGroups"),I=d((N,_,D)=>M(N,new Map([[_,D]])),"crossingCountWithSingleReplacement"),w=d(N=>{const _=new Map;for(const D of N.pairs)_.set(D.first,(_.get(D.first)??0)+D.count),_.set(D.second,(_.get(D.second)??0)+D.count);return _},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((_,D,V)=>{const u=N[V];return _+Math.abs(D.x-u.x)+Math.abs(D.y-u.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((_,D)=>_+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((_,D)=>_+R(p(D,N)),0),"totalLength"),F=d((N,_,D=new Map)=>{const V=it(_);for(const u of x)if(u!==N){for(const b of V)for(const S of it(p(u,D)))if(ce(b,S,.5)>=Ft)return!0}return!1},"pathHasSegmentConflict"),H=d((N,_)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(_))if(wt(V.a,V.b,f,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,_)=>{const D=ae(pt(_));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,_,D)=>{switch(_){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,_,D,V)=>{const u=D==="left"||D==="top"?-1:1,b=[j(_,D,V),g[D]];for(const S of b)for(let L=0;L<=2;L++)P(N,io(_,D,V,S+u*20*L))},"addSameSideCandidates"),dt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:b,y:_.y},{x:b,y:S},{x:V.x,y:S},V])},"addHorizontalToVerticalCandidates"),mt=d((N,_,D,V,u)=>{for(const b of h(D))for(const S of h(u))P(N,[_,{x:_.x,y:b},{x:S,y:b},{x:S,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,_,D,V,u)=>{const b=[...h("top"),...h("bottom")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:S,y:_.y},{x:S,y:A},{x:L,y:A},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,_,D,V,u)=>{const b=[...h("left"),...h("right")];for(const S of h(D))for(const L of h(u))for(const A of b)P(N,[_,{x:_.x,y:S},{x:A,y:S},{x:A,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const _=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(u=>`${u.x.toFixed(3)},${u.y.toFixed(3)}`).join("|");return _.has(V)||D.length<2?!1:(_.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,_,D,V)=>{const u=[],b=ro(N,_,D,V,20,Z);b&&P(u,b),_===V&&J(u,N,_,D);const S=G(_),L=G(V);return S&&!L?dt(u,N,_,D,V):!S&&L?mt(u,N,_,D,V):S?kt(u,N,_,D,V):Pt(u,N,_,D,V),Q(u)},"buildCandidatesForSides"),et=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="top"||S==="bottom"?h(S):b;for(const B of u){P(N,[_,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of A)P(N,[_,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,_,D,V)=>{const u=[...h("left"),...h("right")],b=[...h("top"),...h("bottom")];for(const S of i){const L=Ie(V,S),A=S==="left"||S==="right"?h(S):u;for(const B of b){P(N,[_,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of A)P(N,[_,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const _=N.start,D=N.end,V=D?l.get(D):void 0;if(!_||!V)return[];const u=pt(N.points??[]);if(u.length<4)return[];const b=u[0],S=u[1],L=[];return At(b,S,Z)?et(L,b,S,V):Tt(b,S,Z)&&at(L,b,S,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const _=N.start,D=N.end,V=_?l.get(_):void 0,u=D?l.get(D):void 0;if(!V||!u)return[];const b=[];for(const S of i){const L=Ie(V,S);for(const A of i)b.push(...W(L,S,Ie(u,A),A))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,_,D)=>{const V=new Set;for(const u of x){if(u===N)continue;const b=D.get(u)??it(p(u));_.some(S=>b.some(L=>ce(S,L,.5)>=Ft))&&V.add(u)}return V},"sharedTrackConflictsFor"),jt=d((N,_,D,V)=>{const u=new Set;return xt(N).map(S=>ae(pt(S))).filter(S=>{if(H(N,S))return!1;const L=S.map(A=>`${A.x.toFixed(3)},${A.y.toFixed(3)}`).join("|");return u.has(L)||S.length<2?!1:(u.add(L),!0)}).map(S=>{const L=it(S);let A=0;for(const B of x)B!==N&&(A+=c(L,D.get(B)??it(p(B))));return{candidate:S,candidateSegments:L,crossings:_.count-(V.get(N)??0)+A,bends:Qt(S,Z),totalBends:Qt(S),length:R(S)}}).filter(({crossings:S})=>S<=_.count).sort((S,L)=>S.crossings-L.crossings||S.bends-L.bends||S.length-L.length).slice(0,48).map(S=>({path:S.candidate,segments:S.candidateSegments,sharedTrackConflicts:Vt(N,S.candidateSegments,D),totalBends:S.totalBends,length:S.length}))},"pairCandidatesFor"),Ut=d((N,_,D,V,u,b)=>{let S=0;for(const A of N.pairs)(A.first===_||A.second===_||A.first===V||A.second===V)&&(S+=A.count);let L=c(D.segments,u.segments);for(const A of x){if(A===_||A===V)continue;const B=b.get(A)??it(p(A));L+=c(D.segments,B)+c(u.segments,B)}return N.count-S+L},"pairCrossingCount"),te=d((N,_)=>{for(const D of N.sharedTrackConflicts)if(D!==_)return!1;return!0},"conflictsOnlyWith"),Se=d((N,_)=>N.segments.some(D=>_.segments.some(V=>ce(D,V,.5)>=Ft)),"candidatesShareTrack"),de=d((N,_,D,V)=>te(_,D.edge)&&te(V,N.edge)&&!Se(_,V),"pairCandidatesAreCompatible"),Ce=d((N,_,D,V,u)=>{const b=Ut(N.current,_.edge,D,V.edge,u,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[_.edge,D.path],[V.edge,u.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(_.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+u.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(_.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+u.length}},"scorePairReplacement"),an=d((N,_)=>N.crossings<_.crossings||N.crossings===_.crossings&&(N.bends<_.bends||N.bends===_.bends&&N.length<_.length),"pairScoreIsBetter"),ln=d((N,_,D,V)=>{let u=V;for(const b of _.candidates)for(const S of D.candidates){if(!de(_,b,D,S))continue;const L=Ce(N,_,b,D,S);L&&an(L,u)&&(u=L)}return u},"bestScoreForOptionPair"),fn=d(N=>{const _=k(),D=O(),V=vt(),u=w(N),b=new Map(x.map(q=>[q,Qt(p(q))])),S=new Map(x.map(q=>[q,R(p(q))])),L=new Map,A=m(N);for(const q of A)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,u);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:_,length:D};const U={current:N,currentBends:_,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:S,baseSegments:V};for(const q of A){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const _=v(),D=_.count;if(D===0)return;let V,u,b=D,S=Number.POSITIVE_INFINITY;for(const A of _.edges){const B=Qt(p(A),Z);for(const U of xt(A)){const q=H(A,U),z=!q&&F(A,U),Y=I(_,A,U),ot=Qt(U,Z);q||z||!(Yb||Y===b&&ot>=S||(V=A,u=U,b=Y,S=ot)}}if(V&&u){V.points=u;continue}const L=fn(_);if(!L)return;for(const[A,B]of L)A.points=B}}d(Ms,"resolveRenderedOrthogonalCrossings");var pe=.001,Rr=8;function Is(t,e){const{nodeInfoById:n,realNodeRects:o}=sn(e),s=["top","bottom","left","right"],r=20,a={top:Math.min(...o.map(c=>c.rect.top))-r,bottom:Math.max(...o.map(c=>c.rect.bottom))+r,left:Math.min(...o.map(c=>c.rect.left))-r,right:Math.max(...o.map(c=>c.rect.right))+r},l=d((c,y,v,M)=>{const E=[],T=ro(c,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(io(c,y,v,a[y])),E},"buildOrthogonalPathCandidates"),f=d((c,y)=>{for(let v=0;v{let M=0;const E=Re(c,pe),T=y.start,m=y.end;for(const I of t){if(I===y||I.isLayoutOnly)continue;const w=I.start,R=I.end;if(!v&&T&&m&&(w===T||w===m||R===T||R===m))continue;const k=I.points;if(!(!k||k.length<2))for(const O of E)for(const F of Re(k,pe)){if(ao(O.a,O.b,F.a,F.b,pe,pe)){M++;continue}ce(O,F,pe)>=Rr&&M++}}return M},"pathConflictCount"),g=4,x=d((c,y)=>{const v=Math.abs(c.y-y.rect.top),M=Math.abs(c.y-y.rect.bottom),E=Math.abs(c.x-y.rect.left),T=Math.abs(c.x-y.rect.right);let m="top",I=v;return M{const M=C.get(c)??[];M.push({side:y,edgeId:v}),C.set(c,M)},"addFaceClaim");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points??[];if(y.length<1)continue;const v=c.id??"",M=c.start,E=c.end;if(M){const T=n.get(M);T&&h(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&h(E,x(y[y.length-1],T),v)}}const p=d((c,y,v)=>C.get(c)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const c of t){if(c.isLayoutOnly)continue;const y=c.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v0){const mt=i(J,c,!0);if(mt>O||mt===O&&dt>=F)continue;O=mt,F=dt,k=J;continue}i(J,c)>R||dtG.edgeId!==I));const P=C.get(E);P&&C.set(E,P.filter(G=>G.edgeId!==I)),h(M,x(k[0],T),I),h(E,x(k[k.length-1],m),I)}}}d(Is,"simplifyDetouredEdges");var Kt=.001,No=10,$e=7;function Yn(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const a=r.x-s.x,l=r.y-s.y;if(!(Math.abs(a)+Math.abs(l)r&&We(t,Ss(r)))}d(Gn,"labelOverlapsOwnMarker");function Ve(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const c=p.points;if(!(!c||c.length<2))for(let y=0;y{const y=Ln(c,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&We(y,M))return!0;return!1},"labelOverlapsForeignNode"),i=d((p,c)=>{const y=Ln(c,r);for(const v of n)if(v.edgeId!==p&&on(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,c,y)=>f(p,y)||i(c,y),"labelOverlapsAnything"),x=[],C=d(p=>{for(const{id:c,rect:y}of s)if(qo(y,p))return c},"findContainingLane"),h=d((p,c)=>x.some(y=>y.labelId!==p&&We(c,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const c=p.labelNodeId;if(!c)continue;const y=e.get(c);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx0?m:T,w=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===w,gt=et.orientation===w;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],F=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=we(Q.midX,Q.midY,M,E),et=C(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+a,xt=at.rect.right-M/2-a,vt=at.rect.top+E/2+a,Vt=at.rect.bottom-E/2-a;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=we(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+l;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt{const W=R(Q);for(const et of W)for(const at of F){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!Gn(xt.rect,v)&&!h(c,xt.rect)&&!g(c,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!Gn(vt.rect,v)&&!h(c,vt.rect)&&!f(c,vt.rect)&&(et||!i(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(I)??(I.lengthet.labelId===c);W>=0?x[W]={labelId:c,rect:Q}:x.push({labelId:c,rect:Q})}}}d(Ve,"anchorLabelsToPolyline");var bn=1e-6,Nr=8,Oo=Nr/2,Or=3;function $n(t,e){return t{const g=$n(l,f);let x=0;const C=d(h=>{if(!h)return;const p=s.get(h);if(!p)return;const c=i==="x"?p.w/2:p.h/2;c>x&&(x=c)},"consider");C(a.labelNodeId);for(const h of t){if(h===a||h.isLayoutOnly)continue;const p=h.start,c=h.end;!p||!c||$n(p,c)===g&&C(h.labelNodeId)}return x>0?x+Or:0},"labelClearanceFor");for(const a of t){if(a.isLayoutOnly)continue;const l=a.points;if(!oo(l,bn))continue;const f=co(a,n,bn);if(!f)continue;const{srcId:i,dstId:g,srcInfo:x,dstInfo:C,collinearX:h,collinearY:p}=f;if(h===p)continue;let c,y;if(h){const m=C.cy>x.cy;c={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:C.cx,y:m?C.rect.top:C.rect.bottom}}else{const m=C.cx>x.cx;c={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?C.rect.left:C.rect.right,y:C.cy}}if(wt(c,y,o,[i,g],1))continue;const M=r(a,i,g,h?"x":"y"),E=M>Oo?M:Oo,T=[0,E,-E];for(const m of T){const I={...c},w={...y};if(h){if(I.x+=m,w.x+=m,I.x<=x.rect.left||I.x>=x.rect.right||w.x<=C.rect.left||w.x>=C.rect.right)continue}else if(I.y+=m,w.y+=m,I.y<=x.rect.top||I.y>=x.rect.bottom||w.y<=C.rect.top||w.y>=C.rect.bottom)continue;if(!wt(I,w,o,[i,g],1)&&!Ke(I,w,t,a,{epsilon:bn})){a.points=[I,w];break}}}}d(Cs,"straightenCollinearSiblingDetours");function zn(t,e){const{realNodeRects:f,labelNodeRects:i}=me(e.values()),g=d((m,I)=>Re(I,.001).map(w=>({...w,edge:m,interior:w.index>=1&&w.index<=I.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const I of t){if(I.isLayoutOnly)continue;const w=I.points;!w||w.length<2||m.push(...g(I,pt(w)))}return m},"allSegments"),C=d((m,I)=>m.horizontal&&I.horizontal?zt(m.a.x,m.b.x,I.a.x,I.b.x)>=8&&Math.abs(m.a.y-I.a.y)<7:m.vertical&&I.vertical?zt(m.a.y,m.b.y,I.a.y,I.b.y)>=8&&Math.abs(m.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),h=d((m,I)=>{const w=m.start,R=m.end,k=g(m,I);if(k.length!==I.length-1)return!1;const O=[w,R].filter(H=>!!H),F=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(wt(H.a,H.b,f,O,-2)||wt(H.a,H.b,i,F,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(C(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,I)=>{const w=pt(m.edge.points??[]);if(w.length<4||m.index>=w.length-1)return;const R=w.map(k=>({...k}));if(m.horizontal)R[m.index].y+=I,R[m.index+1].y+=I;else if(m.vertical)R[m.index].x+=I,R[m.index+1].x+=I;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),c=d((m,I)=>({x:m.x??(I.left+I.right)/2,y:m.y??(I.top+I.bottom)/2}),"nodeCenter"),y=d(m=>{const I=m.edge,w=pt(I.points??[]);if(w.length!==4||m.index!==1)return;const R=I.start?e.get(I.start):void 0,k=I.end?e.get(I.end):void 0,O=R?qt(R):void 0,F=k?qt(k):void 0,H=w.slice(m.index+2);if(!(!R||!k||!O||!F||H.length===0))return{sourceCenter:c(R,O),targetCenter:c(k,F),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,I,w,R,k,O)=>{const F=R.y>=w.y,H=F?k.bottom:k.top,P=H+(F?20:-20);if(F&&m.b.y<=P+.001||!F&&m.b.y>=P-.001)return;const G=m.a.x+I;return pt([{x:w.x,y:H},{x:w.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,I,w,R,k,O)=>{const F=R.x>=w.x,H=F?k.right:k.left,P=H+(F?20:-20);if(F&&m.b.x<=P+.001||!F&&m.b.x>=P-.001)return;const G=m.a.y+I;return pt([{x:H,y:w.y},{x:P,y:w.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,I)=>{const w=y(m);if(w){if(m.vertical)return v(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail);if(m.horizontal)return M(m,I,w.sourceCenter,w.targetCenter,w.sourceRect,w.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const I=x();let w=!1;for(let R=0;RP.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&h(P.edge,j)){P.edge.points=j,w=!0;break}const J=E(P,G);if(J&&h(P.edge,J)){P.edge.points=J,w=!0;break}}if(w)break}}if(!w)return}}d(zn,"nudgeSharedInteriorSubpaths");function vs(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,a=o.x-n.x,l=o.y-n.y,f=s*l-r*a;if(Math.abs(f)<1e-10)return!1;const i=n.x-t.x,g=n.y-t.y,x=(i*l-g*a)/f,C=(i*r-g*s)/f,h=.01;return x>h&&x<1-h&&C>h&&C<1-h}d(vs,"segmentsIntersect");function Ls(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=Jo(e),r=[];for(const l of n){if(l.isLayoutOnly)continue;const f=l.points;if(!f||f.length<2)continue;const i=l.start,g=l.end,x=l.labelNodeId,C=l.id??`${i}->${g}`;for(const h of s)if(!(h.nodeId===i||h.nodeId===g)&&!(x&&h.nodeId===x)){for(let p=0;p0){const l=o.filter(i=>i.type==="edge-node-overlap").length,f=o.filter(i=>i.type==="edge-edge-crossing").length;In.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${l} edge-node overlap(s), ${f} edge crossing(s)`);for(const i of o)In.warn(`[SWIMLANE_VALIDATE] ${i.type}: ${i.detail}`)}return o}d(Ls,"validateSwimlanesLayout");function Es(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(l=>!l.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!us(t,e)||e==="BT"&&s.length>0&&!ds(t))return;for(const l of o){if(l.isLayoutOnly)continue;const f=l.points;!f||f.length<2||(l.points=ae(qe(f)))}Is(o,n),Cs(o,n),hs(o,n);const r=new Map;for(const l of n)r.set(String(l.id),l);Ve(o,r),ns(o,r),gs(o,r),zn(o,r),ps(o,r),ms(o,r),Dn(o,r),ys(o,r);const a=d(()=>{Ms(o,r),xs(o,r),bs(o,r),Ve(o,r),Fn(o,r),Dn(o,r),Ve(o,r),Fn(o,r)},"finalizeRenderedEdges");a(),zn(o,r),a(),Hn(o,r),Xn(o,r),Hn(o,r),Xn(o,r)}d(Es,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const a=`${r.id}:${r.src}->${r.dst}`;n.has(a)||(n.add(a),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function go(t,e){return t.edges.filter(n=>n.dst===e)}d(go,"incoming");function Ts(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ts,"buildSuccessorMap");function po(t){const e=Ts(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(po,"buildSortedSuccessorMap");function mo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(mo,"buildInDegreeMap");function yo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(yo,"sortedZeroInDegreeNodes");function rn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(rn,"buildPredecessorSuccessorMaps");function xo(t,e,n,o){let s=0;for(const a of t.nodes)o?.skipGroups&&t.nodeById.get(a)?.isGroup||(s=Math.max(s,n[a]??0));const r=Array.from({length:s+1},()=>[]);for(const a of e)o?.skipGroups&&t.nodeById.get(a)?.isGroup||r[Math.max(0,n[a]??0)].push(a);return r}d(xo,"buildLayersFromRanks");function Pe(t){const e=mo(t),n=yo(e),o=[],s=po(t);for(;n.length;){const r=n.shift();o.push(r);for(const a of s.get(r)??[])if(e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0){let l=0;for(;l{if(s-o<=1)return 0;const r=o+s>>1;let a=n(o,r)+n(r,s),l=o,f=r,i=o;for(;l=s||lx.dst===C.dst?x.id.localeCompare(C.id):x.dst.localeCompare(C.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const C=x.dst;o[C]===0?r(C):o[C]===1&&s.push(x)}o[g]=2},"dfs"),a=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of a)o[g]===0&&r(g);const l=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),f=e.edges.map(g=>l.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:f,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(As,"removeCycles_DFS");function ws(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const l=n(r)??r;return e.set(o,l),l},"resolve");for(const o of t.nodes)n(o);return e}d(ws,"buildTopLaneMap");function fe(t){const e=ws(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function cn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(cn,"buildTopLaneOrder");function Mo(t,e){const n=cn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const a of e)!o.has(a)||s.has(a)||(s.add(a),r.push(a));for(const a of n)s.has(a)||r.push(a);return r}d(Mo,"resolveTopLaneOrder");var Pr={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Po={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Rs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=rn(n);for(const m of r.values())m.sort((I,w)=>I.localeCompare(w));const a=Pe(n)??[...n.nodes].sort((m,I)=>m.localeCompare(I)),l=new Map;for(const[m,I]of a.entries())l.set(I,m);const f=new Map,i=new Map;for(const m of n.nodes)i.set(m,[]);for(const m of a){const I=(r.get(m)??[]).filter(w=>f.has(w));if(I.length>0){const w=Ns(m,I,{laneOf:o,rankHint:s,topoIndex:l});f.set(m,w),i.get(w).push(m)}else f.has(m)||f.set(m,null)}for(const m of n.nodes)f.has(m)||f.set(m,null);const g=new Set;for(const m of n.nodes)(f.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,I)=>{const w=l.get(m)??0,R=l.get(I)??0;return w===R?m.localeCompare(I):w-R}),C=Os(n),h=new Map;for(const[m,I]of C.entries())h.set(m,[...I].sort((w,R)=>w.localeCompare(R)));const p=Ps(h),c=Bs(h),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of c)for(const I of m.nodes){const w=y.get(I);w?w.push(m.id):y.set(I,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const I of i.get(m)??[])T(I);M.push(m)}},"walk");for(const m of x)T(m);for(const m of a)T(m);return{parent:f,children:i,roots:x,componentOf:p,blocks:c,nodeBlocks:y,adjacency:h,preorder:v,postorder:M,topologicalOrder:a}}d(Rs,"buildDrivingTree");function Ns(t,e,n){const o=n.laneOf(t);return[...e].sort((r,a)=>{const l=n.laneOf(r),f=n.laneOf(a),i=l!=null&&l===o,g=f!=null&&f===o;if(i!==g)return i?-1:1;const x=n.rankHint?.[r],C=n.rankHint?.[a];if(x!=null&&C!=null&&x!==C)return C-x;const h=n.topoIndex.get(r)??0,p=n.topoIndex.get(a)??0;return h!==p?h-p:r.localeCompare(a)})[0]}d(Ns,"chooseParent");function Os(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(Os,"buildAdjacency");function Ps(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const a of t.get(r)??[])e.has(a)||s.push(a)}}n++}return e}d(Ps,"assignComponents");function Bs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const a=d((l,f)=>{e.set(l,++r),n.set(l,r);for(const i of t.get(l)??[])i!==f&&(e.has(i)?(e.get(i)??0)<(e.get(l)??0)&&(o.push([l,i]),n.set(l,Math.min(n.get(l)??r,e.get(i)??r))):(o.push([l,i]),a(i,l),n.set(l,Math.min(n.get(l)??r,n.get(i)??r)),(n.get(i)??0)>=(e.get(l)??0)&&s.push(ks(l,i,o,s.length))))},"visit");for(const l of t.keys())e.has(l)||a(l,null);return s}d(Bs,"computeBlocks");function ks(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const a=n.pop();if(s.push(a),r.add(a[0]),r.add(a[1]),a[0]===t&&a[1]===e||a[0]===e&&a[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(ks,"popBlock");function Fs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,a=new Array(r).fill(-1),l=new Array(r).fill(0),f=[],i=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(a[T]=-1,l[T]=0,i.has(M)||(i.add(M),f.push(M)))}for(;f.length>0;){const M=f.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(i.has(m))continue;const I=s.get(m);I!=null&&(a[I]=E,l[I]=l[E]+1,i.add(m),f.push(m))}}for(const M of o){if(i.has(M))continue;const E=s.get(M);E!=null&&(a[E]=-1,l[E]=0,i.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M{if(M===-1||E===-1)return-1;l[M]>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const I=x[m][M],w=x[m][E];I===-1||w===-1||I!==w&&(M=I,E=w)}return x[0][M]},"lcaIndex"),h=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],I=e[T];if(m==null||I==null||(m>I&&([E,T]=[T,E],[m,I]=[I,m]),m==null||I==null||m===I))continue;const w=s.get(E),R=s.get(T);if(w==null||R==null)continue;const k=C(w,R);if(k===-1)continue;const O=h[k];for(let F=m;F{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:h[E],m=T?new Map(T):new Map,I=n.children.get(M)??[];for(const w of I){const R=v(w),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let F=R.get(k)??0;const H=e[w];H!=null&&H>k&&(F+=1),O.set(w,F)}c(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Fs,"computeSubtreeCrossCounts");function _s(t,e,n){const o=new Map,s=d(r=>{let a=n[r]??0;const l=[...e.get(r)??[]];l.sort(Io(n));for(const f of l){s(f);const i=o.get(f);i!=null&&(a=Math.min(a,i))}o.set(r,a)},"annotate");for(const r of t)s(r);return o}d(_s,"annotateMinimumLayers");function Io(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Io,"compareByRankThenId");function Ds(t,e,n,o){let s=0;for(const f of e){const i=n[f]??0;i>s&&(s=i)}const r=Array.from({length:s+1},()=>[]),a=new Set,l=d(f=>{if(a.has(f))return;a.add(f);const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f);for(const g of o(f))l(g)},"emit");for(const f of t)l(f);for(const f of e)if(!a.has(f)){const i=n[f]??0;r[i]||(r[i]=[]),r[i].push(f),a.add(f)}return r}d(Ds,"emitNodesInTreeOrder");function Hs(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d(Hs,"deduplicateLayers");function Xs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const a=e[s]??0,l=[],f=[],i=n.get(s);for(const g of r){const x=o.get(g)??a;x>a?l.push({child:g,min:x}):f.push(g)}return l.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),f.sort((g,x)=>{const C=i?.get(g)??0,h=i?.get(x)??0;if(C!==h)return C-h;const p=o.get(g)??a,c=o.get(x)??a;return p!==c?p-c:g.localeCompare(x)}),[...l.map(g=>g.child),...f]}}d(Xs,"createChildOrderer");function nn(t,e,n){const o=Rs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const a=Fs(t,e,o),l=[...r].sort(Io(e)),f=_s(l,s,e),i=Xs(s,e,a,f);let g=Ds(l,t.nodes,e,i);return g=Hs(g),g}d(nn,"buildMultitreeLayerOrder");function Ys(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),a=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&a.push(r.get(l.dst));return bo(a)}d(Ys,"countCrossingsBetweenAdjacent");function Vn(t,e,n){const o=[];for(const r of e){const a=n[r.src],l=n[r.dst];if(a==null||l==null||a===l)continue;let f=r.src,i=r.dst,g=a,x=l;a>l&&(f=r.dst,i=r.src,g=l,x=a);for(let C=g;C(n[C]??0)-(n[x]??0));for(const x of g){const C=n[x]??0;if(C===0)continue;let h=0;for(const v of o.get(x)??[])h=Math.max(h,(n[v]??0)+1);if(h>=C)continue;const p=C;n[x]=h;const c=nn(t,n,s),y=Vn(c,t.edges,n);y(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const a=t.edges.filter(c=>c.src===s);if(a.length===0)continue;let l=!1,f=0;for(const c of a){const y=n(c.dst);y==null||y===r?l=!0:f++}if(f===0||l)continue;let i=0,g=!1;for(const c of t.edges){if(c.dst!==s)continue;const y=n(c.src);y&&(y===r?g=!0:i++)}if(i>0||!g)continue;const x=e[s]??0,C=x+f;let h=0;for(const c of t.edges)c.dst===s&&(h=Math.max(h,(e[c.src]??0)+1));const p=Math.max(x,h,C);p!==x&&(e[s]=p)}}d($s,"adjustCrossLaneSources");function zs(t,e){const n=ye(t),o=Pe(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let a=Object.create(null);for(const f of o){const i=go(n,f),g=e?.ignoreCrossLaneEdges?i.filter(x=>{const C=r(x.src),h=r(f);return!C||!h?!0:C===h}):i;if(g.length===0)a[f]=0;else if(s&&g.length===1){const x=g[0].src,C=r(x),h=r(f);C!==h?a[f]=a[x]??0:a[f]=(a[x]??0)+1}else{let x=-1/0;for(const C of g)x=Math.max(x,(a[C.src]??0)+1);a[f]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(a=Gs(n,a)),e?.ignoreCrossLaneEdges&&$s(n,a),{layers:nn(n,a,r),rankOf:a,dummy:new Set}}d(zs,"assignLayers_LongestPath");function Vs(t,e){const n=ye(t),s={...zs(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:a,succs:l}=rn(n,p=>{if(e?.ignoreCrossLaneEdges){const c=r(p.src),y=r(p.dst);if(c&&y&&c!==y)return!1}return!0}),f=Pe(n)??[...n.nodes],i=[...f].reverse(),g=d((p,c)=>{let y=0;for(const E of a.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=l.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,c)),Math.min(Math.max(c,y),v)},"clampFeasible"),x=en.GRAVITY_ITERATIONS,C=d(p=>{let c=!1;for(const y of p){const v=a.get(y)??[],M=l.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((w,R)=>w+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((w,R)=>w+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),I=g(y,m);I!==s[y]&&(s[y]=I,c=!0)}return c},"relaxOrder");for(let p=0;p0){const y=Math.min(...c.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:xo(n,f,s),rankOf:s,dummy:new Set}}d(Vs,"assignLayers_Gravity");function js(t){const e=mo(t),n=po(t);let o=yo(e);const s=[];for(;o.length>0;){const r=[];for(const a of o){s.push(a);for(const l of n.get(a)??[])e.set(l,(e.get(l)??0)-1),(e.get(l)??0)===0&&r.push(l)}o=r.sort((a,l)=>a.localeCompare(l))}return s.length===t.nodes.length?s:null}d(js,"topoSortByGenerationIfAcyclic");function Us(t,e){const n=ye(t),o=e?.direction==="LR"?js(n)??[...n.nodes].sort():Pe(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),a=Object.create(null),l=new Map,f=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const C=go(n,g);let h=0;if(C.length>0)for(const v of C){const M=v.src,E=a[M]??0;h=Math.max(h,E+f(M,g))}const p=r(g),c=l.get(p)??0,y=Math.max(h,c);a[g]=y,l.set(p,y+1)}return{layers:xo(n,o,a,{skipGroups:!0}),rankOf:a,dummy:new Set}}d(Us,"assignLayers_LaneAwareCompact");function Ws(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(h=>[...h]),r=new Set(t.dummy?[...t.dummy]:[]);let a=0;const l=new Map(n.nodeById),f=d(h=>{const p=`placeholder-${a++}`,c={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(p,c),r.add(p);s.length<=h;)s.push([]);return s[h].push(p),o[p]=h,p},"addDummyAt"),i=[...n.edges].sort((h,p)=>h.id===p.id?h.src===p.src?h.dst.localeCompare(p.dst):h.src.localeCompare(p.src):h.id.localeCompare(p.id)),g=[];for(const h of i){const p=o[h.src]??0,c=o[h.dst]??0;if(c-p<=1){g.push(h);continue}let y=h.src;for(let M=p+1,E=0;M!n.nodes.includes(h))],edges:g,layout:n.layout,nodeById:l};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:C}}d(Ws,"makeProperLayering");function jn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(jn,"median");function Un(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Un,"barycenter");function Ks(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Ks,"neighborPositionsFor");function qs(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(qs,"currentOrderTieBreak");function Wn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),a=Ne(e),l=[];for(const i of n)o.has(i.src)&&s.has(i.dst)&&l.push({u:r.get(i.src),v:a.get(i.dst)});l.sort((i,g)=>i.u===g.u?i.v-g.v:i.u-g.u);const f=l.map(i=>i.v);return bo(f)}d(Wn,"countCrossingsBetweenAdjacent");function je(t,e,n){return[...t].sort((o,s)=>{const r=jn(e.get(o)??[]),a=jn(e.get(s)??[]);return r===a?qs(o,s,n):isFinite(r)?isFinite(a)?r-a:-1:1})}d(je,"sortByHeuristic");function Kn(t,e,n,o,s,r){const a=Ne(t),l=Ne(e),f=Ks(e,a,n,o);if(!s||!r||r.length===0)return je(e,f,l);const i=new Map;for(const C of e){const h=s(C),p=i.get(h)??[];p.push(C),i.set(h,p)}const g=[];for(const C of r){const h=i.get(C);if(!h||h.length===0)continue;const p=je(h,f,l);g.push(...p)}const x=i.get(null);if(x&&x.length>0){const C=je(x,f,l);for(const h of C){const p=Un(f.get(h)??[]);let c=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Un(f.get(v)??[]);if(pa.has(c.src)&&l.has(c.dst)),g=f?n.filter(c=>l.has(c.src)&&f.has(c.dst)):void 0,x=d(c=>{let y=Wn(t,c,i);return g&&o&&(y+=Wn(c,o,g)),y},"crossingScore"),C=s?new Map:null;if(s&&C)for(const c of e)C.set(c,s(c));let h=!0,p=x(r);for(;h;){h=!1;for(let c=0;c+1[...l]),s=e.edges,r=fe(e),a=Mo(e,n?.laneOrder);for(let l=0;l<3;l++){for(let f=1;f=0;f--)o[f]=Kn(o[f+1],o[f],s,"up",r,a),o[f]=qn(o[f+1],o[f],s,o[f-1],r)}return{layers:o}}d(Js,"orderLayers");function Zs(t,e,n){const o=n?.layerGap??Po.DEFAULT_LAYER_GAP,s=n?.nodeGap??Po.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,a=n?.direction??"TB",l=a==="LR"||a==="RL",f=t.layers,i=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),C=d(O=>x(O)?.width??0,"getWidth"),h=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),c=Mo(e,n?.laneOrder),y=f.map(O=>O.reduce((F,H)=>Math.max(F,h(H)),0)),v=[];if(l)for(let O=0;O+1Math.max(mt,C(kt)),0),H=f[O+1].reduce((mt,kt)=>Math.max(mt,C(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(F+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of f)for(const F of O)M.add(p(F));const E=M.has(null),T=c.filter(O=>M.has(O)),m=[...E?[null]:[],...T],I=Object.create(null);for(const O of T)I[O]=0;E&&(I.null=0);for(const O of f){const F=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(F[G]||=[]).push(P)}for(const[P,G]of Object.entries(F)){const j=G.reduce((J,dt)=>J+C(dt),0)+s*Math.max(0,G.length-1);I[P]=Math.max(I[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+C(j),0)+s*Math.max(0,H.length-1);I.null=Math.max(I.null??0,P)}}const w=new Map;{const O=m.map(P=>(P===null?I.null:I[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;PC(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];i[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const F=O.ref.id;k.has(F)||k.set(F,[]),k.get(F).push(O)}for(const[,O]of k){if(O.length===0)continue;const F=O[0].ref,H=F.start,P=F.end;if(H==null||P==null)continue;const G=Math.round(((i[H]??0)+(i[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(i[J]=G)}}return{x:i,y:g}}d(Zs,"assignCoordinates");var Qs=8;function tr(t){let e=2166136261;for(let n=0;n>>0}d(tr,"hashString");function er(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(er,"mulberry32");function nr(t,e){const n=[...t],o=er(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(nr,"deterministicShuffle");function or(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(or,"sourceDistance");function Jn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:a}of e){const l=n.get(s),f=n.get(r);l==null||f==null||(o+=a*Math.abs(l-f))}return o}d(Jn,"laneArrangementCost");function sr(t){const e=cn(t);if(e.length<2)return[];const n=new Map(e.map((r,a)=>[r,a])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const a=typeof r.start=="string"?r.start:void 0,l=typeof r.end=="string"?r.end:void 0;if(!a||!l||!t.nodeById.has(a)||!t.nodeById.has(l))continue;const f=o(a),i=o(l);if(!f||!i||f===i)continue;const g=n.get(f),x=n.get(i);if(g==null||x==null)continue;const[C,h]=g<=x?[f,i]:[i,f],p=`${C}\0${h}`,c=s.get(p);c?c.weight++:s.set(p,{a:C,b:h,weight:1})}return[...s.values()]}d(sr,"buildWeightedLaneEdges");function Zn(t,e,n){const o=[...t];let s=Jn(o,e),r=!0,a=0;const l=Math.max(1,o.length);for(;r&&as.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:a})=>`${s}:${r}:${a}`).join("|");return tr(`${t.join("|")}#${o}#${n}`)}d(ir,"seedForRestart");function cr(t,e={}){const n=cn(t);if(n.length<2)return n;const o=sr(t);if(o.length===0)return n;const s=new Map(n.map((l,f)=>[l,f]));let r=Zn(n,o,s);const a=Math.max(0,e.restarts??Qs);for(let l=0;lct&&f*3>=l?a>0?"bottom":"top":l>ct?r>0?"right":"left":n}d(Qn,"chooseOrthogonalSide");function to(t,e){return Math.abs(t.to-e.from)u.isGroup&&!u.parentId);for(const u of i){const b={id:u.id},S=d(L=>{a.set(L.id,b),n.filter(A=>A.parentId===L.id).forEach(S)},"assignLane");S(u)}const g=n.filter(u=>!u.isGroup&&!u.isEdgeLabel).map(u=>{const b=u.width??10,S=u.height??10,L=u.x??0,A=u.y??0,B=Br;return{nodeId:u.id,minX:L-b/2-B,maxX:L+b/2+B,minY:A-S/2-B,maxY:A+S/2+B,visualXHalfExtent:f?S/2+B:b/2+B}}),x=d((u,b,S,L)=>{let A=l.find(B=>B.orientation===u&&Math.abs(B.coord-b)<1);return A||(A={id:`pipe-${u}-${b.toFixed(0)}`,orientation:u,coord:b,spanMin:S,spanMax:L,tracks:[]},l.push(A)),A.spanMin=Math.min(A.spanMin,S),A.spanMax=Math.max(A.spanMax,L),A},"getOrAddPipe"),C=d((u,b)=>{const S=u.width??10,L=u.height??10,A=u.x??0,B=u.y??0;switch(b){case"top":return{x:A,y:B-L/2};case"bottom":return{x:A,y:B+L/2};case"left":return{x:A-S/2,y:B};case"right":return{x:A+S/2,y:B}}},"portForSide"),h=d((u,b,S)=>C(u,Qn(u,b,S?"bottom":"top")),"getOrthogonalPort"),p=[],c=[],y=new Set,v=1e3,M=d((u,b,S)=>{if(p.length===0)return 0;const L=Math.abs(b.y-S.y)z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(A){const U=b.x,q=Math.min(b.y,S.y)-ct,z=Math.max(b.y,S.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===u||Y.orientation!=="horizontal"||Y.pipe.coordz||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((u,b)=>{if(!u.start||!u.end)return{idx:b,crossLane:0,dx:0,dy:0};const S=r.get(u.start),L=r.get(u.end),A=a.get(u.start),B=a.get(u.end),U=A&&B&&A.id!==B.id?1:0,q=S&&L?Math.abs((L.x??0)-(S.x??0)):0,z=S&&L?Math.abs((L.y??0)-(S.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((u,b)=>{if(u.crossLane!==b.crossLane)return b.crossLane-u.crossLane;const S=u.dx+u.dy,L=b.dx+b.dy;return Math.abs(S-L)>1?S-L:u.idx-b.idx}).map(u=>u.idx),T=d((u,b,S,L)=>{const A=Math.min(u.x,b.x),B=Math.max(u.x,b.x),U=Math.min(u.y,b.y),q=Math.max(u.y,b.y);return!!g.find(Y=>S&&Y.nodeId===S||L&&Y.nodeId===L?!1:Math.abs(u.x-b.x)>ct?Y.minYu.y&&Y.maxX>A&&Y.minXu.x&&Y.maxY>U&&Y.minYQn(u,b,"bottom"),"determineSide"),R=new Map;for(const[u,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const A=(L.x??0)-(S.x??0),B=(L.y??0)-(S.y??0);R.set(u,{edgeIdx:u,srcId:b.start,dstId:b.end,srcSide:w(S,{x:L.x??0,y:L.y??0}),dstSide:w(L,{x:S.x??0,y:S.y??0}),absDx:Math.abs(A),absDy:Math.abs(B),dxSign:Math.sign(A),dySign:Math.sign(B)})}const k=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.absDx===0?1/0:u.absDy/u.absDx:u.absDy===0?1/0:u.absDx/u.absDy,"preferenceStrength"),O=d(u=>u.srcSide==="top"||u.srcSide==="bottom"?u.dxSign>=0?"right":"left":u.dySign>=0?"bottom":"top","secondarySide"),F=new Map;for(const u of R.values()){const b=`${u.srcId}:${u.srcSide}`;F.has(b)||F.set(b,[]),F.get(b).push(u)}const H=new Map,P=d((u,b)=>`${u}:${b}`,"loadKey");for(const u of R.values())H.set(P(u.srcId,u.srcSide),(H.get(P(u.srcId,u.srcSide))??0)+1),H.set(P(u.dstId,u.dstSide),(H.get(P(u.dstId,u.dstSide))??0)+1);for(const u of F.values())if(!(u.length<2)){u.sort((b,S)=>{const L=k(b),A=k(S);return Math.abs(L-A)>1e-9?A-L:b.edgeIdx-S.edgeIdx});for(let b=1;b=A||(H.set(P(S.srcId,S.srcSide),A-1),H.set(P(S.srcId,L),B+1),S.srcSide=L)}}const G=d(u=>{const b=u?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const u of R.values())j.has(u.dstId)||j.set(u.dstId,new Set),j.get(u.dstId).add(u.dstSide);for(const u of R.values()){if(!G(r.get(u.srcId)))continue;const b=j.get(u.srcId);if(!b?.has(u.srcSide))continue;const S=O(u);if(b.has(S)||(H.get(P(u.srcId,S))??0)>0)continue;const L=H.get(P(u.srcId,u.srcSide))??0;H.set(P(u.srcId,u.srcSide),Math.max(0,L-1)),H.set(P(u.srcId,S),1),u.srcSide=S}for(const u of R.values()){const{edgeIdx:b,srcId:S,dstId:L,srcSide:A,dstSide:B}=u,U=r.get(S),q=r.get(L),z=`${S}:${A}:src`,Y=A==="top"||A==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[u,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const S=u.split(":"),L=S.slice(0,-2).join(":"),A=S[S.length-2],B=S[S.length-1],U=r.get(L);if(!U)continue;const z=A==="left"||A==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,dn=`${Dt.edgeIdx}:${B}`;J.set(dn,Jt)}}const mt=d(u=>!!s[u]?.labelNodeId,"edgeHasLabelNode"),kt=d((u,b)=>u?(m.get(`${u}:${b}:src`)??[]).some(({edgeIdx:S})=>mt(S))||(m.get(`${u}:${b}:dst`)??[]).some(({edgeIdx:S})=>mt(S)):!1,"faceHasLabelNode"),Pt=d((u,b,S)=>b==="top"||b==="bottom"?{x:u.x+S,y:u.y}:{x:u.x,y:u.y+S},"applyPortOffset"),Q=d((u,b,S)=>{const L=R.get(u),A={x:S.x??0,y:S.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??w(b,A),q=L?.dstSide??w(S,B);let z=L?C(b,L.srcSide):h(b,A,!0),Y=L?C(S,L.dstSide):h(S,B,!1);const ot=J.get(`${u}:src`),rt=J.get(`${u}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const u of E){const b=s[u];if(c[u]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const S=r.get(b.start),L=r.get(b.end);if(!S||!L)continue;const{pSrcPort:A,pDstPort:B,srcSide:U,dstSide:q}=Q(u,S,L),z={...A},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=A.y>(S.y??0);z.y=X?A.y+ne:A.y-ne}else{const X=A.x>(S.x??0);z.x=X?A.x+ne:A.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.xK.minY&&X.y{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(A,S,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,A.y+ne):Math.max(X.maxY+2,A.y-ne);yt=[{x:A.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(A,S,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,A.x+ne):Math.max(X.maxX+2,A.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:A.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,S,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,S,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)1||bt>1,Nt=I.get(b.start??"")??0,ut=I.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(A,B,b.start,b.end)){b.points=[{...A},{...z},{...Y},{...B}],y.add(u);const Mt=K?"horizontal":"vertical",$t=K?A.y:A.x,It=K?Math.min(A.x,B.x):Math.min(A.y,B.y),St=K?Math.max(A.x,B.x):Math.max(A.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${u}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:u,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const dn=x("vertical",z.x,z.y,z.y);z.x=dn.coord;const hr=x("vertical",Y.x,Y.y,Y.y);Y.x=hr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX$&&X.minYlt&&(ue=Math.min(ue,X.minX-ze),he=Math.max(he,X.maxX+ze),ve=Math.min(ve,X.minY-ze),Le=Math.max(Le,X.maxY+ze))}for(const X of g){if(X.maxXhe||X.maxYLe)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const gr=l.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),pr=l.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),Be=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),ke=Be(z.x,z.y),So=Be(Y.x,Y.y),Fe=new Map,un=new Map,hn=new Map,_e=new Set,xe=[];Fe.set(ke,0),hn.set(ke,"n"),xe.push({key:ke,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),_e.add(ke);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),gn={x:Y.x,y:z.y},mr=ge(z,gn),yr=ge(gn,Y),xr=mr||yr,pn={x:z.x,y:Y.y},br=ge(z,pn),Mr=ge(pn,Y);if(xr?br||Mr||(Math.abs(z.x-Y.x)0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(_e.delete(X.key),X.key===So){let ut=So,Yt=Y;for(Ht=[Yt];un.has(ut);){const ee=un.get(ut);Ht.unshift(ee),Yt=ee,ut=Be(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=pr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=gr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&EtZt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minYK&&Zt.maxX>Yt&&Zt.minX$&&Zt.maxY>Bt&&Zt.minY10&&mn<-5||Ee<-10&&mn>5)&&(St=Math.abs(mn)*100),(Wt>10&&De<-5||Wt<-10&&De>5)&&(St+=Math.abs(De)*50);let Co=0;const vo=hn.get(X.key)??"n",Lo=Math.abs(De)>ct?"h":"v";vo!=="n"&&vo!==Lo&&(Co=50);const Ir=$t+It+St+Co,He=(Fe.get(X.key)??1/0)+Ir,Eo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(He<(Fe.get(Mt)??1/0))if(un.set(Mt,X.pt),Fe.set(Mt,He),hn.set(Mt,Lo),!_e.has(Mt))xe.push({key:Mt,f:He+Eo,pt:ut}),_e.add(Mt);else{const Zt=xe.findIndex(Sr=>Sr.key===Mt);Zt!==-1&&(xe[Zt].f=He+Eo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=KIt.minXGt&&It.minYOt);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minXMath.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)It.minX,Wt=Math.min(X.y,$.y)It.minY;return St&&Wt});let Mt=Ot;if(f&&Ot.length>0){const It=Ot.filter(St=>St.minXBt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;Xu.from{const A=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,u)),B=!S.segments.some(U=>(U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex)&&W(U,b));return A&&B?(u.trackIndex=L.index,b.trackIndex=S.index,S.segments=[...S.segments.filter(U=>U.edgeIndex!==u.edgeIndex||U.segmentIndex!==u.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(u=>{const b=u.tracks.length;return u.tracks[b]={index:b,coord:u.coord,segments:[]},b},"createNewTrack"),gt=d((u,b)=>{const S=u.pipe.tracks[u.trackIndex];S.segments=S.segments.filter(A=>A.edgeIndex!==u.edgeIndex||A.segmentIndex!==u.segmentIndex),u.trackIndex=b,u.pipe.tracks[b].segments.push({edgeIndex:u.edgeIndex,segmentIndex:u.segmentIndex,from:u.from,to:u.to})},"moveSegmentToTrack"),xt=d((u,b)=>{const S=c[u.edgeIndex];for(const L of S){const A=p[L];A.pipe===u.pipe&>(A,b)}},"moveSegmentChainToTrack"),vt=d(u=>{const b=c[u.edgeIndex],S=b.indexOf(p.indexOf(u)),L=[];return S>0&&L.push(p[b[S-1]]),S{if(u.orientation===b.orientation)return!1;const S=u.orientation==="horizontal"?u:b,L=u.orientation==="horizontal"?b:u;return L.pipe.coord>S.from&&L.pipe.coordL.from&&S.pipe.coord{for(const S of u.tracks)if(!S.segments.some(A=>(A.edgeIndex!==b.edgeIndex||A.segmentIndex!==b.segmentIndex)&&W(A,b)))return S.index;return-1},"findAvailableTrack"),Ut=d((u,b)=>{if(u.trackIndex===b.trackIndex)return W(u,b);const S=vt(u),L=vt(b);return S.some(A=>L.some(B=>Vt(A,B)))},"segmentsConflict"),te=d((u,b,S)=>{if(et(u,b,u.pipe.tracks[u.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(u.pipe,b);S(b,L!==-1?L:at(u.pipe))},"resolveTrackConflict"),Se=d(u=>{let b=0;for(let S=0;S{if(de.has(u))return de.get(u);const b=c[u];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(u,q),q}const L=p[b[0]].pipe.coord;let A=L;for(let q=1;qMath.abs(ot-L)?Y:ot;break}}const B=Math.abs(A-L),U={dest:A,deviation:B,base:L,delta:A-L};return de.set(u,U),U},"getDestInfo"),an=d(()=>{let u=0;const b=new Map;for(const[L,A]of s.entries())c[L].length!==0&&A.start&&(b.has(A.start)||b.set(A.start,[]),b.get(A.start).push(L));const S=d(L=>{const A=s[L];if(!A.start||!A.end)return 0;const B=r.get(A.start),U=r.get(A.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=S(B),ot=S(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=c[B].length,st=c[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=c[B][0],yt=c[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const A=L.map(B=>p[c[B][0]]);u+=Se(A)}return u},"fixSourceHandleCrossings"),ln=d(()=>{let u=0;const b=new Map;for(const[S,L]of s.entries())c[S].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(S));for(const S of b.values()){S.sort((A,B)=>{const U=d(Y=>{const ot=c[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(A),z=U(B);return Math.abs(q-z)>.1?q-z:A-B});const L=S.map(A=>p[c[A][c[A].length-1]]);u+=Se(L)}return u},"fixTargetHandleCrossings"),fn=d(()=>{let u=0;for(const b of l){const S=[];for(const L of b.tracks)for(const A of L.segments){const B=c[A.edgeIndex].find(U=>p[U].segmentIndex===A.segmentIndex);B!==void 0&&S.push(p[B])}S.sort((L,A)=>L.edgeIndex-A.edgeIndex||L.segmentIndex-A.segmentIndex);for(let L=0;L{L.segments.forEach(A=>{b.push({edgeIndex:A.edgeIndex,segmentIndex:A.segmentIndex,trackIndex:L.index,from:A.from,to:A.to})})}),b.sort((L,A)=>L.from-A.from);const S=[];if(b.length>0){let L=[b[0]],A=b[0].to;for(let B=1;BA.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...A].filter(tt=>(B.get(tt)??0)<-1),q=[...A].filter(tt=>(B.get(tt)??0)>1),z=[...A].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?u.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,u.coord-ot*Mn);if(z.length===0&&A.size>0){const tt=[...A].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,u.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,u.coord+yt*Rt*Mn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,u.coord+st*Mn)}}for(const[u,b]of s.entries()){const S=c[u]??[];if(S.length===0)continue;const L=[],A=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(u,A,B),z=S.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rtct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:to(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,to(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rtct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const u of s){const b=u.__originalEdge;b&&u.points&&(b.points=u.points)}t.edges=(t.edges??[]).filter(u=>!u.isLayoutOnly);const V=d((u,b)=>{const S=b.x??0,L=b.y??0,A=b.width??0,B=b.height??0;if(A<=0||B<=0)return u;const U=S-A/2,q=S+A/2,z=L-B/2,Y=L+B/2;if(u.xq||u.yY)return u;const ot=u.x-U,rt=q-u.x,st=u.y-z,tt=Y-u.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:u.y}:yt===rt?{x:q,y:u.y}:yt===st?{x:u.x,y:z}:{x:u.x,y:Y}},"nodeBoundaryClamp");for(const u of t.edges){const b=u.points;if(!b||b.length<2)continue;const S=u.start,L=u.end,A=S?r.get(S):void 0,B=L?r.get(L):void 0;A&&(b[0]=V(b[0],A)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(lr,"routeEdgesOrthogonal");function fr(t){return t.direction??"TB"}d(fr,"getSwimlaneDirection");function dr(t){const e=Uo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,a=t.config.swimlane?.automaticLaneOrdering??!1,l=fr(t),{ordered:f,coordinates:i}=ar(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:a,direction:l});Wo(e,f,i,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;lr(t,l);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Es(t,l),Ls(t),l}d(dr,"runSwimlaneLayoutCore");function ur(t){jo(t);const e=Ko(t);t.nodes=e.nodes,t.edges=e.edges}d(ur,"prepareSwimlaneLayout");var Hr=Cr({prepareLayout:ur,runLayoutCore:dr,afterPaint:zo});export{Hr as render}; diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-BUZY9pzv.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-BUZY9pzv.js new file mode 100644 index 000000000..e245e67e4 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-BUZY9pzv.js @@ -0,0 +1,8 @@ +import{c as r,s as e}from"./flowDiagram-A5DVABFB-SicbxN4x.js";import{_ as a}from"./mermaid.core-CwGP16Dm.js";import"./chunk-5VM5RSS4-Ny2gwX65.js";import"./chunk-XXDRQBXY-HOEikrp0.js";import"./chunk-POPQ4Y6H-BFcN0waq.js";import"./chunk-F27PBJKO-pJCmv4XH.js";import"./purify.es-5AjVNlXF.js";import"./channel-BpqL3HJE.js";import"./index-Ct7MGS7v.js";var o=a(t=>`${e(t)} + .swimlane.cluster rect { + stroke: ${t.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js deleted file mode 100644 index eb1a00f94..000000000 --- a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-DsX8zbP8.js +++ /dev/null @@ -1,8 +0,0 @@ -import{c as r,s as e}from"./flowDiagram-A5DVABFB-D6_Z_lfU.js";import{_ as a}from"./mermaid.core-BusHtpbx.js";import"./chunk-5VM5RSS4-BX7DTcSO.js";import"./chunk-XXDRQBXY-DaNzL58C.js";import"./chunk-POPQ4Y6H-BpzExJjb.js";import"./chunk-F27PBJKO-CGsciVEq.js";import"./purify.es-5AjVNlXF.js";import"./channel-DZ2XEbLN.js";import"./index-BZ9wqq8Z.js";var o=a(t=>`${e(t)} - .swimlane.cluster rect { - stroke: ${t.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-S237vnu4.js b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CC8ieJMY.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-S237vnu4.js rename to apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CC8ieJMY.js index 635802d72..1af10168c 100644 --- a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-S237vnu4.js +++ b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CC8ieJMY.js @@ -1,4 +1,4 @@ -import{_ as o,A as pt,ab as Rt,ac as Ct,ad as Wt,c as gt,l as E,G as Pt,a2 as Bt,ae as ft,j as U,v as Vt,af as Ft,r as zt}from"./mermaid.core-BusHtpbx.js";import{d as ot}from"./arc-B8osaoVd.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: +import{_ as o,A as pt,ab as Rt,ac as Ct,ad as Wt,c as gt,l as E,G as Pt,a2 as Bt,ae as ft,j as U,v as Vt,af as Ft,r as zt}from"./mermaid.core-CwGP16Dm.js";import{d as ot}from"./arc-CPa230_j.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: `+w.showPosition()+` Expecting `+Z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:Z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,R=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],C.$=x[x.length-B],C._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},K&&(C._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(C,[v,R,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(C.$),u.push(C._$),X=S[l[l.length-2]][l[l.length-1]],l.push(X);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||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:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(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:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=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 x=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===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(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:o(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:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/tsMode-BZYSYhKr.js b/apps/pythinker-code/dist-web/assets/tsMode-CYFtUCqN.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/tsMode-BZYSYhKr.js rename to apps/pythinker-code/dist-web/assets/tsMode-CYFtUCqN.js index d1cec454f..373424172 100644 --- a/apps/pythinker-code/dist-web/assets/tsMode-BZYSYhKr.js +++ b/apps/pythinker-code/dist-web/assets/tsMode-CYFtUCqN.js @@ -1,4 +1,4 @@ -import{c as M,e as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-BjWGAzqc.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;ie.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class W extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,` +import{c as M,e as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-BjWGAzqc.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;ie.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class W extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,` `),code:t.code.toString(),tags:u,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(i=>{let l=e;if(i.file&&(l=this._libFiles.getOrCreateModel(i.file.fileName)),!l)return;const p=i.start||0,n=i.length||1,{lineNumber:r,column:u}=l.getPositionAt(p),{lineNumber:d,column:g}=l.getPositionAt(p+n);o.push({resource:l.uri,startLineNumber:r,startColumn:u,endLineNumber:d,endColumn:g,message:A(i.messageText,` `)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return v.Error;case 3:return v.Info;case 0:return v.Warning;case 2:return v.Hint}return v.Info}}class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,i){const l=e.getWordUntilPosition(t),p=new O(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),n=e.uri,r=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const d=await u.getCompletionsAtPosition(n.toString(),r);return!d||e.isDisposed()?void 0:{suggestions:d.entries.map(b=>{let h=p;if(b.replacementSpan){const x=e.getPositionAt(b.replacementSpan.start),D=e.getPositionAt(b.replacementSpan.start+b.replacementSpan.length);h=new O(x.lineNumber,x.column,D.lineNumber,D.column)}const k=[];return b.kindModifiers!==void 0&&b.kindModifiers.indexOf("deprecated")!==-1&&k.push(f.CompletionItemTag.Deprecated),{uri:n,position:t,offset:r,range:h,label:b.name,insertText:b.name,sortText:b.sortText,kind:C.convertKind(b.kind),tags:k}})}}async resolveCompletionItem(e,t){const o=e,i=o.uri,l=o.position,p=o.offset,r=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),p,o.label);return r?{uri:i,position:l,label:r.name,kind:C.convertKind(r.kind),detail:_(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case a.primitiveType:case a.keyword:return f.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return f.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return f.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return f.CompletionItemKind.Function;case a.enum:return f.CompletionItemKind.Enum;case a.module:return f.CompletionItemKind.Module;case a.class:return f.CompletionItemKind.Class;case a.interface:return f.CompletionItemKind.Interface;case a.warning:return f.CompletionItemKind.File}return f.CompletionItemKind.Property}static createDocumentationString(e){let t=_(e.documentation);if(e.tags)for(const o of e.tags)t+=` diff --git a/apps/pythinker-code/dist-web/assets/typescript-DeFWR0Bj.js b/apps/pythinker-code/dist-web/assets/typescript-vzwxO8Um.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/typescript-DeFWR0Bj.js rename to apps/pythinker-code/dist-web/assets/typescript-vzwxO8Um.js index bb63710f3..4a4254afd 100644 --- a/apps/pythinker-code/dist-web/assets/typescript-DeFWR0Bj.js +++ b/apps/pythinker-code/dist-web/assets/typescript-vzwxO8Um.js @@ -1 +1 @@ -import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},i={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{r as conf,i as language}; +import{l as e}from"./editor.main-28ipUIqH.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},i={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{r as conf,i as language}; diff --git a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BElDUyH9.js b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BY_8Roc7.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BElDUyH9.js rename to apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BY_8Roc7.js index 10d602ed2..f8e0226ab 100644 --- a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BElDUyH9.js +++ b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-BY_8Roc7.js @@ -1,4 +1,4 @@ -import{b1 as Wt,s as Kt,g as Ht,q as Yt,p as Xt,a as Zt,b as Jt,_ as w,A as wt,G as Qt,j as ot,am as $t,ab as te,ac as ee,ad as ne,d as se,r as ie,D as oe,E as re}from"./mermaid.core-BusHtpbx.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Tt(e);for(let u=0;ua.angle-u.angle);let f=e[e.length-1];for(let u=0;up.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;uMath.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u=0&&(n=a),Math.abs(f)ct(n))}function $(t,n){let s=0;for(let e=0;ev.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx=1)break;for(let d=1;dl+o*i*f||u>=T)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,T=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a{const y={};for(let h=0;hxt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;ul===f?0:lo.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;hy.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;bt[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=jt(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function jt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in T)return T[x];var d=T[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(j=>D.has(j)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let E=!1;O.selectAll(".venn-area path").each(function(k){const j=this.getAttribute("d");k.sets.length==1&&j&&!b&&(E=!0,R[k.sets[0]]=Me(j))});function A(k){return j=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-j)+Z.x*j,y:Y.y*(1-j)+Z.y*j,radius:Y.radius*(1-j)+Z.radius*j}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;E&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(j=>I[j])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(E?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const F=K(G.exit()).remove();typeof G.transition=="function"&&F.selectAll("path").attrTween("d",A);const X=F.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:F}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const T=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${T+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` +import{b1 as Wt,s as Kt,g as Ht,q as Yt,p as Xt,a as Zt,b as Jt,_ as w,A as wt,G as Qt,j as ot,am as $t,ab as te,ac as ee,ad as ne,d as se,r as ie,D as oe,E as re}from"./mermaid.core-CwGP16Dm.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Tt(e);for(let u=0;ua.angle-u.angle);let f=e[e.length-1];for(let u=0;up.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;uMath.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u=0&&(n=a),Math.abs(f)ct(n))}function $(t,n){let s=0;for(let e=0;ev.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx=1)break;for(let d=1;dl+o*i*f||u>=T)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,T=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a{const y={};for(let h=0;hxt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;ul===f?0:lo.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;hy.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;bt[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=jt(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function jt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in T)return T[x];var d=T[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(j=>D.has(j)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let E=!1;O.selectAll(".venn-area path").each(function(k){const j=this.getAttribute("d");k.sets.length==1&&j&&!b&&(E=!0,R[k.sets[0]]=Me(j))});function A(k){return j=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-j)+Z.x*j,y:Y.y*(1-j)+Z.y*j,radius:Y.radius*(1-j)+Z.radius*j}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;E&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(j=>I[j])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(E?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const F=K(G.exit()).remove();typeof G.transition=="function"&&F.selectAll("path").attrTween("d",A);const X=F.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:F}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const T=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${T+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` M`,t,n),e.push(` m`,-s,0),e.push(` a`,s,s,0,1,0,s*2,0),e.push(` diff --git a/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-B0BJU7Oe.js b/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C60WDxyU.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-B0BJU7Oe.js rename to apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C60WDxyU.js index 8cdea1adf..53ada4cbd 100644 --- a/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-B0BJU7Oe.js +++ b/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C60WDxyU.js @@ -1,4 +1,4 @@ -import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-BZ9wqq8Z.js";/** +import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-Ct7MGS7v.js";/** * vue v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-BiZ0eogf.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js rename to apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-BiZ0eogf.js index 11a28d56c..6634027fd 100644 --- a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-C5SVPYNO.js +++ b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-BiZ0eogf.js @@ -1,4 +1,4 @@ -import{p as St}from"./chunk-JWPE2WC7-D9ICAwD_.js";import{s as Mt,g as Nt,q as zt,p as Lt,a as Tt,b as At,_ as u,X as Xt,A as Et,D as U,l as K,G as Yt,d as It,r as Bt,c as j}from"./mermaid.core-BusHtpbx.js";import{p as Ft}from"./cynefin-OW5HDTMX-BlED4Rd3.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map +import{p as St}from"./chunk-JWPE2WC7-C_cClkrQ.js";import{s as Mt,g as Nt,q as zt,p as Lt,a as Tt,b as At,_ as u,X as Xt,A as Et,D as U,l as K,G as Yt,d as It,r as Bt,c as j}from"./mermaid.core-CwGP16Dm.js";import{p as Ft}from"./cynefin-OW5HDTMX-D3VomulX.js";import"./index-Ct7MGS7v.js";import"./purify.es-5AjVNlXF.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map `+e);const a=Ht(),d=qt(),w=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),F=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=Yt(n);E.selectAll("*").remove(),It(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${n}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const z=u(t=>a.padding+t/100*Y,"projectX"),L=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const ut=g.axes.xLabel??"Evolution",wt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(ut),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(wt);const B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(B.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===B.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/B.length;B.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}B.forEach((i,p)=>{const l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h{const y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(o.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),_=new Map;g.pipelines.forEach(t=>{_.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||_.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,m=f/h,P=-l/h,N=i+m*y,O=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);const mt=v.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=z(t.targetX),i=L(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,m=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);mt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(o.length>1)for(let i=0;i{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),o=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(h.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(H=>{const W=H.node(),Pt=W.getComputedTextLength();m=Math.max(m,Pt);const Ct=W.getBBox();P=Math.max(P,Ct.height)});const N=m+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,bt=S-a.padding-N,$t=a.padding,vt=b-a.padding-O;s=Math.max(X,Math.min(s,bt)),o=Math.max($t,Math.min(o,vt)),y.forEach((H,W)=>{H.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const o=z(s.x),i=L(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=` M ${o} ${i-l/2} L ${o+p-f} ${i-l/2} diff --git a/apps/pythinker-code/dist-web/assets/xml-BDPhTprf.js b/apps/pythinker-code/dist-web/assets/xml-CV6_LXH0.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/xml-BDPhTprf.js rename to apps/pythinker-code/dist-web/assets/xml-CV6_LXH0.js index 36c7cf33c..68afb5147 100644 --- a/apps/pythinker-code/dist-web/assets/xml-BDPhTprf.js +++ b/apps/pythinker-code/dist-web/assets/xml-CV6_LXH0.js @@ -1 +1 @@ -import{l as e}from"./editor.main-yCrGDkyO.js";import"./index-BZ9wqq8Z.js";import"./purify.es-5AjVNlXF.js";const i={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/ Pythinker Code Web - + diff --git a/apps/pythinker-web/src/api/daemon/http.ts b/apps/pythinker-web/src/api/daemon/http.ts index c07bb779c..82932a821 100644 --- a/apps/pythinker-web/src/api/daemon/http.ts +++ b/apps/pythinker-web/src/api/daemon/http.ts @@ -43,7 +43,22 @@ function requestSignal( try { return AbortSignal.any([callerSignal, timeout]); } catch { - return callerSignal; + const signals = [callerSignal, timeout]; + const controller = new AbortController(); + const cleanup = (): void => { + for (const signal of signals) signal.removeEventListener('abort', forwardAbort); + }; + const forwardAbort = (event: Event): void => { + cleanup(); + controller.abort((event.target as AbortSignal).reason); + }; + for (const signal of signals) signal.addEventListener('abort', forwardAbort, { once: true }); + const aborted = signals.find((signal) => signal.aborted); + if (aborted !== undefined) { + cleanup(); + controller.abort(aborted.reason); + } + return controller.signal; } } diff --git a/apps/pythinker-web/src/composables/client/useTaskPoller.ts b/apps/pythinker-web/src/composables/client/useTaskPoller.ts index 0227f5469..ca9c56f32 100644 --- a/apps/pythinker-web/src/composables/client/useTaskPoller.ts +++ b/apps/pythinker-web/src/composables/client/useTaskPoller.ts @@ -72,8 +72,9 @@ export function useTaskPoller( let pollTimer: ReturnType | null = null; let finalRefreshTimer: ReturnType | null = null; let taskClockTimer: ReturnType | null = null; - let pollController: AbortController | null = null; - let loadController: AbortController | null = null; + let requestController: AbortController | null = null; + let requestPromise: Promise | null = null; + let requestGeneration = 0; let polledSessionId: string | undefined; let outputSessionId: string | undefined; const fetchedTerminalTaskOutputIds = new Set(); @@ -105,26 +106,50 @@ export function useTaskPoller( ); } - async function loadTasksForSession(sessionId: string): Promise { - if (rawState.activeSessionId !== sessionId) return; - selectOutputSession(sessionId); - loadController?.abort(); - const controller = new AbortController(); - loadController = controller; + async function loadTaskListForSession(sessionId: string, signal: AbortSignal): Promise { try { const taskList = await getPythinkerWebApi().listTasks(sessionId, { withOutput: true, outputBytes: TASK_OUTPUT_FINAL_BYTES, outputStatus: 'all', - signal: controller.signal, + signal, }); - if (controller.signal.aborted || rawState.activeSessionId !== sessionId) return; + if (signal.aborted || rawState.activeSessionId !== sessionId) return; markTerminalOutputsFetched(taskList); applyTaskList(sessionId, taskList); } catch { return; + } + } + + async function loadTasksForSession(sessionId: string): Promise { + if (rawState.activeSessionId !== sessionId) return; + selectOutputSession(sessionId); + const generation = ++requestGeneration; + const previousRequest = requestPromise; + requestController?.abort(); + if (previousRequest !== null) await previousRequest; + if (generation !== requestGeneration || rawState.activeSessionId !== sessionId) return; + + const controller = new AbortController(); + const request = loadTaskListForSession(sessionId, controller.signal); + requestController = controller; + requestPromise = request; + try { + await request; } finally { - if (loadController === controller) loadController = null; + if (requestPromise === request) { + requestPromise = null; + requestController = null; + } + } + if ( + generation === requestGeneration && + polledSessionId === sessionId && + rawState.activeSessionId === sessionId && + hasRunningTask(sessionId) + ) { + schedulePoll(sessionId, TASK_OUTPUT_POLL_INTERVAL_MS); } } @@ -183,12 +208,26 @@ export function useTaskPoller( // Idle while hidden; `visibilitychange` below resumes with an immediate poll. return; } + if (requestPromise !== null) { + schedulePoll(sessionId, TASK_OUTPUT_POLL_INTERVAL_MS); + return; + } + const generation = ++requestGeneration; const controller = new AbortController(); - pollController = controller; - await pollTaskOutputForSession(sessionId, controller.signal); - if (pollController === controller) pollController = null; + const request = pollTaskOutputForSession(sessionId, controller.signal); + requestController = controller; + requestPromise = request; + try { + await request; + } finally { + if (requestPromise === request) { + requestPromise = null; + requestController = null; + } + } if ( + generation === requestGeneration && !controller.signal.aborted && polledSessionId === sessionId && rawState.activeSessionId === sessionId && @@ -200,7 +239,7 @@ export function useTaskPoller( function onVisibilityChange(): void { if (document.visibilityState !== 'visible' || polledSessionId === undefined) return; - if (pollTimer !== null || pollController !== null) return; + if (pollTimer !== null || requestPromise !== null) return; void runPoll(polledSessionId); } if (typeof document !== 'undefined') { @@ -212,8 +251,7 @@ export function useTaskPoller( clearTimeout(pollTimer); pollTimer = null; } - pollController?.abort(); - pollController = null; + requestController?.abort(); polledSessionId = undefined; } @@ -254,8 +292,7 @@ export function useTaskPoller( finalRefreshTimer = null; } if (sessionId !== previousSessionId) { - loadController?.abort(); - loadController = null; + requestController?.abort(); selectOutputSession(sessionId); } if (sessionId !== undefined && hasRunning) { @@ -278,14 +315,13 @@ export function useTaskPoller( ); function dispose(): void { + requestGeneration += 1; if (typeof document !== 'undefined') { document.removeEventListener('visibilitychange', onVisibilityChange); } stopTaskClockWatch(); stopPollingWatch(); stopTaskOutputPolling(); - loadController?.abort(); - loadController = null; if (finalRefreshTimer !== null) clearTimeout(finalRefreshTimer); finalRefreshTimer = null; if (taskClockTimer !== null) clearInterval(taskClockTimer); diff --git a/apps/pythinker-web/test/http-cancellation.test.ts b/apps/pythinker-web/test/http-cancellation.test.ts index 7f7c62938..91997df0e 100644 --- a/apps/pythinker-web/test/http-cancellation.test.ts +++ b/apps/pythinker-web/test/http-cancellation.test.ts @@ -3,6 +3,7 @@ import { DaemonHttpClient } from '../src/api/daemon/http'; describe('DaemonHttpClient request cancellation', () => { afterEach(() => { + vi.restoreAllMocks(); vi.unstubAllGlobals(); }); @@ -15,7 +16,9 @@ describe('DaemonHttpClient request cancellation', () => { return new Promise((_resolve, reject) => { requestSignal?.addEventListener( 'abort', - () => reject(new DOMException('Aborted', 'AbortError')), + () => { + reject(new DOMException('Aborted', 'AbortError')); + }, { once: true }, ); }); @@ -37,4 +40,43 @@ describe('DaemonHttpClient request cancellation', () => { await rejection; expect(requestSignal?.aborted).toBe(true); }); + + it('preserves the timeout when AbortSignal.any is unavailable', async () => { + const timeoutController = new AbortController(); + vi.spyOn(AbortSignal, 'timeout').mockReturnValue(timeoutController.signal); + vi.spyOn(AbortSignal, 'any').mockImplementation(() => { + throw new TypeError('AbortSignal.any unavailable'); + }); + let requestSignal: AbortSignal | undefined; + vi.stubGlobal( + 'fetch', + vi.fn((_url: string, init?: RequestInit) => { + requestSignal = init?.signal ?? undefined; + return new Promise((_resolve, reject) => { + requestSignal?.addEventListener( + 'abort', + () => { + reject(new DOMException('Timed out', 'TimeoutError')); + }, + { once: true }, + ); + }); + }), + ); + const caller = new AbortController(); + const client = new DaemonHttpClient('http://127.0.0.1:58627'); + const request = client.get('/test', undefined, { signal: caller.signal }); + const rejection = expect(request).rejects.toMatchObject({ + name: 'DaemonNetworkError', + cause: expect.objectContaining({ name: 'TimeoutError' }), + }); + + await vi.waitFor(() => { + expect(requestSignal).toBeDefined(); + }); + timeoutController.abort(new DOMException('Timed out', 'TimeoutError')); + + expect(requestSignal?.aborted).toBe(true); + await rejection; + }); }); diff --git a/apps/pythinker-web/test/task-poller.test.ts b/apps/pythinker-web/test/task-poller.test.ts index dcff8793b..d52666a58 100644 --- a/apps/pythinker-web/test/task-poller.test.ts +++ b/apps/pythinker-web/test/task-poller.test.ts @@ -16,6 +16,7 @@ const apiMock = vi.hoisted(() => ({ listTasks: vi.fn(), getTask: vi.fn(), })); +const pollers: Array> = []; vi.mock('../src/api', () => ({ getPythinkerWebApi: () => apiMock, @@ -68,6 +69,8 @@ describe('useTaskPoller terminal-output backfill', () => { }); afterEach(() => { + for (const poller of pollers) poller.dispose(); + pollers.length = 0; vi.useRealTimers(); }); @@ -78,6 +81,7 @@ describe('useTaskPoller terminal-output backfill', () => { ]); const poller = useTaskPoller(state, computed(() => [])); + pollers.push(poller); await poller.loadTasksForSession('sess_1'); expect(apiMock.listTasks).toHaveBeenCalledWith( @@ -100,6 +104,7 @@ describe('useTaskPoller terminal-output backfill', () => { ]); const poller = useTaskPoller(state, computed(() => [])); + pollers.push(poller); await poller.loadTasksForSession('sess_1'); expect(apiMock.listTasks).toHaveBeenCalledTimes(1); @@ -113,6 +118,7 @@ describe('useTaskPoller terminal-output backfill', () => { .mockResolvedValue([restRow({ outputPreview: 'final result', outputBytes: 2048 })]); const poller = useTaskPoller(state, computed(() => [])); + pollers.push(poller); await poller.loadTasksForSession('sess_1'); expect(state.tasksBySession['sess_1']?.[0]?.outputPreview).toBeUndefined(); @@ -129,7 +135,7 @@ describe('useTaskPoller terminal-output backfill', () => { const state = createState(running); apiMock.listTasks.mockResolvedValue(running.map((task) => ({ ...task }))); - useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + pollers.push(useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? []))); await nextTick(); await Promise.resolve(); @@ -148,7 +154,7 @@ describe('useTaskPoller terminal-output backfill', () => { }), ); - useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + pollers.push(useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? []))); await nextTick(); await vi.advanceTimersByTimeAsync(5_000); @@ -168,7 +174,7 @@ describe('useTaskPoller terminal-output backfill', () => { }, ); - useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + pollers.push(useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? []))); await nextTick(); state.activeSessionId = 'sess_2'; await nextTick(); @@ -195,6 +201,7 @@ describe('useTaskPoller terminal-output backfill', () => { ); const poller = useTaskPoller(state, computed(() => [])); + pollers.push(poller); state.activeSessionId = 'sess_2'; await nextTick(); const activeLoad = poller.loadTasksForSession('sess_2'); @@ -215,10 +222,67 @@ describe('useTaskPoller terminal-output backfill', () => { const initial = state.tasksBySession['sess_1']; apiMock.listTasks.mockResolvedValue(running.map((task) => ({ ...task }))); - useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + pollers.push(useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? []))); await nextTick(); - for (let index = 0; index < 5; index += 1) await Promise.resolve(); + await vi.waitFor(() => { + expect(apiMock.listTasks).toHaveBeenCalledTimes(1); + }); expect(state.tasksBySession['sess_1']).toBe(initial); }); + + it('serializes a full load with polling and preserves newer task state', async () => { + vi.useFakeTimers(); + const first = subagent('task-1'); + const second = subagent('task-2'); + const state = createState([first, second]); + let firstSignal: AbortSignal | undefined; + let resolvePoll!: (tasks: AppTask[]) => void; + let resolveLoad!: (tasks: AppTask[]) => void; + apiMock.listTasks + .mockImplementationOnce((_sessionId: string, input?: { signal?: AbortSignal }) => { + firstSignal = input?.signal; + return new Promise((resolve) => { + resolvePoll = resolve; + }); + }) + .mockImplementationOnce( + () => + new Promise((resolve) => { + resolveLoad = resolve; + }), + ) + .mockResolvedValue([ + { ...first, status: 'completed', completedAt: '2026-01-01T00:01:00.000Z' }, + second, + ]); + + const poller = useTaskPoller(state, computed(() => state.tasksBySession['sess_1'] ?? [])); + pollers.push(poller); + await nextTick(); + await vi.waitFor(() => { + expect(apiMock.listTasks).toHaveBeenCalledTimes(1); + }); + + const load = poller.loadTasksForSession('sess_1'); + await Promise.resolve(); + expect(firstSignal?.aborted).toBe(true); + expect(apiMock.listTasks).toHaveBeenCalledTimes(1); + + resolvePoll([first, second]); + await vi.waitFor(() => { + expect(apiMock.listTasks).toHaveBeenCalledTimes(2); + }); + resolveLoad([ + { ...first, status: 'completed', completedAt: '2026-01-01T00:01:00.000Z' }, + second, + ]); + await load; + expect(state.tasksBySession['sess_1']?.find((task) => task.id === first.id)?.status).toBe( + 'completed', + ); + + await vi.advanceTimersByTimeAsync(1_000); + expect(apiMock.listTasks).toHaveBeenCalledTimes(3); + }); }); diff --git a/packages/agent-gateway/test/tasks.test.ts b/packages/agent-gateway/test/tasks.test.ts index 0d97d7e68..b14141efb 100644 --- a/packages/agent-gateway/test/tasks.test.ts +++ b/packages/agent-gateway/test/tasks.test.ts @@ -364,7 +364,9 @@ describe('server-v2 /api/v1/sessions/{sid}/tasks', () => { `/api/v1/sessions/${id}/tasks?with_output=false`, ); expect(listed.body.code).toBe(0); - expect(listed.body.data.items[0]?.output_preview).toBeUndefined(); + const listedTask = listed.body.data.items.find((item) => item.id === taskId); + expect(listedTask).toBeDefined(); + expect(listedTask!.output_preview).toBeUndefined(); const task = await getJson( `/api/v1/sessions/${id}/tasks/${taskId}?with_output=false`, @@ -402,7 +404,9 @@ describe('server-v2 /api/v1/sessions/{sid}/tasks', () => { expect(listed.body.code).toBe(0); const byId = new Map(listed.body.data.items.map((task) => [task.id, task])); expect(byId.get(runningId)?.output_preview).toBe('running output'); - expect(byId.get(terminalId)?.output_preview).toBeUndefined(); + const terminalTask = byId.get(terminalId); + expect(terminalTask).toBeDefined(); + expect(terminalTask!.output_preview).toBeUndefined(); }); it('rejects list output limits above 32 KiB', async () => { From a1e8bf43c77a7661a15856615703d9b3ebe28728 Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 28 Aug 2026 22:23:24 -0400 Subject: [PATCH 3/4] chore: note tab-title change in changeset --- .changeset/smoother-long-conversations.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.changeset/smoother-long-conversations.md b/.changeset/smoother-long-conversations.md index c19e95d4c..2fdb509b9 100644 --- a/.changeset/smoother-long-conversations.md +++ b/.changeset/smoother-long-conversations.md @@ -3,3 +3,5 @@ --- Reduce interface slowdowns during long conversations with many background tasks. + +The browser tab title now shows a static running marker instead of an animated spinner. From 7c8ab0b7f186fa66722c157063d6ea43f25664fb Mon Sep 17 00:00:00 2001 From: elkaix Date: Sat, 29 Aug 2026 05:32:08 -0400 Subject: [PATCH 4/4] chore: condense streaming changeset --- .changeset/smoother-long-conversations.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.changeset/smoother-long-conversations.md b/.changeset/smoother-long-conversations.md index 2fdb509b9..1ded22fc1 100644 --- a/.changeset/smoother-long-conversations.md +++ b/.changeset/smoother-long-conversations.md @@ -2,6 +2,4 @@ "@pymodel/pythinker-code": patch --- -Reduce interface slowdowns during long conversations with many background tasks. - -The browser tab title now shows a static running marker instead of an animated spinner. +Reduce interface slowdowns during long conversations with many background tasks and show a static running marker in the browser tab title.